feat: 支持待分配/待抢单修改付款金额并增加价格历史
This commit is contained in:
@@ -287,6 +287,20 @@ test('已存在的行只做原地替换,不改变位置', () => {
|
||||
assert.equal(totalOf(patched), 124, '行数没变,总数不能变')
|
||||
})
|
||||
|
||||
test('实时替换行时保留价格历史标记,避免入口消失', () => {
|
||||
const existing = {
|
||||
...buildSnapshot({ workOrderId: 100 }),
|
||||
hasPaymentAmountHistory: true,
|
||||
}
|
||||
const patched = patchAdminWorkOrderListItems(
|
||||
buildEnvelope([existing]),
|
||||
buildSnapshot({ workOrderId: 100, status: 'in_progress' }),
|
||||
{ remove: false, insert: false },
|
||||
)
|
||||
const row = itemsOfWorkOrders(patched)[0] as { hasPaymentAmountHistory?: boolean }
|
||||
assert.equal(row.hasPaymentAmountHistory, true)
|
||||
})
|
||||
|
||||
test('状态筛选:已不命中的工单会被移除并扣减总数', () => {
|
||||
const filters = parseAdminWorkOrderListFilters(buildQueryKey({ statuses: 'open' }))!
|
||||
const accepted = buildSnapshot({ workOrderId: 100, status: 'accepted' })
|
||||
|
||||
Reference in New Issue
Block a user