应收日志调整
This commit is contained in:
@@ -33,6 +33,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||||||
when 'EXPORT' then coalesce(e.file_name, b.bill_no)
|
when 'EXPORT' then coalesce(e.file_name, b.bill_no)
|
||||||
when 'RECEIPT' then r.receipt_no
|
when 'RECEIPT' then r.receipt_no
|
||||||
when 'WRITEOFF' then w.writeoff_no
|
when 'WRITEOFF' then w.writeoff_no
|
||||||
|
when 'BALANCE_WRITEOFF' then bw.writeoff_no
|
||||||
else null
|
else null
|
||||||
end as object_display,
|
end as object_display,
|
||||||
l.from_status, l.to_status, l.before_data, l.after_data, l.operator_id, l.operator_name,
|
l.from_status, l.to_status, l.before_data, l.after_data, l.operator_id, l.operator_name,
|
||||||
@@ -42,6 +43,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||||||
left join ar_bill_export e on e.export_id = case when l.object_type = 'EXPORT' then cast(l.object_id as unsigned) end
|
left join ar_bill_export e on e.export_id = case when l.object_type = 'EXPORT' then cast(l.object_id as unsigned) end
|
||||||
left join ar_receipt r on r.receipt_id = case when l.object_type = 'RECEIPT' then cast(l.object_id as unsigned) end
|
left join ar_receipt r on r.receipt_id = case when l.object_type = 'RECEIPT' then cast(l.object_id as unsigned) end
|
||||||
left join ar_receipt_writeoff w on w.writeoff_id = case when l.object_type = 'WRITEOFF' then cast(l.object_id as unsigned) end
|
left join ar_receipt_writeoff w on w.writeoff_id = case when l.object_type = 'WRITEOFF' then cast(l.object_id as unsigned) end
|
||||||
|
left join ar_balance_writeoff bw on bw.writeoff_id = case when l.object_type = 'BALANCE_WRITEOFF' then cast(l.object_id as unsigned) end
|
||||||
<where>
|
<where>
|
||||||
<if test="arBillId != null">and l.ar_bill_id = #{arBillId}</if>
|
<if test="arBillId != null">and l.ar_bill_id = #{arBillId}</if>
|
||||||
<if test="objectType != null and objectType != ''">and l.object_type = #{objectType}</if>
|
<if test="objectType != null and objectType != ''">and l.object_type = #{objectType}</if>
|
||||||
|
|||||||
@@ -167,9 +167,9 @@ CREATE TABLE IF NOT EXISTS ar_bill_export (
|
|||||||
CREATE TABLE IF NOT EXISTS ar_bill_log (
|
CREATE TABLE IF NOT EXISTS ar_bill_log (
|
||||||
log_id BIGINT(20) NOT NULL AUTO_INCREMENT COMMENT '日志ID',
|
log_id BIGINT(20) NOT NULL AUTO_INCREMENT COMMENT '日志ID',
|
||||||
ar_bill_id BIGINT(20) DEFAULT NULL COMMENT '账单ID',
|
ar_bill_id BIGINT(20) DEFAULT NULL COMMENT '账单ID',
|
||||||
object_type VARCHAR(40) NOT NULL COMMENT 'BILL/RECEIPT/WRITEOFF/EXPORT',
|
object_type VARCHAR(40) NOT NULL COMMENT 'BILL/RECEIPT/WRITEOFF/EXPORT/BALANCE_WRITEOFF',
|
||||||
object_id VARCHAR(64) NOT NULL COMMENT '通用对象ID',
|
object_id VARCHAR(64) NOT NULL COMMENT '通用对象ID',
|
||||||
operation_type VARCHAR(40) NOT NULL COMMENT '操作类型',
|
operation_type VARCHAR(40) NOT NULL COMMENT '操作类型:CONFIRM/VOID/EXPORT/RECEIPT/CANCEL_RECEIPT/WRITEOFF/CANCEL_WRITEOFF/BALANCE_WRITEOFF/CANCEL_BALANCE_WRITEOFF',
|
||||||
operation_desc VARCHAR(500) DEFAULT NULL COMMENT '操作说明',
|
operation_desc VARCHAR(500) DEFAULT NULL COMMENT '操作说明',
|
||||||
from_status VARCHAR(30) DEFAULT NULL COMMENT '变更前状态',
|
from_status VARCHAR(30) DEFAULT NULL COMMENT '变更前状态',
|
||||||
to_status VARCHAR(30) DEFAULT NULL COMMENT '变更后状态',
|
to_status VARCHAR(30) DEFAULT NULL COMMENT '变更后状态',
|
||||||
|
|||||||
@@ -0,0 +1,6 @@
|
|||||||
|
-- 应收日志兼容余额核销:仅更新字段注释,不改变字段类型和历史数据
|
||||||
|
ALTER TABLE ar_bill_log
|
||||||
|
MODIFY COLUMN object_type VARCHAR(40) NOT NULL
|
||||||
|
COMMENT 'BILL/RECEIPT/WRITEOFF/EXPORT/BALANCE_WRITEOFF',
|
||||||
|
MODIFY COLUMN operation_type VARCHAR(40) NOT NULL
|
||||||
|
COMMENT '操作类型:CONFIRM/VOID/EXPORT/RECEIPT/CANCEL_RECEIPT/WRITEOFF/CANCEL_WRITEOFF/BALANCE_WRITEOFF/CANCEL_BALANCE_WRITEOFF';
|
||||||
@@ -10,7 +10,7 @@
|
|||||||
import { listArBillLogs } from '@/api/ar/bill'
|
import { listArBillLogs } from '@/api/ar/bill'
|
||||||
const tableRef = ref()
|
const tableRef = ref()
|
||||||
const searchColumns = [
|
const searchColumns = [
|
||||||
{ label: '对象类型', prop: 'objectType', component: 'select', options: [{ label: '应收账单', value: 'BILL' }, { label: '账单导出', value: 'EXPORT' }, { label: '应收收款', value: 'RECEIPT' }, { label: '收款核销', value: 'WRITEOFF' }], width: '130px' },
|
{ label: '对象类型', prop: 'objectType', component: 'select', options: [{ label: '应收账单', value: 'BILL' }, { label: '账单导出', value: 'EXPORT' }, { label: '应收收款', value: 'RECEIPT' }, { label: '收款核销', value: 'WRITEOFF' }, { label: '余额核销', value: 'BALANCE_WRITEOFF' }], width: '130px' },
|
||||||
{ label: '操作类型', prop: 'operationType', component: 'input', width: '140px' }, { label: '结果', prop: 'result', component: 'select', options: [{ label: '成功', value: 'SUCCESS' }, { label: '失败', value: 'FAILED' }], width: '120px' }
|
{ label: '操作类型', prop: 'operationType', component: 'input', width: '140px' }, { label: '结果', prop: 'result', component: 'select', options: [{ label: '成功', value: 'SUCCESS' }, { label: '失败', value: 'FAILED' }], width: '120px' }
|
||||||
]
|
]
|
||||||
const columns = [
|
const columns = [
|
||||||
@@ -20,8 +20,8 @@ const columns = [
|
|||||||
{ label: '结果', prop: 'result', width: 90, slot: 'result' }, { label: '时间', prop: 'createTime', width: 170, parseTime: true }
|
{ label: '结果', prop: 'result', width: 90, slot: 'result' }, { label: '时间', prop: 'createTime', width: 170, parseTime: true }
|
||||||
]
|
]
|
||||||
|
|
||||||
const objectTypeLabels = { BILL: '应收账单', EXPORT: '账单导出', RECEIPT: '应收收款', WRITEOFF: '收款核销' }
|
const objectTypeLabels = { BILL: '应收账单', EXPORT: '账单导出', RECEIPT: '应收收款', WRITEOFF: '收款核销', BALANCE_WRITEOFF: '余额核销' }
|
||||||
const operationLabels = { CONFIRM: '确认账单', VOID: '作废账单', EXPORT: '导出账单', RECEIPT: '登记收款', CANCEL_RECEIPT: '取消收款', WRITEOFF: '收款核销', CANCEL_WRITEOFF: '取消核销' }
|
const operationLabels = { CONFIRM: '确认账单', VOID: '作废账单', EXPORT: '导出账单', RECEIPT: '登记收款', CANCEL_RECEIPT: '取消收款', WRITEOFF: '收款核销', CANCEL_WRITEOFF: '取消核销', BALANCE_WRITEOFF: '余额核销', CANCEL_BALANCE_WRITEOFF: '取消余额核销' }
|
||||||
const statusLabels = { DRAFT: '草稿', CONFIRMED: '已确认', PARTIAL_WRITTEN_OFF: '部分核销', WRITTEN_OFF: '已核销', VOID: '已作废', REGISTERED: '已登记', CANCELLED: '已取消', EFFECTIVE: '有效' }
|
const statusLabels = { DRAFT: '草稿', CONFIRMED: '已确认', PARTIAL_WRITTEN_OFF: '部分核销', WRITTEN_OFF: '已核销', VOID: '已作废', REGISTERED: '已登记', CANCELLED: '已取消', EFFECTIVE: '有效' }
|
||||||
function objectTypeText(value) { return objectTypeLabels[value] || value || '-' }
|
function objectTypeText(value) { return objectTypeLabels[value] || value || '-' }
|
||||||
function operationText(value) { return operationLabels[value] || value || '-' }
|
function operationText(value) { return operationLabels[value] || value || '-' }
|
||||||
|
|||||||
Reference in New Issue
Block a user