From 1afca0deeb700020e6356c96f6c8b14e7b242116 Mon Sep 17 00:00:00 2001 From: hou <1601990943@qq.com> Date: Thu, 30 Dec 2021 17:51:13 +0800 Subject: [PATCH] =?UTF-8?q?=E6=8B=A3=E9=85=8D=EF=BC=88=E6=B1=87=E6=80=BB&&?= =?UTF-8?q?=E4=BA=A4=E6=8E=A5=EF=BC=89=E4=BB=A3=E7=A0=81=E4=BC=98=E5=8C=96?= =?UTF-8?q?=20=E9=97=AE=E9=A2=98=E4=BF=AE=E5=A4=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../product/warehouse/wholeTransfer/index.vue | 2 +- src/pages/raw/handover/picking/ByOrder.vue | 76 ++++--- src/pages/raw/handover/picking/BySummary.vue | 129 ++++++------ .../raw/handover/picking/Summary-details.vue | 49 ++--- src/pages/raw/handover/picking/config.ts | 189 ++++++++++-------- src/pages/raw/handover/picking/index.vue | 3 +- src/pages/raw/handover/picking/model.ts | 43 ++-- src/pages/raw/handover/picking/result.vue | 81 +++----- 8 files changed, 264 insertions(+), 308 deletions(-) diff --git a/src/pages/product/warehouse/wholeTransfer/index.vue b/src/pages/product/warehouse/wholeTransfer/index.vue index 935c54c..1cb685c 100644 --- a/src/pages/product/warehouse/wholeTransfer/index.vue +++ b/src/pages/product/warehouse/wholeTransfer/index.vue @@ -181,7 +181,7 @@ export default class productCheckReceipt extends BasePage { this.form.productCode = ''; model.empty(); setTimeout(() => { - this.toPage(this.page.product.warehouse.wholeTransfer.index); + this.$forceUpdate(); }, 2000); } }); diff --git a/src/pages/raw/handover/picking/ByOrder.vue b/src/pages/raw/handover/picking/ByOrder.vue index ef9e725..48c4d13 100644 --- a/src/pages/raw/handover/picking/ByOrder.vue +++ b/src/pages/raw/handover/picking/ByOrder.vue @@ -2,7 +2,7 @@ - + {{ $t('message.Pi_ByOrderPicking') }} @@ -71,7 +71,7 @@ - + {{ $t('message.po_Return') }} @@ -120,7 +120,6 @@ export default class RawReceiptDetail extends BasePage { someIndex: number = 0; some: any = {}; qty: any = ''; - again: any; /** * 表单数据 */ @@ -128,9 +127,6 @@ export default class RawReceiptDetail extends BasePage { // locationCode: null, amount: null, }; - index() { - this.toPage(this.page.raw.handover.picking.result); - } /** * 表单校验 */ @@ -255,28 +251,7 @@ export default class RawReceiptDetail extends BasePage { this.model.proOrderResultList[this.someIndex].currentAmount = num; } async onReady() { - //页面初始化 获取可选库位 - let means: any = JSON.parse(localStorage.getItem('__GWMS_APP_STATE_DATA__') as any); - let sendSpot = JSON.parse(localStorage.getItem('sendSpot') as any); - let content = { - loginName: means.session.user.loginName, - sendSpot: sendSpot, - factoryCode: means.session.user.factoryCode, - workArea: session.workareaCode, - }; - let res: any = await this.model.queryByFactoryCodeAndWorkAreaCode(content); - res.forEach((item: any) => { - let pickerName: any = {}; - pickerName.label = item.locationCode; - pickerName.value = item.locationCode + '(' + item.sendSpot + ')'; - pickerName.sendSpot = item.sendSpot; - this.Location.push(pickerName); - }); - // this.model.proOrderResultList.forEach((item: any) => { - // item.hvAmount = 0; - // }); - this.again = JSON.parse(sessionStorage.getItem('params') as any); - sessionStorage.removeItem('params'); + this.GetLocation(); } async bill() { if (this.some == {} || this.some.prdOrder == null) { @@ -304,12 +279,47 @@ export default class RawReceiptDetail extends BasePage { dataList.push(item); } }); - await this.model.saveProOrderResultUpload(dataList).then(() => { - this.model.queryProOrderResult(this.again).then(() => { - // this.toPage(this.page.raw.handover.picking.result); - this.model.queryAggregate(); - this.toPage(this.page.raw.handover.picking.byorder); + if (dataList.length == 0) { + uni.showToast({ + icon: 'none', + title: this.$t('message.Warehouse_Tip6') as any, }); + return; + } + await this.model.saveProOrderResultUpload(dataList); + if (this.model.code == '1') { + uni.showToast({ + icon: 'none', + title: this.$t('message.Warehouse_Tip9') as any, + }); + this.GetLocation(); + setTimeout(() => { + this.onAggregate(); + }, 2000); + } + } + async onAggregate() { + await this.model.queryProOrder(this.model.formParams); + await this.model.queryProOrderResult(this.model.NEWparams); + await this.model.lockProOrderResult(this.model.proOrderResultList); + } + async GetLocation() { + this.Location = []; + let means: any = JSON.parse(localStorage.getItem('__GWMS_APP_STATE_DATA__') as any); + let sendSpot = JSON.parse(localStorage.getItem('sendSpot') as any); + let content = { + loginName: means.session.user.loginName, + sendSpot: sendSpot, + factoryCode: means.session.user.factoryCode, + workArea: session.workareaCode, + }; + let res: any = await this.model.queryByFactoryCodeAndWorkAreaCode(content); + res.forEach((item: any) => { + let pickerName: any = {}; + pickerName.label = item.locationCode; + pickerName.value = item.locationCode + '(' + item.sendSpot + ')'; + pickerName.sendSpot = item.sendSpot; + this.Location.push(pickerName); }); } } diff --git a/src/pages/raw/handover/picking/BySummary.vue b/src/pages/raw/handover/picking/BySummary.vue index 6b35c35..6cd404a 100644 --- a/src/pages/raw/handover/picking/BySummary.vue +++ b/src/pages/raw/handover/picking/BySummary.vue @@ -2,15 +2,16 @@ - + {{ $t('message.Pi_SummaryPicking') }} + - + {{ $t('message.Pi_Station') }}: @@ -47,9 +48,6 @@ {{ item.wlCode }} {{ item.qty }} - {{ $t('message.product_Delete') }} @@ -71,7 +69,7 @@ - + {{ $t('message.po_Return') }} @@ -80,7 +78,6 @@ - diff --git a/src/pages/raw/handover/picking/Summary-details.vue b/src/pages/raw/handover/picking/Summary-details.vue index bb9c859..c4da29e 100644 --- a/src/pages/raw/handover/picking/Summary-details.vue +++ b/src/pages/raw/handover/picking/Summary-details.vue @@ -4,64 +4,44 @@ - {{ $t("message.Pi_QueryResults") }} + {{ $t('message.Pi_QueryResults') }} - + - {{ $t("message.Query") }} + {{ $t('message.Query') }} - +