xiaoyu 3 лет назад
Родитель
Сommit
072ed67db0

+ 8 - 0
shop/templates/default/seller/store_refill_order.batch_dispose.php

@@ -11,6 +11,14 @@
     position: relative;
     z-index: 1;
 }
+.tabmenu {
+    background-color: #FFF;
+    width: 100%;
+    height: 38px;
+    display: flex;
+    position: relative;
+    z-index: 99;
+}
 </style>
 <?php defined('InShopNC') or exit('Access Invalid!'); ?>
 

+ 37 - 3
shop/templates/default/seller/store_refill_order.index.php

@@ -5,7 +5,7 @@
         padding:0 10px;
     }
     .tabmenu {
-        margin-top: 20px;
+        /* margin-top: 20px; */
         display: flex;
         justify-content: space-between;
     }
@@ -54,6 +54,9 @@ a:nth-child(3) {
     position: relative;
     z-index: 1;
 }
+.topmar {
+    margin-top: 10px;
+}
 </style>
 <?php defined('InShopNC') or exit('Access Invalid!'); ?>
 
@@ -69,7 +72,7 @@ a:nth-child(3) {
     
 </div>
 <div class="tabmenu">
-    <div>
+    <div class="topmar">
     <select name="" id="tabmenuright" class="tabmenuright">
         <option value="0">卡类型</option>
         <option value="<?php echo mtopcard\PetroChinaCard;?>" <?php if($_GET['card_type'] == mtopcard\PetroChinaCard){ echo 'selected';}?>>中石油</option>
@@ -102,6 +105,7 @@ a:nth-child(3) {
         <th class="w150">充值卡号</th>
         <th class="w80">充值面额</th>
         <th class="w150">下单时间</th>
+        <th class="w130">倒计时</th>
         <th class="w150">接单时间</th>
         <th class="w150">流水号填写</th>
 <!--        <th class="w150">凭证上传</th>-->
@@ -117,6 +121,9 @@ a:nth-child(3) {
                 <td class="bdl"><?php echo $order['card_no']; ?></td>
                 <td class="bdl"><?php echo $order['refill_amount']; ?></td>
                 <td class="bdl"><?php echo date('Y-m-d H:i:s', $order['add_time']);?></td>
+                <td class="bdl">
+                    <span class="box" data-time="<?php echo $order['add_time'];?>"></span>
+                </td>
                 <td class="bdl"><?php echo date('Y-m-d H:i:s', $order['fetch_time']);?></td>
                 <td class="bdl"><input class="trade_no" type="text" name="ch_trade_no" style="width: 180px" id="ch_trade_no" /></td>
                 <!-- <td class="bdl">
@@ -178,7 +185,35 @@ a:nth-child(3) {
                 } 
                 })
         })
+        //倒计时
+        let num1 = []
+        $('.box').each(function (index,item) {
+            var datetime = $(this).attr('data-time')
+            // console.log("时间1",datetime);
+            let timestamp = Date.parse(new Date()) / 1000;
+            // console.log('时间2', timestamp);
+            let num = 900 - (timestamp - datetime)
+       
+             
+             console.log(num1.push(num));
+            
+            let timer = setInterval(function () {
+                num--;
+                    $(item).text(num + 's');
+
+           
+                if (num < 180 && num > 0) {
+                    $(item).css('color', 'red')
+                    console.log(180);
+                } else if (num < 0 ) {
+                    $(item).text(0);
+                    $(item).css('color', 'red')
+
+                    console.log(111);
 
+                }
+            }, 1000) 
+        })
 
         //抢单
         $('#queryrob').click(() => {
@@ -270,5 +305,4 @@ a:nth-child(3) {
     //     })
 
     //     }
-    var inputs=	document.getElementsByName("name1");
 </script>