diff --git a/wwwroot/billing.ui b/wwwroot/billing.ui index 33e67b4..cb1acb6 100644 --- a/wwwroot/billing.ui +++ b/wwwroot/billing.ui @@ -1,5 +1,4 @@ {% set billing_url = entire_url('/accounting/billing.dspy') %} -{% set download_url = entire_url('/accounting/billing_download.dspy') %} { "widgettype": "VBox", "id": "billing_page", @@ -70,7 +69,7 @@ "wid": "self", "event": "click", "actiontype": "script", - "script": "var sd=document.querySelector(\"[name='start_date']\"),ed=document.querySelector(\"[name='end_date']\");if(!sd||!ed||!sd.value||!ed.value){bricks.show_error({title:'提示',message:'请先选择日期范围'});return;}var u='{{download_url}}?start_date='+encodeURIComponent(sd.value)+'&end_date='+encodeURIComponent(ed.value);fetch(u,{credentials:'include'}).then(function(r){return r.json()}).then(function(d){if(d.status!=='ok'){bricks.show_error({title:'下载失败',message:d.data.message});return;}var b=atob(d.data.content),n=b.length,arr=new Uint8Array(n);for(var i=0;i