import { useI18n } from '@jeesite/core/hooks/web/useI18n'; import { BasicColumn, BasicTableProps, FormProps } from '@jeesite/core/components/Table'; import { erpIncomeListData } from '@jeesite/erp/api/erp/income'; const { t } = useI18n('erp.income'); const modalProps = { title: t('收入选择'), }; const searchForm: FormProps = { baseColProps: { md: 8, lg: 6 }, labelWidth: 90, schemas: [ { label: t('收入名称'), field: 'incomeName', component: 'Input', }, { label: t('收入账户'), field: 'accountId', component: 'Input', }, { label: t('收入分类'), field: 'categoryId', component: 'Input', }, ], }; const tableColumns: BasicColumn[] = [ { title: t('记录时间'), dataIndex: 'createTime', key: 'a.create_time', sorter: true, width: 230, align: 'left', slot: 'firstColumn', }, { title: t('收入名称'), dataIndex: 'incomeName', key: 'a.income_name', sorter: true, width: 130, align: 'left', }, { title: t('收入账户'), dataIndex: 'accountId', key: 'a.account_id', sorter: true, width: 130, align: 'left', }, { title: t('收入分类'), dataIndex: 'categoryId', key: 'a.category_id', sorter: true, width: 130, align: 'left', }, { title: t('交易金额'), dataIndex: 'amount', key: 'a.amount', sorter: true, width: 130, align: 'right', }, { title: t('更新时间'), dataIndex: 'updateTime', key: 'a.update_time', sorter: true, width: 130, align: 'center', }, ]; const tableProps: BasicTableProps = { api: erpIncomeListData, beforeFetch: (params) => { params['isAll'] = true; return params; }, columns: tableColumns, formConfig: searchForm, rowKey: 'incomeId', }; export default { modalProps, tableProps, itemCode: 'incomeId', itemName: 'incomeId', isShowCode: false, };