fix: billing 500 error (sqlExe returns list not dict) + enlarge popup windows (recharge 600x500, detail 700x550)

This commit is contained in:
yumoqing 2026-05-31 14:36:27 +08:00
parent 434cfe950c
commit c4a869c9ff
2 changed files with 11 additions and 7 deletions

View File

@ -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)

View File

@ -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":{