123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161 |
- <link href="<?php echo ADMIN_TEMPLATES_URL;?>/css/recharge.css?<?php echo rand(1,10);?>" rel="stylesheet" type="text/css" id="cssfile2" />
- <?php defined('InShopNC') or exit('Access Invalid!'); ?>
- <div class="page">
- <div class="fixed-bar">
- <div class="item-title">
- <h3>通道组管理</h3>
- <ul class="tab-base">
- <li><a href="index.php?act=provider_group&op=index"><span><?php echo $lang['nc_manage'] ?></span></a></li>
- <li><a href="index.php?act=provider_group&op=add"><span><?php echo $lang['nc_new'] ?></span></a></li>
- <li><a href="JavaScript:void(0);" class="current"><span>通道组通道分配</span></a></li>
- </ul>
- </div>
- </div>
- <div class="fixed-empty"></div>
- <form method="post" id="merchant_name_form">
- <input type="hidden" name="form_submit" value="ok"/>
- <input type="hidden" name="group_id" value="<?php echo $_GET['group_id']?>">
- <input type="hidden" name="type" value="<?php echo $_GET['type'];?>">
- <input type="hidden" name="quality" value="<?php echo $_GET['quality']?>">
- <input type="hidden" name="is_only" value="<?php echo $output['is_only']?>">
- <table class=" tb-type2">
- <thead style="position: fixed;background-color: #fff;">
- <tr class="thead">
- <th class="w180">
- <a href="JavaScript:void(0);" class="btn" id="emptyBtn"><span>清空</span></a>
- </th>
- <th class="w57 align-center">
- 全选
- </th>
- <?php foreach ($output['amounts'] as $amount){?>
- <th class="w57 align-center"><?php echo $amount;?></th>
- <?php }?>
- </tr>
- </thead>
- <tbody style="display: block;padding-top: 47px;">
- <?php if(!empty($output['providers'])){?>
- <?php foreach ($output['providers'] as $provider){?>
- <tr class="trFlex" data-color="<?php echo $provider['card_type'];?>">
- <td class="w180"><?php echo $provider['name'];?></td>
- <td class="w50 align-center">
- <input type="checkbox" class="w50 checkAll">
- </td>
- <?php foreach ($output['amounts'] as $amount){?>
- <?php if(is_array($output['QPTA']["{$provider['provider_name']}-{$provider['card_type']}-{$amount}"]) && array_key_exists("{$provider['provider_name']}-{$provider['card_type']}-{$amount}", $output['QPTA'])){?>
- <td class="w50 align-center td_readonly" data-readonly = '0'>
- <?php }else{?>
- <td class="w50 align-center td_readonly" data-readonly = '1'>
- <?php }?>
- <input type="checkbox" class="w50 input" name="info[]" style="vertical-align: middle;"
- value="<?php echo "{$_GET['quality']}-{$provider['provider_name']}-{$provider['card_type']}-{$amount}-{$provider['provider_id']}";?>"
- <?php if(in_array("{$_GET['quality']}-{$provider['provider_name']}-{$provider['card_type']}-{$amount}-{$provider['provider_id']}", $output['sel_data'])){ echo 'checked';}?>
- />
- </td>
- <?php }?>
- </tr>
- <?php }?>
- <?php }else{?>
- <tr class="no_data">
- <td colspan="8"><?php echo $lang['nc_no_record']; ?></td>
- </tr>
- <?php }?>
- </tbody>
- <tfoot>
- <tr class="tfoot">
- <td colspan="15">
- <?php if(!empty($output['providers'])){?>
- <a href="JavaScript:void(0);" class="btn" id="submitBtn"><span><?php echo $lang['nc_submit']; ?></span></a>
- <?php }?>
- </td>
- </tr>
- </tfoot>
- </table>
- </form>
- </div>
- <script type="text/javascript" src="<?php echo RESOURCE_SITE_URL; ?>/js/jquery.edit.js" charset="utf-8"></script>
- <script>
- $(function () {
- $('#submitBtn').click(function () {
- $("#merchant_name_form").submit();
- });
-
-
- // 表格hover时背景
- $('.trFlex').each(function () {
- let color = $(this).attr('data-color')
- if (color == 4 || color == 1) {
- $(this).css('background', '#f1dde6')
- } else if (color == 5 || color == 2) {
- $(this).css('background', '#c8c6f3')
- } else if (color == 6) {
- $(this).css('background', '#f2f3c6')
- } else {
- $(this).css('background', '#fff')
- }
- $(this).hover(function () {
- $(this)[0].style.backgroundColor = '#cbe9f3'
- },function() {
- if (color == 4 || color == 1) {
- $(this).css('background', '#f1dde6')
- } else if (color == 5 || color == 2) {
- $(this).css('background', '#c8c6f3')
- } else if (color == 6) {
- $(this).css('background', '#f2f3c6')
- } else {
- $(this).css('background', '#fff')
- }
- })
-
- })
-
- // 清空
- $('#emptyBtn').click(function () {
- $('input[type="checkbox"]').each(function () {
- if ($(this).is(":checked")) {
- $(this).attr("checked",false)
- }
- })
- })
- //全选td
- $('.td_readonly').each(function () {
- let isReadonly = $(this).attr('data-readonly')
- if (isReadonly == 1) {
- $(this).children().attr('disabled', true)
- }
- })
-
- // 全选
- $('.checkAll').click(function () {
- let hang = $(this).parent().parent().prevAll().length + 1
- if ($(this).is(':checked')) {
- $('.td_readonly').each(function () {
- let isReadonly = $(this).attr('data-readonly')
- if (isReadonly == 0) {
- let inputH = $(this).parent().prevAll().length + 1
- if (hang == inputH) {
- $(this).children().attr("checked",true)
- }
- }
- })
- } else {
- $('.td_readonly').each(function () {
- let isReadonly = $(this).attr('data-readonly')
- if (isReadonly == 0) {
- let inputH = $(this).parent().prevAll().length + 1
- if (hang == inputH) {
- $(this).children().attr("checked",false)
- }
- }
- })
- }
- })
- });
- </script>
|