Przeglądaj źródła

过程监测审核功能添加

lucw 7 miesięcy temu
rodzic
commit
6a37e68c02

+ 1 - 1
src/components/bpmTask/bpmTask.vue

@@ -1,5 +1,5 @@
 <template>
 <template>
-  <el-row v-loading="tasksLoad">
+  <el-row v-bind="$attrs" v-loading="tasksLoad">
     <bpmSubmit
     <bpmSubmit
       v-if="currenItem"
       v-if="currenItem"
       @handleAudit="handleAudit"
       @handleAudit="handleAudit"

+ 93 - 11
src/views/batchRecord/components/editModal.vue

@@ -9,7 +9,34 @@
     width="80%"
     width="80%"
   >
   >
     <div>
     <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>
         <header-title title="事项信息"></header-title>
         <el-row style="margin-bottom: 20px">
         <el-row style="margin-bottom: 20px">
           <el-col :span="8">
           <el-col :span="8">
@@ -271,7 +298,10 @@
               </template>
               </template>
             </el-table-column>
             </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 }">
               <template slot-scope="{ row }">
                 <el-link :underline="false" style="cursor: pointer">
                 <el-link :underline="false" style="cursor: pointer">
                   <div class="ele-cell">
                   <div class="ele-cell">
@@ -289,7 +319,10 @@
               </template>
               </template>
             </el-table-column>
             </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">
               <template slot-scope="scope">
                 <div
                 <div
                   @click="openSelectUser(scope.row)"
                   @click="openSelectUser(scope.row)"
@@ -300,7 +333,10 @@
                 </div>
                 </div>
               </template>
               </template>
             </el-table-column>
             </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">
               <template slot-scope="scope">
                 <div>
                 <div>
                   <el-radio-group v-model="scope.row.checkStatus">
                   <el-radio-group v-model="scope.row.checkStatus">
@@ -326,7 +362,10 @@
                 </div>
                 </div>
               </template>
               </template>
             </el-table-column>
             </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">
               <template slot-scope="scope">
                 <div>
                 <div>
                   <el-radio-group v-model="scope.row.checkResult">
                   <el-radio-group v-model="scope.row.checkResult">
@@ -338,7 +377,26 @@
             </el-table-column>
             </el-table-column>
           </el-table>
           </el-table>
         </div>
         </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>
       </el-form>
+
+      <bpmDetail
+        v-if="activeComp == 'bpm' && details && details.processInstanceId"
+        :id="details.processInstanceId"
+      >
+      </bpmDetail>
     </div>
     </div>
 
 
     <template v-if="type == 'detail'" v-slot:footer>
     <template v-if="type == 'detail'" v-slot:footer>
@@ -476,6 +534,8 @@
   import SelectUser from '@/components/select/SelectUser/index.vue';
   import SelectUser from '@/components/select/SelectUser/index.vue';
   import toolModal from './toolModal.vue';
   import toolModal from './toolModal.vue';
   import { getById as producetaskrulerecordGetById } from '@/api/producetaskrecordrulesrecord/index.js';
   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 {
   export default {
     name: 'editModal',
     name: 'editModal',
@@ -490,7 +550,9 @@
       EquipmentDialog,
       EquipmentDialog,
       taskDialog,
       taskDialog,
       SelectUser,
       SelectUser,
-      toolModal
+      toolModal,
+      bpmDetail,
+      bpmTask
     },
     },
     props: {
     props: {
       // 1-产前准备,2-过程监测,3-产后检查
       // 1-产前准备,2-过程监测,3-产后检查
@@ -628,7 +690,13 @@
               trigger: 'blur'
               trigger: 'blur'
             }
             }
           ]
           ]
-        }
+        },
+        details: null,
+        tabOptions: [
+          { key: 'main', name: '事项信息' },
+          { key: 'bpm', name: '流程详情' }
+        ],
+        activeComp: 'main'
       };
       };
     },
     },
     computed: {
     computed: {
@@ -657,7 +725,7 @@
         this.type = type;
         this.type = type;
         if (type == 'add') {
         if (type == 'add') {
           this.title = `新增${this.reportWorkTypeName}事项`;
           this.title = `新增${this.reportWorkTypeName}事项`;
-        } else if (type == 'edit' || type == 'detail') {
+        } else if (type == 'edit') {
           this.title = `编辑${this.reportWorkTypeName}事项`;
           this.title = `编辑${this.reportWorkTypeName}事项`;
           this.form.workOrderId = data.workOrderId;
           this.form.workOrderId = data.workOrderId;
           this.form.id = data.id;
           this.form.id = data.id;
@@ -668,6 +736,16 @@
             this.getWorkOrderById(this.form.workOrderId);
             this.getWorkOrderById(this.form.workOrderId);
             this.getDetias();
             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 {
         } else {
         }
         }
         this.visible = true;
         this.visible = true;
@@ -676,6 +754,7 @@
       async getDetias() {
       async getDetias() {
         const data = await producetaskrulerecordGetById(this.form.id);
         const data = await producetaskrulerecordGetById(this.form.id);
         data.tools = data.tools || [];
         data.tools = data.tools || [];
+        this.details = data;
         this.$util.assignObject(this.form, data);
         this.$util.assignObject(this.form, data);
         this.form.details = this.form.details.map((i) => {
         this.form.details = this.form.details.map((i) => {
           return {
           return {
@@ -712,8 +791,11 @@
       handleClose() {
       handleClose() {
         this.form = JSON.parse(JSON.stringify(this.formBaseData));
         this.form = JSON.parse(JSON.stringify(this.formBaseData));
         this.produceTaskList = [];
         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() {
       itemTypeChange() {
@@ -914,7 +996,7 @@
 
 
         return userList
         return userList
           .map((i) => {
           .map((i) => {
-            return i.groupName + '-' + i.userName;
+            return (i.groupName || i.teamName) + '-' + i.userName;
           })
           })
           .join(',');
           .join(',');
       },
       },

+ 11 - 3
src/views/batchRecord/components/list.vue

@@ -68,6 +68,15 @@
           执行
           执行
         </el-link>
         </el-link>
 
 
+        <el-link
+          v-if="row.approvalStatus === 0"
+          type="primary"
+          :underline="false"
+          @click="openApproval(row)"
+        >
+          提交
+        </el-link>
+
         <el-popconfirm
         <el-popconfirm
           v-if="
           v-if="
             row.executeStatus == 0 &&
             row.executeStatus == 0 &&
@@ -103,13 +112,13 @@
 
 
     <taskDialog ref="taskDialogRef" @reload="reload" :isTempRecord="1" />
     <taskDialog ref="taskDialogRef" @reload="reload" :isTempRecord="1" />
 
 
-    <!-- <process-submit-dialog
+    <process-submit-dialog
       :processSubmitDialogFlag.sync="processSubmitDialogFlag"
       :processSubmitDialogFlag.sync="processSubmitDialogFlag"
       v-if="processSubmitDialogFlag"
       v-if="processSubmitDialogFlag"
       ref="processSubmitDialogRef"
       ref="processSubmitDialogRef"
       @reload="reload"
       @reload="reload"
       :isNotNeedProcess="false"
       :isNotNeedProcess="false"
-    ></process-submit-dialog> -->
+    ></process-submit-dialog>
   </el-card>
   </el-card>
 </template>
 </template>
 
 
@@ -377,7 +386,6 @@
               businessCode: row.code
               businessCode: row.code
             }
             }
           };
           };
-          console.log('1', 1);
           this.$refs.processSubmitDialogRef.init(params);
           this.$refs.processSubmitDialogRef.init(params);
         });
         });
       },
       },

+ 1 - 1
src/views/checklistManagement/checklist.vue

@@ -292,7 +292,7 @@
       // 提交审批
       // 提交审批
       openApproval(row) {
       openApproval(row) {
         console.log('row', row);
         console.log('row', row);
-        // this.processSubmitDialogFlag = true;
+        this.processSubmitDialogFlag = true;
         this.$nextTick(async () => {
         this.$nextTick(async () => {
           let params = {
           let params = {
             businessId: row.id,
             businessId: row.id,

+ 5 - 3
src/views/produce/components/prenatalExamination/releaseRulesDialog.vue

@@ -189,9 +189,13 @@
       </el-row>
       </el-row>
     </el-form>
     </el-form>
 
 
-    <header-title title="物料清单"></header-title>
+    <header-title
+      v-if="addForm.reportWorkType == '2'"
+      title="物料清单"
+    ></header-title>
 
 
     <ele-pro-table
     <ele-pro-table
+      v-if="addForm.reportWorkType == '2'"
       ref="table"
       ref="table"
       row-key="id"
       row-key="id"
       :columns="materialColumns"
       :columns="materialColumns"
@@ -856,8 +860,6 @@
           this.addForm.ruleName = this.ruleInfo.name;
           this.addForm.ruleName = this.ruleInfo.name;
           this.addForm.deviceId = this.ruleInfo.deviceId;
           this.addForm.deviceId = this.ruleInfo.deviceId;
           this.addForm.deviceName = this.ruleInfo.deviceName;
           this.addForm.deviceName = this.ruleInfo.deviceName;
-          this.addForm.produceTaskName =
-            this.ruleInfo.produceTaskConfigs[0]?.produceTaskName;
         }
         }
       },
       },
       // 查询记录规则 事项列表
       // 查询记录规则 事项列表

+ 2 - 2
vue.config.js

@@ -33,11 +33,11 @@ module.exports = {
       // 当我们的本地的请求 有/api的时候,就会代理我们的请求地址向另外一个服务器发出请求
       // 当我们的本地的请求 有/api的时候,就会代理我们的请求地址向另外一个服务器发出请求
       '/api': {
       '/api': {
         // target: 'http://124.71.68.31:50001',
         // target: 'http://124.71.68.31:50001',
-        target: 'http://192.168.1.125:18086',
+        // target: 'http://192.168.1.125:18086',
         // target: 'http://192.168.1.251:18086',
         // target: 'http://192.168.1.251:18086',
         // target: 'http://192.168.1.251:18086',
         // target: 'http://192.168.1.251:18086',
         // target: 'http://192.168.1.125:18086',
         // target: 'http://192.168.1.125:18086',
-        // target: 'http://192.168.1.116:18086', // 赵沙金
+        target: 'http://192.168.1.116:18086', // 赵沙金
         // target: 'http://192.168.1.251:18086', // 开发环境
         // target: 'http://192.168.1.251:18086', // 开发环境
         // target: 'http://192.168.1.103:18086',192.168.1.116
         // target: 'http://192.168.1.103:18086',192.168.1.116
         // target: 'http://192.168.1.144:18086',
         // target: 'http://192.168.1.144:18086',