新增公司关系绑定
parent
044f81792f
commit
1139b37a50
@ -0,0 +1,128 @@
|
||||
<?php
|
||||
// 公司关系绑定
|
||||
namespace Admin\Controller;
|
||||
|
||||
class CompanyRelationController extends AdminController
|
||||
{
|
||||
public $admininfo;
|
||||
public $DBModel;
|
||||
public $DBlogModel;
|
||||
public $OpAuthList=[];
|
||||
public $Status = [
|
||||
"-2"=>"管理员拒绝",
|
||||
"-1"=>"市场部拒绝",
|
||||
"0"=>"待审核",
|
||||
"1"=>"市场部通过",
|
||||
"2"=>"管理员通过"
|
||||
];
|
||||
public $CompanyType = [
|
||||
"0"=>"己方公司",
|
||||
"1"=>"上游cp公司",
|
||||
"2"=>"联运下游渠道公司"
|
||||
];
|
||||
public function _initialize()
|
||||
{
|
||||
$this->admininfo = $_SESSION['onethink_admin']['user_auth'];
|
||||
$this->DBlogModel = M("company_relation_log","tab_");
|
||||
$this->DBModel = M("company_relation","tab_");
|
||||
parent::_initialize();
|
||||
}
|
||||
//生效列表
|
||||
public function index()
|
||||
{
|
||||
|
||||
}
|
||||
//审核列表
|
||||
public function lists()
|
||||
{
|
||||
|
||||
$this->display();
|
||||
}
|
||||
|
||||
public function marketAgree(){
|
||||
|
||||
}
|
||||
public function marketRefuse(){
|
||||
|
||||
}
|
||||
public function adminRefuse(){
|
||||
|
||||
}
|
||||
//管理员成功
|
||||
public function adminAgree(){
|
||||
|
||||
}
|
||||
|
||||
public function addRelation()
|
||||
{
|
||||
$this->assign('companyType',$this->CompanyType);
|
||||
$this->display();
|
||||
}
|
||||
public function editRelation()
|
||||
{
|
||||
|
||||
}
|
||||
public function delRelation()
|
||||
{
|
||||
|
||||
}
|
||||
public function menuAuth()
|
||||
{
|
||||
$addurl = U("addRelation");
|
||||
$mentBtn = [
|
||||
"addRelation"=>"<a class='butn' href='{$addurl}'>新增推广游戏分成</a>",
|
||||
"marketAgree"=>"<a class='butn' id='marketAgree'>市场部审批通过</a>",
|
||||
"marketRefuse"=>"<a class='butn' id='marketRefuse' style='background-color: red;'>市场部审核拒绝</a>",
|
||||
"adminAgree"=>"<a class='butn' id='adminAgree'>管理员审核通过</a>",
|
||||
"adminRefuse"=>"<a class='butn' id='marketRefuse' style='background-color: red;'>管理员审核拒绝</a>"
|
||||
];
|
||||
$resarr = [];
|
||||
foreach ($mentBtn as $k => $v) {
|
||||
if(IS_ROOT){
|
||||
$resarr[] = $v;
|
||||
}else{
|
||||
if(in_array($k,$this->OpAuthList)){
|
||||
$resarr[] = $v;
|
||||
}
|
||||
}
|
||||
}
|
||||
return $resarr;
|
||||
}
|
||||
public function OpAuth($info)
|
||||
{
|
||||
$id = $info['id'];
|
||||
//原始列表
|
||||
$opBtn = [
|
||||
"editRelation"=>"<a class='confirm editRelation' data-id='{$id}'>编辑</a>",
|
||||
"delRelation"=>"<a class='confirm delRelation' data-id='{$id}' style='color: red;'>删除</a>",
|
||||
];
|
||||
//操作对应菜单
|
||||
|
||||
if($info['status'] == 2){
|
||||
$optist = [];
|
||||
}else{
|
||||
$optist = ["editRatio","delRatio"];
|
||||
}
|
||||
//
|
||||
$resarr = [];
|
||||
foreach ($optist as $k => $v) {
|
||||
if(IS_ROOT){
|
||||
$resarr[] = $opBtn[$v];
|
||||
}else{
|
||||
if(in_array($v,$this->OpAuthList)){
|
||||
$resarr[] = $opBtn[$v];
|
||||
}
|
||||
}
|
||||
}
|
||||
return $resarr;
|
||||
}
|
||||
|
||||
public function error($data)
|
||||
{
|
||||
header('Content-Type:application/json; charset=utf-8');
|
||||
$data =json_encode(['msg'=>$data,"code"=>4000],JSON_UNESCAPED_UNICODE);
|
||||
exit($data);
|
||||
}
|
||||
|
||||
|
||||
}
|
@ -0,0 +1,538 @@
|
||||
<extend name="Public/base" />
|
||||
|
||||
<block name="body">
|
||||
<link rel="stylesheet" href="__CSS__/select2.min.css" type="text/css" />
|
||||
<link rel="stylesheet" type="text/css" href="__CSS__/admin_table.css" media="all">
|
||||
<link href="__STATIC__/icons_alibaba/iconfont.css" rel="stylesheet">
|
||||
<script type="text/javascript" src="__STATIC__/uploadify/jquery.uploadify.min.js"></script>
|
||||
<script type="text/javascript" src="__STATIC__/provincecityarea/AreaData_min.js"></script>
|
||||
<script src="__STATIC__/layer/layer.js"></script>
|
||||
<script type="text/javascript" src="__JS__/select2.min.js"></script>
|
||||
|
||||
<style>
|
||||
.tabcon1711 input.time {
|
||||
width: 150px;
|
||||
}
|
||||
#form .txt_area {
|
||||
width: 300px;
|
||||
height: 150px;
|
||||
}
|
||||
.tabcon1711 .form_unit {
|
||||
margin-left: 2px;
|
||||
}
|
||||
.tabcon1711 .mustmark {
|
||||
margin-left:-7px;
|
||||
}
|
||||
.list-ratio {
|
||||
display: table;
|
||||
}
|
||||
.list-ratio .li-ratio {
|
||||
display: flex;
|
||||
margin-bottom: 20px;
|
||||
align-items: center;
|
||||
}
|
||||
.list-ratio .li-ratio .turnover, .list-ratio .li-ratio .turnover-ratio {
|
||||
position: relative;
|
||||
}
|
||||
.list-ratio .li-ratio .turnover span, .list-ratio .li-ratio .turnover-ratio .error-message {
|
||||
color: red;
|
||||
position: absolute;
|
||||
left: 0;
|
||||
top: 30px;
|
||||
white-space: nowrap;
|
||||
display: none;
|
||||
}
|
||||
.iconfont-btn {
|
||||
cursor: pointer;
|
||||
}
|
||||
.iconfont-style {
|
||||
font-size: 18px;
|
||||
color: #fff;
|
||||
border-radius: 4px;
|
||||
border: 0;
|
||||
padding: 5px;
|
||||
margin-left: 10px;
|
||||
}
|
||||
.iconfont-selected {
|
||||
background-color: #0A9AF2;
|
||||
}
|
||||
.iconfont-selected:hover {
|
||||
background-color: #03a9f4;
|
||||
}
|
||||
.iconfont-unselected {
|
||||
background-color: #999;
|
||||
}
|
||||
.iconfont-unselected:hover {
|
||||
background-color: #ababab;
|
||||
}
|
||||
|
||||
input[type=number]{
|
||||
padding: 4px 6px;
|
||||
font-size: 12px;
|
||||
line-height: 20px;
|
||||
color: #555;
|
||||
vertical-align: middle;
|
||||
-webkit-border-radius: 4px;
|
||||
-moz-border-radius: 4px;
|
||||
border-radius: 4px;
|
||||
background-color: #fff;
|
||||
border: 1px solid #ccc;
|
||||
-webkit-box-shadow: inset 0 1px 1px rgba(0,0,0,0.075);
|
||||
-moz-box-shadow: inset 0 1px 1px rgba(0,0,0,0.075);
|
||||
box-shadow: inset 0 1px 1px rgba(0,0,0,0.075);
|
||||
-webkit-transition: border linear .2s, box-shadow linear .2s;
|
||||
-moz-transition: border linear .2s, box-shadow linear .2s;
|
||||
-o-transition: border linear .2s, box-shadow linear .2s;
|
||||
transition: border linear .2s, box-shadow linear .2s;
|
||||
}
|
||||
</style>
|
||||
<div class="cf main-place top_nav_list navtab_list">
|
||||
<h3 class="page_title">新增公司绑定</h3>
|
||||
<!-- <p class="description_text">说明:此功是创建推广员时所需填写信息</p>-->
|
||||
</div>
|
||||
|
||||
<!-- 标签页导航 -->
|
||||
<div class="tab-wrap">
|
||||
<div class="tab-content tabcon1711" >
|
||||
<!-- 表单 -->
|
||||
<form id="form" action="{:U('addRatio')}" method="post" class="form-horizontal" >
|
||||
<div style="display: flex;">
|
||||
<!-- 基础文档模型 -->
|
||||
<div id="tab1" class="tab-pane in tab1">
|
||||
<table border="0" cellspacing="0" cellpadding="0">
|
||||
<tbody>
|
||||
<tr>
|
||||
<td class="l"><i class="mustmark">*</i>甲方公司类型:</td>
|
||||
<td class="r">
|
||||
<select name="first_company_type" id="first_company_type" class="select_gallery">
|
||||
<option value="">请选择甲方公司类型</option>
|
||||
<volist name="companyType" id="vo">
|
||||
<option value="{$key}">{$vo}</option>
|
||||
</volist>
|
||||
</select>
|
||||
<span class="notice-text"></span>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
|
||||
<tr>
|
||||
<td class="l"><i class="mustmark">*</i>甲方公司:</td>
|
||||
<td class="r promote_id">
|
||||
<select name="first_company_id" id="first_company_id" class="select_gallery">
|
||||
<option value="">请先选择甲方公司</option>
|
||||
</select>
|
||||
</td>
|
||||
</tr>
|
||||
<input type="hidden" name="first_company_name" id="first_company_name" value="" />
|
||||
|
||||
|
||||
<tr>
|
||||
<td class="l">内外团:</td>
|
||||
<td class="r table_radio">
|
||||
<span class="form_radio table_btn" id="first_company_belong">请先选择甲方公司</span>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="l">公司性质:</td>
|
||||
<td class="r table_radio">
|
||||
<span class="form_radio table_btn" id="first_company_type">请先选择甲方公司</span>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="l">开发类型:</td>
|
||||
<td class="r table_radio">
|
||||
<span class="form_radio table_btn" id="first_company_relation">请先选择甲方公司</span>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="l">联系人:</td>
|
||||
<td class="r table_radio">
|
||||
<span class="form_radio table_btn" id="first_settlement_contact">请先选择甲方公司</span>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="l">联系电话:</td>
|
||||
<td class="r table_radio">
|
||||
<span class="form_radio table_btn" id="first_contact_phone">请先选择甲方公司</span>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
<div id="tab2" class="tab-pane in tab2">
|
||||
<table border="0" cellspacing="0" cellpadding="0">
|
||||
<tbody>
|
||||
<tr>
|
||||
<td class="l"><i class="mustmark">*</i>乙方公司类型:</td>
|
||||
<td class="r">
|
||||
<select name="second_company_type" id="first_company_type" class="select_gallery">
|
||||
<option value="">请选择乙方公司类型</option>
|
||||
<volist name="companyType" id="vo">
|
||||
<option value="{$key}">{$vo}</option>
|
||||
</volist>
|
||||
</select>
|
||||
<span class="notice-text"></span>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
|
||||
<tr>
|
||||
<td class="l"><i class="mustmark">*</i>乙方公司:</td>
|
||||
<td class="r promote_id">
|
||||
<select name="second_company_id" id="second_company_id" class="select_gallery">
|
||||
<option value="">请先选择乙方公司</option>
|
||||
</select>
|
||||
</td>
|
||||
</tr>
|
||||
<input type="hidden" name="second_company_name" id="second_company_name" value="" />
|
||||
|
||||
|
||||
<tr>
|
||||
<td class="l">内外团:</td>
|
||||
<td class="r table_radio">
|
||||
<span class="form_radio table_btn" id="second_company_belong">请先选择乙方公司</span>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="l">公司性质:</td>
|
||||
<td class="r table_radio">
|
||||
<span class="form_radio table_btn" id="second_company_type">请先选择乙方公司</span>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="l">开发类型:</td>
|
||||
<td class="r table_radio">
|
||||
<span class="form_radio table_btn" id="second_company_relation">请先选择乙方公司</span>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="l">联系人:</td>
|
||||
<td class="r table_radio">
|
||||
<span class="form_radio table_btn" id="second_settlement_contact">请先选择乙方公司</span>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="l">联系电话:</td>
|
||||
<td class="r table_radio">
|
||||
<span class="form_radio table_btn" id="second_contact_phone">请先选择乙方公司</span>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
<div style="width: 80%;height: 1px;border-bottom: 1px solid #e6e6e6;margin: 10px;"></div>
|
||||
<div id="tab3" class="tab-pane in tab3">
|
||||
<table border="0" cellspacing="0" cellpadding="0">
|
||||
<tbody>
|
||||
<tr>
|
||||
<td class="l"><i class="mustmark">*</i>结算周期:</td>
|
||||
<td class="r">
|
||||
<select name="settlement_type" id="settlement_type" class="select_gallery">
|
||||
<option value="0" selected>无</option>
|
||||
<option value="1">周结</option>
|
||||
<option value="2">月结</option>
|
||||
</select>
|
||||
<span class="notice-text"></span>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="l"><i class="mustmark">*</i>开票类型:</td>
|
||||
<td class="r">
|
||||
<select name="invoice_type" id="invoice_type" class="select_gallery">
|
||||
<option value="1" selected>专票</option>
|
||||
<option value="2">普票</option>
|
||||
</select>
|
||||
<span class="notice-text"></span>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td class="l">是否有打款流程:</td>
|
||||
<td class="r table_radio">
|
||||
<span class="form_radio table_btn">
|
||||
<label>
|
||||
<input type="radio" value="1" name="status" checked="checked"> 是
|
||||
</label>
|
||||
<label>
|
||||
<input type="radio" value="2" name="status"> 否
|
||||
</label>
|
||||
</span>
|
||||
<span class="notice-text">选择否将不能进行线上打款</span>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="l"><i class="mustmark">*</i>收款方:</td>
|
||||
<td class="r">
|
||||
<select name="collection" id="collection" class="select_gallery">
|
||||
<option value="1" >甲方</option>
|
||||
<option value="2" selected>乙方</option>
|
||||
</select>
|
||||
<span class="notice-text"></span>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
|
||||
<tr>
|
||||
<td class="l">备注:</td>
|
||||
<td class="r table_radio">
|
||||
<textarea type="text" name="remark" id="remark" class="txt_area"></textarea>
|
||||
<span class="notice-text"></span>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
<div class="form-item cf">
|
||||
<button class="submit_btn mlspacing" id="submit" type="submit" target-form="form-horizontal">
|
||||
保存
|
||||
</button>
|
||||
<a class="submit_btn " alt="返回上一页" title="返回上一页" href="javascript:window.history.back();" >
|
||||
返回
|
||||
</a>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</block>
|
||||
|
||||
<block name="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 src="__STATIC__/czinputcheck.js?v=1.29" type="text/javascript"></script>
|
||||
<script type="text/javascript">
|
||||
//导航高亮
|
||||
highlight_subnav("{:U('index')}");
|
||||
$(".select_gallery").select2();
|
||||
|
||||
$(function(){
|
||||
$('.time').datetimepicker({
|
||||
format: 'yyyy-mm-dd',
|
||||
language: "zh-CN",
|
||||
minView: 2,
|
||||
autoclose: true
|
||||
});
|
||||
showTab();
|
||||
|
||||
var promoteGameRatioData = {};
|
||||
promoteGameRatioData.ratio = '0.00';
|
||||
promoteGameRatioData.begin_time = '';
|
||||
promoteGameRatioData.end_time = '';
|
||||
promoteGameRatioData.remark = '';
|
||||
|
||||
|
||||
$('#relation_game_id').change(function (e) {
|
||||
var original_package_name = $('#relation_game_id option:selected').data("original");
|
||||
if(original_package_name == ''){
|
||||
original_package_name = '未配置原包名'
|
||||
}
|
||||
$("#original_package_name").html(original_package_name);
|
||||
});
|
||||
|
||||
|
||||
|
||||
|
||||
$('#ratio, #begin_time, #end_time, #remark').change(function () {
|
||||
var val = $(this).val();
|
||||
var elementIdName = $(this).attr('id');
|
||||
promoteGameRatioData[elementIdName] = val;
|
||||
});
|
||||
subevn();
|
||||
function subevn(){
|
||||
$('#submit').off("click");
|
||||
$('#submit').click(function (e) {
|
||||
//查看是否报错
|
||||
var flag = true;
|
||||
var obj = {
|
||||
"company_id":["required","推广公司不能为空","select"],
|
||||
"relation_game_id":["required","游戏不能为空","select"],
|
||||
"ratio":["number","默认比例必须是大于0的数字"],
|
||||
"begin_time":["date","开始时间不能为空"],
|
||||
"end_time":["nocheck"],
|
||||
"remark":["nocheck",'',"textarea"]
|
||||
}
|
||||
var cres = CIC.checkAddInput(obj);
|
||||
if(!cres){
|
||||
return false;
|
||||
}
|
||||
if(cres.ratio > 100){
|
||||
layer.msg("默认比例不能大于100", {icon: 2});
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
$(".error-message").each(function(index,elm){
|
||||
var t = $(elm).css("display");
|
||||
if(t == 'block' || t == 'inline'){
|
||||
flag = false;
|
||||
layer.msg("请先处理错误的比例配置", {icon: 2});
|
||||
return false;
|
||||
}
|
||||
})
|
||||
$(".turnover_money").each(function(index,elm){
|
||||
var t = $(elm).val();
|
||||
if(t == ''){
|
||||
flag = false;
|
||||
layer.msg("流水及比例不允许为空", {icon: 2});
|
||||
return false;
|
||||
}
|
||||
})
|
||||
|
||||
if(!flag){
|
||||
return false;
|
||||
}
|
||||
var target = $('form').get(0).action;
|
||||
var query = $('form').serialize();
|
||||
var that = this;
|
||||
$(that).addClass('disabled').attr('autocomplete','off').prop('disabled',true);
|
||||
$.post(target,query).success(function(data){
|
||||
if(layer) {layer.closeAll('loading');}
|
||||
if (data.code==1) {
|
||||
if (data.url) {
|
||||
updateAlert(data.msg + ' 页面即将自动跳转~');
|
||||
}else{
|
||||
updateAlert(data.msg);
|
||||
}
|
||||
setTimeout(function(){
|
||||
$(that).removeClass('disabled').prop('disabled',false);
|
||||
if (data.url) {
|
||||
location.href=data.url;
|
||||
}else if( $(that).hasClass('no-refresh')){
|
||||
$('#tip').find('.tipclose').click();
|
||||
}else{
|
||||
location.reload();
|
||||
}
|
||||
},1500);
|
||||
}else{
|
||||
layer.msg(data.msg,{icon: 2});
|
||||
}
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
$('.iconfont-btn-add').click(function (e) {
|
||||
var delBtn = $('.iconfont-btn-del');
|
||||
var html = '';
|
||||
html += '<div class="li-ratio">';
|
||||
html += '<label class="instanceof_text">月流水:</label>';
|
||||
html += '<select name="instanceof[]" style="width: 50px;margin-right: 10px;">';
|
||||
html += '<option value="1">≥</option>';
|
||||
html += '<option value="2">></option>';
|
||||
html += '</select>';
|
||||
html += '<div class="turnover">';
|
||||
html += '<input type="text" class="txt turnover_money" name="turnover[]" value="" placeholder="请输入金额" onKeyUp="value=value.replace(/[^\\w\\.\\/]/ig, \'\')" style="width: 100px;margin-right: 10px;">';
|
||||
html += '<span class="error-message"></span>';
|
||||
html += '</div>';
|
||||
html += '<label>分成比例:</label>';
|
||||
html += '<div class="turnover-ratio">';
|
||||
html += '<input type="text" class="txt turnover_ratio" name="turnover_ratio[]" value="" placeholder="请输入比例" onKeyUp="value=value.replace(/[^\\w\\.\\/]/ig, \'\')" style="width: 60px;">';
|
||||
html += '<span class="form_unit" style="margin-right: 10px;">%</span>';
|
||||
html += '<span class="error-message"></span>';
|
||||
html += '</div>';
|
||||
html += '</div>';
|
||||
|
||||
$('.list-ratio').append(html);
|
||||
subevn();
|
||||
if ($('.list-ratio').children().length > 1 && delBtn.children('i').hasClass('iconfont-unselected')) {
|
||||
delBtn.children('i').removeClass('iconfont-unselected');
|
||||
delBtn.children('i').addClass('iconfont-selected');
|
||||
}
|
||||
|
||||
$('.list-ratio').children(':last-child').children('.turnover').children('input').change(function (e) {
|
||||
turnoverChangeHandle();
|
||||
});
|
||||
|
||||
$('.list-ratio').children(':last-child').children('.turnover-ratio').children('input').change(function (e) {
|
||||
turnoverRatioChangeHandle();
|
||||
});
|
||||
});
|
||||
|
||||
$('.list-ratio').children('.li-ratio').children('.turnover').children('input').change(function (e) {
|
||||
turnoverChangeHandle();
|
||||
});
|
||||
|
||||
$('.list-ratio').children('.li-ratio').children('.turnover-ratio').children('input').change(function (e) {
|
||||
turnoverRatioChangeHandle();
|
||||
});
|
||||
|
||||
function turnoverChangeHandle()
|
||||
{
|
||||
$('.list-ratio').children('.li-ratio').children('.turnover').children('input').each(function () {
|
||||
var that = $(this);
|
||||
var thatLiRatio = that.parent().parent();
|
||||
var thatLiRatioIndex = thatLiRatio.index();
|
||||
var prevTurnover = 0;
|
||||
var prev = thatLiRatio.prev().children().children('input');
|
||||
var thatTurnover = parseFloat(that.val());
|
||||
|
||||
if (thatLiRatioIndex > 0) {
|
||||
prevTurnover = parseFloat(prev.val());
|
||||
prevTurnoverHandle(thatTurnover, prevTurnover, that);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
function turnoverRatioChangeHandle() {
|
||||
var ratio = parseFloat($('#ratio').val());
|
||||
$('.list-ratio').children('.li-ratio').children('.turnover-ratio').children('input').each(function () {
|
||||
var that = $(this);
|
||||
var thatLiRatio = that.parent().parent();
|
||||
var thatLiRatioIndex = thatLiRatio.index();
|
||||
var thatTurnoverRatio = parseFloat(that.val());
|
||||
|
||||
if (thatLiRatioIndex === 1) {
|
||||
prevTurnoverRatio = ratio;
|
||||
prevTurnoverRatioHandle(thatTurnoverRatio, prevTurnoverRatio, that, true);
|
||||
} else {
|
||||
var prev = thatLiRatio.prev().children('.turnover-ratio').children('input');
|
||||
var prevTurnoverRatio = parseFloat(prev.val());
|
||||
prevTurnoverRatioHandle(thatTurnoverRatio, prevTurnoverRatio, that);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
function prevTurnoverHandle(thatTurnover, prevTurnover, that)
|
||||
{
|
||||
if (thatTurnover <= prevTurnover) {
|
||||
that.parent().children('span').text('月流水必须大于上一个月流水');
|
||||
that.parent().children('span').show();
|
||||
} else {
|
||||
that.parent().children('span').hide();
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
function prevTurnoverRatioHandle(thatTurnoverRatio, prevTurnoverRatio, that, isDefault = false)
|
||||
{
|
||||
if (thatTurnoverRatio <= prevTurnoverRatio) {
|
||||
var msg = isDefault ? '月流水分成比例必须大于默认分成比例' : '月流水分成比例必须大于上一个月流水分成比例';
|
||||
that.parent().children('.error-message').text(msg);
|
||||
that.parent().children('.error-message').show();
|
||||
} else {
|
||||
that.parent().children('.error-message').hide();
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
$('.iconfont-btn-del').click(function (e) {
|
||||
var that = $(this);
|
||||
|
||||
if ($('.list-ratio').children().length > 1) {
|
||||
$('.list-ratio').children(':last-child').remove();
|
||||
if ($('.list-ratio').children().length === 1) {
|
||||
that.children('i').removeClass('iconfont-selected');
|
||||
that.children('i').addClass('iconfont-unselected');
|
||||
}
|
||||
}
|
||||
});
|
||||
});
|
||||
</script>
|
||||
</block>
|
||||
|
@ -0,0 +1,360 @@
|
||||
<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>
|
||||
<script type="text/javascript" src="__STATIC__/layer/extend/layer.ext.js"></script>
|
||||
<link rel="stylesheet" href="__CSS__/promote.css" type="text/css"/>
|
||||
<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;}
|
||||
.layui-layer-dialog .layui-layer-content{color:red}
|
||||
.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;
|
||||
}
|
||||
</style>
|
||||
|
||||
<div class="cf top_nav_list">
|
||||
<div class="cf main-place top_nav_list navtab_list">
|
||||
<h3 class="page_title">推广游戏分成管理</h3>
|
||||
<p class="description_text"></p>
|
||||
</div>
|
||||
<!-- <div class="fl button_list">
|
||||
<div class="tools">
|
||||
<a class=" " href="{:U('add')}"><span class="button_icon button_icon1"></span>新增推广游戏分成</a>
|
||||
</div>
|
||||
</div> -->
|
||||
<!-- 高级搜索 -->
|
||||
<div class="jssearch fl cf search_list" style="margin-bottom:12px">
|
||||
<div class="input-list search-title-box">
|
||||
<label>搜索:</label>
|
||||
</div>
|
||||
|
||||
<div class="input-list input-list-promote search_label_rehab">
|
||||
<select id="company_id" name="company_id" class="select_gallery" >
|
||||
<option value="">请选择公司</option>
|
||||
<volist name="companyList" id="vo">
|
||||
<option value="{$vo.id}" <if condition="$vo.id eq I('company_id')">selected</if> >{$vo.company_name}</option>
|
||||
</volist>
|
||||
</select>
|
||||
</div>
|
||||
<div class="input-list input-list-game search_label_rehab">
|
||||
<select id="relation_game_id" name="relation_game_id" class="select_gallery" >
|
||||
<option value="">现包名</option>
|
||||
<volist name="gameList" id="vo">
|
||||
<option value="{$vo.relation_game_id}" <if condition="$vo.relation_game_id eq I('relation_game_id')">selected</if> >{$vo.relation_game_name}</option>
|
||||
</volist>
|
||||
</select>
|
||||
</div>
|
||||
|
||||
<div class="input-list input-list-game search_label_rehab">
|
||||
<select id="status" name="status" class="select_gallery" >
|
||||
<option value="">请选择审核状态</option>
|
||||
<volist name="status" id="vo">
|
||||
<option value="{$key}" <if condition="isset($_GET['status']) && $key eq I('status')">selected</if> >{$vo}</option>
|
||||
</volist>
|
||||
</select>
|
||||
</div>
|
||||
|
||||
<div class="input-list">
|
||||
<a class="sch-btn" href="javascript:;" id="search" url="{:U('index','&row='.I('row'),false)}">搜索</a>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<div class="butnbox" style="margin-bottom: 10px;">
|
||||
<div class="butnlist jscheckbutn" style="margin-left: 2px">
|
||||
<foreach name="menubtn" item="vo" >
|
||||
{$vo}
|
||||
</foreach>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- 数据列表 -->
|
||||
<div class="data_list">
|
||||
<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>
|
||||
<th>市场部审批</th>
|
||||
<th>管理员审批</th>
|
||||
<th>备注</th>
|
||||
<th>操作</th>
|
||||
</tr>
|
||||
</thead>
|
||||
|
||||
<!-- 列表 -->
|
||||
<tbody>
|
||||
<if condition = "empty($data)">
|
||||
<tr>
|
||||
<td colspan="16" class="text-center">aOh! 暂时还没有内容!</td>
|
||||
</tr>
|
||||
<else/>
|
||||
<volist name="data" id="data">
|
||||
<tr>
|
||||
<td>
|
||||
<input class="ids" type="checkbox" data-status="{$data.status}" value="{$data['id']}" name="ids[]" >
|
||||
</td>
|
||||
<td>{$data.company_name}</td>
|
||||
<td>{$data.company_belong}</td>
|
||||
<td>{$data.settlement_type}</td>
|
||||
<td>{$data.game_type_name}</td>
|
||||
<td>{$data.original_package_name}</td>
|
||||
<td>{$data.relation_game_name}</td>
|
||||
<td>{$data.valid}</td>
|
||||
<td style="line-height: 16px;text-indent: 0;">
|
||||
<div style="text-align: left;width: 90%;margin-left: 5%;margin-top: 10px;margin-bottom: 10px;">
|
||||
{$data.last_turnover_ratio_str}
|
||||
</div>
|
||||
</td>
|
||||
<td style="line-height: 16px;text-indent: 0;">
|
||||
<div style="text-align: left;width: 90%;margin-left: 5%;margin-top: 10px;margin-bottom: 10px;">
|
||||
{$data.turnover_ratio_str}
|
||||
</div>
|
||||
</td>
|
||||
|
||||
<td>
|
||||
<div style="line-height: 2;">
|
||||
{$data.create}
|
||||
</div>
|
||||
</td>
|
||||
<td>
|
||||
|
||||
<if condition="$data.status eq -1 ">
|
||||
<div style="line-height: 2;color: red;">
|
||||
{$data.market}
|
||||
</div>
|
||||
<else />
|
||||
<div style="line-height: 2;">
|
||||
{$data.market}
|
||||
</div>
|
||||
</if>
|
||||
</td>
|
||||
|
||||
<td>
|
||||
<if condition="$data.status eq -2 ">
|
||||
<div style="line-height: 2;color: red;">
|
||||
{$data.admin}
|
||||
</div>
|
||||
<else />
|
||||
<div style="line-height: 2;">
|
||||
{$data.admin}
|
||||
</div>
|
||||
</if>
|
||||
</td>
|
||||
<td>
|
||||
{$data.remark}
|
||||
</td>
|
||||
<td>
|
||||
<foreach name="data.oplist" item="vo" >
|
||||
{$vo}
|
||||
</foreach>
|
||||
</td>
|
||||
</tr>
|
||||
</volist>
|
||||
</if>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="page">
|
||||
<if condition="$role_export_check eq true ">
|
||||
<a class="sch-btn export-btn"
|
||||
href="{:U(CONTROLLER_NAME.'/'.ACTION_NAME,array_merge(['export'=>1],I('get.')))}" target="_blank">导出</a>
|
||||
</if>
|
||||
{$_page|default=''}
|
||||
</div>
|
||||
<!--弹出层-->
|
||||
<div class="promote-layer mb20">
|
||||
<form id="ajaxForm" action="{:U('set_withdraw')}" method="post">
|
||||
<ol class="promote-con">
|
||||
<li class="promote-con-con " id="deny">
|
||||
<div class="mb20">
|
||||
<span class="promote-name">备注:</span>
|
||||
<textarea class="textarea-style" name="remark" id="remark"></textarea>
|
||||
</div>
|
||||
<a class="ajax-post pack" style="cursor: pointer;" target-form="ids" url="{:U('setStatus',array('status'=>-1))}"><div class="promote-btn">拒绝</div></a>
|
||||
</li>
|
||||
</ol>
|
||||
</form>
|
||||
</div>
|
||||
</block>
|
||||
|
||||
<block name="script">
|
||||
<script>
|
||||
<volist name=":I('get.')" id="vo">
|
||||
Think.setValue('{$key}',"{$vo}");
|
||||
</volist>
|
||||
$(".select_gallery").select2();
|
||||
</script>
|
||||
<script type="text/javascript">
|
||||
//导航高亮
|
||||
highlight_subnav("{:U('index')}");
|
||||
$(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();
|
||||
}
|
||||
});
|
||||
$(".editRatio").on("click",function(){
|
||||
var id = $(this).data("id");
|
||||
var url = "{:U('editRatio')}"+"&id="+id;
|
||||
window.location.href = url;
|
||||
})
|
||||
$(".delRatio").on("click",function(){
|
||||
var id = $(this).data("id");
|
||||
var url = "{:U('delRatio')}"+"&id="+id;
|
||||
layer.confirm('删除后将无法恢复,请慎重选择', {
|
||||
closeBtn:0,
|
||||
title:false,
|
||||
btn: ['取消','删除'] //按钮
|
||||
}, function(index){
|
||||
layer.close(index);
|
||||
}, function(){
|
||||
$.get(url,function(data){
|
||||
if(data.code == 1){
|
||||
layer.msg('<span style="color:white">'+data.msg+'<span>',{time: 1000},function(){
|
||||
window.location.reload();
|
||||
});
|
||||
|
||||
}else{
|
||||
layer.msg(data.msg,{icon: 2});
|
||||
}
|
||||
});
|
||||
});
|
||||
})
|
||||
|
||||
$("#marketAgree,#marketRefuse,#adminAgree").on("click",function(){
|
||||
var id = $(this).attr("id");
|
||||
if(id == "marketAgree"){
|
||||
var opname = "市场部审批通过";
|
||||
var opurl = "{:U('marketAgree')}";
|
||||
var opst ="[未进行审批]";
|
||||
var status = 0;
|
||||
}else if(id=="marketRefuse"){
|
||||
var opname = "市场部审批拒绝";
|
||||
var opurl = "{:U('marketRefuse')}";
|
||||
var opst ="[未进行审批]";
|
||||
var status = 0;
|
||||
}else if(id=="adminAgree"){
|
||||
var opname = "管理员审批通过";
|
||||
var opurl = "{:U('adminAgree')}";
|
||||
var opst ="[市场部审批通过]";
|
||||
var status = 1;
|
||||
}else if(id=="adminRefuse"){
|
||||
var opname = "管理员审批拒绝";
|
||||
var opurl = "{:U('adminRefuse')}";
|
||||
var opst ="[市场部审批通过]";
|
||||
var status = 1;
|
||||
}
|
||||
|
||||
var flag = false;
|
||||
var text = $("input:checkbox[name='ids[]']:checked").map(function(index,elem) {
|
||||
if($(elem).data("status") != status){
|
||||
flag = true;
|
||||
}else{
|
||||
return $(elem).val();
|
||||
}
|
||||
}).get().join(",");
|
||||
if(text == ''){
|
||||
layer.msg("<font style='color:white'>" + '无需要'+opname+'的申请,仅'+opst+'状态可以进行'+opname+"</font>");
|
||||
return;
|
||||
}
|
||||
if(flag){
|
||||
layer.confirm(opname+"仅会对"+opst+"的申请进行处理,选择中包含其他的状态的申请将被忽略,点击取消停止操作",{title:false}, function(index){
|
||||
_doAgreeApply();
|
||||
layer.close(index);
|
||||
});
|
||||
}else{
|
||||
_doAgreeApply();
|
||||
}
|
||||
function _doAgreeApply(){
|
||||
//执行
|
||||
$.ajax({
|
||||
type: "POST",
|
||||
url: opurl,
|
||||
dataType: 'json',
|
||||
async: false,
|
||||
data: {ids:text},
|
||||
success:function(data){
|
||||
if(data.status==1){
|
||||
layer.msg("<font style='color:white'>" + data.info + "</font>");
|
||||
setTimeout(function(){
|
||||
window.location.reload();
|
||||
},1500);
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
})
|
||||
|
||||
})
|
||||
|
||||
|
||||
</script>
|
||||
|
||||
</block>
|
@ -0,0 +1,364 @@
|
||||
<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>
|
||||
<script type="text/javascript" src="__STATIC__/layer/extend/layer.ext.js"></script>
|
||||
<link rel="stylesheet" href="__CSS__/promote.css" type="text/css"/>
|
||||
<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;}
|
||||
.layui-layer-dialog .layui-layer-content{color:red}
|
||||
.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;
|
||||
}
|
||||
</style>
|
||||
|
||||
<div class="cf top_nav_list">
|
||||
<div class="cf main-place top_nav_list navtab_list">
|
||||
<div class="fr">
|
||||
<a href="{:U('index')}">生效列表</a>
|
||||
<a class="tabchose" href="{:U('list')}">审核列表</a>
|
||||
</div>
|
||||
<h3 class="page_title">推广游戏分成管理</h3>
|
||||
<p class="description_text"></p>
|
||||
</div>
|
||||
<!-- <div class="fl button_list">
|
||||
<div class="tools">
|
||||
<a class=" " href="{:U('add')}"><span class="button_icon button_icon1"></span>新增推广游戏分成</a>
|
||||
</div>
|
||||
</div> -->
|
||||
<!-- 高级搜索 -->
|
||||
<div class="jssearch fl cf search_list" style="margin-bottom:12px">
|
||||
<div class="input-list search-title-box">
|
||||
<label>搜索:</label>
|
||||
</div>
|
||||
|
||||
<div class="input-list input-list-promote search_label_rehab">
|
||||
<select id="company_id" name="company_id" class="select_gallery" >
|
||||
<option value="">请选择公司</option>
|
||||
<volist name="companyList" id="vo">
|
||||
<option value="{$vo.id}" <if condition="$vo.id eq I('company_id')">selected</if> >{$vo.company_name}</option>
|
||||
</volist>
|
||||
</select>
|
||||
</div>
|
||||
<div class="input-list input-list-game search_label_rehab">
|
||||
<select id="relation_game_id" name="relation_game_id" class="select_gallery" >
|
||||
<option value="">现包名</option>
|
||||
<volist name="gameList" id="vo">
|
||||
<option value="{$vo.relation_game_id}" <if condition="$vo.relation_game_id eq I('relation_game_id')">selected</if> >{$vo.relation_game_name}</option>
|
||||
</volist>
|
||||
</select>
|
||||
</div>
|
||||
|
||||
<div class="input-list input-list-game search_label_rehab">
|
||||
<select id="status" name="status" class="select_gallery" >
|
||||
<option value="">请选择审核状态</option>
|
||||
<volist name="status" id="vo">
|
||||
<option value="{$key}" <if condition="isset($_GET['status']) && $key eq I('status')">selected</if> >{$vo}</option>
|
||||
</volist>
|
||||
</select>
|
||||
</div>
|
||||
|
||||
<div class="input-list">
|
||||
<a class="sch-btn" href="javascript:;" id="search" url="{:U('index','&row='.I('row'),false)}">搜索</a>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<div class="butnbox" style="margin-bottom: 10px;">
|
||||
<div class="butnlist jscheckbutn" style="margin-left: 2px">
|
||||
<foreach name="menubtn" item="vo" >
|
||||
{$vo}
|
||||
</foreach>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- 数据列表 -->
|
||||
<div class="data_list">
|
||||
<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>
|
||||
<th>市场部审批</th>
|
||||
<th>管理员审批</th>
|
||||
<th>备注</th>
|
||||
<th>操作</th>
|
||||
</tr>
|
||||
</thead>
|
||||
|
||||
<!-- 列表 -->
|
||||
<tbody>
|
||||
<if condition = "empty($data)">
|
||||
<tr>
|
||||
<td colspan="16" class="text-center">aOh! 暂时还没有内容!</td>
|
||||
</tr>
|
||||
<else/>
|
||||
<volist name="data" id="data">
|
||||
<tr>
|
||||
<td>
|
||||
<input class="ids" type="checkbox" data-status="{$data.status}" value="{$data['id']}" name="ids[]" >
|
||||
</td>
|
||||
<td>{$data.company_name}</td>
|
||||
<td>{$data.company_belong}</td>
|
||||
<td>{$data.settlement_type}</td>
|
||||
<td>{$data.game_type_name}</td>
|
||||
<td>{$data.original_package_name}</td>
|
||||
<td>{$data.relation_game_name}</td>
|
||||
<td>{$data.valid}</td>
|
||||
<td style="line-height: 16px;text-indent: 0;">
|
||||
<div style="text-align: left;width: 90%;margin-left: 5%;margin-top: 10px;margin-bottom: 10px;">
|
||||
{$data.last_turnover_ratio_str}
|
||||
</div>
|
||||
</td>
|
||||
<td style="line-height: 16px;text-indent: 0;">
|
||||
<div style="text-align: left;width: 90%;margin-left: 5%;margin-top: 10px;margin-bottom: 10px;">
|
||||
{$data.turnover_ratio_str}
|
||||
</div>
|
||||
</td>
|
||||
|
||||
<td>
|
||||
<div style="line-height: 2;">
|
||||
{$data.create}
|
||||
</div>
|
||||
</td>
|
||||
<td>
|
||||
|
||||
<if condition="$data.status eq -1 ">
|
||||
<div style="line-height: 2;color: red;">
|
||||
{$data.market}
|
||||
</div>
|
||||
<else />
|
||||
<div style="line-height: 2;">
|
||||
{$data.market}
|
||||
</div>
|
||||
</if>
|
||||
</td>
|
||||
|
||||
<td>
|
||||
<if condition="$data.status eq -2 ">
|
||||
<div style="line-height: 2;color: red;">
|
||||
{$data.admin}
|
||||
</div>
|
||||
<else />
|
||||
<div style="line-height: 2;">
|
||||
{$data.admin}
|
||||
</div>
|
||||
</if>
|
||||
</td>
|
||||
<td>
|
||||
{$data.remark}
|
||||
</td>
|
||||
<td>
|
||||
<foreach name="data.oplist" item="vo" >
|
||||
{$vo}
|
||||
</foreach>
|
||||
</td>
|
||||
</tr>
|
||||
</volist>
|
||||
</if>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="page">
|
||||
<if condition="$role_export_check eq true ">
|
||||
<a class="sch-btn export-btn"
|
||||
href="{:U(CONTROLLER_NAME.'/'.ACTION_NAME,array_merge(['export'=>1],I('get.')))}" target="_blank">导出</a>
|
||||
</if>
|
||||
{$_page|default=''}
|
||||
</div>
|
||||
<!--弹出层-->
|
||||
<div class="promote-layer mb20">
|
||||
<form id="ajaxForm" action="{:U('set_withdraw')}" method="post">
|
||||
<ol class="promote-con">
|
||||
<li class="promote-con-con " id="deny">
|
||||
<div class="mb20">
|
||||
<span class="promote-name">备注:</span>
|
||||
<textarea class="textarea-style" name="remark" id="remark"></textarea>
|
||||
</div>
|
||||
<a class="ajax-post pack" style="cursor: pointer;" target-form="ids" url="{:U('setStatus',array('status'=>-1))}"><div class="promote-btn">拒绝</div></a>
|
||||
</li>
|
||||
</ol>
|
||||
</form>
|
||||
</div>
|
||||
</block>
|
||||
|
||||
<block name="script">
|
||||
<script>
|
||||
<volist name=":I('get.')" id="vo">
|
||||
Think.setValue('{$key}',"{$vo}");
|
||||
</volist>
|
||||
$(".select_gallery").select2();
|
||||
</script>
|
||||
<script type="text/javascript">
|
||||
//导航高亮
|
||||
highlight_subnav("{:U('index')}");
|
||||
$(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();
|
||||
}
|
||||
});
|
||||
$(".editRatio").on("click",function(){
|
||||
var id = $(this).data("id");
|
||||
var url = "{:U('editRatio')}"+"&id="+id;
|
||||
window.location.href = url;
|
||||
})
|
||||
$(".delRatio").on("click",function(){
|
||||
var id = $(this).data("id");
|
||||
var url = "{:U('delRatio')}"+"&id="+id;
|
||||
layer.confirm('删除后将无法恢复,请慎重选择', {
|
||||
closeBtn:0,
|
||||
title:false,
|
||||
btn: ['取消','删除'] //按钮
|
||||
}, function(index){
|
||||
layer.close(index);
|
||||
}, function(){
|
||||
$.get(url,function(data){
|
||||
if(data.code == 1){
|
||||
layer.msg('<span style="color:white">'+data.msg+'<span>',{time: 1000},function(){
|
||||
window.location.reload();
|
||||
});
|
||||
|
||||
}else{
|
||||
layer.msg(data.msg,{icon: 2});
|
||||
}
|
||||
});
|
||||
});
|
||||
})
|
||||
|
||||
$("#marketAgree,#marketRefuse,#adminAgree").on("click",function(){
|
||||
var id = $(this).attr("id");
|
||||
if(id == "marketAgree"){
|
||||
var opname = "市场部审批通过";
|
||||
var opurl = "{:U('marketAgree')}";
|
||||
var opst ="[未进行审批]";
|
||||
var status = 0;
|
||||
}else if(id=="marketRefuse"){
|
||||
var opname = "市场部审批拒绝";
|
||||
var opurl = "{:U('marketRefuse')}";
|
||||
var opst ="[未进行审批]";
|
||||
var status = 0;
|
||||
}else if(id=="adminAgree"){
|
||||
var opname = "管理员审批通过";
|
||||
var opurl = "{:U('adminAgree')}";
|
||||
var opst ="[市场部审批通过]";
|
||||
var status = 1;
|
||||
}else if(id=="adminRefuse"){
|
||||
var opname = "管理员审批拒绝";
|
||||
var opurl = "{:U('adminRefuse')}";
|
||||
var opst ="[市场部审批通过]";
|
||||
var status = 1;
|
||||
}
|
||||
|
||||
var flag = false;
|
||||
var text = $("input:checkbox[name='ids[]']:checked").map(function(index,elem) {
|
||||
if($(elem).data("status") != status){
|
||||
flag = true;
|
||||
}else{
|
||||
return $(elem).val();
|
||||
}
|
||||
}).get().join(",");
|
||||
if(text == ''){
|
||||
layer.msg("<font style='color:white'>" + '无需要'+opname+'的申请,仅'+opst+'状态可以进行'+opname+"</font>");
|
||||
return;
|
||||
}
|
||||
if(flag){
|
||||
layer.confirm(opname+"仅会对"+opst+"的申请进行处理,选择中包含其他的状态的申请将被忽略,点击取消停止操作",{title:false}, function(index){
|
||||
_doAgreeApply();
|
||||
layer.close(index);
|
||||
});
|
||||
}else{
|
||||
_doAgreeApply();
|
||||
}
|
||||
function _doAgreeApply(){
|
||||
//执行
|
||||
$.ajax({
|
||||
type: "POST",
|
||||
url: opurl,
|
||||
dataType: 'json',
|
||||
async: false,
|
||||
data: {ids:text},
|
||||
success:function(data){
|
||||
if(data.status==1){
|
||||
layer.msg("<font style='color:white'>" + data.info + "</font>");
|
||||
setTimeout(function(){
|
||||
window.location.reload();
|
||||
},1500);
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
})
|
||||
|
||||
})
|
||||
|
||||
|
||||
</script>
|
||||
|
||||
</block>
|
Loading…
Reference in New Issue