From 7c0acb5245469c1651bc5b9e2c5c72b7277b0e69 Mon Sep 17 00:00:00 2001 From: yumoqing Date: Fri, 3 Jul 2026 17:57:48 +0800 Subject: [PATCH] fix: UiFile-based upload with drag-drop support, download/delete toolbar --- wwwroot/api/contract_attach.ui | 36 +++++++++++++++++++++------------- 1 file changed, 22 insertions(+), 14 deletions(-) diff --git a/wwwroot/api/contract_attach.ui b/wwwroot/api/contract_attach.ui index fcc15a9..f32df73 100644 --- a/wwwroot/api/contract_attach.ui +++ b/wwwroot/api/contract_attach.ui @@ -6,8 +6,6 @@ {% set fiid = 'dist_agreement_attach' %} {% endif %} {% set folder = ensure_contract_folder(request, contract_id, fiid) %} -{% set upload_url = entire_url('contract_upload.dspy') %} -{% set list_url = entire_url('contract_attach_list.dspy') %} {% set delete_url = entire_url('contract_attach_delete.dspy') %} { "widgettype": "VBox", @@ -17,13 +15,24 @@ }, "subwidgets": [ { - "widgettype": "Title4", + "widgettype": "HBox", "options": { - "fontWeight": "600", - "otext": "合同附件", - "i18n": true, - "marginBottom": "8px" - } + "alignItems": "center", + "marginBottom": "12px" + }, + "subwidgets": [ + { + "widgettype": "Title4", + "options": { + "fontWeight": "600", + "otext": "合同附件", + "i18n": true + } + }, + { + "widgettype": "Filler" + } + ] }, { "widgettype": "UiFile", @@ -31,14 +40,13 @@ "options": { "name": "upfile", "multiple": true, - "label": "选择文件(支持多选及拖拽)", - "cwidth": 30 + "label": "拖拽文件到此处,或点击选择文件" }, "binds": [{ "wid": "self", "event": "changed", "actiontype": "script", - "script": "var files=this.value;if(!files||!files.length)return;var fd=new FormData();fd.append('folderid','{{folder}}');fd.append('fiid','{{fiid}}');for(var i=0;i