111 lines
2.1 KiB
TypeScript
111 lines
2.1 KiB
TypeScript
import { useI18n } from '@jeesite/core/hooks/web/useI18n';
|
|
import { BasicColumn, BasicTableProps, FormProps } from '@jeesite/core/components/Table';
|
|
import { 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: 'debtType',
|
|
component: 'Input',
|
|
},
|
|
{
|
|
label: t('对方名称'),
|
|
field: 'debtName',
|
|
component: 'Input',
|
|
},
|
|
{
|
|
label: t('状态'),
|
|
field: 'ustatus',
|
|
component: 'Input',
|
|
},
|
|
],
|
|
};
|
|
|
|
const tableColumns: BasicColumn<ErpDebts>[] = [
|
|
{
|
|
title: t('记录时间'),
|
|
dataIndex: 'createTime',
|
|
key: 'a.create_time',
|
|
sorter: true,
|
|
width: 230,
|
|
align: 'left',
|
|
slot: 'firstColumn',
|
|
},
|
|
{
|
|
title: t('负债类型'),
|
|
dataIndex: 'debtType',
|
|
key: 'a.debt_type',
|
|
sorter: true,
|
|
width: 130,
|
|
align: 'left',
|
|
},
|
|
{
|
|
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: 'endTime',
|
|
key: 'a.end_time',
|
|
sorter: true,
|
|
width: 130,
|
|
align: 'center',
|
|
},
|
|
{
|
|
title: t('状态'),
|
|
dataIndex: 'ustatus',
|
|
key: 'a.ustatus',
|
|
sorter: true,
|
|
width: 130,
|
|
align: 'left',
|
|
},
|
|
];
|
|
|
|
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: 'debtId',
|
|
isShowCode: false,
|
|
};
|