From 8568a45885ee77a461f92fbd029ac7518d12c135 Mon Sep 17 00:00:00 2001 From: "3321822538@qq.com" <3321822538@qq.com> Date: Thu, 6 Jun 2024 18:02:54 +0800 Subject: [PATCH] aaa --- common/http.interceptor.js | 2 +- page_user/order/detailshop.vue | 84 +++++++++++++++++---- page_user/order/index.vue | 54 +++++++++----- page_user/order/xiangqing.vue | 8 +- page_user/shuju/index.vue | 6 +- pages/income/index.vue | 132 ++++++++++++++++++++++++++------- pages/myorder/index.vue | 3 + 7 files changed, 225 insertions(+), 64 deletions(-) diff --git a/common/http.interceptor.js b/common/http.interceptor.js index b06131f..bd14000 100644 --- a/common/http.interceptor.js +++ b/common/http.interceptor.js @@ -1,6 +1,6 @@ const install = (Vue, vm) => { Vue.prototype.$u.http.setConfig({ - baseUrl: 'http://192.168.2.24:3100/dev-api', + baseUrl: 'http://192.168.2.88:3100/dev-api', // baseUrl: 'https://znb.ccttiot.com', loadingText: '努力加载中~', loadingTime: 800, diff --git a/page_user/order/detailshop.vue b/page_user/order/detailshop.vue index 49fac5c..06ecac2 100644 --- a/page_user/order/detailshop.vue +++ b/page_user/order/detailshop.vue @@ -11,9 +11,10 @@ {{selector}} -- {{selectors}} - + - SDFGA5452168437113123 + SDFGA5452168437113123 @@ -58,10 +59,11 @@ - 订单金额 0.00 + 订单金额 0.00 - 租借中 + 租借中 @@ -90,12 +92,58 @@ selector: '2024-4-9', selectors: '2024-4-9', num: '', + status: '', + + pagenum: 1, + wateringList: [], + pagesize: 10, // 一页多少数据 + isLoading: false, // 是否正在加载数据 + noMoreData: false, // 是否没有更多数据 + total: 0, + keyword: '', + showflag: false } }, onLoad(option) { this.title = option.title + this.status = option.status }, methods: { + + getlist() { + this.$u.get('/agent/order/rent/list?pageNum=' + this.pagenum + '&pageSize=' + this.pagesize + '&orderNo=' + 1798627633516257280 + '&status=' + this.status).then(res => { + if (res.code == 200) { + this.total = res.total + if (this.total > 0) { + this.showflag = false + } else { + this.showflag = true + } + if (res.rows.length > 0) { + // 有数据,追加到列表 + this.wateringList = this.wateringList.concat(res.rows) + this.pagenum++ + } else { + // 没有更多数据 + this.noMoreData = true; + } + this.isLoading = false; + } + }) + }, + onReachBottom() { + let sum = this.total / this.pagesize + if (this.pagenum - 1 < sum) { + this.getlist(); // 上拉加载更多 + } else { + uni.showToast({ + title: '没有更多记录了', + icon: 'none', + duration: 1000 + }); + } + }, + btnks(num) { this.show = true if (num == 1) { @@ -111,9 +159,9 @@ this.selectors = e.year + '-' + e.month + '-' + e.day } }, - btnxq(){ + btnxq() { uni.navigateTo({ - url:'/page_user/order/xiangqing' + url: '/page_user/order/xiangqing' }) } } @@ -125,17 +173,20 @@ /deep/ .uicon-nav-back { padding-bottom: 40rpx; } + page {} .page { width: 750rpx; + .box { width: 750rpx; height: 100%; padding-bottom: 200rpx; background: #F4F5F7; border-radius: 0rpx 0rpx 0rpx 0rpx; - .list{ + + .list { width: 680rpx; height: 490rpx; background: #FFFFFF; @@ -144,7 +195,8 @@ box-sizing: border-box; margin: auto; margin-bottom: 30rpx; - .je{ + + .je { border-top: 1px solid #D8D8D8; display: flex; justify-content: space-between; @@ -152,20 +204,24 @@ margin-top: 20rpx; box-sizing: border-box; } - .list_val{ + + .list_val { display: flex; justify-content: space-between; margin-top: 28rpx; - .wz{ + + .wz { font-size: 24rpx; color: #808080; } - .gl{ + + .gl { font-size: 24rpx; color: #3D3D3D; } } - .tops{ + + .tops { display: flex; justify-content: space-between; width: 100%; @@ -173,6 +229,7 @@ padding-bottom: 20rpx; } } + .top { padding: 28rpx 32rpx; box-sizing: border-box; @@ -203,7 +260,8 @@ justify-content: space-between; background-color: #fff; padding-bottom: 40rpx; - margin-bottom: 26rpx; + margin-bottom: 26rpx; + text { padding: 6rpx 18rpx; box-sizing: border-box; diff --git a/page_user/order/index.vue b/page_user/order/index.vue index 6ea22e3..a521290 100644 --- a/page_user/order/index.vue +++ b/page_user/order/index.vue @@ -19,7 +19,7 @@ - 322110 + {{statuobj.total}} 订单总数 @@ -28,7 +28,7 @@ - 91 + {{statuobj.renting}} 租借中 @@ -37,7 +37,7 @@ - 322023 + {{statuobj.finished}} 已完成 @@ -48,7 +48,7 @@ - 32 + {{statuobj.popFailed}} 弹出失败 @@ -57,7 +57,7 @@ - 1256 + {{statuobj.sale}} 租转卖 @@ -66,7 +66,7 @@ - 5223 + {{statuobj.partRefund}} 部分退款 @@ -76,7 +76,7 @@ - 1235 + {{statuobj.allRefund}} 已全额退款 @@ -85,7 +85,7 @@ - 96 + {{statuobj.waitPay}} 待扣款 @@ -114,14 +114,26 @@ lasTime:'', num: '', dateindex: 1, + statuobj:{} } }, onLoad() { let today = new Date(); this.firsTime = this.formatDate(today); this.lasTime = this.formatDate(today); + this.getlist() + }, + onShow() { + }, methods: { + getlist(){ + this.$u.get('/agent/order/rent/indexCount?startDate=' + this.firsTime + '&endDate=' + this.lasTime).then(res=>{ + if(res.code == 200){ + this.statuobj = res.data + } + }) + }, btnks(num) { this.show = true if (num == 1) { @@ -132,43 +144,45 @@ }, confirm(e) { if (this.num == 1) { - this.selector = e.year + '-' + e.month + '-' + e.day + this.firsTime = e.year + '-' + e.month + '-' + e.day + this.getlist() } else { - this.selectors = e.year + '-' + e.month + '-' + e.day + this.lasTime = e.year + '-' + e.month + '-' + e.day + this.getlist() } }, btnpage(num){ if(num == 0){ uni.navigateTo({ - url:'/page_user/order/detailshop?title=' + '订单总数列表' + url:'/page_user/order/detailshop?title=' + '订单总数列表' + '&status=' + '' }) }else if(num == 1){ uni.navigateTo({ - url:'/page_user/order/detailshop?title=' + '租借中列表' + url:'/page_user/order/detailshop?title=' + '租借中列表' + '&status=' + 1 }) }else if(num == 2){ uni.navigateTo({ - url:'/page_user/order/detailshop?title=' + '已完成列表' + url:'/page_user/order/detailshop?title=' + '已完成列表' + '&status=' + 4 }) }else if(num == 3){ uni.navigateTo({ - url:'/page_user/yunying/gongdan/tanchu' + url:'/page_user/order/detailshop?title=' + '弹出失败列表' + '&status=' + 7 }) }else if(num == 4){ uni.navigateTo({ - url:'/page_user/order/detailshop?title=' + '租转卖列表' + url:'/page_user/order/detailshop?title=' + '租转卖列表' + '&status=' + 6 }) }else if(num == 5){ uni.navigateTo({ - url:'/page_user/order/detailshop?title=' + '部分退款列表' + url:'/page_user/order/detailshop?title=' + '部分退款列表' + '&status=' + 9 }) }else if(num == 6){ uni.navigateTo({ - url:'/page_user/order/detailshop?title=' + '已全额退款列表' + url:'/page_user/order/detailshop?title=' + '已全额退款列表' + '&status=' + 8 }) }else if(num == 7){ uni.navigateTo({ - url:'/page_user/order/detailshop?title=' + '待扣款列表' + url:'/page_user/order/detailshop?title=' + '待扣款列表' + '&status=' + 2 }) } }, @@ -179,22 +193,26 @@ let today = new Date(); this.firsTime = this.formatDate(today); this.lasTime = this.formatDate(today); + this.getlist() } else if (num == 2) { let yesterday = new Date(); yesterday.setDate(yesterday.getDate() - 1); this.firsTime = this.formatDate(yesterday); this.lasTime = this.formatDate(new Date()); + this.getlist() } else if (num == 3) { let today = new Date(); let firstDayOfMonth = new Date(today.getFullYear(), today.getMonth(), today.getDate() - 6); this.firsTime = this.formatDate(firstDayOfMonth); this.lasTime = this.formatDate(new Date()); + this.getlist() } else if (num == 4) { let today = new Date(); let firstDayOfLastMonth = new Date(today.getFullYear(), today.getMonth() - 1,today.getDate() + 1); let lastDayOfLastMonth = new Date(today.getFullYear(), today.getMonth(), today.getDate()); this.firsTime = this.formatDate(firstDayOfLastMonth); this.lasTime = this.formatDate(lastDayOfLastMonth); + this.getlist() } }, formatDate(date) { diff --git a/page_user/order/xiangqing.vue b/page_user/order/xiangqing.vue index 28e25b6..d31c337 100644 --- a/page_user/order/xiangqing.vue +++ b/page_user/order/xiangqing.vue @@ -14,7 +14,7 @@ 电池编号: GFVDSG126420921 - 租借店铺: 星途自助台球棋牌室 + 租借店铺: 星途自助台球棋牌室 租借设备: GDFFS4569875213 @@ -23,10 +23,10 @@ 租借时间: 2024-04-11 02:58:22 - 租借地址: 福建省宁德市福鼎市海口路28号途客中国酒店 (福鼎海口路) + 租借地址: 福建省宁德市福鼎市海口路28号途客中国酒店 (福鼎海口路) - 归还店铺: 星途自助台球棋牌室 + 归还店铺: 星途自助台球棋牌室 归还设备: GDFFS4569875213 @@ -35,7 +35,7 @@ 归还时间: 2024-04-11 02:58:22 - 归还地址: 福建省宁德市福鼎市海口路28号途客中国酒店 (福鼎海口路) + 归还地址: 福建省宁德市福鼎市海口路28号途客中国酒店 (福鼎海口路) 支付时间: 2024-04-11 02:58:22 diff --git a/page_user/shuju/index.vue b/page_user/shuju/index.vue index a901585..e5f04e1 100644 --- a/page_user/shuju/index.vue +++ b/page_user/shuju/index.vue @@ -37,10 +37,12 @@ url:'/page_user/shuju/lsfx' }) }else if(num == 2){ - + uni.navigateTo({ + url:'/pages/income/index?tit=' + '门店流水' + '&tits=' + '流水金额' + }) }else if(num == 3){ uni.navigateTo({ - url:'/pages/income/index' + url:'/pages/income/index?tit=' + '门店收益' + '&tits=' + '收益金额' }) } } diff --git a/pages/income/index.vue b/pages/income/index.vue index b21d069..09a3b02 100644 --- a/pages/income/index.vue +++ b/pages/income/index.vue @@ -1,10 +1,10 @@