duhe
2024-03-07 fe1d21e8d95e069b28d15a4865f6bd7604366d95
生产订单下查:增加生产订单变更单
2个文件已修改
219 ■■■■■ 已修改文件
WebTM/Properties/PublishProfiles/JFTM.pubxml.user 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
WebTM/views/生产管理/生产任务单/Sc_ICMOBillList_LookDown.html 217 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WebTM/Properties/PublishProfiles/JFTM.pubxml.user
@@ -4065,7 +4065,7 @@
      <publishTime>03/06/2024 13:31:55</publishTime>
    </File>
    <File Include="views/生产管理/生产任务单/Sc_ICMOBillList_LookDown.html">
      <publishTime>01/05/2024 13:27:32</publishTime>
      <publishTime>03/07/2024 10:26:24</publishTime>
    </File>
    <File Include="views/生产管理/生产停工单/Sc_Add_MESStopWorkBillList - å¤åˆ¶.html">
      <publishTime>04/11/2023 16:34:43</publishTime>
WebTM/views/Éú²ú¹ÜÀí/Éú²úÈÎÎñµ¥/Sc_ICMOBillList_LookDown.html
@@ -29,6 +29,7 @@
                            <li lay-id="2" style="padding: 1px; width: 200px;">指引卡完工单</li>
                            <li lay-id="2" style="padding: 1px; width: 200px;">工序流转卡</li>
                            <li lay-id="2" style="padding: 1px; width: 200px;">生产领料单</li>
                            <li lay-id="2" style="padding: 1px; width: 200px;">生产订单变更单</li>
                        </ul>
                        <div class="layui-tab-content">
                            <!--工序进站接收单-->
@@ -85,6 +86,15 @@
                                    </div>
                                </script>
                            </div>
                            <!--生产订单变更单-->
                            <div class="layui-tab-item">
                                <table class="layui-hide" id="mainTable6" lay-filter="mainTable6"></table>
                                <script type="text/html" id="toolbarDemo6">
                                    <div class="layui-btn-container">
                                        <button type="button" class="layui-btn layui-btn-sm" lay-event="set_HideColumn6"><i class="layui-icon layui-icon-form"></i>列设置</button>
                                    </div>
                                </script>
                            </div>
                        </div>
                    </div>
                </form>
@@ -120,6 +130,7 @@
        var option3 = {};
        var option4 = {};
        var option5 = {};
        var option6 = {};
        //子表不需要显示的字段
        var titleData0 = ["hmainid", "HProcID", "HMaterID", "HEmpID", "HSourceID", "HGroupID", "HInterID", "HProcExchInterID", "HProcExchEntryID", "HICMOInterID", "HICMOEntryID"];
@@ -128,6 +139,7 @@
        var titleData3 = ["hmainid", "HProcID", "HMaterID", "HEmpID", "HSourceID", "HGroupID", "HInterID", "HProcExchInterID", "HProcExchEntryID", "HICMOInterID", "HICMOEntryID"];
        var titleData4 = ["HEntryID", "HWorkShopID", "HMaterID", "HSupID", "HPRDORGID", "HEquipMentID", "hsubid", "HICMOEntryID", "HDeptID", "hmainid", "hicmointerid", "HICMOInterID", "HMaterID2", "HUnitID", "HBillType", "HRoutingBillID", "HAuxUnit", "生产车间代码", "生产车间", "材质", "成品编号", "版本", "总装图号", "图号版本", "子件代码", "子件名称", "子件规格", "批号", "委外加工单位代码", "委外加工单位", "设备名称", "设备代码", "原料批次", "补料标记", "项目编号", "主要材料", "关键材料", "产品CODE", "销售订单号", "客户简称", "客户要求材料成分", "产品名称2", "客户名称", "生产备注", "重要提示", "原材料编号A", "原材料编号B", "原材料编号C", "原材料编号D", "原材料内码A", "原材料内码B", "原材料内码C", "原材料内码D", "日计划工单号", "客户编码", "芯体规格型号", "芯体物料代码", "源单客户代码", "HEmpID", "HCusID"];
        var titleData5 = ["单据ID", "hsubid", "HDeptID", "打浆人内码", "客户内码", "主产品内码", "HMaterID", "HUnitID", "任务单内码", "任务单子内码", "工序流转卡内码", "工序流转卡子内码"];
        var titleData6 = ["hmainid", "HDeptID", "HEmpID", "HCusID", "HMainSourceInterID", "HMainSourceEntryID", "HMainSourceBillNo", "HMainSourceBillType", "HInnerBillNo", "HOrgID", "HMaterID", "HUnitID", "HSourceInterID", "HSourceEntryID", "HSourceBillNo", "HSourceBillType"];
        
        //#endregion
@@ -213,6 +225,17 @@
            }
        });
        //#endregion
        //#region å­è¡¨6:头工具栏事件
        table.on('toolbar(mainTable6)', function (obj) {
            switch (obj.event) {
                //列设置
                case 'set_HideColumn6':
                    get_HideColumn6();
                    break;
            }
        });
        //#endregion
        //#endregion
        //#region æ­¤é¡µé¢æ‰€æœ‰çš„æ–¹æ³•
@@ -244,7 +267,7 @@
                elem: '#mainTable0'
                , toolbar: '#toolbarDemo0'
                , height: 550
                //, page: true
                , limit: 500
                , cellMinWidth: 90
                //, limit: 50
                //, limits: [50, 500, 5000, 20000]
@@ -295,7 +318,7 @@
                , height: 550
                //, page: true
                , cellMinWidth: 90
                //, limit: 50
                , limit: 500
                //, limits: [50, 500, 5000, 20000]
                , cols: [[
                    { type: 'checkbox', fixed: 'left' }
@@ -348,7 +371,7 @@
                , height: 550
                //, page: true
                , cellMinWidth: 90
                //, limit: 50
                , limit: 500
                //, limits: [50, 500, 5000, 20000]
                , cols: [[
                    { type: 'checkbox', fixed: 'left' }
@@ -397,7 +420,7 @@
                , height: 550
                //, page: true
                , cellMinWidth: 90
                //, limit: 50
                , limit: 500
                //, limits: [50, 500, 5000, 20000]
                , cols: [[
                    { type: 'checkbox', fixed: 'left' }
@@ -450,7 +473,7 @@
                , height: 550
                //, page: true
                , cellMinWidth: 90
                //, limit: 50
                , limit: 500
                //, limits: [50, 500, 5000, 20000]
                , text: {
                    none: '无数据!'
@@ -464,7 +487,7 @@
                , height: 550
                //, page: true
                , cellMinWidth: 90
                //, limit: 50
                , limit: 500
                //, limits: [50, 500, 5000, 20000]
                , cols: [[
                    { type: 'checkbox', fixed: 'left' }
@@ -510,6 +533,20 @@
                    , { field: '作废人', title: '作废人', width: 100, sort: true }
                    , { field: '作废日期', title: '作废日期', width: 120, templet: "<div>{{d.作废日期 ==null ?'':layui.util.toDateString(d.作废日期, 'yyyy-MM-dd')}}</div>", sort: true }
                ]]
                , text: {
                    none: '无数据!'
                }
            };
            //动态显示列名
            option6 = {
                elem: '#mainTable6'
                , toolbar: '#toolbarDemo6'
                , height: 550
                //, page: true
                , cellMinWidth: 90
                , limit: 500
                //, limits: [50, 500, 5000, 20000]
                , text: {
                    none: '无数据!'
                }
@@ -567,6 +604,13 @@
                            , "list": data1.list[5]
                        };
                        setInit_mainTable5(table5);
                        //渲染表6
                        var table6 = {
                            "data": data1.data[6]
                            , "list": data1.list[6]
                        };
                        setInit_mainTable6(table6);
                        layer.close(ajaxLoad);
                    } else {
@@ -837,6 +881,49 @@
            //刷新表格数据
            DisPlay_HideColumn5();
        }
        //#endregion
        //#region æ¸²æŸ“表6
        function setInit_mainTable6(data1) {
            //需要设置合计行的列
            var totalArray = [];
            //整理子表的列
            var data = [];
            var col = [];
            //给空的数组赋值
            for (var key in data1.list) {
                data.push({ "id": data1.list[key].ColmCols, "name": data1.list[key].ColmCols, "Type": data1.list[key].ColmType });
            }
            //在列表左边添加勾选框
            col.push({ type: 'checkbox', fixed: 'left' });
            for (var i = 0; i < data.length; i++) {
                // if (data[i].name == 'HInterID' || data[i].name == 'HBillType' || data[i].name == 'hmainid') {
                if ($.inArray(data[i].name, titleData6) > -1) {
                    col.push({ field: data[i].id, title: data[i].name, align: 'center', hide: true }); //隐藏id列
                }
                else if ($.inArray(data[i].name, totalArray) > -1) {
                    col.push({ field: data[i].id, title: data[i].name, align: 'center', sort: true, totalRow: true, width: 120 });
                } else {
                    switch (data[i].Type) {
                        //int
                        case 'DateTime':
                            col.push({ field: data[i].id, title: data[i].name, align: 'center', sort: true, templet: "<div>{{d." + data[i].name + " ==null ?'':layui.util.toDateString(d." + data[i].name + ", 'yyyy-MM-dd')}}</div>", width: 120 });
                            break;
                        default:
                            col.push({ field: data[i].id, title: data[i].name, align: 'center', sort: true, width: 120 });
                    }
                }
            }
            //设置子表渲染参数的列集合和数据并渲染
            option6.cols = [col];
            option6.data = data1.data;
            table.render(option6);
            //刷新表格数据
            DisPlay_HideColumn6();
        }
        //#endregion
@@ -1548,6 +1635,124 @@
        }
        //#endregion
        //#region å­è¡¨6:隐藏列设置
        function get_HideColumn6() {
            HModName = "Sc_ICMOBillList_LookDown_ICMOChangeBillList";
            var colName = "";
            var contentUrl = "";
            for (var i = 1; i < option6.cols[0].length; i++) {
                colName += option6.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;
            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_HideColumn6();
                    //更新表格缓存的数据
                    layer.close(index);//关闭弹窗
                }
            })
        }
        //#endregion
        //#region å­è¡¨6:显示列数据
        function DisPlay_HideColumn6() {
            HModName = "Sc_ICMOBillList_LookDown_ICMOChangeBillList";
            $.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 = [];//数据库查询出的列数据
                        dataCol = data1.data[0].HGridString.split(',');
                        for (var i = 0; i < option6.cols[0].length - 1; i++) {
                            var dataCols = dataCol[i].split('|');
                            //隐藏列
                            if (dataCols[1] == 1) {
                                option6.cols[0][i + 1]["hide"] = true;
                            }
                            //设置列宽
                            if (dataCols[3] > 0) {
                                option6.cols[0][i + 1]["width"] = dataCols[3];
                            }
                            //设置内容字体大小
                            if (data1.data[0].HFontSize != 0) {
                                option6.cols[0][i + 1]["style"] += "font-size:" + data1.data[0].HFontSize + "px;";
                            } else {
                                option6.cols[0][i + 1]["style"] += "font-size:100%";
                            }
                            //设置列宽
                            //if (data1.data[0].HColumnWidth != 0) {
                            //    option2.cols[0][i + 1]["width"] = data1.data[0].HColumnWidth + "px;";
                            //} else {
                            //    option2.cols[0][i + 1]["width"] = "";
                            //}
                            //显示列
                            if (dataCols[1] == 0 && $.inArray(option6.cols[0][i + 1]["title"], titleData6) == -1) {
                                option6.cols[0][i + 1]["hide"] = false;
                            }
                            //字体所在位置(å·¦ å±…中 å³)
                            switch (dataCols[2]) {
                                case "L":
                                    option6.cols[0][i + 1]["align"] = "left";
                                    break;
                                case "M":
                                    option6.cols[0][i + 1]["align"] = "center";
                                    break;
                                case "R":
                                    option6.cols[0][i + 1]["align"] = "right";
                                    break;
                            }
                        }
                        //取消冻结列
                        for (var i = 1; i < option6.cols[0].length - 1; i++) {
                            if (option6.cols[0][i]["fixed"] != null) {
                                option6.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(option6.cols[0][i + 1]["title"], titleData6) != -1) {
                                    data1.data[0].HFixCols += 1;
                                }
                                option6.cols[0][i + 1]["fixed"] = "left";
                            }
                        }
                        table.render(option6);
                    } else {
                        table.render(option6);
                    }
                }, error: function () {
                    layer.alert("接口请求失败!", { icon: 5 });
                }
            })
        }
        //#endregion
        //#region èŽ·å–å‚æ•°
        function getUrlVars() {
            var vars = [], hash;