|
@@ -0,0 +1,451 @@
|
|
|
|
+<%@ page contentType="text/html;charset=UTF-8" %>
|
|
|
|
+<%@ include file="/webpage/include/taglib.jsp"%>
|
|
|
|
+<html>
|
|
|
|
+<head>
|
|
|
|
+ <title>报告签发</title>
|
|
|
|
+ <meta name="decorator" content="default"/>
|
|
|
|
+ <%@include file="/webpage/include/treetable.jsp" %>
|
|
|
|
+ <script type="text/javascript" src="${ctxStatic}/layui/layui.js"></script>
|
|
|
|
+ <link rel='stylesheet' type="text/css" href="${ctxStatic}/layui/css/layui.css"/>
|
|
|
|
+ <script type="text/javascript">
|
|
|
|
+
|
|
|
|
+ $(document).ready(function() {
|
|
|
|
+ var achievementType=$("#achievementType").val();
|
|
|
|
+ if (achievementType==null || achievementType==""){
|
|
|
|
+
|
|
|
|
+ }
|
|
|
|
+ $("#upTable").treeTable({expandLevel : 5},{ expandable: true });
|
|
|
|
+ $("#gistdata_upTable").treeTable({expandLevel : 5},{ expandable: true });
|
|
|
|
+ $("#upTable_other").treeTable({expandLevel : 5},{ expandable: true });
|
|
|
|
+ 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);
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ });
|
|
|
|
+ $("#attachment_btn").click(function () {
|
|
|
|
+ $("#attachment_file").click();
|
|
|
|
+ });
|
|
|
|
+ $("#gistdata_btn").click(function () {
|
|
|
|
+ $("#gistdata_file").click();
|
|
|
|
+ });
|
|
|
|
+ $("#other_btn").click(function () {
|
|
|
|
+ $("#other_file").click();
|
|
|
|
+ });
|
|
|
|
+ if ("${projectReportData.contractCategory}" !=null){
|
|
|
|
+ if("${projectReportData.contractCategory}"=='1'){
|
|
|
|
+ $("#contractFee").parent().parent().hide();
|
|
|
|
+ $("#contractRate").parent().parent().show();
|
|
|
|
+ }else if("${projectReportData.contractCategory}"=='0'){
|
|
|
|
+ $("#contractFee").parent().parent().show();
|
|
|
|
+ $("#contractRate").parent().parent().hide();
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ layui.use(['form', 'layer'], function () {
|
|
|
|
+ var form = layui.form;
|
|
|
|
+ layui.form.on('radio(jine)', function(data){
|
|
|
|
+ var span=data.value;
|
|
|
|
+ if(span==1){
|
|
|
|
+ $("#contractFee").parent().parent().hide();
|
|
|
|
+ $("#contractRate").parent().parent().show();
|
|
|
|
+ }else{
|
|
|
|
+ $("#contractFee").parent().parent().show();
|
|
|
|
+ $("#contractRate").parent().parent().hide();
|
|
|
|
+ }
|
|
|
|
+ })
|
|
|
|
+ })
|
|
|
|
+ });
|
|
|
|
+
|
|
|
|
+ function openDialogre(title,url,width,height,target,buttons) {
|
|
|
|
+ var status = $("#status").val();
|
|
|
|
+ if(5 != status){
|
|
|
|
+ parent.layer.msg("报告未审批完成,无法下载!", {icon: 5});
|
|
|
|
+ return false;
|
|
|
|
+ }
|
|
|
|
+ if (navigator.userAgent.match(/(iPhone|iPod|Android|ios)/i)) {//如果是移动端,就使用自适应大小弹窗
|
|
|
|
+ width = 'auto';
|
|
|
|
+ height = 'auto';
|
|
|
|
+ } else {//如果是PC端,根据用户设置的width和height显示。
|
|
|
|
+
|
|
|
|
+ }
|
|
|
|
+ var split = buttons.split(",");
|
|
|
|
+ top.layer.open({
|
|
|
|
+ type: 2,
|
|
|
|
+ area: [width, height],
|
|
|
|
+ title: title,
|
|
|
|
+ maxmin: true, //开启最大化最小化按钮
|
|
|
|
+ skin: 'three-btns',
|
|
|
|
+ content: url,
|
|
|
|
+ btn: split,
|
|
|
|
+ btn1: function(index, layero){
|
|
|
|
+ var body = top.layer.getChildFrame('body', index);
|
|
|
|
+ var iframeWin = layero.find('iframe')[0]; //得到iframe页的窗口对象,执行iframe页的方法:iframeWin.method();
|
|
|
|
+ var inputForm = body.find('#inputForm');
|
|
|
|
+ var top_iframe;
|
|
|
|
+ if(target){
|
|
|
|
+ top_iframe = target;//如果指定了iframe,则在改frame中跳转
|
|
|
|
+ }else{
|
|
|
|
+ top_iframe = top.getActiveTab().attr("name");//获取当前active的tab的iframe
|
|
|
|
+ }
|
|
|
|
+ inputForm.attr("target",top_iframe);//表单提交成功后,从服务器返回的url在当前tab中展示
|
|
|
|
+ if(iframeWin.contentWindow.doSubmit(1) ){
|
|
|
|
+ // top.layer.close(index);//关闭对话框。
|
|
|
|
+ setTimeout(function(){top.layer.close(index)}, 100);//延时0.1秒,对应360 7.1版本bug
|
|
|
|
+ }
|
|
|
|
+ },
|
|
|
|
+ btn2:function(index,layero){
|
|
|
|
+ if(split.length==2){return}
|
|
|
|
+ var body = top.layer.getChildFrame('body', index);
|
|
|
|
+ var iframeWin = layero.find('iframe')[0]; //得到iframe页的窗口对象,执行iframe页的方法:iframeWin.method();
|
|
|
|
+ var inputForm = body.find('#inputForm');
|
|
|
|
+ var top_iframe;
|
|
|
|
+ if(target){
|
|
|
|
+ top_iframe = target;//如果指定了iframe,则在改frame中跳转
|
|
|
|
+ }else{
|
|
|
|
+ top_iframe = top.getActiveTab().attr("name");//获取当前active的tab的iframe
|
|
|
|
+ }
|
|
|
|
+ inputForm.attr("target",top_iframe);//表单提交成功后,从服务器返回的url在当前tab中展示
|
|
|
|
+ if(iframeWin.contentWindow.doSubmit(2) ){
|
|
|
|
+ // top.layer.close(index);//关闭对话框。
|
|
|
|
+ setTimeout(function(){top.layer.close(index)}, 100);//延时0.1秒,对应360 7.1版本bug
|
|
|
|
+ }else {
|
|
|
|
+ return false;
|
|
|
|
+ }
|
|
|
|
+ },
|
|
|
|
+ btn3: function (index) {
|
|
|
|
+ }
|
|
|
|
+ });
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ function readOpenInfo(value) {
|
|
|
|
+ layer.open({
|
|
|
|
+ title: '意见',
|
|
|
|
+ btn: ['关闭'],
|
|
|
|
+ content: value
|
|
|
|
+ });
|
|
|
|
+ }
|
|
|
|
+ </script>
|
|
|
|
+</head>
|
|
|
|
+
|
|
|
|
+<body>
|
|
|
|
+<div class="single-form">
|
|
|
|
+<%-- <c:if test="${reportedView==1}">--%>
|
|
|
|
+<%-- <div class="list-form-tab contentShadow shadowLTR" id="tabDiv">--%>
|
|
|
|
+<%-- <ul class="list-tabs" >--%>
|
|
|
|
+<%-- <li class="active"><a href="${ctx}/ruralProject/ruralProjectMessage/modify?projectId=${projectId}&view=view&reportedId=${reportedId}">报告详情</a></li>--%>
|
|
|
|
+<%-- <li><a href="${ctx}/ruralProject/ruralProjectMessage/getReportedView?id=${reportedId}&projectId=${projectId}">上报信息详情</a></li>--%>
|
|
|
|
+<%-- </ul>--%>
|
|
|
|
+<%-- </div>--%>
|
|
|
|
+ <div class="tapfixed">
|
|
|
|
+ <div class="list-form-tab contentShadow shadowLTR" id="tabDiv">
|
|
|
|
+ <ul class="list-tabs" >
|
|
|
|
+ <li><a href="${ctx}/ruralProject/ruralProjectView/view?id=${projectRecords.id}">项目详情</a></li>
|
|
|
|
+ <li><a href="${ctx}/ruralProject/ruralProjectView/list?parentProId=${projectRecords.id}&projectType=${projectRecords.projectType}">子项目列表</a></li>
|
|
|
|
+ <li><a href="${ctx}/ruralProject/ruralProjectView/workContractView?id=${projectRecords.workContractInfo.id}&projectId=${projectRecords.id}">客户合同详情</a></li>
|
|
|
|
+ <li><a href="${ctx}/ruralProject/ruralProjectView/planView?id=${projectRecords.id}">项目计划信息</a></li>
|
|
|
|
+ <li><a href="${ctx}/ruralProject/ruralProjectView/getReportedView?projectId=${projectRecords.id}&id=${reportedId}">上报信息</a></li>
|
|
|
|
+ <li><a href="${ctx}/ruralProject/ruralProjectView/modify?projectId=${projectRecords.id}">报告信息</a></li>
|
|
|
|
+ <li class="active"><a href="${ctx}/ruralProject/ruralProjectView/reportIssue?projectId=${projectRecords.id}">报告签发信息</a></li>
|
|
|
|
+ <li><a href="${ctx}/ruralProject/ruralProjectView/getAccessoryView?id=${projectRecords.id}">档案信息</a></li>
|
|
|
|
+ <li><a href="${ctx}/ruralProject/ruralProjectView/formRecordModify?id=${projectRecords.id}">线上归档信息</a></li>
|
|
|
|
+ <li><a href="${ctx}/ruralProject/ruralProjectView/searchview?id=${projectRecords.id}">选查信息详情</a></li>
|
|
|
|
+
|
|
|
|
+ </ul>
|
|
|
|
+<%-- <ul class="list-tabs" >--%>
|
|
|
|
+<%-- <li><a href="${ctx}/ruralProject/ruralProjectView/view?id=${projectRecords.id}">项目详情</a></li>--%>
|
|
|
|
+<%-- <li><a href="${ctx}/ruralProject/ruralProjectView/list?parentProId=${projectRecords.id}&projectType=${projectRecords.projectType}">子项目列表</a></li>--%>
|
|
|
|
+<%-- <li><a href="${ctx}/ruralProject/ruralProjectView/workContractView?id=${projectRecords.workContractInfo.id}&projectId=${projectRecords.id}">合同详情</a></li>--%>
|
|
|
|
+<%-- <li class="active"><a href="${ctx}/ruralProject/ruralProjectView/modify?projectId=${projectRecords.id}&projectId=${projectRecords.id}">报告信息</a></li>--%>
|
|
|
|
+<%-- <c:if test="${reportedId!=null}">--%>
|
|
|
|
+<%-- <li><a href="${ctx}/ruralProject/ruralProjectView/getReportedView?projectId=${projectRecords.id}&id=${projectcontentinfo.id}">上报信息</a></li>--%>
|
|
|
|
+<%-- </c:if>--%>
|
|
|
|
+<%-- <li><a href="${ctx}/ruralProject/ruralProjectView/planView?id=${projectRecords.id}">项目计划信息</a></li>--%>
|
|
|
|
+<%-- <li><a href="${ctx}/ruralProject/ruralProjectView/getAccessoryView?id=${projectRecords.id}">附件信息</a></li>--%>
|
|
|
|
+<%-- </ul>--%>
|
|
|
|
+ </div>
|
|
|
|
+ </div>
|
|
|
|
+<%-- </c:if>--%>
|
|
|
|
+ <c:if test="${projectReportDataTwo.processInstanceId==null}">
|
|
|
|
+ <div class="topMar">
|
|
|
|
+ <h2>暂无报告签发信息</h2>
|
|
|
|
+ </div>
|
|
|
|
+ </c:if>
|
|
|
|
+ <c:if test="${projectReportDataTwo.processInstanceId!=null}">
|
|
|
|
+ <div class="container${container} view-form" style="margin-top: 40px;">
|
|
|
|
+ <form:form id="inputForm" modelAttribute="projectcontentinfo" method="post" class="form-horizontal layui-form">
|
|
|
|
+ <input type="hidden" id="status" value="${projectReportData.status}">
|
|
|
|
+ <div class="form-group layui-row first lw12">
|
|
|
|
+ <div class="form-group-label">
|
|
|
|
+ <div style="float: right"> <a href="${ctx}/workfullmanage/workFullManage/downloadMassControl1?id=${projectReportData.id}" onclick="return confirmx('确认要下载签发流程单吗?', this.href)" class="layui-btn layui-btn-sm" ><i class="fa fa-file-excel-o"></i> 下载签发流程单</a></div>
|
|
|
|
+<%-- <div style="float: right"> <a href="javascript:void(0)" style='background-color: #FFB800' onclick="openDialogre('下载模板', '${ctx}/ruralProject/ruralProjectMessage/skipDownloadFtl?id=${projectRecords.id}','35%', '35%','','下载,关闭')" class="layui-btn layui-btn-sm" ><i class="fa fa-file-excel-o"></i> 下载模板</a></div>--%>
|
|
|
|
+ <h2>质量复核信息</h2>
|
|
|
|
+ </div>
|
|
|
|
+ <div class="layui-item layui-col-sm6">
|
|
|
|
+ <label class="layui-form-label">送审价(元):</label>
|
|
|
|
+ <div class="layui-input-block with-icon">
|
|
|
|
+ <form:input id="reviewFee" path="projectReportData.reviewFee" cssStyle="background-color: #f1f1f1" htmlEscape="false" class="form-control layui-input" readonly="true"/>
|
|
|
|
+ </div>
|
|
|
|
+ </div>
|
|
|
|
+ <div class="layui-item layui-col-sm6">
|
|
|
|
+ <label class="layui-form-label">审定价(元):</label>
|
|
|
|
+ <div class="layui-input-block with-icon">
|
|
|
|
+ <form:input id="approvalFee" cssStyle="background-color: #f1f1f1" path="projectReportData.approvalFee" htmlEscape="false" class="form-control layui-input" readonly="true"/>
|
|
|
|
+ </div>
|
|
|
|
+ </div>
|
|
|
|
+ <div class="layui-item layui-col-sm6">
|
|
|
|
+ <label class="layui-form-label">合同类别:</label>
|
|
|
|
+ <div class="layui-input-block with-icon">
|
|
|
|
+ <input type="radio" disabled title="金额合同" lay-filter="jine" name="projectReportData.contractCategory" id="jine" value="0" checked <c:if test="${projectReportData.contractCategory=='0'}">checked</c:if>>
|
|
|
|
+ <input type="radio" disabled title="费率合同" lay-filter="jine" name="projectReportData.contractCategory" id="jine1" value="1" <c:if test="${projectReportData.contractCategory=='1'}">checked</c:if>>
|
|
|
|
+ </div>
|
|
|
|
+ </div>
|
|
|
|
+ <div class="layui-item layui-col-sm6">
|
|
|
|
+ <label class="layui-form-label">合同价(元):</label>
|
|
|
|
+ <div class="layui-input-block with-icon">
|
|
|
|
+ <form:input id="contractFee" cssStyle="background-color: #f1f1f1" path="projectReportData.contractFee" htmlEscape="false" class="form-control layui-input" readonly="true"/>
|
|
|
|
+ </div>
|
|
|
|
+ </div>
|
|
|
|
+ <div class="layui-item layui-col-sm6" style="display: none;">
|
|
|
|
+ <label class="layui-form-label">费率(%):</label>
|
|
|
|
+ <div class="layui-input-block with-icon">
|
|
|
|
+ <form:input placeholder="请输入合同费率" id="contractRate" cssStyle="background-color: #f1f1f1" path="projectReportData.contractRate" htmlEscape="false" class="form-control layui-input number" readonly="true"/>
|
|
|
|
+ </div>
|
|
|
|
+ </div>
|
|
|
|
+ <div class="layui-item layui-col-sm6">
|
|
|
|
+ <label class="layui-form-label">核增核减额(元):</label>
|
|
|
|
+ <div class="layui-input-block with-icon">
|
|
|
|
+ <form:input id="verifyFee" cssStyle="background-color: #f1f1f1" path="projectReportData.verifyFee" htmlEscape="false" class="form-control layui-input" readonly="true"/>
|
|
|
|
+ </div>
|
|
|
|
+ </div>
|
|
|
|
+ <div class="layui-item layui-col-sm6">
|
|
|
|
+ <label class="layui-form-label">核增核减率(%):</label>
|
|
|
|
+ <div class="layui-input-block with-icon">
|
|
|
|
+ <form:input id="verifyRate" cssStyle="background-color: #f1f1f1" path="projectReportData.verifyRate" htmlEscape="false" class="form-control layui-input" readonly="true"/>
|
|
|
|
+ </div>
|
|
|
|
+ </div>
|
|
|
|
+ <div class="layui-item layui-col-sm6">
|
|
|
|
+ <label class="layui-form-label">咨询标的额(元):</label>
|
|
|
|
+ <div class="layui-input-block with-icon">
|
|
|
|
+ <form:input id="consultFee" cssStyle="background-color: #f1f1f1" path="projectReportData.consultFee" htmlEscape="false" class="form-control layui-input" readonly="true"/>
|
|
|
|
+ </div>
|
|
|
|
+ </div>
|
|
|
|
+ <div class="layui-item layui-col-sm6">
|
|
|
|
+ <label class="layui-form-label">土建造价(元):</label>
|
|
|
|
+ <div class="layui-input-block with-icon">
|
|
|
|
+ <form:input id="buildingFee" cssStyle="background-color: #f1f1f1" path="projectReportData.buildingFee" htmlEscape="false" class="form-control layui-input" readonly="true"/>
|
|
|
|
+ </div>
|
|
|
|
+ </div>
|
|
|
|
+ <div class="layui-item layui-col-sm6">
|
|
|
|
+ <label class="layui-form-label">安装造价(元):</label>
|
|
|
|
+ <div class="layui-input-block with-icon">
|
|
|
|
+ <form:input id="installFee" cssStyle="background-color: #f1f1f1" path="projectReportData.installFee" htmlEscape="false" class="form-control layui-input" readonly="true"/>
|
|
|
|
+ </div>
|
|
|
|
+ </div>
|
|
|
|
+ <div class="layui-item layui-col-sm6">
|
|
|
|
+ <label class="layui-form-label">土建比例(%):</label>
|
|
|
|
+ <div class="layui-input-block with-icon">
|
|
|
|
+ <form:input id="buildingRate" cssStyle="background-color: #f1f1f1" path="projectReportData.buildingRate" htmlEscape="false" class="form-control layui-input number" readonly="true"/>
|
|
|
|
+ </div>
|
|
|
|
+ </div>
|
|
|
|
+ <div class="layui-item layui-col-sm6">
|
|
|
|
+ <label class="layui-form-label">安装比例(%):</label>
|
|
|
|
+ <div class="layui-input-block with-icon">
|
|
|
|
+ <form:input id="installRate" cssStyle="background-color: #f1f1f1" path="projectReportData.installRate" htmlEscape="false" class="form-control layui-input number" readonly="true"/>
|
|
|
|
+ </div>
|
|
|
|
+ </div>
|
|
|
|
+
|
|
|
|
+ <div class="layui-item layui-col-sm6">
|
|
|
|
+ <label class="layui-form-label">工作开始日期:</label>
|
|
|
|
+ <div class="layui-input-block with-icon">
|
|
|
|
+ <input class=" form-control layui-input" style="background-color: #f1f1f1" readonly="readonly" id="startDate" value="<fmt:formatDate value="${projectRecords.startDate}" pattern="yyyy-MM-dd"/>">
|
|
|
|
+ </div>
|
|
|
|
+ </div>
|
|
|
|
+ <div class="layui-item layui-col-sm6">
|
|
|
|
+ <label class="layui-form-label">工作结束日期:</label>
|
|
|
|
+ <div class="layui-input-block with-icon">
|
|
|
|
+ <input class=" form-control layui-input" style="background-color: #f1f1f1" readonly="readonly" id="endingDate" value="<fmt:formatDate value="${projectRecords.endingDate}" pattern="yyyy-MM-dd"/>">
|
|
|
|
+ </div>
|
|
|
|
+ </div>
|
|
|
|
+ </div>
|
|
|
|
+ <c:if test="${not empty processInstanceId}">
|
|
|
|
+ <div class="form-group layui-row">
|
|
|
|
+ <div class="form-group-label"><h2>审批流程</h2></div>
|
|
|
|
+ <div class="layui-item layui-col-xs12 form-table-container" >
|
|
|
|
+ <act:flowChart procInsId="${processInstanceId}"/>
|
|
|
|
+ <act:histoicFlow procInsId="${processInstanceId}"/>
|
|
|
|
+ </div>
|
|
|
|
+ </div>
|
|
|
|
+ </c:if>
|
|
|
|
+ <div class="form-group layui-row page-end"></div>
|
|
|
|
+ </form:form>
|
|
|
|
+ </div>
|
|
|
|
+ </c:if>
|
|
|
|
+</div>
|
|
|
|
+<script>
|
|
|
|
+
|
|
|
|
+ function preview(title,url,width,height,type){
|
|
|
|
+ $.ajax({
|
|
|
|
+ type : "POST",
|
|
|
|
+ url : url,
|
|
|
|
+ //请求成功
|
|
|
|
+ success : function(result) {
|
|
|
|
+ if(navigator.userAgent.match(/(iPhone|iPod|Android|ios)/i)){//如果是移动端,就使用自适应大小弹窗
|
|
|
|
+ width='auto';
|
|
|
|
+ height='auto';
|
|
|
|
+ }else{//如果是PC端,根据用户设置的width和height显示。
|
|
|
|
+
|
|
|
|
+ }
|
|
|
|
+ var u = 'http://ow365.cn/?i=14411&furl='+result;
|
|
|
|
+ if(type == 1){
|
|
|
|
+ u = result;
|
|
|
|
+ }
|
|
|
|
+ parent.layer.open({
|
|
|
|
+ type: 2,
|
|
|
|
+ area: [width, height],
|
|
|
|
+ title: title,
|
|
|
|
+ maxmin: true, //开启最大化最小化按钮
|
|
|
|
+ content: u,
|
|
|
|
+ btn: ['关闭'],
|
|
|
|
+ cancel: function(index){
|
|
|
|
+ }
|
|
|
|
+ });
|
|
|
|
+ },
|
|
|
|
+
|
|
|
|
+ });
|
|
|
|
+
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ function openBill2(title,url,width,height,target,formId,tableId){
|
|
|
|
+ var rows = $(this).parent().prevAll().length + 1;
|
|
|
|
+ var frameIndex = parent.layer.getFrameIndex(window.name);
|
|
|
|
+ var urls = url+"&index="+frameIndex;
|
|
|
|
+ if(navigator.userAgent.match(/(iPhone|iPod|Android|ios)/i)){//如果是移动端,就使用自适应大小弹窗
|
|
|
|
+ width='auto';
|
|
|
|
+ height='auto';
|
|
|
|
+ }else{//如果是PC端,根据用户设置的width和height显示。
|
|
|
|
+
|
|
|
|
+ }
|
|
|
|
+ top.layer.open({
|
|
|
|
+ type: 2,
|
|
|
|
+ area: [width, height],
|
|
|
|
+ title: title,
|
|
|
|
+ skin:"two-btns",
|
|
|
|
+ maxmin: false, //开启最大化最小化按钮
|
|
|
|
+ content: urls ,
|
|
|
|
+ btn: ['确定','关闭'],
|
|
|
|
+ yes: function(index, layero){
|
|
|
|
+ var body = top.layer.getChildFrame('body', index);
|
|
|
|
+ var iframeWin = layero.find('iframe')[0]; //得到iframe页的窗口对象,执行iframe页的方法:iframeWin.method();
|
|
|
|
+ var inputForm = body.find('#inputForm');
|
|
|
|
+ var top_iframe;
|
|
|
|
+ if(target){
|
|
|
|
+ top_iframe = target;//如果指定了iframe,则在改frame中跳转
|
|
|
|
+ }else{
|
|
|
|
+ top_iframe = top.getActiveTab().attr("name");//获取当前active的tab的iframe
|
|
|
|
+ }
|
|
|
|
+ inputForm.attr("target",top_iframe);//表单提交成功后,从服务器返回的url在当前tab中展示
|
|
|
|
+ inputForm.attr("action","${ctx}/projectAccessory/projectAccessory/saveWorkAttachment");//表单提交成功后,从服务器返回的url在当前tab中展示
|
|
|
|
+ var $document = iframeWin.contentWindow.document;
|
|
|
|
+
|
|
|
|
+ formSubmit2($document,formId,index,tableId);
|
|
|
|
+
|
|
|
|
+ },
|
|
|
|
+ cancel: function(index){
|
|
|
|
+ }
|
|
|
|
+ });
|
|
|
|
+ }
|
|
|
|
+ function formSubmit2($document,inputForm,index,tableId){
|
|
|
|
+
|
|
|
|
+ var validateForm = $($document.getElementById(inputForm)).validate({
|
|
|
|
+ submitHandler: function(form){
|
|
|
|
+ loading('正在提交,请稍等...');
|
|
|
|
+ form.submit();
|
|
|
|
+ },
|
|
|
|
+ errorContainer: "#messageBox",
|
|
|
|
+ errorPlacement: function(error, element) {
|
|
|
|
+ $($document.getElementById("#messageBox")).text("输入有误,请先更正。");
|
|
|
|
+ if (element.is(":checkbox")||element.is(":radio")||element.parent().is(".input-append")){
|
|
|
|
+ error.appendTo(element.parent().parent());
|
|
|
|
+ } else {
|
|
|
|
+ error.insertAfter(element);
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ });
|
|
|
|
+ if(validateForm.form()){
|
|
|
|
+ $($document.getElementById(inputForm)).ajaxSubmit({
|
|
|
|
+ success:function(data) {
|
|
|
|
+ var d = data;
|
|
|
|
+ //输出提示信息
|
|
|
|
+ if(d.str.length>0){
|
|
|
|
+ parent.layer.msg(d.str,{icon:1});
|
|
|
|
+ }
|
|
|
|
+ $("#"+tableId).load(location.href + " #"+tableId);
|
|
|
|
+ //关闭当前页
|
|
|
|
+ top.layer.close(index)
|
|
|
|
+ }
|
|
|
|
+ });
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ function formAttachment(title,url,width,height,target,formId){
|
|
|
|
+ var rows = $(this).parent().prevAll().length + 1;
|
|
|
|
+ var frameIndex = parent.layer.getFrameIndex(window.name);
|
|
|
|
+ var urls = url;
|
|
|
|
+ if(navigator.userAgent.match(/(iPhone|iPod|Android|ios)/i)){//如果是移动端,就使用自适应大小弹窗
|
|
|
|
+ width='auto';
|
|
|
|
+ height='auto';
|
|
|
|
+ }else{//如果是PC端,根据用户设置的width和height显示。
|
|
|
|
+
|
|
|
|
+ }
|
|
|
|
+ top.layer.open({
|
|
|
|
+ type: 2,
|
|
|
|
+ area: [width, height],
|
|
|
|
+ title: title,
|
|
|
|
+ skin:"two-btns",
|
|
|
|
+ maxmin: false, //开启最大化最小化按钮
|
|
|
|
+ content: urls ,
|
|
|
|
+ btn: ['确定','关闭'],
|
|
|
|
+ yes: function(index, layero){
|
|
|
|
+ var body = top.layer.getChildFrame('body', index);
|
|
|
|
+ var iframeWin = layero.find('iframe')[0]; //得到iframe页的窗口对象,执行iframe页的方法:iframeWin.method();
|
|
|
|
+ var inputForm = body.find('#inputForm');
|
|
|
|
+ var top_iframe;
|
|
|
|
+ if(target){
|
|
|
|
+ top_iframe = target;//如果指定了iframe,则在改frame中跳转
|
|
|
|
+ }else{
|
|
|
|
+ top_iframe = top.getActiveTab().attr("name");//获取当前active的tab的iframe
|
|
|
|
+ }
|
|
|
|
+ inputForm.attr("target",top_iframe);//表单提交成功后,从服务器返回的url在当前tab中展示
|
|
|
|
+ inputForm.attr("action","${ctx}/projectAccessory/projectAccessory/saveWorkAttachment");//表单提交成功后,从服务器返回的url在当前tab中展示
|
|
|
|
+ var $document = iframeWin.contentWindow.document;
|
|
|
|
+ var iframeWin = layero.find('iframe')[0].contentWindow; //得到iframe页的窗口对象,执行iframe页的方法:iframeWin.method();
|
|
|
|
+ var item = iframeWin.getSelectedItem();
|
|
|
|
+ setValuee(item);
|
|
|
|
+
|
|
|
|
+ },
|
|
|
|
+ cancel: function(index){
|
|
|
|
+ }
|
|
|
|
+ });
|
|
|
|
+ }
|
|
|
|
+ function setValuee(obj){
|
|
|
|
+ for(var i=0;i<obj.length;i++){
|
|
|
|
+ var idArr = $("#file_attachment tr:visible .clientId");
|
|
|
|
+ if(obj[i].id!=''&&!hasInArr(obj[i].id,idArr)){
|
|
|
|
+ addRowBaseData("#workBaseDataList",workBaseDataRowIdx,workBaseDataTpl,obj[i]);
|
|
|
|
+ $("#workBaseDataList"+workBaseDataRowIdx+"_nature").html("引用");
|
|
|
|
+ workBaseDataRowIdx=workBaseDataRowIdx+1;
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+</script>
|
|
|
|
+</body>
|
|
|
|
+</html>
|