Browse Source

修改查询ccnet重发订单逻辑

hyq 5 years ago
parent
commit
b66c6bab67

+ 10 - 0
kmall-admin/src/main/java/com/kmall/admin/entity/WxOrderEntity.java

@@ -157,6 +157,8 @@ public class WxOrderEntity implements Serializable {
 
     private String placeOrderlTimeStr;
 
+    private String failMsg;
+
     public String getPlaceOrderlTimeStr() {
         return placeOrderlTimeStr;
     }
@@ -732,4 +734,12 @@ public class WxOrderEntity implements Serializable {
     public void setExField5(String exField5) {
         this.exField5 = exField5 == null ? null : exField5.trim();
     }
+
+    public String getFailMsg() {
+        return failMsg;
+    }
+
+    public void setFailMsg(String failMsg) {
+        this.failMsg = failMsg;
+    }
 }

+ 1 - 1
kmall-admin/src/main/webapp/WEB-INF/page/shop/orderresend.html

@@ -1,7 +1,7 @@
 <!DOCTYPE html>
 <html>
 <head>
-    <title>订单退款记录表</title>
+    <title>订单ccnet重发记录表</title>
     #parse("sys/header.html")
 </head>
 <body>

+ 28 - 27
kmall-admin/src/main/webapp/js/shop/orderresend.js

@@ -4,8 +4,8 @@ $(function () {
         url: url,
         datatype: "json",
         colModel: [
-			{label: 'wxOrderSn', name: 'wxOrderSn', index: 'wxOrderSn', key: true, hidden: true},
-			{label: '订单编号', name: 'wxOrderId', index: 'wxOrderId', width: 40},
+			{label: 'wxOrderId', name: 'wxOrderId', index: 'id', key: true, hidden: true},
+			// {label: '订单编号', name: 'wxOrderId', index: 'wxOrderId', width: 40},
 			{label: '商户订单编号', name: 'merchOrderId', index: 'merchOrderId', width: 90},
 			{label: '商户子订单编号', name: 'orderSn', index: 'orderSn', width: 100},
             {label: '商户编号', name: 'merchSn', index: 'merchSn', width: 100},
@@ -81,29 +81,32 @@ $(function () {
                     return '-';
                 }
             },
-            {
-                label: '操作', width: 180, sortable: false,
+            {label: '失败原因', name: 'failMsg', index: 'failMsg', width: 100},
+            {label: '操作', width: 180, sortable: false,align: 'center',
                 formatter: function (value, col, row) {
-                    let htmlStr = '<button class="btn btn-outline btn-info" onclick="vm.lookDetail(' + row.wxOrderSn + ')"><i class="fa fa-info-circle"></i>详情</button>&nbsp;';
-                    if(row.clecOrderStatus==3){
-                        htmlStr += '<button class="btn btn-outline btn-primary" ' +
-                            'onclick="vm.resendOrder(' + row.wxOrderSn + ')"><i class="fa fa-check-circle"></i>&nbsp;重发电子订单</button>&nbsp;';
-                    }
-                    if(row.wayOrderStatus==3){
-                        htmlStr += '<button class="btn btn-outline btn-primary" ' +
-                            'onclick="vm.resendOrder(' + row.wxOrderSn + ')"><i class="fa fa-check-circle"></i>&nbsp;重发运单</button>&nbsp;';
-                    }
-                    if(row.playOrderStatus==3){
-                        htmlStr += '<button class="btn btn-outline btn-primary" ' +
-                            'onclick="vm.resendOrder(' + row.wxOrderSn + ')"><i class="fa fa-check-circle"></i>&nbsp;重发支付单</button>&nbsp;';
+                    let htmlStr = '<button class="btn btn-outline btn-info" onclick="vm.lookDetail('+row.wxOrderId+')"><i class="fa fa-info-circle"></i>失败原因</button>&nbsp;';
+
+                    if (hasPermission('order:resendWxOrder')) {
+                        if (row.clecOrderStatus == 3) {
+                            htmlStr += '<button class="btn btn-outline btn-primary" ' +
+                                'onclick="vm.resendWxOrder(' + row.wxOrderId + ')"><i class="fa fa-check-circle"></i>&nbsp;重发电子订单</button>&nbsp;';
+                        }
+                        if (row.wayOrderStatus == 3) {
+                            htmlStr += '<button class="btn btn-outline btn-primary" ' +
+                                'onclick="vm.resendWxOrder(' + row.wxOrderId + ')"><i class="fa fa-check-circle"></i>&nbsp;重发运单</button>&nbsp;';
+                        }
+                        if (row.playOrderStatus == 3) {
+                            htmlStr += '<button class="btn btn-outline btn-primary" ' +
+                                'onclick="vm.resendWxOrder(' + row.wxOrderId + ')"><i class="fa fa-check-circle"></i>&nbsp;重发支付单</button>&nbsp;';
+                        }
                     }
                     return htmlStr;
                 }
             }],
 		viewrecords: true,
         height: 645,
-        rowNum: 10,
-        rowList: [200, 300, 500],
+        rowNum: 999,
+        // rowList: [200, 300, 500],
         rownumbers: true,
         rownumWidth: 25,
         autowidth: true,
@@ -163,10 +166,9 @@ var vm = new Vue({
         handleReset: function (name) {
             handleResetForm(this, name);
         },
-        resendOrder: function (orderId, rowId) {
+        resendWxOrder: function (rowId) {
             let params = {};
-            params.orderId = orderId;
-            params.refundId = rowId;
+            params.wxOrderId = rowId;
             confirm('是否确认重发?', function () {
                 $.ajax({
                     type: "POST",
@@ -184,12 +186,11 @@ var vm = new Vue({
                 });
             })
         },
-        lookDetail: function (rowId) {
-            vm.showList = 1;
-            vm.title = "维权订单详情";
-            // $.get("../orderrefund/info/" + rowId, function (r) {
-            //     vm.orderResend = r.orderRefund;
-            // });
+        lookDetail: function (sn) {
+            // vm.showList = 1;
+            // vm.title = "维权订单详情";
+            let jqGrid = $("#jqGrid").jqGrid('getRowData',sn);
+            alert(jqGrid.failMsg);
         }
 	}
 });