ソースを参照

admin refill_detail del queue

xiaoyu 3 年 前
コミット
5dc57452b8
2 ファイル変更94 行追加69 行削除
  1. 15 3
      admin/control/refill_detail.php
  2. 79 66
      admin/templates/default/refill.detail.php

+ 15 - 3
admin/control/refill_detail.php

@@ -166,9 +166,6 @@ class refill_detailControl extends SystemControl
                     } elseif ($detail['order_state'] == ORDER_STATE_QUEUE) {
                         util::push_add_zero($params);
                     }
-
-                    util::pop_queue_order($mchid, $mch_order);
-
                 }
                 elseif ($type == 'anew') {
                     //重新补充
@@ -184,4 +181,19 @@ class refill_detailControl extends SystemControl
         }
         showMessage('操作成功');
     }
+
+    public function DelQueueOrderOp()
+    {
+        $id = $_GET['id'];
+        $condition['detail_id'] = ['in',$id];
+        $refill_detail = Model('refill_detail')->where($condition)->select();
+
+        foreach ($refill_detail as $detail)
+        {
+            $mchid = $detail['mchid'];
+            $mch_order = $detail['mch_order'];
+            util::del_queue_order($mchid,$mch_order);
+        }
+        showMessage('操作成功');
+    }
 }

+ 79 - 66
admin/templates/default/refill.detail.php

@@ -146,6 +146,9 @@
                     <a href="#" class="btns" id="hSupplement">
                         <span><i class="icon-edit"></i>批量补充</span>
                     </a>
+                    <a href="#" class="btns" id="hdelqueue">
+                        <span><i class="icon-edit"></i>清楚queue</span>
+                    </a>
                 </td>
             </tr>
         </table>
@@ -266,77 +269,87 @@
            var result = test_mch.replace(/[\  \r\n\,]+/g, ",");
                 $(this).val(result)
             })
-            
-            //批量
-            $('#hFail').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_detail&op=order_dispose&id= ${strrr ? strrr : ''}&type=cancel`
-        
-
-            } else {
-            window.location.href =`index.php?act=refill_detail&op=order_dispose&id= ${str ? str : ''}&type=cancel`
-
-            }
-            if (str != '') {
-            } else {
-                layer.msg('请还没有任何操作,请先选择');
-            }
 
-		
-
-            }, function(){
+        //批量
+        $('#hFail').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_detail&op=order_dispose&id= ${strrr ? strrr : ''}&type=cancel`
+                } else {
+                    window.location.href = `index.php?act=refill_detail&op=order_dispose&id= ${str ? str : ''}&type=cancel`
+                }
+                if (str != '') {
+                } else {
+                    layer.msg('请还没有任何操作,请先选择');
+                }
+            }, function () {
             });
-            })
-
-                        //批量
-                $('#hSupplement').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_detail&op=order_dispose&id= ${strrr ? strrr : ''}&type=anew`
-        
-
-            } else {
-            window.location.href =`index.php?act=refill_detail&op=order_dispose&id= ${str ? str : ''}&type=anew`
-
-            }
-            if (str != '') {
-            } else {
-                layer.msg('请还没有任何操作,请先选择');
-            }
+        })
 
-		
+        //批量
+        $('#hSupplement').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_detail&op=order_dispose&id= ${strrr ? strrr : ''}&type=anew`
+                } else {
+                    window.location.href = `index.php?act=refill_detail&op=order_dispose&id= ${str ? str : ''}&type=anew`
+                }
+                if (str != '') {
+                } else {
+                    layer.msg('请还没有任何操作,请先选择');
+                }
+            }, function () {
+            });
+        })
 
-            }, function(){
+        //批量
+        $('#hdelqueue').click(function () {
+            layer.confirm('您确定要清除queue', {
+                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_detail&op=DelQueueOrder&id= ${strrr ? strrr : ''}`
+                } else {
+                    window.location.href = `index.php?act=refill_detail&op=DelQueueOrder&id= ${str ? str : ''}`
+                }
+                if (str != '') {
+                } else {
+                    layer.msg('请还没有任何操作,请先选择');
+                }
+            }, function () {
             });
-            })
-      
+        })
 
         // 表格hover时背景
         $('.trFlex').each(function () {