Explorar o código

后端退款增加遮罩1215

qng %!s(int64=3) %!d(string=hai) anos
pai
achega
93eaac3764
Modificáronse 1 ficheiros con 14 adicións e 0 borrados
  1. 14 0
      kmall-admin/src/main/webapp/js/shop/offilineOrderList.js

+ 14 - 0
kmall-admin/src/main/webapp/js/shop/offilineOrderList.js

@@ -438,11 +438,13 @@ let vm = new Vue({
             params.orderId = rowId;
             params.orderId = rowId;
 
 
             confirm("确认退款吗?",function () {
             confirm("确认退款吗?",function () {
+                dialogLoading(true);
                 $.ajax({
                 $.ajax({
                     type: "POST",
                     type: "POST",
                     url: '../order/offilineRefund',
                     url: '../order/offilineRefund',
                     data: params,
                     data: params,
                     success: function (r) {
                     success: function (r) {
+                        dialogLoading(false);
                         if (r.code == 0) {
                         if (r.code == 0) {
                             vm.canRefund = true;
                             vm.canRefund = true;
                             alert("退款成功")
                             alert("退款成功")
@@ -736,6 +738,18 @@ let vm = new Vue({
         return content;
         return content;
     }
     }
 
 
+    function dialogLoading(flag) {
+        if (flag) {
+            top.layer.load(0, {
+                shade: [0.5, '#fff'],
+                time: 10000,
+                content: '处理中...'
+            });
+        } else {
+            top.layer.closeAll('loading');
+        }
+    }
+
     function wxPay(authCode,id,msg_index){
     function wxPay(authCode,id,msg_index){
         $.ajax({
         $.ajax({
             type: "POST",
             type: "POST",