|
@ -55,7 +55,7 @@ |
|
|
|
|
|
|
|
|
<script setup lang="ts"> |
|
|
<script setup lang="ts"> |
|
|
/* 初始化 */ |
|
|
/* 初始化 */ |
|
|
import { onShow } from "@dcloudio/uni-app" |
|
|
import { onLoad, onShow } from "@dcloudio/uni-app" |
|
|
import { getCurrentInstance, ref } from "vue" |
|
|
import { getCurrentInstance, ref } from "vue" |
|
|
/* 引入API */ |
|
|
/* 引入API */ |
|
|
import * as workSchedulingApi from "@/api/mes/workScheduling" |
|
|
import * as workSchedulingApi from "@/api/mes/workScheduling" |
|
@ -97,6 +97,7 @@ function openDetail(item: any) { |
|
|
// proxy.$tab.navigateTo(`/pages/mes/orderDapPlan/detail?obj=${item}`) |
|
|
// proxy.$tab.navigateTo(`/pages/mes/orderDapPlan/detail?obj=${item}`) |
|
|
} |
|
|
} |
|
|
function toCheckPeople(){ |
|
|
function toCheckPeople(){ |
|
|
|
|
|
uni.setStorageSync("processReportList", tempList) |
|
|
uni.redirectTo({ |
|
|
uni.redirectTo({ |
|
|
url: "./processReportPeopleCheck" |
|
|
url: "./processReportPeopleCheck" |
|
|
}) |
|
|
}) |
|
@ -104,15 +105,23 @@ function toCheckPeople(){ |
|
|
function remove(index: number){ |
|
|
function remove(index: number){ |
|
|
if (list.value.length > 1) { |
|
|
if (list.value.length > 1) { |
|
|
_confirm('确定要删除吗?',function(){ |
|
|
_confirm('确定要删除吗?',function(){ |
|
|
|
|
|
tempList.forEach(person=>{ |
|
|
|
|
|
if(person.personCode != list.value[index].personCode){ |
|
|
|
|
|
person.checked = false |
|
|
|
|
|
} |
|
|
|
|
|
}) |
|
|
list.value.splice(index, 1) |
|
|
list.value.splice(index, 1) |
|
|
}) |
|
|
}) |
|
|
}else{ |
|
|
}else{ |
|
|
_toast("最少需要上报一项") |
|
|
_toast("最少需要上报一项") |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
|
|
|
let tempList: any[] = [] |
|
|
/* 通用方法 */ |
|
|
/* 通用方法 */ |
|
|
onShow(() => { |
|
|
onLoad(() => { |
|
|
uni.getStorageSync("processReportList").forEach(person=>{ |
|
|
// 页面中删除需要同时修改storage中的checked状态,因此需要指针引用 |
|
|
|
|
|
tempList = uni.getStorageSync("processReportList") |
|
|
|
|
|
tempList.forEach(person=>{ |
|
|
if(person.checked){ |
|
|
if(person.checked){ |
|
|
person.reportList.forEach(report=>{ |
|
|
person.reportList.forEach(report=>{ |
|
|
list.value.push(report) |
|
|
list.value.push(report) |
|
|