1
wtt
2025-06-16 4833c912a263af12b1f4e32eac1f8da63f8dfd08
WebTM/views/ÖÊÁ¿¹ÜÀí/Ê×¼þ¼ìÑéµ¥/QC_Add_Edit_FirstPieceCheckBill.html
@@ -47,19 +47,18 @@
        <div class="layui-card" style="padding: 2px;background-color: #efefef;">
            <div class="layui-card-body" style="padding: 1px;">
                <form class="layui-form" action="" lay-filter="formData" style="background-color:white;">
                    <div style="padding: 10px;">
                        <!--<button class="layui-btn layuiadmin-btn-order main-btn" type="button" lay-submit="" lay-filter="btnSearch" id="btnSearch">
                            <i class="layui-icon layui-icon-print layuiadmin-button-btn"><span class="btn-title">预览</span></i>
                        </button>-->
                        <!--<button class="layui-btn layuiadmin-btn-order main-btn" type="button" lay-submit="" lay-filter="btnSearch" id="btnSearch">
                            <i class="layui-icon layui-icon-edit layuiadmin-button-btn"><span class="btn-title">修改</span></i>
                        </button>-->
                        <button type="button" class="layui-btn layui-btn-normal" style="margin-left: 0px" lay-submit="" lay-filter="btn-AddNew" id="btn-AddNew">新增</button>
                        <button type="button" class="layui-btn layui-btn-normal" style="margin-left: 0px" lay-submit="" lay-filter="btnSave" id="btnSave">保存</button>
                        <button type="button" class="layui-btn layui-btn-normal" style="margin-left: 0px" lay-submit="" lay-filter="btn-Exit" id="btn-Exit">退出</button>
                    <div style="position: relative; display: flex; align-items: center; padding: 10px;">
                        <!-- æŒ‰é’®ç»„ -->
                        <div style="z-index: 1;">
                            <button type="button" class="layui-btn layui-btn-normal" lay-submit="" lay-filter="btn-AddNew" id="btn-AddNew">新增</button>
                            <button type="button" class="layui-btn layui-btn-normal" lay-submit="" lay-filter="btnSave" id="btnSave">保存</button>
                            <button type="button" class="layui-btn layui-btn-normal" lay-submit="" lay-filter="btn-Exit" id="btn-Exit">退出</button>
                            <button type="button" class="layui-btn layui-btn-normal" lay-submit="" lay-filter="btn-SIP" id="btn-SIP">SIP查看</button>
                        </div>
                        <!-- æ ‡é¢˜ï¼Œä½¿ç”¨ç»å¯¹å®šä½ä½¿å…¶åœ¨çˆ¶å®¹å™¨å†…居中 -->
                        <h1 style="position: absolute; left: 50%; transform: translateX(-50%); z-index: 0; text-align: center; width: fit-content; margin: 0; padding: 0 10px;"><b>首件检验单</b></h1>
                    </div>
                    <div class="layui-tab" lay-filter="tab-POStockInBill">
                        <h1 style="text-align: center; padding: 10px 0;"><b>首件检验单</b></h1>
                    <div class="layui-tab" lay-filter="tab-POStockInBill">
                        <ul class="layui-tab-title" lay-filter="tab-all">
                            <li lay-id="1" style="padding:1px;" class="layui-this">基本信息</li>
                            <li lay-id="2" style="padding:1px;">制单信息</li>
@@ -92,30 +91,6 @@
                                                <input type="hidden" name="HSourceID" id="HSourceID" value="0">
                                            </div>
                                        </div>
                                    </div>
                                    <div class="layui-row">
                                        <div class="layui-inline">
                                            <label class="layui-form-label" style="width: 85px;padding: 9px 18px;">任务单号</label>
                                            <div class="layui-input-block" style="margin-left: 77px;">
                                                <input type="text" class="layui-input" name="HICMOBillNo" id="HICMOBillNo" style="background-color:#efefef4d;width: 60%;display: inline-block;" readonly>
                                                <button class="layui-btn layuiadmin-btn-order" type="button" lay-submit="" lay-filter="btnSearchICMOBill" id="btnSearchICMOBill" style="padding: 0 10px;float: right;margin-right: 3px;">
                                                    <i class="layui-icon layui-icon-search layuiadmin-button-btn"></i>
                                                </button>
                                            </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" name="HICMOQty" id="HICMOQty" style="background-color:#efefef4d;" readonly>
                                            </div>
                                        </div>
                                        <div class="layui-inline" style="display: none">
                                            <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="HICMOInterID" id="HICMOInterID" value="0" style="background-color:#efefef4d;" readonly>
                                                <input type="hidden" name="HICMOEntryID" id="HICMOEntryID" value="0">
                                            </div>
                                        </div>
                                        <div class="layui-inline">
                                            <label class="layui-form-label" style="width: 85px;padding: 9px 18px;">生产班次</label>
                                            <div class="layui-input-block" style="margin-left: 77px;">
@@ -128,46 +103,47 @@
                                        </div>
                                    </div>
                                    <div class="layui-row">
                                        <div class="layui-inline" id="hidediv1">
                                            <label class="layui-form-label" style="width: 85px;">流转卡数量</label>
                                        <div class="layui-inline">
                                            <label class="layui-form-label" style="width: 85px;padding: 9px 18px;">任务单号</label>
                                            <div class="layui-input-block" style="margin-left: 77px;">
                                                <input type="text" class="layui-input" name="HICMOBillNo" id="HICMOBillNo" style="background-color:#efefef4d;width: 60%;display: inline-block;" readonly>
                                                <input type="hidden" class="layui-input" name="HICMOInterID" id="HICMOInterID" value="0" style="background-color:#efefef4d;" readonly>
                                                <input type="hidden" name="HICMOEntryID" id="HICMOEntryID" value="0">
                                                <button class="layui-btn layuiadmin-btn-order" type="button" lay-submit="" lay-filter="btnSearchICMOBill" id="btnSearchICMOBill" style="padding: 0 10px;float: right;margin-right: 3px;">
                                                    <i class="layui-icon layui-icon-search layuiadmin-button-btn"></i>
                                                </button>
                                            </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" name="HProcExchQty" id="HProcExchQty" style="background-color:#efefef4d;" readonly value="1">
                                                <input type="text" class="layui-input" name="HICMOQty" id="HICMOQty" style="background-color:#efefef4d;" readonly value="0">
                                            </div>
                                        </div>
                                        <div class="layui-inline" id="hidediv2">
                                            <label class="layui-form-label" style="width: 85px;padding: 9px 18px;">流转卡号</label>
                                            <div class="layui-input-block" style="margin-left: 77px;">
                                                <input type="text" class="layui-input" name="HProcExchBillNo" id="HProcExchBillNo" style="background-color:#efefef4d;width: 60%;display: inline-block;" readonly>
                                                <input type="hidden" class="layui-input" name="HProcExchInterID" id="HProcExchInterID" value="0" style="background-color:#efefef4d;" readonly>
                                                <input type="hidden" class="layui-input" name="HProcExchEntryID" id="HProcExchEntryID" value="0" style="background-color:#efefef4d;" readonly>
                                                <button class="layui-btn layuiadmin-btn-order" type="button" lay-submit="" lay-filter="btnSearchProcExch" id="btnSearchProcExch" style="padding: 0 10px;float: right;margin-right: 3px;">
                                                    <i class="layui-icon layui-icon-search layuiadmin-button-btn"></i>
                                                </button>
                                            </div>
                                        </div>
                                        <div class="layui-inline">
                                            <label class="layui-form-label" style="width: 85px;">批号</label>
                                        </div>
                                        <div class="layui-inline" id="hidediv1">
                                            <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="HBatchNo" id="HBatchNo" style="">
                                                <input type="text" class="layui-input" name="HProcExchQty" id="HProcExchQty" style="background-color:#efefef4d;" readonly value="0">
                                            </div>
                                        </div>
                                    </div>
                                    <div class="layui-row">
                                        <div class="layui-inline" style="display: none">
                                            <label class="layui-form-label" style="width: 85px;">流转卡ID</label>
                                            <div class="layui-input-block" style="margin-left: 120px;">
                                                <input type="text" class="layui-input" name="HProcExchInterID" id="HProcExchInterID" value="0" style="background-color:#efefef4d;" readonly>
                                            </div>
                                        </div>
                                        <div class="layui-inline" style="display: none">
                                            <label class="layui-form-label" style="width: 85px;">流转卡子ID</label>
                                            <div class="layui-input-block" style="margin-left: 120px;">
                                                <input type="text" class="layui-input" name="HProcExchEntryID" id="HProcExchEntryID" value="0" style="background-color:#efefef4d;" readonly>
                                            </div>
                                        </div>
                                        <div class="layui-inline">
                                            <label class="layui-form-label" style="width: 85px;padding: 9px 18px;">产品名称</label>
                                            <div class="layui-input-block" style="margin-left: 77px;">
                                                <input type="text" class="layui-input" name="HMaterName" id="HMaterName" value="" style="background-color:#efefef4d;width: 60%;display: inline-block;" readonly>
                                                <input type="text" class="layui-input" name="HMaterID" id="HMaterID" value="0" style="background-color:#efefef4d;width: 60%;display: none;" readonly>
                                                <input type="hidden" class="layui-input" name="HMaterID" id="HMaterID" value="0" style="background-color:#efefef4d;width: 60%;display: none;" readonly>
                                                <button class="layui-btn layuiadmin-btn-order" type="button" lay-submit="" lay-filter="btnSearchMater" id="btnSearchMater" style="padding: 0 10px;float: right;margin-right: 3px;">
                                                    <i class="layui-icon layui-icon-search layuiadmin-button-btn"></i>
                                                </button>
@@ -177,24 +153,55 @@
                                            <label class="layui-form-label" style="width: 85px;padding: 9px 18px;">检验员</label>
                                            <div class="layui-input-block" style="margin-left: 77px;">
                                                <input type="text" class="layui-input" name="HFirstCheckEmpName" id="HFirstCheckEmpName" style="background-color:#efefef4d;width: 60%;display: inline-block;" readonly>
                                                <input type="hidden" name="HFirstCheckEmp" id="HFirstCheckEmp" value="0">
                                                <button class="layui-btn layuiadmin-btn-order" type="button" lay-submit="" lay-filter="btnSearchHFirstCheckEmp" id="btnSearchHFirstCheckEmp" style="padding: 0 10px;float: right;margin-right: 3px;">
                                                    <i class="layui-icon layui-icon-search layuiadmin-button-btn"></i>
                                                </button>
                                                <input type="hidden" name="HFirstCheckEmp" id="HFirstCheckEmp" value="0">
                                            </div>
                                        </div>
                                        <div class="layui-inline">
                                            <label class="layui-form-label" style="width: 85px;padding: 9px 18px;">检验方案</label>
                                            <div class="layui-input-block" style="margin-left: 77px;">
                                                <input type="text" class="layui-input" name="HQCSchemeName" id="HQCSchemeName" style="background-color:#efefef4d;width: 60%;display: inline-block;" readonly>
                                                <input type="hidden" name="HQCSchemeID" id="HQCSchemeID" value="0">
                                                <button class="layui-btn layuiadmin-btn-order" type="button" lay-submit="" lay-filter="btnSearchQCScheme" id="btnSearchQCScheme" style="padding: 0 10px;float: right;margin-right: 3px;">
                                                    <i class="layui-icon layui-icon-search layuiadmin-button-btn"></i>
                                                </button>
                                                <input type="hidden" name="HQCSchemeID" id="HQCSchemeID" value="0">
                                            </div>
                                        </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" name="HBatchNo" id="HBatchNo" style="">
                                            </div>
                                        </div>
                                    </div>
                                    <div class="layui-row">
                                        <div class="layui-inline">
                                            <label class="layui-form-label">判断结论</label>
                                            <div class="layui-input-block">
                                                <input type="radio" name="HLastResult" value="true" title="合格">
                                                <input type="radio" name="HLastResult" value="false" title="不合格" checked>
                                            </div>
                                        </div>
                                        <div class="layui-inline" id="hidediv1" style="margin-left:20px;">
                                            <label class="layui-form-label" style="width: 85px;padding: 9px 18px;">工序</label>
                                            <div class="layui-input-block" style="margin-left: 77px;">
                                                <input type="text" class="layui-input" name="HProcName" id="HProcName" style="background-color:#efefef4d;width: 60%;display: inline-block;" readonly>
                                                <input type="hidden" name="HProcID" id="HProcID" value="0">
                                                <button class="layui-btn layuiadmin-btn-order" type="button" lay-submit="" lay-filter="btnHProc" id="btnHProc" style="padding: 0 10px;float: right;margin-right: 3px;">
                                                    <i class="layui-icon layui-icon-search layuiadmin-button-btn"></i>
                                                </button>
                                            </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" name="HTakeSampleCheckBillNo" id="HTakeSampleCheckBillNo" style="background-color:#efefef4d;" readonly>
                                                <input type="hidden" name="HTakeSampleCheckBillID" id="HTakeSampleCheckBillID" value="0">
                                            </div>
                                        </div>
                                    </div>
                                    <div class="layui-row">
                                        <div class="layui-inline" style="width: 45%;">
@@ -209,33 +216,7 @@
                                                <input type="text" class="layui-input" name="HErrTreatment" id="HErrTreatment" placeholder="请输入内容" onmouseover="this.title=this.value" style="margin-top:10px;">
                                            </div>
                                        </div>
                                    </div>
                                    <div class="layui-row">
                                        <div class="layui-inline">
                                            <label class="layui-form-label">判断结论</label>
                                            <div class="layui-input-block">
                                                <input type="radio" name="HLastResult"  value="true" title="合格" >
                                                <input type="radio" name="HLastResult"  value="false" title="不合格" checked>
                                            </div>
                                        </div>
                                        <div class="layui-inline" id="hidediv1" style="margin-left:20px;">
                                            <label class="layui-form-label" style="width: 85px;padding: 9px 18px;">工序</label>
                                            <div class="layui-input-block" style="margin-left: 77px;">
                                                <input type="text" class="layui-input" name="HProcName" id="HProcName" style="background-color:#efefef4d;width: 60%;display: inline-block;" readonly>
                                                <button class="layui-btn layuiadmin-btn-order" type="button" lay-submit="" lay-filter="btnHProc" id="btnHProc" style="padding: 0 10px;float: right;margin-right: 3px;">
                                                    <i class="layui-icon layui-icon-search layuiadmin-button-btn"></i>
                                                </button>
                                                <input type="hidden" name="HProcID" id="HProcID" value="0">
                                            </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" name="HTakeSampleCheckBillNo" id="HTakeSampleCheckBillNo" style="background-color:#efefef4d;" readonly>
                                                <input type="hidden" name="HTakeSampleCheckBillID" id="HTakeSampleCheckBillID" value="0">
                                            </div>
                                        </div>
                                    </div>
                                    </div>
                                </div>
                            </div>
                            <!--制单信息-->
@@ -377,13 +358,13 @@
                                    <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="HSampleQty" id="HSampleQty"  value="0"  style="background-color:#efefef4d;" readonly>
                                            <input type="text" class="layui-input" name="HSampleQty" id="HSampleQty" value="0" style="background-color:#efefef4d;" readonly>
                                        </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" name="HSampleDamageQty" id="HSampleDamageQty"  value="0" style="">
                                            <input type="text" class="layui-input" name="HSampleDamageQty" id="HSampleDamageQty" value="0" style="">
                                        </div>
                                    </div>
                                </div>
@@ -485,7 +466,7 @@
                                                </button>
                                                <input type="hidden" name="HQCCheckItemID" id="HQCCheckItemID" value="0">
                                            </div>
                                        </div>
                                        </div>
                                    </div>
                                    <div class="layui-row" style="margin-top:5px;">
                                        <div class="layui-inline">
@@ -708,9 +689,11 @@
                , laydate = layui.laydate
                , element = layui.element;
            //公用变量
            debugger;
            //debugger;
            var rowdata = [];
            var option = [];
            var HDeptID = "";//部门id èŽ·å–ç­æ¬¡
            var HCenterID = "";//工作中心id èŽ·å–ç­æ¬¡
            var rowdata_Value = [];
            var option_Value = [];
@@ -749,6 +732,10 @@
            //var linterid = 11880;
            //var HSouceBillType = 3722;
            //var HICMOEntryID = 100027;
            //初始化表格
            set_InitGrid();
            //#region åˆ¤æ–­æ˜¯å¦æ–°å¢ž
            if (OperationType == 1) {
                $("#HInterID").val("");
@@ -756,6 +743,8 @@
                $("#HFirstCheckEmp").val(sessionStorage["HCheckEmpID"]); //根据登录用户带出检验员ID
                $("#HFirstCheckEmpName").val(sessionStorage["HCheckEmpName"]); //根据登录用户带出检验员
                HDeptID = sessionStorage["HDeptID"]; //根据登录用户带出部门ID
                HCenterID = sessionStorage["HWorkCenterID"]; //根据登录用户带出工作中心ID
                //$('#btnSave').addClass("layui-btn-disabled").attr("disabled", true);//有源单时保存按钮禁用
                //获取最大单据号
@@ -771,6 +760,8 @@
                        $("#HMaker").val(sessionStorage["HUserName"]);
                    }
                });
                //获取班次
                get_HWorkShift();
            }
            else if (OperationType == 2) {
                $("#HInterID").val("");
@@ -783,6 +774,8 @@
                $("#HFirstCheckEmp").val(sessionStorage["HEmpID"]);
                $("#HFirstCheckEmpName").val(sessionStorage["HEmpName"]);
                HDeptID = sessionStorage["HDeptID"]; //根据登录用户带出部门ID
                HCenterID = sessionStorage["HWorkCenterID"]; //根据登录用户带出工作中心ID
                //获取最大单据号
                $.ajax({
                    url: GetWEBURL() + "/Web/GetMAXNum",
@@ -800,30 +793,42 @@
                if (HSouceBillType == 3722 || HSouceBillType == 4610) {
                    //根据源单id获取源单信息
                    LoadingInformation2();
                    //自动带出检验方案
                    GetCheckItemID();
                }
                //工序进站接收单列表首检
                else if (HSouceBillType == 3790) {
                    //根据源单id获取源单信息
                    LoadingInformation_StationInBill();
                    //自动带出检验方案
                    GetCheckItemID();
                }
                //工序委外接收单列表首检
                else if (HSouceBillType == 3793) {
                    //根据源单id获取源单信息
                    LoadingInformation3();
                    //自动带出检验方案
                    GetCheckItemID();
                }
                //生产订单列表首检
                else if (HSouceBillType == 3710) {
                    //根据源单id获取源单信息
                    LoadingInformation_ICMO();
                    //自动带出检验方案
                    GetCheckItemID();
                }
                //工序流转卡列表首检
                else if (HSouceBillType == 3772) {
                    //根据源单id获取源单信息
                    LoadingInformation_ProcExchange();
                    //自动带出检验方案
                    GetCheckItemID();
                }
                else {
                    layer.alert("源单类型无效!", { icon: 5 });
                }
                //获取班次
                get_HWorkShift();
            }
            else if (OperationType == 3) {
                RoadBillMain(linterid);
@@ -833,8 +838,7 @@
            $("[name='btnSearchCheckItemID']").addClass("layui-btn-disabled").attr("disabled", true);//禁用检验项目放大镜
            //初始化表格
            set_InitGrid();
            //#region æ ¹æ®æºå•获取信息
            //根据源单id获取源单信息(进站接收单)
            function LoadingInformation_StationInBill() {
@@ -842,6 +846,7 @@
                $.ajax({
                    url: GetWEBURL() + '/QC_FirstPieceCheckBill/get_StationInBill',
                    type: "GET",
                    async: false,
                    data: { "HInterID": linterid, "user": sessionStorage["HUserName"] },
                    success: function (result) {
                        var data = result.data[0];
@@ -885,6 +890,7 @@
                $.ajax({
                    url: GetWEBURL() + '/CheckBill/get_ProcessExchangeBill',
                    type: "GET",
                    async: false,
                    data: { "HInterID": linterid, "HEntryID": HEntryID, "user": sessionStorage["HUserName"] },
                    success: function (result) {
                        var data = result.data[0];
@@ -906,8 +912,11 @@
                            $("#HICMOEntryID").val(data.HICMOEntryID == null ? 0 : data.HICMOEntryID);//
                            $("#HQCSchemeName").val(data.检验方案名称);
                            $("#HQCSchemeID").val(data.检验方案ID);
                            $("#HProcID").val(data.HProcID);//
                            $("#HProcName").val(data.当前工序);//
                            $("#HBatchNo").val(data.批号);
                            HDeptID = data.HWorkShopID == null ? sessionStorage["HDeptID"] : data.HWorkShopID;//工作中心id
                            HCenterID = data.HCenterID == null ? sessionStorage["HWorkCenterID"] : data.HCenterID;//工作中心id
                            //获取表体检验项目信息
                            get_CheckItem();
                        } else {
@@ -930,6 +939,7 @@
                $.ajax({
                    url: GetWEBURL() + '/LEMS/MES_IF_ICMOBillList_Json',
                    type: "GET",
                    async: false,
                    data: { "sWhere": "and hmainid = " + linterid, "user": sessionStorage["HUserName"] },
                    success: function (result) {
                        var data = result.data[0];
@@ -966,6 +976,7 @@
                $.ajax({
                    url: GetWEBURL() + "/QC_FirstPieceCheckBill/get_ICMOBillStatus_Tmp",
                    type: "GET",
                    async: false,
                    data: { "HInterID": linterid, "HEntryID": HICMOEntryID, "HBillType": HSouceBillType },
                    success: function (result) {
                        var data = result.data[0];
@@ -1006,6 +1017,7 @@
                $.ajax({
                    url: GetWEBURL() + '/Cj_StationEntrustOutBill/list',
                    type: "GET",
                    async: false,
                    data: { "sWhere": "and HInterID = " + linterid },
                    success: function (result) {
                        var data = result.data[0];
@@ -1043,7 +1055,7 @@
                    , data = checkStatus.data;
                //新增行表格数据
                var NewRow = {
                    "HQCCheckItemID": "", "检验项目": "", "HInspectInstruMentID": "0", "检验仪器": "", "HQCStd": "", "HUnit": "", "HQCNote": "", "HAnalysisMethod": "", "HResult": "",
                    "HQCCheckItemID": "", "检验项目": "", "HInspectInstruMentID": "0", "检验仪器代码": "", "检验仪器": "", "HQCStd": "", "HUnit": "", "HQCNote": "", "HAnalysisMethod": "", "HResult": "",
                    "HMax": "", "HMin": "", "HAvg": "", "HRemark": "", "HKeyInspect": false, "HStatus": 0, "HSampleSchemeID": 0, "HUnitID": 0,
                    "HInspectVal": '', "HTargetVal": '', "HUpLimit": '', "HDownLimit": '', "HUpOffSet": '', "HDownOffSet": '', "HSampleDamageQty": '0',
                    "HSampleSchemeName": "", "HSampleQty": "0", "HSampleDamageQty": "0", "HAcceptQty": "0", "HInspectionLevel": "", "HRejectQty": "",
@@ -1222,6 +1234,27 @@
                    });
                }
                var data = obj.data;
                if (obj.event == '检验仪器代码') {
                    var HNumber = data.检验仪器代码;
                    var linterid = data.HInspectInstruMentID;
                    layer.open({
                        type: 2
                        , area: ['100%', '100%']
                        , title: '查看检验仪器'
                        , closeBtn: 1
                        , shade: 0.6 //遮罩透明度
                        , maxmin: true //允许全屏最小化
                        , anim: 0 //0-6的动画形式,-1不开启
                        , content: '../../基础资料/公用基础资料/Add_Edit_Gy_InspectInstruMent.html?OperationType=3&linterid=' + linterid + ''
                        , resize: false,
                        end: function () {
                        }
                        , cancel: function () {
                        }
                    })
                }
                $(document).off('keydown', ".layui-table-edit").on('keydown', '.layui-table-edit', function (e) {
                    var rowIndex = Number($(obj.tr).attr("data-index")) + Number(1);
                    if (event.key == "F7") {
@@ -1235,7 +1268,7 @@
                                shift: 2,
                                area: ['90%', '90%'],
                                maxmin: true,
                                content: ['../../基础资料/公用基础资料/Gy_CheckItem.html', 'yes'],
                                content: ['../../基础资料/公用基础资料/Gy_CheckItem.html?openType=2', 'yes'],
                                btn: ['确定', '取消']
                                , btn1: function (index, layero) {
@@ -1275,7 +1308,7 @@
                                shift: 2,
                                area: ['90%', '90%'],
                                maxmin: true,
                                content: ['../../基础资料/公用基础资料/Gy_InspectInstruMent.html', 'yes'],
                                content: ['../../基础资料/公用基础资料/Gy_InspectInstruMent.html?openType=2', 'yes'],
                                btn: ['确定', '取消']
                                , btn1: function (index, layero) {
@@ -1288,7 +1321,8 @@
                                    //同步更新表格和缓存对应的值
                                    obj.update({
                                        æ£€éªŒä»ªå™¨: checkStatus.data[0].检验仪器名称
                                        æ£€éªŒä»ªå™¨ä»£ç : checkStatus.data[0].检验仪器代码
                                        , æ£€éªŒä»ªå™¨: checkStatus.data[0].检验仪器名称
                                        , HInspectInstruMentID: checkStatus.data[0].HItemID
                                    });
                                    layer.close(layer.index); //它获取的始终是最新弹出的某个层,值是由layer内部动态递增计算的
@@ -1325,7 +1359,7 @@
                                shift: 2,
                                area: ['90%', '90%'],
                                maxmin: true,
                                content: ['../../基础资料/公用基础资料/Gy_InspectValue.html', 'yes'],
                                content: ['../../基础资料/公用基础资料/Gy_InspectValue.html?openType=2', 'yes'],
                                btn: ['确定', '取消']
                                , btn1: function (index, layero) {
@@ -1592,7 +1626,7 @@
                            for (var i = 0; i < data.length; i++) {
                                rowdata.push(
                                    {
                                        "HQCCheckItemID": data[i].HQCCheckItemID, "检验项目代码": data[i].检验项目代码, "检验项目": data[i].检验项目名称, "HInspectInstruMentID": data[i].HInspectInstruMentID, "检验仪器": data[i].检验仪器名称, "HQCStd": data[i].检验标准,
                                        "HQCCheckItemID": data[i].HQCCheckItemID, "检验项目代码": data[i].检验项目代码, "检验项目": data[i].检验项目名称, "HInspectInstruMentID": data[i].HInspectInstruMentID, "检验仪器代码": data[i].检验仪器代码, "检验仪器": data[i].检验仪器名称, "HQCStd": data[i].检验标准,
                                        "HUnit": data[i].单位名称, "HQCNote": data[i].检验记录, "HResult": data[i].结论 == "合格" ? 1 : 2,
                                        "HMax": data[i].最大值, "HMin": data[i].最小值, "HAvg": data[i].平均值, "HRemark": data[i].表体备注,
                                        "HAnalysisMethod": data[i].分析方法 == "定性分析" ? 1 : (data[i].分析方法 == "定量分析" ? 2 : 3), "HKeyInspect": data[i].重点检查 == "否" ? false : true,
@@ -1653,6 +1687,7 @@
            //表头信息检验方案弹窗
            form.on('submit(btnSearchQCScheme)', function () {
                var HName = $("#HMaterName").val();
                var HProcName = $("#HProcName").val();
                //页面层-自定义
                layer.open({
                    type: 2,
@@ -1662,7 +1697,7 @@
                    shift: 2,
                    area: ['90%', '90%'],
                    maxmin: true,
                    content: ['../../质量管理/检验方案单/QC_CheckProjectList.html?OperationType=1&HName=' + HName+'', 'yes'],
                    content: ['../../质量管理/检验方案单/QC_CheckProjectList.html?OperationType=1&HName=' + HName + '&HProcName=' + HProcName + '', 'yes'],
                    btn: ['确定', '取消']
                    , btn1: function (index, layero) {
@@ -1688,6 +1723,33 @@
                    }
                });
            });
            //SIP查看按钮
            form.on('submit(btn-SIP)', function () {
                var HProcID = $("#HProcID").val();
                var HMaterID = $("#HMaterID").val();
                if (HProcID == 0 && HMaterID == 0) {
                    layer.alert("物料名称与工序不能为空", { icon: 5 });
                }
                else {
                    layer.open({
                        type: 2
                        , area: ['100%', '100%']
                        , title: '查看作业指导书'
                        , closeBtn: 1
                        , shade: 0.6 //遮罩透明度
                        , maxmin: true //允许全屏最小化
                        , anim: 0 //0-6的动画形式,-1不开启
                        , content: '../../生产管理/作业指导书/Gy_SOPBill_Video.html?OperationType=5&HMaterID=' + HMaterID + '&HSourceNo=&HSourceEntryID=&HProcID=' + HProcID +'&HType=SIP'
                        , resize: false,
                        end: function () {
                        }
                        , cancel: function () {
                        }
                    })
                }
            });
            //#region【表体放大镜】
@@ -1939,11 +2001,12 @@
            //#endregion
            //#region【选检验方案获取表体检验项目信息】
            window.get_CheckItem = function () {
            function get_CheckItem() {
                var HBatchQty = $("#HProcExchQty").val();
                $.ajax({
                    url: GetWEBURL() + "/Web/GetCheckItemByCheckProjectID",
                    type: "GET",
                    async: false,
                    data: { "CheckProjectID": $("#HQCSchemeID").val() == '' ? 0 : $("#HQCSchemeID").val(), "HBatchQty": HBatchQty },
                    success: function (result) {
                        if (result.code == 1) {
@@ -1954,9 +2017,9 @@
                                //子表  èµ‹å€¼
                                rowdata.push(
                                    {
                                        "HQCCheckItemID": data[i]["HQCCheckItemID"], "检验项目代码": data[i].检验项目代码, "检验项目": data[i]["检验项目"], "HInspectInstruMentID": data[i]["HInspectInstruMentID"], "检验仪器": data[i]["检验仪器"], "HQCStd": data[i]["HQCStd"], "HUnit": data[i]["单位名称"], "HQCNote": "", "HAnalysisMethod": data[i]["分析方法"], "HResult": data[i]["默认结论"],
                                        "HQCCheckItemID": data[i]["HQCCheckItemID"], "检验项目代码": data[i].检验项目代码, "检验项目": data[i]["检验项目"], "HInspectInstruMentID": data[i]["HInspectInstruMentID"], "检验仪器代码": data[i]["检验仪器代码"], "检验仪器": data[i]["检验仪器"], "HQCStd": data[i]["HQCStd"], "HUnit": data[i]["单位名称"], "HQCNote": "", "HAnalysisMethod": data[i]["分析方法"], "HResult": data[i]["默认结论"],
                                        "HMax": "", "HMin": "", "HAvg": "", "HRemark": "", "HKeyInspect": data[i]["重点检查"] == 1 ? true : false, "HStatus": 0, "HSampleSchemeID": data[i]["HSampleSchemeID"], "HUnitID": data[i]["HUnitID"],
                                        "HInspectVal": '', "HTargetVal": '', "HUpLimit":  + data[i].上限值 , "HDownLimit": + data[i].下限值, "HUpOffSet": '', "HDownOffSet": '', "HSampleDamageQty": "0",
                                        "HInspectVal": '', "HTargetVal": '', "HUpLimit": + data[i].上限值, "HDownLimit": + data[i].下限值, "HUpOffSet": '', "HDownOffSet": '', "HSampleDamageQty": "0",
                                        "HSampleSchemeName": data[i].抽样方案名称, "HSampleQty": data[i].样本量, "HAcceptQty": data[i].允许数, "HInspectionLevel": data[i].检验水平, "HRejectQty": data[i].拒绝数,
                                        "HStrictness": data[i].严格度, "HSampleUnRightQty": "", "HAQL": data[i].AQL, "HSamplingType": data[i].抽样类型
                                    }
@@ -2000,9 +2063,74 @@
                    }
                })
            }
            //用于双击检验方案使用
            window.get_CheckItem1 = function () {
                var HBatchQty = $("#HProcExchQty").val();
                $.ajax({
                    url: GetWEBURL() + "/Web/GetCheckItemByCheckProjectID",
                    type: "GET",
                    async: false,
                    data: { "CheckProjectID": $("#HQCSchemeID").val() == '' ? 0 : $("#HQCSchemeID").val(), "HBatchQty": HBatchQty },
                    success: function (result) {
                        if (result.code == 1) {
                            var rowdata = [];
                            var data = result.data;
                            rowdata_Value = [];
                            for (var i = 0; i < result.data.length; i++) {
                                //子表  èµ‹å€¼
                                rowdata.push(
                                    {
                                        "HQCCheckItemID": data[i]["HQCCheckItemID"], "检验项目代码": data[i].检验项目代码, "检验项目": data[i]["检验项目"], "HInspectInstruMentID": data[i]["HInspectInstruMentID"], "检验仪器代码": data[i]["检验仪器代码"], "检验仪器": data[i]["检验仪器"], "HQCStd": data[i]["HQCStd"], "HUnit": data[i]["单位名称"], "HQCNote": "", "HAnalysisMethod": data[i]["分析方法"], "HResult": data[i]["默认结论"],
                                        "HMax": "", "HMin": "", "HAvg": "", "HRemark": "", "HKeyInspect": data[i]["重点检查"] == 1 ? true : false, "HStatus": 0, "HSampleSchemeID": data[i]["HSampleSchemeID"], "HUnitID": data[i]["HUnitID"],
                                        "HInspectVal": '', "HTargetVal": '', "HUpLimit": + data[i].上限值, "HDownLimit": + data[i].下限值, "HUpOffSet": '', "HDownOffSet": '', "HSampleDamageQty": "0",
                                        "HSampleSchemeName": data[i].抽样方案名称, "HSampleQty": data[i].样本量, "HAcceptQty": data[i].允许数, "HInspectionLevel": data[i].检验水平, "HRejectQty": data[i].拒绝数,
                                        "HStrictness": data[i].严格度, "HSampleUnRightQty": "", "HAQL": data[i].AQL, "HSamplingType": data[i].抽样类型
                                    }
                                );
                                SampleNum.push(5);
                            }
                            //检验项目
                            for (let j = 1; j <= 5; j++) {
                                rowdata_Value.push({
                                    "HSEQ": j, "HInSpectResult": "", "HInSpectValueB": "", "HInSpectValueT": "", "HInSpectValue": "", "rowNum": $("#HEntryID").val()
                                });
                            }
                            //检验项目
                            option.data = rowdata;
                            table.render(option);
                            //检验值
                            option_Value.data = rowdata_Value;
                            //console.log(JSON.stringify(option_Value.data));
                            table.render(option_Value);
                            //================================================
                            for (var i = 1; i <= result.data.length; i++) {
                                $('#HAnalysisMethod' + i + '').find("option[value='" + option.data[i - 1].HAnalysisMethod + "']").attr("selected", true);
                                $('#HResult' + i + '').find("option[value='" + option.data[i - 1].HResult + "']").attr("selected", true);
                            }
                            form.render('select');
                            option_Check = result.data;
                            $("[name='HEntryID']").attr("value", result.data.length);
                            $("[name='HQCCheckItemID']").attr("value", result.data[result.data.length - 1].HQCCheckItemID);
                            $("[name='HQCCheckItemName']").attr("value", result.data[result.data.length - 1].检验项目);
                            //默认选中最后一行
                            $("tr[data-index = " + (result.data.length - 1) + "] .layui-form-checkbox").dblclick();
                            //$("tr[data-index = " + (result.data.length - 1) + "] .layui-form-checkbox").addClass('layui-form-checked');
                            $("tr[data-index = " + (result.data.length - 1) + "] ").attr({ "style": "background:#ceedfa;color:black" });
                            trindex = result.data.length - 1;
                            $("#HEntryID").val() - 1
                        }
                    }
                })
            }
            //#endregion
            //#region【表头放大镜】
            //#region ã€è¡¨å¤´æ”¾å¤§é•œã€‘
            //表头信息工序流转卡弹窗
            form.on('submit(btnSearchProcExch)', function () {
                //页面层-自定义
@@ -2014,7 +2142,7 @@
                    shift: 2,
                    area: ['90%', '90%'],
                    maxmin: true,
                    content: ['../../../views/Baseset/基础资料/Sc_ProcessExchangeBillListView.html', 'yes'],
                    content: ['../../车间管理/工序流转卡/Sc_ProcessExchangeBillList.html?openType=2', 'yes'],
                    btn: ['确定', '取消']
                    , btn1: function (index, layero) {
@@ -2053,7 +2181,7 @@
                    shift: 2,
                    area: ['90%', '90%'],
                    maxmin: true,
                    content: ['../../生产管理/生产任务单/Sc_ICMOBillList.html', 'yes'],
                    content: ['../../生产管理/生产任务单/Sc_ICMOBillList.html?openType=2', 'yes'],
                    btn: ['确定', '取消']
                    , btn1: function (index, layero) {
@@ -2131,7 +2259,7 @@
                    shift: 2,
                    area: ['90%', '90%'],
                    maxmin: true,
                    content: ['../../基础资料/生产基础资料/Gy_Source.html', 'yes'],
                    content: ['../../基础资料/生产基础资料/Gy_Source.html?Htype=&openType=2', 'yes'],
                    btn: ['确定', '取消']
                    , btn1: function (index, layero) {
@@ -2146,6 +2274,7 @@
                        layer.close(layer.index); //它获取的始终是最新弹出的某个层,值是由layer内部动态递增计算的
                        get_ICMOBillStatusList();
                        get_QC_TakeSampleCheckBillList();
                        GetCheckItemID();
                    }
                    , btn2: function (index, layero) {
                        //按钮【按钮二】的回调
@@ -2171,7 +2300,7 @@
                    shift: 2,
                    area: ['90%', '90%'],
                    maxmin: true,
                    content: ['../../基础资料/生产基础资料/Gy_Process.html', 'yes'],
                    content: ['../../基础资料/生产基础资料/Gy_Process.html?openType=2', 'yes'],
                    btn: ['确定', '取消']
                    , btn1: function (index, layero) {
@@ -2186,6 +2315,7 @@
                        layer.close(layer.index); //它获取的始终是最新弹出的某个层,值是由layer内部动态递增计算的
                        get_ICMOBillStatusList();
                        get_QC_TakeSampleCheckBillList();
                        GetCheckItemID();
                    }
                    , btn2: function (index, layero) {
                        //按钮【按钮二】的回调
@@ -2200,7 +2330,7 @@
                });
            });
            //表头信息生产班次弹窗
            form.on('submit(btnHShifts)', function () {
                //页面层-自定义
@@ -2212,7 +2342,7 @@
                    shift: 2,
                    area: ['90%', '90%'],
                    maxmin: true,
                    content: ['../../基础资料/生产基础资料/Gy_ShiftsList.html', 'yes'],
                    content: ['../../基础资料/生产基础资料/Gy_WorkShiftList.html?type=HWorkShifts', 'yes'],
                    btn: ['确定', '取消']
                    , btn1: function (index, layero) {
@@ -2223,7 +2353,7 @@
                            return layer.msg('请选择数据');
                        }
                        $("#HShiftsName").val(checkStatus.data[0].班次名称);
                        $("#HShiftsID").val(checkStatus.data[0].HItemID);
                        $("#HShiftsID").val(checkStatus.data[0].HInterID);
                        layer.close(layer.index); //它获取的始终是最新弹出的某个层,值是由layer内部动态递增计算的
                    }
                    , btn2: function (index, layero) {
@@ -2250,7 +2380,7 @@
                    shift: 2,
                    area: ['90%', '90%'],
                    maxmin: true,
                    content: ['../../基础资料/公用基础资料/Gy_Material.html', 'yes'],
                    content: ['../../基础资料/公用基础资料/Gy_Material.html?openType=2', 'yes'],
                    btn: ['确定', '取消']
                    , btn1: function (index, layero) {
@@ -2264,6 +2394,7 @@
                        $("#HMaterNumber").val(checkStatus.data[0].物料代码);
                        $("#HMaterName").val(checkStatus.data[0].物料名称);
                        $("#HMaterID").val(checkStatus.data[0].HItemID);
                        GetCheckItemID();
                        layer.close(layer.index); //它获取的始终是最新弹出的某个层,值是由layer内部动态递增计算的
                    }
                    , btn2: function (index, layero) {
@@ -2293,7 +2424,7 @@
                $("#HMakeDate").val(Format(new Date(), "yyyy-MM-dd"));
                //初始表格数据
                rowdata = [{
                    "HQCCheckItemID": "", "检验项目": "", "HInspectInstruMentID": "0", "检验仪器": "", "HQCStd": "", "HUnit": "", "HQCNote": "", "HAnalysisMethod": "", "HResult": "",
                    "HQCCheckItemID": "", "检验项目": "", "HInspectInstruMentID": "0", "检验仪器代码": "", "检验仪器": "", "HQCStd": "", "HUnit": "", "HQCNote": "", "HAnalysisMethod": "", "HResult": "",
                    "HMax": "", "HMin": "", "HAvg": "", "HRemark": "", "HKeyInspect": false, "HStatus": 0, "HSampleSchemeID": 0, "HUnitID": 0,
                    "HInspectVal": '', "HTargetVal": '', "HUpLimit": '', "HDownLimit": '', "HUpOffSet": '', "HDownOffSet": '', "HSampleDamageQty": '0',
                    "HSampleSchemeName": "", "HSampleQty": "0", "HSampleDamageQty": "0", "HAcceptQty": "0", "HInspectionLevel": "", "HRejectQty": "",
@@ -2310,16 +2441,21 @@
                        { type: 'checkbox', totalRowText: '合计行' }
                        , { type: 'numbers', title: '序号', totalRow: true }
                        , { field: 'HQCCheckItemID', title: 'HQCCheckItemID', hide: true }
                        , { field: '检验项目代码', title: '检验项目代码'}
                        , { field: '检验项目代码', title: '检验项目代码' }
                        , { field: '检验项目', title: '检验项目', edit: 'text', event: 'HQCCheckItemID' }
                        , { field: 'HInspectInstruMentID', title: 'HInspectInstruMentID', hide: true }
                        , {
                            field: '检验仪器代码', title: '检验仪器代码', totalRow: true, templet: function (d) {
                                return '<span style="color: blue;" lay-event="检验仪器代码">' + d.检验仪器代码 + '</span>';
                            }, style: 'cursor: pointer;'
                        }
                        , { field: '检验仪器', title: '检验仪器', edit: 'text', event: 'HInspectInstruMentID' }
                        , { field: 'HResult', title: '结论', templet: '#HResult', event: 'HResult' }
                        , { field: 'HAnalysisMethod', title: '分析方法', templet: '#HAnalysisMethod', event: 'HAnalysisMethod' }
                        , { field: 'HKeyInspect', title: '重点检查', templet: '#HKeyInspect', unresize: false }
                        , { field: 'HQCStd', title: '检验标准', edit: 'text' }
                        , { field: 'HUnit', title: '单位', edit: 'text' }
                        , { field: 'HInspectVal', title: '检验值', edit: 'text'}
                        , { field: 'HInspectVal', title: '检验值', edit: 'text' }
                        , { field: 'HQCNote', title: '检验记录', edit: 'text' }
                        , { field: 'HUpLimit', title: '上限值' }
                        , { field: 'HDownLimit', title: '下限值' }
@@ -2413,6 +2549,7 @@
                option_Value.data = rowdata_Value;
                table.render(option_Value);
            }
            //行选择处理(结论)
            form.on('select(HResult)', function (data) {
@@ -2643,7 +2780,9 @@
                    set_SaveValue(dataindex + 1);
                }
                //赋值与回显
                Assignment(nowindex, dataindex);
                if ($("#HSampleSchemeID").val() != "0") {
                    Assignment(nowindex, dataindex);
                }
                if (isHavingCount == false && OperationType != 3) {
                    var row_value = [];
                    for (let i = 0; i < SampleNum[nowindex]; i++) {
@@ -2670,7 +2809,7 @@
            //#endregion
            //#region【文本框监听,光标移开时触发】
            //#region ã€æ–‡æœ¬æ¡†ç›‘听,光标移开时触发】
            //[ åˆ¤å®šæ£€éªŒæ˜¯å¦åˆæ ¼ ]监听文本框编辑--检验值
            $("#HInspectVal").blur(function () {
@@ -2795,7 +2934,7 @@
            //#endregion
            //#region【判断是否合格方法】
            //#region ã€åˆ¤æ–­æ˜¯å¦åˆæ ¼æ–¹æ³•】
            function Qualified(HComparator, HEntryID, HAnalysisMethod) {
                var HInspectVal = $("#HInspectVal").val(); //检验值
                var HTargetVal = $("#HTargetVal").val(); //目标值
@@ -2806,7 +2945,7 @@
                var HStatus = $("#HStatus").val() //状态
                var HAcceptQty = $("#HAcceptQty").val();//允许数
                //#region【定性分析方法】
                //#region ã€å®šæ€§åˆ†æžæ–¹æ³•】
                if (HAnalysisMethod == 1) {
                    //状态为合格
                    if (HStatus == 1) {
@@ -2841,7 +2980,7 @@
                    }
                }
                //#endregion
                //#region【定量分析方法】
                //#region ã€å®šé‡åˆ†æžæ–¹æ³•】
                else if (HAnalysisMethod == 2) {
                    //状态为合格
                    if (HStatus == 1) {
@@ -3000,7 +3139,7 @@
                    }
                }
                //#endregion
                //#region【其他分析方法】
                //#region ã€å…¶ä»–分析方法】
                else if (HAnalysisMethod == 3) {
                    //状态为合格
                    if (HStatus == 1) {
@@ -3036,6 +3175,7 @@
                }
                //#endregion
                form.render('select');
                //获取表体结论数据赋值给检验结果
                var HEntryID = $('#HEntryID').val();
@@ -3055,7 +3195,7 @@
            };
            //#endregion
            //#region【赋值与回显】
            //#region ã€èµ‹å€¼ä¸Žå›žæ˜¾ã€‘
            function Assignment(nowindex, dataindex) {
                if (SummaryIndex.indexOf(nowindex) == -1 && option.data[0].HSampleSchemeID == 0) {
                    var dataobj = {
@@ -3738,7 +3878,7 @@
                    url: GetWEBURL() + "/CheckBill/GetICMOBillStatusList",
                    type: "GET",
                    async: false,
                    data: { "sWhere": sWhere,"user": sessionStorage["HUserName"] },
                    data: { "sWhere": sWhere, "user": sessionStorage["HUserName"] },
                    success: function (result) {
                        if (result.count == 1) {
                            $("#HProcID").val(result.data[0]["HProcID"]);
@@ -3777,7 +3917,7 @@
                                $("#HTakeSampleCheckBillID").val(result.data[0]["hmainid"]);
                                $("#HTakeSampleCheckBillNo").val(result.data[0]["单据号"]);
                            }
                        }
                        }
                    },
                    error: function (err) {
                        layer.msg("接口请求失败!" + err, { icon: 5, btn: ['确认'], time: 100000, offset: 't', skin: 'layui-layer-lan', title: "温馨提示" });
@@ -3897,25 +4037,41 @@
            //#region ã€åºŸå¼ƒä»£ç (斯莫尔已启用)】
            table.on('edit(mainTable)', function (obj) {
                var cell = $(this);
                var rowIndex = cell.closest('tr').data('index'); // èŽ·å–å½“å‰è¡Œæ•°æ®ç´¢å¼•
                // å•元格编辑之前的值
                var oldText = $(this).prev().text();
                var value = obj.value //得到修改后的值
                    , data = obj.data //得到所在行所有键值
                    , field = obj.field; //得到字段
                    , field = obj.field; //得到字段
                var HInspectVal = $("#HInspectVal").val(); //检验值
                var HTargetVal = $("#HTargetVal").val(); //目标值
                var HComparator = $("#HComparator").val(); //比较符
                var HEntryID = $("#HEntryID").val() - 1;
                var HEntryID = rowIndex;
                var HAnalysisMethod = table.cache["mainTable"][HEntryID].HAnalysisMethod; //分析方法
                var HUpLimit = table.cache["mainTable"][HEntryID].HUpLimit; //上限值
                var HDownLimit = table.cache["mainTable"][HEntryID].HDownLimit; //下限值
                switch (field) {
                    case "HInspectVal":  //检验值
                        value = isNaN(value) ? 0 : value;
                        if (HInspectVal < HUpLimit && HInspectVal > HDownLimit) {
                        value = isNaN(value) ? 0 : parseFloat(value);
                        if (HAnalysisMethod == "2") {
                            if (value <= HUpLimit && value >= HDownLimit) {
                                obj.update({
                                    "HResult": "1"
                                });
                                $('#HResult' + (HEntryID + 1)).find("option[value='1']").attr("selected", true);
                            } else {
                                obj.update({
                                    "HResult": "2"
                                });
                                $('#HResult' + (HEntryID + 1)).find("option[value='2']").attr("selected", true);
                            }
                            form.render('select');
                            LastResult();
                        }
                        break;
                    case "HTargetVal":  //目标值
                        value = isNaN(value) ? 0 : value;
@@ -3955,6 +4111,55 @@
            }
            //#endregion
            //自动带出检验方案
            function GetCheckItemID() {
                var HName = $("#HMaterName").val();
                var HProName = $("#HProcName").val();
                var HSourceID = $("#HSourceID").val();
                if (HName != '' && HName != undefined && HProName != '' && HProName != undefined) {
                    $.ajax({
                        url: GetWEBURL() + "/Web/GetCheckItemID",
                        type: "GET",
                        async: false,
                        data: { "HName": HName, "HProName": HProName,"HSourceID": HSourceID },
                        success: function (result) {
                            if (result.code == 1) {
                                $("#HQCSchemeID").val(result.data[0].hmainid);
                                $("#HQCSchemeName").val(result.data[0].检验方案名称);
                                get_CheckItem();
                            } else {
                                layer.msg(result.code + result.Message, { icon: 5 });
                            }
                        }
                    })
                }
            }
            //获取班次
            function get_HWorkShift() {
                $.ajax({
                    type: "GET",
                    url: GetWEBURL() + "/Gy_ShiftsController/Get_HWorkShift", //方法所在页面和方法名
                    data: {
                        "HDeptID": HDeptID,
                        "HCenterID": HCenterID
                    },
                    success: function (data) {
                        if (data.count == 1)// è¯´æ˜ŽéªŒè¯æˆåŠŸäº†ï¼Œ
                        {
                            var LoadData = data.data;
                            $("#HShiftsID").val(LoadData[0].HInterID); //当前工序ID
                            $("#HShiftsName").val(LoadData[0].班次); //当前工序
                        }
                        else {
                            layer.alert(data.Message, { icon: 5 });
                        }
                    },
                    error: function (err) {
                        layer.alert(err, { icon: 5 });
                    }
                });
            }
            //以上为layui模块
        });
@@ -3980,6 +4185,7 @@
            $("#HMaterNumber").val(obj[0].物料代码);
            $("#HMaterName").val(obj[0].物料名称);
            $("#HMaterID").val(obj[0].HItemID);
            GetCheckItemID();
        }
        function GetHEmpValue(obj) {  //质检员
@@ -3990,9 +4196,13 @@
        function GetCheckProjectValue(obj) {  //质检方案
            $("#HQCSchemeID").val(obj[0].hmainid);
            $("#HQCSchemeName").val(obj[0].检验方案名称);
            get_CheckItem();
            get_CheckItem1();
        }
        //班次
        function GetHWorkShiftsValue(obj) {
            $("#HShiftsName").val(obj[0].班次名称);
            $("#HShiftsID").val(obj[0].HInterID);
        }
    </script>
</body>
</html>