+
+
+ {{ item2.number }}
+
+
+
+ {{ item2.number }}
+
-
+
+
+
+
+
+
@@ -141,6 +153,7 @@ export default {
trigger: "blur",
},
},
+ route_code:"",
batchOrign:{},
wprOptions: [],
materialOptions: [],
@@ -152,6 +165,9 @@ export default {
},
mounted() {
let that = this;
+ let paths = that.$route.path;
+ let arr = paths.split("/");
+ that.route_code = arr[2];
that.form.type = that.type;
that.form.handle_date = that.form.send_date = that.$TOOL.dateFormat2(new Date());
that.form.send_mgroup = that.form.recive_mgroup = that.mgroupId;
@@ -162,6 +178,9 @@ export default {
getWpr(id){
let that = this;
that.$API.wpm.wpr.list.req({page:0,wm:id}).then((res) => {
+ res.forEach(item=>{
+ item.checked = false;
+ })
that.wprOptions = res;
});
},
@@ -218,25 +237,27 @@ export default {
if(arrs.length>1){
that.form.handoverb[index].wpr = '';
arrs.forEach(arr=>{
- that.wprOptions.forEach(item=>{
+ let obj = {};
+ obj.number = arr;
+ let options = that.wprOptions.filter(item=>{return item.number.indexOf(arr) > -1&&!item.disabled});
+ if(options.length>0){
+ obj.wpr = options[0].id;
+ barchArrs.push(arr);
+ }
+ that.form.handoverb[index].handoverbw.push(obj);
+ that.wprOptions.forEach(item=>{
if(item.number.indexOf(arr) > -1&&!item.disabled){
item.disabled = true;
- let obj = {};
- obj.number = item.number;
- obj.wpr = item.id;
- barchArrs.push(arr);
- that.form.handoverb[index].handoverbw.push(obj);
- that.form.handoverb[index].count = that.form.handoverb[index].handoverbw.length;
}
})
+
})
+ that.form.handoverb[index].count = barchArrs.length;
//如果arrs里有不是这个批次的wpr,提示错误
let diff = arrs.filter(item => !barchArrs.includes(item));
that.diff = diff;
- console.log('diff',diff)
if(diff.length>0){
that.$message.warning("物料"+diff.join(",")+"不在该批次中");
- // that.$confirm("物料"+diff.join(",")+"不在该批次中", "提示", {type: "warning",}).then(() => {});
}
}else{
//放入对应的行中的handoverb中,并且在列表中disabled
@@ -295,6 +316,21 @@ export default {
}
that.form.handoverb.splice(index,1);
},
+ handleChange(index){
+ let that = this;
+ that.form.handoverb[index].handoverbw = [];
+ let trueCount = this.wprOptions.filter(item => item.checked === true).length;
+ that.form.handoverb[index].count =trueCount;
+ this.wprOptions.forEach(item=>{
+ if(item.checked){
+ let obj = {};
+ obj.number = item.number;
+ obj.wpr = item.id;
+ item.disabled = true;
+ that.form.handoverb[index].handoverbw.push(obj);
+ }
+ })
+ },
//提交
submit() {
let that = this;
@@ -303,6 +339,7 @@ export default {
let total = 0;
if(this.form.handoverb.length>0){
this.form.handoverb.forEach(item=>{
+ item.handoverbw = item.handoverbw.filter(item=>{ return item.wpr&&item.wpr!==''&&item.wpr!==null&&item.wpr!==undefined})
total += item.count;
})
}
diff --git a/src/views/wpm_bx/inmIn.vue b/src/views/wpm_bx/inmIn.vue
index b6e305be..6687a209 100644
--- a/src/views/wpm_bx/inmIn.vue
+++ b/src/views/wpm_bx/inmIn.vue
@@ -93,7 +93,7 @@
min-width="150"
>
- {{scope.row.batch}}
+ {{scope.row.batch}}
{{scope.row.batch}}
diff --git a/src/views/wpm_bx/mlog_detail.vue b/src/views/wpm_bx/mlog_detail.vue
index 201fb76f..38c75042 100644
--- a/src/views/wpm_bx/mlog_detail.vue
+++ b/src/views/wpm_bx/mlog_detail.vue
@@ -136,8 +136,27 @@
-
-
+
+
+
+
+
+
+
+ {{ scope.row.shift_name}}
+
+
+
保存
@@ -516,6 +535,7 @@ export default {
printer_name:localStorage.getItem("printer_name"),
addTemplate:{
mlog: "",
+ shift:"",
process: "",
equipment: "",
handle_user: "",