From 4a205094908ad4098daa1008b959a87b24c7c913 Mon Sep 17 00:00:00 2001 From: Hermes Agent Date: Tue, 16 Jun 2026 10:45:25 +0800 Subject: [PATCH] =?UTF-8?q?fix(P0):=20=E4=BF=AE=E6=AD=A3accounting=20CRUD?= =?UTF-8?q?=20JSON=E6=A0=BC=E5=BC=8F=EF=BC=8C=E6=B7=BB=E5=8A=A0.gitignore?= =?UTF-8?q?=E6=8E=92=E9=99=A4=E8=87=AA=E5=8A=A8=E7=94=9F=E6=88=90=E7=9A=84?= =?UTF-8?q?CRUD=E7=9B=AE=E5=BD=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .gitignore | 6 +++ json/acc_balance.json | 13 ++---- json/acc_detail.json | 21 +++++---- json/account.json | 67 +++++++++++++++++----------- json/subject.json | 40 ++++++++++------- models/.nfs00000000031018d600027cf1 | Bin 16384 -> 0 bytes 6 files changed, 86 insertions(+), 61 deletions(-) delete mode 100644 models/.nfs00000000031018d600027cf1 diff --git a/.gitignore b/.gitignore index 1377554..e4aa7f2 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1,7 @@ *.swp + +# CRUD auto-generated directories +wwwroot/account/ +wwwroot/subject/ +wwwroot/acc_balance/ +wwwroot/acc_detail/ diff --git a/json/acc_balance.json b/json/acc_balance.json index a6d3fab..1b379b9 100644 --- a/json/acc_balance.json +++ b/json/acc_balance.json @@ -1,17 +1,12 @@ { - "models_dir": "${HOME}$/py/rbac/models", - "output_dir": "${HOME}$/py/sage/wwwroot/account", - "dbname": "sage", "tblname": "acc_balance", - "title":"科目", + "title": "账户余额", "params": { - "sortby":"name", + "sortby": ["acc_date desc"], "browserfields": { "exclouded": ["id"], - "cwidth": {} + "alters": {} }, - "editexclouded": [ - "id" - ] + "editexclouded": ["id"] } } diff --git a/json/acc_detail.json b/json/acc_detail.json index 1bab98e..22ddd49 100644 --- a/json/acc_detail.json +++ b/json/acc_detail.json @@ -1,17 +1,20 @@ { - "models_dir": "${HOME}$/py/rbac/models", - "output_dir": "${HOME}$/py/sage/wwwroot/acc_detail", - "dbname": "sage", "tblname": "acc_detail", - "title":"科目", + "title": "账务明细", "params": { - "sortby":"name", + "sortby": ["acc_date desc"], "browserfields": { "exclouded": ["id"], - "cwidth": {} + "alters": { + "acc_dir": { + "uitype": "code", + "data": [ + {"value": "0", "text": "贷"}, + {"value": "1", "text": "借"} + ] + } + } }, - "editexclouded": [ - "id" - ] + "editexclouded": ["id", "acc_no"] } } diff --git a/json/account.json b/json/account.json index 71a9a53..a7f8eb4 100644 --- a/json/account.json +++ b/json/account.json @@ -1,34 +1,49 @@ { - "models_dir": "${HOME}$/py/rbac/models", - "output_dir": "${HOME}$/py/sage/wwwroot/account", - "dbname": "sage", "tblname": "account", - "title":"科目", + "title": "账户管理", "params": { - "sortby":"name", + "sortby": ["id"], "browserfields": { "exclouded": ["id"], - "cwidth": {} + "alters": { + "subjectid": { + "uitype": "code", + "dataurl": "{{entire_url('/appbase/get_code.dspy')}}", + "valueField": "subjectid", + "textField": "subjectid_text" + }, + "orgid": { + "uitype": "code", + "dataurl": "{{entire_url('/appbase/get_code.dspy')}}", + "valueField": "orgid", + "textField": "orgid_text" + }, + "balance_at": { + "uitype": "code", + "data": [ + {"value": "0", "text": "借"}, + {"value": "1", "text": "贷"} + ] + } + } }, - "editexclouded": [ - "id" - ], - "subtables":[ - { - "field":"accountid", - "title":"账户余额", - "subtable":"acc_balance" - }, - { - "field":"accountid", - "title":"账户明细", - "subtable":"acc_detail" - }, - { - "field":"accountid", - "title":"账户日志", - "subtable":"accounting_log" - } - ] + "editexclouded": ["id", "max_detailno", "balance"], + "subtables": [ + { + "field": "accountid", + "title": "账户余额", + "subtable": "acc_balance" + }, + { + "field": "accountid", + "title": "账户明细", + "subtable": "acc_detail" + }, + { + "field": "accountid", + "title": "账户日志", + "subtable": "accounting_log" + } + ] } } diff --git a/json/subject.json b/json/subject.json index 71a7c41..749f653 100644 --- a/json/subject.json +++ b/json/subject.json @@ -1,25 +1,31 @@ { - "models_dir": "${HOME}$/py/rbac/models", - "output_dir": "${HOME}$/py/sage/wwwroot/subject", - "dbname": "sage", "tblname": "subject", - "title":"科目", + "title": "科目管理", "params": { - "sortby":"name", + "sortby": ["id"], "browserfields": { "exclouded": ["id"], - "cwidth": {} + "alters": { + "balance_side": { + "uitype": "code", + "data": [ + {"value": "0", "text": "借"}, + {"value": "1", "text": "贷"} + ] + }, + "subjecttype": { + "uitype": "code", + "dataurl": "{{entire_url('/appbase/get_code.dspy')}}" + } + } }, - "editexclouded": [ - "id" - ], - "subtables":[ - { - "field":"subjectid", - "title":"账户设置", - "url":"../account_config", - "subtable":"account_config" - } - ] + "editexclouded": ["id"], + "subtables": [ + { + "field": "subjectid", + "title": "账户设置", + "subtable": "account_config" + } + ] } } diff --git a/models/.nfs00000000031018d600027cf1 b/models/.nfs00000000031018d600027cf1 deleted file mode 100644 index 3b8daf1933ba52491c29810c5d1d3900324506c0..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 16384 zcmeI2U1%It7>18cP5o=Fwl_ftaf0N=>~0gpD5MAqHHeCeK@4>}yE929nVp&LoQc_% zpaqMmg7G3v)K=SStUTek6zHe(?YD!}LYBrv%e3QiI&C@z*Nnb+##B_@j;FJ#qVc4zWi%ce zuuY??75ai4AO}|LfWv!RJ2tcSwjBwtZnJcA)3zHQU2!v1fgB(Q$N_SI93ThC0djyG zAP3g31Kirco`U=h#V(8$_g4t}I^p<5;kbB6J92;=AP2|+a)2Bl2gm_(fE*wP$N_SI z9QYqPAS;Du|Hr)_0Pz2R@cjSx^^E-hz6WQ)Bp3#dfd{}Ya64!P+rTed82cKW0ms2% z@H`j*T_6UwgWonYb`g9BJ_l3a5HP{RU>E2F4dB=7&?Yzo-U5ffAlL)CK|9z2e!dpv zz-QnMa1iVR7PuEQgL-iB8ph6pQ{WXa1`dKW*a;-C5nQ^Ou^+*g;BD{%uz(7BKqqJf zbztc##=ZdWfa72SaPT0Afg3fgE@O z+zoC4H-YV-4qUpDv2$P=8~{T=2RlI{_+ukuKLHoafk|Kk4Wz&$pbNBsO<)l}^qd2q zfEh3W_JW5%3^aoV@H_J5JeUJ7g8{Gy_<7{#c@wtX%=`4V5$5lTA5z*h6zR?;$&#}w z-v3ZKTZ%7!;7t%p}=@~NY?zhvUpnxm0MR`o%`^zU3F~CcZHkp zI_>5B*%O!TWq5TFshdJ(GA})XO)90}s_sJW(Y*WGGhO$Dba*XGLGndkb*!Pt3o|F( z(Ye|p%S)W{Agnz!)==pDsnbj2@75OjFAHy}yl`cn^R*YbY0Tid+2`G?yr&(W6Xq`~ zt6^c2!}%U8Vx>?+Ub|9hvJa=|g%dTGNy}!bWILJQVr)P2p8vna^Sk%F?>+wq|NDE# me|g{0Mh=hz