diff --git a/init/data.json b/init/data.json new file mode 100644 index 0000000..1567e9a --- /dev/null +++ b/init/data.json @@ -0,0 +1,394 @@ +{ + "appcodes": [ + { + "id": "accounting_dir", + "name": "记账方向", + "hierarchy_flg": "0" + }, + { + "id": "balance_at", + "name": "余额方向", + "hierarchy_flg": "0" + }, + { + "id": "balance_side", + "name": "科目余额方向", + "hierarchy_flg": "0" + }, + { + "id": "subjecttype", + "name": "科目类别", + "hierarchy_flg": "0" + }, + { + "id": "partytype", + "name": "机构类型", + "hierarchy_flg": "0" + }, + { + "id": "credit_status", + "name": "信用额度状态", + "hierarchy_flg": "0" + }, + { + "id": "currency_status", + "name": "币种状态", + "hierarchy_flg": "0" + } + ], + "appcodes_kv": [ + { + "id": "accounting_dir_0", + "parentid": "accounting_dir", + "k": "0", + "v": "借" + }, + { + "id": "accounting_dir_1", + "parentid": "accounting_dir", + "k": "1", + "v": "贷" + }, + { + "id": "balance_at_0", + "parentid": "balance_at", + "k": "0", + "v": "借" + }, + { + "id": "balance_at_1", + "parentid": "balance_at", + "k": "1", + "v": "贷" + }, + { + "id": "balance_side_0", + "parentid": "balance_side", + "k": "0", + "v": "借" + }, + { + "id": "balance_side_1", + "parentid": "balance_side", + "k": "1", + "v": "贷" + }, + { + "id": "subjecttype_asset", + "parentid": "subjecttype", + "k": "资产", + "v": "资产" + }, + { + "id": "subjecttype_liability", + "parentid": "subjecttype", + "k": "负债", + "v": "负债" + }, + { + "id": "subjecttype_pl", + "parentid": "subjecttype", + "k": "损益", + "v": "损益" + }, + { + "id": "partytype_owner", + "parentid": "partytype", + "k": "owner", + "v": "平台" + }, + { + "id": "partytype_reseller", + "parentid": "partytype", + "k": "reseller", + "v": "分销商" + }, + { + "id": "partytype_customer", + "parentid": "partytype", + "k": "customer", + "v": "客户" + }, + { + "id": "partytype_provider", + "parentid": "partytype", + "k": "provider", + "v": "供应商" + }, + { + "id": "credit_status_active", + "parentid": "credit_status", + "k": "active", + "v": "生效" + }, + { + "id": "credit_status_inactive", + "parentid": "credit_status", + "k": "inactive", + "v": "停用" + }, + { + "id": "credit_status_expired", + "parentid": "credit_status", + "k": "expired", + "v": "已过期" + }, + { + "id": "currency_status_active", + "parentid": "currency_status", + "k": "active", + "v": "启用" + }, + { + "id": "currency_status_inactive", + "parentid": "currency_status", + "k": "inactive", + "v": "停用" + } + ], + "subject": [ + { + "id": "BUyr-yN8rtwefNOjQwVXK", + "name": "平台银行存款", + "balance_side": "0", + "subjecttype": "资产" + }, + { + "id": "c98nEf0i_uF7Ik6gozaau", + "name": "平台充值成本", + "balance_side": "0", + "subjecttype": "损益" + }, + { + "id": "ePcBex1OU1wdF_-_okZRv", + "name": "商户营业收入", + "balance_side": "1", + "subjecttype": "损益" + }, + { + "id": "ERd8EAZa35M4PRLsKI6yX", + "name": "商户采购成本", + "balance_side": "0", + "subjecttype": "损益" + }, + { + "id": "heJJIQTWsZE_HbS7WWI4S", + "name": "商户交易费支出", + "balance_side": "0", + "subjecttype": "损益" + }, + { + "id": "Iw1EFL1Ubl7Dq7JVFMMEq", + "name": "客户资金账户", + "balance_side": "1", + "subjecttype": "负债" + }, + { + "id": "Lnzxp-5XdWadoTCyZiN6M", + "name": "平台交易费收入", + "balance_side": "1", + "subjecttype": "损益" + }, + { + "id": "pF2OEBe_E2sYK7fAuVN3n", + "name": "供应商分销收入", + "balance_side": "1", + "subjecttype": "损益" + } + ], + "account_config": [ + { + "id": "b_MKox_VZiFYIR_lzJC6F", + "subjectid": "ePcBex1OU1wdF_-_okZRv", + "partytype": "分销商", + "party1type": null + }, + { + "id": "GIhJc5osnYqgkhDXSiZKQ", + "subjectid": "BUyr-yN8rtwefNOjQwVXK", + "partytype": "平台", + "party1type": null + }, + { + "id": "KtwnMnfejNKsnBnPIu7G4", + "subjectid": "heJJIQTWsZE_HbS7WWI4S", + "partytype": "分销商", + "party1type": null + }, + { + "id": "qNjewpZiTatSy828LktP0", + "subjectid": "ERd8EAZa35M4PRLsKI6yX", + "partytype": "分销商", + "party1type": "供应商" + }, + { + "id": "t-sco3C4pl4ON0pKktGEQ", + "subjectid": "Iw1EFL1Ubl7Dq7JVFMMEq", + "partytype": "客户", + "party1type": null + }, + { + "id": "W-11FsYRSzKhx8j7Kc5Il", + "subjectid": "Lnzxp-5XdWadoTCyZiN6M", + "partytype": "平台", + "party1type": null + }, + { + "id": "XC6-lNo1yGcxGufTSSi1U", + "subjectid": "c98nEf0i_uF7Ik6gozaau", + "partytype": "平台", + "party1type": null + }, + { + "id": "Z6adBvS1uqKP7XuYf73t9", + "subjectid": "pF2OEBe_E2sYK7fAuVN3n", + "partytype": "供应商", + "party1type": "分销商" + } + ], + "accounting_config": [ + { + "id": "_j054xv_mpfLrD8svBCkT", + "action": "PAY", + "accounting_orgtype": "owner", + "accounting_dir": "0", + "orgtype": "customer", + "org1type": null, + "subjectid": "Iw1EFL1Ubl7Dq7JVFMMEq", + "amt_pattern": "${交易金额}$" + }, + { + "id": "_U3HGWL4ywA-ML7cVdBZa", + "action": "PAY", + "accounting_orgtype": "owner", + "accounting_dir": "1", + "orgtype": "reseller", + "org1type": null, + "subjectid": "ePcBex1OU1wdF_-_okZRv", + "amt_pattern": "${交易金额}$" + }, + { + "id": "1VOt1KDML_lM0uiH7NFSW", + "action": "RECHARGE", + "accounting_orgtype": "owner", + "accounting_dir": "0", + "orgtype": "owner", + "org1type": null, + "subjectid": "c98nEf0i_uF7Ik6gozaau", + "amt_pattern": "${充值费率}$ * ${交易金额}$" + }, + { + "id": "4wQNg-KX8kjOY3evlE2ar", + "action": "PAY*", + "accounting_orgtype": "owner", + "accounting_dir": "0", + "orgtype": "reseller", + "org1type": "provider", + "subjectid": "ERd8EAZa35M4PRLsKI6yX", + "amt_pattern": "${采购成本}$" + }, + { + "id": "CIrdqoS2XLP_pxahjKLBQ", + "action": "PAY", + "accounting_orgtype": "owner", + "accounting_dir": "1", + "orgtype": "owner", + "org1type": null, + "subjectid": "Lnzxp-5XdWadoTCyZiN6M", + "amt_pattern": "${交易手续费}$" + }, + { + "id": "vi9Q9r3V-IXXgEffs7un8", + "action": "PAY*", + "accounting_orgtype": "owner", + "accounting_dir": "1", + "orgtype": "provider", + "org1type": "reseller", + "subjectid": "pF2OEBe_E2sYK7fAuVN3n", + "amt_pattern": "${采购成本}$" + }, + { + "id": "vQ7GNoVridCqzQZ6MtbwN", + "action": "RECHARGE", + "accounting_orgtype": "owner", + "accounting_dir": "1", + "orgtype": "customer", + "org1type": null, + "subjectid": "Iw1EFL1Ubl7Dq7JVFMMEq", + "amt_pattern": "${交易金额}$" + }, + { + "id": "Z34IkRVy5SohRqxkVQT2p", + "action": "RECHARGE", + "accounting_orgtype": "owner", + "accounting_dir": "0", + "orgtype": "owner", + "org1type": null, + "subjectid": "BUyr-yN8rtwefNOjQwVXK", + "amt_pattern": "${交易金额}$ - ${充值费率}$ * ${交易金额}$" + } + ], + "currency": [ + { + "id": "CNY", + "name": "人民币", + "symbol": "¥", + "decimal_places": 2, + "is_base": "1", + "status": "active" + }, + { + "id": "GBP", + "name": "英镑", + "symbol": "£", + "decimal_places": 2, + "is_base": "0", + "status": "active" + }, + { + "id": "JPY", + "name": "日元", + "symbol": "¥", + "decimal_places": 0, + "is_base": "0", + "status": "active" + }, + { + "id": "USD", + "name": "美元", + "symbol": "$", + "decimal_places": 2, + "is_base": "0", + "status": "active" + } + ], + "exchange_rate": [ + { + "id": "er_gbp_cny_20260821", + "from_currency": "GBP", + "to_currency": "CNY", + "buy_rate": 9.15, + "sell_rate": 9.2179, + "mid_rate": 9.2101, + "effective_date": "2026-08-21" + }, + { + "id": "er_jpy_cny_20260821", + "from_currency": "JPY", + "to_currency": "CNY", + "buy_rate": 0.042221, + "sell_rate": 0.042547, + "mid_rate": 0.042516, + "effective_date": "2026-08-21" + }, + { + "id": "er_usd_cny_20260821", + "from_currency": "USD", + "to_currency": "CNY", + "buy_rate": 6.7096, + "sell_rate": 6.7379, + "mid_rate": 6.7817, + "effective_date": "2026-08-21" + } + ] +} \ No newline at end of file diff --git a/init/data.yaml b/init/data.yaml deleted file mode 100644 index 03fe5e8..0000000 --- a/init/data.yaml +++ /dev/null @@ -1,124 +0,0 @@ -appcodes: -- id: accounting_dir - name: 记账方向 - hierarchy_flg:0 -- id: balance_at - name: 余额方向 - hierarchy_flg:0 -- id: partytype - name: 机构类型 - hierarchy_flg:0 -- id: credit_status - name: 信用额度状态 - hierarchy_flg:0 - -appcodes_kv: -- id: accounting_dir0 - parentid: accounting_dir - k: 0 - v: 借 -- id: accounting_dir1 - parentid: accounting_dir - k: 1 - v: 贷 -- id: balance_at_0 - parentid: balance_at - k: 0 - v: 借 -- id: balance_at_1 - parentid: balance_at - k: 1 - v: 贷 -- id: partytype_0 - parentid: partytype - k: owner - v: 平台 -- id: partytype_1 - parentid: partytype - k: reseller - v: 分销商 -- id: partytype_2 - name: partytype - k: customer - v: 客户 -- id: partytype_3 - parentid:partytype - k: provider - v: 供应商 -- id: credit_status_active - parentid: credit_status - k: active - v: 生效 -- id: credit_status_inactive - parentid: credit_status - k: inactive - v: 停用 -- id: credit_status_expired - parentid: credit_status - k: expired - v: 已过期 -- id: currency_status_active - parentid: currency_status - k: active - v: 启用 -- id: currency_status_inactive - parentid: currency_status - k: inactive - v: 停用 - -currency: -- id: CNY - name: 人民币 - symbol: ¥ - decimal_places: 2 - is_base: '1' - status: active -- id: USD - name: 美元 - symbol: $ - decimal_places: 2 - is_base: '0' - status: active -- id: JPY - name: 日元 - symbol: ¥ - decimal_places: 0 - is_base: '0' - status: active -- id: GBP - name: 英镑 - symbol: £ - decimal_places: 2 - is_base: '0' - status: active - -exchange_rate: -- id: er_usd_cny - from_currency: USD - to_currency: CNY - buy_rate: 7.150000 - sell_rate: 7.250000 - mid_rate: 7.200000 - effective_date: '2025-01-01' -- id: er_jpy_cny - from_currency: JPY - to_currency: CNY - buy_rate: 0.048000 - sell_rate: 0.049000 - mid_rate: 0.048500 - effective_date: '2025-01-01' -- id: er_gbp_cny - from_currency: GBP - to_currency: CNY - buy_rate: 9.100000 - sell_rate: 9.250000 - mid_rate: 9.175000 - effective_date: '2025-01-01' -- id: er_cny_usd - from_currency: CNY - to_currency: USD - buy_rate: 0.137900 - sell_rate: 0.139900 - mid_rate: 0.138900 - effective_date: '2025-01-01' - diff --git a/json/currency_list.json b/json/currency_list.json index f99ea0b..41f2663 100644 --- a/json/currency_list.json +++ b/json/currency_list.json @@ -1,18 +1,28 @@ { - "tblname": "currency", - "alias": "currency_list", - "title": "币种管理", - "params": { - "browserfields": { - "fields": ["id", "name", "symbol", "decimal_places", "is_base", "status"], - "alters": { - "status": {"uitype": "select", "optiontable": "appcodes_kv", "cond": "parentid='currency_status'"} - } - }, - "editable": { - "new_data_url": "{{entire_url('../api/currency_create.dspy')}}", - "update_data_url": "{{entire_url('../api/currency_update.dspy')}}", - "delete_data_url": "{{entire_url('../api/currency_delete.dspy')}}" + "tblname": "currency", + "title": "币种管理", + "params": { + "browserfields": { + "fields": [ + "id", + "name", + "symbol", + "decimal_places", + "is_base", + "status" + ], + "alters": { + "status": { + "uitype": "select", + "optiontable": "appcodes_kv", + "cond": "parentid='currency_status'" } + } + }, + "editable": { + "new_data_url": "{{entire_url('../api/currency_create.dspy')}}", + "update_data_url": "{{entire_url('../api/currency_update.dspy')}}", + "delete_data_url": "{{entire_url('../api/currency_delete.dspy')}}" } + } } diff --git a/json/exchange_rate_list.json b/json/exchange_rate_list.json index 71d0f08..c382638 100644 --- a/json/exchange_rate_list.json +++ b/json/exchange_rate_list.json @@ -1,19 +1,31 @@ { - "tblname": "exchange_rate", - "alias": "exchange_rate_list", - "title": "汇率管理", - "params": { - "browserfields": { - "fields": ["from_currency", "to_currency", "buy_rate", "sell_rate", "mid_rate", "effective_date"], - "alters": { - "from_currency": {"uitype": "select", "optiontable": "currency"}, - "to_currency": {"uitype": "select", "optiontable": "currency"} - } + "tblname": "exchange_rate", + "title": "汇率管理", + "params": { + "browserfields": { + "fields": [ + "from_currency", + "to_currency", + "buy_rate", + "sell_rate", + "mid_rate", + "effective_date" + ], + "alters": { + "from_currency": { + "uitype": "select", + "optiontable": "currency" }, - "editable": { - "new_data_url": "{{entire_url('../api/exchange_rate_create.dspy')}}", - "update_data_url": "{{entire_url('../api/exchange_rate_update.dspy')}}", - "delete_data_url": "{{entire_url('../api/exchange_rate_delete.dspy')}}" + "to_currency": { + "uitype": "select", + "optiontable": "currency" } + } + }, + "editable": { + "new_data_url": "{{entire_url('../api/exchange_rate_create.dspy')}}", + "update_data_url": "{{entire_url('../api/exchange_rate_update.dspy')}}", + "delete_data_url": "{{entire_url('../api/exchange_rate_delete.dspy')}}" } + } } diff --git a/wwwroot/index.ui b/wwwroot/index.ui deleted file mode 120000 index b89399c..0000000 --- a/wwwroot/index.ui +++ /dev/null @@ -1 +0,0 @@ -/home/hermesai/repos/accounting/wwwroot/index.ui \ No newline at end of file