Просмотр исходного кода

修改客服人员映射

Co-authored-by: Copilot <copilot@github.com>
hurx 7 часов назад
Родитель
Сommit
36cd1c7ba8

+ 6 - 0
src/api/customer/customerFile/customerInfo/types.ts

@@ -138,6 +138,12 @@ export interface CustomerInfoVO {
    */
   remark: string;
 
+  salesPersonName: string;
+
+  serviceStaffName: string;
+
+  belongingDepartmentName: string;
+
   /**
    * 工商信息
    */

+ 10 - 14
src/views/customer/customerFile/customerInfo/index.vue

@@ -139,17 +139,17 @@
         <el-table-column label="行业" align="center" prop="industryCategory" min-width="120"> </el-table-column>
         <el-table-column label="业务负责人" align="center" min-width="100">
           <template #default="scope">
-            <span>{{ scope.row.customerSalesInfoVo?.salesPerson }}</span>
+            <span>{{ scope.row.salesPersonName }}</span>
           </template>
         </el-table-column>
         <el-table-column label="客服支持" align="center" min-width="100">
           <template #default="scope">
-            <span>{{ scope.row.customerSalesInfoVo?.serviceStaff }}</span>
+            <span>{{ scope.row.serviceStaffName }}</span>
           </template>
         </el-table-column>
-        <el-table-column label="部门" align="center" prop="belongingDepartmentId" min-width="120">
+        <el-table-column label="部门" align="center" min-width="120">
           <template #default="scope">
-            <span>{{ scope.row.customerSalesInfoVo?.belongingDepartment }}</span>
+            <span>{{ scope.row.belongingDepartmentName }}</span>
           </template>
         </el-table-column>
         <el-table-column label="信用额" align="center" prop="creditAmount" min-width="80">
@@ -322,12 +322,8 @@ import { CustomerLevelVO, CustomerLevelQuery } from '@/api/customer/customerLeve
 import { CompanyVO } from '@/api/company/company/types';
 import { listComStaff, getComStaff } from '@/api/company/comStaff';
 import { ComStaffVO, ComStaffQuery, ComStaffForm } from '@/api/company/comStaff/types';
-import { listComDept, getComDept } from '@/api/company/comDept';
-import { ComDeptVO } from '@/api/company/comDept/types';
-import { listErpStaff } from '@/api/erpData/erpStaff';
-import { ErpStaffVO } from '@/api/erpData/erpStaff/types';
-import { listErpDept, getErpDept } from '@/api/erpData/erpDept';
-import { ErpDeptVO } from '@/api/erpData/erpDept/types';
+import { listDept, getDept } from '@/api/system/dept';
+import { DeptVO } from '@/api/system/dept/types';
 import { WarningFilled } from '@element-plus/icons-vue';
 const router = useRouter();
 const customerInfoList = ref<CustomerInfoVO[]>([]);
@@ -335,8 +331,8 @@ const customerTagList = ref<CustomerTagVO[]>([]);
 const customerLevelList = ref<CustomerLevelVO[]>([]);
 const industryCategoryList = ref<IndustryCategoryVO[]>([]);
 const companyList = ref<CompanyVO[]>([]);
-const comStaffList = ref<ErpStaffVO[]>([]);
-const comDeptList = ref<ErpDeptVO[]>([]);
+const comStaffList = ref<ComStaffVO[]>([]);
+const comDeptList = ref<DeptVO[]>([]);
 const buttonLoading = ref(false);
 const loading = ref(true);
 const transferConfirmLoading = ref(false);
@@ -836,7 +832,7 @@ const loadCompanyList = async () => {
 const loadComStaffList = async () => {
   try {
     const query: ComStaffQuery = { status: '0' } as any;
-    const res = await listErpStaff(query);
+    const res = await listComStaff(query);
 
     comStaffList.value = res.rows || [];
   } catch (error) {
@@ -847,7 +843,7 @@ const loadComStaffList = async () => {
 /** 加载部门列表 */
 const loadComDeptList = async () => {
   try {
-    const res = await listErpDept();
+    const res = await listDept();
     comDeptList.value = res.rows || res.data || [];
   } catch (error) {
     console.error('加载部门列表失败:', error);

+ 3 - 3
src/views/order/orderMain/index.vue

@@ -949,9 +949,9 @@ const handleCustomerChange = async (customerId: string | number) => {
       form.value.remainingQuota = salesInfo.remainingQuota;
       form.value.temporaryQuota = salesInfo.temporaryQuota;
       // 填充业务人员、客服人员、业务部门
-      form.value.businessStaff = salesInfo.salesPerson;
-      form.value.customerService = salesInfo.serviceStaff;
-      form.value.businessDept = salesInfo.belongingDepartment;
+      form.value.businessStaff = customerInfo.salesPersonName;
+      form.value.customerService = customerInfo.serviceStaffName;
+      form.value.businessDept = customerInfo.belongingDepartmentName;
     }
 
     // 获取客户部门列表