feat: 细胞存储缴费催缴、统一样本信息与协议支付能力增强
汇总近期业务改动:催缴菜单与后端、样本信息快捷登记与进度、运费关联、客户档案扩展、协议优惠/期次与押金划转,并同步 SQL 迁移与管理端页面收敛。 Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
1 parent
2d3472f5c4
commit
db31990ebe
235 files changed
+14898
-10196
No files matched your search
@@ -59,6 +59,17 @@ describe('flattenProtocolAuditRows', () => {
|
||||
assert.equal(rows.length, 1)
|
||||
assert.equal(rows[0].isCoStored, false)
|
||||
})
|
||||
|
||||
it('donationNo maps to protocolNo', () => {
|
||||
const rows = flattenProtocolAuditRows([
|
||||
{
|
||||
id: 'd1',
|
||||
donationNo: 'JZ-001',
|
||||
sampleItems: [{ sampleTypeName: '脐带血', sampleCode: 'D1', labStorageCode: 'B9' }]
|
||||
}
|
||||
])
|
||||
assert.equal(rows[0].protocolNo, 'JZ-001')
|
||||
})
|
||||
})
|
||||
|
||||
describe('uniqueProtocolsFromFlatRows', () => {
|
||||
@@ -80,19 +91,41 @@ describe('uniqueProtocolsFromFlatRows', () => {
|
||||
})
|
||||
|
||||
describe('firstPayTimeLines', () => {
|
||||
it('prefers transferTime then dueDate; stacks multiple', () => {
|
||||
it('prefers firstPayTransferTime from summary', () => {
|
||||
const lines = firstPayTimeLines({
|
||||
firstPayTransferTime: '2025-09-20 14:30:00',
|
||||
paymentDetails: [
|
||||
{ installmentNo: 1, transferTime: '2025-09-15 09:20:00', installmentDueDate: '2025-09-01' },
|
||||
{ installmentNo: 1, transferTime: '2025-09-15 09:20:00' },
|
||||
{ installmentNo: 2, transferTime: '2025-10-15 10:05:00' }
|
||||
]
|
||||
})
|
||||
assert.deepEqual(lines, ['2025-09-15 09:20:00', '2025-10-15 10:05:00'])
|
||||
assert.deepEqual(lines, ['2025-09-20 14:30:00'])
|
||||
})
|
||||
it('falls back to dueDate when no transferTime', () => {
|
||||
it('only first period; ignores later installments', () => {
|
||||
const lines = firstPayTimeLines({
|
||||
paymentDetails: [
|
||||
{ installmentNo: 1, transferTime: '2025-09-15 09:20:00', installmentDueDate: '2025-09-01' },
|
||||
{ installmentNo: 2, transferTime: '2025-10-15 10:05:00' },
|
||||
{ installmentNo: 3, transferTime: '2025-11-15 11:00:00' }
|
||||
]
|
||||
})
|
||||
assert.deepEqual(lines, ['2025-09-15 09:20:00'])
|
||||
})
|
||||
it('among period-1 transfers picks the latest transferTime', () => {
|
||||
const lines = firstPayTimeLines({
|
||||
paymentDetails: [
|
||||
{ installmentNo: 1, transferTime: '2025-09-15 09:20:00' },
|
||||
{ installmentNo: 1, transferTime: '2025-09-20 14:30:00' },
|
||||
{ installmentNo: 1, transferTime: '2025-09-18 08:00:00' },
|
||||
{ installmentNo: 2, transferTime: '2025-10-15 10:05:00' }
|
||||
]
|
||||
})
|
||||
assert.deepEqual(lines, ['2025-09-20 14:30:00'])
|
||||
})
|
||||
it('empty when period 1 has no transferTime', () => {
|
||||
const lines = firstPayTimeLines({
|
||||
paymentDetails: [{ installmentNo: 1, installmentDueDate: '2025-09-01' }]
|
||||
})
|
||||
assert.deepEqual(lines, ['2025-09-01'])
|
||||
assert.deepEqual(lines, [])
|
||||
})
|
||||
})
|
||||
Reference in new issue
Block a user