username@email.com
2025-04-27 15eb82df2d6ec539e9d4245bfe08d531e8eb6379
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
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
 
@{
 
    ViewBag.Title = "problemtype";
    Layout = "~/Views/Shared/_Layout_DataEdit.cshtml";
}
@section headerStyle{
    <script language="javascript" type="text/javascript">
        var questiontypeDropDown = '@Html.Raw(Newtonsoft.Json.JsonConvert.SerializeObject(ViewBag.questiontype))';
         var WentiId = '@Html.Raw(ViewBag.WentiId)';
        controllist = [
            {
                label: '题目类别信息', name: 'data', labtype: 'panel',islist:'false', data: [
 
                    { label: ' 题目Id ', name: 'Id', labtype: 'txt', addvisible: false, editvisible: false ,reg:''}
                    , { label: ' 编码 ', name: 'CodeSn', labtype: 'txt', addvisible: true, editvisible: true, reg: '', ismust: true }
                    , { label: ' 名称 ', name: 'Comments', labtype: 'txt', addvisible: true, editvisible: true, reg: '', ismust: true }
                    , { label: ' 排序 ', name: 'Sort', labtype: 'txt', addvisible: true, editvisible: true, reg: '' }
                    , { label: ' 问题类别 ', name: 'Contents', labtype: 'combox', addvisible: true, editvisible: true, reg: '', data: JSON.parse(questiontypeDropDown)}
                    , { label: ' 主表id ', name: 'CodeId', labtype: 'txt', addvisible: false, editvisible: false ,reg:'' }
 
            , { label: ' 状态 ', name: 'RecStatus', labtype: 'txt', disabled:false, addvisible: false, editvisible: false ,reg:''}
 
 
        ]}
 
        ];
 
 
 
        saveurl = '/SysCode/Savequestiontype';
        editurl = '/SysCode/Getproblemtype?WentiId=' + WentiId;
        nullifyurl = "/SysCode/NullifySysCodeDtl/";//废弃取消单据时的url 返回json数据
        //deldtlurl = "/HrPosition/NullifyDtl/";//删除单据明细时时配置的url 返回json数据
        comments ="题目类别信息";
 
        function _pageSaveContinue() {//获取值x
 
 
            var jsonStr = "";
            ischeck = true;
 
            if (typeof (_parSaveCheck) === "function") {
                ischeck = _parSaveCheck();
                if (!ischeck) { return; }
 
            }
            if (!isauto) {
                jsonStr += getjsonval('');
                jsonStr = jsonStr.substring(0, jsonStr.length - 1)
                jsonStr = '{' + jsonStr + '}';
            }
            else {
                jsonStr = savedata;
            }
            //  $("#aa").html(jsonStr);
            if (!ischeck) { return false; }
            if (jsonStr == "") { return false; }
 
            if (typeof (_beforeSaveData) === "function") {
                jsonStr = _beforeSaveData(jsonStr);
            }
           
            $.ajax({
                url: saveurl,
                type: 'POST',
                data: JSON.parse(jsonStr),//{ "jsonStrs": jsonStr},
                //contentType: "application/json;charset=utf-8",
                dataType: 'json',
                success: function (data) {
                    //console.log(JSON.stringify(data));
                    //data = JSON.stringify(data)
 
                    console.log(data);
                    //data = JSON.parse(data);
                    console.log(typeof (data));
                    var issuccess = data.Result;
                    var sysid = data.ReturnID;
                    var successMsg = savesuccessmsg == "" ? '保存成功' : savesuccessmsg;
                    if (issuccess) {
 
                        if (typeof (_afterSaveSucc) === "function") {
                            layer.alert(successMsg, function () {
                                setTimeout(function () {
                                    var result = _afterSaveSucc();
                                    if (result == undefined) {
 
                                        return;
                                    }
                                    return;
 
                                }, 500);
 
                                return;
                            });
 
                        }
                        if (id != null && id != undefined && id != '') {
                            layer.alert(successMsg, { icon: 6 }, function () {
                                if (typeof (_afterSaveData) === "function") {
                                    _afterSaveData();
                                } else {
                                    //location.reload(true);
                                    //_pageAutoClose();//自动关闭页面方法
                                    location.href = '/SysCode/Editproblemtype?WentiId=' + WentiId;;
                                }
                            });
                        }
                        else {
                            layer.alert(successMsg, { icon: 6 }, function () {
                                if (typeof (_afterSaveData) === "function") {
                                    _afterSaveData();
 
                                } else {
                                    //if (self.location.href.substr(0, self.location.href.length - 1) == '/') {
                                    //    self.location.href = self.location.href + sysid + '';
                                    //}
                                    //else {
                                    //    if (self.location.href.indexOf('id') < 0) {
                                    //        self.location.href = self.location.href + '/' + sysid + '';
                                    //    }
                                    //}
                                    location.href = '/SysCode/Editproblemtype?WentiId=' + WentiId;;
                                }
                            });
                        }
                    }
                    else {
                        // msg.err(data.Message);
                        parent.layer.alert(data.Message, { icon: 5 });
                    }
                },
                error: function () {
                    msg.err('页面出错');
                }
            });
        };
    </script>
}
 
 
@section footerScripts{
    <script language="javascript" type="text/javascript">
 
      
    </script>
}