2022-10-28 15:37:07 +08:00
|
|
|
|
<template>
|
|
|
|
|
|
<view class="app">
|
2022-11-15 15:36:29 +08:00
|
|
|
|
<view class="" v-if="total>0">
|
|
|
|
|
|
<view class="item" v-for="(item,index) in list" :key="index">
|
|
|
|
|
|
<view class="name">
|
|
|
|
|
|
{{item.createTime}}
|
|
|
|
|
|
<span>{{item.orderStatus=='WAIT_PAY'?'待付款':''}}
|
|
|
|
|
|
{{item.orderStatus=='PAY'?'已付款':''}}
|
|
|
|
|
|
{{item.orderStatus=='WAIT_DISPATCH'?'待服务':''}}
|
|
|
|
|
|
{{item.orderStatus=='NOT_FINISH'?'待完成':''}}
|
2022-12-01 17:03:02 +08:00
|
|
|
|
{{item.orderStatus=='COMPLETE'?'待评价':''}}
|
2022-11-23 16:41:09 +08:00
|
|
|
|
{{item.orderStatus=='EVALUATED'?'服务完成':''}}
|
2022-11-15 15:36:29 +08:00
|
|
|
|
{{item.orderStatus=='WAIT_REFUND'?'退款中':''}}
|
|
|
|
|
|
{{item.orderStatus=='REFUNDED'?'已退款':''}}
|
|
|
|
|
|
{{item.orderStatus=='CANCEL'?'已取消':''}}
|
|
|
|
|
|
</span>
|
|
|
|
|
|
</view>
|
|
|
|
|
|
<view class="detailslist" @tap="gofinished(item)">
|
|
|
|
|
|
<image :src="baseurl+item.itemPictureUrl" mode=""></image>
|
|
|
|
|
|
<view class="model">
|
|
|
|
|
|
<view class="top">
|
|
|
|
|
|
<span>{{item.nurseItemName}}</span>
|
|
|
|
|
|
<span>¥{{item.totalPrice}}</span>
|
|
|
|
|
|
</view>
|
|
|
|
|
|
<view class="bottom">
|
|
|
|
|
|
<span>服务时长:{{item.itemServeDurationUnit}}</span>
|
|
|
|
|
|
</view>
|
2022-10-28 15:37:07 +08:00
|
|
|
|
</view>
|
|
|
|
|
|
</view>
|
2022-11-15 15:36:29 +08:00
|
|
|
|
<view class="submit" @tap='buy(item)' style="background-color:coral;"
|
|
|
|
|
|
v-if="item.orderStatus=='WAIT_PAY'">
|
|
|
|
|
|
去支付
|
|
|
|
|
|
</view>
|
|
|
|
|
|
<!-- <view class="submit" style="background-color: crimson;" v-if="item.orderStatus=='WAIT_REFUND'">退款进度</view> -->
|
|
|
|
|
|
<!-- <view class="submit"
|
|
|
|
|
|
v-if="item.orderStatus=='PAY'||item.orderStatus=='WAIT_DISPATCH'||item.orderStatus=='NOT_FINISH'">
|
|
|
|
|
|
确认完成
|
|
|
|
|
|
</view> -->
|
2022-11-03 17:26:15 +08:00
|
|
|
|
</view>
|
2022-11-15 15:36:29 +08:00
|
|
|
|
</view>
|
|
|
|
|
|
<view class="noorder" v-else>
|
|
|
|
|
|
<image src="../../static/noorder.png" mode=""></image>
|
|
|
|
|
|
<view class="">
|
|
|
|
|
|
暂无服务订单
|
2022-11-03 17:26:15 +08:00
|
|
|
|
</view>
|
2022-10-28 15:37:07 +08:00
|
|
|
|
</view>
|
|
|
|
|
|
</view>
|
|
|
|
|
|
</template>
|
|
|
|
|
|
|
|
|
|
|
|
<script>
|
2022-11-01 13:49:13 +08:00
|
|
|
|
import baseurl from '@/api/baseurl.js'
|
|
|
|
|
|
import {
|
|
|
|
|
|
appServiceOrder
|
|
|
|
|
|
} from '@/api/Nursingstationserviceorder/Nursingstationserviceorder.js'
|
2022-10-28 15:37:07 +08:00
|
|
|
|
export default {
|
|
|
|
|
|
data() {
|
|
|
|
|
|
return {
|
2022-11-03 17:26:15 +08:00
|
|
|
|
baseurl: '',
|
|
|
|
|
|
patientId: null,
|
2022-11-15 15:36:29 +08:00
|
|
|
|
total: 0,
|
2022-11-01 13:49:13 +08:00
|
|
|
|
pageNum: 1,
|
|
|
|
|
|
pageSize: 10,
|
|
|
|
|
|
list: [],
|
2022-10-28 15:37:07 +08:00
|
|
|
|
}
|
|
|
|
|
|
},
|
2022-11-09 16:38:05 +08:00
|
|
|
|
onShow() {
|
2022-11-03 17:26:15 +08:00
|
|
|
|
this.baseurl = baseurl
|
|
|
|
|
|
let that = this
|
2022-11-09 16:38:05 +08:00
|
|
|
|
try {
|
|
|
|
|
|
const value = uni.getStorageSync('patientId');
|
|
|
|
|
|
if (value) {
|
|
|
|
|
|
that.patientId = value
|
2022-11-03 17:26:15 +08:00
|
|
|
|
that.getinfo()
|
|
|
|
|
|
}
|
2022-11-09 16:38:05 +08:00
|
|
|
|
} catch (e) {}
|
2022-11-01 13:49:13 +08:00
|
|
|
|
},
|
2022-11-09 16:38:05 +08:00
|
|
|
|
onLoad() {},
|
2022-10-28 15:37:07 +08:00
|
|
|
|
methods: {
|
2022-11-03 17:26:15 +08:00
|
|
|
|
//支付
|
|
|
|
|
|
buy(item) {
|
|
|
|
|
|
|
|
|
|
|
|
},
|
2022-11-01 13:49:13 +08:00
|
|
|
|
getinfo() {
|
2022-11-03 17:26:15 +08:00
|
|
|
|
appServiceOrder(this.patientId, this.pageSize, this.pageNum).then(res => {
|
|
|
|
|
|
this.list = res.rows;
|
|
|
|
|
|
this.total = res.total
|
2022-11-01 13:49:13 +08:00
|
|
|
|
})
|
|
|
|
|
|
},
|
2022-11-03 17:26:15 +08:00
|
|
|
|
gofinished(item) {
|
2022-10-28 15:37:07 +08:00
|
|
|
|
uni.navigateTo({
|
2022-11-11 17:23:23 +08:00
|
|
|
|
url: `/pages/ServiceDetails/ServiceDetails?orderNo=${item.orderNo}`
|
2022-10-28 15:37:07 +08:00
|
|
|
|
})
|
2022-11-09 16:40:20 +08:00
|
|
|
|
}
|
2022-11-03 17:26:15 +08:00
|
|
|
|
},
|
|
|
|
|
|
onReachBottom() { //下滑加载
|
|
|
|
|
|
if (this.list.length >= this.total) {} else {
|
|
|
|
|
|
this.pageNum++
|
|
|
|
|
|
appServiceOrder(this.patientId, this.pageSize, this.pageNum).then(res => {
|
|
|
|
|
|
res.rows.forEach(e => {
|
|
|
|
|
|
this.list.push(e)
|
|
|
|
|
|
})
|
|
|
|
|
|
})
|
|
|
|
|
|
}
|
|
|
|
|
|
},
|
|
|
|
|
|
onPullDownRefresh() { //下拉刷新
|
|
|
|
|
|
this.pageNum = 1;
|
|
|
|
|
|
this.getinfo()
|
|
|
|
|
|
setTimeout(function() {
|
|
|
|
|
|
uni.stopPullDownRefresh();
|
|
|
|
|
|
}, 1000);
|
|
|
|
|
|
},
|
2022-10-28 15:37:07 +08:00
|
|
|
|
}
|
|
|
|
|
|
</script>
|
|
|
|
|
|
|
|
|
|
|
|
<style lang="scss">
|
2022-11-03 17:26:15 +08:00
|
|
|
|
@import './Nursingstationserviceorder.scss';
|
2022-10-28 15:37:07 +08:00
|
|
|
|
</style>
|