From 08d8fa4b22add074d959b6e26138d3f65bce9efd Mon Sep 17 00:00:00 2001 From: mabaoyan Date: Tue, 25 Jul 2023 17:33:01 +0800 Subject: [PATCH] =?UTF-8?q?Overseamom-530=20feat=20=E5=A7=94=E5=A4=96?= =?UTF-8?q?=E9=80=80=E6=96=99=E6=89=8B=E6=8C=81=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/i18n/lang/cn.ts | 4 +++ src/i18n/lang/en.ts | 4 +++ src/i18n/lang/ru.ts | 4 +++ src/pages/raw/commission/return/index.vue | 44 +++++++++++++---------- src/pages/raw/commission/return/model.ts | 9 ++++- 5 files changed, 45 insertions(+), 20 deletions(-) diff --git a/src/i18n/lang/cn.ts b/src/i18n/lang/cn.ts index bd16696..193371f 100644 --- a/src/i18n/lang/cn.ts +++ b/src/i18n/lang/cn.ts @@ -594,5 +594,9 @@ export default { matscan: '请输入物料条码', bosnum: '顺序/数量', virtualHandoverVn: '虚拟交接-越南', + planQty: '计划数量', + outQty: '出库数量', + returnQty: '退料数量', + returnQtyGreaterOutQty: '退料数量大于出库数量', }, }; diff --git a/src/i18n/lang/en.ts b/src/i18n/lang/en.ts index efd3486..558ff3f 100644 --- a/src/i18n/lang/en.ts +++ b/src/i18n/lang/en.ts @@ -596,5 +596,9 @@ export default { matscan: 'Please enter the material barcode', bosnum: 'Box No/All', virtualHandoverVn: 'Virtual handover-Vn', + planQty: 'Planned Qty', + outQty: 'Out Qty', + returnQty: 'Return Qty', + returnQtyGreaterOutQty: 'The return quantity is greater than the outbound quantity', }, }; diff --git a/src/i18n/lang/ru.ts b/src/i18n/lang/ru.ts index debdd4f..de14bb0 100644 --- a/src/i18n/lang/ru.ts +++ b/src/i18n/lang/ru.ts @@ -587,5 +587,9 @@ export default { matscan: 'Введите штрих-код, пожалуйста', bosnum: 'Порядок/количество', virtualHandoverVn: 'Virtual handover-Vn', + planQty: 'Planned quantity', + outQty: 'Outbound quantity', + returnQty: 'Return quantity', + returnQtyGreaterOutQty: 'The return quantity is greater than the outbound quantity', }, }; diff --git a/src/pages/raw/commission/return/index.vue b/src/pages/raw/commission/return/index.vue index 50a7e8f..0f1a218 100644 --- a/src/pages/raw/commission/return/index.vue +++ b/src/pages/raw/commission/return/index.vue @@ -5,7 +5,7 @@ - {{ $t('message.CommissionGoOut') }} + {{ $t('message.CommissionReturn') }} @@ -46,14 +46,20 @@ - {{ $t('message.CommissionedDemandData') }} + {{ $t('message.planQty') }} - {{ $t('message.Cumulative') }} + {{ $t('message.outQty') }} + + + {{ $t('message.returnQty') }} + + + @@ -226,26 +232,26 @@ export default class dnReceiptDom extends BasePage { this.customToast(this.$t('message.Commission_tips3') as any); return; } - let num: number = parseFloat(this.nowAmount) + parseFloat(this.every.outAmount); - if (num > parseFloat(this.every.orderAmount)) { + let num: number = parseFloat(this.nowAmount) + parseFloat(this.every.returnAmount); + if (num > parseFloat(this.every.outAmount)) { uni.showModal({ title: this.$t('message.Pi_tip') as any, - content: this.$t('message.demandQuantity') as any, + content: this.$t('message.returnQtyGreaterOutQty') as any, cancelText: this.$t('message.Cancel') as any, confirmText: this.$t('message.workArea_Confirm') as any, success: (res) => { if (res.confirm) { - let arr = { - poNo: this.form.documentNo, - materialCode: this.every.materialCode, - loginName: this.session.loginName, - factoryCode: this.session.factoryCode, - wlCode: this.wlCode.label, - nowAmount: this.nowAmount, - }; - this.list.push(arr); - this.material[this.materialIndex].outAmount += parseFloat(this.list[this.list.length - 1].nowAmount); - this.nowAmount = ''; + // let arr = { + // poNo: this.form.documentNo, + // materialCode: this.every.materialCode, + // loginName: this.session.loginName, + // factoryCode: this.session.factoryCode, + // wlCode: this.wlCode.label, + // nowAmount: this.nowAmount, + // }; + // this.list.push(arr); + // this.material[this.materialIndex].returnAmount += parseFloat(this.list[this.list.length - 1].nowAmount); + // this.nowAmount = ''; } else if (res.cancel) { return; } @@ -261,7 +267,7 @@ export default class dnReceiptDom extends BasePage { nowAmount: this.nowAmount, }; this.list.push(arr); - this.material[this.materialIndex].outAmount += parseFloat(this.list[this.list.length - 1].nowAmount); + this.material[this.materialIndex].returnAmount += parseFloat(this.list[this.list.length - 1].nowAmount); this.nowAmount = ''; } } @@ -279,7 +285,7 @@ export default class dnReceiptDom extends BasePage { i = index; } }); - this.material[i].outAmount -= parseFloat(e.lineData.nowAmount); + this.material[i].returnAmount -= parseFloat(e.lineData.nowAmount); } else if (res.cancel) { return; } diff --git a/src/pages/raw/commission/return/model.ts b/src/pages/raw/commission/return/model.ts index 5921c2e..440c640 100644 --- a/src/pages/raw/commission/return/model.ts +++ b/src/pages/raw/commission/return/model.ts @@ -153,7 +153,14 @@ export class ReturningModule extends VuexModule { @MutationAction async queryLocList(content: any) { const res: any = await http.post(url.Subcontract.base.queryLocList, content); - const LocList = res; + const LocList = []; + res.forEach((item: any) => { + const arr: any = { + label: item.locationCode, + value: item.locationCode + '(' + item.sendSpot + ')', + }; + LocList.push(arr); + }); return { LocList }; } //订单信息查询