增加计费时间的搜索
This commit is contained in:
@@ -178,11 +178,31 @@ const searchColumns = [
|
||||
options: arrearsStatusOptions,
|
||||
placeholder: '请选择',
|
||||
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) {
|
||||
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) {
|
||||
@@ -231,17 +251,23 @@ function hasBatchFeeQuery(q) {
|
||||
|| hasArr(q.transferNos)
|
||||
|| hasArr(q.customerCodes)
|
||||
|| hasArr(q.productCodes)
|
||||
|| hasArr(q.bizDateRange)
|
||||
|| !!(q.creditArrearsStatus && String(q.creditArrearsStatus).trim())
|
||||
}
|
||||
|
||||
function openBatchFee() {
|
||||
const q = tableRef.value?.getQueryParams?.() || {}
|
||||
const { pageNum, pageSize, ...rest } = q
|
||||
if (!hasBatchFeeQuery(rest)) {
|
||||
const { pageNum, pageSize, bizDateRange, ...rest } = q
|
||||
if (!hasBatchFeeQuery({ ...rest, bizDateRange })) {
|
||||
ElMessage.warning('请先设置列表查询条件')
|
||||
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?.() || []
|
||||
batchFeeOpen.value = true
|
||||
}
|
||||
@@ -316,7 +342,8 @@ function creditArrearsTagType(status) {
|
||||
/* 搜索栏走 BasicTable search-per-row=4 的栅格布局(固定 4 项一行,多余换行),
|
||||
这里只补齐插槽渲染的控件宽度,不再覆盖 BasicForm 的布局 */
|
||||
.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%;
|
||||
}
|
||||
</style>
|
||||
|
||||
@@ -209,6 +209,9 @@ function buildQueryTags(q) {
|
||||
: (q.creditArrearsStatus === 'NORMAL' ? "正常" : q.creditArrearsStatus)
|
||||
tags.push("额度欠费" + ':' + label)
|
||||
}
|
||||
if (q.beginBizDate || q.endBizDate) {
|
||||
tags.push("计费时间:" + (q.beginBizDate || '…') + ' ~ ' + (q.endBizDate || '…'))
|
||||
}
|
||||
return tags
|
||||
}
|
||||
|
||||
@@ -255,7 +258,9 @@ function buildPayload() {
|
||||
transferNos: q.transferNos || [],
|
||||
customerCodes: q.customerCodes || [],
|
||||
productCodes: q.productCodes || [],
|
||||
creditArrearsStatus: q.creditArrearsStatus || undefined
|
||||
creditArrearsStatus: q.creditArrearsStatus || undefined,
|
||||
beginBizDate: q.beginBizDate || undefined,
|
||||
endBizDate: q.endBizDate || undefined
|
||||
}
|
||||
if (scopeMode.value === 'SELECTED') {
|
||||
payload.billIds = (props.selectedIds || []).filter(Boolean)
|
||||
|
||||
Reference in New Issue
Block a user