分包医生
This commit is contained in:
@@ -0,0 +1,133 @@
|
||||
import { API } from '../../../../utils/network/api'
|
||||
import { requestSubscribeMessage } from '../../../../utils/requestSubscribeUtil';
|
||||
|
||||
const api = new API()
|
||||
const app = getApp()
|
||||
Page({
|
||||
data: {
|
||||
navbarData: {
|
||||
showCapsule: 1, //是否显示左上角图标 1表示显示 0表示不显示
|
||||
title: '去提现', //导航栏 中间的标题
|
||||
},
|
||||
height: app.globalData.height,
|
||||
bank_card_id: "",
|
||||
static_host: api.getStaticHost(),
|
||||
bank_icon_path: api.getStaticHost()+"/applet/doctor/static/images/yishi/bankcard/js_icon.png",
|
||||
bank_card_name: "默认姓名",
|
||||
bank_name : "xx银行",
|
||||
bank_card_code_mask: "888 xxxx xxxx 888",
|
||||
withdrawal_amount: "xxxx",
|
||||
amount_total:'',
|
||||
income_tax: "xx",
|
||||
contactKeFu: false,
|
||||
sub_visible: false,
|
||||
skeleton_loading: true,
|
||||
order_inquiry_ids: [],
|
||||
sub_btn_disabled: false
|
||||
},
|
||||
onLoad(option){
|
||||
let order_inquiry_ids = option.order_inquiry_ids;
|
||||
let params = {};
|
||||
if(order_inquiry_ids){
|
||||
params.order_inquiry_ids = order_inquiry_ids;
|
||||
this.setData({
|
||||
"navbarData.back_url": "/Pages/yishi/my/index",
|
||||
"navbarData.back_url_type": 1,
|
||||
})
|
||||
}
|
||||
this.postDoctorWithdrawalInfo(params);
|
||||
},
|
||||
onShow(){
|
||||
this.setData({
|
||||
sub_btn_disabled: false
|
||||
})
|
||||
},
|
||||
go(e){
|
||||
let url = e.currentTarget.dataset.url;
|
||||
app.go(url);
|
||||
},
|
||||
contactKeFu(e){
|
||||
console.log("concatKeFu");
|
||||
let tmplIds = ['JMPmlYGh1HcUSuEfJCVQUIsZv4H5ar3QvXZfrNYNFuc']
|
||||
let sub_promise = requestSubscribeMessage(tmplIds)
|
||||
sub_promise.then(res => {
|
||||
console.log("订阅成功")
|
||||
this.setData({
|
||||
contactKeFu: true
|
||||
})
|
||||
}).catch(err => {
|
||||
console.log(err)
|
||||
let errCode = err.errCode
|
||||
if(errCode == 20004){
|
||||
this.setData({
|
||||
sub_visible: true,
|
||||
})
|
||||
}
|
||||
})
|
||||
},
|
||||
subcancelDialog(){
|
||||
this.setData({
|
||||
sub_visible: false
|
||||
})
|
||||
},
|
||||
subconfirmDialog(){
|
||||
this.setData({
|
||||
sub_visible: false
|
||||
})
|
||||
wx.openSetting({
|
||||
success (res) {
|
||||
console.log(res.authSetting)
|
||||
}
|
||||
})
|
||||
},
|
||||
postDoctorWithdrawalInfo(params){
|
||||
|
||||
//获取提现数据
|
||||
api.postDoctorWithdrawalInfo(params).then(response => {
|
||||
console.log(response);
|
||||
if(response.data.bank.bank_card_id){
|
||||
this.setData({
|
||||
bank_card_id: response.data.bank.bank_card_id,
|
||||
bank_icon_path: response.data.bank.bank_icon_path,
|
||||
bank_name : response.data.bank.bank_name,
|
||||
bank_card_code_mask: response.data.bank.bank_card_code_mask,
|
||||
withdrawal_amount: response.data.withdrawal_amount,
|
||||
amount_total:response.data.amount_total,
|
||||
order_inquiry_ids: response.data.order_inquiry_ids,
|
||||
bank_card_name: response.data.bank.bank_card_name_mask,
|
||||
income_tax: response.data.income_tax,
|
||||
skeleton_loading: false
|
||||
})
|
||||
}
|
||||
}).catch(errors => {
|
||||
console.error(errors);
|
||||
|
||||
})
|
||||
},
|
||||
postDoctorWithdrawal(){
|
||||
this.setData({
|
||||
sub_btn_disabled: true
|
||||
})
|
||||
let params = {};
|
||||
params.order_inquiry_id = this.data.order_inquiry_ids.join(",");
|
||||
params.withdrawal_amount_total = this.data.withdrawal_amount;
|
||||
params.bank_card_id = this.data.bank_card_id;
|
||||
//获取提现数据
|
||||
api.postDoctorWithdrawal(params).then(response => {
|
||||
console.log(response);
|
||||
this.setData({
|
||||
withdrawal_amount: 0,
|
||||
income_tax: 0
|
||||
})
|
||||
wx.showToast({
|
||||
title: '提现申请成功',
|
||||
icon: "success"
|
||||
})
|
||||
}).catch(errors => {
|
||||
console.error(errors);
|
||||
this.setData({
|
||||
sub_btn_disabled: false
|
||||
})
|
||||
})
|
||||
}
|
||||
})
|
||||
@@ -0,0 +1,12 @@
|
||||
{
|
||||
"component": true,
|
||||
"usingComponents": {
|
||||
"te-nav-bar": "../../../../commpents/te_navbar/index",
|
||||
"van-image": "@vant/weapp/image/index",
|
||||
"van-icon": "@vant/weapp/icon/index",
|
||||
"van-button": "@vant/weapp/button/index",
|
||||
"van-dialog": "@vant/weapp/dialog/index",
|
||||
"t-skeleton": "tdesign-miniprogram/skeleton/skeleton",
|
||||
"t-dialog": "tdesign-miniprogram/dialog/dialog"
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,102 @@
|
||||
<!-- 提现页面 -->
|
||||
<te-nav-bar navbar-data='{{navbarData}}' ></te-nav-bar>
|
||||
<view class="container">
|
||||
<view class="top">
|
||||
<view class="txt_title">结算银行卡</view>
|
||||
<view class="rule" bindtap="go" data-url="/user/pages/agreement_page/index?agreement_id=12">提现规则<van-icon name="warning-o" color="#FF9800" /></view>
|
||||
</view>
|
||||
<view class="bankcard" wx:if="{{!skeleton_loading}}">
|
||||
<view class="bankcard_icon">
|
||||
<van-image custom-style="" src="{{bank_icon_path}}" fit="heightFix" height="50rpx" aria-label="role" />
|
||||
</view>
|
||||
<view class="bankcard_info">
|
||||
<view class="bankcard_info_top">{{bank_card_name}}<text style="margin-left: 20rpx; font-size: 28rpx;color: #999999;">{{bank_name}}</text></view>
|
||||
<view class="bankcard_info_bottom">{{bank_card_code_mask}}</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="bankcard_loading" wx:if="{{skeleton_loading}}">
|
||||
<t-skeleton theme="text" row-col="{{[{width: '30%'},{width: '80%'}]}}" animation="gradient" loading="{{skeleton_loading}}" />
|
||||
</view>
|
||||
|
||||
<view class="cash" wx:if="{{!skeleton_loading}}">
|
||||
<view class="cash_top">
|
||||
<view class="cash_left">
|
||||
<!-- <view class="cash_left_title">实际到账(元)</view> -->
|
||||
<view class="cash_num">
|
||||
<view>
|
||||
<text style="font-size: 34rpx;">账户余额:¥</text>{{amount_total}}
|
||||
</view>
|
||||
</view>
|
||||
<view class="shui">扣除个人所得税:
|
||||
<text style="color: red;">{{income_tax}}元</text>
|
||||
</view>
|
||||
</view>
|
||||
<!-- <view class="cash_right">
|
||||
<navigator url="/Pages/yishi/wenzhenorderV2/index" open-type="navigate" hover-class="other-navigator-hover">
|
||||
<van-button custom-style="text-align: center;border-radius: 10rpx;padding: 20rpx 50rpx;" color="linear-gradient(310deg, #FF931A 0%, #FF931A 0%, #FCB75D 100%);">
|
||||
查看订单
|
||||
</van-button>
|
||||
</navigator>
|
||||
</view> -->
|
||||
</view>
|
||||
<view class="cash_bottom">
|
||||
<view class="title">
|
||||
实际到账(元)
|
||||
</view>
|
||||
<view class="moneybox">
|
||||
<view class="money"><text class="mark">¥</text><text class="moneyNum">{{withdrawal_amount}}</text></view>
|
||||
<navigator url="/user/pages/yishi/wenzhenorderV2/index" open-type="navigate" hover-class="other-navigator-hover">
|
||||
<van-button custom-style="text-align: center;border-radius: 10rpx;height:70rpx;width:200rpx;" color="linear-gradient(310deg, #FF931A 0%, #FF931A 0%, #FCB75D 100%);">
|
||||
查看订单
|
||||
</van-button>
|
||||
</navigator>
|
||||
</view>
|
||||
|
||||
</view>
|
||||
</view>
|
||||
<view class="tixian">
|
||||
<navigator url="/user/pages/yishi/cashrecord/index" open-type="navigate" hover-class="other-navigator-hover">
|
||||
提现记录 <van-icon name="arrow" />
|
||||
</navigator>
|
||||
</view>
|
||||
<view class="cash_loading" wx:if="{{skeleton_loading}}">
|
||||
<t-skeleton theme="text" row-col="{{[{width: '30%'},{width: '80%'},{width: '50%'},{width: '30%'}]}}" animation="gradient" loading="{{skeleton_loading}}" />
|
||||
</view>
|
||||
|
||||
<!-- <view class="note">
|
||||
<text>
|
||||
说明:1、每月只可提取一次,提现金额大于300元才可提现,限额1万元;
|
||||
2、平台会在24小时内自动结算至您绑定的银行卡内,请注意查收银行信息;
|
||||
3、平台代扣个人所得税,根据公式:
|
||||
</text>
|
||||
</view> -->
|
||||
|
||||
<view class="bottom">
|
||||
<van-button bind:click="postDoctorWithdrawal" disabled="{{order_inquiry_ids.length == 0 || sub_btn_disabled || withdrawal_amount == 0}}" custom-style="border-radius: 10rpx;font-size: 30rpx;" block color="#3CC7C0">提取</van-button>
|
||||
<view class="kefu" bindtap="contactKeFu">
|
||||
<text>联系客服</text>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<van-dialog
|
||||
title="立即联系客服"
|
||||
show="{{ contactKeFu }}"
|
||||
show-cancel-button
|
||||
confirm-button-color="#3CC7C0"
|
||||
confirm-button-open-type="contact"
|
||||
/>
|
||||
|
||||
<t-dialog
|
||||
visible="{{ sub_visible }}"
|
||||
title="温馨提示"
|
||||
content="您已关闭订阅消息通知,请点击“确认”按钮在设置中打开订阅通知。"
|
||||
>
|
||||
<view slot="cancel-btn" class="dialog dialog_cancel_btn" bindtap="subcancelDialog">
|
||||
取消
|
||||
</view>
|
||||
<view slot="confirm-btn" class="dialog dialog_confirm_btn" bindtap="subconfirmDialog">
|
||||
确定
|
||||
</view>
|
||||
</t-dialog>
|
||||
|
||||
</view>
|
||||
@@ -0,0 +1,192 @@
|
||||
page{
|
||||
background-color: #F4F4F4;
|
||||
}
|
||||
.container{
|
||||
margin-top: 20rpx;
|
||||
width: 100vw;
|
||||
}
|
||||
.top{
|
||||
display: flex;
|
||||
width: 92vw;
|
||||
margin: 0 auto 20rpx auto;
|
||||
justify-content: space-between;
|
||||
}
|
||||
.txt_title{
|
||||
font-size: 36rpx;
|
||||
}
|
||||
.rule{
|
||||
font-size: 30rpx;
|
||||
color: #333333;
|
||||
}
|
||||
.bankcard_loading{
|
||||
width: calc(92vw - 40rpx);
|
||||
margin: 0 auto;
|
||||
background-color: #fff;
|
||||
border-radius: 20rpx;
|
||||
padding: 20rpx 20rpx;
|
||||
}
|
||||
.bankcard{
|
||||
width: 92vw;
|
||||
margin: 0 auto;
|
||||
background-color: #fff;
|
||||
border-radius: 20rpx;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
padding: 20rpx 0;
|
||||
}
|
||||
.bankcard_icon{
|
||||
flex: 2;
|
||||
text-align: center;
|
||||
height: 70%;
|
||||
align-self: start;
|
||||
}
|
||||
.bankcard_info{
|
||||
flex: 10;
|
||||
height: 70%;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
}
|
||||
.bankcard_info_top{
|
||||
font-size: 32rpx;
|
||||
color: #333333;
|
||||
}
|
||||
.bankcard_info_bottom{
|
||||
font-size: 28rpx;
|
||||
color: #333333;
|
||||
margin-top: 10rpx;
|
||||
}
|
||||
.cash_loading{
|
||||
padding: 20rpx 20rpx;
|
||||
width: calc(92vw - 40rpx);
|
||||
margin: 20rpx auto;
|
||||
background-color: #fff;
|
||||
border-radius: 20rpx;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
}
|
||||
.cash{
|
||||
width: 92vw;
|
||||
|
||||
margin: 20rpx auto;
|
||||
background-color: #fff;
|
||||
border-radius: 20rpx;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
}
|
||||
.cash_top{
|
||||
margin-top:30rpx;
|
||||
display: flex;
|
||||
flex: 3;
|
||||
}
|
||||
.cash_bottom{
|
||||
padding:20rpx 20rpx 30rpx;
|
||||
border-top: 1px solid #E5E5E5;
|
||||
|
||||
font-size: 32rpx;
|
||||
display: flex;
|
||||
|
||||
flex-direction: column;
|
||||
padding-right: 20rpx;
|
||||
}
|
||||
.cash_bottom .title{
|
||||
margin-top: 10rpx;
|
||||
font-size: 30rpx;
|
||||
|
||||
color: #000000;
|
||||
}
|
||||
.cash_left{
|
||||
flex: 3;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
padding-left: 20rpx;
|
||||
}
|
||||
.cash_left_title{
|
||||
flex: 1;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
font-size: 30rpx;
|
||||
}
|
||||
.cash_num{
|
||||
flex: 2;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
font-size: 34rpx;
|
||||
}
|
||||
.shui{
|
||||
flex: 1;
|
||||
margin-top: 20rpx;
|
||||
margin-bottom: 30rpx;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
font-size: 28rpx;
|
||||
color: #666666;
|
||||
}
|
||||
.cash_right{
|
||||
flex: 2;
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
}
|
||||
.note{
|
||||
font-size: 28rpx;
|
||||
color: #666666;
|
||||
width: 92vw;
|
||||
margin: -50rpx auto;
|
||||
line-height: 50rpx;
|
||||
}
|
||||
.bottom{
|
||||
width: 92vw;
|
||||
position: fixed;
|
||||
bottom: 50rpx;
|
||||
left: 50%;
|
||||
transform: translateX(-50%);
|
||||
text-align: center;
|
||||
|
||||
}
|
||||
.kefu{
|
||||
color: #3CC7C0;
|
||||
margin: 30rpx;
|
||||
}
|
||||
.dialog{
|
||||
width: 50%;
|
||||
text-align: center;
|
||||
height: 100rpx;
|
||||
line-height: 100rpx;
|
||||
}
|
||||
.dialog_cancel_btn{
|
||||
border-top: 1px solid #E9E9E9;
|
||||
border-right: 1px solid #E9E9E9;
|
||||
}
|
||||
.dialog_confirm_btn{
|
||||
border-top: 1px solid #E9E9E9;
|
||||
color: #3CC7C0;
|
||||
}
|
||||
|
||||
.moneybox{
|
||||
display: flex;
|
||||
}
|
||||
.moneybox{
|
||||
display: flex;
|
||||
margin-top: 20rpx;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
}
|
||||
|
||||
.money .mark{
|
||||
font-size: 42rpx;
|
||||
font-weight: 400;
|
||||
color: #333333;
|
||||
}
|
||||
.moneyNum{
|
||||
font-size: 64rpx;
|
||||
font-family: ArialMT;
|
||||
color: #333333;
|
||||
}
|
||||
.tixian{
|
||||
display: flex;
|
||||
margin:0 30rpx;
|
||||
color: #3CC7C0;
|
||||
font-size: 32rpx;
|
||||
align-items: center;
|
||||
justify-content: flex-end;
|
||||
}
|
||||
Reference in New Issue
Block a user