Merge branch 'feature/limit_pay' of wmtx/platform into release

支付限额
master
廖金灵 5 years ago committed by Gogs
commit 985fdab851

@ -2716,6 +2716,133 @@ class ExportController extends Controller
fclose($fp);
exit;
break;
case 30:
$xlsCell = array(
"限制序号","限制支付渠道", "限制规则", "限制方式", "限制时间"
);
$params = I('get.');
$payType = $params['pay_type'];
$limit_type = $params['limit_type'];
$map = [];
if (!empty($payType)) {
$map['pay_type'] = $payType;
}
if (!empty($limit_type)) {
$map['limit_type'] = $limit_type;
}
$datas = M('pay_limit_conf', 'tab_')
->field('id')
->where($map)
->order('id desc')
->select();
$csvFileName = '支付限额配置'.'.csv';
//设置好告诉浏览器要下载excel文件的headers
header('Content-Description: File Transfer');
header('Content-Type: application/vnd.ms-excel');
header('Content-Disposition: attachment; filename="'. $csvFileName .'"');
header('Expires: 0');
header('Cache-Control: must-revalidate');
header('Pragma: public');
$fp = fopen('php://output', 'a');//打开output流
mb_convert_variables('GBK', 'UTF-8', $xlsCell);
fputcsv($fp, $xlsCell);//将数据格式化为CSV格式并写入到output流中
$counts = count($datas);
$perSize = 10000;//每次查询的条数
$pages = ceil($counts / $perSize);
for($i = 1; $i <= $pages; $i++) {
$datas = M('pay_limit_conf', 'tab_')
->where($map)
->order('id desc')
->limit(($i-1)*$perSize ,$perSize)
->select();
foreach ($datas as $key => $data) {
$csvdata['id'] = $data['id'];
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 = '双乾';
}
if ($data['limit_time_type'] == 'day') {
$limit_time_type = '每日,';
}
if ($data['limit_time_type'] == 'week') {
$limit_time_type = '每周,';
}
if ($data['limit_time_type'] == 'month') {
$limit_time_type = '每月,';
}
if ($data['limit_time_type'] == 'fix') {
$limit_time_type = '特殊,';
}
$csvdata['pay_type'] = $pay_type;
$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 = '暂无规则';
}
$csvdata['limit_rule'] = $limit_rule;
if ($data['limit_type'] == 'force') {
$csvdata['limit_type'] = '强制模式';
}
if ($data['limit_type'] == 'obstacles') {
$csvdata['limit_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;
}
}
$csvdata['limit_time'] = $limit_time_type .$data['limit_time_type_remark'].' '.$startTimeStr.'~'.$endTimeStr;
mb_convert_variables('GBK', 'UTF-8', $csvdata);
fputcsv($fp, $csvdata);
}
unset($csvdata);//释放变量的内存
//刷新输出缓冲到浏览器
ob_flush();
flush();//必须同时使用 ob_flush() 和flush() 函数来刷新输出缓冲。
}
fclose($fp);
exit;
break;
default:
$xlsName = $xlsCell = $xlsData = [];

@ -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,483 @@ class ToolController extends ThinkController {
}
public function limitPay($page = 1) {
$page = intval(I('get.p', 0));
$page = $page ? $page : 1; //默认显示第一页数据
$row = intval(I('row', 0));
$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 (!empty(intval($data['user_total_limit']))) {
$limit_rule .= '玩家全渠道总流水限额'.$data['user_total_limit']."&nbsp&nbsp&nbsp&nbsp";
}
if (!empty(intval($data['total_limit']))) {
$limit_rule .= '全渠道总流水限额'.$data['total_limit']."&nbsp&nbsp&nbsp&nbsp";
}
if (!empty(intval($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'] = '每日,';
$remarkStr = '';
}
if ($data['limit_time_type'] == 'week') {
$data['limit_time_type'] = '每周,';
if ($data['limit_time_type_remark'] == 1) $remarkStr = "周一";
if ($data['limit_time_type_remark'] == 2) $remarkStr = "周二";
if ($data['limit_time_type_remark'] == 3) $remarkStr = "周三";
if ($data['limit_time_type_remark'] == 4) $remarkStr = "周四";
if ($data['limit_time_type_remark'] == 5) $remarkStr = "周五";
if ($data['limit_time_type_remark'] == 6) $remarkStr = "周六";
if ($data['limit_time_type_remark'] == 7) $remarkStr = "周七";
}
if ($data['limit_time_type'] == 'month') {
$data['limit_time_type'] = '每月,';
$remarkStr = $data['limit_time_type_remark'].'日';
}
if ($data['limit_time_type'] == 'fix') {
$data['limit_time_type'] = '特殊,';
$remarks = str_split($data['limit_time_type_remark'], 1);
$remarkStr = '';
foreach($remarks as $keyR => $remark) {
if ($keyR == 3 || $keyR == 5){
$remarkStr .= $remark. '-';
}else {
$remarkStr .= $remark;
}
}
}
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'] .$remarkStr.' '.$startTimeStr.'~'.$endTimeStr;
}
//分页
$parameter['p'] = $page;
$parameter['row'] = $row;
$page = set_pagination($count, $row, $parameter);
if ($page) {
$this->assign('_page', $page);
}
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(intval($total_limit))&&empty(intval($user_total_limit))&&empty(intval($user_one_limit))) {
return $this->error('限额不能为空');
}
if (!is_numeric($total_limit) || !is_numeric($user_total_limit) || !is_numeric($user_one_limit) || $total_limit < 0 ||$user_total_limit < 0 ||$user_one_limit < 0 ) {
return $this->error('限制金额出错');
}
if (intval($total_limit) > 1000000000000.00 || intval($user_total_limit) > 1000000000000.00 ||intval($user_one_limit) > 1000000000000.00) {
return $this->error('限制金额超出范围');
}
if (empty($limit_type)) {
return $this->error('限制方式不能为空');
}
$paramsName = $status.'_start';
for ($i = 1; $i < 13; $i++) {
$name = $paramsName.$i;
if ($_REQUEST[$name] == '') {
return $this->error('时间选择不能为空');
}else {
if ($i < 7) {
$startTime .= $_REQUEST[$name];
}else {
$endTime .= $_REQUEST[$name];
}
}
$this->checkTimeFormat($i, $startTime, $endTime, $_REQUEST[$name]);
}
$start_timeArr = str_split($startTime, 1);
$startTimeStr = '';
foreach ($start_timeArr as $timeKey => $start_time) {
if ($timeKey == 1 || $timeKey == 3) {
$startTimeStr .= $start_time.':';
}else {
$startTimeStr .= $start_time;
}
}
$st = '2020-03-23'.' '.$startTimeStr;
$startTimeStamp = strtotime($st);
$end_timeArr = str_split($endTime, 1);
$endTimeStr = '';
foreach ($end_timeArr as $timeKey1 => $end_time) {
if ($timeKey1 == 1 || $timeKey1 == 3) {
$endTimeStr .= $end_time.':';
}else {
$endTimeStr .= $end_time;
}
}
$et = '2020-03-23'.' '.$endTimeStr;
$endTimeStamp = strtotime($et);
if ($startTimeStamp >= $endTimeStamp) {
return $this->error('开始时间不能大于结束时间');
}
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 {
$fixStr = str_replace('-','',$_REQUEST['day_remark']);
$data['limit_time_type_remark'] = $fixStr;
$data['fix_date'] = $fixStr;
}
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(intval($total_limit))&&empty(intval($user_total_limit))&&empty(intval($user_one_limit))) {
return $this->error('限额不能为空');
}
if (!is_numeric($total_limit) || !is_numeric($user_total_limit) || !is_numeric($user_one_limit) || $total_limit < 0 ||$user_total_limit < 0 ||$user_one_limit < 0 ) {
return $this->error('限额金额出错');
}
if (empty($id)) {
return $this->error('编辑信息出错');
}
if (intval($total_limit) > 1000000000000.00 || intval($user_total_limit) > 1000000000000.00 ||intval($user_one_limit) > 1000000000000.00) {
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 ($_REQUEST[$name] == '') {
return $this->error('时间选择不能为空');
}else {
if ($i < 7) {
$startTime .= $_REQUEST[$name];
}else {
$endTime .= $_REQUEST[$name];
}
}
$this->checkTimeFormat($i, $startTime, $endTime, $_REQUEST[$name]);
}
$st = '2020-03-23'.' '.$startTimeStr;
$startTimeStamp = strtotime($st);
$end_timeArr = str_split($endTime, 1);
$endTimeStr = '';
foreach ($end_timeArr as $timeKey1 => $end_time) {
if ($timeKey1 == 1 || $timeKey1 == 3) {
$endTimeStr .= $end_time.':';
}else {
$endTimeStr .= $end_time;
}
}
$et = '2020-03-23'.' '.$endTimeStr;
$endTimeStamp = strtotime($et);
if ($startTimeStamp >= $endTimeStamp) {
return $this->error('开始时间不能大于结束时间');
}
$confInfo['start_time'] = $startTime;
$confInfo['end_time'] = $endTime;
switch($status) {
case 'daily':
$limit_time_type = 'day';
$confInfo['limit_time_type_remark'] = "";
$confInfo['fix_date'] = '';
break;
case 'week':
$limit_time_type = 'week';
if (empty($_REQUEST['week_remark'])) {
return $this->error('每周限制时间未确定');
}else {
$confInfo['limit_time_type_remark'] = $_REQUEST['week_remark'];
}
$confInfo['fix_date'] = '';
break;
case 'month':
$limit_time_type = 'month';
if (empty($_REQUEST['month_remark'])) {
return $this->error('每月限制时间未确定');
}else {
$confInfo['limit_time_type_remark'] = $_REQUEST['month_remark'];
}
$confInfo['fix_date'] = '';
break;
case 'day':
$limit_time_type = 'fix';
if (empty($_REQUEST['day_remark'])) {
return $this->error('每月限制时间未确定');
}else {
$fixStr = str_replace('-','',$_REQUEST['day_remark']);
$confInfo['limit_time_type_remark'] = $fixStr;
$confInfo['fix_date'] = $fixStr;
}
// $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();
if ($data['limit_time_type'] == 'fix') {
$remarks = str_split($data['limit_time_type_remark'], 1);
$remarkStr = '';
foreach($remarks as $keyR => $remark) {
if ($keyR == 3 || $keyR == 5){
$remarkStr .= $remark. '-';
}else {
$remarkStr .= $remark;
}
}
$data['limit_time_type_remark'] = $remarkStr;
}
$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,537 @@
<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" onclick="changeStatus(1)"/> 每日</label>
<div class="input-list" style="margin-left:20px" id="startDay">
<input type="text" class="" id="day_inp1" style="width:7px;border:none;border-radius:0px;border-bottom:1px solid #ccc;-webkit-box-shadow:inset 0 0px 0px rgba(0,0,0,0.075);box-shadow: inset 0 0px 0px rgba(0,0,0,0.075);" maxlength="1" name="daily_start1" value="{$info.title|default='0'}" placeholder="">
<input type="text" class="" id="day_inp2" style="width:7px;border:none;border-radius:0px;border-bottom:1px solid #ccc;-webkit-box-shadow:inset 0 0px 0px rgba(0,0,0,0.075);box-shadow: inset 0 0px 0px rgba(0,0,0,0.075);" maxlength="1" name="daily_start2" value="{$info.title|default='0'}" 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="" id="day_inp3" style="width:7px;border:none;border-radius:0px;border-bottom:1px solid #ccc;-webkit-box-shadow:inset 0 0px 0px rgba(0,0,0,0.075);box-shadow: inset 0 0px 0px rgba(0,0,0,0.075);" maxlength="1" name="daily_start3" value="{$info.title|default='0'}" placeholder="">
<input type="text" class="" id="day_inp4" style="width:7px;border:none;border-radius:0px;border-bottom:1px solid #ccc;-webkit-box-shadow:inset 0 0px 0px rgba(0,0,0,0.075);box-shadow: inset 0 0px 0px rgba(0,0,0,0.075);" maxlength="1" name="daily_start4" value="{$info.title|default='0'}" 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="" id="day_inp5" style="width:7px;border:none;border-radius:0px;border-bottom:1px solid #ccc;-webkit-box-shadow:inset 0 0px 0px rgba(0,0,0,0.075);box-shadow: inset 0 0px 0px rgba(0,0,0,0.075);" maxlength="1" name="daily_start5" value="{$info.title|default='0'}" placeholder="">
<input type="text" class="" id="day_inp6" style="width:7px;border:none;border-radius:0px;border-bottom:1px solid #ccc;-webkit-box-shadow:inset 0 0px 0px rgba(0,0,0,0.075);box-shadow: inset 0 0px 0px rgba(0,0,0,0.075);" maxlength="1" name="daily_start6" value="{$info.title|default='0'}" placeholder="">
<span style="margin-left:10px"></span>
</div>
</div>
</div>
<div class="input-list" style="margin-left:20px" id="endDay">
<input type="text" class="" id="day_inp7" style="width:7px;border:none;border-radius:0px;border-bottom:1px solid #ccc;-webkit-box-shadow:inset 0 0px 0px rgba(0,0,0,0.075);box-shadow: inset 0 0px 0px rgba(0,0,0,0.075);" maxlength="1" name="daily_start7" value="{$info.title|default='2'}" placeholder="">
<input type="text" class="" id="day_inp8" style="width:7px;border:none;border-radius:0px;border-bottom:1px solid #ccc;-webkit-box-shadow:inset 0 0px 0px rgba(0,0,0,0.075);box-shadow: inset 0 0px 0px rgba(0,0,0,0.075);" maxlength="1" name="daily_start8" value="{$info.title|default='3'}" 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="" id="day_inp9" style="width:7px;border:none;border-radius:0px;border-bottom:1px solid #ccc;-webkit-box-shadow:inset 0 0px 0px rgba(0,0,0,0.075);box-shadow: inset 0 0px 0px rgba(0,0,0,0.075);" maxlength="1" name="daily_start9" value="{$info.title|default='5'}" placeholder="">
<input type="text" class="" id="day_inp10" style="width:7px;border:none;border-radius:0px;border-bottom:1px solid #ccc;-webkit-box-shadow:inset 0 0px 0px rgba(0,0,0,0.075);box-shadow: inset 0 0px 0px rgba(0,0,0,0.075);" maxlength="1" name="daily_start10" value="{$info.title|default='9'}" 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="" id="day_inp11" style="width:7px;border:none;border-radius:0px;border-bottom:1px solid #ccc;-webkit-box-shadow:inset 0 0px 0px rgba(0,0,0,0.075);box-shadow: inset 0 0px 0px rgba(0,0,0,0.075);" maxlength="1" name="daily_start11" value="{$info.title|default='5'}" placeholder="">
<input type="text" class="" id="day_inp12" style="width:7px;border:none;border-radius:0px;border-bottom:1px solid #ccc;-webkit-box-shadow:inset 0 0px 0px rgba(0,0,0,0.075);box-shadow: inset 0 0px 0px rgba(0,0,0,0.075);" maxlength="1" name="daily_start12" value="{$info.title|default='9'}" placeholder="">
<span style="margin-left:10px"></span>
</div>
</div>
</div>
<span class="notice-text" id="text1">说明:时间格式(24小时制,时间设置范围00:00:00 23:59:59)</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" onclick="changeStatus(2)"/> 每周</label>
<span class="form_select" style="margin-left:5px">
<select name="week_remark">
<option value="1" selected>周一</option>
<option value="2">周二</option>
<option value="3">周三</option>
<option value="4">周四</option>
<option value="5">周五</option>
<option value="6">周六</option>
<option value="7">周天</option>
</select>
</span>
<div class="input-list" style="margin-left:20px;display:none" id="startWeek" >
<input type="text" class="" style="width:7px;border:none;border-radius:0px;border-bottom:1px solid #ccc;-webkit-box-shadow:inset 0 0px 0px rgba(0,0,0,0.075);box-shadow: inset 0 0px 0px rgba(0,0,0,0.075);" maxlength="1" name="week_start1" id="week_inp1" value="{$info.title|default=''}" placeholder="">
<input type="text" class="" style="width:7px;border:none;border-radius:0px;border-bottom:1px solid #ccc;-webkit-box-shadow:inset 0 0px 0px rgba(0,0,0,0.075);box-shadow: inset 0 0px 0px rgba(0,0,0,0.075);" maxlength="1" id="week_inp2" 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:7px;border:none;border-radius:0px;border-bottom:1px solid #ccc;-webkit-box-shadow:inset 0 0px 0px rgba(0,0,0,0.075);box-shadow: inset 0 0px 0px rgba(0,0,0,0.075);" maxlength="1" name="week_start3" id="week_inp3" value="{$info.title|default=''}" placeholder="">
<input type="text" class="" style="width:7px;border:none;border-radius:0px;border-bottom:1px solid #ccc;-webkit-box-shadow:inset 0 0px 0px rgba(0,0,0,0.075);box-shadow: inset 0 0px 0px rgba(0,0,0,0.075);" maxlength="1" id="week_inp4" 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:7px;border:none;border-radius:0px;border-bottom:1px solid #ccc;-webkit-box-shadow:inset 0 0px 0px rgba(0,0,0,0.075);box-shadow: inset 0 0px 0px rgba(0,0,0,0.075);" maxlength="1" id="week_inp5" name="week_start5" value="{$info.title|default=''}" placeholder="">
<input type="text" class="" style="width:7px;border:none;border-radius:0px;border-bottom:1px solid #ccc;-webkit-box-shadow:inset 0 0px 0px rgba(0,0,0,0.075);box-shadow: inset 0 0px 0px rgba(0,0,0,0.075);" id="week_inp6" maxlength="1" name="week_start6" value="{$info.title|default=''}" placeholder="">
<span style="margin-left:10px"></span>
</div>
</div>
</div>
<div class="input-list" style="margin-left:20px;display: none;" id="endWeek">
<input type="text" class="" style="width:7px;border:none;border-radius:0px;border-bottom:1px solid #ccc;-webkit-box-shadow:inset 0 0px 0px rgba(0,0,0,0.075);box-shadow: inset 0 0px 0px rgba(0,0,0,0.075);" name="week_start7" maxlength="1" id="week_inp7" value="{$info.title|default=''}" placeholder="">
<input type="text" class="" style="width:7px;border:none;border-radius:0px;border-bottom:1px solid #ccc;-webkit-box-shadow:inset 0 0px 0px rgba(0,0,0,0.075);box-shadow: inset 0 0px 0px rgba(0,0,0,0.075);" maxlength="1" id="week_inp8" 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:7px;border:none;border-radius:0px;border-bottom:1px solid #ccc;-webkit-box-shadow:inset 0 0px 0px rgba(0,0,0,0.075);box-shadow: inset 0 0px 0px rgba(0,0,0,0.075);" maxlength="1" name="week_start9" id="week_inp9" value="{$info.title|default=''}" placeholder="">
<input type="text" class="" style="width:7px;border:none;border-radius:0px;border-bottom:1px solid #ccc;-webkit-box-shadow:inset 0 0px 0px rgba(0,0,0,0.075);box-shadow: inset 0 0px 0px rgba(0,0,0,0.075);" maxlength="1" id="week_inp10" 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:7px;border:none;border-radius:0px;border-bottom:1px solid #ccc;-webkit-box-shadow:inset 0 0px 0px rgba(0,0,0,0.075);box-shadow: inset 0 0px 0px rgba(0,0,0,0.075);" name="week_start11" maxlength="1" id="week_inp11" value="{$info.title|default=''}" placeholder="">
<input type="text" class="" style="width:7px;border:none;border-radius:0px;border-bottom:1px solid #ccc;-webkit-box-shadow:inset 0 0px 0px rgba(0,0,0,0.075);box-shadow: inset 0 0px 0px rgba(0,0,0,0.075);" name="week_start12" maxlength="1" id="week_inp12" value="{$info.title|default=''}" placeholder="">
<span style="margin-left:10px"></span>
</div>
</div>
</div>
<span class="notice-text" id="text2" style="display:none">说明:时间格式(24小时制,时间设置范围00:00:00 23:59:59)</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" onclick="changeStatus(3)"/> 每月</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;display: none;" id="startMonth">
<input type="text" class="" id="month_inp1" style="width:7px;border:none;border-radius:0px;border-bottom:1px solid #ccc;-webkit-box-shadow:inset 0 0px 0px rgba(0,0,0,0.075);box-shadow: inset 0 0px 0px rgba(0,0,0,0.075);" name="month_start1" maxlength="1" value="{$info.title|default=''}" placeholder="">
<input type="text" class="" id="month_inp2" style="width:7px;border:none;border-radius:0px;border-bottom:1px solid #ccc;-webkit-box-shadow:inset 0 0px 0px rgba(0,0,0,0.075);box-shadow: inset 0 0px 0px rgba(0,0,0,0.075);" 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="" id="month_inp3" style="width:7px;border:none;border-radius:0px;border-bottom:1px solid #ccc;-webkit-box-shadow:inset 0 0px 0px rgba(0,0,0,0.075);box-shadow: inset 0 0px 0px rgba(0,0,0,0.075);" name="month_start3" maxlength="1" value="{$info.title|default=''}" placeholder="">
<input type="text" class="" id="month_inp4" style="width:7px;border:none;border-radius:0px;border-bottom:1px solid #ccc;-webkit-box-shadow:inset 0 0px 0px rgba(0,0,0,0.075);box-shadow: inset 0 0px 0px rgba(0,0,0,0.075);" 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="" id="month_inp5" style="width:7px;border:none;border-radius:0px;border-bottom:1px solid #ccc;-webkit-box-shadow:inset 0 0px 0px rgba(0,0,0,0.075);box-shadow: inset 0 0px 0px rgba(0,0,0,0.075);" maxlength="1" name="month_start5" value="{$info.title|default=''}" placeholder="">
<input type="text" class="" id="month_inp6" style="width:7px;border:none;border-radius:0px;border-bottom:1px solid #ccc;-webkit-box-shadow:inset 0 0px 0px rgba(0,0,0,0.075);box-shadow: inset 0 0px 0px rgba(0,0,0,0.075);" maxlength="1" name="month_start6" value="{$info.title|default=''}" placeholder="">
<span style="margin-left:10px"></span>
</div>
</div>
</div>
<div class="input-list" style="margin-left:20px;display: none;" id="endMonth">
<input type="text" class="" id="month_inp7" style="width:7px;border:none;border-radius:0px;border-bottom:1px solid #ccc;-webkit-box-shadow:inset 0 0px 0px rgba(0,0,0,0.075);box-shadow: inset 0 0px 0px rgba(0,0,0,0.075);" name="month_start7" maxlength="1" value="{$info.title|default=''}" placeholder="">
<input type="text" class="" id="month_inp8" style="width:7px;border:none;border-radius:0px;border-bottom:1px solid #ccc;-webkit-box-shadow:inset 0 0px 0px rgba(0,0,0,0.075);box-shadow: inset 0 0px 0px rgba(0,0,0,0.075);" 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="" id="month_inp9" style="width:7px;border:none;border-radius:0px;border-bottom:1px solid #ccc;-webkit-box-shadow:inset 0 0px 0px rgba(0,0,0,0.075);box-shadow: inset 0 0px 0px rgba(0,0,0,0.075);" name="month_start9" maxlength="1" value="{$info.title|default=''}" placeholder="">
<input type="text" class="" id="month_inp10" style="width:7px;border:none;border-radius:0px;border-bottom:1px solid #ccc;-webkit-box-shadow:inset 0 0px 0px rgba(0,0,0,0.075);box-shadow: inset 0 0px 0px rgba(0,0,0,0.075);" 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="" id="month_inp11" style="width:7px;border:none;border-radius:0px;border-bottom:1px solid #ccc;-webkit-box-shadow:inset 0 0px 0px rgba(0,0,0,0.075);box-shadow: inset 0 0px 0px rgba(0,0,0,0.075);" maxlength="1" name="month_start11" value="{$info.title|default=''}" placeholder="">
<input type="text" class="" id="month_inp12" style="width:7px;border:none;border-radius:0px;border-bottom:1px solid #ccc;-webkit-box-shadow:inset 0 0px 0px rgba(0,0,0,0.075);box-shadow: inset 0 0px 0px rgba(0,0,0,0.075);" maxlength="1" name="month_start12" value="{$info.title|default=''}" placeholder="">
<span style="margin-left:10px"></span>
</div>
</div>
</div>
<span class="notice-text" id="text3" style="display:none">说明:时间格式(24小时制,时间设置范围00:00:00 23:59:59)</span>
</td>
</tr>
<tr>
<td class="l noticeinfo"></td>
<td class="r table_radio">
<label><input type="radio" style="margin-left:1px" name="status" value="day" onclick="changeStatus(4)"/> 特殊</label>
<div class="input-list" style="margin-left:21px">
<input type="text" readonly id="time-start" name="day_remark" class="" value="{$startDate}"
placeholder="充值开始时间"/>
</div>
<div class="input-list" style="margin-left:17px;display: none;" id="startFix">
<input type="text" class="" style="width:7px;border:none;border-radius:0px;border-bottom:1px solid #ccc;-webkit-box-shadow:inset 0 0px 0px rgba(0,0,0,0.075);box-shadow: inset 0 0px 0px rgba(0,0,0,0.075);" id="fix_inp1" maxlength="1" name="day_start1" value="{$info.title|default=''}" placeholder="">
<input type="text" class="" style="width:7px;border:none;border-radius:0px;border-bottom:1px solid #ccc;-webkit-box-shadow:inset 0 0px 0px rgba(0,0,0,0.075);box-shadow: inset 0 0px 0px rgba(0,0,0,0.075);" id="fix_inp2" 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:7px;border:none;border-radius:0px;border-bottom:1px solid #ccc;-webkit-box-shadow:inset 0 0px 0px rgba(0,0,0,0.075);box-shadow: inset 0 0px 0px rgba(0,0,0,0.075);" id="fix_inp3" name="day_start3" maxlength="1" value="{$info.title|default=''}" placeholder="">
<input type="text" class="" style="width:7px;border:none;border-radius:0px;border-bottom:1px solid #ccc;-webkit-box-shadow:inset 0 0px 0px rgba(0,0,0,0.075);box-shadow: inset 0 0px 0px rgba(0,0,0,0.075);" id="fix_inp4" 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:7px;border:none;border-radius:0px;border-bottom:1px solid #ccc;-webkit-box-shadow:inset 0 0px 0px rgba(0,0,0,0.075);box-shadow: inset 0 0px 0px rgba(0,0,0,0.075);" name="day_start5" id="fix_inp5" maxlength="1" value="{$info.title|default=''}" placeholder="">
<input type="text" class="" style="width:7px;border:none;border-radius:0px;border-bottom:1px solid #ccc;-webkit-box-shadow:inset 0 0px 0px rgba(0,0,0,0.075);box-shadow: inset 0 0px 0px rgba(0,0,0,0.075);" maxlength="1" id="fix_inp6" name="day_start6" value="{$info.title|default=''}" placeholder="">
<span style="margin-left:10px"></span>
</div>
</div>
</div>
<div class="input-list" style="margin-left:20px;display: none;" id="endFix">
<input type="text" class="" style="width:7px;border:none;border-radius:0px;border-bottom:1px solid #ccc;-webkit-box-shadow:inset 0 0px 0px rgba(0,0,0,0.075);box-shadow: inset 0 0px 0px rgba(0,0,0,0.075);" id="fix_inp7" name="day_start7" maxlength="1" value="{$info.title|default=''}" placeholder="">
<input type="text" class="" style="width:7px;border:none;border-radius:0px;border-bottom:1px solid #ccc;-webkit-box-shadow:inset 0 0px 0px rgba(0,0,0,0.075);box-shadow: inset 0 0px 0px rgba(0,0,0,0.075);" id="fix_inp8" 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:7px;border:none;border-radius:0px;border-bottom:1px solid #ccc;-webkit-box-shadow:inset 0 0px 0px rgba(0,0,0,0.075);box-shadow: inset 0 0px 0px rgba(0,0,0,0.075);" id="fix_inp9" maxlength="1" name="day_start9" value="{$info.title|default=''}" placeholder="">
<input type="text" class="" style="width:7px;border:none;border-radius:0px;border-bottom:1px solid #ccc;-webkit-box-shadow:inset 0 0px 0px rgba(0,0,0,0.075);box-shadow: inset 0 0px 0px rgba(0,0,0,0.075);" id="fix_inp10" 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:7px;border:none;border-radius:0px;border-bottom:1px solid #ccc;-webkit-box-shadow:inset 0 0px 0px rgba(0,0,0,0.075);box-shadow: inset 0 0px 0px rgba(0,0,0,0.075);" maxlength="1" id="fix_inp11" name="day_start11" value="{$info.title|default=''}" placeholder="">
<input type="text" class="" style="width:7px;border:none;border-radius:0px;border-bottom:1px solid #ccc;-webkit-box-shadow:inset 0 0px 0px rgba(0,0,0,0.075);box-shadow: inset 0 0px 0px rgba(0,0,0,0.075);" id="fix_inp12" maxlength="1" name="day_start12" value="{$info.title|default=''}" placeholder="">
<span style="margin-left:10px"></span>
</div>
</div>
</div>
<span class="notice-text" id="text4" style="display:none">说明:时间格式(24小时制,时间设置范围00:00:00 23:59:59)</span>
</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>
function changeStatus(status) {
if(status == 2) {
document.getElementById('startWeek').style.display = 'block'
document.getElementById('endWeek').style.display = 'block'
document.getElementById('startDay').style.display = 'none'
document.getElementById('endDay').style.display = 'none'
document.getElementById('startFix').style.display = 'none'
document.getElementById('endFix').style.display = 'none'
document.getElementById('startMonth').style.display = 'none'
document.getElementById('endMonth').style.display = 'none'
document.getElementById('text2').style.display = 'block'
document.getElementById('text1').style.display = 'none'
document.getElementById('text3').style.display = 'none'
document.getElementById('text4').style.display = 'none'
document.getElementById('week_inp1').value = 0
document.getElementById('week_inp2').value = 0
document.getElementById('week_inp3').value = 0
document.getElementById('week_inp4').value = 0
document.getElementById('week_inp5').value = 0
document.getElementById('week_inp6').value = 0
document.getElementById('week_inp7').value = 2
document.getElementById('week_inp8').value = 3
document.getElementById('week_inp9').value = 5
document.getElementById('week_inp10').value = 9
document.getElementById('week_inp11').value = 5
document.getElementById('week_inp12').value = 9
for(i=1;i<13;i++) {
var eleday = 'day_inp'+i
document.getElementById(eleday).value = ''
var elemonth = 'month_inp'+i
document.getElementById(elemonth).value = ''
var elefix = 'fix_inp'+i
document.getElementById(elefix).value = ''
}
}
if(status == 1) {
document.getElementById('startWeek').style.display = 'none'
document.getElementById('endWeek').style.display = 'none'
document.getElementById('startDay').style.display = 'block'
document.getElementById('endDay').style.display = 'block'
document.getElementById('startFix').style.display = 'none'
document.getElementById('endFix').style.display = 'none'
document.getElementById('startMonth').style.display = 'none'
document.getElementById('endMonth').style.display = 'none'
document.getElementById('text1').style.display = 'block'
document.getElementById('text2').style.display = 'none'
document.getElementById('text3').style.display = 'none'
document.getElementById('text4').style.display = 'none'
document.getElementById('day_inp1').value = 0
document.getElementById('day_inp2').value = 0
document.getElementById('day_inp3').value = 0
document.getElementById('day_inp4').value = 0
document.getElementById('day_inp5').value = 0
document.getElementById('day_inp6').value = 0
document.getElementById('day_inp7').value = 2
document.getElementById('day_inp8').value = 3
document.getElementById('day_inp9').value = 5
document.getElementById('day_inp10').value = 9
document.getElementById('day_inp11').value = 5
document.getElementById('day_inp12').value = 9
for(i=1;i<13;i++) {
var eleweek = 'week_inp'+i
document.getElementById(eleweek).value = ' '
var elemonth = 'month_inp'+i
document.getElementById(elemonth).value = ' '
var elefix = 'fix_inp'+i
document.getElementById(elefix).value = ' '
}
}
if(status == 3) {
document.getElementById('startWeek').style.display = 'none'
document.getElementById('endWeek').style.display = 'none'
document.getElementById('startDay').style.display = 'none'
document.getElementById('endDay').style.display = 'none'
document.getElementById('startFix').style.display = 'none'
document.getElementById('endFix').style.display = 'none'
document.getElementById('startMonth').style.display = 'block'
document.getElementById('endMonth').style.display = 'block'
document.getElementById('text3').style.display = 'block'
document.getElementById('text1').style.display = 'none'
document.getElementById('text2').style.display = 'none'
document.getElementById('text4').style.display = 'none'
document.getElementById('month_inp1').value = 0
document.getElementById('month_inp2').value = 0
document.getElementById('month_inp3').value = 0
document.getElementById('month_inp4').value = 0
document.getElementById('month_inp5').value = 0
document.getElementById('month_inp6').value = 0
document.getElementById('month_inp7').value = 2
document.getElementById('month_inp8').value = 3
document.getElementById('month_inp9').value = 5
document.getElementById('month_inp10').value = 9
document.getElementById('month_inp11').value = 5
document.getElementById('month_inp12').value = 9
for(i=1;i<13;i++) {
var eleweek = 'week_inp'+i
document.getElementById(eleweek).value = ' '
var eleday = 'day_inp'+i
document.getElementById(eleday).value = ' '
var elefix = 'fix_inp'+i
document.getElementById(elefix).value = ' '
}
}
if(status == 4) {
document.getElementById('text4').style.display = 'block'
document.getElementById('text1').style.display = 'none'
document.getElementById('text3').style.display = 'none'
document.getElementById('text2').style.display = 'none'
document.getElementById('startWeek').style.display = 'none'
document.getElementById('endWeek').style.display = 'none'
document.getElementById('startDay').style.display = 'none'
document.getElementById('endDay').style.display = 'none'
document.getElementById('startFix').style.display = 'block'
document.getElementById('endFix').style.display = 'block'
document.getElementById('startMonth').style.display = 'none'
document.getElementById('endMonth').style.display = 'none'
document.getElementById('fix_inp1').value = 0
document.getElementById('fix_inp2').value = 0
document.getElementById('fix_inp3').value = 0
document.getElementById('fix_inp4').value = 0
document.getElementById('fix_inp5').value = 0
document.getElementById('fix_inp6').value = 0
document.getElementById('fix_inp7').value = 2
document.getElementById('fix_inp8').value = 3
document.getElementById('fix_inp9').value = 5
document.getElementById('fix_inp10').value = 9
document.getElementById('fix_inp11').value = 5
document.getElementById('fix_inp12').value = 9
for(i=1;i<13;i++) {
var eleweek = 'week_inp'+i
document.getElementById(eleweek).value = ' '
var eleday = 'day_inp'+i
document.getElementById(eleday).value = ' '
var elemonth = 'month_inp'+i
document.getElementById(elemonth).value = ' '
}
}
}
</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,447 @@
<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:7px;;border:none;border-radius:0px;border-bottom:1px solid #ccc;-webkit-box-shadow:inset 0 0px 0px rgba(0,0,0,0.075);box-shadow: inset 0 0px 0px rgba(0,0,0,0.075);" maxlength="1" id="day_inp1" name="daily_start1" value="{$info.title|default=''}" placeholder="">
<input type="text" class="" style="width:7px;border:none;border-radius:0px;border-bottom:1px solid #ccc;-webkit-box-shadow:inset 0 0px 0px rgba(0,0,0,0.075);box-shadow: inset 0 0px 0px rgba(0,0,0,0.075);" 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:7px;;border:none;border-radius:0px;border-bottom:1px solid #ccc;-webkit-box-shadow:inset 0 0px 0px rgba(0,0,0,0.075);box-shadow: inset 0 0px 0px rgba(0,0,0,0.075);" maxlength="1" name="daily_start3" id="day_inp3" value="{$info.title|default=''}" placeholder="">
<input type="text" class="" style="width:7px;border:none;border-radius:0px;border-bottom:1px solid #ccc;-webkit-box-shadow:inset 0 0px 0px rgba(0,0,0,0.075);box-shadow: inset 0 0px 0px rgba(0,0,0,0.075);" 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:7px;;border:none;border-radius:0px;border-bottom:1px solid #ccc;-webkit-box-shadow:inset 0 0px 0px rgba(0,0,0,0.075);box-shadow: inset 0 0px 0px rgba(0,0,0,0.075);" maxlength="1" name="daily_start5" id="day_inp5" value="{$info.title|default=''}" placeholder="">
<input type="text" class="" style="width:7px;border:none;border-radius:0px;border-bottom:1px solid #ccc;-webkit-box-shadow:inset 0 0px 0px rgba(0,0,0,0.075);box-shadow: inset 0 0px 0px rgba(0,0,0,0.075);" maxlength="1" id="day_inp6" name="daily_start6" value="{$info.title|default=''}" placeholder="">
<span style="margin-left:10px"></span>
</div>
</div>
</div>
<div class="input-list" style="margin-left:20px">
<input type="text" class="" style="width:7px;;border:none;border-radius:0px;border-bottom:1px solid #ccc;-webkit-box-shadow:inset 0 0px 0px rgba(0,0,0,0.075);box-shadow: inset 0 0px 0px rgba(0,0,0,0.075);" maxlength="1" name="daily_start7" id="day_inp7" value="{$info.title|default=''}" placeholder="">
<input type="text" class="" style="width:7px;border:none;border-radius:0px;border-bottom:1px solid #ccc;-webkit-box-shadow:inset 0 0px 0px rgba(0,0,0,0.075);box-shadow: inset 0 0px 0px rgba(0,0,0,0.075);" 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:7px;;border:none;border-radius:0px;border-bottom:1px solid #ccc;-webkit-box-shadow:inset 0 0px 0px rgba(0,0,0,0.075);box-shadow: inset 0 0px 0px rgba(0,0,0,0.075);" maxlength="1" name="daily_start9" id="day_inp9" value="{$info.title|default=''}" placeholder="">
<input type="text" class="" style="width:7px;border:none;border-radius:0px;border-bottom:1px solid #ccc;-webkit-box-shadow:inset 0 0px 0px rgba(0,0,0,0.075);box-shadow: inset 0 0px 0px rgba(0,0,0,0.075);" 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:7px;;border:none;border-radius:0px;border-bottom:1px solid #ccc;-webkit-box-shadow:inset 0 0px 0px rgba(0,0,0,0.075);box-shadow: inset 0 0px 0px rgba(0,0,0,0.075);" maxlength="1" name="daily_start11" id="day_inp11" value="{$info.title|default=''}" placeholder="">
<input type="text" class="" style="width:7px;border:none;border-radius:0px;border-bottom:1px solid #ccc;-webkit-box-shadow:inset 0 0px 0px rgba(0,0,0,0.075);box-shadow: inset 0 0px 0px rgba(0,0,0,0.075);" maxlength="1" id="day_inp12" name="daily_start12" value="{$info.title|default=''}" placeholder="">
<span style="margin-left:10px"></span>
</div>
</div>
</div>
</span>
<span class="notice-text">说明:时间格式(24小时制,时间设置范围00:00:00 23:59:59)</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:7px;;border:none;border-radius:0px;border-bottom:1px solid #ccc;-webkit-box-shadow:inset 0 0px 0px rgba(0,0,0,0.075);box-shadow: inset 0 0px 0px rgba(0,0,0,0.075);" maxlength="1" name="week_start1">
<input type="text" class="" style="width:7px;border:none;border-radius:0px;border-bottom:1px solid #ccc;-webkit-box-shadow:inset 0 0px 0px rgba(0,0,0,0.075);box-shadow: inset 0 0px 0px rgba(0,0,0,0.075);" 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:7px;;border:none;border-radius:0px;border-bottom:1px solid #ccc;-webkit-box-shadow:inset 0 0px 0px rgba(0,0,0,0.075);box-shadow: inset 0 0px 0px rgba(0,0,0,0.075);" maxlength="1" id="week_inp3" name="week_start3" value="" placeholder="">
<input type="text" class="" style="width:7px;border:none;border-radius:0px;border-bottom:1px solid #ccc;-webkit-box-shadow:inset 0 0px 0px rgba(0,0,0,0.075);box-shadow: inset 0 0px 0px rgba(0,0,0,0.075);" 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:7px;;border:none;border-radius:0px;border-bottom:1px solid #ccc;-webkit-box-shadow:inset 0 0px 0px rgba(0,0,0,0.075);box-shadow: inset 0 0px 0px rgba(0,0,0,0.075);" maxlength="1" name="week_start5" id="week_inp5" value="" placeholder="">
<input type="text" class="" style="width:7px;border:none;border-radius:0px;border-bottom:1px solid #ccc;-webkit-box-shadow:inset 0 0px 0px rgba(0,0,0,0.075);box-shadow: inset 0 0px 0px rgba(0,0,0,0.075);" maxlength="1" name="week_start6" id="week_inp6" value="" placeholder="">
<span style="margin-left:10px"></span>
</div>
</div>
</div>
<div class="input-list" style="margin-left:20px">
<input type="text" class="" style="width:7px;;border:none;border-radius:0px;border-bottom:1px solid #ccc;-webkit-box-shadow:inset 0 0px 0px rgba(0,0,0,0.075);box-shadow: inset 0 0px 0px rgba(0,0,0,0.075);" id="week_inp7" name="week_start7" maxlength="1" value="" placeholder="">
<input type="text" class="" style="width:7px;border:none;border-radius:0px;border-bottom:1px solid #ccc;-webkit-box-shadow:inset 0 0px 0px rgba(0,0,0,0.075);box-shadow: inset 0 0px 0px rgba(0,0,0,0.075);" 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:7px;;border:none;border-radius:0px;border-bottom:1px solid #ccc;-webkit-box-shadow:inset 0 0px 0px rgba(0,0,0,0.075);box-shadow: inset 0 0px 0px rgba(0,0,0,0.075);" maxlength="1" id="week_inp9" name="week_start9" value="" placeholder="">
<input type="text" class="" style="width:7px;border:none;border-radius:0px;border-bottom:1px solid #ccc;-webkit-box-shadow:inset 0 0px 0px rgba(0,0,0,0.075);box-shadow: inset 0 0px 0px rgba(0,0,0,0.075);" 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:7px;;border:none;border-radius:0px;border-bottom:1px solid #ccc;-webkit-box-shadow:inset 0 0px 0px rgba(0,0,0,0.075);box-shadow: inset 0 0px 0px rgba(0,0,0,0.075);" name="week_start11" maxlength="1" id="week_inp11" value="" placeholder="">
<input type="text" class="" style="width:7px;border:none;border-radius:0px;border-bottom:1px solid #ccc;-webkit-box-shadow:inset 0 0px 0px rgba(0,0,0,0.075);box-shadow: inset 0 0px 0px rgba(0,0,0,0.075);" name="week_start12" id="week_inp12" maxlength="1" value="" placeholder="">
<span style="margin-left:10px"></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}">{$vo}日</option>
</if>
</volist>
</select>
</span>
<div class="input-list" style="margin-left:20px">
<input type="text" class="" style="width:7px;;border:none;border-radius:0px;border-bottom:1px solid #ccc;-webkit-box-shadow:inset 0 0px 0px rgba(0,0,0,0.075);box-shadow: inset 0 0px 0px rgba(0,0,0,0.075);" name="month_start1" id="month_inp1" maxlength="1" value="{$info.title|default=''}" placeholder="">
<input type="text" class="" style="width:7px;border:none;border-radius:0px;border-bottom:1px solid #ccc;-webkit-box-shadow:inset 0 0px 0px rgba(0,0,0,0.075);box-shadow: inset 0 0px 0px rgba(0,0,0,0.075);" 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:7px;;border:none;border-radius:0px;border-bottom:1px solid #ccc;-webkit-box-shadow:inset 0 0px 0px rgba(0,0,0,0.075);box-shadow: inset 0 0px 0px rgba(0,0,0,0.075);" name="month_start3" maxlength="1" id="month_inp3" value="{$info.title|default=''}" placeholder="">
<input type="text" class="" style="width:7px;border:none;border-radius:0px;border-bottom:1px solid #ccc;-webkit-box-shadow:inset 0 0px 0px rgba(0,0,0,0.075);box-shadow: inset 0 0px 0px rgba(0,0,0,0.075);" 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:7px;;border:none;border-radius:0px;border-bottom:1px solid #ccc;-webkit-box-shadow:inset 0 0px 0px rgba(0,0,0,0.075);box-shadow: inset 0 0px 0px rgba(0,0,0,0.075);" maxlength="1" id="month_inp5" name="month_start5" value="{$info.title|default=''}" placeholder="">
<input type="text" class="" style="width:7px;border:none;border-radius:0px;border-bottom:1px solid #ccc;-webkit-box-shadow:inset 0 0px 0px rgba(0,0,0,0.075);box-shadow: inset 0 0px 0px rgba(0,0,0,0.075);" id="month_inp6" maxlength="1" name="month_start6" value="{$info.title|default=''}" placeholder="">
<span style="margin-left:10px"></span>
</div>
</div>
</div>
<div class="input-list" style="margin-left:20px">
<input type="text" class="" style="width:7px;;border:none;border-radius:0px;border-bottom:1px solid #ccc;-webkit-box-shadow:inset 0 0px 0px rgba(0,0,0,0.075);box-shadow: inset 0 0px 0px rgba(0,0,0,0.075);" name="month_start7" maxlength="1" id="month_inp7" value="{$info.title|default=''}" placeholder="">
<input type="text" class="" style="width:7px;border:none;border-radius:0px;border-bottom:1px solid #ccc;-webkit-box-shadow:inset 0 0px 0px rgba(0,0,0,0.075);box-shadow: inset 0 0px 0px rgba(0,0,0,0.075);" 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:7px;;border:none;border-radius:0px;border-bottom:1px solid #ccc;-webkit-box-shadow:inset 0 0px 0px rgba(0,0,0,0.075);box-shadow: inset 0 0px 0px rgba(0,0,0,0.075);" name="month_start9" maxlength="1" id="month_inp9" value="{$info.title|default=''}" placeholder="">
<input type="text" class="" style="width:7px;border:none;border-radius:0px;border-bottom:1px solid #ccc;-webkit-box-shadow:inset 0 0px 0px rgba(0,0,0,0.075);box-shadow: inset 0 0px 0px rgba(0,0,0,0.075);" 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:7px;;border:none;border-radius:0px;border-bottom:1px solid #ccc;-webkit-box-shadow:inset 0 0px 0px rgba(0,0,0,0.075);box-shadow: inset 0 0px 0px rgba(0,0,0,0.075);" maxlength="1" id="month_inp11" name="month_start11" value="{$info.title|default=''}" placeholder="">
<input type="text" class="" style="width:7px;border:none;border-radius:0px;border-bottom:1px solid #ccc;-webkit-box-shadow:inset 0 0px 0px rgba(0,0,0,0.075);box-shadow: inset 0 0px 0px rgba(0,0,0,0.075);" id="month_inp12" maxlength="1" name="month_start12" value="{$info.title|default=''}" placeholder="">
<span style="margin-left:10px"></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:7px;;border:none;border-radius:0px;border-bottom:1px solid #ccc;-webkit-box-shadow:inset 0 0px 0px rgba(0,0,0,0.075);box-shadow: inset 0 0px 0px rgba(0,0,0,0.075);" maxlength="1" id="fix_inp1" name="day_start1" value="" placeholder="">
<input type="text" class="" style="width:7px;border:none;border-radius:0px;border-bottom:1px solid #ccc;-webkit-box-shadow:inset 0 0px 0px rgba(0,0,0,0.075);box-shadow: inset 0 0px 0px rgba(0,0,0,0.075);" 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:7px;;border:none;border-radius:0px;border-bottom:1px solid #ccc;-webkit-box-shadow:inset 0 0px 0px rgba(0,0,0,0.075);box-shadow: inset 0 0px 0px rgba(0,0,0,0.075);" name="day_start3" id="fix_inp3" maxlength="1" value="" placeholder="">
<input type="text" class="" style="width:7px;border:none;border-radius:0px;border-bottom:1px solid #ccc;-webkit-box-shadow:inset 0 0px 0px rgba(0,0,0,0.075);box-shadow: inset 0 0px 0px rgba(0,0,0,0.075);" 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:7px;;border:none;border-radius:0px;border-bottom:1px solid #ccc;-webkit-box-shadow:inset 0 0px 0px rgba(0,0,0,0.075);box-shadow: inset 0 0px 0px rgba(0,0,0,0.075);" id="fix_inp5" name="day_start5" maxlength="1" value="" placeholder="">
<input type="text" class="" style="width:7px;border:none;border-radius:0px;border-bottom:1px solid #ccc;-webkit-box-shadow:inset 0 0px 0px rgba(0,0,0,0.075);box-shadow: inset 0 0px 0px rgba(0,0,0,0.075);" id="fix_inp6" maxlength="1" name="day_start6" value="" placeholder="">
<span style="margin-left:10px"></span>
</div>
</div>
</div>
<div class="input-list" style="margin-left:20px">
<input type="text" class="" style="width:7px;;border:none;border-radius:0px;border-bottom:1px solid #ccc;-webkit-box-shadow:inset 0 0px 0px rgba(0,0,0,0.075);box-shadow: inset 0 0px 0px rgba(0,0,0,0.075);" name="day_start7" maxlength="1" id="fix_inp7" value="" placeholder="">
<input type="text" class="" style="width:7px;border:none;border-radius:0px;border-bottom:1px solid #ccc;-webkit-box-shadow:inset 0 0px 0px rgba(0,0,0,0.075);box-shadow: inset 0 0px 0px rgba(0,0,0,0.075);" 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:7px;;border:none;border-radius:0px;border-bottom:1px solid #ccc;-webkit-box-shadow:inset 0 0px 0px rgba(0,0,0,0.075);box-shadow: inset 0 0px 0px rgba(0,0,0,0.075);" maxlength="1" name="day_start9" id="fix_inp9" value="" placeholder="">
<input type="text" class="" style="width:7px;border:none;border-radius:0px;border-bottom:1px solid #ccc;-webkit-box-shadow:inset 0 0px 0px rgba(0,0,0,0.075);box-shadow: inset 0 0px 0px rgba(0,0,0,0.075);" 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:7px;;border:none;border-radius:0px;border-bottom:1px solid #ccc;-webkit-box-shadow:inset 0 0px 0px rgba(0,0,0,0.075);box-shadow: inset 0 0px 0px rgba(0,0,0,0.075);" maxlength="1" name="day_start11" id="fix_inp11" value="" placeholder="">
<input type="text" class="" style="width:7px;border:none;border-radius:0px;border-bottom:1px solid #ccc;-webkit-box-shadow:inset 0 0px 0px rgba(0,0,0,0.075);box-shadow: inset 0 0px 0px rgba(0,0,0,0.075);" maxlength="1" id="fix_inp12"name="day_start12" value="" placeholder="">
<span style="margin-left:10px"></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("")
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,145 @@
<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">
<a class="sch-btn" href="{:U('Export/expUser',array_merge(array('id'=>30,'xlsname'=>'支付限额配置'),I('get.')))}">导出</a>
{$_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