duhe
2024-09-26 d8990b6ab903f9e9ee6a8634e5b0f42e534445d5
发货通知单:分页
2个文件已修改
167 ■■■■■ 已修改文件
WebTM/Properties/PublishProfiles/JFTM.pubxml.user 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WebTM/views/销售管理/发货通知单/Xs_SeOutStockBillList.html 163 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WebTM/Properties/PublishProfiles/JFTM.pubxml.user
@@ -6699,7 +6699,7 @@
      <publishTime>09/19/2024 10:08:59</publishTime>
    </File>
    <File Include="views/销售管理/发货通知单/Xs_SeOutStockBillList.html">
      <publishTime>09/11/2024 21:05:00</publishTime>
      <publishTime>09/26/2024 20:56:41</publishTime>
    </File>
    <File Include="views/销售管理/发货通知单/Xs_SeOutStockBillQuery.html">
      <publishTime>09/19/2024 10:08:59</publishTime>
@@ -6807,7 +6807,7 @@
      <publishTime>09/23/2024 10:51:16</publishTime>
    </File>
    <File Include="views/销售管理/发货通知单/Xs_SeOutStockBillList.html">
      <publishTime>09/11/2024 21:05:00</publishTime>
      <publishTime>09/26/2024 20:56:41</publishTime>
    </File>
    <File Include="views/销售管理/退货通知单/Xs_SeOutStockBackBillList.html">
      <publishTime>08/23/2024 15:38:54</publishTime>
WebTM/views/ÏúÊÛ¹ÜÀí/·¢»õ֪ͨµ¥/Xs_SeOutStockBillList.html
@@ -195,10 +195,11 @@
                                        </div>
                                    </div>
                                </div>
                                    </div>
                                </div>
                            </div>
                        </div>
                        <table class="" id="mainTable" lay-filter="mainTable"></table>
                        <div id="page" style="margin-top:30px;"></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-file-b"></i>新增</button>
@@ -246,9 +247,17 @@
                , laydate = layui.laydate
                , util = layui.util
                , soulTable = layui.soulTable
            var Organization = sessionStorage["Organization"];
            //查询条件
            var sWhere = "";
            var option = [];
            var page = 1;//分页数据
            var size = 50;
            var HModName = "Xs_SeOutStockBill";
            var HBillType = "1402";
@@ -286,12 +295,22 @@
            form.on('submit(btnReSearch)', function (data) {
                //清空过滤条件
                set_ClearQuery();
                if (page != 1) {
                    $("#page a:eq(1)").get(0).click();//点击分页栏第一页
                } else {
                    get_FastQuery(table, option);
                }
            });
            //#endregion
            //#region æŸ¥è¯¢æŒ‰é’®
            form.on('submit(btnSearch)', function (data) {
                get_FastQuery(table, option);
                if (page != 1) {
                    $("#page a:eq(1)").get(0).click();//点击分页栏第一页
                } else {
                    get_FastQuery(table, option);
                }
            });
            //#endregion
@@ -352,10 +371,10 @@
                    elem: '#mainTable'
                    , toolbar: '#toolbarDemo'
                    , height: 'full-50'
                    , page: true
                    //, page: true
                    , cellMinWidth: 90
                    , limit: 50
                    , limits: [50, 500, 5000, 20000]
                    //, limits: [50, 500, 5000, 20000]
                    , done: function (res, curr, count) {
                        soulTable.render(this);
                    }
@@ -427,6 +446,32 @@
                    ]]
                };
                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(table, option);
                        }
                    }
                }
                laypage.render(optionPage);
            }
            //#endregion  ç›‘听网格表体事件
@@ -540,6 +585,104 @@
                    }
                });
            }
            //#region æŸ¥è¯¢(主表)-分页
            function get_DisplayPage(sWhere) {
                var wait = layer.load();//遮罩
                var ajaxLoad = layer.load();
                $.ajax({
                    url: GetWEBURL() + '/Xs_SeOutStockBill/list_byPage',
                    type: "GET",
                    async: false,
                    data: { "sWhere": sWhere, "user": sessionStorage["HUserName"], "Organization": Organization, "page": page, "size": size },
                    success: function (data1) {
                        option.limit = size;//改变表格页大小
                        if (data1.count != 0) {
                            optionPage.count = data1.count;//改变列表数据总数
                            var data = [];//列字段数据
                            var col = [];
                            var totalArray = [];
                            //给空的数组赋值
                            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', totalRowText: '合计' });
                            for (var i = 0; i < data.length; i++) {//遍历data数组重的数据
                                // if (data[i].name == 'HInterID' || data[i].name == 'HBillType' || data[i].name == 'hmainid') {
                                if ($.inArray(data[i].name, titleData) > -1) {//检查data【i】.name是否在数组中  //计算列
                                    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: '单据号', event: '单据号', templet: function (d) {
                                            return '<span style="color: blue;">' + d.单据号 + '</span>'
                                        }, style: 'cursor: pointer;'
                                    });
                                } 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 == "行关闭日期" ? "行关闭人" : data[i].name) + " ==''?'':layui.util.toDateString(d." + data[i].name + ", 'yyyy-MM-dd HH:mm:ss')}}</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: 800
                                //, page: true
                                , totalRow: true
                                , cellMinWidth: 90
                                , limit: 50
                                //, limits: [50, 500, 5000, 20000]
                                , done: function (res, curr, count) {
                                    soulTable.render(this);
                                }
                            }
                            option.data = data1.data;
                            table.render(option);
                            laypage.render(optionPage);
                            layer.close(ajaxLoad);
                            DisPlay_HideColumn();
                            //刷新按钮显示
                            var btns = document.getElementsByTagName("button");     //获取本页所有按钮对象
                            Display_HideButton(btns, HBillType, HModName, sessionStorage["HUserName"]);
                            if ($("#Comparator").val() == 0 && $("#ColContent").val() == "") {
                                ColFilter();
                            }
                        } else {
                            optionPage.count = data1.count;//改变列表数据总数
                            laypage.render(optionPage);
                            option.data = [];
                            table.render(option);
                            layer.close(ajaxLoad);
                            /*layer.alert(data1.code + data1.Message, { icon: 5 });*/
                        }
                    }, error: function (e) {
                        layer.close(ajaxLoad);
                        layer.alert("接口请求失败!", { icon: 5 });
                    }
                });
                layer.close(wait);
            }
            //#endregion
            //头工具栏事件
            table.on('toolbar(mainTable)', function (obj) {
                var checkStatus = table.checkStatus(obj.config.id);
@@ -824,7 +967,8 @@
                    sWhere += " and ä¸»ç®¡ like '%" + HMangerID + "%'";
                }
                sWhere += addSWhereByOpenType();
                get_Display(sWhere);
                //get_Display(sWhere);
                get_DisplayPage(sWhere);
                sWhere = "";//调用接口后清空sWhere缓存
            }
            //#endregion
@@ -1314,6 +1458,10 @@
                            dataCol = data1.data[0].HGridString.split(',');
                            for (var i = 0; i < option.cols[0].length - 2; i++) {
                                if (dataCol.length <= i) {
                                    break;
                                }
                                var dataCols = dataCol[i].split('|');
                                //隐藏列
                                if (dataCols[1] == 1) {
@@ -1410,6 +1558,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) {