|
|
|
@ -23,7 +23,7 @@
|
|
|
|
|
</u-form-item>
|
|
|
|
|
<!-- 成品描述 -->
|
|
|
|
|
<u-form-item :label="$t('message.product_FGDes')">
|
|
|
|
|
<u-input :disabled="true" v-model="form.productDescZh" placeholder="" style="overflow: hidden;"/>
|
|
|
|
|
<u-input :disabled="true" v-model="form.productDescZh" placeholder="" style="overflow: hidden" />
|
|
|
|
|
</u-form-item>
|
|
|
|
|
<!-- 成品编码 -->
|
|
|
|
|
<u-form-item :label="$t('message.product_FGCode')">
|
|
|
|
@ -66,7 +66,7 @@
|
|
|
|
|
</u-col> -->
|
|
|
|
|
<!-- Guoshuang 出库要改,入参 -->
|
|
|
|
|
<u-col :span="4">
|
|
|
|
|
<u-button type="primary" @click="onOk">{{ $t('message.po_Deliver') }}</u-button>
|
|
|
|
|
<u-button type="primary" @click="Posting">{{ $t('message.Posting') }}</u-button>
|
|
|
|
|
</u-col>
|
|
|
|
|
<!-- <u-col :span="3">-->
|
|
|
|
|
<!-- <u-button type="success" @click="uni.navigateBack()">重提</u-button>-->
|
|
|
|
@ -146,16 +146,14 @@ export default class stoOutboundDom extends BasePage {
|
|
|
|
|
async onReady() {
|
|
|
|
|
this.$form.setRules(this.rules);
|
|
|
|
|
model.queryReturningTypeList();
|
|
|
|
|
this.form.orderNo = JSON.parse(sessionStorage.getItem('SweepCode'));
|
|
|
|
|
sessionStorage.removeItem('SweepCode');
|
|
|
|
|
if (!this.form.orderNo) {
|
|
|
|
|
return;
|
|
|
|
|
} else {
|
|
|
|
|
this.query();
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
//去掉页面表格,没有了onCheck方法
|
|
|
|
|
// onCheck(e: any) {
|
|
|
|
|
// console.log('e.data', e.data);
|
|
|
|
|
// this.selectMaterielList = [];
|
|
|
|
|
// e.data.forEach((line: any) => {
|
|
|
|
|
// const { lineData: item } = line;
|
|
|
|
|
// this.selectMaterielList.push(item);
|
|
|
|
|
// });
|
|
|
|
|
// }
|
|
|
|
|
back() {
|
|
|
|
|
this.form.barCode = '';
|
|
|
|
|
this.model.orderInInfo.stoAmount = 0;
|
|
|
|
@ -251,88 +249,89 @@ export default class stoOutboundDom extends BasePage {
|
|
|
|
|
* 条码回车
|
|
|
|
|
*/
|
|
|
|
|
//扫码也要改,扫码
|
|
|
|
|
onSubmit() {
|
|
|
|
|
this.$form.validate(async (valid: boolean) => {
|
|
|
|
|
// if (this.form.productCode.slice(0, 9) != this.form.barCode.slice(0, 9)) {
|
|
|
|
|
// onSubmit() {
|
|
|
|
|
// this.$form.validate(async (valid: boolean) => {
|
|
|
|
|
// // if (this.form.productCode.slice(0, 9) != this.form.barCode.slice(0, 9)) {
|
|
|
|
|
// // uni.showToast({
|
|
|
|
|
// // icon: "none",
|
|
|
|
|
// // title: this.$t("message.product_Tip5") as string,
|
|
|
|
|
// // });
|
|
|
|
|
// // return;
|
|
|
|
|
// // }
|
|
|
|
|
// if (parseInt(this.form.orderAmount) <= this.form.scanAmount) {
|
|
|
|
|
// uni.showToast({
|
|
|
|
|
// icon: "none",
|
|
|
|
|
// title: this.$t("message.product_Tip5") as string,
|
|
|
|
|
// icon: 'none',
|
|
|
|
|
// title: this.$t('message.product_Tip6') as string,
|
|
|
|
|
// });
|
|
|
|
|
// return;
|
|
|
|
|
// }
|
|
|
|
|
if (parseInt(this.form.orderAmount) <= this.form.scanAmount) {
|
|
|
|
|
uni.showToast({
|
|
|
|
|
icon: 'none',
|
|
|
|
|
title: this.$t('message.product_Tip6') as string,
|
|
|
|
|
});
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
// let list = [
|
|
|
|
|
// {
|
|
|
|
|
// order3: this.form.orderNo,
|
|
|
|
|
// // let list = [
|
|
|
|
|
// // {
|
|
|
|
|
// // order3: this.form.orderNo,
|
|
|
|
|
// // productCode: this.form.productCode,
|
|
|
|
|
// // productDescZh: this.form.productDescZh,
|
|
|
|
|
// // barCode: this.form.barCode,
|
|
|
|
|
// // dockCode: this.form.dockCode,
|
|
|
|
|
// // dockName: this.form.dockName,
|
|
|
|
|
// // // orderType: 3,
|
|
|
|
|
// // orderType: 4,
|
|
|
|
|
// // type: 0,
|
|
|
|
|
// // keepBy: session.loginName as string,
|
|
|
|
|
// // loginName: session.loginName as string,
|
|
|
|
|
// // },
|
|
|
|
|
// // ];
|
|
|
|
|
// if (valid) {
|
|
|
|
|
// let list: any = {
|
|
|
|
|
// productCode: this.form.productCode,
|
|
|
|
|
// productDescZh: this.form.productDescZh,
|
|
|
|
|
// barCode: this.form.barCode,
|
|
|
|
|
// dockCode: this.form.dockCode,
|
|
|
|
|
// dockName: this.form.dockName,
|
|
|
|
|
// // orderType: 3,
|
|
|
|
|
// orderType: 4,
|
|
|
|
|
// type: 0,
|
|
|
|
|
// keepBy: session.loginName as string,
|
|
|
|
|
// loginName: session.loginName as string,
|
|
|
|
|
// },
|
|
|
|
|
// ];
|
|
|
|
|
if (valid) {
|
|
|
|
|
let list: any = {
|
|
|
|
|
productCode: this.form.productCode,
|
|
|
|
|
barcode: this.form.barCode,
|
|
|
|
|
loginName: session.loginName,
|
|
|
|
|
factoryCode: session.factoryCode,
|
|
|
|
|
};
|
|
|
|
|
const res = await this.model.getMaterialByCode(list);
|
|
|
|
|
console.log('fanhui', res);
|
|
|
|
|
// if (res.barcode) {
|
|
|
|
|
// // this.materialList.push(res);
|
|
|
|
|
// this.form.scanAmount = res.scanAmount;
|
|
|
|
|
// barcode: this.form.barCode,
|
|
|
|
|
// loginName: session.loginName,
|
|
|
|
|
// factoryCode: session.factoryCode,
|
|
|
|
|
// };
|
|
|
|
|
// const res = await this.model.getMaterialByCode(list);
|
|
|
|
|
// console.log('fanhui', res);
|
|
|
|
|
// // if (res.barcode) {
|
|
|
|
|
// // // this.materialList.push(res);
|
|
|
|
|
// // this.form.scanAmount = res.scanAmount;
|
|
|
|
|
// // }
|
|
|
|
|
// //guoshuang 注掉
|
|
|
|
|
// if (this.materialList.length == 0) {
|
|
|
|
|
// await this.materialList.push(res);
|
|
|
|
|
// this.form.scanAmount += 1;
|
|
|
|
|
// this.$table.onCheckAllTap();
|
|
|
|
|
// } else {
|
|
|
|
|
// let flag = 0;
|
|
|
|
|
// for (let i = 0; i < this.materialList.length; i++) {
|
|
|
|
|
// console.log('11111', this.materialList[i]);
|
|
|
|
|
// if (this.form.barCode == this.materialList[i].barcode) {
|
|
|
|
|
// flag = 1;
|
|
|
|
|
// break;
|
|
|
|
|
// }
|
|
|
|
|
//guoshuang 注掉
|
|
|
|
|
if (this.materialList.length == 0) {
|
|
|
|
|
await this.materialList.push(res);
|
|
|
|
|
this.form.scanAmount += 1;
|
|
|
|
|
this.$table.onCheckAllTap();
|
|
|
|
|
} else {
|
|
|
|
|
let flag = 0;
|
|
|
|
|
for (let i = 0; i < this.materialList.length; i++) {
|
|
|
|
|
console.log('11111', this.materialList[i]);
|
|
|
|
|
if (this.form.barCode == this.materialList[i].barcode) {
|
|
|
|
|
flag = 1;
|
|
|
|
|
break;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
if (flag == 0) {
|
|
|
|
|
await this.$table.onCheckAllTap();
|
|
|
|
|
await this.materialList.push(res);
|
|
|
|
|
this.form.scanAmount += 1;
|
|
|
|
|
this.$table.onCheckAllTap();
|
|
|
|
|
} else {
|
|
|
|
|
uni.showToast({
|
|
|
|
|
icon: 'none',
|
|
|
|
|
title: this.$t('message.product_Tip7') as string,
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
const item = {
|
|
|
|
|
...this.form,
|
|
|
|
|
barCode: String(''),
|
|
|
|
|
};
|
|
|
|
|
this.firstFocus = false;
|
|
|
|
|
setTimeout(() => {
|
|
|
|
|
this.form = item;
|
|
|
|
|
this.firstFocus = true;
|
|
|
|
|
}, 0);
|
|
|
|
|
}
|
|
|
|
|
// }
|
|
|
|
|
// if (flag == 0) {
|
|
|
|
|
// await this.$table.onCheckAllTap();
|
|
|
|
|
// await this.materialList.push(res);
|
|
|
|
|
// this.form.scanAmount += 1;
|
|
|
|
|
// this.$table.onCheckAllTap();
|
|
|
|
|
// } else {
|
|
|
|
|
// uni.showToast({
|
|
|
|
|
// icon: 'none',
|
|
|
|
|
// title: this.$t('message.product_Tip7') as string,
|
|
|
|
|
// });
|
|
|
|
|
// }
|
|
|
|
|
// }
|
|
|
|
|
// }
|
|
|
|
|
// });
|
|
|
|
|
// const item = {
|
|
|
|
|
// ...this.form,
|
|
|
|
|
// barCode: String(''),
|
|
|
|
|
// };
|
|
|
|
|
// this.firstFocus = false;
|
|
|
|
|
// setTimeout(() => {
|
|
|
|
|
// this.form = item;
|
|
|
|
|
// this.firstFocus = true;
|
|
|
|
|
// }, 0);
|
|
|
|
|
// }
|
|
|
|
|
Posting() {}
|
|
|
|
|
onOk() {
|
|
|
|
|
// if (this.selectMaterielList.length == 0) {
|
|
|
|
|
// uni.showToast({ icon: 'none', title: this.$t('message.product_Tip2') as string });
|
|
|
|
@ -391,7 +390,7 @@ export default class stoOutboundDom extends BasePage {
|
|
|
|
|
uni.showToast({ icon: 'success', title: 'success' });
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
this.form.orderNo = '';
|
|
|
|
|
// this.form.orderNo = '';
|
|
|
|
|
this.form.barCode = '';
|
|
|
|
|
this.form.productCode = '';
|
|
|
|
|
model.orderInInfo.stoAmount = 0;
|
|
|
|
|