应付邮编优化和应付列表去除多余字段
This commit is contained in:
@@ -6,16 +6,16 @@
|
||||
<span v-if="country" class="drawer-sub">
|
||||
{{ country.countryName || '未填写国家' }}
|
||||
<template v-if="country.countryCode">({{ country.countryCode }})</template>
|
||||
,共 {{ zoneList.length }} 个分区
|
||||
,共 {{ total }} 个分区
|
||||
</span>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<div v-loading="loading">
|
||||
<div>
|
||||
<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="rowKey" :empty-text="country ? '这个国家还没有分区' : '请选择国家'">
|
||||
<el-table v-loading="loading" :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">
|
||||
@@ -42,6 +42,17 @@
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<div class="drawer-pager">
|
||||
<el-pagination
|
||||
v-model:current-page="query.pageNum"
|
||||
v-model:page-size="query.pageSize"
|
||||
:total="total"
|
||||
:page-sizes="[20, 50, 100, 200]"
|
||||
layout="total, sizes, prev, pager, next"
|
||||
@size-change="loadList"
|
||||
@current-change="loadList"
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<pay-zone-form-dialog ref="formRef" :country="country" @success="onChanged" />
|
||||
@@ -61,6 +72,8 @@ const visible = ref(false)
|
||||
const loading = ref(false)
|
||||
const country = ref(null)
|
||||
const zoneList = ref([])
|
||||
const total = ref(0)
|
||||
const query = ref({ pageNum: 1, pageSize: 20 })
|
||||
const formRef = ref()
|
||||
const lineRef = ref()
|
||||
|
||||
@@ -92,6 +105,7 @@ function rowKey(row) {
|
||||
|
||||
function open(row) {
|
||||
country.value = row
|
||||
query.value = { pageNum: 1, pageSize: 20 }
|
||||
visible.value = true
|
||||
loadList()
|
||||
}
|
||||
@@ -99,17 +113,22 @@ function open(row) {
|
||||
function loadList() {
|
||||
if (!country.value) {
|
||||
zoneList.value = []
|
||||
total.value = 0
|
||||
return
|
||||
}
|
||||
loading.value = true
|
||||
listPayPostcodeZone({
|
||||
countryCode: country.value.countryCode,
|
||||
countryName: country.value.countryName,
|
||||
allChannels: true
|
||||
allChannels: true,
|
||||
pageNum: query.value.pageNum,
|
||||
pageSize: query.value.pageSize
|
||||
}).then(res => {
|
||||
zoneList.value = res.data || []
|
||||
zoneList.value = res.rows || []
|
||||
total.value = res.total || 0
|
||||
}).catch(() => {
|
||||
zoneList.value = []
|
||||
total.value = 0
|
||||
}).finally(() => {
|
||||
loading.value = false
|
||||
})
|
||||
@@ -158,4 +177,5 @@ defineExpose({ open })
|
||||
.zone-country-cell { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 4px 0; }
|
||||
.zone-title { font-weight: 500; }
|
||||
.zone-click { padding: 0; height: auto; font-size: 12px; }
|
||||
.drawer-pager { margin-top: 16px; display: flex; justify-content: flex-end; }
|
||||
</style>
|
||||
|
||||
@@ -40,10 +40,6 @@
|
||||
<span v-else>{{ row.sourceFile || '-' }}</span>
|
||||
</template>
|
||||
|
||||
<template #col-parseStatus="{ row }">
|
||||
<el-tag :type="statusType(row.parseStatus)" size="small">{{ statusText(row.parseStatus) }}</el-tag>
|
||||
</template>
|
||||
|
||||
<template #col-termRange="{ row }">
|
||||
<span>{{ termText(row) }}</span>
|
||||
</template>
|
||||
@@ -262,19 +258,14 @@ const statusOptions = [
|
||||
|
||||
const columns = [
|
||||
{ label: '应付价卡名称', prop: 'productName', align: 'center', minWidth: 180, showOverflowTooltip: true, fixed: 'left' },
|
||||
{ label: '价卡归属', prop: 'supplierName', align: 'center', width: 100 },
|
||||
{ label: '国家/口岸', prop: 'countryScope', align: 'center', minWidth: 120, showOverflowTooltip: true },
|
||||
{ label: '费用类型', prop: 'chargeType', align: 'center', width: 110 },
|
||||
{ label: '每公斤加价', prop: 'extraPerKg', align: 'center', width: 120 },
|
||||
{ label: '报价工作表', prop: 'sheetName', align: 'center', minWidth: 140, showOverflowTooltip: true },
|
||||
{ label: '关联分区表', prop: 'relatedSheet', align: 'center', minWidth: 140, showOverflowTooltip: true },
|
||||
{ label: '版本', prop: 'versionNo', align: 'center', width: 70 },
|
||||
{ label: '有效期', prop: 'termRange', align: 'center', minWidth: 180, showOverflowTooltip: true },
|
||||
{ label: '状态', prop: 'termStatus', align: 'center', width: 100 },
|
||||
{ label: '币种', prop: 'currency', align: 'center', width: 80 },
|
||||
{ label: '重量段', prop: 'weightCount', align: 'center', width: 80 },
|
||||
{ label: '附加费', prop: 'surchargeCount', align: 'center', width: 80 },
|
||||
{ label: '识别结果', prop: 'parseStatus', align: 'center', width: 120 },
|
||||
{ label: '来源文件', prop: 'sourceFile', align: 'center', minWidth: 180, showOverflowTooltip: true },
|
||||
{ label: '创建时间', prop: 'createTime', align: 'center', width: 160, parseTime: true },
|
||||
{ label: '操作', prop: 'action', align: 'center', width: 340, fixed: 'right', showInToolbar: false }
|
||||
@@ -588,16 +579,6 @@ function changeStatus(row, field, status) {
|
||||
})
|
||||
}
|
||||
|
||||
function statusText(status) {
|
||||
return statusOptions.find(item => item.value === status)?.label || status || '-'
|
||||
}
|
||||
|
||||
function statusType(status) {
|
||||
if (status === 'OK') return 'success'
|
||||
if (status === 'EMPTY') return 'warning'
|
||||
if (status === 'MISSING') return 'danger'
|
||||
return 'info'
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
|
||||
Reference in New Issue
Block a user