分包医生
This commit is contained in:
@@ -0,0 +1,142 @@
|
||||
import { API } from '../../../../utils/network/api'
|
||||
const util = require('../../../../utils/util')
|
||||
let api = new API()
|
||||
const app = getApp()
|
||||
Page({
|
||||
data: {
|
||||
navbarData: {
|
||||
showCapsule: 1, //是否显示左上角图标 1表示显示 0表示不显示
|
||||
title: '我的账户', //导航栏 中间的标题
|
||||
},
|
||||
height: app.globalData.height,
|
||||
dateVisible: false,
|
||||
dateText: "",
|
||||
dateValue: ['2023','3'],
|
||||
dialog_visible:false,
|
||||
select_date: "",
|
||||
balance_account: "",
|
||||
amount_total_month: "",
|
||||
doctor_today_inquiry_total:'',
|
||||
doctor_day_completed_amount_total:'',
|
||||
withdrawal_amount_month: "",
|
||||
static_host: api.getStaticHost(),
|
||||
bill: [],
|
||||
years: [],
|
||||
seasons: [
|
||||
{ label: '1月', value: '1' },
|
||||
{ label: '2月', value: '2' },
|
||||
{ label: '3月', value: '3' },
|
||||
{ label: '4月', value: '4' },
|
||||
{ label: '5月', value: '5' },
|
||||
{ label: '6月', value: '6' },
|
||||
{ label: '7月', value: '7' },
|
||||
{ label: '8月', value: '8' },
|
||||
{ label: '9月', value: '9' },
|
||||
{ label: '10月', value: '10' },
|
||||
{ label: '11月', value: '11' },
|
||||
{ label: '12月', value: '12' },
|
||||
]
|
||||
},
|
||||
onLoad(){
|
||||
let now_year = (new Date()).Format("yyyy");
|
||||
let begin_year = 2023;
|
||||
let years = [];
|
||||
for(let i=begin_year;i<=now_year;i++){
|
||||
years.push({label: i+"年", value: i+""})
|
||||
}
|
||||
this.setData({
|
||||
years: years
|
||||
})
|
||||
},
|
||||
onShow(){
|
||||
let now_date = new Date();
|
||||
let now_datearr = util.getDateArr(now_date);
|
||||
console.log(now_datearr);
|
||||
let year = now_datearr[0];
|
||||
let month = now_datearr[1];
|
||||
let mmdateValue = [''+year+'',''+month+''];
|
||||
this.setData({
|
||||
dateValue: mmdateValue,
|
||||
dateText: year+"年"
|
||||
})
|
||||
|
||||
let date = this.data.dateValue.join("-");
|
||||
this.getDoctorCenterAccount(date);
|
||||
},
|
||||
onColumnChange(e) {
|
||||
console.log('picker onColumnChange:', e);
|
||||
},
|
||||
confirmDialog(){
|
||||
this.setData({
|
||||
dialog_visible:false
|
||||
})
|
||||
},
|
||||
showDialog(){
|
||||
this.setData({
|
||||
dialog_visible:true
|
||||
})
|
||||
},
|
||||
onPickerChange(e) {
|
||||
const { key } = e.currentTarget.dataset;
|
||||
const { value } = e.detail;
|
||||
|
||||
console.log('picker onPickerChange:', e.detail);
|
||||
this.setData({
|
||||
[`${key}Visible`]: false,
|
||||
[`${key}Value`]: value,
|
||||
[`${key}Text`]: value[0]+"年",
|
||||
});
|
||||
|
||||
let date = value.join("-");
|
||||
this.getDoctorCenterAccount(date);
|
||||
},
|
||||
|
||||
onPickerCancel(e) {
|
||||
const { key } = e.currentTarget.dataset;
|
||||
console.log(e, '取消');
|
||||
console.log('picker1 onPickerCancel:');
|
||||
this.setData({
|
||||
[`${key}Visible`]: false,
|
||||
});
|
||||
},
|
||||
|
||||
|
||||
onSeasonPicker() {
|
||||
this.setData({ dateVisible: true });
|
||||
},
|
||||
|
||||
showPop(){
|
||||
this.setData({
|
||||
dateVisible: true
|
||||
});
|
||||
},
|
||||
|
||||
getDoctorCenterAccount(date){
|
||||
//获取医生我的账户数据
|
||||
api.getDoctorCenterAccount({date:date}).then(response => {
|
||||
console.log(response);
|
||||
this.setData({
|
||||
balance_account: response.data.balance_account,
|
||||
amount_total_month: response.data.amount_total_month,
|
||||
doctor_today_inquiry_total:response.data.doctor_today_inquiry_total,
|
||||
doctor_day_completed_amount_total:response.data.doctor_day_completed_amount_total,
|
||||
withdrawal_amount_month: response.data.withdrawal_amount_month,
|
||||
bill: response.data.bill,
|
||||
})
|
||||
}).catch(errors => {console.error(errors);})
|
||||
},
|
||||
goTixian(){
|
||||
app.go('/user/pages/yishi/cash/index')
|
||||
},
|
||||
goDetail(e){
|
||||
let url = e.currentTarget.dataset.url;
|
||||
let md = e.currentTarget.dataset.md;
|
||||
let date = this.data.dateValue[0]+"-"+md;
|
||||
console.log(date);
|
||||
app.go(url+"?date="+date);
|
||||
},
|
||||
go(e){
|
||||
let url = e.currentTarget.dataset.url;
|
||||
app.go(url);
|
||||
},
|
||||
})
|
||||
@@ -0,0 +1,14 @@
|
||||
{
|
||||
"component": true,
|
||||
"usingComponents": {
|
||||
"te-nav-bar": "../../../../commpents/te_navbar/index",
|
||||
"van-image": "@vant/weapp/image/index",
|
||||
"t-picker": "tdesign-miniprogram/picker/picker",
|
||||
"t-picker-item": "tdesign-miniprogram/picker-item/picker-item",
|
||||
"van-icon": "@vant/weapp/icon/index",
|
||||
"t-dialog": "tdesign-miniprogram/dialog/dialog",
|
||||
"van-cell": "@vant/weapp/cell/index",
|
||||
"van-cell-group": "@vant/weapp/cell-group/index",
|
||||
"van-empty": "@vant/weapp/empty/index"
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,78 @@
|
||||
<te-nav-bar navbar-data='{{navbarData}}' ></te-nav-bar>
|
||||
<view class="container">
|
||||
<!-- <view class="top">
|
||||
<view class="top_txt">
|
||||
<view style="font-size: 30rpx;">
|
||||
账户当前余额:
|
||||
</view>
|
||||
<view style="font-size: 40rpx;">
|
||||
¥ {{balance_account}}
|
||||
</view>
|
||||
</view>
|
||||
</view> -->
|
||||
<view class="monthbox">
|
||||
<view class="titlebox">
|
||||
<view class="name">账户余额(元)</view>
|
||||
<van-icon name="question-o" class="question" bindtap="showDialog"/>
|
||||
</view>
|
||||
<view class="accoutbox">
|
||||
<view class="accountNum"><text class="mark">¥</text>{{balance_account}}</view>
|
||||
<view class="tixian" bindtap="goTixian">提现</view>
|
||||
</view>
|
||||
<view class="line"></view>
|
||||
<view class="cashbox">
|
||||
<view class="today">
|
||||
<view class="titlename">今日接诊收入</view>
|
||||
<view class="money">¥{{doctor_today_inquiry_total}}</view>
|
||||
</view>
|
||||
<view class="finish">
|
||||
<view class="titlename">已完成待入账</view>
|
||||
<view class="money">¥{{doctor_day_completed_amount_total}}</view>
|
||||
</view>
|
||||
</view>
|
||||
<!-- <view class="month" bindtap="showPop">{{dateText}}<van-icon name="arrow-down" color="#999" size="40rpx" /></view>
|
||||
<view class="account">
|
||||
<view class="account_left" style="font-size: 30rpx;">当月收益:<text style="font-size: 40rpx;">¥{{amount_total_month}}</text></view>
|
||||
<view class="account_right" style="font-size: 30rpx;">当月已提取:<text style="font-size: 40rpx;">¥{{withdrawal_amount_month}}</text></view>
|
||||
</view> -->
|
||||
</view>
|
||||
<view class="txt_title" bindtap="showPop">
|
||||
{{dateText}}<van-icon name="arrow-down" color="#333" size="34rpx" />
|
||||
</view>
|
||||
<view class="content">
|
||||
<van-cell size="large" bindtap="goDetail" data-url="/user/pages/yishi/orderdetail/index" data-md="{{item.month}}" title-style="font-size: 30rpx;" title="{{item.month}}月" value="" is-link wx:for="{{bill}}" />
|
||||
<van-empty description="暂无账单" wx:if="{{ bill.length == 0 }}" />
|
||||
</view>
|
||||
|
||||
<van-image bind:click="go" data-url="/user/user/pages/agreement_page/index?agreement_id=13" style="position: fixed; right: 0;bottom: 262rpx;" src="{{static_host}}/applet/doctor/static/images/yishi/account_rule.png" fit="heightFix" height="84rpx" aria-label="role" />
|
||||
|
||||
<t-picker
|
||||
visible="{{dateVisible}}"
|
||||
value="{{dateValue}}"
|
||||
data-key="date"
|
||||
title="选择日期"
|
||||
cancelBtn="取消"
|
||||
confirmBtn="确认"
|
||||
bindchange="onPickerChange"
|
||||
bindpick="onColumnChange"
|
||||
bindcancel="onPickerCancel"
|
||||
>
|
||||
<t-picker-item options="{{years}}"></t-picker-item>
|
||||
<!-- <t-picker-item options="{{seasons}}"></t-picker-item> -->
|
||||
</t-picker>
|
||||
|
||||
<t-dialog
|
||||
visible="{{ dialog_visible }}"
|
||||
title="温馨提示"
|
||||
|
||||
>
|
||||
<view slot="content" class="slotcontent">
|
||||
<view class="msg">1、账户余额表示未提现的所有已经结束的订单金额总和</view>
|
||||
<view class="msg">2、今日接诊收入表示今日已经接诊的订单金额总和 </view>
|
||||
<view class="msg">3、已完成待入账表示近期已完成未结束的订单金额总和 </view>
|
||||
</view>
|
||||
<view slot="confirm-btn" class="dialog dialog_confirm_btn" bindtap="confirmDialog">
|
||||
确定
|
||||
</view>
|
||||
</t-dialog>
|
||||
</view>
|
||||
@@ -0,0 +1,190 @@
|
||||
page{
|
||||
background-color: #F4F4F4;
|
||||
}
|
||||
.container{
|
||||
width: 100vw;
|
||||
}
|
||||
.top{
|
||||
width: 92vw;
|
||||
margin: 20rpx auto 0 auto;
|
||||
background-color: #3CC7C0;
|
||||
height: 150rpx;
|
||||
border-radius: 20rpx;
|
||||
color: #ffffff;
|
||||
}
|
||||
.top_txt{
|
||||
display: flex;
|
||||
align-items: center;
|
||||
height: 110rpx;
|
||||
padding-left: 20rpx;
|
||||
}
|
||||
.monthbox{
|
||||
width: 92vw;
|
||||
margin: 20rpx auto 0 auto;
|
||||
background-color: #ffffff;
|
||||
padding:26rpx 0 20rpx;
|
||||
border-radius: 20rpx;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
}
|
||||
.month{
|
||||
flex: 3;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
font-size: 50rpx;
|
||||
padding-left: 20rpx;
|
||||
}
|
||||
.account{
|
||||
flex: 2;
|
||||
display: flex;
|
||||
justify-content: space-around;
|
||||
color: #666666;
|
||||
font-size: 28rpx;
|
||||
}
|
||||
.account_left{
|
||||
flex: 1;
|
||||
text-align: center;
|
||||
text-align: left;
|
||||
margin-left: 20rpx;
|
||||
}
|
||||
.account_right{
|
||||
flex: 1;
|
||||
text-align: center;
|
||||
text-align: left;
|
||||
}
|
||||
.txt_title{
|
||||
font-size: 34rpx;
|
||||
margin: 20rpx 0;
|
||||
position: relative;
|
||||
left: 4vw;
|
||||
width: 20vw;
|
||||
}
|
||||
.content{
|
||||
width: 92vw;
|
||||
background-color: #fff;
|
||||
margin: 0 auto;
|
||||
border-radius: 20rpx;
|
||||
overflow: hidden;
|
||||
}
|
||||
.t-picker__confirm{
|
||||
color: #3CC7C0 !important;
|
||||
}
|
||||
.titlebox{
|
||||
margin:0 30rpx;
|
||||
display: flex;
|
||||
}
|
||||
.titlebox .name{
|
||||
color: #000000;
|
||||
}
|
||||
.question{
|
||||
color:rgba(0,0,0,0.6);
|
||||
}
|
||||
.tixian{
|
||||
width: 200rpx;
|
||||
height: 70rpx;
|
||||
background: linear-gradient(310deg, #FF931A 0%, #FF931A 0%, #FCB75D 100%);
|
||||
border-radius: 10rpx;
|
||||
font-size: 32rpx;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
font-weight: 400;
|
||||
color: #FFFFFF;
|
||||
}
|
||||
.accoutbox{
|
||||
margin:20rpx 30rpx 0;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
padding-bottom: 26rpx;
|
||||
|
||||
}
|
||||
.line{
|
||||
width:100%;
|
||||
height:1rpx;
|
||||
background-color:#E5E5E5;
|
||||
}
|
||||
.mark{
|
||||
font-size: 42rpx;
|
||||
font-weight: 400;
|
||||
color: #333333;
|
||||
}
|
||||
.cashbox{
|
||||
margin:20rpx 30rpx 0;
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
}
|
||||
.accountNum{
|
||||
font-size: 64rpx;
|
||||
font-family: ArialMT;
|
||||
color: #333333;
|
||||
}
|
||||
.titlename{
|
||||
font-size: 28rpx;
|
||||
font-weight: 400;
|
||||
color: #999999;
|
||||
}
|
||||
.today,.finish{
|
||||
/* flex:1; */
|
||||
}
|
||||
.money{
|
||||
margin-top: 16rpx;
|
||||
font-size: 36rpx;
|
||||
font-weight: 400;
|
||||
color: #000000;
|
||||
}
|
||||
.van-cell:after{
|
||||
left:0rpx!important;
|
||||
right:0rpx!important;
|
||||
}
|
||||
.van-cell{
|
||||
padding:35rpx 16rpx!important;
|
||||
}
|
||||
.dialog{
|
||||
width: 100%;
|
||||
text-align: center;
|
||||
height: 100rpx;
|
||||
line-height: 100rpx;
|
||||
}
|
||||
.dialog_cancel_btn{
|
||||
position: relative;
|
||||
}
|
||||
.dialog_cancel_btn::before {
|
||||
content: ' ';
|
||||
position: absolute;
|
||||
box-sizing: border-box;
|
||||
top: 0;
|
||||
left: 0;
|
||||
border-top: 2px solid var(--td-border-color, #e7e7e7);
|
||||
border-right: 2px solid var(--td-border-color, #e7e7e7);
|
||||
transform: scale(0.5);
|
||||
transform-origin: 0 0;
|
||||
width: 200%;
|
||||
height: 200%;
|
||||
border-radius: 0;
|
||||
border-top-left-radius: 0px;
|
||||
border-top-right-radius: 0px;
|
||||
border-bottom-right-radius: 0px;
|
||||
border-bottom-left-radius: 0px;
|
||||
}
|
||||
.dialog_confirm_btn{
|
||||
border-top: 1px solid #E9E9E9;
|
||||
color: #3CC7C0;
|
||||
}
|
||||
.t-button__content{
|
||||
color: #3CC7C0 !important;
|
||||
}
|
||||
.t-dialog__button--text:before {
|
||||
border-top: 2px solid #E9E9E9 !important;
|
||||
border-left: 2px solid var(--td-border-color, #E9E9E9);
|
||||
border-top-color: #E9E9E9 !important;
|
||||
}
|
||||
.slotcontent{
|
||||
margin-top: 20rpx;
|
||||
}
|
||||
.slotcontent .msg{
|
||||
font-size: 34rpx;
|
||||
font-weight: 400;
|
||||
color: #666;
|
||||
line-height: 48rpx;
|
||||
}
|
||||
Reference in New Issue
Block a user