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