diff --git a/src/layouts/default/menu/index.vue b/src/layouts/default/menu/index.vue index dfed4197..be739751 100644 --- a/src/layouts/default/menu/index.vue +++ b/src/layouts/default/menu/index.vue @@ -140,6 +140,11 @@ function renderMenu() { const { menus, ...menuProps } = unref(getCommonProps) + menus.forEach(res => { + res?.children?.forEach(item => { + item.children = null + }) + }) // console.log(menus); if (!menus || !menus.length) return null return !props.isHorizontal ? ( diff --git a/src/router/index.ts b/src/router/index.ts index 0c0203ac..82ddfa51 100644 --- a/src/router/index.ts +++ b/src/router/index.ts @@ -1,3 +1,8 @@ +/* + * @Description: + * @Author: lijj + * @Date: 2024-04-15 17:08:08 + */ import type { RouteRecordRaw } from 'vue-router' import type { App } from 'vue' diff --git a/src/router/menus/index.ts b/src/router/menus/index.ts index d3132522..768b5d11 100644 --- a/src/router/menus/index.ts +++ b/src/router/menus/index.ts @@ -54,6 +54,7 @@ const staticMenus: Menu[] = [] async function getAsyncMenus() { const permissionStore = usePermissionStore() if (isBackMode()) { + // 设置后台路由到路由表 return permissionStore.getBackMenuList.filter((item) => !item.meta?.hideMenu && !item.hideMenu) } if (isRouteMappingMode()) { diff --git a/src/router/routes/constantRoutes.js b/src/router/routes/constantRoutes.js new file mode 100644 index 00000000..0cf7515e --- /dev/null +++ b/src/router/routes/constantRoutes.js @@ -0,0 +1,11 @@ +export const detailRouters = [ + { + path: '/BookingDetail', + name: '海运出口详情', + meta: { + title: '海运出口详情', + }, + parent: '操作管理', + component: () => import('/@/views/operation/seaexport/detail/index.vue') + } +] \ No newline at end of file diff --git a/src/store/modules/permission.ts b/src/store/modules/permission.ts index 70f37527..0f4e9145 100644 --- a/src/store/modules/permission.ts +++ b/src/store/modules/permission.ts @@ -231,39 +231,8 @@ export const usePermissionStore = defineStore({ await this.changePermissionCode() // routeList = (await getMenuList()) as AppRouteRecordRaw[] const res = await getMenuList() - console.log('后台返回路由', res, res.data[0].children) - // -------------------ZTH------------------------ - res.data[0].children.push( - // { - // "id": "1288018625843826606", - // "parentId": "1288018625843826601", - // "path": "/BookingLedger", - // "name": "嗨嗨", - // "component": "operation/seaexport/list/index", - // "meta": { - // "title": "嗨嗨", - // "icon": "ant-design:ant-design-outlined" - // }, - // "sortCode": 0 - // }, - { - id: '12880186258438266061', - parentId: '12880186258438266011', - path: '/BookingDetail', - name: '嗨嗨嗨', - component: 'operation/seaexport/detail/index', - - meta: { - title: '嗨嗨嗨', - icon: 'ant-design:ant-design-outlined', - }, - sortCode: 0, - }, - ) - // ---------------------------------------------- routeList = res.data as AppRouteRecordRaw[] this.setWrouteList(routeList) - // console.log('后台返回路由1', routeList) } catch (error) { console.error(error) } diff --git a/src/views/fee/custTemplateDetail/api.ts b/src/views/fee/custTemplateDetail/api.ts new file mode 100644 index 00000000..6657796a --- /dev/null +++ b/src/views/fee/custTemplateDetail/api.ts @@ -0,0 +1,37 @@ +/* + * @Description: 费用管理 -> 币别设置接口 + * @Author: lijj + * @Date: 2024-04-25 15:48:33 + */ + +import { request } from '/@/utils/request' +import { DataResult, PageRequest } from '/@/api/model/baseModel' +enum Api { + list = '/feeApi/FeeCustTemplateDetail/GetFeeCustTemplateDetailList', + edit = '/feeApi/FeeCurrency/EditFeeCurrency', + info = '/feeApi/FeeCurrency/GetFeeCurrencyInfo' +} +// 列表 (Auth) +export function getFeeCustTemplateDetailList(data: PageRequest) { + return request({ + url: Api.list, + method: 'post', + data + }) +} +// 编辑 (Auth) +export function editFeeCurrency(data: PageRequest) { + return request({ + url: Api.edit, + method: 'post', + data + }) +} +// 详情 (Auth) +export function getFeeCurrencyInfo(query) { + return request({ + url: Api.info, + method: 'get', + params: query + }) +} diff --git a/src/views/fee/custTemplateDetail/columns.tsx b/src/views/fee/custTemplateDetail/columns.tsx new file mode 100644 index 00000000..4f4000c8 --- /dev/null +++ b/src/views/fee/custTemplateDetail/columns.tsx @@ -0,0 +1,126 @@ +/* + * @Description: 往来单位固定费用tsx + * @Author: lijj + * @Date: 2024-04-25 15:48:33 + */ +import { BasicColumn, FormSchema } from '/@/components/Table' +export const columns: BasicColumn[] = [ + { + title: '费用名称', + dataIndex: 'feeName', + width: 150 + }, + { + title: '往来单位', + dataIndex: 'customerName', + width: 200 + }, + { + title: '标准', + dataIndex: 'unit', + width: 150 + }, + { + title: '币别', + dataIndex: 'currency', + width: 150 + }, + { + title: '单价', + dataIndex: 'unitPrice', + width: 120 + }, + { + title: '汇率', + dataIndex: 'exchangeRate', + width: 150 + }, + { + title: '税率', + dataIndex: 'taxRate', + width: 150 + }, + { + title: '发票税率', + dataIndex: 'accTaxRate', + width: 150 + }, + { + title: 'FRT', + dataIndex: 'feeFrt', + width: 150 + }, + { + title: '垫付', + dataIndex: 'isAdvancedPay', + width: 150 + }, + { + title: '不开发票', + dataIndex: 'isInvoice', + width: 150 + }, + { + title: '备注', + dataIndex: 'remark', + width: 150 + } +] + +export const searchFormSchema: FormSchema[] = [ + { + field: 'feeName', + label: '费用名称', + component: 'Input', + colProps: { span: 6 }, + }, + { + field: 'customerName', + label: '往来单位', + component: 'Input', + colProps: { span: 6 }, + } +] +export const formSchema: FormSchema[] = [ + { + label: '', + field: 'id', + component: 'Input', + defaultValue: '', + show: false + }, + { + field: 'codeName', + label: '币别代码', + component: 'Input', + required: true, + colProps: { span: 12 } + }, + { + field: 'name', + label: '英文名称', + component: 'Input', + required: true, + colProps: { span: 12 } + }, + { + field: 'description', + label: '中文描述名称', + component: 'Input', + required: true, + colProps: { span: 12 }, + }, + { + field: 'defaultRate', + label: '对人民币汇率', + component: 'Input', + colProps: { span: 12 } + }, + { + field: 'financeSoftCode', + label: '财务软件代码', + required: true, + component: 'Input', + colProps: { span: 12 } + } +] diff --git a/src/views/fee/custTemplateDetail/components/Modal.vue b/src/views/fee/custTemplateDetail/components/Modal.vue new file mode 100644 index 00000000..1e5836d7 --- /dev/null +++ b/src/views/fee/custTemplateDetail/components/Modal.vue @@ -0,0 +1,110 @@ + + diff --git a/src/views/fee/custTemplateDetail/index.vue b/src/views/fee/custTemplateDetail/index.vue new file mode 100644 index 00000000..efdc8186 --- /dev/null +++ b/src/views/fee/custTemplateDetail/index.vue @@ -0,0 +1,121 @@ + +