|
|
@@ -9,7 +9,34 @@
|
|
|
width="80%"
|
|
|
>
|
|
|
<div>
|
|
|
- <el-form ref="formRef" :model="form" :rules="rules" label-width="130px">
|
|
|
+ <div
|
|
|
+ class="switch"
|
|
|
+ v-if="details && details.processInstanceId"
|
|
|
+ :maxable="true"
|
|
|
+ style="margin-bottom: 20px"
|
|
|
+ >
|
|
|
+ <div class="switch_left">
|
|
|
+ <ul>
|
|
|
+ <li
|
|
|
+ v-for="item in tabOptions"
|
|
|
+ :key="item.key"
|
|
|
+ :class="{ active: activeComp == item.key }"
|
|
|
+ @click="activeComp = item.key"
|
|
|
+ >
|
|
|
+ {{ item.name }}
|
|
|
+ </li>
|
|
|
+ </ul>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+
|
|
|
+ <el-form
|
|
|
+ v-if="activeComp == 'main'"
|
|
|
+ ref="formRef"
|
|
|
+ :model="form"
|
|
|
+ :rules="rules"
|
|
|
+ label-width="130px"
|
|
|
+ :disabled="type == 'detail'"
|
|
|
+ >
|
|
|
<header-title title="事项信息"></header-title>
|
|
|
<el-row style="margin-bottom: 20px">
|
|
|
<el-col :span="8">
|
|
|
@@ -271,7 +298,10 @@
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
|
|
|
- <el-table-column v-if="form.recordRulesClassify != '4'" label="检查工具">
|
|
|
+ <el-table-column
|
|
|
+ v-if="form.recordRulesClassify != '4'"
|
|
|
+ label="检查工具"
|
|
|
+ >
|
|
|
<template slot-scope="{ row }">
|
|
|
<el-link :underline="false" style="cursor: pointer">
|
|
|
<div class="ele-cell">
|
|
|
@@ -289,7 +319,10 @@
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
|
|
|
- <el-table-column v-if="form.recordRulesClassify != '4'" label="检查人">
|
|
|
+ <el-table-column
|
|
|
+ v-if="form.recordRulesClassify != '4'"
|
|
|
+ label="检查人"
|
|
|
+ >
|
|
|
<template slot-scope="scope">
|
|
|
<div
|
|
|
@click="openSelectUser(scope.row)"
|
|
|
@@ -300,7 +333,10 @@
|
|
|
</div>
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
- <el-table-column v-if="form.recordRulesClassify != '4'" label="检查情况">
|
|
|
+ <el-table-column
|
|
|
+ v-if="form.recordRulesClassify != '4'"
|
|
|
+ label="检查情况"
|
|
|
+ >
|
|
|
<template slot-scope="scope">
|
|
|
<div>
|
|
|
<el-radio-group v-model="scope.row.checkStatus">
|
|
|
@@ -326,7 +362,10 @@
|
|
|
</div>
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
- <el-table-column v-if="form.recordRulesClassify != '4'" label="检查结果">
|
|
|
+ <el-table-column
|
|
|
+ v-if="form.recordRulesClassify != '4'"
|
|
|
+ label="检查结果"
|
|
|
+ >
|
|
|
<template slot-scope="scope">
|
|
|
<div>
|
|
|
<el-radio-group v-model="scope.row.checkResult">
|
|
|
@@ -338,7 +377,26 @@
|
|
|
</el-table-column>
|
|
|
</el-table>
|
|
|
</div>
|
|
|
+
|
|
|
+ <!-- 底部审批 -->
|
|
|
+ <el-row
|
|
|
+ v-if="details && details.processInstanceId"
|
|
|
+ style="margin-top: 40px"
|
|
|
+ >
|
|
|
+ <bpmTask
|
|
|
+ v-if="details.processInstanceId"
|
|
|
+ :id="details.processInstanceId"
|
|
|
+ :businessId="details.id"
|
|
|
+ :gutter="20"
|
|
|
+ ></bpmTask>
|
|
|
+ </el-row>
|
|
|
</el-form>
|
|
|
+
|
|
|
+ <bpmDetail
|
|
|
+ v-if="activeComp == 'bpm' && details && details.processInstanceId"
|
|
|
+ :id="details.processInstanceId"
|
|
|
+ >
|
|
|
+ </bpmDetail>
|
|
|
</div>
|
|
|
|
|
|
<template v-if="type == 'detail'" v-slot:footer>
|
|
|
@@ -476,6 +534,8 @@
|
|
|
import SelectUser from '@/components/select/SelectUser/index.vue';
|
|
|
import toolModal from './toolModal.vue';
|
|
|
import { getById as producetaskrulerecordGetById } from '@/api/producetaskrecordrulesrecord/index.js';
|
|
|
+ import bpmDetail from '@/views/bpm/processInstance/detail.vue';
|
|
|
+ import bpmTask from '@/components/bpmTask/bpmTask.vue';
|
|
|
|
|
|
export default {
|
|
|
name: 'editModal',
|
|
|
@@ -490,7 +550,9 @@
|
|
|
EquipmentDialog,
|
|
|
taskDialog,
|
|
|
SelectUser,
|
|
|
- toolModal
|
|
|
+ toolModal,
|
|
|
+ bpmDetail,
|
|
|
+ bpmTask
|
|
|
},
|
|
|
props: {
|
|
|
// 1-产前准备,2-过程监测,3-产后检查
|
|
|
@@ -628,7 +690,13 @@
|
|
|
trigger: 'blur'
|
|
|
}
|
|
|
]
|
|
|
- }
|
|
|
+ },
|
|
|
+ details: null,
|
|
|
+ tabOptions: [
|
|
|
+ { key: 'main', name: '事项信息' },
|
|
|
+ { key: 'bpm', name: '流程详情' }
|
|
|
+ ],
|
|
|
+ activeComp: 'main'
|
|
|
};
|
|
|
},
|
|
|
computed: {
|
|
|
@@ -657,7 +725,7 @@
|
|
|
this.type = type;
|
|
|
if (type == 'add') {
|
|
|
this.title = `新增${this.reportWorkTypeName}事项`;
|
|
|
- } else if (type == 'edit' || type == 'detail') {
|
|
|
+ } else if (type == 'edit') {
|
|
|
this.title = `编辑${this.reportWorkTypeName}事项`;
|
|
|
this.form.workOrderId = data.workOrderId;
|
|
|
this.form.id = data.id;
|
|
|
@@ -668,6 +736,16 @@
|
|
|
this.getWorkOrderById(this.form.workOrderId);
|
|
|
this.getDetias();
|
|
|
}
|
|
|
+ } else if (type == 'detail') {
|
|
|
+ this.title = `${this.reportWorkTypeName}事项`;
|
|
|
+ this.form.workOrderId = data.workOrderId;
|
|
|
+ this.form.id = data.id;
|
|
|
+ if (this.form.workOrderId) {
|
|
|
+ this.getProductTaskList(this.form.workOrderId);
|
|
|
+ // 根据工单id 获取详情
|
|
|
+ this.getWorkOrderById(this.form.workOrderId);
|
|
|
+ this.getDetias();
|
|
|
+ }
|
|
|
} else {
|
|
|
}
|
|
|
this.visible = true;
|
|
|
@@ -676,6 +754,7 @@
|
|
|
async getDetias() {
|
|
|
const data = await producetaskrulerecordGetById(this.form.id);
|
|
|
data.tools = data.tools || [];
|
|
|
+ this.details = data;
|
|
|
this.$util.assignObject(this.form, data);
|
|
|
this.form.details = this.form.details.map((i) => {
|
|
|
return {
|
|
|
@@ -712,8 +791,11 @@
|
|
|
handleClose() {
|
|
|
this.form = JSON.parse(JSON.stringify(this.formBaseData));
|
|
|
this.produceTaskList = [];
|
|
|
- this.$refs.formRef && this.$refs.formRef.resetFields();
|
|
|
- this.visible = false;
|
|
|
+ this.details = null;
|
|
|
+ this.$nextTick(() => {
|
|
|
+ this.$refs.formRef.clearValidate();
|
|
|
+ this.visible = false;
|
|
|
+ });
|
|
|
},
|
|
|
// 修改规则事项类型
|
|
|
itemTypeChange() {
|
|
|
@@ -914,7 +996,7 @@
|
|
|
|
|
|
return userList
|
|
|
.map((i) => {
|
|
|
- return i.groupName + '-' + i.userName;
|
|
|
+ return (i.groupName || i.teamName) + '-' + i.userName;
|
|
|
})
|
|
|
.join(',');
|
|
|
},
|