套餐加分区功能

This commit is contained in:
wuweihua
2026-09-15 14:10:44 +08:00
parent 76208604bb
commit 7679a7d091
26 changed files with 1279 additions and 597 deletions
@@ -37,6 +37,21 @@
</el-select>
</el-form-item>
</el-col>
<el-col v-if="hasZones" :span="12">
<el-form-item label="分区" prop="zoneCode">
<el-select
v-model="form.zoneCode"
filterable
clearable
placeholder="选择分区"
style="width: 100%"
:disabled="!form._countryKey"
@change="onZoneChange(form)"
>
<el-option v-for="z in zoneOptions" :key="z.key" :label="z.label" :value="z.zoneCode" />
</el-select>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="重量段" prop="weightLabel">
<el-select
@@ -45,7 +60,7 @@
clearable
placeholder="选择重量段"
style="width: 100%"
:disabled="!form._countryKey"
:disabled="!form._countryKey || (hasZones && !form.zoneCode)"
@change="onWeightChange(form)"
>
<el-option v-for="w in weightOptions" :key="w.value" :label="w.label" :value="w.value" />
@@ -173,8 +188,8 @@ const emit = defineEmits(['success'])
const { proxy } = getCurrentInstance()
const { bms_round_mode } = useDict('bms_round_mode')
const { productOptions, surchargesOf, countryOptionsOf, weightOptionsOf } = props.refData
const { onProductChange, onCountryChange, onWeightChange } = useDetailCascade(props.refData)
const { productOptions, surchargesOf, countryOptionsOf, zoneOptionsOf, hasZonesOf, weightOptionsOf } = props.refData
const { onProductChange, onCountryChange, onZoneChange, onWeightChange } = useDetailCascade(props.refData)
const visible = ref(false)
const title = ref('')
@@ -189,6 +204,8 @@ const rules = {
const surcharges = computed(() => surchargesOf(form.value))
const countryOptions = computed(() => countryOptionsOf(form.value))
const zoneOptions = computed(() => zoneOptionsOf(form.value))
const hasZones = computed(() => hasZonesOf(form.value))
const weightOptions = computed(() => weightOptionsOf(form.value))
/** 打开弹窗:row 为空表示新增 */
@@ -30,6 +30,9 @@
<el-table-column label="国家" min-width="130">
<template #default="{ row }">{{ row.countryName || row.countryCode || '-' }}</template>
</el-table-column>
<el-table-column label="分区" min-width="120">
<template #default="{ row }">{{ row.zoneName || row.zoneCode || '-' }}</template>
</el-table-column>
<el-table-column label="重量段" prop="weightLabel" min-width="130" />
<el-table-column label="运费单价" min-width="130" align="right">
<template #default="{ row }">
@@ -119,7 +122,7 @@ const details = computed(() => props.set.details || [])
const editable = computed(() => isChildEditable(props.set.status))
const subTitle = computed(() => isFixedType(props.set.setType)
? '按 产品 × 国家 × 重量段 覆盖固定价'
? '按 产品 × 国家 × 分区 × 重量段 覆盖固定价'
: '按产品限定折扣,留空走套餐默认折扣')
const hint = computed(() => isFixedType(props.set.setType)