diff --git a/src/views/wpm_bx/inm_record_form.vue b/src/views/wpm_bx/inm_record_form.vue
index 33dde6c8..feb81873 100644
--- a/src/views/wpm_bx/inm_record_form.vue
+++ b/src/views/wpm_bx/inm_record_form.vue
@@ -62,7 +62,7 @@
>
-
+
{
- this.batchOptions = res.filter((item) => {
+ that.$API.inm.warehouse.batch.req(obj).then((res) => {
+ that.batchOptions = res.filter((item) => {
return item.state == 10;
});
});
@@ -244,7 +245,33 @@ export default {
let that = this;
let id = data.split('#')[1];
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() {
this.getBatchOptions();