diff --git a/package-lock.json b/package-lock.json index 02c29fa71..cc8a0c823 100644 --- a/package-lock.json +++ b/package-lock.json @@ -57,6 +57,7 @@ "vue-dompurify-html": "^4.1.4", "vue-i18n": "9.10.2", "vue-router": "4.4.5", + "vue-signature-pad": "^3.0.2", "vue-types": "^5.1.1", "vue3-signature": "^0.2.4", "vuedraggable": "^4.1.0", @@ -12844,6 +12845,12 @@ "url": "https://github.com/sponsors/sindresorhus" } }, + "node_modules/merge-images": { + "version": "1.2.0", + "resolved": "https://registry.npmmirror.com/merge-images/-/merge-images-1.2.0.tgz", + "integrity": "sha512-hEGvgnTdXr08uzGvEArxRsKpy7WmozM73YaSi4s5IYF4LxrhANpqfHaz9CgBZ5+0+s2NsjPnPdStz3aCc0Yulw==", + "license": "MIT" + }, "node_modules/merge-stream": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/merge-stream/-/merge-stream-2.0.0.tgz", @@ -16967,6 +16974,22 @@ "vue": "^3.2.0" } }, + "node_modules/vue-signature-pad": { + "version": "3.0.2", + "resolved": "https://registry.npmmirror.com/vue-signature-pad/-/vue-signature-pad-3.0.2.tgz", + "integrity": "sha512-o25o+lROfCmzASS2+fU8ZV801kV+D4/02zkZ+ez3NKeiUmbxW7kwlUf5oKQkvA+l7Ou9xGsGLsirBLch3jyX8A==", + "license": "MIT", + "dependencies": { + "merge-images": "^1.1.0", + "signature_pad": "^3.0.0-beta.3" + }, + "engines": { + "node": ">=12" + }, + "peerDependencies": { + "vue": "^3.2.0" + } + }, "node_modules/vue-template-compiler": { "version": "2.7.16", "resolved": "https://registry.npmjs.org/vue-template-compiler/-/vue-template-compiler-2.7.16.tgz", diff --git a/package.json b/package.json index 307b915ec..0bb52dd6e 100644 --- a/package.json +++ b/package.json @@ -73,6 +73,7 @@ "vue-dompurify-html": "^4.1.4", "vue-i18n": "9.10.2", "vue-router": "4.4.5", + "vue-signature-pad": "^3.0.2", "vue-types": "^5.1.1", "vue3-signature": "^0.2.4", "vuedraggable": "^4.1.0", diff --git a/src/api/task/online/index.ts b/src/api/task/online/index.ts new file mode 100644 index 000000000..924cb08a7 --- /dev/null +++ b/src/api/task/online/index.ts @@ -0,0 +1,51 @@ +import request from '@/config/axios' + +// 上线申请 VO +export interface OnlineApplicationVO { + id: number // 唯一主键 + projectName: string // 产品名称 + projectType: number // 项目类型 + deptId: number // 申请部门 + userId: number // 申请人 + testCompletionDate: Date // 测试完成日期 + onlineDate: Date // 申请上线日期 + externalSystem: string // 上线系统是否涉及第三方系统(如:是/否) + precautions: string // 上线注意事项 + emergencyManagement: string // 失败应急处理 + applicantSign: string // 申请人签字 + processInstanceId: string // 工作流编号 + auditStatus: number // 审批状态 +} + +// 上线申请 API +export const OnlineApplicationApi = { + // 查询上线申请分页 + getOnlineApplicationPage: async (params: any) => { + return await request.get({ url: `/tts/online-application/page`, params }) + }, + + // 查询上线申请详情 + getOnlineApplication: async (id: number) => { + return await request.get({ url: `/tts/online-application/get?id=` + id }) + }, + + // 新增上线申请 + createOnlineApplication: async (data: OnlineApplicationVO) => { + return await request.post({ url: `/tts/online-application/create`, data }) + }, + + // 修改上线申请 + updateOnlineApplication: async (data: OnlineApplicationVO) => { + return await request.put({ url: `/tts/online-application/update`, data }) + }, + + // 删除上线申请 + deleteOnlineApplication: async (id: number) => { + return await request.delete({ url: `/tts/online-application/delete?id=` + id }) + }, + + // 导出上线申请 Excel + exportOnlineApplication: async (params) => { + return await request.download({ url: `/tts/online-application/export-excel`, params }) + } +} \ No newline at end of file diff --git a/src/main.ts b/src/main.ts index 874f7668d..dae04a46a 100644 --- a/src/main.ts +++ b/src/main.ts @@ -42,6 +42,8 @@ import Logger from '@/utils/Logger' import VueDOMPurifyHTML from 'vue-dompurify-html' // 解决v-html 的安全隐患 +import VueSignaturePad from "vue-signature-pad"; + // 创建实例 const setupAll = async () => { const app = createApp(App) @@ -65,6 +67,7 @@ const setupAll = async () => { await router.isReady() app.use(VueDOMPurifyHTML) + app.use(VueSignaturePad); app.mount('#app') } diff --git a/src/router/modules/remaining.ts b/src/router/modules/remaining.ts index 9f65f6b58..f15c41f1b 100644 --- a/src/router/modules/remaining.ts +++ b/src/router/modules/remaining.ts @@ -849,6 +849,17 @@ const remainingRouter: AppRouteRecordRaw[] = [ }, component: () => import('@/views/task/components/ProjectTaskForm.vue') }, + { + path: 'online/OnlineApplicationForm', + name: 'OnlineAppAdd', + meta: { + title: '上线新增', + noCache: true, + hidden: true, + activeMenu: '/project/online' + }, + component: () => import('@/views/task/online/OnlineApplicationForm.vue') + }, ] }, { diff --git a/src/views/crm/contract/ContractChange.vue b/src/views/crm/contract/ContractChange.vue index 4ac7188c8..dd99df69e 100644 --- a/src/views/crm/contract/ContractChange.vue +++ b/src/views/crm/contract/ContractChange.vue @@ -50,7 +50,7 @@ - - + + - - + + - - + + - - + + - - + + - - + + @@ -276,7 +276,7 @@ watch( ) const onChangeAmount = async (amount: number) => { - formData.value.afterAmount = Number(formData.value.creditLimit) + Number(amount).toFixed(2); + formData.value.afterAmount = Number(formData.value.creditLimit) + Number(Number(amount).toFixed(2)); } const onCustomerChange = async (customerId: string) => { diff --git a/src/views/crm/customer/detail/returnvisitrecord/ReturnVisitRecordForm.vue b/src/views/crm/customer/detail/returnvisitrecord/ReturnVisitRecordForm.vue index 4f8327633..0d45ed4df 100644 --- a/src/views/crm/customer/detail/returnvisitrecord/ReturnVisitRecordForm.vue +++ b/src/views/crm/customer/detail/returnvisitrecord/ReturnVisitRecordForm.vue @@ -59,7 +59,7 @@ - + diff --git a/src/views/crm/followup/FollowUpRecordForm.vue b/src/views/crm/followup/FollowUpRecordForm.vue index cf0976592..362bbb3d4 100644 --- a/src/views/crm/followup/FollowUpRecordForm.vue +++ b/src/views/crm/followup/FollowUpRecordForm.vue @@ -36,14 +36,14 @@ - + - + - + diff --git a/src/views/crm/followup/index.vue b/src/views/crm/followup/index.vue index dfd4db313..55fc0d992 100644 --- a/src/views/crm/followup/index.vue +++ b/src/views/crm/followup/index.vue @@ -164,7 +164,7 @@ const getList = async () => { const previewPic = (val) => { show.value = true - urlList.value = val.split(',') + urlList.value = val } /** 添加/修改操作 */ @@ -187,15 +187,16 @@ const handleDelete = async (id: number) => { } //预览 +const router = useRouter() // 路由 const previewFile = (fileUrls) => { // // 假设 fileUrls 是一个字符串,包含文件的完整 URL + fileUrls = fileUrls + '' if (!fileUrls) { message.error('没有附件'); return; } // 检查文件类型 -const router = useRouter() // 路由 const fileExtension = fileUrls.split('.').pop().toLowerCase(); router.push({ name: 'FileTemplatePreview', diff --git a/src/views/crm/quotation/QuotationDetail.vue b/src/views/crm/quotation/QuotationDetail.vue index 03e159027..9eb4631ec 100644 --- a/src/views/crm/quotation/QuotationDetail.vue +++ b/src/views/crm/quotation/QuotationDetail.vue @@ -10,7 +10,7 @@ - + - +