|
|
|
@ -153,75 +153,58 @@ export default class returningDom extends BasePage {
|
|
|
|
|
async query() {
|
|
|
|
|
await this.model.queryOrderInInfo(this.form.prdOrder);
|
|
|
|
|
this.form.materialCode = this.model.orderInInfo.materialCode;
|
|
|
|
|
// this.form.materialCode = this.model.orderInInfo.materialCode;
|
|
|
|
|
this.form.sendSpot = this.model.orderInInfo.sendSpot;
|
|
|
|
|
this.form.totalBackAmount = this.model.orderInInfo.totalBackAmount;
|
|
|
|
|
}
|
|
|
|
|
LocationChoice(e: any) {
|
|
|
|
|
console.log('e>>>>>>>>>>>>>>>>>>>>>>>>', e);
|
|
|
|
|
this.wlCode = e.pickerName;
|
|
|
|
|
this.form.wkposCode = e.pickerName.sendSpot;
|
|
|
|
|
}
|
|
|
|
|
// 必须要在onReady生命周期,因为onLoad生命周期组件可能尚未创建完毕
|
|
|
|
|
async onReady() {
|
|
|
|
|
this.$form.setRules(this.rules);
|
|
|
|
|
// this.model.queryReturningTypeList();
|
|
|
|
|
this.form.sapFactoryCode = await this.model.queryDefaultFactoryCode();
|
|
|
|
|
//页面初始化 获取可选库位
|
|
|
|
|
let means: any = JSON.parse(uni.getStorageSync('__GWMS_APP_STATE_DATA__') as any);
|
|
|
|
|
if (JSON.parse(uni.getStorageSync('data') as any)) {
|
|
|
|
|
this.data = JSON.parse(uni.getStorageSync('data') as any);
|
|
|
|
|
this.form.prdOrder = this.data.label;
|
|
|
|
|
this.form.materialCode = this.data.value;
|
|
|
|
|
this.form.sendSpot = this.data.sendSpot;
|
|
|
|
|
// this.form.amount = this.data.amount;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if (this.form.prdOrder != null) {
|
|
|
|
|
model.queryOrderInInfo(this.form.prdOrder);
|
|
|
|
|
}
|
|
|
|
|
uni.removeStorageSync('data');
|
|
|
|
|
let content = {
|
|
|
|
|
loginName: means.session.user.loginName,
|
|
|
|
|
loginName: session.loginName,
|
|
|
|
|
sendSpot: null,
|
|
|
|
|
factoryCode: means.session.user.factoryCode,
|
|
|
|
|
factoryCode: session.user.factoryCode,
|
|
|
|
|
workArea: session.workareaCode,
|
|
|
|
|
};
|
|
|
|
|
let res: any = await this.model.queryByFactoryCodeAndWorkAreaCode(content);
|
|
|
|
|
res.forEach((item: any) => {
|
|
|
|
|
let pickerName: any = {};
|
|
|
|
|
pickerName.label = item.locationCode;
|
|
|
|
|
// pickerName.value = item.locationCode + '(' + item.sendSpot + ')';
|
|
|
|
|
pickerName.value = item.locationCode;
|
|
|
|
|
pickerName.sendSpot = item.sendSpot;
|
|
|
|
|
this.Location.push(pickerName);
|
|
|
|
|
});
|
|
|
|
|
this.wlCode = this.Location[0];
|
|
|
|
|
this.form.sapFactoryCode = await this.model.queryDefaultFactoryCode();
|
|
|
|
|
let locData = uni.getStorageSync('data') as any;
|
|
|
|
|
let newlocData = JSON.parse(locData);
|
|
|
|
|
if (newlocData != null || newlocData != null || newlocData != undefined) {
|
|
|
|
|
this.data = newlocData;
|
|
|
|
|
this.form.prdOrder = this.data.label;
|
|
|
|
|
this.form.materialCode = this.data.value;
|
|
|
|
|
this.form.sendSpot = this.data.sendSpot;
|
|
|
|
|
}
|
|
|
|
|
if (this.form.prdOrder != null) {
|
|
|
|
|
model.queryOrderInInfo(this.form.prdOrder);
|
|
|
|
|
}
|
|
|
|
|
uni.removeStorageSync('data');
|
|
|
|
|
}
|
|
|
|
|
back() {
|
|
|
|
|
// this.form.sendSpot = '';
|
|
|
|
|
// this.form.wkposCode = '';
|
|
|
|
|
this.model.orderInInfo.sapFactoryCode = '';
|
|
|
|
|
this.operatorName = '';
|
|
|
|
|
// this.form.rfPwd = null;
|
|
|
|
|
this.model.materielList.length = 0;
|
|
|
|
|
uni.navigateBack({ delta: 1 });
|
|
|
|
|
this.$form.resetFields();
|
|
|
|
|
}
|
|
|
|
|
materialConfirm(v: any) {
|
|
|
|
|
console.log('vvvvvv', v);
|
|
|
|
|
this.form.materialCode = v[0].value;
|
|
|
|
|
//this.form.wlName = v[0].label;
|
|
|
|
|
this.model.materielList.forEach((item: any) => {
|
|
|
|
|
if (this.form.materialCode == item.label) {
|
|
|
|
|
// this.form.amount = item.amount;
|
|
|
|
|
console.log('item', item);
|
|
|
|
|
this.form.sendSpot = item.sendSpot;
|
|
|
|
|
this.form.totalBackAmount = item.totalBackAmount;
|
|
|
|
|
// this.form.wkposCode = item.wkposCode;
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
console.log('this.form', this.form);
|
|
|
|
|
}
|
|
|
|
|
/**
|
|
|
|
|
* 上传
|
|
|
|
|