cosmoim-852 fix 委外出库库位选择更改

master
hou 3 years ago
parent 534cc882e8
commit 4b57538aff

@ -405,7 +405,7 @@ export default class dnReceiptDom extends BasePage {
item.wllist.forEach((item: any) => { item.wllist.forEach((item: any) => {
num += parseFloat(item.receiptAmount); num += parseFloat(item.receiptAmount);
}); });
if (num != parseFloat(item.requestAmount)) { if (num != parseFloat(item.requestAmount) && isTrue == true) {
this.customToast(this.$t('message.Pi_tip15') as any); this.customToast(this.$t('message.Pi_tip15') as any);
return (isTrue = false); return (isTrue = false);
} }

@ -111,26 +111,26 @@ export default class dnReceiptDom extends BasePage {
// //
wlCode: any = ''; wlCode: any = '';
materialIndex: any = null; materialIndex: any = null;
//
async onReady() {
//
await this.QueryLoc();
}
async QueryLoc() { async QueryLoc() {
let content = { await this.model.queryItemLoc({
loginName: session.loginName,
factoryCode: session.factoryCode,
workArea: session.workareaCode, workArea: session.workareaCode,
}; loginName: session.loginName,
await this.model.queryCodeAndWorkAreaCode(content); sendSpot: null,
this.model.LocList.forEach((item: any) => { materialCode: this.every.materialCode,
let pickerName: any = {}; factoryCode: session.factoryCode,
pickerName.label = item.locationCode;
pickerName.value = item.locationCode + '(' + item.sendSpot + ')';
pickerName.sendSpot = item.sendSpot;
this.Loc.push(pickerName);
}); });
this.wlCode = this.Loc[0]; this.Loc = [];
this.wlCode = '';
if (this.model.LocList.length == 0) {
uni.showModal({
content: this.$t('message.selected') as any,
showCancel: false,
confirmText: this.$t('message.workArea_Confirm') as any,
});
} else {
this.Loc = this.model.LocList;
this.wlCode = this.Loc[0];
}
} }
empty() { empty() {
this.list = []; this.list = [];
@ -184,14 +184,16 @@ export default class dnReceiptDom extends BasePage {
}); });
this.every = this.material[0]; this.every = this.material[0];
this.materialIndex = 0; this.materialIndex = 0;
await this.QueryLoc();
} }
// receiptAmount requestAmount // receiptAmount requestAmount
materialChoice(e: any) { materialChoice(e: any) {
this.nowAmount = ''; this.nowAmount = '';
this.material.forEach((item: any, index: any) => { this.material.forEach(async (item: any, index: any) => {
if (item.materialCode == e.pickerName.value) { if (item.materialCode == e.pickerName.value) {
this.every = item; this.every = item;
this.materialIndex = index; this.materialIndex = index;
await this.QueryLoc();
return; return;
} }
}); });
@ -280,7 +282,6 @@ export default class dnReceiptDom extends BasePage {
} }
await this.model.submitOutsourcing(this.list); await this.model.submitOutsourcing(this.list);
this.empty(); this.empty();
await this.QueryLoc();
await this.query(); await this.query();
} }
async bill() { async bill() {
@ -452,6 +453,8 @@ export default class dnReceiptDom extends BasePage {
.search { .search {
padding-left: 1px; padding-left: 1px;
text-align: center; text-align: center;
white-space: nowrap;
overflow: scroll;
} }
} }
.library-right { .library-right {

@ -158,7 +158,19 @@ export class ReturningModule extends VuexModule {
console.log('LocList', LocList); console.log('LocList', LocList);
return { LocList }; return { LocList };
} }
@MutationAction
async queryItemLoc(params: any = {}) {
const res: any = await http.post(url.sortscan.save.queryWlByMat, params);
const LocList = [];
res.forEach((item: any) => {
const arr: any = {
label: item.locationCode,
value: item.locationCode + '(' + item.sendSpot + ')' + '(' + item.amount + ')',
};
LocList.push(arr);
});
return { LocList };
}
@Action @Action
async queryOutsourcing(poNo: any) { async queryOutsourcing(poNo: any) {
const res = await http.post(url.outbound.stoOutbound.outsourcingQueryOrder, { const res = await http.post(url.outbound.stoOutbound.outsourcingQueryOrder, {

Loading…
Cancel
Save