Merge pull request '商务奖金功能上传' (#248) from feature/add_item into release
Reviewed-on: http://8.136.139.249:3000/wmtx/platform/pulls/248master
commit
f3cb29bd31
@ -0,0 +1,283 @@
|
||||
<?php
|
||||
|
||||
namespace Admin\Controller;
|
||||
|
||||
/**
|
||||
* 后台首页控制器
|
||||
* @author 麦当苗儿 <zuojiazi@vip.qq.com>
|
||||
*/
|
||||
class BusinessAffairsAwardController extends ThinkController
|
||||
{
|
||||
|
||||
private $model;
|
||||
|
||||
public function _initialize()
|
||||
{
|
||||
$this->model = M("business_affairs_award","tab_");
|
||||
parent::_initialize();
|
||||
}
|
||||
|
||||
/**
|
||||
*商务奖金比例列表
|
||||
*/
|
||||
public function lists()
|
||||
{
|
||||
$params = I('get.');
|
||||
$page = $params['p'] ? intval($params['p']) : 1;
|
||||
$row = $params['row'] ? intval($params['row']) : 10;
|
||||
|
||||
$data = $this->model->page($page, $row)->select();
|
||||
|
||||
foreach ($data as $key => $value) {
|
||||
|
||||
if(!$value['end_amount'] == '0') {
|
||||
$data[$key]['end_amount'] = '永久';
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
$count = $this->model->where("1=1")->count();
|
||||
|
||||
$page = set_pagination($count, $row,$params);
|
||||
if($page) {
|
||||
$this->assign('_page', $page);
|
||||
}
|
||||
|
||||
$this->assign("list",$data);
|
||||
|
||||
$this->display();
|
||||
|
||||
}
|
||||
|
||||
public function add()
|
||||
{
|
||||
if(IS_POST) {
|
||||
|
||||
// dump($_POST);die();
|
||||
if (!$_POST['ratio']) {
|
||||
$this->ajaxReturn(["msg"=>"请填写抽成比例","code"=>0]);
|
||||
}
|
||||
|
||||
if(!$_POST['start_amount']) {
|
||||
$this->ajaxReturn(["msg"=>"请填写起始流水","code"=>0]);
|
||||
}
|
||||
|
||||
if($_POST['start_amount'] >= $_POST['end_amount']&&$_POST['end_amount']) {
|
||||
$this->ajaxReturn(["msg"=>"起始流水必须小于结束流水","code"=>0]);
|
||||
}
|
||||
|
||||
$amount_start = $_POST['start_amount'];
|
||||
$amount_end = $_POST['end_amount'];
|
||||
|
||||
$busunessData = M("business_affairs_award", "tab_")
|
||||
->where("((start_amount<{$amount_start} and (end_amount >={$amount_start} or end_amount=0)) or (start_amount<{$amount_end} and (end_amount >={$amount_end} or end_amount=0)) or ((end_amount>={$amount_start} or end_amount=0) and (end_amount <={$amount_end} and end_amount!=0)))")
|
||||
->select();
|
||||
|
||||
if ($busunessData) {
|
||||
$this->ajaxReturn(["msg"=>"流水段已经存在","code"=>0]);
|
||||
}
|
||||
$add_data = $_POST;
|
||||
$add_data['create_time'] = time();
|
||||
|
||||
!$add_data['end_amount']?($add_data['end_amount']=0):'';
|
||||
|
||||
$this->model->add($add_data);
|
||||
|
||||
$this->ajaxReturn(["msg"=>"添加成功","code"=>1,"url"=>U("lists")]);
|
||||
} else {
|
||||
$this->display();
|
||||
}
|
||||
}
|
||||
|
||||
public function edit()
|
||||
{
|
||||
$id = $_REQUEST["id"];
|
||||
if(IS_POST) {
|
||||
|
||||
if (!$_POST['ratio']) {
|
||||
$this->ajaxReturn(["msg"=>"请填写抽成比例","code"=>0]);
|
||||
}
|
||||
|
||||
if(!$_POST['start_amount']) {
|
||||
$this->ajaxReturn(["msg"=>"请填写起始流水","code"=>0]);
|
||||
}
|
||||
|
||||
if($_POST['start_amount'] >= $_POST['end_amount']&&$_POST['end_amount']) {
|
||||
$this->ajaxReturn(["msg"=>"起始流水必须小于结束流水","code"=>0]);
|
||||
}
|
||||
|
||||
$amount_start = $_POST['start_amount'];
|
||||
$amount_end = $_POST['end_amount'];
|
||||
|
||||
$busunessData = M("business_affairs_award", "tab_")
|
||||
->where("id != {$id} and ((start_amount<{$amount_start} and (end_amount >={$amount_start} or end_amount=0)) or (start_amount<{$amount_end} and (end_amount >={$amount_end} or end_amount=0)) or ((end_amount>={$amount_start} or end_amount=0) and (end_amount <={$amount_end} and end_amount!=0)))")
|
||||
->select();
|
||||
|
||||
if ($busunessData) {
|
||||
$this->ajaxReturn(["msg"=>"流水段已经存在","code"=>0]);
|
||||
}
|
||||
|
||||
$add_data = $_POST;
|
||||
$add_data['update_time'] = time();
|
||||
|
||||
!$add_data['end_amount']?($add_data['end_amount']=0):'';
|
||||
|
||||
$this->model->where(['id'=>$id])->save($add_data);
|
||||
|
||||
$this->ajaxReturn(["msg"=>"修改成功","code"=>1,"url"=>U("lists")]);
|
||||
} else {
|
||||
|
||||
$data = $this->model->where(['id'=>$id])->find();
|
||||
|
||||
$data['start_amount'] = floor($data['start_amount']);
|
||||
$data['end_amount'] = floor($data['end_amount']);
|
||||
$data['ratio'] = floor($data['ratio']);
|
||||
|
||||
$this->assign("data",$data);
|
||||
|
||||
$this->display();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
public function del()
|
||||
{
|
||||
if(!isset($_REQUEST['id'])){
|
||||
$this->error('参数错误');
|
||||
}
|
||||
$id = $_REQUEST['id'];
|
||||
$res = $this->model->where("id='{$id}'")->delete();
|
||||
if($res !== false){
|
||||
|
||||
$this->success('删除成功',U("lists"));
|
||||
|
||||
}else{
|
||||
$this->error('删除错误');
|
||||
}
|
||||
}
|
||||
|
||||
public function businessAffairsList() {
|
||||
|
||||
$map = [];
|
||||
|
||||
$params = I('get.');
|
||||
$page = $params['p'] ? intval($params['p']) : 1;
|
||||
$row = $params['row'] ? intval($params['row']) : 10;
|
||||
|
||||
if($_REQUEST['time']) {
|
||||
$map['time'] = $_REQUEST['time'];
|
||||
}
|
||||
|
||||
if ($_REQUEST['game_belong_name']) {
|
||||
$map['game_belong_name'] = ['like',"%{$_REQUEST['game_belong_name']}%"];
|
||||
}
|
||||
|
||||
if ($_REQUEST['relation_game_name']) {
|
||||
$map['relation_game_name'] = ['like',"%{$_REQUEST['game_name']}%"];
|
||||
}
|
||||
|
||||
if ($_REQUEST['verify_status'] || $_REQUEST['verify_status'] == '0') {
|
||||
$map['verify_status'] = ['like',"%{$_REQUEST['verify_status']}%"];
|
||||
}
|
||||
|
||||
$data = M("business_affairs_award_pool","tab_")
|
||||
->where($map)
|
||||
->page($page, $row)
|
||||
->select();
|
||||
|
||||
foreach ($data as $key => $value) {
|
||||
|
||||
$detail = '未审核';
|
||||
|
||||
if ($value['verify_status'] == 1) {
|
||||
$detail = '审批通过';
|
||||
} elseif($value['verify_status'] == 2) {
|
||||
$detail = '审批拒绝';
|
||||
}
|
||||
|
||||
if($_REQUEST['export']) {
|
||||
$data[$key]['time'] = '`'.$value['time'];
|
||||
$detail .= "\n";
|
||||
}else {
|
||||
$detail .= "<br>";
|
||||
}
|
||||
if ($value['verify_status']) {
|
||||
$data[$key]['verify_detail'] = $detail.date('Y-m-d H:i:s',$value['verify_time']);
|
||||
} else {
|
||||
$data[$key]['verify_detail'] = '未审核';
|
||||
}
|
||||
$data[$key]['ratio'] = round(($value['month_award']/$value['pay_amount']*100),2)."%";
|
||||
|
||||
}
|
||||
|
||||
if ($_REQUEST['export']) {
|
||||
|
||||
$title = ['time' => '月份',
|
||||
'relation_game_name' => '游戏名称',
|
||||
'pay_amount' => '产品流水',
|
||||
'ratio' => '抽成比例',
|
||||
'game_belong_name' => '奖励归属',
|
||||
'month_bonus_pool' => '本月奖金池总额',
|
||||
'quarter_bonus_pool' => '本季度累计激励',
|
||||
'month_award' => '流水个人奖金',
|
||||
'person_award' => '个人奖金总额',
|
||||
'verify_detail' => '审批状态'];
|
||||
|
||||
data2csv($data, '商务奖金汇总', $title);
|
||||
}
|
||||
|
||||
$count = M("business_affairs_award_pool","tab_")
|
||||
->where($map)
|
||||
->count();
|
||||
|
||||
if(IS_ROOT){
|
||||
$this->assign('verify_check',true);
|
||||
}else {
|
||||
$exportRule = strtolower(MODULE_NAME . '/' . CONTROLLER_NAME . '/' . ACTION_NAME . "_verify_check");
|
||||
|
||||
$this->assign('verify_check', $this->checkRule($exportRule, array('in', '1,2')));
|
||||
}
|
||||
|
||||
$page = set_pagination($count, $row,$params);
|
||||
if($page) {
|
||||
$this->assign('_page', $page);
|
||||
}
|
||||
|
||||
$this->assign("list",$data);
|
||||
|
||||
$this->display();
|
||||
|
||||
}
|
||||
|
||||
public function verify() {
|
||||
|
||||
$status = $_REQUEST['status'];
|
||||
|
||||
$ids = $_REQUEST['ids'];
|
||||
|
||||
if ($ids) {
|
||||
|
||||
$is_save = M("business_affairs_award_pool","tab_")
|
||||
->where(['id'=>['in',$ids]])
|
||||
->save(['verify_status'=>$status,'verify_time'=>time()]);
|
||||
|
||||
if($is_save) {
|
||||
$this->ajaxReturn(['status'=>1,'info'=>'操作成功']);
|
||||
} else {
|
||||
$this->ajaxReturn(['status'=>0,'info'=>'操作失败']);
|
||||
}
|
||||
|
||||
} else {
|
||||
|
||||
$this->ajaxReturn(['status'=>0,'info'=>'数据错误']);
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
}
|
@ -0,0 +1,384 @@
|
||||
<extend name="Public/base"/>
|
||||
|
||||
<block name="body">
|
||||
<link rel="stylesheet" href="__CSS__/select2.min.css" type="text/css" />
|
||||
<link rel="stylesheet" href="__CSS__/pro_promote.css" type="text/css" />
|
||||
<script src="__STATIC__/jquery.form.js"></script>
|
||||
<script src="__STATIC__/layer/layer.js"></script>
|
||||
<script type="text/javascript" src="__JS__/bootstrap.min.js"></script>
|
||||
<script type="text/javascript" src="__JS__/select2.min.js"></script>
|
||||
<style>
|
||||
.select2-container--default .select2-selection--single {
|
||||
color: #000;
|
||||
resize: none;
|
||||
border-width: 1px;
|
||||
border-style: solid;
|
||||
border-color: #a7b5bc #ced9df #ced9df #a7b5bc;
|
||||
box-shadow: 0px 3px 3px #F7F8F9 inset;height:35px;
|
||||
height:28px;border-radius:3px;font-size:12px;
|
||||
}
|
||||
.select2-container--default .select2-selection--single .select2-selection__rendered {
|
||||
line-height:35px;
|
||||
line-height:28px;
|
||||
}
|
||||
.select2-container--default .select2-selection--single .select2-selection__arrow {
|
||||
height:26px;
|
||||
}
|
||||
.select2-container--default .select2-search--dropdown .select2-search__field {
|
||||
height:26px;line-height:26px;font-size:12px;
|
||||
}
|
||||
a:link ,a:visited,a:hover,a:active { text-decoration: none;}
|
||||
.select2-results__option[aria-selected] {font-size:12px;}
|
||||
.butnbox {padding:10px 0 10px;}
|
||||
.butnbox .butnlist {overflow:hidden;clear:both;}
|
||||
.butnbox .butnlist .butn,.butnbox .butnlist .butn:hover {text-decoration:none;border:none;}
|
||||
.butnbox .butnlist .butn {display:inline-block;width:120px;height:28px;line-height:28px;text-align:center;color:#FFF;background:#3C95C8;border-radius:3px;}
|
||||
.butnbox .butnlist .butn.last {background:#009900;}
|
||||
.butnbox .butnlist .butn~.butn {margin-left:20px;}
|
||||
.data_list table tbody tr a.disabled,.data_list table tbody tr a.disabled:hover {color:#999;cursor:default;}
|
||||
.layui-layer-title {
|
||||
text-align: center;
|
||||
height: 80px;
|
||||
line-height: 80px;
|
||||
font-weight: 600;
|
||||
font-size: 18px;
|
||||
}
|
||||
.data_list table td{
|
||||
line-height: 2;
|
||||
}
|
||||
|
||||
.layui-layer-title {
|
||||
text-align: center;
|
||||
height: 42px;
|
||||
line-height: 42px;
|
||||
font-weight: 400;
|
||||
font-size: 14px;
|
||||
}
|
||||
.main-place .question_content:before{
|
||||
right: 20px;
|
||||
left: auto;
|
||||
}
|
||||
|
||||
.tooltip {
|
||||
position: relative;
|
||||
display: inline-block;
|
||||
color: #056dae;
|
||||
}
|
||||
|
||||
.tooltip .tooltiptext {
|
||||
visibility: hidden;
|
||||
width: 250%;
|
||||
background-color: #fff;
|
||||
color: #fff;
|
||||
text-align: center;
|
||||
border-radius: 6px;
|
||||
padding: 5px 0;
|
||||
position: absolute;
|
||||
z-index: 1;
|
||||
bottom: 80%;
|
||||
left: 0;
|
||||
margin-left: -70%;
|
||||
border: #000 solid 1px;
|
||||
}
|
||||
|
||||
.tooltip .tooltiptext::after {
|
||||
content: "";
|
||||
position: absolute;
|
||||
top: 100%;
|
||||
left: 50%;
|
||||
margin-left: -5px;
|
||||
border-width: 5px;
|
||||
border-style: solid;
|
||||
border-color: black transparent transparent transparent;
|
||||
}
|
||||
|
||||
.tooltip:hover .tooltiptext {
|
||||
|
||||
color: #000;
|
||||
visibility: visible;
|
||||
line-height: 20px;
|
||||
}
|
||||
|
||||
</style>
|
||||
|
||||
<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="jssearch fl cf search_list">
|
||||
<div class="input-list search-title-box">
|
||||
<label>搜索:</label>
|
||||
</div>
|
||||
<div class="input-list">
|
||||
<input type="text" readonly id="time" name="time" class="" value="{:I('time')}" placeholder="时间" />
|
||||
</div>
|
||||
<div class="input-list input-list-game search_label_rehab">
|
||||
<select id="game_name" name="game_name" class="select_gallery" >
|
||||
<option value="">游戏名称</option>
|
||||
<!-- <volist name=":get_game_list(null, $_GET['game_type'])" id="vo">
|
||||
<option game-id="{$vo.id}" value="{$vo.id}">{$vo.game_name}</option>
|
||||
</volist> -->
|
||||
</select>
|
||||
</div>
|
||||
<div class="input-list">
|
||||
<input type="text" id="game_belong_name" name="game_belong_name" class="" value="{:I('game_belong_name')}" placeholder="请输入奖金归属人" />
|
||||
</div>
|
||||
<div class="input-list">
|
||||
<select id="verify_status" name="verify_status" class="select_gallery" >
|
||||
<option value="">请选择审核状态</option>
|
||||
<option value="0">未审核</option>
|
||||
<option value="1">审核通过</option>
|
||||
<option value="2">审核拒绝</option>
|
||||
</select>
|
||||
</div>
|
||||
|
||||
<input type="hidden" name="" value="" class="sortBy">
|
||||
<input type="hidden" name="type" value="{$_GET['type']}">
|
||||
<div class="input-list">
|
||||
<a class="sch-btn" href="javascript:;" id="search" url="{:U('businessAffairsList','model='.$model['name'] .'&row='.I('row'),false)}">搜索</a>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
<div class="butnbox" >
|
||||
<div class="butnlist jscheckbutn" style="margin-left: 2px">
|
||||
<if condition="$verify_check eq true">
|
||||
<a class='butn verify' data-status="1" style='background-color: #3C95C8;'>审核通过</a>
|
||||
<a class='butn verify' data-status="0" style='background-color: red;'>审核拒绝</a>
|
||||
</if>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- 数据列表 -->
|
||||
<div class="data_list">
|
||||
<empty name="show_status">
|
||||
<div class="">
|
||||
<table>
|
||||
<!-- 表头 -->
|
||||
<thead>
|
||||
<tr>
|
||||
<th><input class="check-all" type="checkbox"></th>
|
||||
<th>月份</th>
|
||||
<th>游戏名称</th>
|
||||
<th>产品流水</th>
|
||||
<th>抽成比例</th>
|
||||
<th>奖金归属人</th>
|
||||
<th>本月奖金池总额</th>
|
||||
<th>本季度累计激励</th>
|
||||
<th>流水个人奖金</th>
|
||||
<th>个人奖金总额</th>
|
||||
<th>审批状态</th>
|
||||
</tr>
|
||||
</thead>
|
||||
|
||||
<!-- 列表 -->
|
||||
<tbody>
|
||||
<if condition = "empty($list)">
|
||||
<tr>
|
||||
<td colspan="16" class="text-center">aOh! 暂时还没有内容!</td>
|
||||
</tr>
|
||||
</if>
|
||||
<notemtpy name = "list">
|
||||
<volist name="list" id="data">
|
||||
<tr>
|
||||
<td><input class="ids" type="checkbox" value="{$data['id']} "data-verify_status="{$data['verify_status']}" name="ids[]"></td>
|
||||
<td>{$data.time|default='无'}</td>
|
||||
<td>{$data.relation_game_name|default='无'}</td>
|
||||
<td>{$data.pay_amount|default='0'}</td>
|
||||
<td>{$data.ratio|default='--'}</td>
|
||||
<td>{$data.game_belong_name|default='无'}</td>
|
||||
<td>{$data.month_bonus_pool|default='0'}</td>
|
||||
<td>{$data.quarter_award|default='0'}</td>
|
||||
<td>{$data.month_award|default='0'}</td>
|
||||
<td>{$data.person_award|default='0'}</td>
|
||||
<td>{$data.verify_detail|default='无'}</td>
|
||||
|
||||
</tr>
|
||||
</volist>
|
||||
</notemtpy>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
<else/>
|
||||
</empty>
|
||||
|
||||
</div>
|
||||
<div class="page">
|
||||
<a class="sch-btn" href="{:U(CONTROLLER_NAME.'/'.ACTION_NAME,array_merge(['export'=>1],I('get.')))}" target="_blank">导出</a>
|
||||
{$_page|default=''}
|
||||
</div>
|
||||
|
||||
</block>
|
||||
|
||||
<block name="script">
|
||||
<script>
|
||||
<volist name=":I('get.')" id="vo">
|
||||
Think.setValue('{$key}',"{$vo}");
|
||||
</volist>
|
||||
$(".select_gallery").select2();
|
||||
</script>
|
||||
<link href="__STATIC__/datetimepicker/css/datetimepicker.css" rel="stylesheet" type="text/css">
|
||||
<php>if(C('COLOR_STYLE')=='blue_color') echo '<link href="__STATIC__/datetimepicker/css/datetimepicker_blue.css" rel="stylesheet" type="text/css">';</php>
|
||||
<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>
|
||||
<script type="text/javascript">
|
||||
//导航高亮
|
||||
highlight_subnav('{:U('BusinessAffairsAward/businessAffairsList')}');
|
||||
|
||||
function reload(){
|
||||
location.reload();
|
||||
}
|
||||
|
||||
$(function(){
|
||||
|
||||
|
||||
$(".verify").on("click",function(){
|
||||
|
||||
var status = $(this).data("status");
|
||||
|
||||
var text = $("input:checkbox[name='ids[]']:checked").map(function(index,elem) {
|
||||
if($(elem).data("verify_status") == 0){
|
||||
return $(elem).val();
|
||||
}
|
||||
}).get();
|
||||
|
||||
if(text.length < 1){
|
||||
layer.msg("<font style='color:white'>" + '请勾选数据,在进行操作</font>');
|
||||
return;
|
||||
}
|
||||
|
||||
text = text.join(",");
|
||||
layer.confirm('【警告】[审核操作]将不可回退,如需继续请点击确认', {
|
||||
btn: ['确认','取消'],
|
||||
title:false
|
||||
}, function(index){
|
||||
layer.close(index);
|
||||
_doAgreeApply();
|
||||
});
|
||||
function _doAgreeApply(){
|
||||
//执行
|
||||
layer.load(2);
|
||||
$.ajax({
|
||||
type: "POST",
|
||||
url: "{:U('verify')}",
|
||||
dataType: 'json',
|
||||
async: true,
|
||||
data: {ids:text,status:status},
|
||||
success:function(data){
|
||||
layer.closeAll('loading');
|
||||
if(data.status==1){
|
||||
layer.msg("<font style='color:white'>" + data.info + "</font>");
|
||||
setTimeout(function(){
|
||||
window.location.reload();
|
||||
},1500);
|
||||
}else{
|
||||
layer.msg("<font style='color:white'>" + data.info + "</font>");
|
||||
return false;
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
});
|
||||
|
||||
//搜索功能
|
||||
$("#search").click(function(){
|
||||
var url = $(this).attr('url');
|
||||
var query = $('.jssearch').find('input').serialize();
|
||||
query += "&"+$('.jssearch').find('select').serialize();
|
||||
query = query.replace(/(&|^)(\w*?\d*?\-*?_*?)*?=?((?=&)|(?=$))/g,'');
|
||||
query = query.replace(/^&/g,'');
|
||||
if( url.indexOf('?')>0 ){
|
||||
url += '&' + query;
|
||||
}else{
|
||||
url += '?' + query;
|
||||
}
|
||||
|
||||
var start = $("#time_start").val();
|
||||
var end = $("#time_end").val();
|
||||
if(start !='' && end != ''){
|
||||
if (Date.parse(start) > Date.parse(end)){
|
||||
layer.msg('开始时间必须小于等于结束时间');
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
window.location.href = url;
|
||||
});
|
||||
|
||||
//回车自动提交
|
||||
$('.jssearch').find('input').keyup(function(event){
|
||||
if(event.keyCode===13){
|
||||
$("#search").click();
|
||||
}
|
||||
});
|
||||
|
||||
$('#time').datetimepicker({
|
||||
format: 'yyyy-mm',
|
||||
language:"zh-CN",
|
||||
// minView:2,
|
||||
weekStart: 1,
|
||||
todayBtn: true,
|
||||
todayHighlight: false,
|
||||
startView: 3,
|
||||
minView: 3,
|
||||
forceParse: 0,
|
||||
autoclose:true,
|
||||
pickerPosition:'bottom-left'
|
||||
});
|
||||
|
||||
$('#datetimepicker').datetimepicker({
|
||||
format: 'yyyy-mm',
|
||||
language:"zh-CN",
|
||||
// minView:2,
|
||||
weekStart: 1,
|
||||
todayBtn: true,
|
||||
todayHighlight: false,
|
||||
startView: 3,
|
||||
minView: 3,
|
||||
forceParse: 0,
|
||||
autoclose:true,
|
||||
pickerPosition:'bottom-left'
|
||||
});
|
||||
|
||||
var game_name = "{:I('game_name')}";
|
||||
function getGameList() {
|
||||
$.ajax({
|
||||
url:"{:U('Ajax/getGameList')}",
|
||||
type:"get",
|
||||
data:{sdk_type:$("#sdk_version1 option:selected").val()},
|
||||
dataType:'json',
|
||||
success:function(response){
|
||||
str = '<option value="">游戏名称</option>';
|
||||
// $.each(response.data, function(index, item){
|
||||
// console.log(item.id);
|
||||
// str += '<option value="'+item.id+' '+(promote_id && item.id == promote_id?'selected':'')+'">'+item.nickname+'</option>';
|
||||
// });
|
||||
data = response.data;
|
||||
for (var i in data){
|
||||
str += "<option value='"+data[i].relation_game_name+"' "+(game_name && data[i].relation_game_name == game_name?'selected':'')+">"+data[i].relation_game_name+"</option>"
|
||||
}
|
||||
$("#game_name").empty();
|
||||
$("#game_name").append(str);
|
||||
$("#game_name").select2();
|
||||
$("#game_name").change();
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
getGameList();
|
||||
})
|
||||
|
||||
|
||||
</script>
|
||||
</block>
|
@ -0,0 +1,153 @@
|
||||
<extend name="Public/base"/>
|
||||
|
||||
<block name="body">
|
||||
<link rel="stylesheet" href="__CSS__/select2.min.css" type="text/css" />
|
||||
<script type="text/javascript" src="__JS__/bootstrap.min.js"></script>
|
||||
<script type="text/javascript" src="__JS__/select2.min.js"></script>
|
||||
<style>
|
||||
.select2-container--default .select2-selection--single {
|
||||
color: #000;
|
||||
resize: none;
|
||||
border-width: 1px;
|
||||
border-style: solid;
|
||||
border-color: #a7b5bc #ced9df #ced9df #a7b5bc;
|
||||
box-shadow: 0px 3px 3px #F7F8F9 inset;height:35px;
|
||||
height:28px;border-radius:3px;font-size:12px;
|
||||
}
|
||||
.select2-container--default .select2-selection--single .select2-selection__rendered {
|
||||
line-height:35px;
|
||||
line-height:28px;
|
||||
}
|
||||
.select2-container--default .select2-selection--single .select2-selection__arrow {
|
||||
height:26px;
|
||||
}
|
||||
.select2-container--default .select2-search--dropdown .select2-search__field {
|
||||
height:26px;line-height:26px;font-size:12px;
|
||||
}
|
||||
.select2-results__option[aria-selected] {font-size:12px;}
|
||||
</style>
|
||||
<!-- 标题栏 -->
|
||||
|
||||
<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">
|
||||
<empty name="model.extend">
|
||||
<div class="tools">
|
||||
<a class="" href="{:U('add?model='.$model['id'])}"><span class="button_icon button_icon1"></span>新增</a>
|
||||
</div>
|
||||
</empty>
|
||||
</div>
|
||||
<!-- 高级搜索 -->
|
||||
<!-- <div class="jssearch fl cf search_list" >-->
|
||||
<!-- <div class="input-list search-title-box">-->
|
||||
<!-- <label>搜索:</label>-->
|
||||
<!-- </div>-->
|
||||
<!-- <!–游戏类型搜索END–>-->
|
||||
<!-- <div class="input-list input-list-game search_label_rehab">-->
|
||||
<!-- <select id="ba_id" name="account" class="select_gallery" style="width:120px;">-->
|
||||
<!-- <option value="">商务专员账号</option>-->
|
||||
<!-- <volist name=":get_business_affairs_list()" id="vo">-->
|
||||
<!-- <option ba-id="{$vo.id}" value="{$vo.account}">{$vo.account}</option>-->
|
||||
<!-- </volist>-->
|
||||
<!-- </select>-->
|
||||
<!-- </div>-->
|
||||
<!-- <div class="input-list input-list-platform">-->
|
||||
<!-- <select id="ba_status" name="status" >-->
|
||||
<!-- <option value="">状态</option>-->
|
||||
<!-- <option value="1">正常</option>-->
|
||||
<!-- <option value="0">禁用</option>-->
|
||||
<!-- </select>-->
|
||||
|
||||
<!-- </div>-->
|
||||
<!-- <div class="input-list">-->
|
||||
<!-- <a class="sch-btn" href="javascript:;" id="search" url="{:U('BusinessAffairs/lists','model='.$model['name'].'&row='.I('row'),false)}">搜索</a>-->
|
||||
<!-- </div>-->
|
||||
<!-- </div>-->
|
||||
</div>
|
||||
|
||||
|
||||
<!-- 数据列表 -->
|
||||
<div class="data_list ">
|
||||
<div class="">
|
||||
<table>
|
||||
<!-- 表头 -->
|
||||
<thead>
|
||||
<tr>
|
||||
<th >序号</th>
|
||||
<th >流水区间</th>
|
||||
<th >抽成比例</th>
|
||||
<th >操作</th>
|
||||
</tr>
|
||||
</thead>
|
||||
|
||||
<!-- 列表 -->
|
||||
<tbody>
|
||||
<empty name ="list">
|
||||
<td colspan="14" class="text-center">aOh! 暂时还没有内容!</td>
|
||||
<else />
|
||||
<volist name="list" id="data">
|
||||
<tr>
|
||||
<td>{$data.id}</td>
|
||||
<td>{$data.start_amount}-{$data.end_amount}</td>
|
||||
<td>{$data.ratio}%</td>
|
||||
<td>
|
||||
<a href="{:U('edit',array('id'=>$data['id']))}">编辑</a>
|
||||
<a href="{:U('del?id='.$data['id'])}" class="ajax-get">删除</a>
|
||||
</td>
|
||||
</tr>
|
||||
</volist>
|
||||
</empty>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
<div class="page">
|
||||
<if condition="$role_export_check eq true ">
|
||||
<a class="sch-btn" href="{:U('Export/business_affairs_list',array_merge(['xlsname'=>'商务专员_商务专员'],I('get.')))}">导出</a>
|
||||
</if>
|
||||
{$_page|default=''}
|
||||
</div>
|
||||
|
||||
</block>
|
||||
|
||||
<block name="script">
|
||||
<script src="__STATIC__/layer/layer.js"></script>
|
||||
<script>
|
||||
<volist name=":I('get.')" id="vo">
|
||||
Think.setValue('{$key}',"{$vo}");
|
||||
</volist>
|
||||
$(".select_gallery").select2();
|
||||
</script>
|
||||
<script type="text/javascript">
|
||||
//导航高亮
|
||||
highlight_subnav('{:U('BusinessAffairsAward/lists')}');
|
||||
$(function(){
|
||||
//搜索功能
|
||||
$("#search").click(function(){
|
||||
var url = $(this).attr('url');
|
||||
var query = $('.jssearch').find('input').serialize();
|
||||
query += "&"+$('.jssearch').find('select').serialize();
|
||||
query = query.replace(/(&|^)(\w*?\d*?\-*?_*?)*?=?((?=&)|(?=$))/g,'');
|
||||
query = query.replace(/^&/g,'');
|
||||
if( url.indexOf('?')>0 ){
|
||||
url += '&' + query;
|
||||
}else{
|
||||
url += '?' + query;
|
||||
}
|
||||
window.location.href = url;
|
||||
});
|
||||
|
||||
//回车自动提交
|
||||
$('.jssearch').find('input').keyup(function(event){
|
||||
if(event.keyCode===13){
|
||||
$("#search").click();
|
||||
}
|
||||
});
|
||||
})
|
||||
</script>
|
||||
</block>
|
Loading…
Reference in New Issue