修改计费重去掉客户

This commit is contained in:
wuweihua
2026-10-20 18:48:46 +08:00
parent 66d95a0da9
commit 2d5a2c4bab
3 changed files with 4 additions and 31 deletions
@@ -14,9 +14,6 @@ public class ChargeWeightImportRow implements Serializable
@Excel(name = "订单号")
private String orderNo;
@Excel(name = "客户")
private String customer;
@Excel(name = "人工修改计费重")
private BigDecimal chargeWeight;
}
@@ -2167,20 +2167,11 @@ public class PrcOrderBillServiceImpl implements IPrcOrderBillService
{
throw new ServiceException("人工修改计费重必须大于 0");
}
String customer = row.getCustomer() == null ? "" : row.getCustomer().trim();
if (customer.isEmpty())
{
throw new ServiceException("客户不能为空");
}
PrcOrderBill bill = billByOrderNo.get(orderNo);
if (bill == null)
{
throw new ServiceException("订单不存在");
}
if (!customerMatches(bill, customer))
{
throw new ServiceException("客户与订单不匹配");
}
if (BillRefundStatus.REFUNDED.getCode().equalsIgnoreCase(bill.getRefundStatus()))
{
throw new ServiceException("订单已退费");
@@ -2294,9 +2285,6 @@ public class PrcOrderBillServiceImpl implements IPrcOrderBillService
}
ChargeWeightImportRow row = new ChargeWeightImportRow();
row.setOrderNo(bill.getOrderNo());
String customer = StringUtils.isNotEmpty(bill.getCustomerCode()) ? bill.getCustomerCode()
: bill.getCustomerName();
row.setCustomer(customer);
row.setChargeWeight(null);
rows.add(row);
}
@@ -2353,17 +2341,6 @@ public class PrcOrderBillServiceImpl implements IPrcOrderBillService
return resultChargeWeight;
}
private static boolean customerMatches(PrcOrderBill bill, String customer)
{
if (bill == null || StringUtils.isEmpty(customer))
{
return false;
}
String code = bill.getCustomerCode() == null ? "" : bill.getCustomerCode().trim();
String name = bill.getCustomerName() == null ? "" : bill.getCustomerName().trim();
return customer.equalsIgnoreCase(code) || customer.equals(name);
}
private TmsPriceBillRequest buildBillRequestFromBill(PrcOrderBill bill)
{
TmsPriceBillRequest req = new TmsPriceBillRequest();
+4 -5
View File
@@ -169,8 +169,8 @@
@success="onChargeWeightImportSuccess"
>
<template #extra>
<el-checkbox v-model="cwFillByFilter">按当前筛选条件带出订单号和客户</el-checkbox>
<div class="cw-fill-hint">勾选后下载模板会写入筛选结果的订单号、客户代码;人工修改计费重列留空待填</div>
<el-checkbox v-model="cwFillByFilter">按当前筛选条件带出订单号</el-checkbox>
<div class="cw-fill-hint">勾选后下载模板会写入筛选结果的订单号;人工修改计费重列留空待填</div>
</template>
</excel-import-dialog>
<charge-weight-import-attach-drawer ref="cwImportAttachRef" />
@@ -296,10 +296,9 @@ const editCwRow = ref(null)
const chargeWeightImportRef = ref()
const cwImportAttachRef = ref()
const chargeWeightImportDesc = [
'模板列:订单号、客户、人工修改计费重(kg)',
'客户可填名称或代码,须与订单客户一致',
'模板列:订单号、人工修改计费重(kg)',
'导入后异步写入计费重并重新计费;原计费重(weight)不覆盖',
'下载模板可选:按当前列表筛选条件带出订单号和客户'
'下载模板可选:按当前列表筛选条件带出订单号'
]
const cwFillByFilter = ref(false)
const cwImportProgressVisible = ref(false)