diff --git a/src/pages/raw/commission/RUS-Out/index.vue b/src/pages/raw/commission/RUS-Out/index.vue index 8b29d1d..5b35d58 100644 --- a/src/pages/raw/commission/RUS-Out/index.vue +++ b/src/pages/raw/commission/RUS-Out/index.vue @@ -54,6 +54,13 @@ + + + + {{ $t('message.Container') }}: + + + {{ $t('message.product_add') }} @@ -111,6 +118,8 @@ export default class dnReceiptDom extends BasePage { //所选择的库位 wlCode: any = ''; materialIndex: any = null; + Barcode: any = ''; + Container: any = ''; async QueryLoc() { await this.model.queryItemLoc({ workArea: session.workareaCode, @@ -139,6 +148,8 @@ export default class dnReceiptDom extends BasePage { this.every = ''; this.materialList = []; this.Loc = []; + this.Barcode = ''; + this.Container = ''; } async close() { if (this.form.documentNo == '') { @@ -202,8 +213,55 @@ export default class dnReceiptDom extends BasePage { LocationChoice(e: any) { this.wlCode = e.pickerName; } + async searchBarcode() { + if (this.Barcode == '') { + this.customToast(this.$t('message.barcode') as string); + return; + } + let params = { + productCode: this.every.materialCode, + barcode: this.Barcode, + }; + await this.model.searchBarcode(params); + this.Container = this.model.ContainerCode; + this.nowAmount = this.Container.qty; + } //点击添加 Add() { + // if (this.Container == '') { + // 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.every) { this.customToast(this.$t('message.Commission_tips6') as any); return; @@ -232,6 +290,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, }; this.list.push(arr); this.material[this.materialIndex].outAmount += parseFloat(this.list[this.list.length - 1].nowAmount); @@ -249,6 +309,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, }; this.list.push(arr); this.material[this.materialIndex].outAmount += parseFloat(this.list[this.list.length - 1].nowAmount); @@ -478,11 +540,14 @@ export default class dnReceiptDom extends BasePage { .add { width: 100%; height: 100rpx; - position: relative; + position: absolute; + top: 349px; + left: 0; button { position: absolute; - top: 10rpx; - right: 20rpx; + top: 3rpx; + right: 35rpx; + z-index: 10000; } } } diff --git a/src/pages/raw/commission/RUS-Out/model.ts b/src/pages/raw/commission/RUS-Out/model.ts index a2285ab..7ce6fb1 100644 --- a/src/pages/raw/commission/RUS-Out/model.ts +++ b/src/pages/raw/commission/RUS-Out/model.ts @@ -183,7 +183,7 @@ export class ReturningModule extends VuexModule { @Action async submitOutsourcing(upload: any) { - const res = await http.post(url.outbound.stoOutbound.materialComplete, upload); + const res = await http.post(url.outbound.stoOutbound.materialCompleteRussia, upload); return res; } //查询明细 @@ -194,6 +194,19 @@ export class ReturningModule extends VuexModule { this.detailedList = res.data; return res; } + ContainerCode: any = ''; + @MutationAction + async searchBarcode(params: any) { + const res: any = await http.post(url.auth.query.barcode, { + factoryCode: session.factoryCode, + loginName: session.loginName, + barcode: params.barcode, + productCode: params.productCode, + // locCode: params.locCode, + }); + const ContainerCode = res.data; + return { ContainerCode }; + } } export default getModule(ReturningModule); diff --git a/src/pages/raw/ingoods/dnReceipt/ImportDN.vue b/src/pages/raw/ingoods/dnReceipt/ImportDN.vue index 4de61c8..7bc69b1 100644 --- a/src/pages/raw/ingoods/dnReceipt/ImportDN.vue +++ b/src/pages/raw/ingoods/dnReceipt/ImportDN.vue @@ -305,12 +305,12 @@ export default class dnReceiptDom extends BasePage { return; } let isTrue = true; - // this.DNReceivingList[this.everyIndex].wllist.forEach((item: any) => { - // if (item.wlCode == this.wl.label && item.receiptAmount == this.receiptAmount) { - // this.customToast(this.$t('message.repeatedly') as any); - // return (isTrue = false); - // } - // }); + this.DNReceivingList[this.everyIndex].wllist.forEach((item: any) => { + if (item.wlCode == this.wl.label && item.materialCode == this.every.materialCode) { + this.customToast(this.$t('message.repeatedly') as any); + return (isTrue = false); + } + }); if (isTrue == true) { this.LocationList.push({ ...this.every, diff --git a/src/pages/raw/ingoods/dnReceipt/dnReceiving.vue b/src/pages/raw/ingoods/dnReceipt/dnReceiving.vue index 1d7cec8..19574ec 100644 --- a/src/pages/raw/ingoods/dnReceipt/dnReceiving.vue +++ b/src/pages/raw/ingoods/dnReceipt/dnReceiving.vue @@ -307,6 +307,12 @@ export default class dnReceiptDom extends BasePage { return; } let isTrue = true; + this.DNReceivingList[this.everyIndex].wllist.forEach((item: any) => { + if (item.materialCode == this.every.materialCode && item.wlCode == this.wl.label) { + this.customToast(this.$t('message.repeatedly') as any); + return (isTrue = false); + } + }); if (isTrue == true) { this.LocationList.push({ ...this.every, @@ -314,6 +320,7 @@ export default class dnReceiptDom extends BasePage { wlCode: this.wl.label, }); this.DNReceivingList[this.everyIndex].wllist.push(this.LocationList[this.LocationList.length - 1]); + console.log('3 this.DNReceivingList[externalIndex].wllist', this.DNReceivingList[this.everyIndex].wllist); let num: any = 0; this.DNReceivingList[this.everyIndex].wllist.forEach((item: any) => { num += parseFloat(item.receiptAmount); @@ -344,7 +351,9 @@ export default class dnReceiptDom extends BasePage { inside = index; } }); + console.log('1 this.DNReceivingList[externalIndex].wllist', this.DNReceivingList[externalIndex].wllist); this.DNReceivingList[externalIndex].wllist.splice(inside, 1); + console.log('2 this.DNReceivingList[externalIndex].wllist', this.DNReceivingList[externalIndex].wllist); let num = 0; this.DNReceivingList[externalIndex].wllist.forEach((item: any) => { num += parseFloat(item.receiptAmount); diff --git a/src/utils/url.ts b/src/utils/url.ts index 812330e..e1888cd 100644 --- a/src/utils/url.ts +++ b/src/utils/url.ts @@ -146,6 +146,7 @@ export const url = { subcDnInfo: '/wmspda/material/orderin/subcDnInfo', submit: '/wmspda/material/outsourcing/into/materialComplete', materialComplete: '/wmspda/material/outsourcing/materialComplete', + materialCompleteRussia: '/wmspda/material/outsourcing/materialComplete/russia', outsourcingQueryOrder: '/wmspda/material/outsourcing/queryOrder', getDetailByorderNo: '/wmspda/fg/queryListInfoByDnNo', scanBarcodeDN: '/wmspda/fg/scanBarcodeDN/del',