✨ 同步客户区域字段并统一字典标识

This commit is contained in:
caojia
2026-11-04 18:29:47 +08:00
parent 846a41c6df
commit 942d5932ae
11 changed files with 211 additions and 44 deletions
@@ -63,10 +63,10 @@
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="区域类型" prop="areaType">
<el-select v-model="form.areaType" placeholder="请选择区域类型" clearable style="width: 100%;">
<el-form-item label="客户区域" prop="customerArea">
<el-select v-model="form.customerArea" placeholder="请选择客户区域" clearable style="width: 100%;">
<el-option
v-for="dict in data_area_type"
v-for="dict in customer_area"
:key="dict.value"
:label="dict.label"
:value="dict.value"
@@ -739,7 +739,7 @@ const router = useRouter()
const { settlement_type } = useDict('settlement_type')
const { customer_type } = useDict('customer_type')
const { data_area_type } = useDict('data_area_type')
const { customer_area } = useDict('customer_area')
const { ensureProducts, findProduct } = useProducts()
@@ -765,7 +765,7 @@ function buildEmptyForm() {
customerCodeDw: null,
creditCode: null,
customerType: null,
areaType: null,
customerArea: null,
isEnable: null,
salesUserId: null,
salesUser: null,
@@ -30,16 +30,16 @@
/>
</el-select>
</el-form-item>
<el-form-item label="区域类型" prop="areaType">
<el-form-item label="客户区域" prop="customerArea">
<el-select
v-model="queryParams.areaType"
placeholder="请选择区域类型"
v-model="queryParams.customerArea"
placeholder="请选择客户区域"
clearable
style="width: 160px"
@change="handleQuery"
>
<el-option
v-for="dict in data_area_type"
v-for="dict in customer_area"
:key="dict.value"
:label="dict.label"
:value="dict.value"
@@ -167,9 +167,9 @@
<dict-tag :options="customer_type" :value="scope.row.customerType" />
</template>
</el-table-column>
<el-table-column v-if="isColVisible('areaType')" label="区域类型" align="center" prop="areaType" width="110">
<el-table-column v-if="isColVisible('customerArea')" label="客户区域" align="center" prop="customerArea" width="110">
<template #default="scope">
<dict-tag :options="data_area_type" :value="scope.row.areaType" />
<dict-tag :options="customer_area" :value="scope.row.customerArea" />
</template>
</el-table-column>
<el-table-column v-if="isColVisible('isEnable')" label="启用状态" align="center" prop="isEnable">
@@ -349,7 +349,7 @@ const columnDefs = [
{ key: 'customerCodeDw', label: '对外代码' },
{ key: 'creditCode', label: '统一社会信用代码' },
{ key: 'customerType', label: '业务类型' },
{ key: 'areaType', label: '区域类型' },
{ key: 'customerArea', label: '客户区域' },
{ key: 'isEnable', label: '启用状态' },
{ key: 'salesUserId', label: '业务员' },
// { key: 'ed', label: '资金额度' },
@@ -378,7 +378,7 @@ const single = ref(true)
const multiple = ref(true)
const total = ref(0)
const { sys_normal_disable, settlement_type, customer_type, data_area_type } = useDict("sys_normal_disable", "settlement_type", "customer_type", "data_area_type")
const { sys_normal_disable, settlement_type, customer_type, customer_area } = useDict("sys_normal_disable", "settlement_type", "customer_type", "customer_area")
/** 绑定产品代码串 -> 产品名称展示(产品代码+名称;查不到的产品回显原代码) */
const { ensureProducts, getProductLabel } = useProducts()
@@ -412,7 +412,7 @@ const copyColumns = computed(() => [
{ key: 'customerCodeDw', label: '对外代码', get: r => r.customerCodeDw || '' },
{ key: 'creditCode', label: '统一社会信用代码', get: r => r.creditCode || '' },
{ key: 'customerType', label: '业务类型', get: r => proxy.selectDictLabel(customer_type.value, r.customerType) },
{ key: 'areaType', label: '区域类型', get: r => proxy.selectDictLabel(data_area_type.value, r.areaType) },
{ key: 'customerArea', label: '客户区域', get: r => proxy.selectDictLabel(customer_area.value, r.customerArea) },
{ key: 'isEnable', label: '启用状态', get: r => proxy.selectDictLabel(sys_normal_disable.value, r.isEnable) },
{ key: 'salesUserId', label: '业务员', get: r => r.salesUserNickName || '' },
{ key: 'zq', label: '回款账期', get: r => (r.zq === null || r.zq === undefined ? '' : r.zq) },
@@ -445,7 +445,7 @@ const data = reactive({
keywords: undefined,
creditCode: undefined,
customerType: undefined,
areaType: undefined,
customerArea: undefined,
isEnable: undefined,
salesUserId: undefined,
salesUser: undefined,