小小儁爺
2025-12-31 e85057e243138f5ddf8a2b7c427fdefdec2c6879
1.工单列表新增分页功能
已修改4个文件
260 ■■■■■ 文件已修改
pages/scgl/scbg.vue 71 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pages/zlgl/sjjy.vue 63 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pages/zlgl/wgjy.vue 63 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pages/zlgl/xjjy.vue 63 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pages/scgl/scbg.vue
@@ -40,7 +40,9 @@
        <!-- 折叠面板 -->
        <!-- <u-collapse @change="change" @close="close" @open="open"> -->
        <!-- @change="collapseChange" -->
        <u-collapse style="max-height: 590px;overflow: auto;">
        <u-collapse style="max-height: 65vh;overflow: auto;">
            <!-- :value='parseFloat(item.ordergoodqty)+"/"+parseFloat(item.orderqty)' -->
            <scroll-view scroll-y :style="{height: 590 + 'px'}" @scrolltolower="loadMore">
                <u-collapse-item style="position: relative;" :title="item.ordercode" :name='item.ordercode'
@@ -124,6 +126,14 @@
                </u-collapse-item>
            </scroll-view>
        </u-collapse>
        <view class="uni-pagination-box">
            <uni-pagination show-icon :page-size="pageSize" :current="currentpage" :total="total"
                @change="pageChange" />
        </view>
        <!-- 弹出层 -->
@@ -295,7 +305,10 @@
                    // },
                ], //已选中的产品标签
                order: '', //单号
                placeholder2: '生产订单'
                placeholder2: '生产订单',
                total: 10,
                currentpage: 1, //第几页
                pageSize: 10, //每页显示多少条
            }
        },
@@ -321,7 +334,7 @@
        mounted() {
            this.init()
            this.getProductOrderSearch()
            this.getProductOrderSearch(1)
        },
        methods: {
            init() {
@@ -353,8 +366,14 @@
                })
            },
            // 页数改变时  分页触发
            pageChange(e) {
                this.getProductOrderSearch(e.current)
            },
            // 接口获取
            async getProductOrderSearch() {
            async getProductOrderSearch(current) {
                let ordertype = '' // SO:销售订单  MO:生产订单  PO:生产工单
                switch (this.radiovalue) {
                    case '生产工单':
@@ -384,14 +403,19 @@
                    Ratetime: '',
                    // Ratetime: this.calendarRange,
                }
                const {
                    data: res
                } = await ProductOrderSearch(data)
                    page: current,
                    rows: this.pageSize,
                    prop: 'lm_date',
                    sortorder: 'desc'
                this.collapseArr = res
                this.collapseArrAll = res
                this.alertTitle = this.alertTitle.split('/')[0] + this.collapseArr.length + this.alertTitle.split('/')[
                }
                const res = await ProductOrderSearch(data)
                this.total = res.count
                this.collapseArr = res.data
                this.collapseArrAll = res.data
                this.alertTitle = this.alertTitle.split('/')[0] + this.total + this.alertTitle.split('/')[
                    1]
            },
@@ -408,17 +432,20 @@
                switch (this.radiovalue) {
                    case '生产工单':
                        this.alertTitle = '工单数量(共/个)'
                        this.alertTitle = '工单数量(共' + this.total + '个)'
                        break
                    case '生产订单':
                        this.alertTitle = '生产订单数量(共/个)'
                        this.alertTitle = '工单数量(共' + this.total + '个)'
                        break
                    case '销售订单':
                        this.alertTitle = '销售订单数量(共/个)'
                        this.alertTitle = '工单数量(共' + this.total + '个)'
                        break
                }
                this.alertTitle = this.alertTitle.split('/')[0] + this.collapseArr.length + this.alertTitle.split('/')[
                    1]
                // this.alertTitle = this.alertTitle.split('/')[0] + this.collapseArr.length + this.alertTitle.split('/')[
                //     1]
            },
@@ -489,7 +516,7 @@
            // 弹出层收起
            popupClose() {
                this.getProductOrderSearch()
                this.getProductOrderSearch(1)
                this.popupShow = false
            },
@@ -667,4 +694,14 @@
    ::v-deep .u-cell__body {
        padding-bottom: 40rpx;
    }
    .uni-pagination-box {
        height: 4vh;
        margin: 1vh 0;
        display: flex;
        align-items: center;
        justify-content: center;
        // background-color: #fff;
    }
</style>
pages/zlgl/sjjy.vue
@@ -40,7 +40,7 @@
        <!-- 折叠面板 -->
        <!-- <u-collapse @change="change" @close="close" @open="open"> -->
        <!-- @change="collapseChange" -->
        <u-collapse style="max-height: 590px;overflow: auto;">
        <u-collapse style="max-height: 65vh;overflow: auto;">
            <!-- :value='parseFloat(item.ordergoodqty)+"/"+parseFloat(item.orderqty)' -->
            <scroll-view scroll-y :style="{height: 590 + 'px'}" @scrolltolower="loadMore">
                <u-collapse-item style="position: relative;" :title="item.ordercode" :name='item.ordercode'
@@ -125,6 +125,10 @@
            </scroll-view>
        </u-collapse>
        <view class="uni-pagination-box">
            <uni-pagination show-icon :page-size="pageSize" :current="currentpage" :total="total"
                @change="pageChange" />
        </view>
        <!-- 弹出层 -->
        <!-- closeIconPos='top-left' closeOnClickOverlay  closeable='true' -->
@@ -295,7 +299,10 @@
                    // },
                ], //已选中的产品标签
                order: '', //单号
                placeholder2: '生产订单'
                placeholder2: '生产订单',
                total: 10,
                currentpage: 1, //第几页
                pageSize: 10, //每页显示多少条
            }
        },
@@ -321,11 +328,15 @@
        mounted() {
            this.init()
            this.getProductOrderSearch()
            this.getProductOrderSearch(1)
        },
        methods: {
            init() {
                uni.stopPullDownRefresh();
            },
            // 页数改变时  分页触发
            pageChange(e) {
                this.getProductOrderSearch(e.current)
            },
            gotoPage(p1, p2) {
                let orderstep = null
@@ -354,7 +365,7 @@
            },
            // 接口获取
            async getProductOrderSearch() {
            async getProductOrderSearch(current) {
                let ordertype = '' // SO:销售订单  MO:生产订单  PO:生产工单
                switch (this.radiovalue) {
                    case '生产工单':
@@ -383,15 +394,16 @@
                    ordercode: this.order,
                    Ratetime: '',
                    // Ratetime: this.calendarRange,
                    page: current,
                    rows: this.pageSize,
                    prop: 'lm_date',
                    sortorder: 'desc'
                }
                const {
                    data: res
                } = await ProductOrderSearch(data)
                this.collapseArr = res
                this.collapseArrAll = res
                this.alertTitle = this.alertTitle.split('/')[0] + this.collapseArr.length + this.alertTitle.split('/')[
                const res = await ProductOrderSearch(data)
                this.total = res.count
                this.collapseArr = res.data
                this.collapseArrAll = res.data
                this.alertTitle = this.alertTitle.split('/')[0] + this.total + this.alertTitle.split('/')[
                    1]
            },
@@ -405,22 +417,20 @@
                    return p.ordercode.indexOf(val) !== -1
                })
                switch (this.radiovalue) {
                    case '生产工单':
                        this.alertTitle = '工单数量(共/个)'
                        this.alertTitle = '工单数量(共' + this.total + '个)'
                        break
                    case '生产订单':
                        this.alertTitle = '工单数量(共/个)'
                        // this.alertTitle = '生产订单数量(共/个)'
                        this.alertTitle = '工单数量(共' + this.total + '个)'
                        break
                    case '销售订单':
                        this.alertTitle = '工单数量(共/个)'
                        // this.alertTitle = '销售订单数量(共/个)'
                        this.alertTitle = '工单数量(共' + this.total + '个)'
                        break
                }
                this.alertTitle = this.alertTitle.split('/')[0] + this.collapseArr.length + this.alertTitle.split('/')[
                    1]
                // this.alertTitle = this.alertTitle.split('/')[0] + this.collapseArr.length + this.alertTitle.split('/')[
                //     1]
            },
@@ -491,7 +501,7 @@
            // 弹出层收起
            popupClose() {
                this.getProductOrderSearch()
                this.getProductOrderSearch(1)
                this.popupShow = false
            },
@@ -669,4 +679,15 @@
    ::v-deep .u-cell__body {
        padding-bottom: 40rpx;
    }
    .uni-pagination-box {
        height: 4vh;
        margin: 1vh 0;
        display: flex;
        align-items: center;
        justify-content: center;
        // background-color: #fff;
    }
</style>
pages/zlgl/wgjy.vue
@@ -40,7 +40,7 @@
        <!-- 折叠面板 -->
        <!-- <u-collapse @change="change" @close="close" @open="open"> -->
        <!-- @change="collapseChange" -->
        <u-collapse style="max-height: 590px;overflow: auto;">
        <u-collapse style="max-height: 65vh;overflow: auto;">
            <!-- :value='parseFloat(item.ordergoodqty)+"/"+parseFloat(item.orderqty)' -->
            <scroll-view scroll-y :style="{height: 590 + 'px'}" @scrolltolower="loadMore">
                <u-collapse-item style="position: relative;" :title="item.ordercode" :name='item.ordercode'
@@ -125,6 +125,10 @@
            </scroll-view>
        </u-collapse>
        <view class="uni-pagination-box">
            <uni-pagination show-icon :page-size="pageSize" :current="currentpage" :total="total"
                @change="pageChange" />
        </view>
        <!-- 弹出层 -->
        <!-- closeIconPos='top-left' closeOnClickOverlay  closeable='true' -->
@@ -295,7 +299,10 @@
                    // },
                ], //已选中的产品标签
                order: '', //单号
                placeholder2: '生产订单'
                placeholder2: '生产订单',
                total: 10,
                currentpage: 1, //第几页
                pageSize: 10, //每页显示多少条
            }
        },
@@ -321,11 +328,15 @@
        mounted() {
            this.init()
            this.getProductOrderSearch()
            this.getProductOrderSearch(1)
        },
        methods: {
            init() {
                uni.stopPullDownRefresh();
            },
            // 页数改变时  分页触发
            pageChange(e) {
                this.getProductOrderSearch(e.current)
            },
            gotoPage(p1, p2) {
                let orderstep = null
@@ -354,7 +365,7 @@
            },
            // 接口获取
            async getProductOrderSearch() {
            async getProductOrderSearch(current) {
                let ordertype = '' // SO:销售订单  MO:生产订单  PO:生产工单
                switch (this.radiovalue) {
                    case '生产工单':
@@ -383,15 +394,16 @@
                    ordercode: this.order,
                    Ratetime: '',
                    // Ratetime: this.calendarRange,
                    page: current,
                    rows: this.pageSize,
                    prop: 'lm_date',
                    sortorder: 'desc'
                }
                const {
                    data: res
                } = await ProductOrderSearch(data)
                this.collapseArr = res
                this.collapseArrAll = res
                this.alertTitle = this.alertTitle.split('/')[0] + this.collapseArr.length + this.alertTitle.split('/')[
                const res = await ProductOrderSearch(data)
                this.total = res.count
                this.collapseArr = res.data
                this.collapseArrAll = res.data
                this.alertTitle = this.alertTitle.split('/')[0] + this.total + this.alertTitle.split('/')[
                    1]
            },
@@ -405,22 +417,20 @@
                    return p.ordercode.indexOf(val) !== -1
                })
                switch (this.radiovalue) {
                    case '生产工单':
                        this.alertTitle = '工单数量(共/个)'
                        this.alertTitle = '工单数量(共' + this.total + '个)'
                        break
                    case '生产订单':
                        this.alertTitle = '工单数量(共/个)'
                        // this.alertTitle = '生产订单数量(共/个)'
                        this.alertTitle = '工单数量(共' + this.total + '个)'
                        break
                    case '销售订单':
                        this.alertTitle = '工单数量(共/个)'
                        // this.alertTitle = '销售订单数量(共/个)'
                        this.alertTitle = '工单数量(共' + this.total + '个)'
                        break
                }
                this.alertTitle = this.alertTitle.split('/')[0] + this.collapseArr.length + this.alertTitle.split('/')[
                    1]
                // this.alertTitle = this.alertTitle.split('/')[0] + this.collapseArr.length + this.alertTitle.split('/')[
                //     1]
            },
@@ -491,7 +501,7 @@
            // 弹出层收起
            popupClose() {
                this.getProductOrderSearch()
                this.getProductOrderSearch(1)
                this.popupShow = false
            },
@@ -669,4 +679,15 @@
    ::v-deep .u-cell__body {
        padding-bottom: 40rpx;
    }
    .uni-pagination-box {
        height: 4vh;
        margin: 1vh 0;
        display: flex;
        align-items: center;
        justify-content: center;
        // background-color: #fff;
    }
</style>
pages/zlgl/xjjy.vue
@@ -40,7 +40,7 @@
        <!-- 折叠面板 -->
        <!-- <u-collapse @change="change" @close="close" @open="open"> -->
        <!-- @change="collapseChange" -->
        <u-collapse style="max-height: 590px;overflow: auto;">
        <u-collapse style="max-height: 65vh;overflow: auto;">
            <!-- :value='parseFloat(item.ordergoodqty)+"/"+parseFloat(item.orderqty)' -->
            <scroll-view scroll-y :style="{height: 590 + 'px'}" @scrolltolower="loadMore">
                <u-collapse-item style="position: relative;" :title="item.ordercode" :name='item.ordercode'
@@ -125,6 +125,10 @@
            </scroll-view>
        </u-collapse>
        <view class="uni-pagination-box">
            <uni-pagination show-icon :page-size="pageSize" :current="currentpage" :total="total"
                @change="pageChange" />
        </view>
        <!-- 弹出层 -->
        <!-- closeIconPos='top-left' closeOnClickOverlay  closeable='true' -->
@@ -295,7 +299,10 @@
                    // },
                ], //已选中的产品标签
                order: '', //单号
                placeholder2: '生产订单'
                placeholder2: '生产订单',
                total: 10,
                currentpage: 1, //第几页
                pageSize: 10, //每页显示多少条
            }
        },
@@ -321,11 +328,15 @@
        mounted() {
            this.init()
            this.getProductOrderSearch()
            this.getProductOrderSearch(1)
        },
        methods: {
            init() {
                uni.stopPullDownRefresh();
            },
            // 页数改变时  分页触发
            pageChange(e) {
                this.getProductOrderSearch(e.current)
            },
            gotoPage(p1, p2) {
                let orderstep = null
@@ -354,7 +365,7 @@
            },
            // 接口获取
            async getProductOrderSearch() {
            async getProductOrderSearch(current) {
                let ordertype = '' // SO:销售订单  MO:生产订单  PO:生产工单
                switch (this.radiovalue) {
                    case '生产工单':
@@ -383,15 +394,16 @@
                    ordercode: this.order,
                    Ratetime: '',
                    // Ratetime: this.calendarRange,
                    page: current,
                    rows: this.pageSize,
                    prop: 'lm_date',
                    sortorder: 'desc'
                }
                const {
                    data: res
                } = await ProductOrderSearch(data)
                this.collapseArr = res
                this.collapseArrAll = res
                this.alertTitle = this.alertTitle.split('/')[0] + this.collapseArr.length + this.alertTitle.split('/')[
                const res = await ProductOrderSearch(data)
                this.total = res.count
                this.collapseArr = res.data
                this.collapseArrAll = res.data
                this.alertTitle = this.alertTitle.split('/')[0] + this.total + this.alertTitle.split('/')[
                    1]
            },
@@ -405,22 +417,20 @@
                    return p.ordercode.indexOf(val) !== -1
                })
                switch (this.radiovalue) {
                    case '生产工单':
                        this.alertTitle = '工单数量(共/个)'
                        this.alertTitle = '工单数量(共' + this.total + '个)'
                        break
                    case '生产订单':
                        this.alertTitle = '工单数量(共/个)'
                        // this.alertTitle = '生产订单数量(共/个)'
                        this.alertTitle = '工单数量(共' + this.total + '个)'
                        break
                    case '销售订单':
                        this.alertTitle = '工单数量(共/个)'
                        // this.alertTitle = '销售订单数量(共/个)'
                        this.alertTitle = '工单数量(共' + this.total + '个)'
                        break
                }
                this.alertTitle = this.alertTitle.split('/')[0] + this.collapseArr.length + this.alertTitle.split('/')[
                    1]
                // this.alertTitle = this.alertTitle.split('/')[0] + this.collapseArr.length + this.alertTitle.split('/')[
                //     1]
            },
@@ -491,7 +501,7 @@
            // 弹出层收起
            popupClose() {
                this.getProductOrderSearch()
                this.getProductOrderSearch(1)
                this.popupShow = false
            },
@@ -669,4 +679,15 @@
    ::v-deep .u-cell__body {
        padding-bottom: 40rpx;
    }
    .uni-pagination-box {
        height: 4vh;
        margin: 1vh 0;
        display: flex;
        align-items: center;
        justify-content: center;
        // background-color: #fff;
    }
</style>