1
duhe
2024-07-15 a2574099d74dbc873b9a8316500bdd79da516e68
WebTM/views/ÖÊÁ¿¹ÜÀí/ÖÊÁ¿±¨±í/QC_InspectionFormReport.html
@@ -96,7 +96,9 @@
                                        <div class="layui-inline">
                                            <label class="layui-form-label" style="width: 85px;">上限</label>
                                            <div class="layui-input-block" style="margin-left: 120px;">
                                                <input type="text" class="layui-input" name="HUpLoad" id="HUpLoad">
                                                <input type="text" class="layui-input" name="HUpLimit" id="HUpLimit" style="background-color:#efefef4d;" readonly>
                                                <input type="hidden" class="layui-input" name="HControlUpperLimit" id="HControlUpperLimit" >
                                                <input type="hidden" class="layui-input" name="HControlLowerLimit" id="HControlLowerLimit" >
                                            </div>
                                        </div>
                                    </div>
@@ -112,21 +114,21 @@
                                            </div>
                                        </div>
                                        <div class="layui-inline">
                                            <label class="layui-form-label" style="width: 85px;">测量单位</label>
                                            <label class="layui-form-label" style="width: 85px;">穴号</label>
                                            <div class="layui-input-block" style="margin-left: 120px;">
                                                <input type="text" class="layui-input" id="HUnitName">
                                                <input type="text" class="layui-input" id="HMouldNum" name="HMouldNum">
                                            </div>
                                        </div>
                                        <div class="layui-inline">
                                            <label class="layui-form-label" style="width: 85px;">标准值</label>
                                            <div class="layui-input-block" style="margin-left: 120px;">
                                                <input type="text" class="layui-input" id="HStandard">
                                                <input type="text" class="layui-input" name="HTargetVal" id="HTargetVal">
                                            </div>
                                        </div>
                                        <div class="layui-inline">
                                            <label class="layui-form-label" style="width: 85px;">下限</label>
                                            <div class="layui-input-block" style="margin-left: 120px;">
                                                <input type="text" class="layui-input" id="HDownLoad">
                                                <input type="text" class="layui-input" name="HDownLimit" id="HDownLimit" style="background-color:#efefef4d;" readonly>
                                            </div>
                                        </div>
                                    </div>
@@ -162,10 +164,10 @@
                        </div>
                        <div>
                            <table class="" id="mainTable" lay-filter="mainTable"></table>
                            <div id="histogram_Avg" style="width:99.5%;height:calc(35vh);margin-top:5px;">
                            <div id="histogram_Avg" style="width:99.5%;height:calc(100vh);margin-top:5px;">
                            </div>
                            <div id="histogram_Diff" style="width:99.5%;height:calc(35vh);margin-top:5px;">
                            <div id="histogram_Diff" style="width:99.5%;height:calc(100vh);margin-top:15px;">
                            </div>
                        </div>
@@ -372,13 +374,18 @@
                    data: { "sWhere": sWhere, "user": sessionStorage["HUserName"] },
                    success: function (data1) {
                        if (data1.count == 1) {
                            layer.close(wait);
                            var limit = parseInt($("#limit").val());//样本数
                            if (limit > data1.data.length - 3) {
                                layer.msg("取样数量超过实际数量!", { icon: 5 });
                            } else {
                            option.data = data1.data;
                            optionAVG = data1.data[limit + 1];
                            optionS = data1.data[limit + 2];
                            table.render(option);
                            layer.close(wait);
                            set_Line();
                            }
                        } else {
                            layer.close(wait);
                            layer.alert(data1.Message, { icon: 5 });
@@ -443,8 +450,8 @@
                    }
                }
                for (let i = 1; i <= Days; i++) {
                    H_X.push(i);
                for (let i = 0; i <= Days; i++) {
                    H_X.push(i + 1);
                }
                option_ZXT_Avg = {
@@ -463,7 +470,10 @@
                        data: H_X
                    },
                    yAxis: {
                        type: 'value'
                        type: 'value',
                        min: parseInt($("#HTargetVal").val()) + parseInt($("#HDownLimit").val()) - 1, // è®¾ç½®æœ€å°å€¼
                        max: parseInt($("#HTargetVal").val()) + parseInt($("#HUpLimit").val()) + 1, // è®¾ç½®æœ€å¤§å€¼
                        interval: 0.1, // è®¾ç½®é—´è·
                    },
                    series: [
                        {
@@ -484,14 +494,21 @@
                                    globalCoord: false// ç¼ºçœä¸º false
                                }
                            },
                            itemStyle: { normal: { label: { show: true } } },
                            markLine: {
                                symbol: 'none',//去掉箭头
                                data: [
                                    { type: 'max', name: 'Max', lineStyle: { color: 'red' } },
                                    { type: 'average', name: 'Avg', lineStyle: { color: 'blue' } },
                                    { type: 'min', name: 'Min', lineStyle: { color: 'green' } },
                                    { yAxis: $("#HUpLimit").val(), lineStyle: { color: '#FF1D00' }, label: { color: '#FF1D00', fontSize: 10 } },
                                    {
                                        yAxis: $("#HDownLimit").val(), lineStyle: { color: '#FF1D00' }, label: { color: '#FF1D00', fontSize: 10 }
                                    },
                                    {
                                        yAxis: $("#HControlUpperLimit").val(), lineStyle: { color: '#2cb615' }, label: { color: '#2cb615', fontSize: 10 }
                                    },
                                    {
                                        yAxis: $("#HControlLowerLimit").val(), lineStyle: { color: '#2cb615' }, label: { color: '#2cb615', fontSize: 10 }
                                    }
                                ]
                            },
                        }
                    ]
@@ -540,14 +557,15 @@
                                    globalCoord: false// ç¼ºçœä¸º false
                                }
                            },
                            markLine: {
                                symbol: 'none',//去掉箭头
                                data: [
                                    { type: 'max', name: 'Max', lineStyle: { color: 'red' } },
                                    { type: 'average', name: 'Avg', lineStyle: { color: 'blue' } },
                                    { type: 'min', name: 'Min', lineStyle: { color: 'green' } },
                                ]
                            },
                            itemStyle: { normal: { label: { show: true } } },
                            //markLine: {
                            //    symbol: 'none',//去掉箭头
                            //    data: [
                            //        { type: 'max', name: 'Max', lineStyle: { color: 'red' } },
                            //        { type: 'average', name: 'Avg', lineStyle: { color: 'blue' } },
                            //        { type: 'min', name: 'Min', lineStyle: { color: 'green' } },
                            //    ]
                            //},
                        }
                    ]
                };
@@ -599,6 +617,7 @@
                var limit = $("#limit").val();//样本数
                var HMaterID = $("#HMaterID").val();//物料
                var HQCCheckItemID = $("#HQCCheckItemID").val();//检验项目
                var HMouldNum = $("#HMouldNum").val();//穴号
                if (limit == 0) {
                    return layer.msg("样本数量不能为0!");
@@ -619,6 +638,7 @@
                    , limit: limit
                    , HMaterID: HMaterID
                    , HQCCheckItemID: HQCCheckItemID
                    , HMouldNum: HMouldNum
                }
                //初始化表格
                set_InitGrid();
@@ -673,12 +693,42 @@
                        //获取数据
                        $("#HQCCheckItemID").val(checkStatus.data[0].HItemID);
                        $("#HQCCheckItemNumber").val(checkStatus.data[0].代码);
                        btnCheckProjectList();
                        layer.close(index); //它获取的始终是最新弹出的某个层,值是由layer内部动态递增计算的
                    }
                    , btn2: function (index, layero) { }
                })
            }
            //检验方案
            function btnCheckProjectList() {
                var sWheres = " and æ£€éªŒé¡¹ç›®ä»£ç ='" + $("#HQCCheckItemNumber").val() + "'";
                var wait = layer.load();//遮罩
                $.ajax({
                    url: GetWEBURL() + '/QC_Management/MES_QC_CheckProjectListProjectDetaiList',
                    type: "GET",
                    async: false,
                    data: { "sWhere": sWheres, "user": sessionStorage["HUserName"] },
                    success: function (data1) {
                        if (data1.count == 1) {
                            layer.close(wait);
                            $("#HUpLimit").val(data1.data[0].上限值);
                            $("#HDownLimit").val(data1.data[0].下限值);
                            $("#HTargetVal").val(data1.data[0].目标值);
                            $("#HControlUpperLimit").val(data1.data[0].控制上限);
                            $("#HControlLowerLimit").val(data1.data[0].控制下限);
                        } else {
                            layer.close(wait);
                            layer.alert(data1.Message, { icon: 5 });
                        }
                    }, error: function () {
                        layer.close(wait);
                        layer.alert("接口请求失败!", { icon: 5 });
                    }
                });
            }
            //重置过滤条件
            function set_ClearQuery() {