fix:光子生产执行中日志列表传参变动;添加返工和启用
This commit is contained in:
parent
0a0229cfab
commit
43e5dff859
|
@ -9,6 +9,13 @@
|
|||
v-auth="'mlog.create'"
|
||||
>新增</el-button
|
||||
>
|
||||
<el-button
|
||||
type="primary"
|
||||
icon="el-icon-plus"
|
||||
@click="table_rework"
|
||||
v-auth="'mlog.create'"
|
||||
>返工</el-button
|
||||
>
|
||||
</div>
|
||||
<div class="right-panel">
|
||||
<el-input
|
||||
|
@ -31,7 +38,6 @@
|
|||
row-key="id"
|
||||
:params="params"
|
||||
:query="params"
|
||||
@row-click="table_detail"
|
||||
>
|
||||
<el-table-column label="#" type="index" width="50"></el-table-column>
|
||||
<el-table-column label="工艺路线" prop="routepack_name">
|
||||
|
@ -44,6 +50,11 @@
|
|||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="创建时间" prop="create_time"></el-table-column>
|
||||
<el-table-column label="启用">
|
||||
<template #default="scope">
|
||||
<el-switch v-model="scope.row.enabled" @change="enabledChange(scope.row)"></el-switch>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="备注" prop="note"></el-table-column>
|
||||
<el-table-column
|
||||
label="操作"
|
||||
|
@ -107,10 +118,26 @@ import detailDrawer from "./fmlog_detail.vue";
|
|||
|
||||
export default {
|
||||
props: {
|
||||
deptId: {
|
||||
type: String,
|
||||
default: "",
|
||||
},
|
||||
mgroupId: {
|
||||
type: String,
|
||||
default: "",
|
||||
},
|
||||
mgroupName: {
|
||||
type: String,
|
||||
default: "",
|
||||
},
|
||||
processId: {
|
||||
type: String,
|
||||
default: "",
|
||||
},
|
||||
mgroupcode: {
|
||||
type: String,
|
||||
default: "",
|
||||
},
|
||||
},
|
||||
name: "mlog",
|
||||
components: {
|
||||
|
@ -130,29 +157,20 @@ export default {
|
|||
selection: [],
|
||||
mtask: "",
|
||||
mlogId: "",
|
||||
deptId: null,
|
||||
processId: "",
|
||||
processCate: "",
|
||||
fmlogId:"",
|
||||
};
|
||||
},
|
||||
mounted() {
|
||||
let that = this;
|
||||
that.$API.mtm.mgroup.list
|
||||
.req({ page: 0, name: that.mgroupName })
|
||||
.then((res) => {
|
||||
if (res.length < 1) {
|
||||
that.$message.error("获取工段错误");
|
||||
return;
|
||||
}
|
||||
that.mgroupId = res[0].id;
|
||||
that.deptId = res[0].belong_dept;
|
||||
that.processId = res[0].process;
|
||||
that.processCate = res[0].process_cate;
|
||||
that.params.mgroup = res[0].id;
|
||||
that.apiObj = that.$API.wpm.fmlog.list;
|
||||
});
|
||||
that.params.mgroup = that.mgroupId;
|
||||
that.apiObj = that.$API.wpm.fmlog.list;
|
||||
},
|
||||
methods: {
|
||||
enabledChange(row){
|
||||
this.$API.wpm.fmlog.toggleenabled.req(row.id).then(res=>{
|
||||
// this.$refs.table.refresh();
|
||||
})
|
||||
},
|
||||
detailClose() {
|
||||
this.dialog.detail = false;
|
||||
this.$refs.table.refresh();
|
||||
|
@ -164,6 +182,12 @@ export default {
|
|||
this.$refs.saveDialog.open("add");
|
||||
});
|
||||
},
|
||||
table_rework(){
|
||||
this.dialog.save = true;
|
||||
this.$nextTick(() => {
|
||||
this.$refs.saveDialog.open("add","rework");
|
||||
});
|
||||
},
|
||||
//编辑日志
|
||||
table_edit(row) {
|
||||
this.dialog.save = true;
|
||||
|
|
|
@ -167,10 +167,26 @@ import detailDrawer from "./mlog_detail.vue";
|
|||
|
||||
export default {
|
||||
props: {
|
||||
deptId: {
|
||||
type: String,
|
||||
default: "",
|
||||
},
|
||||
mgroupId: {
|
||||
type: String,
|
||||
default: "",
|
||||
},
|
||||
mgroupName: {
|
||||
type: String,
|
||||
default: "",
|
||||
},
|
||||
processId: {
|
||||
type: String,
|
||||
default: "",
|
||||
},
|
||||
mgroupcode: {
|
||||
type: String,
|
||||
default: "",
|
||||
},
|
||||
},
|
||||
name: "mlog",
|
||||
components: {
|
||||
|
@ -190,13 +206,13 @@ export default {
|
|||
selection: [],
|
||||
mtask: "",
|
||||
mlogId: "",
|
||||
deptId: null,
|
||||
processId: "",
|
||||
processCate: "",
|
||||
};
|
||||
},
|
||||
mounted() {
|
||||
this.getMgroupInfo();
|
||||
let that = this;
|
||||
that.params.mgroup = that.mgroupId;
|
||||
that.apiObj = that.$API.wpm.mlog.list;
|
||||
// this.getMgroupInfo();
|
||||
},
|
||||
methods: {
|
||||
getMgroupInfo(){
|
||||
|
@ -209,7 +225,6 @@ export default {
|
|||
that.mgroupId = res[0].id;
|
||||
that.deptId = res[0].belong_dept;
|
||||
that.processId = res[0].process;
|
||||
that.processCate = res[0].process_cate;
|
||||
that.params.mgroup = res[0].id;
|
||||
that.apiObj = that.$API.wpm.mlog.list;
|
||||
that.$refs.table.refresh();
|
||||
|
|
Loading…
Reference in New Issue