|
|
|
@ -145,7 +145,7 @@ export default class stoOutboundDom extends BasePage {
|
|
|
|
|
// 必须要在onReady生命周期,因为onLoad生命周期组件可能尚未创建完毕
|
|
|
|
|
async onReady() {
|
|
|
|
|
this.$form.setRules(this.rules);
|
|
|
|
|
model.queryReturningTypeList();
|
|
|
|
|
await model.queryReturningTypeList();
|
|
|
|
|
this.form.orderNo = JSON.parse(sessionStorage.getItem('SweepCode'));
|
|
|
|
|
sessionStorage.removeItem('SweepCode');
|
|
|
|
|
if (this.form.orderNo == null) {
|
|
|
|
@ -231,94 +231,38 @@ 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)) {
|
|
|
|
|
// // 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_Tip6') as string,
|
|
|
|
|
// });
|
|
|
|
|
// return;
|
|
|
|
|
// }
|
|
|
|
|
// // 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,
|
|
|
|
|
// 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;
|
|
|
|
|
// }
|
|
|
|
|
// }
|
|
|
|
|
// 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() {
|
|
|
|
|
|
|
|
|
|
//过账
|
|
|
|
|
async Posting() {
|
|
|
|
|
if(!this.form.orderNo){
|
|
|
|
|
this.customToast(this.$t('message.Commission_tips1') as string);
|
|
|
|
|
return
|
|
|
|
|
}
|
|
|
|
|
let params = {
|
|
|
|
|
nxOutCode:this.form.orderNo,
|
|
|
|
|
rowItem:this.form.row,
|
|
|
|
|
materialCode:this.form.rowItem,
|
|
|
|
|
loginName:session.loginName,
|
|
|
|
|
factoryCode:session.factoryCode,
|
|
|
|
|
}
|
|
|
|
|
await this.model.Posting(params)
|
|
|
|
|
if(this.model.PostingCode == '1'){
|
|
|
|
|
uni.showToast({ title: this.$t('message.Warehouse_Tip9') as any });
|
|
|
|
|
this.empty()
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
empty(){
|
|
|
|
|
this.form.dockCode = null
|
|
|
|
|
this.form.dockName = null
|
|
|
|
|
this.form.orderNo = null
|
|
|
|
|
this.form.qty = 0
|
|
|
|
|
this.form.orderAmount = ''
|
|
|
|
|
this.form.productCode = ''
|
|
|
|
|
this.form.productDescZh = ''
|
|
|
|
|
this.form.scanAmount = 0
|
|
|
|
|
this.form.rowItem = ''
|
|
|
|
|
this.form.row = ''
|
|
|
|
|
this.form.barCode = ''
|
|
|
|
|
this.model.empty()
|
|
|
|
|
}
|
|
|
|
|
onOk() {
|
|
|
|
|
this.$form.validate(async (valid: boolean) => {
|
|
|
|
|