duhe
2023-11-09 427b546470bcf0c26a4dae277358375ca19b3ba9
生产订单变更单:去掉网格
3个文件已修改
1080 ■■■■ 已修改文件
WebTM/Properties/PublishProfiles/JFTM.pubxml.user 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WebTM/views/生产管理/生产任务单/Sc_ICMOBillList.html 3 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WebTM/views/生产管理/生产订单变更单/Sc_ICMOChangeBill.html 1073 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WebTM/Properties/PublishProfiles/JFTM.pubxml.user
@@ -3597,7 +3597,7 @@
      <publishTime>04/11/2023 16:34:43</publishTime>
    </File>
    <File Include="views/生产管理/生产任务单/Sc_ICMOBillList.html">
      <publishTime>11/07/2023 23:22:14</publishTime>
      <publishTime>11/09/2023 19:34:38</publishTime>
    </File>
    <File Include="views/生产管理/生产停工单/Sc_Add_MESStopWorkBillList - å¤åˆ¶.html">
      <publishTime>04/11/2023 16:34:43</publishTime>
@@ -3726,7 +3726,7 @@
      <publishTime>11/08/2023 09:01:07</publishTime>
    </File>
    <File Include="views/生产管理/生产订单变更单/Sc_ICMOChangeBill.html">
      <publishTime>11/09/2023 16:24:12</publishTime>
      <publishTime>11/09/2023 19:55:48</publishTime>
    </File>
    <File Include="views/生产管理/生产订单变更单/Sc_ICMOChangeBillList.html">
      <publishTime>11/09/2023 16:25:36</publishTime>
WebTM/views/Éú²ú¹ÜÀí/Éú²úÈÎÎñµ¥/Sc_ICMOBillList.html
@@ -864,6 +864,7 @@
                    , data = checkStatus.data;
                if (checkStatus.data.length === 1) {
                    var hID = data[0].hmainid.toString();
                    var HEntryID = data[0].hsubid.toString();
                    layer.open({
                        type: 2
                        , area: ['100%', '100%']
@@ -872,7 +873,7 @@
                        , shade: 0.6 //遮罩透明度
                        , maxmin: true //允许全屏最小化
                        , anim: 0 //0-6的动画形式,-1不开启
                        , content: '../../生产管理/生产订单变更单/Sc_ICMOChangeBill.html?OperationType=4&linterid=' + hID + '&HSouceBillType=3710&closeType=1'
                        , content: '../../生产管理/生产订单变更单/Sc_ICMOChangeBill.html?OperationType=4&linterid=' + hID + '&HSouceBillType=3710&closeType=1&HEntryID=' + HEntryID
                        , resize: false,
                        end: function () {
                            //刷新页面,
WebTM/views/Éú²ú¹ÜÀí/Éú²ú¶©µ¥±ä¸üµ¥/Sc_ICMOChangeBill.html
@@ -78,9 +78,9 @@
                                            <div class="layui-input-inline">
                                                <input type="text" name="HDeptName" id="HDeptName" class="layui-input" value="" style="float:left;width:150px;">
                                                <input type="hidden" name="HDeptID" id="HDeptID" class="layui-input" value="0" style="float:left;width:150px;">
                                                <button type="button" lay-submit="" class="layui-btn" lay-filter="HDeptList" style="width:40px;">
                                                <!--<button type="button" lay-submit="" class="layui-btn" lay-filter="HDeptList" style="width:40px;">
                                                    <i class="layui-icon layui-icon-search layuiadmin-button-btn" style="margin-left:-9px;"></i>
                                                </button>
                                                </button>-->
                                            </div>
                                        </div>
                                        <div class="layui-inline">
@@ -88,27 +88,81 @@
                                            <div class="layui-input-inline">
                                                <input type="text" name="HEmpName" id="HEmpName" " class="layui-input" value="" style="float:left;width:150px;">
                                                <input type="hidden" name="HEmpID" id="HEmpID" class="layui-input" value="0" style="float:left;width:150px;">
                                                <button type="button" lay-submit="" class="layui-btn" lay-filter="HEmpList" style="width:40px;">
                                                <!--<button type="button" lay-submit="" class="layui-btn" lay-filter="HEmpList" style="width:40px;">
                                                    <i class="layui-icon layui-icon-search layuiadmin-button-btn" style="margin-left:-9px;"></i>
                                                </button>
                                                </button>-->
                                            </div>
                                        </div>
                                    </div>
                                    <div class="layui-row">
                                        <div class="layui-inline" style="width:900px;">
                                        <div class="layui-inline" style="width:623px;">
                                            <label class="layui-form-label">客户</label>
                                            <div class="layui-input-inline" style="width:700px;">
                                                <input type="text" name="HCusName" id="HCusName" class="layui-input" value="" style="float:left;width:465px;">
                                                <input type="hidden" name="HCusID" id="HCusID" class="layui-input" value="0" style="float:left;width:150px;">
                                                <button type="button" lay-submit="" class="layui-btn" lay-filter="HCusList" style="width:40px;">
                                            <div class="layui-input-inline">
                                                <input type="text" name="HCusName" id="HCusName" class="layui-input" value="" style="width:501px;">
                                                <input type="hidden" name="HCusID" id="HCusID" class="layui-input" value="0">
                                                <!--<button type="button" lay-submit="" class="layui-btn" lay-filter="HCusList" style="width:40px;">
                                                    <i class="layui-icon layui-icon-search layuiadmin-button-btn" style="margin-left:-9px;"></i>
                                                </button>
                                                </button>-->
                                            </div>
                                        </div>
                                        <div class="layui-inline" style="position: relative; left: -280px;">
                                         <div class="layui-inline">
                                            <label class="layui-form-label">物料代码</label>
                                            <div class="layui-input-inline">
                                                <input type="text" name="HMaterNumber" id="HMaterNumber" class="layui-input" value="">
                                                <input type="hidden" name="HMaterID" id="HMaterID" class="layui-input" value="0">
                                                <!--<button type="button" lay-submit="" class="layui-btn" lay-filter="HDeptList" 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" class="layui-input" name="HMaterName" id="HMaterName" style="background-color:#efefef4d;" readonly>
                                            </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" class="layui-input" name="HMaterModel" id="HMaterModel" style="background-color:#efefef4d;" readonly>
                                            </div>
                                        </div>
                                        <div class="layui-inline">
                                            <label class="layui-form-label">计量单位</label>
                                            <div class="layui-input-inline">
                                                <input type="text" name="HUnitName" id="HUnitName" class="layui-input" value="" style="float:left;width:150px;">
                                                <input type="hidden" name="HUnitID" id="HUnitID" class="layui-input" value="0" style="float:left;width:150px;">
                                                <!--<button type="button" lay-submit="" class="layui-btn" lay-filter="HDeptList" 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" class="layui-input" name="HQty_Old" id="HQty_Old" value="0" style="background-color:#efefef4d;" readonly>
                                            </div>
                                        </div>
                                        <div class="layui-inline">
                                            <label class="layui-form-label">新数量</label>
                                            <div class="layui-input-inline">
                                                <input type="text" class="layui-input" name="HQty_New" id="HQty_New" value="0">
                                            </div>
                                        </div>
                                    </div>
                                    <div class="layui-row">
                                        <div class="layui-inline">
                                            <label class="layui-form-label">变更原因</label>
                                            <div class="layui-input-block">
                                                <input class="layui-input" name="HExplanation" id="HExplanation" autocomplete="off" style="width: 501px;">
                                            </div>
                                        </div>
                                        <div class="layui-inline">
                                            <label class="layui-form-label">备注</label>
                                            <div class="layui-input-block">
                                                <input class="layui-input" name="HRemark" id="HRemark" autocomplete="off" style="width: 501px;">
                                            </div>
                                        </div>
                                    </div>
@@ -119,12 +173,6 @@
                                                <select name="HOrgID" id="HOrgID" lay-verify="HOrgID">
                                                    <!--动态渲染组织-->
                                                </select>
                                            </div>
                                        </div>
                                        <div class="layui-inline">
                                            <label class="layui-form-label">备注</label>
                                            <div class="layui-input-block">
                                                <input class="layui-input" name="HRemark" id="HRemark" autocomplete="off" style="width: 501px;">
                                            </div>
                                        </div>
                                    </div>
@@ -220,7 +268,7 @@
                        </div>
                    </div>
                    <!--子表1-->
                    <table class="layui-hide" id="mainTable" lay-filter="mainTable"></table>
                    <!--<table class="layui-hide" id="mainTable" lay-filter="mainTable"></table>
                    <script type="text/html" id="toolbarDemo">
                        <div class="layui-btn-container">
                            <button type="button" class="layui-btn layui-btn-sm" lay-event="btn-AddLine"><i class="layui-icon layui-icon-form"></i>增加一行</button>
@@ -234,14 +282,14 @@
                    <script type="text/html" id="xuhao">
                        {{d.LAY_TABLE_INDEX+1}}
                    </script>
                    </script>-->
                </form>
            </div>
        </div>
    </div>
    <script type="text/html" id="barDemo">
    <!--<script type="text/html" id="barDemo">
        <a class="layui-btn layui-btn-danger layui-btn-xs" lay-event="del">删除</a>
    </script>
    </script>-->
    <script>
        //#region æŠ˜å æ³¨é‡Š
@@ -262,7 +310,7 @@
                , element = layui.element;
            //子表渲染参数
            var option = {};
            /*var option = {};*/
            //记录组织的值
            var HOrgIDBar = 0;
@@ -275,6 +323,7 @@
            var params = get_UrlVars();
            var OperationType = params[params[0]]; //从参数中获取 æ•°æ®ç±»åž‹  1添加 ä¿å­˜  2复制  3 ç¼–辑
            var linterid = params[params[1]]; //从参数中获取 å•据内码
            var HEntryID = params[params[4]]; //获取单据子id
            //#endregion
@@ -292,7 +341,7 @@
            else if (OperationType == 3) {                                                 //编辑
                $("#HInterID").val(linterid);
                //子表初始化
                set_InitGrid();
                //set_InitGrid();
                //加载表体和表体数据
                RoadBillMain(linterid);
            }
@@ -335,7 +384,7 @@
            //#region ä¿å­˜æŒ‰é’®
            form.on('submit(set_SaveBill)', function (data) {
                //if (AllowLoadData(data)) {
                    set_SaveBill(data);
                set_SaveBill(data);
                //}
            });
            //#endregion
@@ -353,73 +402,73 @@
            //#region å­è¡¨ç›¸å…³ç›‘听事件
            //#region å­è¡¨1:头工具栏按钮触发事件
            table.on('toolbar(mainTable)', function (obj) {
                var checkStatus = table.checkStatus('mainTable')
                    , data = checkStatus.data;;
            //table.on('toolbar(mainTable)', function (obj) {
            //    var checkStatus = table.checkStatus('mainTable')
            //        , data = checkStatus.data;;
                //新增行表格数据
                var NewRow = {
                    "HMaterID": "0",
                    "物料代码": "",
                    "物料名称": "",
                    "规格型号": "",
                    "HUnitID": "0",
                    "计量单位": "",
                    "HQty_Old": "0",
                    "HQty_New": "0",
                    //"HDate_Old": "",
                    //"HDate_New": "",
            //    //新增行表格数据
            //    var NewRow = {
            //        "HMaterID": "0",
            //        "物料代码": "",
            //        "物料名称": "",
            //        "规格型号": "",
            //        "HUnitID": "0",
            //        "计量单位": "",
            //        "HQty_Old": "0",
            //        "HQty_New": "0",
            //        //"HDate_Old": "",
            //        //"HDate_New": "",
                    "HRemark": "",
                    "HSourceInterID": "0",
                    "HSourceEntryID": "0",
                    "HSourceBillNo": "",
                    "HSourceBillType": ""
                };
                switch (obj.event) {
                    //新增一行
                    case 'btn-AddLine': btnAddLine(NewRow);
                        break;
                    //复制一行
                    case 'btn-CopyLine': btnCopyLine(data);
                        break;
                    //指定位置下插入一行
                    case 'btn-InsertLine': btnInsertLine(NewRow)
                        break;
                    //上移
                    case 'btn-Up': btn_up();
                        break;
                    //下移
                    case 'btn-Under': btn_under();
                        break;
                    //列设置
                    case 'set_HideColumn':
                        get_HideColumn();
                        break;
                }
            });
            //        "HRemark": "",
            //        "HSourceInterID": "0",
            //        "HSourceEntryID": "0",
            //        "HSourceBillNo": "",
            //        "HSourceBillType": ""
            //    };
            //    switch (obj.event) {
            //        //新增一行
            //        case 'btn-AddLine': btnAddLine(NewRow);
            //            break;
            //        //复制一行
            //        case 'btn-CopyLine': btnCopyLine(data);
            //            break;
            //        //指定位置下插入一行
            //        case 'btn-InsertLine': btnInsertLine(NewRow)
            //            break;
            //        //上移
            //        case 'btn-Up': btn_up();
            //            break;
            //        //下移
            //        case 'btn-Under': btn_under();
            //            break;
            //        //列设置
            //        case 'set_HideColumn':
            //            get_HideColumn();
            //            break;
            //    }
            //});
            //#endregion
            //#region è¡Œå†…事件
            table.on('tool(mainTable)', function (obj) {
                set_GridDelete(obj);   //行内删除
                set_GridCellCheck(obj); //行内快捷键筛选
                //设置 æ–°å®Œå·¥æ—¶é—´
                if (obj.event == 'HDate_New') {
                    var data = obj.data;
                    var field = $(this).data('field');
                    laydate.render({
                        elem: this.firstChild
                        , show: true //直接显示
                        , closeStop: this
                        , done: function (nowDate) {
                            //时间选择完成,行数据更新
                            data[field] = nowDate;
                            obj.update(data);
                        }
                    });
                }
            });
            //table.on('tool(mainTable)', function (obj) {
            //    set_GridDelete(obj);   //行内删除
            //    set_GridCellCheck(obj); //行内快捷键筛选
            //    //设置 æ–°å®Œå·¥æ—¶é—´
            //    if (obj.event == 'HDate_New') {
            //        var data = obj.data;
            //        var field = $(this).data('field');
            //        laydate.render({
            //            elem: this.firstChild
            //            , show: true //直接显示
            //            , closeStop: this
            //            , done: function (nowDate) {
            //                //时间选择完成,行数据更新
            //                data[field] = nowDate;
            //                obj.update(data);
            //            }
            //        });
            //    }
            //});
            //#endregion
            //#region ç›‘听单元格编辑  å•元格编辑后 å˜æ›´
@@ -530,59 +579,59 @@
            //#endregion
            //#region å­è¡¨1初始化
            function set_InitGrid() {
                option = {
                    elem: '#mainTable'
                    , toolbar: '#toolbarDemo'
                    , limit: 500
                    , height: 500
                    , loading: false
                    , cols: [[ //子表
                        { type: 'checkbox', totalRowText: '合计行' }
                        , { type: 'numbers', title: '序号', width: 100, totalRow: true }
                        , { field: 'HMaterID', title: 'HMaterID', width: 100, hide: true }
                        , { field: '物料代码', title: '物料代码', width: 150, edit: 'text', event: "HMaterID" }//f7
                        , { field: '物料名称', title: '物料名称', width: 150, }
                        , { field: '规格型号', title: '规格型号', width: 100, }
                        , { field: 'HUnitID', title: 'HUnitID', width: 100, hide: true }
                        , { field: '计量单位', title: '计量单位', width: 100 }//f7
                        , { field: 'HQty_Old', title: '原数量', width: 100}
                        , { field: 'HQty_New', title: '新数量', width: 100, edit: 'text' }
                        //, { field: 'HDate_Old', title: '原交货日期', edit: 'text', width: 120 }
                        //, { field: 'HDate_New', title: '新交货日期', event: "HDate_New", width: 120 }
                        , { field: 'HRemark', title: '备注', width: 100, edit: 'text' }
            //function set_InitGrid() {
            //    option = {
            //        elem: '#mainTable'
            //        , toolbar: '#toolbarDemo'
            //        , limit: 500
            //        , height: 500
            //        , loading: false
            //        , cols: [[ //子表
            //            { type: 'checkbox', totalRowText: '合计行' }
            //            , { type: 'numbers', title: '序号', width: 100, totalRow: true }
            //            , { field: 'HMaterID', title: 'HMaterID', width: 100, hide: true }
            //            , { field: '物料代码', title: '物料代码', width: 150, edit: 'text', event: "HMaterID" }//f7
            //            , { field: '物料名称', title: '物料名称', width: 150, }
            //            , { field: '规格型号', title: '规格型号', width: 100, }
            //            , { field: 'HUnitID', title: 'HUnitID', width: 100, hide: true }
            //            , { field: '计量单位', title: '计量单位', width: 100 }//f7
            //            , { field: 'HQty_Old', title: '原数量', width: 100}
            //            , { field: 'HQty_New', title: '新数量', width: 100, edit: 'text' }
            //            //, { field: 'HDate_Old', title: '原交货日期', edit: 'text', width: 120 }
            //            //, { field: 'HDate_New', title: '新交货日期', event: "HDate_New", width: 120 }
            //            , { field: 'HRemark', title: '备注', width: 100, edit: 'text' }
                        , { field: 'HSourceInterID', title: '源单内码', edit: 'text', hide: true, style: 'background-color: #f9f9f9;' }     //f7
                        , { field: 'HSourceEntryID', title: '源单子内码', edit: 'text', hide: true, style: 'background-color: #f9f9f9;' }     //f7
                        , { field: 'HSourceBillNo', title: '源单单号', edit: 'text', hide: true, style: 'background-color: #f9f9f9;' }     //f7
                        , { field: 'HSourceBillType', title: '源单类型', edit: 'text', hide: true, style: 'background-color: #f9f9f9;' }     //f7
            //            , { field: 'HSourceInterID', title: '源单内码', edit: 'text', hide: true, style: 'background-color: #f9f9f9;' }     //f7
            //            , { field: 'HSourceEntryID', title: '源单子内码', edit: 'text', hide: true, style: 'background-color: #f9f9f9;' }     //f7
            //            , { field: 'HSourceBillNo', title: '源单单号', edit: 'text', hide: true, style: 'background-color: #f9f9f9;' }     //f7
            //            , { field: 'HSourceBillType', title: '源单类型', edit: 'text', hide: true, style: 'background-color: #f9f9f9;' }     //f7
                        , { fixed: 'right', title: '操作', toolbar: '#barDemo', width: 70 }
                    ]]
                }
            //            , { fixed: 'right', title: '操作', toolbar: '#barDemo', width: 70 }
            //        ]]
            //    }
                var rowdata = [{
                    "HMaterID": "0",
                    "物料代码": "",
                    "物料名称": "",
                    "规格型号": "",
                    "HUnitID": "0",
                    "计量单位": "",
                    "HQty_Old": "0",
                    "HQty_New": "0",
                    //"HDate_Old": "",
                    //"HDate_New": "",
                //var rowdata = [{
                //    "HMaterID": "0",
                //    "物料代码": "",
                //    "物料名称": "",
                //    "规格型号": "",
                //    "HUnitID": "0",
                //    "计量单位": "",
                //    "HQty_Old": "0",
                //    "HQty_New": "0",
                //    //"HDate_Old": "",
                //    //"HDate_New": "",
                    "HRemark": "",
                    "HSourceInterID": "0",
                    "HSourceEntryID": "0",
                    "HSourceBillNo": "",
                    "HSourceBillType": ""
                }];
                //    "HRemark": "",
                //    "HSourceInterID": "0",
                //    "HSourceEntryID": "0",
                //    "HSourceBillNo": "",
                //    "HSourceBillType": ""
                //}];
                option.data = rowdata;
                table.render(option);
            }
            //    option.data = rowdata;
            //    table.render(option);
            //}
            //#endregion
            //#region æ–°å¢žé¡µé¢åˆå§‹åŒ–
@@ -599,8 +648,8 @@
                $("#HMakeDate").val(Format(new Date(), "yyyy-MM-dd"));
                //初始化并列设置:子表1
                set_InitGrid();
                DisPlay_HideColumn();
                //set_InitGrid();
                //DisPlay_HideColumn();
            }
            //#endregion
@@ -639,46 +688,56 @@
                                , "HInnerBillNo": data.HInnerBillNo
                                , "HMaker": data.制单人
                                , "HMakeDate": data.制单人 == "" ? "" :formatDate(data.制单日期)
                                , "HMakeDate": data.制单人 == "" ? "" : formatDate(data.制单日期)
                                , "HUpDater": data.修改人
                                , "HUpDateDate": data.修改人 == ""?"":formatDate(data.修改日期)
                                , "HUpDateDate": data.修改人 == "" ? "" : formatDate(data.修改日期)
                                , "HChecker": data.审核人
                                , "HCheckDate": data.审核人 == "" ? "" :formatDate(data.审核日期)
                                , "HCheckDate": data.审核人 == "" ? "" : formatDate(data.审核日期)
                                , "HCloseMan": data.关闭人
                                , "HCloseDate": data.关闭人 == "" ? "" :formatDate(data.关闭日期)
                                , "HCloseDate": data.关闭人 == "" ? "" : formatDate(data.关闭日期)
                                , "HDeleteMan": data.作废人
                                , "HDeleteDate": data.作废人 == "" ? "" :formatDate(data.作废日期)
                                , "HDeleteDate": data.作废人 == "" ? "" : formatDate(data.作废日期)
                                , "HMaterID": data.HMaterID
                                , "HMaterNumber": data.物料代码
                                , "HMaterName": data.物料名称
                                , "HMaterModel": data.规格型号
                                , "HUnitID": data.HUnitID
                                , "HUnitName": data.计量单位
                                , "HQty_Old": data.原数量
                                , "HQty_New": data.新数量
                            });
                            //组织的值HOrgID变化,重新渲染
                            HOrgIDBar = data.HOrgID;
                            //子表  èµ‹å€¼
                            var rowdata = [];
                            for (var i = 0; i < result.data.length; i++) {
                                rowdata.push(
                                    {
                                        "HMaterID": result.data[i]["HMaterID"],
                                        "物料代码": result.data[i]["物料代码"],
                                        "物料名称": result.data[i]["物料名称"],
                                        "规格型号": result.data[i]["规格型号"],
                                        "HUnitID": result.data[i]["HUnitID"],
                                        "计量单位": result.data[i]["计量单位"],
                                        "HQty_Old": result.data[i]["原数量"],
                                        "HQty_New": result.data[i]["新数量"],
                                        //"HDate_Old": formatDate(result.data[i]["原交货日期"]),
                                        //"HDate_New": formatDate(result.data[i]["新交货日期"]),
                                        "HRemark": result.data[i]["表体备注"],
                                        "HSourceInterID": result.data[i]["HSourceInterID"],
                                        "HSourceEntryID": result.data[i]["HSourceEntryID"],
                                        "HSourceBillNo": result.data[i]["HSourceBillNo"],
                                        "HSourceBillType": result.data[i]["HSourceBillType"]
                                    }
                                );
                            }
                            option.data = rowdata;
                            //var rowdata = [];
                            //for (var i = 0; i < result.data.length; i++) {
                            //    rowdata.push(
                            //        {
                            //            "HMaterID": result.data[i]["HMaterID"],
                            //            "物料代码": result.data[i]["物料代码"],
                            //            "物料名称": result.data[i]["物料名称"],
                            //            "规格型号": result.data[i]["规格型号"],
                            //            "HUnitID": result.data[i]["HUnitID"],
                            //            "计量单位": result.data[i]["计量单位"],
                            //            "HQty_Old": result.data[i]["原数量"],
                            //            "HQty_New": result.data[i]["新数量"],
                            //            //"HDate_Old": formatDate(result.data[i]["原交货日期"]),
                            //            //"HDate_New": formatDate(result.data[i]["新交货日期"]),
                            //            "HRemark": result.data[i]["表体备注"],
                            //            "HSourceInterID": result.data[i]["HSourceInterID"],
                            //            "HSourceEntryID": result.data[i]["HSourceEntryID"],
                            //            "HSourceBillNo": result.data[i]["HSourceBillNo"],
                            //            "HSourceBillType": result.data[i]["HSourceBillType"]
                            //        }
                            //    );
                            //}
                            //option.data = rowdata;
                            table.render(option);
                            //table.render(option);
                            layer.close(ajaxLoad);
                        } else {
                            layer.close(ajaxLoad);
@@ -703,13 +762,13 @@
                $("#HMakeDate").val(Format(new Date(), "yyyy-MM-dd"));
                //初始化并列设置:子表1
                set_InitGrid();
                DisPlay_HideColumn();
                //set_InitGrid();
                //DisPlay_HideColumn();
                //查询生产订单是否存在
                var ajaxLoad = layer.load();
                var sWhere = " and HPRDORGID=" + sessionStorage["OrganizationID"] + "  and hmainid='" + linterid + "'";
                var sWhere = " and HPRDORGID=" + sessionStorage["OrganizationID"] + "  and hmainid='" + linterid + "' and HEntryID=" + HEntryID;
                $.ajax({
                    url: GetWEBURL() + "/LEMS/MES_IF_ICMOBillList_Json",
                    type: "GET",
@@ -723,7 +782,11 @@
                            form.val("component-form-group", { //formTest å³ class="layui-form" æ‰€åœ¨å…ƒç´ å±žæ€§ lay-filter="" å¯¹åº”的值
                                "HEmpID": data.HEmpID
                                , "HEmpName": data.销售员
                                , "HEmpName": data.业务员
                                , "HDeptID": data.HDeptID
                                , "HDeptName": data.生产车间
                                , "HCusID": data.HEntryCusID
                                , "HCusName": data.客户
                                //, "HDeptID": data.HDeptID
                                //, "HDeptName": data.生产车间
@@ -731,39 +794,50 @@
                                //, "HCusName": data.客户
                                , "HMainSourceInterID": linterid
                                , "HMainSourceEntryID": HEntryID
                                , "HMainSourceBillNo": data.单据号
                                , "HMainSourceBillType": params[params[2]]
                                , "HMaterID": data.HMaterID
                                , "HMaterNumber": data.产品代码
                                , "HMaterName": data.产品名称
                                , "HMaterModel": data.规格型号
                                , "HUnitID": data.HUnitID
                                , "HUnitName": data.计量单位
                                , "HQty_Old": data.生产任务单数量
                                , "HQty_New": data.生产任务单数量
                            });
                            //组织的值HOrgID变化,重新渲染
                            HOrgIDBar = data.HOrgID;
                            //子表  èµ‹å€¼
                            var rowdata = [];
                            for (var i = 0; i < result.data.length; i++) {
                                rowdata.push(
                                    {
                                        "HMaterID": result.data[i]["HMaterID"],
                                        "物料代码": result.data[i]["产品代码"],
                                        "物料名称": result.data[i]["产品名称"],
                                        "规格型号": result.data[i]["规格型号"],
                                        "HUnitID": result.data[i]["HUnitID"],
                                        "计量单位": result.data[i]["计量单位"],
                                        "HQty_Old": result.data[i]["生产任务单数量"],
                                        "HQty_New": result.data[i]["生产任务单数量"],
                                        //"HDate_Old": formatDate(result.data[i]["原交货日期"]),
                                        //"HDate_New": formatDate(result.data[i]["新交货日期"]),
                                        "HRemark": "",
                                        "HSourceInterID": result.data[i]["hmainid"],
                                        "HSourceEntryID": result.data[i]["HEntryID"],
                                        "HSourceBillNo": result.data[i]["单据号"],
                                        "HSourceBillType": result.data[i]["单据类型"]
                                    }
                                );
                            }
                            option.data = rowdata;
                            //var rowdata = [];
                            //for (var i = 0; i < result.data.length; i++) {
                            //    rowdata.push(
                            //        {
                            //            "HMaterID": result.data[i]["HMaterID"],
                            //            "物料代码": result.data[i]["产品代码"],
                            //            "物料名称": result.data[i]["产品名称"],
                            //            "规格型号": result.data[i]["规格型号"],
                            //            "HUnitID": result.data[i]["HUnitID"],
                            //            "计量单位": result.data[i]["计量单位"],
                            //            "HQty_Old": result.data[i]["生产任务单数量"],
                            //            "HQty_New": result.data[i]["生产任务单数量"],
                            //            //"HDate_Old": formatDate(result.data[i]["原交货日期"]),
                            //            //"HDate_New": formatDate(result.data[i]["新交货日期"]),
                            //            "HRemark": "",
                            //            "HSourceInterID": result.data[i]["hmainid"],
                            //            "HSourceEntryID": result.data[i]["HEntryID"],
                            //            "HSourceBillNo": result.data[i]["单据号"],
                            //            "HSourceBillType": result.data[i]["单据类型"]
                            //        }
                            //    );
                            //}
                            //option.data = rowdata;
                            table.render(option);
                            //table.render(option);
                            layer.close(ajaxLoad);
                        } else {
                            layer.close(ajaxLoad);
@@ -860,7 +934,7 @@
            function set_SaveBill(data) {
                //记录操作类型
                var refSav = "";
                if (OperationType == 1 || OperationType == 2 || OperationType==4) {
                if (OperationType == 1 || OperationType == 2 || OperationType == 4) {
                    refSav = "Add";
                    data.field.HChangeDate = new Date();
                }
@@ -876,9 +950,30 @@
                    $("#HUpDater").val(sessionStorage["HUserName"]);
                    $("#HUpDateDate").val(Format(new Date(), "yyyy-MM-dd"));
                }
                //序列化表头信息和子表信息
                var subTable = [{
                    "HMaterID": $("#HMaterID").val(),
                    "物料代码": $("#HMaterNumber").val(),
                    "物料名称": $("#HMaterName").val(),
                    "规格型号": $("#HMaterModel").val(),
                    "HUnitID":  $("#HUnitID").val(),
                    "计量单位": $("#HUnitName").val(),
                    "HQty_Old": $("#HQty_Old").val(),
                    "HQty_New": $("#HQty_New").val(),
                    //"HDate_Old": "",
                    //"HDate_New": "",
                    "HRemark": "",
                    "HSourceInterID": "0",
                    "HSourceEntryID": "0",
                    "HSourceBillNo": "",
                    "HSourceBillType": ""
                }];
                var sMainStr = JSON.stringify(data.field);
                var sSubStr = JSON.stringify(option.data);
                //var sSubStr = JSON.stringify(option.data);
                var sSubStr = JSON.stringify(subTable);
                //拼接参数
                var sMainSub = sMainStr + ';' + sSubStr + ';' + refSav + ";" + sessionStorage["HUserName"];
@@ -969,7 +1064,7 @@
                if (temp == 0 || temp == "") {
                    layer.msg("汇率不能为0或空!");
                    return false;
                } else if (!ref.test(temp)){
                } else if (!ref.test(temp)) {
                    layer.msg("汇率请输入大于0的数字!");
                    return false;
                }
@@ -1124,333 +1219,333 @@
            //#endregion
            //#region åœ¨æœ«å°¾å¢žåŠ ä¸€è¡Œ
            function btnAddLine(NewRow) {
                table.cache["mainTable"].push(NewRow);
                option.data = table.cache["mainTable"];
                table.render(option);
                //rows++;
                layer.msg('增加一行按钮!')
            }
            //function btnAddLine(NewRow) {
            //    table.cache["mainTable"].push(NewRow);
            //    option.data = table.cache["mainTable"];
            //    table.render(option);
            //    //rows++;
            //    layer.msg('增加一行按钮!')
            //}
            //#endregion
            //#region åœ¨æŒ‡å®šè¡Œä¸‹æ’入一行
            function btnInsertLine(NewRow) {
                var checkStatus = table.checkStatus('mainTable')
                    , data = checkStatus.data;
                if (checkStatus.data.length === 1) {
                    var tables = [];                                    //存储插入一行后的表格数据
                    //获取表格的全部行
                    var rowList = table.cache['mainTable'];
                    for (var i = 0; i < rowList.length; i++) {          //遍历表格的行
                        tables.push(option.data[i]);
                        if (rowList[i].LAY_CHECKED == true) {           //获取选中行的位置
                            tables.push(NewRow);
                        }
                    }
                    option.data = tables;
                    table.render(option);
                } else {
                    layer.msg('请选择一行数据编辑!');
                }
            }
            //function btnInsertLine(NewRow) {
            //    var checkStatus = table.checkStatus('mainTable')
            //        , data = checkStatus.data;
            //    if (checkStatus.data.length === 1) {
            //        var tables = [];                                    //存储插入一行后的表格数据
            //        //获取表格的全部行
            //        var rowList = table.cache['mainTable'];
            //        for (var i = 0; i < rowList.length; i++) {          //遍历表格的行
            //            tables.push(option.data[i]);
            //            if (rowList[i].LAY_CHECKED == true) {           //获取选中行的位置
            //                tables.push(NewRow);
            //            }
            //        }
            //        option.data = tables;
            //        table.render(option);
            //    } else {
            //        layer.msg('请选择一行数据编辑!');
            //    }
            //}
            //#endregion
            //#region å¤åˆ¶ä¸€è¡Œ
            function btnCopyLine(data) {
                var copydata = JSON.stringify(data);
                if (data.length <= 0) {
                    layer.msg("请选择需要复制的一行!");
                }
                else if (data.length > 1) {
                    layer.msg("只能选择复制一行!");
                }
                else {
                    var copydata2 = copydata.substring(1, copydata.length);//去除首行字符'['
                    var copyrow = copydata2.substring(0, copydata2.length - 1);//去除末尾字符']'
                    table.cache["mainTable"].push(JSON.parse(copyrow));//将复制的行强转成json追加到表格上
                    option.data = table.cache["mainTable"];//将数据绑定到data上
                    //设置复制得到的记录的实际称重为0
                    option.data[option.data.length - 1].HWeight = "0";
            //function btnCopyLine(data) {
            //    var copydata = JSON.stringify(data);
            //    if (data.length <= 0) {
            //        layer.msg("请选择需要复制的一行!");
            //    }
            //    else if (data.length > 1) {
            //        layer.msg("只能选择复制一行!");
            //    }
            //    else {
            //        var copydata2 = copydata.substring(1, copydata.length);//去除首行字符'['
            //        var copyrow = copydata2.substring(0, copydata2.length - 1);//去除末尾字符']'
            //        table.cache["mainTable"].push(JSON.parse(copyrow));//将复制的行强转成json追加到表格上
            //        option.data = table.cache["mainTable"];//将数据绑定到data上
            //        //设置复制得到的记录的实际称重为0
            //        option.data[option.data.length - 1].HWeight = "0";
                    table.render(option);//将数据渲染到表格上
                }
            }
            //        table.render(option);//将数据渲染到表格上
            //    }
            //}
            //#endregion
            //#region ä¸Šç§»
            function btn_up() {
                var checkStatus = table.checkStatus('mainTable')
                    , data = checkStatus.data;
                if (data.length == 1) {
                    var tables = [];
                    //获取表格的全部行
                    var rowList = table.cache['mainTable'];
                    for (var i = 0; i < rowList.length; i++) {          //遍历表格的行
                        if (rowList[i].LAY_CHECKED == true) {           //获取选中行的位置
                            //如果是第一行上移,则失败并提醒
                            if (i == 0) {
                                layer.msg("第一行数据无法上移!");
                                return;
                            }
                            tables.push(option.data[i - 1]);
                            data[0].LAY_CHECKED = true;
                            option.data[i - 1] = data[0];
                            option.data[i] = tables[0];
                            table.render(option);
                            break;
                        }
                    }
                } else {
                    layer.msg("请选择一行数据!");
                }
            }
            //function btn_up() {
            //    var checkStatus = table.checkStatus('mainTable')
            //        , data = checkStatus.data;
            //    if (data.length == 1) {
            //        var tables = [];
            //        //获取表格的全部行
            //        var rowList = table.cache['mainTable'];
            //        for (var i = 0; i < rowList.length; i++) {          //遍历表格的行
            //            if (rowList[i].LAY_CHECKED == true) {           //获取选中行的位置
            //                //如果是第一行上移,则失败并提醒
            //                if (i == 0) {
            //                    layer.msg("第一行数据无法上移!");
            //                    return;
            //                }
            //                tables.push(option.data[i - 1]);
            //                data[0].LAY_CHECKED = true;
            //                option.data[i - 1] = data[0];
            //                option.data[i] = tables[0];
            //                table.render(option);
            //                break;
            //            }
            //        }
            //    } else {
            //        layer.msg("请选择一行数据!");
            //    }
            //}
            //#endregion
            //#region ä¸‹ç§»
            function btn_under() {
                var checkStatus = table.checkStatus('mainTable')
                    , data = checkStatus.data;
                if (data.length == 1) {
                    var tables = [];
                    //获取表格的全部行
                    var rowList = table.cache['mainTable'];
                    for (var i = 0; i < rowList.length; i++) {          //遍历表格的行
                        if (rowList[i].LAY_CHECKED == true) {           //获取选中行的位置
                            //如果是最后一行下移,则失败并提醒
                            if (i == option.data.length - 1) {
                                layer.msg("最后一行数据无法下移!");
                                return;
                            }
            //function btn_under() {
            //    var checkStatus = table.checkStatus('mainTable')
            //        , data = checkStatus.data;
            //    if (data.length == 1) {
            //        var tables = [];
            //        //获取表格的全部行
            //        var rowList = table.cache['mainTable'];
            //        for (var i = 0; i < rowList.length; i++) {          //遍历表格的行
            //            if (rowList[i].LAY_CHECKED == true) {           //获取选中行的位置
            //                //如果是最后一行下移,则失败并提醒
            //                if (i == option.data.length - 1) {
            //                    layer.msg("最后一行数据无法下移!");
            //                    return;
            //                }
                            tables.push(option.data[i + 1]);
                            data[0].LAY_CHECKED = true;
                            option.data[i + 1] = data[0];
                            option.data[i] = tables[0];
                            table.render(option);
                            break;
                        }
                    }
                } else {
                    layer.msg("请选择一行数据!");
                }
            }
            //                tables.push(option.data[i + 1]);
            //                data[0].LAY_CHECKED = true;
            //                option.data[i + 1] = data[0];
            //                option.data[i] = tables[0];
            //                table.render(option);
            //                break;
            //            }
            //        }
            //    } else {
            //        layer.msg("请选择一行数据!");
            //    }
            //}
            //#endregion
            //#region è¡¨æ ¼è¡Œå†…事件删除
            function set_GridDelete(obj) {
                var data = obj.data;
                var rowIndex = $(obj.tr).attr("data-index");
                if (obj.event === 'del') {
                    layer.confirm('真的删除行么', function (index) {
                        console.log("索引为:" + rowIndex);
                        if (rowIndex === '0') {
                            layer.msg('首行无法删除!!!');
                        } else {
                            //obj.del();
                            //layer.close(index);
                            var oldData = table.cache["mainTable"];
                            oldData.splice(obj.tr.data('index'), 1);
                            option.data = oldData;
                            table.render(option);
                            layer.close(index);
                        }
                    });
                }
            }
            //function set_GridDelete(obj) {
            //    var data = obj.data;
            //    var rowIndex = $(obj.tr).attr("data-index");
            //    if (obj.event === 'del') {
            //        layer.confirm('真的删除行么', function (index) {
            //            console.log("索引为:" + rowIndex);
            //            if (rowIndex === '0') {
            //                layer.msg('首行无法删除!!!');
            //            } else {
            //                //obj.del();
            //                //layer.close(index);
            //                var oldData = table.cache["mainTable"];
            //                oldData.splice(obj.tr.data('index'), 1);
            //                option.data = oldData;
            //                table.render(option);
            //                layer.close(index);
            //            }
            //        });
            //    }
            //}
            //#endregion
            //#region è¡Œå†…快捷键筛选
            function set_GridCellCheck(obj) {
                $(document).off('keydown', ".layui-table-edit").on('keydown', '.layui-table-edit', function (e) {
                    if (event.key == "F7") {
                        //物料
                        if (obj.event == "HMaterID") {
                            layer.open({
                                type: 2
                                , skin: "layui-layer-rim" //加上边框
                                , title: "物料列表"  //标题
                                , closeBtn: 1  //窗体右上角关闭 çš„ æ ·å¼
                                , shift: 2 //弹出动画
                                , area: ["90%", "90%"] //窗体大小
                                , maxmin: true //设置最大最小按钮是否显示
                                , content: ['../../Baseset/基础资料/Gy_MaterialList.html', 'yes']
                                , btn: ["确定", "取消"]
                                , btn1: function (index, laero) {
                                    //按钮一  çš„回调
                                    var iframeWindow = window["layui-layer-iframe" + index];//获取弹框页面
                                    var checkStatus = iframeWindow.layui.table.checkStatus("mainTable");//获取选中的数据
            //function set_GridCellCheck(obj) {
            //    $(document).off('keydown', ".layui-table-edit").on('keydown', '.layui-table-edit', function (e) {
            //        if (event.key == "F7") {
            //            //物料
            //            if (obj.event == "HMaterID") {
            //                layer.open({
            //                    type: 2
            //                    , skin: "layui-layer-rim" //加上边框
            //                    , title: "物料列表"  //标题
            //                    , closeBtn: 1  //窗体右上角关闭 çš„ æ ·å¼
            //                    , shift: 2 //弹出动画
            //                    , area: ["90%", "90%"] //窗体大小
            //                    , maxmin: true //设置最大最小按钮是否显示
            //                    , content: ['../../Baseset/基础资料/Gy_MaterialList.html', 'yes']
            //                    , btn: ["确定", "取消"]
            //                    , btn1: function (index, laero) {
            //                        //按钮一  çš„回调
            //                        var iframeWindow = window["layui-layer-iframe" + index];//获取弹框页面
            //                        var checkStatus = iframeWindow.layui.table.checkStatus("mainTable");//获取选中的数据
                                    if (checkStatus.data.length != 1) {
                                        return layer.msg("请选择一条数据");
                                    }
            //                        if (checkStatus.data.length != 1) {
            //                            return layer.msg("请选择一条数据");
            //                        }
                                    //更新表格缓存的数据
                                    obj.update({
                                        "HMaterID": checkStatus.data[0].HItemID
                                        , "物料代码": checkStatus.data[0].HNumber
                                        , "物料名称": checkStatus.data[0].HName
                                        , "规格型号": checkStatus.data[0].HModel
                                        , "HUnitID": checkStatus.data[0].HUnitID
                                        , "计量单位": checkStatus.data[0].HUnitName
                                    })
                                    layer.close(index);//关闭弹窗
                                }
                            })
                        }
                        //计量单位
                        if (obj.event == "HUnitID") {
                            layer.open({
                                type: 2
                                , skin: "layui-layer-rim" //加上边框
                                , title: "计量单位列表"  //标题
                                , closeBtn: 1  //窗体右上角关闭 çš„ æ ·å¼
                                , shift: 2 //弹出动画
                                , area: ["90%", "90%"] //窗体大小
                                , maxmin: true //设置最大最小按钮是否显示
                                , content: ['../../Baseset/基础资料/Gy_UnitList.html', 'yes']
                                , btn: ["确定", "取消"]
                                , btn1: function (index, laero) {
                                    //按钮一  çš„回调
                                    var iframeWindow = window["layui-layer-iframe" + index];//获取弹框页面
                                    var checkStatus = iframeWindow.layui.table.checkStatus("mainTable");//获取选中的数据
            //                        //更新表格缓存的数据
            //                        obj.update({
            //                            "HMaterID": checkStatus.data[0].HItemID
            //                            , "物料代码": checkStatus.data[0].HNumber
            //                            , "物料名称": checkStatus.data[0].HName
            //                            , "规格型号": checkStatus.data[0].HModel
            //                            , "HUnitID": checkStatus.data[0].HUnitID
            //                            , "计量单位": checkStatus.data[0].HUnitName
            //                        })
            //                        layer.close(index);//关闭弹窗
            //                    }
            //                })
            //            }
            //            //计量单位
            //            if (obj.event == "HUnitID") {
            //                layer.open({
            //                    type: 2
            //                    , skin: "layui-layer-rim" //加上边框
            //                    , title: "计量单位列表"  //标题
            //                    , closeBtn: 1  //窗体右上角关闭 çš„ æ ·å¼
            //                    , shift: 2 //弹出动画
            //                    , area: ["90%", "90%"] //窗体大小
            //                    , maxmin: true //设置最大最小按钮是否显示
            //                    , content: ['../../Baseset/基础资料/Gy_UnitList.html', 'yes']
            //                    , btn: ["确定", "取消"]
            //                    , btn1: function (index, laero) {
            //                        //按钮一  çš„回调
            //                        var iframeWindow = window["layui-layer-iframe" + index];//获取弹框页面
            //                        var checkStatus = iframeWindow.layui.table.checkStatus("mainTable");//获取选中的数据
                                    if (checkStatus.data.length != 1) {
                                        return layer.msg("请选择一条数据");
                                    }
                                    //更新表格缓存的数据
                                    obj.update({
                                        "计量单位": checkStatus.data[0].HName
                                        , "HUnitID": checkStatus.data[0].HItemID
                                    })
                                    layer.close(index);//关闭弹窗
                                }
                            })
                        }
                        obj.event = "";
                        return false;
                    }
                })
            }
            //                        if (checkStatus.data.length != 1) {
            //                            return layer.msg("请选择一条数据");
            //                        }
            //                        //更新表格缓存的数据
            //                        obj.update({
            //                            "计量单位": checkStatus.data[0].HName
            //                            , "HUnitID": checkStatus.data[0].HItemID
            //                        })
            //                        layer.close(index);//关闭弹窗
            //                    }
            //                })
            //            }
            //            obj.event = "";
            //            return false;
            //        }
            //    })
            //}
            //#endregion
            //#region å­è¡¨1:隐藏列设置
            function get_HideColumn() {
                var colName = "";
                var contentUrl = "";
                for (var i = 1; i < option.cols[0].length - 1; i++) {
                    colName += option.cols[0][i]["title"] + ",";
                }
                var urlStr = window.document.location.pathname;//获取文件路径
                var urlLen = urlStr.split('/');
                for (var i = 0; i < urlLen.length - 4; i++) {
                    contentUrl += "../";
                }
                colName = encodeURI(colName.substring(0, colName.length - 1));//对 URI è¿›è¡Œç¼–码
            //function get_HideColumn() {
            //    var colName = "";
            //    var contentUrl = "";
            //    for (var i = 1; i < option.cols[0].length - 1; i++) {
            //        colName += option.cols[0][i]["title"] + ",";
            //    }
            //    var urlStr = window.document.location.pathname;//获取文件路径
            //    var urlLen = urlStr.split('/');
            //    for (var i = 0; i < urlLen.length - 4; i++) {
            //        contentUrl += "../";
            //    }
            //    colName = encodeURI(colName.substring(0, colName.length - 1));//对 URI è¿›è¡Œç¼–码
                contentUrl += '基础资料/隐藏列设置/Gy_GridView_Hide.html?HModName=' + HModName + '&colName=' + colName;
            //    contentUrl += '基础资料/隐藏列设置/Gy_GridView_Hide.html?HModName=' + HModName + '&colName=' + colName;
                layer.open({
                    type: 2
                    , skin: "layui-layer-rim" //加上边框
                    , title: "隐藏列设置"  //标题
                    , closeBtn: 1  //窗体右上角关闭 çš„ æ ·å¼
                    , shift: 2 //弹出动画
                    , area: ["50%", "90%"] //窗体大小
                    , maxmin: true //设置最大最小按钮是否显示
                    , content: [contentUrl, "yes"]
                    , btn: ["确定", "取消"]
                    , btn1: function (index, laero) {
                        //刷新表格数据
                        DisPlay_HideColumn();
                        //更新表格缓存的数据
                        layer.close(index);//关闭弹窗
                    }
                })
            }
            //    layer.open({
            //        type: 2
            //        , skin: "layui-layer-rim" //加上边框
            //        , title: "隐藏列设置"  //标题
            //        , closeBtn: 1  //窗体右上角关闭 çš„ æ ·å¼
            //        , shift: 2 //弹出动画
            //        , area: ["50%", "90%"] //窗体大小
            //        , maxmin: true //设置最大最小按钮是否显示
            //        , content: [contentUrl, "yes"]
            //        , btn: ["确定", "取消"]
            //        , btn1: function (index, laero) {
            //            //刷新表格数据
            //            DisPlay_HideColumn();
            //            //更新表格缓存的数据
            //            layer.close(index);//关闭弹窗
            //        }
            //    })
            //}
            //#endregion
            //#region å­è¡¨1:显示列数据
            function DisPlay_HideColumn() {
                $.ajax({
                    url: GetWEBURL() + '/Xt_grdAlignment_WMES/grdAlignmentWMESList',
                    type: "GET",
                    data: { "HModName": HModName, "user": sessionStorage["HUserName"] },
                    async: false,
                    success: function (data1) {
                        if (data1.data.length != 0) {
                            var dataCol = [];//数据库查询出的列数据
                            var titleData = ["HMaterID", "HUnitID", "源单内码", "源单子内码", "源单单号", "源单类型"];//不需要显示的字段 å¯æ‰©å±•
                            //titleData = [];
            //function DisPlay_HideColumn() {
            //    $.ajax({
            //        url: GetWEBURL() + '/Xt_grdAlignment_WMES/grdAlignmentWMESList',
            //        type: "GET",
            //        data: { "HModName": HModName, "user": sessionStorage["HUserName"] },
            //        async: false,
            //        success: function (data1) {
            //            if (data1.data.length != 0) {
            //                var dataCol = [];//数据库查询出的列数据
            //                var titleData = ["HMaterID", "HUnitID", "源单内码", "源单子内码", "源单单号", "源单类型"];//不需要显示的字段 å¯æ‰©å±•
            //                //titleData = [];
                            dataCol = data1.data[0].HGridString.split(',');
            //                dataCol = data1.data[0].HGridString.split(',');
                            for (var i = 0; i < option.cols[0].length - 2; i++) {
                                var dataCols = dataCol[i].split('|');
                                //隐藏列
                                if (dataCols[1] == 1) {
                                    option.cols[0][i + 1]["hide"] = true;
                                }
                                //设置列宽
                                if (dataCols[3] > 0) {
                                    option.cols[0][i + 1]["width"] = dataCols[3];
                                }
                                //设置内容字体大小
                                if (data1.data[0].HFontSize != 0) {
                                    option.cols[0][i + 1]["style"] += "font-size:" + data1.data[0].HFontSize + "px;";
                                } else {
                                    option.cols[0][i + 1]["style"] += "font-size:100%";
                                }
                                //设置列宽
                                //if (data1.data[0].HColumnWidth != 0) {
                                //    option.cols[0][i + 1]["width"] = data1.data[0].HColumnWidth + "px;";
                                //} else {
                                //    option.cols[0][i + 1]["width"] = "";
                                //}
                                //显示列
                                if (dataCols[1] == 0 && $.inArray(option.cols[0][i + 1]["title"], titleData) == -1) {
                                    option.cols[0][i + 1]["hide"] = false;
                                }
                                //字体所在位置(å·¦ å±…中 å³)
                                switch (dataCols[2]) {
                                    case "L":
                                        option.cols[0][i + 1]["align"] = "left";
                                        break;
                                    case "M":
                                        option.cols[0][i + 1]["align"] = "center";
                                        break;
                                    case "R":
                                        option.cols[0][i + 1]["align"] = "right";
                                        break;
                                }
                            }
            //                for (var i = 0; i < option.cols[0].length - 2; i++) {
            //                    var dataCols = dataCol[i].split('|');
            //                    //隐藏列
            //                    if (dataCols[1] == 1) {
            //                        option.cols[0][i + 1]["hide"] = true;
            //                    }
            //                    //设置列宽
            //                    if (dataCols[3] > 0) {
            //                        option.cols[0][i + 1]["width"] = dataCols[3];
            //                    }
            //                    //设置内容字体大小
            //                    if (data1.data[0].HFontSize != 0) {
            //                        option.cols[0][i + 1]["style"] += "font-size:" + data1.data[0].HFontSize + "px;";
            //                    } else {
            //                        option.cols[0][i + 1]["style"] += "font-size:100%";
            //                    }
            //                    //设置列宽
            //                    //if (data1.data[0].HColumnWidth != 0) {
            //                    //    option.cols[0][i + 1]["width"] = data1.data[0].HColumnWidth + "px;";
            //                    //} else {
            //                    //    option.cols[0][i + 1]["width"] = "";
            //                    //}
            //                    //显示列
            //                    if (dataCols[1] == 0 && $.inArray(option.cols[0][i + 1]["title"], titleData) == -1) {
            //                        option.cols[0][i + 1]["hide"] = false;
            //                    }
            //                    //字体所在位置(å·¦ å±…中 å³)
            //                    switch (dataCols[2]) {
            //                        case "L":
            //                            option.cols[0][i + 1]["align"] = "left";
            //                            break;
            //                        case "M":
            //                            option.cols[0][i + 1]["align"] = "center";
            //                            break;
            //                        case "R":
            //                            option.cols[0][i + 1]["align"] = "right";
            //                            break;
            //                    }
            //                }
                            //取消冻结列
                            for (var i = 1; i < option.cols[0].length - 1; i++) {
                                if (option.cols[0][i]["fixed"] != null) {
                                    option.cols[0][i]["fixed"] = null;
                                }
                                else {
                                    break;
                                }
                            }
                            //冻结列
                            if (data1.data[0].HFixCols != 0) {
                                for (var i = 0; i < data1.data[0].HFixCols; i++) {
                                    if ($.inArray(option.cols[0][i + 1]["title"], titleData) != -1) {
                                        data1.data[0].HFixCols += 1;
                                    }
                                    option.cols[0][i + 1]["fixed"] = "left";
                                }
                            }
                            table.render(option);
                        } else {
                            table.render(option);
                        }
                    }, error: function () {
                        layer.alert("接口请求失败!", { icon: 5 });
                    }
                })
            }
            //                //取消冻结列
            //                for (var i = 1; i < option.cols[0].length - 1; i++) {
            //                    if (option.cols[0][i]["fixed"] != null) {
            //                        option.cols[0][i]["fixed"] = null;
            //                    }
            //                    else {
            //                        break;
            //                    }
            //                }
            //                //冻结列
            //                if (data1.data[0].HFixCols != 0) {
            //                    for (var i = 0; i < data1.data[0].HFixCols; i++) {
            //                        if ($.inArray(option.cols[0][i + 1]["title"], titleData) != -1) {
            //                            data1.data[0].HFixCols += 1;
            //                        }
            //                        option.cols[0][i + 1]["fixed"] = "left";
            //                    }
            //                }
            //                table.render(option);
            //            } else {
            //                table.render(option);
            //            }
            //        }, error: function () {
            //            layer.alert("接口请求失败!", { icon: 5 });
            //        }
            //    })
            //}
            //#endregion