diff --git a/src/views/mtm/mgroup_form.vue b/src/views/mtm/mgroup_form.vue
index 845e5e45..f9eb1e1c 100644
--- a/src/views/mtm/mgroup_form.vue
+++ b/src/views/mtm/mgroup_form.vue
@@ -53,6 +53,13 @@
+
+
+
+
+
@@ -111,6 +118,7 @@ const defaultForm = {
cate: 'photon',
belong_dept: '',
need_enm: false,
+ batch_append_code:false
};
export default {
emits: ["success", "closed"],
@@ -154,7 +162,7 @@ export default {
setFiltersVisible: false,
materialList: [],
addTemplate: { material_in: '', material_out: '', mgroup: '', isedit: true },
- baseCode :this.$TOOL.data.get('BASE_INFO').base.base_code.$API,
+ baseCode :this.$TOOL.data.get('BASE_INFO').base.base_code,
menuType:this.$TOOL.data.get('BASE_INFO').base.base_menucate,
};
},
diff --git a/src/views/wpm_gx/f_mlogs_form.vue b/src/views/wpm_gx/f_mlogs_form.vue
index 4dfc638c..f15bca2f 100644
--- a/src/views/wpm_gx/f_mlogs_form.vue
+++ b/src/views/wpm_gx/f_mlogs_form.vue
@@ -7,14 +7,14 @@
@closed="$emit('closed')"
>
-
+
@@ -240,7 +240,7 @@
加工前不良
-
+
-
- 本工段不良
-
+
+ 本工段不良
+
-
@@ -116,8 +60,6 @@
-
-
+
@@ -288,7 +232,7 @@ export default {
this.getfmlogItem();
this.params.fmlog = this.fmlogId;
this.paramsWm.mgroup = this.mgroup;
- this.apiObj = this.$API.wpm.mlog.list;
+ // this.apiObj = this.$API.wpm.mlog.list;
},
methods: {
open(codeText="") {
@@ -307,16 +251,22 @@ export default {
that.fmlogItem = res;
that.route = res.route;
that.paramsWm.mgroup = res.mgroup;
- that.$API.wpm.mlog.list.req(that.params).then((res) => {
- that.tableData = res;
- if(res.length>0){
- res.forEach((item) => {
- that.batchContains+= item.batch + " ";
- })
- that.paramsWm.search = that.batchContains;
- that.apiObjWm = that.$API.wpm.wmaterial.list;
- }else{}
- });
+ that.apiObjWm = that.$API.wpm.wmaterial.list;
+ that.getMlogs();
+
+ });
+ },
+ getMlogs(){
+ let that = this;
+ that.$API.wpm.mlog.list.req(that.params).then((res) => {
+ that.tableData = res;
+ if(res.length>0){
+ res.forEach((item) => {
+ that.batchContains+= item.batch + " ";
+ })
+ that.paramsWm.search = that.batchContains;
+ that.apiObjWm = that.$API.wpm.wmaterial.list;
+ }else{}
});
},
//表单注入数据
@@ -348,22 +298,23 @@ export default {
that.isSaveing = true;
that.$API.wpm.mlog.submit.req(row.id).then((res) => {
that.isSaveing = false;
- this.$refs.table.refresh();
+ that.getMlogs();
that.$message.success("操作成功");
});
},
//日志撤回
mlogRevert(row) {
- this.$confirm(`确定撤回该日志吗?`, "提示", {
+ let that = this;
+ that.$confirm(`确定撤回该日志吗?`, "提示", {
type: "warning",
}).then(() => {
var id = row.id;
- this.$API.wpm.mlog.revert.req(id).then((res) => {
+ that.$API.wpm.mlog.revert.req(id).then((res) => {
if (res.err_msg) {
- this.$message.error(res.err_msg);
+ that.$message.error(res.err_msg);
} else {
- this.$refs.table.refresh();
- this.$message.success("撤回成功");
+ that.getMlogs();
+ that.$message.success("撤回成功");
}
});
});
@@ -371,25 +322,25 @@ export default {
//日志删除
table_del(row) {
let that = this;
- this.$confirm(`确定删除该日志吗?`, "提示", {
+ that.$confirm(`确定删除该日志吗?`, "提示", {
type: "warning",
}).then(() => {
var id = row.id;
- this.$API.wpm.mlog.delete.req(id).then((res) => {
+ that.$API.wpm.mlog.delete.req(id).then((res) => {
if (res.err_msg) {
- this.$message.error(res.err_msg);
+ that.$message.error(res.err_msg);
} else {
- this.$refs.table.refresh();
- this.$message.success("删除成功");
+ that.getMlogs();
+ that.$message.success("删除成功");
}
});
});
},
handleSaveSuccess() {
- this.$refs.table.refresh();
+ this.getMlogs();
},
handleCheckSuccess() {
- this.$refs.table.refresh();
+ this.getMlogs();
},
fileUPSuccess(res) {
console.log('res',res);
@@ -405,9 +356,6 @@ export default {
that.$nextTick(() => {
that.printVisible = true;
})
- // that.$API.wpm.mlog.list.req(that.params).then((res) => {
- // that.tableData = res;
- // });
},
//打印物料标签
printMaterial(row){
diff --git a/src/views/wpm_gx/mlog_detail.vue b/src/views/wpm_gx/mlog_detail.vue
index fd292aa5..8ca8a72c 100644
--- a/src/views/wpm_gx/mlog_detail.vue
+++ b/src/views/wpm_gx/mlog_detail.vue
@@ -276,6 +276,8 @@
+
+
+
+
+
+
+
0){
data.count_json_from.forEach((item) => {
let cells = item.end-item.start+1;
@@ -356,38 +378,42 @@ export default {
count_test:1,
count_notok:0
};
- this.count_json.push(obj);
+ that.count_json.push(obj);
}
})
}
data.count_json.forEach((item) => {
item.count_notok = 0;
- item.count_test = this.count_cell;
- this.count_json.push(item);
+ item.count_test = that.count_cell;
+ that.count_json.push(item);
})
- this.form.batch = data.batch;
- if(Number(data.count_notok)>0){
- this.form.count_real =data.count_real;
- this.form.count_ok= data.count_ok;
- this.form.count_notok= data.count_notok;
- }else{
- this.form.count_real =this.form.count_ok= data.count_real;
+ that.form.batch = data.batch;
+ if(data.mlogbdefect.length>0){
+ data.mlogbdefect.forEach((item2) => {
+ that.defectform[item2.defect_name] = Number(item2.count);
+ })
}
- if(data.count_json_wx&&data.count_json_wx.ok_num){
- this.count_json_wx = data.count_json_wx;
- this.count_json_wx.count_canInm = true;
- if(data.count_json_wx.ok_num!==null){
- this.form.count_ok = data.count_json_wx.ok_num;
- this.form.count_notok = data.count_json_wx.notok_num;
+ that.form.count_real =Number(data.count_real);
+ that.form.count_ok= Number(data.count_ok);
+ that.form.count_notok= Number(data.count_notok);
+ //外协
+ if(that.mgroupMtype==20){
+ if(data.count_json_wx.ok_num&&data.count_json_wx.ok_num!==null){
+ that.count_json_wx = data.count_json_wx;
+ that.count_json_wx.count_canInm = true;
+ if(data.count_json_wx.ok_num!==null){
+ that.form.count_ok = data.count_json_wx.ok_num;
+ that.form.count_notok = data.count_json_wx.notok_num;
+ }
+ }else{
+ that.canWrite = true;
+ this.form.count_ok=null;
+ this.form.count_notok=null;
}
- }else{
- this.canWrite = true;
- this.form.count_ok=null;
- this.form.count_notok=null;
}
- this.material_out = data.material_out;
- this.mgroupName = data.mgroup_name;
- this.getdefects();
+ that.material_out = data.material_out;
+ that.mgroupName = data.mgroup_name;
+ that.getdefects();
},
getdefects(){
let that = this;
@@ -509,6 +535,9 @@ export default {
obj_form.count_ok = that.form.count_ok;
obj_form.count_notok = that.form.count_notok;
}
+ if(that.mgroupName=='外观检验'){
+ obj_form.test_user = that.form.test_user;
+ }
obj_form.count_real = that.form.count_real;
obj_form.mlogbdefect = that.form.mlogbdefect;
if(that.mgroupName=='黑化'||that.mgroupName=='退火'){