1
yangle
2025-02-28 50e8da1b9afd39f32f5c73a1cbcdb7f6c6de8adb
WebTM/views/É豸¹ÜÀí/Sb_EquipDotCheckPlanBillEdit.html
@@ -236,6 +236,12 @@
            if (OperationType == 1) {//无源单
                set_AddFNew();
            }
            else if (OperationType == 2) {//如果修改则走下面 new                                        //复制
                OperationType = 1;
                set_EditFromGrid(linterid);
                //获取最大单据号
                get_MAXNum();
            }
            else if (OperationType == 3) {//编辑
                //禁用组织选项
                //$("#HUSEORGID").attr("disabled", true);
@@ -513,6 +519,7 @@
                $.ajax({
                    url: GetWEBURL() + "/Web/GetMAXNum",
                    type: "GET",
                    async: false,
                    data: { "HBillType": sBillType },
                    success: function (d) {
                        var myDate = new Date();
@@ -550,13 +557,13 @@
            function set_EditFromGrid() {
                set_EditForm(linterid);  //编辑获取表头
                set_EditGrid(linterid);  //编辑获取表体
                option.data = [{ "HDotCheckItemID": 0, "HDotCheckCode": "", "HDotCheckItem": "", "HDotCheckPart": "", "HClaim": "", "HManagerID": 0, "HManagerCode": "", "HManagerName": "", "HRemark": "", "HDotCheckItemClassID": 0, "HDotCheckItemClassName": "", "HDotCheckItemMethodID": 0, "HDotCheckItemMethodName": "" }];
                table.render(option);
                //option.data = [{ "HDotCheckItemID": 0, "HDotCheckCode": "", "HDotCheckItem": "", "HDotCheckPart": "", "HClaim": "", "HManagerID": 0, "HManagerCode": "", "HManagerName": "", "HRemark": "", "HDotCheckItemClassID": 0, "HDotCheckItemClassName": "", "HDotCheckItemMethodID": 0, "HDotCheckItemMethodName": "" }];
                //table.render(option);
                set_EditGrid_Plan(linterid);  //编辑获取表体--点检计划
                option.data = [{ "HPlanDate": "", "HPlanBeginTime": "", "HPlanEndTime": "", "HRelationFlag": "未点检", "DiffDate": 0 }];
                table.render(option_plan);
                //option.data = [{ "HPlanDate": "", "HPlanBeginTime": "", "HPlanEndTime": "", "HRelationFlag": "未点检", "DiffDate": 0 }];
                //table.render(option_plan);
            }
            // ç‚¹æ£€ä¿¡æ¯
@@ -604,16 +611,16 @@
                $.ajax({
                    url: GetWEBURL() + "Sb_EquipDotCheckPlanBill/Sb_EquipDotCheckPlanBillListCheckDetai",
                    type: "GET",
                    async: false,
                    data: {
                        "HID": linterid
                    },
                    success: function (result) {
                        //console.log(result.code)
                        if (result.code == 1) { // è¯´æ˜ŽéªŒè¯æˆåŠŸäº†ï¼Œ
                            //console.log(result)
                            var data = result.data.h_v_Sb_EquipDotCheckPlanBillList[0];
                            form.val("component-form-group", { //formTest å³ class="layui-form" æ‰€åœ¨å…ƒç´ å±žæ€§ lay-filter="" å¯¹åº”的值
                                "HBillNo": data.单据号
                                "HInterID": OperationType == 2 ? "" : linterid
                                , "HBillNo": OperationType == 2 ? "" : data.单据号
                                , "HDate": formatDate(data.日期)
                                , "HInnerBillNo": data.内部单据号
                                , "HEquipName": data.设备名称
@@ -643,12 +650,12 @@
                });
            }
            // ç¼–辑获取表体--点检项目
            function set_EditGrid(linterid) {
                $("#HInterID").val(linterid);//修改时主表ID
            function set_EditGrid(linterid) {
                //编辑加载数据
                $.ajax({
                    url: GetWEBURL() + 'Sb_EquipDotCheckPlanBill/Sb_EquipDotCheckPlanBillListProjectDetai',
                    type: "GET",
                    async: false,
                    data: { "sqlWhere": "and hmainid=" + linterid },
                    success: function (result) {
                        if (result.count == 1) {
@@ -657,7 +664,6 @@
                            for (var i = 0; i < data.length; i++) {
                                subarr.push({ "HDotCheckItemID": data[i].点检项目ID, "HDotCheckCode": data[i].点检项目代码, "HDotCheckItem": data[i].点检项目, "HDotCheckPart": data[i].点检部位, "HClaim": data[i].具体要求, "HManagerID": data[i].负责人ID, "HManagerCode": data[i].负责人代码, "HManagerName": data[i].负责人, "HRemark": data[i].表体备注, "HDotCheckItemClassID": data[i].HDotCheckItemClassID, "HDotCheckItemClassName": data[i].点检项目分类名称, "HDotCheckItemMethodID": data[i].HDotCheckItemMethodID, "HDotCheckItemMethodName": data[i].点检方法名称 });
                            }
                            option.data = subarr;
                            table.render(option);
@@ -672,12 +678,12 @@
            }
            // ç¼–辑获取表体--点检计划
            function set_EditGrid_Plan(linterid) {
                $("#HInterID").val(linterid);//修改时主表ID
            function set_EditGrid_Plan(linterid) {
                //编辑加载数据
                $.ajax({
                    url: GetWEBURL() + 'Sb_EquipDotCheckPlanBill/GetPlanList',
                    type: "GET",
                    async: false,
                    data: { "sqlWhere": "and hmainid=" + linterid },
                    success: function (result) {
                        if (result.count == 1) {