增加计费时间的搜索
This commit is contained in:
+4
@@ -30,6 +30,10 @@ public class BatchAddIncomeBillFeeRequest implements Serializable
|
|||||||
private String countryCode;
|
private String countryCode;
|
||||||
private String creditArrearsStatus;
|
private String creditArrearsStatus;
|
||||||
|
|
||||||
|
/** Billing time range (biz_date), inclusive; format yyyy-MM-dd. */
|
||||||
|
private String beginBizDate;
|
||||||
|
private String endBizDate;
|
||||||
|
|
||||||
/** Surcharge config id (prc_surcharge.sc_id). */
|
/** Surcharge config id (prc_surcharge.sc_id). */
|
||||||
@NotNull(message = "scId required")
|
@NotNull(message = "scId required")
|
||||||
private Long scId;
|
private Long scId;
|
||||||
|
|||||||
+15
-1
@@ -595,13 +595,19 @@ public class PrcOrderBillServiceImpl implements IPrcOrderBillService
|
|||||||
: request.getCreditArrearsStatus().trim();
|
: request.getCreditArrearsStatus().trim();
|
||||||
String countryCode = StringUtils.isEmpty(request.getCountryCode()) ? null
|
String countryCode = StringUtils.isEmpty(request.getCountryCode()) ? null
|
||||||
: request.getCountryCode().trim().toUpperCase();
|
: request.getCountryCode().trim().toUpperCase();
|
||||||
|
String beginBizDate = StringUtils.isEmpty(request.getBeginBizDate()) ? null
|
||||||
|
: request.getBeginBizDate().trim();
|
||||||
|
String endBizDate = StringUtils.isEmpty(request.getEndBizDate()) ? null
|
||||||
|
: request.getEndBizDate().trim();
|
||||||
boolean hasFilter = (orderNos != null && !orderNos.isEmpty())
|
boolean hasFilter = (orderNos != null && !orderNos.isEmpty())
|
||||||
|| (trackingNos != null && !trackingNos.isEmpty())
|
|| (trackingNos != null && !trackingNos.isEmpty())
|
||||||
|| (transferNos != null && !transferNos.isEmpty())
|
|| (transferNos != null && !transferNos.isEmpty())
|
||||||
|| (customerCodes != null && !customerCodes.isEmpty())
|
|| (customerCodes != null && !customerCodes.isEmpty())
|
||||||
|| (productCodes != null && !productCodes.isEmpty())
|
|| (productCodes != null && !productCodes.isEmpty())
|
||||||
|| StringUtils.isNotEmpty(creditArrearsStatus)
|
|| StringUtils.isNotEmpty(creditArrearsStatus)
|
||||||
|| StringUtils.isNotEmpty(countryCode);
|
|| StringUtils.isNotEmpty(countryCode)
|
||||||
|
|| StringUtils.isNotEmpty(beginBizDate)
|
||||||
|
|| StringUtils.isNotEmpty(endBizDate);
|
||||||
if (!hasFilter)
|
if (!hasFilter)
|
||||||
{
|
{
|
||||||
throw new ServiceException(MessageUtils.message("price.bill.fee.batch.filterRequired"));
|
throw new ServiceException(MessageUtils.message("price.bill.fee.batch.filterRequired"));
|
||||||
@@ -625,6 +631,14 @@ public class PrcOrderBillServiceImpl implements IPrcOrderBillService
|
|||||||
query.setProductCodes(productCodes);
|
query.setProductCodes(productCodes);
|
||||||
query.setCreditArrearsStatus(creditArrearsStatus);
|
query.setCreditArrearsStatus(creditArrearsStatus);
|
||||||
query.setCountryCode(countryCode);
|
query.setCountryCode(countryCode);
|
||||||
|
if (beginBizDate != null)
|
||||||
|
{
|
||||||
|
query.getParams().put("beginBizDate", beginBizDate);
|
||||||
|
}
|
||||||
|
if (endBizDate != null)
|
||||||
|
{
|
||||||
|
query.getParams().put("endBizDate", endBizDate);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
// Use self proxy so @DataScope applies
|
// Use self proxy so @DataScope applies
|
||||||
List<PrcOrderBill> list = self.selectBillList(query);
|
List<PrcOrderBill> list = self.selectBillList(query);
|
||||||
|
|||||||
@@ -314,6 +314,12 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||||||
<if test="bizDate != null">
|
<if test="bizDate != null">
|
||||||
AND p.biz_date = #{bizDate}
|
AND p.biz_date = #{bizDate}
|
||||||
</if>
|
</if>
|
||||||
|
<if test="params.beginBizDate != null and params.beginBizDate != ''">
|
||||||
|
AND p.biz_date >= #{params.beginBizDate}
|
||||||
|
</if>
|
||||||
|
<if test="params.endBizDate != null and params.endBizDate != ''">
|
||||||
|
AND p.biz_date <= #{params.endBizDate}
|
||||||
|
</if>
|
||||||
<if test="params.beginTime != null and params.beginTime != ''">
|
<if test="params.beginTime != null and params.beginTime != ''">
|
||||||
AND date_format(p.create_time,'%y%m%d') >= date_format(#{params.beginTime},'%y%m%d')
|
AND date_format(p.create_time,'%y%m%d') >= date_format(#{params.beginTime},'%y%m%d')
|
||||||
</if>
|
</if>
|
||||||
|
|||||||
@@ -178,11 +178,31 @@ const searchColumns = [
|
|||||||
options: arrearsStatusOptions,
|
options: arrearsStatusOptions,
|
||||||
placeholder: '请选择',
|
placeholder: '请选择',
|
||||||
props: { clearable: true }
|
props: { clearable: true }
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: '计费时间',
|
||||||
|
prop: 'bizDateRange',
|
||||||
|
component: 'datetimerange',
|
||||||
|
colSpan: 2,
|
||||||
|
props: {
|
||||||
|
clearable: true,
|
||||||
|
// 只选日期时自动补全为当天 00:00:00 ~ 23:59:59
|
||||||
|
defaultTime: [new Date(2000, 0, 1, 0, 0, 0), new Date(2000, 0, 1, 23, 59, 59)]
|
||||||
|
}
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
|
|
||||||
function queryList(params) {
|
function queryList(params) {
|
||||||
return listBill(params)
|
const { bizDateRange, ...rest } = params
|
||||||
|
const query = { ...rest }
|
||||||
|
if (Array.isArray(bizDateRange) && (bizDateRange[0] || bizDateRange[1])) {
|
||||||
|
query.params = {
|
||||||
|
...(query.params || {}),
|
||||||
|
beginBizDate: bizDateRange[0] || null,
|
||||||
|
endBizDate: bizDateRange[1] || null
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return listBill(query)
|
||||||
}
|
}
|
||||||
|
|
||||||
function handleUpdateArrears(ids, selection) {
|
function handleUpdateArrears(ids, selection) {
|
||||||
@@ -231,17 +251,23 @@ function hasBatchFeeQuery(q) {
|
|||||||
|| hasArr(q.transferNos)
|
|| hasArr(q.transferNos)
|
||||||
|| hasArr(q.customerCodes)
|
|| hasArr(q.customerCodes)
|
||||||
|| hasArr(q.productCodes)
|
|| hasArr(q.productCodes)
|
||||||
|
|| hasArr(q.bizDateRange)
|
||||||
|| !!(q.creditArrearsStatus && String(q.creditArrearsStatus).trim())
|
|| !!(q.creditArrearsStatus && String(q.creditArrearsStatus).trim())
|
||||||
}
|
}
|
||||||
|
|
||||||
function openBatchFee() {
|
function openBatchFee() {
|
||||||
const q = tableRef.value?.getQueryParams?.() || {}
|
const q = tableRef.value?.getQueryParams?.() || {}
|
||||||
const { pageNum, pageSize, ...rest } = q
|
const { pageNum, pageSize, bizDateRange, ...rest } = q
|
||||||
if (!hasBatchFeeQuery(rest)) {
|
if (!hasBatchFeeQuery({ ...rest, bizDateRange })) {
|
||||||
ElMessage.warning('请先设置列表查询条件')
|
ElMessage.warning('请先设置列表查询条件')
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
batchFeeListQuery.value = { ...rest }
|
const listQuery = { ...rest }
|
||||||
|
if (Array.isArray(bizDateRange) && (bizDateRange[0] || bizDateRange[1])) {
|
||||||
|
listQuery.beginBizDate = bizDateRange[0] || null
|
||||||
|
listQuery.endBizDate = bizDateRange[1] || null
|
||||||
|
}
|
||||||
|
batchFeeListQuery.value = listQuery
|
||||||
batchFeeSelectedIds.value = tableRef.value?.getSelectionIds?.() || []
|
batchFeeSelectedIds.value = tableRef.value?.getSelectionIds?.() || []
|
||||||
batchFeeOpen.value = true
|
batchFeeOpen.value = true
|
||||||
}
|
}
|
||||||
@@ -316,7 +342,8 @@ function creditArrearsTagType(status) {
|
|||||||
/* 搜索栏走 BasicTable search-per-row=4 的栅格布局(固定 4 项一行,多余换行),
|
/* 搜索栏走 BasicTable search-per-row=4 的栅格布局(固定 4 项一行,多余换行),
|
||||||
这里只补齐插槽渲染的控件宽度,不再覆盖 BasicForm 的布局 */
|
这里只补齐插槽渲染的控件宽度,不再覆盖 BasicForm 的布局 */
|
||||||
.billing-bill :deep(.basic-form .el-form-item .el-select),
|
.billing-bill :deep(.basic-form .el-form-item .el-select),
|
||||||
.billing-bill :deep(.basic-form .el-form-item .el-input) {
|
.billing-bill :deep(.basic-form .el-form-item .el-input),
|
||||||
|
.billing-bill :deep(.basic-form .el-form-item .el-date-editor) {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|||||||
@@ -209,6 +209,9 @@ function buildQueryTags(q) {
|
|||||||
: (q.creditArrearsStatus === 'NORMAL' ? "正常" : q.creditArrearsStatus)
|
: (q.creditArrearsStatus === 'NORMAL' ? "正常" : q.creditArrearsStatus)
|
||||||
tags.push("额度欠费" + ':' + label)
|
tags.push("额度欠费" + ':' + label)
|
||||||
}
|
}
|
||||||
|
if (q.beginBizDate || q.endBizDate) {
|
||||||
|
tags.push("计费时间:" + (q.beginBizDate || '…') + ' ~ ' + (q.endBizDate || '…'))
|
||||||
|
}
|
||||||
return tags
|
return tags
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -255,7 +258,9 @@ function buildPayload() {
|
|||||||
transferNos: q.transferNos || [],
|
transferNos: q.transferNos || [],
|
||||||
customerCodes: q.customerCodes || [],
|
customerCodes: q.customerCodes || [],
|
||||||
productCodes: q.productCodes || [],
|
productCodes: q.productCodes || [],
|
||||||
creditArrearsStatus: q.creditArrearsStatus || undefined
|
creditArrearsStatus: q.creditArrearsStatus || undefined,
|
||||||
|
beginBizDate: q.beginBizDate || undefined,
|
||||||
|
endBizDate: q.endBizDate || undefined
|
||||||
}
|
}
|
||||||
if (scopeMode.value === 'SELECTED') {
|
if (scopeMode.value === 'SELECTED') {
|
||||||
payload.billIds = (props.selectedIds || []).filter(Boolean)
|
payload.billIds = (props.selectedIds || []).filter(Boolean)
|
||||||
|
|||||||
Reference in New Issue
Block a user