Browse Source

feat(finance): 新增财务模块及相关接口与页面

zhangtao 2 weeks ago
parent
commit
5075f71d25

+ 3 - 2
.env.test

@@ -1,10 +1,11 @@
 # backend service base url, test environment
 # VITE_SERVICE_BASE_URL=http://74949mkfh190.vicp.fun
 # VITE_SERVICE_BASE_URL=http://192.168.1.253:8114 #付
-# VITE_SERVICE_BASE_URL=http://192.168.0.157:8114 #王
-VITE_SERVICE_BASE_URL=http://192.168.1.166:8114 #张
+VITE_SERVICE_BASE_URL=http://192.168.0.157:8114 #王
+# VITE_SERVICE_BASE_URL=http://192.168.1.166:8114 #张
 # VITE_SERVICE_BASE_URL=https://mock.apifox.cn/m1/3109515-0-default
 # VITE_SERVICE_BASE_URL=https://shop.platform.zswlgz.com #服务器
+# VITE_SERVICE_BASE_URL=http://47.109.84.152:8114 #服务器
 
 
 # other backend service base url, test environment

+ 1 - 1
src/components/custom/custom-icon-select.vue

@@ -45,7 +45,7 @@ function handleChange(iconItem: string) {
 <template>
   <NPopover placement="bottom-end" trigger="click">
     <template #trigger>
-      <NInput v-model:value="modelValue" readonly placeholder="点击选择图标">
+      <NInput v-model:value="modelValue" placeholder="点击选择图标">
         <template #suffix>
           <SvgIcon :icon="selectedIcon" class="p-5px text-30px" />
         </template>

+ 4 - 0
src/components/zt/Table/props.ts

@@ -5,6 +5,10 @@ export const basicProps = {
     type: Boolean,
     default: true
   },
+  immediate: {
+    type: Boolean,
+    default: true
+  },
   api: {
     type: Function as PropType<tableProp['api']>,
     default: () => Promise.resolve()

+ 5 - 0
src/components/zt/Table/types/index.ts

@@ -49,6 +49,11 @@ export interface tableProp extends DataTableProps {
    * 默认参数
    */
   defaultParams?: Recordable;
+  /**
+   * 默认参数,重置的时候不重置这个参数
+   *
+   */
+  defaultParamsNotReset?: string;
 }
 
 export interface ztTableProps {

+ 17 - 2
src/components/zt/Table/z-table.vue

@@ -19,6 +19,7 @@ export default defineComponent({
     const propsData = toRaw(props);
     const searchProps = ref<FormProps>();
     const tableProps = ref<tableProp>();
+    const commonKeyData = ref();
     const getFormSearch = computed(() => {
       return {
         labelWidth: 120,
@@ -56,6 +57,7 @@ export default defineComponent({
         searchPage.current = Number(params.page);
         searchPage.size = Number(params.pageSize);
       },
+      immediate: propsData.immediate,
       paginationProps: {
         pageSizes: pageSize.split(',').map(Number)
       },
@@ -86,7 +88,7 @@ export default defineComponent({
       return data.value;
     }
     const TableMethod: TableMethods = {
-      refresh: getData,
+      refresh: fetchSearchData,
       setSearchProps,
       setTableLoading,
       setTableConfig,
@@ -107,10 +109,19 @@ export default defineComponent({
     function handleDelete() {
       emit('delete', checkedRowKeys.value);
     }
-    function handleReset() {
+    async function handleReset() {
       getForm.value = getSeachForm();
+      if (getTableProps.value.defaultParamsNotReset) {
+        const keySearch = getTableProps.value.defaultParamsNotReset;
+        getForm.value[keySearch] = commonKeyData.value;
+        await setFieldsValue({ [`${keySearch}`]: commonKeyData.value });
+      }
+
       getData();
     }
+    async function fetchSearchData() {
+      handleSearch();
+    }
     function handleSearch() {
       const form = getSeachForm();
       if (getTableProps.value.fieldMapToTime && form[getTableProps.value.fieldMapToTime[0][0] as unknown as string]) {
@@ -119,6 +130,10 @@ export default defineComponent({
         form[endTimeKey] = form.Time[1];
         delete form.Time;
       }
+      // 查询默认值,重置的时候不重置这个参数
+      if (getTableProps.value.defaultParamsNotReset) {
+        commonKeyData.value = form[getTableProps.value.defaultParamsNotReset];
+      }
       console.log(form, '查询请求参数');
 
       getForm.value = form;

+ 4 - 1
src/locales/langs/en-us.ts

@@ -302,7 +302,10 @@ const local: App.I18n.Schema = {
     delivery: '',
     'delivery_normal-order': '',
     'operation_delivery-admin': '',
-    'delivery_after-sales-order': ''
+    'delivery_after-sales-order': '',
+    finance: '',
+    'finance_commodity-freight': '',
+    finance_summary: ''
   },
   page: {
     login: {

+ 4 - 1
src/locales/langs/zh-cn.ts

@@ -299,7 +299,10 @@ const local: App.I18n.Schema = {
     delivery: '',
     'delivery_normal-order': '',
     'operation_delivery-admin': '',
-    'delivery_after-sales-order': ''
+    'delivery_after-sales-order': '',
+    finance: '',
+    'finance_commodity-freight': '',
+    finance_summary: ''
   },
   page: {
     login: {

+ 2 - 0
src/router/elegant/imports.ts

@@ -24,6 +24,8 @@ export const views: Record<LastLevelRouteKey, RouteComponent | (() => Promise<Ro
   "config_fright-config": () => import("@/views/config/fright-config/index.vue"),
   "delivery_after-sales-order": () => import("@/views/delivery/after-sales-order/index.vue"),
   "delivery_normal-order": () => import("@/views/delivery/normal-order/index.vue"),
+  "finance_commodity-freight": () => import("@/views/finance/commodity-freight/index.vue"),
+  finance_summary: () => import("@/views/finance/summary/index.vue"),
   "goods_desk-category": () => import("@/views/goods/desk-category/index.vue"),
   "goods_store-goods": () => import("@/views/goods/store-goods/index.vue"),
   goods_tag: () => import("@/views/goods/tag/index.vue"),

+ 29 - 0
src/router/elegant/routes.ts

@@ -99,6 +99,35 @@ export const generatedRoutes: GeneratedRoute[] = [
       }
     ]
   },
+  {
+    name: 'finance',
+    path: '/finance',
+    component: 'layout.base',
+    meta: {
+      title: 'finance',
+      i18nKey: 'route.finance'
+    },
+    children: [
+      {
+        name: 'finance_commodity-freight',
+        path: '/finance/commodity-freight',
+        component: 'view.finance_commodity-freight',
+        meta: {
+          title: 'finance_commodity-freight',
+          i18nKey: 'route.finance_commodity-freight'
+        }
+      },
+      {
+        name: 'finance_summary',
+        path: '/finance/summary',
+        component: 'view.finance_summary',
+        meta: {
+          title: 'finance_summary',
+          i18nKey: 'route.finance_summary'
+        }
+      }
+    ]
+  },
   {
     name: 'goods',
     path: '/goods',

+ 3 - 0
src/router/elegant/transform.ts

@@ -187,6 +187,9 @@ const routeMap: RouteMap = {
   "delivery": "/delivery",
   "delivery_after-sales-order": "/delivery/after-sales-order",
   "delivery_normal-order": "/delivery/normal-order",
+  "finance": "/finance",
+  "finance_commodity-freight": "/finance/commodity-freight",
+  "finance_summary": "/finance/summary",
   "goods": "/goods",
   "goods_desk-category": "/goods/desk-category",
   "goods_store-goods": "/goods/store-goods",

+ 14 - 0
src/service/api/finance/commodity-freight/index.ts

@@ -0,0 +1,14 @@
+import { request } from '@/service/request';
+
+/**
+ * 运费明细表-列表
+ * @param data
+ * @returns
+ */
+export function fetchGetfreightStatisticsList(data: any) {
+  return request<Api.finance.FreightStatisticsVo[]>({
+    url: '/platform/sku/freightStatisticsList',
+    method: 'get',
+    params: data
+  });
+}

+ 14 - 0
src/service/api/finance/summary/index.ts

@@ -0,0 +1,14 @@
+import { request } from '@/service/request';
+
+/**
+ * 对账单汇总表(商品)-列表
+ * @param data
+ * @returns
+ */
+export function fetchGetskuStatisticsList(data: any) {
+  return request<Api.finance.SkuStatistics[]>({
+    url: '/platform/sku/skuStatisticsList',
+    method: 'get',
+    params: data
+  });
+}

+ 87 - 0
src/typings/api.d.ts

@@ -1849,4 +1849,91 @@ declare namespace Api {
       [property: string]: any;
     }
   }
+  namespace finance {
+    interface SkuStatistics {
+      /**
+       * 商品总额
+       */
+      goodsTotalPrice?: number;
+      /**
+       * sku
+       */
+      skuStatisticsList?: SkuStatisticsVo[];
+      /**
+       * 现金抵扣
+       */
+      totalCash?: number;
+      /**
+       * 运费
+       */
+      totalFreight?: number;
+      /**
+       * 积分抵扣
+       */
+      totalPoints?: number;
+      [property: string]: any;
+    }
+    interface SkuStatisticsVo {
+      /**
+       * 单价
+       */
+      price?: number;
+      /**
+       * 商品总数量
+       */
+      prodCount?: number;
+      /**
+       * skuId
+       */
+      skuId?: number;
+      /**
+       * skuName
+       */
+      skuName?: string;
+      /**
+       * 规格
+       */
+      spec?: string;
+      [property: string]: any;
+    }
+    interface FreightStatisticsVo {
+      /**
+       * 日期
+       */
+      date?: string;
+      /**
+       * 运输公司
+       */
+      delivery?: string;
+      /**
+       * 运单号
+       */
+      deliveryNo?: string;
+      /**
+       * 费用
+       */
+      money?: string;
+      /**
+       * 订/退单号
+       */
+      orderNo?: string;
+      /**
+       * 收方
+       */
+      receiver?: string;
+      /**
+       * 寄件地区
+       */
+      sendArea?: string;
+      /**
+       * 寄方
+       */
+      sendSize?: string;
+      /**
+       * 到件地址
+       */
+      toAddress?: string;
+      [property: string]: any;
+    }
+  }
 }

+ 6 - 0
src/typings/elegant-router.d.ts

@@ -41,6 +41,9 @@ declare module "@elegant-router/types" {
     "delivery": "/delivery";
     "delivery_after-sales-order": "/delivery/after-sales-order";
     "delivery_normal-order": "/delivery/normal-order";
+    "finance": "/finance";
+    "finance_commodity-freight": "/finance/commodity-freight";
+    "finance_summary": "/finance/summary";
     "goods": "/goods";
     "goods_desk-category": "/goods/desk-category";
     "goods_store-goods": "/goods/store-goods";
@@ -153,6 +156,7 @@ declare module "@elegant-router/types" {
     | "about"
     | "config"
     | "delivery"
+    | "finance"
     | "goods"
     | "government"
     | "home"
@@ -192,6 +196,8 @@ declare module "@elegant-router/types" {
     | "config_fright-config"
     | "delivery_after-sales-order"
     | "delivery_normal-order"
+    | "finance_commodity-freight"
+    | "finance_summary"
     | "goods_desk-category"
     | "goods_store-goods"
     | "goods_tag"

+ 0 - 3
src/views/delivery/normal-order/index.vue

@@ -298,9 +298,6 @@ function handleSearch() {
     delete form.createTime;
   }
   channelIdList.value = form.channelIdList;
-  // if (form.channelIdList) {
-  //   form.channelIdList = form.channelIdList.join(',');
-  // }
   searchForm.value = form;
   getData();
   getNums();

+ 186 - 0
src/views/finance/commodity-freight/index.vue

@@ -0,0 +1,186 @@
+<script setup lang="tsx">
+import { nextTick } from 'vue';
+import { fetchGetfreightStatisticsList } from '@/service/api/finance/commodity-freight';
+import { fetchGetLoginUserList } from '@/service/api/common';
+import { useAuth } from '@/hooks/business/auth';
+import { commonExport } from '@/utils/common';
+import { useTable } from '@/components/zt/Table/hooks/useTable';
+const columns: NaiveUI.TableColumn<Api.finance.FreightStatisticsVo>[] = [
+  {
+    key: 'date',
+    title: '日期',
+    align: 'center',
+    width: 120
+  },
+  {
+    key: 'sendSize',
+    title: '寄方',
+    align: 'center',
+    width: 200
+  },
+  {
+    key: 'receiver',
+    title: '收方',
+    align: 'center',
+    width: 200
+  },
+  {
+    key: 'delivery',
+    title: '运输公司',
+    align: 'center',
+    width: 120
+  },
+  {
+    key: 'deliveryNo',
+    title: '运单号码',
+    align: 'center',
+    width: 200
+  },
+  {
+    key: 'sendArea',
+    title: '寄件地区',
+    align: 'center',
+    width: 200
+  },
+  {
+    key: 'toAddress',
+    title: '到件地区',
+    align: 'center',
+    width: 200
+  },
+  {
+    key: 'money',
+    title: '费用(元)',
+    align: 'center',
+    width: 120
+  },
+  {
+    key: 'orderNo',
+    title: '订/退单号',
+    align: 'center',
+    width: 200
+  }
+];
+
+const [registerTable, { refresh, setFieldsValue, getSeachForm }] = useTable({
+  searchFormConfig: {
+    schemas: [
+      {
+        field: 'channelIds',
+        label: '企业名称',
+        component: 'ApiSelect',
+        componentProps: {
+          api: fetchGetLoginUserList,
+          labelFeild: 'channelName',
+          valueFeild: 'id',
+          multiple: true,
+          onUpdateValue: () => {
+            nextTick(() => {
+              handleSearch();
+            });
+          },
+          getOptions: async (options: any) => {
+            await setSearchForm({ channelIdList: [options[0].id] });
+            handleSearch();
+          }
+        }
+      },
+      {
+        label: '收货人姓名',
+        field: 'receiver',
+        component: 'NInput'
+      },
+      {
+        label: '收货人手机号',
+        field: 'mobile',
+        component: 'NInput'
+      },
+      {
+        label: '运输公司',
+        field: 'delivery',
+        component: 'NSelect',
+        componentProps: {
+          options: [
+            {
+              label: '全部',
+              value: ''
+            },
+            {
+              label: '邮政',
+              value: '邮政'
+            },
+            {
+              label: '麦芽田-闪送',
+              value: '麦芽田-闪送'
+            }
+          ]
+        }
+      },
+      {
+        label: '运单单号',
+        field: 'deliveryNo',
+        component: 'NInput'
+      },
+      {
+        label: '到件地址',
+        field: 'toAddress',
+        component: 'NInput'
+      },
+      {
+        label: '订/退单号',
+        field: 'orderNo',
+        component: 'NInput'
+      },
+      {
+        label: '结算周期',
+        component: 'NDatePicker',
+        field: 'Time',
+        componentProps: {
+          type: 'datetimerange'
+        }
+      }
+    ],
+    inline: false,
+    size: 'small',
+    labelPlacement: 'left',
+    isFull: false
+  },
+  tableConfig: {
+    keyField: 'id',
+    title: '商品运费明细表',
+    showAddButton: false,
+    defaultParamsNotReset: 'channelIdList',
+    fieldMapToTime: [['Time', ['startTime', 'endTime']]]
+  }
+});
+function handleSearch() {
+  refresh();
+}
+async function setSearchForm(data: Recordable) {
+  setFieldsValue(data);
+}
+</script>
+
+<template>
+  <LayoutTable>
+    <ZTable
+      :columns="columns"
+      :immediate="false"
+      :api="fetchGetfreightStatisticsList"
+      :show-table-action="false"
+      @register="registerTable"
+    >
+      <template #prefix>
+        <NButton
+          v-if="useAuth().hasAuth('finance:commodity-freight:export')"
+          size="small"
+          @click="commonExport('/platform/sku/freightStatisticsExcel', getSeachForm())"
+        >
+          导出
+        </NButton>
+      </template>
+    </ZTable>
+  </LayoutTable>
+</template>
+
+<style scoped></style>

+ 137 - 0
src/views/finance/summary/index.vue

@@ -0,0 +1,137 @@
+<script setup lang="tsx">
+import { nextTick } from 'vue';
+import { fetchGetskuStatisticsList } from '@/service/api/finance/summary';
+import { fetchGetLoginUserList } from '@/service/api/common';
+import { useAuth } from '@/hooks/business/auth';
+import { commonExport } from '@/utils/common';
+import { useTable } from '@/components/zt/Table/hooks/useTable';
+const columns: NaiveUI.TableColumn<Api.finance.SkuStatistics>[] = [
+  {
+    key: 'skuId',
+    title: '商品ID',
+    align: 'center',
+    width: 120
+  },
+  {
+    key: 'skuName',
+    title: '商品名称',
+    align: 'center',
+    width: 200
+  },
+  {
+    key: 'spec',
+    title: '规格',
+    align: 'center',
+    width: 200
+  },
+  {
+    key: 'price',
+    title: '单价(元)',
+    align: 'center',
+    width: 120
+  },
+  {
+    key: 'prodCount',
+    title: '商品总数量',
+    align: 'center',
+    width: 200
+  },
+  {
+    key: 'total',
+    title: '小计(元)',
+    align: 'center',
+    width: 120
+  }
+];
+
+const [registerTable, { refresh, setFieldsValue, getSeachForm }] = useTable({
+  searchFormConfig: {
+    schemas: [
+      {
+        field: 'channelIds',
+        label: '企业名称',
+        component: 'ApiSelect',
+        componentProps: {
+          api: fetchGetLoginUserList,
+          labelFeild: 'channelName',
+          valueFeild: 'id',
+          multiple: true,
+          onUpdateValue: () => {
+            nextTick(() => {
+              handleSearch();
+            });
+          },
+          getOptions: async (options: any) => {
+            await setSearchForm({ channelIdList: [options[0].id] });
+            handleSearch();
+          }
+        }
+      },
+      {
+        label: '商品ID',
+        field: 'skuId',
+        component: 'NInput'
+      },
+      {
+        label: '商品名称',
+        field: 'skuName',
+        component: 'NInput'
+      },
+      {
+        label: '商品规格',
+        field: 'spec',
+        component: 'NInput'
+      },
+      {
+        label: '结算周期',
+        component: 'NDatePicker',
+        field: 'Time',
+        componentProps: {
+          type: 'datetimerange'
+        }
+      }
+    ],
+    inline: false,
+    size: 'small',
+    labelPlacement: 'left',
+    isFull: false
+  },
+  tableConfig: {
+    keyField: 'id',
+    title: '对账单汇总表(商品)',
+    showAddButton: false,
+    defaultParamsNotReset: 'channelIdList',
+    fieldMapToTime: [['Time', ['startTime', 'endTime']]]
+  }
+});
+function handleSearch() {
+  refresh();
+}
+async function setSearchForm(data: Recordable) {
+  setFieldsValue(data);
+}
+</script>
+
+<template>
+  <LayoutTable>
+    <ZTable
+      :columns="columns"
+      :immediate="false"
+      :api="fetchGetskuStatisticsList"
+      :show-table-action="false"
+      @register="registerTable"
+    >
+      <template #prefix>
+        <NButton
+          v-if="useAuth().hasAuth('finance:summary:export')"
+          size="small"
+          @click="commonExport('/platform/sku/skuStatisticsExcel', getSeachForm())"
+        >
+          导出
+        </NButton>
+      </template>
+    </ZTable>
+  </LayoutTable>
+</template>
+
+<style scoped></style>

+ 47 - 9
src/views/government/points/index.vue

@@ -1,13 +1,14 @@
 <script setup lang="tsx">
-import { ref, useTemplateRef } from 'vue';
+import { nextTick, ref, useTemplateRef } from 'vue';
 import {
   fetchGetFailPointsList,
   fetchGetPointsList,
   fetchGetPointsOutList,
   fetchImportPoints
 } from '@/service/api/government/points';
-import { fetchGetAllChannelList } from '@/service/api/goods/store-goods';
+import { fetchGetLoginUserList } from '@/service/api/common';
 import { useAuth } from '@/hooks/business/auth';
+import { commonExport } from '@/utils/common';
 import { useTable } from '@/components/zt/Table/hooks/useTable';
 import { useModal } from '@/components/zt/Modal/hooks/useModal';
 import type { FormSchema } from '@/components/zt/Form/types/form';
@@ -69,13 +70,23 @@ const outColumns: NaiveUI.TableColumn<Api.government.PointsRechargeVO>[] = [
 ];
 const searchSchemas: FormSchema[] = [
   {
-    field: 'channelId',
+    field: 'channelIdList',
     label: '所属企业',
     component: 'ApiSelect',
     componentProps: {
-      api: fetchGetAllChannelList,
+      api: fetchGetLoginUserList,
       labelFeild: 'channelName',
-      valueFeild: 'id'
+      valueFeild: 'id',
+      multiple: true,
+      onUpdateValue: () => {
+        nextTick(() => {
+          handleSearch();
+        });
+      },
+      getOptions: async (options: any) => {
+        await setSearchForm({ channelIdList: [options[0].id] });
+        handleSearch();
+      }
     }
   },
   {
@@ -154,7 +165,19 @@ const failColumns: NaiveUI.TableColumn<Api.government.PointsFailureRecordVO>[] =
 const failData = ref<Api.government.PointsFailureRecordVO[]>([]);
 const [registerTable, { refresh }] = useTable({
   searchFormConfig: {
-    schemas: searchSchemas.slice(0, 1),
+    schemas: [
+      {
+        field: 'channelIdList',
+        label: '所属企业',
+        component: 'ApiSelect',
+        componentProps: {
+          api: fetchGetLoginUserList,
+          labelFeild: 'channelName',
+          valueFeild: 'id',
+          multiple: true
+        }
+      }
+    ],
     inline: false,
     size: 'small',
     labelPlacement: 'left',
@@ -166,7 +189,7 @@ const [registerTable, { refresh }] = useTable({
     showAddButton: false
   }
 });
-const [registerModalTable, { refresh: refreshModal }] = useTable({
+const [registerModalTable, { refresh: refreshModal, setFieldsValue, getSeachForm }] = useTable({
   searchFormConfig: {
     schemas: searchSchemas,
     inline: false,
@@ -178,7 +201,8 @@ const [registerModalTable, { refresh: refreshModal }] = useTable({
     keyField: 'id',
     title: '积分列表',
     showAddButton: false,
-    minHeight: 400
+    minHeight: 400,
+    defaultParamsNotReset: 'channelIdList'
   }
 });
 
@@ -211,7 +235,13 @@ async function openImportModal() {
   failData.value = data as Api.government.PointsFailureRecordVO[];
 }
 function hanleExportFailure(code: string) {
-  window.open(`${import.meta.env.VITE_SERVICE_BASE_URL}/platform/pointsFailureRecord/export?code=${code}`, '_blank');
+  commonExport('/platform/pointsFailureRecord/export', { code });
+}
+function handleSearch() {
+  refreshModal();
+}
+async function setSearchForm(value: Recordable) {
+  await setFieldsValue(value);
 }
 </script>
 
@@ -225,12 +255,20 @@ function hanleExportFailure(code: string) {
     <BasicModal @register="registerModal" @after-leave="refresh">
       <LayoutTable>
         <ZTable
+          :immediate="false"
           :show-table-action="false"
           :columns="ModalColumns"
           :api="fetchGetPointsList"
           @register="registerModalTable"
         >
           <template #prefix>
+            <NButton
+              v-if="useAuth().hasAuth('points:user:export')"
+              size="small"
+              @click="commonExport('/platform/pointsRecharge/export', getSeachForm())"
+            >
+              导出
+            </NButton>
             <NButton v-if="useAuth().hasAuth('points:user:import')" size="small" @click="handleOpenPoints">
               导入积分
             </NButton>

+ 8 - 6
src/views/government/user-list/index.vue

@@ -9,6 +9,7 @@ import {
   fetchGetImportRecordList,
   fetchGetUserList
 } from '@/service/api/government/user-list';
+import { fetchGetLoginUserList } from '@/service/api/common';
 import { fetchGetAllChannelList } from '@/service/api/goods/store-goods';
 import { useAuth } from '@/hooks/business/auth';
 import { commonExport } from '@/utils/common';
@@ -74,15 +75,15 @@ const columns: NaiveUI.TableColumn<Api.government.userList>[] = [
   }
 ];
 
-const [registerTable, { refresh, setTableLoading, setFieldsValue: setSearchValues }] = useTable({
+const [registerTable, { refresh, setTableLoading, setFieldsValue: setSearchValues, getSeachForm }] = useTable({
   searchFormConfig: {
     schemas: [
       {
-        field: 'channelId',
+        field: 'channelIdList',
         label: '所属企业',
         component: 'ApiSelect',
         componentProps: {
-          api: fetchGetAllChannelList,
+          api: fetchGetLoginUserList,
           labelFeild: 'channelName',
           valueFeild: 'id',
           multiple: true,
@@ -116,7 +117,8 @@ const [registerTable, { refresh, setTableLoading, setFieldsValue: setSearchValue
   tableConfig: {
     keyField: 'userId',
     title: '员工列表',
-    showAddButton: useAuth().hasAuth('user:list:add')
+    showAddButton: useAuth().hasAuth('user:list:add'),
+    defaultParamsNotReset: 'channelIdList'
   }
 });
 const [registerModalTable] = useTable({
@@ -294,14 +296,14 @@ function handleSearch() {
   refresh();
 }
 function handleExport() {
-  const form = getFieldsValue();
+  const form = getSeachForm();
   commonExport('/admin/enterprise/export', form);
 }
 </script>
 
 <template>
   <LayoutTable>
-    <ZTable :columns="columns" :api="fetchGetUserList" @register="registerTable" @add="openModal">
+    <ZTable :columns="columns" :immediate="false" :api="fetchGetUserList" @register="registerTable" @add="openModal">
       <template #op="{ row }">
         <NButton
           v-if="useAuth().hasAuth('user:list:edit')"