liyong
6 天以前 2cb71b3a0e63aae9d9beb13863c69b4c10397025
src/views/basicData/customerFile/index.vue
@@ -15,10 +15,10 @@
                   style="width: 240px"
                   clearable
                   @change="handleQuery">
          <el-option label="零售客户"
                     value="零售客户"/>
          <el-option label="进销商客户"
                     value="进销商客户"/>
          <el-option v-for="dict in customerTypeOptions"
                     :key="dict.value"
                     :label="dict.label"
                     :value="dict.value"/>
        </el-select>
        <el-button type="primary"
                   @click="handleQuery"
@@ -130,10 +130,10 @@
              <el-select v-model="form.customerType"
                         placeholder="请选择"
                         clearable>
                <el-option label="零售客户"
                           value="零售客户"/>
                <el-option label="进销商客户"
                           value="进销商客户"/>
                <el-option v-for="dict in customerTypeOptions"
                           :key="dict.value"
                           :label="dict.label"
                           :value="dict.value"/>
              </el-select>
            </el-form-item>
          </el-col>
@@ -425,7 +425,7 @@
            <el-col :span="12">
              <div class="info-item">
                <span class="info-label">客户分类:</span>
                <span class="info-value">{{ detailForm.customerType }}</span>
                <span class="info-value">{{ getCustomerTypeLabel(detailForm.customerType) }}</span>
              </div>
            </el-col>
          </el-row>
@@ -671,6 +671,7 @@
import {getToken} from "@/utils/auth.js";
const {proxy} = getCurrentInstance();
const { customer_type: customerTypeOptions } = proxy.useDict("customer_type");
const userStore = useUserStore();
// 回访提醒相关
@@ -762,11 +763,19 @@
      : baseUrl;
};
const getCustomerTypeLabel = (value) => {
  const match = (customerTypeOptions.value || []).find(
      (item) => String(item.value) === String(value)
  );
  return match?.label ?? value ?? "";
};
const tableColumn = ref([
  {
    label: "客户分类",
    prop: "customerType",
    width: 120,
    formatData: getCustomerTypeLabel,
  },
  {
    label: "客户名称",