修改
This commit is contained in:
@@ -0,0 +1,123 @@
|
||||
import { useI18n } from '@jeesite/core/hooks/web/useI18n';
|
||||
import { BasicColumn, BasicTableProps, FormProps } from '@jeesite/core/components/Table';
|
||||
import { ErpAccount, erpAccountListData } from '@jeesite/erp/api/erp/account';
|
||||
|
||||
const { t } = useI18n('erp.account');
|
||||
|
||||
const modalProps = {
|
||||
title: t('账户信息选择'),
|
||||
};
|
||||
|
||||
const searchForm: FormProps<ErpAccount> = {
|
||||
baseColProps: { md: 8, lg: 6 },
|
||||
labelWidth: 90,
|
||||
schemas: [
|
||||
{
|
||||
label: t('账户名称'),
|
||||
field: 'accountName',
|
||||
component: 'Input',
|
||||
},
|
||||
{
|
||||
label: t('账户类型'),
|
||||
field: 'accountType',
|
||||
component: 'Input',
|
||||
},
|
||||
{
|
||||
label: t('是否激活'),
|
||||
field: 'isActive',
|
||||
component: 'Select',
|
||||
componentProps: {
|
||||
dictType: 'is_active',
|
||||
allowClear: true,
|
||||
},
|
||||
},
|
||||
],
|
||||
};
|
||||
|
||||
const tableColumns: BasicColumn<ErpAccount>[] = [
|
||||
{
|
||||
title: t('记录时间'),
|
||||
dataIndex: 'createTime',
|
||||
key: 'a.create_time',
|
||||
sorter: true,
|
||||
width: 180,
|
||||
align: 'left',
|
||||
},
|
||||
{
|
||||
title: t('账户名称'),
|
||||
dataIndex: 'accountName',
|
||||
key: 'a.account_name',
|
||||
sorter: true,
|
||||
width: 130,
|
||||
align: 'left',
|
||||
},
|
||||
{
|
||||
title: t('账户类型'),
|
||||
dataIndex: 'accountType',
|
||||
key: 'a.account_type',
|
||||
sorter: true,
|
||||
width: 130,
|
||||
align: 'left',
|
||||
dictType: 'account_type'
|
||||
},
|
||||
{
|
||||
title: t('账户卡号'),
|
||||
dataIndex: 'accountCode',
|
||||
key: 'a.account_code',
|
||||
sorter: true,
|
||||
width: 130,
|
||||
align: 'left',
|
||||
},
|
||||
{
|
||||
title: t('初始余额'),
|
||||
dataIndex: 'initialBalance',
|
||||
key: 'a.initial_balance',
|
||||
sorter: true,
|
||||
width: 130,
|
||||
align: 'right',
|
||||
},
|
||||
{
|
||||
title: t('当前余额'),
|
||||
dataIndex: 'currentBalance',
|
||||
key: 'a.current_balance',
|
||||
sorter: true,
|
||||
width: 130,
|
||||
align: 'right',
|
||||
},
|
||||
{
|
||||
title: t('是否激活'),
|
||||
dataIndex: 'isActive',
|
||||
key: 'a.is_active',
|
||||
sorter: true,
|
||||
width: 130,
|
||||
align: 'left',
|
||||
dictType: 'is_active',
|
||||
},
|
||||
{
|
||||
title: t('更新时间'),
|
||||
dataIndex: 'updateTime',
|
||||
key: 'a.update_time',
|
||||
sorter: true,
|
||||
width: 180,
|
||||
align: 'center',
|
||||
},
|
||||
];
|
||||
|
||||
const tableProps: BasicTableProps = {
|
||||
api: erpAccountListData,
|
||||
beforeFetch: (params) => {
|
||||
params['isAll'] = true;
|
||||
return params;
|
||||
},
|
||||
columns: tableColumns,
|
||||
formConfig: searchForm,
|
||||
rowKey: 'accountId',
|
||||
};
|
||||
|
||||
export default {
|
||||
modalProps,
|
||||
tableProps,
|
||||
itemCode: 'accountId',
|
||||
itemName: 'accountName',
|
||||
isShowCode: true,
|
||||
};
|
||||
@@ -0,0 +1,120 @@
|
||||
import { useI18n } from '@jeesite/core/hooks/web/useI18n';
|
||||
import { BasicColumn, BasicTableProps, FormProps } from '@jeesite/core/components/Table';
|
||||
import { ErpCategory, erpCategoryListData } from '@jeesite/erp/api/erp/category';
|
||||
|
||||
const { t } = useI18n('erp.category');
|
||||
|
||||
const modalProps = {
|
||||
title: t('分类信息选择'),
|
||||
};
|
||||
|
||||
const searchForm: FormProps<ErpCategory> = {
|
||||
baseColProps: { md: 8, lg: 6 },
|
||||
labelWidth: 90,
|
||||
schemas: [
|
||||
{
|
||||
label: t('分类名称'),
|
||||
field: 'categoryName',
|
||||
component: 'Input',
|
||||
},
|
||||
{
|
||||
label: t('分类类型'),
|
||||
field: 'categoryType',
|
||||
component: 'Select',
|
||||
componentProps: {
|
||||
dictType: 'category_type',
|
||||
allowClear: true,
|
||||
},
|
||||
},
|
||||
{
|
||||
label: t('是否启用'),
|
||||
field: 'isActive',
|
||||
component: 'Select',
|
||||
componentProps: {
|
||||
dictType: 'is_active',
|
||||
allowClear: true,
|
||||
},
|
||||
},
|
||||
],
|
||||
};
|
||||
|
||||
const tableColumns: BasicColumn<ErpCategory>[] = [
|
||||
{
|
||||
title: t('记录时间'),
|
||||
dataIndex: 'createTime',
|
||||
key: 'a.create_time',
|
||||
sorter: true,
|
||||
width: 180,
|
||||
align: 'left',
|
||||
},
|
||||
{
|
||||
title: t('分类名称'),
|
||||
dataIndex: 'categoryName',
|
||||
key: 'a.category_name',
|
||||
sorter: true,
|
||||
width: 230,
|
||||
align: 'left',
|
||||
},
|
||||
{
|
||||
title: t('分类类型'),
|
||||
dataIndex: 'categoryType',
|
||||
key: 'a.category_type',
|
||||
sorter: true,
|
||||
width: 130,
|
||||
align: 'left',
|
||||
dictType: 'category_type',
|
||||
},
|
||||
{
|
||||
title: t('父级分类'),
|
||||
dataIndex: 'parentId',
|
||||
key: 'a.parent_id',
|
||||
sorter: true,
|
||||
width: 130,
|
||||
align: 'left',
|
||||
dictType: 'parent_type',
|
||||
},
|
||||
{
|
||||
title: t('排序序号'),
|
||||
dataIndex: 'sortOrder',
|
||||
key: 'a.sort_order',
|
||||
sorter: true,
|
||||
width: 130,
|
||||
align: 'left',
|
||||
},
|
||||
{
|
||||
title: t('是否启用'),
|
||||
dataIndex: 'isActive',
|
||||
key: 'a.is_active',
|
||||
sorter: true,
|
||||
width: 130,
|
||||
align: 'left',
|
||||
dictType: 'is_active',
|
||||
},
|
||||
{
|
||||
title: t('更新时间'),
|
||||
dataIndex: 'updateTime',
|
||||
key: 'a.update_time',
|
||||
sorter: true,
|
||||
width: 180,
|
||||
align: 'center',
|
||||
},
|
||||
];
|
||||
|
||||
const tableProps: BasicTableProps = {
|
||||
api: erpCategoryListData,
|
||||
beforeFetch: (params) => {
|
||||
params['isAll'] = true;
|
||||
return params;
|
||||
},
|
||||
columns: tableColumns,
|
||||
formConfig: searchForm,
|
||||
rowKey: 'categoryId',
|
||||
};
|
||||
|
||||
export default {
|
||||
modalProps,
|
||||
tableProps,
|
||||
itemCode: 'categoryId',
|
||||
itemName: 'categoryName',
|
||||
isShowCode: false,
|
||||
};
|
||||
@@ -0,0 +1,128 @@
|
||||
import { useI18n } from '@jeesite/core/hooks/web/useI18n';
|
||||
import { BasicColumn, BasicTableProps, FormProps } from '@jeesite/core/components/Table';
|
||||
import { ErpTransactionFlow, erpTransactionFlowListData } from '@jeesite/erp/api/erp/transactionFlow';
|
||||
|
||||
const { t } = useI18n('erp.transactionFlow');
|
||||
|
||||
const modalProps = {
|
||||
title: t('明细信息选择'),
|
||||
};
|
||||
|
||||
const searchForm: FormProps<ErpTransactionFlow> = {
|
||||
baseColProps: { md: 8, lg: 6 },
|
||||
labelWidth: 90,
|
||||
schemas: [
|
||||
{
|
||||
label: t('交易名称'),
|
||||
field: 'flowName',
|
||||
component: 'Input',
|
||||
},
|
||||
{
|
||||
label: t('交易类型'),
|
||||
field: 'transactionType',
|
||||
component: 'Select',
|
||||
componentProps: {
|
||||
dictType: 'transaction_type',
|
||||
allowClear: true,
|
||||
},
|
||||
},
|
||||
{
|
||||
label: t('是否记账'),
|
||||
field: 'isFinish',
|
||||
component: 'Select',
|
||||
componentProps: {
|
||||
dictType: 'is_finish',
|
||||
allowClear: true,
|
||||
},
|
||||
},
|
||||
],
|
||||
};
|
||||
|
||||
const tableColumns: BasicColumn<ErpTransactionFlow>[] = [
|
||||
{
|
||||
title: t('记录时间'),
|
||||
dataIndex: 'createTime',
|
||||
key: 'a.create_time',
|
||||
sorter: true,
|
||||
width: 180,
|
||||
align: 'left',
|
||||
slot: 'firstColumn',
|
||||
},
|
||||
{
|
||||
title: t('交易名称'),
|
||||
dataIndex: 'flowName',
|
||||
key: 'a.flow_name',
|
||||
sorter: true,
|
||||
width: 130,
|
||||
align: 'left',
|
||||
},
|
||||
{
|
||||
title: t('交易类型'),
|
||||
dataIndex: 'transactionType',
|
||||
key: 'a.transaction_type',
|
||||
sorter: true,
|
||||
width: 130,
|
||||
align: 'left',
|
||||
dictType: 'transaction_type',
|
||||
},
|
||||
{
|
||||
title: t('交易金额'),
|
||||
dataIndex: 'amount',
|
||||
key: 'a.amount',
|
||||
sorter: true,
|
||||
width: 130,
|
||||
align: 'right',
|
||||
},
|
||||
{
|
||||
title: t('交易时间'),
|
||||
dataIndex: 'transactionTime',
|
||||
key: 'a.transaction_time',
|
||||
sorter: true,
|
||||
width: 180,
|
||||
align: 'center',
|
||||
},
|
||||
{
|
||||
title: t('交易备注'),
|
||||
dataIndex: 'remark',
|
||||
key: 'a.remark',
|
||||
sorter: true,
|
||||
width: 130,
|
||||
align: 'left',
|
||||
},
|
||||
{
|
||||
title: t('是否记账'),
|
||||
dataIndex: 'isFinish',
|
||||
key: 'a.is_finish',
|
||||
sorter: true,
|
||||
width: 130,
|
||||
align: 'left',
|
||||
dictType: 'is_finish',
|
||||
},
|
||||
{
|
||||
title: t('更新时间'),
|
||||
dataIndex: 'updateTime',
|
||||
key: 'a.update_time',
|
||||
sorter: true,
|
||||
width: 180,
|
||||
align: 'center',
|
||||
},
|
||||
];
|
||||
|
||||
const tableProps: BasicTableProps = {
|
||||
api: erpTransactionFlowListData,
|
||||
beforeFetch: (params) => {
|
||||
params['isAll'] = true;
|
||||
return params;
|
||||
},
|
||||
columns: tableColumns,
|
||||
formConfig: searchForm,
|
||||
rowKey: 'flowId',
|
||||
};
|
||||
|
||||
export default {
|
||||
modalProps,
|
||||
tableProps,
|
||||
itemCode: 'flowId',
|
||||
itemName: 'flowName',
|
||||
isShowCode: true,
|
||||
};
|
||||
Reference in New Issue
Block a user