Browse Source

修改批量采购上架全选

hella_online_20240911
lijuncheng 5 months ago
parent
commit
324d8e7a46
  1. 39
      src/pages/putaway/job/quantityPutawayJob.vue

39
src/pages/putaway/job/quantityPutawayJob.vue

@ -1,12 +1,24 @@
<template> <template>
<view class=""> <view class="">
<view class="" style="background: white;padding: 20rpx;position: fixed;width: 100%;box-shadow: 0px 0px 10px 10px rgba(1, 1, 1, 0.05);z-index: 22; "> <view class="" v-if="jobList.length>0" style="background: white;padding: 20rpx;position: fixed;width: 100%;box-shadow: 0px 0px 10px 10px rgba(1, 1, 1, 0.05);z-index: 22; ">
<uni-pagination :total="totalCount" title="每页30" :pageSize='pageSize' @change="changePage" :current="pageNo"/> <uni-pagination :total="totalCount" title="每页30" :pageSize='pageSize' @change="changePage" :current="pageNo"/>
<view class="" style="width: 100%; font-size: 30rpx; align-items: center; text-align: center;">
当前第{{pageNo}}每页{{ pageSize}} 共计{{ totalCount }} <view class="uni-flex uni-row">
<view class="uni-flex uni-row">
<view class="" >
<u-checkbox size="40" v-model="checkAll" @change="checkAllItems" >
</u-checkbox>
</view>
<view>
<text style="margin-left: 2rpx; font-size: 32rpx;font-weight: bold;">选择当前页({{jobList.length}})</text>
</view>
</view>
<view class="" style=" margin-left: 10rpx; font-size: 32rpx; align-items: center; text-align: center;">
{{pageNo}}每页/{{ pageSize}}, :{{ totalCount }}
</view>
</view> </view>
</view> </view>
<com-empty-view v-if="jobList.length==0"></com-empty-view> <com-empty-view v-if="jobList.length==0"></com-empty-view>
<job-filter ref="filter" otherTitle="ASN" :isShowToAreaCode="true" :isShowQurery='true' :isShowStatus='false' <job-filter ref="filter" otherTitle="ASN" :isShowToAreaCode="true" :isShowQurery='true' :isShowStatus='false'
@ -26,7 +38,7 @@
</u-checkbox> </u-checkbox>
</view> </view>
<view class="" style="width: 100%;"> <view class="" style="width: 100%;">
<com-putaway-job-card :dataContent="item" @click='openJobDetail(item)'></com-putaway-job-card> <com-putaway-job-card :dataContent="item" @click='checkedItem(item)'></com-putaway-job-card>
</view> </view>
</view> </view>
</uni-swipe-action-item> </uni-swipe-action-item>
@ -116,7 +128,8 @@
creationTime: "", creationTime: "",
itemCode: "", itemCode: "",
toAreaCode: "", toAreaCode: "",
toLocationCode: "" toLocationCode: "",
checkAll:false
}; };
}, },
@ -194,6 +207,7 @@
list.forEach(item=>{ list.forEach(item=>{
item.checked=false; item.checked=false;
}) })
this.checkAll=false
this.totalCount = res.data.total this.totalCount = res.data.total
updateTitle(this.title + "(" + this.totalCount + ")"); updateTitle(this.title + "(" + this.totalCount + ")");
// this.loadingType = "loadmore"; // this.loadingType = "loadmore";
@ -429,12 +443,23 @@
this.getList() this.getList()
}, },
checkAllItems(checkAll){ checkAllItems(checkAll){
console.log(checkAll) if(checkAll.value){
this.jobList.forEach(res=>{
res.checked=true;
})
}else {
this.jobList.forEach(res=>{
res.checked=false;
})
}
}, },
cancleAll(){ cancleAll(){
this.jobList.forEach(res=>{ this.jobList.forEach(res=>{
res.checked=false; res.checked=false;
}) })
},
checkedItem(item){
item.checked =!item.checked
} }
} }

Loading…
Cancel
Save