完善订单成本编辑与多商品置换,修正锁价跨天作废回池
This commit is contained in:
1 parent
a3262a455d
commit
2e4e7dad55
25 files changed
+430
-109
No files matched your search
@@ -72,7 +72,7 @@ test('模板对数独立保存与套用,未知历史保持未填,不从piece
|
||||
});
|
||||
|
||||
test('置换新货发送stockCount并校验,未知历史只改财务保留null,新货详情与更正显示对数',()=>{
|
||||
const h=harness();h.context.__draft=h.json(`({...recoveryDefaults('exchange'),customer:'合成客户',incoming_weight:'2',melted_weight:'2',purity:'100',new_quantity:'3',stockCount:'2',pocket:'${PAIR}',gold_price:'1000',labor_rate:'0',buy_rate:'0',material_source:'manual',material_rate:'900',cost_labor_value:'0',verified:true})`);
|
||||
const h=harness();h.run("state.pockets.push('回收旧料');");h.context.__draft=h.json(`({...recoveryDefaults('exchange'),customer:'合成客户',incoming_weight:'2',melted_weight:'2',purity:'100',new_quantity:'3',stockCount:'2',pocket:'${PAIR}',gold_price:'1000',labor_rate:'0',buy_rate:'0',material_source:'manual',material_rate:'900',cost_labor_value:'0',verified:true})`);
|
||||
const input=h.json('recoveryInput(__draft)');assert.equal(input.exchange.stockCount,'2');h.context.__input=input;assert.doesNotThrow(()=>h.run('validateRecoveryInput(__input)'));
|
||||
h.context.__input.exchange.stockCount=null;assert.throws(()=>h.run('validateRecoveryInput(__input)'),/新货出库数量(对)/);
|
||||
h.run(`recoveryEditEntry={data:{inputs:{exchange:{stockCount:null,pocket:'${PAIR}',quantity:'3'}}}};`);h.nodes.set('#recovery-form',{dataset:{recoveryEdit:'true'}});assert.doesNotThrow(()=>h.run('validateRecoveryInput(__input)'));
|
||||
|
||||
Reference in new issue
Block a user