diff --git a/src/views/wpm_bx/mlog_detail.vue b/src/views/wpm_bx/mlog_detail.vue
index 2b0c5797..b45956a4 100644
--- a/src/views/wpm_bx/mlog_detail.vue
+++ b/src/views/wpm_bx/mlog_detail.vue
@@ -358,12 +358,6 @@
style="margin-right: 10px;"
@click="table_out_check(scope.row)"
>编辑
-
- 详情
diff --git a/src/views/wpm_bx/mlog_form2.vue b/src/views/wpm_bx/mlog_form2.vue
index ecda792d..efb3254e 100644
--- a/src/views/wpm_bx/mlog_form2.vue
+++ b/src/views/wpm_bx/mlog_form2.vue
@@ -27,6 +27,7 @@
@change="formWminChange(wm_in)"
style="width: 100%;top: -7px;"
>
+ *请扫同一批次的物料码
@@ -55,7 +56,7 @@
-
+
@@ -160,11 +161,19 @@ export default {
trigger: "blur",
},
],
+ equipment: [
+ {
+ required: true,
+ message: "请选择生产设备",
+ trigger: "blur",
+ },
+ ],
},
wm_in: "",
route_code:"",
visible: false,
isSaveing: false,
+ materialTracking:10,
options: [],
bwItemForms: [],
routeOptions: [],
@@ -262,18 +271,20 @@ export default {
})
that.wm_in = '';
if (arr.length > 0) {
- that.routeOptions = [];
that.form.batch = arr[0].batch;
that.form.wm_in = arr[0].id;
that.form.count_use = arr[0].count_cando;
that.wm_in = arr[0].batch;
- that.routeOriginOptions.forEach((item)=>{
- if(item.material_in==arr[0].material){
- that.routeOptions.push(item);
+ that.materialTracking = arr[0].material_.tracking;
+ if(that.routeOptions.length==0){
+ that.routeOriginOptions.forEach((item)=>{
+ if(item.material_in==arr[0].material){
+ that.routeOptions.push(item);
+ }
+ })
+ if(that.routeOptions.length==1){
+ that.form.route = that.routeOptions[0].id;
}
- })
- if(that.routeOptions.length==1){
- that.form.route = that.routeOptions[0].id;
}
}else{
that.$message.error("批次号不存在,或没有可操作数量");
@@ -298,14 +309,11 @@ export default {
bwitem.number=res[index].number;
bwitem.wpr=res[index].id;
if(that.routeOptions.length==0){
- console.log('that.routeOriginOptions',that.routeOriginOptions);
- console.log('res[index].material',res[index].material);
that.routeOriginOptions.forEach((item)=>{
if(item.material_in==res[index].material){
that.routeOptions.push(item);
}
})
- console.log('that.routeOptions',that.routeOptions);
if(that.routeOptions.length==1){
that.form.route = that.routeOptions[0].id;
}
@@ -318,6 +326,7 @@ export default {
if(that.form.batch==''||that.form.batch==batch){
that.form.batch = batch;
that.form.wm_in = arr[0].id;
+ that.materialTracking = arr[0].material_.tracking;
let arr1 = that.bwItemForms.filter((item)=>{
return item.number == bwitem.number;
})
@@ -351,10 +360,22 @@ export default {
that.isSaveing = true;
that.form.mgroup = that.mgroup;
that.$API.wpm.mlog.quick.req(that.form).then((res) => {
- that.isSaveing = false;
- that.$emit("success",res.mlog);
- that.visible = false;
- that.$message.success("操作成功");
+ if(that.bwItemForms.length>0){
+ that.bwItemForms.forEach(item=>{
+ item.mlogb = res.mlogbin;
+ })
+ that.$API.wpm.mlogbw.create.req(that.bwItemForms).then((res1) => {
+ that.isSaveing = false;
+ that.$emit("success",res.mlog);
+ that.visible = false;
+ that.$message.success("操作成功");
+ })
+ }else{
+ that.isSaveing = false;
+ that.$emit("success",res.mlog);
+ that.visible = false;
+ that.$message.success("操作成功");
+ }
}).catch(()=>{
that.isSaveing = false;
});