zzr99
2021-11-29 aefed632c1dffd4ee2f7cbd3537cb7bb6b26b54e
nothing
2个文件已修改
105 ■■■■ 已修改文件
WebTM/views/设备管理/Sb_Add_EqpMaintenanceBillList.html 104 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WebTM/views/设备管理/Sb_EqpMaintenanceBillList.html 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WebTM/views/É豸¹ÜÀí/Sb_Add_EqpMaintenanceBillList.html
@@ -295,7 +295,7 @@
            table.on('toolbar(mainTable)', function (obj) {
                var checkStatus = table.checkStatus('mainTable')
                    , data = checkStatus.data;;
                var NewRow = { "HRepairID": 0, "HRepairCode": "", "HRepairName": "", "HManagerID": 0, "HManagerCode": "", "HManagerName": "", "HRepairExplanation": "", "HRemark": "", "HSourceInterID": 0, "HSourceEntryID": 0, "HSourceBillNo": " ", "HSourceBillType": " " };
                var NewRow = { "HRepairID": 0, "HRepairCode": "", "HRepairName": "", "HManagerID": 0, "HManagerCode": "", "HManagerName": "", "HRepairExplanation": "", "HRemark": ""/*, "HSourceInterID": 0, "HSourceEntryID": 0, "HSourceBillNo": " ", "HSourceBillType": " " */};
                switch (obj.event) {
                    //增加一行
                    case 'btn-AddLine': set_AddLine(NewRow);
@@ -516,8 +516,8 @@
                    content: ['../设备管理/Sb_EqpConkBookBillList.html', 'yes'],
                    btn: ['确定', '取消']
                    , btn1: function (index, layero) {
                        var NewRow = { "HRepairID": 0, "HRepairCode": "", "HRepairName": "", "HManagerID": 0, "HManagerCode": "", "HManagerName": "", "HRepairExplanation": "", "HRemark": "", "HSourceInterID": 0, "HSourceEntryID": 0, "HSourceBillNo": " ", "HSourceBillType": " " };
                        //按钮【按钮一】的回调
                        //var NewRow = { "HRepairID": 0, "HRepairCode": "", "HRepairName": "", "HManagerID": 0, "HManagerCode": "", "HManagerName": "", "HRepairExplanation": "", "HRemark": "", "HSourceInterID": 0, "HSourceEntryID": 0, "HSourceBillNo": " ", "HSourceBillType": " " };
                        ////按钮【按钮一】的回调
                        var iframeWindow = window['layui-layer-iframe' + index]  //获取弹框页面
                        var checkStatus = iframeWindow.layui.table.checkStatus('mainTable');//获取table的elem:"#test"
                        if (checkStatus.data.length === 0) {
@@ -526,49 +526,49 @@
                        $("#HMainSourceBillNo").val(checkStatus.data[0].单据号);
                        $("#HMainSourceInterID").val(checkStatus.data[0].hmainid);
                        $("#HMainSourceEntryID").val(checkStatus.data[0].hsubid);
                        //按选单号加载表体数据
                        $.ajax({
                            url: GetWEBURL() + 'Sb_EqpRepairWorkBill/Sb_EqpRepairWorkBillSubByHMainSourceBillNo',
                            type: "GET",
                            data: { "HMainSourceBillNo": checkStatus.data[0].单据号 },
                            success: function (result) {
                                if (result.count == 1) {
                                    var EndData = result.data;
                                    var rowdate = layui.table.cache["mainTable"];
                                    if (rowdate.length == 0)  //表体数据为空时
                                    {
                                        buttonArr = [];//清空数组
                                        for (var i = 0; i < checkStatus.data.length; i++) {
                                            var checkrow = { "HRepairID": 0, "HRepairCode": "", "HRepairName": "", "HManagerID": 0, "HManagerCode": "", "HManagerName": "", "HRepairExplanation": "", "HRemark": "", "HSourceInterID": EndData[i].hmainid, "HSourceEntryID": EndData[i].hsubid, "HSourceBillNo": EndData[i].单据号, "HSourceBillType": EndData[i].HBillType };
                                            buttonArr.push(checkrow);  //将之前的数据存储
                                        }
                                        table.reload("mainTable", {
                                            data: buttonArr    //将数据重新载入表格
                                        })
                                    }
                                    else {
                                        buttonArr = [];//清空数组
                                        for (var i = 0; i < EndData.length; i++) {
                                            var checkrow = {
                                                "HRepairID": rowdate[i].HRepairID, "HRepairCode": rowdate[i].HRepairCode, "HRepairName": rowdate[i].HRepairName,
                                                "HRepairExplanation": rowdate[i].HRepairExplanation, "HManagerID": rowdate[i].HManagerID, "HManagerCode": rowdate[i].HManagerCode,
                                                "HManagerName": rowdate[i].HManagerName, "HMoney": rowdate[i].HMoney, "HRemark": rowdate[i].HRemark,
                                                "HSourceInterID": EndData[i].hmainid, "HSourceEntryID": EndData[i].hsubid,
                                                "HSourceBillNo": EndData[i].单据号, "HSourceBillType": EndData[i].HBillType
                                            };
                                            buttonArr.push(checkrow);  //将之前的数据存储
                                        }
                                        table.reload("mainTable", {
                                            data: buttonArr    //将数据重新载入表格
                                        })
                                    }
                                } else {
                                    layer.alert(result.code + result.Message, { icon: 5 });
                                }
                            }, error: function () {
                                layer.alert("接口请求失败!", { icon: 5 });
                            }
                        });
                        ////按选单号加载表体数据
                        //$.ajax({
                        //    url: GetWEBURL() + 'Sb_EqpRepairWorkBill/Sb_EqpRepairWorkBillSubByHMainSourceBillNo',
                        //    type: "GET",
                        //    data: { "HMainSourceBillNo": checkStatus.data[0].单据号 },
                        //    success: function (result) {
                        //        if (result.count == 1) {
                        //            var EndData = result.data;
                        //            var rowdate = layui.table.cache["mainTable"];
                        //            if (rowdate.length == 0)  //表体数据为空时
                        //            {
                        //                buttonArr = [];//清空数组
                        //                for (var i = 0; i < checkStatus.data.length; i++) {
                        //                    var checkrow = { "HRepairID": 0, "HRepairCode": "", "HRepairName": "", "HManagerID": 0, "HManagerCode": "", "HManagerName": "", "HRepairExplanation": "", "HRemark": "", "HSourceInterID": EndData[i].hmainid, "HSourceEntryID": EndData[i].hsubid, "HSourceBillNo": EndData[i].单据号, "HSourceBillType": EndData[i].HBillType };
                        //                    buttonArr.push(checkrow);  //将之前的数据存储
                        //                }
                        //                table.reload("mainTable", {
                        //                    data: buttonArr    //将数据重新载入表格
                        //                })
                        //            }
                        //            else {
                        //                buttonArr = [];//清空数组
                        //                for (var i = 0; i < EndData.length; i++) {
                        //                    var checkrow = {
                        //                        "HRepairID": rowdate[i].HRepairID, "HRepairCode": rowdate[i].HRepairCode, "HRepairName": rowdate[i].HRepairName,
                        //                        "HRepairExplanation": rowdate[i].HRepairExplanation, "HManagerID": rowdate[i].HManagerID, "HManagerCode": rowdate[i].HManagerCode,
                        //                        "HManagerName": rowdate[i].HManagerName, "HMoney": rowdate[i].HMoney, "HRemark": rowdate[i].HRemark,
                        //                        "HSourceInterID": EndData[i].hmainid, "HSourceEntryID": EndData[i].hsubid,
                        //                        "HSourceBillNo": EndData[i].单据号, "HSourceBillType": EndData[i].HBillType
                        //                    };
                        //                    buttonArr.push(checkrow);  //将之前的数据存储
                        //                }
                        //                table.reload("mainTable", {
                        //                    data: buttonArr    //将数据重新载入表格
                        //                })
                        //            }
                        //        } else {
                        //            layer.alert(result.code + result.Message, { icon: 5 });
                        //        }
                        //    }, error: function () {
                        //        layer.alert("接口请求失败!", { icon: 5 });
                        //    }
                        //});
                        layer.close(layer.index); //它获取的始终是最新弹出的某个层,值是由layer内部动态递增计算的
                    }
                    , btn2: function (index, layero) {
@@ -668,10 +668,10 @@
                    , { field: 'HManagerName', title: '负责人', edit: 'text' }
                    , { field: 'HRepairExplanation', title: '维修要求', edit: 'text' }
                    , { field: 'HRemark', title: '备注', event: "", edit: 'text' }
                    , { field: 'HSourceInterID', title: '源单主内码' }
                    , { field: 'HSourceEntryID', title: '源单子内码' }
                    , { field: 'HSourceBillNo', title: '源单单号' }
                    , { field: 'HSourceBillType', title: '源单类型' }
                    //, { field: 'HSourceInterID', title: '源单主内码' }
                    //, { field: 'HSourceEntryID', title: '源单子内码' }
                    //, { field: 'HSourceBillNo', title: '源单单号' }
                    //, { field: 'HSourceBillType', title: '源单类型' }
                    , { fixed: 'right', title: '操作', toolbar: '#barDemo', width: 150 }
                ];
                option = {
@@ -692,7 +692,7 @@
            function set_AddFNew() {
                //获取最大单据号
                get_MAXNum();
                option.data = [{ "HRepairID": 0, "HRepairCode": "", "HRepairName": "", "HManagerID": 0, "HManagerCode": "", "HManagerName": "", "HRepairExplanation": "", "HRemark": "", "HSourceInterID": 0, "HSourceEntryID": 0, "HSourceBillNo": " ", "HSourceBillType": " " }];
                option.data = [{ "HRepairID": 0, "HRepairCode": "", "HRepairName": "", "HManagerID": 0, "HManagerCode": "", "HManagerName": "", "HRepairExplanation": "", "HRemark": ""/*, "HSourceInterID": 0, "HSourceEntryID": 0, "HSourceBillNo": " ", "HSourceBillType": " "*/ }];
                table.render(option);
            }
@@ -720,7 +720,7 @@
            function set_EditFromGrid() {
                set_EditForm(linterid);  //编辑获取表头
                set_EditGrid(linterid);  //编辑获取表体
                option.data = [{ "HRepairID": 0, "HRepairCode": "", "HRepairName": "", "HManagerID": 0, "HManagerCode": "", "HManagerName": "", "HRepairExplanation": "", "HRemark": "", "HSourceInterID": 0, "HSourceEntryID": 0, "HSourceBillNo": " ", "HSourceBillType": " " }];
                option.data = [{ "HRepairID": 0, "HRepairCode": "", "HRepairName": "", "HManagerID": 0, "HManagerCode": "", "HManagerName": "", "HRepairExplanation": "", "HRemark": ""/*, "HSourceInterID": 0, "HSourceEntryID": 0, "HSourceBillNo": " ", "HSourceBillType": " " */}];
                table.render(option);
            }
WebTM/views/É豸¹ÜÀí/Sb_EqpMaintenanceBillList.html
@@ -189,6 +189,7 @@
                        , { field: '设备名称', title: '设备名称', width: 200 }
                        , { field: '设备规格', title: '设备规格', width: 200 }
                        , { field: '设备型号', title: '设备型号', width: 200 }
                        , { field: 'HMainSourceBillNo', title: '源单单号', width: 200 }
                        , { field: 'HRepairID', title: 'HRepairID', width: 200, hide: true }
                        , { field: '维修项目代码', title: '维修项目代码', width: 200 }
                        , { field: '维修项目', title: '维修项目', width: 160 }