| | |
| | | return { nodes, currentNodeIndex: idx, approvalResult: "rejected", rejectReason: opinion || "驳回" }; |
| | | } |
| | | |
| | | /** 模拟部门预算(与预算系统联动占位) */ |
| | | /** 部门预算(对接预算系统前返回空) */ |
| | | export function mockDeptBudget(deptId) { |
| | | const id = String(deptId || "default"); |
| | | let s = 0; |
| | | for (let i = 0; i < id.length; i++) s += id.charCodeAt(i); |
| | | const total = 500000 + (s % 200) * 1000; |
| | | const used = (s % 80) * 3500; |
| | | return { |
| | | deptId: id, |
| | | totalBudget: total, |
| | | usedAmount: used, |
| | | remainingAmount: Math.max(0, total - used), |
| | | }; |
| | | if (!deptId) return null; |
| | | return null; |
| | | } |
| | | |
| | | export function normalizeImportedRow(raw, idx) { |