feat(pl): 装送货段增加同市标记,并同步额度证件与计划表单。

同市易制毒段只校验购买证;同步 Web/H5 表单、额度统计展示与相关回归测试。

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
wuzilongandCursor committed 2026-11-12 16:34:58 +08:00
1 parent d58f6ea5bd
commit 522b4be705
40 files changed
+576 -107

No files matched your search

+19
View File
@@ -3,6 +3,9 @@ import test from 'node:test'
import {
buyPartyName,
certFaceFields,
certKindLabel,
certKindTagType,
compareCertUploadTime,
expiryWarning,
salePartyName
} from '../src/views/pl/quota-cert/cert-list-face'
@@ -49,3 +52,19 @@ test('only certificates expiring within seven days show a red warning label', ()
assert.equal(expiryWarning('2026-11-12', today), null)
assert.equal(expiryWarning('', today), null)
})
test('merged certificate lists follow upload time, then id, descending', () => {
assert.equal(certKindLabel('transport'), '运输证')
assert.equal(certKindLabel('purchase'), '购买证')
assert.equal(certKindTagType('transport'), 'warning')
assert.equal(certKindTagType('purchase'), 'success')
const rows = [
{ id: 'b', createTime: '2026-11-01 10:00:00' },
{ id: 'a', createTime: '2026-11-05 10:00:00' },
{ id: 'c', createTime: '2026-11-05 10:00:00' }
].sort(compareCertUploadTime)
assert.deepEqual(
rows.map((row) => row.id),
['c', 'a', 'b']
)
})