From 2700b08c6978dc2f921b4b4f8088e315dc7e8084 Mon Sep 17 00:00:00 2001 From: ljlleo Date: Fri, 24 Nov 2023 14:21:21 +0800 Subject: [PATCH 01/11] =?UTF-8?q?=E5=95=86=E6=9C=BA=E3=80=81=E5=95=86?= =?UTF-8?q?=E6=9C=BA=E7=8A=B6=E6=80=81=E7=B1=BB=E5=9E=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/crm/business/index.ts | 52 ++++ src/api/crm/businessStatusType/index.ts | 48 +++ src/views/crm/business/BusinessForm.vue | 281 ++++++++++++++++++ src/views/crm/business/index.vue | 207 +++++++++++++ .../BusinessStatusTypeForm.vue | 173 +++++++++++ src/views/crm/businessStatusType/index.vue | 171 +++++++++++ 6 files changed, 932 insertions(+) create mode 100644 src/api/crm/business/index.ts create mode 100644 src/api/crm/businessStatusType/index.ts create mode 100644 src/views/crm/business/BusinessForm.vue create mode 100644 src/views/crm/business/index.vue create mode 100644 src/views/crm/businessStatusType/BusinessStatusTypeForm.vue create mode 100644 src/views/crm/businessStatusType/index.vue diff --git a/src/api/crm/business/index.ts b/src/api/crm/business/index.ts new file mode 100644 index 00000000..89cd871f --- /dev/null +++ b/src/api/crm/business/index.ts @@ -0,0 +1,52 @@ +import request from '@/config/axios' + +export interface BusinessVO { + id: number + name: string + statusTypeId: number + statusId: number + contactNextTime: Date + customerId: number + dealTime: Date + price: number + discountPercent: number + productPrice: number + remark: string + ownerUserId: number + roUserIds: string + rwUserIds: string + endStatus: number + endRemark: string + contactLastTime: Date + followUpStatus: number +} + +// 查询商机列表 +export const getBusinessPage = async (params) => { + return await request.get({ url: `/crm/business/page`, params }) +} + +// 查询商机详情 +export const getBusiness = async (id: number) => { + return await request.get({ url: `/crm/business/get?id=` + id }) +} + +// 新增商机 +export const createBusiness = async (data: BusinessVO) => { + return await request.post({ url: `/crm/business/create`, data }) +} + +// 修改商机 +export const updateBusiness = async (data: BusinessVO) => { + return await request.put({ url: `/crm/business/update`, data }) +} + +// 删除商机 +export const deleteBusiness = async (id: number) => { + return await request.delete({ url: `/crm/business/delete?id=` + id }) +} + +// 导出商机 Excel +export const exportBusiness = async (params) => { + return await request.download({ url: `/crm/business/export-excel`, params }) +} diff --git a/src/api/crm/businessStatusType/index.ts b/src/api/crm/businessStatusType/index.ts new file mode 100644 index 00000000..cc4b46aa --- /dev/null +++ b/src/api/crm/businessStatusType/index.ts @@ -0,0 +1,48 @@ +import request from '@/config/axios' + +export interface BusinessStatusTypeVO { + id: number + name: string + deptIds: number[] + status: boolean +} + +// 查询商机状态类型列表 +export const getBusinessStatusTypePage = async (params) => { + return await request.get({ url: `/crm/business-status-type/page`, params }) +} + +// 查询商机状态类型详情 +export const getBusinessStatusType = async (id: number) => { + return await request.get({ url: `/crm/business-status-type/get?id=` + id }) +} + +// 新增商机状态类型 +export const createBusinessStatusType = async (data: BusinessStatusTypeVO) => { + return await request.post({ url: `/crm/business-status-type/create`, data }) +} + +// 修改商机状态类型 +export const updateBusinessStatusType = async (data: BusinessStatusTypeVO) => { + return await request.put({ url: `/crm/business-status-type/update`, data }) +} + +// 删除商机状态类型 +export const deleteBusinessStatusType = async (id: number) => { + return await request.delete({ url: `/crm/business-status-type/delete?id=` + id }) +} + +// 导出商机状态类型 Excel +export const exportBusinessStatusType = async (params) => { + return await request.download({ url: `/crm/business-status-type/export-excel`, params }) +} + +// 获取商机状态类型信息列表 +export const getBusinessStatusTypeList = async () => { + return await request.get({ url: `/crm/business-status-type/get-simple-list` }) +} + +// 根据类型ID获取商机状态信息列表 +export const getBusinessStatusListByTypeId = async (typeId: number) => { + return await request.get({ url: `/crm/business-status-type/get-status-list?typeId=` + typeId }) +} diff --git a/src/views/crm/business/BusinessForm.vue b/src/views/crm/business/BusinessForm.vue new file mode 100644 index 00000000..04f1cf5d --- /dev/null +++ b/src/views/crm/business/BusinessForm.vue @@ -0,0 +1,281 @@ + + diff --git a/src/views/crm/business/index.vue b/src/views/crm/business/index.vue new file mode 100644 index 00000000..c1c63fa1 --- /dev/null +++ b/src/views/crm/business/index.vue @@ -0,0 +1,207 @@ + + + diff --git a/src/views/crm/businessStatusType/BusinessStatusTypeForm.vue b/src/views/crm/businessStatusType/BusinessStatusTypeForm.vue new file mode 100644 index 00000000..2ba71128 --- /dev/null +++ b/src/views/crm/businessStatusType/BusinessStatusTypeForm.vue @@ -0,0 +1,173 @@ + + diff --git a/src/views/crm/businessStatusType/index.vue b/src/views/crm/businessStatusType/index.vue new file mode 100644 index 00000000..7b2725f3 --- /dev/null +++ b/src/views/crm/businessStatusType/index.vue @@ -0,0 +1,171 @@ + + + From eb97447bb764b49e2d88f83e8a6ebd0b9c37c127 Mon Sep 17 00:00:00 2001 From: YunaiV Date: Sat, 25 Nov 2023 10:42:44 +0800 Subject: [PATCH 02/11] =?UTF-8?q?crm=EF=BC=9Acode=20review=20=E6=88=90?= =?UTF-8?q?=E5=91=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/utils/dict.ts | 280 +++++++++--------- .../crm/components/CrmPermissionList.vue | 32 +- 2 files changed, 153 insertions(+), 159 deletions(-) diff --git a/src/utils/dict.ts b/src/utils/dict.ts index e551a5ef..ac4b52e3 100644 --- a/src/utils/dict.ts +++ b/src/utils/dict.ts @@ -1,8 +1,8 @@ /** * 数据字典工具类 */ -import {useDictStoreWithOut} from '@/store/modules/dict' -import {ElementPlusInfoType} from '@/types/elementPlus' +import { useDictStoreWithOut } from '@/store/modules/dict' +import { ElementPlusInfoType } from '@/types/elementPlus' const dictStore = useDictStoreWithOut() @@ -13,51 +13,51 @@ const dictStore = useDictStoreWithOut() * @returns {*|Array} 数据字典数组 */ export interface DictDataType { - dictType: string - label: string - value: string | number | boolean - colorType: ElementPlusInfoType | '' - cssClass: string + dictType: string + label: string + value: string | number | boolean + colorType: ElementPlusInfoType | '' + cssClass: string } export const getDictOptions = (dictType: string) => { - return dictStore.getDictByType(dictType) || [] + return dictStore.getDictByType(dictType) || [] } export const getIntDictOptions = (dictType: string): DictDataType[] => { - const dictOption: DictDataType[] = [] - const dictOptions: DictDataType[] = getDictOptions(dictType) - dictOptions.forEach((dict: DictDataType) => { - dictOption.push({ - ...dict, - value: parseInt(dict.value + '') - }) + const dictOption: DictDataType[] = [] + const dictOptions: DictDataType[] = getDictOptions(dictType) + dictOptions.forEach((dict: DictDataType) => { + dictOption.push({ + ...dict, + value: parseInt(dict.value + '') }) - return dictOption + }) + return dictOption } export const getStrDictOptions = (dictType: string) => { - const dictOption: DictDataType[] = [] - const dictOptions: DictDataType[] = getDictOptions(dictType) - dictOptions.forEach((dict: DictDataType) => { - dictOption.push({ - ...dict, - value: dict.value + '' - }) + const dictOption: DictDataType[] = [] + const dictOptions: DictDataType[] = getDictOptions(dictType) + dictOptions.forEach((dict: DictDataType) => { + dictOption.push({ + ...dict, + value: dict.value + '' }) - return dictOption + }) + return dictOption } export const getBoolDictOptions = (dictType: string) => { - const dictOption: DictDataType[] = [] - const dictOptions: DictDataType[] = getDictOptions(dictType) - dictOptions.forEach((dict: DictDataType) => { - dictOption.push({ - ...dict, - value: dict.value + '' === 'true' - }) + const dictOption: DictDataType[] = [] + const dictOptions: DictDataType[] = getDictOptions(dictType) + dictOptions.forEach((dict: DictDataType) => { + dictOption.push({ + ...dict, + value: dict.value + '' === 'true' }) - return dictOption + }) + return dictOption } /** @@ -67,12 +67,12 @@ export const getBoolDictOptions = (dictType: string) => { * @return DictDataType 字典对象 */ export const getDictObj = (dictType: string, value: any): DictDataType | undefined => { - const dictOptions: DictDataType[] = getDictOptions(dictType) - for (const dict of dictOptions) { - if (dict.value === value + '') { - return dict - } + const dictOptions: DictDataType[] = getDictOptions(dictType) + for (const dict of dictOptions) { + if (dict.value === value + '') { + return dict } + } } /** @@ -83,121 +83,121 @@ export const getDictObj = (dictType: string, value: any): DictDataType | undefin * @return 字典名称 */ export const getDictLabel = (dictType: string, value: any): string => { - const dictOptions: DictDataType[] = getDictOptions(dictType) - const dictLabel = ref('') - dictOptions.forEach((dict: DictDataType) => { - if (dict.value === value + '') { - dictLabel.value = dict.label - } - }) - return dictLabel.value + const dictOptions: DictDataType[] = getDictOptions(dictType) + const dictLabel = ref('') + dictOptions.forEach((dict: DictDataType) => { + if (dict.value === value + '') { + dictLabel.value = dict.label + } + }) + return dictLabel.value } export enum DICT_TYPE { - USER_TYPE = 'user_type', - COMMON_STATUS = 'common_status', - SYSTEM_TENANT_PACKAGE_ID = 'system_tenant_package_id', - TERMINAL = 'terminal', // 终端 + USER_TYPE = 'user_type', + COMMON_STATUS = 'common_status', + SYSTEM_TENANT_PACKAGE_ID = 'system_tenant_package_id', + TERMINAL = 'terminal', // 终端 - // ========== SYSTEM 模块 ========== - SYSTEM_USER_SEX = 'system_user_sex', - SYSTEM_MENU_TYPE = 'system_menu_type', - SYSTEM_ROLE_TYPE = 'system_role_type', - SYSTEM_DATA_SCOPE = 'system_data_scope', - SYSTEM_NOTICE_TYPE = 'system_notice_type', - SYSTEM_OPERATE_TYPE = 'system_operate_type', - SYSTEM_LOGIN_TYPE = 'system_login_type', - SYSTEM_LOGIN_RESULT = 'system_login_result', - SYSTEM_SMS_CHANNEL_CODE = 'system_sms_channel_code', - SYSTEM_SMS_TEMPLATE_TYPE = 'system_sms_template_type', - SYSTEM_SMS_SEND_STATUS = 'system_sms_send_status', - SYSTEM_SMS_RECEIVE_STATUS = 'system_sms_receive_status', - SYSTEM_ERROR_CODE_TYPE = 'system_error_code_type', - SYSTEM_OAUTH2_GRANT_TYPE = 'system_oauth2_grant_type', - SYSTEM_MAIL_SEND_STATUS = 'system_mail_send_status', - SYSTEM_NOTIFY_TEMPLATE_TYPE = 'system_notify_template_type', - SYSTEM_SOCIAL_TYPE = 'system_social_type', + // ========== SYSTEM 模块 ========== + SYSTEM_USER_SEX = 'system_user_sex', + SYSTEM_MENU_TYPE = 'system_menu_type', + SYSTEM_ROLE_TYPE = 'system_role_type', + SYSTEM_DATA_SCOPE = 'system_data_scope', + SYSTEM_NOTICE_TYPE = 'system_notice_type', + SYSTEM_OPERATE_TYPE = 'system_operate_type', + SYSTEM_LOGIN_TYPE = 'system_login_type', + SYSTEM_LOGIN_RESULT = 'system_login_result', + SYSTEM_SMS_CHANNEL_CODE = 'system_sms_channel_code', + SYSTEM_SMS_TEMPLATE_TYPE = 'system_sms_template_type', + SYSTEM_SMS_SEND_STATUS = 'system_sms_send_status', + SYSTEM_SMS_RECEIVE_STATUS = 'system_sms_receive_status', + SYSTEM_ERROR_CODE_TYPE = 'system_error_code_type', + SYSTEM_OAUTH2_GRANT_TYPE = 'system_oauth2_grant_type', + SYSTEM_MAIL_SEND_STATUS = 'system_mail_send_status', + SYSTEM_NOTIFY_TEMPLATE_TYPE = 'system_notify_template_type', + SYSTEM_SOCIAL_TYPE = 'system_social_type', - // ========== INFRA 模块 ========== - INFRA_BOOLEAN_STRING = 'infra_boolean_string', - INFRA_JOB_STATUS = 'infra_job_status', - INFRA_JOB_LOG_STATUS = 'infra_job_log_status', - INFRA_API_ERROR_LOG_PROCESS_STATUS = 'infra_api_error_log_process_status', - INFRA_CONFIG_TYPE = 'infra_config_type', - INFRA_CODEGEN_TEMPLATE_TYPE = 'infra_codegen_template_type', - INFRA_CODEGEN_FRONT_TYPE = 'infra_codegen_front_type', - INFRA_CODEGEN_SCENE = 'infra_codegen_scene', - INFRA_FILE_STORAGE = 'infra_file_storage', + // ========== INFRA 模块 ========== + INFRA_BOOLEAN_STRING = 'infra_boolean_string', + INFRA_JOB_STATUS = 'infra_job_status', + INFRA_JOB_LOG_STATUS = 'infra_job_log_status', + INFRA_API_ERROR_LOG_PROCESS_STATUS = 'infra_api_error_log_process_status', + INFRA_CONFIG_TYPE = 'infra_config_type', + INFRA_CODEGEN_TEMPLATE_TYPE = 'infra_codegen_template_type', + INFRA_CODEGEN_FRONT_TYPE = 'infra_codegen_front_type', + INFRA_CODEGEN_SCENE = 'infra_codegen_scene', + INFRA_FILE_STORAGE = 'infra_file_storage', - // ========== BPM 模块 ========== - BPM_MODEL_CATEGORY = 'bpm_model_category', - BPM_MODEL_FORM_TYPE = 'bpm_model_form_type', - BPM_TASK_ASSIGN_RULE_TYPE = 'bpm_task_assign_rule_type', - BPM_PROCESS_INSTANCE_STATUS = 'bpm_process_instance_status', - BPM_PROCESS_INSTANCE_RESULT = 'bpm_process_instance_result', - BPM_TASK_ASSIGN_SCRIPT = 'bpm_task_assign_script', - BPM_OA_LEAVE_TYPE = 'bpm_oa_leave_type', + // ========== BPM 模块 ========== + BPM_MODEL_CATEGORY = 'bpm_model_category', + BPM_MODEL_FORM_TYPE = 'bpm_model_form_type', + BPM_TASK_ASSIGN_RULE_TYPE = 'bpm_task_assign_rule_type', + BPM_PROCESS_INSTANCE_STATUS = 'bpm_process_instance_status', + BPM_PROCESS_INSTANCE_RESULT = 'bpm_process_instance_result', + BPM_TASK_ASSIGN_SCRIPT = 'bpm_task_assign_script', + BPM_OA_LEAVE_TYPE = 'bpm_oa_leave_type', - // ========== PAY 模块 ========== - PAY_CHANNEL_CODE = 'pay_channel_code', // 支付渠道编码类型 - PAY_ORDER_STATUS = 'pay_order_status', // 商户支付订单状态 - PAY_REFUND_STATUS = 'pay_refund_status', // 退款订单状态 - PAY_NOTIFY_STATUS = 'pay_notify_status', // 商户支付回调状态 - PAY_NOTIFY_TYPE = 'pay_notify_type', // 商户支付回调状态 - PAY_TRANSFER_STATUS = 'pay_transfer_status', // 转账订单状态 - PAY_TRANSFER_TYPE = 'pay_transfer_type', // 转账订单状态 + // ========== PAY 模块 ========== + PAY_CHANNEL_CODE = 'pay_channel_code', // 支付渠道编码类型 + PAY_ORDER_STATUS = 'pay_order_status', // 商户支付订单状态 + PAY_REFUND_STATUS = 'pay_refund_status', // 退款订单状态 + PAY_NOTIFY_STATUS = 'pay_notify_status', // 商户支付回调状态 + PAY_NOTIFY_TYPE = 'pay_notify_type', // 商户支付回调状态 + PAY_TRANSFER_STATUS = 'pay_transfer_status', // 转账订单状态 + PAY_TRANSFER_TYPE = 'pay_transfer_type', // 转账订单状态 - // ========== MP 模块 ========== - MP_AUTO_REPLY_REQUEST_MATCH = 'mp_auto_reply_request_match', // 自动回复请求匹配类型 - MP_MESSAGE_TYPE = 'mp_message_type', // 消息类型 + // ========== MP 模块 ========== + MP_AUTO_REPLY_REQUEST_MATCH = 'mp_auto_reply_request_match', // 自动回复请求匹配类型 + MP_MESSAGE_TYPE = 'mp_message_type', // 消息类型 - // ========== MALL - 会员模块 ========== - MEMBER_POINT_BIZ_TYPE = 'member_point_biz_type', // 积分的业务类型 - MEMBER_EXPERIENCE_BIZ_TYPE = 'member_experience_biz_type', // 会员经验业务类型 + // ========== MALL - 会员模块 ========== + MEMBER_POINT_BIZ_TYPE = 'member_point_biz_type', // 积分的业务类型 + MEMBER_EXPERIENCE_BIZ_TYPE = 'member_experience_biz_type', // 会员经验业务类型 - // ========== MALL - 商品模块 ========== - PRODUCT_UNIT = 'product_unit', // 商品单位 - PRODUCT_SPU_STATUS = 'product_spu_status', //商品状态 - PROMOTION_TYPE_ENUM = 'promotion_type_enum', // 营销类型枚举 + // ========== MALL - 商品模块 ========== + PRODUCT_UNIT = 'product_unit', // 商品单位 + PRODUCT_SPU_STATUS = 'product_spu_status', //商品状态 + PROMOTION_TYPE_ENUM = 'promotion_type_enum', // 营销类型枚举 - // ========== MALL - 交易模块 ========== - EXPRESS_CHARGE_MODE = 'trade_delivery_express_charge_mode', //快递的计费方式 - TRADE_AFTER_SALE_STATUS = 'trade_after_sale_status', // 售后 - 状态 - TRADE_AFTER_SALE_WAY = 'trade_after_sale_way', // 售后 - 方式 - TRADE_AFTER_SALE_TYPE = 'trade_after_sale_type', // 售后 - 类型 - TRADE_ORDER_TYPE = 'trade_order_type', // 订单 - 类型 - TRADE_ORDER_STATUS = 'trade_order_status', // 订单 - 状态 - TRADE_ORDER_ITEM_AFTER_SALE_STATUS = 'trade_order_item_after_sale_status', // 订单项 - 售后状态 - TRADE_DELIVERY_TYPE = 'trade_delivery_type', // 配送方式 - BROKERAGE_ENABLED_CONDITION = 'brokerage_enabled_condition', // 分佣模式 - BROKERAGE_BIND_MODE = 'brokerage_bind_mode', // 分销关系绑定模式 - BROKERAGE_BANK_NAME = 'brokerage_bank_name', // 佣金提现银行 - BROKERAGE_WITHDRAW_TYPE = 'brokerage_withdraw_type', // 佣金提现类型 - BROKERAGE_RECORD_BIZ_TYPE = 'brokerage_record_biz_type', // 佣金业务类型 - BROKERAGE_RECORD_STATUS = 'brokerage_record_status', // 佣金状态 - BROKERAGE_WITHDRAW_STATUS = 'brokerage_withdraw_status', // 佣金提现状态 + // ========== MALL - 交易模块 ========== + EXPRESS_CHARGE_MODE = 'trade_delivery_express_charge_mode', //快递的计费方式 + TRADE_AFTER_SALE_STATUS = 'trade_after_sale_status', // 售后 - 状态 + TRADE_AFTER_SALE_WAY = 'trade_after_sale_way', // 售后 - 方式 + TRADE_AFTER_SALE_TYPE = 'trade_after_sale_type', // 售后 - 类型 + TRADE_ORDER_TYPE = 'trade_order_type', // 订单 - 类型 + TRADE_ORDER_STATUS = 'trade_order_status', // 订单 - 状态 + TRADE_ORDER_ITEM_AFTER_SALE_STATUS = 'trade_order_item_after_sale_status', // 订单项 - 售后状态 + TRADE_DELIVERY_TYPE = 'trade_delivery_type', // 配送方式 + BROKERAGE_ENABLED_CONDITION = 'brokerage_enabled_condition', // 分佣模式 + BROKERAGE_BIND_MODE = 'brokerage_bind_mode', // 分销关系绑定模式 + BROKERAGE_BANK_NAME = 'brokerage_bank_name', // 佣金提现银行 + BROKERAGE_WITHDRAW_TYPE = 'brokerage_withdraw_type', // 佣金提现类型 + BROKERAGE_RECORD_BIZ_TYPE = 'brokerage_record_biz_type', // 佣金业务类型 + BROKERAGE_RECORD_STATUS = 'brokerage_record_status', // 佣金状态 + BROKERAGE_WITHDRAW_STATUS = 'brokerage_withdraw_status', // 佣金提现状态 - // ========== MALL - 营销模块 ========== - PROMOTION_DISCOUNT_TYPE = 'promotion_discount_type', // 优惠类型 - PROMOTION_PRODUCT_SCOPE = 'promotion_product_scope', // 营销的商品范围 - PROMOTION_COUPON_TEMPLATE_VALIDITY_TYPE = 'promotion_coupon_template_validity_type', // 优惠劵模板的有限期类型 - PROMOTION_COUPON_STATUS = 'promotion_coupon_status', // 优惠劵的状态 - PROMOTION_COUPON_TAKE_TYPE = 'promotion_coupon_take_type', // 优惠劵的领取方式 - PROMOTION_ACTIVITY_STATUS = 'promotion_activity_status', // 优惠活动的状态 - PROMOTION_CONDITION_TYPE = 'promotion_condition_type', // 营销的条件类型枚举 - PROMOTION_BARGAIN_RECORD_STATUS = 'promotion_bargain_record_status', // 砍价记录的状态 - PROMOTION_COMBINATION_RECORD_STATUS = 'promotion_combination_record_status', // 拼团记录的状态 - PROMOTION_BANNER_POSITION = 'promotion_banner_position', // banner 定位 + // ========== MALL - 营销模块 ========== + PROMOTION_DISCOUNT_TYPE = 'promotion_discount_type', // 优惠类型 + PROMOTION_PRODUCT_SCOPE = 'promotion_product_scope', // 营销的商品范围 + PROMOTION_COUPON_TEMPLATE_VALIDITY_TYPE = 'promotion_coupon_template_validity_type', // 优惠劵模板的有限期类型 + PROMOTION_COUPON_STATUS = 'promotion_coupon_status', // 优惠劵的状态 + PROMOTION_COUPON_TAKE_TYPE = 'promotion_coupon_take_type', // 优惠劵的领取方式 + PROMOTION_ACTIVITY_STATUS = 'promotion_activity_status', // 优惠活动的状态 + PROMOTION_CONDITION_TYPE = 'promotion_condition_type', // 营销的条件类型枚举 + PROMOTION_BARGAIN_RECORD_STATUS = 'promotion_bargain_record_status', // 砍价记录的状态 + PROMOTION_COMBINATION_RECORD_STATUS = 'promotion_combination_record_status', // 拼团记录的状态 + PROMOTION_BANNER_POSITION = 'promotion_banner_position', // banner 定位 - // ========== CRM - 客户管理模块 ========== - CRM_RECEIVABLE_CHECK_STATUS = 'crm_receivable_check_status', - 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_RECEIVABLE_CHECK_STATUS = 'crm_receivable_check_status', + 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_PERMISSION_LEVEL = 'crm_permission_level' // 用户数据权限类型 + // ========== CRM - 数据权限模块 ========== + CRM_BIZ_TYPE = 'crm_biz_type', // 数据模块类型 + CRM_PERMISSION_LEVEL = 'crm_permission_level' // 用户数据权限类型 } diff --git a/src/views/crm/components/CrmPermissionList.vue b/src/views/crm/components/CrmPermissionList.vue index cf50e0bc..8f0cba72 100644 --- a/src/views/crm/components/CrmPermissionList.vue +++ b/src/views/crm/components/CrmPermissionList.vue @@ -5,7 +5,7 @@ 新增 - + 编辑 @@ -15,7 +15,7 @@ 退出团队 - + - + + + diff --git a/src/views/crm/customerPoolConf/index.vue b/src/views/crm/config/customerPoolConfig/index.vue similarity index 70% rename from src/views/crm/customerPoolConf/index.vue rename to src/views/crm/config/customerPoolConfig/index.vue index 5fa98711..c7db3301 100644 --- a/src/views/crm/customerPoolConf/index.vue +++ b/src/views/crm/config/customerPoolConfig/index.vue @@ -23,7 +23,7 @@ - + 不启用 启用 @@ -36,7 +36,11 @@ 天未成交 - + 不提醒 提醒 @@ -52,11 +56,10 @@ diff --git a/src/views/crm/customer/detail/index.vue b/src/views/crm/customer/detail/index.vue index c88137fa..59b18c5b 100644 --- a/src/views/crm/customer/detail/index.vue +++ b/src/views/crm/customer/detail/index.vue @@ -1,69 +1,5 @@ From cec8582a90e1c6fd3e0ae22aca60093c70768a9b Mon Sep 17 00:00:00 2001 From: YunaiV Date: Sun, 26 Nov 2023 20:18:33 +0800 Subject: [PATCH 05/11] =?UTF-8?q?crm=EF=BC=9Acode=20review=20=E5=AE=A2?= =?UTF-8?q?=E6=88=B7=E8=AF=A6=E6=83=85?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/crm/clue/ClueForm.vue | 1 + .../customerLimitConfig/customerLimitConfig.ts | 4 ---- .../crm/customer/detail/CustomerBasicInfo.vue | 4 +++- .../crm/customer/detail/CustomerDetails.vue | 4 +++- ...rDetailsTop.vue => CustomerDetailsHeader.vue} | 16 ++++++++++------ src/views/crm/customer/detail/index.vue | 4 ++-- 6 files changed, 19 insertions(+), 14 deletions(-) delete mode 100644 src/views/crm/config/customerLimitConfig/customerLimitConfig.ts rename src/views/crm/customer/detail/{CustomerDetailsTop.vue => CustomerDetailsHeader.vue} (90%) diff --git a/src/views/crm/clue/ClueForm.vue b/src/views/crm/clue/ClueForm.vue index f0cfcab6..1b2637c9 100644 --- a/src/views/crm/clue/ClueForm.vue +++ b/src/views/crm/clue/ClueForm.vue @@ -10,6 +10,7 @@ + import * as CustomerApi from '@/api/crm/customer' -const { customer } = defineProps<{ customer: CustomerApi.CustomerVO }>() +const { customer } = defineProps<{ + customer: CustomerApi.CustomerVO +}>() diff --git a/src/views/crm/customer/detail/CustomerDetails.vue b/src/views/crm/customer/detail/CustomerDetails.vue index 67beae94..f7c92ca2 100644 --- a/src/views/crm/customer/detail/CustomerDetails.vue +++ b/src/views/crm/customer/detail/CustomerDetails.vue @@ -87,7 +87,9 @@ import * as CustomerApi from '@/api/crm/customer' import { DICT_TYPE } from '@/utils/dict' import { formatDate } from '@/utils/formatTime' -const { customer } = defineProps<{ customer: CustomerApi.CustomerVO }>() +const { customer } = defineProps<{ + customer: CustomerApi.CustomerVO +}>() // 展示的折叠面板 const activeNames = ref(['basicInfo', 'systemInfo']) diff --git a/src/views/crm/customer/detail/CustomerDetailsTop.vue b/src/views/crm/customer/detail/CustomerDetailsHeader.vue similarity index 90% rename from src/views/crm/customer/detail/CustomerDetailsTop.vue rename to src/views/crm/customer/detail/CustomerDetailsHeader.vue index 509d0a27..6e14c829 100644 --- a/src/views/crm/customer/detail/CustomerDetailsTop.vue +++ b/src/views/crm/customer/detail/CustomerDetailsHeader.vue @@ -7,7 +7,7 @@
- + 编辑 更改成交状态 @@ -70,16 +70,20 @@ diff --git a/src/views/crm/customer/detail/index.vue b/src/views/crm/customer/detail/index.vue index 59b18c5b..e6c9e9a9 100644 --- a/src/views/crm/customer/detail/index.vue +++ b/src/views/crm/customer/detail/index.vue @@ -1,5 +1,5 @@ diff --git a/src/views/crm/business/index.vue b/src/views/crm/business/index.vue new file mode 100644 index 00000000..c1c63fa1 --- /dev/null +++ b/src/views/crm/business/index.vue @@ -0,0 +1,207 @@ + + + diff --git a/src/views/crm/businessStatusType/BusinessStatusTypeForm.vue b/src/views/crm/businessStatusType/BusinessStatusTypeForm.vue new file mode 100644 index 00000000..2ba71128 --- /dev/null +++ b/src/views/crm/businessStatusType/BusinessStatusTypeForm.vue @@ -0,0 +1,173 @@ + + diff --git a/src/views/crm/businessStatusType/index.vue b/src/views/crm/businessStatusType/index.vue new file mode 100644 index 00000000..7b2725f3 --- /dev/null +++ b/src/views/crm/businessStatusType/index.vue @@ -0,0 +1,171 @@ + + + From 3c19cb1a85b8bec70ce07da17eed2829c632c500 Mon Sep 17 00:00:00 2001 From: YunaiV Date: Sat, 25 Nov 2023 12:01:35 +0800 Subject: [PATCH 08/11] =?UTF-8?q?crm=EF=BC=9Acode=20review=20=E5=95=86?= =?UTF-8?q?=E6=9C=BA=E7=B1=BB=E5=9E=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/crm/business/BusinessForm.vue | 20 ++++----- .../BusinessStatusTypeForm.vue | 44 ++++++++----------- 2 files changed, 28 insertions(+), 36 deletions(-) diff --git a/src/views/crm/business/BusinessForm.vue b/src/views/crm/business/BusinessForm.vue index 04f1cf5d..53f5cb8d 100644 --- a/src/views/crm/business/BusinessForm.vue +++ b/src/views/crm/business/BusinessForm.vue @@ -10,6 +10,7 @@ + - + import * as BusinessApi from '@/api/crm/business' import * as BusinessStatusTypeApi from '@/api/crm/businessStatusType' -import * as CustomerApi from "@/api/crm/customer"; +import * as CustomerApi from '@/api/crm/customer' import { DICT_TYPE } from '@/utils/dict' -import {ElTable} from "element-plus"; +import { ElTable } from 'element-plus' const { t } = useI18n() // 国际化 const message = useMessage() // 消息弹窗 @@ -233,10 +229,12 @@ const resetForm = () => { } formRef.value?.resetFields() } -const changeBusinessStatusType = async (id) => { - // 加载商机状态列表 - businessStatusList.value = await BusinessStatusTypeApi.getBusinessStatusListByTypeId(id) + +/** 加载商机状态列表 */ +const changeBusinessStatusType = async (typeId: number) => { + businessStatusList.value = await BusinessStatusTypeApi.getBusinessStatusListByTypeId(typeId) } + const queryParams = reactive({ pageNo: 1, pageSize: 10, diff --git a/src/views/crm/businessStatusType/BusinessStatusTypeForm.vue b/src/views/crm/businessStatusType/BusinessStatusTypeForm.vue index 2ba71128..edf41966 100644 --- a/src/views/crm/businessStatusType/BusinessStatusTypeForm.vue +++ b/src/views/crm/businessStatusType/BusinessStatusTypeForm.vue @@ -23,22 +23,12 @@ - + - + @@ -50,10 +40,13 @@ @@ -69,8 +62,8 @@ diff --git a/src/views/crm/customerPoolConf/index.vue b/src/views/crm/config/customerPoolConfig/index.vue similarity index 70% rename from src/views/crm/customerPoolConf/index.vue rename to src/views/crm/config/customerPoolConfig/index.vue index 5fa98711..c7db3301 100644 --- a/src/views/crm/customerPoolConf/index.vue +++ b/src/views/crm/config/customerPoolConfig/index.vue @@ -23,7 +23,7 @@ - + 不启用 启用 @@ -36,7 +36,11 @@ 天未成交 - + 不提醒 提醒 @@ -52,11 +56,10 @@ diff --git a/src/views/crm/customer/detail/index.vue b/src/views/crm/customer/detail/index.vue index c88137fa..59b18c5b 100644 --- a/src/views/crm/customer/detail/index.vue +++ b/src/views/crm/customer/detail/index.vue @@ -1,69 +1,5 @@ From 24773a6eaae8bcd91c83de5c1753c26b20725f27 Mon Sep 17 00:00:00 2001 From: YunaiV Date: Sun, 26 Nov 2023 20:18:33 +0800 Subject: [PATCH 10/11] =?UTF-8?q?crm=EF=BC=9Acode=20review=20=E5=AE=A2?= =?UTF-8?q?=E6=88=B7=E8=AF=A6=E6=83=85?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/crm/clue/ClueForm.vue | 1 + .../customerLimitConfig/customerLimitConfig.ts | 4 ---- .../crm/customer/detail/CustomerBasicInfo.vue | 4 +++- .../crm/customer/detail/CustomerDetails.vue | 4 +++- ...rDetailsTop.vue => CustomerDetailsHeader.vue} | 16 ++++++++++------ src/views/crm/customer/detail/index.vue | 4 ++-- 6 files changed, 19 insertions(+), 14 deletions(-) delete mode 100644 src/views/crm/config/customerLimitConfig/customerLimitConfig.ts rename src/views/crm/customer/detail/{CustomerDetailsTop.vue => CustomerDetailsHeader.vue} (90%) diff --git a/src/views/crm/clue/ClueForm.vue b/src/views/crm/clue/ClueForm.vue index f0cfcab6..1b2637c9 100644 --- a/src/views/crm/clue/ClueForm.vue +++ b/src/views/crm/clue/ClueForm.vue @@ -10,6 +10,7 @@ + import * as CustomerApi from '@/api/crm/customer' -const { customer } = defineProps<{ customer: CustomerApi.CustomerVO }>() +const { customer } = defineProps<{ + customer: CustomerApi.CustomerVO +}>() diff --git a/src/views/crm/customer/detail/CustomerDetails.vue b/src/views/crm/customer/detail/CustomerDetails.vue index 67beae94..f7c92ca2 100644 --- a/src/views/crm/customer/detail/CustomerDetails.vue +++ b/src/views/crm/customer/detail/CustomerDetails.vue @@ -87,7 +87,9 @@ import * as CustomerApi from '@/api/crm/customer' import { DICT_TYPE } from '@/utils/dict' import { formatDate } from '@/utils/formatTime' -const { customer } = defineProps<{ customer: CustomerApi.CustomerVO }>() +const { customer } = defineProps<{ + customer: CustomerApi.CustomerVO +}>() // 展示的折叠面板 const activeNames = ref(['basicInfo', 'systemInfo']) diff --git a/src/views/crm/customer/detail/CustomerDetailsTop.vue b/src/views/crm/customer/detail/CustomerDetailsHeader.vue similarity index 90% rename from src/views/crm/customer/detail/CustomerDetailsTop.vue rename to src/views/crm/customer/detail/CustomerDetailsHeader.vue index 509d0a27..6e14c829 100644 --- a/src/views/crm/customer/detail/CustomerDetailsTop.vue +++ b/src/views/crm/customer/detail/CustomerDetailsHeader.vue @@ -7,7 +7,7 @@
- + 编辑 更改成交状态 @@ -70,16 +70,20 @@ diff --git a/src/views/crm/customer/detail/index.vue b/src/views/crm/customer/detail/index.vue index 59b18c5b..e6c9e9a9 100644 --- a/src/views/crm/customer/detail/index.vue +++ b/src/views/crm/customer/detail/index.vue @@ -1,5 +1,5 @@