WebTM/views/°¸Àý´úÂë/»ªÔ¶/HY_HistogramReport.html
@@ -41,6 +41,12 @@
                                        <input type="text" class="layui-input" name="HBarCode_Set" id="HBarCode_Set">
                                    </div>
                                </div>
                                <div class="layui-inline">
                                    <div class="layui-input-block" style="margin-left: 0px;">
                                        <input type="checkbox" name="checkbox_isAVI" id="checkbox_isAVI" lay-skin="primary" lay-filter="checkbox_isAVI" checked title="AVI">
                                        <input type="hidden" value="true" name="isAVI" id="isAVI" lay-verify="isAVI">
                                    </div>
                                </div>
                                <button class="layui-btn layuiadmin-btn-order" type="button" lay-submit="" lay-filter="btnSearch" id="btnSearch">
                                    <i class="layui-icon layui-icon-search layuiadmin-button-btn"></i>
                                </button>
@@ -96,6 +102,11 @@
            });
            //#endregion
            //#region AVI复选框
            form.on('checkbox(checkbox_isAVI)', function (data) {
                $("#isAVI").val(data.elem.checked);
            });
            //#endregion
            //#region æœ¬é¡µé¢æ‰€æœ‰è¢«è°ƒç”¨çš„æ–¹æ³•
            //#region åˆå§‹åŒ–界面
@@ -256,25 +267,74 @@
                            HContainerElement_Set.className = "layui-inline";
                            HContainerElement_Set.style = "margin-left:20px;margin-top:20px;";
                            //在每一个set上的各个列最上方增加列索引
                            var HSetNo_ForRowIndex = data[0]["HSetNo"];
                            for (var j = 0; j < data.length; j++) {
                                if (data[j]["HSetNo"] == HSetNo_ForRowIndex && data[j]["HPosition_x"] == "1") {
                                    //列索引容器
                                    var HContainerElement_RowIndex = document.createElement('div');                                 //列索引容器
                                    HContainerElement_RowIndex.style = "border: 2px solid black;color:white;";
                                    HContainerElement_RowIndex.className = "layui-inline";
                                    //列索引按钮
                                    var HButtonElement_RowIndex = document.createElement('div');                                 //列索引容器中的按钮
                                    HButtonElement_RowIndex.className = "layui-btn layuiadmin-btn-order";
                                    HButtonElement_RowIndex.style = "background-color:black;color:white;width:18px;";
                                    HButtonElement_RowIndex.innerHTML = data[j]["HPosition_y"];
                                    //将列索引按钮添加到列索引容器对象中
                                    HContainerElement_RowIndex.appendChild(HButtonElement_RowIndex);
                                    //将列索引容器添加到set容器对象中
                                    HContainerElement_Set.appendChild(HContainerElement_RowIndex);
                                } else {
                                    var HBrElement_PCS = document.createElement('br');
                                    HContainerElement_Set.appendChild(HBrElement_PCS);
                                    break;
                                }
                            }
                            //将set容器添加到直方图容器对象中
                            HContainerElement.appendChild(HContainerElement_Set);
                            //记录 å½“前set容器id
                            HCurrentElementID_Set = data[i]["HSetNo"];
                        }
                        //根据 å½“前set容器id èŽ·å– å½“前set容器对象
                        var HCurrentElement_Set = document.getElementById(HCurrentElementID_Set);
                        //在每一个set上的各个行前增加行索引
                        if ((data[i]["HSetNo"] == HCurrentElementID_Set && data[i]["HPosition_x"] != HPosition_x) || (data[i]["HSetNo"] == HCurrentElementID_Set && data[i]["HPosition_x"] == "1" && data[i]["HPosition_y"] == "1")) {             //相同set容器中,当前PCS的行索引与上一个PCS的行索引不一致,则换行,并设置列坐标
                            //列索引容器
                            var HContainerElement_ColIndex = document.createElement('div');                                 //行索引容器
                            HContainerElement_ColIndex.style = "border: 2px solid black;color:white;";
                            HContainerElement_ColIndex.className = "layui-inline";
                            HContainerElement_ColIndex.innerHTML = data[i]["HPosition_x"];
                            if (data[i]["HSetNo"] == HSetNo && data[i]["HPosition_x"] != HPosition_x) {                     //相同set容器中,当前PCS的行索引与上一个PCS的行索引不一致,则换行
                                var HBrElement_PCS = document.createElement('br');
                                HCurrentElement_Set.appendChild(HBrElement_PCS);
                            }
                            //将行索引容器容器添加到set容器对象中
                            HCurrentElement_Set.appendChild(HContainerElement_ColIndex);
                        }
                        //PCS容器
                        var HContainerElement_PCS = document.createElement('div');                              //PCS容器
                        HContainerElement_PCS.id = data[i]["HPCSNo"];                                           //PCS容器的id为PCS号
                        HContainerElement_PCS.style = "border: 2px solid black;";      //设置PCS的图标
                        HContainerElement_PCS.className = "layui-inline";
                        if (data[i]["HSetNo"] == HSetNo && data[i]["HPosition_x"] != HPosition_x) {             //相同set容器中,当前PCS的行索引与上一个PCS的行索引不一致,则换行
                            var HBrElement_PCS = document.createElement('br');
                            HCurrentElement_Set.appendChild(HBrElement_PCS);
                        }
                        //if (data[i]["HSetNo"] == HSetNo && data[i]["HPosition_x"] != HPosition_x) {             //相同set容器中,当前PCS的行索引与上一个PCS的行索引不一致,则换行
                        //    var HBrElement_PCS = document.createElement('br');
                        //    HCurrentElement_Set.appendChild(HBrElement_PCS);
                        //}
                        //PCS数据维护按钮
                        var HButtonElement_PCS = document.createElement('button');                              //PCS容器中的按钮
@@ -282,10 +342,16 @@
                        HButtonElement_PCS.setAttribute('lay-filter', data[i]["HPCSNo"] + "_Button");
                        HButtonElement_PCS.type = "button";
                        HButtonElement_PCS.className = "layui-btn layuiadmin-btn-order";
                        if (data[i]["HIsBadFlag"] == "1" && data[i]["HCheckProc"] == "炬森VRS内层") {
                        if (data[i]["HIsBadFlag"] == "1" && data[i]["HCheckProc"] == "炬森VRS内层" && (data[i]["HPageIndex"] == "L4" || data[i]["HPageIndex"] == "L5") ) {
                            HButtonElement_PCS.style = "background-image: url('" + HIconUrl + "'); background-size: cover; background-position: center; background-repeat: no-repeat;background-color:red;";
                        }
                        else if (data[i]["HIsBadFlag"] == "1" && data[i]["HCheckProc"] == "炬森VRS外层") {
                        else if (data[i]["HIsBadFlag"] == "1" && data[i]["HCheckProc"] == "炬森VRS内层" && (data[i]["HPageIndex"] == "L3" || data[i]["HPageIndex"] == "L6")) {
                            HButtonElement_PCS.style = "background-image: url('" + HIconUrl + "'); background-size: cover; background-position: center; background-repeat: no-repeat;background-color:pink;";
                        }
                        else if (data[i]["HIsBadFlag"] == "1" && data[i]["HCheckProc"] == "炬森VRS内层" && (data[i]["HPageIndex"] == "L2" || data[i]["HPageIndex"] == "L7")) {
                            HButtonElement_PCS.style = "background-image: url('" + HIconUrl + "'); background-size: cover; background-position: center; background-repeat: no-repeat;background-color:white;";
                        }
                        else if (data[i]["HIsBadFlag"] == "1" && data[i]["HCheckProc"] == "炬森VRS外层" && (data[i]["HPageIndex"] == "LT" || data[i]["HPageIndex"] == "LB")) {
                            HButtonElement_PCS.style = "background-image: url('" + HIconUrl + "'); background-size: cover; background-position: center; background-repeat: no-repeat;background-color:orange;";
                        }
                        else if (data[i]["HIsBadFlag"] == "1" && data[i]["HCheckProc"] == "AVI") {
@@ -337,19 +403,39 @@
                                var SetNo = SetElement_Div.id;                                                              //set号
                                var title = "PNL条码编号:" + HBarCode_PNL_Note + ";set号:" + SetNo + ";PCS号:" + PCSNo;
                                layer.open({
                                    type: 2
                                    , skin: "layui-layer-rim" //加上边框
                                    , title: "PCS检验信息维护(" + title + ")"  //标题
                                    , closeBtn: 1  //窗体右上角关闭 çš„ æ ·å¼
                                    , shift: 2 //弹出动画
                                    , area: ["50%", "80%"] //窗体大小
                                    , maxmin: true //设置最大最小按钮是否显示
                                    , content: ['./HY_HistogramReport_ForPCSCheckNote.html?HBarCode_PNL=' + HBarCode_PNL_Note + "&HSetNo=" + SetNo + "&PCSNo=" + PCSNo, "yes"]
                                    , end: function () {
                                        $("#btnSearch").trigger('click');
                                    }
                                })
                                var isAVI = $("#isAVI").val();
                                if (isAVI=="true") {
                                    layer.open({
                                        type: 2,
                                        skin: 'layui-layer-rim', //加上边框
                                        title: 'AVI新增(' + title + ')',
                                        closeBtn: 1,
                                        shift: 2,
                                        area: ['100%', '100%'],
                                        maxmin: true,
                                        content: '../../质量管理/PNL检验信息/QC_CheckNote_PNL_TempEdit.html?OperationType=6&linterid=&HSouceBillType=10004&HBarCode_PNL=' + HBarCode_PNL_Note + "&HSetNo=" + SetNo + "&HPCSNo=" + PCSNo,
                                        end: function () {
                                            //刷新页面,
                                            get_FastQuery();
                                        }
                                    });
                                } else {
                                    layer.open({
                                        type: 2
                                        , skin: "layui-layer-rim" //加上边框
                                        , title: "PCS检验信息维护(" + title + ")"  //标题
                                        , closeBtn: 1  //窗体右上角关闭 çš„ æ ·å¼
                                        , shift: 2 //弹出动画
                                        , area: ["50%", "80%"] //窗体大小
                                        , maxmin: true //设置最大最小按钮是否显示
                                        , content: ['./HY_HistogramReport_ForPCSCheckNote.html?HBarCode_PNL=' + HBarCode_PNL_Note + "&HSetNo=" + SetNo + "&PCSNo=" + PCSNo, "yes"]
                                        , end: function () {
                                            $("#btnSearch").trigger('click');
                                        }
                                    })
                                }
                            });
                        }
                    }