✨ 应收账单状态筛选支持多选并默认排除作废
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
package com.bms.ar.domain.vo;
|
||||
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
import org.springframework.format.annotation.DateTimeFormat;
|
||||
import com.bms.ar.domain.ArBill;
|
||||
import lombok.Data;
|
||||
@@ -13,6 +14,9 @@ public class ArBillQuery extends ArBill
|
||||
{
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/** 多选账单状态;为空时与旧版 status 参数保持兼容并表示不按状态筛选。 */
|
||||
private List<String> statuses;
|
||||
|
||||
/** 账单日期查询起始日。 */
|
||||
@DateTimeFormat(pattern = "yyyy-MM-dd")
|
||||
private Date billDateStart;
|
||||
|
||||
@@ -85,7 +85,15 @@
|
||||
'%')
|
||||
</if>
|
||||
<if test="query.customerId != null">and customer_id = #{query.customerId}</if>
|
||||
<if test="query.status != null and query.status != ''">and status = #{query.status}</if>
|
||||
<choose>
|
||||
<when test="query.statuses != null and query.statuses.size() > 0">
|
||||
and status in
|
||||
<foreach collection="query.statuses" item="statusValue" open="(" separator="," close=")">
|
||||
#{statusValue}
|
||||
</foreach>
|
||||
</when>
|
||||
<when test="query.status != null and query.status != ''">and status = #{query.status}</when>
|
||||
</choose>
|
||||
<if test="query.currency != null and query.currency != ''">and currency = #{query.currency}</if>
|
||||
<if test="query.billDateStart != null">and bill_date >= #{query.billDateStart}</if>
|
||||
<if test="query.billDateEnd != null">and bill_date <= #{query.billDateEnd}</if>
|
||||
|
||||
@@ -80,7 +80,13 @@ const router = useRouter()
|
||||
const tableRef = ref()
|
||||
// 从客户余额页“查看账单”跳入时,按当前客户预筛选(重置后仍保留该条件)
|
||||
const defaultSearchParams = computed(() => ({
|
||||
customerId: route.query.customerId ? Number(route.query.customerId) : undefined
|
||||
customerId: route.query.customerId ? Number(route.query.customerId) : undefined,
|
||||
statuses: [
|
||||
AR_BILL_STATUS.DRAFT,
|
||||
AR_BILL_STATUS.CONFIRMED,
|
||||
AR_BILL_STATUS.PARTIAL_WRITTEN_OFF,
|
||||
AR_BILL_STATUS.WRITTEN_OFF
|
||||
]
|
||||
}))
|
||||
const detailOpen = ref(false)
|
||||
const detailLoading = ref(false)
|
||||
@@ -158,7 +164,7 @@ const columns = [
|
||||
]
|
||||
const searchColumns = [
|
||||
{ label: '账单号', prop: 'billNo', component: 'input', placeholder: '账单号', width: '180px' }, { label: '账单名称', prop: 'billName', component: 'input', placeholder: '账单名称', width: '180px' }, { label: '客户名称', prop: 'customerId', component: 'input', placeholder: '请选择客户', width: '220px' },
|
||||
{ label: '状态', prop: 'status', component: 'select', options: statusOptions, placeholder: '全部状态', width: '150px' }, { label: '账单日期', prop: 'billDateRange', component: 'daterange', width: '300px' }, { label: '账单截止日', prop: 'billPeriodEnd', component: 'date', width: '160px' }
|
||||
{ label: '状态', prop: 'statuses', component: 'select', options: statusOptions, placeholder: '请选择状态', width: '190px', props: { multiple: true, clearable: true, collapseTags: true, collapseTagsTooltip: true } }, { label: '账单日期', prop: 'billDateRange', component: 'daterange', width: '300px' }, { label: '账单截止日', prop: 'billPeriodEnd', component: 'date', width: '160px' }
|
||||
]
|
||||
|
||||
// 将页面日期范围转换为后端查询字段,其他筛选条件原样透传。
|
||||
|
||||
Reference in New Issue
Block a user