123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359 |
- <?php defined('InShopNC') or exit('Access Invalid!'); ?>
- <!--<link rel="stylesheet" type="text/css" href="--><?php //echo RESOURCE_SITE_URL;?><!--/js/jquery-ui/themes/ui-lightness/jquery.ui.css" />-->
- <!--<link href="--><?php //echo SHOP_SITE_URL;?><!--/templates/default/css/seller_center.css" rel="stylesheet" type="text/css"/>-->
- <style>
- .spec_table .batch {
- vertical-align: middle;
- display: inline-block;
- *display: inline /*IE7*/;
- margin-left: 4px;
- /* position: relative; */
- z-index: 1;
- *zoom: 1 /*IE7*/;
- }
- .spec_table .batch i {
- cursor: pointer;
- }
- .spec_table .batch-td {
- position: relative;
- }
- .spec_table .batch-input {
- background-color: #FFF;
- white-space: nowrap;
- padding: 4px 9px;
- border: solid 1px #BCE8F1;
- position: absolute;
- z-index: 9999;
- top: -50px;
- left: 30px;
- box-shadow: 3px 3px 0 rgba(153, 153, 153, 0.25);
- display:none;
- }
- .spec_table .batch-input h6 {
- font-size: 12px;
- color: #555;
- }
- .spec_table .batch-input .text {
- vertical-align: middle;
- clear: both;
- padding: 0 4px;
- vertical-align: middle;
- margin-right: 4px;
- }
- .spec_table .batch-input .arrow {
- background: url(<?php echo SHOP_SITE_URL;?>/templates/default/images/seller/ncsc_bg_img.png) no-repeat -240px -20px;
- display: block;
- width: 10px;
- height: 5px;
- margin-left: -5px;
- bottom: -5px;
- left: 50%;
- position: absolute;
- z-index: 2;
- }
- .spec_table .batch-input a.close {
- font-size: 11px;
- line-height: 12px;
- color: #BCE8F1;
- text-decoration: none;
- background-color: #FFF;
- text-align: center;
- display: block;
- width: 12px;
- height: 12px;
- border-radius: 7px;
- border: solid 1px #BCE8F1;
- top: -7px;
- right: -7px;
- position: absolute;
- z-index: 2;
- }
- .spec_table .text.price {
- width: 40px;
- }
- .tableFixed {
- position: fixed;
- top: 54px;
- background-color: #fff;
- z-index:998;
- left:0px;
- display:block;
- padding-left:20px;
- }
- .styleOne {
- width: 35px;
- display:inline-block
- }
- .styleTow {
- width: 30px;
- display:inline-block
- }
- .tb-type2 th.td {
- padding-right: 0;
- border-bottom: 1px dotted #CBE9F3;
- }
- .fixed-bar {
- margin-left:0px;
- padding-left:20px;
- }
- /* .trFlex {
- display: block;
- padding-left:120px;
- }
- .tbFlex {
- position: fixed;
- left: 20px;
- top: auto;
- background-color: #fff;
- z-index: 1;
- height: 25px;
- line-height: 25px;
- } */
- </style>
- <div class="page">
- <div class="fixed-bar">
- <div class="item-title">
- <h3>通道管理</h3>
- <ul class="tab-base">
- <li><a href="index.php?act=merchant&op=provider"><span><?php echo $lang['nc_manage'] ?></span></a></li>
- <li><a href="index.php?act=merchant&op=provider_amount_control&type=2&form=common" class="classA" data-type="2-common"><span>普通话费单量控制</span></a></li>
- <li><a href="index.php?act=merchant&op=provider_amount_control&type=2&form=fast" class="classA" data-type="2-fast"><span>快充话费单量控制</span></a></li>
- <li><a href="index.php?act=merchant&op=provider_amount_control&type=2&form=card" class="classA" data-type="2-card"><span>卡密话费单量控制</span></a></li>
- <li><a href="index.php?act=merchant&op=provider_amount_control&type=2&form=third" class="classA" data-type="2-third"><span>三方话费单量控制</span></a></li>
- <li><a href="index.php?act=merchant&op=provider_amount_control&type=2&form=slow" class="classA" data-type="2-slow"><span>慢充话费单量控制</span></a></li>
- <li><a href="index.php?act=merchant&op=provider_amount_control&type=1&form=common" class="classA" data-type="1-common"><span>普通油卡单量控制</span></a></li>
- <li><a href="index.php?act=merchant&op=provider_amount_control&type=1&form=fast" class="classA" data-type="1-fast"><span>快充油卡单量控制</span></a></li>
- </ul>
- </div>
- </div>
- <div class="fixed-empty"></div>
- <form id="price_form" enctype="multipart/form-data" method="post">
- <input type="hidden" name="form_submit" value="ok"/>
- <table class="table tb-type2 tableFixed">
- <tbody class="tbody" >
- <tr>
- <td colspan="2" class="required" ><label>单量设置:</label></td>
- </tr>
- <tr>
- <td style="border-top: 0;color: #e60d0d;font-size:13px">
- 单量:请输入大于-1的数字,-1表示不限;
- 优先级:请输入1-100的数字; 是否启动:1-开启,0-关闭
- </td>
- </tr>
- <tr class="noborder">
- <table class="spec_table tb-type2" style="width: 100%;margin-top: 77px;display: block;">
- <tbody id="tableHread" style="position: fixed;top:138px;left:20px;background-color: #fff;z-index:999;width: 96.5%%;">
- <tr class="w550">
- <th style="text-align: center;width: 120px;min-width:120px;padding-right:0;"></th>
- <?php foreach ($output['providers'] as $provider) { ?>
- <th style="text-align: center;width: 160px;min-width:160px;padding-right:0;background-color: #fff"><?php echo $provider['store_name']?>(<?php if($provider['opened'] == 1){?>
- <span style="color: #0bb20c">开启</span>
- <?php }?><?php if($provider['opened'] == 2){?>
- <span style="color: #f30707">关闭</span>
- <?php }?>)
- <?php }?>
- </tr>
- <tr class="w500" style="display:block;">
- <td style="text-align: center;width: 120px;min-width:120px;height:16px"></td>
- <?php foreach ($output['providers'] as $provider) { ?>
- <td style="text-align: center;width: 150px;min-width:150px;padding-right: 10px;background-color: #fff;" class="batch-td">
- <div style="width: 46px;display:inline-block">
- 单量
- </div>
- <div style="width: 40px;display:inline-block">
- 优先级
- </div>
- <div style="width: 40px;display:inline-block">
- 开关
- </div>
- </td>
- <?php }?>
- </tr>
- </tbody>
- <tbody class="tbody tableContent" style="display: block;padding-top: 56px;">
- <?php foreach ($output['form']['amountData'] as $key => $amount) { ?>
- <tr class="w500 trFlex">
- <td style="text-align: center;width: 120px;min-width:120px;" class="tbFlex">
- <?php echo $amount['text']?>
- </td>
- <?php foreach ($output['providers'] as $provider) { ?>
- <input type="hidden" name="pid[]" value="<?php echo $provider['provider_id'];?>">
- <input type="hidden" name="name[]" value="<?php echo $provider['name'];?>">
- <input type="hidden" name="types[]" value="<?php echo $amount['type'];?>">
- <input type="hidden" name="amount[]" value="<?php echo $amount['amount'];?>">
- <input type="hidden" name="has[]" value="<?php echo $output['datas'][$provider['provider_id']][$key]['has'];?>">
- <td style="text-align: center;width: 150px;min-width:150px;padding-right: 10px;" class="batch-td">
- <div style="width: 46px;display:inline-block">
- <input type="text" class="input-one styleOne" name="speed[]" autocomplete="off"
- value="<?php echo $output['datas'][$provider['provider_id']][$key]['speed']?>"
- <?php if($output['datas'][$provider['provider_id']][$key]['has'] == 0){?>
- readOnly
- style="background-color:#eaeaea;"
- <?php }?>
- >
- <div class="batch-input" >
- <h6>提示:</h6>
- <a href="javascript:void(0)" class="close">X</a>
- <span>请输入大于-1的数字</span>
- </div>
- </div>
- <div style="width: 40px;display:inline-block;">
- <input type="text" class="input-tow styleTow" name="sort[]" autocomplete="off"
- value="<?php echo $output['datas'][$provider['provider_id']][$key]['sort']?>"
- <?php if($output['datas'][$provider['provider_id']][$key]['has'] == 0){?>
- readOnly
- style="background-color:#eaeaea;"
- <?php }?>
- >
- <div class="batch-input" >
- <h6>提示:</h6>
- <a href="javascript:void(0)" class="close">X</a>
- <span>请输入数字,范围在1-100</span>
- </div>
- </div>
- <div style="width: 40px;display:inline-block">
- <input type="text" class="input-three styleTow" name="opened[]" autocomplete="off"
- value="<?php echo $output['datas'][$provider['provider_id']][$key]['opened']?>"
- <?php if($output['datas'][$provider['provider_id']][$key]['has'] == 0){?>
- readOnly
- style="background-color:#eaeaea;"
- <?php }?>
- >
- <div class="batch-input" >
- <h6>提示:</h6>
- <a href="javascript:void(0)" class="close">X</a>
- <span>请输入数字0或1,1-开启;0-关闭</span>
- </div>
- </div>
- </td>
- <?php }?>
- </tr>
- <?php }?>
- </tbody>
- </table>
- </tr>
- </tbody>
- <tfoot>
- <tr class="tfoot">
- <td colspan="15"><a href="JavaScript:void(0);" class="btn" id="submitBtn"><span><?php echo $lang['nc_submit']; ?></span></a></td>
- </tr>
- </tfoot>
- </table>
- </form>
- </div>
- <script type="text/javascript" src="<?php echo RESOURCE_SITE_URL; ?>/js/dialog/dialog.js" id="dialog_js"
- charset="utf-8"></script>
- <script type="text/javascript" src="<?php echo RESOURCE_SITE_URL; ?>/js/jquery-ui/jquery.ui.js"></script>
- <script type="text/javascript" src="<?php echo RESOURCE_SITE_URL; ?>/js/ajaxfileupload/ajaxfileupload.js"></script>
- <script type="text/javascript" src="<?php echo RESOURCE_SITE_URL; ?>/js/jquery.Jcrop/jquery.Jcrop.js"></script>
- <link href="<?php echo RESOURCE_SITE_URL; ?>/js/jquery.Jcrop/jquery.Jcrop.min.css" rel="stylesheet" type="text/css"
- id="cssfile2"/>
- <script type="text/javascript">
- $(function () {
- $(window).scroll(function() {
- let toLeft = document.documentElement.scrollLeft || document.body.scrollLeft;
- // let toTop = document.documentElement.scrollTop || document.body.scrollTop;
- // console.log('toTop',toTop);
- if (toLeft>0) {
- let headLeft = toLeft - 20
- $('#tableHread')[0].style.left = '-'+headLeft+'px'
- } else if (toLeft == 0) {
- $('#tableHread')[0].style.left = 20+'px'
- }
- // if (toTop>0) {
- // console.log('11', $('.tbFlex')[0].offsetTop);
- // $('.tbFlex').each(function () {
- // let trTop = $(this)[0].offsetTop
- // $(this)[0].style.top = trTop - toTop + 'px'
- // })
- // } else if (toTop == 0) {
- // $('.tbFlex').each(function () {
- // $(this)[0].style.top = 'auto'
- // })
- // }
- });
- let isSubmit = true
- $('.input-one').blur(function () {
- // console.log('$(this).value', ($(this)));
- let value = $(this)[0].value
- if (value >= -1 ) {
- isSubmit = true;
- $(this)[0].style['borderColor'] = ''
- } else {
- isSubmit = false
- $(this)[0].style['borderColor'] = '#e64444'
- }
- })
- $('.input-tow').blur(function () {
- let value = $(this)[0].value
- // console.log(value);
- if (value >= 1 && value <= 100) {
- isSubmit = true;
- $(this)[0].style['borderColor'] = ''
- } else {
- isSubmit = false
- $(this)[0].style['borderColor'] = '#e64444'
- }
- })
- $('.input-three').blur(function () {
- let value = $(this)[0].value
- if (value == 0 || value == 1) {
- isSubmit = true
- $(this)[0].style['borderColor'] = ''
- } else {
- isSubmit = false
- $(this)[0].style['borderColor'] = '#e64444'
- }
- })
- // $('input').each(function () {
- // $(this).focus(function () {
- // })
- // });
- // 开始获取当前地址
- let type = '<?php echo $_GET['type'];?>';
- let form = '<?php echo $_GET['form'];?>';
- $(".classA").each(function () {
- if (type+'-'+form == $(this).attr("data-type")) {
- $(this).addClass('current')
- $(this).attr('href','JavaScript:void(0);')
- }
- })
- // 提交
- $("#submitBtn").click(function () {
- console.log('isSubmit', isSubmit);
- if (isSubmit) {
- $("#price_form").submit();
- }
- })
- // tab样式
- $(".tab-base a").click(function () {
- // console.log('this', $(this));
- $(this).addClass('current')
- $(this).siblings().removeClass('current')
- })
- // 表格hover时背景
- $('.trFlex').each(function () {
- $(this).hover(function () {
- $(this)[0].style.backgroundColor = '#cbe9f3'
- },function() {
- $(this)[0].style.backgroundColor = '#fff'
- })
- })
- });
- </script>
-
|