refill.intercept.php 14 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370
  1. <link href="<?php echo ADMIN_TEMPLATES_URL;?>/css/recharge.css?<?php echo rand(1,10);?>" rel="stylesheet" type="text/css" id="cssfile2" />
  2. <style>
  3. .batch {
  4. vertical-align: middle;
  5. display: inline-block;
  6. *display: inline /*IE7*/;
  7. margin-left: 4px;
  8. position: relative;
  9. z-index: 1;
  10. *zoom: 1 /*IE7*/;
  11. }
  12. .batch i {
  13. cursor: pointer;
  14. }
  15. .batch-input {
  16. background-color: #FFF;
  17. white-space: nowrap;
  18. padding: 4px 9px;
  19. border: solid 1px #BCE8F1;
  20. position: absolute;
  21. z-index: 1;
  22. top: -70px;
  23. left: -75px;
  24. box-shadow: 3px 3px 0 rgba(153, 153, 153, 0.25);
  25. }
  26. .batch-input h6 {
  27. font-size: 12px;
  28. color: #555;
  29. }
  30. .batch-input .text {
  31. vertical-align: middle;
  32. clear: both;
  33. padding: 0 4px;
  34. vertical-align: middle;
  35. margin-right: 4px;
  36. }
  37. .batch-input .arrow {
  38. background: url(<?php echo SHOP_SITE_URL;?>/templates/default/images/seller/ncsc_bg_img.png) no-repeat -240px -20px;
  39. display: block;
  40. width: 10px;
  41. height: 5px;
  42. margin-left: -5px;
  43. bottom: -5px;
  44. left: 50%;
  45. position: absolute;
  46. z-index: 2;
  47. }
  48. .batch-input a.close {
  49. font-size: 11px;
  50. line-height: 12px;
  51. color: #BCE8F1;
  52. text-decoration: none;
  53. background-color: #FFF;
  54. text-align: center;
  55. display: block;
  56. width: 12px;
  57. height: 12px;
  58. border-radius: 7px;
  59. border: solid 1px #BCE8F1;
  60. top: -7px;
  61. right: -7px;
  62. position: absolute;
  63. z-index: 2;
  64. }
  65. .text.price {
  66. width: 40px;
  67. }
  68. .text.pricee {
  69. width: 40px;
  70. }
  71. .fixed-bar {
  72. width: 100%;
  73. }
  74. .Borderadd {
  75. border: 1px solid #e64444!important;
  76. }
  77. .Bord {
  78. background-color: #e64444!important;
  79. border: 1px solid #e64444!important;
  80. }
  81. </style>
  82. <?php defined('InShopNC') or exit('Access Invalid!'); ?>
  83. <div class="page provider_amount_control">
  84. <div class="fixed-bar">
  85. <div class="item-title">
  86. <h3>充值拦截设置</h3>
  87. <ul class="tab-base">
  88. <li><a href="JavaScript:void(0);" class="current"><span>拦截设置</span></a></li>
  89. <li><a href="index.php?act=refill_config&op=card_info"><span>卡号列表</span></a></li>
  90. </ul>
  91. </div>
  92. </div>
  93. <div class="fixed-empty"></div>
  94. <form id="price_form" enctype="multipart/form-data" method="post">
  95. <input type="hidden" name="form_submit" value="ok"/>
  96. <table class="table tb-type2 tableFixed">
  97. <tbody class="tbody" >
  98. <tr>
  99. <td colspan="2" class="required" ><label>拦截设置:</label></td>
  100. </tr>
  101. <tr>
  102. <td class="tip_info">
  103. 是否拦截:1-正常,0-拦截。 注:全国优先级为最高,如全国被拦截,那么对应列所有省份均被拦截。
  104. </td>
  105. </tr>
  106. <tr class="noborder">
  107. <table class="table tb-type2" style="margin-top: 77px;">
  108. <thead id="tableHread">
  109. <tr class="w550" style="display:block;">
  110. <th class="align-center w120 mw120"></th>
  111. <?php foreach ($output['quality_txt'] as $quality_key => $quality_txt) { ?>
  112. <th class="align-center w165 mw165"><?php echo $quality_txt;?>
  113. <?php }?>
  114. </tr>
  115. <tr class="w500" style="display:block;">
  116. <td class="align-center w120 mw120" style="height:16px"></td>
  117. <?php foreach ($output['quality_txt'] as $quality_key => $quality_txt) { ?>
  118. <td class="batch-td">
  119. <?php foreach ($output['card_type_text'] as $card_type_key => $card_type_text) { ?>
  120. <div class="priority">
  121. <?php echo $card_type_text;?>
  122. <div class="batch" style="display: inline-block"><i class="icon-edit" title="批量操作"></i>
  123. <div class="batch-input" style="display:none">
  124. <h6>批量设置拦截(0/1):</h6>
  125. <a href="javascript:void(0)" class="close">X</a>
  126. <input name="" type="number" class="text price"/>
  127. <a href="javascript:void(0)" class="ncsc-btn-mini<?php echo $card_type_key;?>" data-type="price">设置</a><span
  128. class="arrow"></span>
  129. </div>
  130. </div>
  131. </div>
  132. <?php }?>
  133. </td>
  134. <?php }?>
  135. </tr>
  136. </thead>
  137. <tbody class="tbody tableContent">
  138. <?php foreach ($output['province_list'] as $province_key => $province) { ?>
  139. <tr class="w500 trFlex" data-color="">
  140. <td style="text-align: center;width: 120px;min-width:120px;" class="tbFlex">
  141. <?php echo $province;?>(<?php echo $province_key;?>)
  142. </td>
  143. <?php foreach ($output['quality_txt'] as $quality_key => $quality_txt) { ?>
  144. <td class="batch-td">
  145. <?php foreach ($output['card_type_text'] as $card_type_key => $card_type_text) { ?>
  146. <div class="priority">
  147. <input type="hidden" name="province[]" value="<?php echo $province_key;?>">
  148. <input type="text" class="input-three<?php echo $card_type_key;?> styleTow w32 input-one" name='<?php echo "{$quality_key}-{$card_type_key}-{$province_key}"?>' autocomplete="off"
  149. value="<?php echo $output['intercept']["{$quality_key}-{$card_type_key}"][$province_key] ?? 1;?>"
  150. >
  151. </div>
  152. <?php }?>
  153. </td>
  154. <?php }?>
  155. </tr>
  156. <?php }?>
  157. </tbody>
  158. </table>
  159. </tr>
  160. </tbody>
  161. <tfoot>
  162. <tr class="tfoot">
  163. <td colspan="15"><a href="JavaScript:void(0);" class="btn" style="margin-top: 15px" id="submitBtn"><span><?php echo $lang['nc_submit']; ?></span></a></td>
  164. </tr>
  165. </tfoot>
  166. </table>
  167. </form>
  168. </div>
  169. <script type="text/javascript" src="<?php echo RESOURCE_SITE_URL; ?>/js/dialog/dialog.js" id="dialog_js"
  170. charset="utf-8"></script>
  171. <script type="text/javascript" src="<?php echo RESOURCE_SITE_URL; ?>/js/jquery-ui/jquery.ui.js"></script>
  172. <script type="text/javascript" src="<?php echo RESOURCE_SITE_URL; ?>/js/ajaxfileupload/ajaxfileupload.js"></script>
  173. <script type="text/javascript" src="<?php echo RESOURCE_SITE_URL; ?>/js/jquery.Jcrop/jquery.Jcrop.js"></script>
  174. <script type="text/javascript" src="<?php echo RESOURCE_SITE_URL;?>/refill/layer.js"></script>
  175. <link href="<?php echo RESOURCE_SITE_URL; ?>/js/jquery.Jcrop/jquery.Jcrop.min.css" rel="stylesheet" type="text/css"
  176. id="cssfile2"/>
  177. <script type="text/javascript">
  178. $(function () {
  179. $(window).scroll(function() {
  180. let toLeft = document.documentElement.scrollLeft || document.body.scrollLeft;
  181. if (toLeft>0) {
  182. let headLeft = toLeft - 20
  183. $('#tableHread')[0].style.left = '-'+headLeft+'px'
  184. } else if (toLeft == 0) {
  185. $('#tableHread')[0].style.left = 20+'px'
  186. }
  187. });
  188. let isSubmit = true
  189. $('.input-one').blur(function () {
  190. let value = $(this)[0].value
  191. if (value == 1 || value == 0) {
  192. isSubmit = true;
  193. $(this)[0].style['borderColor'] = ''
  194. } else {
  195. isSubmit = false
  196. $(this)[0].style['borderColor'] = '#e64444'
  197. }
  198. })
  199. // 开始获取当前地址
  200. let type = '<?php echo $_GET['type'];?>';
  201. let form = '<?php echo $_GET['form'];?>';
  202. $(".classA").each(function () {
  203. if (type+'-'+form == $(this).attr("data-type")) {
  204. $(this).addClass('current')
  205. $(this).attr('href','JavaScript:void(0);')
  206. }
  207. })
  208. // 提交
  209. $("#submitBtn").click(function () {
  210. if (isSubmit) {
  211. $("#price_form").submit();
  212. }
  213. })
  214. // tab样式
  215. $(".tab-base a").click(function () {
  216. $(this).addClass('current')
  217. $(this).siblings().removeClass('current')
  218. })
  219. // 表格hover时背景
  220. $('.trFlex').each(function () {
  221. let color = $(this).attr('data-color')
  222. if (color == 4 || color == 1) {
  223. $(this).css('background', '#f1dde6')
  224. } else if (color == 5 || color == 2) {
  225. $(this).css('background', '#c8c6f3')
  226. } else if (color == 6) {
  227. $(this).css('background', '#f2f3c6')
  228. } else {
  229. $(this).css('background', '#fff')
  230. }
  231. $(this).hover(function () {
  232. $(this)[0].style.backgroundColor = '#cbe9f3'
  233. },function() {
  234. if (color == 4 || color == 1) {
  235. $(this).css('background', '#f1dde6')
  236. } else if (color == 5 || color == 2) {
  237. $(this).css('background', '#c8c6f3')
  238. } else if (color == 6) {
  239. $(this).css('background', '#f2f3c6')
  240. } else {
  241. $(this).css('background', '#fff')
  242. }
  243. })
  244. })
  245. // 批量设置开关
  246. $('.batch > .icon-edit').click(function () {
  247. $('.batch > .batch-input').hide();
  248. $(this).next().show();
  249. });
  250. $('.batch-input > .close').click(function () {
  251. $(this).parent().hide();
  252. });
  253. // 点击设置
  254. $('.ncsc-btn-mini4').click(function () {
  255. let price = $(this).siblings('.price').val()
  256. if (price != '1' && price != '0') {
  257. layer.msg('移动只能设置0或1');
  258. return
  259. }
  260. var lie = $(this).parents('.batch-td').prevAll().length
  261. $('.input-three4').each(function (index, item) {
  262. let tdCon = $(this).parents('td').prevAll().length
  263. let readOnly = $(this).attr('readOnly')
  264. if (lie == tdCon && !readOnly) {
  265. $(this).val(price)
  266. }
  267. })
  268. })
  269. $('.input-three4').each(function(index, item) {
  270. if($(item).val() == 0) {
  271. $(this).addClass('Bord')
  272. }
  273. $(item).change(function() {
  274. let val = $(this).val()
  275. console.log(val);
  276. if (val != 1 && val != 0) {
  277. $(this).addClass('Borderadd')
  278. layer.msg('移动只能设置0或1');
  279. } else {
  280. $(this).removeClass('Borderadd')
  281. }
  282. if (val == 0) {
  283. $(this).addClass('Bord')
  284. } else {
  285. $(this).removeClass('Bord')
  286. }
  287. })
  288. })
  289. $('.input-three5').each(function(index, item) {
  290. if($(item).val() == 0) {
  291. $(this).addClass('Bord')
  292. }
  293. $(item).change(function() {
  294. let val = $(this).val()
  295. if (val != 1 && val != 0) {
  296. $(this).addClass('Borderadd')
  297. layer.msg('联通只能设置0或1');
  298. } else {
  299. $(this).removeClass('Borderadd')
  300. }
  301. if (val == 0) {
  302. $(this).addClass('Bord')
  303. } else {
  304. $(this).removeClass('Bord')
  305. }
  306. })
  307. })
  308. $('.input-three6').each(function(index, item) {
  309. if($(item).val() == 0) {
  310. $(this).addClass('Bord')
  311. }
  312. $(item).change(function() {
  313. let val = $(this).val()
  314. if (val != 1 && val != 0) {
  315. $(this).addClass('Borderadd')
  316. layer.msg('电信只能设置0或1');
  317. } else {
  318. $(this).removeClass('Borderadd')
  319. }
  320. if (val == 0) {
  321. $(this).addClass('Bord')
  322. } else {
  323. $(this).removeClass('Bord')
  324. }
  325. })
  326. })
  327. $('.ncsc-btn-mini5').click(function () {
  328. let price = $(this).siblings('.price').val()
  329. if (price != '1' && price != '0') {
  330. layer.msg('联通只能设置0或1');
  331. return
  332. }
  333. var lie = $(this).parents('.batch-td').prevAll().length
  334. $('.input-three5').each(function () {
  335. let tdCon = $(this).parents('td').prevAll().length
  336. let readOnly = $(this).attr('readOnly')
  337. if (lie == tdCon && !readOnly) {
  338. $(this).val(price)
  339. }
  340. })
  341. })
  342. $('.ncsc-btn-mini6').click(function () {
  343. let price = $(this).siblings('.price').val()
  344. if (price != '1' && price != '0') {
  345. layer.msg('电信只能设置0或1');
  346. return
  347. }
  348. var lie = $(this).parents('.batch-td').prevAll().length
  349. $('.input-three6').each(function () {
  350. let tdCon = $(this).parents('td').prevAll().length
  351. let readOnly = $(this).attr('readOnly')
  352. if (lie == tdCon && !readOnly) {
  353. $(this).val(price)
  354. }
  355. })
  356. })
  357. });
  358. </script>