瀏覽代碼

个贷结果报告

wucl 1 年之前
父節點
當前提交
46a012e8d6
共有 2 個文件被更改,包括 45 次插入6 次删除
  1. 1 0
      src/utils/personalUtil.js
  2. 44 6
      src/views/personal/todoDetail.vue

+ 1 - 0
src/utils/personalUtil.js

@@ -19,6 +19,7 @@ export function calculateTargetPrice(params) {
 //出让简单算术平均
 function simplesCalculate(params){
     let data = params.analysisData;
+    console.log(params)
     let fixValue = parseFloat(params.fixValue);
     let exampleA = new Object();
     let exampleB = new Object();

+ 44 - 6
src/views/personal/todoDetail.vue

@@ -545,7 +545,7 @@
                       :rules="{required: true, message: '是否划拨不能为空', trigger: 'blur'}"
                       class="postInfo-container-item"
                     >
-                      <el-select v-model="compareList.rightsType" placeholder="请选择">
+                      <el-select v-model="compareList.rightsType" placeholder="请选择" @change="selectRightsType()">
                         <el-option label="划拨" value="ALLOT">划拨</el-option>
                         <el-option label="出让" value="SELL">出让</el-option>
                       </el-select>
@@ -559,7 +559,7 @@
                       :rules="{required: compareList.rightsType==='ALLOT', message: '是否划拨不能为空', trigger: 'blur'}"
                       class="postInfo-container-item"
                     >
-                      <el-select v-model="compareList.rollingLevel" placeholder="请选择">
+                      <el-select v-model="compareList.rollingLevel" placeholder="请选择" @change="selectRoll()">
                         <el-option label="二环内" :value=1>二环内</el-option>
                         <el-option label="二至三环" :value=2>二至三环</el-option>
                         <el-option label="三环外" :value=3>三环外</el-option>
@@ -944,7 +944,7 @@
                   <div style="padding: 14px;">
                     <span>结果报告</span><time class="time">{{ finalReprotProd.created }}</time>
                     <div class="control">
-                      <el-button type="text" class="button">系统生成</el-button>
+                      <el-button type="text" class="button" @click="genProductionFile(3)">系统生成</el-button>
                       <el-upload class="myupload"
                       :action="'/api/personalProduction/upload/'+target.id+'/3'" :file-list="finalReprotProd.files" 
                               :limit="1" :on-exceed="handleExceed" :on-preview="handleAttachmentPreview" :on-success="getProductions"
@@ -1219,7 +1219,10 @@
               immovableCertificate:null,
               entityInfo:null,
               backgroundInfo:null,
-              sellingAbility:null
+              sellingAbility:null,
+              sellMoney:null,
+              sellMoneyBase:null,
+              sellMoneyRate:null
             },
             compareList:{
               targetId:null,
@@ -1321,7 +1324,10 @@
               ],
               price:null,
               amount:null,
-              acreage:null
+              acreage:null,
+              sellMoney:null,
+              sellMoneyBase:null,
+              sellMoneyRate:null
             },
             needWeight:['所在楼栋','建筑面积(平)','户型','其他'],
             requiredIndex:['单价(元)','坐落','市场状况','所在楼栋','建筑面积(平)','户型','室内装饰','楼层/总楼层','权重'],
@@ -1623,6 +1629,9 @@
           this.target.price = this.compareList.price;
           this.target.acreage = this.compareList.acreage;
           this.compareList.targetId= this.target.id;
+          this.target.sellMoneyRate = this.compareList.sellMoneyRate;
+          this.target.sellMoney = this.compareList.sellMoney;
+          this.target.sellMoneyBase = this.compareList.sellMoneyBase;
           let taskRecord = this.buildTaskRecordDTO(this.compareList);
            this.$api.personalCalculate.calculate(taskRecord).then(res=>{
               if (res.code ===200 && res.data){
@@ -1706,7 +1715,10 @@
           this.nodeBusinessInfo.ifFeedback = true;
            if (this.target.id && this.target.feedback && this.target.feedback!='NONE'){
               this.nodeBusinessInfo.ifFeedback = false;
-              this.$api.personalTarget.feedback(this.target);
+              const feedbackReq = new Object();
+              feedbackReq.feedback = this.target.feedback;
+              feedbackReq.id = this.target.id;
+              this.$api.personalTarget.feedback(feedbackReq);
            }
            this.$notify({
               title: '保存成功',
@@ -1839,6 +1851,32 @@
               }
           })
         },
+        selectRoll(){
+          let roll = this.compareList.rollingLevel;
+          this.compareList.sellMoneyRate = 0.01;
+          if (roll === 1){
+              this.compareList.sellMoneyBase = 12000;
+              this.compareList.sellMoney = 12000 * 0.01;
+          }else if (roll === 2){
+              this.compareList.sellMoneyBase = 10800;
+              this.compareList.sellMoney = 10800 * 0.01;
+          }else {
+              this.compareList.sellMoneyBase = 10100;
+              this.compareList.sellMoney = 10100 * 0.01;
+          }
+        },
+        selectRightsType(){
+          if (this.compareList.rightsType==='SELL'){
+            this.compareList.sellMoneyRate = null;
+            this.compareList.sellMoneyBase = null;
+            this.compareList.sellMoney = null;
+            this.target.sellMoneyRate = null;
+            this.target.sellMoneyBase = null;
+            this.target.sellMoney = null;
+          }else {
+            this.selectRoll();
+          }
+        }
       }
     }
   </script>