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

master
陈志 4 years ago committed by Gogs
commit 37d0e5d995

@ -111,9 +111,13 @@ class CompanyStatementController extends ThinkController
if(isset($_REQUEST['company_belong'])){ if(isset($_REQUEST['company_belong'])){
$map['company_belong'] = $_REQUEST['company_belong']; $map['company_belong'] = $_REQUEST['company_belong'];
} }
if(isset($_REQUEST['company_id'])){ if(isset($_REQUEST['company_id'])){
$map['company_id'] = $_REQUEST['company_id']; $map['company_id'] = $_REQUEST['company_id'];
} }
if(isset($_REQUEST['company_name'])){
$map['company_name'] =["LIKE","%{$_REQUEST['company_name']}%"];
}
if(isset($_REQUEST['verify_status'])){ if(isset($_REQUEST['verify_status'])){
$map['verify_status'] = $_REQUEST['verify_status']; $map['verify_status'] = $_REQUEST['verify_status'];
} }

@ -41,7 +41,7 @@ class CompanyStatementLackController extends ThinkController
if (isset($_REQUEST['time_start']) && isset($_REQUEST['time_end'])) { if (isset($_REQUEST['time_start']) && isset($_REQUEST['time_end'])) {
$time_start = strtotime($_REQUEST['time_start']); $time_start = strtotime($_REQUEST['time_start']);
$time_end = strtotime($_REQUEST['time_end'])+ 86399; $time_end = strtotime($_REQUEST['time_end'])+ 86399;
$map["_string"] = "(statement_begin_time BETWEEN {$time_start} AND {$time_end}) OR (statement_end_time BETWEEN {$time_start} AND {$time_end})"; $map["_string"] = "(statement_begin_time BETWEEN {$time_start} AND {$time_end}) OR (statement_end_time BETWEEN {$time_start} AND {$time_end}) OR (statement_begin_time <= {$time_end} AND statement_end_time >= {$time_end})";
} elseif (isset($_REQUEST['time_start'])) { } elseif (isset($_REQUEST['time_start'])) {
$time_start = strtotime($_REQUEST['time_start']); $time_start = strtotime($_REQUEST['time_start']);
$map["_string"] = "(statement_begin_time >= {$time_start} ) OR (statement_end_time >= {$time_start})"; $map["_string"] = "(statement_begin_time >= {$time_start} ) OR (statement_end_time >= {$time_start})";
@ -54,10 +54,12 @@ class CompanyStatementLackController extends ThinkController
if(isset($_REQUEST['company_type'])){ if(isset($_REQUEST['company_type'])){
$map['company_type'] = $_REQUEST['company_type']; $map['company_type'] = $_REQUEST['company_type'];
} }
if(isset($_REQUEST['company_id'])){ if(isset($_REQUEST['company_name'])){
$map['company_id'] = $_REQUEST['company_id']; $map['company_name'] =["LIKE","%{$_REQUEST['company_id']}%"];
}
if(isset($_REQUEST['statement_pool_num'])){
$map['statement_pool_num'] =["LIKE","%{$_REQUEST['statement_pool_num']}%"];
} }
if(isset($_REQUEST['is_payment'])){ if(isset($_REQUEST['is_payment'])){
$map['is_payment'] = $_REQUEST['is_payment']; $map['is_payment'] = $_REQUEST['is_payment'];
} }

@ -67,7 +67,7 @@ class CompanyStatementPoolController extends ThinkController
if (isset($_REQUEST['time_start']) && isset($_REQUEST['time_end'])) { if (isset($_REQUEST['time_start']) && isset($_REQUEST['time_end'])) {
$time_start = strtotime($_REQUEST['time_start']); $time_start = strtotime($_REQUEST['time_start']);
$time_end = strtotime($_REQUEST['time_end'])+ 86399; $time_end = strtotime($_REQUEST['time_end'])+ 86399;
$map["_string"] = "(statement_begin_time BETWEEN {$time_start} AND {$time_end}) OR (statement_end_time BETWEEN {$time_start} AND {$time_end})"; $map["_string"] = "(statement_begin_time BETWEEN {$time_start} AND {$time_end}) OR (statement_end_time BETWEEN {$time_start} AND {$time_end}) OR (statement_begin_time <= {$time_end} AND statement_end_time >= {$time_end})";
} elseif (isset($_REQUEST['time_start'])) { } elseif (isset($_REQUEST['time_start'])) {
$time_start = strtotime($_REQUEST['time_start']); $time_start = strtotime($_REQUEST['time_start']);
$map["_string"] = "(statement_begin_time >= {$time_start} ) OR (statement_end_time >= {$time_start})"; $map["_string"] = "(statement_begin_time >= {$time_start} ) OR (statement_end_time >= {$time_start})";
@ -206,10 +206,10 @@ class CompanyStatementPoolController extends ThinkController
//获取基本信息 //获取基本信息
$infolist = M("company_statement_info","tab_")->field("*,'1' as st")->where("pool_id = '{$id}'")->select(); $infolist = M("company_statement_info","tab_")->field("*,'1' as st")->where("pool_id = '{$id}'")->select();
//获取母单 //获取母单
$statement_num = $pool_info = M("company_statement_pool","tab_")->field('statement_num,create_lack_ids,verify_status')->where("id={$id}")->find();
$pool_info = M("company_statement_pool","tab_")->field('statement_num,create_lack_ids')->where("id={$id}")->find();
$statement_num = $pool_info['statement_num']; $statement_num = $pool_info['statement_num'];
$this->assign("title",$statement_num); $this->assign("title",$statement_num);
$this->assign("pool_status",$pool_info['verify_status']);
if($infolist[0]['company_type'] == 3){ if($infolist[0]['company_type'] == 3){
//上游 //上游
@ -274,8 +274,13 @@ class CompanyStatementPoolController extends ThinkController
} }
if($is_export){ if($is_export){
$count["platform_amount"] = "=".trim($count["platform_amount_exp"],"+"); $platform_amount_exp = trim($count["platform_amount_exp"],"+");
$count["sum_money"] = "=".trim($count["sum_money_exp"],"+"); $sum_money_exp = trim($count["sum_money_exp"],"+");
if(empty($platform_amount_exp)){ $platform_amount_exp = 0;}
if(empty($sum_money_exp)){ $sum_money_exp = 0;}
$count["platform_amount"] = "=".$platform_amount_exp;
$count["sum_money"] = "=".$sum_money_exp;
} }
$this->assign("data",$infolist); $this->assign("data",$infolist);
$this->assign("count",$count); $this->assign("count",$count);
@ -694,7 +699,8 @@ class CompanyStatementPoolController extends ThinkController
'fine'=>$pool['fine']-$v['fine'], 'fine'=>$pool['fine']-$v['fine'],
'reward'=>$pool['reward']-$v['reward'], 'reward'=>$pool['reward']-$v['reward'],
'lack_statement_money'=>$pool['lack_statement_money']+$v['statement_money'], 'lack_statement_money'=>$pool['lack_statement_money']+$v['statement_money'],
'lack_platform_amount'=>$pool['lack_platform_amount']-0+$v['platform_amount'] 'lack_platform_amount'=>$pool['lack_platform_amount']-0+$v['platform_amount'],
'verify_status'=>0
]; ];
// //
if(empty($pool_data['create_lack_ids'])){ if(empty($pool_data['create_lack_ids'])){
@ -839,10 +845,10 @@ class CompanyStatementPoolController extends ThinkController
$st_res = M("company_statement","tab_")->field("id,verify_status,verify_log")->where("id in ({$sids})")->select(); $st_res = M("company_statement","tab_")->field("id,verify_status,verify_log")->where("id in ({$sids})")->select();
foreach($st_res as $k=>&$v){ foreach($st_res as $k=>&$v){
$v['verify_log'] = json_decode($v['verify_log'],true); $v['verify_log'] = json_decode($v['verify_log'],true);
$v['verify_log'][$op_pre.'_user']=$this->admininfo["username"]; $v['verify_log']['pool_user']=$this->admininfo["username"];
$v['verify_log'][$op_pre.'_time']=date("Y-m-d H:i:s"); $v['verify_log']['pool_time']=date("Y-m-d H:i:s");
$v['verify_log'] = json_encode($v['verify_log']); $v['verify_log'] = json_encode($v['verify_log']);
$v['verify_status']=-2; $v['verify_status']=-3;
$stres = M("company_statement","tab_")->save($v); $stres = M("company_statement","tab_")->save($v);
if($stres === false){ if($stres === false){
M()->rollback(); M()->rollback();

@ -98,11 +98,14 @@
</volist> </volist>
</select> </select>
</div> </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" > <select id="company_id" name="company_id" class="select_gallery" >
<option value="">请先选择公司类型</option> <option value="">请先选择公司类型</option>
</select> </select>
</div> </div> -->
<div class="input-list input-list-promote search_label_rehab"> <div class="input-list input-list-promote search_label_rehab">
<select id="company_belong" name="company_belong" class="select_gallery" > <select id="company_belong" name="company_belong" class="select_gallery" >

@ -115,15 +115,13 @@
</select> </select>
</div> </div>
<div class="input-list input-list-promote search_label_rehab"> <div class="input-list">
<select id="company_id" name="company_id" class="select_gallery" > <input style="width: 200px;" type="text" name="company_name" class="search-input" value="{:I('company_name')}" placeholder="请输入公司名称搜索">&nbsp;
<option value="">请先选择公司类型</option>
</select>
</div> </div>
<div class="input-list">
<input style="width: 200px;" type="text" name="statement_pool_num" class="search-input" value="{:I('statement_pool_num')}" placeholder="请输入汇总单号">&nbsp;
</div>
<div class="input-list"> <div class="input-list">
<input type="text" readonly id="time_start" name="time_start" class="" value="{:I('time_start')}" placeholder="结算开始时间" /> <input type="text" readonly id="time_start" name="time_start" class="" value="{:I('time_start')}" placeholder="结算开始时间" />
@ -274,7 +272,7 @@
title: "海南万盟天下科技有限公司", title: "海南万盟天下科技有限公司",
shadeClose: true, shadeClose: true,
shade: 0.8, shade: 0.8,
area: ['70%', '80%'], area: ['100%', '100%'],
content: url content: url
}); });
}); });

@ -290,7 +290,7 @@
title: "海南万盟天下科技有限公司", title: "海南万盟天下科技有限公司",
shadeClose: true, shadeClose: true,
shade: 0.8, shade: 0.8,
area: ['70%', '80%'], area: ['100%', '100%'],
content: url content: url
}); });
}); });

@ -116,9 +116,8 @@
<th>开户支行</th> <th>开户支行</th>
<th>帐户类型</th> <th>帐户类型</th>
<th>备注</th> <th>备注</th>
<if condition="$is_export"> <th>是否结算</th>
<th>是否结算</th> <if condition="!$is_export">
<else />
<th>操作</th> <th>操作</th>
</if> </if>
@ -126,7 +125,7 @@
</thead> </thead>
<tbody id="statementShow"> <tbody id="statementShow">
<foreach name="data" item="com"> <foreach name="data" item="com">
<tr <if condition="$com['st'] eq 0">style='color:red;'</if>> <tr>
<td rowspan="{$com.statement_count}">{$key-0+1}</td> <td rowspan="{$com.statement_count}">{$key-0+1}</td>
<td rowspan="{$com.statement_count}">{$com.company_name}</td> <td rowspan="{$com.statement_count}">{$com.company_name}</td>
@ -156,11 +155,10 @@
<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>
<if condition="$is_export"> <td rowspan="{$com.statement_count}"><if condition="$com['st'] eq 0"><else /></if></td>
<td rowspan="{$com.statement_count}"><if condition="$com['st'] eq 0"><else /></if></td> <if condition="!$is_export">
<else />
<td rowspan="{$com.statement_count}"> <td rowspan="{$com.statement_count}">
<if condition="$com['st'] eq 1"> <if condition="($com['st'] eq 1 ) AND ($pool_status lt 1)">
<a data-id="{$com['id']}" class='butn no_statement' style="cursor:pointer">不结算</a> <a data-id="{$com['id']}" class='butn no_statement' style="cursor:pointer">不结算</a>
</if> </if>
</td> </td>
@ -172,7 +170,7 @@
<foreach name="com.statement_info" item="it" key="k"> <foreach name="com.statement_info" item="it" key="k">
<if condition="$k neq 0"> <if condition="$k neq 0">
<tr <if condition="$com['st'] eq 0">style='color:red;'</if>> <tr>
<td>{$it['game_name']}</td> <td>{$it['game_name']}</td>
<td>{$it['game_type_name']}</td> <td>{$it['game_type_name']}</td>
<td>{$it['statement_begin_time']} ~ {$it['statement_end_time']}</td> <td>{$it['statement_begin_time']} ~ {$it['statement_end_time']}</td>
@ -209,6 +207,9 @@
<td></td> <td></td>
<td></td> <td></td>
<td></td> <td></td>
<if condition="!$is_export">
<td></td>
</if>
</tr> </tr>
</tbody> </tbody>
</table> </table>

Loading…
Cancel
Save