Parcourir la source

Merge branch 'master' of http://192.168.2.241:3000/tengmingxue/mbWaterService

zxh il y a 2 ans
Parent
commit
d711431ad3

+ 39 - 0
src/api/process/process.js

@@ -155,4 +155,43 @@ export function examineProcess(data){
 /*********流程信息 END *********/
 
 
+/********* 督办信息 BEGIN *********/
+//督办信息分页查询
+export function querySupervisePage(params) {
+  return request({
+    url: '/tofly-flow/processsupervise/page',
+    method: 'get',
+    params
+  })
+}
+//根据id查询督办信息
+export function querySuperviseById(data) {
+  return request({
+    url: '/tofly-flow/processsupervise/' + data,
+    method: 'get',
+    data
+  })
+}
+
+//新增督办信息
+export function addSupervise(data){
+  return request({
+    url:"/tofly-flow/processsupervise",
+    method:"post",
+    data
+  })
+}
+
+//通过ID批量删除流程督办记录信息
+export function delSupervise(data){
+  return request({
+    url:"/tofly-flow/processsupervise/deleteByIds",
+    method:"delete",
+    data
+  })
+}
+/*********督办信息 END *********/
+
+
+
 

+ 1 - 1
src/router/_import.js

@@ -296,7 +296,7 @@ const map = {
   purchaserequest:()=>import('@/views/mbsys/materialmanage/processMng/purchaseRegist/index.vue'), // 采购申请
   purchaseExamine:()=>import('@/views/mbsys/materialmanage/processMng/purchaseExamine/index.vue'), // 采购审核
   purchaseOrder:()=>import('@/views/mbsys/materialmanage/processMng/purchaseOrder/index.vue'), // 采购单查看
-  purchaseArchives:()=>import('@/views/mbsys/materialmanage/processMng/purchaseOrder/index.vue'), // 采购档案
+  purchaseArchives:()=>import('@/views/mbsys/materialmanage/processMng/purchaseArchives/index.vue'), // 采购档案
   purchaseSupervise:()=>import('@/views/mbsys/materialmanage/processMng/purchaseSupervise/index.vue'), // 采购督办
 
   // 协同办公系统

+ 563 - 82
src/views/mbsys/components/examineForm.vue

@@ -1,9 +1,9 @@
 <template>
   <!-- 审核信息-->
   <div class="form-examine">
-    <el-form :model="form" label-width="auto">
-      <el-row :gutter="24">
-        <el-col v-if="cfgParam.isOpt ? (step.stepOrder > 1 ): true" :span="8">
+    <el-form :model="form" label-width="130px">
+      <el-row :gutter="24" v-if="!isHisExamine">
+        <el-col v-if="cfgParam.isOpt ? step.stepOrder > 1 : true" :span="8">
           <el-form-item label="处理结果:">
             <el-select
               v-model="form.headleState"
@@ -17,6 +17,7 @@
                     : false
                   : true
               "
+              style="width: 100%"
             >
               <el-option
                 v-for="item in headleState"
@@ -29,7 +30,7 @@
           </el-form-item>
         </el-col>
 
-        <el-col v-if="cfgParam.isOpt ? (step.stepOrder > 1) : true" :span="16">
+        <el-col v-if="cfgParam.isOpt ? step.stepOrder > 1 : true" :span="16">
           <el-form-item label="备注:">
             <el-input
               v-model="form.remarks"
@@ -41,11 +42,12 @@
                     : false
                   : true
               "
+              style="width: 100%"
             ></el-input>
           </el-form-item>
         </el-col>
         <el-col
-          v-if="(form.headleState == 1 || form.headleState == 2) && (!isLastStop)"
+          v-if="(form.headleState == 1 || form.headleState == 2) && !isLastStop"
           :span="8"
         >
           <el-form-item label="下一环节:">
@@ -61,12 +63,13 @@
                     : false
                   : true
               "
+              style="width: 100%"
             >
               <el-option
                 v-for="item in nextSteps"
-                :key="item.id"
+                :key="item.id + ''"
                 :label="item.name"
-                :value="item.id"
+                :value="item.id + ''"
               >
               </el-option>
             </el-select>
@@ -74,7 +77,7 @@
         </el-col>
 
         <el-col
-          v-if="(form.headleState == 1 || form.headleState == 2) && (!isLastStop)"
+          v-if="(form.headleState == 1 || form.headleState == 2) && !isLastStop"
           :span="8"
         >
           <el-form-item label="下一环节处理部门:">
@@ -90,6 +93,7 @@
                     : false
                   : true
               "
+              style="width: 100%"
             >
               <el-option
                 v-for="item in nextStepDepts"
@@ -102,7 +106,7 @@
           </el-form-item>
         </el-col>
         <el-col
-          v-if="(form.headleState == 1 || form.headleState == 2) && (!isLastStop)"
+          v-if="(form.headleState == 1 || form.headleState == 2) && !isLastStop"
           :span="8"
         >
           <el-form-item label="下一环节处理人:">
@@ -117,6 +121,7 @@
                     : false
                   : true
               "
+              style="width: 100%"
             >
               <el-option
                 v-for="item in nextStepStaffs"
@@ -129,12 +134,14 @@
           </el-form-item>
         </el-col>
 
+        <!-- 处理状态为驳回 -->
         <el-col v-if="form.headleState == 3" :span="8">
           <el-form-item label="处理部门:">
             <el-select
-              v-model="form.handleDept"
+              v-model="form.dept"
               placeholder="请选择"
               size="small"
+              @change="curStepDeptChange"
               :disabled="
                 cfgParam.isOpt
                   ? cfgParam.optionType == 0
@@ -142,9 +149,10 @@
                     : false
                   : true
               "
+              style="width: 100%"
             >
               <el-option
-                v-for="item in headleState"
+                v-for="item in curStepDepts"
                 :key="item.id"
                 :label="item.name"
                 :value="item.id"
@@ -153,10 +161,11 @@
             </el-select>
           </el-form-item>
         </el-col>
+        <!-- 处理状态为驳回 -->
         <el-col v-if="form.headleState == 3" :span="8">
           <el-form-item label="处理人员:">
             <el-select
-              v-model="form.handleUser"
+              v-model="form.deptStaff"
               placeholder="请选择"
               size="small"
               :disabled="
@@ -166,26 +175,100 @@
                     : false
                   : true
               "
+              style="width: 100%"
             >
               <el-option
-                v-for="item in headleState"
-                :key="item.id"
-                :label="item.name"
-                :value="item.id"
+                v-for="item in curStepStaffs"
+                :key="item.userId"
+                :label="item.userName"
+                :value="item.userId"
               >
               </el-option>
             </el-select>
           </el-form-item>
         </el-col>
       </el-row>
+      <!-- 处理历史 -->
+      <el-row
+        :gutter="24"
+        class="history"
+        v-for="history in examinaHistory"
+        :key="history.nextProcessStep + ',' + history.nextStepNode"
+        style="margin: 0"
+      >
+        <!-- <el-col :span="24" v-if="isHisExamine">
+          <div class="title"><span>处理历史</span></div>
+        </el-col> -->
+        <el-row :gutter="24">
+          <el-col :span="8">
+            <el-form-item label="处理结果:">
+              <el-select
+                v-model="history.examineState"
+                placeholder="请选择"
+                size="small"
+                style="width: 100%"
+                disabled
+              >
+                <el-option
+                  v-for="item in headleState"
+                  :key="item.key"
+                  :label="item.name"
+                  :value="item.key"
+                >
+                </el-option>
+              </el-select>
+            </el-form-item>
+          </el-col>
+          <el-col :span="16">
+            <el-form-item label="备注:">
+              <el-input
+                v-model="history.remarks"
+                size="small"
+                disabled
+                style="width: 100%"
+              ></el-input>
+            </el-form-item>
+          </el-col>
+          <el-col :span="8">
+            <el-form-item label="下一环节:">
+              <el-input
+                v-model="history.nextStepName"
+                size="small"
+                disabled
+                style="width: 100%"
+              ></el-input>
+            </el-form-item>
+          </el-col>
+          <el-col :span="8">
+            <el-form-item label="下一环节处理部门:">
+              <el-input
+                v-model="history.nextStepExamineDept"
+                size="small"
+                disabled
+                style="width: 100%"
+              ></el-input>
+            </el-form-item>
+          </el-col>
+          <el-col :span="8">
+            <el-form-item label="下一环节处理人:">
+              <el-input
+                v-model="history.nextStepExamineUser"
+                size="small"
+                disabled
+                style="width: 100%"
+              ></el-input>
+            </el-form-item>
+          </el-col>
+        </el-row>
+      </el-row>
     </el-form>
   </div>
 </template>
 
 <script>
 import blocks from "./Blocks.vue";
-import { getAllUserInfo } from "@/api/base";
 import { config } from "./cfgOrderProcess";
+import { scaleAndAdd } from "zrender/lib/core/vector";
 export default {
   components: { blocks },
   props: {
@@ -201,14 +284,38 @@ export default {
     },
 
     /**
-     * 当前步骤数
+     * 流程总步数
+     */
+    steps: {
+      type: Array,
+      required: true,
+    },
+    /**
+     * 当前步骤
      */
     step: {
       type: Object,
       required: true,
     },
+
     /**
-     * 转派处理部门数组、转派处理人数组
+     * 流程配置信息
+     */
+    process: {
+      type: Object,
+      required: true,
+    },
+
+    /**
+     * 所有部门和用户
+     */
+    allDeptAndUser: {
+      type: Array,
+      required: true,
+    },
+
+    /**
+     * s审核信息
      */
     editData: {
       type: Object,
@@ -222,94 +329,468 @@ export default {
       nextStepDepts: [], //下一环节处理部门
       nextStepStaffs: [], //下一环节处理人
       form: {
+        curProcessStep: 1, //当前流程步骤,默认为1
+        curStepNode: 1, //当前流程步骤结点,默认为1
         headleState: 1, //处理结果 默认为1(通过)
+        processStep: "", //下一步步骤,默认1
         stepNode: 1, //下一步步骤环节,默认第一个环节
+        dept: "", //下一环节处理部门
+        deptStaff: "", //下一环节出处理
         remarks: "", //备注
       },
       isLastStop: false, //是不是最后一步审核
+      curStepStaffs: [], //转派时候的被驳回人
+      curStepDepts: [], //转派时候的驳回部门
+      examinaHistory: [], //审核历史
+      isHisExamine: false, //只显示历史(true:只显示历史,false:都显示)
     };
   },
 
-  created() {
+  async created() {
+    //初始化处理结果选项
     this.headleState = config.headleState;
-    //判断配置中是不是最后一步审核
-    if (JSON.stringify(this.step.nextStep) === "{}") this.isLastStop = true;
-    else {
-      //初始化下一步骤
-      this.nextSteps.push({
-        id: this.cfgParam.nextStep.stepOrder,
-        name: this.cfgParam.nextStep.stepName,
-        levelstaffs: this.cfgParam.nextStep.levelstaffs,
-      });
-    }
+    if (!(JSON.stringify(this.editData) === "{}")) {
+      if (this.editData.processNode != 100) {
+        //默认传处理状态为1 通过  [{ key: 1, name: '通过' }, { key: 2, name: '驳回' }, { key: 3, name: '转派' }, { key: 4, name: '终止' }],
+        this.resetExamina(1);
+        this.init();
+        if (this.editData.hasOwnProperty("processNodeVos")) {
+          this.examinaHistory = [];
+          //已经审核完成的
+          if (this.editData.currentNode.processStep > this.step.stepOrder) {
+            //查询所有已经提交的
+            const processNode = this.editData.processNodeVos.filter(
+              (item) =>
+                item.processStep == this.step.stepOrder && item.nodeState == 2
+            );
+            processNode.forEach((pn) => {
+              const next = this.editData.processNodeVos.find(
+                (n) => pn.id == n.upStepNode
+              );
+              const curDept = this.allDeptAndUser.find(
+                (a) => a.id == pn.handleDept
+              );
+              const nextDept = this.allDeptAndUser.find(
+                (a) => a.id == next.handleDept
+              );
+              //当前步
+              const curStep = this.steps.find(
+                (n) => n.stepOrder == pn.processStep
+              );
+              //下一步
+              let nextStep = null;
+              if (next) {
+                nextStep = this.steps.find(
+                  (n) => n.stepOrder == next.processStep
+                );
+              }
 
-    /**
-     * 查询所有用户所有部门
-     */
-    getAllUserInfo().then((res) => {
-      const data = res.result;
-      for (const i in data) {
-        data[i].value = data[i].id;
-        data[i].label = data[i].name;
-        if (data[i].users) {
-          data[i].children = data[i].users;
-          for (const j in data[i].children) {
-            data[i].children[j].value = data[i].children[j].id;
-            data[i].children[j].label = data[i].children[j].realName;
-          }
-        }
-      }
-      this.option = data;
-      if (!(JSON.stringify(this.editData) === "{}")) {
-        if (this.editData.hasOwnProperty("nextNode")) {
-          const nextNode = this.editData.nextNode;
-          if (nextNode) {
-            this.form.processStep = nextNode.processStep; //下一环节
-            this.nextStepChange(this.form.processStep);
-            this.form.dept = nextNode.handleDept; //下一环节处理部门
-            this.nextStepDeptChange(this.form.dept);
-            this.form.deptStaff = nextNode.handleStaff; //下一环节处理人
+              this.examinaHistory.push({
+                processStep: pn.processStep, //流程步骤
+                processStep: curStep.title,
+                stepNode: pn.stepNode, //流程结点
+                examineState: 1, //审核状态,1通过
+                remarks: pn.remark, //审核意见
+                deptId: pn.handleDept, //审核部门
+                dept: curDept.name,
+                examineUserId: pn.handleStaff, //审核人ID
+                examineUser: pn.handleStaffName, //审核人
+                nextProcessStep: next.processStep, //下一步
+                nextStepName: nextStep ? nextStep.title : "",
+                nextStepNode: next.stepNode, //下一步
+                nextStepExamineDeptId: next.handleDept, //下一步审核部门ID
+                nextStepExamineDept: nextDept ? nextDept.name : "", //下一步审核部门
+                nextStepExamineUserId: next.handleStaff, //下一步审核人ID
+                nextStepExamineUser: next.handleStaffName, //下一步审核人
+              });
+            });
+            this.isHisExamine = true;
           }
-        }
-
-        //找到当前步骤的审核信息
-        if (this.editData.hasOwnProperty("processNodeVos")) {
-          const step = this.editData.processNodeVos.find((p) => this.step.stepOrder === p.processStep);
-          if (step) {
-            const curStep = this.editData.processNodeVos.find(p => p.upStepNode === step.id)
-            if (curStep) {
-              this.form.processStep = curStep.processStep; //下一环节
-              this.nextStepChange(this.form.processStep);
-              this.form.dept = curStep.handleDept; //下一环节处理部门
-              this.nextStepDeptChange(this.form.dept);
-              this.form.deptStaff = curStep.handleStaff; //下一环节处理人
-              this.form.remarks = curStep.handleResults;
+          //审核中的
+          else if (
+            this.editData.currentNode.processStep == this.step.stepOrder
+          ) {
+            this.isHisExamine = false;
+            //查询所有已经提交的
+            const processNoded = this.editData.processNodeVos.filter(
+              (item) =>
+                item.processStep == this.step.stepOrder && item.nodeState == 2
+            );
+            //查询所有待处理的
+            const unprocessNode = this.editData.processNodeVos.filter(
+              (item) =>
+                item.processStep == this.step.stepOrder && item.nodeState == 0
+            );
+            //查询所有处理中
+            const processNodeing = this.editData.processNodeVos.filter(
+              (item) =>
+                item.processStep == this.step.stepOrder && item.nodeState == 1
+            );
+            processNoded.forEach((pn) => {
+              //下一步
+              const next = this.editData.processNodeVos.find(
+                (n) => pn.id == n.upStepNode
+              );
+              //当前审核部门
+              const curDept = this.allDeptAndUser.find(
+                (a) => a.id == pn.handleDept
+              );
+              //下一步审核部门
+              const nextDept = this.allDeptAndUser.find(
+                (a) => a.id == next.handleDept
+              );
+              //当前步
+              const curStep = this.steps.find(
+                (n) => n.stepOrder == pn.processStep
+              );
+              //下一步
+              let nextStep = null;
+              if (next) {
+                nextStep = this.steps.find(
+                  (n) => n.stepOrder == next.processStep
+                );
+              }
+              this.examinaHistory.push({
+                processStep: pn.processStep, //流程步骤
+                processStep: curStep.title,
+                stepNode: pn.stepNode, //流程结点
+                examineState: 1, //审核状态,1通过
+                remarks: pn.remark, //审核意见
+                deptId: pn.handleDept, //审核部门
+                dept: curDept ? curDept.name : "",
+                examineUserId: pn.handleStaff, //审核人ID
+                examineUser: pn.handleStaffName, //审核人
+                nextProcessStep: next.processStep, //下一步
+                nextStepName: nextStep ? nextStep.title : "",
+                nextStepNode: next.stepNode, //下一步
+                nextStepExamineDeptId: next.handleDept, //下一步审核部门ID
+                nextStepExamineDept: nextDept ? nextDept.handleDept : "", //下一步审核部门
+                nextStepExamineUserId: next.handleStaff, //下一步审核人ID
+                nextStepExamineUser: next.handleStaffName, //下一步审核人
+              });
+            });
+            if (processNodeing.length > 0) {
+              //this.setNextSelect()
+              if (unprocessNode.length > 0) {
+                //已保存审核信息
+                if (this.nextSteps.length == 1) {
+                  this.form.processStep = this.nextSteps[0].id; //下一环节
+                  this.nextStepChange(this.form.processStep);
+                  this.form.dept = unprocessNode[0].handleDept; //下一环节处理部门
+                  this.nextStepDeptChange(this.form.dept);
+                  this.form.deptStaff = unprocessNode[0].handleStaff;
+                  this.form.remarks = unprocessNode[0].handleResults;
+                }
+              } else {
+                if (this.nextSteps.length == 1) {
+                  this.form.processStep = this.nextSteps[0].id; //下一环节
+                  this.nextStepChange(this.form.processStep);
+                  const nextStep = this.editData.processNodeVos.find(
+                    (pn) => pn.upStepNode == processNodeing[0].id
+                  );
+                  this.form.dept = nextStep.handleDept; //下一环节处理部门
+                  this.nextStepDeptChange(this.form.dept);
+                  this.form.deptStaff = nextStep.handleStaff;
+                  this.form.remarks = nextStep.handleResults;
+                }
+              }
             }
           }
         }
+      } else {
+        //查询所有已经提交的
+        const processNode = this.editData.processNodeVos.filter(
+          (item) =>
+            item.processStep == this.step.stepOrder && item.nodeState == 2
+        );
+        this.examinaHistory = [];
+        processNode.forEach((pn) => {
+          const next = this.editData.processNodeVos.find(
+            (n) => pn.id == n.upStepNode
+          );
+          const curDept = this.allDeptAndUser.find(
+            (a) => a.id == pn.handleDept
+          );
+          let nextDept = null;
+          if (next) {
+            nextDept = this.allDeptAndUser.find((a) => a.id == next.handleDept);
+          }
+          //当前步
+          const curStep = this.steps.find((n) => n.stepOrder == pn.processStep);
+          //下一步
+          let nextStep = null;
+          if (next) {
+            nextStep = this.steps.find((n) => n.stepOrder == next.processStep);
+          }
+          this.examinaHistory.push({
+            processStep: pn.processStep, //流程步骤
+            processStep: curStep.title,
+            stepNode: pn.stepNode, //流程结点
+            examineState: 1, //审核状态,1通过
+            remarks: pn.remark, //审核意见
+            deptId: pn.handleDept, //审核部门
+            dept: curDept.name,
+            examineUserId: pn.handleStaff, //审核人ID
+            examineUser: pn.handleStaffName, //审核人
+            nextProcessStep: next ? next.processStep : "", //下一步
+            nextStepName: nextStep ? nextStep.title : "",
+            nextStepNode: next ? next.stepNode : "", //下一步
+            nextStepExamineDeptId: next ? next.handleDept : "", //下一步审核部门ID
+            nextStepExamineDept: nextDept ? nextDept.name : "", //下一步审核部门
+            nextStepExamineUserId: next ? next.handleStaff : "", //下一步审核人ID
+            nextStepExamineUser: next ? next.handleStaffName : "", //下一步审核人
+          });
+        });
+        this.isHisExamine = true;
       }
-    })
+    } else {
+      this.isHisExamine = false;
+      this.resetExamina(1);
+    }
   },
 
   mounted() {
-    //获取处理状态(处理方式)重置处理方式选择控件
-    let handleState =
-      this.cfgParam.handleState != ""
-        ? this.cfgParam.handleState.split(",")
-        : [];
-    handleState = handleState.map((str) => parseInt(str));
-    this.headleState = this.headleState.filter(
-      (item) => handleState.indexOf(item.key) > -1
-    );
+    //this.handleTypeChange(1);
   },
 
   methods: {
+    /**
+     * 初始化数据
+     */
+    init() {
+      //判断配置中是不是最后一步审核
+      if (JSON.stringify(this.step.nextStep) === "{}") {
+        this.form.curProcessStep = this.editData.currentNode.processStep;
+        this.form.curStepNode = this.editData.currentNode.stepNode;
+        this.isLastStop = true;
+      } else {
+        this.setNextSelect();
+      }
+      //获取处理状态(处理方式)重置处理方式选择控件
+      let handleState =
+        this.step.handleState != "" ? this.step.handleState.split(",") : [];
+      handleState = handleState.map((str) => parseInt(str));
+      this.headleState = this.headleState.filter(
+        (item) => handleState.indexOf(item.key) > -1
+      );
+    },
+
     /**
      * 处理结果改变
+     *  headleState: [{ key: 1, name: '通过' }, { key: 2, name: '驳回' }, { key: 3, name: '转派' }, { key: 4, name: '终止' }],
      */
     handleTypeChange(value) {
-      this.headleState = value;
+      this.resetExamina(value);
     },
+
+    /***
+     * 重置审核信息
+     * @handleState Number 处理状态
+     */
+    resetExamina(handleState) {
+      //当工单流程刚新建时
+      if (JSON.stringify(this.editData) === "{}") {
+        this.nextSteps.push({
+          id: this.step.nextStep.stepOrder,
+          name: this.step.nextStep.stepName,
+          levelstaffs: this.step.nextStep.levelstaffs,
+        });
+      } else {
+        //审核过程中
+        const currentNode = this.editData.currentNode;
+        this.form.processStep = "";
+        this.form.dept = "";
+        this.form.deptStaff = "";
+        //获取上一步的审核信息
+        switch (handleState) {
+          case 1: //通过
+            //获取下一步
+            this.form.processStep = "";
+            this.form.dept = "";
+            this.form.deptStaff = "";
+            this.init();
+            break;
+          case 2: //驳回
+            //判断驳回方式是 按处理流程驳回(1)还是按主流程驳回(2)
+            if (this.process.info.reiectMode == 1) {
+              //按处理流程驳回 1
+              const upStepNode = this.editData.processNodeVos.find(
+                (item) => item.id == currentNode.upStepNode
+              );
+              if (upStepNode) {
+                const step = this.steps.find(
+                  (p) => p.stepOrder == upStepNode.processStep
+                );
+                const levelstaffs =
+                  step.nodes[upStepNode.stepNode - 1].levelstaffs;
+                this.nextSteps = [];
+                this.nextSteps.push({
+                  id: upStepNode.processStep + "," + upStepNode.stepNode,
+                  name: step.title,
+                  levelstaffs: levelstaffs,
+                });
+                this.form.processStep =
+                  upStepNode.processStep + "," + upStepNode.stepNode; //下一环节
+                this.nextStepChange(this.form.processStep);
+                this.form.dept = upStepNode.handleDept; //下一环节处理部门
+                this.nextStepDeptChange(this.form.dept);
+                this.form.deptStaff = upStepNode.handleStaff; //下一环节处理人
+              }
+            } else {
+              //主流程驳回 2
+              const upStepNode = this.editData.processNodeVos.find(
+                (item) => item.id == currentNode.upStepNode
+              );
+              if (upStepNode) {
+                const step = this.steps.find(
+                  (p) => p.stepOrder == upStepNode.processStep
+                );
+                const levelstaffs = step.nodes[0].levelstaffs;
+                this.nextSteps = [];
+                this.nextSteps.push({
+                  id: upStepNode.processStep + "," + 1,
+                  name: step.title,
+                  levelstaffs: levelstaffs,
+                });
+                this.form.processStep = upStepNode.processStep + "," + 1; //下一环节
+                this.nextStepChange(this.form.processStep);
+                this.form.dept = upStepNode.handleDept; //下一环节处理部门
+                this.nextStepDeptChange(this.form.dept);
+                this.form.deptStaff = upStepNode.handleStaff; //下一环节处理人
+              }
+            }
+            break;
+          case 3: //转派
+            //当前步骤
+            this.curStepStaffs = []; //转派时候的被驳回人
+            this.curStepDepts = []; //转派时候的驳回部门
+            const proStep = this.steps.find(
+              (p) => p.stepOrder == currentNode.processStep
+            );
+            const proNode = proStep.nodes[currentNode.stepNode - 1];
+            this.form.processStep =
+              this.form.curProcessStep + "," + this.form.curStepNode;
+            //只有一个处理人
+            if (proNode.selectUser.length <= 1) {
+              this.$message.warning(
+                "该审核节点只有一个审核人,不能进行转派!如果需要转派请联系管理员处理!"
+              );
+              return;
+            } else {
+              const users = proNode.selectUser.filter(
+                (u) => u.userId != currentNode.handleStaff
+              );
+              users.forEach((u) => {
+                const dept = this.allDeptAndUser.find((p) => p.id == u.deptId);
+                this.curStepDepts;
+                if (this.curStepDepts.length <= 0) {
+                  this.curStepDepts.push({
+                    id: dept.id,
+                    name: dept.name,
+                    users: [u],
+                  });
+                } else {
+                  this.curStepDepts.forEach((csd) => {
+                    if (csd.id == dept.id) csd.users.push(u);
+                  });
+                }
+              });
+            }
+            break;
+          case 4: //终止
+            break;
+        }
+      }
+    },
+
+    /**
+     * 设置选择
+     */
+    setNextSelect() {
+      if (this.editData.hasOwnProperty("currentNode")) {
+        const currentNode = this.editData.currentNode;
+        this.form.curProcessStep = this.editData.currentNode.processStep;
+        this.form.curStepNode = this.editData.currentNode.stepNode;
+        this.nextSteps = [];
+        //当前步骤数强制处理层级大于当前当前步骤结点,初始化选择步骤数
+        if (this.step.coerceLevel > this.form.curStepNode) {
+          this.nextSteps.push({
+            id: this.step.stepOrder + "," + (this.form.curStepNode + 1),
+            name: this.step.title + "(" + (this.form.curStepNode + 1) + ")",
+            levelstaffs: this.step.nodes[this.form.curStepNode].levelstaffs,
+          });
+        } else if (this.step.coerceLevel == this.form.curStepNode) {
+          //如果当前结点等于强制等级数
+          //如果强制的层数和总结点数一样,则进入下一步骤选择只能选择配置的下一步
+          if (this.step.nodes.length == this.step.coerceLevel) {
+            //初始化下一步骤
+            this.nextSteps.push({
+              id: this.step.nextStep.stepOrder + "",
+              name: this.step.nextStep.stepName,
+              levelstaffs: this.step.nextStep.levelstaffs,
+            });
+          } else if (this.step.nodes.length > this.step.coerceLevel) {
+            //如果强制的层数小于总结点数一样,则进入下一步骤可选择两步
+            for (
+              let i = this.step.coerceLevel;
+              i < this.step.nodes.length;
+              i++
+            ) {
+              this.nextSteps.push({
+                id: this.step.stepOrder + "," + (i + 1),
+                name: this.step.title + "(" + (i + 1) + ")",
+                levelstaffs: this.step.nodes[i].levelstaffs,
+              });
+            }
+            //同时把下一步信息审核带入
+            this.nextSteps.push({
+              id: this.step.nextStep.stepOrder + "",
+              name: this.step.nextStep.stepName,
+              levelstaffs: this.step.nextStep.levelstaffs,
+            });
+          }
+        } else {
+          //如果当前结点大于强制等级数,说明上一个结点选择了不是强制审核的
+          //如果当前和总结点数一样,则进入下一步骤选择只能选择配置的下一步
+          if (this.step.nodes.length == this.form.curStepNode) {
+            //初始化下一步骤
+            this.nextSteps.push({
+              id: this.step.nextStep.stepOrder + "",
+              name: this.step.nextStep.stepName,
+              levelstaffs: this.step.nextStep.levelstaffs,
+            });
+          } else if (this.step.nodes.length > this.form.curStepNode) {
+            //如果当前结点数小于总结点数一样,则进入下一步骤可选择两步
+            for (
+              let i = this.form.curStepNode - 1;
+              i < this.step.nodes.length;
+              i++
+            ) {
+              this.nextSteps.push({
+                id: this.form.curStepNode + "," + (i + 1),
+                name: this.step.title + "(" + (i + 1) + ")",
+                levelstaffs: this.step.nodes[i].levelstaffs,
+              });
+            }
+            //同时把下一步信息审核带入
+            this.nextSteps.push({
+              id: this.step.nextStep.stepOrder + "",
+              name: this.step.nextStep.stepName,
+              levelstaffs: this.step.nextStep.levelstaffs,
+            });
+          }
+        }
+      }
+    },
+
+    /**
+     * 转派当前处理部门改变
+     */
+    curStepDeptChange(value) {
+      let stepStaffs = this.curStepDepts.find((item) => item.id == value);
+      this.curStepStaffs = stepStaffs ? stepStaffs.users : [];
+    },
+
     /**
      * 下一步骤改变,初始化处理部门
      */
@@ -319,7 +800,7 @@ export default {
       if (obj && obj.levelstaffs.length > 0) {
         //取第一个
         obj.levelstaffs[0].staffs.forEach((item) => {
-          const dept = this.option.find((p) => p.id == item.deptId);
+          const dept = this.allDeptAndUser.find((p) => p.id == item.deptId);
           const param = this.nextStepDepts.find((tp) => {
             const flag = tp.id == item.deptId;
             if (flag)

+ 1 - 0
src/views/mbsys/flowManage/flow/merge/index.vue

@@ -1041,6 +1041,7 @@ export default {
       }
       getProcessNode(this.arrSelectbusinessType,businessType,arr);
       this.forms.processCodes = arr;
+      this.processNameChange(this.forms.processCodes)
     },
 
     //字符串转数组

+ 5 - 13
src/views/mbsys/materialmanage/processMng/purchaseArchives/index.vue

@@ -1,5 +1,5 @@
 <template>
-  <!-- 采购登记 -->
+  <!-- 采购档案 -->
   <div class="content-container">
     <div class="top">
       <el-form
@@ -59,16 +59,6 @@
           >查询</el-button
         >
       </el-form>
-      <el-button
-        type="primary"
-        icon="el-icon-plus"
-        size="small"
-        @click="orderRegister"
-        >添加</el-button
-      >
-      <el-button type="primary" icon="el-icon-upload2" size="small"
-        >导出</el-button
-      >
     </div>
     <div class="table-div">
       <el-table
@@ -328,7 +318,7 @@ export default {
     this.getProcess();
   },
   mounted() {
-    this.queryProcess();
+    
   },
   methods: {
     /**
@@ -378,8 +368,9 @@ export default {
      */
     queryProcess() {
       //带入当前登录人查询
+      //processNode=100 终结归档
       let params = Object.assign(
-        { registerStaff: this.curUser.userId },
+        { ywType:this.businessType, configId:this.processId, processNode:100 },
         this.pagination
       );
       if (this.form.content != "")
@@ -414,6 +405,7 @@ export default {
               ? this.curProcess.processType
               : null;
           }
+          this.queryProcess()
         })
         .catch((ex) => {
           this.$message.error("获取流程列表失败!");

+ 149 - 187
src/views/mbsys/materialmanage/processMng/purchaseExamine/index.vue

@@ -59,16 +59,6 @@
           >查询</el-button
         >
       </el-form>
-      <el-button
-        type="primary"
-        icon="el-icon-plus"
-        size="small"
-        @click="orderRegister"
-        >添加</el-button
-      >
-      <el-button type="primary" icon="el-icon-upload2" size="small"
-        >导出</el-button
-      >
     </div>
     <div class="table-div">
       <el-table
@@ -103,6 +93,42 @@
           label="采购单名称"
           align="center"
         ></el-table-column>
+        <el-table-column prop="processState" label="工单状态" align="center">
+          <template slot-scope="{ row }">
+            <span>{{ getOrderStateNameById(row.processState) }}</span>
+          </template>
+        </el-table-column>
+        <el-table-column prop="processNodeName" label="当前步骤" align="center">
+          <template slot-scope="{ row }">
+            <span>{{row.processNodeName + "(" + row.processNode + '/' + row.sumNode + ')'}}</span>
+          </template>
+        </el-table-column>
+        <el-table-column prop="handleDeptName" label="当前处理部门" align="center">
+          <template slot-scope="{ row }">
+            <span>{{ (row.handleDeptName == null || row.handleDeptName == "") ? '/' : row.handleDeptName }}</span>
+          </template>
+        </el-table-column>
+        <el-table-column prop="handleStaffName" label="当前处理人" align="center">
+          <template slot-scope="{ row }">
+            <span>{{ (row.handleStaffName == null || row.handleStaffName == "") ? '/' : row.handleStaffName }}</span>
+          </template>
+        </el-table-column>
+        <el-table-column prop="urgeNumber" label="催办消息" align="center">
+          <template slot-scope="{ row }">
+            <el-popover
+              v-if="row.urgeNumber > 0"
+              placement="bottom"
+              title=""
+              width="280"
+              trigger="hover"
+              :content="row.urgeInfo"
+            >
+              <p v-for="(urge,ind) in row.urgeInfo" :key="ind">{{ urge }}</p>
+              <span slot="reference">{{ row.urgeNumber }}</span>
+            </el-popover>
+            <span v-else>{{ row.urgeNumber }}</span>
+          </template>
+        </el-table-column>
         <el-table-column prop="registerDept" label="申购部门" align="center">
           <template slot-scope="{ row }">
             <span>{{ getDeptName(row.registerDept) }}</span>
@@ -128,11 +154,6 @@
           label="采购价格合计(元)"
           align="center"
         ></el-table-column>
-        <el-table-column prop="processState" label="工单状态" align="center">
-          <template slot-scope="{ row }">
-            <span>{{ getOrderStateNameById(row.processState) }}</span>
-          </template>
-        </el-table-column>
         <el-table-column
           prop="remark"
           label="备注"
@@ -141,8 +162,7 @@
         <el-table-column prop="prop" label="操作" align="center">
           <template slot-scope="scope">
             <el-button @click="queryOrderProcessById(scope.row,false)" icon="el-icon-tickets" title="查看" type="text" size="small" style="font-size:16px;"></el-button>
-            <el-button @click="queryOrderProcessById(scope.row,true)" icon="el-icon-edit" title="修改" type="text" size="small" style="font-size:16px;"></el-button>
-            <el-button @click="delOrderProcessById(scope.row)" icon="el-icon-delete" title="删除" type="text" size="small" style="font-size:16px;color:red;"></el-button>
+            <el-button @click="queryOrderProcessById(scope.row,true)" icon="el-icon-edit-outline" title="处理" type="text" size="small" style="font-size:16px;"></el-button>
           </template>
         </el-table-column>
       </el-table>
@@ -207,8 +227,8 @@ import {
   getProcessPageList,
   queryProcessPage,
   qOrderProcessById,
-  addOrderProcess,
-  delOrderProcess,
+  examineProcess,
+  querySupervisePage
 } from "@/api/process/process";
 import { getSupplier } from "@/api/mbsys/materialmanage";
 import { config } from "../../../components/cfgOrderProcess";
@@ -279,6 +299,10 @@ export default {
 
   async created() {
     this.curUser = this.$store.state.user;
+    /**
+     * 查询所有用户所有部门
+     */
+    this.allDept = await this.getDeptAndUser();
     if (this.config && this.config.hasOwnProperty("metrialCategories"))
       this.metrialCategories = this.config.metrialCategories;
     //获取供应商
@@ -307,32 +331,31 @@ export default {
       .catch((ex) => {
         this.$message.error("获取数据出错!");
       });
-    /**
-     * 查询所有用户所有部门和所有人
-     */
-    getAllUserInfo().then((res) => {
-      if (res.code == 1) {
-        const data = res.result
-        for (const i in data) {
-          data[i].value = data[i].id;
-          data[i].label = data[i].name;
-          if (data[i].users) {
-            data[i].children = data[i].users;
-            for (const j in data[i].children) {
-              data[i].children[j].value = data[i].children[j].id;
-              data[i].children[j].label = data[i].children[j].realName;
-            }
-          }
-        }
-        this.allDept = data;
-      }
-    });
     this.getProcess();
   },
   mounted() {
-    this.queryProcess();
+    //this.queryProcess();
   },
   methods: {
+    async getDeptAndUser() {
+      return new Promise((resolve) => {
+        getAllUserInfo().then((res) => {
+          const data = res.result;
+          for (const i in data) {
+            data[i].value = data[i].id;
+            data[i].label = data[i].name;
+            if (data[i].users) {
+              data[i].children = data[i].users;
+              for (const j in data[i].children) {
+                data[i].children[j].value = data[i].children[j].id;
+                data[i].children[j].label = data[i].children[j].realName;
+              }
+            }
+          }
+          resolve(data);
+        });
+      });
+    },
     /**
      * 根据部门ID获取部门名称
     */
@@ -380,8 +403,12 @@ export default {
      */
     queryProcess() {
       //带入当前登录人查询
+      //ywType 业务类型,基础类型
+      //configId 流程类型
+      //handleStaff 当前处理人
+      //processState 工单状态:1草稿、2处理、3终止、4处理完成
       let params = Object.assign(
-        { registerStaff: this.curUser.userId },
+        { ywType:this.businessType, configId:this.processId,handleStaff: this.curUser.userId, processState:2 },
         this.pagination
       );
       if (this.form.content != "")
@@ -390,7 +417,8 @@ export default {
         Object.assign(params, { supplierId: this.form.supplierId });
       queryProcessPage(params).then((res) => {
         if (res.code == 1) {
-          this.tableData = res.result.records;
+          //this.tableData = res.result.records;
+          this.getUrgeInfo(res.result.records)
           this.pagination.total = res.result.total;
         }
       });
@@ -416,6 +444,7 @@ export default {
               ? this.curProcess.processType
               : null;
           }
+          this.queryProcess();
         })
         .catch((ex) => {
           this.$message.error("获取流程列表失败!");
@@ -430,94 +459,29 @@ export default {
       this.queryProcess();
     },
 
-    /**
-     * 物资类型改变
-     */
-    changeCategory(value) {
-      if (value != null) {
-        this.selectMaterialTypes = [];
-        this.selectMaterialTypes = this.materialTypes.filter(
-          (p) => p.categoryType === value
-        );
-      } else {
-        this.selectMaterialTypes = this.materialTypes.filter((p) => true);
-      }
-    },
-
-    orderRegister() {
-      this.title = "采购申请-新增"
-      this.optionType = 1 //操作类型 0:查看,1:新增,2:修改
-      this.editData = {}
-       this.curEditRow = null
-      this.dialogFormVisible = true
-    },
 
     /**
      * 通过id查询工单流程信息
      * @row 查询数据
-     * @type 操作类型 false:查看,true:修改
+     * @type 操作类型 false:查看,true:审核
      */
     queryOrderProcessById(row, type) {
       this.curEditRow = type ? row : null
       qOrderProcessById(row.id).then((res) => {
         if (res.code == 1) {
-          this.title = type ? "采购申请-修改" : "采购申请-详情";
-          this.optionType = type ? 2 : 0;
+          this.title = type ? "采购单-审核" : "采购单-详情";
+          this.optionType = type ? 2 : 0; ////操作类型 0:查看,1:新增,2:修改
           this.editData = res.result;
           this.dialogFormVisible = true;
         }
       });
     },
 
-    /**
-     * 删除工单流程
-     */
-    delOrderProcessById(row) {
-      this.$confirm(
-        `此操作将永久删除采购单号为【${row.processNumber}】采购名称为【${row.name}】的采购单, 是否继续?`,
-        "提示",
-        {
-          confirmButtonText: "确定",
-          cancelButtonText: "取消",
-          type: "warning",
-        }
-      )
-        .then(() => {
-          this.deleteOrder(row.id);
-        })
-        .catch(() => {
-          this.$message({
-            type: "info",
-            message: "已取消删除",
-          });
-        });
-    },
-
-    /***
-     * 删除工单流程
-     */
-    deleteOrder(id) {
-      delOrderProcess(id).then((res) => {
-        if (res.code == 1) {
-          this.queryProcess();
-          this.$message({
-            type: "success",
-            message: "删除成功!",
-          });
-        } else {
-          this.$message({
-            type: "error",
-            message: "删除失败",
-          });
-        }
-      });
-    },
-
     /**
      * 新增工单流程信息
      */
-    addOrder(param) {
-      addOrderProcess(param).then((res) => {
+    examineProcessOrder(param) {
+      examineProcess(param).then((res) => {
         if (res.code == 1) {
           this.queryProcess()
           this.$message.success("新增采购单成功!")
@@ -531,95 +495,39 @@ export default {
      */
     preserveHandler(state) {
       let params = this.$refs.merge.submitForm();
+      console.log('提交数据',params)
       //处理提交参数到接口参数映射
       let data = this.formParamMapping(params, state);
-      this.addOrder(data);
+      this.examineProcessOrder(data);
     },
     /**
      * 表单参数映射到提交参数
      */
     formParamMapping(data, state) {
       let params = {
-        operateState:0 //	表单类型:0、其它; 1、采购入库(关联采购工单);2、余料退库(关联出库工单);3、工程出库(关联工程工单);4其它出库;5、维修出库(关联维修工单)
+        handleResults: 0, //处理结果0:不处理;1:同意;2:不同意
+        operateState:0, //表单类型:0、其它; 1、采购入库(关联采购工单);2、余料退库(关联出库工单);3、工程出库(关联工程工单);4其它出库;5、维修出库(关联维修工单)
+        processStep:data.curProcessStep, //当前流程步骤
+        stepNode:data.curStepNode, //当前步骤结点
+        headleState:data.headleState,  //处理状态:1提交;2:驳回;3:转派;4:终止;
+        remark:data.remarks, //当前处理意见
+        saveState:state  //0保存,1提交
       };
+      const nextProcess = (data.processStep + '').split(',')
+      const nextStep = {  //下一步
+        dept:data.dept, //部门
+        deptStaff:data.deptStaff, //人员
+        processStep: (nextProcess && nextProcess.length > 0) ? parseInt(nextProcess[0]) : data.curProcessStep , //流程步骤
+        stepNode:(nextProcess && nextProcess.length > 1) ?  parseInt(nextProcess[1]) : data.stepNode //步骤结点
+      }
+     
       let formData = new FormData();
-      if(this.curEditRow != null) Object.assign(params, { id: this.curEditRow.id }) //流程ID
+      if(this.curEditRow != null) Object.assign(params, { processId: this.curEditRow.id }) //流程ID
       //表单字段
       if (data.hasOwnProperty("configId")) {
         params = Object.assign(params, { configId: data.configId }); //流程配置ID
       }
-      if (data.hasOwnProperty("form")) {
-        Object.assign(params, {
-          name: data.form.name, //	名称
-          registerTime: data.form.registerTime.length > 11 ? data.form.registerTime : data.form.registerTime + " 00:00:00", //登记时间
-          supplierId: data.form.supplier, //供应商ID
-          supplier: data.form.factoryName, //供应商名称
-          telephone: data.form.contactNumber, //联系电话
-          useDept: data.form.useDept, //申购部门
-          totalPrice: data.form.allPrice, //总价
-          remark: data.form.remark, //备注
-        });
-      }
-      Object.assign(params, { ywType: this.businessType }); //业务类型
-      let processNode = {
-        //第一步
-        handleResults: 0, //处理结果0:不处理;1:同意;2:不同意;
-        saveState: state, //0保存,1提交
-        annex:data.hasOwnProperty('existsFilesId') ?  data.existsFilesId : '', //附件id
-        remark:data.hasOwnProperty("examine") ? data.examine.remarks : ''
-      };
-      //审核信息
-      if (data.hasOwnProperty("examine")) {
-        //下一步审核
-        let nextStep = {
-          dept: data.examine.hasOwnProperty("dept") ? data.examine.dept : "", //部门
-          deptStaff: data.examine.hasOwnProperty("deptStaff") ? data.examine.deptStaff : "", //人员
-          processStep: data.examine.hasOwnProperty("processStep") ? data.examine.processStep : 1, //流程步骤
-          stepNode:data.examine.hasOwnProperty("stepNode") ? data.examine.stepNode: 1, //步骤节点
-        };
-        Object.assign(
-          processNode,
-          { headleState: data.examine.headleState, //处理状态:1提交;2:驳回;3:转派;4:终止;
-            nextStep:nextStep, //下一步信息,下一步,驳回,转派
-            processStep:1, //流程步骤(当前)
-            stepNode:1   //步骤节点(当前)
-          }
-        );
-      }
-      //流程步骤 processStep
-      //	步骤节点 stepNode
-      Object.assign(params, { stepNode: 1 })
-      //物资信息 metrials
-      if (data.hasOwnProperty("metrials")) {
-        let stuffDtos = [];
-        data.metrials.forEach((metrial) => {
-          stuffDtos.push({
-            amountMoney: metrial.allPrice, //	金额
-            matterId: metrial.id, //物料ID
-            matterState: 1, //metrial.isAssets	物料状态1:新;2:旧  默认为1
-            quantity: metrial.purchaseNumber, //数量
-            unitPrice: parseFloat(metrial.purchasePrice), //单价
-          });
-        });
-        if (stuffDtos.length > 0)
-          Object.assign(processNode, { stuffDtos: stuffDtos }); //采购物资信息
-      }
-      //其他费用
-      if (data.hasOwnProperty("otherCost")) {
-        let otherCost = [];
-        data.otherCost.forEach((op) => {
-          otherCost.push({
-            amountMoney: op.cost, //金额
-            costName: op.costType, //费用名称
-            explain: op.remark, //费用说明
-            unitPrice: op.cost,
-          });
-        });
-        if (otherCost.length > 0)
-          Object.assign(processNode, { detailedDtos: otherCost }); //其他费用信息
-      }
-
-      Object.assign(params, { processNode: processNode }); //业务类型
+      Object.assign(params, { nextStep: nextStep });
       const json = JSON.stringify(params);
       // 将 json 字符串转化为 Blob 对象
       const blob = new Blob([json], {
@@ -634,6 +542,60 @@ export default {
         });
       }
       return formData;
+    },
+
+    /**
+     * 获取催办消息
+     */
+    async getUrgeInfo(data) {
+      // this.tableData.forEach((row) => {
+        
+      // });
+      let tableList = data;
+      for(let i = 0 ; i < tableList.length;i++){
+        tableList[i]['urgeInfo'] = ''
+        if (tableList[i].urgeNumber > 0) {
+          let data = {
+            processId: tableList[i].id, //流程ID
+            nodeBranch: tableList[i].nodeBranch, //流程节点分支
+            processNode: tableList[i].processNode, //流程节点
+            superviseDept: parseInt(this.curUser.departmentId), //督办部门
+            superviseStaff: this.curUser.userId, //督办人
+          };
+          const res = await this.querySupervisePage(data)
+          
+          let result = []
+          if (res) {
+            res.result.records.forEach((item) => {
+              const dept = this.getDeptName(item.handleDept);
+              result.push(item.createTime +" " + dept +" " + item.createUserName + " " +item.remark)   
+            });
+          }
+
+          tableList[i]['urgeInfo'] = result
+        }
+      }
+      this.tableData = tableList
+    },
+
+    async querySupervisePage(data) {
+      return new Promise((resolve) => {
+        querySupervisePage(data).then((res) => {
+          if (res.code == 1) {
+            resolve(res);
+          } else {
+            resolve(null);
+          }
+        });
+      });
+    },
+    
+    /**
+     * 获取催办消息
+    */
+    getContent(row){
+      console.log('获取催办消息',row)
+      return '获取催办消息'
     }
   },
 };

+ 29 - 18
src/views/mbsys/materialmanage/processMng/purchaseOrder/index.vue

@@ -1,5 +1,5 @@
 <template>
-  <!-- 采购登记 -->
+  <!-- 采购查看 -->
   <div class="content-container">
     <div class="top">
       <el-form
@@ -59,16 +59,6 @@
           >查询</el-button
         >
       </el-form>
-      <el-button
-        type="primary"
-        icon="el-icon-plus"
-        size="small"
-        @click="orderRegister"
-        >添加</el-button
-      >
-      <el-button type="primary" icon="el-icon-upload2" size="small"
-        >导出</el-button
-      >
     </div>
     <div class="table-div">
       <el-table
@@ -103,6 +93,31 @@
           label="采购单名称"
           align="center"
         ></el-table-column>
+        <el-table-column prop="processState" label="工单状态" align="center">
+          <template slot-scope="{ row }">
+            <span>{{ getOrderStateNameById(row.processState) }}</span>
+          </template>
+        </el-table-column>
+        <el-table-column prop="processNodeName" label="当前步骤" align="center">
+          <template slot-scope="{ row }">
+            <span>{{row.processNodeName + "(" + row.processNode + '/' + row.sumNode + ')'}}</span>
+          </template>
+        </el-table-column>
+        <el-table-column prop="handleDeptName" label="当前处理部门" align="center">
+          <template slot-scope="{ row }">
+            <span>{{ (row.handleDeptName == null || row.handleDeptName == "") ? '/' : row.handleDeptName }}</span>
+          </template>
+        </el-table-column>
+        <el-table-column prop="handleStaffName" label="当前处理人" align="center">
+          <template slot-scope="{ row }">
+            <span>{{ (row.handleStaffName == null || row.handleStaffName == "") ? '/' : row.handleStaffName }}</span>
+          </template>
+        </el-table-column>
+        <el-table-column prop="urgeNumber" label="催办消息" align="center">
+          <template slot-scope="{ row }">
+            <span>{{ row.urgeNumber }}</span>
+          </template>
+        </el-table-column>
         <el-table-column prop="registerDept" label="申购部门" align="center">
           <template slot-scope="{ row }">
             <span>{{ getDeptName(row.registerDept) }}</span>
@@ -128,11 +143,6 @@
           label="采购价格合计(元)"
           align="center"
         ></el-table-column>
-        <el-table-column prop="processState" label="工单状态" align="center">
-          <template slot-scope="{ row }">
-            <span>{{ getOrderStateNameById(row.processState) }}</span>
-          </template>
-        </el-table-column>
         <el-table-column
           prop="remark"
           label="备注"
@@ -328,7 +338,7 @@ export default {
     this.getProcess();
   },
   mounted() {
-    this.queryProcess();
+    
   },
   methods: {
     /**
@@ -379,7 +389,7 @@ export default {
     queryProcess() {
       //带入当前登录人查询
       let params = Object.assign(
-        { registerStaff: this.curUser.userId },
+        { ywType:this.businessType, configId:this.processId },
         this.pagination
       );
       if (this.form.content != "")
@@ -414,6 +424,7 @@ export default {
               ? this.curProcess.processType
               : null;
           }
+          this.queryProcess()
         })
         .catch((ex) => {
           this.$message.error("获取流程列表失败!");

+ 8 - 3
src/views/mbsys/materialmanage/processMng/purchaseRegist/index.vue

@@ -330,7 +330,7 @@ export default {
     this.getProcess();
   },
   mounted() {
-    this.queryProcess();
+    //this.queryProcess();
   },
   methods: {
     /**
@@ -379,9 +379,13 @@ export default {
      * 查询工单列表
      */
     queryProcess() {
-      //带入当前登录人查询
+      //带入当前登录人查询 
+      //ywType 业务类型,基础类型
+      //configId 流程类型
+      //handleStaff 当前处理人
+      //processState 工单状态:1草稿、2处理、3终止、4处理完成
       let params = Object.assign(
-        { registerStaff: this.curUser.userId },
+        { ywType:this.businessType, configId:this.processId,handleStaff: this.curUser.userId, processState: 1},
         this.pagination
       );
       if (this.form.content != "")
@@ -416,6 +420,7 @@ export default {
               ? this.curProcess.processType
               : null;
           }
+          this.queryProcess();
         })
         .catch((ex) => {
           this.$message.error("获取流程列表失败!");

+ 26 - 15
src/views/mbsys/materialmanage/processMng/purchaseRegist/registerForm.vue

@@ -364,9 +364,12 @@
       <blocks title="处理信息">
         <examineForm
           ref="examine"
-          :cfgParam="{ isOpt, handleState, nextStep, optionType }"
+          :cfgParam="{ isOpt, optionType }"
           :step="step"
+          :steps="steps"
+          :process="process"
           :editData="editData"
+          :allDeptAndUser="allDeptAndUser"
         ></examineForm>
       </blocks>
     </el-form>
@@ -423,27 +426,28 @@ export default {
       required: true,
     },
     /**
-     * 流程配置中步骤节点选择的处理状态(处理方式)
-     * 字符串类型,以逗号隔开
-     */
-    handleState: {
-      type: String,
-      required: true,
-    },
-    /**
-     * 当前步骤数
+     * 当前步骤
      */
     step: {
       type: Object,
       required: true,
     },
     /**
-     * 下一步审核人和审核部门(最后一步为null)
-     */
-    nextStep: {
-      type: Object,
-      required: true,
+     * 流程所有
+    */
+    steps:{
+      type:Array,
+      required:true,
+    },
+
+    /**
+     * 流程配置信息
+    */
+    process:{
+      type:Object,
+      required:true,
     },
+
     /**
      * 编辑\查询数据
      */
@@ -451,6 +455,13 @@ export default {
       type: Object,
       required: true,
     },
+     /**
+     * 所有部门和用户
+    */
+    allDeptAndUser:{
+      type:Array,
+      required:true,
+    }
   },
   data() {
     return {

+ 296 - 210
src/views/mbsys/materialmanage/processMng/purchaseSupervise/index.vue

@@ -1,5 +1,5 @@
 <template>
-  <!-- 采购登记 -->
+  <!-- 采购督办 -->
   <div class="content-container">
     <div class="top">
       <el-form
@@ -59,16 +59,6 @@
           >查询</el-button
         >
       </el-form>
-      <el-button
-        type="primary"
-        icon="el-icon-plus"
-        size="small"
-        @click="orderRegister"
-        >添加</el-button
-      >
-      <el-button type="primary" icon="el-icon-upload2" size="small"
-        >导出</el-button
-      >
     </div>
     <div class="table-div">
       <el-table
@@ -103,14 +93,73 @@
           label="采购单名称"
           align="center"
         ></el-table-column>
+        <el-table-column prop="processState" label="工单状态" align="center">
+          <template slot-scope="{ row }">
+            <span>{{ getOrderStateNameById(row.processState) }}</span>
+          </template>
+        </el-table-column>
+        <el-table-column prop="processNodeName" label="当前步骤" align="center">
+          <template slot-scope="{ row }">
+            <span>{{
+              row.processNodeName +
+              "(" +
+              row.processNode +
+              "/" +
+              row.sumNode +
+              ")"
+            }}</span>
+          </template>
+        </el-table-column>
+        <el-table-column
+          prop="handleDeptName"
+          label="当前处理部门"
+          align="center"
+        >
+          <template slot-scope="{ row }">
+            <span>{{
+              row.handleDeptName == null || row.handleDeptName == ""
+                ? "/"
+                : row.handleDeptName
+            }}</span>
+          </template>
+        </el-table-column>
+        <el-table-column
+          prop="handleStaffName"
+          label="当前处理人"
+          align="center"
+        >
+          <template slot-scope="{ row }">
+            <span>{{
+              row.handleStaffName == null || row.handleStaffName == ""
+                ? "/"
+                : row.handleStaffName
+            }}</span>
+          </template>
+        </el-table-column>
+        <el-table-column prop="urgeNumber" label="催办消息" align="center">
+          <template slot-scope="{ row }">
+            <el-popover
+              v-if="row.urgeNumber > 0"
+              placement="bottom"
+              title=""
+              width="280"
+              trigger="hover"
+              :content="row.urgeInfo"
+            >
+              <p v-for="(urge,ind) in row.urgeInfo" :key="ind">{{ urge }}</p>
+              <span slot="reference">{{ row.urgeNumber }}</span>
+            </el-popover>
+            <span v-else>{{ row.urgeNumber }}</span>
+          </template>
+        </el-table-column>
         <el-table-column prop="registerDept" label="申购部门" align="center">
           <template slot-scope="{ row }">
             <span>{{ getDeptName(row.registerDept) }}</span>
           </template>
         </el-table-column>
-        <el-table-column prop="registerStaff"  label="申购人" align="center">
+        <el-table-column prop="registerStaff" label="申购人" align="center">
           <template slot-scope="{ row }">
-            <span>{{ getUserName(row.registerDept,row.registerStaff) }}</span>
+            <span>{{ getUserName(row.registerDept, row.registerStaff) }}</span>
           </template>
         </el-table-column>
         <el-table-column
@@ -128,11 +177,6 @@
           label="采购价格合计(元)"
           align="center"
         ></el-table-column>
-        <el-table-column prop="processState" label="工单状态" align="center">
-          <template slot-scope="{ row }">
-            <span>{{ getOrderStateNameById(row.processState) }}</span>
-          </template>
-        </el-table-column>
         <el-table-column
           prop="remark"
           label="备注"
@@ -140,7 +184,22 @@
         ></el-table-column>
         <el-table-column prop="prop" label="操作" align="center">
           <template slot-scope="scope">
-            <el-button @click="queryOrderProcessById(scope.row,false)" icon="el-icon-tickets" title="查看" type="text" size="small" style="font-size:16px;"></el-button>
+            <el-button
+              @click="queryOrderProcessById(scope.row, false)"
+              icon="el-icon-tickets"
+              title="查看"
+              type="text"
+              size="small"
+              style="font-size: 16px"
+            ></el-button>
+            <el-button
+              @click="urgeHandle(scope.row)"
+              icon="el-icon-bell"
+              title="催办"
+              type="text"
+              size="small"
+              style="font-size: 16px; color: #ffa862"
+            ></el-button>
           </template>
         </el-table-column>
       </el-table>
@@ -205,13 +264,15 @@ import {
   getProcessPageList,
   queryProcessPage,
   qOrderProcessById,
-  addOrderProcess,
-  delOrderProcess,
+  examineProcess,
+  addSupervise,
+  querySupervisePage,
 } from "@/api/process/process";
 import { getSupplier } from "@/api/mbsys/materialmanage";
 import { config } from "../../../components/cfgOrderProcess";
 import processOrder from "@/views/mbsys/publicOrder/orderProcess/detail";
 import { publicComponents } from "../processForm/config";
+import { resolve } from "q";
 export default {
   components: { processOrder },
   data() {
@@ -248,7 +309,7 @@ export default {
           },
         ],
       },
-      allDept:[],  //所有部门
+      allDept: [], //所有部门
       curUser: null, //当前登录人
       orderName: "物料采购单", //工单名称
       orderCode: "", //工单编号
@@ -271,12 +332,16 @@ export default {
       editData: {}, //操作数据
       processId: 0, //流程ID
       compts: publicComponents,
-      curEditRow:null,  //当前操作数据
+      curEditRow: null, //当前操作数据
     };
   },
 
-  created() {
+  async created() {
     this.curUser = this.$store.state.user;
+    /**
+     * 查询所有用户所有部门
+     */
+    this.allDept = await this.getDeptAndUser();
     if (this.config && this.config.hasOwnProperty("metrialCategories"))
       this.metrialCategories = this.config.metrialCategories;
     //获取供应商
@@ -305,60 +370,53 @@ export default {
       .catch((ex) => {
         this.$message.error("获取数据出错!");
       });
-    /**
-     * 查询所有用户所有部门和所有人
-     */
-    getAllUserInfo().then((res) => {
-      if (res.code == 1) {
-        const data = res.result
-        for (const i in data) {
-          data[i].value = data[i].id;
-          data[i].label = data[i].name;
-          if (data[i].users) {
-            data[i].children = data[i].users;
-            for (const j in data[i].children) {
-              data[i].children[j].value = data[i].children[j].id;
-              data[i].children[j].label = data[i].children[j].realName;
-            }
-          }
-        }
-        this.allDept = data;
-      }
-    });
     this.getProcess();
   },
   mounted() {
-    this.queryProcess();
+    //this.queryProcess();
   },
   methods: {
+    async getDeptAndUser() {
+      return new Promise((resolve) => {
+        getAllUserInfo().then((res) => {
+          const data = res.result;
+          for (const i in data) {
+            data[i].value = data[i].id;
+            data[i].label = data[i].name;
+            if (data[i].users) {
+              data[i].children = data[i].users;
+              for (const j in data[i].children) {
+                data[i].children[j].value = data[i].children[j].id;
+                data[i].children[j].label = data[i].children[j].realName;
+              }
+            }
+          }
+          resolve(data);
+        });
+      });
+    },
     /**
      * 根据部门ID获取部门名称
-    */
-    getDeptName(deptId){
-      if(this.allDept.length > 0){
-        const dept = this.allDept.find(item => item.id == deptId)
-        if(dept) return dept.name
-        else deptId
-      }
-      else
-        return deptId
+     */
+    getDeptName(deptId) {
+      if (this.allDept.length > 0) {
+        const dept = this.allDept.find((item) => item.id == deptId);
+        if (dept) return dept.name;
+        else deptId;
+      } else return deptId;
     },
     /**
      * 根据部门ID和人员id获取人员名称
-    */
-    getUserName(deptId,userId){
-      if(this.allDept.length > 0){
-        const dept = this.allDept.find(item => item.id == deptId)
-        if(dept){
-          const user = dept.users.find(p => p.id == userId)
-          if(user)return user.realName
-          else return userId
-        }
-        else
-          return userId
-      }
-      else
-        return userId
+     */
+    getUserName(deptId, userId) {
+      if (this.allDept.length > 0) {
+        const dept = this.allDept.find((item) => item.id == deptId);
+        if (dept) {
+          const user = dept.users.find((p) => p.id == userId);
+          if (user) return user.realName;
+          else return userId;
+        } else return userId;
+      } else return userId;
     },
     /**
      * 根据id获取工单状态
@@ -378,8 +436,20 @@ export default {
      */
     queryProcess() {
       //带入当前登录人查询
+      //ywType 业务类型,基础类型
+      //configId 流程类型
+      //handleStaff 当前处理人
+      //processState 工单状态:1草稿、2处理、3终止、4处理完成
+      //supervisor 督办人ID,与督办人部门同时填充,单独无效
+      //upervisorDept 督办人部门ID,与督办人id同时填充,单独无效
       let params = Object.assign(
-        { registerStaff: this.curUser.userId },
+        {
+          ywType: this.businessType,
+          configId: this.processId,
+          supervisor: this.curUser.userId,
+          upervisorDept: this.curUser.departmentId,
+          processState: 2,
+        },
         this.pagination
       );
       if (this.form.content != "")
@@ -388,8 +458,9 @@ export default {
         Object.assign(params, { supplierId: this.form.supplierId });
       queryProcessPage(params).then((res) => {
         if (res.code == 1) {
-          this.tableData = res.result.records;
-          this.pagination.total = res.result.total;
+          //this.tableData = res.result.records
+          this.pagination.total = res.result.total
+          this.getUrgeInfo(res.result.records)
         }
       });
     },
@@ -414,6 +485,7 @@ export default {
               ? this.curProcess.processType
               : null;
           }
+          this.queryProcess();
         })
         .catch((ex) => {
           this.$message.error("获取流程列表失败!");
@@ -428,39 +500,17 @@ export default {
       this.queryProcess();
     },
 
-    /**
-     * 物资类型改变
-     */
-    changeCategory(value) {
-      if (value != null) {
-        this.selectMaterialTypes = [];
-        this.selectMaterialTypes = this.materialTypes.filter(
-          (p) => p.categoryType === value
-        );
-      } else {
-        this.selectMaterialTypes = this.materialTypes.filter((p) => true);
-      }
-    },
-
-    orderRegister() {
-      this.title = "采购申请-新增"
-      this.optionType = 1 //操作类型 0:查看,1:新增,2:修改
-      this.editData = {}
-       this.curEditRow = null
-      this.dialogFormVisible = true
-    },
-
     /**
      * 通过id查询工单流程信息
      * @row 查询数据
-     * @type 操作类型 false:查看,true:修改
+     * @type 操作类型 false:查看,true:审核
      */
     queryOrderProcessById(row, type) {
-      this.curEditRow = type ? row : null
+      this.curEditRow = type ? row : null;
       qOrderProcessById(row.id).then((res) => {
         if (res.code == 1) {
-          this.title = type ? "采购申请-修改" : "采购申请-详情";
-          this.optionType = type ? 2 : 0;
+          this.title = type ? "采购单-审核" : "采购单-详情";
+          this.optionType = type ? 2 : 0; ////操作类型 0:查看,1:新增,2:修改
           this.editData = res.result;
           this.dialogFormVisible = true;
         }
@@ -468,57 +518,134 @@ export default {
     },
 
     /**
-     * 删除工单流程
+     * 督办事件
      */
-    delOrderProcessById(row) {
-      this.$confirm(
-        `此操作将永久删除采购单号为【${row.processNumber}】采购名称为【${row.name}】的采购单, 是否继续?`,
-        "提示",
-        {
-          confirmButtonText: "确定",
-          cancelButtonText: "取消",
-          type: "warning",
-        }
-      )
-        .then(() => {
-          this.deleteOrder(row.id);
+    urgeHandle(row) {
+      this.$prompt("备注", "催办", {
+        customClass: "tf-urge-prompt",
+        confirmButtonText: "催办",
+        cancelButtonText: "取消",
+        inputType: "text",
+        inputValidator: (value) => {
+          return value.length > 30 || value.length == 0 ? false : true;
+        },
+        inputErrorMessage: "催办消息不能为空,且不能超过30个",
+      })
+        .then(({ value }) => {
+          let data = {
+            nodeBranch: row.nodeBranch, //流程节点分支
+            opinion: "", //意见
+            processId: row.id, //流程ID
+            processNode: row.processNode, //流程节点
+            remark: value, //备注
+            superviseDept: parseInt(this.curUser.departmentId), //督办部门
+            superviseStaff: this.curUser.userId, //督办人
+          };
+          this.addSupervise(data);
         })
-        .catch(() => {
-          this.$message({
-            type: "info",
-            message: "已取消删除",
-          });
+        .catch(() => {});
+    },
+
+    /**
+     * 提交督办信息
+     */
+    addSupervise(data) {
+      addSupervise(data)
+        .then((res) => {
+          if (res.code == 1) {
+            this.$message.success("催办成功!");
+            this.queryProcess();
+          } else {
+            this.$message.error("催办失败!");
+          }
+        })
+        .catch((ex) => {
+          this.$message.error("催办失败!");
         });
     },
 
-    /***
-     * 删除工单流程
+    /**
+     * 获取催办消息
      */
-    deleteOrder(id) {
-      delOrderProcess(id).then((res) => {
-        if (res.code == 1) {
-          this.queryProcess();
-          this.$message({
-            type: "success",
-            message: "删除成功!",
-          });
-        } else {
-          this.$message({
-            type: "error",
-            message: "删除失败",
-          });
+    async getUrgeInfo(data) {
+      // this.tableData.forEach((row) => {
+        
+      // });
+      let tableList = data;
+      for(let i = 0 ; i < tableList.length;i++){
+        tableList[i]['urgeInfo'] = ''
+        if (tableList[i].urgeNumber > 0) {
+          let data = {
+            processId: tableList[i].id, //流程ID
+            nodeBranch: tableList[i].nodeBranch, //流程节点分支
+            processNode: tableList[i].processNode, //流程节点
+            superviseDept: parseInt(this.curUser.departmentId), //督办部门
+            superviseStaff: this.curUser.userId, //督办人
+          };
+          const res = await this.querySupervisePage(data)
+          
+          let result = []
+          if (res) {
+            res.result.records.forEach((item) => {
+              const dept = this.getDeptName(item.handleDept);
+              result.push(item.createTime +" " + dept +" " + item.createUserName + " " +item.remark)   
+            });
+          }
+
+          tableList[i]['urgeInfo'] = result
         }
+      }
+      this.tableData = tableList
+    },
+
+    async getContent(row) {
+      let data = {
+        processId: row.id, //流程ID
+        nodeBranch: row.nodeBranch, //流程节点分支
+        processNode: row.processNode, //流程节点
+        superviseDept: parseInt(this.curUser.departmentId), //督办部门
+        superviseStaff: this.curUser.userId, //督办人
+      };
+      const res = await this.querySupervisePage(data);
+      let result = "";
+      if (res) {
+        res.result.records.forEach((item) => {
+          const dept = this.getDeptName(item.handleDept);
+          result =
+            result +
+            item.createTime +
+            " " +
+            dept +
+            " " +
+            item.createUserName +
+            " " +
+            item.remark +
+            "\r\n";
+        });
+      }
+      return result;
+    },
+
+    async querySupervisePage(data) {
+      return new Promise((resolve) => {
+        querySupervisePage(data).then((res) => {
+          if (res.code == 1) {
+            resolve(res);
+          } else {
+            resolve(null);
+          }
+        });
       });
     },
 
     /**
      * 新增工单流程信息
      */
-    addOrder(param) {
-      addOrderProcess(param).then((res) => {
+    examineProcessOrder(param) {
+      examineProcess(param).then((res) => {
         if (res.code == 1) {
-          this.queryProcess()
-          this.$message.success("新增采购单成功!")
+          this.queryProcess();
+          this.$message.success("新增采购单成功!");
         }
       });
     },
@@ -529,95 +656,47 @@ export default {
      */
     preserveHandler(state) {
       let params = this.$refs.merge.submitForm();
+      console.log("提交数据", params);
       //处理提交参数到接口参数映射
       let data = this.formParamMapping(params, state);
-      this.addOrder(data);
+      this.examineProcessOrder(data);
     },
     /**
      * 表单参数映射到提交参数
      */
     formParamMapping(data, state) {
       let params = {
-        operateState:0 //	表单类型:0、其它; 1、采购入库(关联采购工单);2、余料退库(关联出库工单);3、工程出库(关联工程工单);4其它出库;5、维修出库(关联维修工单)
+        handleResults: 0, //处理结果0:不处理;1:同意;2:不同意
+        operateState: 0, //表单类型:0、其它; 1、采购入库(关联采购工单);2、余料退库(关联出库工单);3、工程出库(关联工程工单);4其它出库;5、维修出库(关联维修工单)
+        processStep: data.curProcessStep, //当前流程步骤
+        stepNode: data.curStepNode, //当前步骤结点
+        headleState: data.headleState, //处理状态:1提交;2:驳回;3:转派;4:终止;
+        remark: data.remarks, //当前处理意见
+        saveState: state, //0保存,1提交
       };
+      const nextProcess = (data.processStep + "").split(",");
+      const nextStep = {
+        //下一步
+        dept: data.dept, //部门
+        deptStaff: data.deptStaff, //人员
+        processStep:
+          nextProcess && nextProcess.length > 0
+            ? parseInt(nextProcess[0])
+            : data.curProcessStep, //流程步骤
+        stepNode:
+          nextProcess && nextProcess.length > 1
+            ? parseInt(nextProcess[1])
+            : data.stepNode, //步骤结点
+      };
+
       let formData = new FormData();
-      if(this.curEditRow != null) Object.assign(params, { id: this.curEditRow.id }) //流程ID
+      if (this.curEditRow != null)
+        Object.assign(params, { processId: this.curEditRow.id }); //流程ID
       //表单字段
       if (data.hasOwnProperty("configId")) {
         params = Object.assign(params, { configId: data.configId }); //流程配置ID
       }
-      if (data.hasOwnProperty("form")) {
-        Object.assign(params, {
-          name: data.form.name, //	名称
-          registerTime: data.form.registerTime.length > 11 ? data.form.registerTime : data.form.registerTime + " 00:00:00", //登记时间
-          supplierId: data.form.supplier, //供应商ID
-          supplier: data.form.factoryName, //供应商名称
-          telephone: data.form.contactNumber, //联系电话
-          useDept: data.form.useDept, //申购部门
-          totalPrice: data.form.allPrice, //总价
-          remark: data.form.remark, //备注
-        });
-      }
-      Object.assign(params, { ywType: this.businessType }); //业务类型
-      let processNode = {
-        //第一步
-        handleResults: 0, //处理结果0:不处理;1:同意;2:不同意;
-        saveState: state, //0保存,1提交
-        annex:data.hasOwnProperty('existsFilesId') ?  data.existsFilesId : '' //附件id
-      };
-      //审核信息
-      if (data.hasOwnProperty("examine")) {
-        //下一步审核
-        let nextStep = {
-          dept: data.examine.hasOwnProperty("dept") ? data.examine.dept : "", //部门
-          deptStaff: data.examine.hasOwnProperty("deptStaff") ? data.examine.deptStaff : "", //人员
-          processStep: data.examine.hasOwnProperty("processStep") ? data.examine.processStep : 1, //流程步骤
-          stepNode:data.examine.hasOwnProperty("stepNode") ? data.examine.stepNode: 1, //步骤节点
-        };
-        Object.assign(
-          processNode,
-          { headleState: data.examine.headleState, //处理状态:1提交;2:驳回;3:转派;4:终止;
-            nextStep:nextStep, //下一步信息,下一步,驳回,转派
-            processStep:1, //流程步骤(当前)
-            stepNode:1   //步骤节点(当前)
-          }
-        );
-      }
-      //流程步骤 processStep
-      //	步骤节点 stepNode
-      Object.assign(params, { stepNode: 1 })
-      //物资信息 metrials
-      if (data.hasOwnProperty("metrials")) {
-        let stuffDtos = [];
-        data.metrials.forEach((metrial) => {
-          stuffDtos.push({
-            amountMoney: metrial.allPrice, //	金额
-            matterId: metrial.id, //物料ID
-            matterState: 1, //metrial.isAssets	物料状态1:新;2:旧  默认为1
-            quantity: metrial.purchaseNumber, //数量
-            unitPrice: parseFloat(metrial.purchasePrice), //单价
-          });
-        });
-        if (stuffDtos.length > 0)
-          Object.assign(processNode, { stuffDtos: stuffDtos }); //采购物资信息
-      }
-      //其他费用
-      if (data.hasOwnProperty("otherCost")) {
-        let otherCost = [];
-        data.otherCost.forEach((op) => {
-          otherCost.push({
-            amountMoney: op.cost, //金额
-            costName: op.costType, //费用名称
-            explain: op.remark, //费用说明
-            unitPrice: op.cost,
-          });
-        });
-        if (otherCost.length > 0)
-          Object.assign(processNode, { detailedDtos: otherCost }); //其他费用信息
-      }
-
-      Object.assign(params, { processNode: processNode }); //业务类型
-      console.log("提交参数:", params);
+      Object.assign(params, { nextStep: nextStep });
       const json = JSON.stringify(params);
       // 将 json 字符串转化为 Blob 对象
       const blob = new Blob([json], {
@@ -632,7 +711,7 @@ export default {
         });
       }
       return formData;
-    }
+    },
   },
 };
 </script>
@@ -668,6 +747,13 @@ export default {
     margin-top: 16px;
   }
 }
+
+>>> .tf-urge-prompt {
+  >>> .el-message-box__header {
+    background: #2d74e7;
+  }
+}
+
 .el-table {
   >>> .el-table__body {
     tr {

+ 492 - 60
src/views/mbsys/publicOrder/orderProcess/detail/index.vue

@@ -55,12 +55,16 @@
           >
             <template slot="description">
               <div class="handler-container">
+                <!-- 工单流程结点发起时显示 -->
                 <el-row class="check-info" v-if="step.checkState === -1">
                   <div v-for="(node, i) in step.nodes" class="check-v" :key="i">
                     <div
                       class="name"
                       v-if="node.userName != '' && node.userName != null"
-                      :style="'background:' +(active - 1 > index ? '#48cd4c;' : '#5e8aed;')"
+                      :style="
+                        'background:' +
+                        (active - 1 > index ? '#48cd4c;' : '#5e8aed;')
+                      "
                       :title="node.userName"
                     >
                       {{ node.userName }}
@@ -68,11 +72,25 @@
                     <div
                       class="name"
                       v-else-if="node.selectUser.length == 1"
-                      :style="'background:' +(active - 1 == index ? '#5e8aed;' : '#e7e7e7;')"
+                      :style="
+                        'background:' +
+                        (active - 1 == index ? '#5e8aed;' : '#e7e7e7;')
+                      "
                       :title="node.selectUser[0].userName"
                     >
                       {{ node.selectUser[0].userName }}
                     </div>
+                    <div
+                      class="name"
+                      v-else-if="node.selectUser.length > 1"
+                      :style="
+                        'background:' +
+                        (active - 1 == index ? '#5e8aed;' : '#e7e7e7;')
+                      "
+                      :title="getUserName(node.selectUser)"
+                    >
+                      {{ getUserName(node.selectUser) }}
+                    </div>
                     <div
                       class="time"
                       v-if="node.ischeck"
@@ -88,7 +106,8 @@
                     </div>
                   </div>
                 </el-row>
-                <el-row class="check-info" v-else>
+                <!-- 工单流程结点待处理、处理中显示 -->
+                <el-row class="check-info" v-else-if="step.checkState == 1">
                   <div
                     v-for="(check, i) in step.checkInfo"
                     class="check-v"
@@ -96,8 +115,8 @@
                   >
                     <div
                       class="name"
-                      :style="'background:' + (check.nodeState === 1 ? '#5e8aed;' : (check.nodeState === 2 ? '#48cd4c;' : '#48cd4c;'))"
                       :title="check.userName"
+                      :style="'background:' + getBackground(check)"
                     >
                       {{ check.userName }}
                     </div>
@@ -110,6 +129,25 @@
                     </div>
                   </div>
                 </el-row>
+                <!-- 工单流程结点处理完成显示 -->
+                <el-row class="check-info" v-else-if="step.checkState == 2">
+                  <div
+                    v-for="(check, i) in step.checkInfo"
+                    class="check-v"
+                    :key="i"
+                  >
+                    <div
+                      class="name"
+                      style="background: #48cd4c"
+                      :title="check.userName"
+                    >
+                      {{ check.userName }}
+                    </div>
+                    <div class="time" :title="check.checkTime">
+                      {{ check.checkTime }}
+                    </div>
+                  </div>
+                </el-row>
               </div>
             </template>
           </el-step>
@@ -134,23 +172,24 @@
             @click="openHandler(index)"
           ></div>
         </div>
-        <div v-if="openBtn[index]" class="stepInfo">
+        <div v-if="openBtn[index]" class="stepInfo" style="padding: 0 10px">
           <template>
             <component
               :ref="getIsCurStep(step) ? 'activeComp' : 'comp'"
               v-if="dynamicComponents[index]"
               :is="dynamicComponents[index]"
-              :handleState="step.handleState"
-              :nextStep="step.nextStep"
               :editData="editData"
               :step="step"
+              :steps="steps"
+              :process="process"
               :isOpt="getIsCurStep(step)"
               :optionType="optionType"
               :cfgParam="{
                 isOpt: getIsCurStep(step),
-                handleState: step.handleState,
+                optionType: optionType,
                 nextStep: step.nextStep,
               }"
+              :allDeptAndUser="allDeptAndUser"
             ></component>
           </template>
         </div>
@@ -161,6 +200,7 @@
 </template>
 
 <script>
+import { getAllUserInfo } from "@/api/base";
 import { getProcessPageList, queryProcessById } from "@/api/process/process";
 import { parseTime } from "@/utils/index";
 export default {
@@ -218,33 +258,33 @@ export default {
   },
   data() {
     return {
+      colors: [
+        "color:#28dd12;background:#ebf5f1;",
+        "color:#0478ef;background:#dbe6f5;",
+        "color:#b9afaf;background:#e7e7e7;",
+      ],
       user: null, //用户信息
       orderCode: "", //工单编码
       processList: [], //流程列表
       active: 1, //流程活动节点序号,最小为1
       processId: "", //流程id
+      process: null,
       proSteps: [], //流程步骤
       steps: [], //流程步骤信息
       param: { name: "123" }, //参数集合
       rtnParam: null, //每一次返回的参数
       openBtn: [],
-      colors: [
-        "color:#28dd12;background:#ebf5f1;",
-        "color:#0478ef;background:#dbe6f5;",
-        "color:#b9afaf;background:#e7e7e7;",
-      ],
+      allDeptAndUser: [],
     };
   },
 
-  created() {
+  async created() {
     //获取当前登录人
     this.user = this.$store.state.user;
-    //查询流程列表
-    if (this.proId === 0) this.getProcessList();
-    else {
-      this.processId = this.proId;
-      this.getProcessById(this.proId);
-    }
+    /**
+     * 查询所有用户所有部门
+     */
+    this.allDeptAndUser = await this.getDeptAndUser();
     /**
      * optionType 操作类型 0:查看,1:新增,2:修改
      * 如果 操作类型 = 0 或者 2 则在editData中获取工单编号和名称
@@ -260,6 +300,12 @@ export default {
           : 1;
       }
     }
+    //查询流程列表
+    if (this.proId === 0) this.getProcessList();
+    else {
+      this.processId = this.proId;
+      this.getProcessById(this.proId);
+    }
   },
 
   mounted() {},
@@ -275,6 +321,25 @@ export default {
   },
 
   methods: {
+    async getDeptAndUser() {
+      return new Promise((resolve) => {
+        getAllUserInfo().then((res) => {
+          const data = res.result;
+          for (const i in data) {
+            data[i].value = data[i].id;
+            data[i].label = data[i].name;
+            if (data[i].users) {
+              data[i].children = data[i].users;
+              for (const j in data[i].children) {
+                data[i].children[j].value = data[i].children[j].id;
+                data[i].children[j].label = data[i].children[j].realName;
+              }
+            }
+          }
+          resolve(data);
+        });
+      });
+    },
     /**
      * 回调函数,每一次插件中修改的数据返回(包括组件中的所有参数)
      */
@@ -288,9 +353,8 @@ export default {
      */
     getIsCurStep(step) {
       let flag = true;
-      if (this.editData.hasOwnProperty("currentNode")) {
-        if (this.editData.currentNode.hasOwnProperty("processStep"))
-          flag = this.editData.currentNode.processStep == step.stepOrder;
+      if (this.editData.hasOwnProperty("processNode")) {
+        flag = this.editData.processNode == step.stepOrder;
       }
       return flag;
     },
@@ -332,7 +396,7 @@ export default {
           this.openBtn[index] = true;
           return this.colors[1];
         } else return this.colors[2];
-      } else {
+      } else if (this.active < 100) {
         if (this.active - 1 >= index) {
           //当前节点是当前操作节点
           if (this.active - 1 == index) {
@@ -343,7 +407,16 @@ export default {
         }
         //未处理
         else return this.colors[2];
-      }
+      } else return this.colors[0];
+    },
+    
+    /**
+     * 返回用户名
+     * @selectUser 选择的用户数组
+    */
+    getUserName(selectUser){
+      let userName = selectUser.map(item=>{return item.userName})
+      return userName.toString().replace(',','\\');
     },
     /**
      * 根据业务类型,获取流程列表
@@ -380,6 +453,7 @@ export default {
     getProcessById(id) {
       queryProcessById(id).then((res) => {
         if (res.code == 1) {
+          this.process = res.result;
           this.proSteps = res.result.steps;
           this.showProcess(this.proSteps.filter((ip) => true));
         } else {
@@ -391,7 +465,7 @@ export default {
     /**
      * 渲染流程
      */
-    showProcess(list) {
+    showProcess(listStep) {
       // 设置规则 optionType 操作类型 0:查看,1:新增,2:修改
       // 1、新建的时候
       // (1)获取当前登录人,并且显示到第一步,第一步显示执行中
@@ -400,9 +474,9 @@ export default {
       // 3、如果查看,判断当前活动点
       let steps = [];
       const data = parseTime(new Date(), "{yyyy}-{mm}-{dd}");
-      list.forEach((item, index) => {
+      listStep.forEach((item, index) => {
         let dInfo = {
-          coerceLevel:item.coerceLevel, //强制处理步骤结点
+          coerceLevel: item.coerceLevel, //强制处理步骤结点
           stepOrder: item.stepOrder, //步骤编号
           title: item.stepName, //步骤名称
           nodes: [], //副流程审核信息
@@ -411,11 +485,11 @@ export default {
           checkState: -1, //未处理到该节点
           checkInfo: [],
         };
-        if (list.length > 1 && index < list.length - 1) {
+        if (listStep.length > 1 && index < listStep.length - 1) {
           dInfo.nextStep = {
-            levelstaffs: list[index + 1]["levelstaffs"],
-            stepName: list[index + 1]["stepName"],
-            stepOrder: list[index + 1]["stepOrder"],
+            levelstaffs: listStep[index + 1]["levelstaffs"],
+            stepName: listStep[index + 1]["stepName"],
+            stepOrder: listStep[index + 1]["stepOrder"],
           };
         }
 
@@ -428,6 +502,7 @@ export default {
             selectUser: [],
             levelNumber: item.levelNumber,
             must: item.must,
+            levelstaffs: [it],
           };
           if (this.optionType == 1) {
             node.userId = index == 0 && i == 0 ? this.user.userId : null;
@@ -437,6 +512,7 @@ export default {
 
           it.staffs.forEach((p) => {
             let user = {
+              deptId: p.deptId,
               userId: p.staffId,
               userName: p.staffIdName,
             };
@@ -451,40 +527,394 @@ export default {
       this.steps.forEach((item) => {
         this.openBtn.push(false);
       });
-      console.log('123',list);
-      this.getExamineStep()
+      this.getExamineStep();
     },
 
     /**
      * 获取每一步的审核情况
-    */
-    getExamineStep(){
-      console.log("流程信息", this.steps, this.editData);
+     */
+    getExamineStep() {
       //更新审核信息
       if (!(JSON.stringify(this.editData) === "{}")) {
-        this.steps.forEach((item, index) => {
-          //找到处理步骤相同而其处理节点状态nodeState == 2 和 1 为提交的(节点状态0:待处理;1处理中;2提交;3:驳回;4:转派;5:终止;6:被驳回;)
-          const step = this.editData.processNodeVos.filter((p) => p.processStep == item.stepOrder && (p.nodeState === 2 || p.nodeState === 1))
-          if (step && step.length > 0) {
-            //处理中
-            const handleing = step.filter(p => p.nodeState === 1)
-            //处理完成
-            const handled = step.filter(p => p.nodeState === 2)
-            if(handled.length == step.length) item.checkState = 2
-            else item.checkState = 1
-            item.checkInfo = [];
-            step.forEach((op) => {
-              item.checkInfo.push({
-                userName: op.handleStaffName,
-                nodeState:op.nodeState,
-                checkTime: op.handleTime
+        const currentNode = this.editData.currentNode;
+        //当前为草稿(只是保存未提交)或者流程审核完成
+        if (currentNode == null) {
+          //当前为草稿
+          if (this.active != 100) {
+            this.steps[0].checkState = 1;
+            this.steps[0].checkInfo = [];
+            this.steps[0].checkInfo.push({
+              userName: this.editData.handleStaffName,
+              nodeState: 1,
+              must: true, //是否必须处理
+              isCur: true, //是否当前处理
+              checkTime: "",
+            });
+          }
+          //流程审核完成
+          else {
+            this.steps.forEach((item, index) => {
+              //如果步骤小于当前步骤,说明已经审核完成
+              item.checkState = 2;
+              let step = this.editData.processNodeVos.filter((p) => p.processStep == item.stepOrder && p.nodeState === 2);
+              //根据步骤节点排序(stepNode)正序
+              step.sort((a, b) => {
+                return a.stepNode < b.stepNode ? 1 : -1;
+              });
+              step.forEach((op) => {
+                item.checkInfo.push({
+                  userName: op.handleStaffName,
+                  nodeState: op.nodeState,
+                  must: true, //是否必须处理
+                  isCur: true, //是否当前处理
+                  checkTime: op.handleTime,
+                });
               });
             });
           }
-        })
+        } else {
+          this.steps.forEach((item, index) => {
+            //如果步骤小于当前步骤,说明已经审核完成
+            if (item.stepOrder < currentNode.processStep) {
+              item.checkState = 2;
+              let step = this.editData.processNodeVos.filter(
+                (p) => p.processStep == item.stepOrder && p.nodeState === 2
+              );
+              //根据步骤节点排序(stepNode)正序
+              step.sort((a, b) => {
+                return a.stepNode < b.stepNode ? 1 : -1;
+              });
+              step.forEach((op) => {
+                item.checkInfo.push({
+                  userName: op.handleStaffName,
+                  nodeState: op.nodeState,
+                  must: true, //是否必须处理
+                  isCur: true, //是否当前处理
+                  checkTime: op.handleTime,
+                });
+              });
+            }
+            //如果步骤就是当前步骤
+            if (item.stepOrder == currentNode.processStep) {
+              item.checkState = 1;
+              //强制处理层级
+              const coerceLevel = item.coerceLevel;
+              //总处理结点
+              const nodes = item.nodes;
+              //当前步骤处理的次数数据
+              const stepNode = this.editData.processNodeVos.filter(
+                (p) => p.processStep == item.stepOrder
+              );
+              //提交
+              const handled = stepNode.filter((p) => p.nodeState === 2);
+              //待处理
+              const unHandle = stepNode.filter((p) => p.nodeState === 0);
+              //处理中
+              const handleing = stepNode.filter((p) => p.nodeState === 1);
+              //1、初次接入本步骤(只有待处理的结点,没有提交的结点,没有待处理的结点)
+              if (
+                unHandle.length > 0 &&
+                handled.length == 0 &&
+                handleing.length == 0
+              ) {
+                //只有一个待处理
+                item.checkInfo.push({
+                  userName: unHandle[0].handleStaffName,
+                  nodeState: unHandle[0].nodeState,
+                  must: true, //是否必须处理
+                  isCur: true, //是否当前处理
+                  checkTime: unHandle[0].handleTime,
+                });
+                if (nodes.length > 1) {
+                  nodes.forEach((node, index) => {
+                    //第二个开始
+                    if (index > 0) {
+                      let userName = [];
+                      node.selectUser.some((u) => {
+                        userName.push(u.userName);
+                      });
+                      item.checkInfo.push({
+                        userName: userName.length > 1 ? "+" : userName[0],
+                        nodeState: unHandle[0].nodeState,
+                        must: coerceLevel >= index + 1 ? true : false, //是否必须处理
+                        isCur: false, //是否当前处理
+                        checkTime: "",
+                      });
+                    }
+                  });
+                }
+              }
+              //2、本步骤有多个结点(存在待处理,也存在提交,不存在处理中),至少有两个结点
+              if (
+                unHandle.length > 0 &&
+                handled.length > 0 &&
+                handleing.length == 0
+              ) {
+                //当前结点
+                const stepNode = currentNode.stepNode;
+                item.checkInfo = [];
+                //把已经提交的加进来
+                handled.forEach((hd) => {
+                  item.checkInfo.push({
+                    userName: hd.handleStaffName,
+                    nodeState: hd.nodeState,
+                    must: true, //是否必须处理
+                    isCur: true, //是否当前处理
+                    checkTime: hd.handleTime,
+                  });
+                });
+                //把待处理的加上
+                item.checkInfo.push({
+                  userName: unHandle[0].handleStaffName,
+                  nodeState: unHandle[0].nodeState,
+                  must: true, //是否必须处理
+                  isCur: true, //是否当前处理
+                  checkTime: unHandle[0].handleTime,
+                });
+                //强制处理 coerceLevel  处理节点数 nodes
+                //如果结点总数大于当前处理结点
+                if (nodes.length > stepNode) {
+                  nodes.forEach((node, index) => {
+                    //第 stepNode 开始
+                    if (index >= stepNode) {
+                      let userName = [];
+                      node.selectUser.some((u) => {
+                        userName.push(u.userName);
+                      });
+                      item.checkInfo.push({
+                        userName: userName.length > 1 ? "+" : userName[0],
+                        nodeState: unHandle[0].nodeState,
+                        must: coerceLevel >= index + 1 ? true : false, //是否必须处理
+                        isCur: false, //是否当前处理
+                        checkTime: "",
+                      });
+                    }
+                  });
+                }
+              }
+              //3、本步骤有多个结点(存在待处理,也存在提交,也是存在处理中),至少有三个结点
+              if (
+                unHandle.length > 0 &&
+                handled.length > 0 &&
+                handleing.length > 0
+              ) {
+                //当前结点
+                const stepNode = currentNode.stepNode;
+                item.checkInfo = [];
+                //把已经提交的加进来
+                handled.forEach((hd) => {
+                  item.checkInfo.push({
+                    userName: hd.handleStaffName,
+                    nodeState: hd.nodeState,
+                    must: true, //是否必须处理
+                    isCur: true, //是否当前处理
+                    checkTime: hd.handleTime,
+                  });
+                });
+                //把处理中的加上
+                item.checkInfo.push({
+                  userName: handleing[0].handleStaffName,
+                  nodeState: handleing[0].nodeState,
+                  must: true, //是否必须处理
+                  isCur: true, //是否当前处理
+                  checkTime: handleing[0].handleTime,
+                });
+                //如果结点总数大于当前处理结点
+                if (nodes.length > stepNode) {
+                  nodes.forEach((node, index) => {
+                    //第 stepNode 开始
+                    if (index >= stepNode) {
+                      let userName = [];
+                      node.selectUser.some((u) => {
+                        userName.push(u.userName);
+                      });
+                      item.checkInfo.push({
+                        userName: userName.length > 1 ? "+" : userName[0],
+                        nodeState: handleing[0].nodeState,
+                        must: coerceLevel >= index + 1 ? true : false, //是否必须处理
+                        isCur: false, //是否当前处理
+                        checkTime: "",
+                      });
+                    }
+                  });
+                }
+              }
+              //4、本步骤有多个结点(存在待处理,不存在提交,也是存在处理中),至少有两个结点
+              if (
+                unHandle.length > 0 &&
+                handled.length == 0 &&
+                handleing.length > 0
+              ) {
+                //当前结点
+                const stepNode = currentNode.stepNode;
+                item.checkInfo = [];
+                //把处理中的加上
+                item.checkInfo.push({
+                  userName: handleing[0].handleStaffName,
+                  nodeState: handleing[0].nodeState,
+                  must: true, //是否必须处理
+                  isCur: true, //是否当前处理
+                  checkTime: handleing[0].handleTime,
+                });
+                //如果结点总数大于当前处理结点
+                if (nodes.length > stepNode) {
+                  nodes.forEach((node, index) => {
+                    //第 stepNode 开始
+                    if (index >= stepNode) {
+                      let userName = [];
+                      node.selectUser.some((u) => {
+                        userName.push(u.userName);
+                      });
+                      item.checkInfo.push({
+                        userName: userName.length > 1 ? "+" : userName[0],
+                        nodeState: 1,
+                        must: coerceLevel >= index + 1 ? true : false, //是否必须处理
+                        isCur: false, //是否当前处理
+                        checkTime: "",
+                      });
+                    }
+                  });
+                }
+              }
+              //5、本步骤有多个结点(不存在待处理,存在提交,也是存在处理中),至少有两个结点
+              if (
+                unHandle.length == 0 &&
+                handled.length > 0 &&
+                handleing.length > 0
+              ) {
+                //当前结点
+                const stepNode = currentNode.stepNode;
+                item.checkInfo = [];
+                //把已经提交的加进来
+                handled.forEach((hd) => {
+                  item.checkInfo.push({
+                    userName: hd.handleStaffName,
+                    nodeState: hd.nodeState,
+                    must: true, //是否必须处理
+                    isCur: true, //是否当前处理
+                    checkTime: hd.handleTime,
+                  });
+                });
+                //把处理中的加上
+                item.checkInfo.push({
+                  userName: handleing[0].handleStaffName,
+                  nodeState: handleing[0].nodeState,
+                  must: true, //是否必须处理
+                  isCur: true, //是否当前处理
+                  checkTime: handleing[0].handleTime,
+                });
+                //如果结点总数大于当前处理结点
+                if (nodes.length > stepNode) {
+                  nodes.forEach((node, index) => {
+                    //第 stepNode 开始
+                    if (index >= stepNode) {
+                      let userName = [];
+                      node.selectUser.some((u) => {
+                        userName.push(u.userName);
+                      });
+                      item.checkInfo.push({
+                        userName: userName.length > 1 ? "+" : userName[0],
+                        nodeState: 1,
+                        must: coerceLevel >= index + 1 ? true : false, //是否必须处理
+                        isCur: false, //是否当前处理
+                        checkTime: "",
+                      });
+                    }
+                  });
+                }
+              }
+              //6、最后一个结点处理完成(不存在待处理,存在提交,不存在处理中)
+              if (
+                unHandle.length == 0 &&
+                handled.length > 0 &&
+                handleing.length == 0
+              ) {
+                //当前结点
+                const stepNode = currentNode.stepNode;
+                item.checkInfo = [];
+                //把已经提交的加进来
+                handled.forEach((hd) => {
+                  item.checkInfo.push({
+                    userName: hd.handleStaffName,
+                    nodeState: hd.nodeState,
+                    must: true, //是否必须处理
+                    isCur: true, //是否当前处理
+                    checkTime: hd.handleTime,
+                  });
+                });
+              }
+              //7、本步骤有一个结点已保存(不存在待处理,不存在提交,也是存在处理中)
+              if (
+                unHandle.length == 0 &&
+                handled.length == 0 &&
+                handleing.length > 0
+              ) {
+                //当前结点
+                const stepNode = currentNode.stepNode;
+                item.checkInfo = [];
+                //把处理中的加上
+                item.checkInfo.push({
+                  userName: handleing[0].handleStaffName,
+                  nodeState: handleing[0].nodeState,
+                  must: true, //是否必须处理
+                  isCur: true, //是否当前处理
+                  checkTime: handleing[0].handleTime,
+                });
+                //如果结点总数大于当前处理结点
+                if (nodes.length > stepNode) {
+                  nodes.forEach((node, index) => {
+                    //第 stepNode 开始
+                    if (index >= stepNode) {
+                      let userName = [];
+                      node.selectUser.some((u) => {
+                        userName.push(u.userName);
+                      });
+                      item.checkInfo.push({
+                        userName: userName.length > 1 ? "+" : userName[0],
+                        nodeState: 1,
+                        must: coerceLevel >= index + 1 ? true : false, //是否必须处理
+                        isCur: false, //是否当前处理
+                        checkTime: "",
+                      });
+                    }
+                  });
+                }
+              }
+              //8、不存在这种情况
+              // if(unHandle.length == 0 && handled.length == 0 && handleing.length == 0){}
+            }
+          });
+        }
+      }
+    },
 
-        console.log('审核信息',this.steps)
+    /**
+     * 获取结点背景颜色
+     * @examine Object 存在字段nodeState、must、isCur
+     * 字段说明:
+     *   @nodeState Number 结点状态(0:待处理,1:处理中,2:提交)
+     *   @must Boolean 是否必须处理
+     *   @isCur Boolean 是否当前处理
+     */
+    getBackground(examine) {
+      //((check.nodeState === 1 || check.nodeState === 0) ? '#5e8aed;' : (check.nodeState === 2 ? '#48cd4c;': '#48cd4c;'))
+      const cfgColors = ["#5e8aed", "#999999", "#CCCCCC", "#48cd4c"]; //分别表示 处理中、必须处理单不在处理中、不是必须处理不在处理中、已处理
+      let color = cfgColors[0]; //默认处理中
+      if (examine) {
+        if (examine.nodeState == 2) color = cfgColors[3];
+        //提交
+        else {
+          if (examine.isCur) {
+            //当前处理
+            if (examine.must) color = cfgColors[0]; //处理中
+          } else {
+            if (examine.must) color = cfgColors[1];
+            //处理中
+            else color = cfgColors[2]; //处理中
+          }
+        }
       }
+      return color;
     },
 
     openHandler(index) {
@@ -533,16 +963,18 @@ export default {
       height: 70px;
       line-height: 40px;
       color: #fff;
+      margin-right: 6px;
       .name {
         border-radius: 3px;
-        width:60px;
-        margin:0px;
-        height:40px;
+        width: 68px;
+        margin: 0px;
+        height: 40px;
         text-overflow: ellipsis;
         overflow: hidden;
       }
-      .time{
-        height: 32px;
+      .time {
+        height: 28px;
+        line-height: 28px;
         color: #48cd4c;
         text-overflow: ellipsis;
         overflow: hidden;