From 4440ec866c6ef5f9f68f9b6c4248ab3d2c6f3bb9 Mon Sep 17 00:00:00 2001 From: liuhongfeng <291117974@qq.com> Date: Mon, 20 Nov 2023 23:32:54 +0800 Subject: [PATCH 01/22] =?UTF-8?q?=E3=80=90=E6=96=B0=E5=A2=9E=E3=80=91urepo?= =?UTF-8?q?rt2=20=E9=9B=86=E6=88=90?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/report/ureport/index.ts | 39 ++++ src/views/report/ureport/UreportFileForm.vue | 113 ++++++++++ src/views/report/ureport/index.vue | 219 +++++++++++++++++++ 3 files changed, 371 insertions(+) create mode 100644 src/api/report/ureport/index.ts create mode 100644 src/views/report/ureport/UreportFileForm.vue create mode 100644 src/views/report/ureport/index.vue diff --git a/src/api/report/ureport/index.ts b/src/api/report/ureport/index.ts new file mode 100644 index 00000000..c11ce960 --- /dev/null +++ b/src/api/report/ureport/index.ts @@ -0,0 +1,39 @@ +import request from '@/config/axios' + +export interface UreportFileVO { + id: number + fileName: string + status: number + fileContent: string + remark: string +} + +// 查询Ureport2报表分页 +export const getUreportFilePage = async (params) => { + return await request.get({ url: `/report/ureport-file/page`, params }) +} + +// 查询Ureport2报表详情 +export const getUreportFile = async (id: number) => { + return await request.get({ url: `/report/ureport-file/get?id=` + id }) +} + +// 新增Ureport2报表 +export const createUreportFile = async (data: UreportFileVO) => { + return await request.post({ url: `/report/ureport-file/create`, data }) +} + +// 修改Ureport2报表 +export const updateUreportFile = async (data: UreportFileVO) => { + return await request.put({ url: `/report/ureport-file/update`, data }) +} + +// 删除Ureport2报表 +export const deleteUreportFile = async (id: number) => { + return await request.delete({ url: `/report/ureport-file/delete?id=` + id }) +} + +// 导出Ureport2报表 Excel +export const exportUreportFile = async (params) => { + return await request.download({ url: `/report/ureport-file/export-excel`, params }) +} \ No newline at end of file diff --git a/src/views/report/ureport/UreportFileForm.vue b/src/views/report/ureport/UreportFileForm.vue new file mode 100644 index 00000000..7d71055c --- /dev/null +++ b/src/views/report/ureport/UreportFileForm.vue @@ -0,0 +1,113 @@ + + + + + + + + + + + + + + + + + + + + 确 定 + 取 消 + + + + \ No newline at end of file diff --git a/src/views/report/ureport/index.vue b/src/views/report/ureport/index.vue new file mode 100644 index 00000000..ef4986dc --- /dev/null +++ b/src/views/report/ureport/index.vue @@ -0,0 +1,219 @@ + + + + + + + + + + + + + + + + + + + + 搜索 + 重置 + + 新增 + + + 导出 + + + + + + + + + + + + + + + + + + + + + 编辑 + + + 删除 + + + + + + + + + + + + + \ No newline at end of file From aceac6daaea05cb9821e1d210e9e17e4a7e8df0f Mon Sep 17 00:00:00 2001 From: liuhongfeng <291117974@qq.com> Date: Wed, 22 Nov 2023 22:09:48 +0800 Subject: [PATCH 02/22] =?UTF-8?q?=E3=80=90=E4=BF=AE=E6=94=B9=E3=80=91urepo?= =?UTF-8?q?rt2=20=E9=9B=86=E6=88=90?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/report/ureport/index.vue | 220 +--------------------------- src/views/report/ureport/index2.vue | 219 +++++++++++++++++++++++++++ 2 files changed, 226 insertions(+), 213 deletions(-) create mode 100644 src/views/report/ureport/index2.vue diff --git a/src/views/report/ureport/index.vue b/src/views/report/ureport/index.vue index ef4986dc..8279ae99 100644 --- a/src/views/report/ureport/index.vue +++ b/src/views/report/ureport/index.vue @@ -1,219 +1,13 @@ - - - - - - - - - - - - - - - - - - 搜索 - 重置 - - 新增 - - - 导出 - - - + - - - - - - - - - - - - - - - - - 编辑 - - - 删除 - - - - - - - - - - + \ No newline at end of file +const BASE_URL = import.meta.env.VITE_BASE_URL +const src = ref(BASE_URL + '/ureport/designer?token=' + getAccessToken()) + diff --git a/src/views/report/ureport/index2.vue b/src/views/report/ureport/index2.vue new file mode 100644 index 00000000..ef4986dc --- /dev/null +++ b/src/views/report/ureport/index2.vue @@ -0,0 +1,219 @@ + + + + + + + + + + + + + + + + + + + + 搜索 + 重置 + + 新增 + + + 导出 + + + + + + + + + + + + + + + + + + + + + 编辑 + + + 删除 + + + + + + + + + + + + + \ No newline at end of file From 0b9cf35b17e17eb2aa283bd1f8ebfd059497e96d Mon Sep 17 00:00:00 2001 From: liuhongfeng <291117974@qq.com> Date: Sun, 3 Dec 2023 17:00:00 +0800 Subject: [PATCH 03/22] =?UTF-8?q?=E3=80=90=E4=BF=AE=E6=94=B9=E3=80=91urepo?= =?UTF-8?q?rt2=20=E9=9B=86=E6=88=90?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/report/ureport/index.ts | 78 +++++++++---------- ...reportFileForm.vue => UReportDataForm.vue} | 28 +++---- src/views/report/ureport/index.vue | 2 +- src/views/report/ureport/index2.vue | 33 ++++---- 4 files changed, 71 insertions(+), 70 deletions(-) rename src/views/report/ureport/{UreportFileForm.vue => UReportDataForm.vue} (78%) diff --git a/src/api/report/ureport/index.ts b/src/api/report/ureport/index.ts index c11ce960..2a9daea4 100644 --- a/src/api/report/ureport/index.ts +++ b/src/api/report/ureport/index.ts @@ -1,39 +1,39 @@ -import request from '@/config/axios' - -export interface UreportFileVO { - id: number - fileName: string - status: number - fileContent: string - remark: string -} - -// 查询Ureport2报表分页 -export const getUreportFilePage = async (params) => { - return await request.get({ url: `/report/ureport-file/page`, params }) -} - -// 查询Ureport2报表详情 -export const getUreportFile = async (id: number) => { - return await request.get({ url: `/report/ureport-file/get?id=` + id }) -} - -// 新增Ureport2报表 -export const createUreportFile = async (data: UreportFileVO) => { - return await request.post({ url: `/report/ureport-file/create`, data }) -} - -// 修改Ureport2报表 -export const updateUreportFile = async (data: UreportFileVO) => { - return await request.put({ url: `/report/ureport-file/update`, data }) -} - -// 删除Ureport2报表 -export const deleteUreportFile = async (id: number) => { - return await request.delete({ url: `/report/ureport-file/delete?id=` + id }) -} - -// 导出Ureport2报表 Excel -export const exportUreportFile = async (params) => { - return await request.download({ url: `/report/ureport-file/export-excel`, params }) -} \ No newline at end of file +import request from '@/config/axios' + +export interface UReportDataVO { + id: number + name: string + status: number + content: string + remark: string +} + +// 查询Ureport2报表分页 +export const getUReportDataPage = async (params) => { + return await request.get({ url: `/report/ureport-data/page`, params }) +} + +// 查询Ureport2报表详情 +export const getUReportData = async (id: number) => { + return await request.get({ url: `/report/ureport-data/get?id=` + id }) +} + +// 新增Ureport2报表 +export const createUReportData = async (data: UReportDataVO) => { + return await request.post({ url: `/report/ureport-data/create`, data }) +} + +// 修改Ureport2报表 +export const updateUReportData = async (data: UReportDataVO) => { + return await request.put({ url: `/report/ureport-data/update`, data }) +} + +// 删除Ureport2报表 +export const deleteUReportData = async (id: number) => { + return await request.delete({ url: `/report/ureport-data/delete?id=` + id }) +} + +// 导出Ureport2报表 Excel +export const exportUReportData = async (params) => { + return await request.download({ url: `/report/ureport-data/export-excel`, params }) +} diff --git a/src/views/report/ureport/UreportFileForm.vue b/src/views/report/ureport/UReportDataForm.vue similarity index 78% rename from src/views/report/ureport/UreportFileForm.vue rename to src/views/report/ureport/UReportDataForm.vue index 7d71055c..0711f3c5 100644 --- a/src/views/report/ureport/UreportFileForm.vue +++ b/src/views/report/ureport/UReportDataForm.vue @@ -7,8 +7,8 @@ label-width="100px" v-loading="formLoading" > - - + + @@ -20,8 +20,8 @@ /> - - + + @@ -35,7 +35,7 @@ \ No newline at end of file + From dee8215da238e3c7d15be59729b5303c8b72d29e Mon Sep 17 00:00:00 2001 From: ZENGlei11350 <75881401@qq.com> Date: Mon, 4 Dec 2023 13:42:18 +0800 Subject: [PATCH 04/22] =?UTF-8?q?=E4=BC=98=E5=8C=96=EF=BC=9A=E6=B7=BB?= =?UTF-8?q?=E5=8A=A0=E5=95=86=E5=93=81=E6=97=B60=E5=BA=93=E5=AD=98?= =?UTF-8?q?=E5=95=86=E5=93=81=E6=97=A0=E6=B3=95=E4=BF=9D=E5=AD=98=E6=94=B9?= =?UTF-8?q?=E4=B8=BA=E5=8F=AF=E4=BB=A5=E4=BF=9D=E5=AD=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .vscode/settings.json | 2 +- src/views/mall/product/spu/form/BasicInfoForm.vue | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.vscode/settings.json b/.vscode/settings.json index 34310929..54be7d8c 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -83,7 +83,7 @@ "editor.defaultFormatter": "esbenp.prettier-vscode" }, "editor.codeActionsOnSave": { - "source.fixAll.eslint": true + "source.fixAll.eslint": "explicit" }, "[vue]": { "editor.defaultFormatter": "rvest.vs-code-prettier-eslint" diff --git a/src/views/mall/product/spu/form/BasicInfoForm.vue b/src/views/mall/product/spu/form/BasicInfoForm.vue index 567205be..f7da536d 100644 --- a/src/views/mall/product/spu/form/BasicInfoForm.vue +++ b/src/views/mall/product/spu/form/BasicInfoForm.vue @@ -197,7 +197,7 @@ defineOptions({ name: 'ProductSpuBasicInfoForm' }) const ruleConfig: RuleConfig[] = [ { name: 'stock', - rule: (arg) => arg >= 1, + rule: (arg) => arg >= 0, message: '商品库存必须大于等于 1 !!!' }, { @@ -213,7 +213,7 @@ const ruleConfig: RuleConfig[] = [ { name: 'costPrice', rule: (arg) => arg >= 0.01, - message: '商品成本价格必须大于等于 0.01 元!!!' + message: '商品成本价格必须大于等于 0.00 元!!!' } ] From 59c66707753f81d369d952caee9ebc65d29bc472 Mon Sep 17 00:00:00 2001 From: puhui999 Date: Thu, 14 Dec 2023 18:18:55 +0800 Subject: [PATCH 05/22] =?UTF-8?q?feat=EF=BC=9A=E6=96=B0=E5=A2=9E=E5=85=AC?= =?UTF-8?q?=E5=85=B1=E6=93=8D=E4=BD=9C=E6=97=A5=E5=BF=97=E8=AF=A6=E6=83=85?= =?UTF-8?q?=E7=BB=84=E4=BB=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/system/operatelog/index.ts | 25 +++ src/components/OperateLogV2/index.ts | 3 + .../OperateLogV2/src/OperateLogV2.vue | 170 ++++++++++++++++++ 3 files changed, 198 insertions(+) create mode 100644 src/components/OperateLogV2/index.ts create mode 100644 src/components/OperateLogV2/src/OperateLogV2.vue diff --git a/src/api/system/operatelog/index.ts b/src/api/system/operatelog/index.ts index 848a5333..cb47d18c 100644 --- a/src/api/system/operatelog/index.ts +++ b/src/api/system/operatelog/index.ts @@ -23,6 +23,31 @@ export type OperateLogVO = { resultData: string } +export type OperateLogV2VO = { + id: number + userNickname: string + traceId: string + userType: number + userId: number + module: string + name: string + bizId: number + content: string + extra: string + requestMethod: string + requestUrl: string + userIp: string + userAgent: string + creator: string + creatorName: string + createTime: Date + // 数据扩展-渲染时使用 + title: string // 操作标题(如果为空则取 name 值) + colSize: number // 变更记录行数 + contentStrList: string[] + tagsContentList: string[] +} + // 查询操作日志列表 export const getOperateLogPage = (params: PageParam) => { return request.get({ url: '/system/operate-log/page', params }) diff --git a/src/components/OperateLogV2/index.ts b/src/components/OperateLogV2/index.ts new file mode 100644 index 00000000..f69c222e --- /dev/null +++ b/src/components/OperateLogV2/index.ts @@ -0,0 +1,3 @@ +import OperateLogV2 from './src/OperateLogV2.vue' + +export { OperateLogV2 } diff --git a/src/components/OperateLogV2/src/OperateLogV2.vue b/src/components/OperateLogV2/src/OperateLogV2.vue new file mode 100644 index 00000000..dd9e8cdf --- /dev/null +++ b/src/components/OperateLogV2/src/OperateLogV2.vue @@ -0,0 +1,170 @@ + + + + + + + + ======================= + {{ log.creatorName }} + {{ log.title }} + ======================= + + + + + + + {{ tagVal }} + {{ log.contentStrList[index2] }} + + + + + + + + {{ getDictLabel(DICT_TYPE.USER_TYPE, log.userType)[0] }} + + + + + + + + + + From 455688eaa88ba8f3754a26cd6d28217758f81eeb Mon Sep 17 00:00:00 2001 From: puhui999 Date: Thu, 14 Dec 2023 18:19:34 +0800 Subject: [PATCH 06/22] =?UTF-8?q?crm-=E5=AE=A2=E6=88=B7=EF=BC=9A=E9=9B=86?= =?UTF-8?q?=E6=88=90=E6=93=8D=E4=BD=9C=E6=97=A5=E5=BF=97=E8=AF=A6=E6=83=85?= =?UTF-8?q?=E7=BB=84=E4=BB=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/crm/customer/index.ts | 5 ++++ src/views/crm/customer/CustomerForm.vue | 18 ++++++------- .../customer/detail/CustomerDetailsHeader.vue | 9 ++++--- .../customer/detail/CustomerDetailsInfo.vue | 25 ++++++++++--------- src/views/crm/customer/detail/index.vue | 18 ++++++++++--- 5 files changed, 48 insertions(+), 27 deletions(-) diff --git a/src/api/crm/customer/index.ts b/src/api/crm/customer/index.ts index 5ef43950..bedb61f5 100644 --- a/src/api/crm/customer/index.ts +++ b/src/api/crm/customer/index.ts @@ -67,3 +67,8 @@ export const exportCustomer = async (params) => { export const queryAllList = async () => { return await request.get({ url: `/crm/customer/query-all-list` }) } + +// 查询客户操作日志 +export const getOperateLog = async (id: number) => { + return await request.get({ url: `/crm/customer/operate-log?id=` + id }) +} diff --git a/src/views/crm/customer/CustomerForm.vue b/src/views/crm/customer/CustomerForm.vue index 99f7e858..1730ef45 100644 --- a/src/views/crm/customer/CustomerForm.vue +++ b/src/views/crm/customer/CustomerForm.vue @@ -1,11 +1,11 @@ - + @@ -17,7 +17,7 @@ @@ -139,13 +139,13 @@ - 确 定 + 确 定 取 消 - - + diff --git a/src/views/crm/customer/detail/index.vue b/src/views/crm/customer/detail/index.vue index f21a6ac3..626d30ae 100644 --- a/src/views/crm/customer/detail/index.vue +++ b/src/views/crm/customer/detail/index.vue @@ -5,7 +5,9 @@ - TODO 待开发 + + + @@ -38,24 +40,34 @@ import ReceivableList from '@/views/crm/receivable/components/ReceivableList.vue import ReceivablePlanList from '@/views/crm/receivable/plan/components/ReceivablePlanList.vue' // 回款计划列表 import PermissionList from '@/views/crm/permission/components/PermissionList.vue' // 团队成员列表(权限) import { BizTypeEnum } from '@/api/crm/permission' +import { OperateLogV2VO } from '@/api/system/operatelog' defineOptions({ name: 'CrmCustomerDetail' }) const route = useRoute() const id = Number(route.params.id) // 客户编号 const loading = ref(true) // 加载中 - /** 获取详情 */ const customer = ref({} as CustomerApi.CustomerVO) // 客户详情 const getCustomer = async (id: number) => { loading.value = true try { customer.value = await CustomerApi.getCustomer(id) + await getOperateLog(id) } finally { loading.value = false } } - +const logList = ref([]) // 操作日志列表 +/** + * 获取操作日志 + */ +const getOperateLog = async (customerId: number) => { + if (!customerId) { + return + } + logList.value = await CustomerApi.getOperateLog(customerId) +} /** 初始化 */ const { delView } = useTagsViewStore() // 视图操作 const { currentRoute } = useRouter() // 路由 From a1fd3afc3226889617b48591dde42927bd9f502b Mon Sep 17 00:00:00 2001 From: zyna Date: Sun, 17 Dec 2023 17:34:32 +0800 Subject: [PATCH 07/22] =?UTF-8?q?crm=E8=81=94=E7=B3=BB=E4=BA=BA=E5=95=86?= =?UTF-8?q?=E6=9C=BA=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/crm/business/index.ts | 12 +++++ src/api/crm/contact/index.ts | 16 +++++- src/api/crm/contactbusinesslink/index.ts | 47 ------------------ src/views/crm/business/BusinessForm.vue | 3 +- .../components/BusinessForContactLink.vue} | 49 +++++++++---------- .../crm/business/components/BusinessList.vue | 4 ++ .../components/BusinessListByContact.vue | 35 +++++++------ .../contact/detail/ContactDetailsHeader.vue | 12 +---- src/views/crm/contact/detail/index.vue | 4 +- 9 files changed, 75 insertions(+), 107 deletions(-) delete mode 100644 src/api/crm/contactbusinesslink/index.ts rename src/views/crm/{contactBusinessLink/components/BusinessLinkContactList.vue => business/components/BusinessForContactLink.vue} (79%) rename src/views/crm/{contactBusinessLink => business}/components/BusinessListByContact.vue (78%) diff --git a/src/api/crm/business/index.ts b/src/api/crm/business/index.ts index 8af2a697..41ec35d8 100644 --- a/src/api/crm/business/index.ts +++ b/src/api/crm/business/index.ts @@ -1,3 +1,10 @@ +/* + * @Author: zyna + * @Date: 2023-12-02 13:08:56 + * @LastEditTime: 2023-12-17 16:28:20 + * @FilePath: \yudao-ui-admin-vue3\src\api\crm\business\index.ts + * @Description: + */ import request from '@/config/axios' export interface BusinessVO { @@ -55,3 +62,8 @@ export const deleteBusiness = async (id: number) => { export const exportBusiness = async (params) => { return await request.download({ url: `/crm/business/export-excel`, params }) } + +//联系人关联商机列表 +export const getBusinessPageByContact = async (params) => { + return await request.get({ url: `/crm/business/page-by-contact`, params }) +} diff --git a/src/api/crm/contact/index.ts b/src/api/crm/contact/index.ts index f983cb12..ac0bb112 100644 --- a/src/api/crm/contact/index.ts +++ b/src/api/crm/contact/index.ts @@ -25,7 +25,11 @@ export interface ContactVO { areaName: string ownerUserName: string } - +export interface ContactBusinessLinkVO { + id: number + contactId: number + businessId: number +} // 查询 CRM 联系人列表 export const getContactPage = async (params) => { return await request.get({ url: `/crm/contact/page`, params }) @@ -65,3 +69,13 @@ export const exportContact = async (params) => { export const getSimpleContactList = async () => { return await request.get({ url: `/crm/contact/simple-all-list` }) } + +//批量新增联系人商机关联 +export const createContactBusinessLinkBatch = async (data: ContactBusinessLinkVO[]) => { + return await request.post({ url: `/crm/contact/create-batch-business`, data }) +} + +//解除联系人商机关联 +export const deleteContactBusinessLink = async (data: ContactBusinessLinkVO) => { + return await request.delete({ url: `/crm/contact/delete-batch-business`, data }) +} \ No newline at end of file diff --git a/src/api/crm/contactbusinesslink/index.ts b/src/api/crm/contactbusinesslink/index.ts deleted file mode 100644 index 45935abe..00000000 --- a/src/api/crm/contactbusinesslink/index.ts +++ /dev/null @@ -1,47 +0,0 @@ -import request from '@/config/axios' - -export interface ContactBusinessLinkVO { - id: number - contactId: number - businessId: number -} - -// 查询联系人商机关联分页 -export const getContactBusinessLinkPage = async (params) => { - return await request.get({ url: `/crm/contact-business-link/page`, params }) -} - -// 查询联系人商机关联详情 -export const getContactBusinessLink = async (id: number) => { - return await request.get({ url: `/crm/contact-business-link/get?id=` + id }) -} - -// 新增联系人商机关联 -export const createContactBusinessLink = async (data: ContactBusinessLinkVO) => { - return await request.post({ url: `/crm/contact-business-link/create`, data }) -} - -// 修改联系人商机关联 -export const updateContactBusinessLink = async (data: ContactBusinessLinkVO) => { - return await request.put({ url: `/crm/contact-business-link/update`, data }) -} - -// 删除联系人商机关联 -export const deleteContactBusinessLink = async (data: ContactBusinessLinkVO) => { - return await request.delete({ url: `/crm/contact-business-link/delete-batch`, data }) -} - -// 导出联系人商机关联 Excel -export const exportContactBusinessLink = async (params) => { - return await request.download({ url: `/crm/contact-business-link/export-excel`, params }) -} - -//批量新增联系人商机关联 -export const createContactBusinessLinkBatch = async (data: ContactBusinessLinkVO[]) => { - return await request.post({ url: `/crm/contact-business-link/create-batch`, data }) -} -// 查询联系人关联商机列表 -export const getBusinessByContactPage = async (params) => { - return await request.get({ url: `/crm/contact-business-link/page-by-contact`, params }) -} -// TODO @zyna:根据后端,调整下请求 diff --git a/src/views/crm/business/BusinessForm.vue b/src/views/crm/business/BusinessForm.vue index 53f5cb8d..d2c10b35 100644 --- a/src/views/crm/business/BusinessForm.vue +++ b/src/views/crm/business/BusinessForm.vue @@ -242,7 +242,8 @@ const queryParams = reactive({ mobile: null, industryId: null, level: null, - source: null + source: null, + pool:false }) // 选择客户 const showCustomer = ref(false) diff --git a/src/views/crm/contactBusinessLink/components/BusinessLinkContactList.vue b/src/views/crm/business/components/BusinessForContactLink.vue similarity index 79% rename from src/views/crm/contactBusinessLink/components/BusinessLinkContactList.vue rename to src/views/crm/business/components/BusinessForContactLink.vue index 5d62b1d0..4a8a401a 100644 --- a/src/views/crm/contactBusinessLink/components/BusinessLinkContactList.vue +++ b/src/views/crm/business/components/BusinessForContactLink.vue @@ -29,7 +29,6 @@ -