wtt
2025-10-23 a82554041564f5e3dbd21ea936c8f38ad7e976d5
Merge branch 'master' of http://101.37.171.70:10101/r/MES-WEB-LayUI
9个文件已修改
533 ■■■■ 已修改文件
.gitignore 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
WebTM/views/基础资料/公用基础资料/Add_Edit_Gy_Material.html 199 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WebTM/views/计划管理/工艺路线/Gy_RoutingBillList.html 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
WebTM/views/质量管理/产品入库检验单/QC_LastPieceCheckBill_v2.html 42 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WebTM/views/质量管理/出厂检验单/QC_OutCompCheckBill.html 72 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WebTM/views/质量管理/来料检验单/QC_Add_Edit_POStockInCheckBillList.html 43 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WebTM/views/质量管理/首件检验单/QC_Add_Edit_FirstPieceCheckBill.html 99 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WebTM/views/领料发货/领料出库/Kf_MateOutBillEdit_YangMao.html 59 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WebTM/views/领料发货/领料出库/Kf_MateOutBillList.html 15 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
.gitignore
@@ -7,4 +7,4 @@
/.vs
/WebTM.csproj.user
/WebTM/Properties/PublishProfiles
/.vscode
WebTM/views/»ù´¡×ÊÁÏ/¹«Óûù´¡×ÊÁÏ/Add_Edit_Gy_Material.html
@@ -107,8 +107,8 @@
                                                <div class="layui-inline">
                                                    <label class="layui-form-label">圆机代码:</label>
                                                    <div class="layui-input-inline">
                                                        <input class="layui-input" name="HCircularKnittingMachineCode" id="HCircularKnittingMachineCode"
                                                               autocomplete="off">
                                                        <input class="layui-input" name="HCircularKnittingMachineCode"
                                                            id="HCircularKnittingMachineCode" autocomplete="off">
                                                    </div>
                                                </div>
                                            </div>
@@ -272,6 +272,58 @@
                                                        </button>
                                                    </div>
                                                </div>
                                            </div>
                                            <div class="layui-row">
                                                <div class="layui-inline">
                                                    <label class="layui-form-label">收料入库检验方案</label>
                                                    <div class="layui-input-inline">
                                                        <input type="text" name="HQCSchemeName_POStockIn"
                                                            id="HQCSchemeName_POStockIn" class="layui-input" value=""
                                                            style="float: left; width: 100px; background-color: #efefef4d;"
                                                            readonly>
                                                        <input type="hidden" name="HQCSchemeID_POStockIn"
                                                            id="HQCSchemeID_POStockIn" value="0">
                                                        <button type="button" lay-submit="" class="layui-btn"
                                                            lay-filter="HQCSchemeID_POStockIn-BT" style="width:40px;">
                                                            <i class="layui-icon layui-icon-search layuiadmin-button-btn"
                                                                style="margin-left:-9px;"></i>
                                                        </button>
                                                    </div>
                                                </div>
                                                <div class="layui-inline">
                                                    <label class="layui-form-label">生产入库检验方案</label>
                                                    <div class="layui-input-inline">
                                                        <input type="text" name="HQCSchemeName_LastPiece"
                                                            id="HQCSchemeName_LastPiece" class="layui-input" value=""
                                                            style="float: left; width: 100px; background-color: #efefef4d;"
                                                            readonly>
                                                        <input type="hidden" name="HQCSchemeID_LastPiece"
                                                            id="HQCSchemeID_LastPiece" value="0">
                                                        <button type="button" lay-submit="" class="layui-btn"
                                                            lay-filter="HQCSchemeID_LastPiece-BT" style="width:40px;">
                                                            <i class="layui-icon layui-icon-search layuiadmin-button-btn"
                                                                style="margin-left:-9px;"></i>
                                                        </button>
                                                    </div>
                                                </div>
                                                <div class="layui-inline">
                                                    <label class="layui-form-label">出厂检验方案</label>
                                                    <div class="layui-input-inline">
                                                        <input type="text" name="HQCSchemeName_OutComp"
                                                            id="HQCSchemeName_OutComp" class="layui-input" value=""
                                                            style="float: left; width: 100px; background-color: #efefef4d;"
                                                            readonly>
                                                        <input type="hidden" name="HQCSchemeID_OutComp"
                                                            id="HQCSchemeID_OutComp" value="0">
                                                        <button type="button" lay-submit="" class="layui-btn"
                                                            lay-filter="HQCSchemeID_OutComp-BT" style="width:40px;">
                                                            <i class="layui-icon layui-icon-search layuiadmin-button-btn"
                                                                style="margin-left:-9px;"></i>
                                                        </button>
                                                    </div>
                                                </div>
                                            </div>
                                            <div class="layui-row">
                                                <div class="layui-inline">
                                                    <label class="layui-form-label"> ç‰©æ–™å…¬å¼ï¼š</label>
                                                    <div class="layui-input-inline">
@@ -288,12 +340,15 @@
                                                        </div>
                                                    </div>
                                                </div>
                                                <div class="layui-inline" style="display: inline-flex; flex-direction: row;">
                                                    <label class="layui-form-label" style="width: 9em;"> ç‰©æ–™å…¬å¼(羊毛): </label>
                                                <div class="layui-inline"
                                                    style="display: inline-flex; flex-direction: row;">
                                                    <label class="layui-form-label" style="width: 9em;"> ç‰©æ–™å…¬å¼(羊毛):
                                                    </label>
                                                    <div class="layui-input-inline">
                                                        <div class="layui-form">
                                                            <div class="layui-form-item">
                                                                <select name="HMaterRuleExternType" id="HMaterRuleExternType"
                                                                <select name="HMaterRuleExternType"
                                                                    id="HMaterRuleExternType"
                                                                        lay-verify="HMaterRuleExternType">
                                                                    <option value="其他" selected>其他</option>
                                                                    <option value="染料">染料</option>
@@ -304,12 +359,15 @@
                                                        </div>
                                                    </div>
                                                </div>
                                                <div class="layui-inline" style="display: inline-flex; flex-direction: row;">
                                                    <label class="layui-form-label" style="width: 9em;"> ç‰©æ–™å…¬å¼(毛尖): </label>
                                                <div class="layui-inline"
                                                    style="display: inline-flex; flex-direction: row;">
                                                    <label class="layui-form-label" style="width: 9em;"> ç‰©æ–™å…¬å¼(毛尖):
                                                    </label>
                                                    <div class="layui-input-inline">
                                                        <div class="layui-form">
                                                            <div class="layui-form-item">
                                                                <select name="HMaterRuleExternType1" id="HMaterRuleExternType1"
                                                                <select name="HMaterRuleExternType1"
                                                                    id="HMaterRuleExternType1"
                                                                        lay-verify="HMaterRuleExternType1">
                                                                    <option value="其他" selected>其他</option>
                                                                    <option value="染料">染料</option>
@@ -996,11 +1054,10 @@
                                    <div class="layui-tab-item">
                                        <div class="layui-form-item" style="padding-top: 10px;">
                                            <div class="layui-upload">
                                                <button type="button" class="layui-btn"
                                                        id="testList">
                                                <button type="button" class="layui-btn" id="testList">
                                                    é€‰æ‹©æ–‡ä»¶
                                                </button><input class="layui-upload-file"
                                                                type="file" accept="" name="file" multiple="">
                                                </button><input class="layui-upload-file" type="file" accept=""
                                                    name="file" multiple="">
                                                <div class="layui-upload-list">
                                                    <table class="layui-table" lay-filter="mainTable">
                                                        <thead>
@@ -1235,6 +1292,22 @@
                get_checkHQCSchemeID_Patrol();
            });
            //选择收料入库检验方案按钮
            form.on('submit(HQCSchemeID_POStockIn-BT)', function () {
                get_checkHQCSchemeID_POStockIn();
            });
            //选择生产入库检验方案按钮
            form.on('submit(HQCSchemeID_LastPiece-BT)', function () {
                get_checkHQCSchemeID_LastPiece();
            });
            //选择出厂检验方案按钮
            form.on('submit(HQCSchemeID_OutComp-BT)', function () {
                get_checkHQCSchemeID_OutComp();
            });
            //监听一次合格率标准值
            $("#HOnceRightRate").blur(function (data) {
@@ -1404,6 +1477,12 @@
                                , "HQCSchemeName_Proc": data.转序检验方案
                                , "HQCSchemeID_Patrol": data.HQCSchemeID_Patrol
                                , "HQCSchemeName_Patrol": data.巡检检验方案
                                , "HQCSchemeID_POStockIn": data.HQCSchemeID_POStockIn
                                , "HQCSchemeName_POStockIn": data.领料入库检验方案
                                , "HQCSchemeID_LastPiece": data.HQCSchemeID_LastPiece
                                , "HQCSchemeName_LastPiece": data.生产入库检验方案
                                , "HQCSchemeID_OutComp": data.HQCSchemeID_OutComp
                                , "HQCSchemeName_OutComp": data.出厂检验方案
                                , "HMaterRuleType": data.物料公式
                                , "HMaterRuleExternType": data.羊毛物料公式
                                , "HMaterRuleExternType1": data.毛尖物料公式
@@ -1922,6 +2001,102 @@
            }
            //#endregion
            //#region é€‰æ‹©æ”¶æ–™å…¥åº“检验方案方法
            function get_checkHQCSchemeID_POStockIn() {
                layer.open({
                    type: 2//弹窗类型
                    , skin: 'layui-layer-rim' //加上边框
                    , area: ['90%', '90%']//大小
                    , title: '检验方案列表'//标题
                    , shift: 2//弹出动画
                    , content: ['../../质量管理/检验方案单/QC_CheckProjectList.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('请选择数据');
                        }
                        $("#HQCSchemeName_POStockIn").val(checkStatus.data[0].检验方案名称);
                        $("#HQCSchemeID_POStockIn").val(checkStatus.data[0].hmainid);
                        layer.close(index); //它获取的始终是最新弹出的某个层,值是由layer内部动态递增计算的
                    }
                    , btn2: function (index, layero) { }
                    , end: function (index, layero) {
                        if (OptionData.length > 0) {
                            $("#HQCSchemeName_POStockIn").val(OptionData[0].检验方案名称);
                            $("#HQCSchemeID_POStockIn").val(OptionData[0].hmainid);
                        }
                        OptionData = [];
                    }
                })
            }
            //#endregion
            //#region é€‰æ‹©ç”Ÿäº§å…¥åº“检验方案方法
            function get_checkHQCSchemeID_LastPiece() {
                layer.open({
                    type: 2//弹窗类型
                    , skin: 'layui-layer-rim' //加上边框
                    , area: ['90%', '90%']//大小
                    , title: '检验方案列表'//标题
                    , shift: 2//弹出动画
                    , content: ['../../质量管理/检验方案单/QC_CheckProjectList.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('请选择数据');
                        }
                        $("#HQCSchemeName_LastPiece").val(checkStatus.data[0].检验方案名称);
                        $("#HQCSchemeID_LastPiece").val(checkStatus.data[0].hmainid);
                        layer.close(index); //它获取的始终是最新弹出的某个层,值是由layer内部动态递增计算的
                    }
                    , btn2: function (index, layero) { }
                    , end: function (index, layero) {
                        if (OptionData.length > 0) {
                            $("#HQCSchemeName_LastPiece").val(OptionData[0].检验方案名称);
                            $("#HQCSchemeID_LastPiece").val(OptionData[0].hmainid);
                        }
                        OptionData = [];
                    }
                })
            }
            //#endregion
            //#region é€‰æ‹©å‡ºåŽ‚æ£€éªŒæ–¹æ¡ˆæ–¹æ³•
            function get_checkHQCSchemeID_OutComp() {
                layer.open({
                    type: 2//弹窗类型
                    , skin: 'layui-layer-rim' //加上边框
                    , area: ['90%', '90%']//大小
                    , title: '检验方案列表'//标题
                    , shift: 2//弹出动画
                    , content: ['../../质量管理/检验方案单/QC_CheckProjectList.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('请选择数据');
                        }
                        $("#HQCSchemeName_OutComp").val(checkStatus.data[0].检验方案名称);
                        $("#HQCSchemeID_OutComp").val(checkStatus.data[0].hmainid);
                        layer.close(index); //它获取的始终是最新弹出的某个层,值是由layer内部动态递增计算的
                    }
                    , btn2: function (index, layero) { }
                    , end: function (index, layero) {
                        if (OptionData.length > 0) {
                            $("#HQCSchemeName_OutComp").val(OptionData[0].检验方案名称);
                            $("#HQCSchemeID_OutComp").val(OptionData[0].hmainid);
                        }
                        OptionData = [];
                    }
                })
            }
            //#endregion
            //选择计量单位
            form.on('submit(HUnitList)', function () {//选择职务
                $("#UnitType").val(1);
WebTM/views/¼Æ»®¹ÜÀí/¹¤ÒÕ·Ïß/Gy_RoutingBillList.html
@@ -104,7 +104,7 @@
                                            </select>
                                        </div>
                                    </div>
                                    <button class="layui-btn layuiadmin-btn-order" style="" type="button" lay-submit="" lay-filter="btnSearch" id="btnSearch">
                                    <button class="layui-btn layuiadmin-btn-order" type="button" lay-submit="" lay-filter="btnSearch" id="btnSearch">
                                        <i class="layui-icon layui-icon-search layuiadmin-button-btn"></i>
                                    </button>
                                    <button class="layui-btn layuiadmin-btn-order" type="button" lay-submit="" lay-filter="btnReSearch" id="btnReSearch" style="padding: 0 5px;">重置</button>
WebTM/views/ÖÊÁ¿¹ÜÀí/²úÆ·Èë¿â¼ìÑéµ¥/QC_LastPieceCheckBill_v2.html
@@ -1001,7 +1001,7 @@
                    if (HSouceBillType == '3711') {
                        // ç”Ÿäº§æ±‡æŠ¥å•下推
                        LoadingInformation_ICMOReportBill();
                        //GetCheckItemID();
                        GetCheckItemID();
                    }
                    else {
                        layer.alert("源单类型无效!", { icon: 5 });
@@ -2661,8 +2661,8 @@
                        $("#HProcName").val(checkStatus.data[0].工序名称);
                        $("#HProcID").val(checkStatus.data[0].HItemID);
                        layer.close(layer.index); //它获取的始终是最新弹出的某个层,值是由layer内部动态递增计算的
                        get_ICMOBillStatusList();
                        get_QC_TakeSampleCheckBillList();
                        // get_ICMOBillStatusList();
                        // get_QC_TakeSampleCheckBillList();
                        GetCheckItemID();
                    }
                    , btn2: function (index, layero) {
@@ -2748,8 +2748,8 @@
                        //按钮【按钮二】的回调
                        //return false å¼€å¯è¯¥ä»£ç å¯ç¦æ­¢ç‚¹å‡»è¯¥æŒ‰é’®å…³é—­
                    },
                    end: function () {
                    end: function (layero, index) {
                        layer.close(layer.index); //它获取的始终是最新弹出的某个层,值是由layer内部动态递增计算的
                    },
                    success: function (layero, index) {
@@ -4262,7 +4262,7 @@
                if (HProcID == "0" || HProcID == "") {
                    return layer.msg("请选择工序!");
                }
                sWhere = " and å·¥åºæµè½¬å¡ä¸»å†…码='" + HProcExchInterID + "' and HProcID=" + HProcID;
                sWhere = " and HProcID=" + HProcID;
                $.ajax({
                    url: GetWEBURL() + "/QC_TakeSampleCheckBill/QC_TakeSampleCheckBillMainList",
                    type: "GET",
@@ -4468,6 +4468,29 @@
            }
            //#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 });
                            }
                        }
                    })
                }
            }
            window.GetCheckItemID = function () {
                var HName = $("#HMaterName").val();
@@ -4687,9 +4710,9 @@
        }
        function GetGyMaterial(obj) {  //物料
            $("#HMaterNumber").val(obj[0].物料代码);
            $("#HMaterName").val(obj[0].物料名称);
            $("#HMaterID").val(obj[0].HItemID);
            $("#HMaterNumber").val(obj.物料代码);
            $("#HMaterName").val(obj.物料名称);
            $("#HMaterID").val(obj.HItemID);
            GetCheckItemID();
        }
@@ -4712,6 +4735,7 @@
        function GetProcessValue(obj) {
            $("#HProcName").val(obj[0].工序名称);
            $("#HProcID").val(obj[0].HItemID);
            GetCheckItemID();
        }
        //计量单位
        function GetHUnitListValue(obj) {
WebTM/views/ÖÊÁ¿¹ÜÀí/³ö³§¼ìÑéµ¥/QC_OutCompCheckBill.html
@@ -775,6 +775,7 @@
                    <input type="hidden" name="HDeptID" id="HDeptID" value="0">
                    <input type="hidden" name="HSourceOrgID" id="HSourceOrgID" value="0"><!--来源组织-->
                    <input type="hidden" name="HInspectOrgID" id="HInspectOrgID" value="0"><!--质检组织-->
                    <input type="hidden" name="HQCSchemeID_OutComp" id="HQCSchemeID_OutComp" value="0"><!-- å‡ºåŽ‚æ£€éªŒæ–¹æ¡ˆID -->
                </form>
            </div>
        </div>
@@ -929,12 +930,12 @@
                    if (HSouceBillType == 1401) {
                        // é”€å”®è®¢å•下推
                        LoadingInformation_SeOrder();
                        //GetCheckItemID();
                        GetCheckItemID();
                    }
                    else if (HSouceBillType == 1402) {
                        // å‘货通知单下推
                        LoadingInformation_SeOutStock();
                        //GetCheckItemID();
                        GetCheckItemID();
                    } else {
                        layer.alert("源单类型无效!", { icon: 5 });
                    }
@@ -1202,8 +1203,9 @@
                        $("#HProcName").val(checkStatus.data[0].工序名称);
                        $("#HProcID").val(checkStatus.data[0].HItemID);
                        layer.close(layer.index); //它获取的始终是最新弹出的某个层,值是由layer内部动态递增计算的
                        get_ICMOBillStatusList();
                        get_QC_TakeSampleCheckBillList();
                        // get_ICMOBillStatusList();
                        // get_QC_TakeSampleCheckBillList();
                        GetCheckItemID();
                    }
                    , btn2: function (index, layero) {
                        //按钮【按钮二】的回调
@@ -1281,14 +1283,15 @@
                        $("#HMaterNumber").val(checkStatus.data[0].物料代码);
                        $("#HMaterName").val(checkStatus.data[0].物料名称);
                        $("#HMaterID").val(checkStatus.data[0].HItemID);
                        layer.close(layer.index); //它获取的始终是最新弹出的某个层,值是由layer内部动态递增计算的
                    }
                    , btn2: function (index, layero) {
                        //按钮【按钮二】的回调
                        //return false å¼€å¯è¯¥ä»£ç å¯ç¦æ­¢ç‚¹å‡»è¯¥æŒ‰é’®å…³é—­
                    },
                    end: function () {
                    end: function (layero, index) {
                        layer.close(layer.index); //它获取的始终是最新弹出的某个层,值是由layer内部动态递增计算的
                    },
                    success: function (layero, index) {
@@ -4074,6 +4077,54 @@
                })
            }
            //自动带出检验方案
            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 });
                            }
                        }
                    })
                }
            }
            window.GetCheckItemID = function () {
                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 set_SaveBill(data) {
                //保存最后一次点击行的检验值
@@ -4201,6 +4252,8 @@
        //非空验证    
        function GetHCusNameValue(obj) {  //客户
            $("#HCusName").val(obj[0].客户名称);
@@ -4242,9 +4295,9 @@
        }
        function GetGyMaterial(obj) {  //物料
            $("#HMaterNumber").val(obj[0].物料代码);
            $("#HMaterName").val(obj[0].物料名称);
            $("#HMaterID").val(obj[0].HItemID);
            $("#HMaterNumber").val(obj.物料代码);
            $("#HMaterName").val(obj.物料名称);
            $("#HMaterID").val(obj.HItemID);
            GetCheckItemID();
        }
@@ -4267,6 +4320,7 @@
        function GetProcessValue(obj) {
            $("#HProcName").val(obj[0].工序名称);
            $("#HProcID").val(obj[0].HItemID);
            GetCheckItemID();
        }
        //计量单位
        function GetHUnitListValue(obj) {
WebTM/views/ÖÊÁ¿¹ÜÀí/À´ÁϼìÑéµ¥/QC_Add_Edit_POStockInCheckBillList.html
@@ -1002,12 +1002,12 @@
                    if (HSouceBillType == 1102) {
                        // é‡‡è´­è®¢å•下推
                        LoadingInformation_POOrderBill();
                        //GetCheckItemID();
                        GetCheckItemID();
                    }
                    else if (HSouceBillType == 1103) {
                        // æ”¶æ–™é€šçŸ¥å•下推
                        LoadingInformation_POInStockBill();
                        //GetCheckItemID();
                        GetCheckItemID();
                    } else {
                        layer.alert("源单类型无效!", { icon: 5 });
                    }
@@ -2677,8 +2677,8 @@
                        $("#HProcName").val(checkStatus.data[0].工序名称);
                        $("#HProcID").val(checkStatus.data[0].HItemID);
                        layer.close(layer.index); //它获取的始终是最新弹出的某个层,值是由layer内部动态递增计算的
                        get_ICMOBillStatusList();
                        get_QC_TakeSampleCheckBillList();
                        // get_ICMOBillStatusList();
                        // get_QC_TakeSampleCheckBillList();
                        GetCheckItemID();
                    }
                    , btn2: function (index, layero) {
@@ -4483,9 +4483,8 @@
                }
            }
            //#endregion
            window.GetCheckItemID = function () {
            //自动带出检验方案
            function GetCheckItemID() {
                var HName = $("#HMaterName").val();
                var HProName = $("#HProcName").val();
                var HSourceID = $("#HSourceID").val();
@@ -4495,6 +4494,29 @@
                        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 });
                            }
                        }
                    })
                }
            }
            window.GetCheckItemID = function () {
                var HName = $("#HMaterName").val();
                var HProName = $("#HProcName").val();
                var HSourceID = $("#HSourceID").val();
                if (HName != '' && HName != undefined && HProName != '' && HProName != undefined) {
                    $.ajax({
                        url: GetWEBURL() + "/Web/GetCheckItemID2",
                        type: "GET",
                        async: false,
                        data: { "HName": HName, "HSourceID": HSourceID },
                        success: function (result) {
                            if (result.code == 1) {
                                $("#HQCSchemeID").val(result.data[0].hmainid);
@@ -4769,9 +4791,9 @@
        }
        function GetGyMaterial(obj) {  //物料
            $("#HMaterNumber").val(obj[0].物料代码);
            $("#HMaterName").val(obj[0].物料名称);
            $("#HMaterID").val(obj[0].HItemID);
            $("#HMaterNumber").val(obj.物料代码);
            $("#HMaterName").val(obj.物料名称);
            $("#HMaterID").val(obj.HItemID);
            GetCheckItemID();
        }
@@ -4794,6 +4816,7 @@
        function GetProcessValue(obj) {
            $("#HProcName").val(obj[0].工序名称);
            $("#HProcID").val(obj[0].HItemID);
            GetCheckItemID();
        }
        //计量单位
        function GetHUnitListValue(obj) {
WebTM/views/ÖÊÁ¿¹ÜÀí/Ê×¼þ¼ìÑéµ¥/QC_Add_Edit_FirstPieceCheckBill.html
@@ -2134,7 +2134,8 @@
                                        "HStrictness": data[i].严格度, "HSampleUnRightQty": "", "HAQL": data[i].AQL, "HSamplingType": data[i].抽样类型
                                    }
                                );
                                SampleNum.push(5);
                                //SampleNum.push(5);
                                SampleNum.push(data[0].样本量);
                            }
                            //检验项目
@@ -2169,9 +2170,58 @@
                            trindex = result.data.length - 1;
                            $("#HEntryID").val() - 1
                            //携带出质检方案
                            ReturnSampleScheme(data);
                        }
                    }
                })
            }
            //根据质检方案自动带出抽样方案信息
            function ReturnSampleScheme(data) {
                $("#HSampleSchemeID").val(data[data.length - 1].hmainid);
                $("#HSampleSchemeName").val(data[data.length - 1].抽样方案名称);
                $("#HSamplingType").val(data[data.length - 1].抽样类型);
                $("#HInspectionLevel").val(data[data.length - 1].检验水平);
                $("#HStrictness").val(data[data.length - 1].严格度);
                $("#HAQL").val(data[data.length - 1].AQL);
                $("#HSampleQty").val(data[data.length - 1].样本量);
                $("#HSampleQty2").val(data[data.length - 1].样本量);
                $("#HAcceptQty").val(data[data.length - 1].允许数);
                $("#HRejectQty").val(data[data.length - 1].拒绝数);
                //显示最后一行的检测值页签中的目标值、上限值、下限值
                $("#HTargetVal").val(data[data.length - 1].目标值);
                $("#HUpLimit").val(data[data.length - 1].上限值);
                $("#HDownLimit").val(data[data.length - 1].下限值);
                if ($("#HEntryID").val() - 1 >= 0) {
                    option.data[$("#HEntryID").val() - 1].HSampleSchemeID = data[data.length - 1].hmainid;
                    option.data[$("#HEntryID").val() - 1].HSampleSchemeName = data[data.length - 1].抽样方案名称;
                    option.data[$("#HEntryID").val() - 1].HSamplingType = data[data.length - 1].抽样类型;
                    option.data[$("#HEntryID").val() - 1].HInspectionLevel = data[data.length - 1].检验水平;
                    option.data[$("#HEntryID").val() - 1].HStrictness = data[data.length - 1].严格度;
                    option.data[$("#HEntryID").val() - 1].HAQL = data[data.length - 1].AQL;
                    option.data[$("#HEntryID").val() - 1].HSampleQty = data[data.length - 1].样本量;
                    option.data[$("#HEntryID").val() - 1].HSampleQty2 = data[data.length - 1].样本量;
                    option.data[$("#HEntryID").val() - 1].HAcceptQty = data[data.length - 1].允许数;
                    option.data[$("#HEntryID").val() - 1].HRejectQty = data[data.length - 1].拒绝数;
                    option.data[$("#HEntryID").val() - 1].HUpLimit = data[data.length - 1].上限值;
                    option.data[$("#HEntryID").val() - 1].HDownLimit = data[data.length - 1].下限值;
                }
                rowdata_Value = [];
                for (let i = 1; i <= data[data.length - 1].样本量; i++) {
                    rowdata_Value.push({
                        "HSEQ": i, "HInSpectResult": "", "HInSpectValueB": "", "HInSpectValueT": "", "HInSpectValue": "", "rowNum": $("#HEntryID").val()
                    });
                }
                option_Value.data = rowdata_Value;
                table.render(option_Value);
                IsHide(table.cache["mainTable"][$("#HEntryID").val() - 1].HAnalysisMethod); //隐藏检测值字段
            }
            //用于双击检验方案使用
@@ -2198,7 +2248,8 @@
                                        "HStrictness": data[i].严格度, "HSampleUnRightQty": "", "HAQL": data[i].AQL, "HSamplingType": data[i].抽样类型
                                    }
                                );
                                SampleNum.push(5);
                                //SampleNum.push(5);
                                SampleNum.push(data[0].样本量);
                            }
                            //检验项目
@@ -2570,6 +2621,7 @@
                        , { field: 'HUnit', title: '单位', edit: 'text' }
                        , { field: 'HInspectVal', title: '检验值', edit: 'text' }
                        , { field: 'HQCNote', title: '检验记录', edit: 'text' }
                        , { field: 'HTargetVal', title: '目标值' }
                        , { field: 'HUpLimit', title: '上限值' }
                        , { field: 'HDownLimit', title: '下限值' }
                        , { field: 'HMax', title: '最大值', edit: 'text', totalRow: true }
@@ -2627,7 +2679,7 @@
                    elem: '#ValueTable'
                    //, toolbar: '#toolbarDemo_Value'
                    , limit: 500 //每页默认显示的数量
                    , height: 'full-50'
                    , height: 'full-370'
                    , cellMinWidth: 150
                    , totalRow: true
                    , cols: [[ //表头
@@ -2876,9 +2928,16 @@
                editIndex = Number(nowindex) + Number(1);
                LastIndex = nowindex;
                if (option_Check.length > 0) {
                $("[name='HEntryID']").attr("value", Number(nowindex) + Number(1));
                //$("[name='HQCCheckItemID']").attr("value", option_Check[nowindex].HQCCheckItemID);
                //$("[name='HQCCheckItemName']").attr("value", option_Check[nowindex].检验项目);
                    $("[name='HQCCheckItemID']").attr("value", option_Check[nowindex].HQCCheckItemID);
                    $("[name='HQCCheckItemName']").attr("value", option_Check[nowindex].检验项目);
                    //显示当前双击行的检测值页签中的目标值、上限值、下限值
                    $("#HTargetVal").val(option_Check[nowindex].目标值);
                    $("#HUpLimit").val(option_Check[nowindex].上限值);
                    $("#HDownLimit").val(option_Check[nowindex].下限值);
                }
                //选中行改变颜色
                check_row(obj);
@@ -2903,7 +2962,7 @@
                    var row_value = [];
                    for (let i = 0; i < SampleNum[nowindex]; i++) {
                        row_value.push({
                            "HSEQ": "0", "HInSpectResult": "", "HInSpectValueB": "", "HInSpectValueT": "", "HInSpectValue": ""
                            "HSEQ": (i+1), "HInSpectResult": "", "HInSpectValueB": "", "HInSpectValueT": "", "HInSpectValue": ""
                        });
                    }
                    //刷新检验值表格
@@ -3547,17 +3606,17 @@
                            HSampleQty: option.data[nowindex].HSampleQty, //样本量
                            HInspectResultToSee: '', //检验结果
                            HInspectResultToSee2: '', //检验结果2
                            HSampleUnRightQty: option.data[nowindex].HSampleUnRightQty,//样本不合格数
                            HUnitID: option.data[nowindex].HUnitID, //单位ID
                            //HSampleUnRightQty: option.data[nowindex].HSampleUnRightQty,//样本不合格数
                            //HUnitID: option.data[nowindex].HUnitID, //单位ID
                            HUnitName: option.data[nowindex].HUnit, //单位
                            HInspectValB: option.data[nowindex].HInspectValB,//检验值ID
                            HInspectVal: option.data[nowindex].HInspectVal, //检验值
                            //HInspectVal: option.data[nowindex].HInspectVal, //检验值
                            HTargetValB: option.data[nowindex].HTargetValB, //目标值ID
                            HTargetVal: option.data[nowindex].HTargetVal,//目标值
                            HUpLimit: option.data[nowindex].HUpLimit, //上限值
                            HDownLimit: option.data[nowindex].HDownLimit, //下限值
                            HUpOffSet: option.data[nowindex].HUpOffSet, //上偏差
                            HDownOffSet: option.data[nowindex].HDownOffSet, //下偏差
                            //HTargetVal: option.data[nowindex].HTargetVal,//目标值
                            //HUpLimit: option.data[nowindex].HUpLimit, //上限值
                            //HDownLimit: option.data[nowindex].HDownLimit, //下限值
                            //HUpOffSet: option.data[nowindex].HUpOffSet, //上偏差
                            //HDownOffSet: option.data[nowindex].HDownOffSet, //下偏差
                        };
                    }
                    //if (option.data[0].HSampleSchemeID == 0) {
@@ -3607,9 +3666,9 @@
                    $("#HUnitID").val(maindata[nowindex].HUnitID);
                    $("#HUnit").val(maindata[nowindex].HUnit);
                    $("#HInspectVal").val(maindata[nowindex].HInspectVal);
                    $("#HTargetVal").val(maindata[nowindex].HTargetVal);
                    $("#HUpLimit").val(maindata[nowindex].HUpLimit);
                    $("#HDownLimit").val(maindata[nowindex].HDownLimit);
                    $("#HTargetVal").val(maindata[nowindex].HTargetVal == "" ? (option_Check.length > 0 ? option_Check[nowindex].目标值 : "") : maindata[nowindex].HTargetVal );
                    $("#HUpLimit").val(maindata[nowindex].HUpLimit == "" ? (option_Check.length > 0 ? option_Check[nowindex].上限值 : "") : maindata[nowindex].HUpLimit );
                    $("#HDownLimit").val(maindata[nowindex].HDownLimit == "" ? (option_Check.length > 0 ? option_Check[nowindex].下限值 : "") : maindata[nowindex].HDownLimit );
                    $("#HUpOffSet").val(maindata[nowindex].HUpOffSet);
                    $("#HDownOffSet").val(maindata[nowindex].HDownOffSet);
                    $("#HSampleDamageQty").val(maindata[nowindex].HSampleDamageQty);
@@ -3632,7 +3691,7 @@
                    $("#HInspectValB").val(maindata[nowindex].HInspectValB);
                    $("#HInspectVal").val(maindata[nowindex].HInspectVal);
                    $("#HTargetValB").val(maindata[nowindex].HTargetValB);
                    $("#HTargetVal").val(maindata[nowindex].HTargetVal);
                    //$("#HTargetVal").val(maindata[nowindex].HTargetVal);
                    $("#HUpLimit").val(maindata[nowindex].HUpLimit);
                    $("#HDownLimit").val(maindata[nowindex].HDownLimit);
                    $("#HUpOffSet").val(maindata[nowindex].HUpOffSet);
@@ -3691,6 +3750,9 @@
                            }];
                            table.render(option_Value);
                            //layer.msg(result.code + result.Message, { icon: 5 });
                            IsHide(table.cache["mainTable"][HEntryID - 1].HAnalysisMethod); //隐藏检测值字段
                            form.render('select');
                        }
                    }
                })
@@ -4242,6 +4304,7 @@
                            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 });
WebTM/views/ÁìÁÏ·¢»õ/ÁìÁϳö¿â/Kf_MateOutBillEdit_YangMao.html
@@ -995,11 +995,11 @@
                        var HMaterRuleType = option.data[i].HMaterRuleType;
                        var HMaterRuleExternType = option.data[i].HMaterRuleExternType;
                        if (HMaterRuleExternType == "染料") {
                            option.data[i].HQty = dealDoubleToFixed(option.data[i].HRate * HWeight);
                            option.data[i].HQty = roundNumber(dealDoubleToFixed(option.data[i].HRate * HWeight), 3).toFixed(3);
                        } else if (HMaterRuleExternType == "助剂") {
                            option.data[i].HQty = dealDoubleToFixed(option.data[i].HRate * HWaterQty * 0.001);
                            option.data[i].HQty = roundNumber(dealDoubleToFixed(option.data[i].HRate * HWaterQty * 0.001), 3).toFixed(3);
                        } else if (HMaterRuleExternType == "助剂(按布算)") {
                            option.data[i].HQty = dealDoubleToFixed(option.data[i].HRate * HWeight * 0.001);
                            option.data[i].HQty = roundNumber(dealDoubleToFixed(option.data[i].HRate * HWeight * 0.001), 3).toFixed(3);
                        }
                        //if (HMaterRuleExternType == '羊毛') {
                        //     option.data[i].HQty = dealDoubleToFixed(option.data[i].HRate * HWeight * 0.001);
@@ -1020,11 +1020,11 @@
                        var HMaterRuleType = option.data[i].HMaterRuleType;
                        var HMaterRuleExternType = option.data[i].HMaterRuleExternType;
                        if (HMaterRuleExternType == "染料") {
                            option.data[i].HQty = dealDoubleToFixed(option.data[i].HRate * HWeight);
                            option.data[i].HQty = roundNumber(dealDoubleToFixed(option.data[i].HRate * HWeight), 3).toFixed(3);
                        } else if (HMaterRuleExternType == "助剂") {
                            option.data[i].HQty = dealDoubleToFixed(option.data[i].HRate * HWaterQty * 0.001);
                            option.data[i].HQty = roundNumber(dealDoubleToFixed(option.data[i].HRate * HWaterQty * 0.001), 3).toFixed(3);
                        } else if (HMaterRuleExternType == "助剂(按布算)") {
                            option.data[i].HQty = dealDoubleToFixed(option.data[i].HRate * HWeight * 0.001);
                            option.data[i].HQty = roundNumber(dealDoubleToFixed(option.data[i].HRate * HWeight * 0.001), 3).toFixed(3);
                        }
                        //if (HMaterRuleExternType == '羊毛') {
                        //    option.data[i].HQty = dealDoubleToFixed(option.data[i].HRate * HWeight * 0.001);
@@ -1231,11 +1231,11 @@
                        var HMaterRuleType = obj.data.HMaterRuleType;
                        var HMaterRuleExternType = obj.data.HMaterRuleExternType;
                        if (HMaterRuleExternType == "染料") {
                            HQty = dealDoubleToFixed(HRate * HWeight);
                            HQty = roundNumber(dealDoubleToFixed(HRate * HWeight), 3).toFixed(3);
                        } else if (HMaterRuleExternType == "助剂") {
                            HQty = dealDoubleToFixed(HRate * HWaterQty * 0.001);
                            HQty = roundNumber(dealDoubleToFixed(HRate * HWaterQty * 0.001), 3).toFixed(3);
                        } else if (HMaterRuleExternType == "助剂(按布算)") {
                            HQty = dealDoubleToFixed(HRate * HWeight * 0.001);
                            HQty = roundNumber(dealDoubleToFixed(HRate * HWeight * 0.001), 3).toFixed(3);
                        }
                        //if (HMaterRuleExternType == '羊毛') {
                        //    HQty = dealDoubleToFixed(HRate * HWeight * 0.001);
@@ -1254,11 +1254,11 @@
                        var HQty = 0;
                        var HMaterRuleType = value;
                        if (HMaterRuleType == "染料") {
                            HQty = dealDoubleToFixed(HRate * HWeight);
                            HQty = roundNumber(dealDoubleToFixed(HRate * HWeight), 3).toFixed(3);
                        } else if (HMaterRuleType == "助剂") {
                            HQty = dealDoubleToFixed(HRate * HWaterQty * 0.001);
                            HQty = roundNumber(dealDoubleToFixed(HRate * HWaterQty * 0.001), 3).toFixed(3);
                        } else if (HMaterRuleType == "助剂(按布算)") {
                            HQty = dealDoubleToFixed(HRate * HWeight * 0.001);
                            HQty = roundNumber(dealDoubleToFixed(HRate * HWeight * 0.001), 3).toFixed(3);
                        }
                        //同步更新表格和缓存对应的值
                        obj.update({
@@ -1436,7 +1436,7 @@
                    , { field: 'HUnitName', title: '计量单位', width: 100 }
                    , { field: 'HQtyMust', title: '应发数量', width: 100, hide: true }
                    , { field: 'HRate', title: '用量‰', edit: 'text', width: 100 }
                    , { field: 'HQty', title: '重量', edit: 'text', width: 100 }
                    , { field: 'HQty', title: '重量', edit: 'text', width: 100, }
                    , { field: 'HWeight', title: '实际称重', width: 100 }
                    , { field: 'HPrice', title: '单价', width: 100, hide: true }
                    , { field: 'HMoney', title: '金额', width: 100, hide: true }
@@ -1625,6 +1625,7 @@
                            option.data = result.list[0];
                            for (var i = 0; i < option.data.length; i++) {
                                option.data[i]["HRate"] = (option.data[i]["HRate"] * 1).toFixed(6);
                                option.data[i]["HQty"] = roundNumber((option.data[i]["HQty"] * 1), 3).toFixed(3);
                            }
                            table.render(option);
                            //option1.data = result.list[1];
@@ -1836,11 +1837,11 @@
                                        var HWeight = $("#HWeight").val();
                                        var HWaterQty = $("#HWaterQty").val();
                                        if (option.data[rowIndex + i].HMaterRuleExternType == "染料") {
                                            option.data[rowIndex + i].HQty = dealDoubleToFixed(option.data[rowIndex + i].HRate * HWeight);
                                            option.data[rowIndex + i].HQty = roundNumber(dealDoubleToFixed(option.data[rowIndex + i].HRate * HWeight), 3).toFixed(3);
                                        } else if (option.data[rowIndex + i].HMaterRuleExternType == "助剂") {
                                            option.data[rowIndex + i].HQty = dealDoubleToFixed(option.data[rowIndex + i].HRate * HWaterQty * 0.001);
                                            option.data[rowIndex + i].HQty = roundNumber(dealDoubleToFixed(option.data[rowIndex + i].HRate * HWaterQty * 0.001), 3).toFixed(3);
                                        } else if (option.data[rowIndex + i].HMaterRuleExternType == "助剂(按布算)") {
                                            option.data[rowIndex + i].HQty = dealDoubleToFixed(option.data[rowIndex + i].HRate * HWeight * 0.001);
                                            option.data[rowIndex + i].HQty = roundNumber(dealDoubleToFixed(option.data[rowIndex + i].HRate * HWeight * 0.001), 3).toFixed(3);
                                        }
                                        //if (option.data[rowIndex + i].HMaterRuleExternType == "羊毛") {
                                        //    option.data[rowIndex + i].HQty = dealDoubleToFixed(option.data[rowIndex + i].HRate * HWeight * 0.001);
@@ -2281,22 +2282,28 @@
                //#region å­è¡¨å…³é”®å­—段重复检验
                var num = [];
                for (var i = 0; i < option.data.length; i++) {
                    temp = option.data[i]["HMaterID"];
                    if ($.inArray(temp, num) != -1) {
                        layer.msg("第" + (i + 1) + "行:物料重复,请重新选择!");
                        console.log(option);
                        return Result = false;
                    }
                    num.push(temp);
                }
                // var num = [];
                // for (var i = 0; i < option.data.length; i++) {
                //     temp = option.data[i]["HMaterID"];
                //     if ($.inArray(temp, num) != -1) {
                //         layer.msg("第" + (i + 1) + "行:物料重复,请重新选择!");
                //         console.log(option);
                //         return Result = false;
                //     }
                //     num.push(temp);
                // }
                //#endregion
                return Result;
            }
            //#endregion
            // å››èˆäº”入方法
            function roundNumber(num, decimalPlaces) {
                var factor = Math.pow(10, decimalPlaces);
                return Math.round((num + Math.pow(2, -52)) * factor) / factor;
            }
            //#region æ ¹æ®å·¥è‰ºå•号获取表头信息
            function getMainInfoByHProcExchBillNo() {
                var HProcExchBillNo = $("#HProcExchBillNo").val();
WebTM/views/ÁìÁÏ·¢»õ/ÁìÁϳö¿â/Kf_MateOutBillList.html
@@ -1311,15 +1311,26 @@
                });
                var linterid = obj.data["hmainid"];
                var title = '编辑生产领料单'
                var content = '../领料出库/Kf_MateOutBillLEdit.html?OperationType=3&linterid=' + linterid + '&HSouceBillType=0&closeType=1'
                if (subType) {
                    if (subType == '羊毛染色') {
                        content = '../领料出库/Kf_MateOutBillEdit_YangMao.html?OperationType=3&linterid=' + linterid + '&HSouceBillType=0&closeType=1'
                    } else if (subType == '毛尖') {
                        content = '../领料出库/Kf_MateOutBillEdit_MaoJian.html?OperationType=3&linterid=' + linterid + '&HSouceBillType=0&closeType=1'
                    }
                }
                layer.open({
                    type: 2
                    , area: ['100%', '100%']
                    , title: '编辑生产领料单'
                    , title: title
                    , closeBtn: 1
                    , shade: 0.6 //遮罩透明度
                    , maxmin: true //允许全屏最小化
                    , anim: 0 //0-6的动画形式,-1不开启
                    , content: '../领料出库/Kf_MateOutBillLEdit.html?OperationType=3&linterid=' + linterid + '&HSouceBillType=0&closeType=1'
                    , content: content
                    , resize: false,
                    end: function () {
                        //get_FastQuery(table, option);