套餐加分区功能

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
@@ -16,7 +16,7 @@
:closable="false"
show-icon
class="mb12"
title="FIXED 模式:可不填明细(计费取 bms_product_country 默认运费/挂号费);有明细时按产品×国家×重量段覆盖固定价。附加费来自产品关联,只读展示。"
title="FIXED 模式:可不填明细(计费取 bms_product_country 默认运费/挂号费);有明细时按产品×国家×分区×重量段覆盖固定价。附加费来自产品关联,只读展示。"
/>
<el-alert
v-else
@@ -64,6 +64,29 @@
</template>
</el-table-column>
<el-table-column v-if="isFixedType(setType)" label="分区" min-width="140">
<template #default="{ row }">
<el-select
v-if="refData.hasZonesOf(row)"
v-model="row.zoneCode"
filterable
clearable
placeholder="选择分区"
style="width: 100%"
:disabled="!row._countryKey"
@change="onZoneChange(row)"
>
<el-option
v-for="z in refData.zoneOptionsOf(row)"
:key="z.key"
:label="z.label"
:value="z.zoneCode"
/>
</el-select>
<span v-else class="muted">-</span>
</template>
</el-table-column>
<el-table-column v-if="isFixedType(setType)" label="重量段" min-width="150">
<template #default="{ row }">
<el-select
@@ -72,7 +95,7 @@
clearable
placeholder="选择重量段"
style="width: 100%"
:disabled="!row._countryKey"
:disabled="!row._countryKey || (refData.hasZonesOf(row) && !row.zoneCode)"
@change="onWeightChange(row)"
>
<el-option
@@ -158,7 +181,7 @@ const { bms_round_mode } = useDict('bms_round_mode')
/** 参考数据来自父页面,缓存与请求去重全页面共享 */
const { productOptions, surchargesOf, countryOptionsOf, weightOptionsOf } = props.refData
const { onProductChange, onCountryChange, onWeightChange } = useDetailCascade(props.refData)
const { onProductChange, onCountryChange, onZoneChange, onWeightChange } = useDetailCascade(props.refData)
function addRow() {
props.details.push(createEmptyDetailRow())