hurx 1 maand geleden
bovenliggende
commit
686e7c8123
3 gewijzigde bestanden met toevoegingen van 10 en 25 verwijderingen
  1. 2 2
      .env.production
  2. 4 0
      src/api/customer/customerFile/salesInfo/types.ts
  3. 4 23
      src/views/customer/maintainInfo/add.vue

+ 2 - 2
.env.production

@@ -1,5 +1,5 @@
 # 页面标题
-VITE_APP_TITLE = RuoYi-Vue-Plus多租户管理系统
+VITE_APP_TITLE = 优易商城-客户营销智能化管理平台
 VITE_APP_LOGO_TITLE = RuoYi-Vue-Plus
 
 # 生产环境配置
@@ -15,7 +15,7 @@ VITE_APP_MONITOR_ADMIN = '/admin/applications'
 VITE_APP_SNAILJOB_ADMIN = '/snail-job'
 
 # 生产环境
-VITE_APP_BASE_API = '/prod-api'
+VITE_APP_BASE_API = 'https://one.yoe365.com'
 
 # 是否在打包时开启压缩,支持 gzip 和 brotli
 VITE_BUILD_COMPRESS = gzip

+ 4 - 0
src/api/customer/customerFile/salesInfo/types.ts

@@ -64,11 +64,15 @@ export interface SalesInfoVO {
    */
   salesPersonId: string | number;
 
+  salesPerson: string;
+
   /**
    * 服务人员
    */
   serviceStaffId: string | number;
 
+  serviceStaff: string;
+
   /**
    * 所属部门
    */

+ 4 - 23
src/views/customer/maintainInfo/add.vue

@@ -309,7 +309,7 @@ onMounted(async () => {
   const _id = route.query.id;
   if (_id) {
     isEdit.value = true;
-    await loadMaintainData(_id);
+    await loadMaintainData(_id as any);
   }
 });
 
@@ -345,8 +345,7 @@ const handleCustomerChange = async (customerId: string | number) => {
 
     // 填充企业基本信息 - 使用API获取真实数据
     customerInfo.customerNo = data.customerNo;
-    customerInfo.cooperationLevel = getCustomerLevelName(data.customerLevelId);
-    customerInfo.memberLevel = getCustomerLevelName(data.customerLevelId);
+    // customerInfo.memberLevel = getCustomerLevelName(data.customerLevelId);
     customerInfo.phone = data.landline || '';
     customerInfo.address = data.address || '';
     customerInfo.provincialCityCounty = data.provincialCityCounty || '';
@@ -355,31 +354,14 @@ const handleCustomerChange = async (customerId: string | number) => {
 
     // 填充销售信息
     if (data.customerSalesInfoVo) {
-      customerInfo.salesPerson = getSalesPersonName(data.customerSalesInfoVo.salesPersonId);
-      customerInfo.servicePerson = getServiceStaffName(data.customerSalesInfoVo.serviceStaffId);
+      customerInfo.salesPerson = res.data.customerSalesInfoVo?.salesPerson;
+      customerInfo.servicePerson = res.data.customerSalesInfoVo?.serviceStaff;
     }
   } catch (error) {
-    console.error('加载企业信息失败:', error);
     ElMessage.error('加载企业信息失败');
   }
 };
 
-// 格式化方法
-const getCustomerLevelName = (id: string | number | undefined) => {
-  const map: Record<string, string> = { '1': 'A级', '2': 'B级', '3': 'C级', '4': 'D级' };
-  return map[String(id)] || '-';
-};
-
-const getSalesPersonName = (id: string | number | undefined) => {
-  const map: Record<string, string> = { '1': '张三', '2': '李四', '3': '王五', '4': '赵六' };
-  return map[String(id)] || '-';
-};
-
-const getServiceStaffName = (id: string | number | undefined) => {
-  const map: Record<string, string> = { '1': '客服A', '2': '客服B', '3': '客服C', '4': '客服D' };
-  return map[String(id)] || '-';
-};
-
 // 加载维保数据
 const loadMaintainData = async (id: string | number) => {
   try {
@@ -398,7 +380,6 @@ const loadMaintainData = async (id: string | number) => {
       await handleCustomerChange(form.customerId);
     }
   } catch (error) {
-    console.error('加载维保数据失败:', error);
     ElMessage.error('加载维保数据失败');
   }
 };