|
|
@@ -12,14 +12,14 @@
|
|
|
</div>
|
|
|
<div class="form-group row">
|
|
|
<label for="asn" class="col-sm-2 col-3 text-right">ASN号:</label>
|
|
|
- <input type="text" class="form-control col-8" :class="errors.asn ? 'is-invalid' : ''" id="asn" v-model="info.asn" @blur="checkAsn()" placeholder="只需填写后几位,自动补充">
|
|
|
+ <input type="text" class="form-control col-8" @change="downSign()" :class="errors.asn ? 'is-invalid' : ''" id="asn" v-model="info.asn" @blur="checkAsn()" placeholder="只需填写后几位,自动补充">
|
|
|
<span class="invalid-feedback offset-2" role="alert" v-if="errors.asn">
|
|
|
<strong>@{{ errors.asn[0] }}</strong>
|
|
|
</span>
|
|
|
</div>
|
|
|
<div class="form-group row">
|
|
|
<label for="station" class="col-sm-2 col-3 text-right">库位:</label>
|
|
|
- <input type="text" class="form-control col-8" :class="errors.station ? 'is-invalid' : ''" id="station" v-model="info.station"
|
|
|
+ <input type="text" class="form-control col-8" :class="errors.station ? 'is-invalid' : ''" id="station" v-model="info.station" @blur="checkMaximum()"
|
|
|
placeholder="扫描货架条码">
|
|
|
<span class="invalid-feedback offset-2" role="alert" v-if="errors.station">
|
|
|
<strong>@{{ errors.station[0] }}</strong>
|
|
|
@@ -27,14 +27,14 @@
|
|
|
</div>
|
|
|
<div class="form-group row">
|
|
|
<label for="barCode" class="col-sm-2 col-3 text-right">条码:</label>
|
|
|
- <input type="text" class="form-control col-8" :class="errors.barCode ? 'is-invalid' : ''" id="barCode" v-model="info.barCode" placeholder="扫描商品条码">
|
|
|
+ <input type="text" class="form-control col-8" @change="downSign()" :class="errors.barCode ? 'is-invalid' : ''" id="barCode" v-model="info.barCode" @blur="checkMaximum()" placeholder="扫描商品条码">
|
|
|
<span class="invalid-feedback offset-2" role="alert" v-if="errors.barCode">
|
|
|
<strong>@{{ errors.barCode[0] }}</strong>
|
|
|
</span>
|
|
|
</div>
|
|
|
<div class="form-group row">
|
|
|
<label for="amount" class="col-sm-2 col-3 text-right">数量:</label>
|
|
|
- <input type="number" class="form-control col-8" :class="errors.amount ? 'is-invalid' : ''" id="amount" v-model="info.amount"
|
|
|
+ <input type="number" class="form-control col-8" :class="errors.amount ? 'is-invalid' : ''" id="amount" @blur="checkMaximum()" v-model="info.amount"
|
|
|
:placeholder="info.maximum!==undefined ? '最大可上:'+info.maximum : ''" :max="info.maximum" step="1">
|
|
|
<span class="invalid-feedback offset-2" role="alert" v-if="errors.amount">
|
|
|
<strong>@{{ errors.amount[0] }}</strong>
|
|
|
@@ -87,6 +87,7 @@
|
|
|
},
|
|
|
errors:{},
|
|
|
ov:{},//溢出减量数值
|
|
|
+ checkSign:false;
|
|
|
},
|
|
|
mounted(){
|
|
|
this.codeFocus();
|
|
|
@@ -157,7 +158,10 @@
|
|
|
let len = this.info.asn.length;
|
|
|
if (len<13)this.info.asn = this.before.asn.substr(0,13-len)+this.info.asn;
|
|
|
if (!this.info.ide)document.getElementById("station").focus();
|
|
|
- this.checkMaximum();
|
|
|
+ if (!this.checkSign)this.checkMaximum();
|
|
|
+ },
|
|
|
+ downSign(){
|
|
|
+ this.checkSign = false;
|
|
|
},
|
|
|
checkMaximum(){
|
|
|
if (!this.info.asn || !this.info.barCode)return;
|
|
|
@@ -166,9 +170,10 @@
|
|
|
this.info.material_box_id = res.material_box_id;
|
|
|
this.info.material_box_model_id = res.material_box_model_id;
|
|
|
this.info.commodity_id = res.commodity_id;
|
|
|
+ this.checkSign = true;
|
|
|
});
|
|
|
},
|
|
|
},
|
|
|
});
|
|
|
</script>
|
|
|
-@stop
|
|
|
+@stop
|