<link href="/css/tabs.css" rel="stylesheet" type="text/css">
<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->base_should_pay,2)?></span> 元 <span style="color:#ff0000;">实发工资:<span><?=number_format($pay_info->base_real_pay,2)?></span> 元</span></h3>
    <h3>基本工资</h3>
    <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 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"><input oninput="tryPay($(this))" type="text" name="try_pay" value="<?=$pay_info->try_pay == '0.00' ? $user_info->try_pay : $pay_info->try_pay?>"></td>
            <td height="25" class="td_bg"><?=$user_info->job_date?></td>
            <td height="25" class="td_bg"><input oninput="formalPay($(this))" type="text" name="formal_pay" value="<?=$pay_info->formal_pay == '0.00' ? ($group_info?($group_info->base_pay + $group_info->job_pay + $group_info->station_pay + $user_info->ext_pay):$user_info->ext_pay) : $pay_info->formal_pay?>" /></td>
            <td height="25" class="td_bg"><input  name="extjob_days" type="text" value="<?=$pay_info->extjob_days?>" style="width:60px;"/></td>
            <td height="25" class="td_bg"><input  name="try_attendance_days" type="text" value="<?=$pay_info->try_attendance_days?>" style="width:60px;"/></td>
            <td height="25" class="td_bg"><input  name="attendance_days" type="text" value="<?=$pay_info->attendance_days?>" style="width:60px;"/></td>

        </tr>
    </table>
    <br>
    <h3>补助工资</h3>
    <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 height="25" align="center" colspan="2" class="bg_tr try_pay">试用( --><?//=$try_pay?><!-- 元)</td>-->
        <!--            <td height="25" align="center" colspan="6" class="bg_tr formal_pay">转正( --><?//=$true_pay?><!-- 元)</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><td height="25" class="bg_tr">全勤(钱数)</td>
            <td height="25" class="bg_tr">通时(钱数)</td>
        </tr>
        <tr>
            <td height="25" class="td_bg"><input  name="try_extjob_pay" type="text" value="<?=$pay_info->try_extjob_pay?>" style="width:60px;"/></td>
            <td height="25" class="td_bg"><input  name="extjob_pay" type="text" value="<?=$pay_info->extjob_pay?>" style="width:60px;"/></td>
            <td height="25" class="td_bg"><input  name="give_social_pay" type="text" value="<?=$pay_info->give_social_pay?>" style="width:60px;"/></td>
            <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="get_full_attendance_pay" type="text" value="<?=$pay_info->get_full_attendance_pay ? $pay_info->get_full_attendance_pay : '0.00'?>" style="width:60px;"/></td>
            <td height="25" class="td_bg"><input  name="get_pass_time_pay" type="text" value="<?=$pay_info->get_pass_time_pay ? $pay_info->get_pass_time_pay : '0.00'?>" style="width:60px;"/></td>
        </tr>
    </table>
    <br>
    <h3>应扣工资</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"><input  name="late_pay" type="text" value="<?=$pay_info->late_pay?>" style="width:60px;"/></td>
            <td height="25" class="td_bg"><input  name="leave_pay" type="text" value="<?=$pay_info->leave_pay?>" style="width:60px;"/></td>
            <td height="25" class="td_bg"><input  name="sick_pay" type="text" value="<?=$pay_info->sick_pay?>" style="width:60px;"/></td>
            <td height="25" class="td_bg"><input  name="social_pay" type="text" value="<?=$pay_info->social_pay?>" style="width:60px;"/></td>
            <td height="25" class="td_bg"><input  name="fine_pay" type="text" value="<?=$pay_info->fine_pay?>" style="width:60px;"/></td>
            <td height="25" class="td_bg"><input  name="electricity_pay" type="text" value="<?=$pay_info->electricity_pay?>" style="width:60px;"/></td>
            <td height="25" class="td_bg"><input  name="deposit" type="text" value="<?=$pay_info->deposit?>" style="width:60px;"/></td>
            <td height="25" class="td_bg"><input  name="public_pay" type="text" value="<?=$pay_info->public_pay?>" style="width:60px;"/></td>
            <td height="25" class="td_bg"><input type="text" name="tax" value="<?=$pay_info->tax?>" /></td>
            <td height="25" class="td_bg"><input  name="full_attendance_pay" type="text" value="<?=$pay_info->full_attendance_pay?>" style="width:60px;"/></td>
            <td height="25" class="td_bg"><input  name="pass_time_pay" type="text" value="<?=$pay_info->pass_time_pay?>" style="width:60px;"/></td>
        </tr>
    </table>
    <div align="center">
        <?php if($pay_info->status_id < 4 || $pay_info->status_id == 7): ?>
            <input id="submit-btn" type=button class="ACT_btn" name=Submit1 value=" 提交 "/>
            &nbsp;&nbsp;
        <?php endif;?>

        <input id="back-btn" type="button" class="ACT_btn" name="Submit2" value=" 返回 ">
    </div>
</form>

<table>
    <tbody>
    <tr>
        <TD height="30" align="center" class=tab-off id=navcell onclick=open_up(2) name="navcell">▲操作记录</TD>
    </tr>
    </tbody>
</table>
<TABLE id=tb2 cellSpacing=1 cellPadding=0 width="100%" border=0 name="tb" class="hide-table">
    <TR>
        <TD vAlign=top>
            <div id="car_history_list"></div>
        </TD>
    </TR>
</TABLE>



<script type="text/javascript" language="javascript" src="/js/jquery-1.8.3.js"></script>
<link rel="stylesheet" href="../Myfile/css/font.css?v=20190611">
<link rel="stylesheet" href="../Myfile/css/xadmin.css?v=20190605">
<link rel="stylesheet" href="../Myfile/css/theme274.min.css?v=20190605">
<script type="text/javascript" language="javascript" src="/js/jquery-1.8.3.js"></script>
<script src="../Myfile/lib/layui/layui.js?v=20190611" charset="utf-8"></script>
<script type="text/javascript" src="../Myfile/js/xadmin.js?v=20190612"></script>
<script type="text/javascript" language="javascript" src="/js/ajax.js?v=2019"></script><script type="text/javascript" language="javascript" src="/js/func.js"></script>
<script type="text/javascript" language="javascript" src="/js/common2.js"></script>
<script type="text/javascript" language="javascript">
    //操作历史
    gotoPage('/personnel/ajax-history-index?pay_id=<?=$pay_info->id?>&page=1','car_history_list');

    $(function () {
        //提交按钮
        $("#submit-btn").click(function(){
            if(confirm('是否确认提交?')) {
                var params = $("#theFrm").serialize();
                $.post('/personnel/pay-save',params,function(obj){
                    alert(obj.msg);
                    if(obj.success) {
                        $('#back-btn').click();
                    }
                },'json');
            }
        });

        //返回按钮
        $('#back-btn').click(function(){
            window.location.href='/personnel/pay-list?<?=$back_params?>';
        });
    })

</script>