Browse Source

修改批量上架修改库位

intex^2
lijuncheng 3 days ago
parent
commit
c63717c3f5
  1. 75
      src/pages/putaway/job/quantityPutawayJob.vue

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

@ -1,7 +1,9 @@
<template>
<view class="">
<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"/>
<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" />
<view class="uni-flex uni-row">
<view class="uni-flex uni-row">
@ -10,10 +12,12 @@
</u-checkbox>
</view>
<view>
<text style="margin-left: 2rpx; font-size: 32rpx;font-weight: bold;">当前页({{jobList.length}})</text>
<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;">
<view class=""
style=" margin-left: 10rpx; font-size: 32rpx; align-items: center; text-align: center;">
{{pageNo}}每页/{{ pageSize}}, :{{ totalCount }}
</view>
</view>
@ -26,6 +30,12 @@
</job-filter>
<view v-if="jobList.length>0" style="padding-bottom: 100rpx;padding-top: 150rpx;">
<view class="" style="padding-left: 60rpx; padding-top: 10rpx; padding-bottom: 10rpx; background-color:#D3D1CC">
<locationCompare ref='comScanLocation' title="目标库位"
:recommendLocationCode="toSubmitLocationCode" @getLocation='scanLocationCode' :isShowEdit="true"
:locationAreaTypeList="toLocationAreaTypeList"></locationCompare>
</view>
<uni-swipe-action ref="swipeAction">
<view v-for="(item, index) in jobList" :key="index">
<uni-swipe-action-item :right-options="item.status=='2'?detailGiveupOptions:detailOptions"
@ -38,7 +48,8 @@
</u-checkbox>
</view>
<view class="" style="width: 100%;">
<com-putaway-job-card :dataContent="item" @click='checkedItem(item)'></com-putaway-job-card>
<com-putaway-job-card :dataContent="item"
@click='checkedItem(item)'></com-putaway-job-card>
</view>
</view>
</uni-swipe-action-item>
@ -70,6 +81,9 @@
cancleAllTakePutawayJob
} from '@/api/request2.js';
import {
getDirectoryItemArray,
} from '@/common/directory.js';
import {
goHome,
@ -89,6 +103,7 @@
import putawayInfoPopup from '@/pages/putaway/coms/putawayInfoPopup.vue'
import winScanPackJob from "@/mycomponents/scan/winScanPackJob.vue"
import comCheckAll from "@/mycomponents/button/comCheckAll.vue"
import locationCompare from '@/mycomponents/location/locationCompare.vue'
import {
@ -106,7 +121,8 @@
winScanButton,
winScanPackJob,
jobList,
comCheckAll
comCheckAll,
locationCompare
},
data() {
return {
@ -129,7 +145,9 @@
itemCode: "",
toAreaCode: "",
toLocationCode: "",
checkAll:false
checkAll: false,
toSubmitLocationCode: "",
toLocationAreaTypeList: []
};
},
@ -198,6 +216,7 @@
}
this.currentPageNo = this.pageNo
getPutawayJobList(params).then(res => {
uni.hideLoading();
if (type === "refresh") {
uni.stopPullDownRefresh();
@ -216,6 +235,11 @@
// return;
// }
this.jobList = list
if (this.jobList.length > 0) {
this.toLocationAreaTypeList = getDirectoryItemArray(this.jobList[0].toAreaTypes)
}
this.toSubmitLocationCode=""
// this.pageNo++;
}).catch(error => {
@ -376,16 +400,34 @@
},
//
takeAllJob() {
uni.showLoading({
title: "加载中­....",
mask: true
if(!this.toSubmitLocationCode){
this.$refs.comMessage.showQuestionMessage("是否要修改目标库位?", res => {
if (res) {
this.$refs.comScanLocation.showLocation()
}else {
this.submitJob()
}
});
}else {
this.submitJob()
}
},
submitJob(){
this.jobNumberList = []
this.jobList.forEach(item => {
if (item.checked) {
this.jobNumberList.push(item.number)
}
})
if(this.jobNumberList.length==0){
this.showMessage("最少选择一条数据")
return
}
uni.showLoading({
title: "加载中­....",
mask: true
});
takeAllPutawayJob({
jobNumberList: this.jobNumberList
@ -401,10 +443,14 @@
this.showMessage(error)
})
},
executeAllJob() {
putawayJobAllExecute({
var params ={
toLocationCode:this.toSubmitLocationCode,
jobNumberList:this.jobNumberList
}).then(res => {
}
putawayJobAllExecute(params).then(res => {
if (res.data) {
uni.hideLoading()
this.$refs.comMessage.showSuccessMessage("执行任务成功", res => {
@ -460,7 +506,10 @@
},
checkedItem(item) {
item.checked = !item.checked
}
},
scanLocationCode(location, code) {
this.toSubmitLocationCode = code
},
}
}

Loading…
Cancel
Save