From 17c1055ac108e6bef6c2b515c58b2f9ecea0da73 Mon Sep 17 00:00:00 2001 From: xinyb_ <xin0322> Date: 星期五, 24 九月 2021 14:53:16 +0800 Subject: [PATCH] 调整物料主批量上传附件的错误提示和事务 --- WebRoot/general/batchUpload/uploadIndex.jsp | 21 ++++++++++++++++++++- 1 files changed, 20 insertions(+), 1 deletions(-) diff --git a/WebRoot/general/batchUpload/uploadIndex.jsp b/WebRoot/general/batchUpload/uploadIndex.jsp index 2ffdf45..370fa6e 100644 --- a/WebRoot/general/batchUpload/uploadIndex.jsp +++ b/WebRoot/general/batchUpload/uploadIndex.jsp @@ -54,6 +54,11 @@ .file-drop-zone.clickable:hover{ border: 1px dashed #128be7 !important; } + .file-error-message { + position: fixed; + top: 230px; + width: 70%; + } </style> </head> <body> @@ -96,10 +101,24 @@ browseOnZoneClick: true, //甯冨皵鍊硷紝鏄惁鍦ㄧ偣鍑婚瑙堝尯鍩熸椂瑙﹀彂鏂囦欢娴忚/閫夋嫨銆傞粯璁や负false maxFilesNum: 0, // 涓婁紶鏈�澶х殑鏂囦欢鏁伴噺 }).on('fileuploaded',function(event, data, previewId, index){//鍗曚釜涓婁紶鍚� + var json=data.response; + if(json.code==-1){ + $(".file-upload-indicator").attr("title","涓婁紶閿欒"); + $(".file-upload-indicator").find("i").addClass("fa-exclamation-circle text-danger"); + $(".progress").hide(); + $(".file-error-message").html(json.data); + $(".file-error-message").show(); + return; + } $(".kv-file-remove").hide(); }).on('filebatchuploadsuccess', function (event, data, previewId, index) {//鎵归噺涓婁紶鎴愬姛缁撴灉澶勭悊 + var json=data.response; + if(json.code==-1){ + alert(json.data); + return; + } $(".kv-file-remove").hide(); - }); + }) }) </script> </body> -- Gitblit v1.8.0