duhe
2024-09-26 d85d1e2cc42e45ffb99f48a438c8cf9acb49bab1
工序进站接收单维护:分页
2个文件已修改
152 ■■■■■ 已修改文件
WebTM/Properties/PublishProfiles/JFTM.pubxml.user 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WebTM/views/车间管理/工序进站接收单/Cj_StationInBillList.html 148 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WebTM/Properties/PublishProfiles/JFTM.pubxml.user
@@ -6321,13 +6321,13 @@
      <publishTime>06/13/2024 14:47:29</publishTime>
    </File>
    <File Include="views/车间管理/工序进站接收单/Cj_StationInBillList.html">
      <publishTime>07/15/2024 09:58:59</publishTime>
      <publishTime>09/26/2024 11:19:07</publishTime>
    </File>
    <File Include="views/车间管理/工序进站接收单/Cj_StationInBill.html">
      <publishTime>06/13/2024 14:47:29</publishTime>
    </File>
    <File Include="views/车间管理/工序进站接收单/Cj_StationInBillList.html">
      <publishTime>07/15/2024 09:58:59</publishTime>
      <publishTime>09/26/2024 11:19:07</publishTime>
    </File>
    <File Include="views/车间管理/工序进站接收单/Cj_StationInBillList_QiaoYi.html">
      <publishTime>01/08/2024 14:40:30</publishTime>
WebTM/views/³µ¼ä¹ÜÀí/¹¤Ðò½øÕ¾½ÓÊÕµ¥/Cj_StationInBillList.html
@@ -55,10 +55,10 @@
                                        <input type="date" class="layui-input ForFilteringSchemes" id="HEndDate" style="width:190px;">
                                    </div>
                                </div>
                                <button class="layui-btn layuiadmin-btn-order" type="button" lay-submit="" style="display:none;" lay-filter="btnSearch" id="btnSearch">
                                <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; display: none;">重置</button>
                                <button class="layui-btn layuiadmin-btn-order" type="button" lay-submit="" lay-filter="btnReSearch" id="btnReSearch" style="padding: 0 5px;">重置</button>
                                <!--显示当前过滤方案-->
                                <div class="layui-inline" style="margin-left:5px;">
                                    <div style="text-align:center;font-size:15px;font-weight:bold;color:#fc9393" id="HFilterScheme_Now"></div>
@@ -166,6 +166,7 @@
                            </div>
                        </div>
                        <table class="" id="mainTable" lay-filter="mainTable"></table>
                        <div id="page"></div>
                        <script type="text/html" id="toolbarDemo">
                            <div class="layui-btn-container">
                                <button type="button" class="layui-btn layui-btn-sm" style="display:none;" lay-event="btn-Add" id="btn-Add"><i class="layui-icon layui-icon-add-1"></i>新增</button>
@@ -212,9 +213,14 @@
                , laydate = layui.laydate
                , util = layui.util
                , soulTable = layui.soulTable
            var Organization = sessionStorage["Organization"];
            //公用变量
            var sWhere = "";
            var option = [];
            var page = 1;//分页数据
            var size = 50;
            var ins;                        //用于导出excel
            var HModName = "Cj_StationInBillList";
            var titleData = ["hmainid", "HProcID", "HMaterID", "HEmpID", "HSourceID", "HGroupID", "HInterID", "HProcExchInterID", "HProcExchEntryID", "HICMOInterID", "HICMOEntryID"];//不需要显示的字段 å¯æ‰©å±•
@@ -252,11 +258,21 @@
            //重置按钮
            form.on('submit(btnReSearch)', function (data) {
                set_ClearQuery();
                if (page != 1) {
                    $("#page a:eq(1)").get(0).click();//点击分页栏第一页
                } else {
                    get_FastQuery();
                }
            });
            //查询按钮
            form.on('submit(btnSearch)', function (data) {
                if (page != 1) {
                    $("#page a:eq(1)").get(0).click();//点击分页栏第一页
                } else {
                get_FastQuery();
                }
            });
            //#region é€‰æ‹©ç”Ÿäº§è½¦é—´æŒ‰é’®
@@ -448,12 +464,12 @@
                    elem: '#mainTable'
                    , toolbar: '#toolbarDemo'
                    , defaultToolbar: ['filter', 'exports', 'print']
                    , height: 'full-50'
                    , page: true
                    , height: 'full-80'
                    //, page: true
                    , totalRow: true
                    , cellMinWidth: 90
                    , limit: 50
                    , limits: [50, 500, 5000, 20000]
                    //, limits: [50, 500, 5000, 20000]
                    , cols: [[
                        { type: 'checkbox', fixed: 'left' }
                        , { field: 'hmainid', title: 'hmainid', sort: true, hide: true }
@@ -493,6 +509,32 @@
                        none: '无数据!'
                    }
                };
                optionPage = {
                    elem: 'page', //注意,这里的 page æ˜¯ ID,不用加 # å·
                    count: 10000, //数据总数,从服务端得到
                    limit: 50,
                    limits: [50, 500, 5000, 50000],
                    layout: ['count', 'prev', 'page', 'next', 'limit', 'skip'],
                    jump: function (obj, first) {
                        //console.log(obj)
                        //obj包含了当前分页的所有参数,比如:
                        //console.log(obj.curr); //得到当前页,以便向服务端请求对应页的数据。
                        //console.log(obj.limit); //得到每页显示的条数
                        //首次不执行
                        if (!first) {
                            //do something
                            console.log(obj)
                            page = obj.curr;
                            size = obj.limit;
                            get_FastQuery();
                        }
                    }
                }
                laypage.render(optionPage);
                set_ClearQuery();
                get_FastQuery();
            }
@@ -608,6 +650,96 @@
                layer.close(wait);
            }
            //#region æŸ¥è¯¢-分页
            function get_DisplayPage(sWhere) {
                var wait = layer.load();//遮罩
                var ajaxLoad = layer.load();
                $.ajax({
                    url: GetWEBURL() + '/Cj_StationInBill/get_Display_byPage',
                    type: "GET",
                    async:false,
                    data: { "sWhere": sWhere, "user": sessionStorage["HUserName"], "Organization": Organization, "page": page, "size": size, "HBillSubType": "3790" },
                    success: function (data1) {
                        option.limit = size;//改变表格页大小
                        if (data1.count != 0) {
                            optionPage.count = data1.count;//改变列表数据总数
                            var totalArray = ["LOT数量", "接收数量", "流转卡数量"];
                            var data = [];
                            var col = [];
                            //给空的数组赋值
                            for (var key in data1.list) {
                                data.push({ "id": data1.list[key].ColmCols, "name": data1.list[key].ColmCols, "Type": data1.list[key].ColmType });
                            }
                            //在列表左边添加勾选框
                            col.push({ type: 'checkbox', fixed: 'left' });
                            for (var i = 0; i < data.length; i++) {
                                // if (data[i].name == 'HInterID' || data[i].name == 'HBillType' || data[i].name == 'hmainid') {
                                if ($.inArray(data[i].name, titleData) > -1) {
                                    col.push({ field: data[i].id, title: data[i].name, align: 'center', hide: true }); //隐藏id列
                                }
                                else if ($.inArray(data[i].name, totalArray) > -1) {
                                    col.push({ field: data[i].id, title: data[i].name, align: 'center', sort: true, totalRow: true, width: 120 });
                                } else if (data[i].name == '单据号') {
                                    col.push({ field: data[i].id, title: data[i].name, align: 'center', sort: true, width: 200, event: '单据号' });
                                }
                                else {
                                    switch (data[i].Type) {
                                        //int
                                        case 'DateTime':
                                            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:
                                            col.push({ field: data[i].id, title: data[i].name, align: 'center', sort: true, width: 200 });
                                    }
                                }
                            }
                            //动态显示列名
                            option = {
                                elem: '#mainTable'
                                , toolbar: '#toolbarDemo'
                                , cols: [col]
                                , data: data1.data
                                , height: 'full-80'
                                //, page: true
                                , totalRow: true
                                , cellMinWidth: 90
                                , limit: 50
                                //, limits: [50, 500, 5000, 20000]
                                , done: function (res, curr, count) {
                                    soulTable.render(this);
                                }
                            }
                            ins = table.render(option);
                            laypage.render(optionPage);
                            //刷新表格数据
                            DisPlay_HideColumn();
                            var btns = document.getElementsByTagName("button");     //获取本页所有按钮对象
                            Display_HideButton(btns, "3790", HModName, sessionStorage["HUserName"]);
                            layer.close(ajaxLoad);
                            if ($("#Comparator").val() == 0 && $("#ColContent").val() == "") {
                                ColFilter();
                            }
                            //layer.alert("查询成功", { icon: 1 });
                        } else {
                            option.data = [];
                            table.render(option);
                            layer.close(ajaxLoad);
                            /*layer.alert(data1.code + data1.Message, { icon: 5 });*/
                        }
                    }, error: function () {
                        layer.close(ajaxLoad);
                        layer.alert("接口请求失败!", { icon: 5 });
                    }
                });
                layer.close(wait);
            }
            //#endregion
            //快速过滤
            function get_FastQuery() {
                //判断是否为下查操作,若是则变更查询单号和时间过滤条件
@@ -709,7 +841,10 @@
                    }
                }
                sWhere += "  and HBillSubType<>'SUB'";
                get_Display(sWhere);
                //get_Display(sWhere);
                get_DisplayPage(sWhere);
                sWhere = "";//调用接口后清空sWhere缓存
            }
@@ -895,6 +1030,7 @@
                $.ajax({
                    url: GetWEBURL() + '/Xt_FastICScheme/Chooselist',
                    type: "GET",
                    async: false,
                    data: { "user": sessionStorage["Czybm"], "HModuleName": HModuleName, "HInterID": 0, "Type": "Default" },
                    success: function (data1) {
                        if (data1.count == 1) {