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) => {
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);
return (isTrue = false);
}

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

@ -158,7 +158,19 @@ export class ReturningModule extends VuexModule {
console.log('LocList', 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
async queryOutsourcing(poNo: any) {
const res = await http.post(url.outbound.stoOutbound.outsourcingQueryOrder, {

Loading…
Cancel
Save