duhe
2024-11-01 bee6b511dad3abde283229db04832c77fd81fb6a
WebTM/views/»ù´¡×ÊÁÏ/¹«Óûù´¡×ÊÁÏ/Add_Edit_Gy_QCCheckClass.html
@@ -93,8 +93,9 @@
    <script src="../../../layuiadmin/Scripts/json2.js"></script>
    <script src="../../../layuiadmin/Scripts/jquery-1.4.1.js"></script>
    <script src="../../../layuiadmin/Scripts/webConfig.js"></script>
    <script src="../../../layuiadmin/PubCustom.js"></script>
    <script>
//获取参数
        //获取参数
        function getUrlVars() {
            var vars = [], hash;
            var hashes = window.location.href.slice(window.location.href.indexOf('?') + 1).split('&');
@@ -105,8 +106,6 @@
            }
            return vars;
        }
        var params = getUrlVars();
        var hID = params[params[0]];//编辑查看
@@ -135,24 +134,24 @@
            //    }, function () { window.location.href = "../../user/login.html"; });
            //}
            //#region å¤´éƒ¨å·¥å…·æ äº‹ä»¶
            //清除
            form.on('submit(Cancel)', function () {
                //sessionStorage["SourceFlag"] = false;
                parent.location.href = "../../../views/index.html"
                //window.close();//关闭当前页
            })
            //保存
            form.on('submit(Saver)', function (data) {//保存
                //debugger;
                var ModRightNameAdd = 'Gy_RepairType_Edit';
                var ModRightNameAdd = 'Gy_QCCheckClass_Edit';
                var user = sessionStorage["HUserName"];
                var arr = new Array();
                var isEndCheck = document.getElementById("HStopflag").checked;
                data.field.HStopflag = isEndCheck;//将数组合并成字符串
                hID = hID == "" ? 0 : hID;
                data.field.HItemID = hID == "" ? 0 : hID;
                data.field.HParentID = TagParentId == "" ? 0 : TagParentId;
@@ -185,7 +184,7 @@
                            },
                            error: function (err) {
                                f_alert("错误:" + err);
                                f_alert("错误:" + err.responseText);
                                console.log("Reason" + sMainStr);
                            }
                        });
@@ -196,7 +195,7 @@
                            type: "POST",
                            url: GetWEBURL() + "/Gy_QCCheckClass/AddBill", //方法所在页面和方法名
                            async: true,
                            data: { "oMain": oMain },
                            data: { "oMain": sMainSub },
                            dataType: "json",
                            success: function (data) {
                                if (data.count == 1) { // è¯´æ˜ŽéªŒè¯æˆåŠŸäº†ï¼Œ
@@ -215,12 +214,18 @@
                            },
                            error: function (err) {
                                f_alert("错误:" + err);
                                f_alert("错误:" + err.responseText);
                                console.log("Reason" + sMainStr);
                            }
                        });
                }
            });
            //退出按钮
            form.on('submit(Exit)', function () {
                Pub_Close(1);
            })
            //#endregion
            function f_alert(sMsg) {
                layer.alert(sMsg, { icon: 5 });
@@ -254,8 +259,6 @@
                });
            }
            //监听提交
            form.verify({
                numberOrEmpty: function (value, item) {
@@ -266,6 +269,7 @@
                    //}
                }
            });
            //检验项目类别类别弹窗
            form.on('submit(HQCCheckClassList)', function () {
@@ -304,6 +308,8 @@
                    }
                });
            });
        });
    </script>
</body>