Parcourir la source

个贷口估历史页面

wucl il y a 3 mois
Parent
commit
bbffa9dde7

+ 6 - 2
src/api/modules/personalFacePrice.js

@@ -18,7 +18,11 @@ export default {
     return request.post(`personalFacePrice/external/community/price`, params)
   },
   saveFacePrice(params){
-    return request.post(`personalFacePrice/save`, params)
-  }
+    return request.post(`personalFacePrice`, params)
+  },
+  getPage(params){
+    return request.get(`personalFacePrice`, { params: params })
+  },
+
 
 }

+ 2 - 0
src/router/urlMap.js

@@ -157,6 +157,7 @@ import _views_finance_fine_refund from '@/views/finance/fineRefund'
 import _views_finance_production_return from '@/views/finance/productionReturn'
 import _views_finance_production_return_detail from '@/views/finance/productionReturnDetail'
 import _views_personal_face_price from '@/views/personal/facePrice'
+import _views_personal_face_price_history from '@/views/personal/facePriceHistory'
 
 export default {
   _views_set_menu,
@@ -303,5 +304,6 @@ export default {
   _views_finance_production_return,
   _views_finance_production_return_detail,
   _views_personal_face_price,
+  _views_personal_face_price_history
 
 }

+ 20 - 0
src/utils/personalUtil.js

@@ -390,4 +390,24 @@ export function validateParams(data){
         }
     }
      return flag;
+}
+
+export function copyFacePriceWords(context){
+    if (context){
+        var element = document.createElement('textarea');
+        element.textContent= context;
+        document.body.appendChild(element); 
+        if (document.selection) {
+          var range = document.body.createTextRange();
+          range.moveToElementText(element);
+          range.select();
+        } else if (window.getSelection) {
+          var range = document.createRange();
+          range.selectNode(element);
+          window.getSelection().removeAllRanges();
+          window.getSelection().addRange(range);
+        }
+        document.execCommand('copy'); 
+        document.body.removeChild(element);
+      }
 }

Fichier diff supprimé car celui-ci est trop grand
+ 14 - 1
src/views/complex/index.vue


+ 27 - 15
src/views/personal/facePrice.vue

@@ -4,21 +4,22 @@
             <breadcrumb id="breadcrumb-container" class="breadcrumb-container" />
         </div>
         <div class="query-class">
-            <el-input placeholder="请输入内容" v-model.trim="queryParam.queryTarget" class="input-with-select" clearable>
+            <el-tooltip :content="queryType==='location'?'标准地址格式:成都市xx区xx(路/街/段/巷)xx号(楼盘名)x栋x楼x号':'楼盘名去掉开发商名字可提高查询命中率(例:德商华府天骄->华府天骄)'" placement="top-end" effect="light">
+                <el-input placeholder="请输入内容" v-model.trim="queryParam.queryTarget" class="input-with-select" clearable>
                 <el-select v-model="queryType" slot="prepend" placeholder="请选择" style="width: 130px;">
                     <el-option label="口估地址" value="location"></el-option>
-                    <el-option label="口估小区名字" value="communityName"></el-option>
+                    <el-option label="口估楼盘名" value="communityName"></el-option>
                 </el-select>
             </el-input>
-            <!-- <el-input style="margin-left: 20px; width: 300px;" type="number" v-model.number="queryParam.acreage" placeholder="请输入面积">
-                <template slot="prepend">口估面积</template>
-</el-input> -->
+            </el-tooltip>
+           
             <el-select v-model="queryParam.limit" placeholder="请选择">
                 <el-option key="1" label="两年内" value="两年内"></el-option>
                 <el-option key="2" label="一年内" value="一年内"></el-option>
                 <el-option key="3" label="半年内" value="半年内"></el-option>
                 <el-option key="4" label="三月内" value="三月内"></el-option>
                 <el-option key="5" label="一月内" value="一月内"></el-option>
+                <el-option key="6" label="不限" value="不限"></el-option>
 
             </el-select>
             <el-input style="margin-left: 20px; width: 300px; color: red;" :value="currentDate" disabled readonly>
@@ -26,7 +27,7 @@
             </el-input>
             <el-button style="margin-left: 20px;" type="success" @click="queryFacePrice()">口估查询</el-button>
 
-            <el-button style="margin-left: 20px;" type="danger" @click="openFacePrice()" :disabled="dyData.length==0">执行口估</el-button>
+            <el-button style="margin-left: 20px;" type="danger" @click="openFacePrice()" :disabled="dyData.length==0 && queryParam.queryTarget==null || queryParam.queryTarget==''">执行口估</el-button>
 
         </div>
 
@@ -69,7 +70,11 @@
                                 }}</span>
                         </template>
                     </el-table-column>
-
+                    <el-table-column label="装修情况" align="center" prop="decoration">
+                        <template slot-scope="{row}">
+                            <span>{{ row.decoration }}</span>
+                        </template>
+                    </el-table-column>
                     <el-table-column label="楼层" align="center" prop="atFloor">
                         <template slot-scope="{row}">
                             <span>{{ row.atFloor }}</span>
@@ -85,11 +90,6 @@
                             <span>{{ row.houseType }}</span>
                         </template>
                     </el-table-column>
-                    <el-table-column label="装修情况" align="center" prop="decoration">
-                        <template slot-scope="{row}">
-                            <span>{{ row.decoration }}</span>
-                        </template>
-                    </el-table-column>
                     <el-table-column label="价值时点" align="center" prop="valueTiming">
                         <template slot-scope="{row}">
                             <span>{{ row.valueTiming }}</span>
@@ -451,7 +451,12 @@ export default {
                 faceAcreage:null,
                 dealPrice:null,
                 upPrice:null,
-                dyAvgPrice:null
+                dyAvgPrice:null,
+                limitDate:null,
+                queryTarget:null,
+                queryType:null,
+                dyExampleNum:null,
+                externalExampleNum:null
             }
 
         }
@@ -469,7 +474,7 @@ export default {
         queryFacePrice() {
             let query = this.queryParam;
             if (this.queryType === 'location') {
-                if (query) {
+                if (query.queryTarget!=null && query.queryTarget!='') {
                     this.personalPriceByLocation(query);
                     this.externalPriceByLocation(query);
                     this.showQueryTarget = this.queryParam.queryTarget;
@@ -478,7 +483,7 @@ export default {
                     this.$message.error("口估地址或小区名字不能为空")
                 }
             } else {
-                if (query) {
+                if (query.queryTarget!=null && query.queryTarget!='') {
                     this.personalPriceByCommunity(query);
                     this.externalPersonalPriceByCommunity(query);
                     this.showQueryTarget = this.queryParam.queryTarget;
@@ -543,14 +548,21 @@ export default {
                 if (valid){
                     this.facePriceFrom.dealPrice = this.enternalData.dealPrice;
                     this.facePriceFrom.upPrice = this.enternalData.upPrice;
+                    this.facePriceFrom.limitDate = this.queryParam.limit;
                     let total = this.dyData.map(item=>item.price).reduce((accumulator, currentValue) => accumulator + currentValue, 0);
                     this.facePriceFrom.dyAvgPrice = Math.round(total/this.dyData.length);
+                    this.facePriceFrom.dyExampleNum = this.dyData.length;
+                    this.facePriceFrom.externalExampleNum = this.enternalData.deals.length + this.enternalData.ups.length;
+                    this.facePriceFrom.queryTarget = this.queryParam.queryTarget;
+                    this.facePriceFrom.queryType = this.queryType=='location'?'地址':'楼盘名';
                     this.$api.personalFacePrice.saveFacePrice(this.facePriceFrom).then(res=>{
                         if (res.code===200 && res.data){
                             this.$message.success("执行口估成功")
+                            this.facePriceDialog = false;
                         }else{
                             this.$message.error("执行口估失败")
                         }
+                        
                     });
                 }
             })

+ 243 - 0
src/views/personal/facePriceHistory.vue

@@ -0,0 +1,243 @@
+<template>
+  <div class="app-container">
+    <div class="title-container">
+      <breadcrumb id="breadcrumb-container" class="breadcrumb-container" />
+    </div>
+    <y-page-list-layout :page-list="pageData" :page-para="listQuery" :get-page-list="getPage">
+      <template slot="left">
+       
+        <el-input v-model="listQuery.userName" placeholder="口估人员" clearable style="width: 200px;float: left;"></el-input>
+        <el-input v-model="listQuery.queryTarget" placeholder="口估标的" clearable style="margin-left: 20px;width: 400px;float: left;"></el-input>
+        <el-select v-model="listQuery.queryType" placeholder="查询方式" clearable filterable style="margin-left: 20px;width: 100px;float: left;" class="filter-item">
+          <el-option label="地址" value="地址" />
+          <el-option label="楼盘名" value="楼盘名" />
+        </el-select>
+        <el-select v-model="listQuery.limitDate" placeholder="口估范围" clearable filterable style="margin-left: 20px;width: 100px;float: left;" class="filter-item">
+          <el-option label="两年内" value="两年内" />
+          <el-option label="一年内" value="一年内" />
+          <el-option label="半年内" value="半年内" />
+          <el-option label="三月内" value="三月内" />
+          <el-option label="一月内" value="一月内" />
+        </el-select>
+        <el-date-picker
+              style="margin-left: 20px;float: left;"
+              v-model="payDate"
+              type="daterange"
+              align="center"
+              unlink-panels
+              range-separator="至"
+              start-placeholder="价值时点(开始)"
+              end-placeholder="价值时点(结束)"
+              :picker-options="pickerOptions"
+              value-format="yyyy-MM-dd"
+            ></el-date-picker>
+            <el-button class="filter-item" style="margin-left: 10px;float: left;" type="primary" @click="searchList" round>搜索</el-button>
+            <el-button class="filter-item" style="float: left;" round type="success" @click="resetSearch()">重置</el-button>
+      </template>
+      <parentTable ref="table" v-loading="listLoading" :data="pageData.records" slot="table" style="width: 100%;">
+        <el-table-column label="口估标的" align="center" width="300" prop="queryTarget">
+          <template slot-scope="{row}">
+            <span>{{ row.queryTarget}}</span>
+          </template>
+        </el-table-column>
+        <!-- <el-table-column label="查询方式" align="center" prop="queryType">
+          <template slot-scope="{row}">
+            <span>{{ row.queryType}}</span>
+          </template>
+        </el-table-column> -->
+        <el-table-column label="口估单价(元)" align="center" prop="facePrice">
+          <template slot-scope="{row}">
+            <span style="color: red;">{{ row.facePrice}}</span>
+          </template>
+        </el-table-column>
+        <el-table-column label="口估面积(m²)" align="center"  prop="faceAcreage">
+          <template slot-scope="{row}">
+            <span style="color: red;">{{ row.faceAcreage}}</span>
+          </template>
+        </el-table-column>
+        <el-table-column label="口估总价(万)" align="center"  prop="faceAmount">
+          <template slot-scope="{row}">
+            <span style="color: red;">{{ row.faceAmount ? (row.faceAmount / 10000).toFixed(2) + '万' : '-'}}</span>
+          </template>
+        </el-table-column>
+        <el-table-column label="大友均价(元)" align="center"  prop="dyAvgPrice">
+          <template slot-scope="{row}">
+            <span>{{ row.dyAvgPrice}}</span>
+          </template>
+        </el-table-column>
+        <el-table-column label="系统成交价(元)" align="center" prop="dealPrice">
+          <template slot-scope="{row}">
+            <span>{{ row.dealPrice}}</span>
+          </template>
+        </el-table-column>
+        <el-table-column label="系统挂牌价(元)" align="center"  prop="upPrice">
+          <template slot-scope="{row}">
+            <span>{{ row.upPrice}}</span>
+          </template>
+        </el-table-column>
+        <el-table-column label="价值时点" align="center"  prop="valueTiming">
+          <template slot-scope="{row}">
+            <span>{{ row.valueTiming}}</span>
+          </template>
+        </el-table-column>
+        <el-table-column label="口估人员" align="center" prop="userName">
+          <template slot-scope="{row}">
+            <span>{{ row.userName}}</span>
+          </template>
+        </el-table-column>
+        <el-table-column label="大友案例个数" align="center"  prop="dyExampleNum">
+          <template slot-scope="{row}">
+            <span>{{ row.dyExampleNum}}</span>
+          </template>
+        </el-table-column>
+        <el-table-column label="系统案例个数" align="center" prop="externalExampleNum">
+          <template slot-scope="{row}">
+            <span>{{ row.externalExampleNum}}</span>
+          </template>
+        </el-table-column>
+        <el-table-column label="查询范围" align="center"  prop="limitDate">
+          <template slot-scope="{row}">
+            <span>{{ row.limitDate}}</span>
+          </template>
+        </el-table-column>
+        <el-table-column label="操作" align="center" fixed="right">
+          <template slot-scope="{row}">
+            <el-button type="text"  @click="genWords(row)">复制文案</el-button>
+          </template>
+        </el-table-column>
+      </parentTable>
+    </y-page-list-layout>
+  </div>
+</template>
+<script>
+import YPageListLayout from '@/components/YPageListLayout'
+import Breadcrumb from '@/components/Breadcrumb'
+import {copyFacePriceWords} from '@/utils/personalUtil'
+
+export default {
+  name: 'facePriceHistory',
+  components: {
+    Breadcrumb,
+    YPageListLayout,
+  },
+
+  data() {
+    return {
+      pageData: { records: [] },
+      listLoading: false,
+      listQuery: {
+        page: 1,
+        size: 10,
+        current: 1,
+        descs: null,
+        ascs: null,
+        startDate: null,
+        endDate: null,
+      },
+      payDate: '',
+      pickerOptions: {
+        shortcuts: [
+          {
+            text: '最近一周',
+            onClick(picker) {
+              const end = new Date()
+              const start = new Date()
+              start.setTime(start.getTime() - 3600 * 1000 * 24 * 7)
+              picker.$emit('pick', [start, end])
+            },
+          },
+          {
+            text: '最近一个月',
+            onClick(picker) {
+              const end = new Date()
+              const start = new Date()
+              start.setTime(start.getTime() - 3600 * 1000 * 24 * 30)
+              picker.$emit('pick', [start, end])
+            },
+          },
+          {
+            text: '最近三个月',
+            onClick(picker) {
+              const end = new Date()
+              const start = new Date()
+              start.setTime(start.getTime() - 3600 * 1000 * 24 * 90)
+              picker.$emit('pick', [start, end])
+            },
+          },
+        ],
+      },
+    }
+
+  },
+  watch: {
+   
+  }, 
+  created() {
+    this.getPage();
+  },
+  methods: {
+    getPage() {
+     
+      this.$api.personalFacePrice.getPage(this.listQuery).then(res => {
+        if (res.code === 200) {
+          this.pageData = res.data;
+        }
+      })
+    },
+    
+
+    resetSearch() {
+      this.$router.push({ query: {} });
+      this.listQuery = {
+        current: 1,
+        size: 10,
+        descs: 'created',
+      }
+      this.payDate = ''
+      this.getPage();
+    },
+    searchList() {
+      // 重置分页
+      this.listQuery.page = 1
+      this.listQuery.size = 10
+      if (this.payDate) {
+        this.listQuery.startDate = this.payDate[0]
+        this.listQuery.endDate = this.payDate[1]
+      }
+      this.getPage()
+    },
+    genWords(row){
+      let date = row.valueTiming.split('-')
+      let location = "";
+      let community ="";
+      if (row.queryType==='地址'){
+        location = "【坐落】"+row.queryTarget+"\n";
+      }else{
+        community = "【小区名称】 "+row.queryTarget+"\n";
+      }
+      let valueTimeStr = date[0]+'年'+date[1]+'月'+date[2]+'日';
+      let faceWords = "\t★★口估结果★★ \n\n"+
+                  "【价值时点】"+valueTimeStr+" \n"+
+                    location+
+                    community+
+                  "【建筑面积】"+row.faceAcreage+"㎡\n"+
+                  "【单价】"+row.facePrice+"元/㎡\n"+
+                  "【总价】"+(row.faceAmount / 10000).toFixed(2)+"万\n"+
+                  "\n"+
+                  "【备注】本次口估按“精装修”进行估算!\n"
+                  copyFacePriceWords(faceWords);
+                 // this.$message({'type':'success','message': context+' 已复制!'});
+
+                 let html = faceWords.replace(/\n/g,"</br>")
+                 this.$message({ 'type':'success','duration':'5000',
+                  dangerouslyUseHTMLString: true,
+                  message: html
+                });
+    }
+  },
+
+}
+</script>
+<style lang="scss" scoped>
+
+</style>