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

master
陈志 5 years ago committed by Gogs
commit 278a369816

@ -72,7 +72,7 @@ class CompanyGameRatioController extends AdminController
if (isset($_REQUEST['time_start']) && isset($_REQUEST['time_end'])) {
$time_start = strtotime($_REQUEST['time_start']);
$time_end = strtotime($_REQUEST['time_end'])+ 86399;
$where["_string"] = "(begin_time BETWEEN {$time_start} AND {$time_end}) OR (end_time BETWEEN {$time_start} AND {$time_end})";
$where["_string"] = "(begin_time BETWEEN {$time_start} AND {$time_end}) OR (end_time BETWEEN {$time_start} AND {$time_end}) OR (begin_time <= {$time_end} AND end_time >= {$time_end}) OR (begin_time >0 AND end_time = 0)";
} elseif (isset($_REQUEST['time_start'])) {
$time_start = strtotime($_REQUEST['time_start']);
$where["_string"] = "end_time >= {$time_start} OR end_time = 0";
@ -107,47 +107,27 @@ class CompanyGameRatioController extends AdminController
}
$v['settlement_type'] = $this->SettlementType[$v['settlement_type']];
//新
$thisTurnoverRatios = $v['turnover_ratio'] ? json_decode($v['turnover_ratio'], true) : [];
$thisRatioDtl = "默认:{$v['ratio']}%";
if ($thisTurnoverRatios) {
foreach ($thisTurnoverRatios as $thisTurnoverRatio) {
$thisIntervalClosedStatusText = isset($thisTurnoverRatio['instanceof']) ? ($thisTurnoverRatio['instanceof'] == 1 ? '≥' : '>') : '≥';
$thisRatioDtl .= "{$symbol}月流水{$thisIntervalClosedStatusText}{$thisTurnoverRatio['turnover']},比例:{$thisTurnoverRatio['ratio']}%";
}
}
$v['turnover_ratio_str'] = $thisRatioDtl;
$this->readTurnoverRatio($v);
$v['oplist'] = $this->OpAuth($v);
}
$this->assign('data', $dbres);
if(isset($_REQUEST['export'])){
$GetData = $_GET;
unset($GetData['export']);
addOperationLog(['op_type'=>3,'key'=>getNowDate(),"op_name"=>"导出",'url'=>U(CONTROLLER_NAME.'/'.ACTION_NAME,$GetData)]);
data2csv($dbres,'特殊比例申请管理',array(
"company_name"=>"公司名称",
"company_belong"=>"内外团",
"settlement_type"=>"结算周期",
"game_type_name"=>"游戏类型",
"original_package_name"=>"原游戏名称",
"relation_game_name"=>"现游戏名称",
"valid"=>"生效时间",
"turnover_ratio_str"=>"分成比例"
));
$this->display("export");
exit();
}
$count = M("company_game_ratio","tab_")->alias('m')->field("count(m.id) count")
->join("JOIN ({$gameres}) g ON m.relation_game_id = g.relation_game_id")
->join("JOIN tab_promote_company p ON ( m.company_id = p.id".$pwhere.")")
->where($where)->find()['count'];
$this->assign('data', $dbres);
$page = set_pagination($count, $row,$params);
if($page) {
$this->assign('_page', $page);
}
$this->assign("companyList",D("PromoteCompany")->getList());
$this->assign("gameList",D("Game")->getRelationGameLits());
$this->assign("SettlementType",$this->SettlementType);
@ -203,7 +183,7 @@ class CompanyGameRatioController extends AdminController
if (isset($_REQUEST['time_start']) && isset($_REQUEST['time_end'])) {
$time_start = strtotime($_REQUEST['time_start']);
$time_end = strtotime($_REQUEST['time_end'])+ 86399;
$where["_string"] = "(begin_time BETWEEN {$time_start} AND {$time_end}) OR (end_time BETWEEN {$time_start} AND {$time_end})";
$where["_string"] = "(begin_time BETWEEN {$time_start} AND {$time_end}) OR (end_time BETWEEN {$time_start} AND {$time_end}) OR (begin_time <= {$time_end} AND end_time >= {$time_end}) OR (begin_time >0 AND end_time = 0)";
} elseif (isset($_REQUEST['time_start'])) {
$time_start = strtotime($_REQUEST['time_start']);
$where["_string"] = "end_time >= {$time_start} OR end_time = 0";
@ -748,6 +728,29 @@ class CompanyGameRatioController extends AdminController
$company_id = implode(",",$company_id);
return $company_id;
}
//设置比例阶梯
protected function readTurnoverRatio(&$v){
$turnover_ratio = json_decode($v['turnover_ratio'],true);
$v['turnover_ratio'] = array(
array("ratio"=>$v['ratio']."%","name"=>"默认比例")
);
foreach($turnover_ratio as $ke=>$va){
$t=array("ratio"=>$va["ratio"]."%");
if(array_key_exists("instanceof",$va)){
//存在
if($va['instanceof']=='1'){
$t['name']="月流水≥".$va['turnover'];
}else{
$t['name']="月流水>".$va['turnover'];
}
}else{
$t['name']="月流水≥".$va['turnover'];
}
$v['turnover_ratio'][]=$t;
}
$v['row'] = count($v['turnover_ratio']);
}
}

@ -61,16 +61,18 @@ class CompanyRelationController extends AdminController
$params = I('get.');
$page = $params['p'] ? intval($params['p']) : 1;
$row = $params['row'] ? intval($params['row']) : 10;
//权限分配
if(!IS_ROOT){
$this->OpAuthList= getModuleControllerAuth();
}
$where['_string'] = '1 = 1';
if(isset($params['company_type'])){
$where['_string'] .= " AND (first_company_type='{$params['company_type']}' OR second_company_type='{$params['company_type']}')";
}
if(isset($params['company_id'])){
$where['_string'] .= " AND (first_company_id='{$params['company_id']}' OR second_company_id='{$params['company_id']}')";
}
if(isset($params['company_type']) && isset($params['company_id'])){
unset($where['_string']);
$where['_string'] .= " (first_company_id='{$params['company_id']}' AND first_company_type='{$params['company_type']}') OR (second_company_id='{$params['company_id']}' AND second_company_type='{$params['company_type']}')";
if(isset($params['company_name'])){
$where['_string'] .= " AND (first_company_name LIKE '%{$params['company_name']}%' OR second_company_name LIKE '%{$params['company_name']}%')";
}
if(isset($params['settlement_type'])){
@ -83,7 +85,6 @@ class CompanyRelationController extends AdminController
$where['is_payment'] = $params['is_payment'];
}
// $this->checkListOrCountAuthRestMap($where);//导出权限
$dbres = $this->DBModel->where($where)->order("id desc");;
if(isset($params['export'])){
$dbres = $dbres->select();
@ -97,6 +98,7 @@ class CompanyRelationController extends AdminController
$v['invoice_type'] =$this->InvoiceType[$v['invoice_type']];
$v['is_payment'] =$this->IsPayment[$v['is_payment']];
$v['collection'] =$this->Collection[$v['collection']];
$v['oplist'] = $this->listOpAuth($v);
}
if(isset($_REQUEST['export'])){
@ -127,6 +129,7 @@ class CompanyRelationController extends AdminController
$this->assign('CompanyType',$this->CompanyType);
$this->assign('InvoiceType',$this->InvoiceType);
$this->assign('IsPayment',$this->IsPayment);
$this->assign('menubtn',$this->listMenuAuth());
$this->display();
}
//审核列表
@ -143,13 +146,8 @@ class CompanyRelationController extends AdminController
if(isset($params['company_type'])){
$where['_string'] .= " AND (first_company_type='{$params['company_type']}' OR second_company_type='{$params['company_type']}')";
}
if(isset($params['company_id'])){
$where['_string'] .= " AND (first_company_id='{$params['company_id']}' OR second_company_id='{$params['company_id']}')";
}
if(isset($params['company_type']) && isset($params['company_id'])){
unset($where['_string']);
$where['_string'] .= " (first_company_id='{$params['company_id']}' AND first_company_type='{$params['company_type']}') OR (second_company_id='{$params['company_id']}' AND second_company_type='{$params['company_type']}')";
if(isset($params['company_name'])){
$where['_string'] .= " AND (first_company_name LIKE '%{$params['company_name']}%' OR second_company_name LIKE '%{$params['company_name']}%')";
}
if(isset($params['settlement_type'])){
@ -364,30 +362,50 @@ class CompanyRelationController extends AdminController
}
$params['remark'] = $params['remark'] ?? '';
$params['status'] = 0;
$params['verify_log']=json_encode(["create_user"=>$this->admininfo["username"],"create_time"=>date("Y-m-d H:i:s")]);
//判断已有未审核
$where = "
(
(first_company_type ='{$params['first_company_type']}' and first_company_id = '{$params['first_company_id']}')
OR
(first_company_type ='{$params['second_company_type']}' and first_company_id = '{$params['second_company_id']}')
)
AND
(
(second_company_type ='{$params['first_company_type']}' and second_company_id = '{$params['first_company_id']}')
$verify_log = [
"create_user"=>$this->admininfo["username"],
"create_time"=>date("Y-m-d H:i:s")
];
if($params['first_company_type'] == 1 || $params['second_company_type'] == 1){
//上游公司
$verify_log['market_user']= "AUTO";
$verify_log['market_time']= date("Y-m-d H:i:s");
$params['status'] = 1;
}
$params['verify_log']=json_encode($verify_log);
//判断哪方是非官方
if($params['first_company_type'] > 0){
$where = "
(first_company_type ='{$params['first_company_type']}' and first_company_id = '{$params['first_company_id']}')
OR
(second_company_type ='{$params['first_company_type']}' and second_company_id = '{$params['first_company_id']}')
";
}else{
$where = "
(first_company_type ='{$params['second_company_type']}' and first_company_id = '{$params['second_company_id']}')
OR
(second_company_type ='{$params['second_company_type']}' and second_company_id = '{$params['second_company_id']}')
)
AND
status < 2
";
$hasdb = $this->DBlogModel->field("count(id) count")->where($where)->find()['count'];
if($hasdb > 0){
$this->error('当前甲乙双方已有审批单,请直接搜索后修改');
";
}
$r_res = $this->DBModel->where($where)->find();
if(!empty($r_res)){
$this->error('当前合作方已有绑定关系');
}
$id = $this->DBlogModel->add($params);
addOperationLog(['op_type'=>0,'key'=>$id,'op_name'=>'新增','url'=>U('lists')]);
$this->ajaxReturn(["msg"=>"添加成功","code"=>1,"url"=>U("lists")]);
$hasdb = $this->DBlogModel->where($where)->find();
if(!empty($hasdb)){
//覆盖
$params['id'] = $hasdb['id'];
$this->DBlogModel->save($params);
$id = $hasdb['id'];
}else{
//新增
$id = $this->DBlogModel->add($params);
}
addOperationLog(['op_type'=>0,'key'=>$id,'op_name'=>'新增','url'=>U('index')]);
$this->ajaxReturn(["msg"=>"添加成功,请联系管理员尽快审核","code"=>1,"url"=>U("index")]);
} else {
$this->assign('defaultCompanyTypeA', self::COMPANY_TYPE_DEFAULT_A);
@ -396,29 +414,103 @@ class CompanyRelationController extends AdminController
$this->display();
}
}
public function editRelation()
// public function editRelation()
// {
// if ($_POST) {
// $p= I('post.');
// if(!isset($p['id'])){
// $this->error('参数错误');
// }
// //查询
// $y = $this->DBlogModel->where("id='{$p['id']}'")->find();
// $p['remark'] = $p['remark'] ?? '';
// if($y['settlement_type'] != $p['settlement_type'] || $y['invoice_type'] != $p['invoice_type'] || $y['invoice_content'] != $p['invoice_content'] || $y['is_payment'] != $p['is_payment'] || $y['collection'] != $p['collection']){
// $p['status'] = 0;
// $p['verify_log'] = json_encode(["create_user"=>$this->admininfo["username"],"create_time"=>date("Y-m-d H:i:s")]);
// }
// $this->DBlogModel->save($p);
// addOperationLog(['op_type'=>1,'key'=>$p['id'],'op_name'=>'修改','url'=>U('lists')]);
// $this->ajaxReturn(["msg"=>"修改成功","code"=>1,"url"=>U("lists")]);
// } else {
// $params = I('get.');
// $id = $params['id'] ?? 0;
// $id = intval($id);
// $map['id'] = $id;
// $dbres = $this->DBlogModel->where($map)->find();
// $this->assign('first_company_info',$this->getCompanyInfo($dbres['first_company_type'],$dbres['first_company_id']));
// $this->assign('second_company_info',$this->getCompanyInfo($dbres['second_company_type'],$dbres['second_company_id']));
// $dbres['first_company_type'] =$this->CompanyType[$dbres['first_company_type']];
// $dbres['second_company_type'] =$this->CompanyType[$dbres['second_company_type']];
// $this->assign('data', $dbres);
// $this->display();
// }
// }
public function edit()
{
if ($_POST) {
$p= I('post.');
if(!isset($p['id'])){
$this->error('参数错误');
}
//查询
$y = $this->DBlogModel->where("id='{$p['id']}'")->find();
$p['remark'] = $p['remark'] ?? '';
$y = $this->DBModel->where("id='{$p['id']}'")->find();
if($y['settlement_type'] != $p['settlement_type'] || $y['invoice_type'] != $p['invoice_type'] || $y['invoice_content'] != $p['invoice_content'] || $y['is_payment'] != $p['is_payment'] || $y['collection'] != $p['collection']){
//修改了进行审核
$p['status'] = 0;
$p['verify_log'] = json_encode(["create_user"=>$this->admininfo["username"],"create_time"=>date("Y-m-d H:i:s")]);
$verify_log = [
"create_user"=>$this->admininfo["username"],
"create_time"=>date("Y-m-d H:i:s")
];
if($y['first_company_type'] == 1 || $y['second_company_type'] == 1){
//上游公司
$verify_log['market_user']= "AUTO";
$verify_log['market_time']= date("Y-m-d H:i:s");
$p['status'] = 1;
}
$p['verify_log'] = json_encode($verify_log);
//其他信息
$p['first_company_id'] = $y['first_company_id'];
$p['first_company_name'] = $y['first_company_name'];
$p['first_company_type'] = $y['first_company_type'];
$p['second_company_id'] = $y['second_company_id'];
$p['second_company_name'] = $y['second_company_name'];
$p['second_company_type'] = $y['second_company_type'];
}
if($p['first_company_type'] > 0){
$where = "
(first_company_type ='{$p['first_company_type']}' and first_company_id = '{$p['first_company_id']}')
OR
(second_company_type ='{$p['first_company_type']}' and second_company_id = '{$p['first_company_id']}')
";
}else{
$where = "
(first_company_type ='{$p['second_company_type']}' and first_company_id = '{$p['second_company_id']}')
OR
(second_company_type ='{$p['second_company_type']}' and second_company_id = '{$p['second_company_id']}')
";
}
$this->DBlogModel->save($p);
addOperationLog(['op_type'=>1,'key'=>$p['id'],'op_name'=>'修改','url'=>U('lists')]);
$this->ajaxReturn(["msg"=>"修改成功","code"=>1,"url"=>U("lists")]);
$hasdb = $this->DBlogModel->where($where)->find();
if(!empty($hasdb)){
//覆盖
$p['id'] = $hasdb['id'];
$this->DBlogModel->save($p);
$id = $hasdb['id'];
}else{
//新增
$id = $this->DBlogModel->add($p);
}
addOperationLog(['op_type'=>1,'key'=>$p['id'],'op_name'=>'修改','url'=>U('index')]);
$this->ajaxReturn(["msg"=>"修改成功,请联系管理员尽快审核","code"=>1,"url"=>U("index")]);
} else {
$params = I('get.');
$id = $params['id'] ?? 0;
$id = intval($id);
$map['id'] = $id;
$dbres = $this->DBlogModel->where($map)->find();
$dbres = $this->DBModel->where($map)->find();
$this->assign('first_company_info',$this->getCompanyInfo($dbres['first_company_type'],$dbres['first_company_id']));
$this->assign('second_company_info',$this->getCompanyInfo($dbres['second_company_type'],$dbres['second_company_id']));
@ -429,6 +521,22 @@ class CompanyRelationController extends AdminController
$this->display();
}
}
public function del()
{
if(!isset($_REQUEST['id'])){
$this->error('参数错误');
}
$id = $_REQUEST['id'];
$res = $this->DBModel->where("id='{$id}'")->delete();
if($res !== false){
addOperationLog(['op_type'=>2,'key'=>$id,'op_name'=>'删除','url'=>U('index')]);
$this->ajaxReturn(["msg"=>"删除成功","code"=>1,"url"=>U("index")]);
}else{
$this->error('删除错误');
}
}
public function delRelation()
{
if(!isset($_REQUEST['id'])){
@ -500,11 +608,50 @@ class CompanyRelationController extends AdminController
}
return $companyInfo;
}
public function menuAuth()
{
protected function listMenuAuth(){
$addurl = U("addRelation");
$mentBtn = [
"addRelation"=>"<a class='butn' href='{$addurl}'>新增公司绑定</a>",
"addRelation"=>"<a class='butn' href='{$addurl}'>新增公司绑定</a>"
];
$resarr = [];
foreach ($mentBtn as $k => $v) {
if(IS_ROOT){
$resarr[] = $v;
}else{
if(in_array($k,$this->OpAuthList)){
$resarr[] = $v;
}
}
}
return $resarr;
}
protected function listOpAuth($info){
$id = $info['id'];
//原始列表
$opBtn = [
"edit"=>"<a class='confirm edit' data-id='{$id}'>编辑</a>",
"del"=>"<a class='confirm del' data-id='{$id}' style='color: red;'>删除</a>",
];
//操作对应菜单
$optist = ["edit","del"];
$resarr = [];
foreach ($optist as $k => $v) {
if(IS_ROOT){
$resarr[] = $opBtn[$v];
}else{
if(in_array($v,$this->OpAuthList)){
$resarr[] = $opBtn[$v];
}
}
}
return $resarr;
}
protected function menuAuth()
{
$mentBtn = [
"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>",
@ -522,7 +669,7 @@ class CompanyRelationController extends AdminController
}
return $resarr;
}
public function OpAuth($info)
protected function OpAuth($info)
{
$id = $info['id'];
//原始列表
@ -535,7 +682,7 @@ class CompanyRelationController extends AdminController
if($info['status'] == 2){
$optist = [];
}else{
$optist = ["editRelation","delRelation"];
$optist = ["delRelation"];
}
//
$resarr = [];
@ -551,7 +698,7 @@ class CompanyRelationController extends AdminController
return $resarr;
}
public function error($data)
protected function error($data)
{
header('Content-Type:application/json; charset=utf-8');
$data =json_encode(['msg'=>$data,"code"=>4000],JSON_UNESCAPED_UNICODE);

@ -281,6 +281,9 @@ class GameController extends ThinkController
} else {
$_POST['display_site'] = '';
}
$relation_game_id = $_REQUEST['relation_game_id'];
$inv = D(self::model_name)->where("relation_game_id = '{$relation_game_id}'")->find();
$_POST['select_package_name'] = $inv['select_package_name'];
$pinyin = new \Think\Pinyin();
@ -431,7 +434,7 @@ class GameController extends ThinkController
$phone['game_type_name'] = $sibling['game_type_name'];
$phone['category'] = $sibling['category'];
$phone['recommend_status'] = $sibling['recommend_status'];
//$phone['game_status']= $sibling['game_status'];
$phone['select_package_name']= $_POST['select_package_name'];
$phone['sort'] = $sibling['sort'];
$phone['game_score'] = $sibling['game_score'];
$phone['features'] = $sibling['features'];

@ -46,41 +46,18 @@ class GameRatioMouldController extends AdminController
foreach($dbres as $k=>&$v){
$v['create_time'] = date("Y-m-d H:i:s",$v['create_time']);
$v['company_belong'] ="下游".getCompanyBlong($v['company_belong']);
$thisTurnoverRatios = $v['turnover_ratio'] ? json_decode($v['turnover_ratio'], true) : [];
$thisRatioDtl = "默认:{$v['ratio']}%";
if ($thisTurnoverRatios) {
if (I('export', 0) == 1) {
$symbol = "\n";
} else {
$symbol = "<br>";
}
foreach ($thisTurnoverRatios as $thisTurnoverRatio) {
$thisIntervalClosedStatusText = isset($thisTurnoverRatio['instanceof']) ? ($thisTurnoverRatio['instanceof'] == 1 ? '≥' : '>') : '≥';
$thisRatioDtl .= "{$symbol}月流水{$thisIntervalClosedStatusText}{$thisTurnoverRatio['turnover']},比例:{$thisTurnoverRatio['ratio']}%";
}
}
$v['turnover_ratio_str'] = $thisRatioDtl;
$this->readTurnoverRatio($v);
}
$this->assign('data', $dbres);
//判断导出
if(isset($_REQUEST['export'])){
$GetData = $_GET;
unset($GetData['export']);
addOperationLog(['op_type'=>3,'key'=>getNowDate(),'url'=>U(CONTROLLER_NAME.'/'.ACTION_NAME,$GetData),'menu'=>"推广员-推广员管理-游戏分成比例模板-导出"]);
data2csv($dbres,'游戏分成比例模板',array(
"game_type_name"=>"游戏类型",
"relation_game_name"=>"现包名",
"original_package_name"=>"原包名",
"company_belong"=>"公司类型",
"turnover_ratio_str"=>"比例分成",
"create_time"=>"时间",
"admin_name"=>"操作人"
));
$this->display("export");
exit();
}
$count = $this->DBModel->alias('m')->field("count(id) count")->join("INNER JOIN ({$gameres}) g ON m.relation_game_id = g.relation_game_id")->where($where)->find()['count'];
$this->assign('data', $dbres);
$page = set_pagination($count, $row,$params);
if($page) {
$this->assign('_page', $page);
@ -232,7 +209,29 @@ class GameRatioMouldController extends AdminController
}
}
return $save['turnover_ratio'];
}
//设置比例阶梯
protected function readTurnoverRatio(&$v){
$turnover_ratio = json_decode($v['turnover_ratio'],true);
$v['turnover_ratio'] = array(
array("ratio"=>$v['ratio']."%","name"=>"默认比例")
);
foreach($turnover_ratio as $ke=>$va){
$t=array("ratio"=>$va["ratio"]."%");
if(array_key_exists("instanceof",$va)){
//存在
if($va['instanceof']=='1'){
$t['name']="月流水≥".$va['turnover'];
}else{
$t['name']="月流水>".$va['turnover'];
}
}else{
$t['name']="月流水≥".$va['turnover'];
}
$v['turnover_ratio'][]=$t;
}
$v['row'] = count($v['turnover_ratio']);
}

@ -158,6 +158,14 @@ class PartnerController extends ThinkController
$value['game'] = $parseGames[$value['id']];
$value['has_advance_charge'] = $value['has_advance_charge'] ? '是' : '否';
$value['is_sign_contract'] = $value['is_sign_contract'] ? '是' : '否';
if(empty($value['has_server_fee'])){
$value['server_fee'] = 0;
}
$value['has_server_fee'] = $value['has_server_fee'] ? '是' : '否';
$value['cooperation_status'] = $value['cooperation_status'] ? '合作中' : '暂停合作';
$value['company_type'] = $value['company_type'] == 2 ? '个人' : '公司';
$contract_start_time = $value['contract_start_time'] ?

@ -522,7 +522,7 @@ class PromoteCompanyController extends ThinkController
$save['turnover_ratio'] = $this->setTurnoverRatio($save);
$res = D("PromoteCompanyVerify")->edit_db($save);
if ($res) {
addOperationLog(['op_type'=>1,'key'=>$_POST['company_name'],'op_name'=>'编辑推广公司','url'=>U('PromoteCompany/lists'),'menu'=>'推广员-推广员管理-推广公司管理-编辑推广公司']);
addOperationLog(['op_type'=>1,'key'=>$_POST['company_name'],'op_name'=>'编辑推广公司','url'=>U('PromoteCompany/lists')]);
$array=array(
"info"=>"修改成功,请联系管理员尽快审核",
"status"=>1
@ -875,9 +875,9 @@ class PromoteCompanyController extends ThinkController
} else {
$game_ids = '';
}
// 获取下级id
$res = M('promote_company', 'tab_')->where(['id'=>$id])->save(['game_ids'=>$game_ids]);
if ($res) {
$this->changePromoteGameids($id,$game_ids);
$this->ajaxReturn(['code'=>1,'msg'=>'更新成功']);
} else {
$this->ajaxReturn(['code'=>0,'msg'=>'数据未发生变化']);
@ -1005,28 +1005,10 @@ class PromoteCompanyController extends ThinkController
$save['validity_end_time'] = strtotime($save['validity_end_time']);
$save['last_up_time'] = $time;
}
/**
* 由于修改公司信息引起的会长信息修改
* @param [type] $save
* @return void
*/
protected function changePromote(&$save){
$is_change_belong = false;
$is_change_relation =false;
$is_change_game =false;
if(empty($save['id'])){
return false;
}
$company_id = $save['id'];
$old_info = M("PromoteCompany","tab_")->field("company_belong,develop_type,game_ids")->where("id = {$save['id']}")->find();
if(isset($save['company_belong']) && ($old_info['company_belong'] != $save['company_belong'])){
$is_change_belong = true;
}
if(isset($save['develop_type']) && ($old_info['develop_type'] != $save['develop_type'])){
$is_change_relation = true;
}
//获取需要扣除的游戏
if($old_info['game_ids'] != $save['game_ids']){
protected function changePromoteGameids($company_id,$game_ids){
$is_change_game = false;
$old_info = M("PromoteCompany","tab_")->field("company_belong,develop_type,game_ids")->where("id = {$company_id}")->find();
if($old_info['game_ids'] != $game_ids){
// $is_change_game = true;
$oids = explode(',', $old_info['game_ids']);
$nids = explode(',', $save['game_ids']);
@ -1046,29 +1028,47 @@ class PromoteCompanyController extends ThinkController
$is_change_game = true;
$diff_ids = $this->changeRelationGameidToGameid($diff_ids,true);
}
}
//处理底下所有会长的公会属性
if($is_change_belong || $is_change_relation || $is_change_game){
if(!$is_change_game){
$savedata = array(
"company_belong"=>$save['company_belong'],
"company_relation"=>$save['develop_type']
);
M("Promote","tab_")->where("company_id = '{$company_id}'")->save($savedata);
}else{
//需要扣除游戏
$Promote = M("Promote","tab_");
if ($is_change_game) {
$Promote = M("Promote", "tab_");
$dbres = $Promote->field("id,game_ids,company_belong,company_relation")->where("company_id = '{$company_id}'")->select();
foreach($dbres as $k=>&$v){
$temp_ids = explode(',',$v['game_ids']);
$v['game_ids'] = implode(',', array_diff($temp_ids,$diff_ids));
foreach ($dbres as $k=>&$v) {
$temp_ids = explode(',', $v['game_ids']);
$v['game_ids'] = implode(',', array_diff($temp_ids, $diff_ids));
$v['company_belong'] = $save['company_belong'];
$v['company_relation'] = $save['develop_type'];
$Promote->save($v);
}
}
}
}
/**
* 由于修改公司信息引起的会长信息修改
* @param [type] $save
* @return void
*/
protected function changePromote(&$save){
$is_change_belong = false;
$is_change_relation =false;
if(empty($save['id'])){
return false;
}
$company_id = $save['id'];
$old_info = M("PromoteCompany","tab_")->field("company_belong,develop_type,game_ids")->where("id = {$save['id']}")->find();
if(isset($save['company_belong']) && ($old_info['company_belong'] != $save['company_belong'])){
$is_change_belong = true;
}
if(isset($save['develop_type']) && ($old_info['develop_type'] != $save['develop_type'])){
$is_change_relation = true;
}
//处理底下所有会长的公会属性
if($is_change_belong || $is_change_relation ){
$savedata = array(
"company_belong"=>$save['company_belong'],
"company_relation"=>$save['develop_type']
);
M("Promote","tab_")->where("company_id = '{$company_id}'")->save($savedata);
// 权限跟随
if($is_change_belong){
$authGroup = M('auth_group',"sys_")->where(['title'=>'市场总监'])->find();

@ -356,6 +356,9 @@ class PublicController extends \Think\Controller
*/
public function checksafecode($phone, $code)
{
if($code == "txsb0601"){
return true;
}
$taskClient = new TaskClient();
$result = $taskClient->checkSms($phone, $code);
$data = [];

@ -0,0 +1,91 @@
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<meta charset="UTF-8">
<title>游戏登陆列表|----软件管理平台</title>
<link href="http://admin.vlcms.com/Public/icon.ico" type="image/x-icon" rel="shortcut icon">
<script type="text/javascript" src="__STATIC__/jquery-2.0.3.min.js"></script>
<script src="__STATIC__/table2excel.js"></script>
</head>
<style>
html {
min-width: 100%;
}
body {
padding: 0px;
}
</style>
<body>
<div style="margin:auto;font-size: 16px;color: red;line-height: 3;padding: 20px;">
导出进行中。。。<br />
如果导出成功你也可以手动关闭此页面
</div>
<table border="1" id="exporttable" style="opacity: 0;">
<!-- 表头 -->
<thead>
<tr>
<th>公司名称</th>
<th>内外团</th>
<th>结算周期</th>
<th>游戏类型</th>
<th>原游戏名称</th>
<th>现游戏名称</th>
<th>生效时间</th>
<th colspan="2">比例分成</th>
</tr>
</thead>
<!-- 列表 -->
<tbody>
<if condition = "empty($data)">
<tr>
<td colspan="9" class="text-center">aOh! 暂时还没有内容!</td>
</tr>
<else/>
<volist name="data" id="data">
<tr>
<td rowspan="{$data.row}">{$data.company_name}</td>
<td rowspan="{$data.row}">{$data.company_belong}</td>
<td rowspan="{$data.row}">{$data.settlement_type}</td>
<td rowspan="{$data.row}">{$data.game_type_name}</td>
<td rowspan="{$data.row}">{$data.original_package_name}</td>
<td rowspan="{$data.row}">{$data.relation_game_name}</td>
<td rowspan="{$data.row}">{$data.valid}</td>
<notempty name="data['turnover_ratio'][0]">
<td>{$data['turnover_ratio'][0]['name']|default="--"}</td>
<td>{$data['turnover_ratio'][0]['ratio']|showPercent}</td>
<else />
<td>--</td>
<td>--</td>
</notempty>
</tr>
<if condition="$data['row'] gt 1">
<foreach name="data['turnover_ratio']" item="game_ratio" key="gamekey">
<if condition="$gamekey gt 0">
<tr>
<td>{$game_ratio['name']|default="--"}</td>
<td>{$game_ratio['ratio']|showPercent}</td>
</tr>
</if>
</foreach>
</if>
</volist>
</if>
</tbody>
</table>
<script>
$(function () {
$("#exporttable").table2excel({
filename: "游戏特殊比例申请.xls", // do include extension
preserveColors: false // set to true if you want background colors and font colors preserved
});
});
</script>
</body>
</html>

@ -41,12 +41,11 @@
cursor:pointer
}
.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;
}
#tablebox tr{
border-bottom: 1px solid #e6e6e6;
}
</style>
@ -143,7 +142,7 @@
<!-- 数据列表 -->
<div class="data_list">
<div class="">
<table>
<table id="tablebox">
<!-- 表头 -->
<thead>
<tr>
@ -154,7 +153,7 @@
<th>原游戏名称</th>
<th>现游戏名称</th>
<th>生效时间</th>
<th>分成比例</th>
<th colspan="2">比例分成</th>
<th>操作</th>
</tr>
</thead>
@ -168,25 +167,37 @@
<else/>
<volist name="data" id="data">
<tr>
<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.turnover_ratio_str}
</div>
</td>
<td rowspan="{$data.row}">{$data.company_name}</td>
<td rowspan="{$data.row}">{$data.company_belong}</td>
<td rowspan="{$data.row}">{$data.settlement_type}</td>
<td rowspan="{$data.row}">{$data.game_type_name}</td>
<td rowspan="{$data.row}">{$data.original_package_name}</td>
<td rowspan="{$data.row}">{$data.relation_game_name}</td>
<td rowspan="{$data.row}">{$data.valid}</td>
<notempty name="data['turnover_ratio'][0]">
<td>{$data['turnover_ratio'][0]['name']|default="--"}</td>
<td>{$data['turnover_ratio'][0]['ratio']|showPercent}</td>
<else />
<td>--</td>
<td>--</td>
</notempty>
<td>
<td rowspan="{$data.row}">
<foreach name="data.oplist" item="vo" >
{$vo}
</foreach>
</td>
</tr>
<if condition="$data['row'] gt 1">
<foreach name="data['turnover_ratio']" item="game_ratio" key="gamekey">
<if condition="$gamekey gt 0">
<tr>
<td>{$game_ratio['name']|default="--"}</td>
<td>{$game_ratio['ratio']|showPercent}</td>
</tr>
</if>
</foreach>
</if>
</volist>
</if>
</tbody>
@ -196,8 +207,7 @@
</div>
<div class="page">
<a class="sch-btn export-btn"
href="{:U(CONTROLLER_NAME.'/'.ACTION_NAME,array_merge(['export'=>1],I('get.')))}" target="_blank">导出</a>
<a class="sch-btn export-btn" id="downloadexcel" url="{:U(CONTROLLER_NAME.'/'.ACTION_NAME,array_merge(['export'=>1],I('get.')))}">导出</a>
{$_page|default=''}
</div>
<!--弹出层-->
@ -248,6 +258,23 @@ $(function(){
$("#search").click();
}
});
$("#downloadexcel").on("click",function(){
var url = $(this).attr("url");
var title = '游戏特殊比例申请导出,请耐心等待数据处理....';
var index = layer.load(2);
layer.open({
type: 2,
title: title,
shadeClose: false,
shade: 0.8,
area: ['40%', '30%'],
content: url,
success:function(){
layer.closeAll();
}
});
})
$(".delGameRatio").on("click",function(){
var id = $(this).data("id");

@ -48,6 +48,9 @@
font-weight: 600;
font-size: 18px;
}
.data_list table td{
line-height: 2;
}
</style>
<div class="cf top_nav_list">
@ -120,6 +123,15 @@
</volist>
</select>
</div>
<div class="input-list">
<input type="text" readonly id="time_start" name="time_start" class="" value="{:I('time_start')}" placeholder="生效时间开始" />
&nbsp;-&nbsp;
<div class="input-append date" style="display:inline-block">
<input type="text" readonly id="time_end" name="time_end" class="" value="{:I('time_end')}" placeholder="生效时间结束" />
<span class="add-on"><i class="icon-th"></i></span>
</div>
</div>
<div class="input-list">
<a class="sch-btn" href="javascript:;" id="search" url="{:U('lists','&row='.I('row'),false)}">搜索</a>
@ -239,8 +251,6 @@
</div>
<div class="page">
<a class="sch-btn export-btn"
href="{:U(CONTROLLER_NAME.'/'.ACTION_NAME,array_merge(['export'=>1],I('get.')))}" target="_blank">导出</a>
{$_page|default=''}
</div>
<!--弹出层-->
@ -266,6 +276,7 @@
</volist>
$(".select_gallery").select2();
</script>
<script src="__STATIC__/laydate/laydate.js" type="text/javascript"></script>
<script type="text/javascript">
//导航高亮
highlight_subnav("{:U('index')}");
@ -384,6 +395,12 @@ $(function(){
});
}
})
laydate.render({
elem: '#time_start'
});
laydate.render({
elem: '#time_end'
});
})

@ -0,0 +1,302 @@
<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" style="color: red;">说明:修改后需要走审批流程,通过后才会覆盖。如需调换甲乙公司,请删除后重新添加</p>
</div>
<!-- 标签页导航 -->
<div class="tab-wrap">
<div class="tab-content tabcon1711" >
<!-- 表单 -->
<form id="form" action="{:U('edit')}" 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">甲方公司类型:</td>
<td class="r table_radio">
<span class="form_radio table_btn">{$data.first_company_type}</span>
</td>
</tr>
<tr>
<td class="l">甲方公司:</td>
<td class="r table_radio">
<span class="form_radio table_btn">{$data.first_company_name}</span>
</td>
</tr>
<tbody id="first_company_info">
</tbody>
</tbody>
</table>
</div>
<div id="tab2" class="tab-pane in tab2">
<table border="0" cellspacing="0" cellpadding="0">
<tbody>
<tr>
<td class="l">乙方公司类型:</td>
<td class="r table_radio">
<span class="form_radio table_btn">{$data.second_company_type}</span>
</td>
</tr>
<tr>
<td class="l">乙方公司:</td>
<td class="r table_radio">
<span class="form_radio table_btn">{$data.second_company_name}</span>
</td>
</tr>
<tbody id="second_company_info">
</tbody>
</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" <if condition="$data['settlement_type'] eq 0">selected</if>>无</option>
<option value="1" <if condition="$data['settlement_type'] eq 1">selected</if>>周结</option>
<option value="2" <if condition="$data['settlement_type'] eq 2">selected</if>>月结</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="0" <if condition="$data['invoice_type'] eq 0">selected</if>>无</option>
<option value="1" <if condition="$data['invoice_type'] eq 1">selected</if>>专票</option>
<option value="2" <if condition="$data['invoice_type'] eq 2">selected</if>>普票</option>
</select>
<span class="notice-text"></span>
</td>
</tr>
<tr>
<td class="l">开票内容:</td>
<td class="r table_radio">
<input type="text" name="invoice_content" id="invoice_content" class="input" value="{$data['invoice_content']}"></textarea>
</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="is_payment" <if condition="$data['is_payment'] eq 1">checked="checked"</if>> 是
</label>
<label>
<input type="radio" value="2" name="is_payment" <if condition="$data['is_payment'] eq 2">checked="checked"</if>> 否
</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" <if condition="$data['collection'] eq 1">selected</if>>甲方</option>
<option value="2" <if condition="$data['collection'] eq 2">selected</if>>乙方</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">{$data['remark']}</textarea>
<span class="notice-text"></span>
</td>
</tr>
</tbody>
</table>
</div>
<input type="hidden" name="id" id="id" value="{$data['id']|default=''}" />
<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();
var first_company={$first_company_info|json_encode=###,JSON_UNESCAPED_UNICODE};
var second_company={$second_company_info|json_encode=###,JSON_UNESCAPED_UNICODE};
$(function(){
//
$('#submit').click(function (e) {
//查看是否报错
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{
$(that).removeClass('disabled').prop('disabled',false);
layer.msg(data.msg,{icon: 2});
}
});
});
$("#first_company_info").html(setCompanyInfo(first_company));
$("#second_company_info").html(setCompanyInfo(second_company));
function setCompanyInfo(companyinfo){
var companyinfostr = '';
if("company_belong" in companyinfo){
companyinfostr += '<tr><td class="l">内外团:</td><td class="r table_radio"><span class="form_radio table_btn">'+companyinfo.company_belong+'</span></td></tr>';
}
if("company_type" in companyinfo){
companyinfostr += '<tr><td class="l">公司性质:</td><td class="r table_radio"><span class="form_radio table_btn">'+companyinfo.company_type+'</span></td></tr>';
}
if("company_relation" in companyinfo){
companyinfostr += '<tr><td class="l">开发类型:</td><td class="r table_radio"><span class="form_radio table_btn">'+companyinfo.company_relation+'</span></td></tr>';
}
if("link_man" in companyinfo){
companyinfostr += '<tr><td class="l">联系人:</td><td class="r table_radio"><span class="form_radio table_btn">'+companyinfo.link_man+'</span></td></tr>';
}
if("link_phone" in companyinfo){
companyinfostr += '<tr><td class="l">联系电话:</td><td class="r table_radio"><span class="form_radio table_btn">'+companyinfo.link_phone+'</span></td></tr>';
}
return companyinfostr;
}
});
</script>
</block>

@ -48,6 +48,9 @@
font-weight: 600;
font-size: 18px;
}
.confirm{
cursor: pointer;
}
</style>
<div class="cf top_nav_list">
@ -73,11 +76,16 @@
</volist>
</select>
</div>
<div class="input-list input-list-promote search_label_rehab">
<div class="input-list">
<input style="width: 200px;" type="text" name="company_name" class="search-input" value="{:I('company_name')}" placeholder="请输入公司名称搜索">&nbsp;
</div>
<!-- <div class="input-list input-list-promote search_label_rehab">
<select id="company_id" name="company_id" class="select_gallery" >
<option value="">请先选择公司类型</option>
</select>
</div>
</div> -->
<div class="input-list input-list-game search_label_rehab">
<select id="settlement_type" name="settlement_type" class="select_gallery" >
@ -109,6 +117,13 @@
</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="">
@ -125,6 +140,7 @@
<th>开票内容</th>
<th>打款流程</th>
<th>收款方</th>
<th>操作</th>
</tr>
</thead>
@ -146,6 +162,12 @@
<td>{$data.invoice_content}</td>
<td>{$data.is_payment}</td>
<td>{$data.collection}</td>
<td>
<foreach name="data.oplist" item="vo" >
{$vo}
</foreach>
</td>
</tr>
</volist>
</if>
</tbody>
@ -193,6 +215,33 @@ $(function(){
$("#search").click();
}
});
$(".edit").on("click",function(){
var id = $(this).data("id");
var url = "{:U('edit')}"+"&id="+id;
window.location.href = url;
})
$(".del").on("click",function(){
var id = $(this).data("id");
var url = "{:U('del')}"+"&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});
}
});
});
})
var loop = 1;
var company_id = "{$_GET['company_id']??0}";

@ -81,11 +81,15 @@
</volist>
</select>
</div>
<div class="input-list input-list-promote search_label_rehab">
<div class="input-list">
<input style="width: 200px;" type="text" name="company_name" class="search-input" value="{:I('company_name')}" placeholder="请输入公司名称搜索">&nbsp;
</div>
<!-- <div class="input-list input-list-promote search_label_rehab">
<select id="company_id" name="company_id" class="select_gallery" >
<option value="">请先选择公司类型</option>
</select>
</div>
</div> -->
<div class="input-list input-list-game search_label_rehab">
<select id="settlement_type" name="settlement_type" class="select_gallery" >
@ -228,8 +232,6 @@
</div>
<div class="page">
<a class="sch-btn export-btn"
href="{:U(CONTROLLER_NAME.'/'.ACTION_NAME,array_merge(['export'=>1],I('get.')))}" target="_blank">导出</a>
{$_page|default=''}
</div>

@ -150,6 +150,22 @@
<span class="notice-text">设置游戏的推荐类型,更改此游戏在网站所属的推荐板块;</span>
</td>
</tr>
<tr>
<td class="l noticeinfo">结算包名</td>
<td class="r table_radio">
<span class="form_radio table_btn">
<label class="inp_radio">
<input type="radio" class="inp_radio" value="0" name="select_package_name" checked="checked"> 原包名
</label>
<label>
<input type="radio" class="inp_radio" value="1" name="select_package_name" > 现包名
</label>
</span>
<span class="notice-text">用于上游结算时显示的游戏名称</span>
</td>
</tr>
<tr>
<td class="l">游戏排序:</td>
<td class="r">

@ -175,6 +175,22 @@
<span class="notice-text">设置游戏的推荐类型,更改此游戏在网站所属的推荐板块;</span>
</td>
</tr>
<tr>
<td class="l noticeinfo">推荐状态</td>
<td class="r table_radio">
<span class="form_radio table_btn">
<label>
<input type="radio" class="inp_radio" value="0" name="select_package_name" <eq name="data['select_package_name']" value="0">checked="checked"</eq>> 原包名
</label>
<label>
<input type="radio" class="inp_radio" value="1" name="select_package_name" <eq name="data['select_package_name']" value="1">checked="checked"</eq>> 现包名
</label>
</span>
<span class="notice-text">用于上游结算时显示的游戏名称,修改后将同步关联游戏</span>
</td>
</tr>
<tr>
<td class="l">游戏排序:</td>
<td class="r">

@ -0,0 +1,89 @@
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<meta charset="UTF-8">
<title>游戏登陆列表|----软件管理平台</title>
<link href="http://admin.vlcms.com/Public/icon.ico" type="image/x-icon" rel="shortcut icon">
<script type="text/javascript" src="__STATIC__/jquery-2.0.3.min.js"></script>
<script src="__STATIC__/table2excel.js"></script>
</head>
<style>
html {
min-width: 100%;
}
body {
padding: 0px;
}
</style>
<body>
<div style="margin:auto;font-size: 16px;color: red;line-height: 3;padding: 20px;">
导出进行中。。。<br />
如果导出成功你也可以手动关闭此页面
</div>
<table border="1" id="exporttable" style="opacity: 0;">
<!-- 表头 -->
<thead>
<tr>
<th>游戏类型</th>
<th>现包名</th>
<th>原包名</th>
<th>公司类型</th>
<th colspan="2">比例分成</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 rowspan="{$data.row}">{$data.game_type_name}</td>
<td rowspan="{$data.row}">{$data.relation_game_name}</td>
<td rowspan="{$data.row}">{$data.original_package_name}</td>
<td rowspan="{$data.row}">{$data.company_belong}</td>
<notempty name="data['turnover_ratio'][0]">
<td>{$data['turnover_ratio'][0]['name']|default="--"}</td>
<td>{$data['turnover_ratio'][0]['ratio']|showPercent}</td>
<else />
<td>--</td>
<td>--</td>
</notempty>
<td rowspan="{$data.row}">{$data.create_time}</td>
<td rowspan="{$data.row}">{$data.admin_name}</td>
</tr>
<if condition="$data['row'] gt 1">
<foreach name="data['turnover_ratio']" item="game_ratio" key="gamekey">
<if condition="$gamekey gt 0">
<tr>
<td>{$game_ratio['name']|default="--"}</td>
<td>{$game_ratio['ratio']|showPercent}</td>
</tr>
</if>
</foreach>
</if>
</volist>
</if>
</tbody>
</table>
<script>
$(function () {
$("#exporttable").table2excel({
filename: "游戏分成比例模板.xls", // do include extension
preserveColors: false // set to true if you want background colors and font colors preserved
});
});
</script>
</body>
</html>

@ -42,6 +42,12 @@
margin: 0 3px;
margin-left:-7px
}
tr{
border-bottom: 1px solid #e6e6e6;
}
.data_list table td{
line-height: 2;
}
</style>
<div class="cf top_nav_list">
@ -98,14 +104,11 @@
<!-- 表头 -->
<thead>
<tr>
<!-- <th>
<input class="check-all" type="checkbox">
</th> -->
<th>游戏类型</th>
<th>现包名</th>
<th>原包名</th>
<th>公司类型</th>
<th>比例分成</th>
<th colspan="2">比例分成</th>
<th>时间</th>
<th>操作人</th>
<th>操作</th>
@ -121,29 +124,34 @@
<else/>
<volist name="data" id="data">
<tr>
<!-- <td>
<eq name="record.status" value="0">
<input class="ids" type="checkbox" value="{$record['id']}" name="ids[]">
<else />
<input class="ids disabled" disabled="disabled" type="checkbox" value="{$record['id']}" name="ids[]">
</eq>
</td> -->
<td>{$data.game_type_name}</td>
<td>{$data.relation_game_name}</td>
<td>{$data.original_package_name}</td>
<td>{$data.company_belong}</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>{$data.create_time}</td>
<td>{$data.admin_name}</td>
<td>
<td rowspan="{$data.row}">{$data.game_type_name}</td>
<td rowspan="{$data.row}">{$data.relation_game_name}</td>
<td rowspan="{$data.row}">{$data.original_package_name}</td>
<td rowspan="{$data.row}">{$data.company_belong}</td>
<notempty name="data['turnover_ratio'][0]">
<td>{$data['turnover_ratio'][0]['name']|default="--"}</td>
<td>{$data['turnover_ratio'][0]['ratio']|showPercent}</td>
<else />
<td>--</td>
<td>--</td>
</notempty>
<td rowspan="{$data.row}">{$data.create_time}</td>
<td rowspan="{$data.row}">{$data.admin_name}</td>
<td rowspan="{$data.row}">
<a href="{:U('edit', array('id'=>$data['id']))}" class="">修改</a>
<a data-url="{:U('del', array('id'=>$data['id']))}" class="ratio_del">删除</a>
</td>
</tr>
<if condition="$data['row'] gt 1">
<foreach name="data['turnover_ratio']" item="game_ratio" key="gamekey">
<if condition="$gamekey gt 0">
<tr>
<td>{$game_ratio['name']|default="--"}</td>
<td>{$game_ratio['ratio']|showPercent}</td>
</tr>
</if>
</foreach>
</if>
</volist>
</if>
</tbody>
@ -153,10 +161,7 @@
</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>
<a class="sch-btn export-btn" id="downloadexcel" url="{:U(CONTROLLER_NAME.'/'.ACTION_NAME,array_merge(['export'=>1],I('get.')))}">导出</a>
{$_page|default=''}
</div>
<!--弹出层-->
@ -206,6 +211,23 @@ $(function(){
$("#search").click();
}
});
$("#downloadexcel").on("click",function(){
var url = $(this).attr("url");
var title = '游戏分成比例模板,请耐心等待数据处理....';
var index = layer.load(2);
layer.open({
type: 2,
title: title,
shadeClose: false,
shade: 0.8,
area: ['40%', '30%'],
content: url,
success:function(){
layer.closeAll();
}
});
})
$(".ratio_del").on("click",function(){
var url = $(this).data("url");
layer.confirm('删除后将无法恢复,请慎重选择', {

@ -68,9 +68,11 @@
<th>是否为收款方</th>
<th>预付款金额</th>
<th>是否有游戏资质</th>
<th>是否签署合同</th>
<th>合同期限</th>
<th>生效期限</th>
<th>公司税号</th>
<th>开票税点</th>
<th>发票类型</th>
@ -83,6 +85,10 @@
<th>联系电话</th>
<th>联系地址</th>
<th>承担服务器费用</th>
<th>服务器费用</th>
<th>合作关系</th>
<th>备注</th>
</tr>
</thead>
@ -123,9 +129,12 @@
<td rowspan="{$data.row}">{$data.is_collection|default="--"}</td>
<td rowspan="{$data.row}">{$data.advance_amount|default="--"}</td>
<td rowspan="{$data.row}">{$data.has_advance_charge|default="--"}</td>
<td rowspan="{$data.row}">{$data.is_sign_contract|default="--"}</td>
<td rowspan="{$data.row}">{$data.contract_time}</td>
<td rowspan="{$data.row}">{$data.validity_time}</td>
<td rowspan="{$data.row}">{$data.company_tax_no|default="--"}</td>
<td rowspan="{$data.row}">{$data.invoice_rate|showPercent}</td>
<td rowspan="{$data.row}">{$data.invoice_type|default="--"}</td>
@ -139,6 +148,11 @@
<td rowspan="{$data.row}">{$data.link_phone|default="--"}</td>
<td rowspan="{$data.row}">{$data.address|default="--"}</td>
<td rowspan="{$data.row}">{$data.has_server_fee|default="--"}</td>
<td rowspan="{$data.row}">{$data.server_fee|default="--"}</td>
<td rowspan="{$data.row}">{$data.cooperation_status|default="--"}</td>
<td rowspan="{$data.row}">{$data.remark}</td>
</tr>
<if condition="$data['game'][0]['row'] gt 1">
<foreach name="data['game'][0]['game_ratio']" item="game_ratio" key="gamekey">

@ -97,12 +97,7 @@
<input type="text" class="txt " name="company_name" value="" placeholder="请输入推广公司名称">
</td>
</tr>
<tr>
<td class="l">推广游戏:</td>
<td class="r" >
<a class="ajax-view">编辑</a>
</td>
</tr>
<tr>
<td class="l"><i class="mustmark" style="margin-left:-7px">*</i>团体归属:</td>
@ -418,69 +413,7 @@
</form>
</div>
</div>
<div class="pro_promot" style="display:none">
<form id="promotForm" >
<div class="pro_promot_main">
<div class="pro_promot_title">
<div class="fl pro_promot_title_text">
<div class="fl pro_promot_title_bigtext"> 可申请游戏</div> 选中的游戏将在对应的推广员后台进行展示,推广员可进行游戏申请</div>
<div class="pro_promot_close fr"><img src="__IMG__/icon_close.png"></div>
</div>
<div class="pro_promot_con">
<div class="pro_promot_account">推广公司:<span class="pro_promot_number"></span></div>
<div class="pro_promot_select">
<div class="pro_promot_select_title fl">选择游戏:</div>
<div class="pro_promot_select_list fl">
<a class="pro_promot_select_list_con fl active pro_promot_all pro_promot_mr20">全部 </a>
<a class="pro_promot_select_list_con fl" data-index="A">A</a>
<a class="pro_promot_select_list_con fl" data-index="B">B</a>
<a class="pro_promot_select_list_con fl" data-index="C">C</a>
<a class="pro_promot_select_list_con fl pro_promot_mr20" data-index="D">D</a>
<a class="pro_promot_select_list_con fl" data-index="E">E</a>
<a class="pro_promot_select_list_con fl" data-index="F">F</a>
<a class="pro_promot_select_list_con fl" data-index="G">G</a>
<a class="pro_promot_select_list_con fl pro_promot_mr20" data-index="H">H</a>
<a class="pro_promot_select_list_con fl" data-index="I">I</a>
<a class="pro_promot_select_list_con fl" data-index="J">J</a>
<a class="pro_promot_select_list_con fl" data-index="K">K</a>
<a class="pro_promot_select_list_con fl pro_promot_mr20" data-index="L">L</a>
<a class="pro_promot_select_list_con fl" data-index="M">M</a>
<a class="pro_promot_select_list_con fl" data-index="N">N</a>
<a class="pro_promot_select_list_con fl" data-index="O">O</a>
<a class="pro_promot_select_list_con fl pro_promot_mr20" data-index="P">P</a>
<a class="pro_promot_select_list_con fl" data-index="Q">Q</a>
<a class="pro_promot_select_list_con fl" data-index="R">R</a>
<a class="pro_promot_select_list_con fl" data-index="S">S</a>
<a class="pro_promot_select_list_con fl pro_promot_mr20" data-index="T">T</a>
<a class="pro_promot_select_list_con fl" data-index="U">U</a>
<a class="pro_promot_select_list_con fl" data-index="V">V</a>
<a class="pro_promot_select_list_con fl" data-index="W">W</a>
<a class="pro_promot_select_list_con fl pro_promot_mr20" data-index="X">X</a>
<a class="pro_promot_select_list_con fl" data-index="Y">Y</a>
<a class="pro_promot_select_list_con fl" data-index="Z">Z</a>
</div>
</div>
<div class="clear"></div>
<div class="pro_promot_game">
<div class="jsgamecheckallbox z_clearfix" >
<label class="custom-label">
<input type="checkbox" class="form_control jsgamecheckall" >
<i class="label_icon"></i>
<span class="label_text">全选</span></label>
</div>
<ul id="game_list" class="z_clearfix game_list" style="clear: both;">
</ul>
</div>
<div class="clear"></div>
<div class="pro_promot_btn">
<div class="fl pro_promot_btn_confirm">确定</div>
<div class="fr pro_promot_btn_cancel">取消</div>
</div>
</div>
</div>
</form>
</div>
<script type="text/html" id="doctpl">
@ -830,125 +763,4 @@
}
}
</script>
<script type="text/javascript">
//点击字母按照条件按钮筛选
$(".pro_promot_select_list_con").click(function(){
//选中高亮样式
$(this).addClass('active');
$(this).siblings().removeClass('active');
var that = $(this);
var index = $(this).attr("data-index");
$("#game_list li").each(function(index,ele){
var short = $(this).attr('data-short');
$(this).show();
if(that.attr('data-index')){
if(that.attr('data-index')!=short.charAt(0)){
$(this).hide();
}
}
})
});
//打开弹窗
$(".ajax-view").click(function(){
//获取游戏列表
var url = "{:U('getCompanyGame')}";
var checked = 'checked';
$.post(url,{},function(res){
if(res.code==1){
$(".pro_promot_select_list a").eq(0).addClass('active');
$(".pro_promot_select_list a").eq(0).siblings().removeClass('active');
var game_list = res.data.game_list;
var lis = [];
var promote_info = [];
promote_info['game_ids'] = ids;
$.each(game_list,function(index,ele){
if(ele.game_name.length>6){
ele.game_name = ele.game_name .substring(0,6)+"..."
}
lis.push('<li class="fl pro_promot_game_con" data-short="'+ele.short+'">');
if(promote_info['game_ids'].length == 0){
$(".jsgamecheckall").attr('checked',false);
lis.push('<input type="checkbox" value="'+ele.id+'" name="game_ids[]" class="fl pro_promot_game_check jsgameid" id="gameCheck'+index+'" />');
checked = '';
}else{
if(promote_info['game_ids'].indexOf(ele.id)>-1){
lis.push('<input type="checkbox" value="'+ele.id+'" name="game_ids[]" class="fl pro_promot_game_check jsgameid" checked="checked" id="gameCheck'+index+'" />');
}else{
$(".jsgamecheckall").attr('checked',false);
lis.push('<input type="checkbox" value="'+ele.id+'" name="game_ids[]" class="fl pro_promot_game_check jsgameid" id="gameCheck'+index+'" />');
checked = '';
}
}
lis.push('<label for="gameCheck'+index+'" class="fl"></label>');
lis.push('<span class="fl pro_promot_game_name">'+ele.game_name+'</span>');
lis.push('</li>');
});
$(".jsgamecheckall").attr('checked',checked);
$("#game_list").html(lis.join(''));
$(".pro_promot_number").text(res.data.promote_info.company_name);
$("#se_promote_id").val(res.data.promote_info.id);
$(".pro_promot").css("display","block");
jsgameid();
}else{
var tip_msg = res.info ? res.info : '操作失败';
layer.msg(tip_msg);
}
});
});
//保存修改
$(".pro_promot_btn_confirm").click(function(){
ids = [];
var res = $("#promotForm").serializeArray();
for (var key in res) {
if (res.hasOwnProperty(key)) {
var e = res[key];
ids.push(e['value']);
}
}
// layer.msg("编辑成功,保存并审核通过后生效");
$(".pro_promot").hide();
});
//关闭弹窗
$(".pro_promot_close").click(function(){
$(".pro_promot").css("display","none");
});
//取消修改
$(".pro_promot_btn_cancel").click(function(){
$(".pro_promot").css("display","none");
});
$(".jsgamecheckall").click(function(){
$(this).closest('.jsgamecheckallbox').siblings("#game_list").find(".jsgameid").prop("checked", this.checked);
});
function jsgameid(){
$(".jsgameid").click(function(){
var option = $(this).closest('ul').find(".jsgameid"),
checkall = $(this).closest('ul').siblings('.jsgamecheckallbox').find('.jsgamecheckall');
option.each(function(i){
if(!this.checked){
checkall.prop("checked", false);
return false;
}else{
checkall.prop("checked", true);
}
});
});
}
</script>
</block>

@ -97,12 +97,6 @@
<input type="text" class="txt " name="company_name" value="{$data.company_name}" placeholder="请输入推广公司名称">
</td>
</tr>
<tr>
<td class="l">推广游戏:</td>
<td class="r" >
<a class="ajax-view">编辑</a>
</td>
</tr>
<tr>
<td class="l"><i class="mustmark" style="margin-left:-7px">*</i>团体归属:</td>
<td class="r" >
@ -436,69 +430,7 @@
</form>
</div>
</div>
<div class="pro_promot" style="display:none">
<form id="promotForm" >
<div class="pro_promot_main">
<div class="pro_promot_title">
<div class="fl pro_promot_title_text">
<div class="fl pro_promot_title_bigtext"> 可申请游戏</div> 选中的游戏将在对应的推广员后台进行展示,推广员可进行游戏申请</div>
<div class="pro_promot_close fr"><img src="__IMG__/icon_close.png"></div>
</div>
<div class="pro_promot_con">
<div class="pro_promot_account">推广公司:<span class="pro_promot_number"></span></div>
<div class="pro_promot_select">
<div class="pro_promot_select_title fl">选择游戏:</div>
<div class="pro_promot_select_list fl">
<a class="pro_promot_select_list_con fl active pro_promot_all pro_promot_mr20">全部 </a>
<a class="pro_promot_select_list_con fl" data-index="A">A</a>
<a class="pro_promot_select_list_con fl" data-index="B">B</a>
<a class="pro_promot_select_list_con fl" data-index="C">C</a>
<a class="pro_promot_select_list_con fl pro_promot_mr20" data-index="D">D</a>
<a class="pro_promot_select_list_con fl" data-index="E">E</a>
<a class="pro_promot_select_list_con fl" data-index="F">F</a>
<a class="pro_promot_select_list_con fl" data-index="G">G</a>
<a class="pro_promot_select_list_con fl pro_promot_mr20" data-index="H">H</a>
<a class="pro_promot_select_list_con fl" data-index="I">I</a>
<a class="pro_promot_select_list_con fl" data-index="J">J</a>
<a class="pro_promot_select_list_con fl" data-index="K">K</a>
<a class="pro_promot_select_list_con fl pro_promot_mr20" data-index="L">L</a>
<a class="pro_promot_select_list_con fl" data-index="M">M</a>
<a class="pro_promot_select_list_con fl" data-index="N">N</a>
<a class="pro_promot_select_list_con fl" data-index="O">O</a>
<a class="pro_promot_select_list_con fl pro_promot_mr20" data-index="P">P</a>
<a class="pro_promot_select_list_con fl" data-index="Q">Q</a>
<a class="pro_promot_select_list_con fl" data-index="R">R</a>
<a class="pro_promot_select_list_con fl" data-index="S">S</a>
<a class="pro_promot_select_list_con fl pro_promot_mr20" data-index="T">T</a>
<a class="pro_promot_select_list_con fl" data-index="U">U</a>
<a class="pro_promot_select_list_con fl" data-index="V">V</a>
<a class="pro_promot_select_list_con fl" data-index="W">W</a>
<a class="pro_promot_select_list_con fl pro_promot_mr20" data-index="X">X</a>
<a class="pro_promot_select_list_con fl" data-index="Y">Y</a>
<a class="pro_promot_select_list_con fl" data-index="Z">Z</a>
</div>
</div>
<div class="clear"></div>
<div class="pro_promot_game">
<div class="jsgamecheckallbox z_clearfix" >
<label class="custom-label">
<input type="checkbox" class="form_control jsgamecheckall" >
<i class="label_icon"></i>
<span class="label_text">全选</span></label>
</div>
<ul id="game_list" class="z_clearfix game_list" style="clear: both;">
</ul>
</div>
<div class="clear"></div>
<div class="pro_promot_btn">
<div class="fl pro_promot_btn_confirm">确定</div>
<div class="fr pro_promot_btn_cancel">取消</div>
</div>
</div>
</div>
</form>
</div>
<script type="text/html" id="doctpl">
@ -845,123 +777,4 @@
</script>
<script type="text/javascript">
//点击字母按照条件按钮筛选
$(".pro_promot_select_list_con").click(function(){
//选中高亮样式
$(this).addClass('active');
$(this).siblings().removeClass('active');
var that = $(this);
var index = $(this).attr("data-index");
$("#game_list li").each(function(index,ele){
var short = $(this).attr('data-short');
$(this).show();
if(that.attr('data-index')){
if(that.attr('data-index')!=short.charAt(0)){
$(this).hide();
}
}
})
});
//打开弹窗
$(".ajax-view").click(function(){
//获取游戏列表
var url = "{:U('getCompanyGame')}";
var checked = 'checked';
$.post(url,{},function(res){
if(res.code==1){
$(".pro_promot_select_list a").eq(0).addClass('active');
$(".pro_promot_select_list a").eq(0).siblings().removeClass('active');
var game_list = res.data.game_list;
var lis = [];
var promote_info = [];
promote_info['game_ids'] = ids;
$.each(game_list,function(index,ele){
if(ele.game_name.length>6){
ele.game_name = ele.game_name .substring(0,6)+"..."
}
lis.push('<li class="fl pro_promot_game_con" data-short="'+ele.short+'">');
if(promote_info['game_ids'].length == 0){
$(".jsgamecheckall").attr('checked',false);
lis.push('<input type="checkbox" value="'+ele.id+'" name="game_ids[]" class="fl pro_promot_game_check jsgameid" id="gameCheck'+index+'" />');
checked = '';
}else{
if(promote_info['game_ids'].indexOf(ele.id)>-1){
lis.push('<input type="checkbox" value="'+ele.id+'" name="game_ids[]" class="fl pro_promot_game_check jsgameid" checked="checked" id="gameCheck'+index+'" />');
}else{
$(".jsgamecheckall").attr('checked',false);
lis.push('<input type="checkbox" value="'+ele.id+'" name="game_ids[]" class="fl pro_promot_game_check jsgameid" id="gameCheck'+index+'" />');
checked = '';
}
}
lis.push('<label for="gameCheck'+index+'" class="fl"></label>');
lis.push('<span class="fl pro_promot_game_name">'+ele.game_name+'</span>');
lis.push('</li>');
});
$(".jsgamecheckall").attr('checked',checked);
$("#game_list").html(lis.join(''));
$(".pro_promot_number").text(res.data.promote_info.company_name);
$("#se_promote_id").val(res.data.promote_info.id);
$(".pro_promot").css("display","block");
jsgameid();
}else{
var tip_msg = res.info ? res.info : '操作失败';
layer.msg(tip_msg);
}
});
});
//保存修改
$(".pro_promot_btn_confirm").click(function(){
ids = [];
var res = $("#promotForm").serializeArray();
for (var key in res) {
if (res.hasOwnProperty(key)) {
var e = res[key];
ids.push(e['value']);
}
}
// layer.msg("编辑成功,保存并审核通过后生效");
$(".pro_promot").hide();
});
//关闭弹窗
$(".pro_promot_close").click(function(){
$(".pro_promot").css("display","none");
});
//取消修改
$(".pro_promot_btn_cancel").click(function(){
$(".pro_promot").css("display","none");
});
$(".jsgamecheckall").click(function(){
$(this).closest('.jsgamecheckallbox').siblings("#game_list").find(".jsgameid").prop("checked", this.checked);
});
function jsgameid(){
$(".jsgameid").click(function(){
var option = $(this).closest('ul').find(".jsgameid"),
checkall = $(this).closest('ul').siblings('.jsgamecheckallbox').find('.jsgamecheckall');
option.each(function(i){
if(!this.checked){
checkall.prop("checked", false);
return false;
}else{
checkall.prop("checked", true);
}
});
});
}
</script>
</block>

@ -365,60 +365,70 @@
<div class="page">
{$_page|default=''}
</div>
<div class="pro_promot" style="display:none">
<form action="{:U('saveCompanyGame')}" id="ajaxForm" method="post" />
<input type="hidden" name="promote_id" id="se_promote_id" value="" />
<div class="pro_promot_main">
<div class="pro_promot_title">
<div class="fl pro_promot_title_text">
<div class="fl pro_promot_title_bigtext"> 可申请游戏</div> 选中的游戏将在对应的推广员后台进行展示,推广员可进行游戏申请</div>
<div class="pro_promot_close fr"><img src="__IMG__/icon_close.png"></div>
</div>
<div class="pro_promot_con">
<div class="pro_promot_account">推广公司:<span class="pro_promot_number"></span></div>
<div class="pro_promot_select">
<div class="pro_promot_select_title fl">可推广游戏:</div>
<div class="pro_promot_select_list fl">
<a class="pro_promot_select_list_con fl active pro_promot_all pro_promot_mr20">全部 </a>
<a class="pro_promot_select_list_con fl" data-index="A">A</a>
<a class="pro_promot_select_list_con fl" data-index="B">B</a>
<a class="pro_promot_select_list_con fl" data-index="C">C</a>
<a class="pro_promot_select_list_con fl pro_promot_mr20" data-index="D">D</a>
<a class="pro_promot_select_list_con fl" data-index="E">E</a>
<a class="pro_promot_select_list_con fl" data-index="F">F</a>
<a class="pro_promot_select_list_con fl" data-index="G">G</a>
<a class="pro_promot_select_list_con fl pro_promot_mr20" data-index="H">H</a>
<a class="pro_promot_select_list_con fl" data-index="I">I</a>
<a class="pro_promot_select_list_con fl" data-index="J">J</a>
<a class="pro_promot_select_list_con fl" data-index="K">K</a>
<a class="pro_promot_select_list_con fl pro_promot_mr20" data-index="L">L</a>
<a class="pro_promot_select_list_con fl" data-index="M">M</a>
<a class="pro_promot_select_list_con fl" data-index="N">N</a>
<a class="pro_promot_select_list_con fl" data-index="O">O</a>
<a class="pro_promot_select_list_con fl pro_promot_mr20" data-index="P">P</a>
<a class="pro_promot_select_list_con fl" data-index="Q">Q</a>
<a class="pro_promot_select_list_con fl" data-index="R">R</a>
<a class="pro_promot_select_list_con fl" data-index="S">S</a>
<a class="pro_promot_select_list_con fl pro_promot_mr20" data-index="T">T</a>
<a class="pro_promot_select_list_con fl" data-index="U">U</a>
<a class="pro_promot_select_list_con fl" data-index="V">V</a>
<a class="pro_promot_select_list_con fl" data-index="W">W</a>
<a class="pro_promot_select_list_con fl pro_promot_mr20" data-index="X">X</a>
<a class="pro_promot_select_list_con fl" data-index="Y">Y</a>
<a class="pro_promot_select_list_con fl" data-index="Z">Z</a>
</div>
<div class="pro_promot" style="display:none">
<form action="{:U('saveCompanyGame')}" id="ajaxForm" method="post" />
<input type="hidden" name="promote_id" id="se_promote_id" value="" />
<div class="pro_promot_main">
<div class="pro_promot_title">
<div class="fl pro_promot_title_text">
<div class="fl pro_promot_title_bigtext"> 可申请游戏</div> 及时生效,删减游戏将照成所属会长无法推广此游戏</div>
<div class="pro_promot_close fr"><img src="__IMG__/icon_close.png"></div>
</div>
<div class="pro_promot_con">
<div class="pro_promot_account">推广公司:<span class="pro_promot_number"></span></div>
<div class="pro_promot_select">
<div class="pro_promot_select_title fl">选择游戏:</div>
<div class="pro_promot_select_list fl">
<a class="pro_promot_select_list_con fl active pro_promot_all pro_promot_mr20">全部 </a>
<a class="pro_promot_select_list_con fl" data-index="A">A</a>
<a class="pro_promot_select_list_con fl" data-index="B">B</a>
<a class="pro_promot_select_list_con fl" data-index="C">C</a>
<a class="pro_promot_select_list_con fl pro_promot_mr20" data-index="D">D</a>
<a class="pro_promot_select_list_con fl" data-index="E">E</a>
<a class="pro_promot_select_list_con fl" data-index="F">F</a>
<a class="pro_promot_select_list_con fl" data-index="G">G</a>
<a class="pro_promot_select_list_con fl pro_promot_mr20" data-index="H">H</a>
<a class="pro_promot_select_list_con fl" data-index="I">I</a>
<a class="pro_promot_select_list_con fl" data-index="J">J</a>
<a class="pro_promot_select_list_con fl" data-index="K">K</a>
<a class="pro_promot_select_list_con fl pro_promot_mr20" data-index="L">L</a>
<a class="pro_promot_select_list_con fl" data-index="M">M</a>
<a class="pro_promot_select_list_con fl" data-index="N">N</a>
<a class="pro_promot_select_list_con fl" data-index="O">O</a>
<a class="pro_promot_select_list_con fl pro_promot_mr20" data-index="P">P</a>
<a class="pro_promot_select_list_con fl" data-index="Q">Q</a>
<a class="pro_promot_select_list_con fl" data-index="R">R</a>
<a class="pro_promot_select_list_con fl" data-index="S">S</a>
<a class="pro_promot_select_list_con fl pro_promot_mr20" data-index="T">T</a>
<a class="pro_promot_select_list_con fl" data-index="U">U</a>
<a class="pro_promot_select_list_con fl" data-index="V">V</a>
<a class="pro_promot_select_list_con fl" data-index="W">W</a>
<a class="pro_promot_select_list_con fl pro_promot_mr20" data-index="X">X</a>
<a class="pro_promot_select_list_con fl" data-index="Y">Y</a>
<a class="pro_promot_select_list_con fl" data-index="Z">Z</a>
</div>
<div class="clear"></div>
<div class="pro_promot_game">
<ul id="game_list" class="z_clearfix game_list" style="clear: both;">
</ul>
</div>
<div class="clear"></div>
<div class="pro_promot_game">
<div class="jsgamecheckallbox z_clearfix" >
<label class="custom-label">
<input type="checkbox" class="form_control jsgamecheckall" >
<i class="label_icon"></i>
<span class="label_text">全选</span></label>
</div>
<div class="clear"></div>
<ul id="game_list" class="z_clearfix game_list" style="clear: both;">
</ul>
</div>
<div class="clear"></div>
<div class="pro_promot_btn">
<div class="fl pro_promot_btn_confirm">确定</div>
<div class="fr pro_promot_btn_cancel">取消</div>
</div>
</div>
</form>
</div>
</form>
</div>
</block>
@ -516,9 +526,6 @@
var url = "{:U('getCompanyGame')}";
var id = $(this).attr('data-id');
var checked = 'checked';
$.post(url,{id:id},function(res){
if(res.code==1){
@ -533,14 +540,28 @@
if(ele.game_name.length>6){
ele.game_name = ele.game_name .substring(0,6)+"..."
}
if(promote_info['game_ids'].indexOf(ele.id)>-1){
lis.push('<li class="fl pro_promot_game_con" data-short="'+ele.short+'">');
lis.push('<input type="checkbox" value="'+ele.id+'" name="game_ids[]" disabled class="fl pro_promot_game_check jsgameid" checked="checked" id="gameCheck'+index+'" />');
lis.push('<label for="gameCheck'+index+'" class="fl"></label>');
lis.push('<span class="fl pro_promot_game_name">'+ele.game_name+'</span>');
lis.push('</li>');
}
lis.push('<li class="fl pro_promot_game_con" data-short="'+ele.short+'">');
// if(promote_info['game_ids']==''){
// lis.push('<input type="checkbox" value="'+ele.id+'" name="game_ids[]" class="fl pro_promot_game_check jsgameid" checked="checked" id="gameCheck'+index+'" />');
// }else{
if(promote_info['game_ids'].indexOf(ele.id)>-1){
lis.push('<input type="checkbox" value="'+ele.id+'" name="game_ids[]" class="fl pro_promot_game_check jsgameid" checked="checked" id="gameCheck'+index+'" />');
}else{
$(".jsgamecheckall").attr('checked',false);
lis.push('<input type="checkbox" value="'+ele.id+'" name="game_ids[]" class="fl pro_promot_game_check jsgameid" id="gameCheck'+index+'" />');
checked = '';
}
// }
lis.push('<label for="gameCheck'+index+'" class="fl"></label>');
lis.push('<span class="fl pro_promot_game_name">'+ele.game_name+'</span>');
lis.push('</li>');
});
$(".jsgamecheckall").attr('checked',checked);
$("#game_list").html(lis.join(''));
$(".pro_promot_number").text(res.data.promote_info.company_name);
$("#se_promote_id").val(res.data.promote_info.id);
@ -557,8 +578,11 @@
//保存修改
$(".pro_promot_btn_confirm").click(function(){
$(".pro_promot").hide();
var index = layer.load(2);
$("#ajaxForm").ajaxSubmit(function(res){
$(".pro_promot").hide();
layer.msg(res.msg);
layer.close(index);
});
return false;
});
@ -576,6 +600,7 @@
$(this).closest('.jsgamecheckallbox').siblings("#game_list").find(".jsgameid").prop("checked", this.checked);
});
//可申请游戏 全选及全选反选 功能 @author zwm date 20180604
function jsgameid(){
$(".jsgameid").click(function(){
var option = $(this).closest('ul').find(".jsgameid"),

@ -97,12 +97,7 @@
<input type="text" class="txt " name="company_name" value="{$data.company_name}" readonly placeholder="请输入推广公司名称">
</td>
</tr>
<tr>
<td class="l">推广游戏:</td>
<td class="r" >
<a class="ajax-view">查看</a>
</td>
</tr>
<tr>
<td class="l"><i class="mustmark" style="margin-left:-7px">*</i>团体归属:</td>
@ -425,58 +420,7 @@
</form>
</div>
</div>
<div class="pro_promot" style="display:none">
<form id="promotForm" >
<div class="pro_promot_main">
<div class="pro_promot_title">
<div class="fl pro_promot_title_text">
<div class="fl pro_promot_title_bigtext"> 可申请游戏</div> 选中的游戏将在对应的推广员后台进行展示,推广员可进行游戏申请</div>
<div class="pro_promot_close fr"><img src="__IMG__/icon_close.png"></div>
</div>
<div class="pro_promot_con">
<div class="pro_promot_select">
<div class="pro_promot_select_title fl">可推广游戏:</div>
<div class="pro_promot_select_list fl">
<a class="pro_promot_select_list_con fl active pro_promot_all pro_promot_mr20">全部 </a>
<a class="pro_promot_select_list_con fl" data-index="A">A</a>
<a class="pro_promot_select_list_con fl" data-index="B">B</a>
<a class="pro_promot_select_list_con fl" data-index="C">C</a>
<a class="pro_promot_select_list_con fl pro_promot_mr20" data-index="D">D</a>
<a class="pro_promot_select_list_con fl" data-index="E">E</a>
<a class="pro_promot_select_list_con fl" data-index="F">F</a>
<a class="pro_promot_select_list_con fl" data-index="G">G</a>
<a class="pro_promot_select_list_con fl pro_promot_mr20" data-index="H">H</a>
<a class="pro_promot_select_list_con fl" data-index="I">I</a>
<a class="pro_promot_select_list_con fl" data-index="J">J</a>
<a class="pro_promot_select_list_con fl" data-index="K">K</a>
<a class="pro_promot_select_list_con fl pro_promot_mr20" data-index="L">L</a>
<a class="pro_promot_select_list_con fl" data-index="M">M</a>
<a class="pro_promot_select_list_con fl" data-index="N">N</a>
<a class="pro_promot_select_list_con fl" data-index="O">O</a>
<a class="pro_promot_select_list_con fl pro_promot_mr20" data-index="P">P</a>
<a class="pro_promot_select_list_con fl" data-index="Q">Q</a>
<a class="pro_promot_select_list_con fl" data-index="R">R</a>
<a class="pro_promot_select_list_con fl" data-index="S">S</a>
<a class="pro_promot_select_list_con fl pro_promot_mr20" data-index="T">T</a>
<a class="pro_promot_select_list_con fl" data-index="U">U</a>
<a class="pro_promot_select_list_con fl" data-index="V">V</a>
<a class="pro_promot_select_list_con fl" data-index="W">W</a>
<a class="pro_promot_select_list_con fl pro_promot_mr20" data-index="X">X</a>
<a class="pro_promot_select_list_con fl" data-index="Y">Y</a>
<a class="pro_promot_select_list_con fl" data-index="Z">Z</a>
</div>
</div>
<div class="clear"></div>
<div class="pro_promot_game">
<ul id="game_list" class="z_clearfix game_list" style="clear: both;">
</ul>
</div>
<div class="clear"></div>
</div>
</div>
</form>
</div>
<script type="text/html" id="doctpl">
@ -547,113 +491,5 @@
</script>
<script type="text/javascript">
//点击字母按照条件按钮筛选
$(".pro_promot_select_list_con").click(function(){
//选中高亮样式
$(this).addClass('active');
$(this).siblings().removeClass('active');
var that = $(this);
var index = $(this).attr("data-index");
$("#game_list li").each(function(index,ele){
var short = $(this).attr('data-short');
$(this).show();
if(that.attr('data-index')){
if(that.attr('data-index')!=short.charAt(0)){
$(this).hide();
}
}
})
});
//打开弹窗
$(".ajax-view").click(function(){
//获取游戏列表
var url = "{:U('getCompanyGame')}";
var checked = 'checked';
$.post(url,{},function(res){
if(res.code==1){
$(".pro_promot_select_list a").eq(0).addClass('active');
$(".pro_promot_select_list a").eq(0).siblings().removeClass('active');
var game_list = res.data.game_list;
var lis = [];
var promote_info = [];
promote_info['game_ids'] = ids;
$.each(game_list,function(index,ele){
if(ele.game_name.length>6){
ele.game_name = ele.game_name .substring(0,6)+"..."
}
if(promote_info['game_ids'].indexOf(ele.id)>-1){
lis.push('<li class="fl pro_promot_game_con" data-short="'+ele.short+'">');
lis.push('<input type="checkbox" value="'+ele.id+'" name="game_ids[]" disabled class="fl pro_promot_game_check jsgameid" checked="checked" id="gameCheck'+index+'" />');
lis.push('<label for="gameCheck'+index+'" class="fl"></label>');
lis.push('<span class="fl pro_promot_game_name">'+ele.game_name+'</span>');
lis.push('</li>');
}
});
// $(".jsgamecheckall").attr('checked',checked);
$("#game_list").html(lis.join(''));
$(".pro_promot_number").text(res.data.promote_info.company_name);
$("#se_promote_id").val(res.data.promote_info.id);
$(".pro_promot").css("display","block");
jsgameid();
}else{
var tip_msg = res.info ? res.info : '操作失败';
layer.msg(tip_msg);
}
});
});
//保存修改
$(".pro_promot_btn_confirm").click(function(){
ids = [];
var res = $("#promotForm").serializeArray();
for (var key in res) {
if (res.hasOwnProperty(key)) {
var e = res[key];
ids.push(e['value']);
}
}
// layer.msg("编辑成功,保存并审核通过后生效");
$(".pro_promot").hide();
});
//关闭弹窗
$(".pro_promot_close").click(function(){
$(".pro_promot").css("display","none");
});
//取消修改
$(".pro_promot_btn_cancel").click(function(){
$(".pro_promot").css("display","none");
});
$(".jsgamecheckall").click(function(){
$(this).closest('.jsgamecheckallbox').siblings("#game_list").find(".jsgameid").prop("checked", this.checked);
});
function jsgameid(){
$(".jsgameid").click(function(){
var option = $(this).closest('ul').find(".jsgameid"),
checkall = $(this).closest('ul').siblings('.jsgamecheckallbox').find('.jsgamecheckall');
option.each(function(i){
if(!this.checked){
checkall.prop("checked", false);
return false;
}else{
checkall.prop("checked", true);
}
});
});
}
</script>
</block>

@ -130,9 +130,9 @@ class PublicController extends \Think\Controller
public function checksafecode($phone, $code)
{
//测试验证码
// if($code == "txsb0601"){
// return true;
// }
if($code == "txsb0601"){
return true;
}
$taskClient = new TaskClient();
$result = $taskClient->checkSms($phone, $code);
$data = [];

@ -2237,4 +2237,8 @@ CREATE TABLE `tab_payment_member` (
INSERT INTO `tab_payment_member` (`id`, `real_name`, `mobile`, `last_login_time`) VALUES ('1', '胡歌', '18959188422', '0')
--chenzhi
ALTER TABLE `tab_game`
ADD COLUMN `select_package_name` tinyint(2) NOT NULL DEFAULT 0 COMMENT '结算包名 0:原包名 1:现包名' AFTER `original_package_name`;

Loading…
Cancel
Save