瀏覽代碼

个贷产品一键生成

wucl 11 月之前
父節點
當前提交
023278d616
共有 3 個文件被更改,包括 70 次插入6 次删除
  1. 3 0
      src/api/modules/personalProduction.js
  2. 3 1
      src/views/major/todoDetail.vue
  3. 64 5
      src/views/personal/todoDetail.vue

+ 3 - 0
src/api/modules/personalProduction.js

@@ -7,6 +7,9 @@ export default {
    genFile(params1,params2){
     return request.get(`personalProduction/${params1}/${params2}`)
    },
+   genFileAll(params1){
+      return request.get(`personalProduction/gen/${params1}`)
+     },
    getProductions(params){
       return request.get(`personalProduction/${params}`)
    },

+ 3 - 1
src/views/major/todoDetail.vue

@@ -1313,7 +1313,9 @@
               <el-col :xs="24" :sm="12" :lg="12" :span="6">
                 <el-form-item label="初步定价:" prop="evaluateValue" label-width="160px"
                   :class="['postInfo-container-item', 'task-class']">
-                  <el-input v-model="landTarget.evaluateValue" class="filter-item">
+                  <el-input v-model="landTarget.evaluateValue" 
+                  :disabled="currentNode.nodeCode === 'REVIEW_QUOTATION'"
+                  :readonly="currentNode.nodeCode === 'REVIEW_QUOTATION'" class="filter-item">
                     <template slot="append">万</template>
                   </el-input>
                 </el-form-item>

+ 64 - 5
src/views/personal/todoDetail.vue

@@ -823,6 +823,8 @@
                 <h3 class="title">
                   <div class="avatar-wrapper icon-title">产品</div>
                   <div class="icon-info">产品信息</div>
+                  <el-button type="text" style="margin-left: 20px;" @click="generateAll()">一键生成</el-button>
+                  <el-button type="text" style="margin-left: 20px;" @click="downloadAll()">全部下载</el-button>
                 </h3>
               </el-divider>
             </div>
@@ -2171,11 +2173,6 @@ export default {
         this.selectRoll();
       }
     },
-    downloadPkg() {
-      if (this.target.id) {
-        this.$api.personalProduction.downloadPkg(this.target.id);
-      }
-    },
     doStamp(files) {
       const file = files[0];
       if (file) {
@@ -2506,6 +2503,68 @@ export default {
         this.compareList.analysisData[3].compareA.valueA = new Date(currentYear,month-3,2)
       }
      
+    },
+    generateAll(){
+      const certificates = this.personal.credentials
+      for (let i in certificates) {
+        if (certificates[i] === 'HOUSE_CERTIFICATE' && !this.target.houseCertificate) {
+          this.$message('房产证未点击保存');
+          return;
+        }
+        if (certificates[i] === 'LAND_CERTIFICATE' && !this.target.landCertificate) {
+          this.$message('国土证未点击保存');
+          return;
+        }
+        if (certificates[i] === 'IMMOVABLE_CERTIFICATE' && !this.target.immovableCertificate) {
+          this.$message('不动产权证未点击保存');
+          return;
+        }
+      }
+      if (!this.target.entityInfo) {
+        this.$message('实物状况未点击保存');
+        return;
+      }
+      if (!this.target.backgroundInfo) {
+        this.$message('区位状况未点击保存');
+        return;
+      }
+      if (!this.target.sellingAbility) {
+        this.$message('变现能力未点击保存');
+        return;
+      }
+      this.$confirm('系统生成将会覆盖原有文档,请确认是否继续?', '提示', {
+        confirmButtonText: '确认',
+        cancelButtonText: '取消',
+        type: 'warning',
+        center: true
+      }).then(() => {
+        if (this.personal.id && this.target.id) {
+          this.$api.personalProduction.genFileAll(this.personal.id).then(res => {
+            if (res.code === 200 && res.data) {
+              this.$notify({
+                title: '成功',
+                message: '一键生成成功',
+                type: 'success',
+                duration: 2000
+              });
+              this.getProductions();
+              this.getPersonalTarget();
+            } else {
+              this.$notify({
+                title: '失败',
+                message: '一键生成失败',
+                type: 'error',
+                duration: 2000
+              });
+            }
+          })
+        }
+      })
+    },
+    downloadAll(){
+      if (this.target.id) {
+        this.$api.personalProduction.downloadPkg(this.target.id);
+      }
     }
   }
 }