|
@@ -103,7 +103,7 @@
|
|
|
<el-dialog :title="title" :visible.sync="open" width="700px" append-to-body>
|
|
|
<el-form ref="form" :model="form" :rules="rules" label-width="80px">
|
|
|
<el-form-item label="物料" prop="sku" v-if="form.skuTypeFlag !== 'Hidden'">
|
|
|
- <el-select style="width: 100%" v-model="form.sku" placeholder="请选择物料" clearable size="small" @change="skuChange">
|
|
|
+ <el-select style="width: 100%" v-model="form.sku" placeholder="请选择物料" clearable size="small">
|
|
|
<el-option
|
|
|
v-for="dict in skuTypeCombo"
|
|
|
:key="dict.sku"
|
|
@@ -283,8 +283,12 @@
|
|
|
skuTypeFlag: 'Choice',
|
|
|
qty: null,
|
|
|
qtyFlag: 'Choice',
|
|
|
+ qtyMin: null,
|
|
|
+ qtyMax: null,
|
|
|
weight: null,
|
|
|
weightFlag: 'Choice',
|
|
|
+ weightMin: null,
|
|
|
+ weightMax: null,
|
|
|
supplier: '',
|
|
|
supplierFlag: 'Choice',
|
|
|
locationFrom: null,
|
|
@@ -336,7 +340,13 @@
|
|
|
this.locationToCombo = response.locationTo
|
|
|
this.form.skuTypeFlag = response.skuTypeFlag
|
|
|
this.form.qtyFlag = response.qtyFlag
|
|
|
+ this.form.qty = response.qty
|
|
|
+ this.form.qtyMin = response.qtyMin
|
|
|
+ this.form.qtyMax = response.qtyMax
|
|
|
this.form.weightFlag = response.weightFlag
|
|
|
+ this.form.weight = response.weight
|
|
|
+ this.form.weightMin = response.weightMin
|
|
|
+ this.form.weightMax = response.weightMax
|
|
|
this.form.supplierFlag = response.supplierFlag
|
|
|
this.form.locationFromFlag = response.locationFromFlag
|
|
|
this.form.locationToFlag = response.locationToFlag
|
|
@@ -356,10 +366,28 @@
|
|
|
if (this.form.qtyFlag === 'Required' && this.form.qty === null) {
|
|
|
this.$modal.msgError("数量必须输入");
|
|
|
return
|
|
|
+ } else if (this.form.qtyMin != null || this.form.qtyMax != null){
|
|
|
+ if(this.form.qty < this.form.qtyMin) {
|
|
|
+ this.$modal.msgError("数量小于范围:" + this.form.qtyMin);
|
|
|
+ return
|
|
|
+ }
|
|
|
+ if(this.form.qty > this.form.qtyMax) {
|
|
|
+ this.$modal.msgError("数量大于范围:" + this.form.qtyMax);
|
|
|
+ return
|
|
|
+ }
|
|
|
}
|
|
|
if (this.form.weightFlag === 'Required' && this.form.weight === null) {
|
|
|
this.$modal.msgError("重量必须输入");
|
|
|
return
|
|
|
+ } else if (this.form.weightMin != null || this.form.weightMax != null) {
|
|
|
+ if(this.form.weight < this.form.weightMin) {
|
|
|
+ this.$modal.msgError("重量小于范围:" + this.form.weightMin);
|
|
|
+ return
|
|
|
+ }
|
|
|
+ if(this.form.weight > this.form.weightMax) {
|
|
|
+ this.$modal.msgError("重量大于范围:" + this.form.weightMax);
|
|
|
+ return
|
|
|
+ }
|
|
|
}
|
|
|
if (this.form.supplierFlag === 'Required' && this.form.supplier === null) {
|
|
|
this.$modal.msgError("供应商必须输入");
|