销售出库扫码部分逻辑处理

master
guoshuang 6 months ago
parent c0e05ba37c
commit 35b5ba345f

@ -142,7 +142,7 @@ export default class LoginPage extends BasePage {
// console.log('Version////', this.Version); // console.log('Version////', this.Version);
} }
///****************** ///******************
version = '0.0.163'; // version = '0.0.164'; //
//version = '0.0.14'; // //version = '0.0.14'; //
//*************** false true **************** //*************** false true ****************
//isTest = true; //isTest = true;

@ -357,30 +357,38 @@ export default class SaleOutWH extends BasePage {
item.batchNumber = this.bimWl.value; item.batchNumber = this.bimWl.value;
await this.model.ScanCodeWholePallet(item); await this.model.ScanCodeWholePallet(item);
if (this.model.scanCode == '200') { if (this.model.scanCode == '200') {
let chongfuscan = this.list.some((item) => item.storageId === model.scandatalist[0].storageId); if (model.scandatalist.length != 0) {
if (chongfuscan) { let chongfuscan = this.list.some((item) => item.storageId === model.scandatalist[0].storageId);
(this.$refs.uToast as any).show({ if (chongfuscan) {
title: '请勿重复扫描标志卡', (this.$refs.uToast as any).show({
// url: '/pages/user/index' title: '请勿重复扫描标志卡',
}); // url: '/pages/user/index'
this.boxnumber = ''; });
return; this.boxnumber = '';
return;
} else {
(this.$refs.uToast as any).show({
title: '成功',
type: 'success',
});
model.scandatalist.map((item) => {
item.productCode = item.productCode.slice(item.productCode.search(/[1-9]/));
if (item.productCode == this.orderNoItemList.productCode) {
this.list.push(item);
this.orderNoItemList.outQuantity += item.amount;
} else {
(this.$refs.uToast as any).show({
title: '扫描的物料必须与选择的物料相同',
type: 'error',
});
}
});
}
} else { } else {
(this.$refs.uToast as any).show({ (this.$refs.uToast as any).show({
title: '成功', title: model.Submitmsg,
type: 'success', duration: 3000,
}); type: 'error',
model.scandatalist.map((item) => {
item.productCode = item.productCode.slice(item.productCode.search(/[1-9]/));
if (item.productCode == this.orderNoItemList.productCode) {
this.list.push(item);
this.orderNoItemList.outQuantity += item.amount;
} else {
(this.$refs.uToast as any).show({
title: '扫描的物料必须与选择的物料相同',
type: 'error',
});
}
}); });
} }

@ -37,13 +37,15 @@ export class SaleOutWH extends VuexModule {
scanCode: any = ''; scanCode: any = '';
scandatalist: any = []; scandatalist: any = [];
scandata: any = {}; scandata: any = {};
Submitmsg: any = '';
//整托 //整托
@MutationAction @MutationAction
async ScanCodeWholePallet(params: any) { async ScanCodeWholePallet(params: any) {
const result: any = await http.post(url.lanjuwms.product.SaleOutWH.ScanCodeWholePallet, params); const result: any = await http.post(url.lanjuwms.product.SaleOutWH.ScanCodeWholePallet, params);
const scanCode = result.code; const scanCode = result.code;
const scandatalist = result.data; const scandatalist = result.data || [];
return { scanCode, scandatalist }; const Submitmsg = result.msg;
return { scanCode, scandatalist, Submitmsg };
} }
//单箱 //单箱
@MutationAction @MutationAction

Loading…
Cancel
Save