From 0ada34de163d477b4286b474b1e056a83025004b Mon Sep 17 00:00:00 2001 From: puhui999 Date: Sat, 27 Jan 2024 23:11:43 +0800 Subject: [PATCH] =?UTF-8?q?CRM-=E5=90=88=E5=90=8C=EF=BC=9A=E5=AE=8C?= =?UTF-8?q?=E5=96=84=E5=90=88=E5=90=8C=E8=A1=A8=E5=8D=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit (cherry picked from commit ed94205fa7c0fa3f0fcaae88d0a59e727a625f0f) --- src/api/crm/business/index.ts | 6 + src/api/crm/contract/index.ts | 2 + src/api/crm/product/index.ts | 6 + src/components/Table/index.ts | 3 +- src/components/Table/src/TableSelectForm.vue | 90 ++++++ src/views/crm/contract/ContractForm.vue | 271 ++++++++++-------- .../crm/contract/components/ProductList.vue | 112 ++++++++ 7 files changed, 375 insertions(+), 115 deletions(-) create mode 100644 src/components/Table/src/TableSelectForm.vue create mode 100644 src/views/crm/contract/components/ProductList.vue diff --git a/src/api/crm/business/index.ts b/src/api/crm/business/index.ts index 810ec6e9..314eb389 100644 --- a/src/api/crm/business/index.ts +++ b/src/api/crm/business/index.ts @@ -1,4 +1,5 @@ import request from '@/config/axios' +import { TransferReqVO } from '@/api/crm/customer' export interface BusinessVO { id: number @@ -70,3 +71,8 @@ export const getBusinessPageByContact = async (params) => { export const getBusinessListByIds = async (val: number[]) => { return await request.get({ url: '/crm/business/list-by-ids', params: { ids: val.join(',') } }) } + +// 商机转移 +export const transfer = async (data: TransferReqVO) => { + return await request.put({ url: '/crm/business/transfer', data }) +} diff --git a/src/api/crm/contract/index.ts b/src/api/crm/contract/index.ts index 3498e843..527eb5c7 100644 --- a/src/api/crm/contract/index.ts +++ b/src/api/crm/contract/index.ts @@ -1,4 +1,5 @@ import request from '@/config/axios' +import { ProductExpandVO } from '@/api/crm/product' export interface ContractVO { id: number @@ -20,6 +21,7 @@ export interface ContractVO { signUserId: number contactLastTime: Date remark: string + productItems: ProductExpandVO[] } // 查询 CRM 合同列表 diff --git a/src/api/crm/product/index.ts b/src/api/crm/product/index.ts index c6d5dfdb..e6508fb4 100644 --- a/src/api/crm/product/index.ts +++ b/src/api/crm/product/index.ts @@ -12,6 +12,12 @@ export interface ProductVO { ownerUserId: number } +export interface ProductExpandVO extends ProductVO { + count: number + discountPercent: number + totalPrice: number +} + // 查询产品列表 export const getProductPage = async (params) => { return await request.get({ url: `/crm/product/page`, params }) diff --git a/src/components/Table/index.ts b/src/components/Table/index.ts index 689f64a8..9f893171 100644 --- a/src/components/Table/index.ts +++ b/src/components/Table/index.ts @@ -1,6 +1,7 @@ import Table from './src/Table.vue' import { ElTable } from 'element-plus' import { TableSetPropsType } from '@/types/table' +import TableSelectForm from './src/TableSelectForm.vue' export interface TableExpose { setProps: (props: Recordable) => void @@ -9,4 +10,4 @@ export interface TableExpose { elTableRef: ComponentRef } -export { Table } +export { Table, TableSelectForm } diff --git a/src/components/Table/src/TableSelectForm.vue b/src/components/Table/src/TableSelectForm.vue new file mode 100644 index 00000000..55b2855e --- /dev/null +++ b/src/components/Table/src/TableSelectForm.vue @@ -0,0 +1,90 @@ + + + diff --git a/src/views/crm/contract/ContractForm.vue b/src/views/crm/contract/ContractForm.vue index 5d5578f9..a9271ce5 100644 --- a/src/views/crm/contract/ContractForm.vue +++ b/src/views/crm/contract/ContractForm.vue @@ -1,54 +1,108 @@ - diff --git a/src/views/crm/contract/components/ProductList.vue b/src/views/crm/contract/components/ProductList.vue new file mode 100644 index 00000000..6c4ca350 --- /dev/null +++ b/src/views/crm/contract/components/ProductList.vue @@ -0,0 +1,112 @@ + + +