应付邮编调整和订单应付计费的附加费调整
This commit is contained in:
@@ -15,7 +15,7 @@
|
||||
<div class="zone-toolbar">
|
||||
<el-button type="primary" plain icon="Plus" size="small" :disabled="!country" @click="handleAdd" v-hasPermi="['data:payPostcode:edit']">新增分区</el-button>
|
||||
</div>
|
||||
<el-table :data="zoneList" border row-key="zoneName" :empty-text="country ? '这个国家还没有分区' : '请选择国家'">
|
||||
<el-table :data="zoneList" border :row-key="rowKey" :empty-text="country ? '这个国家还没有分区' : '请选择国家'">
|
||||
<el-table-column label="分区" min-width="180" align="center">
|
||||
<template #default="{ row }">
|
||||
<div class="zone-country-cell">
|
||||
@@ -24,6 +24,9 @@
|
||||
</div>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="渠道" min-width="140" align="center" show-overflow-tooltip>
|
||||
<template #default="{ row }">{{ row.channelName || '-' }}</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="邮编属性" width="120" align="center">
|
||||
<template #default="{ row }">
|
||||
<el-tag v-if="row.coverage" size="small" :type="coverageType(firstPart(row.coverage))">{{ coverageLabel(firstPart(row.coverage)) }}</el-tag>
|
||||
@@ -81,6 +84,10 @@ function coverageType(value) {
|
||||
return 'success'
|
||||
}
|
||||
|
||||
function rowKey(row) {
|
||||
return (row.zoneName || '') + '||' + (row.channelName || '')
|
||||
}
|
||||
|
||||
function open(row) {
|
||||
country.value = row
|
||||
visible.value = true
|
||||
@@ -93,7 +100,11 @@ function loadList() {
|
||||
return
|
||||
}
|
||||
loading.value = true
|
||||
listPayPostcodeZone({ countryCode: country.value.countryCode, countryName: country.value.countryName }).then(res => {
|
||||
listPayPostcodeZone({
|
||||
countryCode: country.value.countryCode,
|
||||
countryName: country.value.countryName,
|
||||
allChannels: true
|
||||
}).then(res => {
|
||||
zoneList.value = res.data || []
|
||||
}).catch(() => {
|
||||
zoneList.value = []
|
||||
@@ -116,10 +127,12 @@ function handleEdit(row) {
|
||||
}
|
||||
|
||||
function handleDelete(row) {
|
||||
proxy.$modal.confirm('删除分区「' + row.zoneName + '」及其邮编?').then(() => {
|
||||
const channel = row.channelName ? '(' + row.channelName + ')' : ''
|
||||
proxy.$modal.confirm('删除分区「' + row.zoneName + '」' + channel + '及其邮编?').then(() => {
|
||||
return delPayPostcodeZone({
|
||||
countryCode: country.value.countryCode,
|
||||
countryName: country.value.countryName,
|
||||
channelName: row.channelName || '',
|
||||
zoneName: row.zoneName
|
||||
})
|
||||
}).then(() => {
|
||||
@@ -129,7 +142,7 @@ function handleDelete(row) {
|
||||
}
|
||||
|
||||
function openLines(row) {
|
||||
lineRef.value.open(country.value, row)
|
||||
lineRef.value.open({ ...country.value, channelName: row.channelName || '' }, row)
|
||||
}
|
||||
|
||||
defineExpose({ open })
|
||||
|
||||
Reference in New Issue
Block a user