Forráskód Böngészése

Merge branch 'lzcomp' of 39.97.239.116:gyfl/xyzshop into lzcomp

stanley-king 3 éve
szülő
commit
c8ffa1fd2a

+ 8 - 3
admin/config/config.ini.php

@@ -4,9 +4,14 @@ defined('InShopNC') or exit('Access Invalid!');
 $config['sys_log'] = true;
 
 $config['receive_bank'] = [
-    '椰子招行',
-    '椰子建行',
-    '国研建行'
+    'XYZ_COMPANY' => [
+        '椰子招行',
+        '椰子建行',
+        '国研建行'
+    ],
+    'LZKJ_COMPANY' => [
+        '琳珠收款'
+    ]
 ];
 
 return $config;

+ 5 - 5
admin/control/merchant.php

@@ -486,7 +486,7 @@ class merchantControl extends SystemControl
         $apply_id = intval($_GET['apply_id']);
         if ($apply_id > 0) {
             $model_merchant = Model('merchant');
-            $evidence_info = $model_merchant->getRefillEvidenceInfo(['apply_id' => $apply_id], '*');
+            $evidence_info = $model_merchant->getRefillEvidenceInfo(['apply_id' => $apply_id], '*', true);
             if (empty($evidence_info)) {
                 showMessage('充值申请不存在');
             }
@@ -526,7 +526,7 @@ class merchantControl extends SystemControl
                 Tpl::output('available_predeposit', $evidence_info['available_predeposit']);
             }
             global $config;
-            Tpl::output('receive_bank', $config['receive_bank']);
+            Tpl::output('receive_bank', $config['receive_bank'][COMPANY_NAME]);
             Tpl::showpage('recharge.add');
         }
     }
@@ -621,7 +621,7 @@ class merchantControl extends SystemControl
             }
             Tpl::output('merchant', $merchant);
             global $config;
-            Tpl::output('receive_bank', $config['receive_bank']);
+            Tpl::output('receive_bank', $config['receive_bank'][COMPANY_NAME]);
             $page = "recharge.manual.{$type}";
             Tpl::showpage($page);
         }
@@ -675,7 +675,7 @@ class merchantControl extends SystemControl
         $apply_id = intval($_POST['apply_id']);
         $model_merchant = Model('merchant');
         $receive_bank = $_POST['receive_bank'] ?? 0;
-        $evidence_info = $model_merchant->getRefillEvidenceInfo(['apply_id' => $apply_id], '*');
+        $evidence_info = $model_merchant->getRefillEvidenceInfo(['apply_id' => $apply_id], '*', true);
         if (!is_array($evidence_info) || count($evidence_info) <= 0) {
             showMessage("无效的充值申请信息", "index.php?act=merchant&op=recharge&apply_id={$apply_id}", '', 'error');
         }
@@ -688,7 +688,7 @@ class merchantControl extends SystemControl
         //查询会员信息
         $obj_member = Model('member');
         $member_id = intval($evidence_info['member_id']);
-        $member_info = $obj_member->getMemberInfo(['member_id' => $member_id]);
+        $member_info = $obj_member->getMemberInfo(['member_id' => $member_id], '*', true);
 
         $available_predeposit = floatval($member_info['available_predeposit']);
         $freeze_predeposit = floatval($member_info['freeze_predeposit']);

+ 18 - 2
admin/control/order_search.php

@@ -13,6 +13,19 @@ class order_searchControl extends SystemControl
         $model_refill_order = Model('refill_order');
         $order_list = [];
         $_GET['query_start_time'] = $_GET['query_start_time'] ?? date("Y-m-d 00:00:00");
+
+        if (in_array($_GET['order_state'], ['0', '10', '20', '30', '40']))
+        {
+            $condition['vr_order.order_state'] = $_GET['order_state'];
+        }
+
+        if (!empty($_GET['mchid'])) {
+            $condition['refill_order.mchid'] = $_GET['mchid'];
+        }
+        if (!empty($_GET['store_id'])) {
+            $condition['vr_order.store_id'] = $_GET['store_id'];
+        }
+
         //批量查询,二者都有,以卡号为主
         if(!empty($_GET['card_nos'])) {
             $card_nos = trim($_GET['card_nos'], ',');
@@ -20,9 +33,8 @@ class order_searchControl extends SystemControl
         } elseif (!empty($_GET['mch_orders'])) {
             $mch_orders = rtrim($_GET['mch_orders'], ',');
             $condition['refill_order.mch_order'] = ['in', $mch_orders];
-        } else {
-            $condition = [];
         }
+
         if(!empty($condition)) {
             $condition['refill_order.inner_status'] = 0;
 
@@ -58,6 +70,10 @@ class order_searchControl extends SystemControl
                 $order_list[$order_id]['quality_text'] = $this->quality_format($order_info['quality'],$order_info['card_type']);
             }
         }
+        $merchant_list = $this->merchants();
+        $provider_list = $this->providers();
+        Tpl::output('provider_list', $provider_list);
+        Tpl::output('merchant_list', $merchant_list);
         Tpl::output('order_list', $order_list);
         Tpl::output('show_page', $model_refill_order->showpage());
         Tpl::showpage('refill.order.search');

+ 16 - 4
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') {
                     //重新补充
@@ -182,6 +179,21 @@ class refill_detailControl extends SystemControl
                 util::pop_queue_order($mchid,$mch_order);
             }
         }
-        showMessage('操作成功');
+        showMessage('操作成功','index.php?act=refill_detail&op=index');
+    }
+
+    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('操作成功','index.php?act=refill_detail&op=index');
     }
 }

+ 1 - 1
admin/control/refill_evidence.php

@@ -95,7 +95,7 @@ class refill_evidenceControl extends SystemControl
             exit;
         }
         global $config;
-        $receive_bank_text = $config['receive_bank'];
+        $receive_bank_text = $config['receive_bank'][COMPANY_NAME];
         $merchant_list = $this->merchants();
         Tpl::output('merchant_list', $merchant_list);
         Tpl::output('stats', $stats);

+ 1 - 0
admin/control/refill_refund.php

@@ -49,6 +49,7 @@ class refill_refundControl extends SystemControl
         Tpl::output('provider_list', $providers);
         Tpl::output('merchants', $merchants);
         Tpl::output('info_list', $refund_list);
+        Tpl::output('show_page', $mod->showpage());
         Tpl::showpage('refill.refund');
     }
 

+ 77 - 76
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,85 @@
            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 if(!isNaN(number) && str !== '') {
+                    window.location.href = `index.php?act=refill_detail&op=order_dispose&id= ${str ? str : ''}&type=cancel`
+                } 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 if(!isNaN(number) && str !== '') {
+                    window.location.href = `index.php?act=refill_detail&op=order_dispose&id= ${str ? str : ''}&type=anew`
+                } 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) && str !== '') {
+                    let strrr = str.substring(1, str.length);
+                    console.log(strrr);
+                    window.location.href = `index.php?act=refill_detail&op=DelQueueOrder&id= ${strrr}`
+                } 
+                else if(!isNaN(number) && str !== '') {
+                    console.log(str);
+                    window.location.href = `index.php?act=refill_detail&op=DelQueueOrder&id= ${str}`
+                }
+                 else {
+                    layer.msg('请还没有任何操作,请先选择');
+                }
+            }, function () {
             });
-            })
-      
+        })
 
         // 表格hover时背景
         $('.trFlex').each(function () {
@@ -381,14 +392,4 @@
         oInput.parentNode.removeChild(oInput)
     }
 
-    //批量补充
-    // function hSupplement(e) {
-    //     layer.confirm('您确定要批量补充', {
-    //     btn: ['确定','取消'],
-    //     title:'批量补充'
-    // }, function(){
-    //     layer.msg('1', {icon: 1});
-    // }, function(){
-    // });
-    // }
 </script> 

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

@@ -280,15 +280,6 @@
                     <a href="#" class="btns" onclick="hCopyOrderSn(event)">
                         <span><i class="icon-edit"></i>拷贝订单号</span>
                     </a>
-                    <a href="#" class="btns" id="10_rder">
-                        <span><i class="icon-edit"></i>10分钟订单</span>
-                    </a>
-                    <a href="#" class="btns" id="30_rder">
-                        <span><i class="icon-edit"></i>半小时订单</span>
-                    </a>
-                    <a href="#" class="btns" id="60_rder">
-                        <span><i class="icon-edit"></i>一小时订单</span>
-                    </a>
                 </td>
                 <td></td>
                 <td>
@@ -319,6 +310,23 @@
 <!--                    </a>-->
 <!--                </td>-->
             </tr>
+            <tr>
+                <td></td>
+                <td>
+                    <a href="#" class="btns" id="10_rder">
+                        <span><i class="icon-edit"></i>10分钟订单</span>
+                    </a>
+                    <a href="#" class="btns" id="30_rder">
+                        <span><i class="icon-edit"></i>半小时订单</span>
+                    </a>
+                    <a href="#" class="btns" id="60_rder">
+                        <span><i class="icon-edit"></i>一小时订单</span>
+                    </a>
+                    <a href="#" class="btns" id="0_rder">
+                        <span><i class="icon-edit"></i>当天零点订单</span>
+                    </a>
+                </td>
+            </tr>
             </tbody>
         </table>
     </form>
@@ -828,6 +836,21 @@
             // console.log(formatdate)
             $('#startTime').val(formatdate)
         })
+        // 60分钟订单
+        $('#0_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 = 0;
+            let f = 0;
+            let s = 0;
+            let formatdate = y+'-'+m+'-'+d + " " + h + ":" + f + ":" + s;
+            // console.log(formatdate)
+            $('#startTime').val(formatdate)
+        })
     });
     function hCopyChannel(e) {
         let str = ''

+ 131 - 2
admin/templates/default/refill.order.search.php

@@ -25,8 +25,94 @@
         font-size:12px !important;
     }
     .query_ors {
-        width: 140px;
+        width: 125px;
     }
+ 
+    
+    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
+    }
+    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;
+        min-width: 883%!important;
+        max-height: 280px!important;
+        padding: 14px 0!important;
+    }
+    .layui-form-select {
+        width: 45%;
+    }
+    .layui-select-title {
+        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;
+    }
+    .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 {
+    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;
+}
+.layui-form-select .layui-edge {
+    right: 6px!important;
+}
 </style>
 
 <?php defined('InShopNC') or exit('Access Invalid!'); ?>
@@ -46,13 +132,56 @@
         <table class="tb-type1 noborder search">
             <tr>
                 <th><label for="query_start_time">下单时间</label></th>
-                <td>
+                <td style="width: 327px">
                     <input class="txt date" type="text" value="<?php echo $_GET['query_start_time']; ?>"
                            id="startTime" name="query_start_time" autocomplete="off" style="width:120px" />
                     <label for="query_start_time">~</label>
                     <input class="txt date" type="text" value="<?php echo $_GET['query_end_time']; ?>"
                            id="endTime" name="query_end_time" autocomplete="off" style="width:120px" />
                 </td>
+                <th><label>订单状态</label></th>
+                <td>
+                    <select name="order_state" class="querySelect">
+                        <option value=""><?php echo $lang['nc_please_choose']; ?></option>
+                        <option value="10"
+                                <?php if ($_GET['order_state'] == '10'){ ?>selected<?php } ?>><?php echo $lang['order_state_new']; ?></option>
+                        <option value="20"
+                                <?php if ($_GET['order_state'] == '20'){ ?>selected<?php } ?>><?php echo $lang['order_state_pay']; ?></option>
+                        <option value="30"
+                                <?php if ($_GET['order_state'] == '30'){ ?>selected<?php } ?>><?php echo $lang['order_state_send']; ?></option>
+                        <option value="40"
+                                <?php if ($_GET['order_state'] == '40'){ ?>selected<?php } ?>><?php echo $lang['order_state_success']; ?></option>
+                        <option value="0"
+                                <?php if ($_GET['order_state'] == '0'){ ?>selected<?php } ?>><?php echo $lang['order_state_cancel']; ?></option>
+                    </select>
+                </td>
+                <th><label class="query_ors">供方名称</label></th>
+                <td >
+                    <select name="store_id" class="" >
+                        <option value=""><?php echo $lang['nc_please_choose']; ?></option>
+                        <?php foreach($output['provider_list'] 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>
+
+  
+            </tr>
+            <tr>
+            <th><label class="">客户名称</label></th>
+                <td  class="layui-form td_time" style="width: 110px;">
+                    <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>
+                        <?php }?>
+                    </select>
+                </td>
+
                 <th><label class="query_ors">充值卡号(多行查询)</label></th>
                 <td><textarea name="card_nos" id="card_nos" cols="30" rows="10"><?php echo $_GET['card_nos'];?></textarea></td>
                 <th><label class="query_ors">商家单号(多行查询)</label></th>

+ 1 - 1
admin/templates/default/refill.refund.php

@@ -131,7 +131,7 @@
             <tr class="tfoot">
                 <td></td>
                 <td colspan="14">
-                    <div class="pagination"><?php echo $output['page']; ?></div>
+                    <div class="pagination"><?php echo $output['show_page']; ?></div>
                 </td>
             </tr>
             </tfoot>

+ 1 - 1
test/TestRefill.php

@@ -901,7 +901,7 @@ class TestRefill extends TestCase
 
     public function testXiaoniu()
     {
-        $providers = new refill\xiaoniu\RefillOil([]);
+        $providers = $this->getProvider('xiaoniu','RefillOil');
 //        $resp = $providers->add(1000111100021211884, mtopcard\SinopecCard, 500, ['order_sn' => $this->make_sn()]);
 //        $resp = $providers->query(['order_sn' => '39911625819031601073']);
 //        $data = '{"content":"\u3010\u4e2d\u56fd\u77f3\u5316\u3011\u60a8\u5c3e\u53f7\u4e3a211884\u7684\u52a0\u6cb9\u5361\u4e8e07\u670809\u65e5 16\u65f630\u5206\u5145\u503c\u6210\u529f,\u91d1\u989d500\u5143,\u8ba2\u5355\u53f7:2521070916304172","realAmt":"490.0000","status":"1","timestamp":"20210709163042","sign":"110aaae89243c9ed2d6aa4d753597224","orderNo":"XN20210709162351796707722","mOrderNo":"39911625819031601073"}';