feat(sample): 展示样本状态并支持样本废弃与作废原因
生产/质检入库卡片展示样本状态并支持【样本废弃】;市场 Web 列表与移动市场部卡片补充样本状态及问号查看作废原因;样本表新增 void_desc,人工作废不联动接收但全部作废时自动作废协议(#131)。 Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
1 parent
7751cc0f4a
commit
0b4c8dfda8
53 files changed
+1527
-82
No files matched your search
@@ -63,6 +63,19 @@ describe('flattenProtocolAuditRows', () => {
|
||||
assert.equal(rows[0].sampleCode, 'ZKZX34000199')
|
||||
})
|
||||
|
||||
it('passes sample status and sample void reason from sample items', () => {
|
||||
const rows = flattenProtocolAuditRows([
|
||||
{
|
||||
id: 'p-status',
|
||||
voidDesc: '协议作废',
|
||||
sampleItems: [{ sampleCode: 'S-VOID', sampleStatus: 'yzf', voidDesc: '样本破损' }]
|
||||
}
|
||||
])
|
||||
assert.equal(rows[0].voidDesc, '协议作废')
|
||||
assert.equal(rows[0].sampleStatus, 'yzf')
|
||||
assert.equal(rows[0].sampleVoidDesc, '样本破损')
|
||||
})
|
||||
|
||||
it('zero samples → one placeholder row, not co-stored', () => {
|
||||
const rows = flattenProtocolAuditRows([{ id: 'p2', protocolNo: 'ZKZX2', sampleItems: [] }])
|
||||
assert.equal(rows.length, 1)
|
||||
|
||||
Reference in new issue
Block a user