1
wangbin
2024-07-08 3dfe7dfe993869c8a44e9ccf177849abe98ca8d0
WebTM/views/ÖÊÁ¿¹ÜÀí/¼ìÑé·½°¸µ¥/QC_Add_CheckProject.html
@@ -534,7 +534,7 @@
                    Pub_Close(2);
                } else {
                    Pub_Close(1);
                }
                }
                //var index = parent.layer.getFrameIndex(window.name); //先得到当前iframe层的索引
                //parent.layer.close(index); //再执行关闭
            });
@@ -647,7 +647,11 @@
                                        }
                                        //将批量选择的数据写入数组(多选行)
                                        for (var i = 0; i < checkStatus.data.length; i++) {
                                            buttonArr.push({ "HPrjNo": i + 1, "HQCCheckItemID": checkStatus.data[i].HItemID, "HQCCheckItemNumber": checkStatus.data[i].代码, "HQCCheckItemName": checkStatus.data[i].名称, "HQCStd": "", "HQCStdMax": "", "HQCUnit": "", "HRemark": "" });
                                            buttonArr.push({
                                                "HPrjNo": i + 1, "HQCCheckItemID": checkStatus.data[i].HItemID, "HQCCheckItemNumber": checkStatus.data[i].代码, "HQCCheckItemName": checkStatus.data[i].名称, "HQCStd": "", "HQCStdMax": "", "HQCUnit": "", "HRemark": ""
                                                , "HTargetVal": 0, "HUpLimit": 0, "HDownLimit": 0, "HUpOffSet": 0, "HDownOffSet": 0, "HTargetValB": 0, "HUpLimitB": 0, "HDownLimitB": 0, "HUpOffSetB": 0, "HDownOffSetB": 0, "HTargetValQ": 0, "HUpLimitQ": 0, "HDownLimitQ": 0, "HUpOffSetQ": 0
                                                , "HDownOffSetQ": 0
                                            });
                                        }
                                        table.reload("mainTable", {
@@ -943,7 +947,7 @@
                    , done: function (res, curr, count) {
                    }
                };
                };
            }
            //保存
@@ -1235,18 +1239,23 @@
            //增加一行
            function btnAddLine(NewRow) {
                //table.cache["mainTable"].push(NewRow);
                //option.data = table.cache["mainTable"];
                //table.render(option);
                var tableBak = table.cache["mainTable"]; //获取之前编辑过的表格数据
                buttonArr = [];//清空数组
                for (var i = 0; i < tableBak.length; i++) {
                    buttonArr.push(tableBak[i]);  //将之前的数据存储
                table.cache["mainTable"].push(NewRow);
                option.data = table.cache["mainTable"];
                table.render(option);
                for (var i = 1; i <= option.data.length; i++) {
                    $('#HAnalysisMethod' + i + '').find("option[value='" + option.data[i - 1].HAnalysisMethod + "']").attr("selected", true);
                    $('#HDefectLevel' + i + '').find("option[value='" + option.data[i - 1].HDefectLevel + "']").attr("selected", true);
                    $('#HStatus' + i + '').find("option[value='" + option.data[i - 1].HStatus + "']").attr("selected", true);
                    if (option.data[i - 1].HDestructInspect) {
                        $('#HDestructInspect' + i + '').attr("checked", true);
                    }
                    if (option.data[i - 1].HKeyInspect) {
                        $('#HKeyInspect' + i + '').attr("checked", true);
                    }
                }
                buttonArr.push(NewRow);  //在尾部加一行
                table.reload("mainTable", {
                    data: buttonArr    //将数据重新载入表格
                })
                form.render('select');
                form.render('checkbox');
            }
            //复制一行
@@ -1264,6 +1273,20 @@
                    table.cache["mainTable"].push(JSON.parse(copyrow));//将复制的行强转成json追加到表格上
                    option.data = table.cache["mainTable"];//将数据绑定到data上
                    table.render(option);//将数据渲染到表格上
                    for (var i = 1; i <= option.data.length; i++) {
                        $('#HAnalysisMethod' + i + '').find("option[value='" + option.data[i - 1].HAnalysisMethod + "']").attr("selected", true);
                        $('#HDefectLevel' + i + '').find("option[value='" + option.data[i - 1].HDefectLevel + "']").attr("selected", true);
                        $('#HStatus' + i + '').find("option[value='" + option.data[i - 1].HStatus + "']").attr("selected", true);
                        if (option.data[i - 1].HDestructInspect) {
                            $('#HDestructInspect' + i + '').attr("checked", true);
                        }
                        if (option.data[i - 1].HKeyInspect) {
                            $('#HKeyInspect' + i + '').attr("checked", true);
                        }
                    }
                    form.render('select');
                    form.render('checkbox');
                }
            }