支持按提货时间重新计费
This commit is contained in:
@@ -28,4 +28,6 @@ public class LocalRebillRequest implements Serializable
|
|||||||
private String creditArrearsStatus;
|
private String creditArrearsStatus;
|
||||||
private String beginBizDate;
|
private String beginBizDate;
|
||||||
private String endBizDate;
|
private String endBizDate;
|
||||||
|
private String beginPickupDate;
|
||||||
|
private String endPickupDate;
|
||||||
}
|
}
|
||||||
|
|||||||
+23
-7
@@ -1007,16 +1007,24 @@ public class PrcOrderBillServiceImpl implements IPrcOrderBillService
|
|||||||
: request.getCountryCode().trim().toUpperCase();
|
: request.getCountryCode().trim().toUpperCase();
|
||||||
String beginBizDate = StringUtils.isEmpty(request.getBeginBizDate()) ? null : request.getBeginBizDate().trim();
|
String beginBizDate = StringUtils.isEmpty(request.getBeginBizDate()) ? null : request.getBeginBizDate().trim();
|
||||||
String endBizDate = StringUtils.isEmpty(request.getEndBizDate()) ? null : request.getEndBizDate().trim();
|
String endBizDate = StringUtils.isEmpty(request.getEndBizDate()) ? null : request.getEndBizDate().trim();
|
||||||
boolean hasFilter = (orderNos != null && !orderNos.isEmpty())
|
String beginPickupDate = StringUtils.isEmpty(request.getBeginPickupDate()) ? null
|
||||||
|
: request.getBeginPickupDate().trim();
|
||||||
|
String endPickupDate = StringUtils.isEmpty(request.getEndPickupDate()) ? null
|
||||||
|
: request.getEndPickupDate().trim();
|
||||||
|
boolean hasIdentifier = (orderNos != null && !orderNos.isEmpty())
|
||||||
|| (trackingNos != null && !trackingNos.isEmpty())
|
|| (trackingNos != null && !trackingNos.isEmpty())
|
||||||
|| (transferNos != null && !transferNos.isEmpty())
|
|| (transferNos != null && !transferNos.isEmpty())
|
||||||
|| (orderIdentifiers != null && !orderIdentifiers.isEmpty())
|
|| (orderIdentifiers != null && !orderIdentifiers.isEmpty());
|
||||||
|| (customerCodes != null && !customerCodes.isEmpty())
|
boolean hasCustomer = customerCodes != null && !customerCodes.isEmpty();
|
||||||
|| (productCodes != null && !productCodes.isEmpty())
|
boolean hasBizDate = StringUtils.isNotEmpty(beginBizDate) && StringUtils.isNotEmpty(endBizDate);
|
||||||
|
boolean hasPickupDate = StringUtils.isNotEmpty(beginPickupDate) && StringUtils.isNotEmpty(endPickupDate);
|
||||||
|
boolean hasOtherFilter = (productCodes != null && !productCodes.isEmpty())
|
||||||
|| StringUtils.isNotEmpty(creditArrearsStatus)
|
|| StringUtils.isNotEmpty(creditArrearsStatus)
|
||||||
|| StringUtils.isNotEmpty(countryCode)
|
|| StringUtils.isNotEmpty(countryCode);
|
||||||
|| StringUtils.isNotEmpty(beginBizDate)
|
// Same gate as order-list UI: identifiers, or customer + (bizDate or pickupDate).
|
||||||
|| StringUtils.isNotEmpty(endBizDate);
|
boolean hasFilter = hasIdentifier
|
||||||
|
|| (hasCustomer && (hasBizDate || hasPickupDate))
|
||||||
|
|| hasOtherFilter;
|
||||||
if (!hasFilter)
|
if (!hasFilter)
|
||||||
{
|
{
|
||||||
throw new ServiceException(MessageUtils.message("price.bill.recalc.filterRequired"));
|
throw new ServiceException(MessageUtils.message("price.bill.recalc.filterRequired"));
|
||||||
@@ -1039,6 +1047,14 @@ public class PrcOrderBillServiceImpl implements IPrcOrderBillService
|
|||||||
{
|
{
|
||||||
query.getParams().put("endBizDate", endBizDate);
|
query.getParams().put("endBizDate", endBizDate);
|
||||||
}
|
}
|
||||||
|
if (beginPickupDate != null)
|
||||||
|
{
|
||||||
|
query.getParams().put("beginPickupDate", beginPickupDate);
|
||||||
|
}
|
||||||
|
if (endPickupDate != null)
|
||||||
|
{
|
||||||
|
query.getParams().put("endPickupDate", endPickupDate);
|
||||||
|
}
|
||||||
return query;
|
return query;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -410,7 +410,9 @@ function buildRebillFilter() {
|
|||||||
orderStatuses: Array.isArray(q.orderStatuses) ? q.orderStatuses : [],
|
orderStatuses: Array.isArray(q.orderStatuses) ? q.orderStatuses : [],
|
||||||
billingFailStatuses: Array.isArray(q.billingFailStatuses) ? q.billingFailStatuses : [],
|
billingFailStatuses: Array.isArray(q.billingFailStatuses) ? q.billingFailStatuses : [],
|
||||||
beginBizDate: q.params?.beginBizDate || null,
|
beginBizDate: q.params?.beginBizDate || null,
|
||||||
endBizDate: q.params?.endBizDate || null
|
endBizDate: q.params?.endBizDate || null,
|
||||||
|
beginPickupDate: q.params?.beginPickupDate || null,
|
||||||
|
endPickupDate: q.params?.endPickupDate || null
|
||||||
}
|
}
|
||||||
return filter
|
return filter
|
||||||
}
|
}
|
||||||
@@ -420,7 +422,8 @@ function hasRebillFilter(filter) {
|
|||||||
if (ids.length) return true
|
if (ids.length) return true
|
||||||
const hasCustomer = Array.isArray(filter.customerCodes) && filter.customerCodes.length > 0
|
const hasCustomer = Array.isArray(filter.customerCodes) && filter.customerCodes.length > 0
|
||||||
const hasBizDate = !!(filter.beginBizDate && filter.endBizDate)
|
const hasBizDate = !!(filter.beginBizDate && filter.endBizDate)
|
||||||
return hasCustomer && hasBizDate
|
const hasPickupDate = !!(filter.beginPickupDate && filter.endPickupDate)
|
||||||
|
return hasCustomer && (hasBizDate || hasPickupDate)
|
||||||
}
|
}
|
||||||
|
|
||||||
function buildCheckQuery() {
|
function buildCheckQuery() {
|
||||||
@@ -507,7 +510,7 @@ function openFilterRebill() {
|
|||||||
const identifiers = filter.orderIdentifiers || []
|
const identifiers = filter.orderIdentifiers || []
|
||||||
if (!validateOrderIdentifierLimit(identifiers)) return
|
if (!validateOrderIdentifierLimit(identifiers)) return
|
||||||
if (!hasRebillFilter(filter)) {
|
if (!hasRebillFilter(filter)) {
|
||||||
ElMessage.warning('请输入单号,或选择客户并选择计费时间后再重新计费;也可勾选订单后点重新计费选中')
|
ElMessage.warning('请输入单号,或选择客户并选择计费时间或提货时间后再重新计费;也可勾选订单后点重新计费选中')
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
if (identifiers.length > MAX_REBILL) {
|
if (identifiers.length > MAX_REBILL) {
|
||||||
@@ -518,7 +521,7 @@ function openFilterRebill() {
|
|||||||
if (identifiers.length) {
|
if (identifiers.length) {
|
||||||
confirmText = '将按 ' + identifiers.length + ' 个单号从本地订单表重新计费(不查上游),确认继续?'
|
confirmText = '将按 ' + identifiers.length + ' 个单号从本地订单表重新计费(不查上游),确认继续?'
|
||||||
} else {
|
} else {
|
||||||
confirmText = '将按当前列表筛选(客户 + 计费时间等)从本地订单表重新计费(不查上游),确认继续?'
|
confirmText = '将按当前列表筛选(客户 + 计费时间/提货时间等)从本地订单表重新计费(不查上游),确认继续?'
|
||||||
}
|
}
|
||||||
runLocalRebill(filter, confirmText)
|
runLocalRebill(filter, confirmText)
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user