duhe
2023-12-11 985e16c0233f66cd547f4c3f6fd5c65eb16ca268
销售订单:下查增加工序流转卡
2个文件已修改
207 ■■■■■ 已修改文件
WebTM/Properties/PublishProfiles/JFTM.pubxml.user 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
WebTM/views/销售管理/销售订单/Xs_SeOrderBill_LookDown.html 205 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WebTM/Properties/PublishProfiles/JFTM.pubxml.user
@@ -4920,7 +4920,7 @@
      <publishTime>12/08/2023 23:59:08</publishTime>
    </File>
    <File Include="views/销售管理/销售订单/Xs_SeOrderBill_LookDown.html">
      <publishTime>12/11/2023 15:01:14</publishTime>
      <publishTime>12/11/2023 16:22:03</publishTime>
    </File>
    <File Include="views/销售管理/销售订单变更单/Xs_SeOrderChangeBill.html">
      <publishTime>11/30/2023 12:08:28</publishTime>
WebTM/views/ÏúÊÛ¹ÜÀí/ÏúÊÛ¶©µ¥/Xs_SeOrderBill_LookDown.html
@@ -27,6 +27,7 @@
                            <li lay-id="1" style="padding:1px;">生产订单</li>
                            <li lay-id="2" style="padding:1px;">特批申请单</li>
                            <li lay-id="2" style="padding:1px;">销售出库单</li>
                            <li lay-id="2" style="padding:1px;">工序流转卡</li>
                        </ul>
                        <div class="layui-tab-content">
                            <!--销售订单变更单-->
@@ -65,6 +66,15 @@
                                    </div>
                                </script>
                            </div>
                            <!--工序流转卡-->
                            <div class="layui-tab-item">
                                <table class="layui-hide" id="mainTable4" lay-filter="mainTable4"></table>
                                <script type="text/html" id="toolbarDemo4">
                                    <div class="layui-btn-container">
                                        <button type="button" class="layui-btn layui-btn-sm" lay-event="set_HideColumn4"><i class="layui-icon layui-icon-form"></i>列设置</button>
                                    </div>
                                </script>
                            </div>
                        </div>
                    </div>
                </form>
@@ -97,12 +107,14 @@
        var option1 = {};
        var option2 = {};
        var option3 = {};
        var option4 = {};
        //子表不需要显示的字段
        var titleData0 = ["hmainid","HMainSourceInterID","HMainSourceEntryID","HDeptID","HEmpID","HCurID","HCusID","HSSID","HSellSID","HOrgID","HMaterID","HUnitID","HSourceInterID","HSourceEntryID","HSourceBillNo","HSourceBillType"];
        var titleData1 = ["hmainid", "HEntryID", "HEmpID", "HBomID", "HRoutingInterID", "HPRDORGID", "hsubid", "HMaterID", "HUnitID", "HAuxPropID", "HDeptID", "HEntryCusID", "HCenterID", "HSourceID", "HSourceID_b", "HSourceName", "HBillStatus", "HAuxQty", "HAuxUnit", "HAuxUnitName", "HWidth", "HWeight", "HIsStockQty", "HCusID", "HSourceInterID", "HSourceEntryID", "HSourceBillNo", "HSourceBillType"];
        var titleData2 = ["hmainid", "HMainSourceInterID", "HMainSourceEntryID", "HDeptID", "HEmpID", "HCurID", "HCusID", "HManagerID", "HOrgID"];
        var titleData3 = ["hmainid" ,"红蓝单标记","发货人","保管员", "hsupid", "HEmpID", "hmanagerid", "hsecmanagerid", "hkeeperid", "HDeptID", "hsubid", "hmaterid","hunitid"];
        var titleData3 = ["hmainid", "红蓝单标记", "发货人", "保管员", "hsupid", "HEmpID", "hmanagerid", "hsecmanagerid", "hkeeperid", "HDeptID", "hsubid", "hmaterid", "hunitid"];
        var titleData4 = ["hmainid", "HEntryID", "HEmpID", "HBomID", "HRoutingInterID", "HPRDORGID", "hsubid", "HMaterID", "HUnitID", "HAuxPropID", "HDeptID", "HEntryCusID", "HCenterID", "HSourceID", "HOrderLevID", "HSourceID_b", "HsourceName", "HBillStatus", "HAuxQty", "HAuxUnit", "HAuxUnitName", "HWidth", "HWeight", "HIsStockQty", "HCusID", "HSourceInterID", "HSourceEntryID", "HSourceBillNo", "HSourceBillType"];
        
        //#endregion
@@ -162,6 +174,17 @@
                //列设置
                case 'set_HideColumn3':
                    get_HideColumn3();
                    break;
            }
        });
        //#endregion
        //#region å­è¡¨4:头工具栏事件
        table.on('toolbar(mainTable4)', function (obj) {
            switch (obj.event) {
                //列设置
                case 'set_HideColumn4':
                    get_HideColumn4();
                    break;
            }
        });
@@ -415,6 +438,17 @@
                ]]
            };
            //动态显示列名
            option4 = {
                elem: '#mainTable4'
                , toolbar: '#toolbarDemo4'
                , height: 550
                //, page: true
                , cellMinWidth: 90
                //, limit: 50
                //, limits: [50, 500, 5000, 20000]
            };
        }
        //#endregion
@@ -455,7 +489,13 @@
                        };
                        setInit_mainTable3(table3);
                        //渲染表4
                        var table4 = {
                            "data": data1.data[4]
                            , "list": data1.list[4]
                        };
                        setInit_mainTable4(table4);
                        layer.close(ajaxLoad);
                    } else {
                        layer.close(ajaxLoad);
@@ -639,6 +679,49 @@
            //刷新表格数据
            DisPlay_HideColumn3();
        }
        //#endregion
        //#region æ¸²æŸ“表4
        function setInit_mainTable4(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, titleData4) > -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 });
                    }
                }
            }
            //设置子表渲染参数的列集合和数据并渲染
            option4.cols = [col];
            option4.data = data1.data;
            table.render(option4);
            //刷新表格数据
            DisPlay_HideColumn4();
        }
        //#endregion
@@ -1114,6 +1197,124 @@
        }
        //#endregion
        //#region å­è¡¨4:隐藏列设置
        function get_HideColumn4() {
            HModName = "Xs_SeOrderBill_LookDown_ProcessExchangeBill";
            var colName = "";
            var contentUrl = "";
            for (var i = 1; i < option4.cols[0].length; i++) {
                colName += option4.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_HideColumn4();
                    //更新表格缓存的数据
                    layer.close(index);//关闭弹窗
                }
            })
        }
        //#endregion
        //#region å­è¡¨4:显示列数据
        function DisPlay_HideColumn4() {
            HModName = "Xs_SeOrderBill_LookDown_ProcessExchangeBill";
            $.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 < option4.cols[0].length - 1; i++) {
                            var dataCols = dataCol[i].split('|');
                            //隐藏列
                            if (dataCols[1] == 1) {
                                option4.cols[0][i + 1]["hide"] = true;
                            }
                            //设置列宽
                            if (dataCols[3] > 0) {
                                option4.cols[0][i + 1]["width"] = dataCols[3];
                            }
                            //设置内容字体大小
                            if (data1.data[0].HFontSize != 0) {
                                option4.cols[0][i + 1]["style"] += "font-size:" + data1.data[0].HFontSize + "px;";
                            } else {
                                option4.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(option4.cols[0][i + 1]["title"], titleData4) == -1) {
                                option4.cols[0][i + 1]["hide"] = false;
                            }
                            //字体所在位置(å·¦ å±…中 å³)
                            switch (dataCols[2]) {
                                case "L":
                                    option4.cols[0][i + 1]["align"] = "left";
                                    break;
                                case "M":
                                    option4.cols[0][i + 1]["align"] = "center";
                                    break;
                                case "R":
                                    option4.cols[0][i + 1]["align"] = "right";
                                    break;
                            }
                        }
                        //取消冻结列
                        for (var i = 1; i < option4.cols[0].length - 1; i++) {
                            if (option4.cols[0][i]["fixed"] != null) {
                                option4.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(option4.cols[0][i + 1]["title"], titleData) != -1) {
                                    data1.data[0].HFixCols += 1;
                                }
                                option4.cols[0][i + 1]["fixed"] = "left";
                            }
                        }
                        table.render(option4);
                    } else {
                        table.render(option4);
                    }
                }, error: function () {
                    layer.alert("接口请求失败!", { icon: 5 });
                }
            })
        }
        //#endregion
        //#region èŽ·å–å‚æ•°
        function getUrlVars() {
            var vars = [], hash;