Browse Source

1、工序报工-表单页重复显示

master
bjang03 4 months ago
parent
commit
08a0f50e46
  1. 29
      src/pages/mes/workScheduling/processReportPeopleCheck.vue

29
src/pages/mes/workScheduling/processReportPeopleCheck.vue

@ -2,10 +2,10 @@
<view class="container"> <view class="container">
<view class="list"> <view class="list">
<view> <view>
<u-search :show-action="true" v-model="data.nickName" action-text="搜索" input-align="left" height="65" border-color="#ff9900"></u-search> <u-search :show-action="true" v-model="data.nickName" action-text="搜索" input-align="left" height="65" border-color="#ff9900" @search="filterList" @custom="filterList"></u-search>
</view> </view>
<scroll-view scroll-y="true" class="scroll-Y" style="height: calc(100vh - 80rpx)"> <scroll-view scroll-y="true" class="scroll-Y" style="height: calc(100vh - 80rpx)">
<u-checkbox-group class="item"> <u-checkbox-group class="item" @change="checkChange">
<u-checkbox class="dec" v-model="item.checked" v-for="(item, index) in list" :key="index" :name="item">{{ item.personName }}</u-checkbox> <u-checkbox class="dec" v-model="item.checked" v-for="(item, index) in list" :key="index" :name="item">{{ item.personName }}</u-checkbox>
</u-checkbox-group> </u-checkbox-group>
</scroll-view> </scroll-view>
@ -48,27 +48,36 @@ const data = ref({
const status = ref('loadmore') const status = ref('loadmore')
/* 列表数据集 */ /* 列表数据集 */
const list = ref([]) const list = ref([])
let checked: string | any[] = []
function checkChange(checkedArray: any[]) {
checked = checkedArray
}
/* 打开详情页 */ /* 打开详情页 */
function openDetail(item: any) { function openDetail(item: any) {
console.log(item) console.log(item)
// proxy.$tab.navigateTo(`/pages/mes/orderDapPlan/detail?obj=${item}`) // proxy.$tab.navigateTo(`/pages/mes/orderDapPlan/detail?obj=${item}`)
} }
function filterList(){
list.value = []
uni.getStorageSync("processReportList").forEach(person=>{
if (person.personName.includes(data.value.nickName)){
list.value.push(person)
}
})
}
/* 通用方法 */ /* 通用方法 */
onShow(() => { onShow(() => {
}) })
function onSubmit() { function onSubmit() {
list.value.forEach(item=>{ if (checked.length == 0){
if (item.checked){ _toast("请选择人员")
return
}else{
uni.setStorageSync("processReportList", list.value) uni.setStorageSync("processReportList", list.value)
uni.redirectTo({ uni.redirectTo({
url: "./processReportForm" url: "/pages/mes/workScheduling/processReportForm"
}) })
return
} }
})
_toast("请选择人员")
} }
onLoad((option) => { onLoad((option) => {
list.value = uni.getStorageSync("processReportList") list.value = uni.getStorageSync("processReportList")

Loading…
Cancel
Save