1
duhe
2025-06-16 df3e719955cc93b4e762ac75fbb61737fbf3b7a8
WebTM/views/ÖÊÁ¿¹ÜÀí/¹¤Ðò¼ìÑéµ¥/QC_ProcessCheckBill.html
@@ -9,6 +9,7 @@
    <link rel="stylesheet" href="../../../layuiadmin/layui/css/layui.css" media="all">
    <link rel="stylesheet" href="../../../layuiadmin/style/admin.css" media="all">
    <script src="../../../layuiadmin/zgqCustom/zgqCustom.js"></script>
    <script src="../../../layuiadmin/PageTitle.js"></script>
    <style>
        .main-btn { /*头部主按钮*/
            padding: 0 2px; /*调整按钮左右空隙大小*/
@@ -41,16 +42,16 @@
        <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">
                        <ul class="layui-tab-title" lay-filter="tab-all">
@@ -72,17 +73,27 @@
                                        <div class="layui-inline">
                                            <label class="layui-form-label" style="width: 85px;">日期</label>
                                            <div class="layui-input-block" style="margin-left: 120px;">
                                                <input type="date" class="layui-input" name="HDate" id="HDate" style="padding-left: 47px;">
                                                <input type="date" class="layui-input" name="HDate" id="HDate" style="padding-left: 68px;">
                                            </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="HSourceName" id="HSourceName" style="background-color:#efefef4d;width: 60%;display: inline-block;" readonly>
                                                <input type="hidden" name="HSourceID" id="HSourceID" value="0">
                                                <button class="layui-btn layuiadmin-btn-order" type="button" lay-submit="" lay-filter="btnSearchSource" id="btnSearchSource" 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="HSourceID" id="HSourceID" 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="HShiftsName" id="HShiftsName" style="background-color:#efefef4d;width: 60%;display: inline-block;" readonly>
                                                <button class="layui-btn layuiadmin-btn-order" type="button" lay-submit="" lay-filter="btnHShifts" id="btnHShifts" 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="HShiftsID" id="HShiftsID" value="0">
                                            </div>
                                        </div>
                                    </div>
@@ -91,6 +102,8 @@
                                            <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>
@@ -103,19 +116,12 @@
                                            </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="HICMOInterID" id="HICMOInterID" value="0" style="background-color:#efefef4d;" readonly>
                                                <input type="hidden" name="HICMOEntryID" id="HICMOEntryID" 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>
                                            <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="HMaterID" id="HMaterID" value="0" style="background-color:#efefef4d;width: 60%;display: inline-block;" 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;">
                                                <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>
@@ -123,44 +129,32 @@
                                        <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>
                                            </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="HProcExchBillNo" id="HProcExchBillNo" style="background-color:#efefef4d;width: 60%;display: inline-block;" 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>
                                                <input type="text" class="layui-input" name="HProcExchQty" id="HProcExchQty" value="0" style="background-color:#efefef4d;" readonly>
                                            </div>
                                        </div>
                                    </div>
                                    <div class="layui-row">
                                        <div class="layui-inline">
                                            <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">
                                            <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>
                                            <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="hidden" class="layui-input" name="HMaterID" id="HMaterID" value="0" 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>
                                            </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="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>
                                    <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;">
@@ -171,24 +165,54 @@
                                                <input type="hidden" name="HQCSchemeID" id="HQCSchemeID" value="0">
                                            </div>
                                        </div>
                                    </div>
                                    <div class="layui-row">
                                        <div class="layui-inline" style="width: 50%;">
                                            <label class="layui-form-label" style="width: 85px;">备注</label>
                                        <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="HRemark" id="HRemark" placeholder="请输入内容" onmouseover="this.title=this.value">
                                                <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>
                                            <label class="layui-form-label" >判断结论</label>
                                            <div class="layui-input-block">
                                                <input type="radio" name="HCheckerResult" id="HCheckerResult" value="true" title="合格" checked>
                                                <input type="radio" name="HCheckerResult" id="HCheckerResult" value="false" title="不合格">
                                                <input type="radio" name="HCheckerResult" id="HCheckerResult" value="true" title="合格">
                                                <input type="radio" name="HCheckerResult" id="HCheckerResult" value="false" title="不合格" checked>
                                            </div>
                                        </div>
                                        <div class="layui-inline" id="hidediv1">
                                            <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%;">
                                            <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="HRemark" id="HRemark" placeholder="请输入内容" onmouseover="this.title=this.value">
                                            </div>
                                        </div>
                                        <div class="layui-inline" style="width: 45%">
                                            <label class="layui-form-label" style="width: 85px;">异常临时<br />处理方案</label>
                                            <div class="layui-input-block" style="margin-left: 120px;">
                                                <input type="text" class="layui-input" name="HErrTreatment" id="HErrTreatment" placeholder="请输入内容" onmouseover="this.title=this.value" style="margin-top:10px;">
                                            </div>
                                        </div>
                                    </div>
                                </div>
                            </div>
                            <!--制单信息-->
@@ -281,11 +305,11 @@
                            <div class="layui-tab-item">
                                <!--抽样检验-->
                                <!--<div class="layui-row" style="margin-bottom:15px;margin-left:30px">
                                    <button type="button" class="layui-btn layui-btn-sm" lay-submit="" lay-filter="btn_FirstRow" id="btn_FirstRow"><span style="font-weight:bold">首行</span></button>
                                    <button type="button" class="layui-btn layui-btn-sm" lay-submit="" lay-filter="btn_PreviousRow" id="btn_PreviousRow"><i class="layui-icon layui-icon-prev"></i></button>
                                    <button type="button" class="layui-btn layui-btn-sm" lay-submit="" lay-filter="btn_NextRow" id="btn_NextRow"><i class="layui-icon layui-icon-next"></i></button>
                                    <button type="button" class="layui-btn layui-btn-sm" lay-submit="" lay-filter="btn_LastRow" id="btn_LastRow"><span style="font-weight:bold">末行</span></button>
                                </div>-->
                    <button type="button" class="layui-btn layui-btn-sm" lay-submit="" lay-filter="btn_FirstRow" id="btn_FirstRow"><span style="font-weight:bold">首行</span></button>
                    <button type="button" class="layui-btn layui-btn-sm" lay-submit="" lay-filter="btn_PreviousRow" id="btn_PreviousRow"><i class="layui-icon layui-icon-prev"></i></button>
                    <button type="button" class="layui-btn layui-btn-sm" lay-submit="" lay-filter="btn_NextRow" id="btn_NextRow"><i class="layui-icon layui-icon-next"></i></button>
                    <button type="button" class="layui-btn layui-btn-sm" lay-submit="" lay-filter="btn_LastRow" id="btn_LastRow"><span style="font-weight:bold">末行</span></button>
                </div>-->
                                <div class="layui-row">
                                    <div class="layui-inline">
                                        <label class="layui-form-label" style="width: 85px;">项目序号</label>
@@ -330,13 +354,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" 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" style="">
                                            <input type="text" class="layui-input" name="HSampleDamageQty" id="HSampleDamageQty" value="0" style="">
                                        </div>
                                    </div>
                                </div>
@@ -360,14 +384,14 @@
                                        </div>
                                    </div>
                                    <!--<div class="layui-inline">
                                        <label class="layui-form-label">检验结果</label>
                                        <div class="layui-input-block">
                                            <select name="HResult" lay-filter="HResult" style="width:190px;">
                                                <option value="合格" selected="selected">合格</option>
                                                <option value="不合格">不合格</option>
                                            </select>
                                        </div>
                                    </div>-->
                        <label class="layui-form-label">检验结果</label>
                        <div class="layui-input-block">
                            <select name="HResult" lay-filter="HResult" style="width:190px;">
                                <option value="合格" selected="selected">合格</option>
                                <option value="不合格">不合格</option>
                            </select>
                        </div>
                    </div>-->
                                </div>
                                <div class="layui-row" style="margin-top:5px;">
                                    <div class="layui-inline">
@@ -383,11 +407,11 @@
                                        </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="checkbox" name="HKeyInspect" id="HKeyInspect" value="false" lay-skin="primary" lay-filter="HKeyInspect">
                                        </div>
                                    </div>-->
                        <label class="layui-form-label" style="width: 85px;">重点检查</label>
                        <div class="layui-input-block" style="margin-left: 120px;">
                            <input type="checkbox" name="HKeyInspect" id="HKeyInspect" value="false" lay-skin="primary" lay-filter="HKeyInspect">
                        </div>
                    </div>-->
                                </div>
                                <div class="layui-row" style="margin-top:5px;">
                                    <div class="layui-inline">
@@ -416,11 +440,11 @@
                            <div class="layui-tab-item" style="height:590px">
                                <!--检测值-->
                                <!--<div class="layui-row" style="margin-bottom:15px;margin-left:30px">
                                    <button type="button" class="layui-btn layui-btn-sm" lay-submit="" lay-filter="btn_FirstRow" id="btn_FirstRow"><span style="font-weight:bold">首行</span></button>
                                    <button type="button" class="layui-btn layui-btn-sm" lay-submit="" lay-filter="btn_PreviousRow" id="btn_PreviousRow"><i class="layui-icon layui-icon-prev"></i></button>
                                    <button type="button" class="layui-btn layui-btn-sm" lay-submit="" lay-filter="btn_NextRow" id="btn_NextRow"><i class="layui-icon layui-icon-next"></i></button>
                                    <button type="button" class="layui-btn layui-btn-sm" lay-submit="" lay-filter="btn_LastRow" id="btn_LastRow"><span style="font-weight:bold">末行</span></button>
                                </div>-->
                    <button type="button" class="layui-btn layui-btn-sm" lay-submit="" lay-filter="btn_FirstRow" id="btn_FirstRow"><span style="font-weight:bold">首行</span></button>
                    <button type="button" class="layui-btn layui-btn-sm" lay-submit="" lay-filter="btn_PreviousRow" id="btn_PreviousRow"><i class="layui-icon layui-icon-prev"></i></button>
                    <button type="button" class="layui-btn layui-btn-sm" lay-submit="" lay-filter="btn_NextRow" id="btn_NextRow"><i class="layui-icon layui-icon-next"></i></button>
                    <button type="button" class="layui-btn layui-btn-sm" lay-submit="" lay-filter="btn_LastRow" id="btn_LastRow"><span style="font-weight:bold">末行</span></button>
                </div>-->
                                <div class="left" style="width:50%;height:450px;float:left;">
                                    <div class="layui-row">
                                        <div class="layui-inline">
@@ -454,14 +478,14 @@
                                            </div>
                                        </div>
                                        <!--<div class="layui-inline">
                                            <label class="layui-form-label" style="width: 70px !important;">检验结果</label>
                                            <div class="layui-input-block" style="margin-left: 100px; width: 182px">
                                                <select name="HInspectResult" lay-filter="HInspectResult">
                                                    <option value="合格" selected="selected">合格</option>
                                                    <option value="不合格">不合格</option>
                                                </select>
                                            </div>
                                        </div>-->
                            <label class="layui-form-label" style="width: 70px !important;">检验结果</label>
                            <div class="layui-input-block" style="margin-left: 100px; width: 182px">
                                <select name="HInspectResult" lay-filter="HInspectResult">
                                    <option value="合格" selected="selected">合格</option>
                                    <option value="不合格">不合格</option>
                                </select>
                            </div>
                        </div>-->
                                    </div>
                                    <div class="layui-row" style="margin-top:5px;">
                                        <div class="layui-inline">
@@ -477,11 +501,11 @@
                                            </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="checkbox" name="HKeyInspect" id="HKeyInspect2" value="false" lay-skin="primary" lay-filter="HKeyInspect">
                                            </div>
                                        </div>-->
                            <label class="layui-form-label" style="width: 85px;">重点检查</label>
                            <div class="layui-input-block" style="margin-left: 120px;">
                                <input type="checkbox" name="HKeyInspect" id="HKeyInspect2" value="false" lay-skin="primary" lay-filter="HKeyInspect">
                            </div>
                        </div>-->
                                    </div>
                                    <div class="layui-row" style="margin-top:5px;">
                                        <div class="layui-inline" style="border-bottom:2px solid #9C9C9C;width:290px;margin-left:10px">
@@ -492,14 +516,14 @@
                                    </div>
                                    <div class="layui-row" style="margin-top:5px;">
                                        <!--<div class="layui-inline">
                                            <label class="layui-form-label" style="width: 70px !important;">分析方法</label>
                                            <div class="layui-input-block" style="margin-left: 100px; width: 182px">
                                                <select name="HAnalysisMethod" lay-filter="HAnalysisMethod">
                                                    <option value="合格" selected="selected">合格</option>
                                                    <option value="不合格">不合格</option>
                                                </select>
                                            </div>
                                        </div>-->
                            <label class="layui-form-label" style="width: 70px !important;">分析方法</label>
                            <div class="layui-input-block" style="margin-left: 100px; width: 182px">
                                <select name="HAnalysisMethod" lay-filter="HAnalysisMethod">
                                    <option value="合格" selected="selected">合格</option>
                                    <option value="不合格">不合格</option>
                                </select>
                            </div>
                        </div>-->
                                        <div class="layui-inline">
                                            <label class="layui-form-label" style="width: 70px !important;">状态</label>
                                            <div class="layui-input-block" style="margin-left: 100px; width: 182px">
@@ -604,7 +628,6 @@
                    <input type="hidden" name="HMainSourceInterID" id="HMainSourceInterID" value="0">
                    <input type="hidden" name="HMainSourceEntryID" id="HMainSourceEntryID" value="1">
                    <input type="hidden" name="HMainSourceBillNo" id="HMainSourceBillNo">
                    <input type="hidden" name="HProcID" id="HProcID" value="1">
                </form>
            </div>
        </div>
@@ -662,8 +685,11 @@
                , laydate = layui.laydate
                , element = layui.element;
            //公用变量
            debugger;
            var rowdata = [];
            var option = [];
            var HDeptID = "";//部门id èŽ·å–ç­æ¬¡
            var HCenterID = "";//工作中心id èŽ·å–ç­æ¬¡
            var rowdata_Value = [];
            var option_Value = [];
@@ -685,6 +711,14 @@
            //        icon: 4, skin: 'layui-layer-lan', title: "温馨提示", closeBtn: 0, btn: ['重新登录']
            //    }, function () { window.location.href = "../../user/login.html"; });
            //}
            //#region ã€åŠ¨æ€èŽ·å–æ¨¡å—åç§°ã€‘
            var HModuleType = "7507";
            //通过单据类型,从数据库动态获取单据模块命名,引用js文件 PageTitle.js
            var HPageTitle = get_PageTitle(HModuleType) == "" ? $("h1").html() : get_PageTitle(HModuleType);
            $("h1").html('<b>' + HPageTitle + '</b>');
            //#endregion
            /*固定代码,每张单据都要begin*/
            /* 1.无源单新增
@@ -712,6 +746,7 @@
                var linterid = params[params[1]];//源单id
                var HSouceBillType = params[params[2]];//源单类型
                var HICMOEntryID = params[params[3]];//源单子id
                var HEntryID = params[params[4]];//源单子id
            }
            /*固定代码,每张单据都要begin*/
@@ -721,11 +756,21 @@
            //var HSouceBillType = 3722;
            ////var HICMOEntryID = 100027;
            //var HICMOEntryID = "";
            //初始化表格
            set_InitGrid();
            //判断是否新增
            if (OperationType == 1) {
                $("#HInterID").val("");
                $("#HBillNo").val("");
                $('#btnSave').addClass("layui-btn-disabled").attr("disabled", true);//有源单时保存按钮禁用
                $("#HFirstCheckEmp").val(sessionStorage["HEmpID"]);//根据登录用户带出检验员ID
                $("#HFirstCheckEmpName").val(sessionStorage["HEmpName"]);//根据登录用户带出检验员
                HDeptID = sessionStorage["HDeptID"]; //根据登录用户带出部门ID
                HCenterID = sessionStorage["HWorkCenterID"]; //根据登录用户带出工作中心ID
                //获取最大单据号
                $.ajax({
                    url: GetWEBURL() + "/Web/GetMAXNum",
@@ -739,8 +784,15 @@
                        $("#HMaker").val(sessionStorage["HUserName"]);
                    }
                });
                //获取班次
                get_HWorkShift();
            }
            else if (OperationType == 2) {
                $("#HFirstCheckEmp").val(sessionStorage["HEmpID"]);//根据登录用户带出检验员ID
                $("#HFirstCheckEmpName").val(sessionStorage["HEmpName"]);//根据登录用户带出检验员
                HDeptID = sessionStorage["HDeptID"]; //根据登录用户带出部门ID
                HCenterID = sessionStorage["HWorkCenterID"]; //根据登录用户带出工作中心ID
                if (HICMOEntryID < 0 || HICMOEntryID == "") {
                    layer.alert("生产任务单子内码错误,无法工序检!", { icon: 5 });
                    $('#btn-AddNew').addClass("layui-btn-disabled").attr("disabled", true);//有源单时新增按钮禁用
@@ -770,12 +822,26 @@
                    if (HSouceBillType == 3722 || HSouceBillType == 4610) {
                        //根据源单id获取源单信息
                        LoadingInformation2();
                        //自动带出检验方案
                        GetCheckItemID();
                    } else if (HSouceBillType == 3791) {
                        //根据源单id获取源单信息
                        LoadingInformation_StationOutBill();
                    } else {
                        //自动带出检验方案
                        GetCheckItemID();
                    }
                    //工序流转卡列表工序检
                    else if (HSouceBillType == 3772) {
                        //根据源单id获取源单信息
                        LoadingInformation_ProcExchange();
                        //自动带出检验方案
                        GetCheckItemID();
                    }
                    else {
                        layer.alert("源单类型无效!", { icon: 5 });
                    }
                    //获取班次
                    get_HWorkShift();
                }
            }
            else if (OperationType == 3) {
@@ -785,8 +851,6 @@
            $("[name='btnSearchCheckItemID']").addClass("layui-btn-disabled").attr("disabled", true);//禁用检验项目放大镜
            //初始化表格
            set_InitGrid();
            //根据源单id获取源单信息
            function LoadingInformation2() {
@@ -794,27 +858,39 @@
                $.ajax({
                    url: GetWEBURL() + "/QC_ProcessCheckBill/get_ICMOBillStatus_Tmp",
                    type: "GET",
                    async: false,
                    data: { "HInterID": linterid, "HEntryID": HICMOEntryID, "HBillType": HSouceBillType },
                    success: function (result) {
                        var data = result.data[0];
                        if (result.count == 1) {
                            $("#HProcExchBillNo").val(data.HProcExchBillNo);
                            $("#HProcExchInterID").val(data.HProcExchInterID);
                            $("#HProcExchEntryID").val(data.HProcExchEntryID);
                            $("#HProcExchQty").val(data.HProcExchQty);
                            $("#HICMOBillNo").val(data.HICMOBillNo);
                            $("#HICMOInterID").val(data.HICMOInterID);
                            $("#HICMOQty").val(data.HICMOQty);
                            $("#HSourceName").val(data.HSourceName);
                            $("#HSourceID").val(data.HSourceID);
                            $("#HMaterID").val(data.HMaterID);
                            $("#HMainSourceBillNo").val("");
                            $("#HMainSourceBillType").val(data.HBillType);
                            $("#HMainSourceInterID").val(data.HInterID);
                            $("#HICMOEntryID").val(HICMOEntryID);
                        } else {
                            layer.alert(result.Message, { icon: 5 });
                        if (result.code == 1) {
                            var data = result.data[0];
                            if (result.count == 1) {
                                $("#HProcExchBillNo").val(data.HProcExchBillNo);
                                $("#HProcExchInterID").val(data.HProcExchInterID);
                                $("#HProcExchEntryID").val(data.HProcExchEntryID);
                                $("#HProcExchQty").val(data.HProcExchQty);
                                $("#HICMOBillNo").val(data.HICMOBillNo);
                                $("#HICMOInterID").val(data.HICMOInterID);
                                $("#HICMOQty").val(data.HICMOQty);
                                $("#HSourceName").val(data.HSourceName);
                                $("#HSourceID").val(data.HSourceID);
                                $("#HMaterID").val(data.HMaterID);
                                $("#HMaterName").val(data.HMaterName);
                                $("#HMainSourceBillNo").val("");
                                $("#HMainSourceBillType").val(data.HBillType);
                                $("#HMainSourceInterID").val(data.HInterID);
                                $("#HICMOEntryID").val(HICMOEntryID);
                                $("#HQCSchemeName").val(data.检验方案名称);
                                $("#HQCSchemeID").val(data.检验方案ID);
                                $("#HTakeSampleCheckBillNo").val(data.HProcExchBillNo);
                                $("#HTakeSampleCheckBillID").val(data.HProcExchInterID);
                                //获取表体检验项目信息
                                get_CheckItem();
                            } else {
                                layer.alert(result.Message, { icon: 5 });
                            }
                        }
                        layer.close(wait);
                    }, error: function () {
                        layer.close(wait);
@@ -829,6 +905,7 @@
                $.ajax({
                    url: GetWEBURL() + '/QC_ProcessCheckBill/get_StationOutBill',
                    type: "GET",
                    async: false,
                    data: { "HInterID": linterid, "user": sessionStorage["HUserName"] },
                    success: function (result) {
                        var data = result.data[0];
@@ -862,16 +939,66 @@
                    }
                });
            }
            //根据源单id获取源单信息(工序流转卡)
            function LoadingInformation_ProcExchange() {
                $('#btnSearchSource').removeClass("layui-btn-disabled").attr("disabled", false);//生产资源按钮启用
                var wait = layer.load();
                $.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];
                        if (result.count == 1) {
                            $("#HProcExchBillNo").val(data.单据号);
                            $("#HProcExchInterID").val(data.HInterID);
                            $("#HProcExchEntryID").val(data.HProcExchEntryID == null ? 0 : data.HProcExchEntryID);//
                            $("#HProcExchQty").val(data.流转卡数量);
                            $("#HICMOBillNo").val(data.任务单);
                            $("#HICMOInterID").val(data.HICMOInterID);
                            $("#HICMOQty").val(data.HICMOQty == null ? 0 : data.HICMOQty);//
                            $("#HSourceName").val(data.生产资源);//
                            $("#HSourceID").val(data.HSourceID == null ? 0 : data.HSourceID);//
                            $("#HMaterID").val(data.HMaterID);
                            $("#HMaterName").val(data.产品名称);
                            $("#HMainSourceBillNo").val(data.单据号);
                            $("#HMainSourceBillType").val(data.HBillType);
                            $("#HMainSourceInterID").val(data.HInterID);
                            $("#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.批号);
                            $("#HTakeSampleCheckBillNo").val(data.单据号);
                            $("#HTakeSampleCheckBillID").val(data.HInterID);
                            HDeptID = data.HWorkShopID == null ? sessionStorage["HDeptID"] : data.HWorkShopID;//工作中心id
                            HCenterID = data.HCenterID == null ? sessionStorage["HWorkCenterID"] : data.HCenterID;//工作中心id
                            //获取表体检验项目信息
                            get_CheckItem();
                        } else {
                            layer.alert(result.Message, { icon: 5 });
                        }
                        layer.close(wait);
                    }, error: function () {
                        layer.close(wait);
                        layer.alert("接口请求失败!", { icon: 5 });
                    }
                });
            }
            //头工具栏事件
            table.on('toolbar(mainTable)', function (obj) {
                var checkStatus = table.checkStatus('mainTable')
                    , 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": '',
                    "HSampleSchemeName": "", "HSampleQty": "", "HSampleDamageQty": "", "HAcceptQty": "", "HInspectionLevel": "", "HRejectQty": "",
                    "HInspectVal": '', "HTargetVal": '', "HUpLimit": '', "HDownLimit": '', "HUpOffSet": '', "HDownOffSet": '', "HSampleDamageQty": '0',
                    "HSampleSchemeName": "", "HSampleQty": "0", "HSampleDamageQty": "0", "HAcceptQty": "", "HInspectionLevel": "", "HRejectQty": "",
                    "HStrictness": "", "HSampleUnRightQty": "", "HAQL": "", "HSamplingType": ""
                };
                switch (obj.event) {
@@ -908,6 +1035,35 @@
                        break;
                }
            });
            //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 () {
                        }
                    })
                }
            });
            //退出按钮
            form.on('submit(btn-Exit)', function (data) {
@@ -996,6 +1152,7 @@
                $(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") {
                        if (obj.event == 'HQCCheckItemID')  //模具信息
                        {
@@ -1008,7 +1165,7 @@
                                shift: 2,
                                area: ['90%', '90%'],
                                maxmin: true,
                                content: ['../../../views/Baseset/基础资料/Gy_QCCheckItemListView.html', 'yes'],
                                content: ['../../基础资料/公用基础资料/Gy_CheckItem.html?openType=2', 'yes'],
                                btn: ['确定', '取消']
                                , btn1: function (index, layero) {
@@ -1018,12 +1175,16 @@
                                    if (checkStatus.data.length === 0) {
                                        return layer.msg('请选择数据');
                                    }
                                    var HResult = checkStatus.data[0].默认结论 == "合格" ? 1 : 2
                                    //同步更新表格和缓存对应的值
                                    obj.update({
                                        æ£€éªŒé¡¹ç›®: checkStatus.data[0].名称
                                        , HQCCheckItemID: checkStatus.data[0].HItemID
                                        , HResult: HResult
                                    });
                                    $('#HResult' + rowIndex + '').find("option[value='" + HResult + "']").attr("selected", true);
                                    form.render('select');
                                    layer.close(layer.index); //它获取的始终是最新弹出的某个层,值是由layer内部动态递增计算的
                                }
                                , btn2: function (index, layero) {
@@ -1046,7 +1207,7 @@
                                shift: 2,
                                area: ['90%', '90%'],
                                maxmin: true,
                                content: ['../../../views/Baseset/基础资料/Gy_InspectInstruMentList.html', 'yes'],
                                content: ['../../基础资料/公用基础资料/Gy_InspectInstruMent.html?openType=2', 'yes'],
                                btn: ['确定', '取消']
                                , btn1: function (index, layero) {
@@ -1059,6 +1220,7 @@
                                    //同步更新表格和缓存对应的值
                                    obj.update({
                                        æ£€éªŒä»ªå™¨ä»£ç : checkStatus.data[0].检验仪器代码,
                                        æ£€éªŒä»ªå™¨: checkStatus.data[0].检验仪器名称
                                        , HInspectInstruMentID: checkStatus.data[0].HItemID
                                    });
@@ -1095,7 +1257,7 @@
                                shift: 2,
                                area: ['90%', '90%'],
                                maxmin: true,
                                content: ['../../../views/Baseset/基础资料/Gy_InspectValueList.html', 'yes'],
                                content: ['../../基础资料/公用基础资料/Gy_InspectValue.html?openType=2', 'yes'],
                                btn: ['确定', '取消']
                                , btn1: function (index, layero) {
@@ -1108,10 +1270,10 @@
                                    //同步更新表格和缓存对应的值
                                    obj.update({
                                        HInSpectValueB: checkStatus.data[0].检验值名称
                                        HInSpectValueB: checkStatus.data[0].检测值名称
                                    });
                                    layer.close(layer.index); //它获取的始终是最新弹出的某个层,值是由layer内部动态递增计算的
                                    var DXValue = checkStatus.data[0].检验值名称; //定性检测值
                                    var DXValue = checkStatus.data[0].检测值名称; //定性检测值
                                    var MBValue = $("#HTargetVal").val(); //目标值
                                    if (Number(DXValue) == Number(MBValue)) { //定性检测值 = ç›®æ ‡å€¼ï¼Œåˆ¤å®šåˆæ ¼
@@ -1182,6 +1344,49 @@
                }
            });
            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; //得到字段
                var HInspectVal = $("#HInspectVal").val(); //检验值
                //var HTargetVal = $("#HTargetVal").val(); //目标值
                //var HComparator = $("#HComparator").val(); //比较符
                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 : 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;
                }
            });
            //保存按钮
            form.on('submit(btnSave)', function (data) {
                set_SaveBill(data);
@@ -1190,7 +1395,7 @@
            //保存
            function set_SaveBill(data) {
                //赋值最后一个选中行的数据给option.data
                Assignment(LastIndex, LastIndex);
                //Assignment(LastIndex, LastIndex);
                //保存最后一次点击行的检验值
                set_SaveValue($("#HEntryID").val());
@@ -1214,7 +1419,7 @@
                        return;
                    }
                    if (sSubTable[i].HSampleSchemeID == '') {
                    if (sSubTable[i].HSampleSchemeID == '' || sSubTable[i].HSampleSchemeID == null) {
                        sSubTable[i].HSampleSchemeID = 0
                    }
                    if (sSubTable[i].HSampleQty == '' || sSubTable[i].HSampleQty == null) {
@@ -1240,6 +1445,7 @@
                var sSubStr = JSON.stringify(table.cache['mainTable']);
                var sSubValue = JSON.stringify(table.cache['ValueTable']);
                var sMainSub = sMainStr + ';' + sSubStr + ';' + OperationType + ";" + sessionStorage["HUserName"] + ';' + sSubValue;
                var index = layer.load();
                $.ajax({
                    type: "POST",
@@ -1275,21 +1481,21 @@
            //编辑时加载表头
            function RoadBillMain(linterid) {
                $.ajax({
                    url: GetWEBURL() + "/Web/GetPonderationBill",
                    type: "GET",
                    data: { "HInterID": linterid },
                    success: function (d) {
                        // console.log(d.data);
                        $("#HInterID").val(d.data[0].HInterID);
                        $("#HBillNo").val(d.data[0].HBillNo);
                    }
                })
                //$.ajax({
                //    url: GetWEBURL() + "/Web/GetPonderationBill",
                //    type: "GET",
                //    data: { "HInterID": linterid },
                //    success: function (d) {
                //        // console.log(d.data);
                //        $("#HInterID").val(d.data[0].HInterID);
                //        $("#HBillNo").val(d.data[0].HBillNo);
                //    }
                //})
                var ajaxLoad = layer.load();
                var sWhere = " and hmainid=" + linterid;
                $.ajax({
                    url: GetWEBURL() + "/QC_ProcessCheckBill/QC_ProcessCheckBillList",
                    url: GetWEBURL() + "/QC_ProcessCheckBill/QC_ProcessCheckBill_Edit",
                    type: "GET",
                    data: { "sWhere": sWhere, "user": sessionStorage["HUserName"] },
                    success: function (result) {
@@ -1356,16 +1562,27 @@
                                , "HEntryID": data.hsubid
                                , "HQCCheckItemName": data.检验项目名称
                                , "HQCCheckItemID": data.HQCCheckItemID
                                , "HShiftsID": data.HShiftsID
                                , "HShiftsName": data.班次名称
                                , "HErrTreatment": data.异常临时处理方案
                                , "HBatchNo": data.批号
                                , "HTakeSampleCheckBillID": data.HTakeSampleCheckBillID
                                , "HTakeSampleCheckBillNo": data.HTakeSampleCheckBillNo
                                , "HProcID": data.HProcID
                                , "HProcName": data.HProcName
                            });
                            $("input[name=HCheckerResult][value=true]").prop("checked", data.判定结论 === "合格");
                            $("input[name=HCheckerResult][value=false]").prop("checked", data.判定结论 === "不合格");
                            form.render("radio");
                            data = result.data;
                            //data = result.data.h_v_QC_Edit_FirstPieceCheckBillList;
                            //子表  èµ‹å€¼
                            var rowdata = [];
                            for (var i = 0; i < data.length; i++) {
                                rowdata.push(
                                    {
                                        "HQCCheckItemID": data[i].HQCCheckItemID, "检验项目": data[i].检验项目名称, "HInspectInstruMentID": data[i].HInspectInstruMentID, "检验仪器": data[i].检验仪器, "HQCStd": data[i].检验标准,
                                        "HUnit": data[i].单位名称, "HQCNote": data[i].检验记录, "HResult": 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,
                                        "HSampleSchemeID": data[i].HSampleSchemeID, "HUnitID": data[i].HUnitID,
@@ -1375,14 +1592,13 @@
                                    }
                                )
                                console.log(data[i].目标值);
                                SummaryIndex.push(i.toString());
                            }
                            option.data = rowdata;
                            table.render(option);
                            for (let j = 0; j < data.length; j++) {
                                $("#HResult" + (j + 1)).val(data[j].结论)
                                $("#HResult" + (j + 1)).val(data[j].结论 == "合格" ? 1 : 2)
                            }
                            for (let j = 0; j < data.length; j++) {
                                $("#HAnalysisMethod" + (j + 1)).val(data[j].分析方法 == "定性分析" ? 1 : (data[j].分析方法 == "定量分析" ? 2 : 3))
@@ -1425,6 +1641,8 @@
            //表头信息检验方案弹窗
            form.on('submit(btnSearchQCScheme)', function () {
                var HName = $("#HMaterName").val();
                var HProcName = $("#HProcName").val();
                //页面层-自定义
                layer.open({
                    type: 2,
@@ -1434,7 +1652,7 @@
                    shift: 2,
                    area: ['90%', '90%'],
                    maxmin: true,
                    content: ['../../../views/Baseset/基础资料/Gy_QCCheckProjectListView.html', 'yes'],
                    content: ['../../质量管理/检验方案单/QC_CheckProjectList.html?OperationType=1&HName=' + HName + '&HProcName=' + HProcName + '', 'yes'],
                    btn: ['确定', '取消']
                    , btn1: function (index, layero) {
@@ -1444,9 +1662,47 @@
                        if (checkStatus.data.length === 0) {
                            return layer.msg('请选择数据');
                        }
                        $("#HQCSchemeID").val(checkStatus.data[0].HItemID);
                        $("#HQCSchemeName").val(checkStatus.data[0].方案名称);
                        $("#HQCSchemeID").val(checkStatus.data[0].hmainid);
                        $("#HQCSchemeName").val(checkStatus.data[0].检验方案名称);
                        get_CheckItem();
                        layer.close(layer.index); //它获取的始终是最新弹出的某个层,值是由layer内部动态递增计算的
                    }
                    , btn2: function (index, layero) {
                        //按钮【按钮二】的回调
                        //return false å¼€å¯è¯¥ä»£ç å¯ç¦æ­¢ç‚¹å‡»è¯¥æŒ‰é’®å…³é—­
                    },
                    end: function () {
                    },
                    success: function (layero, index) {
                    }
                });
            });
            //表头信息生产班次弹窗
            form.on('submit(btnHShifts)', function () {
                //页面层-自定义
                layer.open({
                    type: 2,
                    skin: 'layui-layer-rim', //加上边框
                    title: '生产班次列表',
                    closeBtn: 1,
                    shift: 2,
                    area: ['90%', '90%'],
                    maxmin: true,
                    content: ['../../基础资料/生产基础资料/Gy_WorkShiftList.html?type=HWorkShifts', 'yes'],
                    btn: ['确定', '取消']
                    , btn1: function (index, layero) {
                        //按钮【按钮一】的回调
                        var iframeWindow = window['layui-layer-iframe' + index]  //获取弹框页面
                        var checkStatus = iframeWindow.layui.table.checkStatus('mainTable');//获取table的elem:"#test"
                        if (checkStatus.data.length === 0) {
                            return layer.msg('请选择数据');
                        }
                        $("#HShiftsName").val(checkStatus.data[0].班次名称);
                        $("#HShiftsID").val(checkStatus.data[0].HInterID);
                        layer.close(layer.index); //它获取的始终是最新弹出的某个层,值是由layer内部动态递增计算的
                    }
                    , btn2: function (index, layero) {
@@ -1473,7 +1729,7 @@
                    shift: 2,
                    area: ['90%', '90%'],
                    maxmin: true,
                    content: ['../../../views/基础资料/公用基础资料/Gy_CheckItem.html', 'yes'],
                    content: ['../../../views/基础资料/公用基础资料/Gy_CheckItem.html?openType=2', 'yes'],
                    btn: ['确定', '取消']
                    , btn1: function (index, layero) {
@@ -1511,7 +1767,7 @@
                    shift: 2,
                    area: ['90%', '90%'],
                    maxmin: true,
                    content: ['../../../views/Baseset/基础资料/Gy_UnitList.html', 'yes'],
                    content: ['../../../views/基础资料/公用基础资料/Gy_Unit.html?Type=HUnitList', 'yes'],
                    btn: ['确定', '取消']
                    , btn1: function (index, layero) {
@@ -1522,7 +1778,7 @@
                            return layer.msg('请选择数据');
                        }
                        $("#HUnitID").val(checkStatus.data[0].HItemID);
                        $("#HUnit").val(checkStatus.data[0].HName);
                        $("#HUnit").val(checkStatus.data[0].计量单位名称);
                        layer.close(layer.index); //它获取的始终是最新弹出的某个层,值是由layer内部动态递增计算的
                    }
                    , btn2: function (index, layero) {
@@ -1549,7 +1805,7 @@
                    shift: 2,
                    area: ['90%', '90%'],
                    maxmin: true,
                    content: ['../../../views/Baseset/基础资料/Gy_InspectValueList.html', 'yes'],
                    content: ['../../基础资料/公用基础资料/Gy_InspectValue.html?openType=2', 'yes'],
                    btn: ['确定', '取消']
                    , btn1: function (index, layero) {
@@ -1559,8 +1815,8 @@
                        if (checkStatus.data.length === 0) {
                            return layer.msg('请选择数据');
                        }
                        $("#HInspectValB").val(checkStatus.data[0].hmainid);
                        $("#HInspectVal").val(checkStatus.data[0].检验值名称);
                        $("#HInspectValB").val(checkStatus.data[0].HItemID);
                        $("#HInspectVal").val(checkStatus.data[0].检测值名称);
                        //==================================判定是否合格,只有定性分析可以选择检验值、目标值==================================
                        var HComparator = $("#HComparator").val(); //比较符
@@ -1596,7 +1852,7 @@
                    shift: 2,
                    area: ['90%', '90%'],
                    maxmin: true,
                    content: ['../../../views/Baseset/基础资料/Gy_InspectValueList.html', 'yes'],
                    content: ['../../基础资料/公用基础资料/Gy_InspectValue.html?openType=2', 'yes'],
                    btn: ['确定', '取消']
                    , btn1: function (index, layero) {
@@ -1606,10 +1862,10 @@
                        if (checkStatus.data.length === 0) {
                            return layer.msg('请选择数据');
                        }
                        $("#HTargetValB").val(checkStatus.data[0].hmainid);
                        $("#HTargetVal").val(checkStatus.data[0].检验值名称);
                        $("#HUpLimit").val(checkStatus.data[0].检验值名称);
                        $("#HDownLimit").val(checkStatus.data[0].检验值名称);
                        $("#HTargetValB").val(checkStatus.data[0].HItemID);
                        $("#HTargetVal").val(checkStatus.data[0].检测值名称);
                        $("#HUpLimit").val(checkStatus.data[0].检测值名称);
                        $("#HDownLimit").val(checkStatus.data[0].检测值名称);
                        //==================================判定是否合格,只有定性分析可以选择检验值、目标值==================================
                        var HComparator = $("#HComparator").val(); //比较符
@@ -1669,6 +1925,21 @@
                        $("#HUpLimit").val(checkStatus.data[0].上限值);
                        $("#HDownLimit").val(checkStatus.data[0].下限值);
                        if ($("#HEntryID").val() - 1 >= 0) {
                            option.data[$("#HEntryID").val() - 1].HSampleSchemeID = checkStatus.data[0].hmainid;
                            option.data[$("#HEntryID").val() - 1].HSampleSchemeName = checkStatus.data[0].抽样方案名称;
                            option.data[$("#HEntryID").val() - 1].HSamplingType = checkStatus.data[0].抽样类型;
                            option.data[$("#HEntryID").val() - 1].HInspectionLevel = checkStatus.data[0].检验水平;
                            option.data[$("#HEntryID").val() - 1].HStrictness = checkStatus.data[0].严格度;
                            option.data[$("#HEntryID").val() - 1].HAQL = checkStatus.data[0].AQL;
                            option.data[$("#HEntryID").val() - 1].HSampleQty = checkStatus.data[0].样本量;
                            option.data[$("#HEntryID").val() - 1].HSampleQty2 = checkStatus.data[0].样本量;
                            option.data[$("#HEntryID").val() - 1].HAcceptQty = checkStatus.data[0].允许数;
                            option.data[$("#HEntryID").val() - 1].HRejectQty = checkStatus.data[0].拒绝数;
                            option.data[$("#HEntryID").val() - 1].HUpLimit = checkStatus.data[0].上限值;
                            option.data[$("#HEntryID").val() - 1].HDownLimit = checkStatus.data[0].下限值;
                        }
                        rowdata_Value = [];
                        for (let i = 1; i <= checkStatus.data[0].样本量; i++) {
                            rowdata_Value.push({
@@ -1694,12 +1965,14 @@
            });
            //#endregion
            //#region ã€é€‰æ£€éªŒæ–¹æ¡ˆèŽ·å–è¡¨ä½“æ£€éªŒé¡¹ç›®ä¿¡æ¯ã€‘
            function get_CheckItem() {
                var HBatchQty = $("#HProcExchQty").val();
                $.ajax({
                    url: GetWEBURL() + "/Web/GetCheckItemByCheckProjectID",
                    type: "GET",
                    data: { "CheckProjectID": $("#HQCSchemeID").val() == '' ? 0 : $("#HQCSchemeID").val(), "HBatchQty": HBatchQty},
                    data: { "CheckProjectID": $("#HQCSchemeID").val() == '' ? 0 : $("#HQCSchemeID").val(), "HBatchQty": HBatchQty },
                    success: function (result) {
                        if (result.code == 1) {
                            var rowdata = [];
@@ -1716,9 +1989,9 @@
                                    //"HStrictness": "", "HSampleUnRightQty": "", "HAQL": "", "HSamplingType": ""
                                    //}
                                    {
                                        "HQCCheckItemID": data[i]["HQCCheckItemID"], "检验项目": data[i]["检验项目"], "HInspectInstruMentID": data[i]["HInspectInstruMentID"], "检验仪器": data[i]["检验仪器"], "HQCStd": data[i]["HQCStd"], "HUnit": data[i]["单位名称"], "HQCNote": "", "HAnalysisMethod": data[i]["分析方法"], "HResult": data[i]["HResult"],
                                        "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": '', "HDownLimit": '', "HUpOffSet": '', "HDownOffSet": '', "HSampleDamageQty": "",
                                        "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].抽样类型
                                    }
@@ -1737,7 +2010,7 @@
                            table.render(option);
                            //检验值
                            option_Value.data = rowdata_Value;
                            console.log(JSON.stringify(option_Value.data));
                            //console.log(JSON.stringify(option_Value.data));
                            table.render(option_Value);
                            //================================================
                            for (var i = 1; i <= result.data.length; i++) {
@@ -1757,11 +2030,82 @@
                            $("tr[data-index = " + (result.data.length - 1) + "] ").attr({ "style": "background:#ceedfa;color:black" });
                            trindex = result.data.length - 1;
                            $("#HEntryID").val() - 1
                        }
                            $("#HEntryID").val() - 1
                        }
                    }
                })
            }
            window.get_CheckItem1 = function () {
                var HBatchQty = $("#HProcExchQty").val();
                $.ajax({
                    url: GetWEBURL() + "/Web/GetCheckItemByCheckProjectID",
                    type: "GET",
                    data: { "CheckProjectID": $("#HQCSchemeID").val() == '' ? 0 : $("#HQCSchemeID").val(), "HBatchQty": HBatchQty },
                    success: function (result) {
                        if (result.code == 1) {
                            var rowdata = [];
                            rowdata_Value = [];
                            var data = result.data;
                            for (var i = 0; i < result.data.length; i++) {
                                //子表  èµ‹å€¼
                                rowdata.push(
                                    //{
                                    //"HQCCheckItemID": data[i]["HQCCheckItemID"], "检验项目": data[i]["检验项目"], "HInspectInstruMentID": 0, "检验仪器": "", "HQCStd": data[i]["HQCStd"], "HUnit": data[i]["HUnit"], "HQCNote": "", "HAnalysisMethod": data[i]["HAnalysisMethod"], "HResult": data[i]["HResult"],
                                    //"HMax": "", "HMin": "", "HAvg": "", "HRemark": "", "HKeyInspect": false, "HStatus": 0, "HSampleSchemeID": 0, "HUnitID": 0,
                                    //"HInspectVal": '', "HTargetVal": '', "HUpLimit": '', "HDownLimit": '', "HUpOffSet": '', "HDownOffSet": '', "HSampleDamageQty": '',
                                    //"HSampleSchemeName": "", "HSampleQty": "", "HSampleDamageQty": "", "HAcceptQty": "", "HInspectionLevel": "", "HRejectQty": "",
                                    //"HStrictness": "", "HSampleUnRightQty": "", "HAQL": "", "HSamplingType": ""
                                    //}
                                    {
                                        "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(data[i].样本量);
                            }
                            //检验项目
                            for (let j = 1; j <= data[data.length - 1].样本量; 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
            //表头信息工序流转卡弹窗
            form.on('submit(btnSearchProcExch)', function () {
@@ -1774,7 +2118,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) {
@@ -1813,7 +2157,7 @@
                    shift: 2,
                    area: ['90%', '90%'],
                    maxmin: true,
                    content: ['../../../views/Baseset/基础资料/Sc_ICMOBillListView2.html', 'yes'],
                    content: ['../../生产管理/生产任务单/Sc_ICMOBillList.html?openType=2', 'yes'],
                    btn: ['确定', '取消']
                    , btn1: function (index, layero) {
@@ -1824,7 +2168,7 @@
                            return layer.msg('请选择数据');
                        }
                        $("#HICMOInterID").val(checkStatus.data[0].hmainid);
                        $("#HICMOEntryID").val(checkStatus.data[0].hsubid);
                        $("#HICMOEntryID").val(checkStatus.data[0].HEntryID);
                        $("#HICMOBillNo").val(checkStatus.data[0].单据号);
                        $("#HICMOQty").val(checkStatus.data[0].计划生产数量);
                        layer.close(layer.index); //它获取的始终是最新弹出的某个层,值是由layer内部动态递增计算的
@@ -1853,7 +2197,7 @@
                    shift: 2,
                    area: ['90%', '90%'],
                    maxmin: true,
                    content: ['../../PublicPage/UserInformation.html', 'yes'],
                    content: ['../../基础资料/公用基础资料/Gy_EmployeeList.html?Type=HEmp', 'yes'],
                    btn: ['确定', '取消']
                    , btn1: function (index, layero) {
@@ -1863,7 +2207,7 @@
                        if (checkStatus.data.length === 0) {
                            return layer.msg('请选择数据');
                        }
                        $("#HFirstCheckEmpName").val(checkStatus.data[0].HName);
                        $("#HFirstCheckEmpName").val(checkStatus.data[0].职员名称);
                        $("#HFirstCheckEmp").val(checkStatus.data[0].HItemID);
                        layer.close(layer.index); //它获取的始终是最新弹出的某个层,值是由layer内部动态递增计算的
                    }
@@ -1891,7 +2235,7 @@
                    shift: 2,
                    area: ['90%', '90%'],
                    maxmin: true,
                    content: ['../../PublicPage/SourceInformation.html', 'yes'],
                    content: ['../../基础资料/生产基础资料/Gy_Source.html', 'yes'],
                    btn: ['确定', '取消']
                    , btn1: function (index, layero) {
@@ -1901,9 +2245,53 @@
                        if (checkStatus.data.length === 0) {
                            return layer.msg('请选择数据');
                        }
                        $("#HSourceName").val(checkStatus.data[0].HName);
                        $("#HSourceName").val(checkStatus.data[0].生产资源名称);
                        $("#HSourceID").val(checkStatus.data[0].HItemID);
                        layer.close(layer.index); //它获取的始终是最新弹出的某个层,值是由layer内部动态递增计算的
                        get_ICMOBillStatusList();
                        get_QC_TakeSampleCheckBillList();
                        GetCheckItemID();
                    }
                    , btn2: function (index, layero) {
                        //按钮【按钮二】的回调
                        //return false å¼€å¯è¯¥ä»£ç å¯ç¦æ­¢ç‚¹å‡»è¯¥æŒ‰é’®å…³é—­
                    },
                    end: function () {
                    },
                    success: function (layero, index) {
                    }
                });
            });
            //表头信息工序
            form.on('submit(btnHProc)', function () {
                //页面层-自定义
                layer.open({
                    type: 2,
                    skin: 'layui-layer-rim', //加上边框
                    title: '工序列表',
                    closeBtn: 1,
                    shift: 2,
                    area: ['90%', '90%'],
                    maxmin: true,
                    content: ['../../基础资料/生产基础资料/Gy_Process.html', 'yes'],
                    btn: ['确定', '取消']
                    , btn1: function (index, layero) {
                        //按钮【按钮一】的回调
                        var iframeWindow = window['layui-layer-iframe' + index]  //获取弹框页面
                        var checkStatus = iframeWindow.layui.table.checkStatus('mainTable');//获取table的elem:"#test"
                        if (checkStatus.data.length === 0) {
                            return layer.msg('请选择数据');
                        }
                        $("#HProcName").val(checkStatus.data[0].工序名称);
                        $("#HProcID").val(checkStatus.data[0].HItemID);
                        layer.close(layer.index); //它获取的始终是最新弹出的某个层,值是由layer内部动态递增计算的
                        get_ICMOBillStatusList();
                        get_QC_TakeSampleCheckBillList();
                        GetCheckItemID();
                    }
                    , btn2: function (index, layero) {
                        //按钮【按钮二】的回调
@@ -1929,7 +2317,7 @@
                    shift: 2,
                    area: ['90%', '90%'],
                    maxmin: true,
                    content: ['../../Baseset/基础资料/Gy_MaterialList.html', 'yes'],
                    content: ['../../基础资料/公用基础资料/Gy_Material.html', 'yes'],
                    btn: ['确定', '取消']
                    , btn1: function (index, layero) {
@@ -1939,8 +2327,9 @@
                        if (checkStatus.data.length === 0) {
                            return layer.msg('请选择数据');
                        }
                        $("#HMaterNumber").val(checkStatus.data[0].HNumber);
                        $("#HMaterNumber").val(checkStatus.data[0].物料代码);
                        $("#HMaterID").val(checkStatus.data[0].HItemID);
                        GetCheckItemID();
                        layer.close(layer.index); //它获取的始终是最新弹出的某个层,值是由layer内部动态递增计算的
                    }
                    , btn2: function (index, layero) {
@@ -1969,15 +2358,16 @@
                $("#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": '',
                    "HSampleSchemeName": "", "HSampleQty": "", "HSampleDamageQty": "", "HAcceptQty": "", "HInspectionLevel": "", "HRejectQty": "",
                    "HInspectVal": '', "HTargetVal": '', "HUpLimit": '', "HDownLimit": '', "HUpOffSet": '', "HDownOffSet": '', "HSampleDamageQty": '0',
                    "HSampleSchemeName": "", "HSampleQty": "0", "HSampleDamageQty": "0", "HAcceptQty": "", "HInspectionLevel": "", "HRejectQty": "",
                    "HStrictness": "", "HSampleUnRightQty": "", "HAQL": "", "HSamplingType": ""
                }];
                option = {
                    elem: '#mainTable'
                    , toolbar: '#toolbarDemo'
                    , totalRow: true
                    , limit: 500 //每页默认显示的数量
                    , height: 'full-50'
                    , cellMinWidth: 150
@@ -1985,8 +2375,14 @@
                        { type: 'checkbox', totalRowText: '合计行' }
                        , { type: 'numbers', title: '序号', totalRow: true }
                        , { field: 'HQCCheckItemID', title: 'HQCCheckItemID', hide: true }
                        , { 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' }
                        , { field: 'HAnalysisMethod', title: '分析方法', templet: '#HAnalysisMethod', event: 'HAnalysisMethod' }
@@ -1995,8 +2391,11 @@
                        //, { field: 'HQCStd', title: '检验标准', edit: 'text' }
                        , { field: 'HUnit', title: '单位', edit: 'text' }
                        , { field: 'HQCNote', title: '检验记录', edit: 'text' }
                        , { field: 'HMax', title: '最大值', edit: 'text' }
                        , { field: 'HMin', title: '最小值', edit: 'text' }
                        , { field: 'HInspectVal', title: '检验值', edit: 'text' }
                        , { field: 'HUpLimit', title: '上限值' }
                        , { field: 'HDownLimit', title: '下限值' }
                        , { field: 'HMax', title: '最大值', edit: 'text', totalRow: true }
                        , { field: 'HMin', title: '最小值', edit: 'text', totalRow: true }
                        , { field: 'HAvg', title: '平均值', edit: 'text', totalRow: true }
                        //, { field: 'HRemark', title: '备注', edit: 'text' }
@@ -2015,13 +2414,10 @@
                        , { field: 'xxx', title: '比较符', edit: 'text', hide: true }
                        , { field: 'HUnitID', title: '单位ID', edit: 'text', hide: true }
                        , { field: 'HUnit', title: '单位', edit: 'text', hide: true }
                        , { field: 'HInspectVal', title: '检验值', edit: 'text', hide: true }
                        , { field: 'HTargetVal', title: '目标值', edit: 'text', hide: true }
                        , { field: 'HUpLimit', title: '上限值', edit: 'text', hide: true }
                        , { field: 'HDownLimit', title: '下限值', edit: 'text', hide: true }
                        , { field: 'HUpOffSet', title: '上偏差', edit: 'text', hide: true }
                        , { field: 'HDownOffSet', title: '下偏差', edit: 'text', hide: true }
                        , { fixed: 'right', title: '操作', toolbar: '#barDemo', width: 85  }
                        , { fixed: 'right', title: '操作', toolbar: '#barDemo', width: 85 }
                    ]]
                    , done: function (res, curr, count) {
                        option.data = res.data;
@@ -2056,6 +2452,7 @@
                    , limit: 500 //每页默认显示的数量
                    , height: 'full-50'
                    , cellMinWidth: 150
                    , totalRow: true
                    , cols: [[ //表头
                        { type: 'checkbox', totalRowText: '合计行' }
                        , { field: 'HSEQ', title: '序号' }
@@ -2131,11 +2528,11 @@
                    }
                }
                if (HQty > 0) {
                    document.querySelectorAll("[name='HCheckerResult']")[0].removeAttribute('checked'); //删除选择属性
                    $("input:radio[name=HCheckerResult][value=" + false + "]").attr("checked", "true"); //添加选择属性
                    document.querySelectorAll("[name='HCheckerResult']")[0].removeAttribute('checked'); //删除选择属性
                    $("input:radio[name=HCheckerResult][value=" + false + "]").prop("checked", "true"); //添加选择属性
                } else {
                    document.querySelectorAll("[name='HCheckerResult']")[1].removeAttribute('checked'); //删除选择属性
                    $("input:radio[name=HCheckerResult][value=" + true + "]").attr("checked", "true"); //添加选择属性
                    $("input:radio[name=HCheckerResult][value=" + true + "]").prop("checked", "true"); //添加选择属性
                }
                form.render('radio');
            }
@@ -2298,19 +2695,15 @@
                //获取单元格检验值数据
                var table_value = table.cache['ValueTable'];
                //set_SaveValue(dataindex + 1);
                //if (isHavingCount == false) {
                //    //刷新检验值表格
                //    option_Value.data = [{
                //        "HSEQ": "0", "HInSpectResult": "", "HInSpectValueB": "", "HInSpectValueT": "", "HInSpectValue": ""
                //    }];
                //    table.render(option_Value);
                //}
                if (OperationType == 3) {
                    set_SaveValue(Number(nowindex) + Number(1));
                } else {
                    set_SaveValue(dataindex + 1);
                }
                //赋值与回显
                if ($("#HSampleSchemeID").val() != "0") {
                    Assignment(nowindex, dataindex);
                }
                if (isHavingCount == false && OperationType != 3) {
                    var row_value = [];
@@ -2322,11 +2715,7 @@
                    //刷新检验值表格
                    option_Value.data = row_value;
                    table.render(option_Value);
                    console.log(option_Value.data);
                }
                //赋值与回显
                Assignment(nowindex, dataindex);
                if (isFristClick != true) {
                    //if ($(this).parents('.layui-table').prevObject.context.cells[5].getAttribute('data-field') == 'HAnalysisMethod') {
                    //console.log('aaa');
@@ -2728,7 +3117,6 @@
            //#region【赋值与回显】
            function Assignment(nowindex, dataindex) {
                console.log(JSON.stringify(option.data));
                if (SummaryIndex.indexOf(nowindex) == -1 && option.data[0].HSampleSchemeID == 0) {
                    var dataobj = {
                        HEntryID: $("#HEntryID").val(), //行号
@@ -2822,8 +3210,8 @@
                    $("#HDownLimit").val(0);
                    $("#HUpOffSet").val(0);
                    $("#HDownOffSet").val(0);
                    $("#HSampleDamageQty").val("")
                    $("#HSampleQty").val("")
                    $("#HSampleDamageQty").val("0")
                    $("#HSampleQty").val("0")
                    $("#HSampleQty2").val("")
                    $("#HAcceptQty").val("0")
                    $("#HInspectionLevel").val("")
@@ -2833,7 +3221,7 @@
                    $("#HSampleUnRightQty2").val("")
                    $("#HAQL").val("")
                    $("#HSamplingType").val("")
                    $("#HSampleQty").val("")
                    $("#HSampleQty").val("0")
                    $("#HInspectResultToSee").val("")
                    $("#HInspectResultToSee2").val("")
                    $("#HSampleUnRightQty").val("")
@@ -3108,6 +3496,71 @@
                            table.render(option_Value);
                            //layer.msg(result.code + result.Message, { icon: 5 });
                        }
                    }
                })
            }
            //根据生产资源或者 å·¥åº æŸ¥è¯¢ç”Ÿäº§å·¥å•信息
            function get_ICMOBillStatusList() {
                var sWhere = "";
                var HProcID = $("#HProcID").val();
                var HSourceID = $("#HSourceID").val();
                var HProcExchInterID = $("#HProcExchInterID").val();
                if (HProcID != "0") {
                    sWhere += " and HProcID=" + HProcID;
                }
                if (HSourceID != "0") {
                    sWhere += " and HSourceID=" + HSourceID
                }
                sWhere += " and HSourceInterID=" + HProcExchInterID;
                $.ajax({
                    url: GetWEBURL() + "/CheckBill/GetICMOBillStatusList",
                    type: "GET",
                    async: false,
                    data: { "sWhere": sWhere, "user": sessionStorage["HUserName"] },
                    success: function (result) {
                        if (result.count == 1) {
                            $("#HProcID").val(result.data[0]["HProcID"]);
                            $("#HProcName").val(result.data[0]["工序"]);
                            $("#HSourceID").val(result.data[0]["HSourceID"]);
                            $("#HSourceName").val(result.data[0]["生产资源"]);
                        } else {
                            layer.msg(result.Message, { icon: 5, btn: ['确认'], time: 100000, offset: 't', skin: 'layui-layer-lan', title: "温馨提示" });
                        }
                    },
                    error: function (err) {
                        layer.msg("接口请求失败!" + err, { icon: 5, btn: ['确认'], time: 100000, offset: 't', skin: 'layui-layer-lan', title: "温馨提示" });
                    }
                })
            }
            //取样单查询
            function get_QC_TakeSampleCheckBillList() {
                var HProcID = $("#HProcID").val();
                var HProcExchInterID = $("#HProcExchInterID").val();
                var sWhere = "";
                if (HProcID == "0" || HProcID == "") {
                    return layer.msg("请选择工序!");
                }
                sWhere = " and å·¥åºæµè½¬å¡ä¸»å†…码='" + HProcExchInterID + "' and HProcID=" + HProcID;
                $.ajax({
                    url: GetWEBURL() + "/QC_TakeSampleCheckBill/QC_TakeSampleCheckBillMainList",
                    type: "GET",
                    async: false,
                    data: { "sWhere": sWhere, "user": sessionStorage["HUserName"] },
                    success: function (result) {
                        if (result.data.length > 0) {
                            $("#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: "温馨提示" });
                    }
                })
            }
@@ -3499,6 +3952,57 @@
            }
            //#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模块
        });
@@ -3510,8 +4014,46 @@
            HReasonName, ReasonID, EmpName,
            ZRProcName, QRName;
        function GetGySource(obj) {  //生产资源
            $("#HSourceName").val(obj.生产资源名称);
            $("#HSourceID").val(obj.HItemID);
        }
        function GetICMOBillValue(obj) {  //生产订单
            $("#HICMOInterID").val(obj[0].hmainid);
            $("#HICMOEntryID").val(obj[0].HEntryID);
            $("#HICMOBillNo").val(obj[0].单据号);
            $("#HICMOQty").val(obj[0].计划生产数量);
        }
        function GetProcExValue(obj) {  //流转卡
            $("#HProcExchInterID").val(obj[0].hmainid);
            $("#HProcExchEntryID").val(obj[0].hsubid);
            $("#HProcExchBillNo").val(obj[0].单据号);
        }
        function GetMaterValue(obj) {  //物料
            $("#HMaterNumber").val(obj[0].物料代码);
            $("#HMaterName").val(obj[0].物料名称);
            $("#HMaterID").val(obj[0].HItemID);
            GetCheckItemID();
        }
        function GetHEmpValue(obj) {  //质检员
            $("#HFirstCheckEmpName").val(obj[0].职员名称);
            $("#HFirstCheckEmp").val(obj[0].HItemID);
        }
        function GetCheckProjectValue(obj) {  //质检方案
            $("#HQCSchemeID").val(obj[0].hmainid);
            $("#HQCSchemeName").val(obj[0].检验方案名称);
            get_CheckItem1();
        }
        //班次
        function GetHWorkShiftsValue(obj) {
            $("#HShiftsName").val(obj[0].班次名称);
            $("#HShiftsID").val(obj[0].HInterID);
        }
    </script>
</body>
</html>