初始化项目

This commit is contained in:
2026-03-22 22:09:11 +08:00
parent 6efba6e069
commit 3ec3a07cd3
33 changed files with 1087 additions and 647 deletions

View File

@@ -0,0 +1,112 @@
import { useI18n } from '@jeesite/core/hooks/web/useI18n';
import { BasicColumn, BasicTableProps, FormProps } from '@jeesite/core/components/Table';
import { ErpDebts, erpDebtsListData } from '@jeesite/erp/api/erp/debts';
const { t } = useI18n('erp.debts');
const modalProps = {
title: t('借贷选择'),
};
const searchForm: FormProps<ErpDebts> = {
baseColProps: { md: 8, lg: 6 },
labelWidth: 90,
schemas: [
{
label: t('借贷名称'),
field: 'debtName',
component: 'Input',
},
{
label: t('负债类型'),
field: 'debtType',
component: 'Select',
componentProps: {
dictType: 'debt_type',
allowClear: true,
},
},
{
label: t('借贷状态'),
field: 'ustatus',
component: 'Select',
componentProps: {
dictType: 'debt_status',
allowClear: true,
},
},
],
};
const tableColumns: BasicColumn<ErpDebts>[] = [
{
title: t('记录时间'),
dataIndex: 'createTime',
key: 'a.create_time',
sorter: true,
width: 150,
align: 'center',
fixed: 'left',
},
{
title: t('负债类型'),
dataIndex: 'debtType',
key: 'a.debt_type',
sorter: true,
width: 130,
align: 'left',
dictType: 'debt_type',
},
{
title: t('借贷名称'),
dataIndex: 'debtName',
key: 'a.debt_name',
sorter: true,
width: 130,
align: 'left',
},
{
title: t('借贷金额'),
dataIndex: 'debtAmount',
key: 'a.debt_amount',
sorter: true,
width: 130,
align: 'right',
},
{
title: t('未还金额'),
dataIndex: 'remaining',
key: 'a.remaining',
sorter: true,
width: 130,
align: 'right',
},
{
title: t('状态'),
dataIndex: 'ustatus',
key: 'a.ustatus',
sorter: true,
width: 130,
align: 'left',
dictType: 'debt_status',
},
];
const tableProps: BasicTableProps = {
api: erpDebtsListData,
beforeFetch: (params) => {
params['isAll'] = true;
return params;
},
columns: tableColumns,
formConfig: searchForm,
rowKey: 'debtId',
};
export default {
modalProps,
tableProps,
itemCode: 'debtId',
itemName: 'debtName',
isShowCode: true,
};