Browse Source

1.新增分页查询企业客户评估收入订单列表

GouGengquan 23 giờ trước cách đây
mục cha
commit
c56ff6ad1f
2 tập tin đã thay đổi với 160 bổ sung2 xóa
  1. 4 0
      src/api/modules/customerCompany.js
  2. 156 2
      src/views/customer/customerCompany.vue

+ 4 - 0
src/api/modules/customerCompany.js

@@ -29,4 +29,8 @@ export default {
   getCustomerCompanyOrderPage(params) {
     return request.get(`customerCompany/getCustomerCompanyOrderPage`, { params: params })
   },
+  // 分页查询企业客户评估收入订单列表
+  getCustomerCompanyIncomePage(params) {
+    return request.get(`customerCompany/getCustomerCompanyIncomePage`, { params: params })
+  },
 }

+ 156 - 2
src/views/customer/customerCompany.vue

@@ -68,7 +68,8 @@
         </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">
@@ -219,6 +220,97 @@
         </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>
 
@@ -321,9 +413,23 @@ export default {
         orderId: null,
         businessType: null,
         createdStartTime: null,
-        createdEndTime: 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: [
           {
@@ -522,6 +628,54 @@ export default {
         this.orderListLoading = false;
       });
     },
+    // 打开来单评估收入列表弹窗
+    openIncomeDialog(id) {
+      this.incomeDialogVisible = true;
+      this.incomeListQuery.subCustomerId = 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.customerCompany.getCustomerCompanyIncomePage(this.incomeListQuery).then((res) => {
+        if (res.code === 200) {
+          this.incomeData = res.data;
+        }
+        this.orderListLoading = false;
+      });
+    },
   },
 };
 </script>