yxj
2024-08-26 de7931bdf73d57ca79eeb0cd48ea3a0ea5453e0e
WebTM/views/Baseset/»ù´¡×ÊÁÏ/OtherOutRequestBillList.html
@@ -47,7 +47,7 @@
    </div>-->
                        <div class="layui-col-xs12 layui-inline">
                            <div class="layui-row">
                                <div class="layui-form-item" style="padding:0px;margin:0px">
                                <!--<div class="layui-form-item" style="padding:0px;margin:0px">
                                    <div class="layui-row">
                                        <div class="layui-col-xs3">
                                            <label class="layui-form-label" style="width:30px;padding-left:0px;">申请人</label>
@@ -60,7 +60,7 @@
                                            <button type="button" lay-submit="" class="layui-btn" lay-filter="HRequestManID-BT">...</button>
                                        </div>
                                    </div>
                                </div>
                                </div>-->
                                <div class="layui-inline">
                                    <label class="layui-form-label">开始日期</label>
                                    <div class="layui-input-block">
@@ -104,17 +104,19 @@
                //, toolbar: '#toolbarDemo'
                , height: 'full-120'
                , page: true
                , limits: [50, 500, 5000, 50000]
                ,limit: 50
                , cellMinWidth: 90
                , cols: [[
                    { type: 'radio', fixed: 'left' }
                    , { field: 'HBillNo', title: '单据号', sort: true }
                    , { field: 'HDate', title: '日期', sort: true }
                    , { field: 'FBILLNO', title: '单据号', sort: true, width: 300 }
                    , { field: 'FDATE', title: '日期', sort: true }
                    , { field: 'HMaker', title: '制单人' }
                    , { field: 'HMakeDate', title: '制单日期' }
                ]]
            };
            var index = layer.load(0, { shade: false });
            //var index = layer.load(0, { shade: false });
            //进入页面显示的缓存列表
            //$.ajax({
            //    url: GetWEBURL() + '/PublicPageMethod/EqpList',
@@ -136,20 +138,46 @@
            //});
            function Format(datetime, fmt) {
                if (parseInt(datetime) == datetime) {
                    if (datetime.length == 10) {
                        datetime = parseInt(datetime) * 1000;
                    } else if (datetime.length == 13) {
                        datetime = parseInt(datetime);
                    }
                }
                datetime = new Date(datetime);
                var o = {
                    "M+": datetime.getMonth() + 1,                 //月份
                    "d+": datetime.getDate(),                    //日
                    "h+": datetime.getHours(),                   //小时
                    "m+": datetime.getMinutes(),                 //分
                    "s+": datetime.getSeconds(),                 //秒
                    "q+": Math.floor((datetime.getMonth() + 3) / 3), //季度
                    "S": datetime.getMilliseconds()             //毫秒
                };
                if (/(y+)/.test(fmt))
                    fmt = fmt.replace(RegExp.$1, (datetime.getFullYear() + "").substr(4 - RegExp.$1.length));
                for (var k in o)
                    if (new RegExp("(" + k + ")").test(fmt))
                        fmt = fmt.replace(RegExp.$1, (RegExp.$1.length == 1) ? (o[k]) : (("00" + o[k]).substr(("" + o[k]).length)));
                return fmt;
            }
            //查询按钮
            form.on('submit(btnSearch)', function (data) {
                var HEmPID = $("#HRequestManID").val();
                $("#HDate").val(Format(new Date(new Date() - 1000 * 60 * 60 * 24 * 30), "yyyy-MM-dd"));
                $("#HDate1").val(Format(new Date(), "yyyy-MM-dd"));
                var HDate = $("#HDate").val();//开始日期
                var HDate1 = $("#HDate1").val();//结束日期
                if (HEmPID) {
                    sWhere += " and HEmpID = " + HEmPID +"";
                }
                var OrganizationID = sessionStorage["OrganizationID"];
                if (HDate) {
                    sWhere += " and æ—¥æœŸ >= '" + HDate + "'";
                    sWhere += " and Fdate >= '" + HDate + "' and FSTOCKORGID = " + OrganizationID + "";
                }
                if (HDate1) {
                    sWhere += " and æ—¥æœŸ <= '" + HDate1 + "'";
                    sWhere += " and Fdate <= '" + HDate1 + "'and FSTOCKORGID = " + OrganizationID + "";
                }
                $.ajax({
                    url: GetWEBURL() + '/OtherOutRequestBillList/CX',
@@ -159,7 +187,7 @@
                        if (data1.count == 1) {
                            option.data = data1.data;
                            table.render(option);
                            layer.alert("查询成功", { icon: 1 });
                            //layer.alert("查询成功", { icon: 1 });
                        } else {
                            layer.alert(data1.code + data1.Message, { icon: 5 });
                        }