<!DOCTYPE html>
<html lang=zh-cn>
<head>
    <meta charset=utf-8>
    <title>纵横计量支付系统</title>
    <meta name=description content=计量支付>
    <meta name=copyright content=smartcost.com.cn>
    <meta name="viewport" content="width=device-width,initial-scale=1.0">
    <link rel=stylesheet href="{{rootUrl}}global/css/bootstrap.css">
    <link rel=stylesheet href="{{rootUrl}}global/css/style.css">
    <script src="{{rootUrl}}global/js/jquery-1.9.1.min.js"></script>
    <script src="{{rootUrl}}global/js/bootstrap.js"></script>
    <script src="{{rootUrl}}global/js/jl.js"></script>
    <script src="http://s1.bdstatic.com/r/www/cache/ecom/esl/1-6-10/esl.js"></script>
</head>
<body>
<!-- include "top" -->
<div class="wrapContent">
    <!-- include "left" -->
    <div class="mainContainer">
        <!--内容-->
        <div class="mainContent">
            <div class="title clearfix">
                <ul class="nav nav-pills">
                    <li class="dropdown"><a title="返回" href="{{rootUrl}}rproject/{{pid}}/section"><span
                            class="closePanel" aria-hidden="true" data-icon="Z"></span></a></li>
                    <li class="dropdown">
                        <a href="{{rootUrl}}rproject/{{pid}}/section/{{pmid}}/report/{{mpid}}" data-toggle="dropdown"
                           class="dropdown-toggle">
                            第{{ToChinaseNum(currnum)}}期<b class="caret"></b>
                        </a>
                        <ul class="dropdown-menu">
                            <!-- loop numArray -->
                            <li><a href="{{rootUrl}}rproject/{{pid}}/section/{{pmid}}/report/{{numArray' value.mpid}}">第{{ToChinaseNum(numArray' value.numpname)}}期</a></li>
                            <!-- endloop -->
                        </ul>
                    </li>
                </ul>
            </div>
            <!--导航-->
            <ul class="nav nav-tabs">
                <li>
                    <a href="{{rootUrl}}rproject/{{pid}}/section/{{pmid}}/detail">标段概况</a>
                </li>
                <!--<li>-->
                    <!--<a href="/rproject/{{pid}}/section/{{pmid}}/files/{{mpid}}">附件</a>-->
                <!--</li>-->
                <li class="active">
                    <a href="{{rootUrl}}rproject/{{pid}}/section/{{pmid}}/report/{{mpid}}">审批</a>
                </li>
            </ul>
            <!--导航-->
            <!--本期数据-->
            <div>
                <table class="table table-striped">
                    <thead>
                    <tr>
                        <th width="8%">期数</th>
                        <th class="taC" width="16%">本期合同计量</th>
                        <th class="taC" width="16%">本期数量变更计量</th>
                        <th class="taC" width="16%">截止上期累计完成</th>
                        <th class="taC" width="16%">本期完成计量</th>
                        <th class="taC" width="16%">累计完成计量</th>
                        <th class="taC">状态</th>
                    </tr>
                    <!--<tr>-->
                    <!--<td>第七期&nbsp;<span data-toggle="tooltip" data-placement="bottom" title="上报：2015-09-09；通过：2015-09-13" class="icon-time"></span></td><td class="taR">0</td><td class="taR">0</td><td class="taR">0</td><td class="taR">0</td><td class="taR">0</td><td class="taR"><b class="colOrange">审批中</b></td>-->
                    <!--</tr>-->
                    <!-- loop MeasureArray2 -->
                    <tr>
                        <td width="8%">第{{ToChinaseNum(MeasureArray2' value.numpname)}}期&nbsp;<span
                                data-toggle="tooltip" data-placement="bottom"
                                title="上报：{{formatDate(MeasureArray2' value.intime,'Y-m-d')}} <!-- if {{MeasureArray2' value.audittime}}!='0' -->；通过：{{formatDate(MeasureArray2' value.audittime,'Y-m-d')}}<!-- endif -->"
                                class="icon-time"></span></td>
                        <td width="16%" class="taR">{{MeasureArray2' value.currcontractval}}</td>
                        <td width="16%" class="taR">{{MeasureArray2' value.currchangeval}}</td>
                        <td width="16%" class="taR">{{MeasureArray2' value.stopnowtotal}}</td>
                        <td width="16%" class="taR">{{MeasureArray2' value.currdone}}</td>
                        <td width="16%" class="taR">{{MeasureArray2' value.curralltotal}}</td>
                        <td width="16%" class="taR">{{MeasureArray2' value.currstatus}}</td>
                    </tr>
                    <!-- endloop -->
                    </tbody>
                </table>
            </div>
            <!--审批操作栏-->
            <div class="bottomToolsbar">
                <div class="avatarBar clearfix">
                    <!-- if {{mastatus}}!='checking' -->
                    <!-- if {{mastatus}}=='uncheck' -->
                    <div class="fR">
                        <h4 class="colGray">待审</h4>
                    </div>
                    <!-- endif -->
                    <!-- if {{mastatus}}=='checked' -->
                    <div class="fR">
                        <h4 class="colGreen">审批通过</h4>
                    </div>
                    <!-- endif -->
                    <!-- if {{mastatus}}=='checkno' -->
                    <div class="fR">
                        <h4 class="colRed">审批不通过</h4>
                    </div>
                    <!-- endif -->
                    <!-- endif -->
                    <!-- if {{mastatus}}=='checking' -->
                    <div class="fR">
                        <div class="btn-group dropup">
                            <a class="btn btn-success" data-toggle="modal" href="#reportPass"><span aria-hidden="true"
                                                                                                    data-icon="d"></span>&nbsp;审批通过</a>
                        </div>
                        <a type="button" class="btn btn-danger" data-toggle="modal" href="#reportNopass"><span
                                aria-hidden="true" data-icon="e"></span>&nbsp;审批不通过</a>
                    </div>
                    <!-- endif -->
                    <ul class="avatar clearfix">
                        <li class="name">我</li>
                    </ul>
                </div>
            </div>
            <!--审批操作栏-->
            <!--审批列表-->
            <!-- loop auditArray -->
            <div class="reportList">
                <div class="avatarBar clearfix">
                    <div class="fR">
                        {{auditArray' value.statuStr}}
                    </div>
                    <ul class="avatar clearfix">
                        <li class="num">{{auditArray' value.k}}</li>
                        {{auditArray' value.statushtml}}
                        <li class="name {{auditArray' value.statucolorStr}}">{{auditArray' value.name}}</li>
                        <li class="con"><p>{{auditArray' value.auditcontent}}</p></li>
                    </ul>
                </div>
            </div>
            <!-- endloop -->
            <!--审批列表-->
        </div>

        <!--内容-->
    </div>
</div>
<!-- 审批通过 -->
<div id="reportPass" class="modal hide fade" tabindex="-1" role="dialog" aria-labelledby="myModalLabel"
     aria-hidden="true">
    <div class="modal-header">
        <button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
        <h3 id="myModalLabel">审批通过</h3>
    </div>
    <div class="modal-body">

        <div class="form">
            <form>
                <textarea name="content" id="content" class="form-control" rows="3" placeholder="填写审批通过的意见"
                          style="width:510px"></textarea>
            </form>
        </div>
    </div>
    <div class="modal-footer">
        <button class="btn" data-dismiss="modal" aria-hidden="true">关闭</button>
        <button class="btn btn-success auditclass" act="p" maid="{{maid}}" pmid="{{pmid}}" numpname="{{numpname}}"
                times="{{times}}" id="pass">确认审批通过
        </button>
    </div>
</div>
<!-- 审批通过 -->
<!-- 审批不通过 -->
<div id="reportNopass" class="modal hide fade" tabindex="-1" role="dialog" aria-labelledby="myModalLabel"
     aria-hidden="true">
    <div class="modal-header">
        <button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
        <h3 id="myModalLabel">审批不通过</h3>
    </div>
    <div class="modal-body">

        <div class="form">
            <form>
                <textarea name="content" id="content" class="form-control" rows="3" placeholder="填写审批不通过的意见"
                          style="width:510px"></textarea>
            </form>
        </div>
    </div>
    <div class="modal-footer">
        <button class="btn" data-dismiss="modal" aria-hidden="true">关闭</button>
        <button class="btn btn-danger auditclass" act="np" maid="{{maid}}" pmid="{{pmid}}" numpname="{{numpname}}"
                times="{{times}}">确认审批不通过
        </button>
    </div>
</div>
<!-- 审批不通过 -->
<script type="text/javascript">autoFlashHeight();</script>
<script type="text/javascript">
    $(document).ready(function () {
        $(".auditclass").click(function () {
            var pmid = $(this).attr('pmid');
            var numpname = $(this).attr('numpname');
            var times = $(this).attr('times');
            var content = $(this).parent().parent().find("textarea").val();
            var act = $(this).attr('act');
            var maid = $(this).attr('maid');
            $.ajax({
                type: "POST",
                dataType: "json",
                cache: false,
                data: {"act": act, "pmid": pmid, "numpname": numpname, "times": times, "content": content},
                url: "/rproject/{{pid}}/section/{{pmid}}/report/{{mpid}}",
                success: function (data) {
                    if (data['status'] == 1)
                        window.location.href = "{{rootUrl}}rproject/{{pid}}/section/{{pmid}}/report/{{mpid}}";
                }
            });
        });
    })
</script>
</body>