provider.group.set.php 5.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113
  1. <link href="<?php echo ADMIN_TEMPLATES_URL;?>/css/recharge.css?<?php echo rand(1,10);?>" rel="stylesheet" type="text/css" id="cssfile2" />
  2. <?php defined('InShopNC') or exit('Access Invalid!'); ?>
  3. <div class="page">
  4. <div class="fixed-bar">
  5. <div class="item-title">
  6. <h3>通道组管理</h3>
  7. <ul class="tab-base">
  8. <li><a href="index.php?act=provider_group&op=index"><span><?php echo $lang['nc_manage'] ?></span></a></li>
  9. <li><a href="index.php?act=provider_group&op=add"><span><?php echo $lang['nc_new'] ?></span></a></li>
  10. <li><a href="JavaScript:void(0);" class="current"><span>通道组通道分配</span></a></li>
  11. </ul>
  12. </div>
  13. </div>
  14. <div class="fixed-empty"></div>
  15. <form method="post" id="merchant_name_form">
  16. <input type="hidden" name="form_submit" value="ok"/>
  17. <input type="hidden" name="group_id" value="<?php echo $_GET['group_id']?>">
  18. <input type="hidden" name="type" value="<?php echo $_GET['type'];?>">
  19. <input type="hidden" name="quality" value="<?php echo $_GET['quality']?>">
  20. <table class=" tb-type2">
  21. <thead>
  22. <tr class="thead">
  23. <th>
  24. <a href="JavaScript:void(0);" class="btn" id="emptyBtn"><span>清空</span></a>
  25. </th>
  26. <th class="w50 align-center">
  27. 全选
  28. </th>
  29. <?php foreach ($output['amounts'] as $amount){?>
  30. <th class="w50 align-center"><?php echo $amount;?></th>
  31. <?php }?>
  32. </tr>
  33. </thead>
  34. <tbody>
  35. <?php if(!empty($output['providers'])){?>
  36. <?php foreach ($output['providers'] as $provider){?>
  37. <tr class="trFlex">
  38. <td class="w180"><?php echo $provider['name'];?></td>
  39. <td class="w50 align-center">
  40. <input type="checkbox" class="w50 checkAll">
  41. </td>
  42. <?php foreach ($output['amounts'] as $amount){?>
  43. <td class="w50 align-center">
  44. <input type="checkbox" class="w50 input" name="info[]" style="vertical-align: middle;"
  45. value="<?php echo "{$_GET['quality']}-{$provider['provider_name']}-{$provider['card_type']}-{$amount}-{$provider['provider_id']}";?>"
  46. <?php if(in_array("{$_GET['quality']}-{$provider['provider_name']}-{$provider['card_type']}-{$amount}-{$provider['provider_id']}", $output['sel_data'])){ echo 'checked';}?>
  47. />
  48. </td>
  49. <?php }?>
  50. </tr>
  51. <?php }?>
  52. <?php }else{?>
  53. <tr class="no_data">
  54. <td colspan="8"><?php echo $lang['nc_no_record']; ?></td>
  55. </tr>
  56. <?php }?>
  57. </tbody>
  58. <tfoot>
  59. <tr class="tfoot">
  60. <td colspan="15">
  61. <?php if(!empty($output['providers'])){?>
  62. <a href="JavaScript:void(0);" class="btn" id="submitBtn"><span><?php echo $lang['nc_submit']; ?></span></a>
  63. <?php }?>
  64. </td>
  65. </tr>
  66. </tfoot>
  67. </table>
  68. </form>
  69. </div>
  70. <script type="text/javascript" src="<?php echo RESOURCE_SITE_URL; ?>/js/jquery.edit.js" charset="utf-8"></script>
  71. <script>
  72. $(function () {
  73. $('#submitBtn').click(function () {
  74. $("#merchant_name_form").submit();
  75. });
  76. // 表格hover时背景
  77. $('.trFlex').each(function () {
  78. $(this).hover(function () {
  79. $(this)[0].style.backgroundColor = '#cbe9f3'
  80. },function() {
  81. $(this)[0].style.backgroundColor = '#fff'
  82. })
  83. })
  84. // 清空
  85. $('#emptyBtn').click(function () {
  86. $('input[type="checkbox"]').each(function () {
  87. if ($(this).is(":checked")) {
  88. $(this).attr("checked",false)
  89. }
  90. })
  91. })
  92. // 全选
  93. $('.checkAll').click(function () {
  94. let hang = $(this).parent().parent().prevAll().length + 1
  95. if ($(this).is(':checked')) {
  96. $('.input').each(function () {
  97. let inputH = $(this).parent().parent().prevAll().length + 1
  98. if (hang == inputH) {
  99. $(this).attr("checked",true)
  100. }
  101. })
  102. } else {
  103. $('.input').each(function () {
  104. let inputH = $(this).parent().parent().prevAll().length + 1
  105. if (hang == inputH) {
  106. $(this).attr("checked",false)
  107. }
  108. })
  109. }
  110. })
  111. });
  112. </script>