DN收货 库位数据为物料SAP相同的所有库位

master
guoshuang 4 years ago
parent 832a378608
commit ecbcbd38eb

@ -55,7 +55,7 @@
<view class="library"> <view class="library">
<view class="library-left"> <view class="library-left">
<view>{{ $t('message.CommissionedLocation') }}</view> <view>{{ $t('message.CommissionedLocation') }}</view>
<jPicker sureColor="#ff0000" style="width: 230rpx" @bindpicker="LocationChoice" showKey="value" valKey="value" :val="wl.value" class="search" :options="Location" /> <jPicker sureColor="#ff0000" style="width: 230rpx" @bindpicker="LocationChoice" showKey="value" valKey="value" :val="wl.value" class="search" :options="newLocation" />
</view> </view>
<view class="library-right"> <view class="library-right">
<view class="library-right-title">{{ $t('message.CommissionedThisNumber') }}</view> <view class="library-right-title">{{ $t('message.CommissionedThisNumber') }}</view>
@ -132,6 +132,8 @@ export default class dnReceiptDom extends BasePage {
receiptAmount: any = ''; receiptAmount: any = '';
// //
Location: any = []; Location: any = [];
//
newLocation: any = [];
// //
LocationList: any = []; LocationList: any = [];
// //
@ -146,7 +148,11 @@ export default class dnReceiptDom extends BasePage {
upload: any = []; upload: any = [];
// //
async onReady() { async onReady() {
//
}
//
//
async initLocation() {
let means: any = JSON.parse(localStorage.getItem('__GWMS_APP_STATE_DATA__') as any); let means: any = JSON.parse(localStorage.getItem('__GWMS_APP_STATE_DATA__') as any);
let sendSpot = JSON.parse(localStorage.getItem('sendSpot') as any); let sendSpot = JSON.parse(localStorage.getItem('sendSpot') as any);
let content = { let content = {
@ -174,6 +180,8 @@ export default class dnReceiptDom extends BasePage {
}); });
return; return;
} }
//
this.initLocation();
await this.model.ImportQueryOrderInfo(this.form.documentNo); await this.model.ImportQueryOrderInfo(this.form.documentNo);
let list: any = localStorage.getItem('list'); let list: any = localStorage.getItem('list');
localStorage.removeItem('list'); localStorage.removeItem('list');
@ -232,6 +240,8 @@ export default class dnReceiptDom extends BasePage {
materialChoice(e: any) { materialChoice(e: any) {
// //
this.every = { ...e.pickerName }; this.every = { ...e.pickerName };
this.newLocation = this.Location.filter((item: any) => item.sendSpot === this.every.sendSpot);
console.log("newLoction",this.newLocation);
} }
// //
LocationChoice(e: any) { LocationChoice(e: any) {
@ -288,12 +298,22 @@ export default class dnReceiptDom extends BasePage {
//splice //splice
this.LocationList.splice(index, 1); this.LocationList.splice(index, 1);
this.business(); this.business();
// guoshuang
uni.showToast({
icon: 'none',
title: this.$t('message.success') as any,
});
} }
// //
resetForm() { resetForm() {
this.form.documentNo = '';
// add table // add table
this.LocationList = []; this.LocationList = [];
//
this.Location = [];
this.newLocation = [];
this.poNo = ''; this.poNo = '';
this.poList = [];
// //
this.wl = { this.wl = {
value: null, value: null,
@ -443,7 +463,8 @@ export default class dnReceiptDom extends BasePage {
.material-right-code { .material-right-code {
width: 80%; width: 80%;
height: 100%; height: 100%;
// line-height: 100rpx; line-height: 100rpx;
text-align: center;
} }
} }
} }

@ -55,7 +55,7 @@
<view class="library"> <view class="library">
<view class="library-left"> <view class="library-left">
<view>{{ $t('message.CommissionedLocation') }}</view> <view>{{ $t('message.CommissionedLocation') }}</view>
<jPicker sureColor="#ff0000" style="width: 230rpx" @bindpicker="LocationChoice" showKey="value" valKey="value" :val="wl.value" class="search" :options="Location" /> <jPicker sureColor="#ff0000" style="width: 230rpx" @bindpicker="LocationChoice" showKey="value" valKey="value" :val="wl.value" class="search" :options="newLocation" />
</view> </view>
<view class="library-right"> <view class="library-right">
<view class="library-right-title">{{ $t('message.CommissionedThisNumber') }}</view> <view class="library-right-title">{{ $t('message.CommissionedThisNumber') }}</view>
@ -127,6 +127,7 @@ export default class dnReceiptDom extends BasePage {
receiptAmount: any = ''; receiptAmount: any = '';
// //
Location: any = []; Location: any = [];
newLocation: any = [];
// //
LocationList: any = []; LocationList: any = [];
// //
@ -139,7 +140,7 @@ export default class dnReceiptDom extends BasePage {
requestAmount: number = null; requestAmount: number = null;
async onReady() { async onReady() {
this.initLocation(); //this.initLocation();
} }
// //
// //
@ -161,6 +162,7 @@ export default class dnReceiptDom extends BasePage {
pickerName.value = item.locationCode + '(' + item.sendSpot + ')'; pickerName.value = item.locationCode + '(' + item.sendSpot + ')';
pickerName.sendSpot = item.sendSpot; pickerName.sendSpot = item.sendSpot;
this.Location.push(pickerName); this.Location.push(pickerName);
console.log("this.Locaton",this.Location);
}); });
} }
// //
@ -176,6 +178,12 @@ export default class dnReceiptDom extends BasePage {
this.initLocation(); this.initLocation();
await this.model.queryOrderInInfo(this.form.documentNo); await this.model.queryOrderInInfo(this.form.documentNo);
let list: any = localStorage.getItem('list'); let list: any = localStorage.getItem('list');
// if (list) {
// uni.showToast({
// icon: 'none',
// title: this.$t('message.success') as any,
// });
// }
localStorage.removeItem('list'); localStorage.removeItem('list');
this.material = JSON.parse(list); this.material = JSON.parse(list);
this.poList = [...this.material]; // this.poList = [...this.material]; //
@ -224,6 +232,10 @@ export default class dnReceiptDom extends BasePage {
materialChoice(e: any) { materialChoice(e: any) {
// //
this.every = { ...e.pickerName }; 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) { LocationChoice(e: any) {
@ -288,6 +300,7 @@ export default class dnReceiptDom extends BasePage {
this.LocationList = []; this.LocationList = [];
// //
this.Location = []; this.Location = [];
this.newLocation = [];
this.poNo = ''; this.poNo = '';
this.poList = []; this.poList = [];
// //
@ -442,7 +455,8 @@ export default class dnReceiptDom extends BasePage {
.material-right-code { .material-right-code {
width: 80%; width: 80%;
height: 100%; height: 100%;
// line-height: 100rpx; line-height: 100rpx;
text-align: center;
} }
} }
} }

Loading…
Cancel
Save