From 864f926f2ee8be051b488fc96e58718ea9fdd3fe Mon Sep 17 00:00:00 2001 From: Maple <869445424@qq.com> Date: Wed, 6 Aug 2025 10:05:40 +0800 Subject: [PATCH 1/4] =?UTF-8?q?fix:=E8=8F=9C=E5=8D=95=E6=A0=8F=E9=97=AE?= =?UTF-8?q?=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/router/route.ts | 2 +- src/types/auto-imports.d.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/router/route.ts b/src/router/route.ts index 0854679..698d188 100644 --- a/src/router/route.ts +++ b/src/router/route.ts @@ -65,7 +65,7 @@ export const systemRoutes: RouteRecordRaw[] = [ name: 'Organization', component: Layout, redirect: '/organization/dept', - meta: { title: '组织架构', icon: 'user-group', hidden: false, sort: 2 }, + meta: { title: '企业管理', icon: 'user-group', hidden: false, sort: 2 }, children: [ { path: '/organization/user', diff --git a/src/types/auto-imports.d.ts b/src/types/auto-imports.d.ts index 369aad4..eab6be6 100644 --- a/src/types/auto-imports.d.ts +++ b/src/types/auto-imports.d.ts @@ -70,6 +70,6 @@ declare global { // for type re-export declare global { // @ts-ignore - export type { Component, ComponentPublicInstance, ComputedRef, DirectiveBinding, ExtractDefaultPropTypes, ExtractPropTypes, ExtractPublicPropTypes, InjectionKey, PropType, Ref, MaybeRef, MaybeRefOrGetter, VNode, WritableComputedRef } from 'vue' + export type { Component, ComponentPublicInstance, ComputedRef, ExtractDefaultPropTypes, ExtractPropTypes, ExtractPublicPropTypes, InjectionKey, PropType, Ref, VNode, WritableComputedRef } from 'vue' import('vue') } From 7f654625aa6923dd4bc790cd69951c8267e7c893 Mon Sep 17 00:00:00 2001 From: Maple <869445424@qq.com> Date: Wed, 6 Aug 2025 15:20:23 +0800 Subject: [PATCH 2/4] =?UTF-8?q?fix:=E4=BF=AE=E6=94=B9=E4=BA=86=E4=B8=80?= =?UTF-8?q?=E9=83=A8=E5=88=86=E8=8F=9C=E5=8D=95=E6=A0=8F=E7=9A=84=E9=97=AE?= =?UTF-8?q?=E9=A2=98=EF=BC=8C=E4=BD=86=E6=98=AF=E6=9B=B4=E5=A4=9A=E7=9A=84?= =?UTF-8?q?=E8=BF=98=E6=B2=A1=E6=9C=89=E4=BF=AE=E5=A4=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/router/route.ts | 453 ++++++++++++------ src/stores/modules/route.ts | 14 + .../order-management/index.vue | 11 + 3 files changed, 326 insertions(+), 152 deletions(-) create mode 100644 src/views/project-management/order-management/index.vue diff --git a/src/router/route.ts b/src/router/route.ts index 698d188..8c5e37b 100644 --- a/src/router/route.ts +++ b/src/router/route.ts @@ -26,40 +26,39 @@ export const systemRoutes: RouteRecordRaw[] = [ // } // ], // }, - { - path: '/regulation', - name: 'Regulation', - component: Layout, - redirect: '/regulation/system-regulation', - meta: { title: '制度管理', icon: 'file-text', hidden: false, sort: 1.5 }, - children: [ - { - path: '/regulation/system-regulation', - name: 'SystemRegulation', - component: () => import('@/views/regulation/repository.vue'), - meta: { title: '制度公告', icon: 'file-text', hidden: false }, - }, - { - path: '/regulation/process-management', - name: 'ProcessManagement', - component: () => import('@/views/regulation/confirm.vue'), - meta: { title: '制度公示', icon: 'workflow', hidden: false }, - }, - { - path: '/regulation/proposal', - name: 'RegulationProposal', - component: () => import('@/views/regulation/proposal/index.vue'), - meta: { title: '制度提案', icon: 'edit', hidden: false }, - }, - { - path: '/regulation/type', - name: 'RegulationType', - component: () => import('@/views/regulation/type/index.vue'), - meta: { title: '制度类型', icon: 'tag', hidden: false }, - }, - - ], - }, + // { + // path: '/regulation', + // name: 'Regulation', + // component: Layout, + // redirect: '/regulation/system-regulation', + // meta: { title: '制度管理', icon: 'file-text', hidden: false, sort: 1.5 }, + // children: [ + // { + // path: '/regulation/system-regulation', + // name: 'SystemRegulation', + // component: () => import('@/views/regulation/repository.vue'), + // meta: { title: '制度公告', icon: 'file-text', hidden: false }, + // }, + // { + // path: '/regulation/process-management', + // name: 'ProcessManagement', + // component: () => import('@/views/regulation/confirm.vue'), + // meta: { title: '制度公示', icon: 'workflow', hidden: false }, + // }, + // { + // path: '/regulation/proposal', + // name: 'RegulationProposal', + // component: () => import('@/views/regulation/proposal/index.vue'), + // meta: { title: '制度提案', icon: 'edit', hidden: false }, + // }, + // { + // path: '/regulation/type', + // name: 'RegulationType', + // component: () => import('@/views/regulation/type/index.vue'), + // meta: { title: '制度类型', icon: 'tag', hidden: false }, + // }, + // ], + // }, { path: '/organization', name: 'Organization', @@ -67,12 +66,12 @@ export const systemRoutes: RouteRecordRaw[] = [ redirect: '/organization/dept', meta: { title: '企业管理', icon: 'user-group', hidden: false, sort: 2 }, children: [ - { - path: '/organization/user', - name: 'OrganizationUser', - component: () => import('@/views/system/user/index.vue'), - meta: { title: '用户管理', icon: 'user', hidden: false, sort: 2.25 }, - }, + // { + // path: '/organization/user', + // name: 'OrganizationUser', + // component: () => import('@/views/system/user/index.vue'), + // meta: { title: '用户管理', icon: 'user', hidden: false, sort: 2.25 }, + // }, { path: '/organization/dept', name: 'OrganizationDept', @@ -85,6 +84,39 @@ export const systemRoutes: RouteRecordRaw[] = [ component: () => import('@/views/system/post/index.vue'), meta: { title: '岗位管理', icon: 'nav', hidden: false, sort: 2.75 }, }, + { + path: '/regulation', + name: 'Regulation', + // component: Layout, + redirect: '/regulation/system-regulation', + meta: { title: '制度管理', icon: 'file-text', hidden: false, sort: 1.5 }, + children: [ + { + path: '/regulation/system-regulation', + name: 'SystemRegulation', + component: () => import('@/views/regulation/repository.vue'), + meta: { title: '制度公告', icon: 'file-text', hidden: false }, + }, + { + path: '/regulation/process-management', + name: 'ProcessManagement', + component: () => import('@/views/regulation/confirm.vue'), + meta: { title: '制度公示', icon: 'workflow', hidden: false }, + }, + { + path: '/regulation/proposal', + name: 'RegulationProposal', + component: () => import('@/views/regulation/proposal/index.vue'), + meta: { title: '制度提案', icon: 'edit', hidden: false }, + }, + { + path: '/regulation/type', + name: 'RegulationType', + component: () => import('@/views/regulation/type/index.vue'), + meta: { title: '制度类型', icon: 'tag', hidden: false }, + }, + ], + }, // { // path: '/organization/hr/workload', // name: 'HRWorkload', @@ -501,99 +533,86 @@ export const systemRoutes: RouteRecordRaw[] = [ ], }, { - path: '/project-management', - name: 'ProjectManagement', + path: '/project-marketing', + name: 'Projectmarketing', component: Layout, - redirect: '/project-management/project-template/project-management', - meta: { title: '项目管理', icon: 'apps', hidden: false, sort: 4 }, + redirect: '/project-marketing/project-marketing', + meta: { title: '营销管理', icon: 'file-text', hidden: false, sort: 3 }, children: [ { - path: '/project-management/contract/project-source', - name: 'ProjectSource', + path: '/project-marketing/contract/revenue-contract2', + name: 'RevenueContract2', + component: () => import('@/views/default/error/404.vue'), + meta: { + title: '市场营销(N)', + icon: 'dollar', + hidden: false, + }, + }, + { + path: '/project-marketing/contract/procurement-business', + name: 'ProcurementBusiness', component: () => import('@/components/ParentView/index.vue'), meta: { - title: '项目来源', + title: '招采业务', icon: 'dollar', hidden: false, }, children: [ { - path: '/project-management/contract/procurement-business', - name: 'ProcurementBusiness', - component: () => import('@/components/ParentView/index.vue'), + path: '/project-marketing/project-template/tender-documents', + name: 'TenderDocuments', + component: () => import('@/views/project-management/bidding/tender-documents/index.vue'), meta: { - title: '招采业务', - icon: 'dollar', - hidden: false, - }, - children: [ - { - path: '/project-management/project-template/tender-documents', - name: 'TenderDocuments', - component: () => import('@/views/project-management/bidding/tender-documents/index.vue'), - meta: { - title: '招标文件', - icon: 'file-text', - hidden: false, - }, - }, - { - path: '/project-management/project-template/bid-documents', - name: 'BidDocuments', - component: () => import('@/views/project-management/bidding/bid-documents/index.vue'), - meta: { - title: '投标文件', - icon: 'file-text', - hidden: false, - }, - }, - { - path: '/project-management/project-template/award-notice', - name: 'AwardNotice', - component: () => import('@/views/project-management/bidding/award-notice/index.vue'), - meta: { - title: '中标通知书', - icon: 'trophy', - hidden: false, - }, - }, - { - path: '/project-management/project-template/information-retrieval', - name: 'InformationRetrieval', - component: () => import ('@/views/project-management/bidding/information-retrieval/index.vue'), - meta: { - title: '信息检索(N)', - icon: 'trophy', - hidden: false, - }, - }, - - ], - }, - { - path: '/project-management/contract/revenue-contract2', - name: 'RevenueContract2', - component: () => import('@/views/default/error/404.vue'), - meta: { - title: '市场营销(N)', - icon: 'dollar', + title: '招标文件', + icon: 'file-text', hidden: false, }, }, { - path: '/project-management/project-source/privateproject', - name: 'PrivateProject', - component: () => import('@/views/default/error/404.vue'), + path: '/project-marketing/project-template/bid-documents', + name: 'BidDocuments', + component: () => import('@/views/project-management/bidding/bid-documents/index.vue'), meta: { - title: '自建项目(N)', - icon: 'dollar', + title: '投标文件', + icon: 'file-text', + hidden: false, + }, + }, + { + path: '/project-marketing/project-template/award-notice', + name: 'AwardNotice', + component: () => import('@/views/project-management/bidding/award-notice/index.vue'), + meta: { + title: '中标通知书', + icon: 'trophy', + hidden: false, + }, + }, + { + path: '/project-marketing/project-template/information-retrieval', + name: 'InformationRetrieval', + component: () => import ('@/views/project-management/bidding/information-retrieval/index.vue'), + meta: { + title: '信息检索(N)', + icon: 'trophy', hidden: false, }, }, ], }, + { + path: '/project-marketing/order-management/order-management', + name: 'OrderManagement', + component: () => import('@/views/project-management/order-management/index.vue'), + meta: { + title: '订单管理', + icon: 'file-text', + hidden: false, + }, + }, { path: '/project-management/contract', name: 'ProjectContract', component: () => import('@/components/ParentView/index.vue'), redirect: '/project-management/contract/revenue-contract', meta: { - title: '项目合同', + title: '合同管理', icon: 'file-text', hidden: false, }, children: [ @@ -628,6 +647,136 @@ export const systemRoutes: RouteRecordRaw[] = [ }, }, ] }, + ], + }, + { + path: '/project-management', + name: 'ProjectManagement', + component: Layout, + redirect: '/project-management/project-template/project-management', + meta: { title: '项目管理', icon: 'apps', hidden: false, sort: 4 }, + children: [ + { + path: '/project-management/contract/project-source', + name: 'ProjectSource', + component: () => import('@/components/ParentView/index.vue'), + meta: { + title: '项目来源', + icon: 'dollar', + hidden: false, + }, + children: [ + // { + // path: '/project-management/contract/procurement-business', + // name: 'ProcurementBusiness', + // component: () => import('@/components/ParentView/index.vue'), + // meta: { + // title: '招采业务', + // icon: 'dollar', + // hidden: false, + // }, + // children: [ + // { + // path: '/project-management/project-template/tender-documents', + // name: 'TenderDocuments', + // component: () => import('@/views/project-management/bidding/tender-documents/index.vue'), + // meta: { + // title: '招标文件', + // icon: 'file-text', + // hidden: false, + // }, + // }, + // { + // path: '/project-management/project-template/bid-documents', + // name: 'BidDocuments', + // component: () => import('@/views/project-management/bidding/bid-documents/index.vue'), + // meta: { + // title: '投标文件', + // icon: 'file-text', + // hidden: false, + // }, + // }, + // { + // path: '/project-management/project-template/award-notice', + // name: 'AwardNotice', + // component: () => import('@/views/project-management/bidding/award-notice/index.vue'), + // meta: { + // title: '中标通知书', + // icon: 'trophy', + // hidden: false, + // }, + // }, + // { + // path: '/project-management/project-template/information-retrieval', + // name: 'InformationRetrieval', + // component: () => import ('@/views/project-management/bidding/information-retrieval/index.vue'), + // meta: { + // title: '信息检索(N)', + // icon: 'trophy', + // hidden: false, + // }, + // }, + // + // ], + // }, + // { + // path: '/project-management/contract/revenue-contract2', + // name: 'RevenueContract2', + // component: () => import('@/views/default/error/404.vue'), + // meta: { + // title: '市场营销(N)', + // icon: 'dollar', + // hidden: false, + // }, + // }, + { + path: '/project-management/project-source/privateproject', + name: 'PrivateProject', + component: () => import('@/views/default/error/404.vue'), + meta: { + title: '自建项目(N)', + icon: 'dollar', + hidden: false, + }, + }, + ], + }, + // { path: '/project-management/contract', name: 'ProjectContract', component: () => import('@/components/ParentView/index.vue'), redirect: '/project-management/contract/revenue-contract', meta: { + // title: '项目合同', + // icon: 'file-text', + // hidden: false, + // }, children: [ + // { + // path: '/project-management/contract/revenue-contract', + // name: 'RevenueContract', + // component: () => import('@/views/project-management/contract/revenue-contract/index.vue'), + // meta: { + // title: '收入合同', + // icon: 'dollar', + // hidden: false, + // }, + // }, + // { + // path: '/project-management/contract/expense-contract', + // name: 'ExpenseContract', + // component: () => import('@/views/project-management/contract/expense-contract/index.vue'), + // meta: { + // title: '支出合同', + // icon: 'credit-card', + // hidden: false, + // }, + // }, + // { + // path: '/project-management/contract/cost-management', + // name: 'CostManagement', + // component: () => import('@/views/project-management/contract/cost-management/index.vue'), + // meta: { + // title: '成本费用', + // icon: 'bar-chart', + // hidden: false, + // }, + // }, + // ] }, { path: '/project-management/project-template/project-aproval', name: 'ProjectTemplate', @@ -704,25 +853,25 @@ export const systemRoutes: RouteRecordRaw[] = [ ], }, // 添加商务知识库 - { - path: '/bussiness-knowledge', - name: 'bussinesskonwledge', - component: Layout, - redirect: '/bussiness-knowledge/data', - meta: { title: '商务资料知识库', icon: 'message', hidden: false, sort: 6 }, - children: [ { - path: '/bussiness-konwledge/data', - name: 'bussiness-knowledge', - component: () => import('@/views/bussiness-data/bussiness.vue'), - meta: { - title: '商务数据库信息', - icon: 'info-circle', - hidden: false, - }, + path: '/bussiness-knowledge', + name: 'bussinesskonwledge', + component: Layout, + redirect: '/bussiness-knowledge/data', + meta: { title: '商务资料知识库', icon: 'message', hidden: false, sort: 6 }, + children: [ + { + path: '/bussiness-konwledge/data', + name: 'bussiness-knowledge', + component: () => import('@/views/bussiness-data/bussiness.vue'), + meta: { + title: '商务数据库信息', + icon: 'info-circle', + hidden: false, + }, + }, + ], }, - ], - }, { path: 'project-management/project-implementation/', name: 'Project-Implementation', @@ -1036,30 +1185,30 @@ export const systemRoutes: RouteRecordRaw[] = [ // } ], }, - { - path: '/user/profile', - name: 'UserProfile', - component: Layout, - redirect: '/user/profile', - meta: { - title: '个人中心', - icon: 'user', - hidden: false, - sort: 100, - }, - children: [ - { - path: '/user/profile', - name: 'UsersProfile', - component: () => import('@/views/user/profile/index.vue'), - meta: { - title: '个人中心', - icon: 'user', - hidden: false, - }, - }, - ], - }, + // { + // path: '/user/profile', + // name: 'UserProfile', + // component: Layout, + // redirect: '/user/profile', + // meta: { + // title: '个人中心', + // icon: 'user', + // hidden: false, + // sort: 100, + // }, + // children: [ + // { + // path: '/user/profile', + // name: 'UsersProfile', + // component: () => import('@/views/user/profile/index.vue'), + // meta: { + // title: '个人中心', + // icon: 'user', + // hidden: false, + // }, + // }, + // ], + // }, { path: '/enterprise-settings', name: 'EnterpriseSettings', diff --git a/src/stores/modules/route.ts b/src/stores/modules/route.ts index 7b7ca42..20c0eeb 100644 --- a/src/stores/modules/route.ts +++ b/src/stores/modules/route.ts @@ -149,6 +149,20 @@ const storeSetup = () => { isHidden: false, sort: 3, }, + { + id: 1070, + parentId: 1000, + title: '个人中心', + type: 2, + path: '/user/profile', + name: 'UserProfile', + component: 'user/profile/index', + icon: 'user', + isExternal: false, + isCache: false, + isHidden: false, + sort: 4, + }, ], }] // 使用已转换的数据生成路由 diff --git a/src/views/project-management/order-management/index.vue b/src/views/project-management/order-management/index.vue new file mode 100644 index 0000000..89b1f33 --- /dev/null +++ b/src/views/project-management/order-management/index.vue @@ -0,0 +1,11 @@ + + + + + \ No newline at end of file From 895bfcbeaf97f773fc4aa8f24c52072b1c2294ac Mon Sep 17 00:00:00 2001 From: Maple <869445424@qq.com> Date: Wed, 6 Aug 2025 16:02:00 +0800 Subject: [PATCH 3/4] =?UTF-8?q?fix:=E5=B0=86=E5=B2=97=E4=BD=8D=E4=B8=8E?= =?UTF-8?q?=E6=9C=8D=E5=8A=A1=E5=99=A8=E7=9A=84=E5=86=85=E5=AE=B9=E5=8C=B9?= =?UTF-8?q?=E9=85=8D=EF=BC=88=E7=9B=AE=E5=89=8D=E6=98=AF=E5=B2=97=E4=BD=8D?= =?UTF-8?q?=E4=B8=AD=E7=9A=84=E9=83=A8=E9=97=A8/=E6=89=80=E5=B1=9E?= =?UTF-8?q?=E9=83=A8=E9=97=A8=EF=BC=89?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/system/post/PostDetailDrawer.vue | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/src/views/system/post/PostDetailDrawer.vue b/src/views/system/post/PostDetailDrawer.vue index 61d3ffa..c671039 100644 --- a/src/views/system/post/PostDetailDrawer.vue +++ b/src/views/system/post/PostDetailDrawer.vue @@ -29,7 +29,7 @@
所属部门
-
{{ primaryInfo?.department || '技术部' }}
+
{{ primaryInfo?.deptName || '技术部' }}
直接上级岗位
@@ -52,7 +52,7 @@
{{ primaryInfo?.location || '上海/远程' }}
- +
岗位目的
@@ -68,18 +68,18 @@
主要职责与工作任务
- +
工作权限
- +
汇报关系
@@ -167,7 +167,7 @@
{{ primaryInfo?.performance || '根据项目按时交付率、代码质量、产品性能指标提升情况进行评估。' }}
- +
薪酬范围
@@ -184,7 +184,7 @@
{{ primaryInfo?.culture || '客户第一、创新、诚信、合作' }}
- +
职业发展路径
@@ -244,7 +244,7 @@ const getDetail = async (id: string) => { id: data.postId ?? data.id ?? '10001', name: data.postName ?? data.name ?? '-', status: data.status, - department: data.department ?? '技术部', + department: data.department ?? data.deptName ?? '技术部', superior: data.superior ?? '技术总监', level: data.level ?? 'P5', version: data.version ?? '2024-06-01 / V1.0', @@ -252,11 +252,11 @@ const getDetail = async (id: string) => { summary: data.summary ?? '负责公司核心产品开发,支撑业务增长。', tasks: data.tasks ?? [ '负责XXX产品的需求分析、架构设计、核心模块编码和单元测试。', - '制定并执行季度社交媒体营销计划,提升品牌曝光度和用户互动率。' + '制定并执行季度社交媒体营销计划,提升品牌曝光度和用户互动率。', ], permissions: data.permissions ?? [ '有权审批部门内5000元以下的采购申请。', - '有权对项目团队成员的工作任务进行分配和调整。' + '有权对项目团队成员的工作任务进行分配和调整。', ], subordinates: data.subordinates ?? '无', collaboration: data.collaboration ?? '与产品部、销售部、客服部紧密合作', From 36db98a343ed3e9f58531097532c251d6423c092 Mon Sep 17 00:00:00 2001 From: "Mr.j" <2221464500@qq.com> Date: Thu, 7 Aug 2025 12:01:46 +0800 Subject: [PATCH 4/4] =?UTF-8?q?=E5=AE=9E=E7=8E=B0=E8=AE=BE=E5=A4=87?= =?UTF-8?q?=E9=87=87=E8=B4=AD=E6=96=B0=E5=A2=9E=E5=8A=9F=E8=83=BD=EF=BC=8C?= =?UTF-8?q?=E5=B9=B6=E8=A7=84=E8=8C=83=E8=AE=BE=E5=A4=87=E7=8A=B6=E6=80=81?= =?UTF-8?q?=EF=BC=8C=E6=B7=BB=E5=8A=A0=E6=9C=AA=E5=85=A5=E5=BA=93=E7=8A=B6?= =?UTF-8?q?=E6=80=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/types/components.d.ts | 59 ----- .../components/ProcurementModal.vue | 212 +++++++++++++++++- .../components/ProcurementSearch.vue | 12 +- .../device-management/procurement/index.vue | 22 +- 4 files changed, 220 insertions(+), 85 deletions(-) diff --git a/src/types/components.d.ts b/src/types/components.d.ts index 19a4246..7fa6b1b 100644 --- a/src/types/components.d.ts +++ b/src/types/components.d.ts @@ -7,66 +7,7 @@ export {} declare module 'vue' { export interface GlobalComponents { - Avatar: typeof import('./../components/Avatar/index.vue')['default'] - Breadcrumb: typeof import('./../components/Breadcrumb/index.vue')['default'] - CellCopy: typeof import('./../components/CellCopy/index.vue')['default'] - Chart: typeof import('./../components/Chart/index.vue')['default'] - ColumnSetting: typeof import('./../components/GiTable/src/components/ColumnSetting.vue')['default'] - CronForm: typeof import('./../components/GenCron/CronForm/index.vue')['default'] - CronModal: typeof import('./../components/GenCron/CronModal/index.vue')['default'] - DateRangePicker: typeof import('./../components/DateRangePicker/index.vue')['default'] - DayForm: typeof import('./../components/GenCron/CronForm/component/day-form.vue')['default'] - FilePreview: typeof import('./../components/FilePreview/index.vue')['default'] - GiCellAvatar: typeof import('./../components/GiCell/GiCellAvatar.vue')['default'] - GiCellGender: typeof import('./../components/GiCell/GiCellGender.vue')['default'] - GiCellStatus: typeof import('./../components/GiCell/GiCellStatus.vue')['default'] - GiCellTag: typeof import('./../components/GiCell/GiCellTag.vue')['default'] - GiCellTags: typeof import('./../components/GiCell/GiCellTags.vue')['default'] - GiCodeView: typeof import('./../components/GiCodeView/index.vue')['default'] - GiDot: typeof import('./../components/GiDot/index.tsx')['default'] - GiEditTable: typeof import('./../components/GiEditTable/GiEditTable.vue')['default'] - GiFooter: typeof import('./../components/GiFooter/index.vue')['default'] - GiForm: typeof import('./../components/GiForm/src/GiForm.vue')['default'] - GiIconBox: typeof import('./../components/GiIconBox/index.vue')['default'] - GiIconSelector: typeof import('./../components/GiIconSelector/index.vue')['default'] - GiIframe: typeof import('./../components/GiIframe/index.vue')['default'] - GiOption: typeof import('./../components/GiOption/index.vue')['default'] - GiOptionItem: typeof import('./../components/GiOptionItem/index.vue')['default'] - GiPageLayout: typeof import('./../components/GiPageLayout/index.vue')['default'] - GiSpace: typeof import('./../components/GiSpace/index.vue')['default'] - GiSplitButton: typeof import('./../components/GiSplitButton/index.vue')['default'] - GiSplitPane: typeof import('./../components/GiSplitPane/index.vue')['default'] - GiSplitPaneFlexibleBox: typeof import('./../components/GiSplitPane/components/GiSplitPaneFlexibleBox.vue')['default'] - GiSvgIcon: typeof import('./../components/GiSvgIcon/index.vue')['default'] - GiTable: typeof import('./../components/GiTable/src/GiTable.vue')['default'] - GiTag: typeof import('./../components/GiTag/index.tsx')['default'] - GiThemeBtn: typeof import('./../components/GiThemeBtn/index.vue')['default'] - HourForm: typeof import('./../components/GenCron/CronForm/component/hour-form.vue')['default'] - Icon403: typeof import('./../components/icons/Icon403.vue')['default'] - Icon404: typeof import('./../components/icons/Icon404.vue')['default'] - Icon500: typeof import('./../components/icons/Icon500.vue')['default'] - IconBorders: typeof import('./../components/icons/IconBorders.vue')['default'] - IconTableSize: typeof import('./../components/icons/IconTableSize.vue')['default'] - IconTreeAdd: typeof import('./../components/icons/IconTreeAdd.vue')['default'] - IconTreeReduce: typeof import('./../components/icons/IconTreeReduce.vue')['default'] - ImageImport: typeof import('./../components/ImageImport/index.vue')['default'] - ImageImportWizard: typeof import('./../components/ImageImportWizard/index.vue')['default'] - IndustrialImageList: typeof import('./../components/IndustrialImageList/index.vue')['default'] - JsonPretty: typeof import('./../components/JsonPretty/index.vue')['default'] - MinuteForm: typeof import('./../components/GenCron/CronForm/component/minute-form.vue')['default'] - MonthForm: typeof import('./../components/GenCron/CronForm/component/month-form.vue')['default'] - ParentView: typeof import('./../components/ParentView/index.vue')['default'] RouterLink: typeof import('vue-router')['RouterLink'] RouterView: typeof import('vue-router')['RouterView'] - SecondForm: typeof import('./../components/GenCron/CronForm/component/second-form.vue')['default'] - SplitPanel: typeof import('./../components/SplitPanel/index.vue')['default'] - TextCopy: typeof import('./../components/TextCopy/index.vue')['default'] - TurbineGrid: typeof import('./../components/TurbineGrid/index.vue')['default'] - UserSelect: typeof import('./../components/UserSelect/index.vue')['default'] - Verify: typeof import('./../components/Verify/index.vue')['default'] - VerifyPoints: typeof import('./../components/Verify/Verify/VerifyPoints.vue')['default'] - VerifySlide: typeof import('./../components/Verify/Verify/VerifySlide.vue')['default'] - WeekForm: typeof import('./../components/GenCron/CronForm/component/week-form.vue')['default'] - YearForm: typeof import('./../components/GenCron/CronForm/component/year-form.vue')['default'] } } diff --git a/src/views/system-resource/device-management/procurement/components/ProcurementModal.vue b/src/views/system-resource/device-management/procurement/components/ProcurementModal.vue index 89a88bb..260162c 100644 --- a/src/views/system-resource/device-management/procurement/components/ProcurementModal.vue +++ b/src/views/system-resource/device-management/procurement/components/ProcurementModal.vue @@ -32,6 +32,21 @@
+ +
+
+ 🧪 测试数据 + 点击按钮快速填入测试数据,方便功能测试 +
+ + 📝 填入测试数据 + +
+ @@ -173,10 +188,10 @@ @@ -219,6 +234,8 @@ :disabled="isView" show-time style="width: 100%" + format="YYYY-MM-DD HH:mm:ss" + value-format="YYYY-MM-DD HH:mm:ss" /> @@ -230,6 +247,8 @@ :disabled="isView" show-time style="width: 100%" + format="YYYY-MM-DD HH:mm:ss" + value-format="YYYY-MM-DD HH:mm:ss" /> @@ -244,6 +263,8 @@ :disabled="isView" show-time style="width: 100%" + format="YYYY-MM-DD HH:mm:ss" + value-format="YYYY-MM-DD HH:mm:ss" /> @@ -253,7 +274,10 @@ v-model="formData.expectedScrapTime" placeholder="请选择预计报废时间" :disabled="isView" + show-time style="width: 100%" + format="YYYY-MM-DD HH:mm:ss" + value-format="YYYY-MM-DD HH:mm:ss" /> @@ -306,7 +330,10 @@ v-model="formData.warrantyExpireDate" placeholder="请选择保修截止日期" :disabled="isView" + show-time style="width: 100%" + format="YYYY-MM-DD HH:mm:ss" + value-format="YYYY-MM-DD HH:mm:ss" /> @@ -418,7 +445,10 @@ v-model="formData.lastMaintenanceDate" placeholder="请选择上次维护日期" :disabled="isView" + show-time style="width: 100%" + format="YYYY-MM-DD HH:mm:ss" + value-format="YYYY-MM-DD HH:mm:ss" /> @@ -428,7 +458,10 @@ v-model="formData.nextMaintenanceDate" placeholder="请选择下次维护日期" :disabled="isView" + show-time style="width: 100%" + format="YYYY-MM-DD HH:mm:ss" + value-format="YYYY-MM-DD HH:mm:ss" /> @@ -596,9 +629,8 @@ const equipmentTypeOptions = [ const equipmentStatusOptions = [ { label: '正常', value: 'normal' }, { label: '维修中', value: 'repair' }, - { label: '已报废', value: 'scrap' }, - { label: '闲置', value: 'idle' }, - { label: '丢失', value: 'lost' }, + { label: '保养中', value: 'maintain' }, + { label: '报废', value: 'scrap' }, ] const useStatusOptions = [ @@ -607,13 +639,14 @@ const useStatusOptions = [ ] const locationStatusOptions = [ + { label: '未入库', value: 'not_in_stock' }, { label: '库存中', value: 'in_stock' }, - { label: '使用中', value: 'in_use' }, + { label: '已分配', value: 'allocated' }, { label: '维修中', value: 'repair' }, + { label: '待报废', value: 'scrap' }, { label: '已报废', value: 'scrapped' }, - { label: '外借中', value: 'on_loan' }, + { label: '外借中', value: 'borrowed' }, { label: '丢失', value: 'lost' }, - { label: '闲置', value: 'idle' }, ] const healthStatusOptions = [ @@ -650,6 +683,15 @@ watch(() => props.visible, (newVal) => { } }) +// 监听单价和数量变化,自动计算总价 +watch([() => formData.unitPrice, () => formData.quantity], ([newUnitPrice, newQuantity]) => { + if (newUnitPrice && newQuantity) { + formData.totalPrice = Number((newUnitPrice * newQuantity).toFixed(2)) + } else { + formData.totalPrice = undefined + } +}) + // 初始化表单数据 const initFormData = () => { if (props.procurementData) { @@ -709,7 +751,7 @@ const resetForm = () => { assetCode: '', brand: '', specification: '', - locationStatus: '', + locationStatus: 'not_in_stock', // 设置默认位置状态为"未入库" physicalLocation: '', responsiblePerson: '', healthStatus: '', @@ -765,6 +807,107 @@ const handleSubmit = async () => { } } +// 填入测试数据 +const fillTestData = () => { + // 生成当前时间 + const now = new Date() + const currentTime = now.toISOString().slice(0, 19).replace('T', ' ') + + // 生成未来时间(预计报废时间) + const futureDate = new Date(now.getTime() + 365 * 24 * 60 * 60 * 1000) // 一年后 + const futureTime = futureDate.toISOString().slice(0, 19).replace('T', ' ') + + // 生成过去时间(采购时间等) + const pastDate = new Date(now.getTime() - 30 * 24 * 60 * 60 * 1000) // 30天前 + const pastTime = pastDate.toISOString().slice(0, 19).replace('T', ' ') + + // 生成入库时间(采购后7天) + const inStockDate = new Date(pastDate.getTime() + 7 * 24 * 60 * 60 * 1000) + const inStockTime = inStockDate.toISOString().slice(0, 19).replace('T', ' ') + + // 生成启用时间(入库后3天) + const activationDate = new Date(inStockDate.getTime() + 3 * 24 * 60 * 60 * 1000) + const activationTime = activationDate.toISOString().slice(0, 19).replace('T', ' ') + + // 生成保修截止时间(采购后2年) + const warrantyDate = new Date(pastDate.getTime() + 2 * 365 * 24 * 60 * 60 * 1000) + const warrantyTime = warrantyDate.toISOString().slice(0, 19).replace('T', ' ') + + // 生成维护时间 + const lastMaintenanceDate = new Date(now.getTime() - 15 * 24 * 60 * 60 * 1000) // 15天前 + const lastMaintenanceTime = lastMaintenanceDate.toISOString().slice(0, 19).replace('T', ' ') + + const nextMaintenanceDate = new Date(now.getTime() + 15 * 24 * 60 * 60 * 1000) // 15天后 + const nextMaintenanceTime = nextMaintenanceDate.toISOString().slice(0, 19).replace('T', ' ') + + // 生成随机序列号 + const randomSn = 'SN' + Math.random().toString(36).substr(2, 8).toUpperCase() + + // 生成随机资产编号 + const randomAssetCode = 'ZC' + Math.random().toString(36).substr(2, 6).toUpperCase() + + // 生成随机采购订单号 + const randomPurchaseOrder = 'PO' + Math.random().toString(36).substr(2, 8).toUpperCase() + + // 生成随机库存条码 + const randomBarcode = 'BC' + Math.random().toString(36).substr(2, 10).toUpperCase() + + // 生成随机次户号 + const randomAccountNumber = 'AC' + Math.random().toString(36).substr(2, 6).toUpperCase() + + // 先设置单价和数量,让监听器自动计算总价 + formData.unitPrice = 8999.00 + formData.quantity = 2 + + Object.assign(formData, { + // 基本信息 + equipmentName: '高清工业相机系统', + equipmentModel: 'IC-2000Pro', + equipmentType: 'detection', + equipmentSn: randomSn, + brand: '海康威视', + assetCode: randomAssetCode, + specification: '分辨率:4K,帧率:60fps,接口:USB3.0,支持AI识别,防水等级IP67', + + // 采购信息 + purchaseOrder: randomPurchaseOrder, + supplierName: '海康威视官方旗舰店', + // quantity 和 unitPrice 已在上方设置,totalPrice 将由监听器自动计算 + purchasePrice: 17998.00, + currentNetValue: 17998.00, + depreciationMethod: 'straight_line', + depreciationYears: 5, + salvageValue: 899.90, + + // 时间信息 + purchaseTime: pastTime, + inStockTime: inStockTime, + activationTime: activationTime, + expectedScrapTime: futureTime, + warrantyExpireDate: warrantyTime, + lastMaintenanceDate: lastMaintenanceTime, + nextMaintenanceDate: nextMaintenanceTime, + + // 状态信息 + equipmentStatus: 'normal', + useStatus: '1', + locationStatus: 'in_stock', + healthStatus: 'excellent', + responsiblePerson: '张工程师', + maintenancePerson: '李维护员', + physicalLocation: 'A区-3楼-设备间-01号柜', + inventoryBarcode: randomBarcode, + + // 其他信息 + accountNumber: randomAccountNumber, + inventoryBasis: '月度盘点', + dynamicRecord: '设备运行正常,定期维护保养,性能稳定,满足生产需求。', + assetRemark: '重要检测设备,需定期校准,专人负责维护。', + }) + + Message.success('测试数据已填入!') +} + // 取消 const handleCancel = () => { emit('update:visible', false) @@ -845,6 +988,52 @@ const handleCancel = () => { } } +// 测试数据区域样式 +.test-data-section { + background: linear-gradient(135deg, #f0f9ff 0%, #e0f2fe 100%); + border: 1px solid #bae6fd; + border-radius: 8px; + padding: 12px 16px; + margin-bottom: 20px; + + .test-data-header { + display: flex; + flex-direction: column; + margin-bottom: 12px; + + .test-data-title { + font-weight: 600; + color: #1e40af; + font-size: 14px; + margin-bottom: 4px; + } + + .test-data-desc { + color: #64748b; + font-size: 12px; + line-height: 1.4; + } + } + + .arco-btn { + background: linear-gradient(135deg, #3b82f6 0%, #1d4ed8 100%); + border: none; + color: white; + font-weight: 500; + box-shadow: 0 2px 4px rgba(59, 130, 246, 0.3); + transition: all 0.3s ease; + + &:hover { + transform: translateY(-1px); + box-shadow: 0 4px 8px rgba(59, 130, 246, 0.4); + } + + &:active { + transform: translateY(0); + } + } +} + // 响应式设计 @media (max-width: 768px) { .tab-navigation { @@ -861,5 +1050,10 @@ const handleCancel = () => { } } } + + .test-data-section { + padding: 8px 12px; + margin-bottom: 16px; + } } \ No newline at end of file diff --git a/src/views/system-resource/device-management/procurement/components/ProcurementSearch.vue b/src/views/system-resource/device-management/procurement/components/ProcurementSearch.vue index 6ffbbbf..e8f3c26 100644 --- a/src/views/system-resource/device-management/procurement/components/ProcurementSearch.vue +++ b/src/views/system-resource/device-management/procurement/components/ProcurementSearch.vue @@ -93,9 +93,8 @@ > 正常 维修中 - 已报废 - 闲置 - 丢失 + 保养中 + 报废 @@ -106,13 +105,14 @@ placeholder="请选择位置状态" allow-clear > + 未入库 库存中 - 使用中 + 已分配 维修中 + 待报废 已报废 - 外借中 + 外借中 丢失 - 闲置 diff --git a/src/views/system-resource/device-management/procurement/index.vue b/src/views/system-resource/device-management/procurement/index.vue index 8bc491b..d07edab 100644 --- a/src/views/system-resource/device-management/procurement/index.vue +++ b/src/views/system-resource/device-management/procurement/index.vue @@ -360,9 +360,8 @@ const getEquipmentStatusColor = (status: string) => { const colorMap: Record = { normal: 'green', repair: 'orange', + maintain: 'blue', scrap: 'red', - idle: 'blue', - lost: 'gray', } return colorMap[status] || 'blue' } @@ -372,9 +371,8 @@ const getEquipmentStatusText = (status: string) => { const textMap: Record = { normal: '正常', repair: '维修中', - scrap: '已报废', - idle: '闲置', - lost: '丢失', + maintain: '保养中', + scrap: '报废', } return textMap[status] || '未知' } @@ -382,13 +380,14 @@ const getEquipmentStatusText = (status: string) => { // 获取位置状态颜色 const getLocationStatusColor = (status: string) => { const colorMap: Record = { + not_in_stock: 'gray', in_stock: 'blue', - in_use: 'green', + allocated: 'green', repair: 'orange', + scrap: 'red', scrapped: 'red', - on_loan: 'purple', + borrowed: 'purple', lost: 'gray', - idle: 'cyan', } return colorMap[status] || 'blue' } @@ -396,13 +395,14 @@ const getLocationStatusColor = (status: string) => { // 获取位置状态文本 const getLocationStatusText = (status: string) => { const textMap: Record = { + not_in_stock: '未入库', in_stock: '库存中', - in_use: '使用中', + allocated: '已分配', repair: '维修中', + scrap: '待报废', scrapped: '已报废', - on_loan: '外借中', + borrowed: '外借中', lost: '丢失', - idle: '闲置', } return textMap[status] || '未知' }