修改计费详情应付显示
This commit is contained in:
+3
-1
@@ -56,8 +56,10 @@ public class TmsPriceQuoteResult implements Serializable
|
|||||||
private String currency = "CNY";
|
private String currency = "CNY";
|
||||||
/** UP / DOWN / HALF_UP */
|
/** UP / DOWN / HALF_UP */
|
||||||
private String roundMode;
|
private String roundMode;
|
||||||
/** 费用明细:运费/挂号费各一行,附加费按具体名称各一行 */
|
/** 应收费用明细(兼容旧字段 feeDetails) */
|
||||||
private List<TmsPriceQuoteFeeLine> feeDetails;
|
private List<TmsPriceQuoteFeeLine> feeDetails;
|
||||||
|
/** 应付费用明细 */
|
||||||
|
private List<TmsPriceQuoteFeeLine> payFeeDetails;
|
||||||
private String quoteId;
|
private String quoteId;
|
||||||
private String billId;
|
private String billId;
|
||||||
private String orderNo;
|
private String orderNo;
|
||||||
|
|||||||
+57
-20
@@ -18,11 +18,13 @@ import com.ruoyi.common.utils.StringUtils;
|
|||||||
import com.ruoyi.common.utils.sign.Md5Utils;
|
import com.ruoyi.common.utils.sign.Md5Utils;
|
||||||
import com.ruoyi.price.domain.PrcIncomeBillFee;
|
import com.ruoyi.price.domain.PrcIncomeBillFee;
|
||||||
import com.ruoyi.price.domain.PrcOrderBill;
|
import com.ruoyi.price.domain.PrcOrderBill;
|
||||||
|
import com.ruoyi.price.domain.PrcPayBillFee;
|
||||||
import com.ruoyi.price.domain.vo.TmsPriceBillRequest;
|
import com.ruoyi.price.domain.vo.TmsPriceBillRequest;
|
||||||
import com.ruoyi.price.domain.vo.TmsPriceQuoteFeeLine;
|
import com.ruoyi.price.domain.vo.TmsPriceQuoteFeeLine;
|
||||||
import com.ruoyi.price.domain.vo.TmsPriceQuoteResult;
|
import com.ruoyi.price.domain.vo.TmsPriceQuoteResult;
|
||||||
import com.ruoyi.price.mapper.PrcIncomeBillFeeMapper;
|
import com.ruoyi.price.mapper.PrcIncomeBillFeeMapper;
|
||||||
import com.ruoyi.price.mapper.PrcOrderBillMapper;
|
import com.ruoyi.price.mapper.PrcOrderBillMapper;
|
||||||
|
import com.ruoyi.price.mapper.PrcPayBillFeeMapper;
|
||||||
import com.ruoyi.price.search.EsBizLogSupport;
|
import com.ruoyi.price.search.EsBizLogSupport;
|
||||||
import com.ruoyi.price.search.EsLogType;
|
import com.ruoyi.price.search.EsLogType;
|
||||||
import com.ruoyi.price.search.IBillSearchStore;
|
import com.ruoyi.price.search.IBillSearchStore;
|
||||||
@@ -41,6 +43,9 @@ public class PrcOrderBillServiceImpl implements IPrcOrderBillService
|
|||||||
@Autowired
|
@Autowired
|
||||||
private PrcIncomeBillFeeMapper incomeBillFeeMapper;
|
private PrcIncomeBillFeeMapper incomeBillFeeMapper;
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
private PrcPayBillFeeMapper payBillFeeMapper;
|
||||||
|
|
||||||
@Autowired
|
@Autowired
|
||||||
private IBillSearchStore billSearchStore;
|
private IBillSearchStore billSearchStore;
|
||||||
|
|
||||||
@@ -90,7 +95,8 @@ public class PrcOrderBillServiceImpl implements IPrcOrderBillService
|
|||||||
{
|
{
|
||||||
throw new ServiceException(MessageUtils.message("price.bill.notFound"));
|
throw new ServiceException(MessageUtils.message("price.bill.notFound"));
|
||||||
}
|
}
|
||||||
return toResult(bill, incomeBillFeeMapper.selectByBillId(billId));
|
return toResult(bill, incomeBillFeeMapper.selectByBillId(billId),
|
||||||
|
payBillFeeMapper.selectByBillId(billId));
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@@ -105,7 +111,8 @@ public class PrcOrderBillServiceImpl implements IPrcOrderBillService
|
|||||||
{
|
{
|
||||||
throw new ServiceException(MessageUtils.message("price.bill.notFound"));
|
throw new ServiceException(MessageUtils.message("price.bill.notFound"));
|
||||||
}
|
}
|
||||||
return toResult(bill, incomeBillFeeMapper.selectByBillId(bill.getBillId()));
|
return toResult(bill, incomeBillFeeMapper.selectByBillId(bill.getBillId()),
|
||||||
|
payBillFeeMapper.selectByBillId(bill.getBillId()));
|
||||||
}
|
}
|
||||||
|
|
||||||
private void persistBill(TmsPriceBillRequest request, BigDecimal weight, Date bizDate,
|
private void persistBill(TmsPriceBillRequest request, BigDecimal weight, Date bizDate,
|
||||||
@@ -218,7 +225,8 @@ public class PrcOrderBillServiceImpl implements IPrcOrderBillService
|
|||||||
return fees;
|
return fees;
|
||||||
}
|
}
|
||||||
|
|
||||||
private TmsPriceQuoteResult toResult(PrcOrderBill bill, List<PrcIncomeBillFee> fees)
|
private TmsPriceQuoteResult toResult(PrcOrderBill bill, List<PrcIncomeBillFee> incomeFees,
|
||||||
|
List<PrcPayBillFee> payFees)
|
||||||
{
|
{
|
||||||
TmsPriceQuoteResult r = new TmsPriceQuoteResult();
|
TmsPriceQuoteResult r = new TmsPriceQuoteResult();
|
||||||
r.setBillId(bill.getBillId());
|
r.setBillId(bill.getBillId());
|
||||||
@@ -258,26 +266,55 @@ public class PrcOrderBillServiceImpl implements IPrcOrderBillService
|
|||||||
r.setCurrency(bill.getCurrency());
|
r.setCurrency(bill.getCurrency());
|
||||||
r.setRoundMode(bill.getRoundMode());
|
r.setRoundMode(bill.getRoundMode());
|
||||||
r.setBizDate(bill.getBizDate());
|
r.setBizDate(bill.getBizDate());
|
||||||
List<TmsPriceQuoteFeeLine> lines = new ArrayList<TmsPriceQuoteFeeLine>();
|
r.setFeeDetails(toIncomeFeeLines(incomeFees));
|
||||||
if (fees != null)
|
r.setPayFeeDetails(toPayFeeLines(payFees));
|
||||||
{
|
|
||||||
for (PrcIncomeBillFee fee : fees)
|
|
||||||
{
|
|
||||||
TmsPriceQuoteFeeLine line = new TmsPriceQuoteFeeLine();
|
|
||||||
line.setFeeType(fee.getFeeType());
|
|
||||||
line.setFeeName(fee.getFeeName());
|
|
||||||
line.setScId(fee.getScId());
|
|
||||||
line.setAmount(fee.getAmount());
|
|
||||||
line.setCurrency(fee.getCurrency());
|
|
||||||
line.setRoundMode(fee.getRoundMode());
|
|
||||||
line.setRemark(fee.getRemark());
|
|
||||||
lines.add(line);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
r.setFeeDetails(lines);
|
|
||||||
return r;
|
return r;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private List<TmsPriceQuoteFeeLine> toIncomeFeeLines(List<PrcIncomeBillFee> fees)
|
||||||
|
{
|
||||||
|
List<TmsPriceQuoteFeeLine> lines = new ArrayList<TmsPriceQuoteFeeLine>();
|
||||||
|
if (fees == null)
|
||||||
|
{
|
||||||
|
return lines;
|
||||||
|
}
|
||||||
|
for (PrcIncomeBillFee fee : fees)
|
||||||
|
{
|
||||||
|
TmsPriceQuoteFeeLine line = new TmsPriceQuoteFeeLine();
|
||||||
|
line.setFeeType(fee.getFeeType());
|
||||||
|
line.setFeeName(fee.getFeeName());
|
||||||
|
line.setScId(fee.getScId());
|
||||||
|
line.setAmount(fee.getAmount());
|
||||||
|
line.setCurrency(fee.getCurrency());
|
||||||
|
line.setRoundMode(fee.getRoundMode());
|
||||||
|
line.setRemark(fee.getRemark());
|
||||||
|
lines.add(line);
|
||||||
|
}
|
||||||
|
return lines;
|
||||||
|
}
|
||||||
|
|
||||||
|
private List<TmsPriceQuoteFeeLine> toPayFeeLines(List<PrcPayBillFee> fees)
|
||||||
|
{
|
||||||
|
List<TmsPriceQuoteFeeLine> lines = new ArrayList<TmsPriceQuoteFeeLine>();
|
||||||
|
if (fees == null)
|
||||||
|
{
|
||||||
|
return lines;
|
||||||
|
}
|
||||||
|
for (PrcPayBillFee fee : fees)
|
||||||
|
{
|
||||||
|
TmsPriceQuoteFeeLine line = new TmsPriceQuoteFeeLine();
|
||||||
|
line.setFeeType(fee.getFeeType());
|
||||||
|
line.setFeeName(fee.getFeeName());
|
||||||
|
line.setScId(fee.getScId());
|
||||||
|
line.setAmount(fee.getAmount());
|
||||||
|
line.setCurrency(fee.getCurrency());
|
||||||
|
line.setRoundMode(fee.getRoundMode());
|
||||||
|
line.setRemark(fee.getRemark());
|
||||||
|
lines.add(line);
|
||||||
|
}
|
||||||
|
return lines;
|
||||||
|
}
|
||||||
|
|
||||||
private void fillResultOrder(TmsPriceQuoteResult r, PrcOrderBill bill)
|
private void fillResultOrder(TmsPriceQuoteResult r, PrcOrderBill bill)
|
||||||
{
|
{
|
||||||
r.setTrackingNo(bill.getTrackingNo());
|
r.setTrackingNo(bill.getTrackingNo());
|
||||||
|
|||||||
@@ -77,33 +77,66 @@
|
|||||||
</div>
|
</div>
|
||||||
</section>
|
</section>
|
||||||
|
|
||||||
<section v-if="detail.feeDetails && detail.feeDetails.length" class="detail-block">
|
<section class="detail-block">
|
||||||
<div class="sec-title">费用明细</div>
|
<div class="sec-title">费用明细</div>
|
||||||
<el-table :data="detail.feeDetails" border size="small" class="fee-table">
|
<el-tabs v-model="feeTab" class="fee-tabs">
|
||||||
<el-table-column label="费用名称" min-width="140" show-overflow-tooltip>
|
<el-tab-pane label="应收" name="income">
|
||||||
<template #default="{ row }">{{ displayFeeName(row) }}</template>
|
<el-table v-if="incomeFees.length" :data="incomeFees" border size="small" class="fee-table">
|
||||||
</el-table-column>
|
<el-table-column label="费用名称" min-width="140" show-overflow-tooltip>
|
||||||
<el-table-column label="费用类型" width="110" align="center">
|
<template #default="{ row }">{{ displayFeeName(row) }}</template>
|
||||||
<template #default="{ row }">
|
</el-table-column>
|
||||||
<el-tag size="small" :type="feeTypeTag(row.feeType)" effect="plain">
|
<el-table-column label="费用类型" width="110" align="center">
|
||||||
{{ feeTypeLabel(row.feeType) || row.feeType }}
|
<template #default="{ row }">
|
||||||
</el-tag>
|
<el-tag size="small" :type="feeTypeTag(row.feeType)" effect="plain">
|
||||||
</template>
|
{{ feeTypeLabel(row.feeType) || row.feeType }}
|
||||||
</el-table-column>
|
</el-tag>
|
||||||
<el-table-column label="金额" min-width="120" align="right">
|
</template>
|
||||||
<template #default="{ row }">
|
</el-table-column>
|
||||||
<span class="fee-amount">{{ formatMoney(row.amount) }}</span>
|
<el-table-column label="金额" min-width="120" align="right">
|
||||||
</template>
|
<template #default="{ row }">
|
||||||
</el-table-column>
|
<span class="fee-amount">{{ formatMoney(row.amount) }}</span>
|
||||||
<el-table-column label="币种" width="90" align="center">
|
</template>
|
||||||
<template #default="{ row }">
|
</el-table-column>
|
||||||
<dict-tag :options="bms_currency" :value="displayCurrency(row.currency)" />
|
<el-table-column label="币种" width="90" align="center">
|
||||||
</template>
|
<template #default="{ row }">
|
||||||
</el-table-column>
|
<dict-tag :options="bms_currency" :value="displayCurrency(row.currency)" />
|
||||||
<el-table-column label="说明" min-width="160" show-overflow-tooltip>
|
</template>
|
||||||
<template #default="{ row }">{{ row.remark || '-' }}</template>
|
</el-table-column>
|
||||||
</el-table-column>
|
<el-table-column label="说明" min-width="160" show-overflow-tooltip>
|
||||||
</el-table>
|
<template #default="{ row }">{{ row.remark || '-' }}</template>
|
||||||
|
</el-table-column>
|
||||||
|
</el-table>
|
||||||
|
<el-empty v-else description="暂无应收明细" :image-size="64" />
|
||||||
|
</el-tab-pane>
|
||||||
|
<el-tab-pane label="应付" name="pay">
|
||||||
|
<el-table v-if="payFees.length" :data="payFees" border size="small" class="fee-table">
|
||||||
|
<el-table-column label="费用名称" min-width="140" show-overflow-tooltip>
|
||||||
|
<template #default="{ row }">{{ displayFeeName(row) }}</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="费用类型" width="110" align="center">
|
||||||
|
<template #default="{ row }">
|
||||||
|
<el-tag size="small" :type="feeTypeTag(row.feeType)" effect="plain">
|
||||||
|
{{ feeTypeLabel(row.feeType) || row.feeType }}
|
||||||
|
</el-tag>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="金额" min-width="120" align="right">
|
||||||
|
<template #default="{ row }">
|
||||||
|
<span class="fee-amount">{{ formatMoney(row.amount) }}</span>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="币种" width="90" align="center">
|
||||||
|
<template #default="{ row }">
|
||||||
|
<dict-tag :options="bms_currency" :value="displayCurrency(row.currency)" />
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="说明" min-width="160" show-overflow-tooltip>
|
||||||
|
<template #default="{ row }">{{ row.remark || '-' }}</template>
|
||||||
|
</el-table-column>
|
||||||
|
</el-table>
|
||||||
|
<el-empty v-else description="暂无应付明细" :image-size="64" />
|
||||||
|
</el-tab-pane>
|
||||||
|
</el-tabs>
|
||||||
</section>
|
</section>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@@ -111,7 +144,7 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script setup>
|
<script setup>
|
||||||
defineProps({
|
const props = defineProps({
|
||||||
modelValue: { type: Boolean, default: false },
|
modelValue: { type: Boolean, default: false },
|
||||||
title: { type: String, default: '计费详情' },
|
title: { type: String, default: '计费详情' },
|
||||||
loading: { type: Boolean, default: false },
|
loading: { type: Boolean, default: false },
|
||||||
@@ -120,8 +153,25 @@ defineProps({
|
|||||||
|
|
||||||
defineEmits(['update:modelValue'])
|
defineEmits(['update:modelValue'])
|
||||||
|
|
||||||
|
const feeTab = ref('income')
|
||||||
const { bms_fee_type, bms_currency } = useDict('bms_fee_type', 'bms_currency')
|
const { bms_fee_type, bms_currency } = useDict('bms_fee_type', 'bms_currency')
|
||||||
|
|
||||||
|
const incomeFees = computed(() => {
|
||||||
|
const d = props.detail
|
||||||
|
if (!d) return []
|
||||||
|
return d.feeDetails || d.incomeFeeDetails || []
|
||||||
|
})
|
||||||
|
|
||||||
|
const payFees = computed(() => {
|
||||||
|
const d = props.detail
|
||||||
|
if (!d) return []
|
||||||
|
return d.payFeeDetails || []
|
||||||
|
})
|
||||||
|
|
||||||
|
watch(() => props.detail, () => {
|
||||||
|
feeTab.value = 'income'
|
||||||
|
})
|
||||||
|
|
||||||
function displayCustomer(row) {
|
function displayCustomer(row) {
|
||||||
if (row.customerName && row.customerCode) return row.customerName + ' (' + row.customerCode + ')'
|
if (row.customerName && row.customerCode) return row.customerName + ' (' + row.customerCode + ')'
|
||||||
return row.customerName || row.customerCode || row.customerId || '-'
|
return row.customerName || row.customerCode || row.customerId || '-'
|
||||||
@@ -309,4 +359,13 @@ function sourceTagType(source) {
|
|||||||
font-variant-numeric: tabular-nums;
|
font-variant-numeric: tabular-nums;
|
||||||
font-weight: 500;
|
font-weight: 500;
|
||||||
}
|
}
|
||||||
|
.fee-tabs {
|
||||||
|
margin-top: 0;
|
||||||
|
}
|
||||||
|
.fee-tabs :deep(.el-tabs__header) {
|
||||||
|
margin-bottom: 12px;
|
||||||
|
}
|
||||||
|
.fee-tabs :deep(.el-empty) {
|
||||||
|
padding: 24px 0;
|
||||||
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|||||||
Reference in New Issue
Block a user