|
@@ -0,0 +1,433 @@
|
|
|
+<link href="<?php echo ADMIN_TEMPLATES_URL; ?>/css/recharge.css?<?php echo rand(1, 10); ?>" rel="stylesheet" type="text/css" id="cssfile2" />
|
|
|
+<style>
|
|
|
+ .batch {
|
|
|
+ vertical-align: middle;
|
|
|
+ display: inline-block;
|
|
|
+ *display: inline
|
|
|
+ /*IE7*/
|
|
|
+ ;
|
|
|
+ margin-left: 4px;
|
|
|
+ position: relative;
|
|
|
+ z-index: 1;
|
|
|
+ *zoom: 1
|
|
|
+ /*IE7*/
|
|
|
+ ;
|
|
|
+ }
|
|
|
+
|
|
|
+ .batch i {
|
|
|
+ cursor: pointer;
|
|
|
+ }
|
|
|
+
|
|
|
+ .batch-input {
|
|
|
+ background-color: #FFF;
|
|
|
+ white-space: nowrap;
|
|
|
+ padding: 4px 9px;
|
|
|
+ border: solid 1px #BCE8F1;
|
|
|
+ position: absolute;
|
|
|
+ z-index: 1;
|
|
|
+ bottom: -75px;
|
|
|
+ left: -88px;
|
|
|
+ box-shadow: 3px 3px 0 rgba(153, 153, 153, 0.25);
|
|
|
+ }
|
|
|
+
|
|
|
+ .batch-input h6 {
|
|
|
+ font-size: 12px;
|
|
|
+ color: #555;
|
|
|
+ }
|
|
|
+
|
|
|
+ .batch-input .text {
|
|
|
+ vertical-align: middle;
|
|
|
+ clear: both;
|
|
|
+ padding: 0 4px;
|
|
|
+ vertical-align: middle;
|
|
|
+ margin-right: 4px;
|
|
|
+ }
|
|
|
+
|
|
|
+ .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: 1px;
|
|
|
+ top: -5px;
|
|
|
+ left: 50%;
|
|
|
+ position: absolute;
|
|
|
+ z-index: 2;
|
|
|
+ transform: rotate(180deg);
|
|
|
+ }
|
|
|
+
|
|
|
+ .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;
|
|
|
+ }
|
|
|
+
|
|
|
+ .text.price {
|
|
|
+ width: 40px;
|
|
|
+ }
|
|
|
+
|
|
|
+ .text.pricee {
|
|
|
+ width: 40px;
|
|
|
+ }
|
|
|
+
|
|
|
+ .fixed-bar {
|
|
|
+ width: 100%;
|
|
|
+ }
|
|
|
+
|
|
|
+ #price_table {
|
|
|
+ table-layout: fixed;
|
|
|
+ width: 100%;
|
|
|
+ height: calc(100vh - 220px);
|
|
|
+ overflow: auto;
|
|
|
+ display: block;
|
|
|
+ margin-top: 80px;
|
|
|
+ }
|
|
|
+
|
|
|
+ #price_table tr th:first-child {
|
|
|
+ position: sticky;
|
|
|
+ top: 0;
|
|
|
+ left: 0;
|
|
|
+ background: #fff;
|
|
|
+ box-shadow: 2px 0 2px rgb(0 0 0 / 10%);
|
|
|
+ z-index: 11;
|
|
|
+ }
|
|
|
+
|
|
|
+ #price_table tr:first-child {
|
|
|
+ position: sticky;
|
|
|
+ top: 0;
|
|
|
+ z-index: 11;
|
|
|
+ background: #fff;
|
|
|
+ }
|
|
|
+
|
|
|
+ /* #price_table tr:nth-child(2) {
|
|
|
+ position: sticky;
|
|
|
+ top: 41px;
|
|
|
+ z-index: 11;
|
|
|
+ background: #fff;
|
|
|
+ } */
|
|
|
+
|
|
|
+ #price_table tr td:first-child {
|
|
|
+ display: block;
|
|
|
+ position: sticky;
|
|
|
+ left: 0;
|
|
|
+ box-shadow: 2px 0 2px rgb(0 0 0 / 10%);
|
|
|
+ z-index: 10;
|
|
|
+ }
|
|
|
+
|
|
|
+ #price_table tbody tr:hover .batch-td {
|
|
|
+ background: #cbe9f3 !important;
|
|
|
+ }
|
|
|
+
|
|
|
+ .provider_amount_control .batch-td {
|
|
|
+ min-width: 40px !important;
|
|
|
+ padding: 0 !important;
|
|
|
+ }
|
|
|
+
|
|
|
+ .tb-type2 th {
|
|
|
+ transform: scale(0.9);
|
|
|
+ line-height: 1.2 !important;
|
|
|
+ }
|
|
|
+
|
|
|
+ .table th,
|
|
|
+ .table td {
|
|
|
+ padding: 2px !important;
|
|
|
+ }
|
|
|
+</style>
|
|
|
+<?php defined('InShopNC') or exit('Access Invalid!'); ?>
|
|
|
+<div class="page provider_amount_control">
|
|
|
+ <div class="fixed-bar">
|
|
|
+ <div class="item-title">
|
|
|
+ <h3>机构通道配置</h3>
|
|
|
+ <ul class="tab-base">
|
|
|
+ <li><a href="index.php?act=refill_merchant_channel_cfg&op=index&type=2&quality=<?php echo refill\Quality::Normal; ?>" class="classA" data-type="2-<?php echo refill\Quality::Normal; ?>"><span>普充话费通道控制</span></a></li>
|
|
|
+ <li><a href="index.php?act=refill_merchant_channel_cfg&op=index&type=2&quality=<?php echo refill\Quality::Quick; ?>" class="classA" data-type="2-<?php echo refill\Quality::Quick; ?>"><span>快充话费通道控制</span></a></li>
|
|
|
+ <li><a href="index.php?act=refill_merchant_channel_cfg&op=index&type=2&quality=<?php echo refill\Quality::CardKey; ?>" class="classA" data-type="2-<?php echo refill\Quality::CardKey; ?>"><span>卡密话费通道控制</span></a></li>
|
|
|
+ <li><a href="index.php?act=refill_merchant_channel_cfg&op=index&type=2&quality=<?php echo refill\Quality::ThirdShop; ?>" class="classA" data-type="2-<?php echo refill\Quality::ThirdShop; ?>"><span>三方话费通道控制</span></a></li>
|
|
|
+ <li><a href="index.php?act=refill_merchant_channel_cfg&op=index&type=2&quality=<?php echo refill\Quality::SlowTwentyFour; ?>" class="classA" data-type="2-<?php echo refill\Quality::SlowTwentyFour; ?>"><span>慢24话费通道控制</span></a></li>
|
|
|
+ <li><a href="index.php?act=refill_merchant_channel_cfg&op=index&type=2&quality=<?php echo refill\Quality::SlowSix; ?>" class="classA" data-type="2-<?php echo refill\Quality::SlowSix; ?>"><span>慢6话费通道控制</span></a></li>
|
|
|
+ <li><a href="index.php?act=refill_merchant_channel_cfg&op=index&type=2&quality=<?php echo refill\Quality::SlowTwo; ?>" class="classA" data-type="2-<?php echo refill\Quality::SlowTwo; ?>"><span>慢2话费通道控制</span></a></li>
|
|
|
+ <li><a href="index.php?act=refill_merchant_channel_cfg&op=index&type=2&quality=<?php echo refill\Quality::SlowFortyEight; ?>" class="classA" data-type="2-<?php echo refill\Quality::SlowFortyEight; ?>"><span>慢48话费通道控制</span></a></li>
|
|
|
+ <li><a href="index.php?act=refill_merchant_channel_cfg&op=index&type=2&quality=<?php echo refill\Quality::SlowSeventyTwo; ?>" class="classA" data-type="2-<?php echo refill\Quality::SlowSeventyTwo; ?>"><span>慢72话费通道控制</span></a></li>
|
|
|
+ <li><a href="index.php?act=refill_merchant_channel_cfg&op=index&type=2&quality=<?php echo refill\Quality::Fastest; ?>" class="classA" data-type="2-<?php echo refill\Quality::Fastest; ?>"><span>速充话费通道控制</span></a></li>
|
|
|
+
|
|
|
+ <li><a href="index.php?act=refill_merchant_channel_cfg&op=index&type=1&quality=<?php echo refill\Quality::Normal; ?>" class="classA" data-type="1-<?php echo refill\Quality::Normal; ?>"><span>无流水油卡通道控制</span></a></li>
|
|
|
+ <li><a href="index.php?act=refill_merchant_channel_cfg&op=index&type=1&quality=<?php echo refill\Quality::SlowTwentyFour; ?>" class="classA" data-type="1-<?php echo refill\Quality::SlowTwentyFour; ?>"><span>有流水油卡通道控制</span></a></li>
|
|
|
+ <li><a href="index.php?act=refill_merchant_channel_cfg&op=index&type=1&quality=<?php echo refill\Quality::CardKey; ?>" class="classA" data-type="1-<?php echo refill\Quality::CardKey; ?>"><span>卡密油卡通道控制</span></a></li>
|
|
|
+ <li><a href="index.php?act=refill_merchant_channel_cfg&op=index&type=1&quality=<?php echo refill\Quality::Quick; ?>" class="classA" data-type="1-<?php echo refill\Quality::Quick; ?>"><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 class="noborder">
|
|
|
+ <table class="table tb-type2" id="price_table">
|
|
|
+ <tbody class="tbody tableContent">
|
|
|
+ <tr>
|
|
|
+ <th class="align-center w130 mw130" style="transform: scale(1);">机构名称</th>
|
|
|
+ <?php foreach ($output['provider_list'] as $k => $provider) { ?>
|
|
|
+ <th class="align-center" style="vertical-align: top;">
|
|
|
+ <div><input type="checkbox" name="chbox" value="" class="checkAllCol" data-index="<?php echo $k ?>"></div>
|
|
|
+ <?php if ($provider['opened'] == 1) { ?>
|
|
|
+ <span style="color: #0bb20c">
|
|
|
+ <?php } ?><?php if ($provider['opened'] == 2) { ?>
|
|
|
+ <span style="color: #f30707">
|
|
|
+ <?php } ?>
|
|
|
+
|
|
|
+ <?php echo $provider['store_name'] ?></span>
|
|
|
+
|
|
|
+ </th>
|
|
|
+ <?php } ?>
|
|
|
+ </tr>
|
|
|
+ <!-- <tr>
|
|
|
+ <th class="align-center w120 mw120" style="height:16px">
|
|
|
+ </td>
|
|
|
+ <?php foreach ($output['provider_list'] as $k => $provider) { ?>
|
|
|
+ <th class="batch-td">
|
|
|
+
|
|
|
+ </th>
|
|
|
+ <?php } ?>
|
|
|
+
|
|
|
+ </tr> -->
|
|
|
+ <?php foreach ($output['merchant_list'] as $k => $merchant) { ?>
|
|
|
+ <tr class="w500 trFlex">
|
|
|
+ <td style="width: 130px;min-width:130px;white-space: nowrap;display: flex;align-items: center;" class="tbFlex">
|
|
|
+ <input type="checkbox" class="checkAllRow" />
|
|
|
+ <?php if ($merchant['merchant_state'] == 1) { ?>
|
|
|
+ <span style="color: #0bb20c">
|
|
|
+ <?php } ?><?php if ($merchant['merchant_state'] == 2) { ?>
|
|
|
+ <span style="color: #f30707">
|
|
|
+ <?php } ?>
|
|
|
+
|
|
|
+ <?php echo $merchant['company_name'] ?? $merchant['name']; ?></span>
|
|
|
+ </td>
|
|
|
+ <?php foreach ($output['provider_list'] as $provider) { ?>
|
|
|
+ <td class="batch-td">
|
|
|
+ <input type="checkbox" class="cellCheckBox cellCheckBox-<?php echo $k ?>" id="checkBoxList" name="sel[<?php echo $merchant['mchid'] ?>][]" value="<?php echo $provider['provider_id']; ?>" <?php
|
|
|
+ if (!empty($output['merchant_channel_cfg']) && array_key_exists($merchant['mchid'], $output['merchant_channel_cfg']) && in_array($provider['provider_id'], $output['merchant_channel_cfg'][$merchant['mchid']])) {
|
|
|
+ echo 'checked';
|
|
|
+ }
|
|
|
+ ?>>
|
|
|
+ </td>
|
|
|
+ <?php } ?>
|
|
|
+ </tr>
|
|
|
+ <?php } ?>
|
|
|
+ </tbody>
|
|
|
+ </table>
|
|
|
+ </tr>
|
|
|
+ </tbody>
|
|
|
+ <tfoot>
|
|
|
+ <tr class="tfoot">
|
|
|
+ <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>
|
|
|
+ </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>
|
|
|
+<script type="text/javascript" src="<?php echo RESOURCE_SITE_URL; ?>/refill/layer.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() {
|
|
|
+ let isSubmit = true
|
|
|
+ $('.input-one').blur(function() {
|
|
|
+ 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
|
|
|
+ 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'
|
|
|
+ }
|
|
|
+ })
|
|
|
+
|
|
|
+ // 开始获取当前地址
|
|
|
+ let type = '<?php echo $_GET['type'] ?? mtopcard\PhoneCardPaper; ?>';
|
|
|
+ let quality = '<?php echo $_GET['quality'] ?? refill\Quality::Normal; ?>';
|
|
|
+ $(".classA").each(function() {
|
|
|
+ if (type + '-' + quality === $(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() {
|
|
|
+ $(this).addClass('current')
|
|
|
+ $(this).siblings().removeClass('current')
|
|
|
+ })
|
|
|
+ // 表格hover时背景
|
|
|
+ $('#price_table td').each(function() {
|
|
|
+ let colorIndex = $(this).attr('data-color')
|
|
|
+ const colorArr = ['#fff', '#f1dde6', '#c8c6f3', '#fff', '#f1dde6', '#c8c6f3', '#f2f3c6', '#fff'];
|
|
|
+ if (colorArr[colorIndex]) {
|
|
|
+ $(this).css('background', colorArr[colorIndex]);
|
|
|
+ } else {
|
|
|
+ $(this).css('background', '#fff');
|
|
|
+ }
|
|
|
+
|
|
|
+ // 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')
|
|
|
+ // }
|
|
|
+ })
|
|
|
+
|
|
|
+ // $('#price_table .tableContent tr').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')
|
|
|
+
|
|
|
+ // }
|
|
|
+ // })
|
|
|
+
|
|
|
+ // 批量设置开关
|
|
|
+ $('.batch > .icon-edit').click(function() {
|
|
|
+ $('.batch > .batch-input').hide();
|
|
|
+ $(this).next().show();
|
|
|
+ });
|
|
|
+ $('.batch-input > .close').click(function() {
|
|
|
+ $(this).parent().hide();
|
|
|
+ });
|
|
|
+ $('.price').change(function() {
|
|
|
+ let val = $(this).val()
|
|
|
+ if (val != '1' && val != '0') {
|
|
|
+ layer.msg('开关只能设置0或1');
|
|
|
+ }
|
|
|
+ })
|
|
|
+ // 点击设置
|
|
|
+ $('.ncsc-btn-mini').click(function() {
|
|
|
+ let price = $(this).siblings('.price').val()
|
|
|
+ if (price != '1' && price != '0') {
|
|
|
+ layer.msg('开关只能设置0或1');
|
|
|
+ return
|
|
|
+ }
|
|
|
+ var lie = $(this).parents('.batch-td').prevAll().length
|
|
|
+ $('.input-three').each(function() {
|
|
|
+ let tdCon = $(this).parents('td').prevAll().length / 2
|
|
|
+ let readOnly = $(this).attr('readOnly')
|
|
|
+ if (lie == tdCon && !readOnly) {
|
|
|
+ $(this).val(price)
|
|
|
+ }
|
|
|
+ })
|
|
|
+
|
|
|
+ })
|
|
|
+ // 单量设置开关
|
|
|
+ $('.batch > .icon-edit').click(function() {
|
|
|
+ $('.batch > .batch-input').hide();
|
|
|
+ $(this).next().show();
|
|
|
+ });
|
|
|
+ $('.batch-input > .close').click(function() {
|
|
|
+ $(this).parent().hide();
|
|
|
+ });
|
|
|
+ $('.pricee').change(function() {
|
|
|
+ let val = $(this).val()
|
|
|
+ if (val <= -2) {
|
|
|
+ layer.msg('单量只能设置大于-1');
|
|
|
+ }
|
|
|
+ })
|
|
|
+ // 点击设置
|
|
|
+ $('.ncsc-btn-quantity').click(function() {
|
|
|
+ let quantity = $(this).siblings('.quantity').val()
|
|
|
+ if (quantity <= -2) {
|
|
|
+ layer.msg('单量只能设置大于-1');
|
|
|
+ return
|
|
|
+ }
|
|
|
+ let lie = $(this).parents('.batch-td').prevAll().length;
|
|
|
+ $('.input-one').each(function(index, item) {
|
|
|
+ let tdCon = $(this).parents('td').prevAll().length / 2
|
|
|
+ let readOnly = $(this).attr('readOnly')
|
|
|
+ if (lie == tdCon && !readOnly) {
|
|
|
+ $(this).val(quantity)
|
|
|
+ }
|
|
|
+ })
|
|
|
+ })
|
|
|
+
|
|
|
+ $('.checkAllCol').click(function() {
|
|
|
+ const index = $(this).attr('data-index');
|
|
|
+ const batchTd = $('.trFlex').find('.batch-td');
|
|
|
+
|
|
|
+ console.log('checkAllCol', $('.trFlex'));
|
|
|
+ if ($(this).is(':checked')) {
|
|
|
+ for (let i = 0; i < $('.trFlex').length; i++) {
|
|
|
+ $('.trFlex').eq(i).find('.batch-td').eq(index).find('input').attr('checked', true)
|
|
|
+ }
|
|
|
+ } else {
|
|
|
+ for (let i = 0; i < $('.trFlex').length; i++) {
|
|
|
+ $('.trFlex').eq(i).find('.batch-td').eq(index).find('input').attr('checked', false)
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ })
|
|
|
+
|
|
|
+ $('.checkAllRow').click(function() {
|
|
|
+ if ($(this).is(':checked')) {
|
|
|
+ $(this).parent().siblings('td').find('.cellCheckBox').attr('checked', true)
|
|
|
+ } else {
|
|
|
+ $(this).parent().siblings('td').find('.cellCheckBox').attr('checked', false);
|
|
|
+ }
|
|
|
+
|
|
|
+ })
|
|
|
+ });
|
|
|
+</script>
|