支付限额

master
sunke 5 years ago
parent 1f5dba61ce
commit 5c8221d9dc

@ -6,6 +6,13 @@ namespace Admin\Controller;
* @author 麦当苗儿 <zuojiazi@vip.qq.com>
*/
class ToolController extends ThinkController {
public $pay_type = [
0 => ['name' => '支付宝', 'paytag' => 'alipay' ],
1 => ['name' => '微信', 'paytag' => 'wxpay'],
2 => ['name' => '易宝', 'paytag' => 'yeepay'],
3 => ['name' => '双乾', 'paytag' => 'sqpay'],
];
/**
*保存设置
@ -898,6 +905,376 @@ class ToolController extends ThinkController {
}
public function limitPay($p=1) {
$page = intval(I('get.p', 0));
$page = $page ? $page : 1; //默认显示第一页数据
$row = empty($row) ? 10 : $row;//每页条数
$payType = $_REQUEST['pay_type'];
$limit_type = $_REQUEST['limit_type'];
$limit_time_type = $_REQUEST['limit_time_type'];
$map = [];
if (!empty($payType)) {
$map['pay_type'] = $payType;
$parameter['pay_type'] = $payType;
}
if (!empty($limit_type)) {
$map['limit_type'] = $limit_type;
$parameter['limit_type'] = $limit_type;
}
$datas = M('pay_limit_conf', 'tab_')
->where($map)
->order('id desc')
->page($page, $row)
->select();
/* 查询记录总数 */
$count = M('pay_limit_conf', 'tab_')
->where($map)
->count();
foreach ($datas as $key => $data) {
$limit_rule = '';
if ( $data['user_total_limit']) {
$limit_rule .= '玩家全渠道总流水限额'.$data['user_total_limit'];
}
if ( $data['total_limit']) {
$limit_rule .= '全渠道总流水限额'.$data['total_limit'];
}
if ( $data['user_one_limit']) {
$limit_rule .= '玩家单笔限制'.$data['user_one_limit'];
}
if ($limit_rule == '') {
$limit_rule = '暂无规则';
}
if ($data['limit_time_type'] == 'day') {
$data['limit_time_type'] = '每日,';
}
if ($data['limit_time_type'] == 'week') {
$data['limit_time_type'] = '每周,';
}
if ($data['limit_time_type'] == 'month') {
$data['limit_time_type'] = '每月,';
}
if ($data['limit_time_type'] == 'fix') {
$data['limit_time_type'] = '特殊,';
}
if ($data['limit_type'] == 'force') {
$datas[$key]['limit_type'] = '强制模式';
}
if ($data['limit_type'] == 'obstacles') {
$datas[$key]['limit_type'] = '障碍模式';
}
if ($data['pay_type'] == 'alipay') {
$pay_type = '支付宝';
}
if ($data['pay_type'] == 'wxpay') {
$pay_type = '微信';
}
if ($data['pay_type'] == 'yeepay') {
$pay_type = '易宝';
}
if ($data['pay_type'] == 'sqpay') {
$pay_type = '双乾';
}
$start_timeArr = str_split($data['start_time'], 1);
$startTimeStr = '';
foreach ($start_timeArr as $timeKey => $start_time) {
if ($timeKey == 1 || $timeKey == 3) {
$startTimeStr .= $start_time.':';
}else {
$startTimeStr .= $start_time;
}
}
$end_timeArr = str_split($data['end_time'], 1);
$endTimeStr = '';
foreach ($end_timeArr as $timeKey1 => $end_time) {
if ($timeKey1 == 1 || $timeKey1 == 3) {
$endTimeStr .= $end_time. ':';
}else {
$endTimeStr .= $end_time;
}
}
$datas[$key]['pay_type'] = $pay_type;
$datas[$key]['limit_rule'] = $limit_rule;
$datas[$key]['limit_time'] = $data['limit_time_type'] .$data['limit_time_type_remark'].' '.$startTimeStr.'~'.$endTimeStr;
}
//分页
$parameter['p'] = $page;
$parameter['row'] = $row;
$page = set_pagination($count, $row, $parameter);
if ($page) {
$this->assign('_page', $page);
}
var_dump($payType);
if (empty($payType)) {
$this->assign('pay_type', " ");
}else {
$this->assign('pay_type', $payType);
}
if (empty($limit_type)) {
$this->assign('limit_type', " ");
}else {
$this->assign('limit_type', $limit_type);
}
$this->assign('datas', $datas);
$this->display();
}
public function addLimitPay() {
if ($_POST) {
$pay_type = $_REQUEST['pay_type'];
$total_limit = empty($_REQUEST['total_limit']) ? 0 : $_REQUEST['total_limit'];
$user_total_limit = empty($_REQUEST['user_total_limit']) ? 0 : $_REQUEST['user_total_limit'];
$user_one_limit = empty($_REQUEST['user_one_limit']) ? 0 : $_REQUEST['user_one_limit'];
$limit_type = $_REQUEST['limit_type'];
$status = $_REQUEST['status'];
$startTime = '';
$endTime = '';
if (empty($pay_type)) {
return $this->error('限制支付渠道不能为空');
}
if (empty($limit_type)) {
return $this->error('限制方式不能为空');
}
$paramsName = $status.'_start';
for ($i = 1; $i < 13; $i++) {
$name = $paramsName.$i;
if (empty($_REQUEST[$name])) {
return $this->error('时间选择不能为空');
}else {
if ($i < 7) {
$startTime .= $_REQUEST[$name];
}else {
$endTime .= $_REQUEST[$name];
}
}
$this->checkTimeFormat($i, $startTime, $endTime, $_REQUEST[$name]);
}
switch($status) {
case 'daily':
$limit_time_type = 'day';
break;
case 'week':
$limit_time_type = 'week';
if (empty($_REQUEST['week_remark'])) {
return $this->error('每周限制时间未确定');
}else {
$data['limit_time_type_remark'] = $_REQUEST['week_remark'];
}
break;
case 'month':
$limit_time_type = 'month';
if (empty($_REQUEST['month_remark'])) {
return $this->error('每月限制时间未确定');
}else {
$data['limit_time_type_remark'] = $_REQUEST['month_remark'];
}
break;
case 'day':
$limit_time_type = 'fix';
if (empty($_REQUEST['day_remark'])) {
return $this->error('每月限制时间未确定');
}else {
$data['limit_time_type_remark'] = $_REQUEST['day_remark'];
}
break;
}
if (!is_numeric($startTime) || !is_numeric($endTime)) {
$this->error('时间格式出错');
}
$data['pay_type'] = $pay_type;
$data['limit_type'] = $limit_type;
$data['limit_time_type'] = $limit_time_type;
$data['start_time'] = $startTime;
$data['end_time'] = $endTime;
$data['total_limit'] = $total_limit;
$data['user_total_limit'] = $user_total_limit;
$data['user_one_limit'] = $user_one_limit;
$data['create_time'] = time();
$res = M('pay_limit_conf', 'tab_')->add($data);
if($res) {
$this->success('新增成功',U('limitPay'));
}
}else {
// $id = $_REQUEST['id'];
// $limitConf = M('pay_limit_conf', 'tab_')->where(['id'=>$id])->find();
// if (empty($limitConf)) {
// return $this->error('未找到该条信息');
// }
// foreach ($limitConf as $key => $conf) {
// }
$monthDay = $this->getMonthDay();
$this->assign('monthday', $monthDay);
$this->display();
}
}
public function editLimitPay() {
if ($_POST) {
$id = $_REQUEST['id'];
$pay_type = $_POST['pay_type'];
$total_limit = $_POST['total_limit'];
$user_total_limit = $_POST['user_total_limit'];
$user_one_limit = $_POST['user_one_limit'];
$limit_type = $_POST['limit_type'];
$status = $_POST['status'];
$startTime = '';
$endTime = '';
if (empty($id)) {
return $this->error('编辑信息出错');
}
$confInfo = M('pay_limit_conf', 'tab_')->where(['id'=>$id])->find();
$confInfo['pay_type'] = $pay_type;
$confInfo['total_limit'] = $total_limit;
$confInfo['user_total_limit'] = $user_total_limit;
$confInfo['user_one_limit'] = $user_one_limit;
$confInfo['limit_type'] = $limit_type;
$paramsName = $status.'_start';
for ($i = 1; $i < 13; $i++) {
$name = $paramsName.$i;
if (empty($_REQUEST[$name])) {
return $this->error('时间选择不能为空');
}else {
if ($i < 7) {
$startTime .= $_REQUEST[$name];
}else {
$endTime .= $_REQUEST[$name];
}
}
$this->checkTimeFormat($i, $startTime, $endTime, $_REQUEST[$name]);
}
$confInfo['start_time'] = $startTime;
$confInfo['end_time'] = $endTime;
switch($status) {
case 'daily':
$limit_time_type = 'day';
$confInfo['limit_time_type_remark'] = "";
break;
case 'week':
$limit_time_type = 'week';
if (empty($_REQUEST['week_remark'])) {
return $this->error('每周限制时间未确定');
}else {
$confInfo['limit_time_type_remark'] = $_REQUEST['week_remark'];
}
break;
case 'month':
$limit_time_type = 'month';
if (empty($_REQUEST['month_remark'])) {
return $this->error('每月限制时间未确定');
}else {
$confInfo['limit_time_type_remark'] = $_REQUEST['month_remark'];
}
break;
case 'day':
$limit_time_type = 'fix';
if (empty($_REQUEST['day_remark'])) {
return $this->error('每月限制时间未确定');
}else {
$confInfo['limit_time_type_remark'] = $_REQUEST['day_remark'];
}
$confInfo['limit_time_type_remark'] = $_REQUEST['day_remark'];
break;
}
$confInfo['limit_time_type'] = $limit_time_type;
$update = M('pay_limit_conf', 'tab_')->where(['id'=>$id])->save($confInfo);
if ($update) {
$this->success('编辑成功',U('limitPay'));
}else {
$this->error('未修改资料,请确认');
}
}else {
$id = $_REQUEST['id'];
$data = M('pay_limit_conf', 'tab_')->where(['id'=>$id])->find();
$start_time = $data['start_time'];
$end_time = $data['end_time'];
$monthDay = $this->getMonthDay();
$this->assign('monthday', $monthDay);
$this->assign('startTime', $start_time);
$this->assign('endTime', $end_time);
$this->assign('data', $data);
// var_dump($this->pay_type);die();
$this->assign('pay_type', $this->pay_type);
$this->display();
}
}
public function delLimitPay($id) {
$res = M('pay_limit_conf', 'tab_')->where(['id'=>$id])->delete();
if($res) {
$this->success('删除成功',U('limitPay'));
}
}
public function getMonthDay() {
$arr = [];
for ($i = 1;$i < 32; $i++ ) {
$arr[] = $i.'号';
}
return $arr;
}
public function checkTimeFormat($i, $startTime = '' , $endTime = '', $name) {
if ($i == 2) {
if ($startTime < 0 || $startTime > 23) {
return $this->error("时间选择出错");
}
}
if ($i == 3 || $i == 5) {
if ($name < 0 || $name > 5) {
return $this->error("时间选择出错");
}
}
if ($i == 4 || $i == 6) {
if ($name < 0 || $name > 9) {
return $this->error("时间选择出错");
}
}
if ($i == 8) {
if ($endTime < 0 || $endTime > 23) {
return $this->error("时间选择出错");
}
}
if ($i == 9 || $i == 11) {
if ($name < 0 || $name > 5) {
return $this->error("时间选择出错");
}
}
if ($i == 10 || $i == 12) {
if ($name < 0 || $name > 9) {
return $this->error("时间选择出错");
}
}
}
}

@ -0,0 +1,366 @@
<extend name="Public/base"/>
<block name="body">
<link href="__STATIC__/datetimepicker/css/datetimepicker.css" rel="stylesheet" type="text/css">
<link href="__STATIC__/datetimepicker/css/dropdown.css" rel="stylesheet" type="text/css">
<script type="text/javascript" src="__STATIC__/datetimepicker/js/bootstrap-datetimepicker.min.js"></script>
<script type="text/javascript" src="__STATIC__/datetimepicker/js/locales/bootstrap-datetimepicker.zh-CN.js"
charset="UTF-8"></script>
<div class="cf main-place top_nav_list navtab_list">
<h3 class="page_title">支付限额规则配置</h3>
<p class="description_text">说明:配置支付规则,控制支付渠道</p>
</div>
<div class="tab-content tabcon1711 tabcon17112">
<form action="{:U('addLimitPay')}" method="post" class="form-horizontal form_info_ml">
<table border="0" cellspacing="0" cellpadding="0">
<tbody>
<tr>
<td class="l noticeinfo">限制支付渠道</td>
<td class="r table_radio">
<span class="form_select">
<select name="pay_type">
<option value="alipay" selected>支付宝</option>
<option value="wxpay">微信</option>
<option value="yeepay">易宝支付</option>
<option value="sqpay">双乾支付</option>
</select>
</span>
</td>
</tr>
<tr>
<td class="l noticeinfo">限制规则</td>
<td class="r table_radio">
<span class="form_select-text">说明:强制限制和支付体验障碍</span>
</td>
</tr>
<tr>
<td class="l noticeinfo">全渠道总流水限制</td>
<td class="r table_radio">
<input type="text" class="" name="total_limit" value="{$info.title|default=''}" placeholder="请输入额度">
</td>
</tr>
<tr>
<td class="l noticeinfo">玩家全渠道总流水限制</td>
<td class="r table_radio">
<input type="text" class="" name="user_total_limit" value="{$info.title|default=''}" placeholder="请输入额度">
</td>
</tr>
<tr>
<td class="l noticeinfo">玩家单笔限制</td>
<td class="r table_radio">
<input type="text" class="" name="user_one_limit" value="{$info.title|default=''}" placeholder="请输入额度">
</td>
</tr>
<tr>
<td class="l noticeinfo">限制方式 </td>
<td class="r table_radio">
<span class="form_select">
<select name="limit_type">
<option value="force" selected>强制限制</option>
<option value="obstacles">支付体验障碍</option>
</select>
</span>
<span class="notice-text">说明:强制限制和支付体验障碍</span>
</td>
</tr>
<tr>
<td class="l noticeinfo">限制时间</td>
<td class="r table_radio">
<span class="form_radio">
<label><input type="radio" name="status" value="daily" checked="checked"/> 每日</label>
<div class="input-list" style="margin-left:20px">
<input type="text" class="" style="width:10px;" maxlength="1" name="daily_start1" value="{$info.title|default=''}" placeholder="">
<input type="text" class="" style="width:10px;margin-left:5px" maxlength="1" name="daily_start2" value="{$info.title|default=''}" placeholder="">
<span style="margin-left:10px">:</span>
<div class="input-append date" id="datetimepicker" style="display:inline-block;margin-left:5px">
<input type="text" class="" style="width:10px;" maxlength="1" name="daily_start3" value="{$info.title|default=''}" placeholder="">
<input type="text" class="" style="width:10px;margin-left:5px" maxlength="1" name="daily_start4" value="{$info.title|default=''}" placeholder="">
<span style="margin-left:10px">:</span>
<div class="input-append date" id="datetimepicker" style="display:inline-block;margin-left:5px">
<input type="text" class="" style="width:10px;" maxlength="1" name="daily_start5" value="{$info.title|default=''}" placeholder="">
<input type="text" class="" style="width:10px;margin-left:5px" maxlength="1" name="daily_start6" value="{$info.title|default=''}" placeholder="">
<span class="add-on"><i class="icon-th"></i></span>
</div>
</div>
</div>
<div class="input-list" style="margin-left:20px">
<input type="text" class="" style="width:10px;" maxlength="1" name="daily_start7" value="{$info.title|default=''}" placeholder="">
<input type="text" class="" style="width:10px;margin-left:5px" maxlength="1" name="daily_start8" value="{$info.title|default=''}" placeholder="">
<span style="margin-left:10px">:</span>
<div class="input-append date" id="datetimepicker" style="display:inline-block;margin-left:5px">
<input type="text" class="" style="width:10px;" maxlength="1" name="daily_start9" value="{$info.title|default=''}" placeholder="">
<input type="text" class="" style="width:10px;margin-left:5px" maxlength="1" name="daily_start10" value="{$info.title|default=''}" placeholder="">
<span style="margin-left:10px">:</span>
<div class="input-append date" id="datetimepicker" style="display:inline-block;margin-left:5px">
<input type="text" class="" style="width:10px;" maxlength="1" name="daily_start11" value="{$info.title|default=''}" placeholder="">
<input type="text" class="" style="width:10px;margin-left:5px" maxlength="1" name="daily_start12" value="{$info.title|default=''}" placeholder="">
<span class="add-on"><i class="icon-th"></i></span>
</div>
</div>
</div>
</span>
<span class="notice-text">说明:时间格式(00:00:00)</span>
</td>
</tr>
<tr>
<td class="l noticeinfo"></td>
<td class="r table_radio">
<span class="form_radio">
<label><input type="radio" name="status" value="week" /> 每周</label>
<span class="form_select" style="margin-left:5px">
<select name="week_remark">
<option value="周一" selected>周一</option>
<option value="周二">周二</option>
<option value="周三">周三</option>
<option value="周四">周四</option>
<option value="周五">周五</option>
<option value="周六">周六</option>
<option value="周天">周天</option>
</select>
</span>
<div class="input-list" style="margin-left:20px">
<input type="text" class="" style="width:10px;" maxlength="1" name="week_start1" value="{$info.title|default=''}" placeholder="">
<input type="text" class="" style="width:10px;margin-left:5px" maxlength="1" name="week_start2" value="{$info.title|default=''}" placeholder="">
<span style="margin-left:10px">:</span>
<div class="input-append date" id="datetimepicker" style="display:inline-block;margin-left:5px">
<input type="text" class="" style="width:10px;" maxlength="1" name="week_start3" value="{$info.title|default=''}" placeholder="">
<input type="text" class="" style="width:10px;margin-left:5px" maxlength="1" name="week_start4" value="{$info.title|default=''}" placeholder="">
<span style="margin-left:10px">:</span>
<div class="input-append date" id="datetimepicker" style="display:inline-block;margin-left:5px">
<input type="text" class="" style="width:10px;" maxlength="1" name="week_start5" value="{$info.title|default=''}" placeholder="">
<input type="text" class="" style="width:10px;margin-left:5px" maxlength="1" name="week_start6" value="{$info.title|default=''}" placeholder="">
<span class="add-on"><i class="icon-th"></i></span>
</div>
</div>
</div>
<div class="input-list" style="margin-left:20px">
<input type="text" class="" style="width:10px;" name="week_start7" maxlength="1" value="{$info.title|default=''}" placeholder="">
<input type="text" class="" style="width:10px;margin-left:5px" maxlength="1" name="week_start8" value="{$info.title|default=''}" placeholder="">
<span style="margin-left:10px">:</span>
<div class="input-append date" id="datetimepicker" style="display:inline-block;margin-left:5px">
<input type="text" class="" style="width:10px;" maxlength="1" name="week_start9" value="{$info.title|default=''}" placeholder="">
<input type="text" class="" style="width:10px;margin-left:5px" maxlength="1" name="week_start10" value="{$info.title|default=''}" placeholder="">
<span style="margin-left:10px">:</span>
<div class="input-append date" id="datetimepicker" style="display:inline-block;margin-left:5px">
<input type="text" class="" style="width:10px;" name="week_start11" maxlength="1" value="{$info.title|default=''}" placeholder="">
<input type="text" class="" style="width:10px;margin-left:5px" name="week_start12" maxlength="1" value="{$info.title|default=''}" placeholder="">
<span class="add-on"><i class="icon-th"></i></span>
</div>
</div>
</div>
</span>
</td>
</tr>
<tr>
<td class="l noticeinfo"></td>
<td class="r table_radio">
<span class="form_radio">
<label><input type="radio" name="status" value="month"/> 每月</label>
<span class="form_select" style="margin-left:5px">
<select name="month_remark">
<volist name="monthday" id="vo" key='k'>
<option value="{$vo}" selected>{$vo}</option>
</if>
</volist>
</select>
</span>
<div class="input-list" style="margin-left:20px">
<input type="text" class="" style="width:10px;" name="month_start1" maxlength="1" value="{$info.title|default=''}" placeholder="">
<input type="text" class="" style="width:10px;margin-left:5px" maxlength="1" name="month_start2" value="{$info.title|default=''}" placeholder="">
<span style="margin-left:10px">:</span>
<div class="input-append date" id="datetimepicker" style="display:inline-block;margin-left:5px">
<input type="text" class="" style="width:10px;" name="month_start3" maxlength="1" value="{$info.title|default=''}" placeholder="">
<input type="text" class="" style="width:10px;margin-left:5px" maxlength="1" name="month_start4" value="{$info.title|default=''}" placeholder="">
<span style="margin-left:10px">:</span>
<div class="input-append date" id="datetimepicker" style="display:inline-block;margin-left:5px">
<input type="text" class="" style="width:10px;" maxlength="1" name="month_start5" value="{$info.title|default=''}" placeholder="">
<input type="text" class="" style="width:10px;margin-left:5px" maxlength="1" name="month_start6" value="{$info.title|default=''}" placeholder="">
<span class="add-on"><i class="icon-th"></i></span>
</div>
</div>
</div>
<div class="input-list" style="margin-left:20px">
<input type="text" class="" style="width:10px;" name="month_start7" maxlength="1" value="{$info.title|default=''}" placeholder="">
<input type="text" class="" style="width:10px;margin-left:5px" maxlength="1" name="month_start8" value="{$info.title|default=''}" placeholder="">
<span style="margin-left:10px">:</span>
<div class="input-append date" id="datetimepicker" style="display:inline-block;margin-left:5px">
<input type="text" class="" style="width:10px;" name="month_start9" maxlength="1" value="{$info.title|default=''}" placeholder="">
<input type="text" class="" style="width:10px;margin-left:5px" maxlength="1" name="month_start10" value="{$info.title|default=''}" placeholder="">
<span style="margin-left:10px">:</span>
<div class="input-append date" id="datetimepicker" style="display:inline-block;margin-left:5px">
<input type="text" class="" style="width:10px;" maxlength="1" name="month_start11" value="{$info.title|default=''}" placeholder="">
<input type="text" class="" style="width:10px;margin-left:5px" maxlength="1" name="month_start12" value="{$info.title|default=''}" placeholder="">
<span class="add-on"><i class="icon-th"></i></span>
</div>
</div>
</div>
</span>
</td>
</tr>
<tr>
<td class="l noticeinfo"></td>
<td class="r table_radio">
<span class="form_radio">
<label><input type="radio" name="status" value="day" /> 特殊</label>
<div class="input-list" >
<input type="text" readonly id="time-start" name="day_remark" class="" value="{$startDate}"
placeholder="充值开始时间"/>
</div>
</span>
<div class="input-list" style="margin-left:17px">
<input type="text" class="" style="width:10px;" maxlength="1" name="day_start1" value="{$info.title|default=''}" placeholder="">
<input type="text" class="" style="width:10px;margin-left:5px" maxlength="1" name="day_start2" value="{$info.title|default=''}" placeholder="">
<span style="margin-left:10px">:</span>
<div class="input-append date" id="datetimepicker" style="display:inline-block;margin-left:5px">
<input type="text" class="" style="width:10px;" name="day_start3" maxlength="1" value="{$info.title|default=''}" placeholder="">
<input type="text" class="" style="width:10px;margin-left:5px" maxlength="1" name="day_start4" value="{$info.title|default=''}" placeholder="">
<span style="margin-left:10px">:</span>
<div class="input-append date" id="datetimepicker" style="display:inline-block;margin-left:5px">
<input type="text" class="" style="width:10px;" name="day_start5" maxlength="1" value="{$info.title|default=''}" placeholder="">
<input type="text" class="" style="width:10px;margin-left:5px" maxlength="1" name="day_start6" value="{$info.title|default=''}" placeholder="">
<span class="add-on"><i class="icon-th"></i></span>
</div>
</div>
</div>
<div class="input-list" style="margin-left:20px">
<input type="text" class="" style="width:10px;" name="day_start7" maxlength="1" value="{$info.title|default=''}" placeholder="">
<input type="text" class="" style="width:10px;margin-left:5px" maxlength="1" name="day_start8" value="{$info.title|default=''}" placeholder="">
<span style="margin-left:10px">:</span>
<div class="input-append date" id="datetimepicker" style="display:inline-block;margin-left:5px">
<input type="text" class="" style="width:10px;" maxlength="1" name="day_start9" value="{$info.title|default=''}" placeholder="">
<input type="text" class="" style="width:10px;margin-left:5px" maxlength="1" name="day_start10" value="{$info.title|default=''}" placeholder="">
<span style="margin-left:10px">:</span>
<div class="input-append date" id="datetimepicker" style="display:inline-block;margin-left:5px">
<input type="text" class="" style="width:10px;" maxlength="1" name="day_start11" value="{$info.title|default=''}" placeholder="">
<input type="text" class="" style="width:10px;margin-left:5px" maxlength="1" name="day_start12" value="{$info.title|default=''}" placeholder="">
<span class="add-on"><i class="icon-th"></i></span>
</div>
</div>
</div>
</td>
</tr>
</tbody>
</table>
<div class="form-item">
<input type="hidden" name="id" value="{$info.id|default=''}">
<button class="submit_btn ajax-post mlspacing" id="submit" type="submit" target-form="form-horizontal">确 定</button>
<button class="submit_btn " onclick="javascript:history.back(-1);return false;">返 回</button>
</div>
</form>
</div>
<div class="common_settings">
<span class="plus_icon"><span><img src="__IMG__/zwmimages/icon_jia.png"></span></span>
<form class="addShortcutIcon">
<input type="hidden" name="title" value="{$m_title}">
<input type="hidden" name="url" value="{$m_url}">
</form>
<a class="ajax-post add-butn <notempty name='commonset'>addSIsetted</notempty>" href="javascript:;" target-form="addShortcutIcon" url="{:U('Think/addShortcutIcon')}"><img src="__IMG__/zwmimages/icon_jia.png"><span><notempty name='commonset'>已添加<else />添加至常用设置</notempty></span></a>
</div>
</block>
<block name="script">
<script type="text/javascript">
//导航高亮
highlight_subnav('{:U('Tool/limitPay')}');
$(function () {
Think.setValue("type", {$info.type|default=0});
Think.setValue("category", {$info.category|default=0});
$("#category").change();
Think.setValue("group", {$info.group|default=0});
})
$("#category").change(function(){
$.ajax({
type:"POST",
dataType:"json",
async:false,
data:{category:$("#category").val()},
url:"{:U('Ajax/getConfigCategory')}",
success:function (data) {
$("#group").empty();
var str = "<option value='0'>不分类</option>";
for(var i in data){
str += "<option value="+i+">"+data[i]+"</option>";
}
$("#group").append(str);
}
})
})
</script>
<script>
$('#time-start').datetimepicker({
format: 'yyyy-mm-dd',
language: "zh-CN",
showMeridian:true,
pickDate:true,
minView: 2,
autoclose: true,
pickTime:true,
todayBtn:true,
minuteStep: 1,//分钟间隔1分钟
}).on('change',function(ev){
var val = new Date($.trim($(this).val())).getTime();
var end = new Date($.trim($('#time-end').val())).getTime();
if (val>end) {
layer.msg('开始时间大于结束时间!');$(this).val('');
}
return false;
});
$("#time-end").datetimepicker({
format:"hh:ii:ss",
language: "zh-CN",
showMeridian:true,
minView:0,
autoclose:true,
todayBtn:true,
}).on('change',function(ev){
var val = new Date($.trim($(this).val())).getTime();
var start = new Date($.trim($('#time-start').val())).getTime();
if (val<start) {
layer.msg('开始时间大于结束时间!');$(this).val('');
}
return false;
});
</script>
</block>

@ -0,0 +1,448 @@
<extend name="Public/base"/>
<block name="body">
<link href="__STATIC__/datetimepicker/css/datetimepicker.css" rel="stylesheet" type="text/css">
<link href="__STATIC__/datetimepicker/css/dropdown.css" rel="stylesheet" type="text/css">
<script type="text/javascript" src="__STATIC__/datetimepicker/js/bootstrap-datetimepicker.min.js"></script>
<script type="text/javascript" src="__STATIC__/datetimepicker/js/locales/bootstrap-datetimepicker.zh-CN.js"
charset="UTF-8"></script>
<div class="cf main-place top_nav_list navtab_list">
<h3 class="page_title">支付限额规则配置</h3>
<p class="description_text">说明:配置支付规则,控制支付渠道</p>
</div>
<div class="tab-content tabcon1711 tabcon17112">
<form action="{:U('editLimitPay')}" method="post" class="form-horizontal form_info_ml">
<table border="0" cellspacing="0" cellpadding="0">
<tbody>
<tr>
<td class="l noticeinfo">限制支付渠道</td>
<td class="r table_radio">
<span class="form_select">
<select name="pay_type">
<volist name="pay_type" id="vo" key='k'>
<if condition="$vo[paytag] eq $data[pay_type]">
<option value="{$vo.paytag}" selected>{$vo.name}</option>
<else />
<option value="{$vo.paytag}">{$vo.name}</option>
</if>
</volist>
</select>
</span>
</td>
</tr>
<tr>
<td class="l noticeinfo">限制规则</td>
<td class="r table_radio">
<span class="form_select-text">说明:强制限制和支付体验障碍</span>
</td>
</tr>
<tr>
<td class="l noticeinfo">全渠道总流水限制</td>
<td class="r table_radio">
<input type="text" class="" name="total_limit" value="{$data.total_limit}" placeholder="请输入额度">
</td>
</tr>
<tr>
<td class="l noticeinfo">玩家全渠道总流水限制</td>
<td class="r table_radio">
<input type="text" class="" name="user_total_limit" value="{$data.user_total_limit}" placeholder="请输入额度">
</td>
</tr>
<tr>
<td class="l noticeinfo">玩家单笔限制</td>
<td class="r table_radio">
<input type="text" class="" name="user_one_limit" value="{$data.user_one_limit}" placeholder="请输入额度">
</td>
</tr>
<tr>
<td class="l noticeinfo">限制方式 </td>
<td class="r table_radio">
<span class="form_select">
<select name="limit_type">
<option value="force" <eq name="data.limit_type" value="force"> selected </eq>>强制限制</option>
<option value="obstacles" <eq name="data.limit_type" value="obstacles"> selected </eq>>支付体验障碍</option>
</select>
</span>
<span class="notice-text">说明:强制限制和支付体验障碍</span>
</td>
</tr>
<tr>
<td class="l noticeinfo">限制时间</td>
<td class="r table_radio">
<span class="form_radio">
<label><input type="radio" name="status" value="daily" <eq name="data['limit_time_type']" value="day">checked="checked"</eq>> 每日</label>
<div class="input-list" style="margin-left:20px">
<input type="text" class="" style="width:10px;" maxlength="1" id="day_inp1" name="daily_start1" value="{$info.title|default=''}" placeholder="">
<input type="text" class="" style="width:10px;margin-left:5px" maxlength="1" id="day_inp2" name="daily_start2" value="{$info.title|default=''}" placeholder="">
<span style="margin-left:10px">:</span>
<div class="input-append date" id="datetimepicker" style="display:inline-block;margin-left:5px">
<input type="text" class="" style="width:10px;" maxlength="1" name="daily_start3" id="day_inp3" value="{$info.title|default=''}" placeholder="">
<input type="text" class="" style="width:10px;margin-left:5px" maxlength="1" id="day_inp4" name="daily_start4" value="{$info.title|default=''}" placeholder="">
<span style="margin-left:10px">:</span>
<div class="input-append date" id="datetimepicker" style="display:inline-block;margin-left:5px">
<input type="text" class="" style="width:10px;" maxlength="1" name="daily_start5" id="day_inp5" value="{$info.title|default=''}" placeholder="">
<input type="text" class="" style="width:10px;margin-left:5px" maxlength="1" id="day_inp6" name="daily_start6" value="{$info.title|default=''}" placeholder="">
<span class="add-on"><i class="icon-th"></i></span>
</div>
</div>
</div>
<div class="input-list" style="margin-left:20px">
<input type="text" class="" style="width:10px;" maxlength="1" name="daily_start7" id="day_inp7" value="{$info.title|default=''}" placeholder="">
<input type="text" class="" style="width:10px;margin-left:5px" maxlength="1" id="day_inp8" name="daily_start8" value="{$info.title|default=''}" placeholder="">
<span style="margin-left:10px">:</span>
<div class="input-append date" id="datetimepicker" style="display:inline-block;margin-left:5px">
<input type="text" class="" style="width:10px;" maxlength="1" name="daily_start9" id="day_inp9" value="{$info.title|default=''}" placeholder="">
<input type="text" class="" style="width:10px;margin-left:5px" maxlength="1" id="day_inp10" name="daily_start10" value="{$info.title|default=''}" placeholder="">
<span style="margin-left:10px">:</span>
<div class="input-append date" id="datetimepicker" style="display:inline-block;margin-left:5px">
<input type="text" class="" style="width:10px;" maxlength="1" name="daily_start11" id="day_inp11" value="{$info.title|default=''}" placeholder="">
<input type="text" class="" style="width:10px;margin-left:5px" maxlength="1" id="day_inp12" name="daily_start12" value="{$info.title|default=''}" placeholder="">
<span class="add-on"><i class="icon-th"></i></span>
</div>
</div>
</div>
</span>
<span class="notice-text">说明:时间格式(00:00:00)</span>
</td>
</tr>
<tr>
<td class="l noticeinfo"></td>
<td class="r table_radio">
<span class="form_radio">
<label><input type="radio" name="status" value="week" <eq name="data['limit_time_type']" value="week">checked="checked"</eq> /> 每周</label>
<span class="form_select" style="margin-left:5px">
<select name="week_remark">
<option value="1" <eq name="data['limit_time_type_remark']" value="1">selected</eq> >周一</option>
<option value="2" <eq name="data['limit_time_type_remark']" value="2">selected</eq>>周二</option>
<option value="3" <eq name="data['limit_time_type_remark']" value="3">selected</eq>>周三</option>
<option value="4" <eq name="data['limit_time_type_remark']" value="4">selected</eq>>周四</option>
<option value="5" <eq name="data['limit_time_type_remark']" value="5">selected</eq>>周五</option>
<option value="6" <eq name="data['limit_time_type_remark']" value="6">selected</eq>>周六</option>
<option value="7" <eq name="data['limit_time_type_remark']" value="7">selected</eq>>周天</option>
</select>
</span>
<div class="input-list" style="margin-left:20px">
<input type="text" class="" id="week_inp1" style="width:10px;" maxlength="1" name="week_start1">
<input type="text" class="" style="width:10px;margin-left:5px" id="week_inp2" maxlength="1" name="week_start2" value="" placeholder="">
<span style="margin-left:10px">:</span>
<div class="input-append date" id="datetimepicker" style="display:inline-block;margin-left:5px">
<input type="text" class="" style="width:10px;" maxlength="1" id="week_inp3" name="week_start3" value="" placeholder="">
<input type="text" class="" style="width:10px;margin-left:5px" maxlength="1" id="week_inp4"name="week_start4" value="" placeholder="">
<span style="margin-left:10px">:</span>
<div class="input-append date" id="datetimepicker" style="display:inline-block;margin-left:5px">
<input type="text" class="" style="width:10px;" maxlength="1" name="week_start5" id="week_inp5" value="" placeholder="">
<input type="text" class="" style="width:10px;margin-left:5px" maxlength="1" name="week_start6" id="week_inp6" value="" placeholder="">
<span class="add-on"><i class="icon-th"></i></span>
</div>
</div>
</div>
<div class="input-list" style="margin-left:20px">
<input type="text" class="" style="width:10px;" id="week_inp7" name="week_start7" maxlength="1" value="" placeholder="">
<input type="text" class="" style="width:10px;margin-left:5px" id="week_inp8" maxlength="1" name="week_start8" value="" placeholder="">
<span style="margin-left:10px">:</span>
<div class="input-append date" id="datetimepicker" style="display:inline-block;margin-left:5px">
<input type="text" class="" style="width:10px;" maxlength="1" id="week_inp9" name="week_start9" value="" placeholder="">
<input type="text" class="" style="width:10px;margin-left:5px" maxlength="1" id="week_inp10" name="week_start10" value="" placeholder="">
<span style="margin-left:10px">:</span>
<div class="input-append date" id="datetimepicker" style="display:inline-block;margin-left:5px">
<input type="text" class="" style="width:10px;" name="week_start11" maxlength="1" id="week_inp11" value="" placeholder="">
<input type="text" class="" style="width:10px;margin-left:5px" name="week_start12" id="week_inp12" maxlength="1" value="" placeholder="">
<span class="add-on"><i class="icon-th"></i></span>
</div>
</div>
</div>
</span>
</td>
</tr>
<tr>
<td class="l noticeinfo"></td>
<td class="r table_radio">
<span class="form_radio">
<label><input type="radio" name="status" value="month" <eq name="data['limit_time_type']" value="month">checked="checked"</eq>/> 每月</label>
<span class="form_select" style="margin-left:5px">
<select name="month_remark">
<volist name="monthday" id="vo" key='k'>
<if condition="$vo eq $data[limit_time_type_remark]">
<option value="{$vo}" selected>{$vo}</option>
<else />
<option value="{$vo.paytag}">{$vo}</option>
</if>
</volist>
</select>
</span>
<div class="input-list" style="margin-left:20px">
<input type="text" class="" style="width:10px;" name="month_start1" id="month_inp1" maxlength="1" value="{$info.title|default=''}" placeholder="">
<input type="text" class="" style="width:10px;margin-left:5px" maxlength="1" id="month_inp2" name="month_start2" value="{$info.title|default=''}" placeholder="">
<span style="margin-left:10px">:</span>
<div class="input-append date" id="datetimepicker" style="display:inline-block;margin-left:5px">
<input type="text" class="" style="width:10px;" name="month_start3" maxlength="1" id="month_inp3" value="{$info.title|default=''}" placeholder="">
<input type="text" class="" style="width:10px;margin-left:5px" maxlength="1" id="month_inp4" name="month_start4" value="{$info.title|default=''}" placeholder="">
<span style="margin-left:10px">:</span>
<div class="input-append date" id="datetimepicker" style="display:inline-block;margin-left:5px">
<input type="text" class="" style="width:10px;" maxlength="1" id="month_inp5" name="month_start5" value="{$info.title|default=''}" placeholder="">
<input type="text" class="" style="width:10px;margin-left:5px" id="month_inp6" maxlength="1" name="month_start6" value="{$info.title|default=''}" placeholder="">
<span class="add-on"><i class="icon-th"></i></span>
</div>
</div>
</div>
<div class="input-list" style="margin-left:20px">
<input type="text" class="" style="width:10px;" name="month_start7" maxlength="1" id="month_inp7" value="{$info.title|default=''}" placeholder="">
<input type="text" class="" style="width:10px;margin-left:5px" maxlength="1" id="month_inp8" name="month_start8" value="{$info.title|default=''}" placeholder="">
<span style="margin-left:10px">:</span>
<div class="input-append date" id="datetimepicker" style="display:inline-block;margin-left:5px">
<input type="text" class="" style="width:10px;" name="month_start9" maxlength="1" id="month_inp9" value="{$info.title|default=''}" placeholder="">
<input type="text" class="" style="width:10px;margin-left:5px" maxlength="1" id="month_inp10" name="month_start10" value="{$info.title|default=''}" placeholder="">
<span style="margin-left:10px">:</span>
<div class="input-append date" id="datetimepicker" style="display:inline-block;margin-left:5px">
<input type="text" class="" style="width:10px;" maxlength="1" id="month_inp11" name="month_start11" value="{$info.title|default=''}" placeholder="">
<input type="text" class="" style="width:10px;margin-left:5px" id="month_inp12" maxlength="1" name="month_start12" value="{$info.title|default=''}" placeholder="">
<span class="add-on"><i class="icon-th"></i></span>
</div>
</div>
</div>
</span>
</td>
</tr>
<tr>
<td class="l noticeinfo"></td>
<td class="r table_radio">
<span class="form_radio">
<label><input type="radio" name="status" value="day" <eq name="data['limit_time_type']" value="fix">checked="checked"</eq>/> 特殊</label>
<div class="input-list" >
<input type="text" readonly id="time-start" name="day_remark" class="" value=""
placeholder="日期"/>
</div>
</span>
<div class="input-list" style="margin-left:17px">
<input type="text" class="" style="width:10px;" maxlength="1" id="fix_inp1" name="day_start1" value="" placeholder="">
<input type="text" class="" style="width:10px;margin-left:5px" id="fix_inp2" maxlength="1" name="day_start2" value="" placeholder="">
<span style="margin-left:10px">:</span>
<div class="input-append date" id="datetimepicker" style="display:inline-block;margin-left:5px">
<input type="text" class="" style="width:10px;" name="day_start3" id="fix_inp3" maxlength="1" value="" placeholder="">
<input type="text" class="" style="width:10px;margin-left:5px" id="fix_inp4" maxlength="1" name="day_start4" value="" placeholder="">
<span style="margin-left:10px">:</span>
<div class="input-append date" id="datetimepicker" style="display:inline-block;margin-left:5px">
<input type="text" class="" style="width:10px;" id="fix_inp5" name="day_start5" maxlength="1" value="" placeholder="">
<input type="text" class="" style="width:10px;margin-left:5px" id="fix_inp6" maxlength="1" name="day_start6" value="" placeholder="">
<span class="add-on"><i class="icon-th"></i></span>
</div>
</div>
</div>
<div class="input-list" style="margin-left:20px">
<input type="text" class="" style="width:10px;" name="day_start7" maxlength="1" id="fix_inp7" value="" placeholder="">
<input type="text" class="" style="width:10px;margin-left:5px" maxlength="1" id="fix_inp8" name="day_start8" value="" placeholder="">
<span style="margin-left:10px">:</span>
<div class="input-append date" id="datetimepicker" style="display:inline-block;margin-left:5px">
<input type="text" class="" style="width:10px;" maxlength="1" name="day_start9" id="fix_inp9" value="" placeholder="">
<input type="text" class="" style="width:10px;margin-left:5px" maxlength="1" id="fix_inp10" name="day_start10" value="" placeholder="">
<span style="margin-left:10px">:</span>
<div class="input-append date" id="datetimepicker" style="display:inline-block;margin-left:5px">
<input type="text" class="" style="width:10px;" maxlength="1" name="day_start11" id="fix_inp11" value="" placeholder="">
<input type="text" class="" style="width:10px;margin-left:5px" maxlength="1" id="fix_inp12"name="day_start12" value="" placeholder="">
<span class="add-on"><i class="icon-th"></i></span>
</div>
</div>
</div>
</td>
</tr>
</tbody>
</table>
<div class="form-item">
<input type="hidden" name="id" value="{$data.id|default=''}">
<button class="submit_btn ajax-post mlspacing" id="submit" type="submit" target-form="form-horizontal">编 辑</button>
<button class="submit_btn " onclick="javascript:history.back(-1);return false;">返 回</button>
</div>
</form>
</div>
<div class="common_settings">
<span class="plus_icon"><span><img src="__IMG__/zwmimages/icon_jia.png"></span></span>
<form class="addShortcutIcon">
<input type="hidden" name="title" value="{$m_title}">
<input type="hidden" name="url" value="{$m_url}">
</form>
<a class="ajax-post add-butn <notempty name='commonset'>addSIsetted</notempty>" href="javascript:;" target-form="addShortcutIcon" url="{:U('Think/addShortcutIcon')}"><img src="__IMG__/zwmimages/icon_jia.png"><span><notempty name='commonset'>已添加<else />添加至常用设置</notempty></span></a>
</div>
</block>
<block name="script">
<script>
var limit_type = '{$data.limit_time_type}'
var fixdate = '{$data.limit_time_type_remark}'
var starttime = '{$startTime}'
var starttimeArr = starttime.split("");
var endtime = '{$endTime}'
var endtimeArr = endtime.split("")
console.log(endtimeArr)
if (limit_type == 'day') {
document.getElementById('day_inp1').value = starttimeArr[0]
document.getElementById('day_inp2').value = starttimeArr[1]
document.getElementById('day_inp3').value = starttimeArr[2]
document.getElementById('day_inp4').value = starttimeArr[3]
document.getElementById('day_inp5').value = starttimeArr[4]
document.getElementById('day_inp6').value = starttimeArr[5]
document.getElementById('day_inp7').value = endtimeArr[0]
document.getElementById('day_inp8').value = endtimeArr[1]
document.getElementById('day_inp9').value = endtimeArr[2]
document.getElementById('day_inp10').value = endtimeArr[3]
document.getElementById('day_inp11').value = endtimeArr[4]
document.getElementById('day_inp12').value = endtimeArr[5]
}
if (limit_type == 'week') {
document.getElementById('week_inp1').value = starttimeArr[0]
document.getElementById('week_inp2').value = starttimeArr[1]
document.getElementById('week_inp3').value = starttimeArr[2]
document.getElementById('week_inp4').value = starttimeArr[3]
document.getElementById('week_inp5').value = starttimeArr[4]
document.getElementById('week_inp6').value = starttimeArr[5]
document.getElementById('week_inp7').value = endtimeArr[0]
document.getElementById('week_inp8').value = endtimeArr[1]
document.getElementById('week_inp9').value = endtimeArr[2]
document.getElementById('week_inp10').value = endtimeArr[3]
document.getElementById('week_inp11').value = endtimeArr[4]
document.getElementById('week_inp12').value = endtimeArr[5]
}
if (limit_type == 'month') {
document.getElementById('month_inp1').value = starttimeArr[0]
document.getElementById('month_inp2').value = starttimeArr[1]
document.getElementById('month_inp3').value = starttimeArr[2]
document.getElementById('month_inp4').value = starttimeArr[3]
document.getElementById('month_inp5').value = starttimeArr[4]
document.getElementById('month_inp6').value = starttimeArr[5]
document.getElementById('month_inp7').value = endtimeArr[0]
document.getElementById('month_inp8').value = endtimeArr[1]
document.getElementById('month_inp9').value = endtimeArr[2]
document.getElementById('month_inp10').value = endtimeArr[3]
document.getElementById('month_inp11').value = endtimeArr[4]
document.getElementById('month_inp12').value = endtimeArr[5]
}
if (limit_type == 'fix') {
console.log(limit_type)
console.log(fixdate)
document.getElementById('time-start').value = fixdate
document.getElementById('fix_inp1').value = starttimeArr[0]
document.getElementById('fix_inp2').value = starttimeArr[1]
document.getElementById('fix_inp3').value = starttimeArr[2]
document.getElementById('fix_inp4').value = starttimeArr[3]
document.getElementById('fix_inp5').value = starttimeArr[4]
document.getElementById('fix_inp6').value = starttimeArr[5]
document.getElementById('fix_inp7').value = endtimeArr[0]
document.getElementById('fix_inp8').value = endtimeArr[1]
document.getElementById('fix_inp9').value = endtimeArr[2]
document.getElementById('fix_inp10').value = endtimeArr[3]
document.getElementById('fix_inp11').value = endtimeArr[4]
document.getElementById('fix_inp12').value = endtimeArr[5]
}
</script>
<script type="text/javascript">
//导航高亮
highlight_subnav('{:U('Tool/limitPay')}');
$(function () {
Think.setValue("type", {$info.type|default=0});
Think.setValue("category", {$info.category|default=0});
$("#category").change();
Think.setValue("group", {$info.group|default=0});
})
$("#category").change(function(){
$.ajax({
type:"POST",
dataType:"json",
async:false,
data:{category:$("#category").val()},
url:"{:U('Ajax/getConfigCategory')}",
success:function (data) {
$("#group").empty();
var str = "<option value='0'>不分类</option>";
for(var i in data){
str += "<option value="+i+">"+data[i]+"</option>";
}
$("#group").append(str);
}
})
})
</script>
<script>
$('#time-start').datetimepicker({
format: 'yyyy-mm-dd',
language: "zh-CN",
showMeridian:true,
pickDate:true,
minView: 2,
autoclose: true,
pickTime:true,
todayBtn:true,
minuteStep: 1,//分钟间隔1分钟
}).on('change',function(ev){
var val = new Date($.trim($(this).val())).getTime();
var end = new Date($.trim($('#time-end').val())).getTime();
if (val>end) {
layer.msg('开始时间大于结束时间!');$(this).val('');
}
return false;
});
$("#time-end").datetimepicker({
format:"hh:ii:ss",
language: "zh-CN",
showMeridian:true,
minView:2,
autoclose:true,
todayBtn:true,
}).on('change',function(ev){
var val = new Date($.trim($(this).val())).getTime();
var start = new Date($.trim($('#time-start').val())).getTime();
if (val<start) {
layer.msg('开始时间大于结束时间!');$(this).val('');
}
return false;
});
</script>
</block>

@ -0,0 +1,144 @@
<extend name="Public/base"/>
<block name="body">
<div class="cf main-place top_nav_list navtab_list">
<h3 class="page_title">支付限额规则配置</h3>
<p class="description_text">说明:配置支付规则,控制支付渠道</p>
</div>
<div class="cf top_nav_list">
<div class="fl button_list">
<a class="" href="{:U('addLimitPay')}"><span class="button_icon button_icon1"></span>新增规则</a>
<!-- <a class=" list_sort" url="{:U('sort?group='.I('group'),'','')}"><span class="button_icon button_icon18"></span>排序</a> -->
</div>
<!-- 高级搜索 -->
<div class="jssearch fl cf search_list">
<div class="input-list input-list-game search_label_rehab">
<select id="game_type" name="pay_type" class="select_gallery" >
<option value="" <eq name="pay_type" value=" "> selected </eq>>请选择支付渠道</option>
<option value="alipay" <eq name="pay_type" value="alipay"> selected </eq>>支付宝</option>
<option value="wxpay" <eq name="pay_type" value="wxpay"> selected </eq>>微信</option>
<option value="yeepay" <eq name="pay_type" value="yeepay"> selected </eq>>易宝支付</option>
<option value="sqpay" <eq name="pay_type" value="sqpay"> selected </eq>>双乾</option>
</select>
</div>
<div class="input-list input-list-game search_label_rehab">
<select id="game_type" name="limit_type" class="select_gallery" >
<option value="" <eq name="limit_type" value=" "> selected </eq>>请选择限制类型</option>
<option value="force" <eq name="limit_type" value="force"> selected </eq>>强制限制</option>
<option value="obstacles" <eq name="limit_type" value="obstacles"> selected </eq>>障碍类型</option>
</select>
</div>
<div class="sleft">
<!-- <input type="text" name="name" class="search-input" value="{:I('name')}" placeholder="配置名称"> -->
<a class="sch-btn" href="javascript:;" id="search" url="{:U('Tool/limitPay',array('row'=>I('row')))}">搜索</a>
</div>
</div>
</div>
<div class="data_list">
<table>
<thead>
<tr>
<th>限制序号</th>
<th>限制支付渠道</th>
<th>限制规则</th>
<th>限制方式</th>
<th>限制时间</th>
<th>操作</th>
</tr>
</thead>
<tbody>
<notempty name="datas">
<volist name="datas" id="data">
<tr>
<td>{$data.id}</td>
<td>{$data.pay_type}</td>
<td>{$data.limit_rule}</td>
<td>{$data.limit_type}</td>
<td>{$data.limit_time}</td>
<td>
<a title="编辑" href="{:U('editLimitPay?id='.$data['id'])}">编辑</a>
<a class="confirm ajax-get" title="删除" href="{:U('delLimitPay?id='.$data['id'])}">删除</a>
</td>
</tr>
</volist>
<else/>
<td colspan="6" class="text-center">aOh! 暂时还没有内容!</td>
</notempty>
</tbody>
</table>
<!-- 分页 -->
<div class="page">
{$_page}
</div>
</div>
<div class="common_settings">
<span class="plus_icon"><span><img src="__IMG__/zwmimages/icon_jia.png"></span></span>
<form class="addShortcutIcon">
<input type="hidden" name="title" value="{$m_title}">
<input type="hidden" name="url" value="{$m_url}">
</form>
<a class="ajax-post add-butn <notempty name='commonset'>addSIsetted</notempty>" href="javascript:;" target-form="addShortcutIcon" url="{:U('Think/addShortcutIcon')}"><img src="__IMG__/zwmimages/icon_jia.png"><span><notempty name='commonset'>已添加<else />添加至常用设置</notempty></span></a>
</div>
</block>
<block name="script">
<script type="text/javascript">
highlight_subnav('{:U('Tool/limitPay')}');
Think.setValue('row','{:I("row",10)}');
$(function(){
//搜索功能
$("#search").click(function(){
console.log('0000')
var url = $(this).attr('url');
var query = $('.jssearch').find('input').serialize();
query += "&"+$('.jssearch').find('select').serialize();
console.log('vvv',query)
query = query.replace(/(&|^)(\w*?\d*?\-*?_*?)*?=?((?=&)|(?=$))/g,'');
query = query.replace(/^&/g,'');
if( url.indexOf('?')>0 ){
url += '&' + query;
}else{
url += '?' + query;
}
window.location.href = url;
});
//回车搜索
$(".search-input").keyup(function(e){
if(e.keyCode === 13){
$("#search").click();
return false;
}
});
//点击排序
$('.list_sort').click(function(){
var url = $(this).attr('url');
var ids = $('.ids:checked');
var param = '';
if(ids.length > 0){
var str = new Array();
ids.each(function(){
str.push($(this).val());
});
param = str.join(',');
}
if(url != undefined && url != ''){
window.location.href = url + '/ids/' + param;
}
});
});
</script>
</block>
Loading…
Cancel
Save