yangle
2022-09-05 93142ea60b226e7b9e52bc4465795efa06babd96
工艺路线  报表 维护
3个文件已修改
142 ■■■■■ 已修改文件
WebTM/App_Data/MssqlReportData.cs 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WebTM/views/计划管理/工艺路线/Gy_RoutingBillimport.html 18 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WebTM/views/车间管理/报表分析/ProductionPlanReportList.html 120 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WebTM/App_Data/MssqlReportData.cs
@@ -18,12 +18,12 @@
    //public const string SqlConnStr = "Data Source=10.0.2.9;Initial Catalog=HX_LimsSys;Persist Security Info=True;User ID=HX_USER;Password=lc@841022;";
    //public const string SqlConnStr = "Data Source=.;Initial Catalog=HX_LMESsys;Persist Security Info=True;User ID=HX_USER;Password=lc@841022;";
    //public const string SqlConnStr = "Data Source=.;Initial Catalog=HX_LimsSys;Persist Security Info=True;User ID=HX_USER;Password=lc@841022;";//ch测试
   public const string SqlConnStr = "Data Source=47.96.97.237,15127;Initial Catalog=HX_LMESsys;Persist Security Info=True;User ID=HX_USER;Password=lc@841022;";//YL测试
    //public const string SqlConnStr = "Data Source=47.96.97.237,15127;Initial Catalog=HX_LMESsys;Persist Security Info=True;User ID=HX_USER;Password=lc@841022;";//YL测试
    //public const string SqlConnStr = "Data Source=47.96.97.237,15127;Initial Catalog=HX_LMESsys;Persist Security Info=True;User ID=HX_USER;Password=lc@841022;";//丸井
    //public const string SqlConnStr = "Data Source=192.168.0.200;Initial Catalog=HX_LimsSys;Persist Security Info=True;User ID=HX_USER;Password=lc@841022;";//丸井地址
    //public const string SqlConnStr = "Data Source=192.168.0.175;Initial Catalog=HX_LimsSys;Persist Security Info=True;User ID=HX_USER;Password=lc@841022;";//雅琪诺测试
    //public const string SqlConnStr = "Data Source=.;Initial Catalog=HX_LMESsys;Persist Security Info=True;User ID=HX_USER;Password=lc@841022;";//凯贝奈特
    //public const string SqlConnStr = "Data Source=192.168.0.199;Initial Catalog=HX_LMESsys;Persist Security Info=True;User ID=HX_USER;Password=lc@841022;";//瑞琪
    public const string SqlConnStr = "Data Source=192.168.0.199;Initial Catalog=HX_LMESsys;Persist Security Info=True;User ID=HX_USER;Password=lc@841022;";//瑞琪
    //public string sServer;
    //public string sDataBase;
WebTM/views/¼Æ»®¹ÜÀí/¹¤ÒÕ·Ïß/Gy_RoutingBillimport.html
@@ -54,6 +54,11 @@
                                    </div>
                                </div>
                                <div class="layui-inline">
                                    <div class="layui-input-block" style="margin-left: 10px;min-height:0px">
                                        <input type="checkbox" name="SqlAppend" id="SqlAppend" lay-skin="primary" lay-filter="SqlAppend" title="数据库添加">
                                    </div>
                                </div>
                                <div class="layui-inline">
                                    <label class="layui-form-label" style="width: 85px;">是否转工序</label>
                                    <div class="layui-input-block" style="margin-left: 120px; width: 85px;">
                                        <select name=" HTProcessFlag" id="HTProcessFlag">
@@ -155,12 +160,17 @@
        //导入  ä¿å­˜æ•°æ®
        form.on('submit(btnSave)', function (data) {
            if (table.cache["mainTable"] != null) {
            if ($("input[name='SqlAppend']").prop("checked")) {
                set_AddNew(data);
            }
            else {
                layer.msg("无数据,请先导入数据!");
                if (table.cache["mainTable"] != null) {
                    set_AddNew(data);
                }
                else {
                    layer.msg("无数据,请先导入数据!");
                }
            }
        })
        //#endregion
@@ -259,7 +269,6 @@
        //导入(保存)
        function set_AddNew(data) {
            //var num = [];
            //for (var i = 0; i < table.cache["mainTable"].length; i++) {
            //    if (table.cache["mainTable"][i] != "") {
@@ -284,6 +293,7 @@
                        layer.close(index);
                        layer.msg(data.Message);
                        option.data = null;
                        table.cache["mainTable"] = null;
                        table.render(option);
                    }
                    else {
WebTM/views/³µ¼ä¹ÜÀí/±¨±í·ÖÎö/ProductionPlanReportList.html
@@ -106,6 +106,7 @@
                        <script type="text/html" id="toolbarDemo">
                            <div class="layui-btn-container">
                                <button type="button" class="layui-btn layui-btn-sm" lay-event="btn-exit"><i class="layui-icon layui-icon-return"></i>退出</button>
                                <button type="button" class="layui-btn layui-btn-sm" lay-event="HideColumn"><i class="layui-icon layui-icon-form"></i>隐藏列设置</button>
                            </div>
                        </script>
                    </form>
@@ -134,6 +135,7 @@
            //查询条件
            var sWhere = "";
            var option = [];
            var HModName = "ProductionPlanReportList";
            //#endregion
            //#region è¿›å…¥é¡µé¢æ—¢åŠ è½½
@@ -149,6 +151,10 @@
                switch (obj.event) {
                    //退出
                    case 'btn-exit': Pub_Close(2);
                        break;
                    //隐藏列设置
                    case 'HideColumn':
                        get_HideColumn();
                        break;
                };
            });
@@ -217,6 +223,7 @@
                set_InitGrid();
                //加载数据到网格
                get_FastQuery();
                DisPlay_HideColumn();
            }
            //初始化表格
@@ -226,17 +233,16 @@
                    , toolbar: '#toolbarDemo'
                    , cellMinWidth: 120
                    , limit: Number.MAX_VALUE // æ•°æ®è¡¨æ ¼é»˜è®¤å…¨éƒ¨æ˜¾ç¤º
                    , height: 'full-50'
                    , height: 'full-70'
                    , cols: [[
                        { type: 'checkbox', fixed: 'left' }
                        , { field: '要货日期', title: '交货日期', width: 160, templet: "<div>{{d.要货日期 ==null ?'':layui.util.toDateString(d.要货日期, 'yyyy-MM-dd HH:mm:ss')}}</div>" }
                        , { field: '销售订单号', title: '销售单号', width: 160 }
                        , { field: '流转卡号', title: '流转卡号', width: 160 }
                        , { field: '唯一ID', title: '唯一ID', width: 160 }
                        , { field: '生产订单号', title: '批号', width: 160 }
                        , { field: '物料名称', title: '物料名称', width: 160 }
                        , { field: '物料代码', title: '物料代码', width: 160 }
                        , { field: '开工日期', title: '下达日期', width: 160, templet: "<div>{{d.开工日期 ==null ?'':layui.util.toDateString(d.开工日期, 'yyyy-MM-dd')}}</div>" }
                        , { field: '要求完工', title: '要求完工', width: 160, templet: "<div>{{d.要求完工 ==null ?'':layui.util.toDateString(d.要求完工, 'yyyy-MM-dd')}}</div>" }
                        , { field: '等级', title: '等级', width: 160 }
                        , { field: '整批', title: '整批', width: 160 }
                        , { field: '报废数量', title: '报废', width: 160 }
                        , { field: '汇报单数量', title: '汇报单数量', width: 160 }
@@ -246,6 +252,9 @@
                        , { field: '班组', title: '班组', width: 200 }
                        , { field: '状态', title: '状态', width: 200 }
                        , { field: '操作工', title: '操作工', width: 200 }
                        , { field: '要货日期', title: '交货日期', width: 160, templet: "<div>{{d.要货日期 ==null ?'':layui.util.toDateString(d.要货日期, 'yyyy-MM-dd HH:mm:ss')}}</div>" }
                        , { field: '销售订单号', title: '销售单号', width: 160 }
                        , { field: '等级', title: '等级', width: 160 }
                    ]]
                };
            }
@@ -337,6 +346,109 @@
                })
            }
            //隐藏列设置
            function get_HideColumn() {
                var colName = "";
                for (var i = 1; i < option.cols[0].length - 1; i++) {
                    colName += option.cols[0][i]["title"] + ",";
                }
                colName = encodeURI(colName.substring(0, colName.length - 1));//对 URI è¿›è¡Œç¼–码
                layer.open({
                    type: 2
                    , skin: "layui-layer-rim" //加上边框
                    , title: "隐藏列设置"  //标题
                    , closeBtn: 1  //窗体右上角关闭 çš„ æ ·å¼
                    , shift: 2 //弹出动画
                    , area: ["50%", "90%"] //窗体大小
                    , maxmin: true //设置最大最小按钮是否显示
                    , content: ['../../基础资料/隐藏列设置/Gy_GridView_Hide.html?HModName=' + HModName + '&colName=' + colName, "yes"]
                    , btn: ["确定", "取消"]
                    , btn1: function (index, laero) {
                        //刷新表格数据
                        DisPlay_HideColumn();
                        //更新表格缓存的数据
                        layer.close(index);//关闭弹窗
                    }
                })
            }
            //显示列数据
            function DisPlay_HideColumn() {
                $.ajax({
                    url: GetWEBURL() + '/Xt_grdAlignment_WMES/grdAlignmentWMESList',
                    type: "GET",
                    data: { "HModName": HModName, "user": sessionStorage["HUserName"] },
                    success: function (data1) {
                        if (data1.data.length != 0) {
                            var dataCol = [];//数据库查询出的列数据
                            var titleData = [];//不需要显示的字段 å¯æ‰©å±•
                            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 (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 (dataCols[3] > 0) {
                                    option.cols[0][i + 1]["width"] = dataCols[3];
                                }
                                //显示列
                                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 });
                    }
                })
            }
            //#endregion
        });