浏览代码

1.新增个人客户来单、评估收入订单查询
2.企业客户页面优化

GouGengquan 1 天之前
父节点
当前提交
9fcb995cbf
共有 3 个文件被更改,包括 314 次插入6 次删除
  1. 8 0
      src/api/modules/customerLinkman.js
  2. 4 4
      src/views/customer/customerCompany.vue
  3. 302 2
      src/views/customer/customerPersonal.vue

+ 8 - 0
src/api/modules/customerLinkman.js

@@ -25,4 +25,12 @@ export default {
   getCustomerPersonalPage(params) {
     return request.get(`customerLinkman/getCustomerPersonalPage`, { params: params })
   },
+  // 分页查询个人客户来单列表
+  getCustomerPersonalOrderPage(params) {
+    return request.get(`customerLinkman/getCustomerPersonalOrderPage`, { params: params })
+  },
+  // 分页查询个人客户评估收入列表
+  getCustomerPersonalIncomePage(params) {
+    return request.get(`customerLinkman/getCustomerPersonalIncomePage`, { params: params })
+  },
 }

+ 4 - 4
src/views/customer/customerCompany.vue

@@ -220,7 +220,7 @@
         </parentTable>
       </y-page-list-layout>
     </el-dialog>
-    <el-dialog title="来单列表" :visible.sync="incomeDialogVisible" width="70%">
+    <el-dialog title="收入列表" :visible.sync="incomeDialogVisible" width="70%">
       <y-page-list-layout :get-page-list="getIncomePage" :page-list="incomeData" :page-para="incomeListQuery">
         <template slot="left">
           <el-input style="width: 200px;float: left;" class="filter-item" v-model="incomeListQuery.projectName" placeholder="订单名称" clearable></el-input>
@@ -634,7 +634,7 @@ export default {
       this.incomeListQuery.subCustomerId = id;
       this.getIncomePage();
     },
-    // 条件搜索来单
+    // 条件搜索来单评估收入
     searchListIncome() {
       // 重置分页
       this.incomeListQuery.page = 1;
@@ -642,7 +642,7 @@ export default {
       this.incomeListQuery.current = 1;
       this.getIncomePage();
     },
-    // 重置来单列表搜索条件
+    // 重置来单评估收入列表搜索条件
     resetParamsIncome() {
       this.incomeListQuery.page = 1;
       this.incomeListQuery.size = 10;
@@ -658,7 +658,7 @@ export default {
       this.selectDateIncome = '';
       this.getIncomePage();
     },
-    // 获取客户来单列表
+    // 获取客户来单评估收入列表
     getIncomePage() {
       this.orderListLoading = true;
       if (this.selectDateOrder) {

+ 302 - 2
src/views/customer/customerPersonal.vue

@@ -76,13 +76,14 @@
         </el-table-column>
         <el-table-column label="来单量" align="center" prop="orderVolume">
           <template slot-scope="{row}">
-            <el-link v-if="row.orderVolume > 0">{{ row.orderVolume }}</el-link>
+            <el-link v-if="row.orderVolume > 0" @click="openOrderDialog(row.id)">{{ row.orderVolume }}</el-link>
             <span v-else>{{ row.orderVolume }}</span>
           </template>
         </el-table-column>
         <el-table-column label="评估收入" align="center" prop="estimatedRevenue">
           <template slot-scope="{row}">
-            <span>{{ row.estimatedRevenue }}</span>
+            <el-link v-if="row.estimatedRevenue > 0" @click="openIncomeDialog(row.id)">{{ row.estimatedRevenue }}</el-link>
+            <span v-else>{{ row.estimatedRevenue }}</span>
           </template>
         </el-table-column>
         <el-table-column label="创建时间" align="center" prop="created">
@@ -212,6 +213,156 @@
         <el-button v-if="personalFrom.id" type="primary" @click="editCustomer()">修 改</el-button>
       </div>
     </el-dialog>
+    <el-dialog title="来单列表" :visible.sync="orderDialogVisible" width="70%">
+      <y-page-list-layout :get-page-list="getOrderPage" :page-list="orderData" :page-para="orderListQuery">
+        <template slot="left">
+          <el-input style="width: 200px;float: left;" class="filter-item" v-model="orderListQuery.projectName" placeholder="订单名称" clearable></el-input>
+          <el-input style="width: 200px;float: left;margin-left: 10px;" class="filter-item" v-model="orderListQuery.orderId" placeholder="订单号" clearable></el-input>
+          <el-select v-model="orderListQuery.businessType" placeholder="业务类型" style=" width: 180px;margin-left: 10px;float: left;" clearable>
+            <el-option label="资产业务" value="ASSET_BUSINESS"></el-option>
+            <el-option label="大中型业务" value="MAJOR_BUSINESS"></el-option>
+            <el-option label="个贷业务" value="PERSONAL_BUSINESS"></el-option>
+          </el-select>
+          <el-date-picker
+            style="margin-right: 20px;float: left;margin-left: 10px;"
+            v-model="selectDateOrder"
+            type="daterange"
+            :picker-options="pickerOptions"
+            format="yyyy 年 MM 月 dd 日"
+            value-format="yyyy-MM-dd"
+            range-separator="至"
+            start-placeholder="开始日期"
+            end-placeholder="结束日期"
+            align="right"
+          ></el-date-picker>
+          <el-button class="filter-item" style="margin-left: 10px;float: left;" type="primary" @click="searchListOrder()" round>搜索</el-button>
+          <el-button class="filter-item" style="float: left;" round type="success" @click="resetParamsOrder()">重置</el-button>
+        </template>
+        <parentTable ref="table" :data="orderData.records" slot="table" style="width: 100%;" :isBoard="800" class="tableFull" v-loading="orderListLoading">
+          <el-table-column label="订单号" align="center">
+            <template slot-scope="{row}">
+              <span>{{ row.orderId }}</span>
+            </template>
+          </el-table-column>
+          <el-table-column label="订单名称" align="center" show-overflow-tooltip>
+            <template slot-scope="{row}">
+              <span>{{ row.projectName }}</span>
+            </template>
+          </el-table-column>
+          <el-table-column label="业务类型" align="center">
+            <template slot-scope="{row}">
+              <span>{{ row.businessType === 'ASSET_BUSINESS' ? '资产业务' : row.businessType === 'PERSONAL_BUSINESS' ? '个贷业务' : row.businessType === 'MAJOR_BUSINESS' ? '大中型业务' : '-' }}</span>
+            </template>
+          </el-table-column>
+          <el-table-column label="个人客户名称" align="center">
+            <template slot-scope="{row}">
+              <span>{{ row.linkmanName }}</span>
+            </template>
+          </el-table-column>
+          <el-table-column label="客户经理" align="center">
+            <template slot-scope="{row}">
+              <span>{{ row.clientManager }}</span>
+            </template>
+          </el-table-column>
+          <el-table-column label="下单时间" align="center">
+            <template slot-scope="{row}">
+              <span>{{ row.created }}</span>
+            </template>
+          </el-table-column>
+        </parentTable>
+      </y-page-list-layout>
+    </el-dialog>
+    <el-dialog title="收入列表" :visible.sync="incomeDialogVisible" width="70%">
+      <y-page-list-layout :get-page-list="getIncomePage" :page-list="incomeData" :page-para="incomeListQuery">
+        <template slot="left">
+          <el-input style="width: 200px;float: left;" class="filter-item" v-model="incomeListQuery.projectName" placeholder="订单名称" clearable></el-input>
+          <el-input style="width: 200px;float: left;margin-left: 10px;" class="filter-item" v-model="incomeListQuery.orderId" placeholder="订单号" clearable></el-input>
+          <el-select v-model="incomeListQuery.businessType" placeholder="业务类型" style=" width: 180px;margin-left: 10px;float: left;" clearable>
+            <el-option label="资产业务" value="ASSET_BUSINESS"></el-option>
+            <el-option label="大中型业务" value="MAJOR_BUSINESS"></el-option>
+            <el-option label="个贷业务" value="PERSONAL_BUSINESS"></el-option>
+          </el-select>
+          <el-date-picker
+            style="margin-right: 20px;float: left;margin-left: 10px;"
+            v-model="selectDateOrder"
+            type="daterange"
+            :picker-options="pickerOptions"
+            format="yyyy 年 MM 月 dd 日"
+            value-format="yyyy-MM-dd"
+            range-separator="至"
+            start-placeholder="下单日期"
+            end-placeholder="下单日期"
+            align="right"
+          ></el-date-picker>
+          <el-date-picker
+            style="margin-right: 20px;float: left;margin-left: 10px;"
+            v-model="selectDateIncome"
+            type="daterange"
+            :picker-options="pickerOptions"
+            format="yyyy 年 MM 月 dd 日"
+            value-format="yyyy-MM-dd"
+            range-separator="至"
+            start-placeholder="收款日期"
+            end-placeholder="收款日期"
+            align="right"
+          ></el-date-picker>
+          <el-button class="filter-item" style="margin-left: 10px;float: left;" type="primary" @click="searchListIncome()" round>搜索</el-button>
+          <el-button class="filter-item" style="float: left;" round type="success" @click="resetParamsIncome()">重置</el-button>
+        </template>
+        <parentTable ref="table" :data="incomeData.records" slot="table" style="width: 100%;" :isBoard="800" class="tableFull" v-loading="orderListLoading">
+          <el-table-column label="订单号" align="center">
+            <template slot-scope="{row}">
+              <span>{{ row.orderId }}</span>
+            </template>
+          </el-table-column>
+          <el-table-column label="订单名称" align="center" show-overflow-tooltip>
+            <template slot-scope="{row}">
+              <span>{{ row.projectName }}</span>
+            </template>
+          </el-table-column>
+          <el-table-column label="业务类型" align="center">
+            <template slot-scope="{row}">
+              <span>{{ row.businessType === 'ASSET_BUSINESS' ? '资产业务' : row.businessType === 'PERSONAL_BUSINESS' ? '个贷业务' : row.businessType === 'MAJOR_BUSINESS' ? '大中型业务' : '-' }}</span>
+            </template>
+          </el-table-column>
+          <el-table-column label="客户名称" align="center">
+            <template slot-scope="{row}">
+              <span>{{ row.customerName }}</span>
+            </template>
+          </el-table-column>
+          <el-table-column label="业务来源" align="center">
+            <template slot-scope="{row}">
+              <span>{{ row.customerSubName }}</span>
+            </template>
+          </el-table-column>
+          <el-table-column label="客户经理" align="center">
+            <template slot-scope="{row}">
+              <span>{{ row.clientManager }}</span>
+            </template>
+          </el-table-column>
+          <el-table-column label="客户联系人" align="center">
+            <template slot-scope="{row}">
+              <span>{{ row.linkmanName }}</span>
+            </template>
+          </el-table-column>
+          <el-table-column label="下单时间" align="center">
+            <template slot-scope="{row}">
+              <span>{{ row.created }}</span>
+            </template>
+          </el-table-column>
+          <el-table-column label="订单实收款" align="center">
+            <template slot-scope="{row}">
+              <span>{{ row.orderRealAmount ? row.orderRealAmount : '-' }}</span>
+            </template>
+          </el-table-column>
+          <el-table-column label="收款时间" align="center">
+            <template slot-scope="{row}">
+              <span>{{ row.collectionTime ? row.collectionTime : '-' }}</span>
+            </template>
+          </el-table-column>
+        </parentTable>
+      </y-page-list-layout>
+    </el-dialog>
   </div>
 </template>
 
@@ -233,6 +384,7 @@ export default {
     return {
       pageData: { records: [] },
       listLoading: false,
+      orderListLoading: false,
       listQuery: {
         page: 1,
         size: 20,
@@ -268,6 +420,65 @@ export default {
         terminal: [{ required: true, message: '请选择是否终端客户', trigger: 'change' }],
         clientManagerId: [{ required: true, message: '请选择维护人', trigger: 'change' }],
       },
+      orderDialogVisible: false,
+      selectDateOrder: '',
+      // 查询订单
+      orderListQuery: {
+        page: 1,
+        size: 10,
+        current: 1,
+        projectName: null,
+        orderId: null,
+        businessType: null,
+        createdStartTime: null,
+        createdEndTime: null,
+      },
+      orderData: { records: [] },
+      incomeDialogVisible: false,
+      selectDateIncome: '',
+      // 查询订单
+      incomeListQuery: {
+        page: 1,
+        size: 10,
+        current: 1,
+        projectName: null,
+        orderId: null,
+        businessType: null,
+        createdStartTime: null,
+        createdEndTime: null,
+      },
+      incomeData: { records: [] },
+      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]);
+            },
+          },
+        ],
+      },
     };
   },
   created() {
@@ -380,6 +591,95 @@ export default {
         }
       });
     },
+    // 打开来单列表弹窗
+    openOrderDialog(id) {
+      this.orderDialogVisible = true;
+      this.orderListQuery.linkmanId = id;
+      this.getOrderPage();
+    },
+    // 条件搜索来单
+    searchListOrder() {
+      // 重置分页
+      this.orderListQuery.page = 1;
+      this.orderListQuery.size = 10;
+      this.orderListQuery.current = 1;
+      this.getOrderPage();
+    },
+    // 重置来单列表搜索条件
+    resetParamsOrder() {
+      this.orderListQuery.page = 1;
+      this.orderListQuery.size = 10;
+      this.orderListQuery.current = 1;
+      this.orderListQuery.projectName = null;
+      this.orderListQuery.orderId = null;
+      this.orderListQuery.businessType = null;
+      this.orderListQuery.createdStartTime = null;
+      this.orderListQuery.createdEndTime = null;
+      this.selectDateOrder = '';
+      this.getOrderPage();
+    },
+    // 获取客户来单列表
+    getOrderPage() {
+      this.orderListLoading = true;
+      if (this.selectDateOrder) {
+        this.orderListQuery.createdStartTime = this.selectDateOrder[0] + ' 00:00:00';
+        this.orderListQuery.createdEndTime = this.selectDateOrder[1] + ' 23:59:59';
+      }
+      this.$api.customerLinkman.getCustomerPersonalOrderPage(this.orderListQuery).then((res) => {
+        if (res.code === 200) {
+          this.orderData = res.data;
+        }
+        this.orderListLoading = false;
+      });
+    },
+    // 打开来单评估收入列表弹窗
+    openIncomeDialog(id) {
+      this.incomeDialogVisible = true;
+      this.incomeListQuery.linkmanId = id;
+      this.getIncomePage();
+    },
+    // 条件搜索来单评估收入
+    searchListIncome() {
+      // 重置分页
+      this.incomeListQuery.page = 1;
+      this.incomeListQuery.size = 10;
+      this.incomeListQuery.current = 1;
+      this.getIncomePage();
+    },
+    // 重置来单评估收入列表搜索条件
+    resetParamsIncome() {
+      this.incomeListQuery.page = 1;
+      this.incomeListQuery.size = 10;
+      this.incomeListQuery.current = 1;
+      this.incomeListQuery.projectName = null;
+      this.incomeListQuery.orderId = null;
+      this.incomeListQuery.businessType = null;
+      this.incomeListQuery.createdStartTime = null;
+      this.incomeListQuery.createdEndTime = null;
+      this.incomeListQuery.collectionStartTime = null;
+      this.incomeListQuery.collectionEndTime = null;
+      this.selectDateOrder = '';
+      this.selectDateIncome = '';
+      this.getIncomePage();
+    },
+    // 获取客户来单评估收入列表
+    getIncomePage() {
+      this.orderListLoading = true;
+      if (this.selectDateOrder) {
+        this.incomeListQuery.createdStartTime = this.selectDateOrder[0] + ' 00:00:00';
+        this.incomeListQuery.createdEndTime = this.selectDateOrder[1] + ' 23:59:59';
+      }
+      if (this.selectDateIncome) {
+        this.incomeListQuery.collectionStartTime = this.selectDateIncome[0] + ' 00:00:00';
+        this.incomeListQuery.collectionEndTime = this.selectDateIncome[1] + ' 23:59:59';
+      }
+      this.$api.customerLinkman.getCustomerPersonalIncomePage(this.incomeListQuery).then((res) => {
+        if (res.code === 200) {
+          this.incomeData = res.data;
+        }
+        this.orderListLoading = false;
+      });
+    },
   },
 };
 </script>