From 77d360fb7aada8b55629cdd763f4d11e4f9f88d2 Mon Sep 17 00:00:00 2001 From: hou <1601990943@qq.com> Date: Mon, 1 Aug 2022 15:50:08 +0800 Subject: [PATCH] =?UTF-8?q?cosmoim-852=20fix=20=E5=8A=9F=E8=83=BD=E4=BC=98?= =?UTF-8?q?=E5=8C=96=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/i18n/lang/en.ts | 2 +- src/pages/raw/commission/RUS-Out/config.ts | 2 +- src/pages/raw/commission/RUS-Out/index.vue | 74 ++++++++++--------- .../raw/commission/RUS-entrant/index.vue | 2 +- src/pages/raw/commission/RUS-entrant/model.ts | 2 +- .../raw/handover/RUS-returning/index.vue | 9 ++- .../raw/handover/feeding/RUS-Location.vue | 9 ++- .../raw/ingoods/RUS-dnReceipt/dnReceiving.vue | 5 +- .../raw/ingoods/dnReceipt/ImportPOReceive.vue | 2 +- 9 files changed, 62 insertions(+), 45 deletions(-) diff --git a/src/i18n/lang/en.ts b/src/i18n/lang/en.ts index d10fd6a..ed3657e 100644 --- a/src/i18n/lang/en.ts +++ b/src/i18n/lang/en.ts @@ -128,7 +128,7 @@ export default { ReturnedMaterials: 'Return MAT', Inventory_query: 'Inventory query', Pi_PickingQuery: 'Pick up query', - Pi_OrderNo: 'Order No', + Pi_OrderNo: 'Order', Pi_factory: 'Factory', Pi_materielNo: 'MAT code', Pi_order: 'Order Query', diff --git a/src/pages/raw/commission/RUS-Out/config.ts b/src/pages/raw/commission/RUS-Out/config.ts index d29f0cb..98ea5c3 100644 --- a/src/pages/raw/commission/RUS-Out/config.ts +++ b/src/pages/raw/commission/RUS-Out/config.ts @@ -39,7 +39,7 @@ export const headers = [ }, { label: vm.$t('message.Container'), - key: 'user_defined6', + key: 'userDefined6', width: 400, }, ]; diff --git a/src/pages/raw/commission/RUS-Out/index.vue b/src/pages/raw/commission/RUS-Out/index.vue index bf4d7b4..5b3d238 100644 --- a/src/pages/raw/commission/RUS-Out/index.vue +++ b/src/pages/raw/commission/RUS-Out/index.vue @@ -198,7 +198,7 @@ export default class dnReceiptDom extends BasePage { }); this.every = this.material[0]; this.materialIndex = 0; - await this.QueryLoc(); + // await this.QueryLoc(); } //选择物料后触发的回调事件 本次数量:receiptAmount 需求数量:requestAmount materialChoice(e: any) { @@ -207,7 +207,7 @@ export default class dnReceiptDom extends BasePage { if (item.materialCode == e.pickerName.value) { this.every = item; this.materialIndex = index; - await this.QueryLoc(); + // await this.QueryLoc(); return; } }); @@ -232,8 +232,14 @@ export default class dnReceiptDom extends BasePage { value: this.Container.locCode + '(' + this.Container.sendSpot + ')', sendSpot: this.Container.sendSpot, }; + this.Loc = []; this.Loc.push(arr); this.wlCode = this.Loc[0]; + if (this.Container.cpRef4 == null) { + this.nowAmount = this.Container.qty; + } else { + this.nowAmount = parseFloat(this.Container.qty) - parseFloat(this.Container.cpRef4); + } } //点击添加 Add() { @@ -241,36 +247,36 @@ export default class dnReceiptDom extends BasePage { this.customToast(this.$t('message.scanningContainer') as any); return; } - // if (this.Container.cpRef4 == null) { - // if (parseFloat(this.nowAmount) > this.Container.qty) { - // this.customToast(this.$t('message.AppendMateriel3') as any); - // return; - // } - // } else { - // if (parseFloat(this.nowAmount) > this.Container.qty - parseFloat(this.Container.cpRef4)) { - // this.customToast(this.$t('message.AppendMateriel3') as any); - // return; - // } - // } - // let codenum: number = 0; - // if (this.list.length != 0) { - // this.list.forEach((item: any) => { - // if (item.barCode == this.Container.barcode) { - // num += item.receiptAmount; - // } - // }); - // } - // if (this.Container.cpRef4 == null) { - // if (parseFloat(this.nowAmount) + codenum > this.Container.qty) { - // this.customToast(this.$t('message.AppendMateriel3') as any); - // return; - // } - // } else { - // if (parseFloat(this.nowAmount) + codenum > this.Container.qty - parseFloat(this.Container.cpRef4)) { - // this.customToast(this.$t('message.AppendMateriel3') as any); - // return; - // } - // } + if (this.Container.cpRef4 == null) { + if (parseFloat(this.nowAmount) > parseFloat(this.Container.qty)) { + this.customToast(this.$t('message.AppendMateriel3') as any); + return; + } + } else { + if (parseFloat(this.nowAmount) > parseFloat(this.Container.qty) - parseFloat(this.Container.cpRef4)) { + this.customToast(this.$t('message.AppendMateriel3') as any); + return; + } + } + let codenum = 0; + if (this.list.length != 0) { + this.list.forEach((item: any) => { + if (item.barCode == this.Container.barcode) { + num += parseFloat(item.nowAmount); + } + }); + } + if (this.Container.cpRef4 == null) { + if (parseFloat(this.nowAmount) + codenum > this.Container.qty) { + this.customToast(this.$t('message.AppendMateriel3') as any); + return; + } + } else { + if (parseFloat(this.nowAmount) + codenum > this.Container.qty - parseFloat(this.Container.cpRef4)) { + this.customToast(this.$t('message.AppendMateriel3') as any); + return; + } + } if (!this.every) { this.customToast(this.$t('message.Commission_tips6') as any); return; @@ -317,8 +323,8 @@ export default class dnReceiptDom extends BasePage { factoryCode: this.session.factoryCode, wlCode: this.wlCode.label, nowAmount: this.nowAmount, - // barCode: this.Container.barcode, - barCode: this.Barcode, + barCode: this.Container.barcode, + // barCode: this.Barcode, }; this.list.push(arr); this.material[this.materialIndex].outAmount += parseFloat(this.list[this.list.length - 1].nowAmount); diff --git a/src/pages/raw/commission/RUS-entrant/index.vue b/src/pages/raw/commission/RUS-entrant/index.vue index 1413ad0..d294111 100644 --- a/src/pages/raw/commission/RUS-entrant/index.vue +++ b/src/pages/raw/commission/RUS-entrant/index.vue @@ -323,7 +323,7 @@ export default class dnReceiptDom extends BasePage { }; await this.model.searchBarcode(params); this.Container = this.model.ContainerCode; - this.receiptAmount = this.Container.requestAmount; + this.receiptAmount = parseFloat(this.Container.requestAmount); } //点击添加 Add() { diff --git a/src/pages/raw/commission/RUS-entrant/model.ts b/src/pages/raw/commission/RUS-entrant/model.ts index 71d009b..21822ef 100644 --- a/src/pages/raw/commission/RUS-entrant/model.ts +++ b/src/pages/raw/commission/RUS-entrant/model.ts @@ -286,7 +286,7 @@ export class ReturningModule extends VuexModule { ContainerCode: any = ''; @MutationAction async searchBarcode(params: any) { - const res: any = await http.post(url.auth.query.barcode, { + const res: any = await http.post(url.auth.query.queryContainer, { factoryCode: session.factoryCode, loginName: session.loginName, dnNo: params.dnNo, diff --git a/src/pages/raw/handover/RUS-returning/index.vue b/src/pages/raw/handover/RUS-returning/index.vue index 87a1db4..c7ac860 100644 --- a/src/pages/raw/handover/RUS-returning/index.vue +++ b/src/pages/raw/handover/RUS-returning/index.vue @@ -10,8 +10,8 @@ - - {{ $t('message.Query') }} + + {{ $t('message.Query') }} @@ -178,6 +178,10 @@ export default class returningDom extends BasePage { // } } Add() { + if (this.qty == '') { + this.customToast(this.$t('message.Summary_PleaseInputNumber') as string); + return; + } if (parseFloat(this.qty) > parseFloat(this.form.totalAmount)) { this.customToast(this.$t('message.return_Tip4') as string); return; @@ -266,6 +270,7 @@ export default class returningDom extends BasePage { this.wlCode = ''; this.checkindex = 0; this.Location = []; + this.Barcode = ''; await this.query(); } accSubtract(num1: any, num2: any) { diff --git a/src/pages/raw/handover/feeding/RUS-Location.vue b/src/pages/raw/handover/feeding/RUS-Location.vue index 3d97592..291513c 100644 --- a/src/pages/raw/handover/feeding/RUS-Location.vue +++ b/src/pages/raw/handover/feeding/RUS-Location.vue @@ -315,6 +315,7 @@ export default class RawReceiptDetail extends BasePage { value: this.Container.locCode + '(' + this.Container.sendSpot + ')', sendSpot: this.Container.sendSpot, }; + this.Location = []; this.Location.push(arr); this.wlCode = this.Location[0]; let num = 0; @@ -413,7 +414,7 @@ export default class RawReceiptDetail extends BasePage { let lineData = e.lineData; let i: any; this.model.blDetailList.forEach((item: any, index: any) => { - if (item.materialCode == lineData.materialCode && item.sendSpot == lineData.sendSpot) { + if (item.sapSupplyId == lineData.sapSupplyId) { i = index; } }); @@ -430,7 +431,10 @@ export default class RawReceiptDetail extends BasePage { num += parseFloat(item.qty); }); this.model.blDetailList[i].fillAmount = num; - this.model.blDetailList[i].totalFillAmount -= lineData.qty; + console.log('this.model.blDetailList[i].totalFillAmount111', this.model.blDetailList[i].totalFillAmount); + this.model.blDetailList[i].totalFillAmount -= parseFloat(lineData.qty); + console.log('this.model.blDetailList[i].totalFillAmount222', this.model.blDetailList[i].totalFillAmount); + console.log('lineData.qty', lineData.qty); } else if (res.cancel) { return; } @@ -445,7 +449,6 @@ export default class RawReceiptDetail extends BasePage { this.model.blDetailList[this.someIndex].fillAmount = num; this.some.fillAmount = num; this.model.blDetailList[this.someIndex].totalFillAmount += parseFloat(this.qty); - console.log('this.model.blDetailList', this.model.blDetailList); } async bill() { if (this.some == {} || this.some.prdOrder == null) { diff --git a/src/pages/raw/ingoods/RUS-dnReceipt/dnReceiving.vue b/src/pages/raw/ingoods/RUS-dnReceipt/dnReceiving.vue index b5b32db..00a1cb0 100644 --- a/src/pages/raw/ingoods/RUS-dnReceipt/dnReceiving.vue +++ b/src/pages/raw/ingoods/RUS-dnReceipt/dnReceiving.vue @@ -73,7 +73,7 @@ {{ $t('message.CommissionedThisNumber') }} - + @@ -113,6 +113,7 @@ import { url } from '@/utils/url'; }) export default class dnReceiptDom extends BasePage { model = model; + disabled = false; form: any = { documentNo: '', }; @@ -328,6 +329,8 @@ export default class dnReceiptDom extends BasePage { console.log('params', params); await this.model.searchBarcode(params); this.Container = this.model.ContainerCode; + this.receiptAmount = parseFloat(this.Container.requestAmount); + this.disabled = true; } //点击添加 Add() { diff --git a/src/pages/raw/ingoods/dnReceipt/ImportPOReceive.vue b/src/pages/raw/ingoods/dnReceipt/ImportPOReceive.vue index e8ba462..8c6123c 100644 --- a/src/pages/raw/ingoods/dnReceipt/ImportPOReceive.vue +++ b/src/pages/raw/ingoods/dnReceipt/ImportPOReceive.vue @@ -19,7 +19,7 @@ - {{ $t('message.CommissionedLocation') }} + {{ $t('message.CommissionedLocation') }}