|
@@ -76,6 +76,79 @@
|
|
}
|
|
}
|
|
});
|
|
});
|
|
}
|
|
}
|
|
|
|
+ function openDialogSingle(title,url,width,height,target,formId,tableId) {
|
|
|
|
+
|
|
|
|
+ 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: url ,
|
|
|
|
+ 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}/project/projectMaterialsWarehouse/singleSave");//表单提交成功后,从服务器返回的url在当前tab中展示
|
|
|
|
+ var $document = iframeWin.contentWindow.document;
|
|
|
|
+ formSubmit2($document,formId,index,tableId);
|
|
|
|
+ return false;
|
|
|
|
+ },
|
|
|
|
+ cancel: function(index){
|
|
|
|
+ }
|
|
|
|
+ });
|
|
|
|
+ }
|
|
|
|
+ function openDialogreModify(title,url,width,height,target){
|
|
|
|
+
|
|
|
|
+ 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: true, //开启最大化最小化按钮
|
|
|
|
+ content: url ,
|
|
|
|
+ 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}/project/projectMaterialsWarehouse/singleSave");//表单提交成功后,从服务器返回的url在当前tab中展示
|
|
|
|
+ var $document = iframeWin.contentWindow.document;
|
|
|
|
+ formSubmit2($document,"inputForm",index," layui-border-box");
|
|
|
|
+ return false;
|
|
|
|
+ },
|
|
|
|
+ cancel: function(index){
|
|
|
|
+ }
|
|
|
|
+ });
|
|
|
|
+ }
|
|
|
|
|
|
function formSubmit2($document,inputForm,index,tableId){
|
|
function formSubmit2($document,inputForm,index,tableId){
|
|
|
|
|
|
@@ -126,7 +199,7 @@
|
|
skin:"two-btns",
|
|
skin:"two-btns",
|
|
maxmin: false, //开启最大化最小化按钮
|
|
maxmin: false, //开启最大化最小化按钮
|
|
content: url ,
|
|
content: url ,
|
|
- btn: ['确定','关闭'],
|
|
|
|
|
|
+ btn: ['提交','关闭'],
|
|
yes: function(index, layero){
|
|
yes: function(index, layero){
|
|
var body = top.layer.getChildFrame('body', index);
|
|
var body = top.layer.getChildFrame('body', index);
|
|
var iframeWin = layero.find('iframe')[0]; //得到iframe页的窗口对象,执行iframe页的方法:iframeWin.method();
|
|
var iframeWin = layero.find('iframe')[0]; //得到iframe页的窗口对象,执行iframe页的方法:iframeWin.method();
|
|
@@ -181,12 +254,15 @@
|
|
|
|
|
|
</script>
|
|
</script>
|
|
<style>
|
|
<style>
|
|
- body{
|
|
|
|
|
|
+ /*body{
|
|
background-color:transparent;
|
|
background-color:transparent;
|
|
filter:progid:DXImageTransform.Microsoft.gradient(startColorstr=#26FFFFFF, endColorstr=#26FFFFFF);
|
|
filter:progid:DXImageTransform.Microsoft.gradient(startColorstr=#26FFFFFF, endColorstr=#26FFFFFF);
|
|
color:#ffffff;
|
|
color:#ffffff;
|
|
background-color:rgba(255,255,255,0);
|
|
background-color:rgba(255,255,255,0);
|
|
height:100%;
|
|
height:100%;
|
|
|
|
+ }*/
|
|
|
|
+ #margin{
|
|
|
|
+ margin-left: 1px;
|
|
}
|
|
}
|
|
</style>
|
|
</style>
|
|
</head>
|
|
</head>
|
|
@@ -262,8 +338,11 @@
|
|
<div class="nav-btns">
|
|
<div class="nav-btns">
|
|
<div class="layui-btn-group ">
|
|
<div class="layui-btn-group ">
|
|
|
|
|
|
- <shiro:hasPermission name="ruralProject:ruralProjectRecords:add">
|
|
|
|
- <table:subProjectAddRow url="${ctx}/project/projectMaterialsWarehouse/form?projectId=${projectId}" width="500px" height="500px" label="导入" title="输变电项目材料信息"></table:subProjectAddRow><!-- 增加按钮 -->
|
|
|
|
|
|
+ <shiro:hasPermission name="project:pojectMaterialsWarehouse:list">
|
|
|
|
+ <table:singleProjectAddRow url="${ctx}/project/projectMaterialsWarehouse/singleForm?projectId=${projectId}" label="新增" title="新增"></table:singleProjectAddRow><!-- 增加按钮 -->
|
|
|
|
+ </shiro:hasPermission>
|
|
|
|
+ <shiro:hasPermission name="project:pojectMaterialsWarehouse:list">
|
|
|
|
+ <table:subProjectAddRow url="${ctx}/project/projectMaterialsWarehouse/form?projectId=${projectId}" width="500px" height="500px" label="导入" title="导入"></table:subProjectAddRow><!-- 增加按钮 -->
|
|
</shiro:hasPermission>
|
|
</shiro:hasPermission>
|
|
<shiro:hasPermission name="project:pojectMaterialsWarehouse:list">
|
|
<shiro:hasPermission name="project:pojectMaterialsWarehouse:list">
|
|
<button type="button" data-toggle="tooltip" data-placement="top" class="layui-btn layui-btn-sm layui-bg-red" id="delUser"> 批量删除</button>
|
|
<button type="button" data-toggle="tooltip" data-placement="top" class="layui-btn layui-btn-sm layui-bg-red" id="delUser"> 批量删除</button>
|
|
@@ -319,7 +398,8 @@
|
|
var xml="";
|
|
var xml="";
|
|
if(d.canedit1 != undefined && d.canedit1 =="1")
|
|
if(d.canedit1 != undefined && d.canedit1 =="1")
|
|
{
|
|
{
|
|
- xml+="<a href=\"${ctx}/project/projectMaterialsWarehouse/delete?id=" + d.id + "\" onclick=\"return subConfirmx('确认要删除该信息吗?', this.href)\" class=\"layui-btn layui-btn-xs layui-bg-red\"> 删除</a>";
|
|
|
|
|
|
+ xml+="<a href=\"#\" onclick=\"openDialogreModify('修改信息', '${ctx}/project/projectMaterialsWarehouse/singleForm?id=" + d.id + "','95%', '95%','')\" class=\"layui-btn layui-btn-xs\" >修改</a>",
|
|
|
|
+ xml+="<a id=\"margin\" href=\"${ctx}/project/projectMaterialsWarehouse/delete?id=" + d.id + "\" onclick=\"return subConfirmx('确认要删除该信息吗?', this.href)\" class=\"layui-btn layui-btn-xs layui-bg-red \">删除</a>"
|
|
}
|
|
}
|
|
return xml;
|
|
return xml;
|
|
}}
|
|
}}
|