修复了2个bug

This commit is contained in:
andy committed 2026-09-02 17:02:02 +08:00
1 parent ce8372e878
commit 2a64dc7395
64 files changed
+1050 -39

No files matched your search

@@ -0,0 +1 @@
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[19],{1085:(e,r,s)=>{Promise.resolve().then(s.bind(s,1371))},1371:(e,r,s)=>{"use strict";s.r(r),s.d(r,{default:()=>i});var l=s(5155),n=s(2115);function i(e){let{reset:r}=e;return(0,n.useEffect)(()=>{},[]),(0,l.jsx)("main",{className:"billing-route-error",children:(0,l.jsxs)("div",{className:"billing-route-error-card",children:[(0,l.jsx)("span",{className:"billing-route-error-kicker",children:"计费中心"}),(0,l.jsx)("h1",{children:"计费服务暂时不可用"}),(0,l.jsx)("p",{children:"请先刷新页面。如果问题持续,请检查 Go API 状态和服务端日志。"}),(0,l.jsx)("button",{type:"button",onClick:()=>r(),children:"重新加载"})]})})}}},e=>{e.O(0,[441,255,358],()=>e(e.s=1085)),_N_E=e.O()}]);
@@ -0,0 +1 @@
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[522],{2885:(e,n,i)=>{"use strict";i.r(n),i.d(n,{default:()=>em});var l=i(5155),a=i(2115),t=i(5299),s=i(9559),r=i(5468),c=i(1847);let d=(0,c.A)("UsersRound",[["path",{d:"M18 21a8 8 0 0 0-16 0",key:"3ypg7q"}],["circle",{cx:"10",cy:"8",r:"5",key:"o932ke"}],["path",{d:"M22 20c0-3.37-2-6.5-4-8a5 5 0 0 0-.45-8.3",key:"10s06x"}]]),o=(0,c.A)("Banknote",[["rect",{width:"20",height:"12",x:"2",y:"6",rx:"2",key:"9lu3g6"}],["circle",{cx:"12",cy:"12",r:"2",key:"1c9p78"}],["path",{d:"M6 12h.01M18 12h.01",key:"113zkx"}]]);var u=i(6191),h=i(8514);let g=(0,c.A)("Landmark",[["line",{x1:"3",x2:"21",y1:"22",y2:"22",key:"j8o0r"}],["line",{x1:"6",x2:"6",y1:"18",y2:"11",key:"10tf0k"}],["line",{x1:"10",x2:"10",y1:"18",y2:"11",key:"54lgf6"}],["line",{x1:"14",x2:"14",y1:"18",y2:"11",key:"380y"}],["line",{x1:"18",x2:"18",y1:"18",y2:"11",key:"1kevvc"}],["polygon",{points:"12 2 20 7 4 7",key:"jkujk7"}]]);var m=i(5917),b=i(4274);let x=(0,c.A)("ArrowUpRight",[["path",{d:"M7 7h10v10",key:"1tivn9"}],["path",{d:"M7 17 17 7",key:"1vkiza"}]]);var p=i(9408),j=i(7937);let v=(0,c.A)("ReceiptText",[["path",{d:"M4 2v20l2-1 2 1 2-1 2 1 2-1 2 1 2-1 2 1V2l-2 1-2-1-2 1-2-1-2 1-2-1-2 1Z",key:"q3az6g"}],["path",{d:"M14 8H8",key:"1l3xfs"}],["path",{d:"M16 12H8",key:"1fr5h0"}],["path",{d:"M13 16H8",key:"wsln4y"}]]);var f=i(5229);let y=(0,c.A)("Settings2",[["path",{d:"M20 7h-9",key:"3s1dr2"}],["path",{d:"M14 17H5",key:"gfn3mx"}],["circle",{cx:"17",cy:"17",r:"3",key:"18b49y"}],["circle",{cx:"7",cy:"7",r:"3",key:"dfmy0x"}]]);var N=i(4166);function k(e,n,i){throw Error("".concat(e,"数据格式错误:").concat(n).concat("响应"===n?"":" ","必须是").concat(i,"。"))}function w(e,n,i){return("object"!=typeof e||null===e||Array.isArray(e))&&k(i,n,"对象"),e}function A(e,n,i){let l=arguments.length>3&&void 0!==arguments[3]?arguments[3]:n;return Array.isArray(e[n])||k(i,l,"数组"),e[n]}function M(e,n,i,l){"string"!=typeof e[n]&&k(i,l,"字符串")}function F(e,n,i,l){void 0!==e[n]&&null!==e[n]&&"string"!=typeof e[n]&&k(i,l,"字符串")}function z(e,n,i,l){"number"==typeof e[n]&&Number.isFinite(e[n])||k(i,l,"有限数字")}function C(e,n,i,l){"boolean"!=typeof e[n]&&k(i,l,"布尔值")}function E(e,n,i){["string","number","boolean"].includes(typeof e)||k(n,i,"字符串、数字或布尔值"),"number"!=typeof e||Number.isFinite(e)||k(n,i,"有限数字")}function S(e,n,i){let l=w(e,i,n);for(let e of["accountName","bankName","accountNumber","contact"])F(l,e,n,"".concat(i,".").concat(e))}function I(e,n,i){let l=w(e,i,n);for(let e of(M(l,"organizationId",n,"".concat(i,".organizationId")),["balanceFen","totalRechargedFen","totalChargedFen"]))z(l,e,n,"".concat(i,".").concat(e));M(l,"updatedAt",n,"".concat(i,".updatedAt"))}function O(e,n,i){let l=w(e,i,n);for(let e of["rechargeFen","chargedFen","refundedFen","netConsumedFen"])z(l,e,n,"".concat(i,".").concat(e))}function R(e,n,i){let l=w(e,i,n);M(l,"id",n,"".concat(i,".id")),M(l,"organizationId",n,"".concat(i,".organizationId")),F(l,"accountId",n,"".concat(i,".accountId")),F(l,"jobId",n,"".concat(i,".jobId")),M(l,"kind",n,"".concat(i,".kind")),z(l,"deltaFen",n,"".concat(i,".deltaFen")),z(l,"balanceAfterFen",n,"".concat(i,".balanceAfterFen")),M(l,"description",n,"".concat(i,".description")),w(l.metadata,"".concat(i,".metadata"),n),M(l,"createdAt",n,"".concat(i,".createdAt")),Number.isNaN(Date.parse(l.createdAt))&&k(n,"".concat(i,".createdAt"),"有效时间字符串")}var J=i(7612);let q={accountName:"",bankName:"",accountNumber:"",contact:""},P={organizationId:"",direction:"credit",amountYuan:"",note:""};function D(e){let{isSuperAdmin:n}=e,[i,r]=(0,a.useState)(null),[c,d]=(0,a.useState)(null),[o,u]=(0,a.useState)(q),[h,g]=(0,a.useState)(P),[m,b]=(0,a.useState)("overview"),[x,p]=(0,a.useState)(!1),[j,v]=(0,a.useState)(!0),[f,y]=(0,a.useState)(!1),[D,L]=(0,a.useState)(null),[Z,Q]=(0,a.useState)(null),[X,$]=(0,a.useState)(null),ee=(0,a.useRef)(null),en=(0,a.useRef)(null),el=(0,a.useMemo)(()=>n?[{id:"overview",label:"概览"},{id:"pricing",label:"价格与计费"},{id:"balance",label:"余额与上账"},{id:"account",label:"收款设置"}]:[{id:"overview",label:"概览"},{id:"ledger",label:"账务流水"}],[n]),ea=(0,a.useMemo)(()=>null==c?void 0:c.organizations.find(e=>e.id===h.organizationId),[null==c?void 0:c.organizations,h.organizationId]);async function et(){v(!0),L(null);try{if(n){let e=await fetch("/api/admin/billing",{cache:"no-store"}),n=await _(e);if(!e.ok)throw Error(n.error||"读取超管计费数据失败");let i=function(e){let n="超管计费",i=w(e,"响应",n);return S(i.billingAccount,n,"billingAccount"),A(i,"organizations",n).forEach((e,i)=>(function(e,n,i){let l=w(e,i,n);M(l,"id",n,"".concat(i,".id")),M(l,"name",n,"".concat(i,".name")),M(l,"status",n,"".concat(i,".status")),I(l.wallet,n,"".concat(i,".wallet"))})(e,n,"organizations[".concat(i,"]"))),A(i,"members",n).forEach((e,i)=>(function(e,n,i){let l=w(e,i,n);for(let e of["id","displayName","phonLine truncated