gang.huang 2 years ago
parent
commit
7a02ea9752
1 changed files with 122 additions and 102 deletions
  1. 122 102
      admin/templates/default/refill.order.exception.php

+ 122 - 102
admin/templates/default/refill.order.exception.php

@@ -4,31 +4,38 @@
         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;
     }
+
     .tab-base li span {
         font-size: 12px !important;
     }
+
     .layui-form-select .layui-input {
         height: 23px;
         padding-left: 11px;
         padding-right: 0 !important;
     }
+
     input::placeholder {
         color: #333;
     }
+
     .layui-form-selected dl {
         display: flex !important;
         flex-wrap: wrap !important;
     }
+
     .layui-form-select dl {
         top: 29px !important;
         left: 4px !important;
@@ -36,30 +43,38 @@
         max-height: 280px !important;
         padding: 14px 0 !important;
     }
+
     .layui-form-select dl dd.layui-this {
         display: none;
     }
+
     .layui-form-select dl dd {
         cursor: pointer;
         width: 130px;
     }
+
     .lefto {
         margin-left: 6px;
     }
+
     .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;
     }
+
     #selectAll {
         cursor: pointer;
     }
+
     .query_ors {
         width: 140px;
     }
@@ -81,28 +96,25 @@
     </div>
     <div class="fixed-empty"></div>
     <form method="get" action="index.php" name="formSearch" id="formSearch">
-        <input type="hidden" name="act" value="ordersendlist"/>
-        <input type="hidden" name="op" value="order_exception"/>
+        <input type="hidden" name="act" value="ordersendlist" />
+        <input type="hidden" name="op" value="order_exception" />
         <table class="tb-type1 noborder search">
             <tr>
                 <th><label class="query_ors">订单号(多行查询)</label></th>
-                <td><textarea name="order_sns" id="order_sns" cols="30" rows="10"><?php echo $_GET['order_sns'];?></textarea></td>
+                <td><textarea name="order_sns" id="order_sns" cols="30" rows="10"><?php echo $_GET['order_sns']; ?></textarea></td>
                 <th><label>异常状态</label></th>
                 <td>
 
                     <select name="except_state" class="querySelect">
                         <option value=""><?php echo $lang['nc_please_choose']; ?></option>
-                        <option value="0"
-                                <?php if ($_GET['except_state'] == '0'){ ?>selected<?php } ?>>未处理
+                        <option value="0" <?php if ($_GET['except_state'] == '0') { ?>selected<?php } ?>>未处理
                         </option>
-                        <option value="1"
-                                <?php if ($_GET['except_state'] == '1'){ ?>selected<?php } ?>>已处理
+                        <option value="1" <?php if ($_GET['except_state'] == '1') { ?>selected<?php } ?>>已处理
                         </option>
                     </select>
                 </td>
                 <td>
-                    <a href="javascript:void(0);" id="ncsubmit" class="btn-search"
-                       title="<?php echo $lang['nc_query']; ?>">&nbsp;
+                    <a href="javascript:void(0);" id="ncsubmit" class="btn-search" title="<?php echo $lang['nc_query']; ?>">&nbsp;
                     </a>
                 </td>
             </tr>
@@ -113,7 +125,7 @@
                     <a href="#" class="btns" onclick="hCopyOrder(event)">
                         <span><i class="icon-edit"></i>拷贝订单号</span>
                     </a>
-                    <a href="#" class="btns"  id="hHandled">
+                    <a href="#" class="btns" id="hHandled">
                         <span><i class="icon-edit"></i>批量标记为已处理</span>
                     </a>
                 </td>
@@ -122,69 +134,69 @@
     </form>
     <table class="table tb-type2 nobdb">
         <thead>
-        <tr class="thead">
-            <th class="align-center" id="selectAll">
-            <input type="checkbox" name="chbox" value="">
-            </th>
-            <th class="align-left">编号</th>
-            <th class="align-left">机构编号</th>
-            <th class="align-left">机构名称</th>
-            <th class="align-left">通道名称</th>
-            <th class="align-left">订单号</th>
-            <th class="align-left">异常事件</th>
-            <th class="align-left">异常信息</th>
-            <th class="align-left">生成日期</th>
-            <th class="align-left">更新日期</th>
-            <th class="align-center">异常状态</th>
-            <th class="align-left">处理人</th>
-            <th class="align-center"><?php echo $lang['nc_handle']; ?></th>            
-        </tr>
+            <tr class="thead">
+                <th class="align-center" id="selectAll">
+                    <input type="checkbox" name="chbox" value="">
+                </th>
+                <th class="align-left">编号</th>
+                <th class="align-left">机构编号</th>
+                <th class="align-left">机构名称</th>
+                <th class="align-left">通道名称</th>
+                <th class="align-left">订单号</th>
+                <th class="align-left">异常事件</th>
+                <th class="align-left">异常信息</th>
+                <th class="align-left">生成日期</th>
+                <th class="align-left">更新日期</th>
+                <th class="align-center">异常状态</th>
+                <th class="align-left">处理人</th>
+                <th class="align-center"><?php echo $lang['nc_handle']; ?></th>
+            </tr>
         </thead>
         <tbody id="tbody">
-        <?php if (count($output['list']) > 0) { ?>
-            <?php
-            foreach ($output['list'] as $key => $order) { ?>
-                <tr class="hover trFlex">
-                    <td class="align-center">
-                    <input type="checkbox" id="checkBoxList" name="checkbox" value="<?php echo $order['except_id'];?>">
-                    </td>
-                    <td class="align-left"><?php echo $key+1;?></td>
-                    <td class="align-left"><?php echo $order['mchid']; ?></td>
-                    <td class="align-left"><?php echo $output['merchant_list'][$order['mchid']]['company_name'];?></td>
-                    <td class="align-left"><?php echo $order['store_name']; ?></td>
-                    <td class="align-left"><?php echo $order['order_sn']; ?></td>
-                    <td class="align-left"><?php echo $order['title']; ?></td>
-                    <td class="align-left"><?php echo $order['except_desc']; ?></td>
-                    <td class="align-left"><?php echo date('Y-m-d H:i:s', $order['add_time']) ?? '/'; ?></td>
-                    <td class="align-left"><?php echo !empty($order['oper_time']) ? date('Y-m-d H:i:s', $order['oper_time']) : '/'; ?></td>
-                    <td class="align-center">
-                        <?php if ($order['except_state'] == '0') { ?>
-                                    <span style="color: #E53737">未处理</span>
-                            <?php } ?><?php if ($order['except_state'] == '1') { ?>
-                                    <span style="color: #48975A">已处理</span>
+            <?php if (count($output['list']) > 0) { ?>
+                <?php
+                foreach ($output['list'] as $key => $order) { ?>
+                    <tr class="hover trFlex">
+                        <td class="align-center">
+                            <input type="checkbox" id="checkBoxList" name="checkbox" value="<?php echo $order['except_id']; ?>">
+                        </td>
+                        <td class="align-left"><?php echo $key + 1; ?></td>
+                        <td class="align-left"><?php echo $order['mchid']; ?></td>
+                        <td class="align-left"><?php echo $output['merchant_list'][$order['mchid']]['company_name']; ?></td>
+                        <td class="align-left"><?php echo $order['store_name']; ?></td>
+                        <td class="align-left"><?php echo $order['order_sn']; ?></td>
+                        <td class="align-left"><?php echo $order['title']; ?></td>
+                        <td class="align-left"><?php echo $order['except_desc']; ?></td>
+                        <td class="align-left"><?php echo date('Y-m-d H:i:s', $order['add_time']) ?? '/'; ?></td>
+                        <td class="align-left"><?php echo !empty($order['oper_time']) ? date('Y-m-d H:i:s', $order['oper_time']) : '/'; ?></td>
+                        <td class="align-center">
+                            <?php if ($order['except_state'] == '0') { ?>
+                                <span style="color: #E53737">未处理</span>
+                                <?php } ?><?php if ($order['except_state'] == '1') { ?>
+                                <span style="color: #48975A">已处理</span>
                             <?php } ?>
-                    </td>
-                    <td class="align-left"><?php echo $order['admin_name']; ?></td>
-                    <td class="align-center">
-                        <?php if($order['except_state'] == 0){?>
-                        <a href="index.php?act=ordersendlist&op=order_exception_handled&except_ids=<?php echo $order['except_id']; ?>">
-                        已处理</a>
-                        <?php }?>
-                    </td>
+                        </td>
+                        <td class="align-left"><?php echo $order['admin_name']; ?></td>
+                        <td class="align-center">
+                            <?php if ($order['except_state'] == 0) { ?>
+                                <a href="index.php?act=ordersendlist&op=order_exception_handled&except_ids=<?php echo $order['except_id']; ?>">
+                                    已处理</a>
+                            <?php } ?>
+                        </td>
+                    </tr>
+                <?php } ?>
+            <?php } else { ?>
+                <tr class="no_data">
+                    <td colspan="13"><?php echo $lang['nc_no_record']; ?></td>
                 </tr>
             <?php } ?>
-        <?php } else { ?>
-            <tr class="no_data">
-                <td colspan="13"><?php echo $lang['nc_no_record']; ?></td>
-            </tr>
-        <?php } ?>
         </tbody>
         <tfoot>
-        <tr class="tfoot">
-            <td colspan="13" id="dataFuncs">
-                <div class="pagination"> <?php echo $output['show_page']; ?> </div>
-            </td>
-        </tr>
+            <tr class="tfoot">
+                <td colspan="13" id="dataFuncs">
+                    <div class="pagination"> <?php echo $output['show_page']; ?> </div>
+                </td>
+            </tr>
         </tfoot>
     </table>
     <!-- 预警提示 -->
@@ -192,20 +204,25 @@
 </div>
 <script type="text/javascript" src="<?php echo RESOURCE_SITE_URL; ?>/laydate/laydate.js"></script>
 <script type="text/javascript" src="<?php echo RESOURCE_SITE_URL; ?>/js/jquery-ui/jquery.ui.js"></script>
-<script type="text/javascript" src="<?php echo RESOURCE_SITE_URL; ?>/js/jquery-ui/i18n/zh-CN.js"
-        charset="utf-8"></script>
-<script type="text/javascript" src="<?php echo RESOURCE_SITE_URL;?>/refill/layer.js"></script>
-<script type="text/javascript" src="<?php echo ADMIN_TEMPLATES_URL;?>/layui/layui.js"></script>
-<link rel="stylesheet" type="text/css" href="<?php echo ADMIN_TEMPLATES_URL; ?>/layui/css/layui.css"/>
-<link rel="stylesheet" type="text/css"
-      href="<?php echo RESOURCE_SITE_URL; ?>/js/jquery-ui/themes/ui-lightness/jquery.ui.css"/>
+<script type="text/javascript" src="<?php echo RESOURCE_SITE_URL; ?>/js/jquery-ui/i18n/zh-CN.js" charset="utf-8"></script>
+<script type="text/javascript" src="<?php echo RESOURCE_SITE_URL; ?>/refill/layer.js"></script>
+<script type="text/javascript" src="<?php echo ADMIN_TEMPLATES_URL; ?>/layui/layui.js"></script>
+<link rel="stylesheet" type="text/css" href="<?php echo ADMIN_TEMPLATES_URL; ?>/layui/css/layui.css" />
+<link rel="stylesheet" type="text/css" href="<?php echo RESOURCE_SITE_URL; ?>/js/jquery-ui/themes/ui-lightness/jquery.ui.css" />
 <script type="text/javascript">
-    $(function () {
-        $('#ncsubmit').click(function () {
+    $(function() {
+        const output = <?php echo $output ?>
+
+
+        $('#ncsubmit').click(function() {
             $('#formSearch').submit();
         });
-        $('#query_start_time').datepicker({dateFormat: 'yy-mm-dd'});
-        $('#query_end_time').datepicker({dateFormat: 'yy-mm-dd'});
+        $('#query_start_time').datepicker({
+            dateFormat: 'yy-mm-dd'
+        });
+        $('#query_end_time').datepicker({
+            dateFormat: 'yy-mm-dd'
+        });
         // 日期选择器
         laydate.render({
             elem: '#startTime',
@@ -215,65 +232,68 @@
             elem: '#endTime',
             type: 'datetime'
         });
-          //全选
-        $('#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;
-              })
-          }
+        //全选
+        $('#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;
+                })
+            }
         })
 
-        $("#order_sns").blur(function () {
-            let test_mch =  $("#order_sns").val();
+        $("#order_sns").blur(function() {
+            let test_mch = $("#order_sns").val();
             let result = test_mch.replace(/[\  \r\n\,]+/g, ",");
             $(this).val(result)
         })
 
-        let get_sel_id = function (){
+        let get_sel_id = function() {
             let arr = [];
-            $("input:checkbox:checked").each(function () {
+            $("input:checkbox:checked").each(function() {
                 let sel_id = $(this).val();
-                if(sel_id !== '') {
+                if (sel_id !== '') {
                     arr.push(sel_id);
                 }
             })
-            if (arr.length <= 0) { return}
+            if (arr.length <= 0) {
+                return
+            }
             return arr.join(",")
         }
 
         //批量失败
-        $('#hHandled').click(function () {
+        $('#hHandled').click(function() {
             layer.confirm('您确定要批量处理', {
                 btn: ['确定', '取消'],
                 title: '批量失败'
-            }, function () {
+            }, function() {
                 const batch = get_sel_id();
                 window.location.href = `index.php?act=ordersendlist&op=order_exception_handled&except_ids= ${batch ? batch : ''}`
-            }, function () {
+            }, function() {
                 layer.msg('取消成功')
             });
         })
 
 
         // 表格hover时背景
-        $('.trFlex').each(function () {
+        $('.trFlex').each(function() {
             let data_color = $(this).attr('data-timeout_State');
             $(this).css('background', '#fff')
-            $(this).hover(function () {
+            $(this).hover(function() {
                 $(this)[0].style.backgroundColor = '#cbe9f3'
-            }, function () {
+            }, function() {
                 $(this).css('background', '#fff')
             })
         })
     });
+
     function hCopyOrder(e) {
         let str = ''
-        $('#tbody tr').each(function () {
+        $('#tbody tr').each(function() {
             let res = $(this).find('td').eq(5).text()
             str += res + '\n'
         })
@@ -286,4 +306,4 @@
         document.execCommand("Copy"); // 执行浏览器复制命令
         oInput.parentNode.removeChild(oInput)
     }
-</script> 
+</script>