<%@ page language="java" contentType="text/html; charset=utf-8"
|
pageEncoding="utf-8"%>
|
<!DOCTYPE html >
|
<html>
|
<head>
|
<script src="/js/wxdata/js/jquery-3.1.1.js" type="text/javascript"></script>
|
<script src="/js/wxdata/js/jquery.toc.min.js" type="text/javascript"></script>
|
<script type="text/javascript" src="/js/index/funcLink.js" ></script>
|
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
|
<title>Insert title here</title>
|
<style type="text/css">
|
.btn .button {
|
background: #E27575;
|
border: none;
|
padding: 10px 25px 10px 25px;
|
color: #FFF;
|
box-shadow: 1px 1px 5px #B6B6B6;
|
border-radius: 3px;
|
text-shadow: 1px 1px 1px #9E3F3F;
|
cursor: pointer;
|
outline: none;
|
margin: 10px 20px;
|
}
|
.btn .save{
|
background-color: #51C332;
|
}
|
.close:hover {
|
background: #E5A0A0;
|
}
|
.save:hover {
|
background: #A0E371;
|
}
|
.btn{
|
text-align: center;
|
}
|
</style>
|
|
<script type="text/javascript">
|
function sav(){
|
var a=0;
|
var da=parent.mygrid.GetDataRows();
|
|
for(var i=0;i<da.length;i++){
|
if(da[i].displayyn==1){
|
if(da[i].statistype.replace(/(^\s*)|(\s*$)/g, "")==""){
|
a++;
|
}
|
}
|
}
|
if(a==0){
|
//var b=JSON.stringify(data);
|
var saisid=$("#saisid").val();
|
if(saisid!=null&&saisid!=""&&saisid!=undefined){
|
$.post('/statiscontrast.do','saisid='+saisid+'&formid='+parent.form+'',function(data){
|
if(data.code=="error"){
|
alert("该名字已经被他人使用,请取新的名字!!!");
|
}else{
|
var jssson={
|
data:da
|
/* saisid:saisid,
|
formid:parent.form */
|
|
};
|
//{content:JSON.stringify(jssson)}
|
$.post('/gridsave.do',{content:JSON.stringify(jssson),saisid:saisid,formid:parent.form},function(data) {
|
if(data.code==parent.form){
|
$.post('/gtGrid.do?m=ut','statiid='+data.info+'&forid='+data.code+'',function(data) {
|
|
top.funcLink('9828','10',data.code+";"+data.info,'formid;statisid','1','','','','','','0','0','','1','')
|
top.closeTab();
|
})
|
}else{
|
alert(data.code);
|
}
|
})
|
}
|
})
|
}else{
|
alert("另存为必须取新名字!!");
|
}
|
}else{
|
a=0;
|
alert("选择【是否显示】时,则必须同时填写【统计类型】");
|
}
|
|
}
|
function quxiao(){
|
var index=parent.layer.getFrameIndex(window.name);
|
parent.layer.close(index);
|
}
|
|
|
</script>
|
</head>
|
<body>
|
<div style="margin: 24px auto;text-align: center;">
|
另存为<input name="" id="saisid" style="margin-left: 30px"></input>
|
</div>
|
<div class="btn "><button class="button save" onclick="sav()">保存</button><button class="button close" onclick="quxiao()">取消</button></div>
|
</body>
|
</html>
|