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 3b8daf1..0000000 Binary files a/models/.nfs00000000031018d600027cf1 and /dev/null differ