chenhaozhe
2025-05-21 94853e46b9d4911fb4cf00389f00a4b820db5d3c
WebTM/views/Éú²ú¹ÜÀí/Òì³£·´À¡µ¥/OA_ErrMsgBackSignBillMain.html
@@ -536,15 +536,23 @@
                                    var LoadData = data.data;
                                    $("#HDeptID").val(LoadData[0].HDeptID); //部门ID
                                    $("#HDeptName").val(LoadData[0].发送部门); //发送部门
                                    $("#HReceiveID").val(LoadData[0].HRecDeptID); //部门ID
                                    $("#HReceiveName").val(LoadData[0].接收部门); //接收部门
                                    $("#HErrMsgBackTypeID").val(LoadData[0].HErrMsgBackTypeID); //异常类型名称ID
                                    $("#HErrMsgBackTypeName").val(LoadData[0].异常类型名称); //异常类型名称
                                    $("#HSendMan").val(LoadData[0].发送人); //发送人
                                    $("#HReceiveMan").val(LoadData[0].接收人); //接收人
                                    $("#HReceiveMan").val(LoadData[0].指派处理人); //接收人
                                    $("#HCopyMan").val(LoadData[0].抄送); //抄送
                                    $("#HLevel").find("option[value='" + LoadData[0]["紧急程度"] + "']").attr("selected", true); //紧急程度
                                    $("#HContext").val(LoadData[0].主题); //主题
                                    $("#HDescription").val(LoadData[0].详细内容); //详细内容
                                    $("#HMaterName").val(LoadData[0].物料名称); //产品名称
                                    $("#HMaterModel").val(LoadData[0].规格型号); //规格型号
                                    $("#HEquipID").val(LoadData[0].设备id); //设备id
                                    $("#HEquipName").val(LoadData[0].设备名称); //产品名称
                                    $("#HMouldID").val(LoadData[0].模具id); //模具id
                                    $("#HMouldName").val(LoadData[0].模具名称); //模具名称
                                    $("#HBillTypeName").val(HSouceBillType); //单据类型
                                    $("#HPlanBillNo").val(LoadData[0].单据号); //单据号
@@ -556,11 +564,15 @@
                                    $("#HErrMsgBackBillNo").val(LoadData[0].单据号); //异常反馈单号
                                    $("#HErrMsgBackInterID").val(LoadData[0].HInterID); //异常反馈单主内码
                                    $("#HErrMsgBackEntryID").val(LoadData[0].HEntryID); //异常反馈单子内码
                                    $("#HSignEmpID").val(LoadData[0].HHandleEmpID); //签到人ID
                                    $("#HSignEmpName").val(LoadData[0].指派处理人); //签到人
                                } else if (num == 2) {
                                    var LoadData = data.data;
                                    $("#HDeptID").val(LoadData[0].HDeptID); //部门ID
                                    $("#HDeptName").val(LoadData[0].发送部门); //发送部门
                                    $("#HReceiveID").val(LoadData[0].HReceiveID); //部门ID
                                    $("#HReceiveID").val(LoadData[0].HReceiveID == undefined ? 0 : LoadData[0].HReceiveID); //部门ID
                                    $("#HReceiveName").val(LoadData[0].接收部门); //接收部门
                                    $("#HErrMsgBackTypeID").val(LoadData[0].HErrMsgBackTypeID); //异常类型ID
                                    $("#HErrMsgBackTypeName").val(LoadData[0].接收部门); //异常类型
@@ -739,6 +751,7 @@
                var refSav = "";
                if (OperationType == 1 || OperationType == 2 || OperationType == 4) {
                    refSav = "Add";
                    data.field.HMaker = $("#HSignEmpName").val();
                }
                if (OperationType == 3) {
                    refSav = "Update";
@@ -766,9 +779,14 @@
                    dataType: "json",
                    success: function (data) {
                        if (data.count == 1) { // è¯´æ˜ŽéªŒè¯æˆåŠŸäº†ï¼Œ
                            layer.msg(data.Message, { icon: 1 });
                            $('#Saver').addClass("layui-btn-disabled").attr("disabled", true);
                            layer.msg("提交成功");
                            if (data.Verify == "Y") //自动审核
                            {
                                $("#HInterID").val(data.HInterID);//获取提交成功返回的单据主ID
                                set_CheckBill(0); //审核
                            }
                            layer.close(index);
                        }
                        else {
                            layer.alert(data.Message, { icon: 5 })
@@ -806,7 +824,7 @@
                    shift: 2,
                    area: ['80%', '80%'],
                    maxmin: true,
                    content: ['../../基础资料/公用基础资料/Gy_DepartmentList.html', 'yes'],
                    content: ['../../基础资料/公用基础资料/Gy_DepartmentList.html?openType=2&HOrgName=' + sessionStorage["Organization"], 'yes'],
                    btn: ['确定', '取消']
                    , btn1: function (index, layero) {
@@ -846,7 +864,7 @@
                    shift: 2,
                    area: ['80%', '80%'],
                    maxmin: true,
                    content: ['../../基础资料/公用基础资料/Gy_DepartmentList.html', 'yes'],
                    content: ['../../基础资料/公用基础资料/Gy_DepartmentList.html?openType=2&HOrgName=' + sessionStorage["Organization"], 'yes'],
                    btn: ['确定', '取消']
                    , btn1: function (index, layero) {
@@ -1022,7 +1040,7 @@
                    shift: 2,
                    area: ['80%', '80%'],
                    maxmin: true,
                    content: ['../../质量管理/基础建模/Gy_ErrMsgBackType.html', 'yes'],
                    content: ['../../质量管理/基础建模/Gy_ErrMsgBackType.html?openType=2', 'yes'],
                    btn: ['确定', '取消']
                    , btn1: function (index, layero) {
@@ -1060,7 +1078,7 @@
                    shift: 2,
                    area: ['80%', '80%'],
                    maxmin: true,
                    content: ['../../设备管理/设备档案/Gy_EquipFileMainList.html', 'yes'],
                    content: ['../../设备管理/设备档案/Gy_EquipFileMainList.html?openType=2', 'yes'],
                    btn: ['确定', '取消']
                    , btn1: function (index, layero) {
@@ -1098,7 +1116,7 @@
                    shift: 2,
                    area: ['80%', '80%'],
                    maxmin: true,
                    content: ['../../模治具管理/模治具管理/Gy_MouldFileList.html', 'yes'],
                    content: ['../../模治具管理/模治具管理/Gy_MouldFileList.html?openType=2', 'yes'],
                    btn: ['确定', '取消']
                    , btn1: function (index, layero) {
@@ -1163,7 +1181,29 @@
                });
            });
            //审核
            function set_CheckBill(num) {
                $.ajax({
                    type: "GET",
                    url: GetWEBURL() + "/Sc_MESTransFerWorkBill/AuditOA_ErrMsgBackSignBill", //方法所在页面和方法名
                    data: { "HInterID": $("#HInterID").val(), "IsAudit": num, "CurUserName": sessionStorage["HUserName"] },
                    success: function (result) {
                        if (result.count == 1) {
                            layer.msg(result.Message, { time: 1 * 1000, icon: 1 }, function () {
                                // å¾—到frame索引
                                var index = layer.getFrameIndex(window.name);
                                //关闭当前frame
                                layer.close(index);
                            });
                        } else {
                            layer.alert(result.code + result.Message, { icon: 5 });
                        }
                    }, error: function () {
                        layer.alert("接口请求失败!", { icon: 5 });
                    }
                });
            }
            //以上为layui模块