WebTM/views/³µ¼ä¹ÜÀí/±¨±í·ÖÎö/Sc_StationInBillList.html
@@ -171,10 +171,10 @@
                    , { field: '进出站所用时间', title: '进出站所用时间', width: 160 }
                    , { field: '工时', title: '工时', width: 160 }
                    , { field: '工序名', title: '工序名', width: 160 }
                    , { field: '不良数量', title: '不良数量', width: 160 }
                    , { field: '报废数量', title: '报废数量', width: 160 }
                    , { field: '进站数量', title: '进站数量', width: 160 }
                    , { field: '出站数量', title: '出站数量', width: 160 }
                    , { field: '不良数量', title: '不良数量', totalRow: true, width: 160 }
                    , { field: '报废数量', title: '报废数量', totalRow: true, width: 160 }
                    , { field: '进站数量', title: '进站数量', totalRow: true, width: 160 }
                    , { field: '出站数量', title: '出站数量', totalRow: true, width: 160 }
                    , { field: '出站时间', title: '出站时间', width: 160 }
                    , { field: '进站时间', title: '进站时间', width: 160 }
                    , { field: '制单人', title: '制单人', width: 200 }
@@ -239,6 +239,29 @@
                    }
                });
            }
            //#region ç‚¹å‡»è¡Œé€‰ä¸­é«˜äº®
            table.on('row(mainTablemainTable)', 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
            //编辑单据
            function set_ShowBill() {
                var checkStatus = table.checkStatus('mainTable')
@@ -309,33 +332,34 @@
            //Excel表格导出
            function SetExcel() {
                layer.confirm("确定导出所有数据吗", { title: "导出确认" }, function (index) {
                    window.location.href = GetWEBURL() + "/Sc_PackUnionBill/Sc_StationInBillSetExcel";
                    //var wait = layer.load();
                    //$.ajax({
                    //    type: "GET",
                    //    url: GetWEBURL() + "/Sc_PackUnionBill/Sc_StationInBillSetExcel",
                    //    success: function (result) {
                    //        window.location.reload();
                    //        //if (result.count == 1) {
                    //        //    layer.msg(result.Message, { time: 1 * 1000, icon: 1 }, function () {
                    //        //        // å¾—到frame索引
                    //        //        var index = layer.getFrameIndex(window.name);
                    //        //        //关闭当前frame
                    //        //        layer.close(index);
                    //        //        //修改为功后刷新界面
                    //        //        window.location.reload();
                    //        //    });
                    var HBeginDate = $("#HBeginDate").val();//开始日期
                    var HEndDate = $("#HEndDate").val();//结束日期
                    var HICMOBillNo = $("#HICMOBillNo").val(); //单据号
                    var HProcExchBillNo = $("#HProcExchBillNo").val();
                    var HName = $("#HName").val();
                    //        //} else {
                    //        //    layer.alert(result.code + result.Message, { icon: 5 });
                    //        //}
                    //        //layer.close(wait);
                    //    }, error: function () {
                    //        layer.close(wait);
                    //        layer.alert("接口请求失败!", { icon: 5 });
                    //    }
                    //});
                    if (HBeginDate) {
                        sWhere += " and CONVERT(varchar(100),进站时间, 23) >= '" + HBeginDate + "'";
                    }
                    if (HEndDate) {
                        sWhere += " and CONVERT(varchar(100),进站时间, 23) <= '" + HEndDate + "'";
                    }
                    if (HICMOBillNo) {
                        sWhere += " and è¿›ç«™ç”Ÿäº§è®¢å•号 like '%" + HICMOBillNo + "%'";
                    }
                    if (HProcExchBillNo) {
                        sWhere += " and æµè½¬å¡å· like '%" + HProcExchBillNo + "%'";
                    }
                    if (HName) {
                        sWhere += " and å·¥åºå like '%" + HName + "%'";
                    }
                    window.location.href = GetWEBURL() + "/Sc_PackUnionBill/Sc_StationInBillSetExcel?sWhere=" + sWhere;
                    // å¾—到frame索引
                    //var index = layer.getFrameIndex(window.name);
                    //关闭当前frame
                    layer.close(index);
                })
                sWhere = " where 1=1 ";
            }
            //预览
@@ -485,6 +509,7 @@
                $("#HEndDate").val("");
                $("#HICMOBillNo").val("");
                $("#HProcExchBillNo").val("");
                $("#HName").val("");
                sWhere = " where 1 = 1 ";
                get_Display(sWhere);
            }