|
|
|
@ -134,8 +134,13 @@ export default class dnReceiptDom extends BasePage {
|
|
|
|
|
poNo: any = null;
|
|
|
|
|
// 需求数量
|
|
|
|
|
requestAmount: number = null;
|
|
|
|
|
//页面初始化
|
|
|
|
|
|
|
|
|
|
async onReady() {
|
|
|
|
|
// this.initLocation();
|
|
|
|
|
}
|
|
|
|
|
// 页面初始化
|
|
|
|
|
// 页面需要清空仓库,因此需要复用该方法
|
|
|
|
|
async initLocation() {
|
|
|
|
|
//页面初始化 获取可选库位
|
|
|
|
|
let means: any = JSON.parse(localStorage.getItem('__GWMS_APP_STATE_DATA__') as any);
|
|
|
|
|
let sendSpot = JSON.parse(localStorage.getItem('sendSpot') as any);
|
|
|
|
@ -156,13 +161,15 @@ export default class dnReceiptDom extends BasePage {
|
|
|
|
|
}
|
|
|
|
|
//输入单号 查询数据
|
|
|
|
|
async query() {
|
|
|
|
|
if (this.form.documentNo == '') {
|
|
|
|
|
if (!this.form.documentNo) {
|
|
|
|
|
uni.showToast({
|
|
|
|
|
icon: 'none',
|
|
|
|
|
title: this.$t('message.Commission_tips1') as any,
|
|
|
|
|
});
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
// 查询时初始化仓库
|
|
|
|
|
this.initLocation();
|
|
|
|
|
await this.model.queryOrderInInfo(this.form.documentNo);
|
|
|
|
|
let list: any = localStorage.getItem('list');
|
|
|
|
|
localStorage.removeItem('list');
|
|
|
|
@ -264,21 +271,29 @@ export default class dnReceiptDom extends BasePage {
|
|
|
|
|
}
|
|
|
|
|
// 重置页面数据
|
|
|
|
|
resetForm() {
|
|
|
|
|
this.form.documentNo = '';
|
|
|
|
|
// 清空 add table
|
|
|
|
|
this.LocationList = [];
|
|
|
|
|
// 仓库
|
|
|
|
|
this.Location = [];
|
|
|
|
|
this.poNo = '';
|
|
|
|
|
this.poList = [];
|
|
|
|
|
// 清空 当前选择的库位对象
|
|
|
|
|
this.wl = {
|
|
|
|
|
value: null,
|
|
|
|
|
};
|
|
|
|
|
// 清空 物料对象
|
|
|
|
|
this.every = {};
|
|
|
|
|
// 清空 原始物料列表
|
|
|
|
|
// this.material = [];
|
|
|
|
|
// 清空 去重后的物料列表
|
|
|
|
|
this.materialList = [];
|
|
|
|
|
|
|
|
|
|
// 清空 当前累计数量
|
|
|
|
|
this.receiptAmount = null;
|
|
|
|
|
}
|
|
|
|
|
async onSubmit() {
|
|
|
|
|
this.resetForm();
|
|
|
|
|
if (this.LocationList.length === 0) {
|
|
|
|
|
uni.showToast({
|
|
|
|
|
icon: 'none',
|
|
|
|
@ -287,6 +302,7 @@ export default class dnReceiptDom extends BasePage {
|
|
|
|
|
return null;
|
|
|
|
|
}
|
|
|
|
|
this.every.wllist = this.LocationList;
|
|
|
|
|
console.log('new this.every :::: ', this.every);
|
|
|
|
|
await this.model.submitOrderInEnter([this.every]);
|
|
|
|
|
this.resetForm();
|
|
|
|
|
}
|
|
|
|
|