|
|
@ -13,7 +13,7 @@
|
|
|
|
<view class="single">
|
|
|
|
<view class="single">
|
|
|
|
<view class="single-left">
|
|
|
|
<view class="single-left">
|
|
|
|
<view>{{ $t('message.dn_OddNumbers') }}</view>
|
|
|
|
<view>{{ $t('message.dn_OddNumbers') }}</view>
|
|
|
|
<u-search :placeholder="$t('message.dn_PleaseScan')" v-model.trim="form.documentNo" @search="query" :show-action="false"></u-search>
|
|
|
|
<u-search :placeholder="$t('message.dn_PleaseScan')" v-model.trim="form.documentNo" @search="query" :focus="isfocus" :show-action="false"></u-search>
|
|
|
|
</view>
|
|
|
|
</view>
|
|
|
|
<view class="single-right">
|
|
|
|
<view class="single-right">
|
|
|
|
<u-button type="primary" @click="query">{{ $t('message.Query') }}</u-button>
|
|
|
|
<u-button type="primary" @click="query">{{ $t('message.Query') }}</u-button>
|
|
|
@ -110,6 +110,7 @@ export default class dnReceiptDom extends BasePage {
|
|
|
|
materialList: any = [];
|
|
|
|
materialList: any = [];
|
|
|
|
// 当前被选择中原材料
|
|
|
|
// 当前被选择中原材料
|
|
|
|
every: any = {};
|
|
|
|
every: any = {};
|
|
|
|
|
|
|
|
isfocus = true;
|
|
|
|
everyIndex: any = '';
|
|
|
|
everyIndex: any = '';
|
|
|
|
value = '';
|
|
|
|
value = '';
|
|
|
|
headers = DNheader;
|
|
|
|
headers = DNheader;
|
|
|
@ -187,37 +188,47 @@ export default class dnReceiptDom extends BasePage {
|
|
|
|
this.customToast(this.$t('message.Commission_tips1') as any);
|
|
|
|
this.customToast(this.$t('message.Commission_tips1') as any);
|
|
|
|
return;
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
await this.model.subcDnInfo(this.form.documentNo);
|
|
|
|
try {
|
|
|
|
if (model.code == '1') {
|
|
|
|
await this.model.subcDnInfo(this.form.documentNo);
|
|
|
|
if (this.model.orderInInfoList.length == 0) {
|
|
|
|
if (model.code == '1') {
|
|
|
|
this.empty();
|
|
|
|
if (this.model.orderInInfoList.length == 0) {
|
|
|
|
return;
|
|
|
|
this.empty();
|
|
|
|
|
|
|
|
return;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
uni.showToast({
|
|
|
|
|
|
|
|
//icon: 'success',
|
|
|
|
|
|
|
|
title: this.$t('message.successful') as any,
|
|
|
|
|
|
|
|
duration: 2000,
|
|
|
|
|
|
|
|
image: '/static/icons/icon-51.png',
|
|
|
|
|
|
|
|
});
|
|
|
|
|
|
|
|
let list: any = uni.getStorageSync('list');
|
|
|
|
|
|
|
|
uni.removeStorageSync('list');
|
|
|
|
|
|
|
|
this.material = JSON.parse(list);
|
|
|
|
|
|
|
|
this.DNReceivingList = JSON.parse(list);
|
|
|
|
|
|
|
|
this.DNReceivingList.forEach((item: any) => {
|
|
|
|
|
|
|
|
item.wllist = [];
|
|
|
|
|
|
|
|
});
|
|
|
|
|
|
|
|
this.poList = [...this.DNReceivingList]; //结构
|
|
|
|
|
|
|
|
let arr = this.removeDuplicates(this.poList, 'poNo');
|
|
|
|
|
|
|
|
// 组装下拉结构
|
|
|
|
|
|
|
|
arr.forEach((item: any) => {
|
|
|
|
|
|
|
|
item.label = item.poNo;
|
|
|
|
|
|
|
|
item.value = item.poNo;
|
|
|
|
|
|
|
|
});
|
|
|
|
|
|
|
|
this.poList = arr;
|
|
|
|
|
|
|
|
// 自动化流程改造测试
|
|
|
|
|
|
|
|
this.poListChoice({
|
|
|
|
|
|
|
|
pickerName: this.poList.find(() => true),
|
|
|
|
|
|
|
|
});
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
} catch {
|
|
|
|
|
|
|
|
if (this.poList.length == 0) {
|
|
|
|
|
|
|
|
this.form.documentNo = '';
|
|
|
|
|
|
|
|
this.isfocus = false;
|
|
|
|
|
|
|
|
this.$nextTick(() => {
|
|
|
|
|
|
|
|
this.isfocus = true;
|
|
|
|
|
|
|
|
});
|
|
|
|
}
|
|
|
|
}
|
|
|
|
uni.showToast({
|
|
|
|
|
|
|
|
//icon: 'success',
|
|
|
|
|
|
|
|
title: this.$t('message.successful') as any,
|
|
|
|
|
|
|
|
duration: 2000,
|
|
|
|
|
|
|
|
image: '/static/icons/icon-51.png',
|
|
|
|
|
|
|
|
});
|
|
|
|
|
|
|
|
let list: any = uni.getStorageSync('list');
|
|
|
|
|
|
|
|
uni.removeStorageSync('list');
|
|
|
|
|
|
|
|
this.material = JSON.parse(list);
|
|
|
|
|
|
|
|
this.DNReceivingList = JSON.parse(list);
|
|
|
|
|
|
|
|
this.DNReceivingList.forEach((item: any) => {
|
|
|
|
|
|
|
|
item.wllist = [];
|
|
|
|
|
|
|
|
});
|
|
|
|
|
|
|
|
this.poList = [...this.DNReceivingList]; //结构
|
|
|
|
|
|
|
|
let arr = this.removeDuplicates(this.poList, 'poNo');
|
|
|
|
|
|
|
|
// 组装下拉结构
|
|
|
|
|
|
|
|
arr.forEach((item: any) => {
|
|
|
|
|
|
|
|
item.label = item.poNo;
|
|
|
|
|
|
|
|
item.value = item.poNo;
|
|
|
|
|
|
|
|
});
|
|
|
|
|
|
|
|
this.poList = arr;
|
|
|
|
|
|
|
|
// 自动化流程改造测试
|
|
|
|
|
|
|
|
this.poListChoice({
|
|
|
|
|
|
|
|
pickerName: this.poList.find(() => true),
|
|
|
|
|
|
|
|
});
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
// 去除重复 方法
|
|
|
|
// 去除重复 方法
|
|
|
@ -431,6 +442,10 @@ export default class dnReceiptDom extends BasePage {
|
|
|
|
} else if (res.data.code == '0' && res.data.list == null) {
|
|
|
|
} else if (res.data.code == '0' && res.data.list == null) {
|
|
|
|
this.empty();
|
|
|
|
this.empty();
|
|
|
|
this.form.documentNo = '';
|
|
|
|
this.form.documentNo = '';
|
|
|
|
|
|
|
|
this.isfocus = false;
|
|
|
|
|
|
|
|
this.$nextTick(() => {
|
|
|
|
|
|
|
|
this.isfocus = true;
|
|
|
|
|
|
|
|
});
|
|
|
|
}
|
|
|
|
}
|
|
|
|
},
|
|
|
|
},
|
|
|
|
});
|
|
|
|
});
|
|
|
|