fix:车间库存领料时扫码问题修正
This commit is contained in:
parent
f3aea5bf88
commit
f4ecb03144
|
@ -62,7 +62,7 @@
|
||||||
>
|
>
|
||||||
</el-option>
|
</el-option>
|
||||||
</el-select>
|
</el-select>
|
||||||
<scan-dialog ref="scanDialog" @closed="scanClose"> </scan-dialog>
|
<scan-dialog ref="scanDialog" :closeNow="closeNow" @closed="scanClose"> </scan-dialog>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="批次" v-if="cate == 'do_out'">
|
<el-form-item label="批次" v-if="cate == 'do_out'">
|
||||||
<el-select
|
<el-select
|
||||||
|
@ -139,6 +139,7 @@ export default {
|
||||||
return {
|
return {
|
||||||
type: "do_in",
|
type: "do_in",
|
||||||
loading: false,
|
loading: false,
|
||||||
|
closeNow:true,
|
||||||
mode: "add",
|
mode: "add",
|
||||||
titleMap: {
|
titleMap: {
|
||||||
do_out: "生产领料",
|
do_out: "生产领料",
|
||||||
|
@ -234,8 +235,8 @@ export default {
|
||||||
obj.page = 0;
|
obj.page = 0;
|
||||||
obj.state = 10;
|
obj.state = 10;
|
||||||
obj.material = that.form.material;
|
obj.material = that.form.material;
|
||||||
this.$API.inm.warehouse.batch.req(obj).then((res) => {
|
that.$API.inm.warehouse.batch.req(obj).then((res) => {
|
||||||
this.batchOptions = res.filter((item) => {
|
that.batchOptions = res.filter((item) => {
|
||||||
return item.state == 10;
|
return item.state == 10;
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
@ -244,7 +245,33 @@ export default {
|
||||||
let that = this;
|
let that = this;
|
||||||
let id = data.split('#')[1];
|
let id = data.split('#')[1];
|
||||||
console.log('id',id);
|
console.log('id',id);
|
||||||
that.form.batch = id;
|
// that.form.batch = id;
|
||||||
|
that.$API.cm.labelmat.item.req(id).then((res) => {
|
||||||
|
that.form.mb = res.id;
|
||||||
|
that.form.batch = res.batch;
|
||||||
|
that.form.warehouse = res.warehouse;
|
||||||
|
|
||||||
|
let arr = that.mioitemlist.filter((mioitem) => {
|
||||||
|
return mioitem.batch == res.batch;
|
||||||
|
});
|
||||||
|
if(arr.length > 0){
|
||||||
|
that.$message.error('该批次已存在');
|
||||||
|
that.selectBatchClear();
|
||||||
|
}else{
|
||||||
|
let arr2 = that.batchOptions.filter((batchitem) => {
|
||||||
|
return batchitem.batch == res.batch;
|
||||||
|
})
|
||||||
|
if(arr2.length > 0){
|
||||||
|
that.selectBatch = arr2[0].batch;
|
||||||
|
that.form.batch = arr2[0].batch;
|
||||||
|
that.form.mb = arr2[0].id;
|
||||||
|
that.form.warehouse = arr2[0].warehouse;
|
||||||
|
that.$refs.scanDialog.visible = false;
|
||||||
|
}else{
|
||||||
|
that.$message.error('该批次不存在');
|
||||||
|
}
|
||||||
|
}
|
||||||
|
})
|
||||||
},
|
},
|
||||||
selectMaterialChange() {
|
selectMaterialChange() {
|
||||||
this.getBatchOptions();
|
this.getBatchOptions();
|
||||||
|
|
Loading…
Reference in New Issue