分包医生
This commit is contained in:
@@ -0,0 +1,106 @@
|
||||
import { API } from '../../../../utils/network/api'
|
||||
|
||||
const api = new API()
|
||||
const app = getApp()
|
||||
Page({
|
||||
data: {
|
||||
navbarData: {
|
||||
showCapsule: 1, //是否显示左上角图标 1表示显示 0表示不显示
|
||||
title: '问诊订单', //导航栏 中间的标题
|
||||
},
|
||||
height: app.globalData.height,
|
||||
result: [],
|
||||
order_list:[],
|
||||
current_page: 0,
|
||||
total: 0,
|
||||
per_page: 10,
|
||||
last_page: 0,
|
||||
allchecked: false,
|
||||
select_order_length: 0,
|
||||
select_order_amount: 0,
|
||||
select_order_inquiry_id: []
|
||||
},
|
||||
onChange(event) {
|
||||
console.log("onChange: ",event)
|
||||
this.setData({
|
||||
result: event.detail,
|
||||
});
|
||||
this.resetSelectOrder();
|
||||
this.setData({
|
||||
allchecked: this.data.result.length == this.data.order_list.length
|
||||
})
|
||||
},
|
||||
onAllChange(event) {
|
||||
console.log("onAllChange: ",event)
|
||||
this.setData({
|
||||
allchecked: event.detail
|
||||
})
|
||||
if(event.detail == true){
|
||||
this.data.order_list.forEach((item,index) => {
|
||||
this.data.result.push(""+index);
|
||||
})
|
||||
this.setData({
|
||||
result: this.data.result
|
||||
})
|
||||
}
|
||||
if(event.detail == false){
|
||||
this.setData({
|
||||
result: []
|
||||
})
|
||||
}
|
||||
this.resetSelectOrder();
|
||||
},
|
||||
resetSelectOrder(e){
|
||||
let result = this.data.result;
|
||||
let select_order_amount = 0;
|
||||
let select_order_inquiry_id = [];
|
||||
result.forEach(item => {
|
||||
select_order_amount = Number(select_order_amount) + Number(this.data.order_list[item].expected_amount_total);
|
||||
select_order_inquiry_id.push(this.data.order_list[item].order_inquiry_id);
|
||||
})
|
||||
this.setData({
|
||||
select_order_length: result.length,
|
||||
select_order_amount: select_order_amount,
|
||||
select_order_inquiry_id: select_order_inquiry_id
|
||||
})
|
||||
},
|
||||
selectOrder(e){
|
||||
const { index } = e.currentTarget.dataset;
|
||||
const checkbox = this.selectComponent(`.checkboxes-${index}`);
|
||||
checkbox.toggle();
|
||||
},
|
||||
getDoctorWithdrawalOrder(){
|
||||
//可提现问诊订单列表
|
||||
let params = {};
|
||||
params.page = this.data.current_page + 1;
|
||||
params.per_page = this.data.per_page;
|
||||
api.getDoctorWithdrawalOrder(params).then(response => {
|
||||
console.log(response);
|
||||
let list = this.data.order_list
|
||||
if(response.data.total > 0){
|
||||
this.setData({
|
||||
order_list: list.concat(response.data.data),
|
||||
current_page: response.data.current_page,
|
||||
per_page: response.data.per_page,
|
||||
last_page: response.data.last_page
|
||||
})
|
||||
}
|
||||
}).catch(errors => {console.error(errors);})
|
||||
},
|
||||
onShow(){
|
||||
this.getDoctorWithdrawalOrder();
|
||||
this.resetSelectOrder();
|
||||
},
|
||||
onReachBottom() {
|
||||
console.log('===触底了!!===');
|
||||
if(this.data.current_page < this.data.last_page){//最后一页时停止分页
|
||||
this.getDoctorWithdrawalOrder()
|
||||
}
|
||||
},
|
||||
confirmOrder(){
|
||||
const select_order_inquiry_id = this.data.select_order_inquiry_id;
|
||||
console.log(select_order_inquiry_id);
|
||||
let order_inquiry_ids = select_order_inquiry_id.join(",");
|
||||
app.go("/user/pages/yishi/cash/index?order_inquiry_ids="+order_inquiry_ids);
|
||||
}
|
||||
})
|
||||
@@ -0,0 +1,12 @@
|
||||
{
|
||||
"component": true,
|
||||
"usingComponents": {
|
||||
"te-nav-bar": "../../../../commpents/te_navbar/index",
|
||||
"van-checkbox": "@vant/weapp/checkbox/index",
|
||||
"van-checkbox-group": "@vant/weapp/checkbox-group/index",
|
||||
"van-button": "@vant/weapp/button/index",
|
||||
"van-empty": "@vant/weapp/empty/index",
|
||||
"van-divider": "@vant/weapp/divider/index"
|
||||
},
|
||||
"onReachBottomDistance": 100
|
||||
}
|
||||
@@ -0,0 +1,23 @@
|
||||
<!-- 问诊订单 -->
|
||||
<te-nav-bar navbar-data='{{navbarData}}' ></te-nav-bar>
|
||||
<view class="container">
|
||||
<view class="order_list">
|
||||
<view class="order_item" wx:for="{{order_list}}">
|
||||
<view class="order_item_content" data-index="{{index}}" bindtap="selectOrder">
|
||||
<!-- (1:专家问诊 2:快速问诊 3:公益问诊 4:问诊购药) -->
|
||||
<view class="order_item_content_top">{{item.inquiry_type==1?'专家问诊':item.inquiry_type==2?'快速问诊':item.inquiry_type==3?'公益问诊':item.inquiry_type==4?'问诊购药':item.inquiry_type==5?'糖组检测':'未知'}}</view>
|
||||
<view class="order_item_content_data">
|
||||
<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.expected_amount_total}}</text></view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<van-empty description="暂无数据" wx:if="{{order_list.length == 0}}" />
|
||||
<van-divider contentPosition="center" wx:if="{{order_list.length > 0 && current_page == last_page}}">到底了~</van-divider>
|
||||
|
||||
</view>
|
||||
@@ -0,0 +1,81 @@
|
||||
page{
|
||||
background-color: #F4F4F4;
|
||||
}
|
||||
.container{
|
||||
width: 100vw;
|
||||
padding-bottom: 50rpx;
|
||||
}
|
||||
.order_list{
|
||||
display: flex;
|
||||
width: 92vw;
|
||||
margin: 0 auto;
|
||||
flex-direction: column;
|
||||
|
||||
}
|
||||
.order_item{
|
||||
display: flex;
|
||||
width: 100%;
|
||||
margin-top: 30rpx;
|
||||
}
|
||||
.order_item_checkbox{
|
||||
flex: 1;
|
||||
align-self: center;
|
||||
}
|
||||
.order_item_content{
|
||||
flex: 10;
|
||||
background-color: #fff;
|
||||
border-radius: 20rpx;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
padding: 20rpx;
|
||||
height: 400rpx;
|
||||
}
|
||||
.order_item_content_top{
|
||||
flex: 1;
|
||||
border-bottom: 1px solid #E5E5E5;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
font-size: 36rpx;
|
||||
}
|
||||
.order_item_content_data{
|
||||
flex: 3;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
}
|
||||
.order_id{
|
||||
flex: 1;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
font-size: 30rpx;
|
||||
}
|
||||
.bottom{
|
||||
position: fixed;
|
||||
bottom: 0;
|
||||
width: 100vw;
|
||||
display: flex;
|
||||
background-color: rgb(255, 255, 255);
|
||||
align-items: center;
|
||||
z-index: 99;
|
||||
padding-bottom: 50rpx;
|
||||
height: 100rpx;
|
||||
}
|
||||
.bottom_checkbox{
|
||||
flex: 2.2;
|
||||
font-size: 30rpx;
|
||||
display: flex;
|
||||
justify-content: left;
|
||||
padding-left: 4vw;
|
||||
}
|
||||
.bottom_content{
|
||||
flex: 6;
|
||||
text-align: center;
|
||||
font-size: 28rpx;
|
||||
color: #666666;
|
||||
}
|
||||
.bottom_btn{
|
||||
flex: 2;
|
||||
justify-content: flex-end;
|
||||
font-size: 34rpx;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user