保存同行基础版:店铺配置与员工管理

This commit is contained in:
summer committed 2026-11-14 01:16:35 +08:00
1 parent ecb8d6dec0
commit b7b987064b
84 files changed
+1884 -573

No files matched your search

+1 -1
View File
@@ -100,7 +100,7 @@ test('已保存详情使用服务端分和mg恢复公式与新货货盘,内部
const l=new Ledger(':memory:');t.after(()=>l.close());const actor={id:createUser(l,'合成麦麦','owner','synthetic-ui-password','owner'),name:'合成麦麦',role:'owner',member:'owner'};l.enableTeamMode();const h=harness();const input=h.input({...swap,charge_amount:'7.45',fee_amount:'3.21',fee_payer:'assistant2',payment_method:'信用卡'});
const q=l.scope(actor,()=>l.recoveryQuote(input,actor));h.context.__detail={...q,id:'synthetic-recovery',number:'HS202610250001',order_id:'synthetic-order',purchase_id:null};const html=h.run('recoveryDetailHTML(__detail)');
for(const text of ['合成客户','足金999','现货','1,000.00','600.00','200.00','10,807.00','64.84','内部记账','补金差重料费'])assert.ok(html.includes(text),text);assert.doesNotMatch(html,/NaN|undefined/);assert.match(html,/data-action="recovery-print"/);assert.match(html,/data-action="recovery-open-order"/);
const actions=h.run('recoveryLinkedOrderActionsHTML({recovery_id:"r"},{reviewAllowed:true})');assert.match(actions,/麦麦复核/);assert.doesNotMatch(actions,/edit-order|show-return|show-expense|show-correct/);
const actions=h.run('recoveryLinkedOrderActionsHTML({recovery_id:"r"},{reviewAllowed:true})');assert.match(actions,/店主复核/);assert.doesNotMatch(actions,/edit-order|show-return|show-expense|show-correct/);
});
test('置换详情省略已核实的零成本行,待核实null仍保留且不改变原成本利润',()=>{