From 8208a7393f1b28e512eb87b3ba56f4d9e59324eb Mon Sep 17 00:00:00 2001 From: caojia <1301869380@qq.com> Date: Wed, 4 Nov 2026 11:19:23 +0800 Subject: [PATCH] =?UTF-8?q?:sparkles:=20=E5=BA=94=E6=94=B6=E8=B4=A6?= =?UTF-8?q?=E5=8D=95=E7=8A=B6=E6=80=81=E7=AD=9B=E9=80=89=E6=94=AF=E6=8C=81?= =?UTF-8?q?=E5=A4=9A=E9=80=89=E5=B9=B6=E9=BB=98=E8=AE=A4=E6=8E=92=E9=99=A4?= =?UTF-8?q?=E4=BD=9C=E5=BA=9F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../main/java/com/bms/ar/domain/vo/ArBillQuery.java | 4 ++++ .../src/main/resources/mapper/ar/ArBillMapper.xml | 10 +++++++++- bms-front/src/views/ar/bill/index.vue | 10 ++++++++-- 3 files changed, 21 insertions(+), 3 deletions(-) diff --git a/bms-back/bms-system/src/main/java/com/bms/ar/domain/vo/ArBillQuery.java b/bms-back/bms-system/src/main/java/com/bms/ar/domain/vo/ArBillQuery.java index 1952c824..70d4ff43 100644 --- a/bms-back/bms-system/src/main/java/com/bms/ar/domain/vo/ArBillQuery.java +++ b/bms-back/bms-system/src/main/java/com/bms/ar/domain/vo/ArBillQuery.java @@ -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 statuses; + /** 账单日期查询起始日。 */ @DateTimeFormat(pattern = "yyyy-MM-dd") private Date billDateStart; diff --git a/bms-back/bms-system/src/main/resources/mapper/ar/ArBillMapper.xml b/bms-back/bms-system/src/main/resources/mapper/ar/ArBillMapper.xml index ed8d8445..924e4cfc 100644 --- a/bms-back/bms-system/src/main/resources/mapper/ar/ArBillMapper.xml +++ b/bms-back/bms-system/src/main/resources/mapper/ar/ArBillMapper.xml @@ -85,7 +85,15 @@ '%') and customer_id = #{query.customerId} - and status = #{query.status} + + + and status in + + #{statusValue} + + + and status = #{query.status} + and currency = #{query.currency} and bill_date >= #{query.billDateStart} and bill_date <= #{query.billDateEnd} diff --git a/bms-front/src/views/ar/bill/index.vue b/bms-front/src/views/ar/bill/index.vue index 01378e17..0ed33c99 100644 --- a/bms-front/src/views/ar/bill/index.vue +++ b/bms-front/src/views/ar/bill/index.vue @@ -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' } ] // 将页面日期范围转换为后端查询字段,其他筛选条件原样透传。