fs-danaus
2022-08-05 4a551fc73bd4c86f43aa68c0aab8d1dbeae46836
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
<%@ 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>