diff --git a/src/pages/raw/ingoods/dnReceipt/ImportDN.vue b/src/pages/raw/ingoods/dnReceipt/ImportDN.vue index 8b9f3a3..398f48d 100644 --- a/src/pages/raw/ingoods/dnReceipt/ImportDN.vue +++ b/src/pages/raw/ingoods/dnReceipt/ImportDN.vue @@ -55,7 +55,7 @@ {{ $t('message.CommissionedLocation') }} - + {{ $t('message.CommissionedThisNumber') }} @@ -132,6 +132,8 @@ export default class dnReceiptDom extends BasePage { receiptAmount: any = ''; //库位 Location: any = []; + //根据物料选择过滤的新库位 + newLocation: any = []; //添加库位和数量的列表 LocationList: any = []; //所选择的库位 @@ -146,7 +148,11 @@ export default class dnReceiptDom extends BasePage { upload: any = []; //页面初始化 async onReady() { - //页面初始化 获取可选库位 + + } + // 页面初始化 + // 页面需要清空仓库,因此需要复用该方法 + async initLocation() { let means: any = JSON.parse(localStorage.getItem('__GWMS_APP_STATE_DATA__') as any); let sendSpot = JSON.parse(localStorage.getItem('sendSpot') as any); let content = { @@ -174,6 +180,8 @@ export default class dnReceiptDom extends BasePage { }); return; } + // 查询时初始化仓库 + this.initLocation(); await this.model.ImportQueryOrderInfo(this.form.documentNo); let list: any = localStorage.getItem('list'); localStorage.removeItem('list'); @@ -232,6 +240,8 @@ export default class dnReceiptDom extends BasePage { materialChoice(e: any) { // 待放入新增中的公共对象 this.every = { ...e.pickerName }; + this.newLocation = this.Location.filter((item: any) => item.sendSpot === this.every.sendSpot); + console.log("newLoction",this.newLocation); } //选择库位后触发的回调事件 LocationChoice(e: any) { @@ -288,12 +298,22 @@ export default class dnReceiptDom extends BasePage { //splice有删除功能,第一个参数为位置,第二个参数是数量 this.LocationList.splice(index, 1); this.business(); + // guoshuang 删除成功提示 + uni.showToast({ + icon: 'none', + title: this.$t('message.success') as any, + }); } // 重置页面数据 resetForm() { + this.form.documentNo = ''; // 清空 add table this.LocationList = []; + // 仓库 + this.Location = []; + this.newLocation = []; this.poNo = ''; + this.poList = []; // 清空 当前选择的库位对象 this.wl = { value: null, @@ -443,7 +463,8 @@ export default class dnReceiptDom extends BasePage { .material-right-code { width: 80%; height: 100%; - // line-height: 100rpx; + line-height: 100rpx; + text-align: center; } } } diff --git a/src/pages/raw/ingoods/dnReceipt/dnReceiving.vue b/src/pages/raw/ingoods/dnReceipt/dnReceiving.vue index a8eccd3..e1fd1ed 100644 --- a/src/pages/raw/ingoods/dnReceipt/dnReceiving.vue +++ b/src/pages/raw/ingoods/dnReceipt/dnReceiving.vue @@ -55,7 +55,7 @@ {{ $t('message.CommissionedLocation') }} - + {{ $t('message.CommissionedThisNumber') }} @@ -127,6 +127,7 @@ export default class dnReceiptDom extends BasePage { receiptAmount: any = ''; //库位 Location: any = []; + newLocation: any = []; //添加的库位和数量的列表 LocationList: any = []; //所选择的库位对象 @@ -139,7 +140,7 @@ export default class dnReceiptDom extends BasePage { requestAmount: number = null; async onReady() { - this.initLocation(); + //this.initLocation(); } // 页面初始化 // 页面需要清空仓库,因此需要复用该方法 @@ -161,6 +162,7 @@ export default class dnReceiptDom extends BasePage { pickerName.value = item.locationCode + '(' + item.sendSpot + ')'; pickerName.sendSpot = item.sendSpot; this.Location.push(pickerName); + console.log("this.Locaton",this.Location); }); } //输入单号 查询数据 @@ -176,6 +178,12 @@ export default class dnReceiptDom extends BasePage { this.initLocation(); await this.model.queryOrderInInfo(this.form.documentNo); let list: any = localStorage.getItem('list'); + // if (list) { + // uni.showToast({ + // icon: 'none', + // title: this.$t('message.success') as any, + // }); + // } localStorage.removeItem('list'); this.material = JSON.parse(list); this.poList = [...this.material]; //结构 @@ -224,6 +232,10 @@ export default class dnReceiptDom extends BasePage { materialChoice(e: any) { // 待放入新增中的公共对象 this.every = { ...e.pickerName }; + console.log("this.every",this.every); + //guoshuang 修改库位下拉数据为 与选择的物料下SAP相同的所有库位 + this.newLocation = this.Location.filter((item: any) => item.sendSpot === this.every.sendSpot); + console.log("newLoction",this.newLocation); } //选择库位后触发的回调事件 LocationChoice(e: any) { @@ -288,6 +300,7 @@ export default class dnReceiptDom extends BasePage { this.LocationList = []; // 仓库 this.Location = []; + this.newLocation = []; this.poNo = ''; this.poList = []; // 清空 当前选择的库位对象 @@ -442,7 +455,8 @@ export default class dnReceiptDom extends BasePage { .material-right-code { width: 80%; height: 100%; - // line-height: 100rpx; + line-height: 100rpx; + text-align: center; } } }