You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
simple-yewu/frontend/views/finance/pay2-info.php

701 lines
42 KiB

5 years ago
<?php
use \common\libs\MyLib;
?>
<form id="theFrm">
<input type="hidden" name="id" value="<?=$pay_info->id?>">
<p>&nbsp;</p>
<h2 align="center"><?=date("Y年m月",strtotime($pay_date.'-01'))?>财务工资</h2>
<h3 align="center">应发工资:<span><?=number_format($pay_info->should_pay,2)?></span><span style="color:#ff0000;">实发工资:<span><?=number_format($pay_info->real_pay,2)?></span></span></h3>
<table width="98%" border="0" align="center" cellpadding="3" cellspacing="1" class="table">
<tr>
<td align="center" colspan="11" height="25" class="bg_tr">基本信息</td>
</tr>
<tr>
<td height="25" class="bg_tr">职务</td>
<td height="25" class="bg_tr">姓名</td>
<td height="25" class="bg_tr">入职时间</td>
<td height="25" class="bg_tr">工作制</td>
<td height="25" class="bg_tr">试用工资</td>
<td height="25" class="bg_tr">转正时间</td>
<td height="25" class="bg_tr">转正工资</td>
<td height="25" class="bg_tr">基本工资</td>
<td height="25" class="bg_tr">职务工资</td>
<td height="25" class="bg_tr">岗位工资</td>
<td height="25" class="bg_tr">工资调整</td>
</tr>
<tr>
<td height="25" class="td_bg"><?=$group_info?$group_info->getPath():''?></td>
<td height="25" class="td_bg"><?=$user_info->getShowName()?></td>
<td height="25" class="td_bg"><?=$user_info->enter_date?></td>
<td height="25" class="td_bg"><?=$user_info->worktype?$user_info->worktype->name:''?></td>
<td height="25" class="td_bg"><?=$user_info->try_pay?></td>
<td height="25" class="td_bg"><?=$user_info->job_date?></td>
<td height="25" class="td_bg"><?=$group_info?($group_info->base_pay + $group_info->job_pay + $group_info->station_pay + $user_info->ext_pay):$user_info->ext_pay?></td>
<td height="25" class="td_bg"><?=$group_info?$group_info->base_pay:''?></td>
<td height="25" class="td_bg"><?=$group_info?$group_info->job_pay:''?></td>
<td height="25" class="td_bg"><?=$group_info?$group_info->station_pay:''?></td>
<td height="25" class="td_bg"><?=$user_info->ext_pay?></td>
</tr>
</table>
<table width="98%" border="0" align="center" cellpadding="3" cellspacing="1" class="table">
<tr>
<td align="center" colspan="10" height="25" class="bg_tr">应发</td>
</tr>
<tr>
<td align="center" colspan="2" height="25" class="bg_tr">试用( <?php
echo $user_info->worktype?round($user_info->try_pay / $user_info->worktype->days, 2):'0';
?> 元)</td>
<td align="center" colspan="8" height="25" class="bg_tr">转正( <?php
echo $user_info->worktype?round(($group_info?($group_info->base_pay + $group_info->job_pay + $group_info->station_pay + $user_info->ext_pay):$user_info->ext_pay) / $user_info->worktype->days, 2):'0';
?> 元)</td>
</tr>
<tr>
<td height="25" class="bg_tr">出勤天数</td>
<td height="25" class="bg_tr">加班</td>
<td height="25" class="bg_tr">出勤天数</td>
<td height="25" class="bg_tr">加班</td>
<td height="25" class="bg_tr">社保</td>
<td height="25" class="bg_tr">提成</td>
<td height="25" class="bg_tr">个人提成</td>
<td height="25" class="bg_tr">个人保费</td>
<td height="25" class="bg_tr">全司保费</td>
<td height="25" class="bg_tr">部门保费</td>
</tr>
<tr>
<td height="25" class="td_bg"><?=$pay_info->try_attendance_days?></td>
<td height="25" class="td_bg"><?=$pay_info->try_extjob_pay?></td>
<td height="25" class="td_bg"><?=$pay_info->attendance_days?></td>
<td height="25" class="td_bg"><?=$pay_info->extjob_pay?></td>
<td height="25" class="td_bg"><?=$pay_info->give_social_pay?></td>
<td height="25" class="td_bg"><?=$pay_info->commission?></td>
<td height="25" class="td_bg"><?=number_format($pay_info->calGrticheng(),2)?></td>
<td height="25" class="td_bg"><?=number_format($pay_info->calGrbaofei(),2)?></td>
<td height="25" class="td_bg"><?=number_format($pay_info->calGsbaofei(),2)?></td>
<td height="25" class="td_bg"><?=number_format($pay_info->calBmbaofei(),2)?></td>
</tr>
</table>
<table width="98%" border="0" align="center" cellpadding="3" cellspacing="1" class="table">
<tr>
<td align="center" colspan="4" height="25" class="bg_tr">财务信息</td>
<td align="center" colspan="2" height="25" class="bg_tr">司机提成</td>
<td align="center" colspan="2" height="25" class="bg_tr">客服提成</td>
</tr>
<tr>
<td height="25" class="bg_tr">话费</td>
<td height="25" class="bg_tr">公交</td>
<td height="25" class="bg_tr">奖金</td>
<td height="25" class="bg_tr">营业额</td>
<td height="25" class="bg_tr">车辆台数</td>
<td height="25" class="bg_tr">每台提成</td>
<td height="25" class="bg_tr">维修工时费</td>
<td height="25" class="bg_tr">提成比例</td>
</tr>
<tr>
<td height="25" class="td_bg"><input name="calls" type="text" value="<?=$pay_info->calls?>" style="width:60px;"/></td>
<td height="25" class="td_bg"><input name="bus" type="text" value="<?=$pay_info->bus?>" style="width:60px;"/></td>
<td height="25" class="td_bg"><input name="bonus" type="text" value="<?=$pay_info->bonus?>" style="width:60px;"/></td>
<td height="25" class="td_bg"><input name="turnover" type="text" value="<?=$pay_info->turnover?>" style="width:60px;"/></td>
<td height="25" class="td_bg"><input name="driver_num" type="text" value="<?=$pay_info->driver_num?>" style="width:60px;"/></td>
<td height="25" class="td_bg"><input name="driver_price" type="text" value="<?=$pay_info->driver_price?>" style="width:60px;"/></td>
<td height="25" class="td_bg"><input name="fix_total" type="text" value="<?=$pay_info->fix_total?>" style="width:60px;"/></td>
<td height="25" class="td_bg"><input name="fix_rate" type="text" value="<?=$pay_info->fix_rate?>" style="width:60px;"/>%</td>
</tr>
</table>
<table width="98%" border="0" align="center" cellpadding="3" cellspacing="1" class="table">
<tr>
<td align="center" colspan="4" height="25" class="bg_tr">提成计算方式</td>
</tr>
<tr>
<td height="25" class="bg_tr">提成计算公式</td>
<td height="25" class="td_bg"><?=$pay_info->formulae?></td>
<td height="25" class="bg_tr">备注</td>
<td height="25" class="td_bg">个人提成:grTicheng,个人保费:grBaoFei,全司保费:gsBaoFei,部门保费:bmBaoFei,营业额:yyg。</td>
</tr>
</table>
<table width="98%" border="0" align="center" cellpadding="3" cellspacing="1" class="table">
<tr>
<td align="center" colspan="11" height="25" class="bg_tr">应扣</td>
</tr>
<tr>
<td height="25" class="bg_tr">迟到</td>
<td height="25" class="bg_tr">事假</td>
<td height="25" class="bg_tr">病假</td>
<td height="25" class="bg_tr">社保</td>
<td height="25" class="bg_tr">罚款</td>
<td height="25" class="bg_tr">电费</td>
<td height="25" class="bg_tr">离职押金</td>
<td height="25" class="bg_tr">公积金</td>
<td height="25" class="bg_tr">全勤(钱数或百分比)</td>
<td height="25" class="bg_tr">通时(钱数或百分比)</td>
<td height="25" class="bg_tr">个税</td>
</tr>
<tr>
<td height="25" class="td_bg"><?=$pay_info->late_pay?></td>
<td height="25" class="td_bg"><?=$pay_info->leave_pay?></td>
<td height="25" class="td_bg"><?=$pay_info->sick_pay?></td>
<td height="25" class="td_bg"><?=$pay_info->social_pay?></td>
<td height="25" class="td_bg"><?=$pay_info->fine_pay?></td>
<td height="25" class="td_bg"><?=$pay_info->electricity_pay?></td>
<td height="25" class="td_bg"><?=$pay_info->deposit?></td>
<td height="25" class="td_bg"><?=$pay_info->public_pay?></td>
<td height="25" class="td_bg"><?=$pay_info->full_attendance_pay?></td>
<td height="25" class="td_bg"><?=$pay_info->pass_time_pay?></td>
<td height="25" class="td_bg"><input type="text" name="tax" value="<?=$pay_info->tax?>" /></td>
</tr>
</table>
<table width="98%" border="0" align="center" cellpadding="3" cellspacing="1" class="table">
<tr>
<td align="center" colspan="9" height="25" class="bg_tr">财务统计</td>
</tr>
<tr>
<td height="25" align="center" class="bg_tr">我的新保</td>
<td height="25" align="center" class="bg_tr">我的续保</td>
<td height="25" align="center" class="bg_tr">我的提成</td>
<td height="25" align="center" class="bg_tr">送单合计</td>
<td height="25" align="center" class="bg_tr">核保合计</td>
<td height="25" align="center" class="bg_tr">正本合计</td>
<td height="25" align="center" class="bg_tr">非车险保险</td>
<td height="25" align="center" class="bg_tr">非车险核保</td>
<td height="25" align="center" class="bg_tr">本月出单</td>
</tr>
<tr>
<td height="25" align="center" class="td_bg"><?=$my_type1_query->count()?></td>
<td height="25" align="center" class="td_bg"><?=$my_type3_query->count()?></td>
<td height="25" align="center" class="td_bg"><?=$type_query->count()?></td>
<td height="25" align="center" class="td_bg"><?=$type3_query->count()?></td>
<td height="25" align="center" class="td_bg"><?=$my_type5_query->count()?></td>
<td height="25" align="center" class="td_bg"><?=$my_type6_query->count()?></td>
<td height="25" align="center" class="td_bg"><?=$my_type1_query_non->count()?></td>
<td height="25" align="center" class="td_bg"><?=$my_type1_query_hebao->count()?></td>
<td height="25" align="center" class="td_bg"><?=$pay_order_users->count()?></td>
</tr>
</table>
<?php if($my_type1_query->count() > 0) { ?>
<table width="98%" border="0" align="center" cellpadding="3" cellspacing="1" class="table">
<tr>
<td align="center" colspan="13" height="25" class="bg_tr">我的新保</td>
</tr>
<tr>
<td width="50" height="25" align="center" class="bg_tr">序号</td>
<td height="25" align="center" class="bg_tr">车牌号</td>
<td height="25" align="center" class="bg_tr">正本日期</td>
<td height="25" align="center" class="bg_tr">商业净保费</td>
<td height="25" align="center" class="bg_tr">提奖</td>
<td height="25" align="center" class="bg_tr">应提金额</td>
<td height="25" align="center" class="bg_tr">优惠金额</td>
<td height="25" align="center" class="bg_tr">免费礼券</td>
<td height="25" align="center" class="bg_tr">免费礼品</td>
<td height="25" align="center" class="bg_tr">自费礼券</td>
<td height="25" align="center" class="bg_tr">自费礼品</td>
<td height="25" align="center" class="bg_tr">实提金额</td>
<td height="25" align="center" class="bg_tr">详情</td>
</tr>
<?php
$should_pay = 0;
$real_pay = 0;
$total1_clear = 0;
$total1_dis = 0;
foreach($my_type1_query->each() as $index=>$pay_order) {
$order_info = $pay_order->order;
$caiwu_info = $order_info->caiwu;
$rate = $caiwu_info->rate1;
$money = $caiwu_info->money1;
$should_pay += $pay_order->should_pay;
$real_pay += $pay_order->real_pay;
$total1_clear += $order_info->total1_clear;
$total1_dis += $order_info->total1_dis;
?>
<tr>
<td width="50" height="25" align="center" class="td_bg">
<input type="hidden" name="tc_my_payids_1[]" value="<?=$pay_order->id?>">
<?=$index?>
</td>
<td height="25" align="center" class="td_bg"><?=$pay_order->order->car_no?></td>
<td height="25" align="center" class="td_bg"><?=$pay_order->order->print_date?></td>
<td height="25" align="center" class="td_bg"><?=$pay_order->order->total1_clear?></td>
<td height="25" align="center" class="td_bg"><input name="my_rate1[]" id="my_rate1_<?=$caiwu_info->id?>" type="text" value="<?=$rate?>" style="width:60px;" onblur="cal_pay('my_rate1_<?=$caiwu_info->id?>','<?=$pay_order->order->total1_clear?>','<?=$pay_order->order->total1_dis?>','<?=$order_info->getGiftPrice(1,1)?>','<?=$order_info->getGiftPrice(1,0)?>','<?=$order_info->getGiftPrice(0,1)?>','<?=$order_info->getGiftPrice(0,0)?>','my_should_pays1_<?=$caiwu_info->id?>','my_real_pays1_<?=$caiwu_info->id?>')"/>%</td>
<td height="25" align="center" class="td_bg"><input name="my_should_pays1[]" id="my_should_pays1_<?=$caiwu_info->id?>" type="text" value="<?=$pay_order->should_pay?>" style="width:60px;" readonly/></td>
<td height="25" align="center" class="td_bg"><?=$pay_order->order->total1_dis?></td>
<td height="25" align="center" class="td_bg"><a href="javascript:void(0);" onclick="open_gift_dlg(<?=$order_info->id?>,1,1)"><?=$order_info->getGiftPrice(1,1)?></a></td>
<td height="25" align="center" class="td_bg"><a href="javascript:void(0);" onclick="open_gift_dlg(<?=$order_info->id?>,1,0)"><?=$order_info->getGiftPrice(1,0)?></a></td>
<td height="25" align="center" class="td_bg"><a href="javascript:void(0);" onclick="open_gift_dlg(<?=$order_info->id?>,0,1)"><?=$order_info->getGiftPrice(0,1)?></a></td>
<td height="25" align="center" class="td_bg"><a href="javascript:void(0);" onclick="open_gift_dlg(<?=$order_info->id?>,0,0)"><?=$order_info->getGiftPrice(0,0)?></a></td>
<td height="25" align="center" class="td_bg"><input name="my_real_pays1[]" id="my_real_pays1_<?=$caiwu_info->id?>" type="text" value="<?=$pay_order->real_pay?>" style="width:60px;" readonly/></td>
<td height="25" align="center" class="td_bg">[<a href="/insurer/info?id=<?=$order_info->id?>" target="_blank">详情</a>]</td>
</tr>
<?php
}
?>
<tr>
<td width="50" height="25" align="center" class="bg_tr"></td>
<td height="25" align="center" class="bg_tr"></td>
<td height="25" align="center" class="bg_tr"></td>
<td height="25" align="center" class="bg_tr"><?=number_format($total1_clear,2)?></td>
<td height="25" align="center" class="bg_tr"></td>
<td height="25" align="center" class="bg_tr"><?=number_format($should_pay,2)?></td>
<td height="25" align="center" class="bg_tr"><?=number_format($total1_dis,2)?></td>
<td height="25" align="center" class="bg_tr"></td>
<td height="25" align="center" class="bg_tr"></td>
<td height="25" align="center" class="bg_tr"></td>
<td height="25" align="center" class="bg_tr"></td>
<td height="25" align="center" class="bg_tr"><?=number_format($real_pay,2)?></td>
<td height="25" align="center" class="bg_tr"></td>
</tr>
</table>
<?php } ?>
<?php if($my_type3_query->count() > 0) { ?>
<table width="98%" border="0" align="center" cellpadding="3" cellspacing="1" class="table">
<tr>
<td align="center" colspan="13" height="25" class="bg_tr">我的续保</td>
</tr>
<tr>
<td width="50" height="25" align="center" class="bg_tr">序号</td>
<td height="25" align="center" class="bg_tr">车牌号</td>
<td height="25" align="center" class="bg_tr">正本日期</td>
<td height="25" align="center" class="bg_tr">商业净保费</td>
<td height="25" align="center" class="bg_tr">提奖</td>
<td height="25" align="center" class="bg_tr">应提金额</td>
<td height="25" align="center" class="bg_tr">优惠金额</td>
<td height="25" align="center" class="bg_tr">免费礼券</td>
<td height="25" align="center" class="bg_tr">免费礼品</td>
<td height="25" align="center" class="bg_tr">自费礼券</td>
<td height="25" align="center" class="bg_tr">自费礼品</td>
<td height="25" align="center" class="bg_tr">实提金额</td>
<td height="25" align="center" class="bg_tr">详情</td>
</tr>
<?php
$should_pay = 0;
$real_pay = 0;
$total1_clear = 0;
foreach($my_type3_query->each() as $index=>$pay_order) {
$order_info = $pay_order->order;
$caiwu_info = $order_info->caiwu;
$rate = $caiwu_info->rate3;
$money = $caiwu_info->money3;
$should_pay += $pay_order->should_pay;
$real_pay += $pay_order->real_pay;
$total1_clear += $order_info->total1_clear;
?>
<tr>
<td width="50" height="25" align="center" class="td_bg">
<input type="hidden" name="tc_my_payids_2[]" value="<?=$pay_order->id?>">
<?=$index?>
</td>
<td height="25" align="center" class="td_bg"><?=$pay_order->order->car_no?></td>
<td height="25" align="center" class="td_bg"><?=$pay_order->order->print_date?></td>
<td height="25" align="center" class="td_bg"><?=$pay_order->order->total1_clear?></td>
<td height="25" align="center" class="td_bg"><input name="my_rate2[]" id="my_rate2_<?=$caiwu_info->id?>" type="text" value="<?=$rate?>" style="width:60px;" onblur="cal_pay('my_rate2_<?=$caiwu_info->id?>','<?=$pay_order->order->total1_clear?>','<?=$pay_order->order->total1_dis?>','<?=$order_info->getGiftPrice(1,1)?>','<?=$order_info->getGiftPrice(1,0)?>','<?=$order_info->getGiftPrice(0,1)?>','<?=$order_info->getGiftPrice(0,0)?>','my_should_pays2_<?=$caiwu_info->id?>','my_real_pays2_<?=$caiwu_info->id?>')"/>%</td>
<td height="25" align="center" class="td_bg"><input name="my_should_pays2[]" id="my_should_pays2_<?=$caiwu_info->id?>" type="text" value="<?=$pay_order->should_pay?>" style="width:60px;" readonly/></td>
<td height="25" align="center" class="td_bg"><?=$pay_order->order->total1_dis?></td>
<td height="25" align="center" class="td_bg"><a href="javascript:void(0);" onclick="open_gift_dlg(<?=$order_info->id?>,1,1)"><?=$order_info->getGiftPrice(1,1)?></a></td>
<td height="25" align="center" class="td_bg"><a href="javascript:void(0);" onclick="open_gift_dlg(<?=$order_info->id?>,1,0)"><?=$order_info->getGiftPrice(1,0)?></a></td>
<td height="25" align="center" class="td_bg"><a href="javascript:void(0);" onclick="open_gift_dlg(<?=$order_info->id?>,0,1)"><?=$order_info->getGiftPrice(0,1)?></a></td>
<td height="25" align="center" class="td_bg"><a href="javascript:void(0);" onclick="open_gift_dlg(<?=$order_info->id?>,0,0)"><?=$order_info->getGiftPrice(0,0)?></a></td>
<td height="25" align="center" class="td_bg"><input name="my_real_pays2[]" id="my_real_pays2_<?=$caiwu_info->id?>" type="text" value="<?=$pay_order->real_pay?>" style="width:60px;" readonly/></td>
<td height="25" align="center" class="td_bg">[<a href="/insurer/info?id=<?=$order_info->id?>" target="_blank">详情</a>]</td>
</tr>
<?php
}
?>
<tr>
<td width="50" height="25" align="center" class="bg_tr"></td>
<td height="25" align="center" class="bg_tr"></td>
<td height="25" align="center" class="bg_tr"></td>
<td height="25" align="center" class="bg_tr"><?=number_format($total1_clear,2)?></td>
<td height="25" align="center" class="bg_tr"></td>
<td height="25" align="center" class="bg_tr"><?=number_format($should_pay,2)?></td>
<td height="25" align="center" class="bg_tr"></td>
<td height="25" align="center" class="bg_tr"></td>
<td height="25" align="center" class="bg_tr"></td>
<td height="25" align="center" class="bg_tr"></td>
<td height="25" align="center" class="bg_tr"></td>
<td height="25" align="center" class="bg_tr"><?=number_format($real_pay,2)?></td>
<td height="25" align="center" class="bg_tr"></td>
</tr>
</table>
<?php } ?>
<?php if($type_query->count() > 0){ ?>
<table width="98%" border="0" align="center" cellpadding="3" cellspacing="1" class="table">
<tr>
<td align="center" colspan="12" height="25" class="bg_tr">我的提成</td>
</tr>
<tr>
<td width="50" height="25" align="center" class="bg_tr">序号</td>
<td height="25" align="center" class="bg_tr">车牌号</td>
<td height="25" align="center" class="bg_tr">商业净保费</td>
<td height="25" align="center" class="bg_tr">提奖</td>
<td height="25" align="center" class="bg_tr">应提金额</td>
<td height="25" align="center" class="bg_tr">实提金额</td>
<td height="25" align="center" class="bg_tr">详情</td>
</tr>
<?php
$should_pay = 0;
$real_pay = 0;
foreach($type_query->each() as $index=>$pay_order) {
$order_info = $pay_order->order;
$caiwu_info = $order_info->caiwu;
$rate = $caiwu_info->rate1;
$money = $caiwu_info->money1;
if($pay_order->type == 2) {
$rate = $caiwu_info->rate2;
$money = $caiwu_info->money2;
}
$should_pay += $pay_order->should_pay;
$real_pay += $pay_order->real_pay;
?>
<tr>
<td width="50" height="25" align="center" class="td_bg">
<input type="hidden" name="tc_payids_<?=$pay_order->type?>[]" value="<?=$pay_order->id?>">
<?=$index?>
</td>
<td height="25" align="center" class="td_bg"><?=$pay_order->order->car_no?></td>
<td height="25" align="center" class="td_bg"><?=$pay_order->order->total1_clear?></td>
<td height="25" align="center" class="td_bg"><input name="rate<?=$pay_order->type?>[]" id="rate<?=$pay_order->type?>_<?=$caiwu_info->id?>" type="text" value="<?=$rate?>" style="width:60px;" onblur="cal_pay('rate<?=$pay_order->type?>_<?=$caiwu_info->id?>','<?=$pay_order->order->total1_clear?>','0','0','0','0','0','should_pays<?=$pay_order->type?>_<?=$caiwu_info->id?>','real_pays<?=$pay_order->type?>_<?=$caiwu_info->id?>')"/>%</td>
<td height="25" align="center" class="td_bg"><input name="should_pays<?=$pay_order->type?>[]" id="should_pays<?=$pay_order->type?>_<?=$caiwu_info->id?>" type="text" value="<?=$pay_order->should_pay?>" style="width:60px;" readonly/></td>
<td height="25" align="center" class="td_bg"><input name="real_pays<?=$pay_order->type?>[]" id="real_pays<?=$pay_order->type?>_<?=$caiwu_info->id?>" type="text" value="<?=$pay_order->real_pay?>" style="width:60px;" readonly/></td>
<td height="25" align="center" class="td_bg">[<a href="/insurer/info?id=<?=$order_info->id?>" target="_blank">详情</a>]</td>
</tr>
<?php
}
?>
<tr>
<td width="50" height="25" align="center" class="bg_tr"></td>
<td height="25" align="center" class="bg_tr"></td>
<td height="25" align="center" class="bg_tr"></td>
<td height="25" align="center" class="bg_tr"></td>
<td height="25" align="center" class="bg_tr"><?=number_format($should_pay,2)?></td>
<td height="25" align="center" class="bg_tr"><?=number_format($real_pay,2)?></td>
<td height="25" align="center" class="bg_tr"></td>
</tr>
</table>
<?php } ?>
<?php if($type3_query->count() > 0) { ?>
<table width="98%" border="0" align="center" cellpadding="3" cellspacing="1" class="table">
<tr>
<td align="center" colspan="7" height="25" class="bg_tr">送单统计</td>
</tr>
<tr>
<td width="50" height="25" align="center" class="bg_tr">序号</td>
<td height="25" align="center" class="bg_tr">车牌号</td>
<td height="25" align="center" class="bg_tr">被保险人</td>
<td height="25" align="center" class="bg_tr">送单地址</td>
<td height="25" align="center" class="bg_tr">时间</td>
<td height="25" align="center" class="bg_tr">送单提成</td>
<td height="25" align="center" class="bg_tr">详情</td>
</tr>
<?php
$real_pay = 0;
foreach($type3_query->each() as $index=>$pay_order) {
$order_info = $pay_order->order;
$caiwu_info = $order_info->caiwu;
$send_info = $order_info->sendLog;
$real_pay += $pay_order->real_pay;
?>
<tr>
<td width="50" height="25" align="center" class="td_bg">
<input type="hidden" name="tc_send_payids[]" value="<?=$pay_order->id?>">
<?=$index?>
</td>
<td height="25" align="center" class="td_bg"><?=$order_info->car_no?></td>
<td height="25" align="center" class="td_bg"><?=MyLib::substr_cut($order_info->id_man,15)?></td>
<td height="25" align="left" class="td_bg">
<?=$order_info->direction1?$order_info->direction1->name:''?>
<?=$order_info->range1?$order_info->range1->name:''?>
<?=$order_info->city1?$order_info->city1->name:''?>
<?=$order_info->district1?$order_info->district1->name:''?>
<?=$order_info->send_address1?>
</td>
<td height="25" align="center" class="td_bg"><?=date('Y-m-d H:i:s',$send_info->send_time)?></td>
<td height="25" align="center" nowrap class="td_bg"><input name="send_moneys[]" type="text" value="<?=$caiwu_info->send_money?>" style="width:60px;"/></td>
<td height="25" align="center" class="td_bg">[<a href="/insurer/info?id=<?=$order_info->id?>" target="_blank">详情</a>]</td>
</tr>
<?php
}
?>
<tr>
<td width="50" height="25" align="center" class="bg_tr"></td>
<td height="25" align="center" class="bg_tr"></td>
<td height="25" align="center" class="bg_tr"></td>
<td height="25" align="center" class="bg_tr"></td>
<td height="25" align="center" class="bg_tr"></td>
<td height="25" align="center" class="bg_tr"><?=number_format($real_pay,2)?></td>
<td height="25" align="center" class="bg_tr"></td>
</tr>
</table>
<?php } ?>
<!-- 内勤核保-->
<?php if($my_type5_query->count() > 0) { ?>
<table width="98%" border="0" align="center" cellpadding="3" cellspacing="1" class="table">
<tr>
<td align="center" colspan="7" height="25" class="bg_tr">核保统计</td>
</tr>
<tr>
<td width="50" height="25" align="center" class="bg_tr">序号</td>
<td height="25" align="center" class="bg_tr">车牌号</td>
<td height="25" align="center" class="bg_tr">被保险人</td>
<td height="25" align="center" class="bg_tr">核保比例</td>
<td height="25" align="center" class="bg_tr">正本日期</td>
<td height="25" align="center" class="bg_tr">核保提成</td>
<td height="25" align="center" class="bg_tr">详情</td>
</tr>
<?php
$real_pay = 0;
foreach($my_type5_query->each() as $index=>$pay_order) {
$order_info = $pay_order->order;
$caiwu_info = $order_info->caiwu;
$rate = $caiwu_info->rate4;
// $money = $caiwu_info->money4;
$send_info = $order_info->sendLog;
$real_pay += $pay_order->real_pay;
?>
<tr>
<td width="50" height="25" align="center" class="td_bg">
<input type="hidden" name="neqi_payids[]" value="<?=$pay_order->id?>">
<?=$index?>
</td>
<td height="25" align="center" class="td_bg"><?=$order_info->car_no?></td>
<td height="25" align="center" class="td_bg"><?=MyLib::substr_cut($order_info->id_man,15)?></td>
<td height="25" align="center" class="td_bg"><input name="rate<?=$pay_order->type?>[]" id="rate<?=$pay_order->type?><?=$caiwu_info->id?>" type="text" value="<?=$rate?>" style="width:60px;" />%</td>
<td height="25" align="center" class="td_bg"><?=date('Y-m-d H:i:s',$send_info->send_time)?></td>
<td height="25" align="center" class="td_bg"><input name="should_pays<?=$pay_order->type?>[]" id="should_pays<?=$pay_order->type?>_<?=$caiwu_info->id?>" type="text" value="<?=$pay_order->should_pay?>" onblur="cal_rate('should_pays<?=$pay_order->type?>_<?=$caiwu_info->id?>','<?=$order_info->total1_clear?>','rate<?=$pay_order->type?><?=$caiwu_info->id?>','0')"style="width:60px;" /></td>
<td height="25" align="center" class="td_bg">[<a href="/insurer/info?id=<?=$order_info->id?>" target="_blank">详情</a>]</td>
</tr>
<?php
}
?>
<tr>
<td width="50" height="25" align="center" class="bg_tr"></td>
<td height="25" align="center" class="bg_tr"></td>
<td height="25" align="center" class="bg_tr"></td>
<td height="25" align="center" class="bg_tr"></td>
<td height="25" align="center" class="bg_tr"></td>
<td height="25" align="center" class="bg_tr"><?=number_format($real_pay,2)?></td>
<td height="25" align="center" class="bg_tr"></td>
</tr>
</table>
<?php } ?>
<!-- 内勤正本-->
<?php if($my_type6_query->count() > 0) { ?>
<table width="98%" border="0" align="center" cellpadding="3" cellspacing="1" class="table">
<tr>
<td align="center" colspan="7" height="25" class="bg_tr">正本统计</td>
</tr>
<tr>
<td width="50" height="25" align="center" class="bg_tr">序号</td>
<td height="25" align="center" class="bg_tr">车牌号</td>
<td height="25" align="center" class="bg_tr">被保险人</td>
<td height="25" align="center" class="bg_tr">正本比例</td>
<td height="25" align="center" class="bg_tr">时间</td>
<td height="25" align="center" class="bg_tr">正本提成</td>
<td height="25" align="center" class="bg_tr">详情</td>
</tr>
<?php
$real_pay = 0;
foreach($my_type6_query->each() as $index=>$pay_order) {
$order_info = $pay_order->order;
$caiwu_info = $order_info->caiwu;
$rate = $caiwu_info->rate5;
$send_info = $order_info->sendLog;
$real_pay += $pay_order->real_pay;
?>
<tr>
<td width="50" height="25" align="center" class="td_bg">
<input type="hidden" name="zhengben[]" value="<?=$pay_order->id?>">
<?=$index?>
</td>
<td height="25" align="center" class="td_bg"><?=$order_info->car_no?></td>
<td height="25" align="center" class="td_bg"><?=MyLib::substr_cut($order_info->id_man,15)?></td>
<td height="25" align="center" class="td_bg"><input name="rate<?=$pay_order->type?>[]" id="rate<?=$pay_order->type?><?=$caiwu_info->id?>" type="text" value="<?=$rate?>" style="width:60px;" />%</td>
<td height="25" align="center" class="td_bg"><?=date('Y-m-d H:i:s',$send_info->send_time)?></td>
<td height="25" align="center" class="td_bg"><input name="should_pays<?=$pay_order->type?>[]" id="should_pays<?=$pay_order->type?>_<?=$caiwu_info->id?>" type="text" value="<?=$pay_order->should_pay?>" onblur="cal_rate('should_pays<?=$pay_order->type?>_<?=$caiwu_info->id?>','<?=$order_info->total1_clear?>','rate<?=$pay_order->type?><?=$caiwu_info->id?>','0')" style="width:60px;"/></td>
<td height="25" align="center" class="td_bg">[<a href="/insurer/info?id=<?=$order_info->id?>" target="_blank">详情</a>]</td>
</tr>
<?php
}
?>
<tr>
<td width="50" height="25" align="center" class="bg_tr"></td>
<td height="25" align="center" class="bg_tr"></td>
<td height="25" align="center" class="bg_tr"></td>
<td height="25" align="center" class="bg_tr"></td>
<td height="25" align="center" class="bg_tr"></td>
<td height="25" align="center" class="bg_tr"><?=number_format($real_pay,2)?></td>
<td height="25" align="center" class="bg_tr"></td>
</tr>
</table>
<?php } ?>
<!-- 非车险销售-->
<?php if($my_type1_query_non->count() > 0) { ?>
<table width="98%" border="0" align="center" cellpadding="3" cellspacing="1" class="table">
<tr>
<td align="center" colspan="6" height="25" class="bg_tr">非车险销售统计</td>
</tr>
<tr>
<td width="50" height="25" align="center" class="bg_tr">序号</td>
<td height="25" align="center" class="bg_tr">被保险人</td>
<td height="25" align="center" class="bg_tr">提成比例</td>
<td height="25" align="center" class="bg_tr">核保日期</td>
<td height="25" align="center" class="bg_tr">提成</td>
<td height="25" align="center" class="bg_tr">详情</td>
</tr>
<?php
$real_pay = 0;
foreach($my_type1_query_non->each() as $index=>$pay_order) {
$order_info = $pay_order->order;
$caiwu_info = $order_info->caiwu1;
$rate = $caiwu_info->rate1;
$real_pay += $pay_order->real_pay;
?>
<tr>
<td width="50" height="25" align="center" class="td_bg">
<input type="hidden" name="non_xiaoshou[]" value="<?=$pay_order->id?>">
<?=$index?>
</td>
<td height="25" align="center" class="td_bg"><?=MyLib::substr_cut($order_info->id_man,15)?></td>
<td height="25" align="center" class="td_bg"><input name="rate<?=$pay_order->type?>[]" id="rate<?=$pay_order->type?><?=$caiwu_info->id?>" type="text" value="<?=$rate?>" style="width:60px;" />%</td>
<td height="25" align="center" class="td_bg"><?=$pay_order->order->print_date?></td>
<td height="25" align="center" class="td_bg"><input name="should_pays<?=$pay_order->type?>[]" id="should_pays<?=$pay_order->type?>_<?=$caiwu_info->id?>" type="text" value="<?=$pay_order->should_pay?>" onblur="cal_rate('should_pays<?=$pay_order->type?>_<?=$caiwu_info->id?>','<?=$order_info->non_baofei?>','rate<?=$pay_order->type?><?=$caiwu_info->id?>','0')" style="width:60px;"/></td>
<td height="25" align="center" class="td_bg">[<a href="/non-auto-insurance/bd-info-search?id= <?=$order_info->non_id?> &oid=<?=$order_info->id?>" target="_blank">详情</a>]</td>
</tr>
<?php
}
?>
<tr>
<td width="50" height="25" align="center" class="bg_tr"></td>
<td height="25" align="center" class="bg_tr"></td>
<td height="25" align="center" class="bg_tr"></td>
<td height="25" align="center" class="bg_tr"></td>
<td height="25" align="center" class="bg_tr"><?=number_format($real_pay,2)?></td>
<td height="25" align="center" class="bg_tr"></td>
</tr>
</table>
<?php } ?>
<!-- 非车险核保-->
<?php if($my_type1_query_hebao->count() > 0) { ?>
<table width="98%" border="0" align="center" cellpadding="3" cellspacing="1" class="table">
<tr>
<td align="center" colspan="6" height="25" class="bg_tr">非车险核保统计</td>
</tr>
<tr>
<td width="50" height="25" align="center" class="bg_tr">序号</td>
<td height="25" align="center" class="bg_tr">被保险人</td>
<td height="25" align="center" class="bg_tr">提成比例</td>
<td height="25" align="center" class="bg_tr">核保日期</td>
<td height="25" align="center" class="bg_tr">提成</td>
<td height="25" align="center" class="bg_tr">详情</td>
</tr>
<?php
$real_pay = 0;
foreach($my_type1_query_hebao->each() as $index=>$pay_order) {
$order_info = $pay_order->order;
$caiwu_info = $order_info->caiwu1;
$rate = $caiwu_info->rate4;
$real_pay += $pay_order->real_pay;
?>
<tr>
<td width="50" height="25" align="center" class="td_bg">
<input type="hidden" name="non_hebao[]" value="<?=$pay_order->id?>">
<?=$index?>
</td>
<td height="25" align="center" class="td_bg"><?=MyLib::substr_cut($order_info->id_man,15)?></td>
<td height="25" align="center" class="td_bg"><input name="rate<?=$pay_order->type?>[]" id="rate<?=$pay_order->type?><?=$caiwu_info->id?>" type="text" value="<?=$rate?>" style="width:60px;" />%</td>
<td height="25" align="center" class="td_bg"><?=$pay_order->order->print_date?></td>
<td height="25" align="center" class="td_bg"><input name="should_pays<?=$pay_order->type?>[]" id="should_pays<?=$pay_order->type?>_<?=$caiwu_info->id?>" type="text" value="<?=$pay_order->should_pay?>" onblur="cal_rate('should_pays<?=$pay_order->type?>_<?=$caiwu_info->id?>','<?=$order_info->non_baofei?>','rate<?=$pay_order->type?><?=$caiwu_info->id?>','0')" style="width:60px;"/></td>
<td height="25" align="center" class="td_bg">[<a href="/non-auto-insurance/bd-info-search?id= <?=$order_info->non_id?> &oid=<?=$order_info->id?>" target="_blank">详情</a>]</td>
</tr>
<?php
}
?>
<tr>
<td width="50" height="25" align="center" class="bg_tr"></td>
<td height="25" align="center" class="bg_tr"></td>
<td height="25" align="center" class="bg_tr"></td>
<td height="25" align="center" class="bg_tr"></td>
<td height="25" align="center" class="bg_tr"><?=number_format($real_pay,2)?></td>
<td height="25" align="center" class="bg_tr"></td>
</tr>
</table>
<?php } ?>
<div align="center">
<input id="submit-btn" type=button class="ACT_btn" name=Submit1 value=" 提交 "/>
&nbsp;&nbsp;
<input id="back-btn" type="button" class="ACT_btn" name="Submit2" value=" 返回 ">
</div>
</form>
<script type="text/javascript" language="javascript" src="/js/jquery-1.8.3.js"></script>
<script type="text/javascript" language="javascript" src="/js/ajax.js"></script>
<script type="text/javascript" language="javascript" src="/js/func.js"></script>
<script type="text/javascript" src="/js/artDialog/jquery.artDialog.js?skin=default"></script>
<script type="text/javascript" src="/js/artDialog/plugins/iframeTools.source.js"></script>
<script type="text/javascript" language="javascript">
function cal_pay(obj1,total,dis,price1,price2,price3,price4,obj2,obj3) {
var total1 = Number($('#' + obj1).val())/100 * Number(total);
var total2 = total1 - Number(dis) - Number(price1) - Number(price2) - Number(price3) - Number(price4);
$('#' + obj2).val(total1.toFixed(2));
$('#' + obj3).val(total2.toFixed(2));
}
function cal_money(obj1,val,obj2) {
var total = Number($('#' + obj1).val())/100 * Number(val);
$('#' + obj2).val(total.toFixed(2));
}
function cal_rate(obj1,val,obj3,dis) {
if(Number(val) == 0) {
$('#' + obj3).val('0.00');
return;
}
var rate = (Number($('#' + obj1).val()))/Number(val) * 100 ;
$('#' + obj3).val(rate.toFixed(2));
}
function open_gift_dlg(order_id,is_free,type) {
$.dialog.open('/finance/pay2-gift-info?user_id=<?=$user_info->id?>&pay_date=<?=$pay_date?>&order_id=' + order_id + '&is_free=' + is_free + '&type=' + type,{
left: '40%',
top: '0%',
fixed: true
});
}
$(function () {
//提交按钮
$("#submit-btn").click(function(){
if(confirm('是否确认提交?')) {
var params = $("#theFrm").serialize();
$.post('/finance/pay2-save',params,function(obj){
alert(obj.msg);
if(obj.success) {
$('#back-btn').click();
}
},'json');
}
});
//返回按钮
$('#back-btn').click(function(){
window.location.href='/finance/pay2-list?<?=$back_params?>';
});
})
</script>