feat(web): 优化应用外壳组合式函数和差旅报销创建脚本,增强前端状态管理
This commit is contained in:
@@ -198,9 +198,15 @@ export function useAppShell() {
|
||||
|
||||
async function handleDraftSaved(payload = {}) {
|
||||
const claimNo = String(payload.claimNo || payload.claim_no || '').trim()
|
||||
const status = String(payload.status || payload.claimStatus || '').trim()
|
||||
const approvalStage = String(payload.approvalStage || payload.approval_stage || '').trim()
|
||||
smartEntryOpen.value = false
|
||||
await reloadRequests()
|
||||
toast(`${claimNo || '该'}单据已保存到草稿,请到报销页面查看。`)
|
||||
if (status === 'submitted') {
|
||||
toast(`${claimNo || '该'}单据已提交审批${approvalStage ? `,当前节点:${approvalStage}` : ''}。`)
|
||||
} else {
|
||||
toast(`${claimNo || '该'}单据已保存到草稿,请到报销页面查看。`)
|
||||
}
|
||||
router.push({ name: 'app-requests' })
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user