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