fix:光芯销售发货时,仓库已有批次可以查询筛选
This commit is contained in:
parent
369af3a3ab
commit
6d3d0403cb
|
|
@ -85,7 +85,10 @@
|
||||||
v-model="selectBatch"
|
v-model="selectBatch"
|
||||||
value-key="id"
|
value-key="id"
|
||||||
clearable
|
clearable
|
||||||
|
filterable
|
||||||
|
remote = "true"
|
||||||
style="width: 100%"
|
style="width: 100%"
|
||||||
|
:remote-method="inputChange"
|
||||||
@change="selectBatchChange"
|
@change="selectBatchChange"
|
||||||
@clear="selectBatchClear"
|
@clear="selectBatchClear"
|
||||||
>
|
>
|
||||||
|
|
@ -357,6 +360,33 @@ export default {
|
||||||
this.wbatchOptions = res;
|
this.wbatchOptions = res;
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
inputChange(e){
|
||||||
|
console.log('e',e);
|
||||||
|
if(e!==''&&e!==null&&e!==undefined){
|
||||||
|
let codeId = e.split('#')[1];
|
||||||
|
this.$API.cm.labelmat.item.req(codeId).then((res) => {
|
||||||
|
if(res){
|
||||||
|
arr = that.batchOptions.filter((item) => {
|
||||||
|
return item.batch == res.batch&&item.state==res.state;
|
||||||
|
})
|
||||||
|
if (arr.length > 0) {
|
||||||
|
that.selectBatch = arr[0].batch;
|
||||||
|
that.form.batch = arr[0].batch;
|
||||||
|
that.form.mb = arr[0].id;
|
||||||
|
that.batchcount = Number(arr[0].count_canmio);
|
||||||
|
that.form.count = Number(arr[0].count_canmio);
|
||||||
|
that.form.warehouse = arr[0].warehouse;
|
||||||
|
that.inputBatchDisable = true;
|
||||||
|
}else{
|
||||||
|
that.selectBatch = '';
|
||||||
|
that.$message.error("批次号不存在");
|
||||||
|
}
|
||||||
|
}else{
|
||||||
|
that.selectBatch = '';
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
},
|
||||||
getMaterialOptions() {
|
getMaterialOptions() {
|
||||||
var type = this.form.type;
|
var type = this.form.type;
|
||||||
var cate = this.cate;
|
var cate = this.cate;
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue