简化实体代码
This commit is contained in:
@@ -59,14 +59,15 @@
|
||||
style="width: 100%"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="业务日期" prop="bizDate">
|
||||
<el-form-item label="计数时间" prop="bizDate">
|
||||
<el-date-picker
|
||||
v-model="form.bizDate"
|
||||
type="date"
|
||||
value-format="YYYY-MM-DD"
|
||||
placeholder="默认今天"
|
||||
placeholder="默认今天,用于筛选已生效的产品明细"
|
||||
style="width: 100%"
|
||||
/>
|
||||
<div class="form-hint">只匹配 effective_date ≤ 计数时间的产品明细;多条匹配时取最新</div>
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
<el-button type="primary" :loading="loading" @click="handleQuote">计算价格</el-button>
|
||||
@@ -88,6 +89,7 @@
|
||||
<el-descriptions-item label="国家">{{ result.countryName || '-' }} ({{ result.countryCode }})</el-descriptions-item>
|
||||
<el-descriptions-item label="计费重量(kg)">{{ result.chargeWeight ?? result.weight }}</el-descriptions-item>
|
||||
<el-descriptions-item label="重量段">{{ result.weightLabel || '-' }}</el-descriptions-item>
|
||||
<el-descriptions-item label="明细生效时间">{{ formatDate(result.effectiveDate) }}</el-descriptions-item>
|
||||
<el-descriptions-item label="计价来源">
|
||||
<el-tag size="small" :type="sourceTagType(result.matchSource)">{{ sourceLabel(result.matchSource) }}</el-tag>
|
||||
</el-descriptions-item>
|
||||
@@ -228,6 +230,14 @@ function formatMoney(val) {
|
||||
return num.toFixed(4)
|
||||
}
|
||||
|
||||
function formatDate(val) {
|
||||
if (!val) return '-'
|
||||
// 兼容后端 java.util.Date 转 ISO 字符串
|
||||
const d = new Date(val)
|
||||
if (Number.isNaN(d.getTime())) return val
|
||||
return d.toISOString().slice(0, 10)
|
||||
}
|
||||
|
||||
function sourceLabel(source) {
|
||||
const map = {
|
||||
PACKAGE_FIXED: '客户固定价套餐',
|
||||
|
||||
Reference in New Issue
Block a user