From c4a869c9ff9ff12b68dc66e8167aee082450c67c Mon Sep 17 00:00:00 2001 From: yumoqing Date: Sun, 31 May 2026 14:36:27 +0800 Subject: [PATCH] fix: billing 500 error (sqlExe returns list not dict) + enlarge popup windows (recharge 600x500, detail 700x550) --- wwwroot/billing.dspy | 10 +++++++--- wwwroot/myaccounts.ui | 8 ++++---- 2 files changed, 11 insertions(+), 7 deletions(-) diff --git a/wwwroot/billing.dspy b/wwwroot/billing.dspy index fdfb853..72d25f3 100644 --- a/wwwroot/billing.dspy +++ b/wwwroot/billing.dspy @@ -26,7 +26,7 @@ join subject s on a.subjectid = s.id COLLATE utf8mb4_unicode_ci where a.orgid = ${orgid}$ and d.acc_date >= ${start_date}$ and d.acc_date <= ${end_date}$""" - ret = await sor.sqlExe(sql, ns) + rows = await sor.sqlExe(sql, ns) # 统计数据 stats_sql = """select @@ -44,5 +44,9 @@ where a.orgid = ${orgid}$ 'debit_sum': float(stats_recs[0].debit_sum) if stats_recs else 0, 'credit_sum': float(stats_recs[0].credit_sum) if stats_recs else 0 } - ret['stats'] = stats - return json.dumps(ret, ensure_ascii=False, default=str) + result = { + 'total': len(rows) if isinstance(rows, list) else 0, + 'rows': rows if isinstance(rows, list) else [], + 'stats': stats + } + return json.dumps(result, ensure_ascii=False, default=str) diff --git a/wwwroot/myaccounts.ui b/wwwroot/myaccounts.ui index 2c04a93..1cb3ee2 100644 --- a/wwwroot/myaccounts.ui +++ b/wwwroot/myaccounts.ui @@ -73,8 +73,8 @@ "width":"100%", "height":"95%" {% else %} - "width":"360px", - "height":"240px" + "width":"600px", + "height":"500px" {% endif %} }, "options":{ @@ -95,8 +95,8 @@ "width":"100%", "height":"95%" {% else %} - "width":"360px", - "height":"240px" + "width":"700px", + "height":"550px" {% endif %} }, "options":{