Browse Source

拆单去掉pid,添加输入框限制,二维码优化

dev
马远东 7 months ago
parent
commit
ceaa9b0bbf
  1. BIN
      public/img/Qrewm.png
  2. 33
      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

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

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

Loading…
Cancel
Save