qb 11 months ago
parent
commit
643c759c76
  1. BIN
      public/img/Qrewm.png
  2. 31
      src/views/distribution/inventory/distributionStockList.vue

BIN
public/img/Qrewm.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 54 KiB

After

Width:  |  Height:  |  Size: 11 KiB

31
src/views/distribution/inventory/distributionStockList.vue

@ -825,7 +825,7 @@ export default {
// //
let asd = await getListMaterial(this.page.currentPage, this.page.pageSize, { let asd = await getListMaterial(this.page.currentPage, this.page.pageSize, {
name: query, name: query,
pid: this.stockList.materialId, // pid: this.stockList.materialId,
}).then(); }).then();
console.log('物料信息', asd.data.data); console.log('物料信息', asd.data.data);
if (!!asd.data.data) { if (!!asd.data.data) {
@ -1019,14 +1019,17 @@ export default {
// return ; // return ;
// } // }
if (!this.form.id) { if (!this.form.id) {
/* const regex = /^\d+$/;
if (regex.test(this.formInline.materialId)) { let regexs = /^\s*\d+\s*$/;//
// console.log(""); if(!regexs.test(this.formInline.unpackingQuantity)){
asm.materialId = this.formInline.materialId this.$message.warning('请输入正确的拆箱数量');
} else { return
// console.log(""); }
asm.materialId = this.formInline.materialCode; if(!regexs.test(this.formInline.packageNum)){
}*/ this.$message.warning('请输入正确的包装数量');
return
}
if (parseInt(this.formInline.unpackingQuantity) > parseInt(this.getQuery.quantityStock)) { if (parseInt(this.formInline.unpackingQuantity) > parseInt(this.getQuery.quantityStock)) {
this.$message.warning('拆包数量大于在库数量!!!'); this.$message.warning('拆包数量大于在库数量!!!');
@ -1036,8 +1039,7 @@ export default {
const numbers = this.getQuery.packageNum.match(regex); // 使match const numbers = this.getQuery.packageNum.match(regex); // 使match
parseInt(numbers[0]) * parseInt(this.formInline.unpackingQuantity); parseInt(numbers[0]) * parseInt(this.formInline.unpackingQuantity);
this.formInline.storeNum = this.formInline.storeNum = parseInt(numbers[0]) * parseInt(this.formInline.unpackingQuantity);
parseInt(numbers[0]) * parseInt(this.formInline.unpackingQuantity);
} }
// this.formInline.id =this.stockList.id; // this.formInline.id =this.stockList.id;
this.formInline.materialId = this.stockList.materialId; this.formInline.materialId = this.stockList.materialId;
@ -1047,8 +1049,10 @@ export default {
? this.stockList.storeId ? this.stockList.storeId
: null; : null;
console.log('提交的值', this.formInline);
addParcels(this.formInline).then(() => { addParcels(this.formInline).then(() => {
this.formInline = {};
this.unpackFormDisable={}
this.box = false; this.box = false;
this.dismantle = false; this.dismantle = false;
this.onLoad(this.page); this.onLoad(this.page);
@ -1056,7 +1060,8 @@ export default {
type: 'success', type: 'success',
message: '操作成功!', message: '操作成功!',
}); });
this.formInline = {};
}); });
} else { } else {
update(this.form).then(() => { update(this.form).then(() => {

Loading…
Cancel
Save