diff --git a/fund-admin/src/api/expenseType.js b/fund-admin/src/api/expenseType.js new file mode 100644 index 0000000..5c76155 --- /dev/null +++ b/fund-admin/src/api/expenseType.js @@ -0,0 +1,74 @@ +import request from '../utils/request' + +/** + * 获取支出类型树(仅启用) + */ +export const getExpenseTypeTree = () => { + return request({ + url: '/proj/api/v1/expense-type/tree', + method: 'get' + }) +} + +/** + * 获取所有支出类型树(包含禁用) + */ +export const getAllExpenseTypeTree = () => { + return request({ + url: '/proj/api/v1/expense-type/tree/all', + method: 'get' + }) +} + +/** + * 获取支出类型详情 + */ +export const getExpenseTypeById = (typeId) => { + return request({ + url: `/proj/api/v1/expense-type/${typeId}`, + method: 'get' + }) +} + +/** + * 创建支出类型 + */ +export const createExpenseType = (data) => { + return request({ + url: '/proj/api/v1/expense-type', + method: 'post', + data + }) +} + +/** + * 更新支出类型 + */ +export const updateExpenseType = (typeId, data) => { + return request({ + url: `/proj/api/v1/expense-type/${typeId}`, + method: 'put', + data + }) +} + +/** + * 删除支出类型 + */ +export const deleteExpenseType = (typeId) => { + return request({ + url: `/proj/api/v1/expense-type/${typeId}`, + method: 'delete' + }) +} + +/** + * 更新支出类型状态 + */ +export const updateExpenseTypeStatus = (typeId, status) => { + return request({ + url: `/proj/api/v1/expense-type/${typeId}/status`, + method: 'put', + params: { status } + }) +} diff --git a/fund-admin/src/router/index.js b/fund-admin/src/router/index.js index ef07f0d..36b32dd 100644 --- a/fund-admin/src/router/index.js +++ b/fund-admin/src/router/index.js @@ -94,6 +94,19 @@ const routes = [ meta: { title: '需求工单' } } ] + }, + { + path: 'finance', + name: 'Finance', + meta: { title: '财务管理', icon: 'Money' }, + children: [ + { + path: 'expense-type', + name: 'ExpenseType', + component: () => import('../views/finance/expenseType.vue'), + meta: { title: '支出类型' } + } + ] } ] } diff --git a/fund-admin/src/views/finance/expenseType.vue b/fund-admin/src/views/finance/expenseType.vue new file mode 100644 index 0000000..160082a --- /dev/null +++ b/fund-admin/src/views/finance/expenseType.vue @@ -0,0 +1,295 @@ + + + + + diff --git a/fundplatform b/fundplatform index fb2653f..0dc714d 160000 --- a/fundplatform +++ b/fundplatform @@ -1 +1 @@ -Subproject commit fb2653fb5c2e5c0003168a35655c8fba1f2c32c2 +Subproject commit 0dc714d7ebfba87e0108273414f0afa654013235