diff --git a/src/pages/raw/handover/feeding/Location.vue b/src/pages/raw/handover/feeding/Location.vue index b8f8f0f..61bd993 100644 --- a/src/pages/raw/handover/feeding/Location.vue +++ b/src/pages/raw/handover/feeding/Location.vue @@ -348,15 +348,15 @@ export default class RawReceiptDetail extends BasePage { console.log('this.model.blDetailList',this.model.blDetailList) } 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, + loginName: session.loginName, sendSpot: sendSpot, - factoryCode: means.session.user.factoryCode, + factoryCode: session.factoryCode, workArea: session.workareaCode, }; let res: any = await this.model.queryByFactoryCodeAndWorkAreaCode(content); + console.log('res>>>>>>>>>>>>>>>>>>>>>>',res) res.forEach((item: any) => { let pickerName: any = {}; pickerName.label = item.locationCode; @@ -369,6 +369,7 @@ export default class RawReceiptDetail extends BasePage { item.wlQTyList = []; }); this.model.blDetailList.length = 0 + this.wlCode = this.Location[0] } async bill() { if (this.some == {} || this.some.prdOrder == null) { diff --git a/src/pages/raw/ingoods/dnReceipt/ImportDN.vue b/src/pages/raw/ingoods/dnReceipt/ImportDN.vue index df88fbf..3d5b155 100644 --- a/src/pages/raw/ingoods/dnReceipt/ImportDN.vue +++ b/src/pages/raw/ingoods/dnReceipt/ImportDN.vue @@ -162,34 +162,36 @@ export default class dnReceiptDom extends BasePage { this.customToast(this.$t('message.Commission_tips1') as any); return; } - await this.model.ImportQueryOrderInfo(this.form.documentNo.trim()); + await this.model.ImportQueryOrderInfo(this.form.documentNo); if (model.code == '1') { + if(this.model.orderInInfoList.length == 0){ + this.empty() + return + } uni.showToast({ icon: 'success', title: this.$t('message.successful') as any, }); - console.log('orderInInfoList', this.model.orderInInfoList); + let list: any = localStorage.getItem('list'); + localStorage.removeItem('list'); + this.material = JSON.parse(list); + this.DNReceivingList = JSON.parse(list); + this.DNReceivingList.forEach((item: any) => { + item.wllist = []; + }); + this.poList = [...this.DNReceivingList]; //结构 + let arr = this.removeDuplicates(this.poList, 'poNo'); + // 组装下拉结构 + arr.forEach((item: any) => { + item.label = item.poNo; + item.value = item.poNo; + }); + this.poList = arr; + // 自动化流程改造测试 + this.poListChoice({ + pickerName: this.poList.find(() => true), + }); } - let list: any = localStorage.getItem('list'); - localStorage.removeItem('list'); - this.material = JSON.parse(list); - this.DNReceivingList = JSON.parse(list); - this.DNReceivingList.forEach((item: any) => { - item.wllist = []; - }); - this.poList = [...this.DNReceivingList]; //结构 - let arr = this.removeDuplicates(this.poList, 'poNo'); - // 组装下拉结构 - arr.forEach((item: any) => { - item.label = item.poNo; - item.value = item.poNo; - }); - this.poList = arr; - - // 自动化流程改造测试 - this.poListChoice({ - pickerName: this.poList.find(() => true), - }); } // 去除重复 方法 // 传入数组 list 及要去重的属性 valueKey @@ -352,6 +354,19 @@ export default class dnReceiptDom extends BasePage { this.DNReceivingList = []; await this.query(); } + empty() { + this.LocationList = []; + this.Location = []; + this.poNo = ''; + this.poList = []; + this.wl = { + value: null, + }; + this.every = {}; + this.materialList = []; + this.receiptAmount = null; + this.DNReceivingList = []; + } async onSubmit() { if (this.LocationList.length === 0) { this.customToast(this.$t('message.Commission_tips5') as any); diff --git a/src/pages/raw/ingoods/dnReceipt/dnReceiving.vue b/src/pages/raw/ingoods/dnReceipt/dnReceiving.vue index 4cd61c4..e1f8eff 100644 --- a/src/pages/raw/ingoods/dnReceipt/dnReceiving.vue +++ b/src/pages/raw/ingoods/dnReceipt/dnReceiving.vue @@ -165,32 +165,34 @@ export default class dnReceiptDom extends BasePage { } await this.model.queryOrderInInfo(this.form.documentNo); if (model.code == '1') { + if(this.model.orderInInfoList.length == 0){ + this.empty() + return + } uni.showToast({ icon: 'success', title: this.$t('message.successful') as any, }); - console.log('orderInInfoList', this.model.orderInInfoList); - } - let list: any = localStorage.getItem('list'); - localStorage.removeItem('list'); - this.material = JSON.parse(list); - this.DNReceivingList = JSON.parse(list); - this.DNReceivingList.forEach((item: any) => { + let list: any = localStorage.getItem('list'); + localStorage.removeItem('list'); + this.material = JSON.parse(list); + this.DNReceivingList = JSON.parse(list); + this.DNReceivingList.forEach((item: any) => { item.wllist = []; - }); - this.poList = [...this.DNReceivingList]; //结构 - let arr = this.removeDuplicates(this.poList, 'poNo'); - // 组装下拉结构 - arr.forEach((item: any) => { - item.label = item.poNo; - item.value = item.poNo; - }); - this.poList = arr; - - // 自动化流程改造测试 - this.poListChoice({ - pickerName: this.poList.find(() => true), - }); + }); + this.poList = [...this.DNReceivingList]; //结构 + let arr = this.removeDuplicates(this.poList, 'poNo'); + // 组装下拉结构 + arr.forEach((item: any) => { + item.label = item.poNo; + item.value = item.poNo; + }); + this.poList = arr; + // 自动化流程改造测试 + this.poListChoice({ + pickerName: this.poList.find(() => true), + }); + } } // 去除重复 方法 // 传入数组 list 及要去重的属性 valueKey @@ -353,6 +355,19 @@ export default class dnReceiptDom extends BasePage { this.DNReceivingList = []; await this.query(); } + empty() { + this.LocationList = []; + this.Location = []; + this.poNo = ''; + this.poList = []; + this.wl = { + value: null, + }; + this.every = {}; + this.materialList = []; + this.receiptAmount = null; + this.DNReceivingList = []; + } async onSubmit() { if (this.LocationList.length === 0) { this.customToast(this.$t('message.Commission_tips5') as any);