feat: 保存运输证件、报销付款和开发流程的当前实现。
补齐证书齐备、证件折算、移动用证和合同绑定,并带上报销批量发放、付款备注以及个人开发流程升级,便于继续讨论已安排计划的调整规则。 Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
1 parent
7325a0aa52
commit
8e9536332a
202 files changed
+19200
-2054
No files matched your search
@@ -0,0 +1,38 @@
|
||||
import assert from 'node:assert/strict'
|
||||
import test from 'node:test'
|
||||
import {
|
||||
formatDriverProductQty,
|
||||
formatSiteProductQty
|
||||
} from '../src/components/business/pl-plan-stop-feedback-panel/qty-display'
|
||||
|
||||
const echoCode = (_dictType: string, value: string) => value
|
||||
const dictLabel = (_dictType: string, value: string) => {
|
||||
if (value === 'dun') return '吨'
|
||||
if (value === 'kg') return '千克'
|
||||
return value
|
||||
}
|
||||
|
||||
test('driver feedback shows unit label instead of dict code', () => {
|
||||
assert.equal(formatDriverProductQty({ actualQty: 12, unit: 'dun' }, echoCode), '12 吨')
|
||||
assert.equal(formatDriverProductQty({ actualQty: 3, unit: 'kg' }, dictLabel), '3 千克')
|
||||
assert.equal(formatDriverProductQty({ actualQty: null, unit: 'dun' }, echoCode), '—')
|
||||
assert.equal(formatDriverProductQty({ actualQty: 1, unit: '' }, echoCode), '1 吨')
|
||||
})
|
||||
|
||||
test('site feedback shows unit label instead of dict code', () => {
|
||||
assert.deepEqual(formatSiteProductQty({ actualQty: 8, unit: 'dun' }, echoCode), {
|
||||
qty: '8',
|
||||
unit: ' 吨'
|
||||
})
|
||||
assert.deepEqual(formatSiteProductQty({ quantity: 2, unit: 'ping' }, echoCode), {
|
||||
qty: '2',
|
||||
unit: ' 瓶'
|
||||
})
|
||||
assert.deepEqual(
|
||||
formatSiteProductQty({ actualQty: null, quantity: null, unit: 'dun' }, echoCode),
|
||||
{
|
||||
qty: '—',
|
||||
unit: ''
|
||||
}
|
||||
)
|
||||
})
|
||||
Reference in new issue
Block a user