|
|
|
@ -131,6 +131,28 @@ export default class dnReceiptDom extends BasePage {
|
|
|
|
|
// 需求数量
|
|
|
|
|
requestAmount: number = null;
|
|
|
|
|
// 页面初始化
|
|
|
|
|
async onReady() {
|
|
|
|
|
await this.queryLoction();
|
|
|
|
|
}
|
|
|
|
|
async queryLoction() {
|
|
|
|
|
this.Location = [];
|
|
|
|
|
let sendSpot = JSON.parse(localStorage.getItem('sendSpot') as any);
|
|
|
|
|
let content = {
|
|
|
|
|
loginName: session.loginName,
|
|
|
|
|
sendSpot: sendSpot,
|
|
|
|
|
factoryCode: session.factoryCode,
|
|
|
|
|
workArea: session.workareaCode,
|
|
|
|
|
};
|
|
|
|
|
let res: any = await this.model.queryByFactoryCodeAndWorkAreaCode(content);
|
|
|
|
|
res.forEach((item: LocationDetail) => {
|
|
|
|
|
let pickerName: any = {};
|
|
|
|
|
pickerName.label = item.locationCode;
|
|
|
|
|
pickerName.value = item.locationCode + '(' + item.sendSpot + ')';
|
|
|
|
|
pickerName.sendSpot = item.sendSpot;
|
|
|
|
|
this.Location.push(pickerName);
|
|
|
|
|
});
|
|
|
|
|
this.wl = this.Location[0];
|
|
|
|
|
}
|
|
|
|
|
// 页面需要清空仓库,因此需要复用该方法
|
|
|
|
|
async initLocation(condition): Promise<LocationDetail[]> {
|
|
|
|
|
console.log('condition>>>>>>>>>>>>>>>>>>.', condition);
|
|
|
|
@ -159,16 +181,16 @@ export default class dnReceiptDom extends BasePage {
|
|
|
|
|
}
|
|
|
|
|
//输入单号 查询数据
|
|
|
|
|
async query() {
|
|
|
|
|
this.empty()
|
|
|
|
|
this.empty();
|
|
|
|
|
if (!this.form.documentNo) {
|
|
|
|
|
this.customToast(this.$t('message.Commission_tips1') as any);
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
await this.model.queryOrderInInfo(this.form.documentNo);
|
|
|
|
|
if (model.code == '1') {
|
|
|
|
|
if(this.model.orderInInfoList.length == 0){
|
|
|
|
|
this.empty()
|
|
|
|
|
return
|
|
|
|
|
if (this.model.orderInInfoList.length == 0) {
|
|
|
|
|
this.empty();
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
uni.showToast({
|
|
|
|
|
icon: 'success',
|
|
|
|
@ -179,7 +201,7 @@ export default class dnReceiptDom extends BasePage {
|
|
|
|
|
this.material = JSON.parse(list);
|
|
|
|
|
this.DNReceivingList = JSON.parse(list);
|
|
|
|
|
this.DNReceivingList.forEach((item: any) => {
|
|
|
|
|
item.wllist = [];
|
|
|
|
|
item.wllist = [];
|
|
|
|
|
});
|
|
|
|
|
this.poList = [...this.DNReceivingList]; //结构
|
|
|
|
|
let arr = this.removeDuplicates(this.poList, 'poNo');
|
|
|
|
@ -243,7 +265,9 @@ export default class dnReceiptDom extends BasePage {
|
|
|
|
|
this.Location = [];
|
|
|
|
|
// 查询时初始化仓库
|
|
|
|
|
this.Location = await this.initLocation(this.every);
|
|
|
|
|
|
|
|
|
|
if (this.Location.length == 0) {
|
|
|
|
|
await this.queryLoction();
|
|
|
|
|
}
|
|
|
|
|
// 自动化流程改造测试
|
|
|
|
|
this.LocationChoice({
|
|
|
|
|
pickerName: this.Location.find(() => true),
|
|
|
|
@ -375,7 +399,7 @@ export default class dnReceiptDom extends BasePage {
|
|
|
|
|
return null;
|
|
|
|
|
}
|
|
|
|
|
await this.model.submitOrderInEnter(this.DNReceivingList);
|
|
|
|
|
if(this.model.SubmitCode == '1'){
|
|
|
|
|
if (this.model.SubmitCode == '1') {
|
|
|
|
|
this.resetForm();
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|