Browse Source

zhongst lt 30-500 997 and merchant.ctl update

xiaoyu 3 years ago
parent
commit
2d554a41fc

+ 83 - 61
admin/templates/default/merchant.ctl.php

@@ -69,9 +69,9 @@
                         <?php if (!in_array($value, ['空号', '实号', '风险号']) && !in_array($key, [0, 1, 5])) { ?>
                             <label>
                             <input type="checkbox" name="card_states[]" value="<?php echo $key; ?>"
-                            <?php if (!empty($output['intercept']['card_states']) && in_array($key, $output['intercept']['card_states'])) {
-                                echo 'checked';
-                            } ?>
+                                <?php if (!empty($output['intercept']['card_states']) && in_array($key, $output['intercept']['card_states'])) {
+                                    echo 'checked';
+                                } ?>
                             >
                             </label><?php echo $value; ?>
                         <?php } ?>
@@ -172,15 +172,15 @@
                                for="name"><?php echo $value; ?>:</label>
                         <label>
                             <input  class="day_secs" type="text" name="<?php echo "$key-day_secs"; ?>"
-                                   value="<?php echo $output['retry_times']['qualities'][$key]['day_secs'] ?? 0; ?>">
+                                    value="<?php echo $output['retry_times']['qualities'][$key]['day_secs'] ?? 0; ?>">
                         </label>
                         <label>
                             <input  class="night_secs" style="margin: 0 30px;" type="text" name="<?php echo "$key-night_secs"; ?>"
-                                   value="<?php echo $output['retry_times']['qualities'][$key]['night_secs'] ?? 0; ?>">
+                                    value="<?php echo $output['retry_times']['qualities'][$key]['night_secs'] ?? 0; ?>">
                         </label>
                         <label>
                             <input  class="times" type="text" name="<?php echo "$key-times"; ?>"
-                                   value="<?php echo $output['retry_times']['qualities'][$key]['times'] ?? 0; ?>">
+                                    value="<?php echo $output['retry_times']['qualities'][$key]['times'] ?? 0; ?>">
                         </label>
                     </td>
                 </tr>
@@ -352,91 +352,113 @@
 <script type="text/javascript">
     $(function () {
         //按钮先执行验证再提交表单
-            let day
-            let nights
-            let times
-            $("#submitBtn").click(function () {
-                if (day == 0 || nights == 0 || times == 0) {
-                    layer.msg('白天秒数,黑天秒数,重试次数(三者都需设置)');
-                } else {
-                    $("#user_form").submit();
-                }
-            })
+        let day
+        let nights
+        let times
+        $("#submitBtn").click(function () {
+            if (day == 0 || nights == 0 || times == 0) {
+                layer.msg('白天秒数,黑天秒数,重试次数(三者都需设置)');
+            } else {
+                $("#user_form").submit();
+            }
+        })
         $('.required .day_secs').each(function(index, item) {
             $(item).change(function() {
                 const day_secs = $(this).val()
                 const zero = day_secs.replace(/^[0]+/,'')
-                $(item).val(zero);
+                const zero_day = day_secs.substr(0, 1)
+                const zero_length = day_secs.substr(day_secs.length -1)
+                if (zero_day == 0) {
+                    $(this).val(zero_day);
+                }
+                if (zero_length != 0){
+                    console.log(zero, 123);
+                    $(item).val(zero);
+                }
                 if ((!/^\d+$/.test(day_secs)) || isNaN(day_secs)) {
-                layer.msg('白天秒数只能设置大于0的整数');
-                $(item).val("0");
-               }
+                    layer.msg('白天秒数只能设置大于0的整数');
+                    $(item).val("0");
+                }
             })
         })
         $('.required .night_secs').each(function(index, item) {
             $(item).change(function() {
                 const night_secs = $(this).val()
                 const zero = night_secs.replace(/^[0]+/,'')
-                $(item).val(zero);
+                const zero_day = night_secs.substr(0, 1)
+                const zero_length = night_secs.substr(night_secs.length -1)
+                if (zero_day == 0) {
+                    $(this).val(zero_day);
+                }
+                if (zero_length != 0){
+                    $(item).val(zero);
+                }
                 if ((!/^\d+$/.test(night_secs)) || isNaN(night_secs)) {
-                layer.msg('黑天秒数只能设置大于0的整数');
-                $(item).val("0");
-               }
+                    layer.msg('黑天秒数只能设置大于0的整数');
+                    $(item).val("0");
+                }
             })
         })
         $('.required .times').each(function(index, item) {
             $(item).change(function() {
                 const times = $(this).val()
                 const zero = times.replace(/^[0]+/,'')
-                $(item).val(zero);
+                const zero_day = times.substr(0, 1)
+                const zero_length = times.substr(times.length -1)
+                if (zero_day == 0) {
+                    $(this).val(zero_day);
+                }
+                if (zero_length != 0){
+                    $(item).val(zero);
+                }
                 if ((!/^\d+$/.test(times)) || isNaN(times)) {
-                layer.msg('重试次数只能设置大于0的整数');
-                $(item).val("0");
-               }
+                    layer.msg('重试次数只能设置大于0的整数');
+                    $(item).val("0");
+                }
             })
         })
         $('#success').change(function(index, item) {
-                const success = $(this).val()
-                const intercept = success.substring(success.length, success.length-1)
-                if(intercept == '.') {
-                    layer.msg('成功率只能设置浮点数');
-                    $(this).val("0.00");
-                    return
-                }
-                const zero = success.replace(/^0+\./g, '0.')
-                $(this).val(zero);
-                if ((/^(([0-9]+\\.[0-9]*[1-9][0-9]*)|([0-9]*[1-9][0-9]*\\.[0-9]+)|([0-9]*[1-9][0-9]*))$/.test(success)) || isNaN(success)){
-                    layer.msg('成功率只能设置浮点数');
-                    $(this).val("0.00");
-	            }
+            const success = $(this).val()
+            const intercept = success.substring(success.length, success.length-1)
+            if(intercept == '.') {
+                layer.msg('成功率只能设置浮点数');
+                $(this).val("0.00");
+                return
+            }
+            const zero = success.replace(/^0+\./g, '0.')
+            $(this).val(zero);
+            if ((/^(([0-9]+\\.[0-9]*[1-9][0-9]*)|([0-9]*[1-9][0-9]*\\.[0-9]+)|([0-9]*[1-9][0-9]*))$/.test(success)) || isNaN(success)){
+                layer.msg('成功率只能设置浮点数');
+                $(this).val("0.00");
+            }
         })
         $('#profit_ratio').change(function(index, item) {
-                const profit_ratio = $(this).val()
-                const intercept = profit_ratio.substring(profit_ratio.length, profit_ratio.length-1)
-                if(intercept == '.') {
-                    layer.msg('利润率只能设置浮点数');
-                    $(this).val("0.00");
-                    return
-                }
-                const zero = profit_ratio.replace(/^0+\./g,'0.')
-                $(this).val(zero);
-                if ((/^(([0-9]+\\.[0-9]*[1-9][0-9]*)|([0-9]*[1-9][0-9]*\\.[0-9]+)|([0-9]*[1-9][0-9]*))$/.test(profit_ratio)) || isNaN(profit_ratio)){
-                    layer.msg('利润率只能设置浮点数');
-                    $(this).val("0.00");
-	            }
+            const profit_ratio = $(this).val()
+            const intercept = profit_ratio.substring(profit_ratio.length, profit_ratio.length-1)
+            if(intercept == '.') {
+                layer.msg('利润率只能设置浮点数');
+                $(this).val("0.00");
+                return
+            }
+            const zero = profit_ratio.replace(/^0+\./g,'0.')
+            $(this).val(zero);
+            if ((/^(([0-9]+\\.[0-9]*[1-9][0-9]*)|([0-9]*[1-9][0-9]*\\.[0-9]+)|([0-9]*[1-9][0-9]*))$/.test(profit_ratio)) || isNaN(profit_ratio)){
+                layer.msg('利润率只能设置浮点数');
+                $(this).val("0.00");
+            }
         })
         $('.judge').each(function(index, item) {
             let day_secs = $(item).find('.day_secs').val()
             let night_secs = $(item).find('.night_secs').val()
             let times_secs = $(item).find('.times').val()
             $(item).change(function() {
-            let day_secs = $(item).find('.day_secs').val()
-            let night_secs = $(item).find('.night_secs').val()
-            let times_secs = $(item).find('.times').val()
-            day = day_secs
-            nights = night_secs
-            times = times_secs
-            if (day_secs == 0 || night_secs == 0 || times_secs == 0) {
+                let day_secs = $(item).find('.day_secs').val()
+                let night_secs = $(item).find('.night_secs').val()
+                let times_secs = $(item).find('.times').val()
+                day = day_secs
+                nights = night_secs
+                times = times_secs
+                if (day_secs == 0 || night_secs == 0 || times_secs == 0) {
                     layer.msg('白天秒数,黑天秒数,重试次数(三者都需设置 只能设置大于0的整数)');
                 }
             })

+ 6 - 6
data/config/win/refill.ini.php

@@ -630,34 +630,34 @@ $zhongst_phone = ['name' => 'zhongst', 'store_id' => 39, 'qualitys' => '2',
 
         30 => [
             ['goods_id' => 6466, 'price' => 30.12, 'quality' => 2, 'card_type' => 'chinamobile'],
-            ['goods_id' => 6466, 'price' => 30.06, 'quality' => 2, 'card_type' => 'chinaunicom'],
+            ['goods_id' => 6466, 'price' => 29.91, 'quality' => 2, 'card_type' => 'chinaunicom'],
             ['goods_id' => 6466, 'price' => 30.09, 'quality' => 2, 'card_type' => 'chinatelecom']
         ],
 
         50 => [
             ['goods_id' => 6467, 'price' => 50.15, 'quality' => 2, 'card_type' => 'chinamobile'],
-            ['goods_id' => 6467, 'price' => 50.1, 'quality' => 2, 'card_type' => 'chinaunicom'],
+            ['goods_id' => 6467, 'price' => 49.85, 'quality' => 2, 'card_type' => 'chinaunicom'],
             ['goods_id' => 6467, 'price' => 49.9, 'quality' => 2, 'card_type' => 'chinatelecom']
         ],
 
         100 => [
             ['goods_id' => 6468, 'price' => 100.3, 'quality' => 2, 'card_type' => 'chinamobile'],
-            ['goods_id' => 6468, 'price' => 100.2, 'quality' => 2, 'card_type' => 'chinaunicom'],
+            ['goods_id' => 6468, 'price' => 99.7, 'quality' => 2, 'card_type' => 'chinaunicom'],
             ['goods_id' => 6468, 'price' => 99.8, 'quality' => 2, 'card_type' => 'chinatelecom']
         ],
         200 => [
             ['goods_id' => 6469, 'price' => 200.6, 'quality' => 2, 'card_type' => 'chinamobile'],
-            ['goods_id' => 6469, 'price' => 200.4, 'quality' => 2, 'card_type' => 'chinaunicom'],
+            ['goods_id' => 6469, 'price' => 199.4, 'quality' => 2, 'card_type' => 'chinaunicom'],
             ['goods_id' => 6469, 'price' => 199.6, 'quality' => 2, 'card_type' => 'chinatelecom']
         ],
         300 => [
             ['goods_id' => 6470, 'price' => 300.9, 'quality' => 2, 'card_type' => 'chinamobile'],
-            ['goods_id' => 6470, 'price' => 300.6, 'quality' => 2, 'card_type' => 'chinaunicom'],
+            ['goods_id' => 6470, 'price' => 299.1, 'quality' => 2, 'card_type' => 'chinaunicom'],
             ['goods_id' => 6470, 'price' => 299.4, 'quality' => 2, 'card_type' => 'chinatelecom']
         ],
         500 => [
             ['goods_id' => 6471, 'price' => 501, 'quality' => 2, 'card_type' => 'chinamobile'],
-            ['goods_id' => 6471, 'price' => 501, 'quality' => 2, 'card_type' => 'chinaunicom'],
+            ['goods_id' => 6471, 'price' => 498.5, 'quality' => 2, 'card_type' => 'chinaunicom'],
             ['goods_id' => 6471, 'price' => 499, 'quality' => 2, 'card_type' => 'chinatelecom']
         ]
     ],

+ 6 - 6
data/config/xyz/refill.ini.php

@@ -630,34 +630,34 @@ $zhongst_phone = ['name' => 'zhongst', 'store_id' => 39, 'qualitys' => '2',
 
         30 => [
             ['goods_id' => 6466, 'price' => 30.12, 'quality' => 2, 'card_type' => 'chinamobile'],
-            ['goods_id' => 6466, 'price' => 30.06, 'quality' => 2, 'card_type' => 'chinaunicom'],
+            ['goods_id' => 6466, 'price' => 29.91, 'quality' => 2, 'card_type' => 'chinaunicom'],
             ['goods_id' => 6466, 'price' => 30.09, 'quality' => 2, 'card_type' => 'chinatelecom']
         ],
 
         50 => [
             ['goods_id' => 6467, 'price' => 50.15, 'quality' => 2, 'card_type' => 'chinamobile'],
-            ['goods_id' => 6467, 'price' => 50.1, 'quality' => 2, 'card_type' => 'chinaunicom'],
+            ['goods_id' => 6467, 'price' => 49.85, 'quality' => 2, 'card_type' => 'chinaunicom'],
             ['goods_id' => 6467, 'price' => 49.9, 'quality' => 2, 'card_type' => 'chinatelecom']
         ],
 
         100 => [
             ['goods_id' => 6468, 'price' => 100.3, 'quality' => 2, 'card_type' => 'chinamobile'],
-            ['goods_id' => 6468, 'price' => 100.2, 'quality' => 2, 'card_type' => 'chinaunicom'],
+            ['goods_id' => 6468, 'price' => 99.7, 'quality' => 2, 'card_type' => 'chinaunicom'],
             ['goods_id' => 6468, 'price' => 99.8, 'quality' => 2, 'card_type' => 'chinatelecom']
         ],
         200 => [
             ['goods_id' => 6469, 'price' => 200.6, 'quality' => 2, 'card_type' => 'chinamobile'],
-            ['goods_id' => 6469, 'price' => 200.4, 'quality' => 2, 'card_type' => 'chinaunicom'],
+            ['goods_id' => 6469, 'price' => 199.4, 'quality' => 2, 'card_type' => 'chinaunicom'],
             ['goods_id' => 6469, 'price' => 199.6, 'quality' => 2, 'card_type' => 'chinatelecom']
         ],
         300 => [
             ['goods_id' => 6470, 'price' => 300.9, 'quality' => 2, 'card_type' => 'chinamobile'],
-            ['goods_id' => 6470, 'price' => 300.6, 'quality' => 2, 'card_type' => 'chinaunicom'],
+            ['goods_id' => 6470, 'price' => 299.1, 'quality' => 2, 'card_type' => 'chinaunicom'],
             ['goods_id' => 6470, 'price' => 299.4, 'quality' => 2, 'card_type' => 'chinatelecom']
         ],
         500 => [
             ['goods_id' => 6471, 'price' => 501, 'quality' => 2, 'card_type' => 'chinamobile'],
-            ['goods_id' => 6471, 'price' => 501, 'quality' => 2, 'card_type' => 'chinaunicom'],
+            ['goods_id' => 6471, 'price' => 498.5, 'quality' => 2, 'card_type' => 'chinaunicom'],
             ['goods_id' => 6471, 'price' => 499, 'quality' => 2, 'card_type' => 'chinatelecom']
         ]
     ],

+ 6 - 6
data/config/xyzadm/refill.ini.php

@@ -630,34 +630,34 @@ $zhongst_phone = ['name' => 'zhongst', 'store_id' => 39, 'qualitys' => '2',
 
         30 => [
             ['goods_id' => 6466, 'price' => 30.12, 'quality' => 2, 'card_type' => 'chinamobile'],
-            ['goods_id' => 6466, 'price' => 30.06, 'quality' => 2, 'card_type' => 'chinaunicom'],
+            ['goods_id' => 6466, 'price' => 29.91, 'quality' => 2, 'card_type' => 'chinaunicom'],
             ['goods_id' => 6466, 'price' => 30.09, 'quality' => 2, 'card_type' => 'chinatelecom']
         ],
 
         50 => [
             ['goods_id' => 6467, 'price' => 50.15, 'quality' => 2, 'card_type' => 'chinamobile'],
-            ['goods_id' => 6467, 'price' => 50.1, 'quality' => 2, 'card_type' => 'chinaunicom'],
+            ['goods_id' => 6467, 'price' => 49.85, 'quality' => 2, 'card_type' => 'chinaunicom'],
             ['goods_id' => 6467, 'price' => 49.9, 'quality' => 2, 'card_type' => 'chinatelecom']
         ],
 
         100 => [
             ['goods_id' => 6468, 'price' => 100.3, 'quality' => 2, 'card_type' => 'chinamobile'],
-            ['goods_id' => 6468, 'price' => 100.2, 'quality' => 2, 'card_type' => 'chinaunicom'],
+            ['goods_id' => 6468, 'price' => 99.7, 'quality' => 2, 'card_type' => 'chinaunicom'],
             ['goods_id' => 6468, 'price' => 99.8, 'quality' => 2, 'card_type' => 'chinatelecom']
         ],
         200 => [
             ['goods_id' => 6469, 'price' => 200.6, 'quality' => 2, 'card_type' => 'chinamobile'],
-            ['goods_id' => 6469, 'price' => 200.4, 'quality' => 2, 'card_type' => 'chinaunicom'],
+            ['goods_id' => 6469, 'price' => 199.4, 'quality' => 2, 'card_type' => 'chinaunicom'],
             ['goods_id' => 6469, 'price' => 199.6, 'quality' => 2, 'card_type' => 'chinatelecom']
         ],
         300 => [
             ['goods_id' => 6470, 'price' => 300.9, 'quality' => 2, 'card_type' => 'chinamobile'],
-            ['goods_id' => 6470, 'price' => 300.6, 'quality' => 2, 'card_type' => 'chinaunicom'],
+            ['goods_id' => 6470, 'price' => 299.1, 'quality' => 2, 'card_type' => 'chinaunicom'],
             ['goods_id' => 6470, 'price' => 299.4, 'quality' => 2, 'card_type' => 'chinatelecom']
         ],
         500 => [
             ['goods_id' => 6471, 'price' => 501, 'quality' => 2, 'card_type' => 'chinamobile'],
-            ['goods_id' => 6471, 'price' => 501, 'quality' => 2, 'card_type' => 'chinaunicom'],
+            ['goods_id' => 6471, 'price' => 498.5, 'quality' => 2, 'card_type' => 'chinaunicom'],
             ['goods_id' => 6471, 'price' => 499, 'quality' => 2, 'card_type' => 'chinatelecom']
         ]
     ],