|
|
|
|
@ -5,9 +5,10 @@
|
|
|
|
|
<u-tabs-swiper :height="76" :font-size="24" active-color="#c20d12" bg-color="transparent"
|
|
|
|
|
inactive-color="#999" ref="tabs" :list="tabs" :current="swiperCurrent" @change="change"
|
|
|
|
|
:is-scroll="false" :offset="[5, 5]" swiperWidth="750"></u-tabs-swiper>
|
|
|
|
|
</view>
|
|
|
|
|
<swiper class="swiper-box" :current="swiperCurrent" @transition="transition"
|
|
|
|
|
@animationfinish="animationfinish">
|
|
|
|
|
</view>
|
|
|
|
|
<!-- @transition="transition"
|
|
|
|
|
@animationfinish="animationfinish" -->
|
|
|
|
|
<swiper class="swiper-box" :current="swiperCurrent" @animationfinish="animationfinish" >
|
|
|
|
|
<swiper-item class="swiper-item" v-for="(swiper, swiperIndex) in tabs" :key="swiperIndex">
|
|
|
|
|
<scroll-view scroll-y style="height: 100%; width: 100%" @scrolltolower="reachBottom">
|
|
|
|
|
<view>
|
|
|
|
|
@ -16,14 +17,15 @@
|
|
|
|
|
<view class="title__name">
|
|
|
|
|
<u-tag size="mini" type="primary" mode="dark" shape="circleLeft"
|
|
|
|
|
:text="i.type === 1 ? '陪诊' : '陪护'"></u-tag>
|
|
|
|
|
<text style="padding-left: 10rpx;">专享半天陪诊</text>
|
|
|
|
|
<text style="padding-left: 10rpx;">{{i.accompany_product?i.accompany_product.name:''}}</text>
|
|
|
|
|
</view>
|
|
|
|
|
<view class="title__status">{{ statusFormat(i.pay_status) }}</view>
|
|
|
|
|
</view>
|
|
|
|
|
|
|
|
|
|
<view class="price">
|
|
|
|
|
<view class="price-icon">
|
|
|
|
|
<u-icon :name="i.cover ? i.cover.url : vuex_default_icon" size="30"></u-icon>
|
|
|
|
|
<view class="price-icon">
|
|
|
|
|
<image style="width:90rpx" mode="widthFix" :src="i.accompany_product?(i.accompany_product.cover?i.accompany_product.cover.url:vuex_default_icon):vuex_default_icon"></image>
|
|
|
|
|
<!-- <u-icon :name="" size="30"></u-icon> -->
|
|
|
|
|
</view>
|
|
|
|
|
|
|
|
|
|
<view class="price-text">
|
|
|
|
|
@ -34,40 +36,48 @@
|
|
|
|
|
</view>
|
|
|
|
|
|
|
|
|
|
<view class="info" @click.stop.native="$u.route({
|
|
|
|
|
url: '/package_sub/pages/AddOrder/AddOrder',
|
|
|
|
|
params: {
|
|
|
|
|
order_id: i.id,
|
|
|
|
|
type: i.type,
|
|
|
|
|
site_id: i.hospital.site_id
|
|
|
|
|
}
|
|
|
|
|
})">
|
|
|
|
|
url: '/package_sub/pages/AddOrder/AddOrder',
|
|
|
|
|
params: {
|
|
|
|
|
order_id: i.id,
|
|
|
|
|
type: i.type,
|
|
|
|
|
site_id: i.hospital?i.hospital.site_id:''
|
|
|
|
|
}
|
|
|
|
|
})">
|
|
|
|
|
<view class="info__item">
|
|
|
|
|
<text>就诊人</text>
|
|
|
|
|
<text>{{i.type == 1 ? '被服务人' : '被服务人'}}</text>
|
|
|
|
|
<text>{{ i.user_archive ? i.user_archive.name : i.user_archive_id }}</text>
|
|
|
|
|
</view>
|
|
|
|
|
<view class="info__item">
|
|
|
|
|
<text>就诊城市</text>
|
|
|
|
|
<text>{{ i.city || ((i.hospital && i.hospital.site) ? i.hospital.site.name : "") || " " }}</text>
|
|
|
|
|
</view>
|
|
|
|
|
<view class="info__item flex100">
|
|
|
|
|
<text>{{(i.type == 1 ? '就诊' : '服务') + '时间'}}</text>
|
|
|
|
|
<text>{{ i.time ? $moment(i.time).format('YYYY年MM月DD日 HH:mm') : '' }}</text>
|
|
|
|
|
</view>
|
|
|
|
|
<view class="info__item" v-if="i.type==2">
|
|
|
|
|
<text>详细地址</text>
|
|
|
|
|
<text>{{ i.city || " " }}</text>
|
|
|
|
|
</view>
|
|
|
|
|
<view class="info__item flex100" v-if="i.type==1">
|
|
|
|
|
<text>就诊医院</text>
|
|
|
|
|
<text>{{ i.hospital ? i.hospital.name : '' }}</text>
|
|
|
|
|
</view>
|
|
|
|
|
|
|
|
|
|
<view class="info__item flex100">
|
|
|
|
|
<text>就诊时间</text>
|
|
|
|
|
<text>{{ i.time ? $moment(i.time).format('YYYY年MM月DD日 HH:mm') : '' }}</text>
|
|
|
|
|
</view>
|
|
|
|
|
<view class="info__item flex100">
|
|
|
|
|
<text>下单时间: </text>
|
|
|
|
|
<text>{{ i.created_at ? $moment(i.created_at).format('YYYY年MM月DD日 HH:mm') : '' }}</text>
|
|
|
|
|
</view>
|
|
|
|
|
</view>
|
|
|
|
|
|
|
|
|
|
<view class="bottom">
|
|
|
|
|
<view class="row1">
|
|
|
|
|
<view class="time">
|
|
|
|
|
<text>下单时间: </text>
|
|
|
|
|
<text>{{ i.created_at ? $moment(i.created_at).format('YYYY年MM月DD日 HH:mm') : '' }}</text>
|
|
|
|
|
</view>
|
|
|
|
|
|
|
|
|
|
<u-button ripple shape="circle" :custom-style="payBtnStyle"
|
|
|
|
|
<view class="row1" style="justify-content: flex-end;">
|
|
|
|
|
<u-button v-if="i.pay_status === 0" ripple shape="circle" :custom-style="editBtnStyle"
|
|
|
|
|
:throttle-time="2000" @click="$u.route({
|
|
|
|
|
url: '/package_sub/pages/AddOrder/editOrder',
|
|
|
|
|
params: {
|
|
|
|
|
order_id: i.id,
|
|
|
|
|
type: i.type,
|
|
|
|
|
site_id: i.hospital ? i.hospital.site_id : ''
|
|
|
|
|
}
|
|
|
|
|
})">修改信息</u-button>
|
|
|
|
|
|
|
|
|
|
<u-button style="margin-left:20rpx" ripple shape="circle" :custom-style="payBtnStyle"
|
|
|
|
|
:throttle-time="2000" @click="$u.route({
|
|
|
|
|
url: '/package_sub/pages/AddOrder/AddOrder',
|
|
|
|
|
params: {
|
|
|
|
|
@ -95,6 +105,7 @@
|
|
|
|
|
|
|
|
|
|
</view>
|
|
|
|
|
<Tabbar />
|
|
|
|
|
<floatPhone></floatPhone>
|
|
|
|
|
</view>
|
|
|
|
|
</template>
|
|
|
|
|
|
|
|
|
|
@ -105,7 +116,16 @@
|
|
|
|
|
Tabbar,
|
|
|
|
|
},
|
|
|
|
|
data() {
|
|
|
|
|
return {
|
|
|
|
|
return {
|
|
|
|
|
editBtnStyle:{
|
|
|
|
|
"background-image": "linear-gradient(-90deg, #ddd 0%, #ccc 94%, #ccc 100%)",
|
|
|
|
|
"font-weight": "500",
|
|
|
|
|
"font-size": "28rpx",
|
|
|
|
|
color: "#fff",
|
|
|
|
|
width: "185rpx",
|
|
|
|
|
height: "60rpx",
|
|
|
|
|
"line-height": "60rpx",
|
|
|
|
|
},
|
|
|
|
|
payBtnStyle: {
|
|
|
|
|
"background-image": "linear-gradient(-90deg, #e26165 0%, #c10d12 94%, #c10d12 100%)",
|
|
|
|
|
"font-weight": "500",
|
|
|
|
|
@ -187,7 +207,8 @@
|
|
|
|
|
this.getOrder()
|
|
|
|
|
},
|
|
|
|
|
// tab栏切换
|
|
|
|
|
change(index) {
|
|
|
|
|
change(index) {
|
|
|
|
|
console.log("index",index)
|
|
|
|
|
this.swiperCurrent = index;
|
|
|
|
|
},
|
|
|
|
|
transition({
|
|
|
|
|
@ -217,12 +238,16 @@
|
|
|
|
|
this.loadStatus[this.swiperCurrent] = 'loading'
|
|
|
|
|
const res = await this.$u.api.accompanyOrders(this.select);
|
|
|
|
|
console.log(res);
|
|
|
|
|
this.tabs[this.swiperCurrent].count = res.total;
|
|
|
|
|
this.tabs[0].count = res.pay_status_count_0+res.pay_status_count_1+res.pay_status_count_2+res.pay_status_count_3;
|
|
|
|
|
this.tabs[1].count = res.pay_status_count_0;
|
|
|
|
|
this.tabs[2].count = res.pay_status_count_1;
|
|
|
|
|
this.tabs[3].count = res.pay_status_count_2;
|
|
|
|
|
this.tabs[4].count = res.pay_status_count_3;
|
|
|
|
|
if (isRefresh) {
|
|
|
|
|
this.list[this.swiperCurrent].length = 0;
|
|
|
|
|
}
|
|
|
|
|
this.list[this.swiperCurrent].push(...res.data)
|
|
|
|
|
if (this.list[this.swiperCurrent].length >= res.total) {
|
|
|
|
|
this.list[this.swiperCurrent].push(...res.order.data)
|
|
|
|
|
if (this.list[this.swiperCurrent].length >= res.order.total) {
|
|
|
|
|
this.loadStatus[this.swiperCurrent] = 'nomore'
|
|
|
|
|
} else {
|
|
|
|
|
this.select.page++;
|
|
|
|
|
@ -339,7 +364,7 @@
|
|
|
|
|
width: 90rpx;
|
|
|
|
|
height: 84rpx;
|
|
|
|
|
border-radius: 10rpx;
|
|
|
|
|
background-color: #f3e7d8;
|
|
|
|
|
// background-color: #f3e7d8;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
&-text {
|
|
|
|
|
|