From 5e9927b1bfd98a6153d61b0338313c652a8fefc4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=B5=B5=E6=AD=A3=E6=98=93?= Date: Tue, 10 Dec 2024 18:14:08 +0800 Subject: [PATCH] =?UTF-8?q?=E6=8A=A5=E5=B7=A5=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- api/reportFlow/index.js | 18 ++++ components/scan-input/scan-input.vue | 16 ++-- manifest.json | 4 +- pages/index.vue | 8 +- pages/produceManagement/process/process.vue | 90 ++++++++++++++----- .../reportWorkOrderList.vue | 34 +++++-- .../requisition/requisition.vue | 62 ++++++++----- 7 files changed, 167 insertions(+), 65 deletions(-) diff --git a/api/reportFlow/index.js b/api/reportFlow/index.js index 4b39fd0..f32f6da 100644 --- a/api/reportFlow/index.js +++ b/api/reportFlow/index.js @@ -17,6 +17,15 @@ export function GetProcessReportWorkDetail(params) { }) } +// 领料 +export function FeedProcessReportwork(params) { + return request({ + url: '/mobile/reportflow/feed_process_reportwork', + method: 'get', + params + }) +} + // 工序报工 export function ProcessReportWork(params) { return request({ @@ -26,6 +35,15 @@ export function ProcessReportWork(params) { }) } +// 出货 +export function ShipmentProcessReportwork(params) { + return request({ + url: '/mobile/reportflow/shipment_process_reportwork', + method: 'get', + params + }) +} + // 获取工单下的报工列表 export function GetWorkOrderReportWorkList(params) { return request({ diff --git a/components/scan-input/scan-input.vue b/components/scan-input/scan-input.vue index b5d7818..8b3e0c7 100644 --- a/components/scan-input/scan-input.vue +++ b/components/scan-input/scan-input.vue @@ -26,16 +26,20 @@ export default { }, emitValue() { const _value = this.scanValue; - setTimeout(() => { - this.scanValue = ''; - }, 100); this.$nextTick(() => { this.$emit('scanConfirm', _value); - this.getFocus(); }); + setTimeout(() => { + this.scanValue = ''; + this.getFocus(); + }, 300); + }, inputConfirm() { - this.emitValue(); + setTimeout(()=>{ + this.emitValue(); + },300) + }, // 重置焦点 getFocus() { @@ -43,7 +47,7 @@ export default { this.focus = false; setTimeout(() => { this.focus = true; - }, 200); + }, 300); } } }; diff --git a/manifest.json b/manifest.json index 44185df..e4b0b83 100644 --- a/manifest.json +++ b/manifest.json @@ -2,8 +2,8 @@ "name" : "北泽阀门", "appid" : "__UNI__B156498", "description" : "北泽阀门PDA", - "versionName" : "1..0.0", - "versionCode" : 100, + "versionName" : "1..0.1", + "versionCode" : 101, "transformPx" : false, "app-plus" : { "usingComponents" : true, diff --git a/pages/index.vue b/pages/index.vue index 0d5e21e..e0704f4 100644 --- a/pages/index.vue +++ b/pages/index.vue @@ -23,7 +23,7 @@ - + + diff --git a/pages/produceManagement/process/process.vue b/pages/produceManagement/process/process.vue index 51c90fa..e73c9fb 100644 --- a/pages/produceManagement/process/process.vue +++ b/pages/produceManagement/process/process.vue @@ -13,11 +13,35 @@ - + - + + + + + + + + + + + + + + + + + + + + + + + - - + + - - - + + - - + + + + + + + + - @@ -128,7 +152,7 @@ export default { const res1 = await reportWorkOrderApi.GetWorkOrderDetail(params); if (res1.code === 200) { - if(!res1.data){ + if (!res1.data) { this.uModal.content = '工单号不存在!'; this.openModal(); this.clear(); @@ -146,6 +170,7 @@ export default { this.formData.finishNum = res2.data.finishNum; this.formData.badNum = res2.data.badNum; this.formData.worker = res2.data.worker; + console.log(res2.data); if (this.formData.finishNum > 0) { this.uModal.title = '报工提醒'; this.uModal.content = '此工序该工单已报工过!'; @@ -197,24 +222,41 @@ export default { const params = { workorder: this.formData.workorder, processId: this.processId, + // 参数填写 finish_num: this.formData.finishNum, - bad_num: this.formData.badNum, + bad_num: this.formData.badNum ?? 0, + customer_order:this.formData.customerOrder, worker: this.formData.worker }; - reportWorkOrderApi.ProcessReportWork(params).then((res) => { - if (res.code === 200) { - this.uModal2.show = false; - this.uModal.content = '报工成功!'; - this.openModal(); - this.clear(); - } - }); + if(this.processName === '出货'){ + reportWorkOrderApi.ShipmentProcessReportwork(params).then((res) => { + if (res.code === 200) { + this.uModal2.show = false; + this.uModal.content = '出货成功!'; + this.openModal(); + this.clear(); + } + }); + }else{ + reportWorkOrderApi.ProcessReportWork(params).then((res) => { + if (res.code === 200) { + this.uModal2.show = false; + this.uModal.content = '报工成功!'; + this.openModal(); + this.clear(); + } + }); + } + } } };