汇总单新增周月结审核

master
chenzhi 4 years ago
parent 3ef8061e3e
commit a69b21dd14

@ -498,7 +498,12 @@ class CompanyStatementController extends ThinkController
$v['verify_status'] = 5; $v['verify_status'] = 5;
$v['verify_log'] = json_encode(["create_user"=>$this->admininfo["username"],"create_time"=>date("Y-m-d H:i:s"),"verify_user"=>"system","verify_time"=>date("Y-m-d H:i:s"),"payment_user"=>"system","payment_time"=>date("Y-m-d H:i:s")]); $v['verify_log'] = json_encode(["create_user"=>$this->admininfo["username"],"create_time"=>date("Y-m-d H:i:s"),"verify_user"=>"system","verify_time"=>date("Y-m-d H:i:s"),"payment_user"=>"system","payment_time"=>date("Y-m-d H:i:s")]);
} }
//判断周月结
if(($v["statement_end_time"]-$v['statement_begin_time']) > 7*24*3600){
$v["withdraw_type"] = 1;
}else{
$v["withdraw_type"] = 0;
}
$pool_id = $Pool->add($v); $pool_id = $Pool->add($v);
if($pool_id == false){ if($pool_id == false){
$this->ajaxReturn(array('status' => 0,"info"=>"汇总失败")); $this->ajaxReturn(array('status' => 0,"info"=>"汇总失败"));

@ -16,7 +16,11 @@ class CompanyStatementPoolController extends ThinkController
"1"=>"是", "1"=>"是",
"2"=>"否" "2"=>"否"
]; ];
public $WithdrawType = [
"0"=>"周结",
"1"=>"月结",
"2"=>"下游个人补点"
];
public $VerifyStatus=[ public $VerifyStatus=[
"-2"=>"拒绝打款", "-2"=>"拒绝打款",
"-1"=>"审批拒绝", "-1"=>"审批拒绝",
@ -94,6 +98,9 @@ class CompanyStatementPoolController extends ThinkController
if(isset($_REQUEST['is_payment'])){ if(isset($_REQUEST['is_payment'])){
$map['is_payment'] = $_REQUEST['is_payment']; $map['is_payment'] = $_REQUEST['is_payment'];
} }
if(isset($_REQUEST['withdraw_type'])){
$map['withdraw_type'] = $_REQUEST['withdraw_type'];
}
// $this->checkListOrCountAuthRestMap($map);//导出权限 // $this->checkListOrCountAuthRestMap($map);//导出权限
@ -116,6 +123,7 @@ class CompanyStatementPoolController extends ThinkController
$v["valid"] = "{$v['statement_begin_time']} ~ {$v['statement_end_time']}"; $v["valid"] = "{$v['statement_begin_time']} ~ {$v['statement_end_time']}";
$v['ext_file_type'] = empty($v['ext_file']) ? "无" : "有"; $v['ext_file_type'] = empty($v['ext_file']) ? "无" : "有";
$v['withdraw_type'] = $this->WithdrawType[$v['withdraw_type']];;
$v['verify_log'] = json_decode($v['verify_log'], true); $v['verify_log'] = json_decode($v['verify_log'], true);
if (isset($params['export'])) { if (isset($params['export'])) {
@ -177,6 +185,7 @@ class CompanyStatementPoolController extends ThinkController
$this->assign('CompanyType',$this->CompanyType); $this->assign('CompanyType',$this->CompanyType);
$this->assign('IsPayment',$this->IsPayment); $this->assign('IsPayment',$this->IsPayment);
$this->assign('VerifyStatus',$this->VerifyStatus); $this->assign('VerifyStatus',$this->VerifyStatus);
$this->assign('WithdrawType',$this->WithdrawType);
$this->display(); $this->display();
} }
@ -232,7 +241,11 @@ class CompanyStatementPoolController extends ThinkController
if($is_export){ if($is_export){
//J3*(K3+L3)+M3-N3 //J3*(K3+L3)+M3-N3
$va['sum_money'] = "=J{$line}*(K{$line}+L{$line})+M{$line}-N{$line}"; if($va['statement_type'] > 0){ //罚款服务器费用
$va['sum_money'] = "=J{$line}";
}else{
$va['sum_money'] = "=J{$line}*(K{$line}+L{$line})+M{$line}-N{$line}";
}
$count['sum_money_exp'] .= "O{$line}+"; $count['sum_money_exp'] .= "O{$line}+";
$count['platform_amount_exp'] .= "J{$line}+"; $count['platform_amount_exp'] .= "J{$line}+";

@ -102,6 +102,15 @@
</div> </div>
</div> </div>
<div class="input-list input-list-promote search_label_rehab">
<select id="withdraw_type" name="withdraw_type" class="select_gallery" >
<option value="">结算周期</option>
<volist name="WithdrawType" id="vo">
<option value="{$key}" <if condition="isset($_GET['withdraw_type']) && $key eq I('withdraw_type')">selected</if> >{$vo}</option>
</volist>
</select>
</div>
<div class="input-list input-list-promote search_label_rehab"> <div class="input-list input-list-promote search_label_rehab">
<select id="verify_status" name="verify_status" class="select_gallery" > <select id="verify_status" name="verify_status" class="select_gallery" >
<option value="">请选择审核状态</option> <option value="">请选择审核状态</option>
@ -146,6 +155,7 @@
<th>结算汇总单订单号</th> <th>结算汇总单订单号</th>
<th>结算时间</th> <th>结算时间</th>
<th>结算类型</th> <th>结算类型</th>
<th>结算周期</th>
<th>是否打款</th> <th>是否打款</th>
<th>结算金额</th> <th>结算金额</th>
<th>结算流水</th> <th>结算流水</th>
@ -172,8 +182,8 @@
<td>{$data.statement_num}</td> <td>{$data.statement_num}</td>
<td>{$data.valid}</td> <td>{$data.valid}</td>
<td>{$data.company_type_str}</td> <td>{$data.company_type_str}</td>
<td>{$data.withdraw_type}</td>
<td>{$data.is_payment_str}</td> <td>{$data.is_payment_str}</td>
<td>{$data.statement_money}</td> <td>{$data.statement_money}</td>
<td>{$data.platform_amount}</td> <td>{$data.platform_amount}</td>
<td>{$data.lack_statement_money}</td> <td>{$data.lack_statement_money}</td>

@ -133,15 +133,20 @@
<td>{$com['statement_info'][0]['game_type_name']}</td> <td>{$com['statement_info'][0]['game_type_name']}</td>
<td>{$com['statement_info'][0]['statement_begin_time']} ~ {$com['statement_info'][0]['statement_end_time']}</td> <td>{$com['statement_info'][0]['statement_begin_time']} ~ {$com['statement_info'][0]['statement_end_time']}</td>
<td>{$com['statement_info'][0]['pay_amount']}</td> <td>{$com['statement_info'][0]['pay_amount']}</td>
<if condition="$com['statement_info'][0]['statement_type'] neq 0">
<td></td>
<td></td>
<else />
<td>{$com['statement_info'][0]['ratio']|default=0}%</td>
<td>{$com['statement_info'][0]['increment_ratio']|default=0}%</td>
</if>
<td>{$com['statement_info'][0]['ratio']|default=0}%</td>
<td>{$com['statement_info'][0]['increment_ratio']|default=0}%</td>
<td>{$com['statement_info'][0]['reward']}</td> <td>{$com['statement_info'][0]['reward']}</td>
<td>{$com['statement_info'][0]['fine']}</td> <td>{$com['statement_info'][0]['fine']}</td>
<td>{$com['statement_info'][0]['sum_money']}</td> <td>{$com['statement_info'][0]['sum_money']}</td>
<td rowspan="{$com.statement_count}">{$com.company_info.payee_name}</td> <td rowspan="{$com.statement_count}">{$com.company_info.payee_name}</td>
<td rowspan="{$com.statement_count}">{$com.company_info.bank_account}</td> <td rowspan="{$com.statement_count}">&nbsp;{$com.company_info.bank_account}</td>
<td rowspan="{$com.statement_count}">{$com.company_info.opening_bank}</td> <td rowspan="{$com.statement_count}">{$com.company_info.opening_bank}</td>
<td rowspan="{$com.statement_count}"></td> <td rowspan="{$com.statement_count}"></td>
<td rowspan="{$com.statement_count}">{$com.remark}</td> <td rowspan="{$com.statement_count}">{$com.remark}</td>
@ -155,8 +160,14 @@
<td>{$it['statement_begin_time']} ~ {$it['statement_end_time']}</td> <td>{$it['statement_begin_time']} ~ {$it['statement_end_time']}</td>
<td>{$it['pay_amount']}</td> <td>{$it['pay_amount']}</td>
<td>{$it['ratio']|default=0}%</td> <if condition="$it['statement_type'] neq 0">
<td>{$it['increment_ratio']|default=0}%</td> <td></td>
<td></td>
<else />
<td>{$it['ratio']|default=0}%</td>
<td>{$it['increment_ratio']|default=0}%</td>
</if>
<td>{$it['reward']}</td> <td>{$it['reward']}</td>
<td>{$it['fine']}</td> <td>{$it['fine']}</td>
<td>{$it['sum_money']}</td> <td>{$it['sum_money']}</td>

Loading…
Cancel
Save