<%@ 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()){
                $("#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 basisInsertTitle(tValue){
            $("#attachment_title_basis_div").remove();
            var t1 = tValue.lastIndexOf("\\");
            if(t1 >= 0 && t1 < tValue.length){
                $("#attachment_title_basis").text(tValue.substring(t1+1));
                $("#attachment_title_basis").after("<div id='attachment_title_basis_div' style='float: right'>&nbsp;&nbsp;<span id='attachment_basis_delete' onclick='attachment_basis_del()'style='color: red ; cursor: pointer;'>x</span></div>");
            }
        }
        function remoteInsertTitle(tValue){
            $("#attachment_title_remoteInsert_div").remove();
            var t1 = tValue.lastIndexOf("\\");
            if(t1 >= 0 && t1 < tValue.length){
                $("#attachment_title_remote").text(tValue.substring(t1+1));
                $("#attachment_title_remote").after("<div id='attachment_title_div' style='float: right'>&nbsp;&nbsp;<span id='attachment_remote_delete' onclick='attachment_remote_del()'style='color: red ; cursor: pointer;'>x</span></div>");
            }
        }
        function summaryInsertTitle(tValue){
            $("#attachment_title_summary_div").remove();
            var t1 = tValue.lastIndexOf("\\");
            if(t1 >= 0 && t1 < tValue.length){
                $("#attachment_title_summary").text(tValue.substring(t1+1));
                $("#attachment_title_summary").after("<div id='attachment_title_summary_div' style='float: right'>&nbsp;&nbsp;<span id='attachment_summary_delete' onclick='attachment_summary_del()'style='color: red ; cursor: pointer;'>x</span></div>");
            }
        }
        function otherInsertTitle(tValue){
            $("#attachment_title_other_div").remove();
            var t1 = tValue.lastIndexOf("\\");
            if(t1 >= 0 && t1 < tValue.length){
                $("#attachment_title_other").text(tValue.substring(t1+1));
                $("#attachment_title_other").after("<div id='attachment_title_other_div' style='float: right'>&nbsp;&nbsp;<span id='attachment_other_delete' onclick='attachment_other_del()'style='color: red ; cursor: pointer;'>x</span></div>");
            }
        }
        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();
        }
    </script>
</head>
<body class="hideScroll">
<form:form id="inputForm" modelAttribute="workEngineeringProject" action="${ctx}/projectManagement/projectManagement/save" method="post" enctype="multipart/form-data" class="form-horizontal">
<form:hidden path="id"/>
<form:hidden path="name"/>
<form:hidden path="plan"/>
<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 " >
                    <table class="table table-striped table-bordered table-hover table-condensed dataTables-example">
                        <tbody>
                        <tr>
                            <td class="width-35" colspan="4">
                                <label class="pull-left">报告文件：</label>
                                <table id="workReportList"  style="text-align: center;width: 100%;margin-top:10px;"  class="table table-striped table-bordered table-condensed" >
                                    <tr>
                                        <%--<td>序号</td>--%><td>文件名</td><td>上传人</td><td>上传时间</td><td>操作</td>
                                    </tr>
                                    <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,'jpeg')}">
                                                        <td><img src="${attachment.url}" width="50" height="50" alt="${attachment.attachmentName}"/></td>
                                                    </c:when>
                                                    <c:otherwise>
                                                        <c:choose>
                                                            <c:when test="${fn:containsIgnoreCase(attachment.attachmentName,'pdf')}">
                                                                <td><a href="${attachment.url}">${attachment.attachmentName}</a></td>
                                                            </c:when>
                                                            <c:otherwise>
                                                                <td><a href="javascript:void(0)" onclick="openDialogViewPre('预览','${ctx}/previewController/previewUrl?fileUrl=${attachment.url}','80%','80%')">${attachment.attachmentName}</a></td>
                                                            </c:otherwise>
                                                        </c:choose>
                                                    </c:otherwise>
                                                </c:choose>--%>
                                            <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="${attachment.attachmentName}"/></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')">${attachment.attachmentName}</a></td>
                                                        </c:when>
                                                        <c:otherwise>
                                                            <%--<td><a href="javascript:void(0)" onclick="POBrowser.openWindow('${ctx}/previewController/previewUrl?fileUrl=${workClientAttachment.url}','80%','80%')">${workClientAttachment.attachmentName}</a></td>--%>
                                                            <%--<td><a href="javascript:void(0)" onclick="POBrowser.openWindow('/ruihua/openword','80%','80%')">${workClientAttachment.attachmentName}</a></td>--%>
                                                            <td><a href="javascript:void(0)" onclick="preview('预览','${attachment.url}','80%','80%')">${attachment.attachmentName}</a></td>
                                                            <%--<td><a href="javascript:void(0)" onclick="POBrowser.openWindow('/ruihua/openexcel','80%','80%')">${workClientAttachment.attachmentName}</a></td>--%>
                                                            <%--<td><a href="javascript:void(0)" onclick="POBrowser.openWindow('/ruihua/openppt','80%','80%')">${workClientAttachment.attachmentName}</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>
                                            </td>
                                        </tr>
                                    </c:forEach>
                                </table>
                            </td>
                        </tr>
                        <tr>
                            <td class="width-35" colspan="4">
                                <label class="pull-left">依据性资料：</label>
                                <table id="workBasisInformationList"  style="text-align: center;width: 100%;margin-top:10px;"  class="table table-striped table-bordered table-condensed" >
                                    <tr>
                                       <%-- <td>序号</td>--%><td>文件名</td><td>上传人</td><td>上传时间</td><td>操作</td>
                                    </tr>
                                    <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,'jpeg')}">
                                                         <td><img src="${attachment.url}" width="50" height="50" alt="${attachment.attachmentName}"/></td>
                                                     </c:when>
                                                     <c:otherwise>
                                                         <c:choose>
                                                             <c:when test="${fn:containsIgnoreCase(attachment.attachmentName,'pdf')}">
                                                                 <td><a href="${attachment.url}">${attachment.attachmentName}</a></td>
                                                             </c:when>
                                                             <c:otherwise>
                                                                 <td><a href="javascript:void(0)" onclick="openDialogViewPre('预览','${ctx}/previewController/previewUrl?fileUrl=${attachment.url}','80%','80%')">${attachment.attachmentName}</a></td>
                                                             </c:otherwise>
                                                         </c:choose>
                                                     </c:otherwise>
                                                 </c:choose>--%>
                                            <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="${attachment.attachmentName}"/></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')">${attachment.attachmentName}</a></td>
                                                        </c:when>
                                                        <c:otherwise>
                                                            <%--<td><a href="javascript:void(0)" onclick="POBrowser.openWindow('${ctx}/previewController/previewUrl?fileUrl=${workClientAttachment.url}','80%','80%')">${workClientAttachment.attachmentName}</a></td>--%>
                                                            <%--<td><a href="javascript:void(0)" onclick="POBrowser.openWindow('/ruihua/openword','80%','80%')">${workClientAttachment.attachmentName}</a></td>--%>
                                                            <td><a href="javascript:void(0)" onclick="preview('预览','${attachment.url}','80%','80%')">${attachment.attachmentName}</a></td>
                                                            <%--<td><a href="javascript:void(0)" onclick="POBrowser.openWindow('/ruihua/openexcel','80%','80%')">${workClientAttachment.attachmentName}</a></td>--%>
                                                            <%--<td><a href="javascript:void(0)" onclick="POBrowser.openWindow('/ruihua/openppt','80%','80%')">${workClientAttachment.attachmentName}</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>
                                            </td>
                                        </tr>
                                    </c:forEach>
                                </table>
                            </td>
                        </tr>
                        <tr>
                            <td class="width-35" colspan="4">
                                <label class="pull-left">过程控制资料：</label>
                                <table id="workRemoteControlList"  style="text-align: center;width: 100%;margin-top:10px;"  class="table table-striped table-bordered table-condensed" >
                                    <tr>
                                        <%--<td>序号</td>--%><td>文件名</td><td>上传人</td><td>上传时间</td><td>操作</td>
                                    </tr>
                                    <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,'jpeg')}">
                                                        <td><img src="${attachment.url}" width="50" height="50" alt="${attachment.attachmentName}"/></td>
                                                    </c:when>
                                                    <c:otherwise>
                                                        <c:choose>
                                                            <c:when test="${fn:containsIgnoreCase(attachment.attachmentName,'pdf')}">
                                                                <td><a href="${attachment.url}">${attachment.attachmentName}</a></td>
                                                            </c:when>
                                                            <c:otherwise>
                                                                <td><a href="javascript:void(0)" onclick="openDialogViewPre('预览','${ctx}/previewController/previewUrl?fileUrl=${attachment.url}','80%','80%')">${attachment.attachmentName}</a></td>
                                                            </c:otherwise>
                                                        </c:choose>
                                                    </c:otherwise>
                                                </c:choose>--%>
                                            <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="${attachment.attachmentName}"/></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')">${attachment.attachmentName}</a></td>
                                                        </c:when>
                                                        <c:otherwise>
                                                            <%--<td><a href="javascript:void(0)" onclick="POBrowser.openWindow('${ctx}/previewController/previewUrl?fileUrl=${workClientAttachment.url}','80%','80%')">${workClientAttachment.attachmentName}</a></td>--%>
                                                            <%--<td><a href="javascript:void(0)" onclick="POBrowser.openWindow('/ruihua/openword','80%','80%')">${workClientAttachment.attachmentName}</a></td>--%>
                                                            <td><a href="javascript:void(0)" onclick="preview('预览','${attachment.url}','80%','80%')">${attachment.attachmentName}</a></td>
                                                            <%--<td><a href="javascript:void(0)" onclick="POBrowser.openWindow('/ruihua/openexcel','80%','80%')">${workClientAttachment.attachmentName}</a></td>--%>
                                                            <%--<td><a href="javascript:void(0)" onclick="POBrowser.openWindow('/ruihua/openppt','80%','80%')">${workClientAttachment.attachmentName}</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>
                                            </td>
                                        </tr>
                                    </c:forEach>
                                </table>
                            </td>
                        </tr>
                        <tr>
                            <td class="width-35" colspan="4">
                                <label class="pull-left">汇总表：</label>
                                <table id="workSummaryList"  style="text-align: center;width: 100%;margin-top:10px;"  class="table table-striped table-bordered table-condensed" >
                                    <tr>
                                       <%-- <td>序号</td>--%><td>文件名</td><td>上传人</td><td>上传时间</td><td>操作</td>
                                    </tr>
                                    <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,'jpeg')}">
                                                        <td><img src="${attachment.url}" width="50" height="50" alt="${attachment.attachmentName}"/></td>
                                                    </c:when>
                                                    <c:otherwise>
                                                        <c:choose>
                                                            <c:when test="${fn:containsIgnoreCase(attachment.attachmentName,'pdf')}">
                                                                <td><a href="${attachment.url}">${attachment.attachmentName}</a></td>
                                                            </c:when>
                                                            <c:otherwise>
                                                                <td><a href="javascript:void(0)" onclick="openDialogViewPre('预览','${ctx}/previewController/previewUrl?fileUrl=${attachment.url}','80%','80%')">${attachment.attachmentName}</a></td>
                                                            </c:otherwise>
                                                        </c:choose>
                                                    </c:otherwise>
                                                </c:choose>--%>
                                            <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="${attachment.attachmentName}"/></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')">${attachment.attachmentName}</a></td>
                                                        </c:when>
                                                        <c:otherwise>
                                                            <%--<td><a href="javascript:void(0)" onclick="POBrowser.openWindow('${ctx}/previewController/previewUrl?fileUrl=${workClientAttachment.url}','80%','80%')">${workClientAttachment.attachmentName}</a></td>--%>
                                                            <%--<td><a href="javascript:void(0)" onclick="POBrowser.openWindow('/ruihua/openword','80%','80%')">${workClientAttachment.attachmentName}</a></td>--%>
                                                            <td><a href="javascript:void(0)" onclick="preview('预览','${attachment.url}','80%','80%')">${attachment.attachmentName}</a></td>
                                                            <%--<td><a href="javascript:void(0)" onclick="POBrowser.openWindow('/ruihua/openexcel','80%','80%')">${workClientAttachment.attachmentName}</a></td>--%>
                                                            <%--<td><a href="javascript:void(0)" onclick="POBrowser.openWindow('/ruihua/openppt','80%','80%')">${workClientAttachment.attachmentName}</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>
                                                <a href="javascript:void(0)" onclick="deleteFileFromAliyun(this,'${ctx}/workengineeringproject/workEngineeringProject/deleteFileFromAliyun?attachmentId=${attachment.id}&id=${workEngineeringProject.id}&type=2')" class="btn btn-primary btn-xs" >删除</a>
                                            </td>
                                        </tr>
                                    </c:forEach>
                                </table>
                            </td>
                        </tr>
                        <tr>
                            <td class="width-35" colspan="4">
                                <label class="pull-left">其他资料：</label>
                                <table id="workOtherList"  style="text-align: center;width: 100%;margin-top:10px;"  class="table table-striped table-bordered table-condensed" >
                                    <tr>
                                        <%--<td>序号</td>--%><td>文件名</td><td>上传人</td><td>上传时间</td><td>操作</td>
                                    </tr>
                                    <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,'jpeg')}">
                                                         <td><img src="${attachment.url}" width="50" height="50" alt="${attachment.attachmentName}"/></td>
                                                     </c:when>
                                                     <c:otherwise>
                                                         <c:choose>
                                                             <c:when test="${fn:containsIgnoreCase(attachment.attachmentName,'pdf')}">
                                                                 <td><a href="${attachment.url}">${attachment.attachmentName}</a></td>
                                                             </c:when>
                                                             <c:otherwise>
                                                                 <td><a href="javascript:void(0)" onclick="openDialogViewPre('预览','${ctx}/previewController/previewUrl?fileUrl=${attachment.url}','80%','80%')">${attachment.attachmentName}</a></td>
                                                             </c:otherwise>
                                                         </c:choose>
                                                     </c:otherwise>
                                                 </c:choose>--%>
                                            <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="${attachment.attachmentName}"/></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')">${attachment.attachmentName}</a></td>
                                                        </c:when>
                                                        <c:otherwise>
                                                            <%--<td><a href="javascript:void(0)" onclick="POBrowser.openWindow('${ctx}/previewController/previewUrl?fileUrl=${workClientAttachment.url}','80%','80%')">${workClientAttachment.attachmentName}</a></td>--%>
                                                            <%--<td><a href="javascript:void(0)" onclick="POBrowser.openWindow('/ruihua/openword','80%','80%')">${workClientAttachment.attachmentName}</a></td>--%>
                                                            <td><a href="javascript:void(0)" onclick="preview('预览','${attachment.url}','80%','80%')">${attachment.attachmentName}</a></td>
                                                            <%--<td><a href="javascript:void(0)" onclick="POBrowser.openWindow('/ruihua/openexcel','80%','80%')">${workClientAttachment.attachmentName}</a></td>--%>
                                                            <%--<td><a href="javascript:void(0)" onclick="POBrowser.openWindow('/ruihua/openppt','80%','80%')">${workClientAttachment.attachmentName}</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>
                                            </td>
                                        </tr>
                                    </c:forEach>
                                </table>
                            </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"><label class="pull-right">送审价(元)：</label></td>
                            <td class="width-35">
                                    ${workEngineeringProject.workEngineeringPrice.sendPrice}
                            </td>

                            <td class="width-15 active"><label class="pull-right">审定价(元)：</label></td>
                            <td class="width-35">
                                    ${workEngineeringProject.workEngineeringPrice.approvedPrice}
                            </td>
                        </tr>
                        <tr>
                            <td class="width-15 active"><label class="pull-right">合同价(元)：</label></td>
                            <td class="width-35">
                                    ${workEngineeringProject.workEngineeringPrice.contractPrice}
                            </td>

                            <td class="width-15 active"><label class="pull-right">核增核减额(元)：</label></td>
                            <td class="width-35">
                                    ${workEngineeringProject.workEngineeringPrice.addEditAmount}
                            </td>
                        </tr>
                        <tr>
                            <td class="width-15 active"><label class="pull-right">核增核减率(元)：</label></td>
                            <td class="width-35">
                                    ${workEngineeringProject.workEngineeringPrice.addEditRate}
                            </td>

                            <td class="width-15 active"><label class="pull-right">咨询标的额(元)：</label></td>
                            <td class="width-35">
                                    ${workEngineeringProject.workEngineeringPrice.consultAmount}
                            </td>
                        </tr>
                        <tr>
                            <td class="width-15 active"><label class="pull-right">其中土建造价(元)：</label></td>
                            <td class="width-35">
                                    ${workEngineeringProject.workEngineeringPrice.civilEngineeringCost}
                            </td>

                            <td class="width-15 active"><label class="pull-right">其中安装造价(元)：</label></td>
                            <td class="width-35">
                                    ${workEngineeringProject.workEngineeringPrice.installationCost}
                            </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"><label class="pull-right">预送审金额：</label></td>
                            <td class="width-35">
                                    ${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"><label class="pull-right">客户单位：<font color="red">*</font></label></td>
                            <td class="width-35" colspan="3">
                                    ${workEngineeringProject.workClientInfo.name}
                            </td>
                        </tr>
                        <tr>
                            <td class="width-15 active"><label class="pull-right">联系人姓名：</label></td>
                            <td class="width-35">
                                    ${workEngineeringProject.workClientLinkman.name}
                            </td>
                            <td class="width-15 active"><label class="pull-right">职务：</label></td>
                            <td class="width-35">
                                    ${workEngineeringProject.workClientLinkman.position}
                            </td>
                        </tr>
                        <tr>
                            <td class="width-15 active"><label class="pull-right"> 联系方式：</label></td>
                            <td class="width-35">
                                    ${workEngineeringProject.workClientLinkman.linkPhone}
                            </td>
                            <td class="width-15 active"><label class="pull-right">E-mail：</label></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"><label class="pull-right">主办公司/部门</br>项目负责人：<font color="red">*</font></label></td>
                            <td class="width-35">
                                    ${workEngineeringProject.hostOfficeMasterName}
                            </td>
                            <td class="width-15 active"><label class="pull-right">协办公司/部门</br>项目负责人：</label></td>
                            <td class="width-35">
                                    ${workEngineeringProject.jointlyOfficeMasterName}
                            </td>
                        </tr>
                        <tr>
                            <td class="width-15 active"><label class="pull-right">主办公司/部门</br>项目组成员：</label></td>
                            <td class="width-35" colspan="3">
                                    ${workEngineeringProject.hostOfficeMemberNames}
                            </td>
                        </tr>
                        <tr>
                            <td class="width-15 active"><label class="pull-right">协办公司/部门</br>项目组成员：</label></td>
                            <td class="width-35" colspan="3">
                                    ${workEngineeringProject.jointlyOfficeMemberNames}
                            </td>
                        </tr>
                        </tbody>
                    </table>
                </div>
                </form:form>
            </div>
        </div>
    </div>
</div>
</div>
</body>
</html>