소스 검색

admin html update

xiaoyu 3 년 전
부모
커밋
d47b98ced2
26개의 변경된 파일940개의 추가작업 그리고 1250개의 파일을 삭제
  1. 1 0
      admin/templates/default/css/skin_0.css
  2. 13 27
      admin/templates/default/merchant.edit.php
  3. 3 4
      admin/templates/default/merchant.index.php
  4. 58 74
      admin/templates/default/merchant.order.stats.php
  5. 7 7
      admin/templates/default/merchant.provider.evidence_list.php
  6. 2 4
      admin/templates/default/merchant.ratios.php
  7. 41 58
      admin/templates/default/merchant.refill.evidence_list.php
  8. 7 42
      admin/templates/default/provider.amount.control.php
  9. 1 46
      admin/templates/default/provider.evidence.add.php
  10. 0 5
      admin/templates/default/provider.group.set.php
  11. 23 20
      admin/templates/default/provider.index.php
  12. 58 76
      admin/templates/default/provider.order.stats.php
  13. 0 22
      admin/templates/default/provider.successful.php
  14. 7 19
      admin/templates/default/recharge.manual.add.php
  15. 6 18
      admin/templates/default/recharge.manual.edit.php
  16. 53 72
      admin/templates/default/refill.detail.php
  17. 3 5
      admin/templates/default/refill.order.batch.php
  18. 434 443
      admin/templates/default/refill.order.index.php
  19. 0 3
      admin/templates/default/refill.order.manual.index.php
  20. 82 94
      admin/templates/default/refill.order.search.php
  21. 37 67
      admin/templates/default/refill.order.send.index.php
  22. 8 9
      admin/templates/default/refill.order.show.index.php
  23. 30 34
      admin/templates/default/refill.refund.php
  24. 24 29
      admin/templates/default/set.cancel.order.php
  25. 38 49
      admin/templates/default/system.order.stats.php
  26. 4 23
      admin/templates/default/third.merchant.price.php

+ 1 - 0
admin/templates/default/css/skin_0.css

@@ -501,6 +501,7 @@ td.picture div { background:#FFF; float: left;/* if IE7/8/9*/ *text-align: cente
 		.table td.group p.goods a:hover { text-decoration: underline; color: #390;}
 
 .align-center {text-align:center;}
+.align-right {text-align:right;}
 .nowrap { white-space: nowrap;}
 .nobg{ background: transparent none no-repeat scroll 0 0 !important;}
 .space th { font-weight: 600; color: #329ED1; background-color: #F3FBFE;}

+ 13 - 27
admin/templates/default/merchant.edit.php

@@ -133,28 +133,28 @@
 <script type="text/javascript">
     $(function () {
         //按钮先执行验证再提交表单
-        $("#submitBtn").click(function () {
+    $("#submitBtn").click(function () {
             if ($("#user_form").valid()) {
                 $("#user_form").submit();
             }
         });
-        $('#user_form').validate({
+    $('#user_form').validate({
             errorPlacement: function (error, element) {
                 error.appendTo(element.parent().parent().prev().find('td:first'));
             },
             rules: {
                 company_name: {
-                    required: true,
+                required: true,
                 },
                 password: {
-                    required: true,
-                    maxlength: 20,
-                    minlength: 6
+                required: true,
+                maxlength: 20,
+                minlength: 6
                 },
             },
             messages: {
                 company_name: {
-                    required: '机构公司名称不能为空',
+                required: '机构公司名称不能为空',
                 },
                 password: {
                     required: '密码不能为空',
@@ -163,20 +163,16 @@
                 }
             }
         });
-        function cnMoneyFormat(money) {
+        //数字转大写
+    function cnMoneyFormat(money) {
         var number_data = money;
         number_data = parseInt(number_data);
-
         let yi = 0; //亿
         let wan = 0; //万
         let qian = 0; //千
-
-
-
         let qian_s = 1000; //千
         let wan_s = 10000; //万
         let yi_s = 100000000; //亿
-
         //取整
         function qz(data) {
           data = Math.floor(data);
@@ -220,37 +216,27 @@
           }
           return data_json;
         }
-
-    
         yi = yi_f(number_data);
         number_data = yi.data2;
         wan = wan_f(number_data);
         number_data = wan.data2;
-
         qian = qian_f(number_data);
         number_data = qian.data2;
-
-    
-        
-
         let result = yi.data1 + wan.data1 + qian.data1  + number_data;
         let resultvalue = result.substr(0, 1)
-
         if (resultvalue == 0) {
           result = result.substr(1, result.length)
         }
         let resultvali = result.substr(0, 3);
-
         if(resultvali == 'NaN') {
         $("#money").text('')
         }else {
         $("#money").text(result)
         }  
-    
     }
-  $('#credit_bonus').change(function () {
-    let val =($(this).val())
-     $('#money').text(cnMoneyFormat(val))
-  })
+    $('#credit_bonus').change(function () {
+        let val =($(this).val())
+        $('#money').text(cnMoneyFormat(val))
+    })
     });
 </script>

+ 3 - 4
admin/templates/default/merchant.index.php

@@ -7,7 +7,6 @@
     .tab-base li span {
         font-size:12px !important;
     }
-
 </style>
 <?php use refill\LZRefillFactory;
 
@@ -70,7 +69,7 @@ defined('InShopNC') or exit('Access Invalid!'); ?>
                 <th class="align-center"><?php echo $lang['merchant_name']; ?>编号</th>
                 <th class="align-left">机构账号</th>
                 <th class="align-center">会员ID</th>
-                <th class="align-left">机构公司名称</th>
+                <th class="align-center">机构公司名称</th>
                 <th class="align-right">所剩余额</th>
                 <th class="align-right">授信额度</th>
                 <th class="align-right">预警余额</th>
@@ -91,8 +90,8 @@ defined('InShopNC') or exit('Access Invalid!'); ?>
                         <td class="align-center"><?php echo $v['mchid']; ?></td>
                         <td class="align-left"><?php echo $v['name']; ?></td>
                         <td class="align-center"><?php echo $v['admin_id']; ?></td>
-                        <td class="align-left"><?php echo $v['company_name']; ?></td>
-                        <td id="just" class="align-right" >
+                        <td class="align-center"><?php echo $v['company_name']; ?></td>
+                        <td id="just" class="align-right">
                             <?php if($v['available_predeposit'] > 0){?>
                                 <span style="color: #0bb20c">
                             <?php }?>

+ 58 - 74
admin/templates/default/merchant.order.stats.php

@@ -14,7 +14,6 @@
     input::placeholder{ 
         color:#333; 
     }
-  
     .row_q ul li {
         height: 30px;
         line-height: 30px;
@@ -260,27 +259,21 @@
         })
         function JSONToExcelConvertor(JSONData, FileName, ShowLabel, headData) { 
             //先转化json 
-            var arrData = typeof JSONData != 'object' ? JSON.parse(JSONData) : JSONData; 
-                
-            var excel = '<table>';   
-                
+            let arrData = typeof JSONData != 'object' ? JSON.parse(JSONData) : JSONData; 
+            let excel = '<table>';   
             // 标题
             for (const key in headData) {
                 var head = "<tr>";
                 var td = "<td colspan='12' style='font-size:16px;'>"+ headData[key] + '</td>';
                 excel += td + "</tr>";
             }
-
             //设置表头 
             var row = "<tr>"; 
             for (var i = 0, l = ShowLabel.length; i < l; i++) { 
                 row += "<th style='font-size:14px;'>" + ShowLabel[i].value + '</th>'; 
             } 
-                
-                
             //换行 
             excel += row + "</tr>"; 
-                
             //设置数据 
             for (var i = 0; i < arrData.length; i++) { 
                 var row = "<tr>"; 
@@ -300,45 +293,40 @@
                 excel += row + "</tr>"; 
             } 
             excel += "</table>"; 
-            var excelFile = "<html xmlns:o='urn:schemas-microsoft-com:office:office' xmlns:x='urn:schemas-microsoft-com:office:excel' xmlns='http://www.w3.org/TR/REC-html40'>"; 
-            excelFile += '<meta http-equiv="content-type" content="application/vnd.ms-excel; charset=UTF-8">'; 
-            excelFile += '<meta http-equiv="content-type" content="application/vnd.ms-excel'; 
-            excelFile += '; charset=UTF-8">'; 
-            excelFile += "<head>"; 
-            excelFile += "<!--[if gte mso 9]>"; 
-            excelFile += "<xml>"; 
-            excelFile += "<x:ExcelWorkbook>"; 
-            excelFile += "<x:ExcelWorksheets>"; 
-            excelFile += "<x:ExcelWorksheet>"; 
-            excelFile += "<x:Name>"; 
-            excelFile += "{worksheet}"; 
-            excelFile += "</x:Name>"; 
-            excelFile += "<x:WorksheetOptions>"; 
-            excelFile += "<x:DisplayGridlines/>"; 
-            excelFile += "</x:WorksheetOptions>"; 
-            excelFile += "</x:ExcelWorksheet>"; 
-            excelFile += "</x:ExcelWorksheets>"; 
-            excelFile += "</x:ExcelWorkbook>"; 
-            excelFile += "</xml>"; 
-            excelFile += "<![endif]-->"; 
-            excelFile += "</head>"; 
-            excelFile += "<body>"; 
-            excelFile += excel; 
-            excelFile += "</body>"; 
-            excelFile += "</html>"; 
-
-                
-            var uri = 'data:application/vnd.ms-excel;charset=utf-8,' + encodeURIComponent(excelFile); 
-                
-            var link = document.createElement("a");   
-            link.href = uri; 
-                
-            link.style = "visibility:hidden"; 
-            link.download = FileName + ".xls"; 
-                
-            document.body.appendChild(link); 
-            link.click(); 
-            document.body.removeChild(link); 
+                var excelFile = "<html xmlns:o='urn:schemas-microsoft-com:office:office' xmlns:x='urn:schemas-microsoft-com:office:excel' xmlns='http://www.w3.org/TR/REC-html40'>"; 
+                excelFile += '<meta http-equiv="content-type" content="application/vnd.ms-excel; charset=UTF-8">'; 
+                excelFile += '<meta http-equiv="content-type" content="application/vnd.ms-excel'; 
+                excelFile += '; charset=UTF-8">'; 
+                excelFile += "<head>"; 
+                excelFile += "<!--[if gte mso 9]>"; 
+                excelFile += "<xml>"; 
+                excelFile += "<x:ExcelWorkbook>"; 
+                excelFile += "<x:ExcelWorksheets>"; 
+                excelFile += "<x:ExcelWorksheet>"; 
+                excelFile += "<x:Name>"; 
+                excelFile += "{worksheet}"; 
+                excelFile += "</x:Name>"; 
+                excelFile += "<x:WorksheetOptions>"; 
+                excelFile += "<x:DisplayGridlines/>"; 
+                excelFile += "</x:WorksheetOptions>"; 
+                excelFile += "</x:ExcelWorksheet>"; 
+                excelFile += "</x:ExcelWorksheets>"; 
+                excelFile += "</x:ExcelWorkbook>"; 
+                excelFile += "</xml>"; 
+                excelFile += "<![endif]-->"; 
+                excelFile += "</head>"; 
+                excelFile += "<body>"; 
+                excelFile += excel; 
+                excelFile += "</body>"; 
+                excelFile += "</html>"; 
+                var uri = 'data:application/vnd.ms-excel;charset=utf-8,' + encodeURIComponent(excelFile); 
+                var link = document.createElement("a");   
+                link.href = uri; 
+                link.style = "visibility:hidden"; 
+                link.download = FileName + ".xls"; 
+                document.body.appendChild(link); 
+                link.click(); 
+                document.body.removeChild(link); 
         }
         $('#ncexport').click(function () {
             let selectArr = selest_nc.getValue();
@@ -352,7 +340,6 @@
             let endTime = new Date($('input[name="query_end_time"]').val()).getTime()/1000;
             let cid = selectStr
             let order_time_type = $('#order_time_type').val()
-
             $.get('index.php?act=orderstats&op=ExportData&type=merchant', {
                 query_start_time: starTime,
                 query_end_time: endTime,
@@ -379,37 +366,34 @@
                     let title = [{value: "序号"},{value: "统计日期"},{value: "主体名称"},{value: "主体ID"},{value: "成功订单数"},{value: "成功金额"},{value: "下游金额"},{value: "上游金额"},{value: "利润"},{value: "订单总量"}, {value: "失败订单数量"},{value: "成功占比"}]
                     JSONToExcelConvertor(data.data, '下游对账记录', title, head)
                 }
-                // console.log('data', data);
             })
         })
         //多选
-        let selest_nc
-        let default_no_mch = $('input[name="default_no_mch"]').val().split(',');
-        $.get('index.php?act=refill_order&op=merchant_data', function(data) {
-            data = JSON.parse(data)
-            if (default_no_mch) {
-                for(let index = 0; index < default_no_mch.length; index++) {
-                    for (let j = 0; j < data.length; j++) {
-                        if(default_no_mch[index] == data[j].value) {
-                            data[j].selected = true
-                        }
+    let selest_nc
+    let default_no_mch = $('input[name="default_no_mch"]').val().split(',');
+    $.get('index.php?act=refill_order&op=merchant_data', function (data) {
+        data = JSON.parse(data)
+        if (default_no_mch) {
+            for (let index = 0; index < default_no_mch.length; index++) {
+                for (let j = 0; j < data.length; j++) {
+                    if (default_no_mch[index] == data[j].value) {
+                        data[j].selected = true
                     }
                 }
             }
-
-            selest_nc = xmSelect.render({
-                    el: '#selest_nc',
-                    size: 'mini',
-                    filterable: true,
-                    style: {
-                        minHeight: '27px',
-                        lineHeight: '27px',
-                        marginLeft: '4px',
-                        width: '250px'
-                    },
-                    
-                    data:data
-                })
+        }
+        selest_nc = xmSelect.render({
+            el: '#selest_nc',
+            size: 'mini',
+            filterable: true,
+            style: {
+                minHeight: '27px',
+                lineHeight: '27px',
+                marginLeft: '4px',
+                width: '250px'
+            },
+            data: data
         })
+    })
     });
 </script>

+ 7 - 7
admin/templates/default/merchant.provider.evidence_list.php

@@ -6,13 +6,13 @@
         font-weight:700 !important;
     }
     .page .fixed-bar .item-title h3 {
-    margin-top: 18px !important;
-    margin-bottom: 10px !important;
-    font-weight: 700 !important;
-}
-.tab-base li span {
-    font-size: 12px !important;
-}
+        margin-top: 18px !important;
+        margin-bottom: 10px !important;
+        font-weight: 700 !important;
+    }   
+    .tab-base li span {
+        font-size: 12px !important;
+    }
 </style>
 <div class="page">
     <div class="fixed-bar">

+ 2 - 4
admin/templates/default/merchant.ratios.php

@@ -155,7 +155,7 @@
             $("tbody>tr:odd").css("background-color","#FEF2E8");  
             $("tbody>tr:even").css("background-color","#f5f6ff"); 
             $(this).hover(function () {
-                $(this)[0].style.backgroundColor = '#cbe9f3'
+            $(this)[0].style.backgroundColor = '#cbe9f3'
             },function() {
             $("tbody>tr:odd").css("background-color","#FEF2E8");  
             $("tbody>tr:even").css("background-color","#f5f6ff"); 
@@ -163,13 +163,11 @@
         })
         // 导出
         $('#ncexport').click(function () {
-
             $('input[name="export"]').val('1');
             $('input[name="op"]').val('index');
-
             $('#formSearch').submit();
             $('input[name="export"]').val('');
-            var ii = layer.load();
+            let ii = layer.load();
             setTimeout(function(){
                 layer.close(ii);
             }, 800);

+ 41 - 58
admin/templates/default/merchant.refill.evidence_list.php

@@ -19,11 +19,10 @@
         padding: 13px 5px;
     }
     .layui-form-selected dl {
-    display: flex!important;
-    flex-wrap: wrap!important;
+        display: flex!important;
+        flex-wrap: wrap!important;
     }
     .layui-form-select dl {
-      
         top: 29px !important;
         left: 4px!important;
         min-width: 698%!important;
@@ -37,7 +36,6 @@
         width: 100%;
     }
     .layui-form-select .layui-input {
-    
         padding-left: 11px;
     }
     .page .fixed-bar .item-title h3 {
@@ -55,17 +53,15 @@
         color:#333; 
     }
     .xm-tips{
-    color: #333!important;
-    font-size: 12px;
+        color: #333!important;
+        font-size: 12px;
     }
     .layui-form-select dl dd.layui-this{
         display: none;
     }
     .layui-form-select dl dd {
-    cursor: pointer;
-    width: 130px;
-    
-
+        cursor: pointer;
+        width: 130px;
     }
 </style>
 <div class="page">
@@ -324,26 +320,20 @@
         function JSONToExcelConvertor(JSONData, FileName, ShowLabel, headData) { 
             //先转化json 
             var arrData = typeof JSONData != 'object' ? JSON.parse(JSONData) : JSONData; 
-                
             var excel = '<table>';   
-                
             // 标题
             for (const key in headData) {
                 var head = "<tr>";
                 var td = "<td colspan='14' style='font-size:16px;'>"+ headData[key] + '</td>';
                 excel += td + "</tr>";
             }
-
             //设置表头 
             var row = "<tr>"; 
             for (var i = 0, l = ShowLabel.length; i < l; i++) { 
                 row += "<th style='font-size:14px;'>" + ShowLabel[i].value + '</th>'; 
             } 
-                
-                
             //换行 
             excel += row + "</tr>"; 
-                
             //设置数据 
             for (var i = 0; i < arrData.length; i++) { 
                 var row = "<tr>"; 
@@ -364,46 +354,41 @@
                 row += '<td style=font-size:14px;'+ 'mso-number-format:"\@"'+ '>' + arrData[i].add_type_text + '</td>';
                 excel += row + "</tr>"; 
             } 
-            excel += "</table>"; 
-            var excelFile = "<html xmlns:o='urn:schemas-microsoft-com:office:office' xmlns:x='urn:schemas-microsoft-com:office:excel' xmlns='http://www.w3.org/TR/REC-html40'>"; 
-            excelFile += '<meta http-equiv="content-type" content="application/vnd.ms-excel; charset=UTF-8">'; 
-            excelFile += '<meta http-equiv="content-type" content="application/vnd.ms-excel'; 
-            excelFile += '; charset=UTF-8">'; 
-            excelFile += "<head>"; 
-            excelFile += "<!--[if gte mso 9]>"; 
-            excelFile += "<xml>"; 
-            excelFile += "<x:ExcelWorkbook>"; 
-            excelFile += "<x:ExcelWorksheets>"; 
-            excelFile += "<x:ExcelWorksheet>"; 
-            excelFile += "<x:Name>"; 
-            excelFile += "{worksheet}"; 
-            excelFile += "</x:Name>"; 
-            excelFile += "<x:WorksheetOptions>"; 
-            excelFile += "<x:DisplayGridlines/>"; 
-            excelFile += "</x:WorksheetOptions>"; 
-            excelFile += "</x:ExcelWorksheet>"; 
-            excelFile += "</x:ExcelWorksheets>"; 
-            excelFile += "</x:ExcelWorkbook>"; 
-            excelFile += "</xml>"; 
-            excelFile += "<![endif]-->"; 
-            excelFile += "</head>"; 
-            excelFile += "<body>"; 
-            excelFile += excel; 
-            excelFile += "</body>"; 
-            excelFile += "</html>"; 
-
-                
-            var uri = 'data:application/vnd.ms-excel;charset=utf-8,' + encodeURIComponent(excelFile); 
-                
-            var link = document.createElement("a");   
-            link.href = uri; 
-                
-            link.style = "visibility:hidden"; 
-            link.download = FileName + ".xls"; 
-                
-            document.body.appendChild(link); 
-            link.click(); 
-            document.body.removeChild(link); 
+                excel += "</table>"; 
+                var excelFile = "<html xmlns:o='urn:schemas-microsoft-com:office:office' xmlns:x='urn:schemas-microsoft-com:office:excel' xmlns='http://www.w3.org/TR/REC-html40'>"; 
+                excelFile += '<meta http-equiv="content-type" content="application/vnd.ms-excel; charset=UTF-8">'; 
+                excelFile += '<meta http-equiv="content-type" content="application/vnd.ms-excel'; 
+                excelFile += '; charset=UTF-8">'; 
+                excelFile += "<head>"; 
+                excelFile += "<!--[if gte mso 9]>"; 
+                excelFile += "<xml>"; 
+                excelFile += "<x:ExcelWorkbook>"; 
+                excelFile += "<x:ExcelWorksheets>"; 
+                excelFile += "<x:ExcelWorksheet>"; 
+                excelFile += "<x:Name>"; 
+                excelFile += "{worksheet}"; 
+                excelFile += "</x:Name>"; 
+                excelFile += "<x:WorksheetOptions>"; 
+                excelFile += "<x:DisplayGridlines/>"; 
+                excelFile += "</x:WorksheetOptions>"; 
+                excelFile += "</x:ExcelWorksheet>"; 
+                excelFile += "</x:ExcelWorksheets>"; 
+                excelFile += "</x:ExcelWorkbook>"; 
+                excelFile += "</xml>"; 
+                excelFile += "<![endif]-->"; 
+                excelFile += "</head>"; 
+                excelFile += "<body>"; 
+                excelFile += excel; 
+                excelFile += "</body>"; 
+                excelFile += "</html>"; 
+                var uri = 'data:application/vnd.ms-excel;charset=utf-8,' + encodeURIComponent(excelFile); 
+                var link = document.createElement("a");   
+                link.href = uri; 
+                link.style = "visibility:hidden"; 
+                link.download = FileName + ".xls"; 
+                document.body.appendChild(link); 
+                link.click(); 
+                document.body.removeChild(link); 
         }
         $('#ncexport').click(function () {
             let starTime = $('input[name="query_start_time"]').val()
@@ -434,7 +419,6 @@
                 if (data && data.data) {
                     let head = ['北京椰子电子商务有限责任公司']
                     if (mch_name) {
-                        
                         head.push('机构名称:' + mch_name)
                     }
                     if (state_text && state_text != "请选择...") {
@@ -463,7 +447,6 @@
                     let title = [{value: "序号"},{value: "申请编号"},{value: "机构名称"},{value: "申请金额"},{value: "申请后可用金额"},{value: "转账银行开户人姓名"},{value: "转账银行名称"},{value: "申请状态"},{value: "预存状态"},{value: "申请日期"},{value: "审核日期"}, {value: "审核管理员"},{value: "备注信息"},{value: "预存方式"}]
                     JSONToExcelConvertor(data.data, '充值申请', title, head)
                 }
-                // console.log('data', data);
             })
         })
     });

+ 7 - 42
admin/templates/default/provider.amount.control.php

@@ -9,11 +9,9 @@
         z-index: 1;
         *zoom: 1 /*IE7*/;
     }
-
     .batch i {
         cursor: pointer;
     }
-
     .batch-input {
         background-color: #FFF;
         white-space: nowrap;
@@ -25,12 +23,10 @@
         left: -75px;
         box-shadow: 3px 3px 0 rgba(153, 153, 153, 0.25);
     }
-
     .batch-input h6 {
         font-size: 12px;
         color: #555;
     }
-
     .batch-input .text {
         vertical-align: middle;
         clear: both;
@@ -38,7 +34,6 @@
         vertical-align: middle;
         margin-right: 4px;
     }
-
     .batch-input .arrow {
         background: url(<?php echo SHOP_SITE_URL;?>/templates/default/images/seller/ncsc_bg_img.png) no-repeat -240px -20px;
         display: block;
@@ -50,7 +45,6 @@
         position: absolute;
         z-index: 2;
     }
-
     .batch-input a.close {
         font-size: 11px;
         line-height: 12px;
@@ -68,7 +62,6 @@
         position: absolute;
         z-index: 2;
     }
-
     .text.price {
         width: 40px;
     }
@@ -76,8 +69,8 @@
         width: 40px;
     }
     .fixed-bar {
-    width: 100%;
-}
+        width: 100%;
+    }
 </style>
 <?php defined('InShopNC') or exit('Access Invalid!'); ?>
 <div class="page provider_amount_control">
@@ -232,29 +225,15 @@
     $(function () {
         $(window).scroll(function() {
             let toLeft = document.documentElement.scrollLeft || document.body.scrollLeft;
-            // let toTop = document.documentElement.scrollTop || document.body.scrollTop;
-            // console.log('toTop',toTop);
             if (toLeft>0) {
                 let headLeft = toLeft - 20
                 $('#tableHread')[0].style.left = '-'+headLeft+'px'
             } else if (toLeft == 0) {
                 $('#tableHread')[0].style.left = 20+'px'
             }
-            // if (toTop>0) {
-            //     console.log('11', $('.tbFlex')[0].offsetTop);
-            //     $('.tbFlex').each(function () {
-            //         let trTop = $(this)[0].offsetTop
-            //         $(this)[0].style.top = trTop - toTop + 'px'
-            //     })
-            // } else if (toTop == 0) {
-            //     $('.tbFlex').each(function () {
-            //         $(this)[0].style.top = 'auto'
-            //     })
-            // }
         });
         let isSubmit = true
         $('.input-one').blur(function () {
-            // console.log('$(this).value', ($(this)));
             let value = $(this)[0].value
             if (value >= -1 ) {
                 isSubmit = true;
@@ -266,7 +245,6 @@
         })
         $('.input-tow').blur(function () {
             let value = $(this)[0].value
-            // console.log(value);
             if (value >= 1 && value <= 100) {
                 isSubmit = true;
                 $(this)[0].style['borderColor'] = ''
@@ -285,10 +263,6 @@
                 $(this)[0].style['borderColor'] = '#e64444'
             }
         })
-        // $('input').each(function () {
-        //     $(this).focus(function () {
-        //     })
-        // });
 
         // 开始获取当前地址
         let type = '<?php echo $_GET['type'];?>';
@@ -310,7 +284,6 @@
 
         // tab样式
         $(".tab-base a").click(function () {
-            // console.log('this', $(this));
             $(this).addClass('current')
             $(this).siblings().removeClass('current')
         })
@@ -342,7 +315,6 @@
 
                 }
             })
-       
         })
         // 批量设置开关
         $('.batch > .icon-edit').click(function () {
@@ -375,11 +347,10 @@
             })
             
         })
-
-                // 单量设置开关
-            $('.batch > .icon-edit').click(function () {
-            $('.batch > .batch-input').hide();
-            $(this).next().show();
+        // 单量设置开关
+        $('.batch > .icon-edit').click(function () {
+        $('.batch > .batch-input').hide();
+        $(this).next().show();
         });
         $('.batch-input > .close').click(function () {
             $(this).parent().hide();
@@ -397,20 +368,14 @@
                 layer.msg('单量只能设置大于-1');
                 return
             }
-            // 获取要点击的单量设置按钮是哪一个
             let lie = $(this).parents('.batch-td').prevAll().length;
-            console.log(lie);
-            // 循环要查找的所有单量
-            $('.input-one').each(function(index, item) {
+        $('.input-one').each(function(index, item) {
                let tdCon = $(this).parents('td').prevAll().length / 2
-            //    获取那些是禁用的按钮
                let readOnly = $(this).attr('readOnly')
-            //    判断对应的单量设置按钮 与 下面单量长度 相对应
                if (lie == tdCon && !readOnly) {
                    $(this).val(quantity)
                }
             })
-            
         })
     });
 </script>

+ 1 - 46
admin/templates/default/provider.evidence.add.php

@@ -157,20 +157,17 @@ $(function(){
         }
     });
         layui.use(['form'], function(){
-            var form = layui.form;
+            let form = layui.form;
             form.on('select(provider_id)', function (data) {
                 let category = data.value;
-                console.log(category);
                 form.render('select')
                 $.get('index.php?act=provider_info&op=get_provider_info&provider_id='+ category,function(data) {
                     data = JSON.parse(data)
                     let html='';
                     data.to_bank_username.forEach(item=>{
                         html+=`<option value="${item}">${item}</option>`;
-                        
                     })
                     $('#to_bank_username').empty().append(html);
-
                     html='';
                     data.to_bank_name.forEach(item=>{
                         html+=`<option value="${item}">${item}</option>`;
@@ -179,48 +176,6 @@ $(function(){
                     form.render();
                 })
             })
-        
-        //    form.on('select(city)', function (data) {
-        //       let city_1 = data.value;
-        //       let city_2 = data.elem[data.elem.selectedIndex].text;
-        //       form.render('select')
-        //       let city_3 = {name: [], value: []}
-        //      //   city_3.push(city_1)
-        //       //   city_3.push(city_2)
-
-        //     //   console.log(city_3);
-        //    $.get('index.php?act=provider_info&op=get_provider_info',
-        //      {
-        //         provider_id:city_3,
-
-
-        //       },function(data) {
-        //           data = JSON.parse(data)
-        //              city_3.value.push(city_1)
-        //              city_3.name.push(city_2)
-        //          data.to_bank_username.push(city_3)
-        //         //  data.to_bank_username.push(city_2),
-        //          console.log(data);
-        //          })
-        //   })
-        //   form.on('select(city_q)', function (data) {
-        //       let city_4 = data.value;
-        //       let city_5 = data.elem[data.elem.selectedIndex].text;
-        //       form.render('select')
-        //       let city_6 = {name: [], value: []}
-        //     //   city_3.push(city_1)
-        //     //   city_3.push(city_2)
-
-        //       console.log(city_6);
-        //    $.get('index.php?act=provider_info&op=get_provider_info&provider_id'+city_6,function(data) {
-        //           data = JSON.parse(data)
-        //              city_6.value.push(city_4)
-        //              city_6.name.push(city_5)
-        //          data.to_bank_name.push(city_6)
-        //         //  data.to_bank_username.push(city_2),
-        //         //  console.log(data);
-        //          })
-        //   })
 
     $('#points_form').validate({
         errorPlacement: function (error, element) {

+ 0 - 5
admin/templates/default/provider.group.set.php

@@ -89,8 +89,6 @@
                 $(this).css('color', 'red')
             }
         })
-
-
         // 表格hover时背景
         $('.trFlex').each(function () {
             let color = $(this).attr('data-color')
@@ -119,7 +117,6 @@
 
                 }
             })
-       
         })
    
         // 清空
@@ -137,8 +134,6 @@
                 $(this).children().attr('disabled', true)
             }
         })
-        
-
         // 全选
         $('.checkAll').click(function () {
             let hang = $(this).parent().parent().prevAll().length + 1

+ 23 - 20
admin/templates/default/provider.index.php

@@ -147,8 +147,10 @@
                             <span><?php echo $v['available_predeposit'] ?? ''; ?></span>
                             <div id="money_w" style=" display: inline-block;margin-left: 7px"></div>
                         </td>
-                        <td id="">
-                            <span><?php echo $v['balance'] ?? ''; ?></span>
+                        <td id="balance">
+                           <span><?php echo $v['balance'] ?? ''; ?></span>
+                            <div id="balanceall" style=" display: inline-block;margin-left: 7px"></div>
+
                         </td>
                         <td class="align-center w200">
                             <div>
@@ -197,20 +199,18 @@
         // 表格hover时背景
         $('.trFlex').each(function () {
             $(this).hover(function () {
-                $(this)[0].style.backgroundColor = '#cbe9f3'
+            $(this)[0].style.backgroundColor = '#cbe9f3'
             },function() {
-                $(this)[0].style.backgroundColor = '#fff'
+            $(this)[0].style.backgroundColor = '#fff'
             })
         })
         $('.deleid').click(function()  {
-            let de_id = $(this).attr('data_id')
+            let data_id = $(this).attr('data_id')
             layer.confirm('确定要删除通道 ?', {
-                btn: ['确定', '取消']
-            }, function() {
-                window.location.href = `index.php?act=merchant&op=provider_del&id= ${de_id}`
+            btn: ['确定', '取消']
             }, function() {
-
-            })
+                window.location.href = `index.php?act=merchant&op=provider_del&id= ${data_id}`
+            }, function() {})
         });
         // 负数余额变红
         $('#money span').each(function(index, item) {
@@ -224,20 +224,16 @@
         //余额后面显示大写余额
         function cnMoneyFormat(money) {
           let number_data = money;
-        
           if(number_data < 0) {
             let num_data = number_data.substring(1, number_data.length)
             number_data = parseInt(num_data);
           } else{
             number_data = parseInt(number_data);
-
           }
-
         let yi = 0; //亿
         let wan = 0; //万
         let wan_s = 10000; //万
         let yi_s = 100000000; //亿
-
         //取整
         function qz(data) {
           data = Math.floor(data);
@@ -271,21 +267,17 @@
           }
           return data_json;
         }
-
-    
         yi = yi_f(number_data);
         number_data = yi.data2;
         wan = wan_f(number_data);
         number_data = wan.data2;
-
-
         let result = yi.data1 + wan.data1;
         if (result == 0) {
         return ''
         }
         return result
-    
     }
+        //订单成功后余额
         $('#money div').each(function(index, item) {
             let txt = $(item).prev().text()
             if (txt < 0 && txt < -10000) {
@@ -295,7 +287,18 @@
         } else {
             $(item).text(cnMoneyFormat(txt))
         };
-
         })
+        //接口查询余额
+        $('#balance div').each(function(index, item) {
+            let txt = $(item).prev().text()
+            if (txt < 0 && txt < -10000) {
+            $(item).text('('+ '-' + cnMoneyFormat(txt) +')')
+        } else if( txt > 0 && txt > 10000){
+            $(item).text('('+  cnMoneyFormat(txt) +')')
+        } else {
+            $(item).text(cnMoneyFormat(txt))
+        };
+        })
+
     });
 </script>

+ 58 - 76
admin/templates/default/provider.order.stats.php

@@ -231,7 +231,6 @@
                 selectStr += selectArr[i].value+','
             }
             selectStr = selectStr.substr(0, selectStr.length-1)
-            
             $('input[name="cid"]').val(selectStr);
             $('#formSearch').submit();
             $('input[name="cid"]').val('');
@@ -256,26 +255,20 @@
         function JSONToExcelConvertor(JSONData, FileName, ShowLabel, headData) { 
             //先转化json 
             var arrData = typeof JSONData != 'object' ? JSON.parse(JSONData) : JSONData; 
-                
             var excel = '<table>';   
-                
             // 标题
             for (const key in headData) {
                 var head = "<tr>";
                 var td = "<td colspan='12' style='font-size:16px;'>"+ headData[key] + '</td>';
                 excel += td + "</tr>";
             }
-
             //设置表头 
             var row = "<tr>"; 
             for (var i = 0, l = ShowLabel.length; i < l; i++) { 
                 row += "<th style='font-size:14px;'>" + ShowLabel[i].value + '</th>'; 
             } 
-                
-                
             //换行 
             excel += row + "</tr>"; 
-                
             //设置数据 
             for (var i = 0; i < arrData.length; i++) { 
                 var row = "<tr>"; 
@@ -294,46 +287,41 @@
                 row += '<td style=font-size:14px;'+ 'mso-number-format:"\@"'+ '>' + arrData[i].success_ratio + '</td>';
                 excel += row + "</tr>"; 
             } 
-            excel += "</table>"; 
-            var excelFile = "<html xmlns:o='urn:schemas-microsoft-com:office:office' xmlns:x='urn:schemas-microsoft-com:office:excel' xmlns='http://www.w3.org/TR/REC-html40'>"; 
-            excelFile += '<meta http-equiv="content-type" content="application/vnd.ms-excel; charset=UTF-8">'; 
-            excelFile += '<meta http-equiv="content-type" content="application/vnd.ms-excel'; 
-            excelFile += '; charset=UTF-8">'; 
-            excelFile += "<head>"; 
-            excelFile += "<!--[if gte mso 9]>"; 
-            excelFile += "<xml>"; 
-            excelFile += "<x:ExcelWorkbook>"; 
-            excelFile += "<x:ExcelWorksheets>"; 
-            excelFile += "<x:ExcelWorksheet>"; 
-            excelFile += "<x:Name>"; 
-            excelFile += "{worksheet}"; 
-            excelFile += "</x:Name>"; 
-            excelFile += "<x:WorksheetOptions>"; 
-            excelFile += "<x:DisplayGridlines/>"; 
-            excelFile += "</x:WorksheetOptions>"; 
-            excelFile += "</x:ExcelWorksheet>"; 
-            excelFile += "</x:ExcelWorksheets>"; 
-            excelFile += "</x:ExcelWorkbook>"; 
-            excelFile += "</xml>"; 
-            excelFile += "<![endif]-->"; 
-            excelFile += "</head>"; 
-            excelFile += "<body>"; 
-            excelFile += excel; 
-            excelFile += "</body>"; 
-            excelFile += "</html>"; 
-
-                
-            var uri = 'data:application/vnd.ms-excel;charset=utf-8,' + encodeURIComponent(excelFile); 
-                
-            var link = document.createElement("a");   
-            link.href = uri; 
-                
-            link.style = "visibility:hidden"; 
-            link.download = FileName + ".xls"; 
-                
-            document.body.appendChild(link); 
-            link.click(); 
-            document.body.removeChild(link); 
+                excel += "</table>"; 
+                var excelFile = "<html xmlns:o='urn:schemas-microsoft-com:office:office' xmlns:x='urn:schemas-microsoft-com:office:excel' xmlns='http://www.w3.org/TR/REC-html40'>"; 
+                excelFile += '<meta http-equiv="content-type" content="application/vnd.ms-excel; charset=UTF-8">'; 
+                excelFile += '<meta http-equiv="content-type" content="application/vnd.ms-excel'; 
+                excelFile += '; charset=UTF-8">'; 
+                excelFile += "<head>"; 
+                excelFile += "<!--[if gte mso 9]>"; 
+                excelFile += "<xml>"; 
+                excelFile += "<x:ExcelWorkbook>"; 
+                excelFile += "<x:ExcelWorksheets>"; 
+                excelFile += "<x:ExcelWorksheet>"; 
+                excelFile += "<x:Name>"; 
+                excelFile += "{worksheet}"; 
+                excelFile += "</x:Name>"; 
+                excelFile += "<x:WorksheetOptions>"; 
+                excelFile += "<x:DisplayGridlines/>"; 
+                excelFile += "</x:WorksheetOptions>"; 
+                excelFile += "</x:ExcelWorksheet>"; 
+                excelFile += "</x:ExcelWorksheets>"; 
+                excelFile += "</x:ExcelWorkbook>"; 
+                excelFile += "</xml>"; 
+                excelFile += "<![endif]-->"; 
+                excelFile += "</head>"; 
+                excelFile += "<body>"; 
+                excelFile += excel; 
+                excelFile += "</body>"; 
+                excelFile += "</html>"; 
+                var uri = 'data:application/vnd.ms-excel;charset=utf-8,' + encodeURIComponent(excelFile); 
+                var link = document.createElement("a");   
+                link.href = uri; 
+                link.style = "visibility:hidden"; 
+                link.download = FileName + ".xls"; 
+                document.body.appendChild(link); 
+                link.click(); 
+                document.body.removeChild(link); 
         }
         $('#ncexport').click(function () {
             let selectArr = selest_nc.getValue();
@@ -342,12 +330,10 @@
                 selectStr += selectArr[i].value+','
             }
             selectStr = selectStr.substr(0, selectStr.length-1)
-
             let starTime = new Date($('input[name="query_start_time"]').val()).getTime()/1000;
             let endTime = new Date($('input[name="query_end_time"]').val()).getTime()/1000;
             let cid = selectStr
             let order_time_type = $('#order_time_type').val()
-
             $.get('index.php?act=orderstats&op=ExportData&type=provider', {
                 query_start_time: starTime,
                 query_end_time: endTime,
@@ -374,39 +360,35 @@
                     let title = [{value: "序号"},{value: "统计日期"},{value: "主体名称"},{value: "主体ID"},{value: "成功订单数"},{value: "成功金额"},{value: "上游金额"},{value: "下游金额"},{value: "利润"},{value: "订单总量"}, {value: "失败订单数量"},{value: "成功占比"}]
                     JSONToExcelConvertor(data.data, '上游对账记录', title, head)
                 }
-                // console.log('data', data);
             })
         })
         //多选
-        let selest_nc
-        let default_no_mch = $('input[name="default_no_mch"]').val().split(',');
-        console.log('name', default_no_mch);
-        
-        $.get('index.php?act=refill_order&op=provider_data',function(data) {
-            data = JSON.parse(data)
-          
-            if (default_no_mch) {
-                for (let index = 0; index < default_no_mch.length; index++) {
-                    for (let j = 0; j < data.length; j++) {
-                        if (default_no_mch[index] == data[j].value) {
-                            data[j].selected = true
-                        }
+    let selest_nc
+    let default_no_mch = $('input[name="default_no_mch"]').val().split(',');
+    $.get('index.php?act=refill_order&op=provider_data', function (data) {
+        data = JSON.parse(data)
+        if (default_no_mch) {
+            for (let index = 0; index < default_no_mch.length; index++) {
+                for (let j = 0; j < data.length; j++) {
+                    if (default_no_mch[index] == data[j].value) {
+                        data[j].selected = true
                     }
                 }
             }
-            selest_nc = xmSelect.render({
-                    el: '#selest_nc',
-                    size: 'mini',
-                    filterable: true,
-                    style: {
-                        minHeight: '27px',
-                        lineHeight: '27px',
-                        marginLeft: '4px',
-                        width: '250px'
-                    },
-                    language: 'zn',
-                    data:data
-                })
+        }
+        selest_nc = xmSelect.render({
+            el: '#selest_nc',
+            size: 'mini',
+            filterable: true,
+            style: {
+                minHeight: '27px',
+                lineHeight: '27px',
+                marginLeft: '4px',
+                width: '250px'
+            },
+            language: 'zn',
+            data: data
         })
+    })
     });
 </script>

+ 0 - 22
admin/templates/default/provider.successful.php

@@ -101,17 +101,6 @@
       href="<?php echo RESOURCE_SITE_URL; ?>/js/jquery-ui/themes/ui-lightness/jquery.ui.css"/>
 <script type="text/javascript">
     $(function () {
-
-        // $("#Iframe").load(function(){
-        //     $(this).css("min-height", '900px')
-        //     $(this).css("min-width", '1650px')
-        //     // var iframeHeight = $(this).contents().find("html").height();
-        //     // var iframeWidth = $(this).contents().find("html").scrollWidth;
-        //     // $(this).attr("height",iframeHeight) 
-        //     // $(this).attr("width",iframeWidth) 
-        //     // console.log('iframeHeight', iframeHeight, iframeWidth);
-        // });
-        
         //默认获取 当前日期 当前时间点前一个小时, 间隔15 900
         // 前15分钟
         let frontOneHour = new Date(new Date().getTime() - 15 * 60 * 1000)
@@ -122,11 +111,9 @@
         let minute = frontOneHour.getMinutes()
         let timestr = year+'-'+month+'-'+date
         let stamp = new Date(timestr).getTime()/1000 - 28800;
-
         $("select[name=time_stamp]").val(stamp)
         $("select[name=time_hour]").val(hour)
         $("select[name=minute]").val(minute)
-        // console.log('frontOneHour', frontOneHour,hour,minute, stamp);
         let t = stamp + hour*3600 + minute*60
         let interval = $("select[name=interval]").val()
         let s = window.location.origin + "/plot/index?time_stamp=" + t + "&interval=" + interval
@@ -135,7 +122,6 @@
             if (!data) {
                 return
             }
-            // $('iframe').attr('src',s)
             $('#box').html(data)
         });
 
@@ -155,26 +141,20 @@
                 }
                 // 质量
                 for (const key in data.quality) {
-                    // console.log('质量', key, data.quality[key]);
                     $("select[name=quality]").append("<option class='qualityOption' value='"+key+"'>"+data.quality[key]+"</option>")
                 }
                 // 卡类型
                 for (const key in data.card_type) {
-                    // console.log('类型', key, data.card_type[key]);
                     $("select[name=card_type]").append("<option class='ctOption' value='"+key+"'>"+data.card_type[key]+"</option>")
                 }
                 // 面额
                 for (const key in data.amount) {
-                    // console.log('面额', data.amount[key]);
                     $("select[name=amount]").append("<option class='amountOption' value='"+data.amount[key]+"'>"+data.amount[key]+"</option>")
                 }
-                // console.log('data1', data);
             });
         }
-
         $('#timeSelect').change(function () {
             let val = $(this).val()
-            // console.log('val', val);
             TimeGetWhere(val);
         })
         $('#ncsubmit').click(function () {
@@ -182,7 +162,6 @@
             let time_hour = $("select[name=time_hour]").val()
             let minute = $("select[name=minute]").val()
             let time = Number(time_stamp) + Number(time_hour)*3600 + Number(minute)*60
-            // console.log('time',time_stamp,time_hour,minute, time);
             let interval = $("select[name=interval]").val()
             let chname = $("select[name=chname]").val()
             let quality = $("select[name=quality]").val()
@@ -213,7 +192,6 @@
                 if (!data) {
                     return
                 }
-                // $('iframe').attr('src',src)
                 $('#box').html(data)
             });
         });

+ 7 - 19
admin/templates/default/recharge.manual.add.php

@@ -136,20 +136,16 @@
                 }
             }
         });
-        function cnMoneyFormat(money) {
-        var number_data = money;
+        //数字转大写
+    function cnMoneyFormat(money) {
+        let number_data = money;
         number_data = parseInt(number_data);
-
         let yi = 0; //亿
         let wan = 0; //万
         let qian = 0; //千
-
-
-
         let qian_s = 1000; //千
         let wan_s = 10000; //万
         let yi_s = 100000000; //亿
-
         //取整
         function qz(data) {
           data = Math.floor(data);
@@ -193,35 +189,27 @@
           }
           return data_json;
         }
-
-    
         yi = yi_f(number_data);
         number_data = yi.data2;
         wan = wan_f(number_data);
         number_data = wan.data2;
-
         qian = qian_f(number_data);
         number_data = qian.data2;
-
         let result = yi.data1 + wan.data1 + qian.data1   + number_data;
-      
         let resultvalue = result.substr(0, 1)
-
         if (resultvalue == 0) {
           result = result.substr(1, result.length)
         }
         let resultvali = result.substr(0, 3);
-
         if(resultvali == 'NaN') {
         $("#money").text('')
         }else {
         $("#money").text(result)
         }  
-    
     }
-  $('#pointsnum').change(function () {
-    let val =($(this).val())
-     $('#money').text(cnMoneyFormat(val))
-  })        
+    $('#pointsnum').change(function () {
+        let val =($(this).val())
+        $('#money').text(cnMoneyFormat(val))
+    })        
     });
 </script>

+ 6 - 18
admin/templates/default/recharge.manual.edit.php

@@ -109,18 +109,16 @@
                 }
             }
         });
-        function cnMoneyFormat(money) {
+        //数字转大写
+    function cnMoneyFormat(money) {
         var number_data = money;
         number_data = parseInt(number_data);
-
         let yi = 0; //亿
         let wan = 0; //万
         let qian = 0; //千
-
         let qian_s = 1000; //千
         let wan_s = 10000; //万
         let yi_s = 100000000; //亿
-
         //取整
         function qz(data) {
           data = Math.floor(data);
@@ -164,37 +162,27 @@
           }
           return data_json;
         }
-        
-    
         yi = yi_f(number_data);
         number_data = yi.data2;
         wan = wan_f(number_data);
         number_data = wan.data2;
-
         qian = qian_f(number_data);
         number_data = qian.data2;
-
-
-        
-      
         let result = yi.data1 + wan.data1 + qian.data1 + number_data;
         let resultvalue = result.substr(0, 1)
-
         if (resultvalue == 0) {
           result = result.substr(1, result.length)
         }
         let resultvali = result.substr(0, 3);
-
         if(resultvali == 'NaN') {
         $("#money").text('')
         }else {
         $("#money").text(result)
         }       
-    
     }
-  $('#pointsnum').change(function () {
-    let val =($(this).val())
-     $('#money').text(cnMoneyFormat(val))
-  })         
+    $('#pointsnum').change(function () {
+       let val =($(this).val())
+       $('#money').text(cnMoneyFormat(val))
+    })         
     });
 </script>

+ 53 - 72
admin/templates/default/refill.detail.php

@@ -4,58 +4,55 @@
         width: 60px;
         margin-left: 10px;
     }
-
     .lineLi {
         display: inline-block;
         min-width: 150px;
         font-size: 14px;
     }
     .page .fixed-bar .item-title h3 {
-        margin-top:18px !important;
-        margin-bottom:10px !important;
-        font-weight:700 !important;
+        margin-top: 18px !important;
+        margin-bottom: 10px !important;
+        font-weight: 700 !important;
     }
     .tab-base li span {
-        font-size:12px !important;
+        font-size: 12px !important;
     }
     .layui-form-select .layui-input {
-        height:23px;
+        height: 23px;
         padding-left: 11px;
-        padding-right: 0!important;
+        padding-right: 0 !important;
     }
-    input::placeholder{ 
-        color:#333; 
+    input::placeholder {
+        color: #333;
     }
     .layui-form-selected dl {
-    display: flex!important;
-    flex-wrap: wrap!important;
+        display: flex !important;
+        flex-wrap: wrap !important;
     }
     .layui-form-select dl {
-      
         top: 29px !important;
-        left: 4px!important;
-        min-width: 802%!important;
-        max-height: 280px!important;
-        padding: 14px 0!important;
+        left: 4px !important;
+        min-width: 802% !important;
+        max-height: 280px !important;
+        padding: 14px 0 !important;
     }
-    .layui-form-select dl dd.layui-this{
+    .layui-form-select dl dd.layui-this {
         display: none;
     }
     .layui-form-select dl dd {
-    cursor: pointer;
-    width: 130px;
+        cursor: pointer;
+        width: 130px;
     }
     .lefto {
         margin-left: 6px;
     }
     .db-right {
-        padding-right: 134px!important;
-    border-bottom: 1px solid #ccc;
-
+        padding-right: 134px !important;
+        border-bottom: 1px solid #ccc;
     }
     .db-center {
         padding: 9px 0;
-    border-bottom: 1px solid #ccc;
+        border-bottom: 1px solid #ccc;
     }
     .db-top {
         padding: 0 30px;
@@ -231,7 +228,6 @@
         });
         $('#query_start_time').datepicker({dateFormat: 'yy-mm-dd'});
         $('#query_end_time').datepicker({dateFormat: 'yy-mm-dd'});
-        
         // 日期选择器
         laydate.render({
             elem: '#startTime',
@@ -241,36 +237,27 @@
             elem: '#endTime',
             type: 'datetime'
         });
- 
-
-        //全选
           //全选
-          $('#selectAll' ).click ( function () {
+        $('#selectAll' ).click ( function () {
           if ($("input[name='chbox']").is(':checked')) {
               $("input[name='checkbox']").each(function() {
                   this.checked = true;
               })
-       
           } else {
-       
               $("input[name='checkbox']").each(function() {
                   this.checked = false;
               })
- 
-
           }
-     
-
             })
 
-            //过滤
-            $("#mch_orders").blur(function () {
-                var test_mch =  $("#mch_orders").val();
-           var result = test_mch.replace(/[\  \r\n\,]+/g, ",");
-                $(this).val(result)
+        //过滤
+        $("#mch_orders").blur(function () {
+            let test_mch =  $("#mch_orders").val();
+            let result = test_mch.replace(/[\  \r\n\,]+/g, ",");
+            $(this).val(result)
             })
 
-        //批量
+        //批量失败
         $('#hFail').click(function () {
             layer.confirm('您确定要批量失败', {
                 btn: ['确定', '取消'],
@@ -280,22 +267,20 @@
                 $("input:checkbox:checked").each(function (i) {
                     arr[i] = $(this).val();
                 })
-                let str = arr.join(",");
-                let strr = str.substring(0, 1);
-                let number = Number(strr);
+                let batch = arr.join(",");
+                let batchall = batch.substring(0, 1);
+                let number = Number(batchall);
                 if (isNaN(number)) {
-                    let strrr = str.substring(1, str.length);
-                    window.location.href = `index.php?act=refill_detail&op=order_dispose&id= ${strrr ? strrr : ''}&type=cancel`
-                } else if(!isNaN(number) && str !== '') {
-                    window.location.href = `index.php?act=refill_detail&op=order_dispose&id= ${str ? str : ''}&type=cancel`
+                    let batchAll = batch.substring(1, batch.length);
+                    window.location.href = `index.php?act=refill_detail&op=order_dispose&id= ${batchAll ? batchAll : ''}&type=cancel`
+                } else if(!isNaN(number) && batch !== '') {
+                    window.location.href = `index.php?act=refill_detail&op=order_dispose&id= ${batch ? batch : ''}&type=cancel`
                 } else {
                     layer.msg('请还没有任何操作,请先选择');
                 }
-            }, function () {
-            });
+            }, function () {});
         })
-
-        //批量
+        //批量补充
         $('#hSupplement').click(function () {
             layer.confirm('您确定要批量补充', {
                 btn: ['确定', '取消'],
@@ -305,22 +290,21 @@
                 $("input:checkbox:checked").each(function (i) {
                     arr[i] = $(this).val();
                 })
-                let str = arr.join(",");
-                let strr = str.substring(0, 1);
-                let number = Number(strr);
+                let batch = arr.join(",");
+                let batchall = batch.substring(0, 1);
+                let number = Number(batchall);
                 if (isNaN(number)) {
-                    let strrr = str.substring(1, str.length);
-                    window.location.href = `index.php?act=refill_detail&op=order_dispose&id= ${strrr ? strrr : ''}&type=anew`
-                } else if(!isNaN(number) && str !== '') {
-                    window.location.href = `index.php?act=refill_detail&op=order_dispose&id= ${str ? str : ''}&type=anew`
+                    let batchAll = batch.substring(1, batch.length);
+                    window.location.href = `index.php?act=refill_detail&op=order_dispose&id= ${batchAll ? batchAll : ''}&type=anew`
+                } else if(!isNaN(number) && batch !== '') {
+                    window.location.href = `index.php?act=refill_detail&op=order_dispose&id= ${batch ? batch : ''}&type=anew`
                 } else {
                     layer.msg('请还没有任何操作,请先选择');
                 }
-            }, function () {
-            });
+            }, function () {});
         })
 
-        //批量
+        //批量清除queue
         $('#hdelqueue').click(function () {
             layer.confirm('您确定要清除queue', {
                 btn: ['确定', '取消'],
@@ -330,23 +314,20 @@
                 $("input:checkbox:checked").each(function (i) {
                     arr[i] = $(this).val();
                 })
-                let str = arr.join(",");
-                let strr = str.substring(0, 1);
+                let batch = arr.join(",");
+                let strr = batch.substring(0, 1);
                 let number = Number(strr);
-                if (isNaN(number) && str !== '') {
-                    let strrr = str.substring(1, str.length);
-                    console.log(strrr);
-                    window.location.href = `index.php?act=refill_detail&op=DelQueueOrder&id= ${strrr}`
+                if (isNaN(number) && batch !== '') {
+                    let batchAll = batch.substring(1, batch.length);
+                    window.location.href = `index.php?act=refill_detail&op=DelQueueOrder&id= ${batchAll}`
                 } 
-                else if(!isNaN(number) && str !== '') {
-                    console.log(str);
-                    window.location.href = `index.php?act=refill_detail&op=DelQueueOrder&id= ${str}`
+                else if(!isNaN(number) && batch !== '') {
+                    window.location.href = `index.php?act=refill_detail&op=DelQueueOrder&id= ${batch}`
                 }
                  else {
                     layer.msg('请还没有任何操作,请先选择');
                 }
-            }, function () {
-            });
+            }, function () {});
         })
 
         // 表格hover时背景

+ 3 - 5
admin/templates/default/refill.order.batch.php

@@ -1,5 +1,5 @@
 <style>
-        .page .fixed-bar .item-title h3 {
+    .page .fixed-bar .item-title h3 {
         margin-top:18px !important;
         margin-bottom:10px !important;
         font-weight:700 !important;
@@ -70,9 +70,8 @@
         $(".submitBtn").click(function () {
             const txt = $(this).text();
             const val = $('#order_sn').val();
-            const  number =val.split("\n").length - 1;
+            const number =val.split("\n").length - 1;
             const type = $(this).attr('data-type');
-
             layer.confirm('您确定要'+txt+'吗?', {
                 btn: ['确定', '取消'],
                 title: '共' +number+ '单'
@@ -81,8 +80,7 @@
                     $("input[name='type']").val(type)
                     $("#user_form").submit();
                 }
-            }, function () {
-            });
+            }, function () {});
         });
 
         $('#user_form').validate({

+ 434 - 443
admin/templates/default/refill.order.index.php

@@ -1,103 +1,106 @@
 <style>
-    th label { display: inline-block;width: 60px; }
-    .lineLi {
-        min-width: 150px;
-        font-size: 12px;
-        color:#000;
-    }
-    #prompt ul .noLineLi {
-        background:none;
-    }
-    #prompt div {
-        display:inline-block;
-        background:none
-    }
-    #prompt ul .lineLi {
-        color:#000;
-    }
-    #selest_nc {
-        width:220px
-    }
-    #denomination {
-        width:220px
-    }
-    tbody {
-        font-size: 12px;
-    }
-    .layui-form-select .layui-input {
-        padding: 13px 5px;
-    }
-    .layui-form-selected dl {
-    display: flex!important;
-    flex-wrap: wrap!important;
-    }
-    .layui-form-select dl {
-      
-        top: 29px !important;
-        left: 4px!important;
-        min-width: 883%!important;
-        max-height: 280px!important;
-        padding: 14px 0!important;
-    }
-    .layui-form-select .layui-input {
-    padding-right: 0!important;
+  th label {
+    display: inline-block;
+    width: 60px;
+  }
+  .lineLi {
+    min-width: 150px;
+    font-size: 12px;
+    color: #000;
+  }
+  #prompt ul .noLineLi {
+    background: none;
+  }
+  #prompt div {
+    display: inline-block;
+    background: none
+  }
+  #prompt ul .lineLi {
+    color: #000;
+  }
+  #selest_nc {
+    width: 220px
+  }
+  #denomination {
+    width: 220px
+  }
+  tbody {
+    font-size: 12px;
+  }
+  .layui-form-select .layui-input {
+    padding: 13px 5px;
+  }
+  .layui-form-selected dl {
+    display: flex !important;
+    flex-wrap: wrap !important;
+  }
+  .layui-form-select dl {
+    top: 29px !important;
+    left: 4px !important;
+    min-width: 883% !important;
+    max-height: 280px !important;
+    padding: 14px 0 !important;
+  }
+  .layui-form-select .layui-input {
+    padding-right: 0 !important;
     cursor: pointer;
     width: 124%;
-}
-    .layui-form-select {
-        width: 45%;
-    }
-    .layui-select-title {
-        width: 100%;
-    }
-    .layui-form-select .layui-input {
-    
-        padding-left: 4px;
-    }
-    .page .fixed-bar .item-title h3 {
-        margin-top:18px !important;
-        margin-bottom:10px !important;
-        font-weight:700 !important;
-    }
-    .tab-base li span {
-        font-size:12px !important;
-    }
-    .layui-form-select .layui-input {
-        height:26px;
-    }
-    input::placeholder{ 
-        color:#333; 
-    }
-    .xm-tips{
-    color: #333!important;
+  }
+  .layui-form-select {
+    width: 45%;
+  }
+  .layui-select-title {
+    width: 100%;
+  }
+  .layui-form-select .layui-input {
+    padding-left: 4px;
+  }
+  .page .fixed-bar .item-title h3 {
+    margin-top: 18px !important;
+    margin-bottom: 10px !important;
+    font-weight: 700 !important;
+  }
+  .tab-base li span {
+    font-size: 12px !important;
+  }
+  .layui-form-select .layui-input {
+    height: 26px;
+  }
+  input::placeholder {
+    color: #333;
+  }
+  .xm-tips {
+    color: #333 !important;
     font-size: 12px;
-    }
-    .layui-form-select dl dd.layui-this{
-        display: none;
-    }
-    .layui-form-select dl dd {
+  }
+  .layui-form-select dl dd.layui-this {
+    display: none;
+  }
+  .layui-form-select dl dd {
     cursor: pointer;
     width: 130px;
-    }
-    .layui-form-select .layui-edge {
-        right: -24px!important;
-    }
-    .db-right {
-    padding-right: 134px!important;
-    border-bottom: 1px solid #ccc;
+  }
 
-    }
-    .db-center {
+  .layui-form-select .layui-edge {
+    right: -24px !important;
+  }
+  .db-right {
+    padding-right: 134px !important;
+    border-bottom: 1px solid #ccc;
+  }
+  .db-center {
     padding: 9px 0;
     border-bottom: 1px solid #ccc;
-    }
-    .db-top {
-        padding: 0 30px;
-    }
-    .covercolor:hover, .covercolor:visited, .covercolor:link, .covercolor:active {
+  }
+  .db-top {
+    padding: 0 30px;
+  }
+  .covercolor:hover,
+  .covercolor:visited,
+  .covercolor:link,
+  .covercolor:active {
     color: #0D93BF;
-}
-
+  }
 </style>
 <?php defined('InShopNC') or exit('Access Invalid!'); ?>
 <div class="page">
@@ -586,405 +589,393 @@
 <script type="text/javascript">
     $(function () {
         //查看
-        $('.examine').click(function() {
-            let sq = $(this).attr('data-order')
-            $.get('index.php?act=refill_order&op=refill_third_info',
-                {
-                    order_id:sq
-                },function(data) {
-                    data = JSON.parse(data)
-                    if (data.state == 1) {
-                        let contentArr = []
-                        contentArr.push(`单号:${data.data.order_sn}`)
-                        contentArr.push(`产品编码:${data.data.pcode}`)
-                        contentArr.push(`渠道编码:${data.data.chcode}`)
-                        contentArr.push(`充值数量:${data.data.quantity}`)
-                        if (data.data.user_account) {
-                            contentArr.push(`充值账号:${data.data.user_account}`)
-                            contentArr.push(`账号类型:${data.data.account_type_text}`)
-                        } else {
-                            contentArr.push(`卡密验证状态:${data.data.ret_state_text}`)
-                            contentArr.push(`卡密信息:${data.data.card_info}`)
-                        }
-                        let content = ''
-                        for (let index = 0; index < contentArr.length; index++) {
-                            content += `<p>${contentArr[index]}</p>`
-                        }
-                        layer.open({
-                            title: "查看",
-                            content: content
-
-                        });
-
-                    }
-                })
+    $('.examine').click(function () {
+      let order_id = $(this).attr('data-order')
+      $.get('index.php?act=refill_order&op=refill_third_info',
+        {
+          order_id: order_id
+        }, function (data) {
+          data = JSON.parse(data)
+          if (data.state == 1) {
+            let contentArr = []
+            contentArr.push(`单号:${data.data.order_sn}`)
+            contentArr.push(`产品编码:${data.data.pcode}`)
+            contentArr.push(`渠道编码:${data.data.chcode}`)
+            contentArr.push(`充值数量:${data.data.quantity}`)
+            if (data.data.user_account) {
+              contentArr.push(`充值账号:${data.data.user_account}`)
+              contentArr.push(`账号类型:${data.data.account_type_text}`)
+            } else {
+              contentArr.push(`卡密验证状态:${data.data.ret_state_text}`)
+              contentArr.push(`卡密信息:${data.data.card_info}`)
+            }
+            let content = ''
+            for (let index = 0; index < contentArr.length; index++) {
+              content += `<p>${contentArr[index]}</p>`
+            }
+            layer.open({
+              title: "查看",
+              content: content
+    
+            });
+    
+          }
         })
-        //双击
-        $('.doubleclick').dblclick(function() {
-            let db_click = $(this).attr('data-order')
-            $.get('index.php?act=refill_order&op=showOrders', {
-                order_sn:db_click
-            }, function(data) {
-                data = JSON.parse(data)
-                if (data.state == 1) {
-                    
-                var dbclick = data.data
-                let ConentArr = [];
-                let html = ''; 
-                for (let i = 0; i < dbclick.length; i++) {
-                    var item = dbclick[i];
-                    html += `
-                    <tr>
-                                         <td class="db-center">${item.order_sn}</td>
-                                         <td class="db-center">${item.commit_time_text}</td>
-                                         <td class="db-center">${item.notify_time_text}</td>
-                                         <td class="db-center">${item.diff_time_text}</td>
-                                         <td class="db-center">${item.order_state_text}</td>
-                                         <td class="db-center">${item.channel_name}</td>
-                                         <td class="db-center">${item.err_msg}</td>
+    })
 
-
-                             <tr>
-                    `
-                }
-
-
-                    layer.open({
-                   title: `<span>共${data.count}单</span> <span class="db-top">回调状态:${data.mch_notify_state}</span> <span>回调次数:${data.mch_notify_times}</span>` ,
-                   content: `<table>
-                   <thead>
-                             <tr>
-                                        <th class="db-right">订单号</th>
-                                         <th class="db-right">提单日期</th>
-                                         <th class="db-right">回调日期</th>
-                                         <th class="db-right">耗时</th>
-                                         <th class="db-right">订单状态</th>
-                                         <th class="db-right">供方名称</th>
-                                         <th class="db-right">错误原因</th>
-
-                             </tr>
+    //双击
+    $('.doubleclick').dblclick(function () {
+    let order_sn = $(this).attr('data-order')
+    $.get('index.php?act=refill_order&op=showOrders', {
+      order_sn: order_sn
+    }, function (data) {
+      data = JSON.parse(data)
+      if (data.state == 1) {
+        let order_item = data.data
+        let html = '';
+        for (let i = 0; i < order_item.length; i++) {
+        let item = order_item[i];
+        html += `
+              <tr>
+                  <td class="db-center">${item.order_sn}</td>
+                  <td class="db-center">${item.commit_time_text}</td>
+                  <td class="db-center">${item.notify_time_text}</td>
+                  <td class="db-center">${item.diff_time_text}</td>
+                  <td class="db-center">${item.order_state_text}</td>
+                  <td class="db-center">${item.channel_name}</td>
+                  <td class="db-center">${item.err_msg}</td>
+              <tr> `
+        }
+        let content = `<table>
+                    <thead>
+                           <tr>
+                              <th class="db-right">订单号</th>
+                              <th class="db-right">提单日期</th>
+                              <th class="db-right">回调日期</th>
+                              <th class="db-right">耗时</th>
+                              <th class="db-right">订单状态</th>
+                              <th class="db-right">供方名称</th>
+                              <th class="db-right">错误原因</th>
+                            </tr>
                     </thead>
-                             <tbody>
-                             ${html}
-                             </tbody>
-                            </table>`,
-                            
+                    <tbody>${html}</tbody>
+                    </table>`
+        layer.open({
+        title: `<span>共${data.count}单</span> <span class="db-top">回调状态:${data.mch_notify_state}</span> <span>回调次数:${data.mch_notify_times}</span>`,
+        content: content
+        });
+      } else {
+        alert("没有此订单");
+      }
+    })
+  })
 
-                        });
-                } else {
-                    alert("没有此订单");
+     // 获取不包含客户
+    let selest_nc
+    let default_no_mch = $('input[name="default_no_mch"]').val().split(',');
+    $.get('index.php?act=refill_order&op=merchant_data', function (data) {
+      data = JSON.parse(data)
+      if (default_no_mch) {
+        for (let index = 0; index < default_no_mch.length; index++) {
+          for (let j = 0; j < data.length; j++) {
+            if (default_no_mch[index] == data[j].value) {
+              data[j].selected = true
+            }
+          }
+        }
+      }
+      selest_nc = xmSelect.render({
+        el: '#selest_nc',
+        size: 'mini',
+        filterable: true,
+        autoRow: true,
+        height: '500px',
+        style: {
+          minHeight: '27px',
+          lineHeight: '27px',
+          marginLeft: '4px'
+        },
+        language: 'zn',
+        data: data
+      })
+    })
 
-                }
-                
-            })
+        // 获取订单列表 首字母变红
+    //     $.get('index.php?act=refill_order&op=merchant_data', function (color) {
+    //     color = JSON.parse(color)
+    //     let html = '';
+    //     for (var i = 0; i < color.length; i++) {
+    //         if (i == 0) {
+    //             color[0].color = true
+    //         }
+    //         console.log();
+    //         if (color[i + 1]) {
+    //             if (color[i + 1].alpha !== color[i].alpha) {
+    //                 color[i + 1].color = true
+    //             }
+    //         }
+    //     }
+    //     color.forEach(i => {
+    //         html += `<li style="color: ${i.color ? "red" : ""}">${i.name}</li>`
+    //     })
+    //     $(".Selectcolor").html(html)
+    //     $(".ycolor").ySearchSelect();
+    // })
 
-        })
-        // 获取不包含客户
-        let selest_nc
-        let default_no_mch = $('input[name="default_no_mch"]').val().split(',');
-        $.get('index.php?act=refill_order&op=merchant_data',function(data) {
-            data = JSON.parse(data)
-            if (default_no_mch) {
-                
-                for (let index = 0; index < default_no_mch.length; index++) {
-                    for (let j = 0; j < data.length; j++) {
-                        if (default_no_mch[index] == data[j].value) {
-                            data[j].selected = true
-                        }
-                    }
-                }
-            }
-           
-            selest_nc = xmSelect.render({
-                el: '#selest_nc',
-                size: 'mini',
-                filterable: true,
-                autoRow: true,
-	            height: '500px',
-                style: {
-                    minHeight: '27px',
-                    lineHeight: '27px',
-                    marginLeft: '4px'
-                },
-                language:'zn',
-                data:data
-            })
-        })
-//         // 获取订单列表 首字母变红
-//         $.get('index.php?act=refill_order&op=merchant_data',function(color) {
-//             color = JSON.parse(color)
-//             let html = '';
-//             for (var i = 0; i < color.length; i++) {
-//                 if (i == 0) {
-//                     color[0].color = true
-//             }
-//             console.log();
-//             if (color[i + 1]) {
-//             if (color[i + 1].alpha !== color[i].alpha) {
-//                 color[i + 1].color = true
-//           }
-//       }
-//   }
-//             color.forEach(i => {
-//                 html += `
-//               <li style="color: ${i.color ? "red": ""}">${i.name}</li>
-//               `
-//   })
-//             $(".Selectcolor").html(html)
-//             $(".ycolor").ySearchSelect();
-    
-//         })
         // 获取包含面值
-         let denomination
-         let default_no_amount = $('input[name="default_no_amount"]').val().split(',');
-         let datas = [
-				        {name: '10', value: 10},
-				        {name: '20', value: 20},
-				        {name: '30', value: 30},
-				        {name: '50', value: 50},
-				        {name: '100', value: 100},
-				        {name: '200', value: 200},
-				        {name: '300', value: 300},
-				        {name: '500', value: 500},
-				        {name: '1000', value: 1000},
-				        {name: '2000', value: 2000},
-				    ]
-                if (default_no_amount) {
-                for (let index = 0; index < default_no_amount.length; index++) {
-                    for (let j = 0; j < datas.length; j++) {
-                        if (default_no_amount[index] == datas[j].value) {
-                            datas[j].selected = true
-                        }
-                    }
+    let denomination
+    let default_no_amount = $('input[name="default_no_amount"]').val().split(',');
+    let datas = [
+        { name: '10', value: 10 },
+        { name: '20', value: 20 },
+        { name: '30', value: 30 },
+        { name: '50', value: 50 },
+        { name: '100', value: 100 },
+        { name: '200', value: 200 },
+        { name: '300', value: 300 },
+        { name: '500', value: 500 },
+        { name: '1000', value: 1000 },
+        { name: '2000', value: 2000 },
+    ]
+    if (default_no_amount) {
+        for (let index = 0; index < default_no_amount.length; index++) {
+            for (let j = 0; j < datas.length; j++) {
+                if (default_no_amount[index] == datas[j].value) {
+                    datas[j].selected = true
                 }
             }
-            denomination = xmSelect.render({
-                el: '#denomination',
-                size: 'mini',
-                filterable: true,
-                autoRow: true,
-	            height: '500px',
-                style: {
-                    minHeight: '27px',
-                    lineHeight: '27px',
-                    marginLeft: '4px'
-                },
-                language:'zn',
-                data: datas
-            })
-        $('#query_start_time').datepicker({dateFormat: 'yy-mm-dd'});
-        $('#query_end_time').datepicker({dateFormat: 'yy-mm-dd'});
-        $('#ncsubmit').click(function () {
-            var index = layer.load(0, {shade: false}); 
-
-            $('input[name="op"]').val('index');
-            let selectArr = selest_nc.getValue();
-            let selectStr = ''
-            for (let i = 0; i < selectArr.length; i++) {
-                selectStr += selectArr[i].value+','
-            }
-            selectStr = selectStr.substr(0, selectStr.length-1)
-
-            let nominalAll = denomination.getValue();
-            let nominalStr = ''
-            for (let i = 0; i < nominalAll.length; i++) {
-                nominalStr += nominalAll[i].value+','
-            }
-            nominalStr = nominalStr.substr(0, nominalStr.length-1)
+        }
+    }
+    denomination = xmSelect.render({
+        el: '#denomination',
+        size: 'mini',
+        filterable: true,
+        autoRow: true,
+        height: '500px',
+        style: {
+            minHeight: '27px',
+            lineHeight: '27px',
+            marginLeft: '4px'
+        },
+        language: 'zn',
+        data: datas
+    })
 
-            $('input[name="no_mchid"]').val(selectStr);
-            $('input[name="no_amount"]').val(nominalStr);
-          
-            $('#formSearch').submit();
+    $('#query_start_time').datepicker({dateFormat: 'yy-mm-dd'});
+    $('#query_end_time').datepicker({dateFormat: 'yy-mm-dd'});
+    $('#ncsubmit').click(function () {
+        let index = layer.load(0, {shade: false}); 
+        $('input[name="op"]').val('index');
+        let selectArr = selest_nc.getValue();
+        let selectStr = ''
+        for (let i = 0; i < selectArr.length; i++) {
+             selectStr += selectArr[i].value+','
+        }
+        selectStr = selectStr.substr(0, selectStr.length-1)
+        let nominalAll = denomination.getValue();
+        let nominalStr = ''
+        for (let i = 0; i < nominalAll.length; i++) {
+        nominalStr += nominalAll[i].value+','
+        }
+        nominalStr = nominalStr.substr(0, nominalStr.length-1)
+        $('input[name="no_mchid"]').val(selectStr);
+        $('input[name="no_amount"]').val(nominalStr);
+        $('#formSearch').submit();
         });
-        // 导出
-        $('#ncexport').click(function () {
-            
-            $('input[name="export"]').val('1');
-            $('input[name="op"]').val('index');
-            // 不包含客户
-            let selectArr = selest_nc.getValue();
-            let selectStr = ''
-            for (let i = 0; i < selectArr.length; i++) {
-                selectStr += selectArr[i].value+','
-            }
-            selectStr = selectStr.substr(0, selectStr.length-1)
-            $('input[name="no_mchid"]').val(selectStr);
-            $('#formSearch').submit();
-            $('input[name="export"]').val('');
-            var ii = layer.load();
-            setTimeout(function(){
-                layer.close(ii);
-            }, 800);
+
+    // 导出
+    $('#ncexport').click(function () {
+        $('input[name="export"]').val('1');
+        $('input[name="op"]').val('index');
+        // 不包含客户
+        let selectArr = selest_nc.getValue();
+        let selectStr = ''
+        for (let i = 0; i < selectArr.length; i++) {
+            selectStr += selectArr[i].value+','
+        }
+        selectStr = selectStr.substr(0, selectStr.length-1)
+        $('input[name="no_mchid"]').val(selectStr);
+        $('#formSearch').submit();
+        $('input[name="export"]').val('');
+        let ii = layer.load();
+        setTimeout(function(){
+            layer.close(ii);
+        }, 800);
         })
-        // 对账导出
-        $('#ncexport_stats').click(function () {
-            var ii = layer.load();
-            setTimeout(function(){
-                layer.close(ii);
-            }, 800);
 
-            $('input[name="export_stats"]').val('1');
-            $('input[name="op"]').val('index');
-            // 不包含客户
-            let selectArr = selest_nc.getValue();
-            let selectStr = ''
-            for (let i = 0; i < selectArr.length; i++) {
-                selectStr += selectArr[i].value+','
-            }
-            selectStr = selectStr.substr(0, selectStr.length-1)
-            $('input[name="no_mchid"]').val(selectStr);
-            $('#formSearch').submit();
-            $('input[name="export_stats"]').val('');
+    // 对账导出
+    $('#ncexport_stats').click(function () {
+        let ii = layer.load();
+        setTimeout(function(){
+            layer.close(ii);
+        }, 800);
+        $('input[name="export_stats"]').val('1');
+        $('input[name="op"]').val('index');
+        // 不包含客户
+        let selectArr = selest_nc.getValue();
+        let selectStr = ''
+        for (let i = 0; i < selectArr.length; i++) {
+            selectStr += selectArr[i].value+','
+        }
+        selectStr = selectStr.substr(0, selectStr.length-1)
+        $('input[name="no_mchid"]').val(selectStr);
+        $('#formSearch').submit();
+        $('input[name="export_stats"]').val('');
         })
-        //搜索+统计 
-        $('#ncstat').click(function () {
-            var index = layer.load(0, {shade: false}); 
-            $('input[name="fShowStat"]').val('1');
-            $('input[name="op"]').val('index');
-            // 不包含客户
-            let selectArr = selest_nc.getValue();
-            let selectStr = ''
-            for (let i = 0; i < selectArr.length; i++) {
-                selectStr += selectArr[i].value+','
-            }
-            selectStr = selectStr.substr(0, selectStr.length-1)
-            // 不包含面值
-            let nominalAll = denomination.getValue();
-            let nominalStr = ''
-            for (let i = 0; i < nominalAll.length; i++) {
-                nominalStr += nominalAll[i].value+','
-            }
-            nominalStr = nominalStr.substr(0, nominalStr.length-1)
 
-            $('input[name="no_mchid"]').val(selectStr);
-            $('input[name="no_amount"]').val(nominalStr);
+    //搜索+统计 
+    $('#ncstat').click(function () {
+        let index = layer.load(0, {shade: false}); 
+        $('input[name="fShowStat"]').val('1');
+        $('input[name="op"]').val('index');
+        // 不包含客户
+        let selectArr = selest_nc.getValue();
+        let selectStr = ''
+        for (let i = 0; i < selectArr.length; i++) {
+            selectStr += selectArr[i].value+','
+        }
+        selectStr = selectStr.substr(0, selectStr.length-1)
+        // 不包含面值
+        let nominalAll = denomination.getValue();
+        let nominalStr = ''
+        for (let i = 0; i < nominalAll.length; i++) {
+            nominalStr += nominalAll[i].value+','
+        }
+        nominalStr = nominalStr.substr(0, nominalStr.length-1)
 
-            $('#formSearch').submit();
-            $('input[name="fShowStat"]').val('');
+        $('input[name="no_mchid"]').val(selectStr);
+        $('input[name="no_amount"]').val(nominalStr);
+
+        $('#formSearch').submit();
+        $('input[name="fShowStat"]').val('');
         })
-        // 向客户回调
-        $('#mch_notify').click(function () {
 
-            $('input[name="mch_notify"]').val('1');
-            $('input[name="op"]').val('index');
-            // 不包含客户
-            let selectArr = selest_nc.getValue();
-            let selectStr = ''
-            for (let i = 0; i < selectArr.length; i++) {
-                selectStr += selectArr[i].value+','
-            }
-            selectStr = selectStr.substr(0, selectStr.length-1)
-            $('input[name="no_mchid"]').val(selectStr);
-            $('#formSearch').submit();
-            $('input[name="mch_notify"]').val('');
-            var ii = layer.load();
-            setTimeout(function(){
-                layer.close(ii);
-            }, 800);
+        // 向客户回调
+    $('#mch_notify').click(function () {
+        $('input[name="mch_notify"]').val('1');
+        $('input[name="op"]').val('index');
+        // 不包含客户
+        let selectArr = selest_nc.getValue();
+        let selectStr = ''
+        for (let i = 0; i < selectArr.length; i++) {
+            selectStr += selectArr[i].value+','
+        }
+        selectStr = selectStr.substr(0, selectStr.length-1)
+        $('input[name="no_mchid"]').val(selectStr);
+        $('#formSearch').submit();
+        $('input[name="mch_notify"]').val('');
+        let ii = layer.load();
+        setTimeout(function(){
+            layer.close(ii);
+        }, 800);
         })
-        // 更新待收货状态
-        $('#order_query').click(function () {
 
-            $('input[name="order_query"]').val('1');
-            $('input[name="op"]').val('index');
-            // 不包含客户
-            let selectArr = selest_nc.getValue();
-            let selectStr = ''
-            for (let i = 0; i < selectArr.length; i++) {
-                selectStr += selectArr[i].value+','
-            }
-            selectStr = selectStr.substr(0, selectStr.length-1)
-            $('input[name="no_mchid"]').val(selectStr);
-            $('#formSearch').submit();
-            $('input[name="order_query"]').val('');
-            var ii = layer.load();
-            setTimeout(function(){
-                layer.close(ii);
-            }, 800);
+        // 更新待收货状态
+    $('#order_query').click(function () {
+        $('input[name="order_query"]').val('1');
+        $('input[name="op"]').val('index');
+        // 不包含客户
+        let selectArr = selest_nc.getValue();
+        let selectStr = ''
+        for (let i = 0; i < selectArr.length; i++) {
+            selectStr += selectArr[i].value+','
+        }
+        selectStr = selectStr.substr(0, selectStr.length-1)
+        $('input[name="no_mchid"]').val(selectStr);
+        $('#formSearch').submit();
+        $('input[name="order_query"]').val('');
+        let ii = layer.load();
+        setTimeout(function(){
+            layer.close(ii);
+        }, 800);
         })
+
         // 日期选择器
-        laydate.render({
+    laydate.render({
             elem: '#startTime',
             type: 'datetime',
             trigger: 'click'
         });
-        laydate.render({
+    laydate.render({
             elem: '#endTime',
             type: 'datetime',
             trigger: 'click'
         });
+
         // 表格hover时背景
-        $('.trFlex').each(function () {
+    $('.trFlex').each(function () {
             $(this).hover(function () {
                 $(this)[0].style.backgroundColor = '#cbe9f3'
             },function() {
                 $(this)[0].style.backgroundColor = '#fff'
             })
         })
+
         // 供方名称颜色
-        $('.textColor').each(function () {
-            let color = $(this).attr('data-color')
-            if (color == '1') {
-                $(this).css('color', 'green')
-            } else {
-                $(this).css('color', 'red')
-            }
+    $('.textColor').each(function () {
+        let color = $(this).attr('data-color')
+        if (color == '1') {
+            $(this).css('color', 'green')
+        } else {
+            $(this).css('color', 'red')
+        }
         })
+
         // 十分钟订单
-        $('#10_rder').click(function () {
-            let date=new Date();
-            let min=date.getMinutes();
-            date.setMinutes(min-10);
-            let y = date.getFullYear();
-            let m = (date.getMonth() + 1) < 10 ? ("0" + (date.getMonth() + 1)) : (date.getMonth() + 1);
-            let d = date.getDate() < 10 ? ("0" + date.getDate()) : date.getDate();
-            let h = date.getHours() < 10 ? ('0' + date.getHours()) : date.getHours();
-            let f = date.getMinutes() < 10 ? ('0' + date.getMinutes()) : date.getMinutes();
-            let s = date.getSeconds();
-            let formatdate = y+'-'+m+'-'+d + " " + h + ":" + f + ":" + s;
-            $('#startTime').val(formatdate)
+    $('#10_rder').click(function () {
+        let date=new Date();
+        let min=date.getMinutes();
+        date.setMinutes(min-10);
+        let y = date.getFullYear();
+        let m = (date.getMonth() + 1) < 10 ? ("0" + (date.getMonth() + 1)) : (date.getMonth() + 1);
+        let d = date.getDate() < 10 ? ("0" + date.getDate()) : date.getDate();
+        let h = date.getHours() < 10 ? ('0' + date.getHours()) : date.getHours();
+        let f = date.getMinutes() < 10 ? ('0' + date.getMinutes()) : date.getMinutes();
+        let s = date.getSeconds();
+        let formatdate = y+'-'+m+'-'+d + " " + h + ":" + f + ":" + s;
+        $('#startTime').val(formatdate)
         });
+
         // 30分钟订单
-        $('#30_rder').click(function () {
-            let date=new Date();
-            let min=date.getMinutes();
-            date.setMinutes(min-30);
-            let y = date.getFullYear();
-            let m = (date.getMonth() + 1) < 10 ? ("0" + (date.getMonth() + 1)) : (date.getMonth() + 1);
-            let d = date.getDate() < 10 ? ("0" + date.getDate()) : date.getDate();
-            let h = date.getHours() < 10 ? ('0' + date.getHours()) : date.getHours();
-            let f = date.getMinutes() < 10 ? ('0' + date.getMinutes()) : date.getMinutes();
-            let s = date.getSeconds();
-            let formatdate = y+'-'+m+'-'+d + " " + h + ":" + f + ":" + s;
-            $('#startTime').val(formatdate)
+    $('#30_rder').click(function () {
+        let date=new Date();
+        let min=date.getMinutes();
+        date.setMinutes(min-30);
+        let y = date.getFullYear();
+        let m = (date.getMonth() + 1) < 10 ? ("0" + (date.getMonth() + 1)) : (date.getMonth() + 1);
+        let d = date.getDate() < 10 ? ("0" + date.getDate()) : date.getDate();
+        let h = date.getHours() < 10 ? ('0' + date.getHours()) : date.getHours();
+        let f = date.getMinutes() < 10 ? ('0' + date.getMinutes()) : date.getMinutes();
+        let s = date.getSeconds();
+        let formatdate = y+'-'+m+'-'+d + " " + h + ":" + f + ":" + s;
+        $('#startTime').val(formatdate)
         });
         // 60分钟订单
-        $('#60_rder').click(function () {
-            let date=new Date();
-            let min=date.getMinutes();
-            date.setMinutes(min-60);
-            let y = date.getFullYear();
-            let m = (date.getMonth() + 1) < 10 ? ("0" + (date.getMonth() + 1)) : (date.getMonth() + 1);
-            let d = date.getDate() < 10 ? ("0" + date.getDate()) : date.getDate();
-            let h = date.getHours() < 10 ? ('0' + date.getHours()) : date.getHours();
-            let f = date.getMinutes() < 10 ? ('0' + date.getMinutes()) : date.getMinutes();
-            let s = date.getSeconds();
-            let formatdate = y+'-'+m+'-'+d + " " + h + ":" + f + ":" + s;
-            $('#startTime').val(formatdate)
+    $('#60_rder').click(function () {
+        let date=new Date();
+        let min=date.getMinutes();
+        date.setMinutes(min-60);
+        let y = date.getFullYear();
+        let m = (date.getMonth() + 1) < 10 ? ("0" + (date.getMonth() + 1)) : (date.getMonth() + 1);
+        let d = date.getDate() < 10 ? ("0" + date.getDate()) : date.getDate();
+        let h = date.getHours() < 10 ? ('0' + date.getHours()) : date.getHours();
+        let f = date.getMinutes() < 10 ? ('0' + date.getMinutes()) : date.getMinutes();
+        let s = date.getSeconds();
+        let formatdate = y+'-'+m+'-'+d + " " + h + ":" + f + ":" + s;
+        $('#startTime').val(formatdate)
         });
         // 当前零点钟订单
-        $('#0_rder').click(function () {
-            let date=new Date();
-            let min=date.getMinutes();
-            let y = date.getFullYear();
-            let m = (date.getMonth() + 1) < 10 ? ("0" + (date.getMonth() + 1)) : (date.getMonth() + 1);
-            let d = date.getDate() < 10 ? ("0" + date.getDate()) : date.getDate();
-            let h = 0;
-            let f = 0;
-            let s = 0;
-            let formatdate = y+'-'+m+'-'+d + " " + h + ":" + f + ":" + s;
-            $('#startTime').val(formatdate)
+    $('#0_rder').click(function () {
+        let date=new Date();
+        let min=date.getMinutes();
+        let y = date.getFullYear();
+        let m = (date.getMonth() + 1) < 10 ? ("0" + (date.getMonth() + 1)) : (date.getMonth() + 1);
+        let d = date.getDate() < 10 ? ("0" + date.getDate()) : date.getDate();
+        let h = 0;
+        let f = 0;
+        let s = 0;
+        let formatdate = y+'-'+m+'-'+d + " " + h + ":" + f + ":" + s;
+        $('#startTime').val(formatdate)
         })
     });
     function hCopyChannel(e) {

+ 0 - 3
admin/templates/default/refill.order.manual.index.php

@@ -29,7 +29,6 @@
         left: 332px;
         margin-top: 3px;
     }
-    
 </style>
 
 <?php defined('InShopNC') or exit('Access Invalid!'); ?>
@@ -162,10 +161,8 @@
 <script type="text/javascript" src="<?php echo RESOURCE_SITE_URL;?>/refill/layer.js"></script>
 <script type="text/javascript">
     $(function () {
-        
         $('#ncsubmit').click(function () {
             $('input[name="op"]').val('index');
-           
             $('#formSearch').submit();
         });
         // 表格hover时背景

+ 82 - 94
admin/templates/default/refill.order.search.php

@@ -5,48 +5,48 @@
         margin-left: 10px;
     }
     .db-right {
-        padding-right: 134px!important;
-    border-bottom: 1px solid #ccc;
-
+        padding-right: 134px !important;
+        border-bottom: 1px solid #ccc;
     }
     .db-center {
         padding: 9px 0;
-    border-bottom: 1px solid #ccc;
+        border-bottom: 1px solid #ccc;
     }
     .db-top {
         padding: 0 30px;
     }
     .page .fixed-bar .item-title h3 {
-        margin-top:18px !important;
-        margin-bottom:10px !important;
-        font-weight:700 !important;
+        margin-top: 18px !important;
+        margin-bottom: 10px !important;
+        font-weight: 700 !important;
     }
     .tab-base li span {
-        font-size:12px !important;
+        font-size: 12px !important;
     }
     .query_ors {
         width: 125px;
     }
- 
-    
-    th label { display: inline-block;width: 60px; }
+    th label {
+        display: inline-block;
+        width: 60px;
+    }
     .lineLi {
         min-width: 150px;
         font-size: 12px;
-        color:#000;
+        color: #000;
     }
     #prompt ul .noLineLi {
-        background:none;
+        background: none;
     }
     #prompt div {
-        display:inline-block;
-        background:none
+        display: inline-block;
+        background: none
     }
     #prompt ul .lineLi {
-        color:#000;
+        color: #000;
     }
     #selest_nc {
-        width:220px
+        width: 220px
     }
     tbody {
         font-size: 12px;
@@ -55,16 +55,16 @@
         padding: 13px 5px;
     }
     .layui-form-selected dl {
-    display: flex!important;
-    flex-wrap: wrap!important;
+        display: flex !important;
+        flex-wrap: wrap !important;
     }
     .layui-form-select dl {
-      
+
         top: 29px !important;
-        min-width: 883%!important;
-        max-height: 280px!important;
-        padding: 14px 0!important;
-        left: -599px!important;
+        min-width: 883% !important;
+        max-height: 280px !important;
+        padding: 14px 0 !important;
+        left: -599px !important;
     }
     .layui-form-select {
         width: 45%;
@@ -73,48 +73,46 @@
         width: 104%;
     }
     .layui-form-select .layui-input {
-    
+
         padding-left: 11px;
     }
     .page .fixed-bar .item-title h3 {
-        margin-top:18px !important;
-        margin-bottom:10px !important;
-        font-weight:700 !important;
+        margin-top: 18px !important;
+        margin-bottom: 10px !important;
+        font-weight: 700 !important;
     }
     .tab-base li span {
-        font-size:12px !important;
+        font-size: 12px !important;
     }
     .layui-form-select .layui-input {
-        height:26px;
+        height: 26px;
     }
-    input::placeholder{ 
-        color:#333; 
+    input::placeholder {
+        color: #333;
     }
-    .xm-tips{
-    color: #333!important;
-    font-size: 12px;
+    .xm-tips {
+        color: #333 !important;
+        font-size: 12px;
     }
-    .layui-form-select dl dd.layui-this{
+    .layui-form-select dl dd.layui-this {
         display: none;
     }
     .layui-form-select dl dd {
-    cursor: pointer;
-    width: 130px;
-    
-
+        cursor: pointer;
+        width: 130px;
     }
-
     .tb-type1 td select {
-    width: 201px;
-}
-.tb-type1 td input[type="text"], .tb-type1 td select {
-    margin-right: 4px;
-    margin-left: 0;
-    width: 195px;
-}
-.layui-form-select .layui-edge {
-    right: -91px!important;
-}
+        width: 201px;
+    }
+    .tb-type1 td input[type="text"],
+    .tb-type1 td select {
+        margin-right: 4px;
+        margin-left: 0;
+        width: 195px;
+    }
+    .layui-form-select .layui-edge {
+        right: -91px !important;
+    }
 </style>
 
 <?php defined('InShopNC') or exit('Access Invalid!'); ?>
@@ -320,7 +318,6 @@
             type: 'datetime'
         });
         let isWring = '<?php echo $output['count'][1];?>';
-        // console.log('isWring', Number(isWring));
         let setTimer
         let num
         if (Number(isWring) > 0) {
@@ -335,19 +332,17 @@
             }, 60000);
         }
                 //双击
-                $('.doubleclick').dblclick(function() {
-            let db_click = $(this).attr('data-order')
+        $('.doubleclick').dblclick(function() {
+            let order_sn = $(this).attr('data-order')
             $.get('index.php?act=refill_order&op=showOrders', {
-                order_sn:db_click
+                order_sn:order_sn
             }, function(data) {
                 data = JSON.parse(data)
                 if (data.state == 1) {
-                    
-                var dbclick = data.data
-                let ConentArr = [];
+                let order_item = data.data
                 let html = ''; 
-                for (let i = 0; i < dbclick.length; i++) {
-                    var item = dbclick[i];
+                for (let i = 0; i < order_item.length; i++) {
+                    var item = order_item[i];
                     html += `
                     <tr>
                          <td class="db-center">${item.order_sn}</td>
@@ -357,53 +352,46 @@
                          <td class="db-center">${item.order_state_text}</td>
                          <td class="db-center">${item.channel_name}</td>
                          <td class="db-center">${item.err_msg}</td>
-                    <tr>
-                    `
+                    <tr>`
                 }
+                let content =  `<table>
+                                <thead>
+                                    <tr>
+                                        <th class="db-right">订单号</th>
+                                        <th class="db-right">下单日期</th>
+                                        <th class="db-right">回调日期</th>
+                                        <th class="db-right">耗时</th>
+                                        <th class="db-right">订单状态</th>
+                                        <th class="db-right">供方名称</th>
+                                        <th class="db-right">错误原因</th>
+                                    </tr>
+                                </thead>
+                                <tbody>${html}</tbody>
+                            </table>`
                 layer.open({
                    title: `<span>共${data.count}单</span> <span class="db-top">回调状态:${data.mch_notify_state}</span> <span>回调次数:${data.mch_notify_times}</span>` ,
-                   content: `<table>
-                   <thead>
-                             <tr>
-                                 <th class="db-right">订单号</th>
-                                 <th class="db-right">下单日期</th>
-                                 <th class="db-right">回调日期</th>
-                                 <th class="db-right">耗时</th>
-                                 <th class="db-right">订单状态</th>
-                                 <th class="db-right">供方名称</th>
-                                 <th class="db-right">错误原因</th>
-                             </tr>
-                    </thead>
-                             <tbody>
-                             ${html}
-                             </tbody>
-                            </table>`,
-                            
-
+                   content:content
                         });
                 } else {
                     alert("没有此订单");
-
                 }
-                
             })
-
         })
         //过滤
         $("#card_nos").blur(function () {
-                var test_mch =  $("#card_nos").val();
-           var result = test_mch.replace(/[\  \r\n\,]+/g, ",");
-                $(this).val(result)
+            let test_mch =  $("#card_nos").val();
+            let result = test_mch.replace(/[\  \r\n\,]+/g, ",");
+            $(this).val(result)
             })
-            $("#mch_orders").blur(function () {
-                var test_mch =  $("#mch_orders").val();
-           var result = test_mch.replace(/[\  \r\n\,]+/g, ",");
-                $(this).val(result)
+        $("#mch_orders").blur(function () {
+            let test_mch =  $("#mch_orders").val();
+            let result = test_mch.replace(/[\  \r\n\,]+/g, ",");
+            $(this).val(result)
             })
-            $("#order_sns").blur(function () {
-                var test_mch =  $("#order_sns").val();
-           var result = test_mch.replace(/[\  \r\n\,]+/g, ",");
-                $(this).val(result)
+        $("#order_sns").blur(function () {
+            let test_mch =  $("#order_sns").val();
+            let result = test_mch.replace(/[\  \r\n\,]+/g, ",");
+            $(this).val(result)
             })
         // 表格hover时背景
         $('.trFlex').each(function () {

+ 37 - 67
admin/templates/default/refill.order.send.index.php

@@ -3,7 +3,6 @@
         display: inline-block;
         width: 60px;
     }
-
     .lineLi {
         display: inline-block;
         min-width: 150px;
@@ -26,11 +25,10 @@
         color:#333; 
     }
     .layui-form-selected dl {
-    display: flex!important;
-    flex-wrap: wrap!important;
+        display: flex!important;
+        flex-wrap: wrap!important;
     }
     .layui-form-select dl {
-      
         top: 29px !important;
         left: 4px!important;
         min-width: 802%!important;
@@ -41,20 +39,19 @@
         display: none;
     }
     .layui-form-select dl dd {
-    cursor: pointer;
-    width: 130px;
+        cursor: pointer;
+        width: 130px;
     }
     .lefto {
         margin-left: 6px;
     }
     .db-right {
         padding-right: 134px!important;
-    border-bottom: 1px solid #ccc;
-
+        border-bottom: 1px solid #ccc;
     }
     .db-center {
         padding: 9px 0;
-    border-bottom: 1px solid #ccc;
+        border-bottom: 1px solid #ccc;
     }
     .db-top {
         padding: 0 30px;
@@ -357,16 +354,6 @@
         });
         $('#query_start_time').datepicker({dateFormat: 'yy-mm-dd'});
         $('#query_end_time').datepicker({dateFormat: 'yy-mm-dd'});
-    //  $('#dataColor').each(function () {
-    //      console.log($('#dataColor').attr('data-timeout_State'));
-    //      let data_color = $('#dataColor').attr('data-timeout_State');
-    //      if (data_color == 1) {
-    //         $(this).css('background', '#f1dde6')
-    //      } else {
-    //         $(this).css('background', '#fff')
-    //      }
-    //  })
-        
         // 日期选择器
         laydate.render({
             elem: '#startTime',
@@ -376,69 +363,52 @@
             elem: '#endTime',
             type: 'datetime'
         });
-                //双击
-                $('.doubleclick').dblclick(function() {
-            let db_click = $(this).attr('data-order')
+        //双击
+        $('.doubleclick').dblclick(function() {
+            let order_sn = $(this).attr('data-order')
             $.get('index.php?act=refill_order&op=showOrders', {
-                order_sn:db_click
+                order_sn:order_sn
             }, function(data) {
                 data = JSON.parse(data)
-           
                 if (data.state == 1) {
-                    
-                var dbclick = data.data
-                let ConentArr = [];
+                let order_item = data.data
                 let html = ''; 
-                for (let i = 0; i < dbclick.length; i++) {
-                    var item = dbclick[i];
+                for (let i = 0; i < order_item.length; i++) {
+                    var item = order_item[i];
                     html += `
                     <tr>
-                                        <td class="db-center">${item.order_sn}</td>
-                                         <td class="db-center">${item.commit_time_text}</td>
-                                         <td class="db-center">${item.notify_time_text}</td>
-                                         <td class="db-center">${item.diff_time_text}</td>
-                                         <td class="db-center">${item.order_state_text}</td>
-                                         <td class="db-center">${item.channel_name}</td>
-                                         <td class="db-center">${item.err_msg}</td>
-
-
-                             <tr>
-                    `
+                        <td class="db-center">${item.order_sn}</td>
+                        <td class="db-center">${item.commit_time_text}</td>
+                        <td class="db-center">${item.notify_time_text}</td>
+                        <td class="db-center">${item.diff_time_text}</td>
+                        <td class="db-center">${item.order_state_text}</td>
+                        <td class="db-center">${item.channel_name}</td>
+                        <td class="db-center">${item.err_msg}</td><tr>`
                 }
 
-
-                    layer.open({
-                   title: `<span>共${data.count}单</span> <span class="db-top">回调状态:${data.mch_notify_state}</span> <span>回调次数:${data.mch_notify_times}</span>`,
-                   content: `<table>
-                   <thead>
-                             <tr>
-                                         <th class="db-right">订单号</th>
-                                         <th class="db-right">下单日期</th>
-                                         <th class="db-right">回调日期</th>
-                                         <th class="db-right">耗时</th>
-                                         <th class="db-right">订单状态</th>
-                                         <th class="db-right">供方名称</th>
-                                         <th class="db-right">错误原因</th>
-
-                             </tr>
-                    </thead>
-                             <tbody>
-                             ${html}
-                             </tbody>
-                            </table>`,
-                            
-
-                        });
+                let content = `<table>
+                                <thead>
+                                    <tr>
+                                        <th class="db-right">订单号</th>
+                                        <th class="db-right">下单日期</th>
+                                        <th class="db-right">回调日期</th>
+                                        <th class="db-right">耗时</th>
+                                        <th class="db-right">订单状态</th>
+                                        <th class="db-right">供方名称</th>
+                                        <th class="db-right">错误原因</th></tr>
+                                </thead>
+                                <tbody>${html}</tbody>
+                                </table>`
+                layer.open({
+                title: `<span>共${data.count}单</span> <span class="db-top">回调状态:${data.mch_notify_state}</span> <span>回调次数:${data.mch_notify_times}</span>`,
+                content: content
+            });
                 } else {
                     alert("没有此订单");
-
                 }
-                
             })
-
         })
         let isWring = '<?php echo $output['count'][1];?>';
-        // console.log('isWring', Number(isWring));
         let setTimer
         let num
         if (Number(isWring) > 0) {

+ 8 - 9
admin/templates/default/refill.order.show.index.php

@@ -19,24 +19,23 @@
         width:220px
     }
     table tbody {
-      display: block;
-      height: 195px;
-      overflow-y: scroll;
+        display: block;
+        height: 195px;
+        overflow-y: scroll;
     }
- 
     table thead,
     tbody tr {
-      display: table;
-      width: 100%;
-      table-layout: fixed;
+        display: table;
+        width: 100%;
+        table-layout: fixed;
     }
  
     table thead {
-      width: calc(100% - 1em)
+        width: calc(100% - 1em)
     }
  
     table thead th {
-      background: #ccc;
+        background: #ccc;
     } 
     .cen {
         text-align:center;

+ 30 - 34
admin/templates/default/refill.refund.php

@@ -171,53 +171,49 @@
             elem: '#endTime',
             type: 'datetime'
         });
-        $('#ncsubmit').click(function () {
-            $('#formSearch').submit();
+    $('#ncsubmit').click(function () {
+        $('#formSearch').submit();
         });
         // 表格hover时背景
-        $('.trFlex').each(function () {
-            $(this).hover(function () {
-                $(this)[0].style.backgroundColor = '#cbe9f3'
-            },function() {
-                $(this)[0].style.backgroundColor = '#fff'
-            })
+    $('.trFlex').each(function () {
+        $(this).hover(function () {
+        $(this)[0].style.backgroundColor = '#cbe9f3'
+        },function() {
+        $(this)[0].style.backgroundColor = '#fff'
+        })
         })
         // 导出
-        $('#ncexport').click(function () {
-
-            $('input[name="export"]').val('1');
-            $('input[name="op"]').val('index');
-
-            $('#formSearch').submit();
-            $('input[name="export"]').val('');
-            var ii = layer.load();
-            setTimeout(function(){
-                layer.close(ii);
-            }, 800);
+    $('#ncexport').click(function () {
+        $('input[name="export"]').val('1');
+        $('input[name="op"]').val('index');
+        $('#formSearch').submit();
+        $('input[name="export"]').val('');
+        let ii = layer.load();
+        setTimeout(function(){
+            layer.close(ii);
+        }, 800);
         })
         //删除
-     $('#idremove #remove').each(function(index, item) {
+    $('#idremove #remove').each(function(index, item) {
         $(item).click(function () {
-            let data_id = $(item).attr('data_id');
-            layer.confirm('您确定要删除', {
-                btn: ['确定', '取消'],
-                title: '删除'
-            }, function () {
-                window.location.href = `index.php?act=refill_refund&op=del&id=${data_id}`
-            }, function () {
-            });
+        let data_id = $(item).attr('data_id');
+        layer.confirm('您确定要删除', {
+            btn: ['确定', '取消'],
+            title: '删除'
+        }, function () {
+             window.location.href = `index.php?act=refill_refund&op=del&id=${data_id}`
+        }, function () {});
         });
      })
      //过滤
      $("#card_nos").blur(function () {
-                var test_mch =  $("#card_nos").val();
-                var result = test_mch.replace(/[\  \r\n\,]+/g, ",");
-                $(this).val(result)
-            })
-
+        let test_mch =  $("#card_nos").val();
+        let result = test_mch.replace(/[\  \r\n\,]+/g, ",");
+        $(this).val(result)
+        })
     });
         //拷贝
-        function Copyrefund(e) {
+    function Copyrefund(e) {
         let str = ''
         $('#tbody tr').each(function () {
             let card_refund = $(this).find('td').eq(7).text()

+ 24 - 29
admin/templates/default/set.cancel.order.php

@@ -4,58 +4,55 @@
         width: 60px;
         margin-left: 10px;
     }
-
     .lineLi {
         display: inline-block;
         min-width: 150px;
         font-size: 14px;
     }
     .page .fixed-bar .item-title h3 {
-        margin-top:18px !important;
-        margin-bottom:10px !important;
-        font-weight:700 !important;
+        margin-top: 18px !important;
+        margin-bottom: 10px !important;
+        font-weight: 700 !important;
     }
     .tab-base li span {
-        font-size:12px !important;
+        font-size: 12px !important;
     }
     .layui-form-select .layui-input {
-        height:23px;
+        height: 23px;
         padding-left: 11px;
-        padding-right: 0!important;
+        padding-right: 0 !important;
     }
-    input::placeholder{ 
-        color:#333; 
+    input::placeholder {
+        color: #333;
     }
     .layui-form-selected dl {
-    display: flex!important;
-    flex-wrap: wrap!important;
+        display: flex !important;
+        flex-wrap: wrap !important;
     }
     .layui-form-select dl {
-      
         top: 29px !important;
-        left: 4px!important;
-        min-width: 802%!important;
-        max-height: 280px!important;
-        padding: 14px 0!important;
+        left: 4px !important;
+        min-width: 802% !important;
+        max-height: 280px !important;
+        padding: 14px 0 !important;
     }
-    .layui-form-select dl dd.layui-this{
+    .layui-form-select dl dd.layui-this {
         display: none;
     }
     .layui-form-select dl dd {
-    cursor: pointer;
-    width: 130px;
+        cursor: pointer;
+        width: 130px;
     }
     .lefto {
         margin-left: 6px;
     }
     .db-right {
-        padding-right: 134px!important;
-    border-bottom: 1px solid #ccc;
-
+        padding-right: 134px !important;
+        border-bottom: 1px solid #ccc;
     }
     .db-center {
         padding: 9px 0;
-    border-bottom: 1px solid #ccc;
+        border-bottom: 1px solid #ccc;
     }
     .db-top {
         padding: 0 30px;
@@ -256,11 +253,10 @@
 
         //过滤
         $("#mch_orders").blur(function () {
-            var test_mch = $("#mch_orders").val();
-            var result = test_mch.replace(/[\  \r\n\,]+/g, ",");
+            let test_mch = $("#mch_orders").val();
+            let result = test_mch.replace(/[\  \r\n\,]+/g, ",");
             $(this).val(result)
         })
-
         //批量
         $('#hFail').click(function () {
             layer.confirm('您确定要批量拦截', {
@@ -282,8 +278,7 @@
                 } else {
                     layer.msg('请还没有任何操作,请先选择');
                 }
-            }, function () {
-            });
+            }, function () {});
         })
 
         // 表格hover时背景
@@ -291,7 +286,7 @@
             let data_color = $(this).attr('data-timeout_State');
             $(this).css('background', '#fff')
             $(this).hover(function () {
-                $(this)[0].style.backgroundColor = '#cbe9f3'
+            $(this)[0].style.backgroundColor = '#cbe9f3'
             }, function () {
                 $(this).css('background', '#fff')
             })

+ 38 - 49
admin/templates/default/system.order.stats.php

@@ -173,26 +173,21 @@
         })
         function JSONToExcelConvertor(JSONData, FileName, ShowLabel, headData) { 
             //先转化json 
-            var arrData = typeof JSONData != 'object' ? JSON.parse(JSONData) : JSONData; 
-                
-            var excel = '<table>';   
-                
+            let arrData = typeof JSONData != 'object' ? JSON.parse(JSONData) : JSONData; 
+            let excel = '<table>';   
             // 标题
             for (const key in headData) {
                 var head = "<tr>";
                 var td = "<td colspan='13' style='font-size:16px;'>"+ headData[key] + '</td>';
                 excel += td + "</tr>";
             }
-
             //设置表头 
-            var row = "<tr>"; 
+            let row = "<tr>"; 
             for (var i = 0, l = ShowLabel.length; i < l; i++) { 
                 row += "<th style='font-size:14px;'>" + ShowLabel[i].value + '</th>'; 
             }
-                
             //换行 
             excel += row + "</tr>"; 
-                
             //设置数据 
             for (var i = 0; i < arrData.length; i++) { 
                 var row = "<tr>"; 
@@ -212,46 +207,41 @@
                 row += '<td style=font-size:14px;'+ 'mso-number-format:"\@"'+ '>' + arrData[i].success_ratio + '</td>';
                 excel += row + "</tr>"; 
             } 
-            excel += "</table>"; 
-            var excelFile = "<html xmlns:o='urn:schemas-microsoft-com:office:office' xmlns:x='urn:schemas-microsoft-com:office:excel' xmlns='http://www.w3.org/TR/REC-html40'>"; 
-            excelFile += '<meta http-equiv="content-type" content="application/vnd.ms-excel; charset=UTF-8">'; 
-            excelFile += '<meta http-equiv="content-type" content="application/vnd.ms-excel'; 
-            excelFile += '; charset=UTF-8">'; 
-            excelFile += "<head>"; 
-            excelFile += "<!--[if gte mso 9]>";
-            excelFile += "<xml>";
-            excelFile += "<x:ExcelWorkbook>"; 
-            excelFile += "<x:ExcelWorksheets>"; 
-            excelFile += "<x:ExcelWorksheet>"; 
-            excelFile += "<x:Name>"; 
-            excelFile += "{worksheet}"; 
-            excelFile += "</x:Name>"; 
-            excelFile += "<x:WorksheetOptions>"; 
-            excelFile += "<x:DisplayGridlines/>"; 
-            excelFile += "</x:WorksheetOptions>"; 
-            excelFile += "</x:ExcelWorksheet>"; 
-            excelFile += "</x:ExcelWorksheets>"; 
-            excelFile += "</x:ExcelWorkbook>"; 
-            excelFile += "</xml>"; 
-            excelFile += "<![endif]-->"; 
-            excelFile += "</head>"; 
-            excelFile += "<body>"; 
-            excelFile += excel; 
-            excelFile += "</body>"; 
-            excelFile += "</html>"; 
-
-                
-            var uri = 'data:application/vnd.ms-excel;charset=utf-8,' + encodeURIComponent(excelFile); 
-                
-            var link = document.createElement("a");   
-            link.href = uri; 
-                
-            link.style = "visibility:hidden"; 
-            link.download = FileName + ".xls"; 
-                
-            document.body.appendChild(link); 
-            link.click(); 
-            document.body.removeChild(link); 
+                excel += "</table>"; 
+                var excelFile = "<html xmlns:o='urn:schemas-microsoft-com:office:office' xmlns:x='urn:schemas-microsoft-com:office:excel' xmlns='http://www.w3.org/TR/REC-html40'>"; 
+                excelFile += '<meta http-equiv="content-type" content="application/vnd.ms-excel; charset=UTF-8">'; 
+                excelFile += '<meta http-equiv="content-type" content="application/vnd.ms-excel'; 
+                excelFile += '; charset=UTF-8">'; 
+                excelFile += "<head>"; 
+                excelFile += "<!--[if gte mso 9]>";
+                excelFile += "<xml>";
+                excelFile += "<x:ExcelWorkbook>"; 
+                excelFile += "<x:ExcelWorksheets>"; 
+                excelFile += "<x:ExcelWorksheet>"; 
+                excelFile += "<x:Name>"; 
+                excelFile += "{worksheet}"; 
+                excelFile += "</x:Name>"; 
+                excelFile += "<x:WorksheetOptions>"; 
+                excelFile += "<x:DisplayGridlines/>"; 
+                excelFile += "</x:WorksheetOptions>"; 
+                excelFile += "</x:ExcelWorksheet>"; 
+                excelFile += "</x:ExcelWorksheets>"; 
+                excelFile += "</x:ExcelWorkbook>"; 
+                excelFile += "</xml>"; 
+                excelFile += "<![endif]-->"; 
+                excelFile += "</head>"; 
+                excelFile += "<body>"; 
+                excelFile += excel; 
+                excelFile += "</body>"; 
+                excelFile += "</html>"; 
+                var uri = 'data:application/vnd.ms-excel;charset=utf-8,' + encodeURIComponent(excelFile); 
+                var link = document.createElement("a");   
+                link.href = uri; 
+                link.style = "visibility:hidden"; 
+                link.download = FileName + ".xls"; 
+                document.body.appendChild(link); 
+                link.click(); 
+                document.body.removeChild(link); 
         }
         $('#ncexport').click(function () {
             let starTime = new Date($('input[name="query_start_time"]').val()).getTime()/1000;
@@ -281,7 +271,6 @@
                     let title = [{value: "序号"},{value: "统计日期"},{value: "主体名称"},{value: "主体ID"},{value: "成功订单数"},{value: "成功金额"},{value: "下游金额"},{value: "上游金额"},{value: "利润"},{value: "服务费"},{value: "订单总量"}, {value: "失败订单数量"},{value: "成功占比"}]
                     JSONToExcelConvertor(data.data, '平台对账记录', title, head)
                 }
-                // console.log('data', data);
             })
         })
     });

+ 4 - 23
admin/templates/default/third.merchant.price.php

@@ -12,11 +12,9 @@ defined('InShopNC') or exit('Access Invalid!'); ?>
         z-index: 1;
         *zoom: 1 /*IE7*/;
     }
-
     .batch i {
         cursor: pointer;
     }
-
     .batch-input {
         background-color: #FFF;
         white-space: nowrap;
@@ -28,12 +26,10 @@ defined('InShopNC') or exit('Access Invalid!'); ?>
         left: -75px;
         box-shadow: 3px 3px 0 rgba(153, 153, 153, 0.25);
     }
-
     .batch-input h6 {
         font-size: 12px;
         color: #555;
     }
-
     .batch-input .text {
         vertical-align: middle;
         clear: both;
@@ -41,7 +37,6 @@ defined('InShopNC') or exit('Access Invalid!'); ?>
         vertical-align: middle;
         margin-right: 4px;
     }
-
     .batch-input .arrow {
         background: url(<?php echo SHOP_SITE_URL;?>/templates/default/images/seller/ncsc_bg_img.png) no-repeat -240px -20px;
         display: block;
@@ -53,7 +48,6 @@ defined('InShopNC') or exit('Access Invalid!'); ?>
         position: absolute;
         z-index: 2;
     }
-
     .batch-input a.close {
         font-size: 11px;
         line-height: 12px;
@@ -71,7 +65,6 @@ defined('InShopNC') or exit('Access Invalid!'); ?>
         position: absolute;
         z-index: 2;
     }
-
     .text.price {
         width: 40px;
     }
@@ -83,7 +76,6 @@ defined('InShopNC') or exit('Access Invalid!'); ?>
             <ul class="tab-base">
                 <li><a href="index.php?act=merchant&op=merchant"><span><?php echo $lang['nc_manage'] ?></span></a></li>
                 <li><a href="index.php?act=merchant&op=merchant_add"><span><?php echo $lang['nc_new'] ?></span></a></li>
-
                 <li><a href="index.php?act=merchant&op=price&quality=1&mchid=<?php echo $_GET['mchid'] ?>" class="classA" data-quality="1"><span>普通(无流水)费率设置</span></a></li>
                 <li><a href="index.php?act=merchant&op=price&quality=2&mchid=<?php echo $_GET['mchid'] ?>" class="classA" data-quality="2"><span>快速费率设置</span></a></li>
                 <li><a href="index.php?act=merchant&op=price&quality=3&mchid=<?php echo $_GET['mchid'] ?>" class="classA" data-quality="3"><span>卡密费率设置</span></a></li>
@@ -93,7 +85,6 @@ defined('InShopNC') or exit('Access Invalid!'); ?>
                 <li><a href="index.php?act=merchant&op=price&quality=7&mchid=<?php echo $_GET['mchid'] ?>" class="classA" data-quality="7"><span>慢2费率设置</span></a></li>
                 <li><a href="index.php?act=merchant&op=price&quality=8&mchid=<?php echo $_GET['mchid'] ?>" class="classA" data-quality="8"><span>慢48费率设置</span></a></li>
                 <li><a href="index.php?act=merchant&op=price&quality=9&mchid=<?php echo $_GET['mchid'] ?>" class="classA" data-quality="9"><span>慢72费率设置</span></a></li>
-
                 <li><a href="index.php?act=merchant&op=price&quality=13&mchid=<?php echo $_GET['mchid'] ?>" class="classA" data-quality="13"><span>普通+卡密+快充</span></a></li>
                 <li><a href="index.php?act=merchant&op=price&quality=14&mchid=<?php echo $_GET['mchid'] ?>" class="classA" data-quality="14"><span>普通+快充</span></a></li>
                 <li><a href="JavaScript:void(0);" class="current"><span>三方业务通道费率设置</span></a></li>
@@ -238,40 +229,30 @@ defined('InShopNC') or exit('Access Invalid!'); ?>
             $(this).parent().hide();
         });
         $('.batch-input > .ncsc-btn-mini').click(function () {
-            var _value = $(this).prev().val();
-            // console.log('_value', _value)
-            var trs = $(this).parents('.setTable').children('.tbody').children()
-            var trsArr = []
+            let _value = $(this).prev().val();
+            let trs = $(this).parents('.setTable').children('.tbody').children()
+            let trsArr = []
             trs.each(function () {
                 let res = $(this).find('td').eq(2).text().replace(/[\  \r\n]+/g, "");
                 trsArr.push(res)
             })
-            // console.log('trsArr', trsArr)
-            var _valArr = []
+            let _valArr = []
             if (_value && _value > 0 && _value <= 200) {
                 for (var i = 0; i < trsArr.length; i++) {
                     _valArr[i] = (parseInt(trsArr[i]) / 100 * _value).toFixed(3)
                 }
-                // console.log('_valArr', _valArr, trsArr)
                 let vals =  $(this).parents('.setTable').children('.tbody').find('.val')
-                // console.log('vals', vals)
                 for (let j= 0; j< vals.length;j++) {
-                    // console.log('vals[j]', j, vals[j], _valArr[j])
                     vals[j].value = _valArr[j]
                 }
-                // console.log('_valArr', _valArr)
             } else if (_value && _value == 0 && _value <= 200) {
                 for (let i = 0; i < trsArr.length; i++) {
                     _valArr[i] = 0
                 }
-                // console.log('_valArr', _valArr, trsArr)
                 let vals =  $(this).parents('.setTable').children('.tbody').find('.val')
-                // console.log('vals', vals)
                 for (let j= 0; j< vals.length;j++) {
-                    // console.log('vals[j]', j, vals[j], _valArr[j])
                     vals[j].value = _valArr[j]
                 }
-                // console.log('_valArr', _valArr)
             }
             $(this).parent().hide();
             $(this).prev().val('');