From 96383ab625624422f5dacff7fdbe4a7569ba4f17 Mon Sep 17 00:00:00 2001 From: zhang_li <2235006734@qqq.com> Date: Tue, 20 Aug 2024 18:58:33 +0800 Subject: [PATCH] =?UTF-8?q?HL-5227=E6=8F=90=E4=BE=9B=E6=96=B0=E7=9A=84?= =?UTF-8?q?=E6=89=B9=E9=87=8F=E9=87=87=E8=B4=AD=E4=B8=8A=E6=9E=B6=E5=8A=9F?= =?UTF-8?q?=E8=83=BD=EF=BC=8C=E4=B8=BA=E4=BA=86=E8=A7=A3=E5=86=B3=E4=BD=BF?= =?UTF-8?q?=E7=94=A8=E5=9C=B0=E5=A0=86=E5=BA=93=E4=BD=8D=E7=9A=84=E7=89=A9?= =?UTF-8?q?=E6=96=99=E6=93=8D=E4=BD=9C=E7=B9=81=E7=90=90=E7=9A=84=E6=83=85?= =?UTF-8?q?=E5=86=B5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/request2.js | 38 ++++++ src/pages/putaway/job/quantityPutawayJob.vue | 131 ++++++++++++++++--- 2 files changed, 150 insertions(+), 19 deletions(-) diff --git a/src/api/request2.js b/src/api/request2.js index a20af74d..11749dd6 100644 --- a/src/api/request2.js +++ b/src/api/request2.js @@ -1263,6 +1263,44 @@ export function putawayJobSubmit(params) { }); } +/** + * 采购上架 全部承接任务 + * @param {*} id + * + */ +export function takeAllPutawayJob(data) { + return request({ + url: baseApi + "/wms/putaway-job-main/acceptBatch" , + method: "put", + data: data, + }); +} + +/** + * 采购上架 全部放弃承接任务 + * @param {*} id + * + */ +export function cancleAllTakePutawayJob(data) { + return request({ + url: baseApi + "/wms/putaway-job-main/abandonBatch", + method: "put", + data: data, + }); +} +/** + * 采购上架 任务全部提交 + * @param {*} data + */ +export function putawayJobAllExecute(data) { + return request({ + url: baseApi + "/wms/putaway-job-main/executeBatch", + method: "put", + data: data, + }); +} + + /** * 采购上架申请 获取任务列表 * 任务状态 diff --git a/src/pages/putaway/job/quantityPutawayJob.vue b/src/pages/putaway/job/quantityPutawayJob.vue index 9c903838..fbbae604 100644 --- a/src/pages/putaway/job/quantityPutawayJob.vue +++ b/src/pages/putaway/job/quantityPutawayJob.vue @@ -2,16 +2,18 @@ + :checkedWaitTask="checkedWaitTask" @onQuery="getListByFilter"> - + - + + @@ -21,12 +23,14 @@ - + - - + - + + + @@ -36,7 +40,9 @@ import { getPutawayJobList, - cancleTakePutawayJob + cancleTakePutawayJob, + putawayJobAllExecute, + takeAllPutawayJob } from '@/api/request2.js'; import { @@ -46,6 +52,7 @@ import { getDetailOption, + getDetailGiveupOption } from '@/common/array.js'; import winScanButton from '@/mycomponents/scan/winScanButton.vue' @@ -76,17 +83,18 @@ return { jobList: [], pageNo: 1, - pageSize: 10, + pageSize: 30, totalCount: 0, loadingType: "nomore", checkedToday: false, checkedWaitTask: false, todayTime: "", - status: '1,2', //待处理 、进行中 + status: '1', //待处理 detailOptions: [], detailGiveupOptions: [], title: '', - scanMessage: "" + scanMessage: "", + jobNumberList:[],//全部承接参数 }; }, @@ -134,7 +142,7 @@ }, methods: { - getList(type) { + getList(type,toAreaCode='') { let that = this; uni.showLoading({ title: "加载中­....", @@ -166,6 +174,14 @@ action: "==", value: this.$store.state.user.id }) + if(toAreaCode){ + //到库区 + filters.push({ + column: "toAreaCode", + action: "==", + value: toAreaCode + }) + } var params = { filters: filters, pageNo: this.pageNo, @@ -174,10 +190,10 @@ getPutawayJobList(params).then(res => { uni.hideLoading(); - if (type === "refresh") { - uni.stopPullDownRefresh(); - this.openScanPopup() - } + // if (type === "refresh") { + // uni.stopPullDownRefresh(); + // this.openScanPopup() + // } var list = res.data.list; this.totalCount = res.data.total @@ -188,6 +204,7 @@ return; } this.jobList = type === "refresh" ? list : this.jobList.concat(list); + this.jobNumberList = list.map(item=>item.number) this.pageNo++; }).catch(error => { @@ -274,7 +291,7 @@ filters.push({ column: "status", action: "in", - value: '1,2' + value: '1' }) filters.push({ column: "number", @@ -360,7 +377,7 @@ { column: "status", action: "in", - value: '1,2', + value: '1', }, // { // column: "accept_user_id", @@ -422,10 +439,86 @@ this.showMessage(e + "\n扫描[" + result.scanMessage + "]") } }, + getListByFilter(params) { + console.log('getListByFilter',params) + let that = this; + uni.showLoading({ + title: "加载中­....", + mask: true + }); + + if (params.status) { + this.status = params.status + + }else{ + this.status = "1" + } + if(params.creationTime==""){ + this.checkedToday = false; + } + if (params.toAreaCode) { + // 到库区 + this.toAreaCode = params.toAreaCode + }else{ + this.toAreaCode = '' + } + this.getList('refresh',this.toAreaCode) + }, + // 承接全部任务 + takeAllJob(){ + uni.showLoading({ + title: "加载中­....", + mask: true + }); + takeAllPutawayJob({ + jobNumberList:this.jobNumberList + }).then(res => { + if (res.data) { + this.executeAllJob() + } else { + uni.hideLoading() + this.showMessage("承接任务失败") + } + }).catch(error => { + uni.hideLoading() + this.showMessage(error) + }) + }, + executeAllJob(){ + putawayJobAllExecute({ + jobNumberList:this.jobNumberList + }).then(res => { + if (res.data) { + uni.hideLoading() + this.$refs.comMessage.showSuccessMessage( "执行任务成功", res => { + if (res) { + this.getList("refresh") + } + }); + } else { + uni.hideLoading() + this.showMessage("执行任务失败") + } + }).catch(error => { + uni.hideLoading() + this.showMessage(error) + }) + } + } } \ No newline at end of file