|
|
@@ -67,10 +67,22 @@
|
|
|
<el-table v-loading="loading" border :data="infoList" class="no-resize-table" @selection-change="handleSelectionChange">
|
|
|
<el-table-column label="编号" align="center" prop="supplierNo" width="150" fixed="left" />
|
|
|
<el-table-column label="名称" align="left" prop="enterpriseName" fixed="left" />
|
|
|
- <el-table-column label="类型" align="center" />
|
|
|
- <el-table-column label="等级" align="left" prop="enterpriseScaleName" fixed="left" />
|
|
|
- <el-table-column label="企业规模" align="left" prop="enterpriseScaleName" fixed="left" />
|
|
|
- <el-table-column label="评价" align="left" prop="" fixed="left" />
|
|
|
+ <el-table-column label="类型" align="center" prop="supplierType">
|
|
|
+ <template #default="scope">
|
|
|
+ <span>{{ getSupplierTypeName(scope.row.supplierType) }}</span>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column label="等级" align="left" prop="cooperateLevel" fixed="left">
|
|
|
+ <template #default="scope">
|
|
|
+ <span>{{ getSupplierLevelName(scope.row.cooperateLevel) }}</span>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column label="企业规模" align="left" prop="membershipSize" fixed="left">
|
|
|
+ <template #default="scope">
|
|
|
+ <span>{{ getEnterpriseScaleName(scope.row.membershipSize) }}</span>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column label="评价" align="left" prop="supplyScore" fixed="left" />
|
|
|
<el-table-column label="采销经理" align="center" prop="productManager" />
|
|
|
<el-table-column label="产品专员" align="center" prop="buyer" />
|
|
|
<!-- <el-table-column label="供应品牌" align="center" prop="brandName" width="200" />
|
|
|
@@ -342,6 +354,10 @@ import { getInfoList, getInfo, delInfo, addInfo, updateInfo, getProductCategoryL
|
|
|
import { InfoVO, InfoQuery, InfoForm } from '@/api/customer/info/types';
|
|
|
import { listType } from '@/api/system/type';
|
|
|
import { TypeVO } from '@/api/system/type/types';
|
|
|
+import { listLevel } from '@/api/system/level';
|
|
|
+import { LevelVO } from '@/api/system/level/types';
|
|
|
+import { listEnterpriseScale } from '@/api/customer/customerCategory/enterpriseScale';
|
|
|
+import { EnterpriseScaleVO } from '@/api/customer/customerCategory/enterpriseScale/types';
|
|
|
import { getSupplierStatusOptions, getSupplierStatusDisplayName } from '@/enums/supplierStatus';
|
|
|
import { getSupplierCooperationStatusDisplayName } from '@/enums/supplierCooperationStatus';
|
|
|
|
|
|
@@ -360,6 +376,8 @@ const single = ref(true);
|
|
|
const multiple = ref(true);
|
|
|
const total = ref(0);
|
|
|
const supplierTypeList = ref<TypeVO[]>([]);
|
|
|
+const supplierLevelList = ref<LevelVO[]>([]);
|
|
|
+const enterpriseScaleList = ref<EnterpriseScaleVO[]>([]);
|
|
|
const productCategoryList = ref<{ categoryNo: string; categoryName: string; id?: number }[]>([]);
|
|
|
const comStaffList = ref<{ staffId: string; staffName: string }[]>([]);
|
|
|
// 使用枚举获取供应商状态选项,搜索框显示原始名称
|
|
|
@@ -743,6 +761,33 @@ const getSupplierTypeList = async () => {
|
|
|
}
|
|
|
};
|
|
|
|
|
|
+/** 获取供应商等级列表 */
|
|
|
+const getSupplierLevelList = async () => {
|
|
|
+ try {
|
|
|
+ const res = await listLevel({
|
|
|
+ pageNum: 1,
|
|
|
+ pageSize: 1000
|
|
|
+ } as any);
|
|
|
+ supplierLevelList.value = (res as any).data || res.rows || [];
|
|
|
+ } catch (e) {
|
|
|
+ console.error('获取供应商等级失败', e);
|
|
|
+ }
|
|
|
+};
|
|
|
+
|
|
|
+/** 获取企业规模列表 */
|
|
|
+const getEnterpriseScaleList = async () => {
|
|
|
+ try {
|
|
|
+ const res = await listEnterpriseScale({
|
|
|
+ pageNum: 1,
|
|
|
+ pageSize: 1000,
|
|
|
+ status: '0'
|
|
|
+ });
|
|
|
+ enterpriseScaleList.value = (res as any).data || res.rows || [];
|
|
|
+ } catch (e) {
|
|
|
+ console.error('获取企业规模失败', e);
|
|
|
+ }
|
|
|
+};
|
|
|
+
|
|
|
/** 获取产品分类列表 */
|
|
|
const getProductCategoryData = async () => {
|
|
|
try {
|
|
|
@@ -783,6 +828,20 @@ const getSupplierTypeName = (typeValue: string | number) => {
|
|
|
return item ? item.supplierTypeName : String(typeValue);
|
|
|
};
|
|
|
|
|
|
+/** 根据供应商等级ID获取显示名称 */
|
|
|
+const getSupplierLevelName = (levelValue: string | number) => {
|
|
|
+ if (levelValue === undefined || levelValue === null || levelValue === '') return '';
|
|
|
+ const item = supplierLevelList.value.find((t) => String(t.id) === String(levelValue));
|
|
|
+ return item ? item.supplierLevelName : String(levelValue);
|
|
|
+};
|
|
|
+
|
|
|
+/** 根据企业规模ID获取显示名称 */
|
|
|
+const getEnterpriseScaleName = (scaleValue: string | number) => {
|
|
|
+ if (scaleValue === undefined || scaleValue === null || scaleValue === '') return '';
|
|
|
+ const item = enterpriseScaleList.value.find((t) => String(t.id) === String(scaleValue));
|
|
|
+ return item ? item.enterpriseScaleName : String(scaleValue);
|
|
|
+};
|
|
|
+
|
|
|
/** 根据categoryNo获取categoryName */
|
|
|
const getCategoryName = (categoryNo: string) => {
|
|
|
const item = productCategoryList.value.find((c) => c.categoryNo === categoryNo);
|
|
|
@@ -825,6 +884,8 @@ const formatCityDisplay = (city: string) => {
|
|
|
|
|
|
onMounted(async () => {
|
|
|
getSupplierTypeList();
|
|
|
+ getSupplierLevelList();
|
|
|
+ getEnterpriseScaleList();
|
|
|
getProductCategoryData();
|
|
|
|
|
|
// 直接调用人员接口测试
|