123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525 |
- <style>
- .mleft {
- margin-left: 45px;
- }
- hr {
- border: none;
- border-top: 1px solid #cbe9f3;
- margin-bottom: 10px;
- margin-top: 10px;
- }
- .page .fixed-bar .item-title h3 {
- margin-top: 18px !important;
- margin-bottom: 10px !important;
- font-weight: 700 !important;
- }
- .tab-base li span {
- font-size: 12px !important;
- }
- </style>
- <?php defined('InShopNC') or exit('Access Invalid!'); ?>
- <div class="page">
- <div class="fixed-bar">
- <div class="item-title">
- <h3><?php echo $lang['nc_merchant'] ?></h3>
- <ul class="tab-base">
- <li><a href="index.php?act=merchant&op=merchant"><span><?php echo $lang['nc_manage'] ?></span></a></li>
- <li><a href="JavaScript:void(0);" class="current"><span>充值设置</span></a></li>
- </ul>
- </div>
- </div>
- <div class="fixed-empty"></div>
- <form id="user_form" enctype="multipart/form-data" method="post">
- <input type="hidden" name="form_submit" value="ok" />
- <input type="hidden" name="mchid" value="<?php echo $output['merchant']['mchid']; ?>" />
- <table class="table tb-type2">
- <tbody>
- <tr class="noborder">
- <td colspan="2" class="required"><label class="validation">机构名称:</label></td>
- </tr>
- <tr class="noborder">
- <td class="mleft" style="display: block"><?php echo "{$output['merchant']['mchid']} :{$output['merchant']['company_name']}"; ?></td>
- </tr>
- <tr class="noborder">
- <td colspan="2" class="required"><label class="validation">拦截设置:</label></td>
- </tr>
- <tr class="noborder">
- <td colspan="2" class="required mleft"><label style="display: inline-block;width: 46px;" class="mleft" for="name">转网:</label>
- <label>
- <input type="radio" name="is_transfer" value="1" <?php if ($output['intercept']['is_transfer'] === true) {
- echo 'checked';
- } ?>>
- </label>是
- <label>
- <input type="radio" name="is_transfer" value="0" <?php if ($output['intercept']['is_transfer'] === false) {
- echo 'checked';
- } ?>>
- </label>否
- </td>
- </tr>
- <tr class="noborder">
- <td colspan="2" class="required"><label class="mleft" for="name">状态码:</label>
- <?php foreach ($output['card_state'] as $key => $value) { ?>
- <?php if (!in_array($value, ['空号', '实号', '风险号']) && !in_array($key, [0, 1, 5])) { ?>
- <label>
- <input type="checkbox" name="card_states[]" value="<?php echo $key; ?>" <?php if (!empty($output['intercept']['card_states']) && in_array($key, $output['intercept']['card_states'])) {
- echo 'checked';
- } ?>>
- </label><?php echo $value; ?>
- <?php } ?>
- <?php } ?>
- </td>
- </tr>
- <tr class="noborder">
- <td colspan="2" class="required"><label class="mleft" style="margin-right: 12px;" for="name">三网:</label>
- <label>
- <input type="checkbox" name="card_types[]" value="<?php echo mtopcard\ChinaMobileCard; ?>" <?php if (!empty($output['intercept']['card_types']) && in_array(mtopcard\ChinaMobileCard, $output['intercept']['card_types'])) {
- echo 'checked';
- } ?>>
- </label>移动
- <label>
- <input type="checkbox" name="card_types[]" value="<?php echo mtopcard\ChinaUnicomCard; ?>" <?php if (!empty($output['intercept']['card_types']) && in_array(mtopcard\ChinaUnicomCard, $output['intercept']['card_types'])) {
- echo 'checked';
- } ?>>
- </label>联通
- <label>
- <input type="checkbox" name="card_types[]" value="<?php echo mtopcard\ChinaTelecomCard; ?>" <?php if (!empty($output['intercept']['card_types']) && in_array(mtopcard\ChinaTelecomCard, $output['intercept']['card_types'])) {
- echo 'checked';
- } ?>>
- </label>电信
- </td>
- </tr>
- <tr class="noborder">
- <td>
- <hr>
- </td>
- </tr>
- <tr class="noborder">
- <td colspan="2" class="required"><label class="validation">高价补充条件:</label></td>
- </tr>
- <tr class="noborder">
- <td colspan="2" class="required"><label style="margin-left: 45px; " for="name">成功率不低于:</label>
- <label for="success"></label><input type="text" name="ratio" value="<?php echo $output['retry_times']['lower_ratio']['ratio'] ?? 0; ?>" id="success">
- <label style="margin-left: 15px;" for="name">检测时间:</label>
- <label>
- <select name="period">
- <option value="3600" <?php if ($output['retry_times']['lower_ratio']['period'] == 3600) {
- echo 'selected';
- } ?>>3600
- <option value="86400" <?php if ($output['retry_times']['lower_ratio']['period'] == 86400) {
- echo 'selected';
- } ?>>当天
- </option>
- <option value="7200" <?php if ($output['retry_times']['lower_ratio']['period'] == 7200) {
- echo 'selected';
- } ?>>7200
- </option>
- <option value="1800" <?php if ($output['retry_times']['lower_ratio']['period'] == 1800) {
- echo 'selected';
- } ?>>1800
- </option>
- <option value="900" <?php if ($output['retry_times']['lower_ratio']['period'] == 900) {
- echo 'selected';
- } ?>>900
- </option>
- </select>
- </label>
- <label for="name">( 秒 )</label>
- </td>
- </tr>
- <tr class="noborder">
- <td colspan="2" class="required"><label style="margin-left: 45px;display: inline-block;width: 84px" for="name">利润率低于:</label>
- <label>
- <input id="profit_ratio" type="text" name="profit_ratio" value="<?php echo $output['retry_times']['profit_ratio'] ?? 0; ?>">
- </label>
- <label style="margin-left: 15px;" for="name">时自动不补充</label>
- <label style="color: red" for="">注:如1%则填0.01,0.1%则填0.001</label>
- </td>
- </tr>
- <tr class="noborder">
- <td colspan="2" class="required">
- <label style="margin-left: 45px;" for="name">利润计算方式:</label>
- <label>
- <select name="profit_formula">
- <option value="qts" <?php if ($output['retry_times']['profit_formula'] == 'qts') {
- echo 'selected';
- } ?>>卡类型+面值
- <option value="qt" <?php if ($output['retry_times']['profit_formula'] == 'qt') {
- echo 'selected';
- } ?>>卡类型
- </option>
- <option value="all" <?php if ($output['retry_times']['profit_formula'] == 'all') {
- echo 'selected';
- } ?>>全部
- </option>
- </select>
- </label>
- </td>
- </tr>
- <tr class="noborder">
- <td>
- <hr>
- </td>
- </tr>
- <tr class="noborder">
- <td colspan="2" class="required"><label class="validation">预回调设置:</label></td>
- </tr>
- <tr class="noborder">
- <td colspan="4" class="required mleft"><label style="display: inline-block;width: 60px;" class="mleft" for="name">是否开启:</label>
- <label>
- <input type="radio" name="transfer_opened" value="1" <?php if ($output['transfer_cfg']['transfer_opened'] === 1) {
- echo 'checked';
- } ?>>
- </label>是
- <label>
- <input type="radio" name="transfer_opened" value="0" <?php if ($output['transfer_cfg']['transfer_opened'] === 0) {
- echo 'checked';
- } ?>>
- </label>否
- </td>
- </tr>
- <tr class="noborder">
- <td colspan="2" class="required mleft"><label style="display: inline-block;width: 60px;" class="mleft" for="name">转发通道:</label>
- <input type="text" name="transfer_mchid" value="<?php echo $output['transfer_cfg']['transfer_mchid']; ?>" /><span style="color:red;">注:该通道需要单独创建,帐号不能给下游。</span>
- </td>
- </tr>
- <tr class="noborder">
- <td colspan="2" class="required mleft"><label style="display: inline-block;" class="mleft" for="name">超过多长时间开始转发:</label>
- <input type="text" name="transfer_lowertime" value="<?php echo $output['transfer_cfg']['transfer_lowertime']; ?>" /> <span>(秒)</span>
- </td>
- </tr>
- <tr class="noborder">
- <td colspan="2" class="required mleft"><label style="display: inline-block;" class="mleft" for="name">超过多长时间停止转发:</label>
- <input type="text" name="transfer_uppertime" value="<?php echo $output['transfer_cfg']['transfer_uppertime']; ?>" /> <span>(秒)</span>
- </td>
- </tr>
- <tr class="noborder">
- <td>
- <hr>
- </td>
- </tr>
- <tr class="noborder">
- <td colspan="2" class="required"><label class="validation">充值时间和次数设置:</label>
- <div style="margin-left:149px;">
- <label style="display: inline-block;">白天秒数</label>
- <label style="display: inline-block; margin: 0 145px 0 148px;">夜晚秒数</label>
- <label style="display: inline-block;">重试次数</label>
- </div>
- </td>
- </tr>
- <?php foreach ($output['quality'] as $key => $value) { ?>
- <tr class="noborder">
- <td colspan="2" class="required judge">
- <label class="seconds" style="margin-left: 48px;display:inline-block; margin-right: 16px; min-width: 38px" for="name"><?php echo $value; ?>:</label>
- <label>
- <input class="day_secs" type="text" name="<?php echo "$key-day_secs"; ?>" value="<?php echo $output['retry_times']['qualities'][$key]['day_secs'] ?? 0; ?>">
- </label>
- <label>
- <input class="night_secs" style="margin: 0 30px;" type="text" name="<?php echo "$key-night_secs"; ?>" value="<?php echo $output['retry_times']['qualities'][$key]['night_secs'] ?? 0; ?>">
- </label>
- <label>
- <input class="times" type="text" name="<?php echo "$key-times"; ?>" value="<?php echo $output['retry_times']['qualities'][$key]['times'] ?? 0; ?>">
- </label>
- </td>
- </tr>
- <?php } ?>
- <tr>
- <td colspan="2" class="required"><label class="validation" for="oil_quality">油卡通道质量:</label></td>
- </tr>
- <tr class="noborder">
- <td class="vatop" style="display: block; margin-left: 43px;">
- <label>
- <input name="oil_quality" <?php if ($output['merchant']['oil_quality'] == refill\Quality::Normal) {
- echo 'checked';
- } ?> value="<?php echo refill\Quality::Normal; ?>" type="radio">
- </label>无流水
- <label>
- <input name="oil_quality" <?php if ($output['merchant']['oil_quality'] == refill\Quality::SlowTwentyFour) {
- echo 'checked';
- } ?> value="<?php echo refill\Quality::SlowTwentyFour; ?>" type="radio">
- </label>有流水
- <label>
- <input name="oil_quality" <?php if ($output['merchant']['oil_quality'] == refill\Quality::CardKey) {
- echo 'checked';
- } ?> value="<?php echo refill\Quality::CardKey; ?>" type="radio">
- </label>卡密
- <label>
- <input name="oil_quality" <?php if ($output['merchant']['oil_quality'] == refill\Quality::Quick) {
- echo 'checked';
- } ?> value="<?php echo refill\Quality::Quick; ?>" type="radio">
- </label>快充
- <label>
- <input name="oil_quality" <?php if ($output['merchant']['oil_quality'] == refill\Quality::OilSN_NONE_HAS) {
- echo 'checked';
- } ?> value="<?php echo refill\Quality::OilSN_NONE_HAS; ?>" type="radio">
- </label>无流水+有流水
- <label>
- <input name="oil_quality" <?php if ($output['merchant']['oil_quality'] == refill\Quality::OilSN_HAS_NONE) {
- echo 'checked';
- } ?> value="<?php echo refill\Quality::OilSN_HAS_NONE; ?>" type="radio">
- </label>有流水+无流水
- <label>
- <input name="oil_quality" <?php if ($output['merchant']['oil_quality'] == refill\Quality::OIL_SN_CARDKEY) {
- echo 'checked';
- } ?> value="<?php echo refill\Quality::OIL_SN_CARDKEY; ?>" type="radio">
- </label>有流水+卡密
- <label>
- <input name="oil_quality" <?php if ($output['merchant']['oil_quality'] == refill\Quality::OIL_SNNONE_CARDKEY) {
- echo 'checked';
- } ?> value="<?php echo refill\Quality::OIL_SNNONE_CARDKEY; ?>" type="radio">
- </label>无流水+卡密
- <label>
- <input name="oil_quality" <?php if ($output['merchant']['oil_quality'] == refill\Quality::OIL_SN_SNNONE_CARDKEY) {
- echo 'checked';
- } ?> value="<?php echo refill\Quality::OIL_SN_SNNONE_CARDKEY; ?>" type="radio">
- </label>有流水+无流水+卡密
- <label>
- <input name="oil_quality" <?php if ($output['merchant']['oil_quality'] == refill\Quality::OIL_SNNONE_SN_CARDKEY) {
- echo 'checked';
- } ?> value="<?php echo refill\Quality::OIL_SNNONE_SN_CARDKEY; ?>" type="radio">
- </label>无流水+有流水+卡密
- <label>
- <input name="oil_quality" <?php if ($output['merchant']['oil_quality'] == refill\Quality::OIL_SNNONE_SN_CARDKEY_QUICK) {
- echo 'checked';
- } ?> value="<?php echo refill\Quality::OIL_SNNONE_SN_CARDKEY_QUICK; ?>" type="radio">
- </label>无流水+有流水+卡密+快充
- </td>
- </tr>
- <tr>
- <td colspan="2" class="required"><label class="validation" for="quality">话费通道质量:</label></td>
- </tr>
- <tr class="noborder">
- <td class="vatop" style="display: block; margin-left: 43px;">
- <label>
- <input name="quality" <?php if ($output['merchant']['quality'] == refill\Quality::Normal) {
- echo 'checked';
- } ?> value="<?php echo refill\Quality::Normal; ?>" type="radio">
- </label>普通
- <label>
- <input name="quality" <?php if ($output['merchant']['quality'] == refill\Quality::Quick) {
- echo 'checked';
- } ?> value="<?php echo refill\Quality::Quick; ?>" type="radio">
- </label>快速
- <label>
- <input name="quality" <?php if ($output['merchant']['quality'] == refill\Quality::CardKey) {
- echo 'checked';
- } ?> value="<?php echo refill\Quality::CardKey; ?>" type="radio">
- </label>卡密
- <label>
- <input name="quality" <?php if ($output['merchant']['quality'] == refill\Quality::ThirdShop) {
- echo 'checked';
- } ?> value="<?php echo refill\Quality::ThirdShop; ?>" type="radio">
- </label>三方
- <label>
- <input name="quality" <?php if ($output['merchant']['quality'] == refill\Quality::SlowTwentyFour) {
- echo 'checked';
- } ?> value="<?php echo refill\Quality::SlowTwentyFour; ?>" type="radio">
- </label>慢24
- <label>
- <input name="quality" <?php if ($output['merchant']['quality'] == refill\Quality::SlowSix) {
- echo 'checked';
- } ?> value="<?php echo refill\Quality::SlowSix; ?>" type="radio">
- </label>慢6
- <label>
- <input name="quality" <?php if ($output['merchant']['quality'] == refill\Quality::SlowTwo) {
- echo 'checked';
- } ?> value="<?php echo refill\Quality::SlowTwo; ?>" type="radio">
- </label>慢2
- <label>
- <input name="quality" <?php if ($output['merchant']['quality'] == refill\Quality::SlowFortyEight) {
- echo 'checked';
- } ?> value="<?php echo refill\Quality::SlowFortyEight; ?>" type="radio">
- </label>慢48
- <label>
- <input name="quality" <?php if ($output['merchant']['quality'] == refill\Quality::SlowSeventyTwo) {
- echo 'checked';
- } ?> value="<?php echo refill\Quality::SlowSeventyTwo; ?>" type="radio">
- </label>慢72
- <label>
- <input name="quality" <?php if ($output['merchant']['quality'] == refill\Quality::Fastest) {
- echo 'checked';
- } ?> value="<?php echo refill\Quality::Fastest; ?>" type="radio">
- </label>速充
- <label>
- <input name="quality" <?php if ($output['merchant']['quality'] == refill\Quality::SlowNormal) {
- echo 'checked';
- } ?> value="<?php echo refill\Quality::SlowNormal; ?>" type="radio">
- </label>慢充一次+普充
- <label>
- <input name="quality" <?php if ($output['merchant']['quality'] == refill\Quality::ThirdNormal) {
- echo 'checked';
- } ?> value="<?php echo refill\Quality::ThirdNormal; ?>" type="radio">
- </label>三方一次+普充
- <label>
- <input name="quality" <?php if ($output['merchant']['quality'] == refill\Quality::DefSuccess) {
- echo 'checked';
- } ?> value="<?php echo refill\Quality::DefSuccess; ?>" type="radio">
- </label>普充+卡密+快充
- <label>
- <input name="quality" <?php if ($output['merchant']['quality'] == refill\Quality::NormalQuick) {
- echo 'checked';
- } ?> value="<?php echo refill\Quality::NormalQuick; ?>" type="radio">
- </label>普充+快充
- <label>
- <input name="quality" <?php if ($output['merchant']['quality'] == refill\Quality::SlowSixNormal) {
- echo 'checked';
- } ?> value="<?php echo refill\Quality::SlowSixNormal; ?>" type="radio">
- </label>慢充6+普充
- </td>
- </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>
- <script type="text/javascript" src="<?php echo ADMIN_TEMPLATES_URL; ?>/layui/layui.js"></script>
- <link rel="stylesheet" type="text/css" href="<?php echo ADMIN_TEMPLATES_URL; ?>/layui/css/layui.css" />
- <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 day
- let nights
- let times
- $("#submitBtn").click(function() {
- if (day == 0 || nights == 0 || times == 0) {
- layer.msg('白天秒数,夜晚秒数,重试次数(三者都需设置)');
- } else {
- $("#user_form").submit();
- }
- })
- $('.required .day_secs').each(function(index, item) {
- $(item).change(function() {
- const day_secs = $(this).val()
- const zero = day_secs.replace(/^[0]+/, '')
- const zero_day = day_secs.substr(0, 1)
- const zero_length = day_secs.substr(day_secs.length - 1)
- if (zero_day == 0) {
- $(this).val(zero_day);
- }
- if (zero_length != 0) {
- console.log(zero, 123);
- $(item).val(zero);
- }
- if ((!/^\d+$/.test(day_secs)) || isNaN(day_secs)) {
- layer.msg('白天秒数只能设置大于0的整数');
- $(item).val("0");
- }
- })
- })
- $('.required .night_secs').each(function(index, item) {
- $(item).change(function() {
- const night_secs = $(this).val()
- const zero = night_secs.replace(/^[0]+/, '')
- const zero_day = night_secs.substr(0, 1)
- const zero_length = night_secs.substr(night_secs.length - 1)
- if (zero_day == 0) {
- $(this).val(zero_day);
- }
- if (zero_length != 0) {
- $(item).val(zero);
- }
- if ((!/^\d+$/.test(night_secs)) || isNaN(night_secs)) {
- layer.msg('夜晚秒数只能设置大于0的整数');
- $(item).val("0");
- }
- })
- })
- $('.required .times').each(function(index, item) {
- $(item).change(function() {
- const times = $(this).val()
- const zero = times.replace(/^[0]+/, '')
- const zero_day = times.substr(0, 1)
- const zero_length = times.substr(times.length - 1)
- if (zero_day == 0) {
- $(this).val(zero_day);
- }
- if (zero_length != 0) {
- $(item).val(zero);
- }
- if ((!/^\d+$/.test(times)) || isNaN(times)) {
- layer.msg('重试次数只能设置大于0的整数');
- $(item).val("0");
- }
- })
- })
- $('#success').change(function(index, item) {
- const success = $(this).val()
- const intercept = success.substring(success.length, success.length - 1)
- if (intercept == '.') {
- layer.msg('成功率只能设置浮点数');
- $(this).val("0.00");
- return
- }
- const zero = success.replace(/^0+\./g, '0.')
- $(this).val(zero);
- if ((/^(([0-9]+\\.[0-9]*[1-9][0-9]*)|([0-9]*[1-9][0-9]*\\.[0-9]+)|([0-9]*[1-9][0-9]*))$/.test(success)) || isNaN(success)) {
- layer.msg('成功率只能设置浮点数');
- $(this).val("0.00");
- }
- })
- $('#profit_ratio').change(function(index, item) {
- const profit_ratio = $(this).val()
- const intercept = profit_ratio.substring(profit_ratio.length, profit_ratio.length - 1)
- if (intercept == '.') {
- layer.msg('利润率只能设置浮点数');
- $(this).val("0.00");
- return
- }
- const zero = profit_ratio.replace(/^0+\./g, '0.')
- $(this).val(zero);
- if ((/^(([0-9]+\\.[0-9]*[1-9][0-9]*)|([0-9]*[1-9][0-9]*\\.[0-9]+)|([0-9]*[1-9][0-9]*))$/.test(profit_ratio)) || isNaN(profit_ratio)) {
- layer.msg('利润率只能设置浮点数');
- $(this).val("0.00");
- }
- })
- $('.judge').each(function(index, item) {
- let day_secs = $(item).find('.day_secs').val()
- let night_secs = $(item).find('.night_secs').val()
- let times_secs = $(item).find('.times').val()
- $(item).change(function() {
- let day_secs = $(item).find('.day_secs').val()
- let night_secs = $(item).find('.night_secs').val()
- let times_secs = $(item).find('.times').val()
- day = day_secs
- nights = night_secs
- times = times_secs
- if (day_secs == 0 || night_secs == 0 || times_secs == 0) {
- layer.msg('白天秒数,夜晚秒数,重试次数(三者都需设置 只能设置大于0的整数)');
- }
- })
- })
- });
- </script>
|