From 4238c31d9d45eaee342f2a67a934ee7d831d051f Mon Sep 17 00:00:00 2001
From: caojia <1301869380@qq.com>
Date: Tue, 27 Oct 2026 16:47:08 +0800
Subject: [PATCH] =?UTF-8?q?=E5=A2=9E=E5=8A=A0=E5=8F=8D=E6=A0=B8=E9=94=80?=
=?UTF-8?q?=E6=8C=89=E9=92=AE?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
bms-front/src/views/ar/bill/index.vue | 15 ++++++++++++++-
1 file changed, 14 insertions(+), 1 deletion(-)
diff --git a/bms-front/src/views/ar/bill/index.vue b/bms-front/src/views/ar/bill/index.vue
index f40d8d0c..f7fa3bc3 100644
--- a/bms-front/src/views/ar/bill/index.vue
+++ b/bms-front/src/views/ar/bill/index.vue
@@ -45,6 +45,7 @@
作废
导出明细
去核销
+ 反核销
@@ -150,7 +151,7 @@ const columns = [
{ label: '账单截止日', prop: 'billPeriodEnd', minWidth: 120, formatter: row => `截至 ${date(row.billPeriodEnd)}` }, { label: '订单数', prop: 'orderCount', width: 80 },
{ label: '应收总额', prop: 'totalAmount', width: 120, align: 'right', slot: 'totalAmount' }, { label: '已核销', prop: 'writtenOffAmount', width: 110, align: 'right', slot: 'writtenOffAmount' },
{ label: '未核销', prop: 'unwrittenAmount', width: 110, align: 'right', slot: 'unwrittenAmount' }, { label: '状态', prop: 'status', width: 110, slot: 'status' },
- { label: '账单日期', prop: 'billDate', width: 120, formatter: row => date(row.billDate) }, { label: '操作', prop: 'action', width: 330, fixed: 'right', slot: 'action', showInToolbar: false }
+ { label: '账单日期', prop: 'billDate', width: 120, formatter: row => date(row.billDate) }, { label: '操作', prop: 'action', width: 380, fixed: 'right', slot: 'action', showInToolbar: false }
]
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' },
@@ -392,8 +393,20 @@ function canGoWriteoff(row) {
|| row.status === AR_BILL_STATUS.PARTIAL_WRITTEN_OFF
return canWriteoffStatus && Number(row.unwrittenAmount) > 0
}
+function canGoReverseWriteoff(row) {
+ if (!row?.customerId || !(Number(row.writtenOffAmount) > 0)) return false
+ return row.status === AR_BILL_STATUS.PARTIAL_WRITTEN_OFF
+ || row.status === AR_BILL_STATUS.WRITTEN_OFF
+}
function goWriteoff(row) {
if (!canGoWriteoff(row)) return
+ goCustomerBillWriteoff(row)
+}
+function goReverseWriteoff(row) {
+ if (!canGoReverseWriteoff(row)) return
+ goCustomerBillWriteoff(row)
+}
+function goCustomerBillWriteoff(row) {
router.push({
path: '/customersupplier/customer-money/index',
query: {