فهرست منبع

处理客户资料刷新

huangbin 4 سال پیش
والد
کامیت
ec6fbdd5d6

+ 8 - 6
src/views/platinum/platinum_customer_info/list/normal-use/index.vue

@@ -26,15 +26,15 @@
         <template #cardtype="{ text }">
           <a>{{ getCardTypeEnumItemName(text) }}</a>
         </template>
-          <!-- 客户名称 -->
-          <template #customername="{ record }">
-              <a>{{  record.username }}</a>
-          </template>
+        <!-- 客户名称 -->
+        <template #customername="{ record }">
+          <a>{{  record.username }}</a>
+        </template>
 
       </a-table>
     </contextMenu>
     <Middle :selectedRow="selectedRow"
-            @refresh="queryTable" />
+            @refresh="update" />
   </div>
 </template>
 
@@ -67,7 +67,8 @@ export default defineComponent({
 
         // 表格列表数据
         const { loading, tableList, queryTable } = queryTableList();
-        const { search } = handleSearch(3, queryTable);
+        const { search, update } = handleSearch(3, queryTable);
+
         initData(() => {
             // 获取列表数据
             queryTable(queryCustomerInfo, { querytype: 3, userid: getUserId() });
@@ -77,6 +78,7 @@ export default defineComponent({
 
         return {
             search,
+            update,
             columns,
             expandedRowKeys,
             selectedRow,

+ 10 - 1
src/views/platinum/platinum_customer_info/list/setup.ts

@@ -4,6 +4,7 @@ import { QueryCustomerInfoReq } from "@/services/go/ermcp/qhj/interface";
 
 // 查询类型 1:未提交(网上开户表) 2:待审核(网上开户表) 3:正常 4:停用
 export function handleSearch(querytype: 1 | 2 | 3 | 4, queryTable: Function) {
+    let cache: any = null;
     function search(value: any) {
         const { includesub, name, nickname, userid, userinfotype } = value;
         const param: QueryCustomerInfoReq = {
@@ -14,7 +15,15 @@ export function handleSearch(querytype: 1 | 2 | 3 | 4, queryTable: Function) {
             userinfotype: userinfotype[0] ? userinfotype[0] : 0,
             userid: userid[0] ? userid[0] : getUserId()
         };
+        cache = param
         queryTable(queryCustomerInfo, param);
     }
-    return { search }
+    function update() {
+        if (cache) {
+            search(cache)
+        } else {
+            queryTable(queryCustomerInfo, { querytype, userid: getUserId() });
+        }
+    }
+    return { search, update }
 }

+ 7 - 6
src/views/platinum/platinum_customer_info/list/stop-use/index.vue

@@ -26,14 +26,14 @@
         <template #cardtype="{ text }">
           <a>{{ getCardTypeEnumItemName(text) }}</a>
         </template>
-          <!-- 客户名称 -->
-          <template #customername="{ record }">
-              <a>{{ record.username }}</a>
-          </template>
+        <!-- 客户名称 -->
+        <template #customername="{ record }">
+          <a>{{ record.username }}</a>
+        </template>
       </a-table>
     </contextMenu>
     <Middle :selectedRow="selectedRow"
-            @refresh="queryTable" />
+            @refresh="update" />
   </div>
 </template>
 
@@ -67,7 +67,7 @@ export default defineComponent({
 
         // 表格列表数据
         const { loading, tableList, queryTable } = queryTableList();
-        const { search } = handleSearch(4, queryTable);
+        const { search, update } = handleSearch(4, queryTable);
         initData(() => {
             // 获取列表数据
             queryTable(queryCustomerInfo, { querytype: 4, userid: getUserId() });
@@ -77,6 +77,7 @@ export default defineComponent({
 
         return {
             columns,
+            update,
             search,
             expandedRowKeys,
             selectedRow,

+ 4 - 3
src/views/platinum/platinum_customer_info/list/unsubmit/index.vue

@@ -21,7 +21,7 @@
           <a>{{ text === 2 ? '企业' : '个人' }}</a>
         </template>
         <template #customername="{ record }">
-            <a>{{ record.username }}</a>
+          <a>{{ record.username }}</a>
         </template>
         <template #status="{ text }">
           <a>{{ getStatusName(text) }}</a>
@@ -32,7 +32,7 @@
       </a-table>
     </contextMenu>
     <Middle :selectedRow="selectedRow"
-            @refresh="queryTable" />
+            @refresh="update" />
   </div>
 </template>
 
@@ -64,7 +64,7 @@ export default defineComponent({
         const [firstBtn, secondeBtn] = _getBtnList('platinum_customer_info_unsubmit', true).value;
         // 表格列表数据
         const { loading, tableList, queryTable } = queryTableList();
-        const { search } = handleSearch(2, queryTable);
+        const { search, update } = handleSearch(2, queryTable);
         initData(() => {
             // 获取列表数据
             queryTable(queryCustomerInfo, { querytype: 2, userid: getUserId() });
@@ -74,6 +74,7 @@ export default defineComponent({
 
         return {
             columns,
+            update,
             search,
             expandedRowKeys,
             selectedRow,