zrg
2024-11-13 6e7d1936c7041630cbf48e0fb2939d4498dde778
人机料法环增加热处理和干燥机曲线按钮
2个文件已修改
171 ■■■■ 已修改文件
WebTM/views/质量管理/质量报表/QC_FiveMenOneRingList.html 134 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WebTM/views/车间管理/报表分析/Cj_HeatTreatmentTemperatureCurveChart.html 37 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WebTM/views/ÖÊÁ¿¹ÜÀí/ÖÊÁ¿±¨±í/QC_FiveMenOneRingList.html
@@ -55,7 +55,7 @@
                                            <div class="layui-inline">
                                                <label class="layui-form-label">工序流转卡</label>
                                                <div class="layui-input-block">
                                                    <input type="text" class="layui-input ForFilteringSchemes" name="HProcHBillNo" id="HProcHBillNo" >
                                                    <input type="text" class="layui-input ForFilteringSchemes" name="HProcHBillNo" id="HProcHBillNo">
                                                </div>
                                            </div>
                                            <button class="layui-btn layuiadmin-btn-order" type="button" lay-submit="" lay-filter="btnSearch" id="btnSearch">
@@ -179,12 +179,18 @@
                            </div>
                        </div>
                        <script type="text/html" id="toolbarDemo">
                            <div class="layui-btn-container">
                                <button type="button" class="layui-btn layui-btn-sm" lay-event="btn_RCL" id="btn_RCL"><i class="layui-icon layui-icon-export"></i>热处理曲线图</button>
                                <button type="button" class="layui-btn layui-btn-sm" lay-event="btn_GZJ" id="btn_GZJ"><i class="layui-icon layui-icon-export"></i>干燥机曲线图</button>
                            </div>
                        </script>
                        <script type="text/html" id="toolbarDemo1">
                            <div class="layui-btn-container">
                                <button type="button" class="layui-btn layui-btn-sm" lay-event="btn_Export" id="btn_Export"><i class="layui-icon layui-icon-export"></i>导出</button>
                            </div>
                        </script>
                        <script type="text/html" id="toolbarDemo2">
                        </script>
                    </form>
                </div>
@@ -209,7 +215,7 @@
                , util = layui.util
                , soulTable = layui.soulTable
            var sWhere = "";
            var option = "";  //人
            var option = "";  //主表格
            var option_Man = "";  //人
            var option_Machine = ""; //机
            var option_Material = ""; //料
@@ -253,6 +259,17 @@
                switch (obj.event) {                  
                    //导出按钮
                    case 'btn_Export': btn_Export();
                        break;
                };
            });
            table.on('toolbar(mainTable)', function (obj) {
                switch (obj.event) {
                    //热处理曲线图
                    case 'btn_RCL': btn_RCL();
                        break;
                    //干燥机曲线图
                    case 'btn_GZJ': btn_GZJ();
                        break;
                };
            });
@@ -391,13 +408,7 @@
                    , cellMinWidth: 90
                    , limit: 50
                    , limits: [50, 500, 5000, 20000]
                    , cols: [
                        [
                            { type: 'checkbox', fixed: 'left' }
                            , { field: '流转卡', title: '流转卡', sort: true, width: 200 }
                            , { field: '物料名称', title: '物料名称', sort: true, width: 200 }
                        ]
                    ]
                    , cols: []
                    ,data:[]
                };
            }
@@ -406,7 +417,7 @@
            function set_InitGrid_Man() {
                option_Man = {
                    elem: '#mainTable_Man'
                    , toolbar: '#toolbarDemo'
                    , toolbar: '#toolbarDemo2'
                    , totalRow: true
                    , height: 600
                    , cellMinWidth: 90
@@ -420,7 +431,7 @@
            function set_InitGrid_Machine() {
                option_Machine = {
                    elem: '#mainTable_Machine'
                    , toolbar: '#toolbarDemo'
                    , toolbar: '#toolbarDemo2'
                    , totalRow: true
                    , height: 600
                    , cellMinWidth: 90
@@ -434,7 +445,7 @@
            function set_InitGrid_Material() {
                option_Material = {
                    elem: '#mainTable_Material'
                    , toolbar: '#toolbarDemo'
                    , toolbar: '#toolbarDemo2'
                    , totalRow: true
                    , height: 600
                    , cellMinWidth: 90
@@ -448,7 +459,7 @@
            function set_InitGrid_Method() {
                option_Method = {
                    elem: '#mainTable_Method'
                    , toolbar: '#toolbarDemo'
                    , toolbar: '#toolbarDemo2'
                    , totalRow: true
                    , height: 600
                    , cellMinWidth: 90
@@ -462,6 +473,7 @@
            function set_InitGrid_Environments() {
                option_Environments = {
                    elem: '#mainTable_Environments'
                    , toolbar: '#toolbarDemo2'
                    , height: 600
                    , totalRow: true
                    , limit: Number.MAX_VALUE//默认显示全部
@@ -473,7 +485,8 @@
            //初始化测列表
            function set_InitGrid_Measure() {
                option_Measure = {
                    elem: '#mainTable_Measure'
                    elem: '#mainTable_Measure'
                    , toolbar: '#toolbarDemo2'
                    , page: false
                    , height: 600
                    , totalRow: true
@@ -559,7 +572,7 @@
                            option_Man = {
                                elem: '#mainTable_Man'
                                , toolbar: '#toolbarDemo'
                                , toolbar: '#toolbarDemo2'
                                , cols: [Listcol[1]]
                                , data: data1.data.h_p_QC_FiveMenOneRingList1
                                , height: 'full-80'                             
@@ -569,7 +582,7 @@
                            option_Machine = {
                                elem: '#mainTable_Machine'
                                , toolbar: '#toolbarDemo'
                                , toolbar: '#toolbarDemo2'
                                , cols: [Listcol[1]]
                                , data: data1.data.h_p_QC_FiveMenOneRingList1
                                , height: 'full-80'                               
@@ -579,7 +592,7 @@
                            option_Material = {
                                elem: '#mainTable_Material'
                                , toolbar: '#toolbarDemo'
                                , toolbar: '#toolbarDemo2'
                                , cols: [Listcol[1]]
                                , data: data1.data.h_p_QC_FiveMenOneRingList1
                                , height: 'full-80'                               
@@ -589,7 +602,7 @@
                            option_Method = {
                                elem: '#mainTable_Method'
                                , toolbar: '#toolbarDemo'
                                , toolbar: '#toolbarDemo2'
                                , cols: [Listcol[1]]
                                , data: data1.data.h_p_QC_FiveMenOneRingList1
                                , height: 'full-80'                                
@@ -599,7 +612,7 @@
                            option_Environments = {
                                elem: '#mainTable_Environments'
                                , toolbar: '#toolbarDemo'
                                , toolbar: '#toolbarDemo2'
                                , cols: [Listcol[1]]
                                , data: data1.data.h_p_QC_FiveMenOneRingList1
                                , height: 'full-80'                              
@@ -609,7 +622,7 @@
                            option_Measure = {
                                elem: '#mainTable_Measure'
                                , toolbar: '#toolbarDemo'
                                , toolbar: '#toolbarDemo2'
                                , cols: [Listcol[1]]
                                , data: data1.data.h_p_QC_FiveMenOneRingList1
                                , height: 'full-80'                              
@@ -743,6 +756,52 @@
            //#region å¯¼å‡ºExecel
            function btn_Export() {
                table.exportFile(ins.config.id, option.data, "xls");
            }
            //#endregion
            //#region çƒ­å¤„理曲线图
            function btn_RCL() {
                var checkStatus = table.checkStatus('mainTable')
                    , data = checkStatus.data;
                if (checkStatus.data.length === 1) {
                    var linterid = data[0].流转卡id;
                    layer.open({
                        type: 2
                        , skin: 'layui-layer-rim' //加上边框
                        , area: ['100%', '100%']
                        , title: '热处理曲线图'
                        , shift: 0//弹出动画
                        , content: '../../车间管理/报表分析/Cj_HeatTreatmentTemperatureCurveChart.html?OperationType=1&linterid=' + linterid+'&HSouceBillType='
                        , btn: [],
                        end: function (index, layero, that) {
                        }
                    })
                } else {
                    layer.msg('请选择一行数据编辑!');
                }
            }
            //#endregion
            //#region å¹²ç‡¥æœºæ›²çº¿å›¾
            function btn_GZJ() {
                var checkStatus = table.checkStatus('mainTable')
                    , data = checkStatus.data;
                if (checkStatus.data.length === 1) {
                    var linterid = data[0].流转卡id;
                    layer.open({
                        type: 2
                        , skin: 'layui-layer-rim' //加上边框
                        , area: ['100%', '100%']
                        , title: '干燥机曲线图'
                        , shift: 0//弹出动画
                        , content: '../../车间管理/报表分析/Cj_TemperatureCurveDryingMachine.html?OperationType=1&linterid=' + linterid+'&HSouceBillType='
                        , btn: [],
                        end: function (index, layero, that) {
                        }
                    })
                } else {
                    layer.msg('请选择一行数据编辑!');
                }
            }
            //#endregion
            
@@ -1428,7 +1487,7 @@
                            //人
                            option_Man = {
                                elem: '#mainTable_Man'
                                , toolbar: '#toolbarDemo'
                                , toolbar: '#toolbarDemo2'
                                , cols: [Listcol[0]]
                                , data: data1.data.h_p_QC_FiveMenOneRingList_Query
                                , height: 'full-80'
@@ -1440,7 +1499,7 @@
                            //机
                            option_Machine = {
                                elem: '#mainTable_Machine'
                                , toolbar: '#toolbarDemo'
                                , toolbar: '#toolbarDemo2'
                                , cols: [Listcol[1]]
                                , data: data1.data.h_p_QC_FiveMenOneRingList_Query1
                                , height: 'full-80'
@@ -1452,7 +1511,7 @@
                            //料
                            option_Material = {
                                elem: '#mainTable_Material'
                                , toolbar: '#toolbarDemo'
                                , toolbar: '#toolbarDemo2'
                                , cols: [Listcol[2]]
                                , data: data1.data.h_p_QC_FiveMenOneRingList_Query2
                                , height: 'full-80'
@@ -1464,7 +1523,7 @@
                            //法
                            option_Method = {
                                elem: '#mainTable_Method'
                                , toolbar: '#toolbarDemo'
                                , toolbar: '#toolbarDemo2'
                                , cols: [Listcol[3]]
                                , data: data1.data.h_p_QC_FiveMenOneRingList_Query3
                                , height: 'full-80'
@@ -1475,7 +1534,7 @@
                            //环
                            option_Environments = {
                                elem: '#mainTable_Environments'
                                , toolbar: '#toolbarDemo'
                                , toolbar: '#toolbarDemo2'
                                , cols: [Listcol[4]]
                                , data: data1.data.h_p_QC_FiveMenOneRingList_Query4
                                , height: 'full-80'
@@ -1486,7 +1545,7 @@
                            //测
                            option_Measure = {
                                elem: '#mainTable_Measure'
                                , toolbar: '#toolbarDemo'
                                , toolbar: '#toolbarDemo2'
                                , cols: [Listcol[5]]
                                , data: data1.data.h_p_QC_FiveMenOneRingList_Query5
                                , height: 'full-80'
@@ -1507,6 +1566,27 @@
            }
           //#endregion  
            //#region ç‚¹å‡»è¡Œé€‰ä¸­é«˜äº®
            table.on('row(mainTable)', function (obj) {
                //选中行改变颜色
                var flag = !obj.tr.find(':checkbox:first').prop('checked');
                obj.tr.find(':checkbox').prop('checked', flag);
                if (flag) {
                    obj.tr.find('.layui-form-checkbox').addClass('layui-form-checked');  //设置复选框选中样式
                    $(obj.tr.selector).attr({ "style": "background:#ceedfa;color:black" });//改变当前tr背景颜色和字体颜色
                } else {
                    obj.tr.find('.layui-form-checkbox').removeClass('layui-form-checked');//取消复选框选中样式
                    $(obj.tr.selector).attr({ "style": "background:" });//取消当前tr颜色
                }
                //mainTable ä¸ºè¡¨æ ¼ID   æ³¨æ„æ­¤å¤„如果ID不正确将导致你在监听复选框时获取不到你选择的数据,前面的只是添加或删除选中未选中样式以及设置背景色,字体颜色
                layui.each(table.cache.mainTable, function (i, l) {
                    if (obj.tr.index() == l.LAY_TABLE_INDEX) {
                        l.LAY_CHECKED = flag;
                    }
                });
            })
            //#endregion
            //#region éšè—åˆ—设置
            function get_HideColumn() {
                var colName = "";
WebTM/views/³µ¼ä¹ÜÀí/±¨±í·ÖÎö/Cj_HeatTreatmentTemperatureCurveChart.html
@@ -84,6 +84,12 @@
            var HModName = "Cj_HeatTreatmentTemperatureCurveChart";
            //#endregion
            var params = get_UrlVars();
            var OperationType = params[params[0]] == undefined ? "":params[params[0]];//操作类型
            var linterid = params[params[1]] == undefined ? "" : params[params[1]];//源单id
            var HSBillType = params[params[2]] == undefined ? "" : params[params[2]];//源单类型
            //#region è¿›å…¥é¡µé¢æ—¢åŠ è½½
            //初始化界面
@@ -111,7 +117,13 @@
            //初始化界面
            function set_ClearBill() {
                get_FastQuery();
                if (OperationType == 1) {
                    //get_HProcHBillNoId(linterid);
                    get_FastQuery();
                } else {
                    get_FastQuery();
                }
            }
            //查询数据
@@ -207,7 +219,6 @@
            //快速过滤
            function get_FastQuery() {
                var HEquipFileNo = $("#HEquipFileNo").val();
                sWhere = HEquipFileNo;
                get_Display(sWhere);
                //调用接口后清空sWhere缓存
@@ -221,6 +232,28 @@
                sWhere = "";
            }
            //全程追溯报表传入流转卡id  èŽ·å–è®¾å¤‡ç¼–å·
            //function get_HProcHBillNoId(linterid) {
            //    var wait = layer.load();//遮罩
            //    $.ajax({
            //        url: GetWEBURL() + '/Cj_NoPassProc/GetHProcHBillNoId',
            //        type: "GET",
            //        async: false,
            //        data: { "linterid": linterid, "user": sessionStorage["HUserName"] },
            //        success: function (data1) {
            //            if (data1.count == 1) {
            //            } else {
            //                layer.close(wait);
            //                layer.alert(data1.Message, { icon: 5 });
            //            }
            //        }, error: function () {
            //            layer.close(wait);
            //            layer.alert("接口请求失败!", { icon: 5 });
            //        }
            //    });
            //}
            //#endregion
        });
</script>