diff --git a/src/api/crm/contract/index.ts b/src/api/crm/contract/index.ts index bf438323..3498e843 100644 --- a/src/api/crm/contract/index.ts +++ b/src/api/crm/contract/index.ts @@ -22,32 +22,37 @@ export interface ContractVO { remark: string } -// 查询合同列表 +// 查询 CRM 合同列表 export const getContractPage = async (params) => { return await request.get({ url: `/crm/contract/page`, params }) } -// 查询合同详情 +// 查询 CRM 联系人列表,基于指定客户 +export const getContractPageByCustomer = async (params: any) => { + return await request.get({ url: `/crm/contract/page-by-customer`, params }) +} + +// 查询 CRM 合同详情 export const getContract = async (id: number) => { return await request.get({ url: `/crm/contract/get?id=` + id }) } -// 新增合同 +// 新增 CRM 合同 export const createContract = async (data: ContractVO) => { return await request.post({ url: `/crm/contract/create`, data }) } -// 修改合同 +// 修改 CRM 合同 export const updateContract = async (data: ContractVO) => { return await request.put({ url: `/crm/contract/update`, data }) } -// 删除合同 +// 删除 CRM 合同 export const deleteContract = async (id: number) => { return await request.delete({ url: `/crm/contract/delete?id=` + id }) } -// 导出合同 Excel +// 导出 CRM 合同 Excel export const exportContract = async (params) => { return await request.download({ url: `/crm/contract/export-excel`, params }) } diff --git a/src/api/crm/permission/index.ts b/src/api/crm/permission/index.ts index a54fb025..c221b089 100644 --- a/src/api/crm/permission/index.ts +++ b/src/api/crm/permission/index.ts @@ -20,7 +20,7 @@ export interface PermissionVO { export enum BizTypeEnum { CRM_LEADS = 1, // 线索 CRM_CUSTOMER = 2, // 客户 - CRM_CONTACTS = 3, // 联系人 + CRM_CONTACT = 3, // 联系人 CRM_BUSINESS = 5, // 商机 CRM_CONTRACT = 6 // 合同 } diff --git a/src/utils/dict.ts b/src/utils/dict.ts index 22bb3f88..f82a28b8 100644 --- a/src/utils/dict.ts +++ b/src/utils/dict.ts @@ -190,14 +190,12 @@ export enum DICT_TYPE { PROMOTION_BANNER_POSITION = 'promotion_banner_position', // banner 定位 // ========== CRM - 客户管理模块 ========== - CRM_RECEIVABLE_CHECK_STATUS = 'crm_receivable_check_status', + CRM_AUDIT_STATUS = 'crm_audit_status', // CRM 审批状态 + CRM_BIZ_TYPE = 'crm_biz_type', // CRM 业务类型 CRM_RETURN_TYPE = 'crm_return_type', CRM_CUSTOMER_INDUSTRY = 'crm_customer_industry', CRM_CUSTOMER_LEVEL = 'crm_customer_level', CRM_CUSTOMER_SOURCE = 'crm_customer_source', CRM_PRODUCT_STATUS = 'crm_product_status', - - // ========== CRM - 数据权限模块 ========== - CRM_BIZ_TYPE = 'crm_biz_type', // CRM 业务类型 CRM_PERMISSION_LEVEL = 'crm_permission_level' // CRM 数据权限的级别 } diff --git a/src/views/crm/contact/components/ContactList.vue b/src/views/crm/contact/components/ContactList.vue index f83b3bc0..8aa40960 100644 --- a/src/views/crm/contact/components/ContactList.vue +++ b/src/views/crm/contact/components/ContactList.vue @@ -1,7 +1,7 @@ - - - - + diff --git a/src/views/crm/contract/contract.data.ts b/src/views/crm/contract/contract.data.ts deleted file mode 100644 index 07458c24..00000000 --- a/src/views/crm/contract/contract.data.ts +++ /dev/null @@ -1,228 +0,0 @@ -import type { CrudSchema } from '@/hooks/web/useCrudSchemas' -import { dateFormatter } from '@/utils/formatTime' - -// 表单校验 -export const rules = reactive({ - name: [required] -}) - -// TODO @dbh52:不使用 crud 模式哈,使用标准的 ep 代码哈;主要后续 crud schema 可能会改 -// CrudSchema https://doc.iocoder.cn/vue3/crud-schema/ -const crudSchemas = reactive([ - { - label: '合同编号', - field: 'id', - isForm: false - }, - { - label: '合同名称', - field: 'name', - isSearch: true - }, - { - label: '客户编号', - field: 'customerId', - isSearch: true, - form: { - component: 'InputNumber', - value: 0 - } - }, - { - label: '商机编号', - field: 'businessId', - isSearch: true, - form: { - component: 'InputNumber', - value: 0 - } - }, - { - label: '工作流编号', - field: 'processInstanceId', - isSearch: true, - form: { - component: 'InputNumber', - value: 0 - } - }, - { - label: '下单日期', - field: 'orderDate', - formatter: dateFormatter, - isSearch: true, - search: { - component: 'DatePicker', - componentProps: { - valueFormat: 'YYYY-MM-DD HH:mm:ss', - type: 'daterange', - defaultTime: [new Date('1 00:00:00'), new Date('1 23:59:59')] - } - }, - form: { - component: 'DatePicker', - componentProps: { - type: 'datetime', - valueFormat: 'x' - } - } - }, - { - label: '负责人的用户编号', - field: 'ownerUserId', - isSearch: true, - form: { - component: 'InputNumber', - value: 0 - } - }, - { - label: '创建时间', - field: 'createTime', - formatter: dateFormatter, - isSearch: true, - search: { - component: 'DatePicker', - componentProps: { - valueFormat: 'YYYY-MM-DD HH:mm:ss', - type: 'daterange', - defaultTime: [new Date('1 00:00:00'), new Date('1 23:59:59')] - } - }, - isForm: false - }, - { - label: '合同编号', - field: 'no', - isSearch: true - }, - { - label: '开始时间', - field: 'startTime', - formatter: dateFormatter, - isSearch: true, - search: { - component: 'DatePicker', - componentProps: { - valueFormat: 'YYYY-MM-DD HH:mm:ss', - type: 'daterange', - defaultTime: [new Date('1 00:00:00'), new Date('1 23:59:59')] - } - }, - form: { - component: 'DatePicker', - componentProps: { - type: 'datetime', - valueFormat: 'x' - } - } - }, - { - label: '结束时间', - field: 'endTime', - formatter: dateFormatter, - isSearch: true, - search: { - component: 'DatePicker', - componentProps: { - valueFormat: 'YYYY-MM-DD HH:mm:ss', - type: 'daterange', - defaultTime: [new Date('1 00:00:00'), new Date('1 23:59:59')] - } - }, - form: { - component: 'DatePicker', - componentProps: { - type: 'datetime', - valueFormat: 'x' - } - } - }, - { - label: '合同金额', - field: 'price', - isSearch: true, - form: { - component: 'InputNumber', - value: 0 - } - }, - { - label: '整单折扣', - field: 'discountPercent', - isSearch: true, - form: { - component: 'InputNumber', - value: 0 - } - }, - { - label: '产品总金额', - field: 'productPrice', - isSearch: true, - form: { - component: 'InputNumber', - value: 0 - } - }, - { - label: '只读权限的用户编号数组', - field: 'roUserIds', - isSearch: true - }, - { - label: '读写权限的用户编号数组', - field: 'rwUserIds', - isSearch: true - }, - { - label: '联系人编号', - field: 'contactId', - isSearch: true, - form: { - component: 'InputNumber', - value: 0 - } - }, - { - label: '备注', - field: 'remark', - isSearch: true - }, - { - label: '公司签约人', - field: 'signUserId', - isSearch: true, - form: { - component: 'InputNumber', - value: 0 - } - }, - { - label: '最后跟进时间', - field: 'contactLastTime', - formatter: dateFormatter, - isSearch: true, - search: { - component: 'DatePicker', - componentProps: { - valueFormat: 'YYYY-MM-DD HH:mm:ss', - type: 'daterange', - defaultTime: [new Date('1 00:00:00'), new Date('1 23:59:59')] - } - }, - form: { - component: 'DatePicker', - componentProps: { - type: 'datetime', - valueFormat: 'x' - } - } - }, - { - label: '操作', - field: 'action', - isForm: false - } -]) -export const { allSchemas } = useCrudSchemas(crudSchemas) diff --git a/src/views/crm/contract/index.vue b/src/views/crm/contract/index.vue index 1670c418..26ff403a 100644 --- a/src/views/crm/contract/index.vue +++ b/src/views/crm/contract/index.vue @@ -8,44 +8,6 @@ :inline="true" label-width="68px" > - - - - - - - - - - - - + + + 搜索 重置 @@ -75,6 +46,7 @@ + @@ -125,7 +97,6 @@ width="180px" /> - -