|
|
@ -2,10 +2,10 @@ |
|
|
|
<view class="container"> |
|
|
|
<view class="list"> |
|
|
|
<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> |
|
|
|
<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-group> |
|
|
|
</scroll-view> |
|
|
@ -48,27 +48,36 @@ const data = ref({ |
|
|
|
const status = ref('loadmore') |
|
|
|
/* 列表数据集 */ |
|
|
|
const list = ref([]) |
|
|
|
|
|
|
|
let checked: string | any[] = [] |
|
|
|
function checkChange(checkedArray: any[]) { |
|
|
|
checked = checkedArray |
|
|
|
} |
|
|
|
/* 打开详情页 */ |
|
|
|
function openDetail(item: any) { |
|
|
|
console.log(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(() => { |
|
|
|
}) |
|
|
|
function onSubmit() { |
|
|
|
list.value.forEach(item=>{ |
|
|
|
if (item.checked){ |
|
|
|
uni.setStorageSync("processReportList", list.value) |
|
|
|
uni.redirectTo({ |
|
|
|
url: "./processReportForm" |
|
|
|
}) |
|
|
|
return |
|
|
|
} |
|
|
|
}) |
|
|
|
_toast("请选择人员") |
|
|
|
if (checked.length == 0){ |
|
|
|
_toast("请选择人员") |
|
|
|
return |
|
|
|
}else{ |
|
|
|
uni.setStorageSync("processReportList", list.value) |
|
|
|
uni.redirectTo({ |
|
|
|
url: "/pages/mes/workScheduling/processReportForm" |
|
|
|
}) |
|
|
|
} |
|
|
|
} |
|
|
|
onLoad((option) => { |
|
|
|
list.value = uni.getStorageSync("processReportList") |
|
|
|