Browse Source

会费管理各表字段修改

wangwei 4 years ago
parent
commit
f25b40d241

+ 25 - 199
src/views/expense/account_info/data.ts

@@ -16,80 +16,36 @@ export const columns: BasicColumn[] = [
     sorter: true,
   },
   {
-    title: '姓名',
+    title: '账户名称',
     dataIndex: 'name',
-    width: 130,
+    width: 150,
     sorter: true,
   },
   {
-    title: '性别',
-    dataIndex: 'gender',
+    title: '余额',
+    dataIndex: 'money',
     width: 130,
-    customRender({ record }) {
-      const options = ['男', '女'];
-      return options[record.gender];
-    },
     sorter: true,
   },
   {
-    title: '籍贯',
-    dataIndex: 'origin',
+    title: '操作人',
+    dataIndex: 'people',
     width: 150,
     sorter: true,
   },
   {
-    title: '出生年月',
-    dataIndex: 'birthday',
+    title: '创建日期',
+    dataIndex: 'createTime',
     width: 200,
     customRender({ record }) {
-      return moment(record.birthday).format('YYYY-MM-DD');
+      return moment(record.createTime).format('YYYY-MM-DD');
     },
     sorter: true,
   },
   {
-    title: '党派',
-    dataIndex: 'party',
-    width: 150,
-    customRender({ record }) {
-      const options = ['无', '民革', '民盟', '民建', '民进', '农工', '致公党', '九三学社', '台盟'];
-      return options[record.party];
-    },
-    sorter: true,
-  },
-  {
-    title: '民族',
-    dataIndex: 'nation',
-    width: 160,
-    sorter: true,
-  },
-  {
-    title: '单位',
-    dataIndex: 'company',
-    width: 160,
-    sorter: true,
-  },
-  {
-    title: '人大职务',
-    dataIndex: 'peopleJob',
-    width: 160,
-    sorter: true,
-  },
-  {
-    title: '政协职务',
-    dataIndex: 'cppccJob',
-    width: 160,
-    sorter: true,
-  },
-  {
-    title: '社会职务',
-    dataIndex: 'job',
-    width: 160,
-    sorter: true,
-  },
-  {
-    title: '联系方式',
-    dataIndex: 'mobile',
-    width: 160,
+    title: '备注',
+    dataIndex: 'remark',
+    width: 200,
     sorter: true,
   },
 ];
@@ -112,31 +68,10 @@ export function getFormConfig(): Partial<FormProps> {
       },
       {
         field: `name`,
-        label: `姓名`,
+        label: `账户名称`,
         component: 'Input',
         componentProps: {
-          placeholder: '姓名',
-        },
-        colProps: {
-          xl: 12,
-          xxl: 8,
-        },
-      },
-      {
-        field: `gender`,
-        label: `性别`,
-        component: 'Select',
-        componentProps: {
-          options: [
-            {
-              label: '男',
-              value: 0,
-            },
-            {
-              label: '女',
-              value: 1,
-            },
-          ],
+          placeholder: '账户名称',
         },
         colProps: {
           xl: 12,
@@ -144,11 +79,11 @@ export function getFormConfig(): Partial<FormProps> {
         },
       },
       {
-        field: `origin`,
-        label: `籍贯`,
+        field: `money`,
+        label: `余额`,
         component: 'Input',
         componentProps: {
-          placeholder: '籍贯',
+          placeholder: '余额',
         },
         colProps: {
           xl: 12,
@@ -156,120 +91,11 @@ export function getFormConfig(): Partial<FormProps> {
         },
       },
       {
-        field: `birthday`,
-        label: `出生年月`,
+        field: `createTime`,
+        label: `创建日期`,
         component: 'DatePicker',
         componentProps: {
-          placeholder: '出生年月',
-        },
-        colProps: {
-          xl: 12,
-          xxl: 8,
-        },
-      },
-      {
-        field: `party`,
-        label: `党派`,
-        component: 'Select',
-        componentProps: {
-          options: [
-            {
-              label: '无',
-              value: 0,
-            },
-            {
-              label: '民革',
-              value: 1,
-            },
-            {
-              label: '民盟',
-              value: 2,
-            },
-            {
-              label: '民建',
-              value: 3,
-            },
-            {
-              label: '民进',
-              value: 4,
-            },
-            {
-              label: '农工',
-              value: 5,
-            },
-            {
-              label: '致公党',
-              value: 6,
-            },
-            {
-              label: '九三学社',
-              value: 7,
-            },
-            {
-              label: '台盟',
-              value: 8,
-            },
-          ],
-        },
-        colProps: {
-          xl: 12,
-          xxl: 8,
-        },
-      },
-      {
-        field: `nation`,
-        label: `民族`,
-        component: 'Input',
-        componentProps: {
-          placeholder: '名族',
-        },
-        colProps: {
-          xl: 12,
-          xxl: 8,
-        },
-      },
-      {
-        field: `company`,
-        label: `单位`,
-        component: 'Input',
-        componentProps: {
-          placeholder: '单位',
-        },
-        colProps: {
-          xl: 12,
-          xxl: 8,
-        },
-      },
-      {
-        field: `peopleJob`,
-        label: `人大职务`,
-        component: 'Input',
-        componentProps: {
-          placeholder: '人大职务',
-        },
-        colProps: {
-          xl: 12,
-          xxl: 8,
-        },
-      },
-      {
-        field: `cppccJob`,
-        label: `政协职务`,
-        component: 'Input',
-        componentProps: {
-          placeholder: '政协职务',
-        },
-        colProps: {
-          xl: 12,
-          xxl: 8,
-        },
-      },
-      {
-        field: `job`,
-        label: `社会职务`,
-        component: 'Input',
-        componentProps: {
-          placeholder: '社会职务',
+          placeholder: '创建日期',
         },
         colProps: {
           xl: 12,
@@ -277,11 +103,11 @@ export function getFormConfig(): Partial<FormProps> {
         },
       },
       {
-        field: `mobile`,
-        label: `联系方式`,
+        field: `remark`,
+        label: `备注`,
         component: 'Input',
         componentProps: {
-          placeholder: '联系方式',
+          placeholder: '备注',
         },
         colProps: {
           xl: 12,
@@ -297,13 +123,13 @@ export const schemas: FormSchema[] = [
   {
     field: 'name',
     component: 'Input',
-    label: '姓名',
+    label: '账户名称',
     labelWidth: adaptWidth.labelWidth,
     colProps: {
       span: adaptWidth.elContainer,
     },
     componentProps: {
-      placeholder: '姓名',
+      placeholder: '账户名称',
     },
     required: true,
   },

+ 2 - 2
src/views/expense/account_info/index.vue

@@ -1,9 +1,9 @@
 <template>
   <CollapseContainer
     class="sys-container"
-    title="个人管理"
+    title="账户信息"
     :canExpan="false"
-    helpMessage="个人管理"
+    helpMessage="账户信息"
   >
     <BasicTable
       ref="tableRef"

+ 35 - 100
src/views/expense/account_manage/data.ts

@@ -54,7 +54,7 @@ export const columns: BasicColumn[] = [
     dataIndex: 'invoice',
     width: 130,
     customRender({ record }) {
-      const options = ['是', '否'];
+      const options = ['否', '是'];
       return options[record.invoice];
     },
     sorter: true,
@@ -119,10 +119,10 @@ export function getFormConfig(): Partial<FormProps> {
       },
       {
         field: `name`,
-        label: `姓名`,
+        label: `交易名称`,
         component: 'Input',
         componentProps: {
-          placeholder: '姓名',
+          placeholder: '交易名称',
         },
         colProps: {
           xl: 12,
@@ -130,11 +130,11 @@ export function getFormConfig(): Partial<FormProps> {
         },
       },
       {
-        field: `origin`,
-        label: `籍贯`,
+        field: `account`,
+        label: `交易账户`,
         component: 'Input',
         componentProps: {
-          placeholder: '籍贯',
+          placeholder: '交易账户',
         },
         colProps: {
           xl: 12,
@@ -142,84 +142,12 @@ export function getFormConfig(): Partial<FormProps> {
         },
       },
       {
-        field: `birthday`,
-        label: `出生年月`,
-        component: 'DatePicker',
-        componentProps: {
-          placeholder: '出生年月',
-        },
-        colProps: {
-          xl: 12,
-          xxl: 8,
-        },
-      },
-      {
-        field: `party`,
-        label: `党派`,
-        component: 'Select',
-        componentProps: {
-          options: [
-            {
-              label: '无',
-              value: 0,
-            },
-            {
-              label: '民革',
-              value: 1,
-            },
-            {
-              label: '民盟',
-              value: 2,
-            },
-            {
-              label: '民建',
-              value: 3,
-            },
-            {
-              label: '民进',
-              value: 4,
-            },
-            {
-              label: '农工',
-              value: 5,
-            },
-            {
-              label: '致公党',
-              value: 6,
-            },
-            {
-              label: '九三学社',
-              value: 7,
-            },
-            {
-              label: '台盟',
-              value: 8,
-            },
-          ],
-        },
-        colProps: {
-          xl: 12,
-          xxl: 8,
-        },
-      },
-      {
-        field: `nation`,
-        label: `民族`,
-        component: 'Input',
-        componentProps: {
-          placeholder: '名族',
-        },
-        colProps: {
-          xl: 12,
-          xxl: 8,
-        },
-      },
-      {
-        field: `company`,
-        label: `单位`,
+        field: `money`,
+        label: `金额`,
         component: 'Input',
         componentProps: {
-          placeholder: '单位',
+          type: 'number',
+          placeholder: '金额',
         },
         colProps: {
           xl: 12,
@@ -227,11 +155,11 @@ export function getFormConfig(): Partial<FormProps> {
         },
       },
       {
-        field: `peopleJob`,
-        label: `人大职务`,
+        field: `people`,
+        label: `相关人员`,
         component: 'Input',
         componentProps: {
-          placeholder: '人大职务',
+          placeholder: '相关人员',
         },
         colProps: {
           xl: 12,
@@ -239,11 +167,21 @@ export function getFormConfig(): Partial<FormProps> {
         },
       },
       {
-        field: `cppccJob`,
-        label: `政协职务`,
-        component: 'Input',
+        field: `invoice`,
+        label: `是否开票`,
+        component: 'Select',
         componentProps: {
-          placeholder: '政协职务',
+          placeholder: '是否开票',
+          options: [
+            {
+              label: '是',
+              value: 0,
+            },
+            {
+              label: '否',
+              value: 1,
+            },
+          ],
         },
         colProps: {
           xl: 12,
@@ -251,11 +189,11 @@ export function getFormConfig(): Partial<FormProps> {
         },
       },
       {
-        field: `job`,
-        label: `社会职务`,
-        component: 'Input',
+        field: `time`,
+        label: `交易日期`,
+        component: 'DatePicker',
         componentProps: {
-          placeholder: '社会职务',
+          placeholder: '交易日期',
         },
         colProps: {
           xl: 12,
@@ -263,11 +201,11 @@ export function getFormConfig(): Partial<FormProps> {
         },
       },
       {
-        field: `mobile`,
-        label: `联系方式`,
+        field: `remark`,
+        label: `备注`,
         component: 'Input',
         componentProps: {
-          placeholder: '联系方式',
+          placeholder: '备注',
         },
         colProps: {
           xl: 12,
@@ -391,7 +329,7 @@ export const schemas: FormSchema[] = [
   },
   {
     field: 'invoice',
-    component: 'Select',
+    component: 'Switch',
     label: '是否开票',
     labelWidth: adaptWidth.labelWidth,
     colProps: {
@@ -410,7 +348,6 @@ export const schemas: FormSchema[] = [
         },
       ],
     },
-    required: true,
   },
   {
     field: 'invoiceNo',
@@ -429,7 +366,6 @@ export const schemas: FormSchema[] = [
       }
       return false;
     },
-    required: true,
   },
   {
     field: 'enclosure',
@@ -442,7 +378,6 @@ export const schemas: FormSchema[] = [
     componentProps: {
       placeholder: '上传',
     },
-    required: true,
   },
   {
     field: 'remark',

+ 2 - 2
src/views/expense/account_manage/index.vue

@@ -1,9 +1,9 @@
 <template>
   <CollapseContainer
     class="sys-container"
-    title="个人管理"
+    title="账目管理"
     :canExpan="false"
-    helpMessage="个人管理"
+    helpMessage="账目管理"
   >
     <BasicTable
       ref="tableRef"

+ 491 - 0
src/views/expense/membership_fee/data.ts

@@ -0,0 +1,491 @@
+import { FormProps, BasicColumn } from '/@/components/Table';
+import { FormSchema } from '/@/components/Form/index';
+import { adapt } from '/@/utils/adapt';
+import moment from 'moment';
+
+const adaptWidth = adapt();
+
+export const columns: BasicColumn[] = [
+  {
+    title: 'ID',
+    dataIndex: 'id',
+    editComponentProps: {
+      prefix: '$',
+    },
+    width: 100,
+    sorter: true,
+  },
+  {
+    title: '会费年份',
+    dataIndex: 'year',
+    width: 150,
+    sorter: true,
+  },
+  {
+    title: '会员职务',
+    dataIndex: 'job',
+    width: 130,
+    customRender({ record }) {
+      const options = [];
+      return options[record.job];
+    },
+    sorter: true,
+  },
+  {
+    title: '金额',
+    dataIndex: 'money',
+    width: 130,
+    sorter: true,
+  },
+  {
+    title: '操作员',
+    dataIndex: 'people',
+    width: 150,
+    sorter: true,
+  },
+  {
+    title: '备注',
+    dataIndex: 'remark',
+    width: 200,
+    sorter: true,
+  },
+  {
+    title: '创建日期',
+    dataIndex: 'createTime',
+    width: 200,
+    customRender({ record }) {
+      return moment(record.createTime).format('YYYY-MM-DD');
+    },
+    sorter: true,
+  },
+];
+
+export function getFormConfig(): Partial<FormProps> {
+  return {
+    labelWidth: 100,
+    schemas: [
+      {
+        field: `id`,
+        label: `ID`,
+        component: 'Input',
+        componentProps: {
+          placeholder: 'ID',
+        },
+        colProps: {
+          xl: 12,
+          xxl: 8,
+        },
+      },
+      {
+        field: `year`,
+        label: `会费年份`,
+        component: 'Input',
+        componentProps: {
+          placeholder: '会费年份',
+        },
+        colProps: {
+          xl: 12,
+          xxl: 8,
+        },
+      },
+      {
+        field: `job`,
+        label: `会员职务`,
+        component: 'Select',
+        componentProps: {
+          placeholder: '会员职务',
+          options: [
+            {
+              label: '会员',
+              value: 0,
+            },
+          ],
+        },
+        colProps: {
+          xl: 12,
+          xxl: 8,
+        },
+      },
+      {
+        field: `money`,
+        label: `金额`,
+        component: 'Input',
+        componentProps: {
+          placeholder: '金额',
+        },
+        colProps: {
+          xl: 12,
+          xxl: 8,
+        },
+      },
+      {
+        field: `people`,
+        label: `操作员`,
+        component: 'Input',
+        componentProps: {
+          placeholder: '操作员',
+        },
+        colProps: {
+          xl: 12,
+          xxl: 8,
+        },
+      },
+      {
+        field: `remark`,
+        label: `备注`,
+        component: 'Input',
+        componentProps: {
+          placeholder: '备注',
+        },
+        colProps: {
+          xl: 12,
+          xxl: 8,
+        },
+      },
+      {
+        field: `createTime`,
+        label: `创建日期`,
+        component: 'DatePicker',
+        componentProps: {
+          placeholder: '创建日期',
+        },
+        colProps: {
+          xl: 12,
+          xxl: 8,
+        },
+      },
+    ],
+  };
+}
+
+// =================popup================================
+export const schemas: FormSchema[] = [
+  {
+    field: 'name',
+    component: 'Input',
+    label: '账户名称',
+    labelWidth: adaptWidth.labelWidth,
+    colProps: {
+      span: adaptWidth.elContainer,
+    },
+    componentProps: {
+      placeholder: '账户名称',
+    },
+    required: true,
+  },
+  {
+    field: 'gender',
+    component: 'Select',
+    label: '性别',
+    labelWidth: adaptWidth.labelWidth,
+    colProps: {
+      span: adaptWidth.elContainer,
+    },
+    componentProps: {
+      placeholder: '性别',
+      options: [
+        {
+          label: '男',
+          value: 0,
+        },
+        {
+          label: '女',
+          value: 1,
+        },
+      ],
+    },
+    required: true,
+  },
+  {
+    field: 'birthday',
+    component: 'DatePicker',
+    label: '出生年月',
+    labelWidth: adaptWidth.labelWidth,
+    colProps: {
+      span: adaptWidth.elContainer,
+    },
+    componentProps: {
+      placeholder: '出生年月',
+    },
+    required: true,
+  },
+  {
+    field: 'origin',
+    component: 'Input',
+    label: '籍贯',
+    labelWidth: adaptWidth.labelWidth,
+    colProps: {
+      span: adaptWidth.elContainer,
+    },
+    componentProps: {
+      placeholder: '籍贯',
+    },
+    required: true,
+  },
+  {
+    field: 'birthplace',
+    component: 'Input',
+    label: '出生地',
+    labelWidth: adaptWidth.labelWidth,
+    colProps: {
+      span: adaptWidth.elContainer,
+    },
+    componentProps: {
+      placeholder: '出生地',
+    },
+    required: true,
+  },
+  {
+    field: 'cardNo',
+    component: 'Input',
+    label: '身份证号码',
+    labelWidth: adaptWidth.labelWidth,
+    colProps: {
+      span: adaptWidth.elContainer,
+    },
+    componentProps: {
+      placeholder: '身份证号码',
+    },
+    required: true,
+  },
+  {
+    field: 'nation',
+    component: 'Input',
+    label: '民族',
+    labelWidth: adaptWidth.labelWidth,
+    colProps: {
+      span: adaptWidth.elContainer,
+    },
+    componentProps: {
+      placeholder: '民族',
+    },
+    required: true,
+  },
+  {
+    field: 'party',
+    label: '党派',
+    component: 'Select',
+    componentProps: {
+      placeholder: '党派',
+      options: [
+        {
+          label: '无',
+          value: 0,
+        },
+        {
+          label: '民革',
+          value: 1,
+        },
+        {
+          label: '民盟',
+          value: 2,
+        },
+        {
+          label: '民建',
+          value: 3,
+        },
+        {
+          label: '民进',
+          value: 4,
+        },
+        {
+          label: '农工',
+          value: 5,
+        },
+        {
+          label: '致公党',
+          value: 6,
+        },
+        {
+          label: '九三学社',
+          value: 7,
+        },
+        {
+          label: '台盟',
+          value: 8,
+        },
+      ],
+    },
+    labelWidth: adaptWidth.labelWidth,
+    colProps: {
+      span: adaptWidth.elContainer,
+    },
+    required: true,
+  },
+  {
+    field: 'edu',
+    component: 'Input',
+    label: '学历',
+    labelWidth: adaptWidth.labelWidth,
+    colProps: {
+      span: adaptWidth.elContainer,
+    },
+    componentProps: {
+      placeholder: '学历',
+    },
+    required: true,
+  },
+  {
+    field: 'title',
+    component: 'Input',
+    label: '职称',
+    labelWidth: adaptWidth.labelWidth,
+    colProps: {
+      span: adaptWidth.elContainer,
+    },
+    componentProps: {
+      placeholder: '职称',
+    },
+  },
+  {
+    field: 'job',
+    component: 'Input',
+    label: '职务',
+    labelWidth: adaptWidth.labelWidth,
+    colProps: {
+      span: adaptWidth.elContainer,
+    },
+    componentProps: {
+      placeholder: '职务',
+    },
+    required: true,
+  },
+  {
+    field: 'address',
+    component: 'Input',
+    label: '地址',
+    labelWidth: adaptWidth.labelWidth,
+    defaultValue: '',
+    colProps: {
+      span: adaptWidth.elContainer,
+    },
+    componentProps: {
+      placeholder: '地址',
+    },
+    required: true,
+  },
+  {
+    field: 'zipcode',
+    component: 'Input',
+    label: '邮编',
+    labelWidth: adaptWidth.labelWidth,
+    defaultValue: '',
+    colProps: {
+      span: adaptWidth.elContainer,
+    },
+    componentProps: {
+      placeholder: '邮编',
+    },
+  },
+  {
+    field: 'tel',
+    component: 'Input',
+    label: '电话',
+    labelWidth: adaptWidth.labelWidth,
+    defaultValue: '',
+    colProps: {
+      span: adaptWidth.elContainer,
+    },
+    componentProps: {
+      placeholder: '电话',
+    },
+  },
+  {
+    field: 'mobile',
+    component: 'Input',
+    label: '手机',
+    labelWidth: adaptWidth.labelWidth,
+    defaultValue: '',
+    colProps: {
+      span: adaptWidth.elContainer,
+    },
+    componentProps: {
+      placeholder: '手机',
+    },
+    required: true,
+  },
+  {
+    field: 'old',
+    component: 'Input',
+    label: '办企业前工作单位',
+    labelWidth: adaptWidth.labelWidth,
+    defaultValue: '',
+    colProps: {
+      span: adaptWidth.elContainer,
+    },
+    componentProps: {
+      placeholder: '办企业前工作单位',
+    },
+  },
+  {
+    field: 'peopleJob',
+    component: 'Input',
+    label: '人大职务',
+    labelWidth: adaptWidth.labelWidth,
+    defaultValue: '',
+    colProps: {
+      span: adaptWidth.elContainer,
+    },
+    componentProps: {
+      placeholder: '人大职务',
+    },
+  },
+  {
+    field: 'cppccJob',
+    component: 'Input',
+    label: '政协职务',
+    labelWidth: adaptWidth.labelWidth,
+    defaultValue: '',
+    colProps: {
+      span: adaptWidth.elContainer,
+    },
+    componentProps: {
+      placeholder: '政协职务',
+    },
+  },
+  {
+    field: 'family',
+    component: 'ArrCom',
+    label: '家庭主要成员',
+    labelWidth: adaptWidth.labelWidth,
+    colProps: {
+      span: adaptWidth.elContainer,
+    },
+    defaultValue: [],
+    componentProps: ({ formModel }) => {
+      return {
+        placeholder: '家庭主要成员',
+        value: formModel.family,
+        onChange: () => {},
+      };
+    },
+    required: true,
+  },
+  {
+    field: 'info',
+    component: 'InputTextArea',
+    label: '本人简历',
+    labelWidth: adaptWidth.labelWidth,
+    defaultValue: '',
+    colProps: {
+      span: adaptWidth.elContainer,
+    },
+    componentProps: {
+      placeholder: '本人简历',
+    },
+  },
+  {
+    field: 'company',
+    component: 'Input',
+    label: '所在单位',
+    labelWidth: adaptWidth.labelWidth,
+    defaultValue: '',
+    colProps: {
+      span: adaptWidth.elContainer,
+    },
+    componentProps: {
+      placeholder: '所在单位',
+    },
+    required: true,
+  },
+];

+ 311 - 0
src/views/expense/membership_fee/index.vue

@@ -0,0 +1,311 @@
+<template>
+  <CollapseContainer
+    class="sys-container"
+    title="会费管理"
+    :canExpan="false"
+    helpMessage="会费管理"
+  >
+    <BasicTable
+      ref="tableRef"
+      @register="registerTable"
+      rowKey="id"
+      @selectionChange="selectionChange"
+      @rowClick="rowClick"
+      @rowDbClick="handleEdit"
+      showTableSetting
+      :canResize="true"
+      :pagination="{
+        pageSize: 10,
+        defaultPageSize: 10,
+        showSizeChanger: false,
+      }"
+    >
+      <template #toolbar>
+        <a-button type="primary" @click="addRole"> 添加 </a-button>
+        <a-button color="error" :disabled="disable_btn" @click="deleteBatches"> 删除 </a-button>
+        <a-button @click="openModal"> 导出 </a-button>
+      </template>
+      <template #form-custom> custom-slot </template>
+      <template #action="{ record }">
+        <TableAction :actions="createActions(record)" stopButtonPropagation />
+      </template>
+    </BasicTable>
+    <ExpExcelModel @register="register" @success="defaultHeader" />
+    <Popup @register="addRegister" :popupData="popupData" @saveData="saveData" />
+  </CollapseContainer>
+</template>
+<script lang="ts">
+  import { defineComponent, reactive, ref, toRefs, unref, createVNode } from 'vue';
+  import { CollapseContainer } from '/@/components/Container/index';
+  import Popup from './popup.vue';
+  import { useMessage } from '/@/hooks/web/useMessage';
+  import { useModal } from '/@/components/Modal';
+  import { jsonToSheetXlsx, ExpExcelModel, ExportModalResult } from '/@/components/Excel';
+  import { Modal } from 'ant-design-vue';
+  import { ExclamationCircleOutlined } from '@ant-design/icons-vue';
+  import { getFormConfig, columns } from './data';
+  import moment from 'moment';
+  import {
+    getPersonList,
+    addPerson,
+    deleteBatchesPerson,
+    getPerson,
+    editPerson,
+    deletePerson,
+  } from '/@/api/sys/member';
+  import {
+    BasicTable,
+    useTable,
+    TableAction,
+    ActionItem,
+    EditRecordRow,
+    TableActionType,
+  } from '/@/components/Table';
+
+  interface PopupData {
+    title: string;
+  }
+
+  interface Btn {
+    disable_btn: boolean;
+  }
+
+  export default defineComponent({
+    name: 'MembershipFee',
+    components: { CollapseContainer, BasicTable, TableAction, Popup, ExpExcelModel },
+    setup() {
+      const { createMessage } = useMessage();
+      const { success /*, error*/ } = createMessage;
+      const tableRef = ref<Nullable<TableActionType>>(null);
+      const popupData = reactive<PopupData>({
+        title: '添加',
+      });
+      const btn = reactive<Btn>({
+        disable_btn: true,
+      });
+      const [registerTable] = useTable({
+        rowSelection: { type: 'checkbox' },
+        columns: columns,
+        // clickToRowSelect: false, // 点击行不勾选
+        api: getPersonList,
+        useSearchForm: true,
+        tableSetting: {
+          redo: false,
+          size: false,
+        },
+        beforeFetch: beforeFetch,
+        afterFetch: afterFetch,
+        formConfig: getFormConfig(),
+        actionColumn: {
+          width: 160,
+          title: '操作',
+          dataIndex: 'action',
+          slots: { customRender: 'action' },
+          fixed: undefined,
+        },
+        showIndexColumn: false,
+        bordered: true,
+      });
+      const [register, { openModal }] = useModal();
+      const [addRegister, { openModal: openPopup }] = useModal();
+      function getTableAction() {
+        // 获取组件
+        const tableAction = unref(tableRef);
+        if (!tableAction) {
+          throw new Error('tableAction is null');
+        }
+        return tableAction;
+      }
+      // 请求之前处理
+      function beforeFetch(params) {
+        for (let k in params) {
+          if (k !== 'page' && k !== 'pageSize' && k !== 'field' && k !== 'order') {
+            if (params[k] === '') {
+              delete params[k];
+            } else {
+              if (!params.filter) {
+                params.filter = {};
+              }
+              if (params.birthday) {
+                params.birthday = moment(params.birthday).format('YYYY-MM-DD');
+              } else {
+                delete params.birthday;
+              }
+              params.filter[k] = params[k];
+              delete params[k];
+            }
+          }
+        }
+        params.filter = JSON.stringify(params.filter);
+        params.offset = params.page;
+        params.limit = params.pageSize;
+        delete params.page;
+        delete params.pageSize;
+      }
+
+      function afterFetch(result) {
+        console.log(`result`, result);
+        // tableData.result = result;
+      }
+
+      function addRole() {
+        popupData.title = '添加';
+        openPopup(true, { family: [] });
+      }
+
+      async function handleEdit(record: EditRecordRow) {
+        popupData.title = '编辑';
+        getPerson({ id: record.id }).then((res) => {
+          const data = res.row;
+          console.log(`data`, data);
+          openPopup(true, data);
+        });
+      }
+
+      async function handleDelete(record: Recordable) {
+        console.log(record);
+        await deletePerson({ id: record.id }).then((res) => {
+          console.log(res);
+          getTableAction().reload();
+          success('删除成功!');
+        });
+      }
+
+      function selectionChange() {
+        const keys = getTableAction().getSelectRowKeys();
+        if (keys.length) {
+          btn.disable_btn = false;
+        } else {
+          btn.disable_btn = true;
+        }
+      }
+      function rowClick() {
+        const keys = getTableAction().getSelectRowKeys();
+        if (keys.length) {
+          btn.disable_btn = false;
+        } else {
+          btn.disable_btn = true;
+        }
+      }
+
+      async function deleteBatches() {
+        const keys = await getTableAction().getSelectRowKeys();
+        const count = keys.length;
+        const ids = keys.toString();
+        if (!ids) {
+          return;
+        }
+        Modal.confirm({
+          title: '删除提示',
+          icon: createVNode(ExclamationCircleOutlined),
+          content: '确定删除选中的' + count + '项?',
+          okText: '确定',
+          okType: 'danger',
+          cancelText: '取消',
+          maskClosable: true,
+          async onOk() {
+            await deleteBatchesPerson({ ids }).then((res) => {
+              console.log(res);
+              getTableAction().reload();
+              success('删除成功!');
+              getTableAction().setSelectedRowKeys([]);
+            });
+          },
+          onCancel() {
+            console.log('Cancel');
+          },
+        });
+      }
+
+      async function saveData(params: any) {
+        const data = params.data;
+        const closeModel = params.closeModal;
+        console.log(`data`, data);
+        if (!data.id) {
+          await addPerson(data).then((res) => {
+            console.log(res);
+            getTableAction().reload();
+            closeModel();
+            success('创建成功!');
+          });
+          console.log('----------add---');
+        } else {
+          await editPerson(data).then((res) => {
+            console.log(res);
+            getTableAction().reload();
+            closeModel();
+            success('修改成功!');
+          });
+          console.log('----------edit---');
+        }
+      }
+
+      // 导出
+      function defaultHeader({ filename, bookType }: ExportModalResult) {
+        // 默认Object.keys(data[0])作为header
+        jsonToSheetXlsx({
+          data: getTableAction().getDataSource(),
+          filename,
+          write2excelOpts: {
+            bookType,
+          },
+        });
+      }
+
+      function createActions(record: EditRecordRow): ActionItem[] {
+        return [
+          {
+            label: '编辑',
+            icon: 'ant-design:edit-outlined',
+            color: 'warning',
+            onClick: handleEdit.bind(null, record),
+          },
+          {
+            label: '删除',
+            color: 'error',
+            icon: 'ic:outline-delete-outline',
+            popConfirm: {
+              title: '是否确认删除',
+              confirm: handleDelete.bind(null, record),
+            },
+          },
+        ];
+      }
+      return {
+        popupData,
+        tableRef,
+        registerTable,
+        addRole,
+        handleEdit,
+        deleteBatches,
+        createActions,
+        getTableAction,
+        rowClick,
+        selectionChange,
+        addRegister,
+        saveData,
+        defaultHeader,
+        openModal,
+        register,
+        ...toRefs(btn),
+      };
+    },
+  });
+</script>
+<style>
+  .ant-calendar-picker {
+    width: 100%;
+  }
+
+  /* @media (max-width: 639px) {
+    .sys-container .vben-basic-table-header__toolbar > * {
+      padding: 6px !important;
+      margin-right: 3px;
+      font-size: 12px !important;
+    }
+
+    .sys-container .vben-basic-table .ant-table-wrapper {
+      padding: 3px;
+    }
+  } */
+</style>

+ 107 - 0
src/views/expense/membership_fee/popup.vue

@@ -0,0 +1,107 @@
+<template>
+  <BasicModal width="800px" v-bind="$attrs" @register="register" @ok="confirm" :title="title">
+    <BasicForm @register="registerForm" :model="model" />
+  </BasicModal>
+</template>
+<script lang="ts">
+  import { defineComponent, PropType, reactive, ref, toRefs } from 'vue';
+  import { BasicModal, useModalInner } from '/@/components/Modal';
+  import { BasicForm, useForm } from '/@/components/Form/index';
+  import { useMessage } from '/@/hooks/web/useMessage';
+  import { schemas } from './data';
+  import moment from 'moment';
+  interface PopupData {
+    title: string;
+  }
+  interface Role {
+    id: string | number;
+  }
+
+  export default defineComponent({
+    components: { BasicModal, BasicForm },
+    props: {
+      popupData: {
+        type: Object as PropType<PopupData>,
+        default: () => {},
+      },
+    },
+    emits: ['saveData'],
+    setup(props, { emit }) {
+      const popupData = props.popupData as PopupData;
+      const modelRef = ref({});
+      const role = reactive<Role>({
+        id: 0,
+      });
+      const { createMessage } = useMessage();
+      const { error } = createMessage;
+
+      const [registerForm, { setFieldsValue, resetFields, validate }] = useForm({
+        labelWidth: 120,
+        schemas,
+        showActionButtonGroup: false,
+        actionColOptions: {
+          span: 24,
+        },
+      });
+      //   const [register, { closeModal }] = useModalInner((data) => {
+      //     modelRef.value = data;
+
+      //
+      //   });
+      const [register, { closeModal }] = useModalInner((data) => {
+        resetFields();
+        console.log(`data ----id?`, data.id);
+        if (data.id) {
+          role.id = data.id;
+        } else {
+          role.id = 0;
+        }
+        setFieldsValue(data);
+      });
+
+      async function confirm() {
+        const data = await validate();
+        console.log(`确定`, data);
+        const not_validate = data.family.some((item) => {
+          if (item.relation === '' || item.age === '' || item.job === '' || item.company === '') {
+            error('家庭成员信息不能为空');
+            return true;
+          }
+        });
+        if (not_validate) {
+          return;
+        }
+        data.id = role.id;
+        data.birthday = moment(data.birthday).format('YYYY-MM-DD');
+        data.family = JSON.stringify(data.family);
+        const popupData = { closeModal, data };
+        emit('saveData', popupData);
+        // closeModal(); // 关闭弹窗
+      }
+      return {
+        register,
+        schemas,
+        registerForm,
+        model: modelRef,
+        confirm,
+        ...toRefs(popupData),
+      };
+    },
+  });
+</script>
+<style lang="less">
+  .ant-form-item-label {
+    overflow: hidden;
+    text-align: center !important;
+    // white-space: pre-wrap !important;
+    text-overflow: ellipsis;
+    white-space: nowrap;
+  }
+
+  @media (max-width: 639px) {
+    .ant-form-item-label {
+      line-height: 2.5715 !important;
+      text-align: center !important;
+    }
+  }
+</style>

+ 42 - 461
src/views/expense/transaction_type/data.ts

@@ -16,82 +16,42 @@ export const columns: BasicColumn[] = [
     sorter: true,
   },
   {
-    title: '姓名',
+    title: '交易名称',
     dataIndex: 'name',
     width: 130,
     sorter: true,
   },
   {
-    title: '性别',
-    dataIndex: 'gender',
+    title: '收支类型',
+    dataIndex: 'type',
     width: 130,
     customRender({ record }) {
-      const options = ['男', '女'];
-      return options[record.gender];
+      const options = ['支出', '收入', '内部转账'];
+      return options[record.type];
     },
     sorter: true,
   },
   {
-    title: '籍贯',
-    dataIndex: 'origin',
+    title: '操作人',
+    dataIndex: 'people',
     width: 150,
     sorter: true,
   },
   {
-    title: '出生年月',
-    dataIndex: 'birthday',
+    title: '备注',
+    dataIndex: 'remark',
     width: 200,
-    customRender({ record }) {
-      return moment(record.birthday).format('YYYY-MM-DD');
-    },
     sorter: true,
   },
   {
-    title: '党派',
-    dataIndex: 'party',
-    width: 150,
+    title: '创建日期',
+    dataIndex: 'createTime',
+    width: 200,
     customRender({ record }) {
-      const options = ['无', '民革', '民盟', '民建', '民进', '农工', '致公党', '九三学社', '台盟'];
-      return options[record.party];
+      return moment(record.createTime).format('YYYY-MM-DD');
     },
     sorter: true,
   },
-  {
-    title: '民族',
-    dataIndex: 'nation',
-    width: 160,
-    sorter: true,
-  },
-  {
-    title: '单位',
-    dataIndex: 'company',
-    width: 160,
-    sorter: true,
-  },
-  {
-    title: '人大职务',
-    dataIndex: 'peopleJob',
-    width: 160,
-    sorter: true,
-  },
-  {
-    title: '政协职务',
-    dataIndex: 'cppccJob',
-    width: 160,
-    sorter: true,
-  },
-  {
-    title: '社会职务',
-    dataIndex: 'job',
-    width: 160,
-    sorter: true,
-  },
-  {
-    title: '联系方式',
-    dataIndex: 'mobile',
-    width: 160,
-    sorter: true,
-  },
 ];
 
 export function getFormConfig(): Partial<FormProps> {
@@ -112,43 +72,10 @@ export function getFormConfig(): Partial<FormProps> {
       },
       {
         field: `name`,
-        label: `姓名`,
-        component: 'Input',
-        componentProps: {
-          placeholder: '姓名',
-        },
-        colProps: {
-          xl: 12,
-          xxl: 8,
-        },
-      },
-      {
-        field: `gender`,
-        label: `性别`,
-        component: 'Select',
-        componentProps: {
-          options: [
-            {
-              label: '男',
-              value: 0,
-            },
-            {
-              label: '女',
-              value: 1,
-            },
-          ],
-        },
-        colProps: {
-          xl: 12,
-          xxl: 8,
-        },
-      },
-      {
-        field: `origin`,
-        label: `籍贯`,
+        label: `交易名称`,
         component: 'Input',
         componentProps: {
-          placeholder: '籍贯',
+          placeholder: '交易名称',
         },
         colProps: {
           xl: 12,
@@ -156,59 +83,24 @@ export function getFormConfig(): Partial<FormProps> {
         },
       },
       {
-        field: `birthday`,
-        label: `出生年月`,
-        component: 'DatePicker',
-        componentProps: {
-          placeholder: '出生年月',
-        },
-        colProps: {
-          xl: 12,
-          xxl: 8,
-        },
-      },
-      {
-        field: `party`,
-        label: `党派`,
+        field: `type`,
+        label: `收支类型`,
         component: 'Select',
         componentProps: {
+          placeholder: '收支类型',
           options: [
             {
-              label: '',
+              label: '支出',
               value: 0,
             },
             {
-              label: '民革',
+              label: '收入',
               value: 1,
             },
             {
-              label: '民盟',
+              label: '内部转账',
               value: 2,
             },
-            {
-              label: '民建',
-              value: 3,
-            },
-            {
-              label: '民进',
-              value: 4,
-            },
-            {
-              label: '农工',
-              value: 5,
-            },
-            {
-              label: '致公党',
-              value: 6,
-            },
-            {
-              label: '九三学社',
-              value: 7,
-            },
-            {
-              label: '台盟',
-              value: 8,
-            },
           ],
         },
         colProps: {
@@ -217,23 +109,11 @@ export function getFormConfig(): Partial<FormProps> {
         },
       },
       {
-        field: `nation`,
-        label: `民族`,
-        component: 'Input',
-        componentProps: {
-          placeholder: '名族',
-        },
-        colProps: {
-          xl: 12,
-          xxl: 8,
-        },
-      },
-      {
-        field: `company`,
-        label: `单位`,
+        field: `people`,
+        label: `操作人`,
         component: 'Input',
         componentProps: {
-          placeholder: '单位',
+          placeholder: '操作人',
         },
         colProps: {
           xl: 12,
@@ -241,11 +121,11 @@ export function getFormConfig(): Partial<FormProps> {
         },
       },
       {
-        field: `peopleJob`,
-        label: `人大职务`,
+        field: `remark`,
+        label: `备注`,
         component: 'Input',
         componentProps: {
-          placeholder: '人大职务',
+          placeholder: '备注',
         },
         colProps: {
           xl: 12,
@@ -253,35 +133,11 @@ export function getFormConfig(): Partial<FormProps> {
         },
       },
       {
-        field: `cppccJob`,
-        label: `政协职务`,
-        component: 'Input',
-        componentProps: {
-          placeholder: '政协职务',
-        },
-        colProps: {
-          xl: 12,
-          xxl: 8,
-        },
-      },
-      {
-        field: `job`,
-        label: `社会职务`,
-        component: 'Input',
-        componentProps: {
-          placeholder: '社会职务',
-        },
-        colProps: {
-          xl: 12,
-          xxl: 8,
-        },
-      },
-      {
-        field: `mobile`,
-        label: `联系方式`,
-        component: 'Input',
+        field: `createTime`,
+        label: `创建时间`,
+        component: 'DatePicker',
         componentProps: {
-          placeholder: '联系方式',
+          placeholder: '创建时间',
         },
         colProps: {
           xl: 12,
@@ -297,329 +153,54 @@ export const schemas: FormSchema[] = [
   {
     field: 'name',
     component: 'Input',
-    label: '姓名',
+    label: '交易名称',
     labelWidth: adaptWidth.labelWidth,
     colProps: {
       span: adaptWidth.elContainer,
     },
     componentProps: {
-      placeholder: '姓名',
+      placeholder: '交易名称',
     },
     required: true,
   },
   {
-    field: 'gender',
+    field: 'type',
     component: 'Select',
-    label: '性别',
-    labelWidth: adaptWidth.labelWidth,
-    colProps: {
-      span: adaptWidth.elContainer,
-    },
-    componentProps: {
-      placeholder: '性别',
-      options: [
-        {
-          label: '男',
-          value: 0,
-        },
-        {
-          label: '女',
-          value: 1,
-        },
-      ],
-    },
-    required: true,
-  },
-  {
-    field: 'birthday',
-    component: 'DatePicker',
-    label: '出生年月',
-    labelWidth: adaptWidth.labelWidth,
-    colProps: {
-      span: adaptWidth.elContainer,
-    },
-    componentProps: {
-      placeholder: '出生年月',
-    },
-    required: true,
-  },
-  {
-    field: 'origin',
-    component: 'Input',
-    label: '籍贯',
-    labelWidth: adaptWidth.labelWidth,
-    colProps: {
-      span: adaptWidth.elContainer,
-    },
-    componentProps: {
-      placeholder: '籍贯',
-    },
-    required: true,
-  },
-  {
-    field: 'birthplace',
-    component: 'Input',
-    label: '出生地',
-    labelWidth: adaptWidth.labelWidth,
-    colProps: {
-      span: adaptWidth.elContainer,
-    },
-    componentProps: {
-      placeholder: '出生地',
-    },
-    required: true,
-  },
-  {
-    field: 'cardNo',
-    component: 'Input',
-    label: '身份证号码',
-    labelWidth: adaptWidth.labelWidth,
-    colProps: {
-      span: adaptWidth.elContainer,
-    },
-    componentProps: {
-      placeholder: '身份证号码',
-    },
-    required: true,
-  },
-  {
-    field: 'nation',
-    component: 'Input',
-    label: '民族',
+    label: '收支类型',
     labelWidth: adaptWidth.labelWidth,
     colProps: {
       span: adaptWidth.elContainer,
     },
     componentProps: {
-      placeholder: '民族',
-    },
-    required: true,
-  },
-  {
-    field: 'party',
-    label: '党派',
-    component: 'Select',
-    componentProps: {
-      placeholder: '党派',
+      placeholder: '收支类型',
       options: [
         {
-          label: '',
+          label: '支出',
           value: 0,
         },
         {
-          label: '民革',
+          label: '收入',
           value: 1,
         },
         {
-          label: '民盟',
+          label: '内部转账',
           value: 2,
         },
-        {
-          label: '民建',
-          value: 3,
-        },
-        {
-          label: '民进',
-          value: 4,
-        },
-        {
-          label: '农工',
-          value: 5,
-        },
-        {
-          label: '致公党',
-          value: 6,
-        },
-        {
-          label: '九三学社',
-          value: 7,
-        },
-        {
-          label: '台盟',
-          value: 8,
-        },
       ],
     },
-    labelWidth: adaptWidth.labelWidth,
-    colProps: {
-      span: adaptWidth.elContainer,
-    },
-    required: true,
-  },
-  {
-    field: 'edu',
-    component: 'Input',
-    label: '学历',
-    labelWidth: adaptWidth.labelWidth,
-    colProps: {
-      span: adaptWidth.elContainer,
-    },
-    componentProps: {
-      placeholder: '学历',
-    },
-    required: true,
-  },
-  {
-    field: 'title',
-    component: 'Input',
-    label: '职称',
-    labelWidth: adaptWidth.labelWidth,
-    colProps: {
-      span: adaptWidth.elContainer,
-    },
-    componentProps: {
-      placeholder: '职称',
-    },
-  },
-  {
-    field: 'job',
-    component: 'Input',
-    label: '职务',
-    labelWidth: adaptWidth.labelWidth,
-    colProps: {
-      span: adaptWidth.elContainer,
-    },
-    componentProps: {
-      placeholder: '职务',
-    },
-    required: true,
-  },
-  {
-    field: 'address',
-    component: 'Input',
-    label: '地址',
-    labelWidth: adaptWidth.labelWidth,
-    defaultValue: '',
-    colProps: {
-      span: adaptWidth.elContainer,
-    },
-    componentProps: {
-      placeholder: '地址',
-    },
-    required: true,
-  },
-  {
-    field: 'zipcode',
-    component: 'Input',
-    label: '邮编',
-    labelWidth: adaptWidth.labelWidth,
-    defaultValue: '',
-    colProps: {
-      span: adaptWidth.elContainer,
-    },
-    componentProps: {
-      placeholder: '邮编',
-    },
-  },
-  {
-    field: 'tel',
-    component: 'Input',
-    label: '电话',
-    labelWidth: adaptWidth.labelWidth,
-    defaultValue: '',
-    colProps: {
-      span: adaptWidth.elContainer,
-    },
-    componentProps: {
-      placeholder: '电话',
-    },
-  },
-  {
-    field: 'mobile',
-    component: 'Input',
-    label: '手机',
-    labelWidth: adaptWidth.labelWidth,
-    defaultValue: '',
-    colProps: {
-      span: adaptWidth.elContainer,
-    },
-    componentProps: {
-      placeholder: '手机',
-    },
-    required: true,
-  },
-  {
-    field: 'old',
-    component: 'Input',
-    label: '办企业前工作单位',
-    labelWidth: adaptWidth.labelWidth,
-    defaultValue: '',
-    colProps: {
-      span: adaptWidth.elContainer,
-    },
-    componentProps: {
-      placeholder: '办企业前工作单位',
-    },
-  },
-  {
-    field: 'peopleJob',
-    component: 'Input',
-    label: '人大职务',
-    labelWidth: adaptWidth.labelWidth,
-    defaultValue: '',
-    colProps: {
-      span: adaptWidth.elContainer,
-    },
-    componentProps: {
-      placeholder: '人大职务',
-    },
-  },
-  {
-    field: 'cppccJob',
-    component: 'Input',
-    label: '政协职务',
-    labelWidth: adaptWidth.labelWidth,
-    defaultValue: '',
-    colProps: {
-      span: adaptWidth.elContainer,
-    },
-    componentProps: {
-      placeholder: '政协职务',
-    },
-  },
-  {
-    field: 'family',
-    component: 'ArrCom',
-    label: '家庭主要成员',
-    labelWidth: adaptWidth.labelWidth,
-    colProps: {
-      span: adaptWidth.elContainer,
-    },
-    defaultValue: [],
-    componentProps: ({ formModel }) => {
-      return {
-        placeholder: '家庭主要成员',
-        value: formModel.family,
-        onChange: () => {},
-      };
-    },
     required: true,
   },
   {
-    field: 'info',
-    component: 'InputTextArea',
-    label: '本人简历',
-    labelWidth: adaptWidth.labelWidth,
-    defaultValue: '',
-    colProps: {
-      span: adaptWidth.elContainer,
-    },
-    componentProps: {
-      placeholder: '本人简历',
-    },
-  },
-  {
-    field: 'company',
+    field: 'remark',
     component: 'Input',
-    label: '所在单位',
+    label: '备注',
     labelWidth: adaptWidth.labelWidth,
     defaultValue: '',
     colProps: {
       span: adaptWidth.elContainer,
     },
     componentProps: {
-      placeholder: '所在单位',
+      placeholder: '备注',
     },
-    required: true,
   },
 ];

+ 2 - 2
src/views/expense/transaction_type/index.vue

@@ -1,9 +1,9 @@
 <template>
   <CollapseContainer
     class="sys-container"
-    title="个人管理"
+    title="交易类型设置"
     :canExpan="false"
-    helpMessage="个人管理"
+    helpMessage="交易类型设置"
   >
     <BasicTable
       ref="tableRef"

+ 9 - 2
src/views/general/attachment/data.ts

@@ -3,6 +3,7 @@ import Image from './customComponents/Image.vue';
 import { h } from 'vue';
 import { Tag } from 'ant-design-vue';
 import { formatSize } from '/@/utils/foramtFileSize';
+import moment from 'moment';
 
 export const columns: BasicColumn[] = [
   {
@@ -14,11 +15,11 @@ export const columns: BasicColumn[] = [
   {
     title: '预览',
     align: 'center',
-    dataIndex: 'imgUrl',
+    dataIndex: 'url',
     width: 100,
     customRender: ({ record }) => {
       return h(Image, {
-        src: record.imgUrl,
+        src: record.url,
         width: '50px',
       });
     },
@@ -87,5 +88,11 @@ export const columns: BasicColumn[] = [
     align: 'center',
     dataIndex: 'createtime',
     width: 160,
+    customRender({ record }) {
+      if (!record.createtime) {
+        return null;
+      }
+      return moment(record.createtime).format('YYYY-MM-DD');
+    },
   },
 ];

+ 5 - 2
src/views/general/attachment/index.vue

@@ -101,6 +101,7 @@
       const [registerTable] = useTable({
         columns: columns,
         maxHeight: tableHeight,
+        afterFetch: afterFetch,
         api: getAttachmentList,
         actionColumn: {
           width: 160,
@@ -112,7 +113,9 @@
         showIndexColumn: false,
         pagination: true,
       });
-
+      function afterFetch(res) {
+        console.log(`res`, res);
+      };
       function getTableAction() {
         // 获取组件
         const tableAction = unref(tableRef);
@@ -181,7 +184,7 @@
             formData.append('chunk', value.index);
             formData.append('hash', value.hash);
             formData.append('file', value.source);
-            console.log(`formData`, formData)
+            console.log(`formData`, formData);
             return { formData, index: value.index, md5: file.md5, file };
           });
           try {