Browse Source

1.优化评估对象列表展示
2.针对四审节点开发

GouGengquan 1 year ago
parent
commit
9db15a5f0c
3 changed files with 131 additions and 121 deletions
  1. 3 1
      src/components/workflowBoard.vue
  2. 127 120
      src/views/assets/orderDetail.vue
  3. 1 0
      src/views/set/workflow/detail.vue

+ 3 - 1
src/components/workflowBoard.vue

@@ -85,7 +85,8 @@ export default {
         ifCheckTask:true,
         businessSubId:null,
         doSecondCheck:null,
-        doThirdCheck:null
+        doThirdCheck:null,
+        doFourthCheck:null
       },
       
     }
@@ -154,6 +155,7 @@ export default {
       commit.businessMinId = this.nodeBusinessInfo.businessMinId;
       commit.doSecondCheck = this.nodeBusinessInfo.doSecondCheck;
       commit.doThirdCheck = this.nodeBusinessInfo.doThirdCheck;
+      commit.doFourthCheck = this.nodeBusinessInfo.doFourthCheck;
       commit.ifFeedback = this.nodeBusinessInfo.ifFeedback;
       let isOk = true
       this.$emit('workflowCommitVerify',{"commit":commit},val =>{

+ 127 - 120
src/views/assets/orderDetail.vue

@@ -395,10 +395,16 @@
               </el-table-column>
               <el-table-column width="220" prop="reportNo" label="报告号" align="center" show-overflow-tooltip>
               </el-table-column>
-              <el-table-column prop="productionNo" label="产品出具状态" align="center" show-overflow-tooltip>
+              <el-table-column prop="statementCreateProductionDate" label="意见书出具状态" align="center" show-overflow-tooltip>
                 <template slot-scope="{row}">
-                  <span v-if="row.createProductionDate !== null">已出具</span>
-                  <span v-if="row.createProductionDate == null">未出具</span>
+                  <el-tag v-if="row.statementCreateProductionDate !== null" type='success'> 已出具</el-tag>
+                  <el-tag v-if="row.statementCreateProductionDate == null" type='danger'> 未出具</el-tag>
+                </template>
+              </el-table-column>
+              <el-table-column prop="reportCreateProductionDate" label="报告出具状态" align="center" show-overflow-tooltip>
+                <template slot-scope="{row}">
+                  <el-tag v-if="row.reportCreateProductionDate !== null" type='success'> 已出具</el-tag>
+                  <el-tag v-if="row.reportCreateProductionDate == null" type='danger'> 未出具</el-tag>
                 </template>
               </el-table-column>
               <el-table-column prop="purposeName" label="评估目的" align="center" show-overflow-tooltip>
@@ -437,8 +443,8 @@
                   </el-button>
                   <el-button v-if="currentNode.nodeCode === 'SPOT_RECONNAISSANCE_DETERMINE_PRICE'" type="text"
                     size="small" @click="assetsTargetDelete(scope.row.id)">删除</el-button>
-                  <el-button v-if="currentNode.nodeCode === 'REVIEW_STATEMENT'" type="text" size="small"
-                    @click="openCheckValueDialog(scope.row.id);">审核定价</el-button>
+                  <el-button v-if="currentNode.nodeCode === 'REVIEW_STATEMENT' || currentNode.nodeCode === 'CHECK_REPORT'"
+                    type="text" size="small" @click="openCheckValueDialog(scope.row.id);">审核定价</el-button>
                 </template>
               </el-table-column>
             </el-table>
@@ -458,11 +464,19 @@
               </el-divider>
             </div>
             <span v-if="currentNode.nodeCode === 'GENERATE_STATEMENT'">
-              选择要提交的产品:
+              选择要提交的意见书:
+              <el-select v-model="commitProductionNo" @change="pushProductionNo()" placeholder="请选择要提交的产品"
+                style="width: 300px;">
+                <el-option v-for="(pro, productionNo) in assetsProductionData" v-if="pro.productionType == 'STATEMENT'"
+                  :label="pro.productionNo" :value="pro.productionNo" :key="pro.id"></el-option>
+              </el-select>
+            </span>
+            <span v-if="currentNode.nodeCode === 'WRITE_REPORT'">
+              选择要提交的报告:
               <el-select v-model="commitProductionNo" @change="pushProductionNo()" placeholder="请选择要提交的产品"
                 style="width: 300px;">
-                <el-option v-for="(pro, productionNo) in assetsProductionData" :label="pro.productionNo"
-                  :value="pro.productionNo" :key="pro.id"></el-option>
+                <el-option v-for="(pro, productionNo) in assetsProductionData" v-if="pro.productionType !== 'STATEMENT'"
+                  :label="pro.productionNo" :value="pro.productionNo" :key="pro.id"></el-option>
               </el-select>
             </span>
             <div style="margin-top: 30px;">
@@ -535,14 +549,34 @@
                     @click="openWriteProductionDialog(false, 'edit'), getAssetsProductionDetail(scope.row.id)">
                     编辑
                   </el-button>
-                  <el-button v-if="currentNode.nodeCode === 'REVIEW_STATEMENT'" type="text" size="small"
-                    @click="productionPerformanceForm.productionId = scope.row.id, openProductionCheckDialog(), productionCheckDialogVisible = true">
+                  <el-button
+                    v-if="currentNode.nodeCode === 'REVIEW_STATEMENT' && scope.row.productionType === 'STATEMENT'"
+                    type="text" size="small"
+                    @click="productionPerformanceForm.productionId = scope.row.id, openProductionCheckDialog()">
                     审核意见书
                   </el-button>
-                  <el-button v-if="currentNode.nodeCode === 'REEXAMINE_STATEMENT'" type="text" size="small"
-                    @click="productionPerformanceForm.productionId = scope.row.id, openProductionCheckDialog(), productionCheckDialogVisible = true">
+                  <el-button
+                    v-if="currentNode.nodeCode === 'REEXAMINE_STATEMENT' && scope.row.productionType === 'STATEMENT'"
+                    type="text" size="small"
+                    @click="productionPerformanceForm.productionId = scope.row.id, openProductionCheckDialog()">
                     复审意见书
                   </el-button>
+                  <el-button v-if="currentNode.nodeCode === 'CHECK_REPORT' && scope.row.productionType !== 'STATEMENT'"
+                    type="text" size="small"
+                    @click="productionPerformanceForm.productionId = scope.row.id, openProductionCheckDialog()">
+                    审核报告
+                  </el-button>
+                  <el-button v-if="currentNode.nodeCode === 'RECHECK_REPORT' && scope.row.productionType !== 'STATEMENT'"
+                    type="text" size="small"
+                    @click="productionPerformanceForm.productionId = scope.row.id, openProductionCheckDialog()">
+                    复审报告
+                  </el-button>
+                  <el-button
+                    v-if="currentNode.nodeCode === 'FOURTH_CHECK_REPORT' && scope.row.productionType !== 'STATEMENT'"
+                    type="text" size="small"
+                    @click="productionPerformanceForm.productionId = scope.row.id, openProductionCheckDialog()">
+                    四审报告
+                  </el-button>
                   <el-button v-if="currentNode.nodeCode === 'STATEMENT_IN' || currentNode.nodeCode === 'REPORT_IN'"
                     type="text" size="small" @click="openWareHouseDialog(scope.row);">产品入库</el-button>
                   <el-button v-if="currentNode.nodeCode === 'STATEMENT_OUT' || currentNode.nodeCode === 'REPORT_OUT'"
@@ -1190,7 +1224,8 @@ export default {
         reportNos: [],
         currentNodeInstanceCode: null,
         ifCheckTask: true,
-        ifPay: null
+        ifPay: null,
+        doFourthCheck: false
       },
       currentNode: {
         flowId: null,
@@ -1457,6 +1492,7 @@ export default {
       productionWriteDialogVisible: false,
       // 评估对象审核定价表单可视状态
       checkValueDialogVisible: false,
+      isCheckValue: false,
       // 0:新增,1:更新
       productionChoiceStatus: 0,
       // 产品表单
@@ -1571,12 +1607,14 @@ export default {
     this.getProductionTypes(this.pageParams.row.assetsId);
     this.nodeBusinessInfo.mainBusiness = 'ASSET_BUSINESS';
     this.nodeBusinessInfo.businessSubId = this.pageParams.row.statementNo;
+    this.nodeBusinessInfo.businessMinId = this.pageParams.row.reportNo;
     this.getCurrentNodeInfo();
     this.getAllotDepartment();
     this.getCustomerCompany(0);
     this.getCustomerCompany(1);
     this.getAssetsDetailById(this.pageParams.row.assetsId);
     this.getProductionByBusinessId(this.pageParams.row.assetsId);
+    this.getAETargetListByAssetsId();
     this.getProductionList();
     this.nodeBusinessInfo.reportNos.push(this.pageParams.row.statementNo);
   },
@@ -1599,6 +1637,7 @@ export default {
 
     },
     workflowCommitVerify(val, callback) {
+      console.log(val);
       let commit = val.commit;
       let verify = new Object();
       verify.state = true;
@@ -1632,7 +1671,6 @@ export default {
               return;
             }
             if (this.proInatanceCount > 0) {
-
               this.$notify({
                 title: '提示',
                 message: '该产品已提交相应流程,不可重复提交。',
@@ -1643,23 +1681,9 @@ export default {
               callback(verify);
               return;
             }
-            // let selected = this.productions.filter(function (e) {
-            //   return e.reportNo === commit.businessSubId
-            // })
-            // if (!selected[0].name) {
-            //   this.$notify({
-            //     title: '提示',
-            //     message: '请完成所选产品的基本信息后,再进行流程提交。',
-            //     type: 'error',
-            //     duration: 3000
-            //   });
-            //   verify.state = false;
-            //   callback(verify);
-            //   return;
-            // }
             break;
           case 'WRITE_REPORT':
-            let notTakeReportNoTargets = this.evaluateLandData.filter(function (e) {
+            let notTakeReportNoTargets = this.assetsEvaluationTarget.filter(function (e) {
               return e.reportNo == null;
             })
             if (notTakeReportNoTargets.length > 0) {
@@ -1684,54 +1708,10 @@ export default {
               callback(verify);
               return;
             }
-            let selected1 = this.productions.filter(function (e) {
-              return e.reportNo === commit.businessMinId
-            })
-            if (!selected1[0].name) {
-              this.$notify({
-                title: '提示',
-                message: '请完成所选产品的基本信息后,再进行流程提交。',
-                type: 'error',
-                duration: 3000
-              });
-              verify.state = false;
-              callback(verify);
-              return;
-            }
-            break;
-          case 'WRITE_LETTER':
-            let notTakeLetterNumberTargets = this.evaluateLandData.filter(function (e) {
-              return e.letterNo == null;
-            })
-            if (notTakeLetterNumberTargets.length > 0) {
-              this.$notify({
-                title: '提示',
-                message: '还有复评函号未取的估价对象,请先完成取号操作。',
-                type: 'error',
-                duration: 3000
-              });
-              verify.state = false;
-              callback(verify);
-              return;
-            }
-            if (typeof (commit.businessMinId) == 'undefined' || commit.businessMinId == null || commit.ifCheckTask == null) {
-              this.$notify({
-                title: '提示',
-                message: '请选择一个产品后,再进行流程提交。',
-                type: 'error',
-                duration: 3000
-              });
-              verify.state = false;
-              callback(verify);
-              return;
-            }
-            let selected2 = this.productions.filter(function (e) {
-              return e.reportNo === commit.businessMinId
-            })
-            if (!selected2[0].name) {
+            if (this.proInatanceCount > 0) {
               this.$notify({
                 title: '提示',
-                message: '请完成所选产品的基本信息后,再进行流程提交。',
+                message: '该产品已提交相应流程,不可重复提交。',
                 type: 'error',
                 duration: 3000
               });
@@ -1740,29 +1720,13 @@ export default {
               return;
             }
             break;
-          case "CHECK_STATEMENT":
-          case "CHECK_REPORT":
-          case "CHECK_LETTER":
-            if (!verify.nextHandlerId) {
-              verify.state = false;
-              callback(verify);
-              this.chooseSecondCheckerDialog = true
-              this.$api.dictData.remark("MAJOR_SECOND_CHECK_USERS").then(res => {
-                if (res.code === 200) {
-                  this.secondCheckUsers = res.data;
-                  //默认复审人
-                  this.secondCheckUserId = res.data[0].remark;
-                }
-              })
-              return;
-            }
         }
         callback(verify);
       }
       let specialNodesForReverse = ["GENERATE_STATEMENT", "WRITE_REPORT", "WRITE_LETTER"];
       if (commit.state === 'REVERSE' && specialNodesForReverse.includes(this.currentNode.nodeCode)) {
         this.$refs.board.getPreviousNode();
-        let reportNos = this.evaluateLandData.map(item => item.reportNo);
+        let reportNos = this.assetsEvaluationTarget.map(item => item.reportNo);
         //取了子号不能退回节点
         if (this.pNode.nodeCode === "QUOTATION_FEEDBACK" && reportNos[0].includes("-")) {
           this.$notify({
@@ -1992,7 +1956,7 @@ export default {
     // 根据资产业务id获取资产业务评估对象集合
     getAETargetListByAssetsId(productionNo) {
       let aETargetListSelectDTO = new Object();
-      aETargetListSelectDTO.businessId = this.assetsForm.id;
+      aETargetListSelectDTO.businessId = this.pageParams.row.assetsId;
       // if (productionNo != null || productionNo != undefined || productionNo != '') {
       //   aETargetListSelectDTO.statementNo = productionNo;
       //   aETargetListSelectDTO.reportNo = productionNo;
@@ -2004,11 +1968,11 @@ export default {
         if (res.code === 200) {
           this.assetsEvaluationTarget = res.data;
           this.writeProductionStatementNos = this.assetsEvaluationTarget.filter(obj => obj.createProductionDate == null || obj.createProductionDate == '').map(obj => obj.statementNo);
-          this.writeProductionReportNos = this.assetsEvaluationTarget.map(obj => obj.reportNo).filter(createProductionDate => createProductionDate == null || createProductionDate == '');
+          this.writeProductionReportNos = this.assetsEvaluationTarget.filter(obj => obj.createProductionDate == null || obj.createProductionDate == '').map(obj => obj.reportNo);
           // for (let i = 0; i < res.data.length; i++) {
           //   this.nodeBusinessInfo.reportNos.push(res.data[i].productionNo);
           // }
-
+          this.flowDoFourthCheck();
         }
       })
     },
@@ -2508,9 +2472,12 @@ export default {
     // 根据业务id与产品号查询产品信息
     getProductionList() {
       let aProListSelectDTO = new Object();
-      aProListSelectDTO.businessId = this.assetsForm.id;
+      aProListSelectDTO.businessId = this.pageParams.row.assetsId;
       aProListSelectDTO.statementNo = this.pageParams.row.statementNo;
       aProListSelectDTO.reportNo = this.pageParams.row.reportNo;
+      if (this.currentNode.nodeCode == 'WRITE_REPORT' && this.assetsEvaluationTarget[0].statementNo !== null) {
+        aProListSelectDTO.reportNo = this.assetsEvaluationTarget[0].reportNo;
+      }
       this.$api.assets.getProductionList(aProListSelectDTO).then(res => {
         if (res.code == 200) {
           this.assetsProductionData = res.data;
@@ -2521,7 +2488,12 @@ export default {
     pushProductionNo() {
       this.nodeBusinessInfo.reportNos = [];
       this.nodeBusinessInfo.reportNos.push(this.commitProductionNo);
-      this.nodeBusinessInfo.businessSubId = this.commitProductionNo;
+      if (this.currentNode.nodeCode == 'GENERATE_STATEMENT') {
+        this.nodeBusinessInfo.businessSubId = this.commitProductionNo;
+      }
+      if (this.currentNode.nodeCode == 'WRITE_REPORT') {
+        this.nodeBusinessInfo.businessMinId = this.commitProductionNo;
+      }
 
       // 查询该产品是否已有提交的流程
       let aProListSelectDTO = { businessId: null, productionNo: null, productionNos: [] };
@@ -2533,11 +2505,19 @@ export default {
         }
       })
 
-      //判断是否还有未撰写的产品(false:无,提交时完成节点 true:有,提交时不完成节点)
-      let isNotWriteAllPro = this.assetsEvaluationTarget.some(obj =>
-        (obj.createProductionDate === null || obj.createProductionDate === '')
-      );
-      if (this.currentNode.nodeCode === 'GENERATE_STATEMENT' && isNotWriteAllPro) {
+      //判断是否还有未撰写或未提交的产品(false:无,提交时完成节点 true:有,提交时不完成节点)
+      let isNotWriteAllPro = true;
+      if (this.currentNode.nodeCode === 'GENERATE_STATEMENT') {
+        isNotWriteAllPro = this.assetsEvaluationTarget.some(obj =>
+          (obj.statementCreateProductionDate === null || obj.statementCreateProductionDate === '')
+        );
+      }
+      if (this.currentNode.nodeCode === 'WRITE_REPORT') {
+        isNotWriteAllPro = this.assetsEvaluationTarget.some(obj =>
+          (obj.reportCreateProductionDate === null || obj.reportCreateProductionDate === '')
+        );
+      }
+      if (isNotWriteAllPro) {
         this.nodeBusinessInfo.ifCheckTask = false;
       } else {
         aProListSelectDTO.productionNos = this.assetsProductionData.map(obj => obj.productionNo);
@@ -2580,6 +2560,7 @@ export default {
               });
               this.checkValueDialogVisible = false;
               this.getAETargetListByAssetsId();
+              this.isCheckValue = true;
             }
           })
         }
@@ -2624,26 +2605,36 @@ export default {
     },
     // 根据业务类型,产品id及checkLoop获取质检信息
     openProductionCheckDialog() {
-      this.productionPerformanceForm.businessType = 'ASSET_BUSINESS';
       const curNode = this.currentNode.nodeCode;
-      if (curNode === 'REVIEW_STATEMENT' || curNode === 'CHECK_REPORT') {
-        this.productionPerformanceForm.checkLoop = "初审";
-      }
-      if (curNode === 'REEXAMINE_STATEMENT' || curNode === 'RECHECK_REPORT') {
-        this.productionPerformanceForm.checkLoop = "复审";
-      }
-      if (curNode === 'FOURTH_CHECK_REPORT') {
-        this.productionPerformanceForm.checkLoop = "三审";
-      }
-      this.$api.businessProductionPerformance.getProductionPerformance(this.productionPerformanceForm).then(res => {
-        if (res.code === 200 && res.data != null) {
-          this.productionPerformanceForm.id = res.data.id;
-          this.productionPerformanceForm.fatalMistake = res.data.fatalMistake;
-          this.productionPerformanceForm.hardMistake = res.data.hardMistake;
-          this.productionPerformanceForm.normalMistake = res.data.normalMistake;
-          this.productionPerformanceForm.reason = res.data.reason;
+      if (!this.isCheckValue && !(curNode === 'REVIEW_STATEMENT' || curNode === 'CHECK_REPORT')) {
+        this.productionCheckDialogVisible = true;
+        this.productionPerformanceForm.businessType = 'ASSET_BUSINESS';
+        if (curNode === 'REVIEW_STATEMENT' || curNode === 'CHECK_REPORT') {
+          this.productionPerformanceForm.checkLoop = "初审";
         }
-      })
+        if (curNode === 'REEXAMINE_STATEMENT' || curNode === 'RECHECK_REPORT') {
+          this.productionPerformanceForm.checkLoop = "复审";
+        }
+        if (curNode === 'FOURTH_CHECK_REPORT') {
+          this.productionPerformanceForm.checkLoop = "四审";
+        }
+        this.$api.businessProductionPerformance.getProductionPerformance(this.productionPerformanceForm).then(res => {
+          if (res.code === 200 && res.data != null) {
+            this.productionPerformanceForm.id = res.data.id;
+            this.productionPerformanceForm.fatalMistake = res.data.fatalMistake;
+            this.productionPerformanceForm.hardMistake = res.data.hardMistake;
+            this.productionPerformanceForm.normalMistake = res.data.normalMistake;
+            this.productionPerformanceForm.reason = res.data.reason;
+          }
+        })
+      } else {
+        this.$notify({
+          title: '警告',
+          message: '评估对象需要进行审核定价',
+          type: 'error',
+          duration: 3000
+        });
+      }
     },
     // 保存产品质检信息(新增与保存都是这个方法)
     saveQuality() {
@@ -2735,6 +2726,22 @@ export default {
           });
         }
       })
+    },
+    // 判断流程是否进行四审
+    flowDoFourthCheck(){
+      if(this.currentNode.nodeCode == 'RECHECK_REPORT'){
+        // 判断评估值是否超过8000万
+        let isSubstantialAssets = this.assetsEvaluationTarget.reduce((sum, obj) => { return sum + obj.estimatedValue; }, 0) > 8000;
+        // 获取是否有评估目的为搬迁、司法涉讼的评估对象
+        let isLawsuit = this.assetsEvaluationTarget.some(obj => obj.purposeName === '搬迁' ||  obj.purposeName === '资产涉讼' );
+        // 获取是否证券项目
+        let isSecurity = this.assetsForm.security;
+        // 是否证券项目,或是否评估目的搬迁、诉讼,或是否价值大于8000万
+        if(isSecurity || isLawsuit || isSubstantialAssets){
+          this.nodeBusinessInfo.doFourthCheck = true;
+        }
+        console.log(isSubstantialAssets,isLawsuit,isSecurity,this.nodeBusinessInfo.doFourthCheck);
+      }
     }
   }
 

+ 1 - 0
src/views/set/workflow/detail.vue

@@ -153,6 +153,7 @@
               <el-option key="5" label="出具产品类型校验(个贷)" value="CHECK_PERSONAL_PRODUCTION_TYPE"/>
               <el-option key="6" label="客户类型校验(个贷)" value="CHECK_PERSONAL_CLIENT_TYPE"/>
               <el-option key="7" label="出具产品类型校验(资产)" value="CHECK_ASSET_PRODUCTION_TYPE"/>
+              <el-option key="8" label="报告四审校验(资产)" value="CHECK_ASSET_FOURTH_CHECK_REPORT"/>
             </el-select>
         </el-form-item>
         <el-form-item label="节点任务:" prop="tasks">