167 Commits

Author SHA1 Message Date
c4a869c9ff fix: billing 500 error (sqlExe returns list not dict) + enlarge popup windows (recharge 600x500, detail 700x550) 2026-05-31 14:36:27 +08:00
434cfe950c feat: billing - add stats summary and Excel download 2026-05-31 14:18:53 +08:00
f62e397c5a chore: remove vim swap file 2026-05-31 14:11:20 +08:00
c141134001 fix: use this.render(params) instead of this.loadData for Tabular (DataViewer API) 2026-05-31 14:11:14 +08:00
dd12be3833 bugix 2026-05-31 14:08:52 +08:00
7fbc826330 bugix 2026-05-31 14:06:32 +08:00
1029078b56 bugix 2026-05-31 14:05:05 +08:00
0080bbd7c4 fix: IconBar click not working - add id and reference in binds instead of self 2026-05-31 14:00:08 +08:00
8d447b90ea refactor: billing - use Form title, Tabular always present, form submit loadData via script 2026-05-31 13:56:56 +08:00
6d3dcf2db9 fix: billing layout - wrap Form in fixed-height VBox, Tabular as filler 2026-05-31 13:46:33 +08:00
eec08d684c bugfix 2026-05-31 13:42:07 +08:00
7c2c584407 fix: billing layout - Form fixed height, Tabular css filler 2026-05-31 13:30:32 +08:00
7361614f89 fix: billing query - use Tabular instead of DataViewer, fix form submit target
- Changed DataViewer to Tabular with row_options.fields for proper table rendering
- Form submit target changed from 'self' to 'billing_page' (root VBox ID)
  with mode:replace, preventing nested page loading inside Form
- Fixed page_size to page_rows (correct parameter name)
- Added column definitions: date, time, subject, direction, summary, amount, balance
2026-05-31 13:24:32 +08:00
1fddb96291 fix: myaccounts.ui icon click - fix event name, entire_url syntax, paths 2026-05-31 11:48:24 +08:00
8a3f1955d3 fix: collation mismatch in SQL JOINs + billing date fields use uitype:date 2026-05-31 11:44:58 +08:00
997c7a445e feat: 新增账单查询页面,按机构id+日期范围查询acc_detail 2026-05-31 10:27:14 +08:00
78ff190789 feat(credit): redesign credit limit UI with dashboard, overview and management views
- Add hub.ui as main entry with stat cards (total/used/available/usage%)
- Add credit_overview.ui for user's own credit visualization with progress bars
- Add credit_manage.ui for distributor sales to manage customer credits
- Add set_credit_form.ui and set_customer_credit.dspy for credit adjustment
- Add credit_summary.dspy API for stats data
- Enhance creditlimit.py with get_credit_stats, get_my_credit_list, get_all_customer_credits
- Register new functions in init.py with ServerEnv
2026-05-30 21:00:27 +08:00
195a7bfb46 fix: wrap Tabular in VBox with cheight for proper scrolling 2026-05-29 22:09:45 +08:00
8f36013ad6 refactor: use wildcard % in load_path.py for auto-coverage 2026-05-29 00:52:18 +08:00
5fa058add9 fix: correct indentation in leg_accounting credit limit block
Two bugs fixed:
1. FATAL: lines 213-278 were indented inside the 'if new_balance < 0' block,
   causing all normal (positive balance) accounting operations to be skipped.
   All post-credit-check code now correctly at method body level (2 tabs).

2. LOGIC: added else clause to reset used_credit to 0 when balance returns
   to non-negative (e.g. after recharge). Previously used_credit stayed
   stale after account recovered from overdraft.
2026-05-28 23:05:23 +08:00
5da6ddd7d5 feat: expose credit limit functions via ServerEnv and register RBAC paths 2026-05-28 22:39:48 +08:00
9696d4334b feat: 添加信用额度功能
- 新增 credit_limit 表定义和DDL
- 修改 accounting_config.py 支持信用额度透支检查
- 新增 creditlimit.py 信用额度管理模块
- 新增信用额度管理界面和CRUD API
- 支持设置/查询/更新客户信用额度
2026-05-28 19:09:04 +08:00
e34be6ad16 Merge branch 'main' of git.opencomputing.cn:yumoqing/accounting
# Conflicts:
#	wwwroot/index.ui
#	wwwroot/index.ui~be97eaf7b5edfa4867c9caa6a5e0ffd1e499faa3
2026-05-28 19:08:47 +08:00
be97eaf7b5 fix: remove hardcoded dark theme colors from index.ui 2026-05-28 16:14:57 +08:00
a633368dcb fix: remove hardcoded dark theme colors from index.ui 2026-05-28 16:14:03 +08:00
af10e4a810 refactor(models): convert to json format per database-table-definition-spec 2026-05-27 13:23:22 +08:00
cb52542567 feat: add load_path.py RBAC permission registration script 2026-05-27 13:16:01 +08:00
5bf21ac024 fix: add filler css + overflowY:auto to content container 2026-05-26 13:57:32 +08:00
4e0f2e6e88 Merge branch 'feat/modern-ui-accounting' into feat/dataviz-accounting 2026-05-26 11:58:19 +08:00
5c10c2cb30 fix: add dark mode background (#0B1120) to accounting index.ui (dataviz branch) 2026-05-26 11:57:59 +08:00
16163ecdc3 feat: add accounting module stat cards - total balance, daily/monthly consumption, account count
- Create stats.py with get_accounting_stats() helper function
- Add 4 stat widgets: stat_total_balance, stat_today_consumption, stat_month_consumption, stat_account_count
- Update index.ui to display stat cards row above navigation cards
- Register get_accounting_stats in load_accounting()
2026-05-25 18:40:40 +08:00
865d9b136e feat: modernize accounting UI - add index.ui with card navigation
- Create index.ui with standardized card layout for 我的账户 and 账单明细
- Add page header with Title2 + description text
- Use consistent SVG icon styling (36px, 1.5 stroke width)
- Card style: #1E293B bg, 12px radius, #334155 borders
2026-05-25 18:32:04 +08:00
9fe2b31407 feat: add json table definitions for all models (converted from xlsx) 2026-05-21 12:46:36 +08:00
202fe6b578 bugfix 2026-05-14 17:45:56 +08:00
b2e4b03b82 bugfix 2026-04-15 12:09:14 +08:00
0132b8133d bugfix 2026-04-15 12:05:24 +08:00
48a64a34c7 bugfix 2026-04-15 12:02:12 +08:00
5670126a8e bugfix 2026-04-14 11:47:32 +08:00
e6002ec4a0 bugfix 2026-04-14 11:40:51 +08:00
23f1e62024 bugfix 2026-04-14 11:26:27 +08:00
dfd16e9a7b bugfix 2026-04-14 11:25:42 +08:00
afef7fb9fc bugifx 2026-04-14 11:21:38 +08:00
a833fa6790 bugfix 2026-04-14 10:56:02 +08:00
656205bac2 bugfix 2026-04-14 10:40:02 +08:00
cc8cb54a8a bugfix 2026-04-10 22:40:52 +08:00
4882b1f8a1 bugfix 2026-04-10 22:03:42 +08:00
3328c2fbc1 bugfix 2026-04-10 22:03:04 +08:00
6854b58ff7 bugfix 2026-04-10 22:01:40 +08:00
ac4784bd74 bugfix 2026-04-10 21:59:52 +08:00
9d0ef3ba83 bugfix 2026-04-10 21:58:36 +08:00