diff --git a/src/api/crm/customer/index.ts b/src/api/crm/customer/index.ts index 45e396098..200cc9ef7 100644 --- a/src/api/crm/customer/index.ts +++ b/src/api/crm/customer/index.ts @@ -112,6 +112,11 @@ export const getCustomer = async (id: number) => { return await request.get({ url: `/crm/customer/get?id=` + id }) } +// 查询客户详情带报价单 +export const getCustomerDetail = async (id: number) => { + return await request.get({ url: `/crm/customer/get-contract-customer-detail?id=` + id }) +} + // 新增客户 export const createCustomer = async (data: CustomerVO) => { return await request.post({ url: `/crm/customer/create`, data }) diff --git a/src/api/task/bonus/index.ts b/src/api/task/bonus/index.ts new file mode 100644 index 000000000..5302b9f2f --- /dev/null +++ b/src/api/task/bonus/index.ts @@ -0,0 +1,45 @@ +import request from '@/config/axios' + +// 项目奖金 VO +export interface ProjectBonusVO { + id: number // 唯一主键 + projectId: number // 项目ID + userId: number // 员工ID + bonusPercentage: number // 奖金百分比 + bonusAmount: number // 奖金金额 + bonusIssueDate: Date // 奖金发放日期 + bonusState: number // 奖金发放状态 +} + +// 项目奖金 API +export const ProjectBonusApi = { + // 查询项目奖金分页 + getProjectBonusPage: async (params: any) => { + return await request.get({ url: `/tts/project-bonus/page`, params }) + }, + + // 查询项目奖金详情 + getProjectBonus: async (id: number) => { + return await request.get({ url: `/tts/project-bonus/get?id=` + id }) + }, + + // 新增项目奖金 + createProjectBonus: async (data: ProjectBonusVO) => { + return await request.post({ url: `/tts/project-bonus/create`, data }) + }, + + // 修改项目奖金 + updateProjectBonus: async (data: ProjectBonusVO) => { + return await request.put({ url: `/tts/project-bonus/update`, data }) + }, + + // 删除项目奖金 + deleteProjectBonus: async (id: number) => { + return await request.delete({ url: `/tts/project-bonus/delete?id=` + id }) + }, + + // 导出项目奖金 Excel + exportProjectBonus: async (params) => { + return await request.download({ url: `/tts/project-bonus/export-excel`, params }) + } +} \ No newline at end of file diff --git a/src/api/task/project/index.ts b/src/api/task/project/index.ts new file mode 100644 index 000000000..9cfc3ffd0 --- /dev/null +++ b/src/api/task/project/index.ts @@ -0,0 +1,56 @@ +import request from '@/config/axios' + +// 项目管理 VO +export interface ProjectVO { + id: number // 唯一主键 + projectCode: string // 项目编号 + name: string // 项目名称 + projectLevel: number // 项目级别,字典值:简单、一般、中等、困难、比较困难 + projectType: number // 项目类型,字典值 + userId: number // 项目负责人ID + startDate: Date // 项目开始日期 + endDate: Date // 项目结束日期 + attachment: string // 项目附件 + bonusEvaluation: boolean // 立项奖金评估,1: 是,2: 否 + bonusAmount: number // 立项奖金金额 + bonusIssueDate: Date // 奖金发放日期 + background: string // 项目背景 + introduction: string // 项目简介 + expectation: string // 项目预期成果 + progress: number // 项目进度 + processInstanceId: string // 工作流编号 + auditStatus: number // 审批状态 +} + +// 项目管理 API +export const ProjectApi = { + // 查询项目管理分页 + getProjectPage: async (params: any) => { + return await request.get({ url: `/tts/project/page`, params }) + }, + + // 查询项目管理详情 + getProject: async (id: number) => { + return await request.get({ url: `/tts/project/get?id=` + id }) + }, + + // 新增项目管理 + createProject: async (data: ProjectVO) => { + return await request.post({ url: `/tts/project/create`, data }) + }, + + // 修改项目管理 + updateProject: async (data: ProjectVO) => { + return await request.put({ url: `/tts/project/update`, data }) + }, + + // 删除项目管理 + deleteProject: async (id: number) => { + return await request.delete({ url: `/tts/project/delete?id=` + id }) + }, + + // 导出项目管理 Excel + exportProject: async (params) => { + return await request.download({ url: `/tts/project/export-excel`, params }) + } +} \ No newline at end of file diff --git a/src/api/task/task/index.ts b/src/api/task/task/index.ts new file mode 100644 index 000000000..00b7a8fdb --- /dev/null +++ b/src/api/task/task/index.ts @@ -0,0 +1,51 @@ +import request from '@/config/axios' + +// 任务 VO +export interface ProjectTaskVO { + id: number // 唯一主键 + taskName: string // 任务名称 + userId: number // 任务负责人 + taskLevel: number // 任务优先级 + startDate: Date // 开始日期 + endDate: Date // 截止日期 + attachment: string // 任务附件 + taskDescribe: string // 任务描述 + taskProgress: number // 任务进度 + projectId: number // 项目Id + taskState: number // 任务状态 + processInstanceId: string // 工作流编号 + auditStatus: number // 审批状态 +} + +// 任务 API +export const ProjectTaskApi = { + // 查询任务分页 + getProjectTaskPage: async (params: any) => { + return await request.get({ url: `/tts/project-task/page`, params }) + }, + + // 查询任务详情 + getProjectTask: async (id: number) => { + return await request.get({ url: `/tts/project-task/get?id=` + id }) + }, + + // 新增任务 + createProjectTask: async (data: ProjectTaskVO) => { + return await request.post({ url: `/tts/project-task/create`, data }) + }, + + // 修改任务 + updateProjectTask: async (data: ProjectTaskVO) => { + return await request.put({ url: `/tts/project-task/update`, data }) + }, + + // 删除任务 + deleteProjectTask: async (id: number) => { + return await request.delete({ url: `/tts/project-task/delete?id=` + id }) + }, + + // 导出任务 Excel + exportProjectTask: async (params) => { + return await request.download({ url: `/tts/project-task/export-excel`, params }) + } +} \ No newline at end of file diff --git a/src/router/modules/remaining.ts b/src/router/modules/remaining.ts index cbb0c0ef4..bf160c921 100644 --- a/src/router/modules/remaining.ts +++ b/src/router/modules/remaining.ts @@ -776,6 +776,47 @@ const remainingRouter: AppRouteRecordRaw[] = [ } ] }, + { + path: '/project', + component: Layout, + name: 'ProCenter', + meta: { hidden: true }, + children: [ + { + path: 'project/ProjectForm', + name: 'ProProAdd', + meta: { + title: '项目管理新增', + noCache: true, + hidden: true, + activeMenu: '/project/project' + }, + component: () => import('@/views/task/project/ProjectForm.vue') + }, + { + path: 'project/ProjectFormEdit', + name: 'ProProEdit', + meta: { + title: '项目管理新增', + noCache: true, + hidden: true, + activeMenu: '/project/project' + }, + component: () => import('@/views/task/project/ProjectForm.vue') + }, + { + path: 'project/ProjectDetail', + name: 'ProProDetail', + meta: { + title: '项目管理详情', + noCache: true, + hidden: true, + activeMenu: '/project/project' + }, + component: () => import('@/views/task/project/ProjectDetail.vue') + }, + ] + }, { path: '/ai', component: Layout, diff --git a/src/utils/dict.ts b/src/utils/dict.ts index 382f09d23..87bddb786 100644 --- a/src/utils/dict.ts +++ b/src/utils/dict.ts @@ -233,6 +233,11 @@ export enum DICT_TYPE { PAYMENT_TERM = "payment_term", // 投诉级别 CREDIT_CALC_CYCLE = "credit_calc_cycle",//授信计算周期 + + // ========== ERP - 企业资源计划模块 ========== + TTS_PROJECT_LEVEL="tts_project_level", //项目级别 + TTS_PROJECT_TYPE="tts_project_type", //项目类型 + // ========== ERP - 企业资源计划模块 ========== ERP_AUDIT_STATUS = 'erp_audit_status', // ERP 审批状态 diff --git a/src/views/crm/business/components/BusinessProductForm.vue b/src/views/crm/business/components/BusinessProductForm.vue index e27deca15..56205ad77 100644 --- a/src/views/crm/business/components/BusinessProductForm.vue +++ b/src/views/crm/business/components/BusinessProductForm.vue @@ -123,7 +123,7 @@ watch( // 循环处理 val.forEach((item) => { if (item.offlinePrice != null && item.onlinePrice != null) { - item.totalPrice = item.offlinePrice + item.onlinePrice; + item.totalPrice = Number(item.offlinePrice) + Number(item.onlinePrice); } else { item.totalPrice = 0; } diff --git a/src/views/crm/contract/ContractForm.vue b/src/views/crm/contract/ContractForm.vue index d213f5c4c..df6e6cefe 100644 --- a/src/views/crm/contract/ContractForm.vue +++ b/src/views/crm/contract/ContractForm.vue @@ -771,7 +771,7 @@ const onCustomerChange = async (customerId: string) => { try { formLoading.value = true; - const customerRes = await CustomerApi.getCustomer(customerId); + const customerRes = await CustomerApi.getCustomerDetail(customerId); formData.value.cooperationType = customerRes.cooperationType; formData.value.companyType = customerRes.companyType; formData.value.listingStatus = customerRes.listingStatus; @@ -833,7 +833,6 @@ onMounted(async () => { customerList.value = await CustomerApi.getCustomerSimpleList() // 获得用户列表 userOptions.value = await UserApi.getSimpleUserList() - console.log('%csrc/views/crm/contract/ContractForm.vue:827 userOptions.value', 'color: #007acc;', userOptions.value); // 获得报价列表 quotationList.value = await QuotationApi.getSelfSimpleQuotationList() diff --git a/src/views/crm/contract/index.vue b/src/views/crm/contract/index.vue index 457ba235c..d85007aae 100644 --- a/src/views/crm/contract/index.vue +++ b/src/views/crm/contract/index.vue @@ -275,7 +275,7 @@ 合同变更 @@ -395,7 +395,7 @@ const handleChange = (row) => { } /** 操作分发 */ -const handleCommand = (command: string, row: UserApi.UserVO) => { +const handleCommand = (command: string, row) => { switch (command) { case 'handleSubmit': handleSubmit(row) @@ -486,7 +486,7 @@ const onPrintContract = async (row: ContractApi.ContractVO) => { // } // } // link.click() - console.log('%csrc/views/crm/contract/index.vue:489 res.data', 'color: #007acc;', res); + // console.log('%csrc/views/crm/contract/index.vue:489 res.data', 'color: #007acc;', res); window.open(res) // message.success('提交审核成功!') diff --git a/src/views/crm/productprocurementcost/ProductProcurementCostForm.vue b/src/views/crm/productprocurementcost/ProductProcurementCostForm.vue index 9dd62d39e..67c8b8de8 100644 --- a/src/views/crm/productprocurementcost/ProductProcurementCostForm.vue +++ b/src/views/crm/productprocurementcost/ProductProcurementCostForm.vue @@ -186,7 +186,7 @@ defineExpose({ open }) // 提供 open 方法,用于打开弹窗 const changeProduct = (val) => { let arr = productList.value.filter(v => v.id === val) if (arr.length) { - formData.value.projectCode = arr[0]['projectCode'] + formData.value.projectCode = arr[0]['no'] formData.value.category = arr[0]['category'] formData.value.detailType = arr[0]['detailType'] formData.value.unit = arr[0]['unit'] diff --git a/src/views/task/components/Bouns.vue b/src/views/task/components/Bouns.vue new file mode 100644 index 000000000..3cf0ba535 --- /dev/null +++ b/src/views/task/components/Bouns.vue @@ -0,0 +1,149 @@ + + + + + + + + + + {{(scope.row.bonusPercentage * 100).toFixed(2) + '%'}} + + + + + + + + 删除 + + + + + + + 添加 + + + + + + + + + + + \ No newline at end of file diff --git a/src/views/task/components/ProjectBonusForm.vue b/src/views/task/components/ProjectBonusForm.vue new file mode 100644 index 000000000..77f676fbd --- /dev/null +++ b/src/views/task/components/ProjectBonusForm.vue @@ -0,0 +1,121 @@ + + + + + + + + + + + + + + 确 定 + 取 消 + + + + \ No newline at end of file diff --git a/src/views/task/components/ProjectTaskForm.vue b/src/views/task/components/ProjectTaskForm.vue new file mode 100644 index 000000000..b0e18051d --- /dev/null +++ b/src/views/task/components/ProjectTaskForm.vue @@ -0,0 +1,176 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 确 定 + 取 消 + + + + \ No newline at end of file diff --git a/src/views/task/components/Task.vue b/src/views/task/components/Task.vue new file mode 100644 index 000000000..c8d65134c --- /dev/null +++ b/src/views/task/components/Task.vue @@ -0,0 +1,178 @@ + + + + + + + + + + + + + + + + + + + + 编辑 + + + 删除 + + + + + + + 添加 + + + + + + + + + + \ No newline at end of file diff --git a/src/views/task/project/ProjectDetail.vue b/src/views/task/project/ProjectDetail.vue new file mode 100644 index 000000000..6090ae8b0 --- /dev/null +++ b/src/views/task/project/ProjectDetail.vue @@ -0,0 +1,338 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 项目信息 + + + + + + + + + + + + + + + + + + + + + 奖金信息 + + + + + + + + + + + + + + + 团队成员 + + + + + 任务信息 + + + + + + 确 定 + 取 消 + + + + + + \ No newline at end of file diff --git a/src/views/task/project/ProjectForm.vue b/src/views/task/project/ProjectForm.vue new file mode 100644 index 000000000..10936f625 --- /dev/null +++ b/src/views/task/project/ProjectForm.vue @@ -0,0 +1,369 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 项目信息 + + + + + + + + + + + + + + + + + + + + + 奖金信息 + + + + + + + + + + + + + + + 团队成员 + + + + + 任务信息 + + + + + + 确 定 + 取 消 + + + + + + \ No newline at end of file diff --git a/src/views/task/project/index.vue b/src/views/task/project/index.vue new file mode 100644 index 000000000..04a8cd20e --- /dev/null +++ b/src/views/task/project/index.vue @@ -0,0 +1,413 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 搜索 + 重置 + + 新增 + + + 导出 + + + + + + + + + + + + + + + + + + + + + + + + {{getName(userOptions, scope.row.userId)}} + + + + + + + + {{scope.row.bonusEvaluation ? '是' : '否'}} + + + + + + + + + + + + + + + + + {{getName(userOptions, scope.row.creator)}} + + + + + + {{getName(userOptions, scope.row.updater)}} + + + + + + + + + 进度 + + + 详情 + + + handleCommand(command, scope.row)" + v-hasPermi="[ + 'task:project:create', + 'task:project:addUser', + 'task:project:update' + ]" + > + 更多 + + + + 编辑 + + + 新增任务 + + + 新增成员 + + + + + + + + + + + + + + + + + + \ No newline at end of file