feat(pl): 增加百链充值类型,并保留计划产品与证件上传时间。
充值单号按类型使用 ETC、YK、SX、BL 前缀;更换装货客户清空产品时不抹掉已有计划产品;运输证件列表展示上传时间。 Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
1 parent
af8d4d90fa
commit
cc5cf78bcd
21 files changed
+274
-97
No files matched your search
@@ -6,7 +6,9 @@ import {
|
||||
buildStopProductPayload,
|
||||
syncDeliveriesProductsFromLoad,
|
||||
createEmptyDeliveryForm,
|
||||
mergePlanProductsFromLoadMirror
|
||||
mergePlanProductsFromLoadMirror,
|
||||
mapLoadProductsToPlanFormRows,
|
||||
shouldRetainPlanProductsWhileLoadEmpty
|
||||
} from '../src/utils/pl-plan-stop-form'
|
||||
|
||||
const product = {
|
||||
@@ -35,6 +37,34 @@ test('refreshing delivery products retains that delivery identity', () => {
|
||||
assert.equal(result.deliveries[0].products[0].id, 'delivery-product')
|
||||
})
|
||||
|
||||
test('clearing load products keeps the plan product until the same product is selected again', () => {
|
||||
const previous = [
|
||||
{
|
||||
id: 'pp',
|
||||
productId: 'sku',
|
||||
packageSpec: '槽罐车',
|
||||
quantity: 33,
|
||||
deliveryMethod: '一票制送到',
|
||||
productName: '32%液碱'
|
||||
}
|
||||
]
|
||||
assert.equal(shouldRetainPlanProductsWhileLoadEmpty([], previous), true)
|
||||
assert.equal(shouldRetainPlanProductsWhileLoadEmpty([], []), false)
|
||||
const reselected = mapLoadProductsToPlanFormRows([
|
||||
{
|
||||
productId: 'sku',
|
||||
productName: '32%液碱',
|
||||
packageSpec: '槽罐车',
|
||||
planQty: 33,
|
||||
deliveryMethod: '自提'
|
||||
}
|
||||
])
|
||||
const merged = mergePlanProductsFromLoadMirror(reselected, previous)
|
||||
assert.equal(merged[0].id, 'pp')
|
||||
assert.equal(merged[0].deliveryMethod, '自提')
|
||||
assert.equal(merged.length, 1)
|
||||
})
|
||||
|
||||
test('desktop mirror consumes previous product identities once for repeated SKUs', () => {
|
||||
const before = [
|
||||
{ ...product, id: 'first', quantity: 1 },
|
||||
|
||||
Reference in new issue
Block a user