This commit is contained in:
许允枞 2025-04-10 13:06:09 +08:00
parent 780a3a9a16
commit b1fba5d056

View File

@ -36,15 +36,15 @@
<view class="three_" @click="goordercount">
<view class="three_box1">
<view class="">当日订单</view>
<view class="num_">{{ threenum.todayOrderNum }}</view>
<view class="num_">{{ threenum.allNum }}</view>
</view>
<view class="three_box2">
<view class="">已完成</view>
<view class="num_">{{ threenum.workedNum }}</view>
<view class="num_">{{ threenum.ywcNum }}</view>
</view>
<view class="three_box3">
<view class="">未完成</view>
<view class="num_">{{ threenum.uncompletedNum }}</view>
<view class="num_">{{ threenum.jxzNum }}</view>
</view>
</view>
@ -113,15 +113,19 @@
<view class="hang_"></view>
<view class="list_">
<view class="title_">预约记录</view>
<view v-if="goodsList.length == 0">
<u-empty
mode="list"
icon="http://www.nuoyunr.com/lananRsc/detection/qs.png"
>
</u-empty>
<view style="margin-bottom: 30rpx;">
<u-search placeholder="请输入车牌号或手机号" v-model="phoneNum" @search="pageNum=1;goodsList=[];getappointment()"
@custom="pageNum=1;goodsList=[];getappointment()" @change="clearTime()"></u-search>
</view>
<view class="box_" v-for="(item,index) in goodsList" :key="index" v-else>
<view v-if="goodsList.length == 0" style="background-color: #F7F8FC;padding: 35rpx 0;">
<u-empty mode="list" icon="http://www.nuoyunr.com/lananRsc/detection/qs.png">
</u-empty>
</view>
<!-- 使用 scroll-view 包裹 SchoolInfo 组件 -->
<scroll-view class="school-scroll-view" scroll-y @scrolltolower="onReachBottomCus"
:style="{ height: scrollHeight + 'px' }" refresher-enabled @refresherrefresh="onRefresherrefresh"
:refresher-triggered="isTriggered" v-else>
<view class="box_" v-for="(item,index) in goodsList" :key="index">
<view style="display: flex;justify-content: space-between;">
<view class="box_ds">
<view class="box_title">{{ item.goodsTitle }}</view>
@ -139,7 +143,8 @@
<image src="/static/imgs/car.png" style="width: 36rpx; height: 36rpx; " mode=""></image>
<view class="size_">车牌号{{ item.carNo || '' }}</view>
</view>
<image src="/static/imgs/tel.png" style="width: 36rpx; height: 36rpx; " @click="gettel(item)" mode=""></image>
<image src="/static/imgs/tel.png" style="width: 36rpx; height: 36rpx; " @click="gettel(item)"
mode=""></image>
</view>
<view class="bd">
<view class="left_">预约人</view>
@ -158,9 +163,11 @@
<view class="right_">自来客户</view>
</view>
<view class="bd">
<view class="" style="color:rgb(60, 156, 255);" @click="previewImage(item.driverLicenesImg)" v-if="item.driverLicenesImg">查看行驶证</view>
<view class="" style="color:rgb(60, 156, 255);" @click="previewImage(item.driverLicenesImg)"
v-if="item.driverLicenesImg">查看行驶证</view>
</view>
</view>
</scroll-view>
</view>
<!-- 底部 -->
@ -170,12 +177,17 @@
</template>
<script>
import {getStorageWithExpiry, setStorageWithExpiry} from "@/utils/auth";
import request from "@/utils/request";
import config from "@/config";
import {formatDateChinese} from "@/utils/utils";
import {
getStorageWithExpiry,
setStorageWithExpiry
} from "@/utils/auth";
import request from "@/utils/request";
import config from "@/config";
import {
formatDateChinese
} from "@/utils/utils";
export default {
export default {
data() {
return {
titles: "首页",
@ -186,6 +198,7 @@ export default {
warnMsg: [],
chuan: '',
titlemodeal: '通知',
phoneNum: '',
isWorking: false,
user: {},
baseUrl: '',
@ -198,7 +211,7 @@ export default {
ping: [],
dateStr: '',
week: '',
time:'',
time: '',
is_mandatory: false,
url: 'http://159.75.168.143:88/apk/lanan.apk',
title: '版本升级',
@ -217,6 +230,8 @@ export default {
totalPages: 0,
timer: null,
timer2: null,
isTriggered: false,
scrollHeight: 0,
}
},
onShow() {
@ -232,7 +247,7 @@ export default {
this.getAppointAndPickNum()
let that = this
this.timer = setInterval(function () {
this.timer = setInterval(function() {
that.getappointment()
}, 10000);
this.setTime = setInterval(() => {
@ -267,26 +282,85 @@ export default {
// this.getappointment()
},
onPullDownRefresh() {
console.log("刷新");
uni.stopPullDownRefresh()
},
onReachBottom() {
if (this.pageNum >= this.totalPages) {
uni.showToast({
title: '没有下一页数据',
icon: 'none'
})
} else {
this.pageNum++
this.getappointment()
clearInterval(this.timer);
this.timer = null;
}
// onPullDownRefresh() {
// console.log("");
// uni.stopPullDownRefresh()
// },
// onReachBottom() {
// if (this.pageNum >= this.totalPages) {
// uni.showToast({
// title: '',
// icon: 'none'
// })
// } else {
// this.pageNum++
// this.getappointment()
// clearInterval(this.timer);
// this.timer = null;
// }
// },// onPullDownRefresh() {
// console.log("");
// uni.stopPullDownRefresh()
// },
// onReachBottom() {
// if (this.pageNum >= this.totalPages) {
// uni.showToast({
// title: '',
// icon: 'none'
// })
// } else {
// this.pageNum++
// this.getappointment()
// clearInterval(this.timer);
// this.timer = null;
// }
// },
onReady() {
//
this.calculateScrollHeight();
},
methods: {
formatDateChinese,
calculateScrollHeight() {
//
const screenHeight = uni.getSystemInfoSync().windowHeight;
//
const topHeight = 360;
//
this.scrollHeight = screenHeight - topHeight;
},
clearTime() {
console.log('只能够了');
clearInterval(this.timer);
this.timer = null;
},
/**
* 上滑加载数据
*/
onReachBottomCus() {
// *
if (this.pageNum >= this.totalPages) {
uni.$u.toast('没有更多数据了')
return
}
//+1,
this.pageNum++
//
this.getappointment()
//
this.clearTime()
},
/**
* 下拉刷新数据
*/
onRefresherrefresh() {
this.isTriggered = true
this.pageNum = 1
this.total = 0
this.schoolList = []
this.getappointment()
},
goInternalManagement() {
uni.navigateTo({
url: '/pages/manage/internalManagement'
@ -301,7 +375,7 @@ export default {
loop: true //
});
},
goAddOrder(data){
goAddOrder(data) {
uni.navigateTo({
url: `/pages/index/Neworder?appointmentId=${data.id}`
})
@ -372,13 +446,12 @@ export default {
}
uni.downloadFile({
url: this.$baseImageUrl + old,
success: function (res) {
success: function(res) {
var filePath = res.tempFilePath;
uni.openDocument({
filePath: filePath,
showMenu: true,
success: function (res) {
}
success: function(res) {}
});
}
});
@ -508,22 +581,26 @@ export default {
}
//
let reszj = await request({
url: '/partnerOwn/partner/statisticsInfo?partnerId=' + this.partnerId,
url: '/partnerOwn/partner/staticsTable2',
method: 'get',
})
let nums = {
orderAmount: reszj.data.orderAmount / 100,
orderNum: reszj.data.orderNum,
todayOrderAmount: reszj.data.todayOrderAmount / 100,
todayOrderNum: reszj.data.todayOrderNum,
workedNum: reszj.data.workedNum,
workingNum: reszj.data.workingNum,
srlNum: reszj.data.srlNum,
hgNum: reszj.data.hgNum,
uncompletedNum: reszj.data.uncompletedNum,
pamars: {
startTime: new Date(),
endTime: new Date()
}
this.threenum = nums
})
// let nums = {
// orderAmount: reszj.data.orderAmount / 100,
// orderNum: reszj.data.orderNum,
// todayOrderAmount: reszj.data.todayOrderAmount / 100,
// todayOrderNum: reszj.data.todayOrderNum,
// workedNum: reszj.data.workedNum,
// workingNum: reszj.data.workingNum,
// srlNum: reszj.data.srlNum,
// hgNum: reszj.data.hgNum,
// uncompletedNum: reszj.data.uncompletedNum,
// }
this.threenum = reszj.data
//
@ -564,6 +641,7 @@ export default {
let total = res.total
this.totalPages = Math.ceil(total / this.pageSize);
}
this.isTriggered = false
},
timeWeekFormat() {
const now = new Date();
@ -586,61 +664,60 @@ export default {
}
}
}
}
</script>
<style scoped lang="scss">
image {
image {
width: 100%;
height: 100%;
}
}
.content {
}
.content {}
.top_ {
.top_ {
width: 100%;
height: 284rpx;
background: linear-gradient(180deg, #054DF3 0%, #55A3FF 100%);
box-sizing: border-box;
padding: 30rpx;
padding-top: 80rpx;
}
}
.logo_imgs {
.logo_imgs {
width: 160rpx;
height: 40rpx;
margin: 20rpx 0rpx;
}
}
.t_box {
.t_box {
display: flex;
align-items: center;
justify-content: space-between;
}
}
.picture_ {
.picture_ {
overflow: hidden;
width: 90rpx;
height: 90rpx;
border-radius: 50%;
margin-right: 20rpx;
}
}
.d_s {
.d_s {
display: flex;
}
}
.name_ {
.name_ {
font-size: 32rpx;
color: #FFFFFF;
margin-bottom: 10rpx;
}
}
.bqing_ {
.bqing_ {
border-radius: 16rpx;
border: 2rpx solid #FFFFFF;
box-sizing: border-box;
@ -648,9 +725,9 @@ image {
font-size: 22rpx;
padding: 2px 5px;
}
}
.icon1 {
.icon1 {
position: relative;
width: 56rpx;
height: 56rpx;
@ -670,30 +747,30 @@ image {
border-radius: 50%;
top: -15rpx;
}
}
}
.three_ {
.three_ {
width: 100%;
box-sizing: border-box;
padding: 30rpx;
display: flex;
align-items: center;
justify-content: space-between;
}
}
.jg_box {
.jg_box {
width: 100%;
box-sizing: border-box;
padding: 30rpx;
}
}
.list_ {
.list_ {
width: 100%;
box-sizing: border-box;
padding: 30rpx;
}
}
.three_box1 {
.three_box1 {
width: 216rpx;
height: 116rpx;
background-image: url('/static/imgs/t1.png');
@ -703,9 +780,9 @@ image {
font-size: 24rpx;
color: #101A3E;
}
}
.three_box2 {
.three_box2 {
width: 216rpx;
height: 116rpx;
background-image: url('/static/imgs/t2.png');
@ -714,9 +791,9 @@ image {
padding: 14rpx 18rpx;
font-size: 24rpx;
color: #101A3E;
}
}
.three_box3 {
.three_box3 {
width: 216rpx;
height: 116rpx;
background-image: url('/static/imgs/t3.png');
@ -725,29 +802,29 @@ image {
padding: 14rpx 18rpx;
font-size: 24rpx;
color: #101A3E;
}
}
.num_ {
.num_ {
font-size: 36rpx;
color: #101A3E;
margin-top: 20rpx;
}
}
.hang_ {
.hang_ {
width: 100%;
height: 30rpx;
background: #F7F8FC;
}
}
.jg_top {
.jg_top {
font-size: 32rpx;
color: #000000;
box-sizing: border-box;
padding-bottom: 30rpx;
border-bottom: 1px solid #F5F5F5;
}
}
.jg_ds {
.jg_ds {
width: 100%;
display: flex;
align-items: center;
@ -755,18 +832,18 @@ image {
box-sizing: border-box;
padding: 30rpx 0rpx;
border-bottom: 1px solid #F5F5F5;
}
}
.jg_bt {
.jg_bt {
width: 100%;
display: flex;
align-items: center;
justify-content: space-between;
box-sizing: border-box;
padding: 30rpx 0rpx;
}
}
.jg_ys {
.jg_ys {
font-size: 24rpx;
color: #101A3E;
text-align: center;
@ -776,9 +853,9 @@ image {
height: 80rpx;
margin-bottom: 5rpx;
}
}
}
.jg_ys1 {
.jg_ys1 {
font-size: 24rpx;
color: #101A3E;
text-align: center;
@ -788,15 +865,15 @@ image {
height: 48rpx;
margin-bottom: 5rpx;
}
}
}
.title_ {
.title_ {
font-size: 32rpx;
color: #000000;
margin-bottom: 30rpx;
}
}
.box_ {
.box_ {
width: 100%;
box-sizing: border-box;
padding: 30rpx;
@ -804,15 +881,15 @@ image {
border-radius: 8rpx;
margin-bottom: 30rpx;
}
}
.box_ds {
.box_ds {
display: flex;
align-items: center;
width: 80%;
}
}
.box_bd {
.box_bd {
display: flex;
align-items: center;
justify-content: space-between;
@ -820,39 +897,42 @@ image {
box-sizing: border-box;
padding-bottom: 20rpx;
border-bottom: 1px solid #E3ECFB;
}
}
.bd {
.bd {
display: flex;
align-items: center;
justify-content: space-between;
font-size: 28rpx;
margin: 20rpx 0rpx;
}
}
.box_title {
.box_title {
font-size: 32rpx;
color: #101A3E;
margin-right: 10rpx;
white-space: nowrap; /* 禁止换行 */
overflow: hidden; /* 超出部分隐藏 */
text-overflow: ellipsis; /* 超出部分显示省略号 */
}
white-space: nowrap;
/* 禁止换行 */
overflow: hidden;
/* 超出部分隐藏 */
text-overflow: ellipsis;
/* 超出部分显示省略号 */
}
.size_ {
.size_ {
font-size: 24rpx;
color: #366FFF;
margin-left: 10rpx;
}
}
.left_ {
.left_ {
font-size: 28rpx;
color: #8D90A6;
}
}
.right_ {
.right_ {
font-size: 28rpx;
color: #101A3E;
}
}
</style>