diff --git a/wwwroot/contract_detail.ui b/wwwroot/contract_detail.ui index ec79700..f034637 100644 --- a/wwwroot/contract_detail.ui +++ b/wwwroot/contract_detail.ui @@ -1,212 +1,212 @@ { - "widgettype": "VBox", - "options": { - "width": "100%", - "height": "100%" - }, - "subwidgets": [ - { - "widgettype": "HBox", - "options": { + "widgettype": "VBox", + "options": { "width": "100%", - "height": "50px" - }, - "subwidgets": [ - { - "widgettype": "Button", - "options": { - "text": "返回列表", - "styleType": "default", - "style": { - "marginLeft": "20px", - "marginTop": "8px" - } - }, - "binds": [ - { - "wid": "self", - "event": "click", - "actiontype": "urlwidget", - "target": "body/app", - "options": { - "url": "{{entire_url('contract_list.ui')}}" - } - } - ] - }, - { - "widgettype": "Filler" - }, - { - "widgettype": "Button", - "options": { - "text": "编辑合同", - "styleType": "primary", - "style": { - "marginRight": "20px", - "marginTop": "8px" - } - }, - "binds": [ - { - "wid": "self", - "event": "click", - "actiontype": "urlwidget", - "target": "body/app", - "options": { - "url": "{{entire_url('contract_edit.ui')}}", - "params": { - "id": "{% raw %}{{params_kw.get('contract_id')}}{% endraw %}" - } - } - } - ] - } - ] + "height": "100%" }, - { - "widgettype": "Filler", - "options": { - "height": "10px" - } - }, - { - "widgettype": "Form", - "options": { - "tblname": "contract", - "record_id": "{% raw %}{{params_kw.get('contract_id')}}{% endraw %}", - "readonly": true, - "width": "100%", - "style": { - "maxWidth": "1200px", - "margin": "0 auto" - } - } - }, - { - "widgettype": "Filler", - "options": { - "height": "20px" - } - }, - { - "widgettype": "HBox", - "options": { - "width": "100%", - "style": { - "maxWidth": "1200px", - "margin": "0 auto" - } - }, - "subwidgets": [ + "subwidgets": [ { - "widgettype": "VBox", - "options": { - "width": "50%" - }, - "subwidgets": [ - { - "widgettype": "Text", - "options": { - "text": "合同附件", - "style": { - "fontSize": "18px", - "fontWeight": "600", - "marginBottom": "10px" - } - } - }, - { - "widgettype": "DataGrid", - "options": { - "tblname": "contract_attachment", + "widgettype": "HBox", + "options": { "width": "100%", - "parent_field": "contract_id", - "parent_value": "{% raw %}{{params_kw.get('contract_id')}}{% endraw %}" - } - } - ] + "height": "50px" + }, + "subwidgets": [ + { + "widgettype": "Button", + "options": { + "styleType": "default", + "style": { + "marginLeft": "20px", + "marginTop": "8px" + }, + "label": "返回列表" + }, + "binds": [ + { + "wid": "self", + "event": "click", + "actiontype": "urlwidget", + "target": "body/app", + "options": { + "url": "{{entire_url('contract_list.ui')}}" + } + } + ] + }, + { + "widgettype": "Filler" + }, + { + "widgettype": "Button", + "options": { + "styleType": "primary", + "style": { + "marginRight": "20px", + "marginTop": "8px" + }, + "label": "编辑合同" + }, + "binds": [ + { + "wid": "self", + "event": "click", + "actiontype": "urlwidget", + "target": "body/app", + "options": { + "url": "{{entire_url('contract_edit.ui')}}", + "params": { + "id": "{% raw %}{{params_kw.get('contract_id')}}{% endraw %}" + } + } + } + ] + } + ] }, { - "widgettype": "Filler", - "options": { - "width": "20px" - } - }, - { - "widgettype": "VBox", - "options": { - "width": "50%" - }, - "subwidgets": [ - { - "widgettype": "Text", - "options": { - "text": "AI分析结果", - "style": { - "fontSize": "18px", - "fontWeight": "600", - "marginBottom": "10px" - } - } - }, - { - "widgettype": "Text", - "options": { - "text": "合规检查结果:", - "style": { - "fontWeight": "600", - "marginBottom": "5px" - } - } - }, - { - "widgettype": "Text", - "options": { - "fieldname": "ai_compliance_result", - "record_id": "{% raw %}{{params_kw.get('contract_id')}}{% endraw %}", - "tblname": "contract", - "style": { - "whiteSpace": "pre-wrap", - "backgroundColor": "#f8f9fa", - "padding": "10px", - "borderRadius": "4px" - } - } - }, - { - "widgettype": "Filler", - "options": { + "widgettype": "Filler", + "options": { "height": "10px" - } - }, - { - "widgettype": "Text", - "options": { - "text": "关键时点:", - "style": { - "fontWeight": "600", - "marginBottom": "5px" - } - } - }, - { - "widgettype": "Text", - "options": { - "fieldname": "ai_key_dates", - "record_id": "{% raw %}{{params_kw.get('contract_id')}}{% endraw %}", - "tblname": "contract", - "style": { - "whiteSpace": "pre-wrap", - "backgroundColor": "#f8f9fa", - "padding": "10px", - "borderRadius": "4px" - } - } } - ] + }, + { + "widgettype": "Form", + "options": { + "tblname": "contract", + "record_id": "{% raw %}{{params_kw.get('contract_id')}}{% endraw %}", + "readonly": true, + "width": "100%", + "style": { + "maxWidth": "1200px", + "margin": "0 auto" + } + } + }, + { + "widgettype": "Filler", + "options": { + "height": "20px" + } + }, + { + "widgettype": "HBox", + "options": { + "width": "100%", + "style": { + "maxWidth": "1200px", + "margin": "0 auto" + } + }, + "subwidgets": [ + { + "widgettype": "VBox", + "options": { + "width": "50%" + }, + "subwidgets": [ + { + "widgettype": "Text", + "options": { + "text": "合同附件", + "style": { + "fontSize": "18px", + "fontWeight": "600", + "marginBottom": "10px" + } + } + }, + { + "widgettype": "DataGrid", + "options": { + "tblname": "contract_attachment", + "width": "100%", + "parent_field": "contract_id", + "parent_value": "{% raw %}{{params_kw.get('contract_id')}}{% endraw %}" + } + } + ] + }, + { + "widgettype": "Filler", + "options": { + "width": "20px" + } + }, + { + "widgettype": "VBox", + "options": { + "width": "50%" + }, + "subwidgets": [ + { + "widgettype": "Text", + "options": { + "text": "AI分析结果", + "style": { + "fontSize": "18px", + "fontWeight": "600", + "marginBottom": "10px" + } + } + }, + { + "widgettype": "Text", + "options": { + "text": "合规检查结果:", + "style": { + "fontWeight": "600", + "marginBottom": "5px" + } + } + }, + { + "widgettype": "Text", + "options": { + "fieldname": "ai_compliance_result", + "record_id": "{% raw %}{{params_kw.get('contract_id')}}{% endraw %}", + "tblname": "contract", + "style": { + "whiteSpace": "pre-wrap", + "backgroundColor": "#f8f9fa", + "padding": "10px", + "borderRadius": "4px" + } + } + }, + { + "widgettype": "Filler", + "options": { + "height": "10px" + } + }, + { + "widgettype": "Text", + "options": { + "text": "关键时点:", + "style": { + "fontWeight": "600", + "marginBottom": "5px" + } + } + }, + { + "widgettype": "Text", + "options": { + "fieldname": "ai_key_dates", + "record_id": "{% raw %}{{params_kw.get('contract_id')}}{% endraw %}", + "tblname": "contract", + "style": { + "whiteSpace": "pre-wrap", + "backgroundColor": "#f8f9fa", + "padding": "10px", + "borderRadius": "4px" + } + } + } + ] + } + ] } - ] - } - ] + ] } \ No newline at end of file diff --git a/wwwroot/contract_list.ui b/wwwroot/contract_list.ui index 23e517d..48920be 100644 --- a/wwwroot/contract_list.ui +++ b/wwwroot/contract_list.ui @@ -1,48 +1,140 @@ { - "widgettype": "Page", - "options": { - "title": "合同管理", - "style": {"height": "100vh", "padding": "0"} - }, - "subwidgets": [ - { - "widgettype": "VBox", - "options": {"style": {"padding": "16px", "flex": 1, "overflow": "hidden"}}, - "subwidgets": [ - { - "widgettype": "HBox", - "options": {"style": {"marginBottom": "16px", "gap": "8px"}}, - "subwidgets": [ - {"widgettype": "TextField", "id": "search_keyword", "options": {"label": "搜索", "placeholder": "合同编号/名称", "style": {"flex": 1}}}, - {"widgettype": "Button", "id": "btn_search", "options": {"text": "搜索", "variant": "primary"}}, - {"widgettype": "Button", "id": "btn_add", "options": {"text": "新增", "variant": "primary", "action": "navigate('main/contract_management/contract_edit.ui')"}} - ] - }, - { - "widgettype": "DataGrid", - "id": "contract_grid", - "options": { - "url": "{{entire_url('api/contract_list.dspy')}}", - "style": {"flex": 1}, - "columns": [ - {"field": "contract_number", "header": "合同编号", "width": 140}, - {"field": "title", "header": "合同名称", "width": 200}, - {"field": "party_a", "header": "甲方", "width": 150}, - {"field": "party_b", "header": "乙方", "width": 150}, - {"field": "contract_type", "header": "类型", "width": 100}, - {"field": "amount", "header": "金额", "width": 120}, - {"field": "start_date", "header": "开始日期", "width": 110}, - {"field": "end_date", "header": "结束日期", "width": 110}, - {"field": "status", "header": "状态", "width": 90} - ], - "toolbar": [ - {"type": "button", "text": "详情", "icon": "view", "action": "navigate('main/contract_management/contract_detail.ui?id={% raw %}{{selectedRow.id}}{% endraw %}')"}, - {"type": "button", "text": "编辑", "icon": "edit", "action": "navigate('main/contract_management/contract_edit.ui?id={% raw %}{{selectedRow.id}}{% endraw %}')"}, - {"type": "button", "text": "删除", "icon": "delete", "action": "doDelete('{% raw %}{{selectedRow.id}}{% endraw %}')"} - ] - } + "widgettype": "Page", + "options": { + "title": "合同管理", + "style": { + "height": "100vh", + "padding": "0" } - ] - } - ] -} + }, + "subwidgets": [ + { + "widgettype": "VBox", + "options": { + "style": { + "padding": "16px", + "flex": 1, + "overflow": "hidden" + } + }, + "subwidgets": [ + { + "widgettype": "HBox", + "options": { + "style": { + "marginBottom": "16px", + "gap": "8px" + } + }, + "subwidgets": [ + { + "widgettype": "TextField", + "id": "search_keyword", + "options": { + "label": "搜索", + "placeholder": "合同编号/名称", + "style": { + "flex": 1 + } + } + }, + { + "widgettype": "Button", + "id": "btn_search", + "options": { + "variant": "primary", + "label": "搜索" + } + }, + { + "widgettype": "Button", + "id": "btn_add", + "options": { + "variant": "primary", + "action": "navigate('main/contract_management/contract_edit.ui')", + "label": "新增" + } + } + ] + }, + { + "widgettype": "DataGrid", + "id": "contract_grid", + "options": { + "url": "{{entire_url('api/contract_list.dspy')}}", + "style": { + "flex": 1 + }, + "columns": [ + { + "field": "contract_number", + "header": "合同编号", + "width": 140 + }, + { + "field": "title", + "header": "合同名称", + "width": 200 + }, + { + "field": "party_a", + "header": "甲方", + "width": 150 + }, + { + "field": "party_b", + "header": "乙方", + "width": 150 + }, + { + "field": "contract_type", + "header": "类型", + "width": 100 + }, + { + "field": "amount", + "header": "金额", + "width": 120 + }, + { + "field": "start_date", + "header": "开始日期", + "width": 110 + }, + { + "field": "end_date", + "header": "结束日期", + "width": 110 + }, + { + "field": "status", + "header": "状态", + "width": 90 + } + ], + "toolbar": [ + { + "type": "button", + "text": "详情", + "icon": "view", + "action": "navigate('main/contract_management/contract_detail.ui?id={% raw %}{{selectedRow.id}}{% endraw %}')" + }, + { + "type": "button", + "text": "编辑", + "icon": "edit", + "action": "navigate('main/contract_management/contract_edit.ui?id={% raw %}{{selectedRow.id}}{% endraw %}')" + }, + { + "type": "button", + "text": "删除", + "icon": "delete", + "action": "doDelete('{% raw %}{{selectedRow.id}}{% endraw %}')" + } + ] + } + } + ] + } + ] +} \ No newline at end of file diff --git a/wwwroot/index.ui b/wwwroot/index.ui index 1f3dd42..97e54b8 100644 --- a/wwwroot/index.ui +++ b/wwwroot/index.ui @@ -10,11 +10,11 @@ { "widgettype": "Text", "options": { - "label": "合同管理", "fontSize": "24px", "fontWeight": "bold", "color": "#1E40AF", - "marginBottom": "20px" + "marginBottom": "20px", + "text": "合同管理" } }, { @@ -49,19 +49,19 @@ { "widgettype": "Text", "options": { - "label": "合同列表", "fontSize": "18px", "fontWeight": "bold", - "color": "#1E40AF" + "color": "#1E40AF", + "text": "合同列表" } }, { "widgettype": "Text", "options": { - "label": "查看所有合同及执行状态", "fontSize": "14px", "color": "#6B7280", - "marginTop": "8px" + "marginTop": "8px", + "text": "查看所有合同及执行状态" } } ] @@ -91,19 +91,19 @@ { "widgettype": "Text", "options": { - "label": "新建合同", "fontSize": "18px", "fontWeight": "bold", - "color": "#059669" + "color": "#059669", + "text": "新建合同" } }, { "widgettype": "Text", "options": { - "label": "创建新的合同记录", "fontSize": "14px", "color": "#6B7280", - "marginTop": "8px" + "marginTop": "8px", + "text": "创建新的合同记录" } } ] @@ -133,19 +133,19 @@ { "widgettype": "Text", "options": { - "label": "合同详情", "fontSize": "18px", "fontWeight": "bold", - "color": "#D97706" + "color": "#D97706", + "text": "合同详情" } }, { "widgettype": "Text", "options": { - "label": "查看合同详细信息及里程碑", "fontSize": "14px", "color": "#6B7280", - "marginTop": "8px" + "marginTop": "8px", + "text": "查看合同详细信息及里程碑" } } ] @@ -175,19 +175,19 @@ { "widgettype": "Text", "options": { - "label": "AI配置", "fontSize": "18px", "fontWeight": "bold", - "color": "#7C3AED" + "color": "#7C3AED", + "text": "AI配置" } }, { "widgettype": "Text", "options": { - "label": "合同AI分析配置", "fontSize": "14px", "color": "#6B7280", - "marginTop": "8px" + "marginTop": "8px", + "text": "合同AI分析配置" } } ] @@ -208,4 +208,4 @@ } } ] -} +} \ No newline at end of file