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

上级改为通知成功
master
廖金灵 4 years ago committed by Gogs
commit 9e94992e24

@ -270,7 +270,7 @@ class CompanyGameRatioController extends AdminController
$v['verify_log'] = json_encode($v['verify_log']);
$v['status']=1;
$company_game_ratio_log->save($v);
addOperationLog(['op_type'=>1,'key'=>$v['id'],"op_name"=>"市场部审核",'url'=>U('index')]);
addOperationLog(['op_type'=>1,'key'=>$v['id'],"op_name"=>"市场部审核",'url'=>U('lists')]);
}
$this->ajaxReturn(array(
'status' => 1,
@ -290,7 +290,7 @@ class CompanyGameRatioController extends AdminController
$v['verify_log'] = json_encode($v['verify_log']);
$v['status']=-1;
$company_game_ratio_log->save($v);
addOperationLog(['op_type'=>1,'key'=>$v['id'],"op_name"=>"市场部审核",'url'=>U('index')]);
addOperationLog(['op_type'=>1,'key'=>$v['id'],"op_name"=>"市场部审核",'url'=>U('lists')]);
}
$this->ajaxReturn(array(
'status' => 1,
@ -310,7 +310,7 @@ class CompanyGameRatioController extends AdminController
$v['verify_log'] = json_encode($v['verify_log']);
$v['status']=-2;
$company_game_ratio_log->save($v);
addOperationLog(['op_type'=>1,'key'=>$v['id'],"op_name"=>"管理员审核",'url'=>U('index')]);
addOperationLog(['op_type'=>1,'key'=>$v['id'],"op_name"=>"管理员审核",'url'=>U('lists')]);
}
$this->ajaxReturn(array(
'status' => 1,
@ -351,7 +351,7 @@ class CompanyGameRatioController extends AdminController
$company_game_ratio->add($ratiov);
}
//
addOperationLog(['op_type'=>1,'key'=>$v['id'],"op_name"=>"管理员审核",'url'=>U('index')]);
addOperationLog(['op_type'=>1,'key'=>$v['id'],"op_name"=>"管理员审核",'url'=>U('lists')]);
}
$this->ajaxReturn(array(
'status' => 1,
@ -397,8 +397,8 @@ class CompanyGameRatioController extends AdminController
}
$id = M("company_game_ratio_log","tab_")->add($save);
addOperationLog(['op_type'=>0,'key'=>$id,'op_name'=>'新增','url'=>U('index')]);
$this->ajaxReturn(["msg"=>"添加成功","code"=>1,"url"=>U("index")]);
addOperationLog(['op_type'=>0,'key'=>$id,'op_name'=>'新增','url'=>U('lists')]);
$this->ajaxReturn(["msg"=>"添加成功","code"=>1,"url"=>U("lists")]);
} else {
$companyList = D("PromoteCompany")->getList();
@ -431,6 +431,7 @@ class CompanyGameRatioController extends AdminController
$save['id'] = $params['id'];
$save['ratio'] = $params['ratio'] ?? 0;
$save['turnover_ratio'] = $this->setTurnoverRatio($params);
$save['begin_time'] = strtotime($params['begin_time']);
$save['end_time'] = $params['end_time'] ? strtotime($params['end_time'])+86399 : 0;
$save['remark'] = $params['remark'] ?? '';
@ -439,8 +440,8 @@ class CompanyGameRatioController extends AdminController
$save['verify_log'] = json_encode(["create_user"=>$this->admininfo["username"],"create_time"=>date("Y-m-d H:i:s")]);
}
M("company_game_ratio_log","tab_")->save($save);
addOperationLog(['op_type'=>1,'key'=>$save['id'],'op_name'=>'修改','url'=>U('index')]);
$this->ajaxReturn(["msg"=>"修改成功","code"=>1,"url"=>U("index")]);
addOperationLog(['op_type'=>1,'key'=>$save['id'],'op_name'=>'修改','url'=>U('lists')]);
$this->ajaxReturn(["msg"=>"修改成功","code"=>1,"url"=>U("lists")]);
} else {
$params = I('get.');
$id = $params['id'] ?? 0;
@ -596,6 +597,9 @@ class CompanyGameRatioController extends AdminController
$save['turnover_ratio'] = json_encode($save['turnover_ratio']);
}
}
if(empty($save['turnover_ratio'])){
$save['turnover_ratio'] = '';
}
return $save['turnover_ratio'];
}

@ -57,6 +57,11 @@ class CompanyRelationController extends AdminController
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['settlement_type'])){
$where['settlement_type'] = $params['settlement_type'];
}
@ -129,7 +134,13 @@ class CompanyRelationController extends AdminController
}
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['settlement_type'])){
$where['settlement_type'] = $params['settlement_type'];
}
@ -302,18 +313,18 @@ class CompanyRelationController extends AdminController
unset($v['remark']);
unset($v['status']);
unset($v['verify_log']);
//判断公司id及类型
if($v['first_company_type'] == 0){
$t_company_id = $v['second_company_id'];
$t_company_type = $v['second_company_type'];
}else{
$t_company_id = $v['first_company_id'];
$t_company_type = $v['first_company_type'];
}
$where = "
(
(first_company_type ='{$v['first_company_type']}' and first_company_id = '{$v['first_company_id']}')
OR
(first_company_type ='{$v['second_company_type']}' and first_company_id = '{$v['second_company_id']}')
)
AND
(
(second_company_type ='{$v['first_company_type']}' and second_company_id = '{$v['first_company_id']}')
(first_company_type ='{$t_company_type}' and first_company_id = '{$t_company_id}')
OR
(second_company_type ='{$v['second_company_type']}' and second_company_id = '{$v['second_company_id']}')
)
(second_company_type ='{$t_company_type}' and second_company_id = '{$t_company_id}')
";
$hasdb = $this->DBModel->where($where)->find();
if(isset($hasdb['id'])){

@ -253,10 +253,14 @@ class CompanyStatementController extends ThinkController
$params['first_party_info'] = json_encode($params['first_party_info'],JSON_UNESCAPED_UNICODE);
$params['second_party_info'] = json_encode($params['second_party_info'],JSON_UNESCAPED_UNICODE);
$params['statement_info'] = json_encode($params['statement_info'],JSON_UNESCAPED_UNICODE);
$params['verify_status'] = 0;
$params['verify_log'] = json_encode(["create_user"=>$this->admininfo["username"],"create_time"=>date("Y-m-d H:i:s")]);
$params['op_time'] = time();
M("CompanyStatement","tab_")->save($params);
$y = M("CompanyStatement", "tab_")->where("id='{$params['id']}'")->find();
if($y['first_party_info'] != $params['first_party_info'] || $y['second_party_info'] != $params['second_party_info'] || $y['statement_info'] != $params['statement_info']){
$params['verify_status'] = 0;
$params['verify_log'] = json_encode(["create_user"=>$this->admininfo["username"],"create_time"=>date("Y-m-d H:i:s")]);
$params['op_time'] = time();
M("CompanyStatement","tab_")->save($params);
}
$this->ajaxReturn(["code"=>0,"msg"=>"ok"]);
}else{
if (!isset($_REQUEST['id'])) {

@ -365,6 +365,7 @@ class CompanyStatementSetController extends Controller {
//获取支付记录
$paywhere = [
"pay_status"=>1,
"pay_game_status"=>1,
"payed_time"=>["BETWEEN",[$begintime,$endtime]],
"game_id"=>["in",$gmstr]
];

@ -97,7 +97,7 @@
</div>
<div class="input-list">
<a class="sch-btn" href="javascript:;" id="search" url="{:U('index','&row='.I('row'),false)}">搜索</a>
<a class="sch-btn" href="javascript:;" id="search" url="{:U('lists','&row='.I('row'),false)}">搜索</a>
</div>
</div>

@ -195,48 +195,36 @@ $(function(){
$("#search").click();
}
});
var company_id = "{$_GET['company_id']??0}";
var loop = 1;
var company_id = "{$_GET['company_id']??0}";
$("#company_type").on("change",function(){
var type = $(this).find("option:selected").val();
var typename=setTypeName(type);
var url = "{:U('getCompanyList')}"+"&type="+type;
$.get(url,function(data){
var company = data.info;
var companystr = '<option value="">'+typename+'</option>';
for (var i in company) {
if(company[i].id == company_id){
companystr += "<option value='" + company[i].id + "' selected='selected'>" + company[i].company_name + "</option>"
}else{
companystr += "<option value='" + company[i].id + "'>" + company[i].company_name + "</option>"
if(type != ''){
var url = "{:U('getCompanyList')}"+"&type="+type;
$.get(url,function(data){
var company = data.info;
console.log(company)
var companystr = '<option value="">请选择合作公司</option>';
for (var i in company) {
if(company[i].id == company_id && loop==1){
companystr += "<option value='" + company[i].id + "' selected='selected'>" + company[i].company_name + "</option>"
}else{
companystr += "<option value='" + company[i].id + "'>" + company[i].company_name + "</option>"
}
}
}
$("#company_id").html(companystr);
$("#company_id").select2();
loop++;
})
}else{
var companystr = '<option value="">请先选择合作公司</option>';
$("#company_id").html(companystr);
$("#company_id").select2();
})
}
})
$("#company_type").change();
function setTypeName(type) {
var typename = '';
switch (type) {
case '':
typename ="请先选择公司类型";
break;
case '0':
typename = "请选择已方公司";
break;
case "1":
typename = "请选择上游CP公司";
break;
case "2":
typename ="请选择联运下游渠道公司";;
break;
default:
break;
}
return typename;
}
})

@ -268,29 +268,35 @@ $(function(){
$("#search").click();
}
});
var loop = 1;
var company_id = "{$_GET['company_id']??0}";
$("#company_type").on("change",function(){
var type = $(this).find("option:selected").val();
var typename=setTypeName(type);
var url = "{:U('getCompanyList')}"+"&type="+type;
$.get(url,function(data){
var company = data.info;
var companystr = '<option value="">'+typename+'</option>';
for (var i in company) {
if(company[i].id == company_id){
companystr += "<option value='" + company[i].id + "' selected='selected'>" + company[i].company_name + "</option>"
}else{
companystr += "<option value='" + company[i].id + "'>" + company[i].company_name + "</option>"
if(type != ''){
var url = "{:U('getCompanyList')}"+"&type="+type;
$.get(url,function(data){
var company = data.info;
console.log(company)
var companystr = '<option value="">请选择合作公司</option>';
for (var i in company) {
if(company[i].id == company_id && loop==1){
companystr += "<option value='" + company[i].id + "' selected='selected'>" + company[i].company_name + "</option>"
}else{
companystr += "<option value='" + company[i].id + "'>" + company[i].company_name + "</option>"
}
}
}
$("#company_id").html(companystr);
$("#company_id").select2();
loop++;
})
}else{
var companystr = '<option value="">请先选择合作公司</option>';
$("#company_id").html(companystr);
$("#company_id").select2();
})
}
})
$("#company_type").change();
$(".editRelation").on("click",function(){
var id = $(this).data("id");
var url = "{:U('editRelation')}"+"&id="+id;
@ -382,26 +388,6 @@ $(function(){
});
}
})
function setTypeName(type) {
var typename = '';
switch (type) {
case '':
typename ="请先选择公司类型";
break;
case '0':
typename = "请选择已方公司";
break;
case "1":
typename = "请选择上游CP公司";
break;
case "2":
typename ="请选择联运下游渠道公司";;
break;
default:
break;
}
return typename;
}
})

@ -205,7 +205,7 @@
</div>
<div class="page">
<if condition="$role_export_check eq true ">
<a class="sch-btn" href="{:U(CONTROLLER_NAME.'/'.ACTION_NAME,array_merge(['export'=>1],I('get.')))}" target="_blank">导出</a>
<!-- <a class="sch-btn" href="{:U(CONTROLLER_NAME.'/'.ACTION_NAME,array_merge(['export'=>1],I('get.')))}" target="_blank">导出</a> -->
</if>
{$_page|default=''}
</div>

Loading…
Cancel
Save