Merge branch 'release' of 47.111.118.107:wmtx/platform into feature/loginInfo

master
sunke 5 years ago
commit 9ea29c2371

@ -8,10 +8,10 @@ namespace Admin\Controller;
class AggregateFinanceStatementController extends ThinkController
{
public $verify_status = [
"-1"=>"审拒绝",
"-1"=>"审拒绝",
"0"=>"未申请开票",
"1"=>"申请开票",
"2"=>"审同意",
"2"=>"审同意",
"3"=>"已开票",
"4"=>"已上传凭证",
"5"=>"已到账"
@ -110,7 +110,8 @@ class AggregateFinanceStatementController extends ThinkController
$data[$key]['oplist'] = $this->OpAuth($value);
}
$count = M("aggregate_statement","tab_")->field("count(id) count,SUM(ratio_money) ratio_money,SUM(pay_money) pay_money")->where($map)->find();
$count = M("aggregate_statement","tab_")->field("count(id) count,SUM(ratio_money) ratio_money")->where($map)->find();
$pay_money_count = M("aggregate_statement","tab_")->field("SUM(pay_money) pay_money")->where($map)->where("withdraw_type <> 2")->find()['pay_money'];
//分页
$parameter['p'] = $page;
@ -123,7 +124,7 @@ class AggregateFinanceStatementController extends ThinkController
$this->assign('menubtn',$this->menuAuth());
$this->assign('data',$data);
$this->assign('total',$count['ratio_money']);
$this->assign('pay_money',$count['pay_money']);
$this->assign('pay_money',$pay_money_count);
$this->assign('channel',$this->getAggChannel());
$this->assign('verify_status',$this->verify_status);
$this->display();

@ -587,4 +587,15 @@ class AjaxController extends ThinkController{
$result = M('promote', 'tab_')->field("id,account,nickname")->where(['parent_id'=>$pid])->select();
$this->ajaxReturn(['code'=>1, 'data'=>$result]);
}
public function getPromotersByLevelResource()
{
$level = I('level');
if (!$level) {
// return $this->ajaxReturn(['code'=>1, 'msg'=>'获取成功', 'data'=>[]]);
$level = '';
}
$this->ajaxReturn(['code'=>1, 'msg'=>'获取成功', 'data'=>(new PromoteModel)->getPromotersByLevelResource($level)]);
}
}

@ -78,8 +78,23 @@ class TestResourceController extends ThinkController
if(!empty(I('user_account'))){
$map['tab_test_resource.user_account']=['like','%'.I('user_account').'%'];
}
if(!empty(I('promote_name'))){
$map['tab_test_resource.promote_account']=['like','%'.I('promote_name').'%'];
if(!empty(I('promote_id')) || I('promote_id')=="0"){
$promote_id = I('promote_id');
$promnote_arr = M("promote","tab_")->field("id")->where("chain like '%/{$promote_id}/%'")->select();
$promnote_arr = array_column($promnote_arr,"id");
array_push($promnote_arr,$promote_id);
$promnote_arr = implode(",",$promnote_arr);
$map['tab_test_resource.promote_id']=['in',$promnote_arr];
if (!I("promote_level")) {
$map['tab_test_resource.promote_id']=I('promote_id');
}
}
//为数据权限添加
setPowerPromoteIds($map, 'tab_test_resource.promote_id');
@ -91,6 +106,8 @@ class TestResourceController extends ThinkController
->order('tab_test_resource.create_time DESC')
->select();
// var_dump($data);die();
foreach ($data as $key => $value) {
$data[$key]['create_time'] = date('Y-m-d H:i:s',$value['create_time']);
}

@ -450,5 +450,30 @@ class PromoteModel extends Model{
}
public function getPromotersByLevelResource($level)
{
if ($level) {
$where['level'] = $level;
}
$userAuth = session('user_auth');
setPowerPromoteIds($where,'id');
$offcialData = [0=>['id'=>0,'nickname'=>'官方渠道']];
$result = $this->field("*")->where($where)->select();
foreach ($result as &$item) {
$item['nickname'] = $item['account'] . ($item['nickname'] ? "({$item['nickname']})" : "");
}
if ((in_array('0',explode(',',$where['id'][1]))||$userAuth['data_empower_type']==1)) {
$result = array_merge($offcialData,$result);
// dump($result);die();
}
return $result;
}
}

@ -224,10 +224,10 @@
<tr>
<th style="border-right: solid 1px #b6cad2;">结算时间</th>
<th style="border-right: solid 1px #b6cad2;">产品</th>
<th style="border-right: solid 1px #b6cad2;">平台总额</th>
<th style="border-right: solid 1px #b6cad2;">平台总额(元)</th>
<th style="border-right: solid 1px #b6cad2;">分成比例</th>
<th style="border-right: solid 1px #b6cad2;">税费费率</th>
<th >结算金额</th>
<th >结算金额(元)</th>
</tr>
</thead>
@ -408,20 +408,20 @@
<tr>
<td>${it.begintime}~${it.endtime}</td>
<td>${it.game_name}</td>
<td>${it.money}</td>
<td>${it.money}</td>
<td><input type="text" class="txt statementchange" name="ratio" data-index ="${index}" data-change="statement_info[${index}]['ratio']" value="${it.ratio}" style="width: 40px;">%</td>
<td><input type="text" class="txt statementchange" name="fax_ratio" data-index ="${index}" data-change="statement_info[${index}]['fax_ratio']" value="${it.fax_ratio}" style="width: 40px;">%</td>
<td>${it.ratio_money}</td>
<td>${it.ratio_money}</td>
</tr>
{@/each}
<tr>
<td>合计</td>
<td></td>
<td>${count.pay_money}</td>
<td>${count.pay_money}</td>
<td></td>
<td></td>
<td>${count.ratio_money}</td>
<td>${count.ratio_money}</td>
</tr>
<tr>
<td colspan=5>本月分成总金额(人民币大写):</td>

@ -210,10 +210,10 @@
<tr>
<th style="border-right: solid 1px #b6cad2;">结算时间</th>
<th style="border-right: solid 1px #b6cad2;">产品</th>
<th style="border-right: solid 1px #b6cad2;">平台总额</th>
<th style="border-right: solid 1px #b6cad2;">平台总额(元)</th>
<th style="border-right: solid 1px #b6cad2;">分成比例</th>
<th style="border-right: solid 1px #b6cad2;">税费费率</th>
<th >结算金额</th>
<th >结算金额(元)</th>
</tr>
</thead>
@ -394,20 +394,20 @@
<tr>
<td>${it.begintime}~${it.endtime}</td>
<td>${it.game_name}</td>
<td>${it.money}</td>
<td>${it.money}</td>
<td><input type="text" class="txt statementchange" name="ratio" data-index ="${index}" data-change="statement_info[${index}]['ratio']" value="${it.ratio}" style="width: 40px;">%</td>
<td><input type="text" class="txt statementchange" name="fax_ratio" data-index ="${index}" data-change="statement_info[${index}]['fax_ratio']" value="${it.fax_ratio}" style="width: 40px;">%</td>
<td>${it.ratio_money}</td>
<td>${it.ratio_money}</td>
</tr>
{@/each}
<tr>
<td>合计</td>
<td></td>
<td>${count.pay_money}</td>
<td>${count.pay_money}</td>
<td></td>
<td></td>
<td>${count.ratio_money}</td>
<td>${count.ratio_money}</td>
</tr>
<tr>
<td colspan=5>本月分成总金额(人民币大写):</td>

@ -49,7 +49,7 @@
<div class="cf main-place top_nav_list navtab_list">
<h3 class="page_title">聚合渠道结算单管理</h3>
<p class="description_text">流程说明:结算自动生成对账单--->发起人申请开票--->财务审开票--->寄发票--->发起人上传收款凭证--->财务确认到账</p>
<p class="description_text">流程说明:结算自动生成对账单--->发起人申请开票--->财务审开票--->寄发票--->发起人上传收款凭证--->财务确认到账</p>
</div>
<div class="cf top_nav_list" style="height: 38px;">
<!-- 高级搜索 -->
@ -89,7 +89,7 @@
<div class="input-list input-list-promote search_label_rehab">
<select id="verify_status" name="verify_status" class="select_gallery" >
<option value="">请选择审状态</option>
<option value="">请选择审状态</option>
<foreach name="verify_status" item="vo" >
<option value="{$key}" <?php echo (isset($_REQUEST['verify_status']) && $key == I('verify_status')) ? 'selected':''; ?> >{$vo}</option>
</foreach>
@ -132,6 +132,7 @@
<th>结算日期</th>
<th>结算周期</th>
<th>结算类型</th>
<th>结算流水</th>
<th>结算金额</th>
<th>审批状态</th>
<th>操作人</th>
@ -156,6 +157,7 @@
<td>{$data.begintime}-{$data.endtime}</td>
<td>{$data.withdraw_type_1}</td>
<td>{$data.withdraw_type_2}</td>
<td>{$data.pay_money}</td>
<td>{$data.ratio_money}</td>
<td>{$data.verify_status_str}</td>
<td>{$data.admin_name}</td>
@ -168,7 +170,7 @@
</tr>
</volist>
<tr><td>合计</td><td colspan="10">结算总流水:{$pay_money}元&#12288;&#12288;&#12288;&#12288;结算金额:{$total}元 </td></tr>
<tr><td>合计</td><td colspan="10">结算总流水:{$pay_money}元(补点单据不重复计算在内)&#12288;&#12288;&#12288;&#12288;结算金额:{$total}元 </td></tr>
</notemtpy>
</tbody>
</table>
@ -239,7 +241,7 @@
}
}).get().join(",");
if(text == ''){
layer.msg("<font style='color:white'>" + '无需要审核通过的结算单,仅[已申请发票]状态可以进行审核通过' + "</font>");
layer.msg("<font style='color:white'>" + '无需要审批通过的结算单,仅[已申请发票]状态可以进行审批通过' + "</font>");
return;
}
if(flag){
@ -280,7 +282,7 @@
}
}).get().join(",");
if(text == ''){
layer.msg("<font style='color:white'>" + '无需要审核拒绝的结算单,仅[已申请发票]状态可以进行审核拒绝' + "</font>");
layer.msg("<font style='color:white'>" + '无需要批拒绝的结算单,仅[已申请发票]状态可以进行审批拒绝' + "</font>");
return;
}
if(flag){
@ -321,11 +323,11 @@
}
}).get().join(",");
if(text == ''){
layer.msg("<font style='color:white'>" + '无需要进行已开票的结算单,仅[审同意]状态可以进行已开票' + "</font>");
layer.msg("<font style='color:white'>" + '无需要进行已开票的结算单,仅[审同意]状态可以进行已开票' + "</font>");
return;
}
if(flag){
layer.confirm("已开票仅会对 [审同意] 结算单处理,选择中包含其他的状态的结算单将被忽略,点击取消停止操作",{title:false}, function(index){
layer.confirm("已开票仅会对 [审同意] 结算单处理,选择中包含其他的状态的结算单将被忽略,点击取消停止操作",{title:false}, function(index){
_doInvoiced();
layer.close(index);
});
@ -403,7 +405,7 @@
// return $(elem).val();
}).get().join(",");
if(text == ''){
layer.msg("<font style='color:white'>" + '无需要进行重新结算的结算单,仅[未申请发票][申请开票][审拒绝]状态可以进行重新结算' + "</font>");
layer.msg("<font style='color:white'>" + '无需要进行重新结算的结算单,仅[未申请发票][申请开票][审拒绝]状态可以进行重新结算' + "</font>");
return;
}
layer.confirm("重算结算金额会对结算单回退到未申请发票状态,请慎重处理,点击取消停止操作",{title:false}, function(index){
@ -575,10 +577,10 @@
content:"<div style='width: 300;height:auto;margin: auto;padding:20px;'>"+remark+"</div>"
});
});
//撤销审
//撤销审
$(".cancelVerify").click(function(){
var id = $(this).data("id");
layer.confirm("撤销审将回退到[已申请开票]状态,点击取消停止操作",{title:false}, function(index){
layer.confirm("撤销审将回退到[已申请开票]状态,点击取消停止操作",{title:false}, function(index){
$.ajax({
type: "POST",
url: "{:U('cancelVerify')}",

@ -192,10 +192,10 @@
<tr>
<th style="border-right: solid 1px #b6cad2;">结算时间</th>
<th style="border-right: solid 1px #b6cad2;">产品</th>
<th style="border-right: solid 1px #b6cad2;">平台总额</th>
<th style="border-right: solid 1px #b6cad2;">平台总额(元)</th>
<th style="border-right: solid 1px #b6cad2;">分成比例</th>
<th style="border-right: solid 1px #b6cad2;">税费费率</th>
<th >结算金额</th>
<th >结算金额(元)</th>
</tr>
</thead>
<tbody id="statementShow">
@ -203,10 +203,10 @@
<tr>
<td>{$it.begintime}~{$it.endtime}</td>
<td>{$it.game_name}</td>
<td>{$it.money}</td>
<td>{$it.money}</td>
<td><input type="text" class="txt statementchange" name="ratio" disabled="disabled" value="{$it.ratio}" style="width: 40px;">%</td>
<td><input type="text" class="txt statementchange" name="fax_ratio" disabled="disabled" value="{$it.fax_ratio}" style="width: 40px;">%</td>
<td>{$it.ratio_money}</td>
<td>{$it.ratio_money}</td>
</tr>
<!-- {$key}|{$vo} -->
</foreach>
@ -214,10 +214,10 @@
<tr>
<td>合计</td>
<td></td>
<td>{$data.statement_count.pay_money}</td>
<td>{$data.statement_count.pay_money}</td>
<td></td>
<td></td>
<td>{$data.statement_count.ratio_money}</td>
<td>{$data.statement_count.ratio_money}</td>
</tr>
<tr>
<td colspan=5>本月分成总金额(人民币大写):</td>

@ -74,10 +74,27 @@
<input type="text" name="user_account" placeholder="测试账号" class="" value="{:I('user_account')}"/>&nbsp;
</div>
<div class="input-list">
<input type="text" name="promote_name" placeholder="所属推广员" class="" value="{:I('promote_name')}"/>&nbsp;
<!-- <div class="input-list">-->
<!-- <input type="text" name="promote_name" placeholder="所属推广员" class="" value="{:I('promote_name')}"/>&nbsp;-->
<!-- </div>-->
<div class="input-list search_item input-list-gamenoticestatus">
<select name="promote_level" style="color:#444" class="select_gallery" id="promote_level">
<option value="">请选择推广员等级</option>
<option value="1" <?php if ($_POST['promote_level'] == 1):?>selected<?php endif;?>>会长</option>
<option value="2" <?php if ($_POST['promote_level'] == 2):?>selected<?php endif;?>>部门长</option>
<option value="3" <?php if ($_POST['promote_level'] == 3):?>selected<?php endif;?>>组长</option>
<option value="4" <?php if ($_POST['promote_level'] == 4):?>selected<?php endif;?>>组员</option>
</select>
-
</div>
<div class="input-list search_item input-list-gamenoticestatus">
<select name="promote_id" style="color:#444" class="select_gallery" id="promote_id">
<option value="">请选择推广员</option>
</select>
</div>
</empty>
<input type="hidden" name="" value="" class="sortBy">
<input type="hidden" name="type" value="{$_GET['type']}">
@ -200,6 +217,7 @@
<script type="text/javascript">
//导航高亮
highlight_subnav('{:U('testResource/supportNumberList')}');
$(".select_gallery").select2();
$(function(){
$('.froze-btn').on({
@ -221,6 +239,29 @@
}
})
var promote_id = "{:I('promote_id')}";
$("#promote_level").change(function(){
$.ajax({
url:"{:U('Ajax/getPromotersByLevelResource')}",
type:"get",
data:{level:$("#promote_level option:selected").val()},
dataType:'json',
success:function(response){
str = '<option value="">请选择推广员</option>' +
// '<option value="0"'+(promote_id && 0 == promote_id?'selected':'')+'>官方渠道</option>' +
'';
data = response.data;
for (var i in data){
str += "<option value='"+data[i].id+"' "+(promote_id && data[i].id == promote_id?'selected':'')+">"+data[i].nickname+"</option>"
}
$("#promote_id").empty();
$("#promote_id").append(str);
$("#promote_id").select2();
}
})
});
$("#promote_level").change();
$('#batch_freeze').click(function () {
var ids = $('.ids:checked');

Loading…
Cancel
Save