Преглед изворни кода

refill buyback page update

xiaoyu пре 3 година
родитељ
комит
02b3fdff25
2 измењених фајлова са 225 додато и 35 уклоњено
  1. 16 0
      admin/control/refill_order_manual.php
  2. 209 35
      admin/templates/default/refill.buyback.order.php

+ 16 - 0
admin/control/refill_order_manual.php

@@ -394,6 +394,13 @@ class refill_order_manualControl extends SystemControl
     public function refill_buybackOp()
     {
         $model_refill_order = Model('refill_order');
+        $_GET['query_start_time'] = $_GET['query_start_time'] ?? date("Y-m-d 00:00:00");
+        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'], ',');
             $condition['refill_order.card_no'] = ['in', $card_nos];
@@ -406,6 +413,12 @@ class refill_order_manualControl extends SystemControl
         {
             $condition['manual_type'] = $_GET['manual_type'];
         }
+        $start = intval(strtotime($_GET['query_start_time']));
+        $end = intval(strtotime($_GET['query_end_time']));
+        if ($end <= 0) {
+            $end = time();
+        }
+        $condition['refill_buyback.act_time'] = [['egt', $start], ['lt', $end], 'and'];
         $condition['inner_status'] = 0;
         if(!empty($_GET['export']))
         {
@@ -416,6 +429,9 @@ class refill_order_manualControl extends SystemControl
         $order_list = $model_refill_order->getBuyBackList($condition, 200, 'refill_buyback.*,refill_order.*,vr_order.order_state', 'refill_buyback.act_time desc','',true);
         $order_list = $this->OrderDataFormat($order_list, $merchant_list);
 
+        $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.buyback.order');

+ 209 - 35
admin/templates/default/refill.buyback.order.php

@@ -1,28 +1,146 @@
 <style>
-    th label { display: inline-block;width: 60px; }
+    th label {
+        display: inline-block;
+        width: 60px;
+        margin-left: 10px;
+    }
+
+    .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;
+    }
+
+    .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;
+    }
+
+    .query_ors {
+        width: 125px;
+    }
+
+    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;
+    }
+
+    .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;
+        left: -599px !important;
+    }
+
+    .layui-form-select {
+        width: 45%;
+    }
+
+    .layui-select-title {
+        width: 104%;
+    }
+
+    .layui-form-select .layui-input {
+
+        padding-left: 11px;
     }
-    th {
-        width: 10px;
+
+    .page .fixed-bar .item-title h3 {
+        margin-top: 18px !important;
+        margin-bottom: 10px !important;
+        font-weight: 700 !important;
     }
-    .txt2 {
-        position: relative;
+
+    .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;
+        width: 195px;
+    }
+
+    .layui-form-select .layui-edge {
+        right: -91px !important;
     }
 </style>
 
@@ -44,19 +162,49 @@
         <input type="hidden" name="act" value="refill_order_manual"/>
         <input type="hidden" name="op" value="refill_buyback"/>
         <input type="hidden" name="export" value=""/>
-        <table class="tb-type1 noborder search" style="min-width:1400px">
-            <tbody>
+        <table class="tb-type1 noborder search">
             <tr>
-                <th><label style="width:122px">订单号(多行查询)</label></th>
-                <td style="width: 227px;">
-                    <textarea name="order_sns" id="order_sns" cols="30" rows="10"><?php echo $_GET['order_sns']; ?></textarea>
+                <th><label for="query_start_time">操作日期</label></th>
+                <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 style="width:122px">充值卡号(多行查询)</label></th>
-                <td style="width: 227px;">
-                    <textarea name="card_nos" id="card_nos" cols="30" rows="10"><?php echo $_GET['card_nos']; ?></textarea>
+                <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>
+                <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>
+
+            </tr>
+            <tr>
+                <th><label class="query_ors">订单号(多行查询)</label></th>
+                <td><textarea style="width: 324px;" name="order_sns" id="order_sns" cols="30"
+                              rows="10"><?php echo $_GET['order_sns']; ?></textarea></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>操作类型</label></th>
-                <td style="width:122px">
+                <td>
                     <select name="manual_type">
                         <option value=""><?php echo $lang['nc_please_choose']; ?></option>
                         <option value="buyback"
@@ -68,7 +216,9 @@
                     </select>
                 </td>
                 <td>
-                    <a href="javascript:void(0);" id="ncsubmit" class="btn-search" title="<?php echo $lang['nc_query']; ?>">&nbsp;</a>
+                    <a href="javascript:void(0);" id="ncsubmit" class="btn-search "
+                       title="<?php echo $lang['nc_query']; ?>">&nbsp;
+                    </a>
                 </td>
                 <td>
                     <a href="javascript:void(0);" id="ncexport" class="btn">
@@ -76,11 +226,10 @@
                     </a>
                 </td>
             </tr>
-
-            </tbody>
         </table>
     </form>
-    <table class="table tb-type2 nobdb" style="min-width:1400px">
+
+    <table class="table tb-type2 nobdb">
         <thead>
         <tr class="thead">
             <th class="align-center">编号</th>
@@ -101,7 +250,7 @@
             <th class="align-left">操作人</th>
             <th class="align-center">备注</th>
             <!--            <th class="align-center">扣款金额</th>-->
-<!--            <th class="align-center">--><?php //echo $lang['nc_handle']; ?><!--</th>-->
+            <!--            <th class="align-center">--><?php //echo $lang['nc_handle']; ?><!--</th>-->
         </tr>
         </thead>
         <tbody id="tbody">
@@ -150,8 +299,8 @@
         charset="utf-8"></script>
 <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 ADMIN_TEMPLATES_URL;?>/js/xm-select.js"></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"/>
 <script type="text/javascript">
     $(function () {
         $('#ncsubmit').click(function () {
@@ -163,13 +312,16 @@
             $('#formSearch').submit();
             $('input[name="export"]').val('');
         })
-        // 表格hover时背景
-        $('.trFlex').each(function () {
-            $(this).hover(function () {
-                $(this)[0].style.backgroundColor = '#cbe9f3'
-            },function() {
-                $(this)[0].style.backgroundColor = '#fff'
-            })
+        $('#query_start_time').datepicker({dateFormat: 'yy-mm-dd'});
+        $('#query_end_time').datepicker({dateFormat: 'yy-mm-dd'});
+        // 日期选择器
+        laydate.render({
+            elem: '#startTime',
+            type: 'datetime'
+        });
+        laydate.render({
+            elem: '#endTime',
+            type: 'datetime'
         });
         //过滤
         $("#card_nos").blur(function () {
@@ -177,10 +329,32 @@
             let 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 () {
             let test_mch = $("#order_sns").val();
             let result = test_mch.replace(/[\  \r\n\,]+/g, ",");
             $(this).val(result)
         })
-    })
+        // 表格hover时背景
+        $('.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')
+            }
+        })
+    });
 </script>