diff --git a/src/api/eam/basic/accountPeriod/index.ts b/src/api/eam/basic/accountPeriod/index.ts new file mode 100644 index 0000000..2606a5d --- /dev/null +++ b/src/api/eam/basic/accountPeriod/index.ts @@ -0,0 +1,52 @@ +import request from '@/config/axios' + +export interface AccountPeriodVO { + id: number + notes: string + year: number + month: number + day: number + hour: number + minute: number +} + +// 查询账期管理列表 +export const getAccountPeriodPage = async (params) => { + if (params.isSearch) { + delete params.isSearch + const data = {...params} + return await request.post({ url: '/eam/account-period/senior', data }) + } else { + return await request.get({ url: `/eam/account-period/page`, params }) + } +} + +// 查询账期管理详情 +export const getAccountPeriod = async (id: number) => { + return await request.get({ url: `/eam/account-period/get?id=` + id }) +} + +// 新增账期管理 +export const createAccountPeriod = async (data: AccountPeriodVO) => { + return await request.post({ url: `/eam/account-period/create`, data }) +} + +// 修改账期管理 +export const updateAccountPeriod = async (data: AccountPeriodVO) => { + return await request.put({ url: `/eam/account-period/update`, data }) +} + +// 删除账期管理 +export const deleteAccountPeriod = async (id: number) => { + return await request.delete({ url: `/eam/account-period/delete?id=` + id }) +} + +// 导出账期管理 Excel +export const exportAccountPeriod = async (params) => { + return await request.download({ url: `/eam/account-period/export-excel`, params }) +} + +// 下载用户导入模板 +export const importTemplate = () => { + return request.download({ url: '/eam/account-period/get-import-template' }) +} \ No newline at end of file diff --git a/src/views/eam/basic/accountPeriod/accountPeriod.data.ts b/src/views/eam/basic/accountPeriod/accountPeriod.data.ts new file mode 100644 index 0000000..6e414e4 --- /dev/null +++ b/src/views/eam/basic/accountPeriod/accountPeriod.data.ts @@ -0,0 +1,85 @@ +import type { CrudSchema } from '@/hooks/web/useCrudSchemas' + +// 表单校验 +export const AccountPeriodRules = reactive({ + year: [required], + month: [required], + day: [required], + hour: [required], + minute: [required], +}) + +export const AccountPeriod = useCrudSchemas(reactive([ + { + label: 'id', + field: 'id', + sort: 'custom', + isTable: false, + isForm: false, + }, + { + label: '备注', + field: 'notes', + sort: 'custom', + isSearch: true, + }, + { + label: '账期年', + field: 'year', + sort: 'custom', + isSearch: true, + form: { + component: 'InputNumber', + value: 0 + }, + }, + { + label: '账期月', + field: 'month', + sort: 'custom', + isSearch: true, + form: { + component: 'InputNumber', + value: 0 + }, + }, + { + label: '账期日', + field: 'day', + sort: 'custom', + isSearch: true, + form: { + component: 'InputNumber', + value: 0 + }, + }, + { + label: '账期时', + field: 'hour', + sort: 'custom', + isSearch: true, + form: { + component: 'InputNumber', + value: 0 + }, + }, + { + label: '账期分', + field: 'minute', + sort: 'custom', + isSearch: true, + form: { + component: 'InputNumber', + value: 0 + }, + }, + { + label: '操作', + field: 'action', + isForm: false, + table: { + width: 150, + fixed: 'right' + } + } +])) diff --git a/src/views/eam/basic/accountPeriod/index.vue b/src/views/eam/basic/accountPeriod/index.vue new file mode 100644 index 0000000..9b2c730 --- /dev/null +++ b/src/views/eam/basic/accountPeriod/index.vue @@ -0,0 +1,244 @@ + + +