hurx 4 днів тому
батько
коміт
32a290d6bc
1 змінених файлів з 26 додано та 4 видалено
  1. 26 4
      src/views/customer/customerFile/customerInfo/index.vue

+ 26 - 4
src/views/customer/customerFile/customerInfo/index.vue

@@ -6,9 +6,7 @@
           <el-form ref="queryFormRef" :model="queryParams" :inline="true">
             <el-form-item label="所属公司" prop="belongCompanyId">
               <el-select v-model="queryParams.belongCompanyId" placeholder="请选择所属公司" clearable filterable style="width: 200px">
-                <el-option label="公司A" value="1" />
-                <el-option label="公司B" value="2" />
-                <el-option label="公司C" value="3" />
+                <el-option v-for="item in companyList" :key="item.id" :label="`${item.companyCode} - ${item.companyName}`" :value="item.id" />
               </el-select>
             </el-form-item>
             <el-form-item label="客户编码" prop="customerNo">
@@ -77,7 +75,7 @@
             <el-button type="primary" plain :disabled="single" v-hasPermi="['customer:customerInfo:edit']">转移业务员</el-button>
           </el-col>
           <el-col :span="1.5">
-            <el-button type="primary" plain :disabled="single" v-hasPermi="['customer:customerInfo:edit']">转移业务员</el-button>
+            <el-button type="primary" plain :disabled="single" v-hasPermi="['customer:customerInfo:edit']">转移客服人员</el-button>
           </el-col>
           <el-col :span="1.5">
             <el-button type="primary" plain :disabled="single" @click="updateCreditAmountBtn" v-hasPermi="['customer:customerInfo:edit']"
@@ -204,12 +202,15 @@ import { listCustomerTag } from '@/api/customer/customerCategory/customerTag';
 import { CustomerTagVO } from '@/api/customer/customerCategory/customerTag/types';
 import { listIndustryCategory } from '@/api/customer/customerCategory/industryCategory';
 import { IndustryCategoryVO } from '@/api/customer/customerCategory/industryCategory/types';
+import { listSysCompany } from '@/api/company/sysCompany';
+import type { SysCompanyVO } from '@/api/company/sysCompany/types';
 const { proxy } = getCurrentInstance() as ComponentInternalInstance;
 const { sys_check_status, customer_type, customer_level } = toRefs<any>(proxy?.useDict('sys_check_status', 'customer_type', 'customer_level'));
 const router = useRouter();
 const customerInfoList = ref<CustomerInfoVO[]>([]);
 const customerTagList = ref<CustomerTagVO[]>([]);
 const industryCategoryList = ref<IndustryCategoryVO[]>([]);
+const companyList = ref<SysCompanyVO[]>([]);
 const buttonLoading = ref(false);
 const loading = ref(true);
 const showSearch = ref(true);
@@ -364,6 +365,16 @@ const getIndustryName = (id: string | number | undefined) => {
     '6': '其他'
   };
   return map[String(id)] || '-';
+
+  // 加载公司列表
+  const loadCompanyList = async () => {
+    try {
+      const res = await listSysCompany();
+      companyList.value = res.rows || [];
+    } catch (error) {
+      console.error('加载公司列表失败:', error);
+    }
+  };
 };
 
 const getSalesPersonName = (id: string | number | undefined) => {
@@ -574,9 +585,20 @@ const loadIndustryCategories = async () => {
   }
 };
 
+/** 加载公司列表 */
+const loadCompanyList = async () => {
+  try {
+    const res = await listSysCompany();
+    companyList.value = res.rows || [];
+  } catch (error) {
+    console.error('加载公司列表失败:', error);
+  }
+};
+
 onMounted(() => {
   getList();
   loadCustomerTags();
   loadIndustryCategories();
+  loadCompanyList();
 });
 </script>