保存同行基础版:店铺配置与员工管理
This commit is contained in:
1 parent
ecb8d6dec0
commit
b7b987064b
84 files changed
+1884
-573
No files matched your search
@@ -99,7 +99,7 @@ test('助理与麦麦都能代录六项496元,日期默认今天可改,提
|
||||
|
||||
test('助理不能确认或审批;已批准报销只读,不因返回canEdit异常而恢复编辑',async()=>{
|
||||
const row=claim(),h=harness(data({reimbursements:[row],pendingCount:1}),'assistant');await h.load();assert.doesNotMatch(h.html(),/id="daily-outlay-form"|data-action="reimbursement-approve"|data-action="reimbursement-reject"/);
|
||||
await h.action('reimbursement-approve',{id:RID});assert.equal(h.posts().length,0);assert.match(h.toasts.at(-1).message,/只能由麦麦/);
|
||||
await h.action('reimbursement-approve',{id:RID});assert.equal(h.posts().length,0);assert.match(h.toasts.at(-1).message,/只能由店主/);
|
||||
const owner=harness(data({reimbursements:[claim({status:'approved',canEdit:true,canApprove:true})],approvedReimbursements:49600}));await owner.load();assert.doesNotMatch(owner.html(),/data-action="reimbursement-edit"|data-action="reimbursement-approve"/);assert.match(owner.html(),/已批准单据只读/);await owner.action('reimbursement-edit',{id:RID});assert.equal(owner.posts().length,0);
|
||||
});
|
||||
|
||||
@@ -218,5 +218,5 @@ test('团队每日报销保留入口和逐项明细,移除重复累计成员
|
||||
h.context.__entry={key:'synthetic-team',range:{date:D,from:D,month:false},data:funds,error:''};h.context.__report={date:D,from:D,dailyFunds:funds};
|
||||
const html=h.run(`renderTeamDailyFundsHTML(__entry,false,'${D}')`),text=h.run('dailyFundsDownloadText(__report).join(String.fromCharCode(10))');
|
||||
assert.match(html,/每日报销单/);assert.match(html,/2026-10-22/);assert.match(html,/data-action="reimbursement-new"/);assert.match(html,/data-action="reimbursement-open-list"/);assert.match(html,/报销项目1/);assert.match(html,/¥496\.00/);
|
||||
assert.doesNotMatch(html,/成员往来<\/h2>|剩余待转|累计往来|9,999\.00/);assert.match(text,/每日报销单/);assert.match(text,/待麦麦复核 \/ 合计 ¥496\.00/);assert.match(text,/报销项目1:¥80\.00/);assert.doesNotMatch(text,/团队成员往来|累计|9,999\.00/);
|
||||
assert.doesNotMatch(html,/成员往来<\/h2>|剩余待转|累计往来|9,999\.00/);assert.match(text,/每日报销单/);assert.match(text,/待店主复核 \/ 合计 ¥496\.00/);assert.match(text,/报销项目1:¥80\.00/);assert.doesNotMatch(text,/团队成员往来|累计|9,999\.00/);
|
||||
});
|
||||
Reference in new issue
Block a user