Переглянути джерело

Merge remote-tracking branch 'origin/master'

yu jie 4 роки тому
батько
коміт
f10deff244

+ 3 - 0
src/common/components/filter/index.vue

@@ -1,6 +1,7 @@
 <template>
   <!-- 过滤客户资料表格 -->
   <div class="filter-custom-table">
+    <slot name="selectBefore"></slot>
     <a-select label-in-value
               class="conditionSelect"
               v-for="(item, i) in selectList"
@@ -15,11 +16,13 @@
         {{option.lable}}
       </a-select-option>
     </a-select>
+    <slot name="selectAfter"></slot>
     <a-input v-model:value="item.value"
              v-for="(item,i) in inputList"
              :key="i + '33'"
              class="tableConditionInput"
              :placeholder="item.placeholder" />
+    <slot name="inputAfter"></slot>
     <a-button class="selectBtn"
               v-for="(item, i) in fixedBtnList"
               :key="i + 'fixed'"

+ 39 - 5
src/views/platinum/platinum_customer_info/compoments/filterTable/index.vue

@@ -3,7 +3,11 @@
   <div class="filterTable">
     <FilterOption :selectList="selectList"
                   :inputList="inputList"
-                  :fixedBtnList="fixedBtnList" />
+                  :fixedBtnList="fixedBtnList">
+      <template #selectAfter>
+        <a-checkbox v-model:checked="includesub">包含子级</a-checkbox>
+      </template>
+    </FilterOption>
     <slot></slot>
   </div>
 </template>
@@ -12,12 +16,17 @@
 import FilterOption from '@/common/components/filter/index.vue';
 import { defineComponent } from 'vue';
 import { handleFilter, InputList, SelectList } from '@/common/setup/filter';
+import { ref } from 'vue';
+import { queryTableList } from '@/common/setup/table/list';
+import { initData } from '@/common/methods';
+import { queryParentAreaList } from '@/services/go/ermcp/qhj';
+import { QhjParentAreaList } from '@/services/go/ermcp/qhj/interface';
 
 export default defineComponent({
     name: 'filter-custom-table',
     components: { FilterOption },
     setup(props, context) {
-        const select: SelectList[] = [
+        const select = ref<SelectList[]>([
             {
                 value: undefined,
                 key: 'userinfotype',
@@ -27,15 +36,41 @@ export default defineComponent({
                     { value: 2, lable: '企业' },
                 ],
             },
-        ];
+            {
+                value: undefined,
+                key: 'userid',
+                placeholder: '请选择子机构',
+                list: [],
+            },
+        ]);
         const input: InputList[] = [
             { value: '', placeholder: '模糊搜索客户简称', key: 'nickname' },
             { value: '', placeholder: '模糊搜索客户名称', key: 'name' },
             { value: '', placeholder: '模糊搜索手机号码', key: 'phone' },
         ];
-        const { selectList, inputList, fixedBtnList } = handleFilter(select, input, context);
+        // 是否包含子级 1-包含
+        const includesub = ref<boolean>(false);
+        const param = {
+            search(result: any) {
+                result.includesub = includesub.value ? 1 : 0;
+            },
+            reset() {
+                includesub.value = false;
+            },
+        };
+        const { selectList, inputList, fixedBtnList } = handleFilter(select, input, context, param);
+        const { queryTable } = queryTableList<QhjParentAreaList>();
+        initData(() => {
+            queryTable(queryParentAreaList).then((res) => {
+                select.value[1].list = res.map((e) => {
+                    return { value: e.userid, lable: e.accountname };
+                });
+            });
+        });
+
         return {
             selectList,
+            includesub,
             inputList,
             fixedBtnList,
         };
@@ -44,5 +79,4 @@ export default defineComponent({
 </script>
 
 <style lang="less">
-
 </style>;

+ 0 - 92
src/views/platinum/platinum_customer_info/list/checkpending/index.vue

@@ -1,92 +0,0 @@
-<template>
-  <!-- 客户信息: 正常 -->
-  <div class="custom_info_checkpending"
-       :loading="loading">
-    <filterCustomTable @search="search">
-      <BtnList :btnList="commonBtn" />
-    </filterCustomTable>
-    <contextMenu :contextMenuList="forDataBtn">
-      <a-table :columns="columns"
-               class="topTable hiddenFirstCol"
-               :pagination="false"
-               :expandedRowKeys="expandedRowKeys"
-               :customRow="Rowclick"
-               rowKey="key"
-               :data-source="tableList">
-        <!-- 额外的展开行 -->
-        <template #expandedRowRender="{  }">
-          <BtnList :btnList="forDataBtn" />
-        </template>
-        <template #userinfotype="{ text }">
-          <a>{{ text === '2' ? '企业' : '个人' }}</a>
-        </template>
-        <template #status="{ text }">
-          <a>{{ getStatusName(text) }}</a>
-        </template>
-        <template #cardtype="{ text }">
-          <a>{{ getCardTypeEnumItemName(text) }}</a>
-        </template>
-      </a-table>
-    </contextMenu>
-    <Middle :selectedRow="selectedRow"
-            @refresh="queryTable" />
-  </div>
-</template>
-
-<script lang="ts">
-import { defineComponent, initData, getTableColumns, getTableEvent, getBtnList, contextMenu, BtnList } from '@/common/export/table';
-
-import { filterCustomTable } from '../../compoments';
-import { queryTableList, QueryCustomInfoType } from '../index';
-import { getStatusName } from '@/common/constants/enumsName';
-import { getCardTypeEnumItemName } from '@/common/constants/enumsName';
-import Middle from '@/views/platinum/platinum_customer_info/compoments/controlModal/index.vue';
-import {getUserId} from "@/services/bus/account";
-
-export default defineComponent({
-    name: 'custom_info_checkpending',
-    components: {
-        filterCustomTable,
-        contextMenu,
-        BtnList,
-        Middle,
-    },
-    setup() {
-        // 表头数据
-        const { columns, registerColumn, updateColumn } = getTableColumns();
-        // 表格事件
-        const { expandedRowKeys, selectedRow, Rowclick } = getTableEvent<QueryCustomInfoType>({});
-        // 表格操作按钮列表
-        const { commonBtn, forDataBtn } = getBtnList('custom_info_checkpending', true);
-        // 表格列表数据
-        const { loading, tableList, queryTable } = queryTableList();
-        initData(() => {
-            // 获取列表数据
-            queryTable(2, getUserId());
-            // 注册表头信息 过滤
-            registerColumn('table_pcweb_qhj_customer_info', ['userinfotype', 'nickname', 'contactname', 'mobile']);
-        });
-
-        return {
-            columns,
-
-            expandedRowKeys,
-            selectedRow,
-            Rowclick,
-            commonBtn,
-            forDataBtn,
-            loading,
-            tableList,
-            search,
-            getStatusName,
-            getCardTypeEnumItemName,
-            queryTable,
-        };
-    },
-});
-</script>
-
-<style lang="less">
-.custom_info_checkpending {
-}
-</style>

+ 9 - 16
src/views/platinum/platinum_customer_info/list/normal-use/index.vue

@@ -2,7 +2,7 @@
   <!-- 客户信息: 正常 -->
   <div class="custom-normal"
        :loading="loading">
-    <filterCustomTable @search="updateColumn">
+    <filterCustomTable @search="search">
       <BtnList :btnList="commonBtn" />
     </filterCustomTable>
     <contextMenu :contextMenuList="forDataBtn">
@@ -34,24 +34,15 @@
 </template>
 
 <script lang="ts">
-    import {
-        defineComponent,
-        initData,
-        getTableColumns,
-        getTableEvent,
-        getBtnList,
-        contextMenu,
-        BtnList,
-        _getBtnList
-    } from '@/common/export/table';
-
+import { defineComponent, initData, getTableColumns, getTableEvent, contextMenu, BtnList, queryTableList, _getBtnList } from '@/common/export/table';
 import { filterCustomTable } from '../../compoments';
-import { queryTableList, QueryCustomInfoType } from '../index';
+import { handleSearch } from '../setup';
 import { getStatusName } from '@/common/constants/enumsName';
 import { getCardTypeEnumItemName } from '@/common/constants/enumsName';
 import Middle from '@/views/platinum/platinum_customer_info/compoments/controlModal/index.vue';
 import { QhjCustomer } from '@/services/go/ermcp/qhj/interface';
-    import {getUserId} from "@/services/bus/account";
+import { getUserId } from '@/services/bus/account';
+import { queryCustomerInfo } from '@/services/go/ermcp/qhj';
 export default defineComponent({
     name: 'custom-normal',
     components: {
@@ -71,14 +62,16 @@ export default defineComponent({
 
         // 表格列表数据
         const { loading, tableList, queryTable } = queryTableList();
+        const { search } = handleSearch(3, queryTable);
         initData(() => {
             // 获取列表数据
-            queryTable(3, getUserId())
+            queryTable(queryCustomerInfo, { querytype: 3, userid: getUserId() });
             // 注册表头信息 过滤
-            registerColumn('table_pcweb_qhj_customer_info', ['userinfotype', 'nickname', 'contactname', 'mobile']);
+            registerColumn('table_pcweb_qhj_customer_info', []);
         });
 
         return {
+            search,
             columns,
             expandedRowKeys,
             selectedRow,

+ 16 - 23
src/views/platinum/platinum_customer_info/list/setup.ts

@@ -1,27 +1,20 @@
-import { queryResultLoadingAndInfo } from '@/common/methods/request/resultInfo';
-import { QueryCustomInfoType } from '@/services/go/ermcp/customInfo/interface';
+import { getUserId } from '@/services/bus/account';
 import { queryCustomerInfo } from '@/services/go/ermcp/qhj';
-import { ref } from 'vue';
-import {QhjCustomer} from "@/services/go/ermcp/qhj/interface";
+import { QueryCustomerInfoReq } from "@/services/go/ermcp/qhj/interface";
 
-/**
- * 获取表格列表数据
- * @param type 
- * @returns 
- */
-export function queryTableList() {
-    // 加载状态
-    const loading = ref<boolean>(false);
-    // 表格数据
-    const tableList = ref<QhjCustomer[]>([]);
-    function queryTable(querytype: 1 | 2 | 3 | 4, userid: number) {
-        const param = { querytype, userid }
-        queryResultLoadingAndInfo(queryCustomerInfo, loading, param).then(res => {
-            tableList.value = res
-        })
+// 查询类型 1:未提交(网上开户表) 2:待审核(网上开户表) 3:正常 4:停用
+export function handleSearch(querytype: 1 | 2 | 3 | 4, queryTable: Function) {
+    function search(value: any) {
+        const { includesub, name, nickname, phone, userid, userinfotype } = value;
+        const param: QueryCustomerInfoReq = {
+            includesub,     // 是否包含子级 1-包含
+            querytype,  // 查询类型 1:未提交(网上开户表) 2:待审核(网上开户表) 3:正常 4:停用
+            customername: name[0],  // 客户名称(模糊匹配)
+            nickname: nickname[0],     // 昵称(模糊匹配)
+            userinfotype: userinfotype[0] ? userinfotype[0] : 0,
+            userid: userid[0] ? userid[0] : getUserId()
+        };
+        queryTable(queryCustomerInfo, param);
     }
-    return { loading, tableList, queryTable }
+    return { search }
 }
-
-
-

+ 8 - 17
src/views/platinum/platinum_customer_info/list/stop-use/index.vue

@@ -2,7 +2,7 @@
   <!-- 客户信息: 停用 -->
   <div class="custom-normal"
        :loading="loading">
-    <filterCustomTable @search="updateColumn">
+    <filterCustomTable @search="search">
       <BtnList :btnList="commonBtn" />
     </filterCustomTable>
     <contextMenu :contextMenuList="forDataBtn">
@@ -34,25 +34,15 @@
 </template>
 
 <script lang="ts">
-    import {
-        defineComponent,
-        initData,
-        getTableColumns,
-        getTableEvent,
-        getBtnList,
-        contextMenu,
-        BtnList,
-        _getBtnList
-    } from '@/common/export/table';
-
+import { defineComponent, initData, getTableColumns, getTableEvent, queryTableList, contextMenu, BtnList, _getBtnList } from '@/common/export/table';
 import { filterCustomTable } from '../../compoments';
-
-import { queryTableList, QueryCustomInfoType } from '../index';
 import { getStatusName } from '@/common/constants/enumsName';
 import { getCardTypeEnumItemName } from '@/common/constants/enumsName';
 import Middle from '@/views/platinum/platinum_customer_info/compoments/controlModal/index.vue';
 import { QhjCustomer } from '@/services/go/ermcp/qhj/interface';
-    import {getUserId} from "@/services/bus/account";
+import { getUserId } from '@/services/bus/account';
+import { handleSearch } from '../setup';
+import { queryCustomerInfo } from '@/services/go/ermcp/qhj';
 
 export default defineComponent({
     name: 'custom-normal',
@@ -73,16 +63,17 @@ export default defineComponent({
 
         // 表格列表数据
         const { loading, tableList, queryTable } = queryTableList();
+        const { search } = handleSearch(4, queryTable);
         initData(() => {
             // 获取列表数据
-            queryTable(4, getUserId())
+            queryTable(queryCustomerInfo, { querytype: 4, userid: getUserId() });
             // 注册表头信息 过滤
             registerColumn('table_pcweb_qhj_customer_info', ['userinfotype', 'nickname', 'contactname', 'mobile']);
         });
 
         return {
             columns,
-
+            search,
             expandedRowKeys,
             selectedRow,
             Rowclick,

+ 8 - 7
src/views/platinum/platinum_customer_info/list/unsubmit/index.vue

@@ -2,7 +2,7 @@
   <!-- 客户信息: 正常 -->
   <div class="custom_info_unsubmit"
        :loading="loading">
-    <filterCustomTable @search="updateColumn">
+    <filterCustomTable @search="search">
       <BtnList :btnList="firstBtn" />
     </filterCustomTable>
     <contextMenu :contextMenuList="secondeBtn">
@@ -37,16 +37,16 @@
 </template>
 
 <script lang="ts">
-import { defineComponent, initData, getTableColumns, getTableEvent, getBtnList, contextMenu, BtnList, _getBtnList } from '@/common/export/table';
+import { defineComponent, initData, getTableColumns, getTableEvent, queryTableList, contextMenu, BtnList, _getBtnList } from '@/common/export/table';
 
 import { filterCustomTable } from '../../compoments';
-import { queryTableList, QueryCustomInfoType } from '../index';
 import { getStatusName } from '@/common/constants/enumsName';
 import { getCardTypeEnumItemName } from '@/common/constants/enumsName';
 import Middle from '@/views/platinum/platinum_customer_info/compoments/controlModal/index.vue';
 import { QhjCustomer } from '@/services/go/ermcp/qhj/interface';
-import {getUserId} from "@/services/bus/account";
-
+import { getUserId } from '@/services/bus/account';
+import { handleSearch } from '../setup';
+import { queryCustomerInfo } from '@/services/go/ermcp/qhj';
 export default defineComponent({
     name: 'custom_info_unsubmit',
     components: {
@@ -64,16 +64,17 @@ export default defineComponent({
         const [firstBtn, secondeBtn] = _getBtnList('platinum_customer_info_unsubmit', true).value;
         // 表格列表数据
         const { loading, tableList, queryTable } = queryTableList();
+        const { search } = handleSearch(2, queryTable);
         initData(() => {
             // 获取列表数据
-            queryTable(2, getUserId())
+            queryTable(queryCustomerInfo, { querytype: 2, userid: getUserId() });
             // 注册表头信息 过滤
             registerColumn('table_pcweb_qhj_customer_info', ['userinfotype', 'nickname', 'contactname', 'mobile']);
         });
 
         return {
             columns,
-
+            search,
             expandedRowKeys,
             selectedRow,
             Rowclick,

+ 1 - 0
src/views/platinum/platinum_recharge_withdrawal_review/setup.ts

@@ -46,6 +46,7 @@ export function handleTableStatus(queryTable: Function) {
         const likename = accountcode.length ? accountcode[0] : '';
         // 状态 1-待审核 2-审核通过 3-审核拒绝
         const status = applystatus[0] as 1 | 2 | 3;
+        // 记录状态
         tableStatus.value = status;
         const param = { querytype: 2, applystatus: status, begindate, enddate, likename };
         queryTable(queryAccountInOutApply, param);