{ "widgettype": "VBox", "options": {"width": "100%", "padding": "8px", "gap": "8px"}, "subwidgets": [ { "widgettype": "InlineForm", "id": "price_filter", "options": { "css": "card", "padding": "8px", "submit_label": "查询", "fields": [ {"name": "supplier_org_id", "label": "供应商", "uitype": "str", "cwidth": 12}, {"name": "resource_type", "label": "资源类型", "uitype": "code", "cwidth": 10, "data": [{"value": "", "text": "全部"}, {"value": "llm_model", "text": "大模型按量"}, {"value": "llm_monthly", "text": "大模型包月"}, {"value": "compute", "text": "算力"}]}, {"name": "status", "label": "状态", "uitype": "code", "cwidth": 8, "data": [{"value": "", "text": "全部"}, {"value": "1", "text": "有效"}, {"value": "0", "text": "无效"}]} ] }, "binds": [{ "wid": "self", "event": "submit", "actiontype": "script", "target": "price_table", "script": "var tbl = bricks.getWidgetById('price_table', bricks.app.root); if(tbl) await tbl.render(params);" }] }, { "widgettype": "Tabular", "id": "price_table", "options": { "width": "100%", "css": "card", "data_url": "{{entire_url('/supplychain/supplier_resource_price_list/get_supplier_resource_price.dspy')}}", "data_method": "GET", "page_rows": 20, "toolbar": { "tools": [ {"name": "add_price", "label": "新增定价"} ] }, "row_options": { "browserfields": { "exclouded": ["id", "created_at", "updated_at"], "alters": { "supplier_org_id": { "uitype": "code", "valueField": "supplier_org_id", "textField": "supplier_org_id_text", "params": {"dbname": "supplychain", "table": "suppliers", "tblvalue": "org_id", "tbltext": "supplier_name", "valueField": "supplier_org_id", "textField": "supplier_org_id_text"}, "dataurl": "{{entire_url('/appbase/get_code.dspy')}}" }, "resource_type": {"uitype": "code", "data": [{"value": "llm_model", "text": "大模型按量"}, {"value": "llm_monthly", "text": "大模型包月"}, {"value": "compute", "text": "算力"}]}, "price_unit": {"uitype": "code", "data": [{"value": "per_1k_tokens", "text": "每千tokens"}, {"value": "per_request", "text": "每次"}, {"value": "per_gpu_hour", "text": "每GPU时"}]}, "status": {"uitype": "code", "data": [{"value": "1", "text": "有效"}, {"value": "0", "text": "无效"}]} } }, "fields": [ {"name": "supplier_org_id", "title": "供应商", "type": "str", "length": 32, "cwidth": 14}, {"name": "resource_type", "title": "资源类型", "type": "str", "length": 32, "cwidth": 10}, {"name": "resource_ref_id", "title": "资源ID", "type": "str", "length": 32, "cwidth": 12}, {"name": "resource_ref_name", "title": "资源名称", "type": "str", "length": 255, "cwidth": 12}, {"name": "unit_price", "title": "统一单价", "type": "double", "length": 15, "dec": 8, "cwidth": 10}, {"name": "input_price", "title": "输入价", "type": "double", "length": 15, "dec": 8, "cwidth": 10}, {"name": "output_price", "title": "输出价", "type": "double", "length": 15, "dec": 8, "cwidth": 10}, {"name": "price_unit", "title": "单位", "type": "str", "length": 32, "cwidth": 8}, {"name": "effective_date", "title": "生效日", "type": "date", "cwidth": 10}, {"name": "expiry_date", "title": "失效日", "type": "date", "cwidth": 10}, {"name": "status", "title": "状态", "type": "char", "length": 1, "cwidth": 6} ] } }, "binds": [{ "wid": "self", "event": "add_price", "actiontype": "urlwidget", "target": "PopupWindow", "popup_options": {"title": "新增定价", "cwidth": 45, "cheight": 28}, "options": {"url": "{{entire_url('/supplychain/supplier_resource_price_list/add_supplier_resource_price.dspy')}}"} }] } ] }