This commit is contained in:
haomingming
2023-04-11 18:41:46 +08:00
parent 3f40c4c237
commit 4f14aad6f3
53 changed files with 657 additions and 205 deletions
+40 -7
View File
@@ -6,23 +6,56 @@ Page({
data: {
navbarData: {
showCapsule: 1, //是否显示左上角图标 1表示显示 0表示不显示
title: '问诊详情 ', //导航栏 中间的标题
title: '收益明细 ', //导航栏 中间的标题
},
height: app.globalData.height,
current_page: 1,
list: [],
date: "",
current_page: 0,
total: 0,
per_page: 0,
last_page: 0
},
onReachBottom() {
console.log('===触底了!!===');
if(this.data.current_page < this.data.last_page){//最后一页时停止分页
this.getDoctorAccountInfo()
}
},
onLoad(option){
let date = option.date;
console.log(date);
//获取我的账户日账单明细数据
api.getDoctorAccountInfo({date:date}).then(response => {
this.setData({
date: date
})
},
onHide(){
this.setData({
list: [],
date: "",
current_page: 0,
total: 0,
per_page: 0,
last_page: 0
})
},
onShow(){
this.getDoctorAccountInfo();
},
getDoctorAccountInfo(){
let list = this.data.list
let params = {};
params.page = this.data.current_page + 1;
params.date = this.data.date;
api.getDoctorAccountInfo(params).then(response => {
console.log(response);
//暂没数据
this.setData({
list: list.concat(response.data.data),
current_page: response.data.current_page,
total: response.data.total,
per_page: response.data.per_page,
last_page: response.data.last_page,
})
}).catch(errors => {console.error(errors);})
}
})
+3 -1
View File
@@ -1,6 +1,8 @@
{
"component": true,
"usingComponents": {
"te-nav-bar": "/commpents/te_navbar"
"te-nav-bar": "/commpents/te_navbar",
"van-empty": "@vant/weapp/empty/index",
"van-divider": "@vant/weapp/divider/index"
}
}
+13 -26
View File
@@ -1,37 +1,24 @@
<!-- 收益明细 -->
<te-nav-bar navbar-data='{{navbarData}}' ></te-nav-bar>
<view class="container" style="height: calc(100vh - 96rpx - {{height}}px);">
<view class="container">
<view class="order_list">
<view class="order_item">
<view class="order_item" wx:for="{{list}}">
<view class="order_item_content">
<view class="order_item_content_top ">
快速问诊
<view class="order_status order_status_ing">接诊中</view>
{{ item.inquiry_type==1?'专家问诊':item.inquiry_type==2?'快速问诊':item.inquiry_type==3?'公益问诊':item.inquiry_type==4?'问诊购药':'其他' }}
<view class="order_status order_status_cancle">{{ item.inquiry_status==1?'待支付':item.inquiry_status==2?'待分配':item.inquiry_status==3?'待接诊':item.inquiry_status==4?'接诊中':item.inquiry_status==5?'已完成':item.inquiry_status==6?'问诊结束':item.inquiry_status==7?'已取消':'其他' }}</view>
</view>
<view class="order_item_content_data">
<view class="order_id">订单编号:<text style="font-size: 30rpx;color: #666666;">2131231xxxx</text></view>
<view class="order_id">就诊患者:<text style="font-size: 30rpx;color: #666666;">张三三(女,25岁)</text></view>
<view class="order_id">接诊时间:<text style="font-size: 30rpx;color: #666666;">2022-12-30 11:23:23</text></view>
<view class="order_id">结束时间:<text style="font-size: 30rpx;color: #666666;">2022-12-12 11:23:23</text></view>
<view class="order_id">订单金额:<text style="font-size: 30rpx;color: #666666;">¥1212.00</text></view>
<view class="order_id">预计收入:<text style="font-size: 30rpx;color: #666666;">¥112.00</text></view>
<view class="order_id">订单编号:<text style="font-size: 30rpx;color: #666666;">{{item.inquiry_no}}</text></view>
<view class="order_id">就诊患者:<text style="font-size: 30rpx;color: #666666;">{{item.patient_name}}({{item.patient_sex==1?'男':'女'}},{{item.patient_age}}岁)</text></view>
<view class="order_id">接诊时间:<text style="font-size: 30rpx;color: #666666;">{{item.reception_time}}</text></view>
<view class="order_id">结束时间:<text style="font-size: 30rpx;color: #666666;">{{item.finish_time}}</text></view>
<view class="order_id">订单金额:<text style="font-size: 30rpx;color: #666666;">¥{{item.amount_total}}</text></view>
<view class="order_id">预计收入:<text style="font-size: 30rpx;color: #666666;">¥{{item.estimate_income}}</text></view>
</view>
</view>
</view>
<view class="order_item">
<view class="order_item_content">
<view class="order_item_content_top">
快速问诊
<view class="order_status order_status_cancle">已取消</view>
</view>
<view class="order_item_content_data">
<view class="order_id">就诊患者:<text style="font-size: 30rpx;color: #666666;">张三三/18/男</text></view>
<view class="order_id">订单编号:<text style="font-size: 30rpx;color: #666666;">2131231xxxx</text></view>
<view class="order_id">订单金额:<text style="font-size: 30rpx;color: #666666;">¥1212.00</text></view>
<view class="order_id">完成时间:<text style="font-size: 30rpx;color: #666666;">2022.12.30</text></view>
</view>
</view>
</view>
</view>
<van-empty description="暂无数据" wx:if="{{list.length == 0}}" />
<van-divider contentPosition="center" wx:if="{{list.length > 0 && current_page == last_page}}">到底了~</van-divider>
</view>
</view>
+7 -5
View File
@@ -1,27 +1,29 @@
.container{
page{
background-color: #F4F4F4;
}
.container{
width: 100vw;
height: 100vh;
}
.order_list{
display: flex;
width: 92vw;
margin: 0 auto;
flex-direction: column;
padding-bottom: 50rpx;
}
.order_item{
display: flex;
width: 100%;
margin-top: 30rpx;
height: 500rpx;
}
.order_item_content{
flex: 10;
flex: 5;
background-color: #fff;
border-radius: 20rpx;
display: flex;
flex-direction: column;
padding: 20rpx;
height: 600rpx;
}
.order_item_content_top{
flex: 1;
@@ -45,7 +47,7 @@
color: #fff;
}
.order_item_content_data{
flex: 3;
flex: 5;
display: flex;
flex-direction: column;
}