소스 검색

工单流程修改

tengmingxue 2 년 전
부모
커밋
1c9636bb1e

+ 7 - 1
README.md

@@ -39,4 +39,10 @@ npm run build:prod
 # 生成后如果遇到cpexcel.js问题解决
 var cpt = require('./cpt' + 'able');
 改成:
-var cpt = cptable;
+var cpt = cptable;
+# 遇到babel/plugin-proposal-nullish-coalescing-operator问题
+npm install --save-dev @babel/plugin-proposal-nullish-coalescing-operator
+
+npm install --save-dev @babel/plugin-proposal-optional-chaining
+或者
+cnpm install --save-dev @babel/plugin-proposal-optional-chaining

+ 3 - 1
babel.config.js

@@ -3,7 +3,9 @@ module.exports = {
     '@vue/app'
   ],
   plugins: [
-    'transform-remove-strict-mode' // 配置插件,这里很重要
+    'transform-remove-strict-mode', // 配置插件,这里很重要
+    '@babel/plugin-proposal-optional-chaining',  //解析 可选链式语法
+    '@babel/plugin-proposal-nullish-coalescing-operator'
   ],
   ignore: [
     './public/Voice/*.js',

파일 크기가 너무 크기때문에 변경 상태를 표시하지 않습니다.
+ 93 - 169
package-lock.json


+ 3 - 1
package.json

@@ -49,6 +49,8 @@
   },
   "devDependencies": {
     "@babel/core": "7.0.0",
+    "@babel/plugin-proposal-nullish-coalescing-operator": "^7.16.7",
+    "@babel/plugin-proposal-optional-chaining": "^7.16.7",
     "@babel/register": "7.0.0",
     "@vue/cli-plugin-babel": "3.6.0",
     "@vue/cli-plugin-eslint": "^3.9.1",
@@ -92,4 +94,4 @@
     "> 1%",
     "last 2 versions"
   ]
-}
+}

+ 6 - 4
src/views/mbsys/components/examineForm.vue

@@ -470,10 +470,12 @@ export default {
                   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;
+                  if(nextStep){
+                    this.form.dept = nextStep.handleDept; //下一环节处理部门
+                    this.nextStepDeptChange(this.form.dept);
+                    this.form.deptStaff = nextStep.handleStaff;
+                    this.form.remarks = nextStep.handleResults;
+                  }
                 }
               }
             }

+ 1 - 0
src/views/mbsys/materialmanage/processMng/purchaseRegist/index.vue

@@ -541,6 +541,7 @@ export default {
       let data = this.formParamMapping(params, state);
       this.addOrder(data);
     },
+    
     /**
      * 表单参数映射到提交参数
      */

+ 54 - 21
src/views/mbsys/publicOrder/orderProcess/detail/index.vue

@@ -409,14 +409,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(',','\\');
+     */
+    getUserName(selectUser) {
+      let userName = selectUser.map((item) => {
+        return item.userName;
+      });
+      return userName.toString().replace(",", "\\");
     },
     /**
      * 根据业务类型,获取流程列表
@@ -553,24 +555,55 @@ export default {
           }
           //流程审核完成
           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,
+            //查询是否存在流程中终止的 节点状态0:待处理;1处理中;2提交;3:驳回;4:转派;5:终止;6:被驳回;
+            //如果存在流程中终止的测,只是到终止的
+            const suspend = this.editData.processNodeVos.find(
+              (p) => p.nodeState === 5
+            );
+            if (suspend) {
+              let suspendIndex = suspend.processStep;
+              for (let i = 0; i < suspendIndex - 1; i++) {
+                this.steps[i].checkState = 2;
+                let step = this.editData.processNodeVos.filter(
+                  (p) =>
+                    p.processStep == this.steps[i].stepOrder &&
+                    p.nodeState === 2
+                );
+                //根据步骤节点排序(stepNode)正序
+                step.sort((a, b) => {
+                  return a.stepNode < b.stepNode ? 1 : -1;
+                });
+                step.forEach((op) => {
+                  this.steps[i].checkInfo.push({
+                    userName: op.handleStaffName,
+                    nodeState: op.nodeState,
+                    must: true, //是否必须处理
+                    isCur: true, //是否当前处理
+                    checkTime: op.handleTime,
+                  });
+                });
+              }
+            } 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) => {