优化个人显示支付方式

master
chenzhi 4 years ago
parent 52345e4eb1
commit 71d0d2c9d1

@ -207,7 +207,7 @@ class CompanyStatementPoolController extends ThinkController
//获取基本信息
$infolist = M("company_statement_info","tab_")->field("*,'1' as st")->where("pool_id = '{$id}'")->select();
//获取母单
$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,verify_status,is_payment')->where("id={$id}")->find();
$statement_num = $pool_info['statement_num'];
$this->assign("title",$statement_num);
$this->assign("pool_status",$pool_info['verify_status']);
@ -226,12 +226,12 @@ class CompanyStatementPoolController extends ThinkController
$infolist =array_merge($infolist,$lack_info);
}
$this->viewPuPool($infolist,$is_export);
$this->viewPuPool($infolist,$is_export,$pool_info);
}
}
//个人汇总结算查看
public function viewPuPool(&$infolist,$is_export){
public function viewPuPool(&$infolist,$is_export,$pool_info){
// dd($infolist);
$line = 1;
$count = [];
@ -260,26 +260,19 @@ class CompanyStatementPoolController extends ThinkController
}else{
$va['sum_money'] = "=J{$line}*(K{$line}+L{$line})+M{$line}-N{$line}";
}
$count['sum_money_exp'] .= "O{$line}+";
$count['platform_amount_exp'] .= "J{$line}+";
}else{
$count['platform_amount'] += $va['pay_amount'];
$count['sum_money'] += $va['sum_money'];
}
}
$v['statement_count'] = count($v['statement_info']);
}
if($is_export){
$platform_amount_exp = trim($count["platform_amount_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;
$count["platform_amount"] = "=SUM(J2:J".$line.")";
$count["sum_money"] = "=SUM(O2:O".$line.")";
}
$this->assign("data",$infolist);
$this->assign("is_payment",$pool_info['is_payment']);
$this->assign("count",$count);
$this->assign("is_export",$is_export);
$this->display("CompanyStatementPool/viewPuPool");

@ -111,13 +111,16 @@
<th>奖励</th>
<th>罚款</th>
<th>结算金额</th>
<th>开户名</th>
<th>银行卡号</th>
<th>开户支行</th>
<th>帐户类型</th>
<th>支付宝真实姓名</th>
<th>支付宝账号</th>
<if condition="$is_paymen eq 2">
<th>开户名</th>
<th>银行卡号</th>
<th>开户支行</th>
<th>帐户类型</th>
</if>
<if condition="$is_paymen eq 1">
<th>支付宝真实姓名</th>
<th>支付宝账号</th>
</if>
<th>备注</th>
<th>是否结算</th>
@ -154,13 +157,17 @@
<td>{$com['statement_info'][0]['fine']}</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}">&nbsp;{$com.company_info.bank_account}</td>
<td rowspan="{$com.statement_count}">{$com.company_info.opening_bank}</td>
<td rowspan="{$com.statement_count}"></td>
<if condition="$is_paymen eq 2">
<td rowspan="{$com.statement_count}">{$com.company_info.payee_name}</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}"></td>
</if>
<td rowspan="{$com.statement_count}">{$com.company_info.ali_user}</td>
<td rowspan="{$com.statement_count}">{$com.company_info.ali_account}</td>
<if condition="$is_paymen eq 1">
<td rowspan="{$com.statement_count}">{$com.company_info.ali_user}</td>
<td rowspan="{$com.statement_count}">{$com.company_info.ali_account}</td>
</if>
<td rowspan="{$com.statement_count}">{$com.remark}</td>
<td rowspan="{$com.statement_count}"><if condition="$com['st'] eq 0"><else /></if></td>
@ -208,11 +215,12 @@
<td></td>
<td></td>
<td>{$count.sum_money|default=0}</td>
<if condition="$is_paymen eq 2">
<td></td>
<td></td>
<td></td>
<td></td>
<td></td>
<td></td>
<td></td>

Loading…
Cancel
Save