Selaa lähdekoodia

admin monitor notify add batch dispose

xiaoyu 3 vuotta sitten
vanhempi
commit
cc7e8177f2

+ 1 - 1
admin/control/refill_order_manual.php

@@ -250,7 +250,7 @@ class refill_order_manualControl extends SystemControl
             showMessage('手动操作类型错误');
         }
 
-        showMessage('操作成功');
+        showMessage('操作成功','index.php?act=refill_order_manual&op=refill_order_batch');
     }
 
     public function set_cancel_orderOp()

+ 77 - 9
admin/templates/default/refill.order.monitor.notify.php

@@ -87,17 +87,19 @@
                     <select name="mchid" class="querySelect" lay-verify="" lay-search>
                         <option value=""><?php echo $lang['nc_please_choose']; ?></option>
                         <?php foreach ($output['merchant_list'] as $merchant) { ?>
-                            <option value="<?php echo $merchant['mchid'] ?>"<?php if ($_GET['mchid'] == $merchant['mchid']){ ?>selected<?php } ?>><?php echo $merchant['company_name'] == '' ? $merchant['name'] : $merchant['company_name']; ?></option>
+                            <option value="<?php echo $merchant['mchid'];?>" <?php if ($_GET['mchid'] == $merchant['mchid']){ ?>selected<?php } ?>><?php echo $merchant['company_name'] == '' ? $merchant['name'] : $merchant['company_name']; ?></option>
                         <?php } ?>
                     </select>
                 </td>
                 <th><label class="lefto">供方名称</label></th>
-                <td>
-                    <select name="store_id" class="querySelect">
-                        <option value=""><?php echo $lang['nc_please_choose']; ?></option>
-                        <?php foreach ($output['special_stat'] as $provider) { ?>
-                            <option value="<?php echo $provider['store_id'] ?>"<?php if ($_GET['store_id'] == $provider['store_id']){ ?>selected<?php } ?>data-color="<?php echo $provider['opened'] ?>" class="textColor"><?php echo $provider['store_name'] ?></option>
-                        <?php } ?>
+                <td class="">
+                    <select name="store_id" class="">
+                        <option data-color="<?php echo $provider['opened']?>" value=""><?php echo $lang['nc_please_choose']; ?> </option>
+                        <?php foreach($output['special_stat'] as $provider){?>
+                            <option value="<?php echo $provider['store_id']?>"
+                                    <?php if ($_GET['store_id'] == $provider['store_id']){ ?>selected<?php } ?> data-color="<?php echo $provider['opened']?>" class="textColor"><?php echo $provider['store_name']?>
+                            </option>
+                        <?php }?>
                     </select>
                 </td>
                 <th><label>充值类型</label></th>
@@ -251,6 +253,7 @@
     <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-center">编号</th>
             <th class="align-center">订单号</th>
             <th class="align-center">机构编号</th>
@@ -276,6 +279,7 @@
             <?php
             foreach ($output['order_list'] as $key => $order) { ?>
                 <tr class="hover trFlex" id="dataColor" data-timeout_State="<?php echo $order['time_out_state'];?>">
+                    <td class="align-center"><input type="checkbox" id="checkBoxList" name="checkbox" value="<?php echo $order['order_id'];?>"></td>
                     <td class="align-center"><?php echo $key + 1; ?></td>
                     <td class="align-left"><?php echo $order['order_sn']; ?></td>
                     <td class="align-center"><?php echo $order['mchid']; ?></td>
@@ -332,15 +336,18 @@
                 <td colspan="18"><?php echo $lang['nc_no_record']; ?></td>
             </tr>
         <?php } ?>
-        </tbody>
+    </tbody>
         <tfoot>
         <tr class="tfoot">
+         
             <td colspan="18" id="dataFuncs">
                 <div class="pagination"> <?php echo $output['show_page']; ?> </div>
             </td>
         </tr>
         </tfoot>
     </table>
+    <a href="#" class="btns success"><span><i class="icon-edit"></i>批量成功</span></a>
+    <a href="#" class="btns fail"><span><i class="icon-edit"></i>批量失败</span></a>
     <!-- 预警提示 -->
     <audio id="auto" src="<?php echo RESOURCE_SITE_URL; ?>/warning.mp3"></audio>
 </div>
@@ -356,8 +363,13 @@
       href="<?php echo RESOURCE_SITE_URL; ?>/js/jquery-ui/themes/ui-lightness/jquery.ui.css"/>
 <script type="text/javascript">
     $(function () {
+        // let store_name = localStorage.getItem('store_id')
+        // $('.store_id').val(store_name)
+        // localStorage.clear();
         $('#ncsubmit').click(function () {
             $('#formSearch').submit();
+        //    let store_id = $('.store_id').val()
+        //    localStorage.setItem('store_id',store_id)
         });
         $('#query_start_time').datepicker({dateFormat: 'yy-mm-dd'});
         $('#query_end_time').datepicker({dateFormat: 'yy-mm-dd'});
@@ -370,7 +382,63 @@
             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;
+                })
+            }
+        })
+        //批量操作
+        $('.success').click(function() {
+            layer.confirm('您确定要批量成功', {
+                btn: ['确定', '取消'],
+                title: '批量成功'
+            }, function () {
+                let arr = [];
+                $("input:checkbox:checked").each(function (i) {
+                    arr[i] = $(this).val();
+                })
+                let str = arr.join(",");
+                let strr = str.substring(0, 1);
+                let number = Number(strr);
+                if (isNaN(number)) {
+                    let strrr = str.substring(1, str.length);
+                    window.location.href = `index.php?act=refill_order_manual&op=refill_order_batch_dispose&type=success&order_id= ${strrr ? strrr : ''}`
+                } else if(!isNaN(number) && str !== '') {
+                    window.location.href = `index.php?act=refill_order_manual&op=refill_order_batch_dispose&type=success&order_id= ${str ? str : ''}`
+                } else {
+                    layer.msg('请还没有任何操作,请先选择');
+                }
+            }, function () { layer.msg('取消成功');});
+        })
+        $('.fail').click(function() {
+            layer.confirm('您确定要批量失败', {
+                btn: ['确定', '取消'],
+                title: '批量失败'
+            }, function () {
+                let arr = [];
+                $("input:checkbox:checked").each(function (i) {
+                    arr[i] = $(this).val();
+                })
+                let str = arr.join(",");
+                let strr = str.substring(0, 1);
+                let number = Number(strr);
+                if (isNaN(number)) {
+                    let strrr = str.substring(1, str.length);
+                    window.location.href = `index.php?act=refill_order_manual&op=refill_order_batch_dispose&type=cancel&order_id= ${strrr ? strrr : ''}`
+                } else if(!isNaN(number) && str !== '') {
+                    window.location.href = `index.php?act=refill_order_manual&op=refill_order_batch_dispose&type=cancel&order_id= ${str ? str : ''}`
+                } else {
+                    layer.msg('请还没有任何操作,请先选择');
+                }
+            }, function () {layer.msg('取消成功');});
+        })
         //双击
         $('.doubleclick').dblclick(function() {
             let order_sn = $(this).attr('data-order')