ソースを参照

大中型优化(报告取号逻辑)

wucl 1 年間 前
コミット
0342afd704
1 ファイル変更42 行追加32 行削除
  1. 42 32
      src/views/major/todoDetail.vue

+ 42 - 32
src/views/major/todoDetail.vue

@@ -513,19 +513,19 @@
             </el-table-column>
             <el-table-column prop="statementNo" label="价值意见书号" align="center" width="250">
               <template slot-scope="scope">
-                <el-tag type='success'>
+                <el-tag :type='scope.row.statementNo == null ? "danger": "success" '>
                   {{ scope.row.statementNo == null ? '未取号' : scope.row.statementNo }}</el-tag>
-              </template>
+              </template>``
             </el-table-column>
             <el-table-column prop="reportNo" label="报告号" align="center" width="250">
               <template slot-scope="scope">
-                <el-tag type='danger'>
+                <el-tag :type='scope.row.reportNo == null ? "danger": "success" '>
                   {{ scope.row.reportNo == null ? '未取号' : scope.row.reportNo }}</el-tag>
               </template>
             </el-table-column>
-            <el-table-column prop="letterNo" label="复评函号" align="center" width="250">
+            <el-table-column prop="letterNo" label="复评函号" align="center" width=250 >
               <template slot-scope="scope">
-                <el-tag type='primary'>
+                <el-tag :type='scope.row.letterNo == null ? "danger": "success" '>
                   {{ scope.row.letterNo == null ? '未取号' : scope.row.letterNo }}</el-tag>
               </template>
             </el-table-column>
@@ -619,19 +619,19 @@
             </el-table-column>
             <el-table-column prop="statementNo" label="价值意见书号" align="center" width="250">
               <template slot-scope="scope">
-                <el-tag type='success'>
+                <el-tag :type='scope.row.statementNo == null ? "danger": "success" '>
                   {{ scope.row.statementNo == null ? '未取号' : scope.row.statementNo }}</el-tag>
               </template>
             </el-table-column>
             <el-table-column prop="reportNo" label="报告号" align="center" width="250">
               <template slot-scope="scope">
-                <el-tag type='danger'>
+                <el-tag :type='scope.row.reportNo == null ? "danger": "success" '>
                   {{ scope.row.reportNo == null ? '未取号' : scope.row.reportNo }}</el-tag>
               </template>
             </el-table-column>
-            <el-table-column prop="letterNo" label="复评函号" align="center" width=200 show-overflow-tooltip>
+            <el-table-column prop="letterNo" label="复评函号" align="center" width=250>
               <template slot-scope="scope">
-                <el-tag>
+                <el-tag :type='scope.row.letterNo == null ? "danger": "success" '>
                   {{ scope.row.letterNo == null ? '未取号' : scope.row.letterNo }}</el-tag>
               </template>
             </el-table-column>
@@ -1484,7 +1484,6 @@ import YDetailPageLayout from '@/components/YDetailPageLayout/index_detail'
 import WorkflowBoard from '@/components/workflowBoard'
 import ScanEntry from '@/components/ScanEntry'
 import { isNumber, phoneNumber, postiveInteger, isIdNumber } from '@/utils/validate'
-import { readonly } from 'vue'
 
 export default {
   name: 'majorTodoDetail',
@@ -1828,6 +1827,9 @@ export default {
       if (this.major.businessObjectType === '土地') {
         this.getLandTargetList();
       }
+      setTimeout(() => {
+        this.getProductions(this.majorId, (this.reportNo == null ? this.statementNo : this.reportNo));
+      },1000)
     }
     if (this.activeTagName === 'workflowLog') {
       this.getWorkflowLogs();
@@ -1985,6 +1987,7 @@ export default {
         let picked = new Object();
         picked.id = val[i].id;
         picked.amount = val[i].checkValue;
+        picked.name = val[i].statementNo;
         if (this.major.businessObjectType === '土地') {
           picked.acreage = val[i].useAcreage;
         } else {
@@ -2434,7 +2437,6 @@ export default {
       if (productionNo) {
         let totalAcreage = 0;
         let totalAmount = 0;
-        console.log(this.takeNumberItems)
         this.takeNumberItems.map(item => item.acreage).map(function (e) {
           totalAcreage += e;
         });
@@ -2452,6 +2454,7 @@ export default {
         production.clientAddress = this.major.bailorAddress;
         production.owner = this.major.owner;
         production.name = this.major.name;
+        production.statementNo = this.takeNumberItems[0].name;
         if (totalAcreage != 0) {
           production.evaluatePrice = (totalAmount * 10000 / totalAcreage).toFixed(0);
         } else {
@@ -2845,10 +2848,9 @@ export default {
       let commit = val.commit;
       let verify = new Object();
       verify.state = true;
-      verify.cleanReport = false;
       verify.nextHandlerId = this.secondCheckUserId;
+      let nodeCode = this.currentNode.nodeCode;
       if (commit.state === 'PASS') {
-        let nodeCode = this.currentNode.nodeCode;
         this.getProductions(this.majorId, (this.reportNo == null ? this.statementNo : this.reportNo));
         switch (nodeCode) {
           case 'WRITE_STATEMENT':
@@ -3036,33 +3038,41 @@ export default {
               callback(verify);
               return;
             }
+            break;
         }
         callback(verify);
       }
-      let specialNodesForReverse = ["WRITE_STATEMENT", "WRITE_REPORT", "WRITE_LETTER"];
-      if (commit.state === 'REVERSE' && specialNodesForReverse.includes(this.currentNode.nodeCode)) {
+      if (commit.state === 'REVERSE') {
         this.$refs.board.getPreviousNode();
-        let reportNos = this.evaluateLandData.map(item => item.reportNo);
-        //取了子号不能退回节点
-        if (this.pNode.nodeCode === "QUOTATION_FEEDBACK" && reportNos[0].includes("-")) {
-          this.$notify({
-            title: '提示',
-            message: '该订单已取了其他子号,不能退回节点。',
-            type: 'info',
-            duration: 2000,
-            offset: 100
-          });
-          verify.state = false;
-          verify.cleanReport = false;
-          callback(verify);
-        }
-        if (this.pNode.nodeCode === "QUOTATION_FEEDBACK" && !reportNos[0].includes("-")) {
-          verify.cleanReport = true;
-          callback(verify);
+        switch (nodeCode){
+          case "WRITE_STATEMENT":
+          case "WRITE_REPORT":
+          case "WRITE_LETTER":
+            if(this.productions.length>0){
+              if (!this.productions[0].ifReverse && this.pNode.nodeCode === "QUOTATION_FEEDBACK") {
+              // 需要验证兄弟流程节点信息
+                this.$notify({
+                  title: '提示',
+                  message: '已有其他子号流程正在进行中,不能退回到上一节点。',
+                  type: 'info',
+                  duration: 2000,
+                  offset: 100
+                });
+                verify.state = false;
+                callback(verify);
+                return
+              }else{
+                  verify.state = true;
+                  verify.cleanReport = true;
+                  callback(verify);
+                  return;
+              } 
+            }
         }
         callback(verify);
       }
     },
+    
     createPerformance(info) {
       let allots = this.performance.allots;
       let total = 0;