<%@ page contentType="text/html;charset=UTF-8" %>
<%@ include file="/webpage/include/taglib.jsp"%>
<html>
<head>
    <title>工程项目信息管理</title>
    <meta name="decorator" content="default"/>
    <script type="text/javascript">
        $(function(){
            $("img").not(".upload_ico").each(function () {
                var num = 1 ;
                $(this).click(function () {
                    var flag = num%2;
                    if(flag == 1){
                        $(this).css("width","90%");
                        $(this).css("height","90%");
                        num++;
                    }else if(flag ==0){
                        $(this).css("width","50px");
                        $(this).css("height","50px");
                        num++;
                    }
                })
            });
        })
        var validateForm;
        function doSubmit(obj){//回调函数，在编辑和保存动作时，供openDialog调用提交表单。
            if(validateForm.form()){
                if(obj == 1) {
                    $("#flag").val("1");
                }else if(obj == 2){
                    $("#flag").val("2");
                }else if(obj == 3){
                    $("#flag").val("1");
                }else if(obj == 4){
                    $("#flag").val("2");
                }
                $("#plan").val(obj);
                $("#name").val("allocation");
                $("#inputForm").submit();
                return true;
            }
            return false;
        }
        $(document).ready(function() {
            validateForm = $("#inputForm").validate({
                submitHandler: function(form){
                    loading('正在提交，请稍等...');
                    form.submit();
                },
                errorContainer: "#messageBox",
                errorPlacement: function(error, element) {
                    $("#messageBox").text("输入有误，请先更正。");
                    if (element.is(":checkbox")||element.is(":radio")||element.parent().is(".input-append")){
                        error.appendTo(element.parent().parent());
                    } else {
                        error.insertAfter(element);
                    }
                }
            });
            laydate.render({
                elem: '#workStartDate', //目标元素。由于laydate.js封装了一个轻量级的选择器引擎，因此elem还允许你传入class、tag但必须按照这种方式 '#id .class'
                event: 'focus' //响应事件。如果没有传入event，则按照默认的click
            });
            laydate.render({
                elem: '#workEndDate', //目标元素。由于laydate.js封装了一个轻量级的选择器引擎，因此elem还允许你传入class、tag但必须按照这种方式 '#id .class'
                event: 'focus' //响应事件。如果没有传入event，则按照默认的click
            });
            $("#attachment_btn_report").click(function () {
                $("#attachment_report").click();
            });
            $("#attachment_btn_basis").click(function () {
                $("#attachment_basis").click();
            });
            $("#attachment_btn_remote").click(function () {
                $("#attachment_remote").click();
            });
            $("#attachment_btn_summary").click(function () {
                $("#attachment_summary").click();
            });
            $("#attachment_btn_other").click(function () {
                $("#attachment_other").click();
            });
            var oneSize = $(".oneTab").size();
            for(var i = 0;i < oneSize;i++){
                var hei = $(".oneTab:eq("+i+")").parent().height()-20;
                $(".oneTab:eq("+i+")").css("height",hei)
                    .css("vertical-align","middle")
                    .css("line-height",hei+"px")
            }
        });

        /* function reportInsertTitle(tValue){
             $("#attachment_title_report_div").remove();
             var t1 = tValue.lastIndexOf("\\");
             if(t1 >= 0 && t1 < tValue.length){
                 $("#attachment_title_report").text(tValue.substring(t1+1));
                 $("#attachment_title_report").after("<div id='attachment_title_report_div' style='float: right'>&nbsp;&nbsp;<span id='attachment_delete' onclick='attachment_report_del()'style='color: red ; cursor: pointer;'>x</span></div>");
             }
         }*/
        function reportInsertTitle(tValue){
            var list = "${workReportList}";
            var size = (list.split('url')).length-1;
            var files = $("#attachment_report")[0].files;            for(var i = 0;i<files.length;i++) {                var file = files[i];
            var attachmentId = $("#id").val();
            var attachmentFlag = "39";
            console.log(file);
            var timestamp=new Date().getTime();

            var storeAs = "attachment-file/workProjectReport/"+timestamp+"/"+file['name'];
            var uploadPath="http://gangwan-app.oss-cn-hangzhou.aliyuncs.com/"+storeAs;/*将这段字符串存到数据库即可*/
            var divId = "_attachment_report";
            $("#addFile"+divId).show();
            multipartUploadWithSts(storeAs, file,attachmentId,attachmentFlag,uploadPath,divId,size);}
        };
        function basisInsertTitle(tValue){
            var list = "${workBasisInformationList}";
            var size = (list.split('url')).length-1;
            $("#attachment_title_basis_div").remove();
            var files = $("#attachment_basis")[0].files;            for(var i = 0;i<files.length;i++) {                var file = files[i];
            var attachmentId = $("#id").val();
            var attachmentFlag = "40";
            console.log(file);
            var timestamp=new Date().getTime();

            var storeAs = "attachment-file/workProjectReport/"+timestamp+"/"+file['name'];
            var uploadPath="http://gangwan-app.oss-cn-hangzhou.aliyuncs.com/"+storeAs;/*将这段字符串存到数据库即可*/
            var divId = "_attachment_basis";
            $("#addFile"+divId).show();
            multipartUploadWithSts(storeAs, file,attachmentId,attachmentFlag,uploadPath,divId,size);}
        }
        function remoteInsertTitle(tValue){
            var list = "${workRemoteControlList}";
            var size = (list.split('url')).length-1;
            $("#attachment_title_remote_div").remove();
            var files = $("#attachment_remote")[0].files;            for(var i = 0;i<files.length;i++) {                var file = files[i];
            var attachmentId = $("#id").val();
            var attachmentFlag = "41";
            console.log(file);
            var timestamp=new Date().getTime();

            var storeAs = "attachment-file/workProjectReport/"+timestamp+"/"+file['name'];
            var uploadPath="http://gangwan-app.oss-cn-hangzhou.aliyuncs.com/"+storeAs;/*将这段字符串存到数据库即可*/
            var divId = "_attachment_remote";
            $("#addFile"+divId).show();
            multipartUploadWithSts(storeAs, file,attachmentId,attachmentFlag,uploadPath,divId,size);}
        }
        function summaryInsertTitle(tValue){
            var list = "${workSummaryList}";
            var size = (list.split('url')).length-1;
            $("#attachment_title_summary_div").remove();
            var files = $("#attachment_summary")[0].files;            for(var i = 0;i<files.length;i++) {                var file = files[i];
            var attachmentId = $("#id").val();
            var attachmentFlag = "42";
            console.log(file);
            var timestamp=new Date().getTime();

            var storeAs = "attachment-file/workProjectReport/"+timestamp+"/"+file['name'];
            var uploadPath="http://gangwan-app.oss-cn-hangzhou.aliyuncs.com/"+storeAs;/*将这段字符串存到数据库即可*/
            var divId = "_attachment_summary";
            $("#addFile"+divId).show();
            multipartUploadWithSts(storeAs, file,attachmentId,attachmentFlag,uploadPath,divId,size);}
        }
        function otherInsertTitle(tValue){
            var list = "${workOtherList}";
            var size = (list.split('url')).length-1;
            $("#attachment_title_other_div").remove();
            var files = $("#attachment_other")[0].files;            for(var i = 0;i<files.length;i++) {                var file = files[i];
            var attachmentId = $("#id").val();
            var attachmentFlag = "43";
            console.log(file);
            var timestamp=new Date().getTime();

            var storeAs = "attachment-file/workProjectReport/"+timestamp+"/"+file['name'];
            var uploadPath="http://gangwan-app.oss-cn-hangzhou.aliyuncs.com/"+storeAs;/*将这段字符串存到数据库即可*/
            var divId = "_attachment_other";
            $("#addFile"+divId).show();
            multipartUploadWithSts(storeAs, file,attachmentId,attachmentFlag,uploadPath,divId,size);}
        }
        function attachment_report_del() {
            $("#attachment_report").val("");
            $("#attachment_title_report").text("");
            $("#attachment_report_delete").remove();
            $("#attachment_title_report_div").remove();
        }
        function attachment_basis_del() {
            $("#attachment_basis").val("");
            $("#attachment_title_basis").text("");
            $("#attachment_basis_delete").remove();
            $("#attachment_title_basis_div").remove();
        }
        function attachment_remote_del() {
            $("#attachment_remote").val("");
            $("#attachment_title_remote").text("");
            $("#attachment_remote_delete").remove();
            $("#attachment_title_remote_div").remove();
        }
        function attachment_summary_del() {
            $("#attachment_summary").val("");
            $("#attachment_title_summary").text("");
            $("#attachment_summary_delete").remove();
            $("#attachment_title_summary_div").remove();
        }
        function attachment_other_del() {
            $("#attachment_other").val("");
            $("#attachment_title_other").text("");
            $("#attachment_other_delete").remove();
            $("#attachment_title_other_div").remove();
        }
        function sendPriceValue(obj) {
            var sendPrice = $("#sendPrice").val();
            var approvedPrice = $("#approvedPrice").val();
            if (sendPrice>0 && approvedPrice>0){
                var addEditAmount = 0;
                var addEditRate = 0;
                if(parseFloat(sendPrice)>parseFloat(approvedPrice)){
                    addEditAmount = sendPrice - approvedPrice;
                    addEditRate = ((approvedPrice / sendPrice)* 100 ).toFixed(2)+ "%";
                }else {
                    addEditAmount = approvedPrice - sendPrice;
                    addEditRate = ((sendPrice / approvedPrice)* 100 ).toFixed(2)+ "%";
                }
                $("#addEditAmount").val(addEditAmount);
                $("#addEditRate").val(addEditRate);
            }

        }
        function approvedPriceValue(obj) {
            var sendPrice = $("#sendPrice").val();
            var approvedPrice = $("#approvedPrice").val();
            if (sendPrice>0 && approvedPrice>0){
                var addEditAmount = 0;
                var addEditRate = 0;
                if(parseFloat(sendPrice)>parseFloat(approvedPrice)){
                    addEditAmount = sendPrice - approvedPrice;
                }else {
                    addEditAmount = approvedPrice - sendPrice;
                }
                addEditRate = ((sendPrice / approvedPrice)* 100 ).toFixed(2) + "%";
                $("#addEditAmount").val(addEditAmount);
                $("#addEditRate").val(addEditRate);
                $("#consultAmount").val(approvedPrice);
            }
        }
    </script>
</head>
<body class="hideScroll">
<form:form id="inputForm" modelAttribute="workEngineeringProject" action="${ctx}/projectManagement/projectManagement/saveAudit" method="post" class="form-horizontal">
<form:hidden path="id"/>
<form:hidden path="workEngineeringPrice.id"/>
<form:hidden path="name"/>
<form:hidden path="plan"/>
<form:hidden path="act.taskId"/>
<form:hidden path="act.taskName"/>
<form:hidden path="act.taskDefKey"/>
<form:hidden path="act.procInsId"/>
<form:hidden path="act.procDefId"/>
<form:hidden id="flag" path="act.flag"/>
<sys:message content="${message}"/>
<div class="wrapper wrapper-content">
    <div class="ibox">
        <div class="ibox-content">
            <div class="col-sm-12">
                <div class="col-sm-2 gray-bg text-center oneTab">
                    <label>文件信息</label>
                </div>
                <div class="col-sm-10 " >
                    <tr>
                        <td class="width-15 active" ><label class="pull-left">报告文件：</label></td>
                        <td class="width-35" colspan="3">
                            <div style="display: inline-block">
                                <div id="addFile_attachment_report" style="display: none">
                                    <div>
                                        <span id="fileName_attachment_report" ></span>
                                        <b><span id="baifenbi_attachment_report" ></span></b>
                                    </div>
                                    <div>
                                        <div class="progress">
                                            <div id="jindutiao_attachment_report" class="progress-bar" style="width: 0%" aria-valuenow="0">
                                            </div>
                                        </div>
                                    </div>
                                </div>
                                <input id="attachment_report" type="file" name="attachment_report" multiple="multiple" style="display: none;" onChange="if(this.value)reportInsertTitle(this.value);"/>
                                <a id="attachment_btn_report" class="btn btn-info btn-xs" ><i class="fa fa-plus"></i> 添加附件</a>
                                <span id="attachment_title_report"></span>
                            </div>
                            <table id="workReportList"  style="text-align: center;width: 100%;margin-top:10px;"  class="table table-striped table-bordered table-condensed" >
                                <thead>
                                <tr>
                                    <%--<td>序号</td>--%><td>文件名</td><td>上传人</td><td>上传时间</td><td>操作</td>
                                </tr>
                                </thead>
                                <tbody id="file_attachment_report">
                                <c:forEach items="${workReportList}" var="attachment" varStatus="status">
                                    <tr>
                                        <%--<td>${status.index + 1}</td>--%>
                                        <c:choose>
                                            <c:when test="${fn:containsIgnoreCase(attachment.attachmentName,'jpg')
                                                               or fn:containsIgnoreCase(attachment.attachmentName,'png')
                                                               or fn:containsIgnoreCase(attachment.attachmentName,'gif')
                                                               or fn:containsIgnoreCase(attachment.attachmentName,'bmp')
                                                               or fn:containsIgnoreCase(attachment.attachmentName,'jpeg')}">
                                                <td><img src="${attachment.url}" width="50" height="50" alt="${fns:abbr(attachment.attachmentName,30)}"/></td>
                                            </c:when>
                                            <c:otherwise>
                                                <c:choose>
                                                    <c:when test="${fn:containsIgnoreCase(attachment.attachmentName,'pdf')}">
                                                        <td><a href="javascript:void(0)" onclick="preview('预览','${attachment.url}','80%','80%','1')"><span title="${attachment.attachmentName}">${fns:abbr(attachment.attachmentName,30)}</span></a></td>
                                                    </c:when>
                                                    <c:otherwise>
                                                        <td><a href="javascript:void(0)" onclick="preview('预览','${attachment.url}','80%','80%')"><span title="${attachment.attachmentName}">${fns:abbr(attachment.attachmentName,30)}</span></a></td>
                                                    </c:otherwise>
                                                </c:choose>
                                            </c:otherwise>
                                        </c:choose>
                                        <td>${attachment.attachmentUser}</td>
                                        <td><fmt:formatDate value="${attachment.createDate}" pattern="yyyy-MM-dd HH:mm:ss"/></td>
                                        <td>
                                            <a href="${ctx}/workfullmanage/workFullManage/downLoadAttach?file=${attachment.url}" class="btn btn-success btn-xs">下载</a>
                                            <c:if test="${attachment.createBy.id eq fns:getUser().id}">
                                                <a href="javascript:void(0)" onclick="deleteFileFromAliyun(this,'${ctx}/workengineeringproject/workEngineeringProject/deleteFileFromAliyun?attachmentId=${attachment.id}&id=${workEngineeringProject.id}&type=2')" class="btn btn-danger btn-xs" >删除</a>
                                            </c:if>
                                        </td>
                                    </tr>
                                </c:forEach>
                                </tbody>
                            </table>
                        </td>
                    </tr>
                    <tr>
                        <td class="width-15 active"><label class="pull-left">依据性资料：</label></td>
                        <td class="width-35" colspan="3">
                            <div style="display: inline-block">
                                <div id="addFile_attachment_basis" style="display: none">
                                    <div>
                                        <span id="fileName_attachment_basis" ></span>
                                        <b><span id="baifenbi_attachment_basis" ></span></b>
                                    </div>
                                    <div>
                                        <div class="progress">
                                            <div id="jindutiao_attachment_basis" class="progress-bar" style="width: 0%" aria-valuenow="0">
                                            </div>
                                        </div>
                                    </div>
                                </div>
                                <input id="attachment_basis" type="file" name="attachment_basis" multiple="multiple" style="display: none;" onChange="if(this.value)basisInsertTitle(this.value);"/>
                                <a id="attachment_btn_basis" class="btn btn-info btn-xs" ><i class="fa fa-plus"></i> 添加附件</a>
                                <span id="attachment_title_basis"></span>
                            </div>
                            <table id="workBasisInformationList"  style="text-align: center;width: 100%;margin-top:10px;"  class="table table-striped table-bordered table-condensed" >
                                <thead>
                                <tr>
                                    <%--<td>序号</td>--%><td>文件名</td><td>上传人</td><td>上传时间</td><td>操作</td>
                                </tr>
                                </thead>
                                <tbody id="file_attachment_basis">
                                <c:forEach items="${workBasisInformationList}" var="attachment" varStatus="status">
                                    <tr>
                                        <%--<td>${status.index + 1}</td>--%>
                                        <c:choose>
                                            <c:when test="${fn:containsIgnoreCase(attachment.attachmentName,'jpg')
                                                               or fn:containsIgnoreCase(attachment.attachmentName,'png')
                                                               or fn:containsIgnoreCase(attachment.attachmentName,'gif')
                                                               or fn:containsIgnoreCase(attachment.attachmentName,'bmp')
                                                               or fn:containsIgnoreCase(attachment.attachmentName,'jpeg')}">
                                                <td><img src="${attachment.url}" width="50" height="50" alt="${fns:abbr(attachment.attachmentName,30)}"/></td>
                                            </c:when>
                                            <c:otherwise>
                                                <c:choose>
                                                    <c:when test="${fn:containsIgnoreCase(attachment.attachmentName,'pdf')}">
                                                        <td><a href="javascript:void(0)" onclick="preview('预览','${attachment.url}','80%','80%','1')"><span title="${attachment.attachmentName}">${fns:abbr(attachment.attachmentName,30)}</span></a></td>
                                                    </c:when>
                                                    <c:otherwise>
                                                        <td><a href="javascript:void(0)" onclick="preview('预览','${attachment.url}','80%','80%')"><span title="${attachment.attachmentName}">${fns:abbr(attachment.attachmentName,30)}</span></a></td>
                                                    </c:otherwise>
                                                </c:choose>
                                            </c:otherwise>
                                        </c:choose>
                                        <td>${attachment.attachmentUser}</td>
                                        <td><fmt:formatDate value="${attachment.createDate}" pattern="yyyy-MM-dd"/></td>
                                        <td>
                                            <a href="${ctx}/workfullmanage/workFullManage/downLoadAttach?file=${attachment.url}" class="btn btn-success btn-xs">下载</a>
                                             <c:if test="${attachment.createBy.id eq fns:getUser().id}">
                                                 <a href="javascript:void(0)" onclick="deleteFileFromAliyun(this,'${ctx}/workengineeringproject/workEngineeringProject/deleteFileFromAliyun?attachmentId=${attachment.id}&id=${workEngineeringProject.id}&type=2')" class="btn btn-danger btn-xs" >删除</a>
                                             </c:if>
                                        </td>
                                    </tr>
                                </c:forEach>
                                </tbody>
                            </table>
                        </td>
                    </tr>
                    <tr>
                        <td class="width-15 active"><label class="pull-left">过程控制资料：</label></td>
                        <td class="width-35" colspan="3">
                            <div style="display: inline-block">
                                <div id="addFile_attachment_remote" style="display: none">
                                    <div>
                                        <span id="fileName_attachment_remote" ></span>
                                        <b><span id="baifenbi_attachment_remote" ></span></b>
                                    </div>
                                    <div>
                                        <div class="progress">
                                            <div id="jindutiao_attachment_remote" class="progress-bar" style="width: 0%" aria-valuenow="0">
                                            </div>
                                        </div>
                                    </div>
                                </div>
                                <input id="attachment_remote" type="file" name="attachment_remote" multiple="multiple" style="display: none;" onChange="if(this.value)remoteInsertTitle(this.value);"/>
                                <a id="attachment_btn_remote" class="btn btn-info btn-xs" ><i class="fa fa-plus"></i> 添加附件</a>
                                <span id="attachment_title_remote"></span>
                            </div>
                            <table id="workRemoteControlList"  style="text-align: center;width: 100%;margin-top:10px;"  class="table table-striped table-bordered table-condensed" >
                                <thead>
                                <tr>
                                  <%--  <td>序号</td>--%><td>文件名</td><td>上传人</td><td>上传时间</td><td>操作</td>
                                </tr>
                                </thead>
                                <tbody id="file_attachment_remote">
                                <c:forEach items="${workRemoteControlList}" var="attachment" varStatus="status">
                                    <tr>
                                       <%-- <td>${status.index + 1}</td>--%>
                                        <c:choose>
                                            <c:when test="${fn:containsIgnoreCase(attachment.attachmentName,'jpg')
                                                               or fn:containsIgnoreCase(attachment.attachmentName,'png')
                                                               or fn:containsIgnoreCase(attachment.attachmentName,'gif')
                                                               or fn:containsIgnoreCase(attachment.attachmentName,'bmp')
                                                               or fn:containsIgnoreCase(attachment.attachmentName,'jpeg')}">
                                                <td><img src="${attachment.url}" width="50" height="50" alt="${fns:abbr(attachment.attachmentName,30)}"/></td>
                                            </c:when>
                                            <c:otherwise>
                                                <c:choose>
                                                    <c:when test="${fn:containsIgnoreCase(attachment.attachmentName,'pdf')}">
                                                        <td><a href="javascript:void(0)" onclick="preview('预览','${attachment.url}','80%','80%','1')"><span title="${attachment.attachmentName}">${fns:abbr(attachment.attachmentName,30)}</span></a></td>
                                                    </c:when>
                                                    <c:otherwise>
                                                        <td><a href="javascript:void(0)" onclick="preview('预览','${attachment.url}','80%','80%')"><span title="${attachment.attachmentName}">${fns:abbr(attachment.attachmentName,30)}</span></a></td>

                                                    </c:otherwise>
                                                </c:choose>
                                            </c:otherwise>
                                        </c:choose>
                                        <td>${attachment.attachmentUser}</td>
                                        <td><fmt:formatDate value="${attachment.createDate}" pattern="yyyy-MM-dd"/></td>
                                        <td>
                                            <a href="${ctx}/workfullmanage/workFullManage/downLoadAttach?file=${attachment.url}" class="btn btn-success btn-xs">下载</a>
                                               <c:if test="${attachment.createBy.id eq fns:getUser().id}">
                                                   <a href="javascript:void(0)" onclick="deleteFileFromAliyun(this,'${ctx}/workengineeringproject/workEngineeringProject/deleteFileFromAliyun?attachmentId=${attachment.id}&id=${workEngineeringProject.id}&type=2')" class="btn btn-danger btn-xs" >删除</a>
                                               </c:if>
                                        </td>
                                    </tr>
                                </c:forEach>
                                </tbody>
                            </table>
                        </td>
                    </tr>
                    <tr>
                        <td class="width-15 active"><label class="pull-left">汇总表：</label></td>
                        <td class="width-35" colspan="3">
                            <div style="display: inline-block">
                                <div id="addFile_attachment_summary" style="display: none">
                                    <div>
                                        <span id="fileName_attachment_summary" ></span>
                                        <b><span id="baifenbi_attachment_summary" ></span></b>
                                    </div>
                                    <div>
                                        <div class="progress">
                                            <div id="jindutiao_attachment_summary" class="progress-bar" style="width: 0%" aria-valuenow="0">
                                            </div>
                                        </div>
                                    </div>
                                </div>
                                <input id="attachment_summary" type="file" name="attachment_summary" multiple="multiple" style="display: none;" onChange="if(this.value)summaryInsertTitle(this.value);"/>
                                <a id="attachment_btn_summary" class="btn btn-info btn-xs" ><i class="fa fa-plus"></i> 添加附件</a>
                                <span id="attachment_title_summary"></span>
                            </div>
                            <table id="workSummaryList"  style="text-align: center;width: 100%;margin-top:10px;"  class="table table-striped table-bordered table-condensed" >
                                <thead>
                                <tr>
                                  <%--  <td>序号</td>--%><td>文件名</td><td>上传人</td><td>上传时间</td><td>操作</td>
                                </tr>
                                </thead>
                                <tbody id="file_attachment_summary">
                                <c:forEach items="${workSummaryList}" var="attachment" varStatus="status">
                                    <tr>
                                       <%-- <td>${status.index + 1}</td>--%>
                                        <c:choose>
                                            <c:when test="${fn:containsIgnoreCase(attachment.attachmentName,'jpg')
                                                               or fn:containsIgnoreCase(attachment.attachmentName,'png')
                                                               or fn:containsIgnoreCase(attachment.attachmentName,'gif')
                                                               or fn:containsIgnoreCase(attachment.attachmentName,'bmp')
                                                               or fn:containsIgnoreCase(attachment.attachmentName,'jpeg')}">
                                                <td><img src="${attachment.url}" width="50" height="50" alt="${fns:abbr(attachment.attachmentName,30)}"/></td>
                                            </c:when>
                                            <c:otherwise>
                                                <c:choose>
                                                    <c:when test="${fn:containsIgnoreCase(attachment.attachmentName,'pdf')}">
                                                        <td><a href="javascript:void(0)" onclick="preview('预览','${attachment.url}','80%','80%','1')"><span title="${attachment.attachmentName}">${fns:abbr(attachment.attachmentName,30)}</span></a></td>
                                                    </c:when>
                                                    <c:otherwise>
                                                        <td><a href="javascript:void(0)" onclick="preview('预览','${attachment.url}','80%','80%')"><span title="${attachment.attachmentName}">${fns:abbr(attachment.attachmentName,30)}</span></a></td>

                                                    </c:otherwise>
                                                </c:choose>
                                            </c:otherwise>
                                        </c:choose>
                                        <td>${attachment.attachmentUser}</td>
                                        <td><fmt:formatDate value="${attachment.createDate}" pattern="yyyy-MM-dd"/></td>
                                        <td>
                                            <a href="${ctx}/workfullmanage/workFullManage/downLoadAttach?file=${attachment.url}" class="btn btn-success btn-xs">下载</a>
                                            <c:if test="${attachment.createBy.id eq fns:getUser().id}">
                                                <a href="javascript:void(0)" onclick="deleteFileFromAliyun(this,'${ctx}/workengineeringproject/workEngineeringProject/deleteFileFromAliyun?attachmentId=${attachment.id}&id=${workEngineeringProject.id}&type=2')" class="btn btn-danger btn-xs" >删除</a>
                                            </c:if>
                                        </td>
                                    </tr>
                                </c:forEach>
                                </tbody>
                            </table>

                        </td>
                    </tr>
                    <tr>
                        <td class="width-15 active"><label class="pull-left">其他资料：</label></td>
                        <td class="width-35" colspan="3">
                            <div style="display: inline-block">
                                <div id="addFile_attachment_other" style="display: none">
                                    <div>
                                        <span id="fileName_attachment_other" ></span>
                                        <b><span id="baifenbi_attachment_other" ></span></b>
                                    </div>
                                    <div>
                                        <div class="progress">
                                            <div id="jindutiao_attachment_other" class="progress-bar" style="width: 0%" aria-valuenow="0">
                                            </div>
                                        </div>
                                    </div>
                                </div>
                                <input id="attachment_other" type="file" name="attachment_other" multiple="multiple" style="display: none;" onChange="if(this.value)otherInsertTitle(this.value);"/>
                                <a id="attachment_btn_other" class="btn btn-info btn-xs" ><i class="fa fa-plus"></i> 添加附件</a>
                                <span id="attachment_title_other"></span>
                            </div>
                            <table id="workOtherList"  style="text-align: center;width: 100%;margin-top:10px;"  class="table table-striped table-bordered table-condensed" >
                                <thead>
                                <tr>
                                    <%--<td>序号</td>--%><td>文件名</td><td>上传人</td><td>上传时间</td><td>操作</td>
                                </tr>
                                </thead>
                                <tbody id="file_attachment_other">
                                <c:forEach items="${workOtherList}" var="attachment" varStatus="status">
                                    <tr>
                                      <%--  <td>${status.index + 1}</td>--%>
                                        <c:choose>
                                            <c:when test="${fn:containsIgnoreCase(attachment.attachmentName,'jpg')
                                                               or fn:containsIgnoreCase(attachment.attachmentName,'png')
                                                               or fn:containsIgnoreCase(attachment.attachmentName,'gif')
                                                               or fn:containsIgnoreCase(attachment.attachmentName,'bmp')
                                                               or fn:containsIgnoreCase(attachment.attachmentName,'jpeg')}">
                                                <td><img src="${attachment.url}" width="50" height="50" alt="${fns:abbr(attachment.attachmentName,30)}"/></td>
                                            </c:when>
                                            <c:otherwise>
                                                <c:choose>
                                                    <c:when test="${fn:containsIgnoreCase(attachment.attachmentName,'pdf')}">
                                                        <td><a href="javascript:void(0)" onclick="preview('预览','${attachment.url}','80%','80%','1')"><span title="${attachment.attachmentName}">${fns:abbr(attachment.attachmentName,30)}</span></a></td>
                                                    </c:when>
                                                    <c:otherwise>
                                                        <td><a href="javascript:void(0)" onclick="preview('预览','${attachment.url}','80%','80%')"><span title="${attachment.attachmentName}">${fns:abbr(attachment.attachmentName,30)}</span></a></td>

                                                    </c:otherwise>
                                                </c:choose>
                                            </c:otherwise>
                                        </c:choose>
                                        <td>${attachment.attachmentUser}</td>
                                        <td><fmt:formatDate value="${attachment.createDate}" pattern="yyyy-MM-dd"/></td>
                                        <td>
                                            <a href="${ctx}/workfullmanage/workFullManage/downLoadAttach?file=${attachment.url}" class="btn btn-success btn-xs">下载</a>
                                            <c:if test="${attachment.createBy.id eq fns:getUser().id}">
                                                <a href="javascript:void(0)" onclick="deleteFileFromAliyun(this,'${ctx}/workengineeringproject/workEngineeringProject/deleteFileFromAliyun?attachmentId=${attachment.id}&id=${workEngineeringProject.id}&type=2')" class="btn btn-danger btn-xs" >删除</a>
                                            </c:if>
                                        </td>
                                    </tr>
                                </c:forEach>
                                </tbody>
                            </table>
                        </td>
                    </tr>
                </div>
            </div>

            <div class="col-sm-12 m-t-xs">
                <div class="col-sm-2 gray-bg text-center oneTab">
                    <label>价格信息</label>
                </div>
                <div class="col-sm-10 " >
                    <table class="table table-striped table-bordered table-hover table-condensed dataTables-example">
                        <tbody>
                        <tr>
                            <td class="width-15 active"><label class="pull-right">送审价(元)：</label></td>
                            <td class="width-35">
                                <form:input path="workEngineeringPrice.sendPrice" id="sendPrice" htmlEscape="false"    class="form-control  number" onChange="if(this.value)sendPriceValue(this.value);"/>
                            </td>

                            <td class="width-15 active"><label class="pull-right">审定价(元)：</label></td>
                            <td class="width-35">
                                <form:input path="workEngineeringPrice.approvedPrice" id="approvedPrice" htmlEscape="false"    class="form-control  number" onChange="if(this.value)approvedPriceValue(this.value);"/>
                            </td>
                        </tr>
                        <tr>
                            <td class="width-15 active"><label class="pull-right">合同价(元)：</label></td>
                            <td class="width-35">
                                <form:input path="workEngineeringPrice.contractPrice" id="contractPrice" htmlEscape="false"  class="form-control  number"/>
                            </td>

                            <td class="width-15 active"><label class="pull-right">核增核减额(元)：</label></td>
                            <td class="width-35">
                                <form:input path="workEngineeringPrice.addEditAmount" id="addEditAmount" htmlEscape="false"   readonly="true"   class="form-control  number"/>
                            </td>
                        </tr>
                        <tr>
                            <td class="width-15 active"><label class="pull-right">核增核减率(%)：</label></td>
                            <td class="width-35">
                                <form:input path="workEngineeringPrice.addEditRate" id="addEditRate" htmlEscape="false"  readonly="true"   class="form-control "/>
                            </td>

                            <td class="width-15 active"><label class="pull-right">咨询标的额(元)：</label></td>
                            <td class="width-35">
                                <form:input path="workEngineeringPrice.consultAmount" id="consultAmount"  htmlEscape="false"  readonly="true"  class="form-control  number"/>
                            </td>
                        </tr>
                        <tr>
                            <td class="width-15 active"><label class="pull-right">其中土建造价(元)：</label></td>
                            <td class="width-35">
                                <form:input path="workEngineeringPrice.civilEngineeringCost" id="civilEngineeringCost" htmlEscape="false"    class="form-control  number"/>
                            </td>

                            <td class="width-15 active"><label class="pull-right">其中安装造价(元)：</label></td>
                            <td class="width-35">
                                <form:input path="workEngineeringPrice.installationCost" id="installationCost" htmlEscape="false"    class="form-control  number"/>
                            </td>
                        </tr>
                        </tbody>
                    </table>
                </div>
            </div>
            <div class="col-sm-12 m-t-xs">
                <div class="col-sm-2 gray-bg text-center oneTab">
                    <label>审批</label>
                </div>
                <div class="col-sm-10 " >
                    <table class="table table-striped table-bordered table-hover table-condensed dataTables-example">
                        <tbody>
                        <c:if test="${workEngineeringProject.plan eq 2 }">
                            <tr>
                                <td class="width-15 active"><label class="pull-left">选择退回步骤：<font color="red">*</font></label></td>
                                <td class="width-25" colspan="3">
                                    <input type="radio" value="2" name="reject" checked="checked">文件自校
                                    <c:if test="${not empty workEngineeringProject.proofreadTotal}">
                                        <input type="radio" value="3" name="reject" >项目负责人审核
                                    </c:if>
                                </td>
                            </tr>
                        </c:if>
                        <c:if test="${not empty workEngineeringProject.proofreadTotal && workEngineeringProject.plan eq 2 }">
                            <tr>
                                <td class="width-15 active"><label class="pull-left">校审问题：<font color="red">*</font></label></td>
                                <td class="width-25" colspan="3">
                                    <input type="radio" value="一般问题" name="problem" checked="checked">一般问题
                                    <input type="radio" value="中等问题" name="problem" >中等问题
                                    <input type="radio" value="重大问题" name="problem" >重大问题
                                </td>
                            </tr>
                        </c:if>
                        <tr>
                            <td class="width-15 active"><label class="pull-left">审批意见：</label></td>
                            <td class="width-25" colspan="3">
                                <form:textarea path="act.comment" class="form-control" rows="3" maxlength="20"/>
                            </td>
                        </tr>
                        </tbody>
                    </table>
                </div>
            </div>
            <div class="col-sm-12 m-t-xs">
                <div class="col-sm-2 gray-bg text-center oneTab">
                    <label>合同信息</label>
                </div>
                <div class="col-sm-10 " >
                    <table class="table table-striped table-bordered table-hover table-condensed dataTables-example">
                        <tbody>
                        <c:choose>
                            <c:when test="${workEngineeringProject.isExt eq 1}">
                                <tr>
                                    <td class="width-15 active"><label class="pull-right">合同名称：<font color="red">*</font></label></td>
                                    <td class="width-35" colspan="3">
                                            ${workEngineeringProject.contractInfoName}
                                    </td>
                                </tr>
                            </c:when>
                            <c:otherwise>
                                <tr>
                                    <td class="width-15 active"><label class="pull-right">合同名称：<font color="red">*</font></label></td>
                                    <td class="width-35" colspan="3">
                                            ${workEngineeringProject.contractId.name}
                                    </td>
                                </tr>
                                <tr>
                                    <td class="width-15 active"><label class="pull-right">合同编号：<font color="red">*</font></label></td>
                                    <td class="width-35">
                                            ${workEngineeringProject.contractId.contractNum}
                                    </td>
                                </tr>
                            </c:otherwise>
                        </c:choose>

                        </tbody>
                    </table>
                </div>
            </div>
            <div class="col-sm-12 m-t-xs">
                <div class="col-sm-2 gray-bg text-center oneTab">
                    <label>项目信息</label>
                </div>
                <div class="col-sm-10 " >
                    <table class="table table-striped table-bordered table-hover table-condensed dataTables-example">
                        <tbody>
                        <tr>
                            <td class="width-15 active">项目名称：</td>
                            <td class="width-35" colspan="3">
                                <span title="${workEngineeringProject.projectId.name}">${fns:abbr(workEngineeringProject.projectId.name,30)}</span>
                            </td>
                        </tr>
                        <tr>
                            <td class="width-15 active">项目编号：</td>
                            <td class="width-35">
                                <span title="${workEngineeringProject.projectId.number}">${fns:abbr(workEngineeringProject.projectId.number,30)}</span>
                            </td>
                            <td class="width-15 active">业务类型：</td>
                            <td class="width-35">
                                    ${fns:getMainDictLabel(workEngineeringProject.businessType, 'business_type', '')}
                            </td>

                        </tr>
                        <tr>
                            <td class="width-15 active">预送审金额：</td>
                            <td class="width-35" colspan="3">
                                    ${workEngineeringProject.preTrialAmount}
                            </td>
                        </tr>
                        </tbody>
                    </table>
                </div>
            </div>
            <div class="col-sm-12 m-t-xs">
                <div class="col-sm-2 gray-bg text-center oneTab">
                    <label>客户信息</label>
                </div>
                <div class="col-sm-10 " >
                    <table class="table table-striped table-bordered table-hover table-condensed dataTables-example">
                        <tbody>
                        <tr>
                            <td class="width-15 active"> 客户单位：<font color="red">*</font></td>
                            <td class="width-35" colspan="3">
                                <span title="${workEngineeringProject.workClientInfo.name}">${fns:abbr(workEngineeringProject.workClientInfo.name,30)}</span>
                            </td>
                        </tr>
                        <tr>
                            <td class="width-15 active">联系人姓名：</td>
                            <td class="width-35">
                                    ${workEngineeringProject.workClientLinkman.name}
                            </td>
                            <td class="width-15 active">职务：</td>
                            <td class="width-35">
                                    ${workEngineeringProject.workClientLinkman.position}
                            </td>
                        </tr>
                        <tr>
                            <td class="width-15 active"> 联系方式：</td>
                            <td class="width-35">
                                    ${workEngineeringProject.workClientLinkman.linkPhone}
                            </td>
                            <td class="width-15 active">E-mail：</td>
                            <td class="width-35">
                                    ${workEngineeringProject.workClientLinkman.email}
                            </td>
                        </tr>
                        </tbody>
                    </table>
                </div>
            </div>
            <div class="col-sm-12 m-t-xs">
                <div class="col-sm-2 gray-bg text-center oneTab">
                    <label>人员安排</label>
                </div>
                <div class="col-sm-10 " >
                    <table class="table table-striped table-bordered table-hover table-condensed dataTables-example">
                        <tbody>
                        <tr>
                            <td class="width-15 active">主办公司/部门</br>项目负责人：</td>
                            <td class="width-35">
                                    ${workEngineeringProject.hostOfficeMasterName}
                            </td>
                            <td class="width-15 active">协办公司/部门</br>项目负责人：</td>
                            <td class="width-35">
                                    ${workEngineeringProject.jointlyOfficeMasterName}
                            </td>
                        </tr>
                        <tr>
                            <td class="width-15 active">主办公司/部门</br>项目组成员：</td>
                            <td class="width-35" colspan="3">
                                    ${workEngineeringProject.hostOfficeMemberNames}
                            </td>
                        </tr>
                        <tr>
                            <td class="width-15 active">协办公司/部门</br>项目组成员：</td>
                            <td class="width-35" colspan="3">
                                    ${workEngineeringProject.jointlyOfficeMemberNames}
                            </td>
                        </tr>
                        </tbody>
                    </table>
                </div>
                </form:form>
            </div>
        </div>
    </div>
</div>
</div>
</body>
</html>