yxj
2023-10-12 87fc641cd082a2b10ce1370fd4431654e21f1178
领料统计报表修改调整
1个文件已修改
94 ■■■■ 已修改文件
WebTM/views/车间管理/报表分析/Kf_MateOutSumReport_QiaoYi.html 94 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WebTM/views/³µ¼ä¹ÜÀí/±¨±í·ÖÎö/Kf_MateOutSumReport_QiaoYi.html
@@ -30,38 +30,51 @@
                    <form class="layui-form" action="" lay-filter="component-form-group">
                        <div class="layui-collapse">
                            <div class="layui-colla-item">
                                <div class="layui-inline">
                                    <label class="layui-form-label">开始日期</label>
                                    <div class="layui-input-block">
                                        <input type="date" class="layui-input" id="HBeginDate" style="width:190px;">
                                <div class="layui-inline" style="width:200px;">
                                    <label class="layui-form-label" style="width:35px;">日期</label>
                                    <div class="layui-input-block" style="position:relative; left:-45px;">
                                        <input type="date" class="layui-input" id="HBeginDate" style="width:140px;">
                                    </div>
                                </div>
                                <div class="layui-inline">
                                    <label class="layui-form-label">结束日期</label>
                                    <div class="layui-input-block">
                                        <input type="date" class="layui-input" id="HEndDate" style="width:190px;">
                                <div class="layui-inline" style="width:200px;">
                                    <label class="layui-form-label" style="width:5px;">-</label>
                                    <div class="layui-input-block" style="position:relative; left:-70px;">
                                        <input type="date" class="layui-input" id="HEndDate" style="width:140px;">
                                    </div>
                                </div>
                                <div class="layui-inline">
                                    <label class="layui-form-label">物料代码</label>
                                    <div class="layui-input-block">
                                        <input type="text" class="layui-input" name="HMaterNumber" id="HMaterNumber" style="width:190px;">
                                        <input type="text" class="layui-input" name="HMaterNumber" id="HMaterNumber" style="width:140px;">
                                    </div>
                                </div>
                                <div class="layui-inline">
                                    <label class="layui-form-label">物料名称</label>
                                    <div class="layui-input-block">
                                        <input type="text" class="layui-input" name="HMaterName" id="HMaterName" style="width:190px;">
                                        <input type="text" class="layui-input" name="HMaterName" id="HMaterName" style="width:140px;">
                                    </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: 185px;">
                                        <select name="HStockOrgID" id="HStockOrgID" lay-verify="HStockOrgID">
                                            <!--动态渲染组织-->
                                        </select>
                                    <label class="layui-form-label">染料总量</label>
                                    <div class="layui-input-block">
                                        <input type="text" class="layui-input" name="HSumRLQty" id="HSumRLQty" style="width:120px;" readonly>
                                    </div>
                                </div>
                                <div class="layui-inline">
                                    <label class="layui-form-label" style="width:30px;">公斤</label>
                                </div>
                                <div class="layui-inline">
                                    <label class="layui-form-label">助剂总量</label>
                                    <div class="layui-input-block">
                                        <input type="text" class="layui-input" name="HSumZJQty" id="HSumZJQty" style="width:120px;" readonly>
                                    </div>
                                </div>
                                <div class="layui-inline">
                                    <label class="layui-form-label" style="width:10px;">吨</label>
                                </div>
                                <button class="layui-btn layuiadmin-btn-order" type="button" lay-submit="" lay-filter="btnSearch" id="btnSearch">
                                    <i class="layui-icon layui-icon-search layuiadmin-button-btn"></i>
                                </button>
                                <button class="layui-btn layuiadmin-btn-order" type="button" lay-submit="" lay-filter="btnReSearch" id="btnReSearch" style="padding:0 5px">重置</button>
                            </div>
                        </div>
@@ -69,7 +82,7 @@
                        <script type="text/html" id="toolbarDemo">
                            <div class="layui-btn-container">
                                <button type="button" class="layui-btn layui-btn-sm" lay-event="btn_Export" id="Export"><i class="layui-icon layui-icon-export"></i>导出</button>
                                <button type="button" class="layui-btn layui-btn-sm" lay-event="btn_Query" id="Query"><i class="layui-icon layui-icon-search"></i>查询</button>
                                <!--<button type="button" class="layui-btn layui-btn-sm" lay-event="btn_Query" id="Query"><i class="layui-icon layui-icon-search"></i>查询</button>-->
                                <button type="button" class="layui-btn layui-btn-sm" lay-event="btn-Cell" id="Cell"><i class="layui-icon layui-icon-slider"></i>保存列宽</button>
                                <button type="button" class="layui-btn layui-btn-sm" lay-event="btn-RefreshCell" id="RefreshCell"><i class="layui-icon layui-icon-cols"></i>默认列宽</button>
                                <button type="button" class="layui-btn layui-btn-sm" lay-event="btn_HideColumn" id="HideColumn"><i class="layui-icon layui-icon-form"></i>列设置</button>
@@ -117,37 +130,10 @@
                //获取开始日期、结束日期
                $("#HBeginDate").val(Format(new Date(new Date() - 1000 * 60 * 60 * 24 * 30), "yyyy-MM-dd"));
                $("#HEndDate").val(Format(new Date(), "yyyy-MM-dd"));
                //获取组织
                Organ();
                //初始化表格
                set_InitGrid();
                //查询
                get_Display(sWhere);
            }
            //#endregion
            //#region   èŽ·å–ç»„ç»‡
            function Organ() {
                //获取登录页组织列
                $.ajax({
                    type: "GET",
                    url: GetWEBURL() + "/Web/GetOrganizations",
                    async: false,    //async用于控制(false)同步和(true)异步,默认的是true,即请求默认的是异步请求
                    success: function (result) {
                        var Organization = "";
                        Organization += '<option  style="color:blue;" value="全部">全部</option>';
                        if (result.count == 1) { // è¯´æ˜ŽéªŒè¯æˆåŠŸäº†ï¼Œ
                            var data = result.data;
                            for (var i = 0; i < data.length; i++) {
                                Organization += '<option  style="color:blue;" value="' + data[i].Name + '">' + data[i].Name + '</option>';
                            }
                            $("#HStockOrgID").append(Organization);
                            $("#HStockOrgID").val(sessionStorage["Organization"])
                            form.render('select');
                        }
                        layer.closeAll("loading");
                    }
                })
            }
            //#endregion
@@ -307,6 +293,11 @@
            }
            //#endregion
            //查询按钮
            form.on('submit(btnSearch)', function (data) {
                get_Display();
            });
            //#region æŸ¥è¯¢
            function get_Display() {
                var HBeginDate = $("#HBeginDate").val();        //开始日期
@@ -338,7 +329,7 @@
                            }
                            //在列表左边添加勾选框
                            col.push({ type: 'checkbox', fixed: 'left', totalRowText: '合计' });
                            col.push({ type: 'checkbox', fixed: 'left' });
                            for (var i = 0; i < data.length; i++) {
                                if ($.inArray(data[i].name, titleData) > -1) {
                                    col.push({ field: data[i].id, title: data[i].name, align: 'center', hide: true }); //隐藏id列
@@ -350,11 +341,12 @@
                                            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: 200 });
                                            break;
                                        default:
                                            if (data[i].name == '克重') {
                                                col.push({ field: data[i].id, title: data[i].name, align: 'center', sort: true, totalRow: true });
                                            } else {
                                                col.push({ field: data[i].id, title: data[i].name, align: 'center', sort: true });
                                            }
                                            col.push({ field: data[i].id, title: data[i].name, align: 'center', sort: true });
                                            //if (data[i].name == '克重') {
                                            //    col.push({ field: data[i].id, title: data[i].name, align: 'center', sort: true, totalRow: true });
                                            //} else {
                                            //    col.push({ field: data[i].id, title: data[i].name, align: 'center', sort: true });
                                            //}
                                    }
                                }
                            }
@@ -376,6 +368,10 @@
                            option.totalRow = true;
                            table.render(option);
                            ins = table.render(option);
                            $("#HSumRLQty").val(data1.data[0].HSumRLQty);
                            $("#HSumZJQty").val(data1.data[0].HSumZJQty);
                            //刷新表格数据
                            DisPlay_HideColumn();
                            layer.close(ajaxLoad);