|
@@ -5,6 +5,17 @@
|
|
|
<view class="withdraw-head">
|
|
|
<b>提现至</b><span>{{code}}</span>
|
|
|
</view>
|
|
|
+ <view class="withdraw-head">
|
|
|
+ <b>选择提现站点</b>
|
|
|
+ <span >
|
|
|
+ <picker @change="bindPickerChange" range-key="name" :range="stationList">
|
|
|
+ <view class="uni-input">{{stationObj.name?stationObj.name:'无站点'}}<text class="iconfont more">
|
|
|
+ 
|
|
|
+ </text></view>
|
|
|
+ </picker>
|
|
|
+
|
|
|
+ </span>
|
|
|
+ </view>
|
|
|
<view class="withdraw-head">
|
|
|
<b>上次提现时间</b><span>{{info.startTime}}</span>
|
|
|
</view>
|
|
@@ -25,15 +36,54 @@
|
|
|
<u-input v-model="value" :type="type" placeholder-style="font-size:28px;height:40px;line-height:40px;color:#ccc;" />
|
|
|
</view>
|
|
|
</view>
|
|
|
- <view class="withdraw-foot" v-if="false">
|
|
|
- <p>可提现余额 ¥{{home.accountBalance}}</p>
|
|
|
- <span @click="value=home.accountBalance">全部提现</span>
|
|
|
+ <view class="withdraw-head">
|
|
|
+ <b>是否开票</b><span style="width: 125px;" >
|
|
|
+ <u-radio-group v-model="invoiceRequired" >
|
|
|
+
|
|
|
+ <u-radio v-for="(item, index) in list2" :key="index+'a'" :name="item.value"
|
|
|
+ :disabled="item.disabled" active-color="#00b962">
|
|
|
+
|
|
|
+ {{item.name}}
|
|
|
+
|
|
|
+ </u-radio>
|
|
|
+
|
|
|
+ </u-radio-group>
|
|
|
+ </span>
|
|
|
+ </view>
|
|
|
+ <view class="withdraw-head">
|
|
|
+ <b>发票类型</b><span>
|
|
|
+ <u-radio-group v-model="invoiceType" >
|
|
|
+
|
|
|
+ <u-radio v-for="(item, index) in list1" :key="index+'a'" :name="item.value"
|
|
|
+ :disabled="item.disabled" active-color="#00b962">
|
|
|
+
|
|
|
+ {{item.name}}
|
|
|
+
|
|
|
+ </u-radio>
|
|
|
+
|
|
|
+ </u-radio-group>
|
|
|
+ </span>
|
|
|
+ </view>
|
|
|
+
|
|
|
+ <view class="withdraw-head" >
|
|
|
+ <b>开票税率(%)</b>
|
|
|
+ <span class="withdraw-input">
|
|
|
+ <u-input
|
|
|
+ placeholder="请输入内容"
|
|
|
+ input-align="right"
|
|
|
+ type="digit"
|
|
|
+ v-model="taxRate"
|
|
|
+
|
|
|
+ ></u-input>
|
|
|
+
|
|
|
+ </span>
|
|
|
</view>
|
|
|
</view>
|
|
|
+
|
|
|
<view class="applyBtn">
|
|
|
<u-button :class="{
|
|
|
'applyBtn-btn':!info.amount
|
|
|
- }" @click="submit()" type="primary">申请提现,7日内到账</u-button>
|
|
|
+ }" @click="submit()" type="primary">申请提现,等待财务转账</u-button>
|
|
|
</view>
|
|
|
<view class="withdraw-tips">
|
|
|
<h4>提现说明:</h4>
|
|
@@ -56,6 +106,27 @@
|
|
|
value: '',
|
|
|
type: 'number',
|
|
|
nowTime:"",
|
|
|
+ taxRate:"",
|
|
|
+ invo:"",
|
|
|
+ invoiceRequired:"1",
|
|
|
+ invoiceType:"1",
|
|
|
+ stationList:[],
|
|
|
+ stationObj:{},
|
|
|
+ list1: [{
|
|
|
+ name: '普票',
|
|
|
+ value:"1"
|
|
|
+ }, {
|
|
|
+ name: '专票',
|
|
|
+ value:"2"
|
|
|
+ }],
|
|
|
+ list2: [{
|
|
|
+ name: '是',
|
|
|
+ value:"1"
|
|
|
+ }, {
|
|
|
+ name: '否 ',
|
|
|
+ value:"0"
|
|
|
+ }],
|
|
|
+
|
|
|
home:{
|
|
|
accountBalance:0
|
|
|
},
|
|
@@ -70,8 +141,22 @@
|
|
|
this.getHomePage()
|
|
|
},
|
|
|
methods: {
|
|
|
+ bindPickerChange(e){
|
|
|
+ console.log(e)
|
|
|
+ if(this.stationList[e.detail.value]){
|
|
|
+ this.stationObj=this.stationList[e.detail.value];
|
|
|
+ }
|
|
|
+ },
|
|
|
+ selectStation(){},
|
|
|
submit(){
|
|
|
//this.value=this.info.amount
|
|
|
+ if(!this.stationObj.id){
|
|
|
+ uni.showToast({
|
|
|
+ title: "请选择站点"
|
|
|
+ })
|
|
|
+
|
|
|
+ return
|
|
|
+ }
|
|
|
if(!this.info.amount){
|
|
|
uni.showToast({
|
|
|
title: "可提现金额为0"
|
|
@@ -84,10 +169,14 @@
|
|
|
title: "加载中",
|
|
|
mask: true,
|
|
|
})
|
|
|
+ this.info.invoiceRequired=this.invoiceRequired
|
|
|
+ this.info.invoiceType=this.invoiceType
|
|
|
+ this.info.taxRate=this.taxRate
|
|
|
+ this.info.stationId=this.stationObj.id;
|
|
|
API.applyWithdraw(this.info).then((res) => {
|
|
|
|
|
|
uni.redirectTo({
|
|
|
- url:"/pagesFinance/user/applyResult?value="+this.value
|
|
|
+ url:"/pagesFinance/user/applyResult?value="+this.info.amount
|
|
|
})
|
|
|
|
|
|
}).catch(error => {
|
|
@@ -96,12 +185,14 @@
|
|
|
})
|
|
|
})
|
|
|
},
|
|
|
- queryWithdrawInfo(){
|
|
|
+ queryWithdrawInfo(id){
|
|
|
uni.showLoading({
|
|
|
title: "加载中",
|
|
|
mask: true,
|
|
|
})
|
|
|
- API.queryWithdrawInfo().then((res) => {
|
|
|
+ API.queryWithdrawInfo({
|
|
|
+ stationId:id
|
|
|
+ }).then((res) => {
|
|
|
this.info=res.data;
|
|
|
|
|
|
uni.hideLoading()
|
|
@@ -112,6 +203,25 @@
|
|
|
})
|
|
|
})
|
|
|
},
|
|
|
+ getStationList(){
|
|
|
+ uni.showLoading({
|
|
|
+ title: "加载中",
|
|
|
+ mask: true,
|
|
|
+ })
|
|
|
+ API.stationList().then((res) => {
|
|
|
+ this.stationList=res.data.stationList;
|
|
|
+ if(this.stationList.length){
|
|
|
+ this.stationObj=this.stationList[0];
|
|
|
+ this.queryWithdrawInfo(this.stationList[0].id)
|
|
|
+ }
|
|
|
+ uni.hideLoading()
|
|
|
+
|
|
|
+ }).catch(error => {
|
|
|
+ uni.showToast({
|
|
|
+ title: error
|
|
|
+ })
|
|
|
+ })
|
|
|
+ },
|
|
|
getHomePage(){
|
|
|
uni.showLoading({
|
|
|
title: "加载中",
|
|
@@ -129,7 +239,7 @@
|
|
|
}
|
|
|
|
|
|
uni.hideLoading()
|
|
|
- this.queryWithdrawInfo()
|
|
|
+ this.getStationList()
|
|
|
}).catch(error => {
|
|
|
uni.showToast({
|
|
|
title: error
|