wtt
2025-05-29 d9fb8a59d4f7b3f435946e89a610206fc67765b8
不良采集产量汇报生产汇报单优化
6个文件已修改
612 ■■■■ 已修改文件
WebTM/views/生产管理/报工台工序/不良采集/Sc_QualityReportStepBillList_New.html 148 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WebTM/views/生产管理/报工台工序/不良采集/Sc_QualityReportStepBill_New.html 116 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WebTM/views/生产管理/报工台工序/产量汇报/Sc_Add_ProductReportStepBillList.html 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
WebTM/views/生产管理/报工台工序/产量汇报/Sc_ProductReportStepBillList_Web.html 93 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WebTM/views/生产管理/生产汇报单/Sc_Add_ICMOReportBillList.html 179 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WebTM/views/生产管理/生产汇报单/Sc_ICMOReportBillList.html 74 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WebTM/views/Éú²ú¹ÜÀí/±¨¹¤Ì¨¹¤Ðò/²»Á¼²É¼¯/Sc_QualityReportStepBillList_New.html
@@ -56,6 +56,14 @@
                                        <input type="text" class="layui-input ForFilteringSchemes" name="HBillNo" id="HBillNo">
                                    </div>
                                </div>
                                <div class="layui-inline">
                                    <label class="layui-form-label" style="width: 85px;">组织</label>
                                    <div class="layui-input-block" style="margin-left: 120px; width: 185px;">
                                        <select name="HOrgID" id="HOrgID" lay-verify="HOrgID">
                                            <!--动态渲染组织-->
                                        </select>
                                    </div>
                                </div>
                                <button class="layui-btn layuiadmin-btn-order" type="button" lay-submit="" lay-filter="btnSearch" id="btnSearch">
                                    <i class="layui-icon layui-icon-search layuiadmin-button-btn"></i>
                                </button>
@@ -155,7 +163,8 @@
                        <script type="text/html" id="toolbarDemo">
                            <div class="layui-btn-container" id="toolbarDemo_ButtonSet">
                                <button type="button" class="layui-btn layui-btn-sm" lay-event="get_export" id="get_export"><i class="layui-icon layui-icon-export"></i>导出</button>
                                <!--<button type="button" class="layui-btn layui-btn-sm" lay-event="set_AddNew"><i class="layui-icon layui-icon-file-b"></i>新增</button>-->
                                <button type="button" class="layui-btn layui-btn-sm" lay-event="set_AddNew"><i class="layui-icon layui-icon-file-b"></i>新增</button>
                                <button type="button" class="layui-btn layui-btn-sm" lay-event="set_Copy" id="set_Copy"><i class="layui-icon layui-icon-form"></i>复制</button>
                                <button type="button" class="layui-btn layui-btn-sm" lay-event="set_ShowBill" id="set_ShowBill"><i class="layui-icon layui-icon-form"></i>编辑</button>
                                <!--<button type="button" class="layui-btn layui-btn-sm" lay-event="get_view"><i class="layui-icon layui-icon-form"></i>浏览</button>-->
                                <button type="button" class="layui-btn layui-btn-sm" lay-event="set_DeleteBill" id="set_DeleteBill"><i class="layui-icon layui-icon-delete"></i>删除</button>
@@ -241,6 +250,9 @@
                switch (obj.event) {
                    //新增
                    case 'set_AddNew': set_AddNew();
                        break;
                    //复制
                    case 'set_Copy': set_Copy();
                        break;
                    //编辑
                    case 'set_ShowBill': set_ShowBill();
@@ -349,6 +361,33 @@
            });
            //#endregion
            //超链接跳转
            table.on('tool(mainTable)', function (obj) {
                var data = obj.data;
                if (obj.event == '单据号') {
                    var hID = data.hmainid.toString();
                    //if (AllowLoadData(sSubStr) != false) {//非空验证
                    layer.open({
                        type: 2
                        , area: ['100%', '100%']
                        , title: '编辑生产质量汇报单'
                        , closeBtn: 1
                        , shade: 0.6 //遮罩透明度
                        , maxmin: true //允许全屏最小化
                        , anim: 0 //0-6的动画形式,-1不开启
                        , content: '../../../生产管理/报工台工序/不良采集/Sc_QualityReportStepBill_New.html?OperationType=3&linterid=' + linterid + '&HSouceBillType='
                        , resize: false,
                        end: function () {
                            //刷新页面,
                            get_FastQuery();
                        }
                        , cancel: function () {
                            //$(".layui-btn").removeClass("layui-btn-disabled");
                        }
                    })
                }
            });
            //#region é‡ç½®æŒ‰é’®
            form.on('submit(btnReSearch)', function (data) {
                set_ClearQuery();
@@ -398,7 +437,8 @@
            //#region æœ¬é¡µé¢æ‰€æœ‰è¢«è°ƒç”¨çš„æ–¹æ³•
            //#region åˆå§‹åŒ–界面
            function set_ClearBill() {
            function set_ClearBill() {
                Organ();
                //初始化日期间隔、开始日期、结束日期
                setSelect_HInitTimeCycle();
                //若日期间隔不为 ä»»æ„é—´éš”,则禁用开始日期与结束日期的选择
@@ -410,7 +450,7 @@
                    $('#HBeginDate').prop('disabled', false);
                    $('#HEndDate').prop('disabled', false);
                }
                //根据日期间隔设置开始时间与结束时间
                $("#HBeginDate").val(Format(new Date(new Date() - 1000 * 60 * 60 * 24 * HInitTimeCycle), "yyyy-MM-dd"));
                $("#HEndDate").val(Format(new Date(), "yyyy-MM-dd"));
@@ -419,8 +459,7 @@
                //查询
                get_FastQuery(1);
                //查询当前登录用户有没有在当前模块设置默认过滤方案
                get_DefaultModule();
            }
            //#endregion
@@ -598,12 +637,18 @@
                            for (var i = 0; i < data.length; i++) {
                                if ($.inArray(data[i].name, titleData) > -1) {
                                    col.push({ field: data[i].id, title: data[i].name, align: 'center', hide: true }); //隐藏id列
                                } else if (data[i].name == '单据号') {//添加超链接
                                    col.push({
                                        field: data[i].id, title: data[i].name, align: 'center', sort: true, width: 200, event: '单据号', templet: function (d) {
                                            return '<span style="color: blue;">' + d.单据号 + '</span>'
                                        }, style: 'cursor: pointer;'
                                    });
                                }
                                else {
                                    switch (data[i].Type) {
                                        //int
                                        case 'DateTime':
                                            col.push({ field: data[i].id, title: data[i].name, align: 'center', sort: false, templet: "<div>{{d." + data[i].name + " ==null ?'':layui.util.toDateString(d." + data[i].name + ", 'yyyy-MM-dd HH:mm:ss')}}</div>", width: 160 });
                                            col.push({ field: data[i].id, title: data[i].name, align: 'center', sort: false, templet: "<div>{{d." + data[i].name + " ==null ?'':layui.util.toDateString(d." + data[i].name + ", 'yyyy-MM-dd')}}</div>", width: 160 });
                                            break;
                                        case 'Decimal':
                                            col.push({ field: data[i].id, title: data[i].name, align: 'center', sort: false, width: 140, totalRow: true });
@@ -629,8 +674,10 @@
                            Display_HideButton(set_HideButton_ID, HBillType, HModName, sessionStorage["HUserName"]);
                            layer.close(ajaxLoad);
                            if ($("#Comparator").val() == 0 && $("#ColContent").val() == "") {
                            if ($("#ColName option").length < 1) {
                                ColFilter();
                                //查询当前登录用户有没有在当前模块设置默认过滤方案
                                get_DefaultModule();
                            }
                        } else {
                            layer.close(ajaxLoad);
@@ -649,6 +696,7 @@
                var HBillNo = $("#HBillNo").val();  //单据号
                var HDate = $("#HBeginDate").val();//开始日期
                var HDate1 = $("#HEndDate").val();//结束日期
                var HOrgID = $("#HOrgID").val();//组织
                //任意字段过滤
                var ColName = $("#ColName").val();//复选框
                var Comparator = $("#Comparator").val()
@@ -731,7 +779,9 @@
                if (HBillNo) {
                    sWhere += " and å•据号 like '%" + HBillNo + "%'";
                }
                if (HOrgID) {
                    sWhere += " and HOrgID = " + HOrgID
                }
                //get_Display(sWhere);
                get_DisplayPage(sWhere);
                sWhere = "";//调用接口后清空sWhere缓存
@@ -792,6 +842,34 @@
                        $("#btnSearch").trigger('click');
                    }
                })
            }
            //#endregion
            //#region å¤åˆ¶
            function set_Copy() {
                var checkStatus = table.checkStatus('mainTable')
                    , data = checkStatus.data;
                if (checkStatus.data.length === 1) {
                    var linterid = data[0].hmainid.toString();
                    layer.open({
                        type: 2
                        , area: ['100%', '100%']
                        , title: '复制-' + HPageTitle
                        , shade: 0.6 //遮罩透明度
                        , maxmin: true //允许全屏最小化
                        , anim: 0 //0-6的动画形式,-1不开启
                        , content: '../../../生产管理/报工台工序/不良采集/Sc_QualityReportStepBill_New.html?OperationType=2&linterid=' + linterid + '&HSouceBillType='
                        , resize: false,
                        end: function () {
                            //刷新页面,
                            $("#btnSearch").trigger('click');
                        }
                        , cancel: function () {
                        }
                    })
                } else {
                    layer.msg('请选择一行数据编辑!');
                }
            }
            //#endregion
@@ -998,6 +1076,29 @@
            }
            //#endregion
            //获取组织
            function Organ() {
                //获取登录页组织列
                $.ajax({
                    type: "get",
                    url: GetWEBURL() + "/Web/GetOrganizations",
                    async: false,
                    success: function (result) {
                        var Organization = "";
                        if (result.count == 1) { // è¯´æ˜ŽéªŒè¯æˆåŠŸäº†ï¼Œ
                            var data = result.data;
                            for (var i = 0; i < data.length; i++) {
                                Organization += '<option  style="color:blue;" value="' + data[i].ID + '">' + data[i].Name + '</option>';
                            }
                            $("#HOrgID").append(Organization);
                            $("#HOrgID").val(sessionStorage["OrganizationID"])
                            form.render('select');
                        }
                        layer.closeAll("loading");
                    }
                })
            }
            //#region ã€è¿‡æ»¤æ–¹æ¡ˆã€‘
            //获取当前用户的默认过滤方案
@@ -1035,8 +1136,6 @@
                            //当前用户没有设置默认的过滤方案
                            //隐藏显示过滤方案的标签信息
                            document.getElementById("HFilterScheme_Now").style.display = "none";
                            //执行查询方法
                            get_FastQuery()
                            form.render("select");
                        }
                    }, error: function () {
@@ -1077,7 +1176,7 @@
                        , area: ['40%', '80%']
                        , title: '过滤方案'
                        , shift: 0//弹出动画
                        , content: '../../系统管理/过滤方案设置/Xt_FastICScheme.html?OperationType=1&HModuleName=' + HModuleName + '&HFilterIdLists=' + HFilterIdLists + '&HValue=' + HValue + '&HElement_type=' + HElement_type
                        , content: '../../../系统管理/过滤方案设置/Xt_FastICScheme.html?OperationType=1&HModuleName=' + HModuleName + '&HFilterIdLists=' + HFilterIdLists + '&HValue=' + HValue + '&HElement_type=' + HElement_type
                        , cancel: function () {
                            // å³ä¸Šè§’关闭事件的逻辑
                            HIsClose_Manual = true;
@@ -1105,7 +1204,7 @@
                            , area: ['40%', '80%']
                            , title: '过滤方案'
                            , shift: 0//弹出动画
                            , content: '../../系统管理/过滤方案设置/Xt_FastICScheme.html?OperationType=1&HModuleName=' + HModuleName + '&HFilterIdLists=' + HFilterIdLists + '&HValue=' + HValue + '&HElement_type=' + HElement_type
                            , content: '../../../系统管理/过滤方案设置/Xt_FastICScheme.html?OperationType=1&HModuleName=' + HModuleName + '&HFilterIdLists=' + HFilterIdLists + '&HValue=' + HValue + '&HElement_type=' + HElement_type
                            , end: function () {
                                get_FastQuery()
                                //显示当前的过滤方案
@@ -1190,7 +1289,7 @@
                    , area: ['80%', '80%']
                    , title: '过滤方案列表'
                    , shift: 0//弹出动画
                    , content: '../../系统管理/过滤方案设置/Xt_FastICSchemeList.html?HType=Select&HFilterIdLists=' + HFilterIdLists + '&HValue=' + HValue + '&HElement_type=' + HElement_type + '&HModuleName=' + HModuleName
                    , content: '../../../系统管理/过滤方案设置/Xt_FastICSchemeList.html?HType=Select&HFilterIdLists=' + HFilterIdLists + '&HValue=' + HValue + '&HElement_type=' + HElement_type + '&HModuleName=' + HModuleName
                    , cancel: function () {
                        // å³ä¸Šè§’关闭事件的逻辑
                        HIsClose_Manual = true;
@@ -1221,29 +1320,6 @@
                form.render('select');
            }
            //#endregion
            //获取组织
            function Organ() {
                //获取登录页组织列
                $.ajax({
                    type: "get",
                    url: GetWEBURL() + "/Web/GetOrganizations",
                    success: function (result) {
                        var Organization = "";
                        if (result.count == 1) { // è¯´æ˜ŽéªŒè¯æˆåŠŸäº†ï¼Œ
                            var data = result.data;
                            for (var i = 0; i < data.length; i++) {
                                Organization += '<option  style="color:blue;" value="' + data[i].ID + '">' + data[i].Name + '</option>';
                            }
                            $("#HOrgID").append(Organization);
                            $("#HOrgID").val(sessionStorage["OrganizationID"])
                            form.render('select');
                        }
                        layer.closeAll("loading");
                    }
                })
            }
        });
WebTM/views/Éú²ú¹ÜÀí/±¨¹¤Ì¨¹¤Ðò/²»Á¼²É¼¯/Sc_QualityReportStepBill_New.html
@@ -358,6 +358,27 @@
                //新增页面初始化
                Init_setAdd();
            }
            else if (OperationType == 2) {                                                 //复制
                //子表初始化
                set_InitGrid();
                //加载表体和表体数据
                RoadBillMain(linterid);
                //生成并设置主表的内码和单据号
                createBillNo();
                //相关文本框信息初始化
                $("#HDate").val(Format(new Date(), "yyyy-MM-dd"));
                $("#HMaker").val(sessionStorage["HUserName"]);
                $("#HMakeDate").val(Format(new Date(), "yyyy-MM-dd"));
                $("#HUpDater").val();
                $("#HUpDateDate").val();
                $("#HChecker").val();
                $("#HCheckDate").val();
                $("#HCloseMan").val();
                $("#HCloseDate").val();
                $("#HDeleteMan").val();
                $("#HDeleteDate").val();
            }
            else if (OperationType == 3) {                                                 //编辑
                $("#HInterID").val(linterid);
                //子表初始化
@@ -624,6 +645,15 @@
                            layer.close(index);//关闭弹窗
                        }
                        , end: function () {
                            if (JSON.stringify(HDataTemp) != '{}') {
                                //更新表格缓存的数据
                                obj.update({
                                    "HNowProcID": HDataTemp.HItemID
                                    , "当前工序": HDataTemp.工序名称
                                })
                                $("#HNowProcName" + (Number($(obj.tr).attr("data-index")) + Number(1))).val(HDataTemp.工序名称)
                                HDataTemp = {};
                            }
                        }
                    })                   
                }
@@ -656,6 +686,15 @@
                            layer.close(index);//关闭弹窗
                        }
                        , end: function () {
                            if (JSON.stringify(HDataTemp) != '{}') {
                                //更新表格缓存的数据
                                obj.update({
                                    "HBadProcID": HDataTemp.HItemID
                                    , "责任工序": HDataTemp.工序名称
                                })
                                $("#HBadProcName" + (Number($(obj.tr).attr("data-index")) + Number(1))).val(HDataTemp.工序名称)
                                HDataTemp = {};
                            }
                        }
                    })
                }
@@ -808,6 +847,16 @@
                            layer.close(index);//关闭弹窗
                        }
                        , btn2: function (index, layero) { }
                        , end: function () {
                            if (JSON.stringify(HDataTemp) != '{}') {
                                //更新表格缓存的数据
                                obj.update({
                                    "HBadPhenomenaID": HDataTemp.HItemID
                                    , "不良现象": HDataTemp.不良现象名称
                                })
                                HDataTemp = {};
                            }
                        }
                    })
                }
            });
@@ -913,7 +962,7 @@
                                Organization += '<option  style="color:blue;" value="' + data[i].ID + '">' + data[i].Name + '</option>';
                            }
                            $("#HOrgID").append(Organization);
                            if (OperationType == 1 || OperationType == 4 || OperationType == 3) {
                            if (OperationType == 1 || OperationType == 4 || OperationType == 3 || OperationType == 2) {
                                HOrgIDBar = sessionStorage["OrganizationID"];
                            }
                            $("#HOrgID").val(HOrgIDBar);
@@ -946,7 +995,7 @@
                    , toolbar: '#toolbarDemo'
                    , totalRow: true
                    , limit: 500
                    , height: 500
                    , height: 'full-380'
                    , loading: false
                    , cols: [[ //子表
                        { type: 'checkbox', totalRowText: '合计行' }
@@ -1690,10 +1739,10 @@
                        layer.msg("第" + (i + 1) + "行:物料信息不允许为空!");
                        return false;
                    }
                    if (option.data[i]["HProcID"] == 0 || option.data[i]["HProcID"] == undefined || option.data[i]["HProcID"] == null) {
                        layer.msg("第" + (i + 1) + "行:工序信息不允许为空!");
                        return false;
                    }
                    //if (option.data[i]["HProcID"] == 0 || option.data[i]["HProcID"] == undefined || option.data[i]["HProcID"] == null) {
                    //    layer.msg("第" + (i + 1) + "行:工序信息不允许为空!");
                    //    return false;
                    //}
                    if (option.data[i]["HResult"] == 0 || option.data[i]["HResult"] == undefined || option.data[i]["HResult"] == null) {
                        layer.msg("第" + (i + 1) + "行:判定结果不允许为空!");
                        return false;
@@ -1772,13 +1821,13 @@
                    setSelectHResultByTableRender();
                    for (var i = 1; i <= option.data.length; i++) {
                        $('#HMaterNumber' + i + '').val(option.data[i - 1].HBadReasonNumber);
                        $('#HNowProcName' + i + '').val(option.data[i - 1].HBadPhenomenaName);
                        $('#HBadProcName' + i + '').val(option.data[i - 1].HBadPhenomenaName);
                        $('#HEmpName' + i + '').val(option.data[i - 1].HBadPhenomenaName);
                        $('#HSourceName' + i + '').val(option.data[i - 1].HBadPhenomenaName);
                        $('#HBadReason' + i + '').val(option.data[i - 1].HBadPhenomenaName);
                        $('#HBadPhenomena' + i + '').val(option.data[i - 1].HBadPhenomenaName);
                        $('#HMaterNumber' + i + '').val(option.data[i - 1].物料代码);
                        $('#HNowProcName' + i + '').val(option.data[i - 1].当前工序);
                        $('#HBadProcName' + i + '').val(option.data[i - 1].责任工序);
                        $('#HEmpName' + i + '').val(option.data[i - 1].检验员);
                        $('#HSourceName' + i + '').val(option.data[i - 1].生产资源);
                        $('#HBadReason' + i + '').val(option.data[i - 1].不良原因);
                        $('#HBadPhenomena' + i + '').val(option.data[i - 1].不良现象);
                    }
                    form.render('select');
                }
@@ -2114,6 +2163,16 @@
                                    layer.close(index);//关闭弹窗
                                }
                                , btn2: function (index, layero) { }
                                , end: function () {
                                    if (JSON.stringify(HDataTemp) != '{}') {
                                        //更新表格缓存的数据
                                        obj.update({
                                            "HBadPhenomenaID": HDataTemp.HItemID
                                            , "不良现象": HDataTemp.不良现象名称
                                        })
                                        HDataTemp = {};
                                    }
                                }
                            })
                        }
                        //责任工序列表
@@ -2141,9 +2200,19 @@
                                        "HBadProcID": checkStatus.data[0].HItemID
                                        , "责任工序": checkStatus.data[0].工序名称
                                    })
                                    $("#HBadProcName" + (Number($(obj.tr).attr("data-index")) + Number(1))).val(checkStatus.data[0].工序名称)
                                    layer.close(index);//关闭弹窗
                                }
                                , end: function () {
                                    if (JSON.stringify(HDataTemp) != '{}') {
                                        //更新表格缓存的数据
                                        obj.update({
                                            "HNowProcID": HDataTemp.HItemID
                                            , "当前工序": HDataTemp.工序名称
                                        })
                                        $("#HBadProcName" + (Number($(obj.tr).attr("data-index")) + Number(1))).val(HDataTemp.工序名称)
                                        HDataTemp = {};
                                    }
                                }
                            })
                        }
@@ -2172,9 +2241,19 @@
                                        "HNowProcID": checkStatus.data[0].HItemID
                                        , "当前工序": checkStatus.data[0].工序名称
                                    })
                                    $("#HNowProcName" + (Number($(obj.tr).attr("data-index")) + Number(1))).val(checkStatus.data[0].工序名称)
                                    layer.close(index);//关闭弹窗
                                }
                                , end: function () {
                                    if (JSON.stringify(HDataTemp) != '{}') {
                                        //更新表格缓存的数据
                                        obj.update({
                                            "HNowProcID": HDataTemp.HItemID
                                            , "当前工序": HDataTemp.工序名称
                                        })
                                        $("#HNowProcName" + (Number($(obj.tr).attr("data-index")) + Number(1))).val(HDataTemp.工序名称)
                                        HDataTemp = {};
                                    }
                                }
                            })
                        }
@@ -2419,14 +2498,17 @@
            $("#HGroupID").val(obj[0].HItemID);
        }
        function GetMaterValue(obj)           //物料名称
        function GetGyMaterial(obj)           //物料名称
        {
            HDataTemp = obj;
        }
        function GetProcessValue(obj) {      //工序
            HDataTemp = obj[0];
        }
        function GetUnitValue(obj)           //计量单位
        {
            HDataTemp = obj[0];
            HDataTemp = obj;
        }
        function GetHSecManagerValue(obj)  //返回检验员
@@ -2443,7 +2525,9 @@
        {
            HDataTemp = obj[0];
        }
        function GetBadPhenomenaValue(obj) {
            HDataTemp = obj[0];
        }
        //#region å¤„理小数显示位数(data:需要处理的数据;num:数据的类型(如1:数量;2:金额;3:单价))
        function dealDoubleToFixed(data, num) {
            //用于设置小数位数
WebTM/views/Éú²ú¹ÜÀí/±¨¹¤Ì¨¹¤Ðò/²úÁ¿»ã±¨/Sc_Add_ProductReportStepBillList.html
@@ -609,7 +609,7 @@
                        success: function (data) {
                            if (data.count == 1)// è¯´æ˜ŽéªŒè¯æˆåŠŸäº†ï¼Œ
                            {
                                var LoadData = data.data.h_v_IF_ICMOBillWorkQtyStatus_Tmp;
                                var LoadData = data.data.h_v_IF_ICMOBillWorkQtyStatus_Edit;
                                $("#HInterID").val(LoadData[0].HInterID); //单据ID
                                $("#HBillNo").val(LoadData[0].单据号); //单据号
                                $("#HDate").val(formatDate(LoadData[0].日期)); //日期
WebTM/views/Éú²ú¹ÜÀí/±¨¹¤Ì¨¹¤Ðò/²úÁ¿»ã±¨/Sc_ProductReportStepBillList_Web.html
@@ -63,33 +63,18 @@
                                        <input type="date" class="layui-input ForFilteringSchemes" id="HDate1" style="width:190px;">
                                    </div>
                                </div>
                                <div class="layui-row" style="margin-top:10px;margin-left:5%;">
                                    <div class="layui-inline">
                                        <label class="layui-form-label">单据号</label>
                                        <div class="layui-input-block">
                                            <input type="text" class="layui-input ForFilteringSchemes" name="HBillNo" id="HBillNo" style="width:190px;">
                                        </div>
                                <div class="layui-inline">
                                    <label class="layui-form-label">单据号</label>
                                    <div class="layui-input-block">
                                        <input type="text" class="layui-input ForFilteringSchemes" name="HBillNo" id="HBillNo" style="width:190px;">
                                    </div>
                                    <div class="layui-inline">
                                        <label class="layui-form-label">物料信息</label>
                                        <div class="layui-input-block">
                                            <input type="text" class="layui-input ForFilteringSchemes" name="Part" id="Part" style="width:190px;">
                                        </div>
                                    </div>
                                    <div class="layui-inline">
                                        <label class="layui-form-label" style="width: 85px;">组织</label>
                                        <div class="layui-input-block" style="margin-left: 120px; width: 185px;">
                                            <select name="HOrgID" id="HOrgID" lay-verify="HOrgID" class="ForFilteringSchemes">
                                                <!--动态渲染组织-->
                                            </select>
                                        </div>
                                    </div>
                                    <button class="layui-btn layuiadmin-btn-order" type="button" lay-submit=""  lay-filter="btnSearch" id="btnSearch">
                                        <i class="layui-icon layui-icon-search layuiadmin-button-btn"></i>
                                    </button>
                                    <button class="layui-btn layuiadmin-btn-order" type="button" lay-submit="" lay-filter="btnReSearch" id="btnReSearch" style="padding: 0 5px;">重置</button>
                                </div>
                                <button class="layui-btn layuiadmin-btn-order" type="button" lay-submit="" lay-filter="btnSearch" id="btnSearch">
                                    <i class="layui-icon layui-icon-search layuiadmin-button-btn"></i>
                                </button>
                                <button class="layui-btn layuiadmin-btn-order" type="button" lay-submit="" lay-filter="btnReSearch" id="btnReSearch" style="padding: 0 5px;">重置</button>
                                
                                <!--显示当前过滤方案-->
                                <div class="layui-inline" style="margin-left:5px;">
                                    <div style="text-align:center;font-size:15px;font-weight:bold;color:#fc9393" id="HFilterScheme_Now"></div>
@@ -101,12 +86,31 @@
                                                <span>其他条件></span>
                                            </div>
                                        </div>
                                        <div class="layui-inline">
                                            <label class="layui-form-label">生产资源</label>
                                            <div class="layui-input-block">
                                                <input type="text" class="layui-input ForFilteringSchemes" name="Source" id="Source" style="width:190px;">
                                        <div class="layui-row" style="margin-top:10px;margin-left:5%;">
                                            <div class="layui-inline">
                                                <label class="layui-form-label">物料信息</label>
                                                <div class="layui-input-block">
                                                    <input type="text" class="layui-input ForFilteringSchemes" name="Part" id="Part" style="width:190px;">
                                                </div>
                                            </div>
                                            <div class="layui-inline">
                                                <label class="layui-form-label">生产资源</label>
                                                <div class="layui-input-block">
                                                    <input type="text" class="layui-input ForFilteringSchemes" name="Source" id="Source" style="width:190px;">
                                                </div>
                                            </div>
                                            <div class="layui-inline">
                                                <label class="layui-form-label" style="width: 85px;">组织</label>
                                                <div class="layui-input-block" style="margin-left: 120px; width: 185px;">
                                                    <select name="HOrgID" id="HOrgID" lay-verify="HOrgID" class="ForFilteringSchemes">
                                                        <!--动态渲染组织-->
                                                    </select>
                                                </div>
                                            </div>
                                        </div>
                                        <div class="layui-row" style=" margin-top: 10px; margin-left: 70px;">
                                            <div class="layui-inline">
                                                <label class="layui-form-label">过滤</label>
@@ -428,9 +432,7 @@
                set_InitGrid();                
                Organ();
                //查询
                get_FastQuery();
                //查询当前登录用户有没有在当前模块设置默认过滤方案
                get_DefaultModule();
                get_FastQuery();
            }
           
             //#endregion
@@ -619,14 +621,17 @@
            //#endregion  ç›‘听网格表体事件
            table.on('tool(mainTable)', function (obj) {
                var HInterID = data[0].HInterID;
                var HICMOInID = data[0].HICMOInterID;
                var HICMOEnID = data[0].HICMOEntryID;
                var HRelationInterID = data[0].HRelationInterID;
                var HInterID = obj.data.HInterID;
                var HICMOInID = obj.data.HICMOInterID;
                var HICMOEnID = obj.data.HICMOEntryID;
                var HRelationInterID = obj.data.HRelationInterID;
                //单据号超链接
                if (obj.event == '单据号') {                  //检查 obj.event æ˜¯å¦ç­‰äºŽå­—符串 '单据号'。如果等于,则执行if循环
                    var linterid = data.hmainid.toString();    //声明变量linterid ä¸º data.hmainid
                if (obj.event == '单据号') {                  //检查 obj.event æ˜¯å¦ç­‰äºŽå­—符串 '单据号'。如果等于,则执行if循环
                    //if (AllowLoadData(sSubStr) != false) {//非空验证
                    if (HRelationInterID == 1) {
                        layer.msg('单据已报检审核无法修改!');
                        return false;
                    }
                    layer.open({                //使用 layer的open打开弹出 å±‚ 
                        type: 2                         //表示弹出层的内容是一个 iframe
                        , area: ['100%', '100%']
@@ -756,12 +761,18 @@
                            for (var i = 0; i < data.length; i++) {
                                if ($.inArray(data[i].name, titleData) > -1) {
                                    col.push({ field: data[i].id, title: data[i].name, align: 'center', hide: true }); //隐藏id列
                                } else if (data[i].name == '单据号') {//添加超链接
                                    col.push({
                                        field: data[i].id, title: data[i].name, align: 'center', sort: true, width: 200, event: '单据号', templet: function (d) {
                                            return '<span style="color: blue;">' + d.单据号 + '</span>'
                                        }, style: 'cursor: pointer;'
                                    });
                                }
                                else {
                                    switch (data[i].Type) {
                                        //int
                                        case 'DateTime':
                                            col.push({ field: data[i].id, title: data[i].name, align: 'center', sort: false, templet: "<div>{{d." + data[i].name + " ==null ?'':layui.util.toDateString(d." + data[i].name + ", 'yyyy-MM-dd HH:mm:ss')}}</div>", width: 160 });
                                            col.push({ field: data[i].id, title: data[i].name, align: 'center', sort: false, templet: "<div>{{d." + data[i].name + " ==null ?'':layui.util.toDateString(d." + data[i].name + ", 'yyyy-MM-dd')}}</div>", width: 160 });
                                            break;
                                        case 'Decimal':
                                            col.push({ field: data[i].id, title: data[i].name, align: 'center', sort: false, width: 140, totalRow: true });
@@ -787,8 +798,10 @@
                            Display_HideButton(set_HideButton_ID, HBillType, HModName, sessionStorage["HUserName"]);
                            layer.close(ajaxLoad);
                            if ($("#Comparator").val() == 0 && $("#ColContent").val() == "") {
                            if ($("#ColName option").length < 1) {
                                ColFilter();
                                //查询当前登录用户有没有在当前模块设置默认过滤方案
                                get_DefaultModule();
                            }
                        } else {
                            layer.close(ajaxLoad);
@@ -1245,7 +1258,7 @@
            }
            //#region ç‚¹å‡»è¡Œé€‰ä¸­é«˜äº®
            table.on('row(mainTablemainTable)', function (obj) {
            table.on('row(mainTable)', function (obj) {
                //选中行改变颜色
                var flag = !obj.tr.find(':checkbox:first').prop('checked');
                obj.tr.find(':checkbox').prop('checked', flag);
WebTM/views/Éú²ú¹ÜÀí/Éú²ú»ã±¨µ¥/Sc_Add_ICMOReportBillList.html
@@ -351,6 +351,23 @@
            else if (OperationType == 4) {//下推
                setInit_PushBill();
            }
            else if (OperationType == 5) {//复制
                set_EditFromGrid();
                //获取最大单据号
                get_MAXNum();
                //初始化制单人和制单时间
                $("#HMaker").val(sessionStorage["HUserName"]);
                $("#HMakeDate").val(Format(new Date(), "yyyy-MM-dd"));
                $("#HUpDater").val();
                $("#HUpDateDate").val();
                $("#HChecker").val();
                $("#HCheckDate").val();
                $("#HCloseMan").val();
                $("#HCloseDate").val();
                $("#HDeleteMan").val();
                $("#HDeleteDate").val();
                //get_file();
            }
            else {
                layer.alert("未知操作类型!", { icon: 5 });
            }
@@ -455,13 +472,6 @@
                    content: ['../../PublicPage/ProductionOrder.html', 'yes'],
                    btn: ['确定', '取消']
                    , btn1: function (index, layero) {
                        option.data = [{
                            "HMaterID": 0, "HMaterCode": "", "HMaterName": "", "HMaterSpec": "", "HUnitID": 0, "HUnitCode": "", "HUnitName": "",
                            "HSourceID": 0, "HSourceCode": "", "HSourceName": "", "HWorkerid": 0, "HWorkerCode": "", "HWorkerName": "", "HQty": 0, "HBadQty": 0,
                            "HICMOBillNo": "", "HICMOInterID": "0", "HICMOEntryID": "0", "HRemark": "", "HSourceInterID": 0, "HSourceEntryID": 0, "HSourceBillNo": "",
                            "HSourceBillType": 0, "HICMOTempID": 0
                        }];
                        table.render(option);
                        //按钮【按钮一】的回调
                        var iframeWindow = window['layui-layer-iframe' + index]  //获取弹框页面
                        var checkStatus = iframeWindow.layui.table.checkStatus('mainTable');//获取table的elem:"#test"
@@ -483,30 +493,22 @@
                        if (isAllEqual(list))  //相同单号
                        {
                            //console.log(checkStatus.data);
                            if (checkStatus.data.length > 1) {
                                for (var i = 0; i < checkStatus.data.length - 1; i++) //补行
                                {
                                    //var NewRow = { "HMaterID": 0, "HMaterCode": "", "HMaterName": "", "HMaterSpec": "", "HUnitID": 0, "HUnitCode": "", "HUnitName": "", "HSourceID": 0, "HSourceCode": "", "HSourceName": "", "HWorkerid": 0, "HWorkerCode": "", "HWorkerName": "", "HQty": 0, "HRemark": "" };
                                    table.cache["mainTable"].push({
                                        "HMaterID": 0, "HMaterCode": "", "HMaterName": "", "HMaterSpec": "", "HUnitID": 0, "HUnitCode": "", "HUnitName": "",
                                        "HSourceID": 0, "HSourceCode": "", "HSourceName": "", "HWorkerid": 0, "HWorkerCode": "", "HWorkerName": "", "HQty": 0, "HBadQty": 0, "HICMOBillNo": "", "HICMOInterID": "0", "HICMOEntryID": "0", "HRemark": "", "HSourceInterID": 0, "HSourceEntryID": 0, "HSourceBillNo": "",
                                        "HSourceBillType": 0, "HICMOTempID": 0
                                    });
                                    option.data = table.cache["mainTable"];
                                    table.render(option);
                                }
                            var optionData = [];
                            for (var i = 0; i < checkStatus.data.length; i++) //补行
                            {
                                var NewRow = {
                                    "HMaterID": checkStatus.data[0].HMaterID, "HMaterCode": checkStatus.data[0].HMaterCode, "HMaterName": checkStatus.data[0].HMaterName, "HMaterSpec": checkStatus.data[0].HMaterSpec, "HUnitID": checkStatus.data[0].HUnitID, "HUnitCode": checkStatus.data[0].HUnitCode, "HUnitName": checkStatus.data[0].HUnitName,
                                    "HSourceID": 0, "HSourceCode": "", "HSourceName": "", "HWorkerid": 0, "HWorkerCode": "", "HWorkerName": "", "HQty": 0, "HBadQty": 0,
                                    "HICMOBillNo": checkStatus.data[0].单据号, "HICMOInterID": checkStatus.data[0].hmainid, "HICMOEntryID": checkStatus.data[0].HEntryID, "HRemark": "", "HSourceInterID": checkStatus.data[0].hmainid, "HSourceEntryID": checkStatus.data[0].HEntryID, "HSourceBillNo": checkStatus.data[0].单据号,
                                    "HSourceBillType": 3710
                                };
                                optionData.push(NewRow);
                            }
                            option.data = checkStatus.data;
                            table.render(option);
                            //for (var i = 0; i < checkStatus.data.length; i++) {
                            //    $('.layui-table-view[lay-id="mainTable"]').children('.layui-table-box').children('.layui-table-body').find('table tbody tr[data-index="' + i + '"]').find('td[data-field="HMaterID"] .layui-table-cell').text(checkStatus.data[i].HMaterID);
                            //    $('.layui-table-view[lay-id="mainTable"]').children('.layui-table-box').children('.layui-table-body').find('table tbody tr[data-index="' + i + '"]').find('td[data-field="HMaterCode"] .layui-table-cell').text(checkStatus.data[i].HMaterCode);
                            //    $('.layui-table-view[lay-id="mainTable"]').children('.layui-table-box').children('.layui-table-body').find('table tbody tr[data-index="' + i + '"]').find('td[data-field="HMaterName"] .layui-table-cell').text(checkStatus.data[i].HMaterName);
                            //    $('.layui-table-view[lay-id="mainTable"]').children('.layui-table-box').children('.layui-table-body').find('table tbody tr[data-index="' + i + '"]').find('td[data-field="HMaterSpec"] .layui-table-cell').text(checkStatus.data[i].HMaterSpec);
                            //    $('.layui-table-view[lay-id="mainTable"]').children('.layui-table-box').children('.layui-table-body').find('table tbody tr[data-index="' + i + '"]').find('td[data-field="HUnitID"] .layui-table-cell').text(checkStatus.data[i].HUnitID);
                            //    $('.layui-table-view[lay-id="mainTable"]').children('.layui-table-box').children('.layui-table-body').find('table tbody tr[data-index="' + i + '"]').find('td[data-field="HUnitCode"] .layui-table-cell').text(checkStatus.data[i].HUnitCode);
                            //    $('.layui-table-view[lay-id="mainTable"]').children('.layui-table-box').children('.layui-table-body').find('table tbody tr[data-index="' + i + '"]').find('td[data-field="HUnitName"] .layui-table-cell').text(checkStatus.data[i].HUnitName);
                            //}
                            table.reload("mainTable", {
                                data: optionData    //将数据重新载入表格
                            })
                            layer.close(layer.index); //它获取的始终是最新弹出的某个层,值是由layer内部动态递增计算的
                        }
                        else {
@@ -538,7 +540,7 @@
            //#region æäº¤ä¿å­˜
            form.on('submit(Saver)', function (data) {//保存
                var refSav = "";
                if (OperationType == 1 || OperationType == 2 || OperationType == 4) {
                if (OperationType == 1 || OperationType == 2 || OperationType == 4 || OperationType == 5) {
                    refSav = "Add";
                }
                if (OperationType == 3) {
@@ -761,26 +763,65 @@
                                    if (checkStatus.data.length === 0) {
                                        return layer.msg('请选择数据');
                                    }
                                    //同步更新表格和缓存对应的值
                                    obj.update({
                                        HMaterID: checkStatus.data[0].HItemID,
                                        HMaterCode: checkStatus.data[0].物料代码,
                                        HMaterName: checkStatus.data[0].物料名称,
                                        HMaterSpec: checkStatus.data[0].规格型号,
                                    });
                                    //选中多行时
                                    if (checkStatus.data.length > 1) {
                                        var rowIndex = $(obj.tr).attr("data-index") * 1;  //attr("data-index")用于获取该tr元素上data-index属性的值*1转换类型然后赋值给rowIndex
                                        for (var i = 0; i < checkStatus.data.length; i++) {  //判断选中的数据的长度  ç”¨äºŽéåކcheckStatus.data数组中的每个元素
                                            if (rowIndex + i >= option.data.length) {           //判断rowIndex + i的索引超出了option.data数组的长度,说明option.data数组需要扩展以包含更多行
                                                var NewRow = {
                                                    "HMaterID": 0, "HMaterCode": "", "HMaterName": "", "HMaterSpec": "", "HUnitID": 0, "HUnitCode": "", "HUnitName": "",
                                                    "HSourceID": 0, "HSourceCode": "", "HSourceName": "", "HWorkerid": 0, "HWorkerCode": "", "HWorkerName": "", "HQty": 0, "HBadQty": 0,
                                                    "HICMOBillNo": "", "HICMOInterID": "0", "HICMOEntryID": "0", "HRemark": "", "HSourceInterID": 0, "HSourceEntryID": 0, "HSourceBillNo": "",
                                                    "HSourceBillType": 0
                                                };
                                                table.cache["mainTable"].push(NewRow);    //创建新的包含数组  ä¼ å…¥table.cache["mainTable"]数组
                                                option.data = table.cache["mainTable"];  //把传入 table.cache["mainTable"]数组的值赋值给option.data çš„属性
                                                table.render(option);//渲染界面
                                            }
                                            option.data[rowIndex + i].HMaterID = checkStatus.data[i].HItemID;  //将option.data数组中对应行的HMaterID属性更新为从resultData对象中获取的物料ID
                                            option.data[rowIndex + i].HMaterCode = checkStatus.data[i].物料代码; //将option.data数组中对应行的 ç‰©æ–™ä»£ç  å±žæ€§æ›´æ–°ä¸ºä»ŽresultData对象中获取的物料ID
                                            option.data[rowIndex + i].HMaterName = checkStatus.data[i].物料名称; //将option.data数组中对应行的  ç‰©æ–™åç§°  å±žæ€§æ›´æ–°ä¸ºä»ŽresultData对象中获取的物料ID
                                            option.data[rowIndex + i].HMaterSpec = checkStatus.data[i].规格型号; //将option.data数组中对应行的  è§„格型号  å±žæ€§æ›´æ–°ä¸ºä»ŽresultData对象中获取的物料ID
                                            option.data[rowIndex + i].HUnitID = checkStatus.data[i].HUnitID; //将option.data数组中对应行的 HUnitID å±žæ€§æ›´æ–°ä¸ºä»ŽresultData对象中获取的物料ID
                                            option.data[rowIndex + i].HUnitCode = checkStatus.data[i].计量单位代码;
                                            option.data[rowIndex + i].HUnitName = checkStatus.data[i].计量单位名称; //将option.data数组中对应行的 è®¡é‡å•位 å±žæ€§æ›´æ–°ä¸ºä»ŽresultData对象中获取的物料ID   æ›´æ–°è®¡é‡å•位属性
                                        }
                                        table.render(option); //重新渲染表格以显示更新后的数据
                                    } else {
                                        //同步更新表格和缓存对应的值
                                        obj.update({
                                            HMaterID: checkStatus.data[0].HItemID,
                                            HMaterCode: checkStatus.data[0].物料代码,
                                            HMaterName: checkStatus.data[0].物料名称,
                                            HMaterSpec: checkStatus.data[0].规格型号,
                                            HUnitID: checkStatus.data[0].HUnitID,
                                            HUnitCode: checkStatus.data[0].计量单位代码,
                                            HUnitName: checkStatus.data[0].计量单位名称,
                                        });
                                    }
                                    layer.close(layer.index); //它获取的始终是最新弹出的某个层,值是由layer内部动态递增计算的
                                }
                                , btn2: function (index, layero) {
                                    //按钮【按钮二】的回调
                                    //return false å¼€å¯è¯¥ä»£ç å¯ç¦æ­¢ç‚¹å‡»è¯¥æŒ‰é’®å…³é—­
                                }, end: function () {
                                    if (OptionData.length > 0) {
                                    if (OptionData != "" && OptionData != []) {
                                        //更新表格缓存的数据
                                        obj.update({
                                            HMaterID: OptionData[0].HItemID,
                                            HMaterCode: OptionData[0].物料代码,
                                            HMaterName: OptionData[0].物料名称,
                                            HMaterSpec: OptionData[0].规格型号,
                                            HMaterID: OptionData.HItemID,
                                            HMaterCode: OptionData.物料代码,
                                            HMaterName: OptionData.物料名称,
                                            HMaterSpec: OptionData.规格型号,
                                            HUnitID: OptionData.HUnitID,
                                            HUnitCode: OptionData.计量单位代码,
                                            HUnitName: OptionData.计量单位名称,
                                        });
                                        OptionData = [];
                                    }
@@ -799,7 +840,7 @@
                                shift: 2,
                                area: ['90%', '90%'],
                                maxmin: true,
                                content: ['../../基础资料/公用基础资料/Gy_Unit.html?Type=HUnitList&openType=2', 'yes'],
                                content: ['../../基础资料/公用基础资料/Gy_Unit.html?Type=HUnitList', 'yes'],
                                btn: ['确定', '取消']
                                , btn1: function (index, layero) {
@@ -823,12 +864,12 @@
                                    //按钮【按钮二】的回调
                                    //return false å¼€å¯è¯¥ä»£ç å¯ç¦æ­¢ç‚¹å‡»è¯¥æŒ‰é’®å…³é—­
                                }, end: function () {
                                    if (OptionData.length > 0) {
                                    if (OptionData != "" && OptionData != []) {
                                        //更新表格缓存的数据
                                        obj.update({
                                            HUnitID: OptionData[0].HItemID,
                                            HUnitCode: OptionData[0].计量单位代码,
                                            HUnitName: OptionData[0].计量单位名称
                                            HUnitID: OptionData.HItemID,
                                            HUnitCode: OptionData.计量单位代码,
                                            HUnitName: OptionData.计量单位名称
                                        });
                                        OptionData = [];
                                    }
@@ -874,9 +915,9 @@
                                    if (OptionData.length > 0) {
                                        //更新表格缓存的数据
                                        obj.update({
                                            HSourceID: OptionData[0].HItemID,
                                            HSourceCode: OptionData[0].生产资源代码,
                                            HSourceName: OptionData[0].生产资源名称
                                            HSourceID: OptionData[0][0].HItemID,
                                            HSourceCode: OptionData[0][0].生产资源代码,
                                            HSourceName: OptionData[0][0].生产资源名称
                                        });
                                        OptionData = [];
                                    }
@@ -946,22 +987,22 @@
                    , { templet: '#xuhao', title: '序号', sort: true, fixed: 'left', event: "qwe", width: 100 }
                    , { field: 'HMaterID', title: 'HMaterID', edit: 'text', width: 100, hide: true }
                    , { field: 'HMaterCode', title: '物料代码', edit: 'text', event: 'HMaterCode', width: 100 }
                    , { field: 'HMaterName', title: '物料名称', edit: 'text', width: 100 }
                    , { field: 'HMaterSpec', title: '规格型号', edit: 'text', width: 100 }
                    , { field: 'HMaterName', title: '物料名称', style: 'background-color:#efefef4d;', width: 100 }
                    , { field: 'HMaterSpec', title: '规格型号', style: 'background-color:#efefef4d;', width: 100 }
                    , { field: 'HUnitID', title: 'HUnitID', edit: 'text', width: 100, hide: true }
                    , { field: 'HUnitCode', title: '单位代码', edit: 'text', event: 'HUnitCode', width: 100 }
                    , { field: 'HUnitName', title: '单位名称', edit: 'text', width: 100 }
                    , { field: 'HUnitName', title: '单位名称', style: 'background-color:#efefef4d;', width: 100 }
                    , { field: 'HSourceID', title: 'HSourceID', edit: 'text', width: 100, hide: true }
                    , { field: 'HSourceCode', title: '资源代码', edit: 'text', event: 'HSourceCode', width: 100 }
                    , { field: 'HSourceName', title: '资源名称', edit: 'text', width: 100 }
                    , { field: 'HSourceName', title: '资源名称', style: 'background-color:#efefef4d;', width: 100 }
                    , { field: 'HWorkerid', title: 'HWorkerid', edit: 'text', width: 100, hide: true }
                    , { field: 'HWorkerCode', title: '操作员代码', edit: 'text', event: 'HWorkerCode', width: 100 }
                    , { field: 'HWorkerName', title: '操作员名称', edit: 'text', width: 100 }
                    , { field: 'HWorkerName', title: '操作员名称', style: 'background-color:#efefef4d;', width: 100 }
                    , { field: 'HQty', title: '生产数量', edit: 'text', width: 100, totalRow: true }
                    , { field: 'HBadQty', title: '不良数量', edit: 'text', width: 100, totalRow: true }
                    , { field: 'HICMOBillNo', title: '生产订单', edit: 'text', width: 100 }
                    , { field: 'HICMOInterID', title: '生产订单内码', edit: 'text', width: 100, hide: true }
                    , { field: 'HICMOEntryID', title: '生产订单子内码', edit: 'text', width: 100, hide: true }
                    , { field: 'HICMOBillNo', title: '生产订单', style: 'background-color:#efefef4d;', width: 100 }
                    , { field: 'HICMOInterID', title: '生产订单内码', style: 'background-color:#efefef4d;', width: 100, hide: true }
                    , { field: 'HICMOEntryID', title: '生产订单子内码', style: 'background-color:#efefef4d;', width: 100, hide: true }
                    , { field: 'HSourceInterID', title: '源单内码', edit: 'text', width: 100, hide: true }
                    , { field: 'HSourceEntryID', title: '源单子内码', edit: 'text', width: 100, hide: true }
@@ -1139,12 +1180,12 @@
            function set_EditFromGrid() {
                set_EditForm(linterid);  //编辑获取表头
                set_EditGrid(linterid);  //编辑获取表体
                option.data = [{
                    "HMaterID": 0, "HMaterCode": "", "HMaterName": "", "HMaterSpec": "", "HUnitID": 0, "HUnitCode": "", "HUnitName": "",
                    "HSourceID": 0, "HSourceCode": "", "HSourceName": "", "HWorkerid": 0, "HWorkerCode": "", "HWorkerName": "", "HQty": 0, "HBadQty": 0,
                    "HICMOBillNo": "", "HICMOInterID": "0", "HICMOEntryID": "0", "HRemark": "", "HSourceInterID": 0, "HSourceEntryID": 0, "HSourceBillNo": "",
                    "HSourceBillType": 0, "HICMOTempID": 0
                }];
                //option.data = [{
                //    "HMaterID": 0, "HMaterCode": "", "HMaterName": "", "HMaterSpec": "", "HUnitID": 0, "HUnitCode": "", "HUnitName": "",
                //    "HSourceID": 0, "HSourceCode": "", "HSourceName": "", "HWorkerid": 0, "HWorkerCode": "", "HWorkerName": "", "HQty": 0, "HBadQty": 0,
                //    "HICMOBillNo": "", "HICMOInterID": "0", "HICMOEntryID": "0", "HRemark": "", "HSourceInterID": 0, "HSourceEntryID": 0, "HSourceBillNo": "",
                //    "HSourceBillType": 0, "HICMOTempID": 0
                //}];
                table.render(option);
            }
            //#endregion
@@ -1155,6 +1196,7 @@
                $.ajax({
                    url: GetWEBURL() + "Sc_ICMOReportBill/Sc_GetICMOReportBillListCheckDetai",
                    type: "GET",
                    async: false,
                    data: {
                        "HID": linterid
                    },
@@ -1173,8 +1215,8 @@
                            $("#HEmpID").val(data.HEmpID);
                            $("#HEmpName").val(data.统计员);
                            $("#HMainSourceBillNo").val(data.HMainSourceBillNo);
                            $("#HMainSourceInterID").val(data.HMainSourceInterID);
                            $("#HMainSourceEntryID").val(data.HMainSourceEntryID);
                            $("#HMainSourceInterID").val(data.HMainSourceInterID == null ? 0 : data.HMainSourceInterID);
                            $("#HMainSourceEntryID").val(data.HMainSourceEntryID == null ? 0 : data.HMainSourceEntryID);
                            $("#HExplanation").val("");
                            $("#HRemark").val(data.表头备注);
                            PicUpload();
@@ -1196,6 +1238,7 @@
                $.ajax({
                    url: GetWEBURL() + 'Sc_ICMOReportBill/Sc_ICMOReportBillListProjectDetai',
                    type: "GET",
                    async: false,
                    data: { "sqlWhere": "and hmainid=" + linterid },
                    success: function (result) {
                        if (result.count == 1) {
@@ -1666,7 +1709,7 @@
            $("#HEmpID").val(obj[0].HItemID);
        }
        //物料
        function GetMaterValue(obj) {
        function GetGyMaterial(obj) {
            OptionData = obj;
        }
        //单位
WebTM/views/Éú²ú¹ÜÀí/Éú²ú»ã±¨µ¥/Sc_ICMOReportBillList.html
@@ -233,6 +233,7 @@
                            <div class="layui-btn-container" id="toolbarDemo_ButtonSet">
                                <button type="button" class="layui-btn layui-btn-sm" style="display: none;" lay-event="btn_Export" id="btn_Export"><i class="layui-icon layui-icon-export"></i>导出</button>
                                <button type="button" class="layui-btn layui-btn-sm" style="display: none;" lay-event="btn-Add" id="btn-Add"><i class="layui-icon layui-icon-file-b"></i>新增</button>
                                <button type="button" class="layui-btn layui-btn-sm" lay-event="set_Copy" id="set_Copy"><i class="layui-icon layui-icon-form"></i>复制</button>
                                <button type="button" class="layui-btn layui-btn-sm" style="display: none;" lay-event="btn-Edit" id="btn-Edit"><i class="layui-icon layui-icon-form"></i>编辑</button>
                                <button type="button" class="layui-btn layui-btn-sm" style="display: none;" lay-event="btn-Delete" id="btn-Delete"><i class="layui-icon layui-icon-delete"></i>删除</button>
                                <button type="button" class="layui-btn layui-btn-sm" style="display:none;" lay-event="btn-PushProductInBill" id="btn-PushProductInBill"><i class="layui-icon layui-icon-delete"></i>下推(生产入库单)</button>
@@ -327,6 +328,9 @@
                        break;
                    //新增按钮
                    case 'btn-Add': set_AddNew();
                        break;
                    //复制
                    case 'set_Copy': set_Copy();
                        break;
                    //编辑按钮
                    case 'btn-Edit': set_ShowBill();
@@ -459,6 +463,33 @@
                set_ResCnz();
            });
            //#endregion
            //超链接跳转
            table.on('tool(mainTable)', function (obj) {
                var data = obj.data;
                if (obj.event == '单据号') {
                    var hID = data.hmainid.toString();
                    //if (AllowLoadData(sSubStr) != false) {//非空验证
                    layer.open({
                        type: 2
                        , area: ['100%', '100%']
                        , title: '编辑' + HPageTitle
                        , closeBtn: 1
                        , shade: 0.6 //遮罩透明度
                        , maxmin: true //允许全屏最小化
                        , anim: 0 //0-6的动画形式,-1不开启
                        , content: '../生产汇报单/Sc_Add_ICMOReportBillList.html?OperationType=3&linterid=' + hID + '&HSouceBillType='
                        , resize: false,
                        end: function () {
                            //刷新页面,
                            get_FastQuery();
                        }
                        , cancel: function () {
                            //$(".layui-btn").removeClass("layui-btn-disabled");
                        }
                    })
                }
            });
        //#endregion
@@ -794,12 +825,18 @@
                            for (var i = 0; i < data.length; i++) {
                                if ($.inArray(data[i].name, titleData) > -1) {
                                    col.push({ field: data[i].id, title: data[i].name, align: 'center', hide: true }); //隐藏id列
                                } else if (data[i].name == '单据号') {//添加超链接
                                    col.push({
                                        field: data[i].id, title: data[i].name, align: 'center', sort: true, width: 200, event: '单据号', templet: function (d) {
                                            return '<span style="color: blue;">' + d.单据号 + '</span>'
                                        }, style: 'cursor: pointer;'
                                    });
                                }
                                else {
                                    switch (data[i].Type) {
                                        //int
                                        case 'DateTime':
                                            col.push({ field: data[i].id, title: data[i].name, align: 'center', sort: false, templet: "<div>{{d." + data[i].name + " ==null ?'':layui.util.toDateString(d." + data[i].name + ", 'yyyy-MM-dd HH:mm:ss')}}</div>", width: 160 });
                                            col.push({ field: data[i].id, title: data[i].name, align: 'center', sort: false, templet: "<div>{{(d." + data[i].name + " ==null||d." + data[i].name +"=='1900-01-01T00:00:00') ?'':layui.util.toDateString(d." + data[i].name + ", 'yyyy-MM-dd')}}</div>", width: 160 });
                                            break;
                                        case 'Decimal':
                                            col.push({ field: data[i].id, title: data[i].name, align: 'center', sort: false, width: 140, totalRow: true });
@@ -825,8 +862,10 @@
                            Display_HideButton(set_HideButton_ID, HBillType, HModName, sessionStorage["HUserName"]);
                                                     
                            layer.close(ajaxLoad);
                            if ($("#Comparator").val() == 0 && $("#ColContent").val() == "") {
                            if ($("#ColName option").length < 1) {
                                ColFilter();
                                //查询当前登录用户有没有在当前模块设置默认过滤方案
                                get_DefaultModule();
                            }
                        } else {
                            layer.close(ajaxLoad);
@@ -1160,6 +1199,34 @@
                        location.reload();
                    }
                });
            }
            //#endregion
            //#region å¤åˆ¶
            function set_Copy() {
                var checkStatus = table.checkStatus('mainTable')
                    , data = checkStatus.data;
                if (checkStatus.data.length === 1) {
                    var hID = data[0].hmainid.toString();
                    layer.open({
                        type: 2
                        , area: ['100%', '100%']
                        , title: '复制-' + HPageTitle
                        , shade: 0.6 //遮罩透明度
                        , maxmin: true //允许全屏最小化
                        , anim: 0 //0-6的动画形式,-1不开启
                        , content: '../生产汇报单/Sc_Add_ICMOReportBillList.html?OperationType=5&linterid=' + hID + '&HSouceBillType='
                        , resize: false,
                        end: function () {
                            //刷新页面,
                            $("#btnSearch").trigger('click');
                        }
                        , cancel: function () {
                        }
                    })
                } else {
                    layer.msg('请选择一行数据编辑!');
                }
            }
            //#endregion
@@ -1554,8 +1621,7 @@
                            //当前用户没有设置默认的过滤方案
                            //隐藏显示过滤方案的标签信息
                            document.getElementById("HFilterScheme_Now").style.display = "none";
                            //执行查询方法
                            get_FastQuery()
                            form.render("select");
                        }
                    }, error: function () {