|
@@ -44,6 +44,18 @@
|
|
type : 'date'
|
|
type : 'date'
|
|
, trigger: 'click'
|
|
, trigger: 'click'
|
|
});
|
|
});
|
|
|
|
+ layui.use(['form', 'layer'], function () {
|
|
|
|
+ var form = layui.form;
|
|
|
|
+ form.on('switch(reportSwitch)',function(data){
|
|
|
|
+ var flag=$(this).prop("checked")
|
|
|
|
+ $.ajax({
|
|
|
|
+ url: "${ctx}/ruralProject/ruralCostProjectMessage/setReportSwitch?reportSwitch="+flag,
|
|
|
|
+ success: function (data) {
|
|
|
|
+ top.layer.msg(data, {icon: 0});
|
|
|
|
+ }
|
|
|
|
+ });
|
|
|
|
+ })
|
|
|
|
+ })
|
|
});
|
|
});
|
|
|
|
|
|
function reset() {
|
|
function reset() {
|
|
@@ -163,6 +175,71 @@
|
|
});
|
|
});
|
|
}
|
|
}
|
|
|
|
|
|
|
|
+ function openDialogreReportSwitch(title,url,width,height,target,buttons) {
|
|
|
|
+
|
|
|
|
+ if (navigator.userAgent.match(/(iPhone|iPod|Android|ios)/i)) {//如果是移动端,就使用自适应大小弹窗
|
|
|
|
+ width = 'auto';
|
|
|
|
+ height = 'auto';
|
|
|
|
+ } else {//如果是PC端,根据用户设置的width和height显示。
|
|
|
|
+
|
|
|
|
+ }
|
|
|
|
+ var split = buttons.split(",");
|
|
|
|
+ $.ajax({
|
|
|
|
+ url: "${ctx}/ruralProject/ruralCostProjectMessage/getReportSwitch",
|
|
|
|
+ success: function (data) {
|
|
|
|
+ if (data){
|
|
|
|
+ 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) {
|
|
|
|
+ }
|
|
|
|
+ });
|
|
|
|
+ }else{
|
|
|
|
+ top.layer.msg("上报功能已关闭", {icon: 0});
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ });
|
|
|
|
+ }
|
|
|
|
|
|
function openDialogreSub(title,url,width,height,target,formId,tableId) {
|
|
function openDialogreSub(title,url,width,height,target,formId,tableId) {
|
|
if (navigator.userAgent.match(/(iPhone|iPod|Android|ios)/i)) {//如果是移动端,就使用自适应大小弹窗
|
|
if (navigator.userAgent.match(/(iPhone|iPod|Android|ios)/i)) {//如果是移动端,就使用自适应大小弹窗
|
|
@@ -464,7 +541,7 @@
|
|
<div class="layui-row">
|
|
<div class="layui-row">
|
|
<div class="full-width fl">
|
|
<div class="full-width fl">
|
|
<div class="layui-row contentShadow shadowLR" id="queryDiv">
|
|
<div class="layui-row contentShadow shadowLR" id="queryDiv">
|
|
- <form:form id="searchForm" modelAttribute="ruralProjectRecords" action="${ctx}/ruralProject/ruralProjectMessage/" method="post" class="form-inline">
|
|
|
|
|
|
+ <form:form id="searchForm" modelAttribute="ruralProjectRecords" action="${ctx}/ruralProject/ruralProjectMessage/" method="post" class="form-inline layui-form">
|
|
<input id="pageNo" name="pageNo" type="hidden" value="${page.pageNo}"/>
|
|
<input id="pageNo" name="pageNo" type="hidden" value="${page.pageNo}"/>
|
|
<input id="pageSize" name="pageSize" type="hidden" value="${page.pageSize}"/>
|
|
<input id="pageSize" name="pageSize" type="hidden" value="${page.pageSize}"/>
|
|
<input id="toflag" name="toflag" type="hidden" value="1"/>
|
|
<input id="toflag" name="toflag" type="hidden" value="1"/>
|
|
@@ -490,9 +567,7 @@
|
|
<button id="searchQuery" class="layui-btn layui-btn-sm layui-bg-blue" onclick="search()">查询</button>
|
|
<button id="searchQuery" class="layui-btn layui-btn-sm layui-bg-blue" onclick="search()">查询</button>
|
|
<button id="searchReset" class="layui-btn layui-btn-sm " onclick="resetSearch()">重置</button>
|
|
<button id="searchReset" class="layui-btn layui-btn-sm " onclick="resetSearch()">重置</button>
|
|
</div>
|
|
</div>
|
|
-<%-- <a href="#" id="moresee"><i class="glyphicon glyphicon-menu-down"></i></a>--%>
|
|
|
|
-<%-- <button id="searchReset" class="fixed-btn searchReset fr" onclick="resetSearch()">重置</button>--%>
|
|
|
|
-<%-- <button id="searchQuery" class="fixed-btn searchQuery fr" onclick="search()">查询</button>--%>
|
|
|
|
|
|
+
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div style=" clear:both;"></div>
|
|
<div style=" clear:both;"></div>
|
|
@@ -601,10 +676,11 @@
|
|
<button class="layui-btn layui-btn-sm layui-bg-blue" id="btn-fold">全部折叠</button>
|
|
<button class="layui-btn layui-btn-sm layui-bg-blue" id="btn-fold">全部折叠</button>
|
|
<button class="layui-btn layui-btn-sm layui-bg-green" data-toggle="tooltip" data-placement="left" onclick="sortOrRefresh()" title="刷新"> 刷新</button>
|
|
<button class="layui-btn layui-btn-sm layui-bg-green" data-toggle="tooltip" data-placement="left" onclick="sortOrRefresh()" title="刷新"> 刷新</button>
|
|
</div>
|
|
</div>
|
|
-<%-- <button class="nav-btn layui-btn" id="btn-expand">全部展开</button>--%>
|
|
|
|
-<%-- <button class="nav-btn layui-btn-warm" id="btn-fold">全部折叠</button>--%>
|
|
|
|
-<%-- <button class="nav-btn nav-btn-refresh" data-toggle="tooltip" data-placement="left" onclick="sortOrRefresh()" title="刷新"><i class="glyphicon glyphicon-repeat"></i> 刷新</button>--%>
|
|
|
|
-
|
|
|
|
|
|
+ <shiro:hasPermission name="ruralProject:ruralCostProjectMessage:reportSwitch">
|
|
|
|
+ <div style="float: right;margin-right: 30px;">
|
|
|
|
+ <input type="checkbox" id="reportSwitch" <c:if test="${reportSwitch}">checked</c:if> lay-filter="reportSwitch" lay-skin="switch" lay-text="开启|关闭">
|
|
|
|
+ </div>
|
|
|
|
+ </shiro:hasPermission>
|
|
<div style="clear: both;"></div>
|
|
<div style="clear: both;"></div>
|
|
</div>
|
|
</div>
|
|
<table id="permissionTable" class="oa-table layui-table" lay-filter="permissionTable"></table>
|
|
<table id="permissionTable" class="oa-table layui-table" lay-filter="permissionTable"></table>
|
|
@@ -929,7 +1005,7 @@
|
|
if(d.syncStatus == 0){
|
|
if(d.syncStatus == 0){
|
|
if(d.reportStatus == 0){
|
|
if(d.reportStatus == 0){
|
|
if(d.reportedState == 0 || d.reportedState == 6){
|
|
if(d.reportedState == 0 || d.reportedState == 6){
|
|
- xml+="<a href=\"#\" onclick=\"openDialogre('上报管理', '${ctx}/ruralProject/ruralProjectMessage/updateReported?id=" + d.id + " ','95%', '95%','','上报,关闭')\" style='background-color: #5FB878' class=\"layui-btn layui-btn-xs layui-bg-blue\" > 上报</a>";
|
|
|
|
|
|
+ xml+="<a href=\"#\" onclick=\"openDialogreReportSwitch('上报管理', '${ctx}/ruralProject/ruralProjectMessage/updateReported?id=" + d.id + " ','95%', '95%','','上报,关闭')\" style='background-color: #5FB878' class=\"layui-btn layui-btn-xs layui-bg-blue\" > 上报</a>";
|
|
/*xml+="<a href=\"#\" onclick=\"openDialogre('上报管理', '${ctx}/ruralProject/ruralProjectMessage/updateReportedByPerson?id=" + d.id + " ','95%', '95%','','上报,关闭')\" style='background-color: #5FB878' class=\"layui-btn layui-btn-xs layui-bg-blue\" > 个人上报</a>";*/
|
|
/*xml+="<a href=\"#\" onclick=\"openDialogre('上报管理', '${ctx}/ruralProject/ruralProjectMessage/updateReportedByPerson?id=" + d.id + " ','95%', '95%','','上报,关闭')\" style='background-color: #5FB878' class=\"layui-btn layui-btn-xs layui-bg-blue\" > 个人上报</a>";*/
|
|
}
|
|
}
|
|
}else{
|
|
}else{
|
|
@@ -938,11 +1014,11 @@
|
|
}
|
|
}
|
|
/*撤回修改*/
|
|
/*撤回修改*/
|
|
if(d.reportedState == 3){
|
|
if(d.reportedState == 3){
|
|
- xml+="<a href=\"#\" onclick=\"openDialogre('上报管理', '${ctx}/ruralProject/ruralProjectMessage/updateReported?id=" + d.id + " ','95%', '95%','','上报,关闭')\" style='background-color: #1E9FFF' class=\"layui-btn layui-btn-xs layui-bg-green\" > 修改上报</a>";
|
|
|
|
|
|
+ xml+="<a href=\"#\" onclick=\"openDialogreReportSwitch('上报管理', '${ctx}/ruralProject/ruralProjectMessage/updateReported?id=" + d.id + " ','95%', '95%','','上报,关闭')\" style='background-color: #1E9FFF' class=\"layui-btn layui-btn-xs layui-bg-green\" > 修改上报</a>";
|
|
}
|
|
}
|
|
/*驳回修改*/
|
|
/*驳回修改*/
|
|
if(d.reportedState == 4){
|
|
if(d.reportedState == 4){
|
|
- xml+="<a href=\"#\" onclick=\"openDialogre('上报管理', '${ctx}/ruralProject/ruralProjectMessage/reportedModify?id=" + d.id + " ','95%', '95%','','上报,关闭')\" style='background-color: #1E9FFF' class=\"layui-btn layui-btn-xs layui-bg-green\" > 修改上报</a>";
|
|
|
|
|
|
+ xml+="<a href=\"#\" onclick=\"openDialogreReportSwitch('上报管理', '${ctx}/ruralProject/ruralProjectMessage/reportedModify?id=" + d.id + " ','95%', '95%','','上报,关闭')\" style='background-color: #1E9FFF' class=\"layui-btn layui-btn-xs layui-bg-green\" > 修改上报</a>";
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|