|
|
@@ -28,14 +28,18 @@
|
|
|
<div class="stitle">选择缴税方案</div>
|
|
|
<div class="sdesc">已默认为您选择最低费率缴税方案</div>
|
|
|
<div class="schemeList">
|
|
|
- <div class="cell">
|
|
|
- <div class="leftChoose ok"></div>
|
|
|
+ <div class="cell" v-for="item in list" :key="item.id">
|
|
|
+ <div class="leftChoose" :class="{ok: item.id === selectedId}"></div>
|
|
|
<div class="rightContent">
|
|
|
<div class="taxTop">
|
|
|
- <div class="topLeft">青团宝</div>
|
|
|
- <div class="topRight">选则扣税方式即表示您同意 <a href="">《青团宝服务协议》</a></div>
|
|
|
+ <div class="topLeft">{{item.config_key}}</div>
|
|
|
+ <div class="topRight" v-if="item.is_auto != 1">选则扣税方式即表示您同意
|
|
|
+ <a href="">《{{item.config_key}}服务协议》</a></div>
|
|
|
+ <div class="topRight" v-else>
|
|
|
+ <span @click="onJumpToUpload">{{fpUrl ? '去上传电子发票' : '已上传电子发票'}}</span>
|
|
|
+ </div>
|
|
|
</div>
|
|
|
- <div class="taxContent">代缴综合费率7.5%, 预计到账¥8888.88元</div>
|
|
|
+ <div class="taxContent">代缴综合费率{{item.kaifabao_rate}}%, 预计到账¥{{calcOkMoney}}元</div>
|
|
|
</div>
|
|
|
</div>
|
|
|
</div>
|
|
|
@@ -76,8 +80,21 @@
|
|
|
data() {
|
|
|
return {
|
|
|
bankInfo: {},
|
|
|
+ list: [],
|
|
|
vCoins: 0,
|
|
|
- fpUrl: ''
|
|
|
+ fpUrl: '',
|
|
|
+ selectedId: -1
|
|
|
+ }
|
|
|
+ },
|
|
|
+ computed: {
|
|
|
+ calcOkMoney() {
|
|
|
+ if (this.selectedId === -1) {
|
|
|
+ return 0
|
|
|
+ }
|
|
|
+ return this.vCoins * (1 - this.selectedItem.kaifabao_rate)
|
|
|
+ },
|
|
|
+ selectedItem() {
|
|
|
+ return this.list.filter(v=>v.id === this.selectedId)[0] || {}
|
|
|
}
|
|
|
},
|
|
|
created() {
|
|
|
@@ -90,7 +107,10 @@
|
|
|
methods: {
|
|
|
getWithdrawType() {
|
|
|
this.$axios.post('/api/kaifabao/getBuckleConfigList').then(res => {
|
|
|
-
|
|
|
+ if (Number(res.data.status) === 1) {
|
|
|
+ let data = res.data.data
|
|
|
+ this.list = data.list
|
|
|
+ }
|
|
|
}).catch(e => {
|
|
|
console.log(e)
|
|
|
})
|
|
|
@@ -113,14 +133,32 @@
|
|
|
location.href = `/otherpage/money/uploadInvoice?coins=${vCoins}&fpUrl=${fpUrl}`
|
|
|
},
|
|
|
submitCommit() {
|
|
|
- this.$axios.post('/api/recruit/addInvoiceWithdrawalApply', {
|
|
|
- auth_code: '',
|
|
|
- coins: this.coins,
|
|
|
- invoice_url: this.invoiceImg
|
|
|
- }).then(res=>{
|
|
|
- this.invoiceImg = ""
|
|
|
- this._toast('上传成功')
|
|
|
- })
|
|
|
+ const {is_auto, id} = this.selectedItem
|
|
|
+ if (this.selectedId === -1) {
|
|
|
+ this._toast('请选择缴税方案')
|
|
|
+ return
|
|
|
+ }
|
|
|
+ if (!(this.coins >= 10 && this.coins <= 30000)) {
|
|
|
+ this._toast('请填写正确的的提现金额')
|
|
|
+ return
|
|
|
+ }
|
|
|
+
|
|
|
+ //自行提供发票
|
|
|
+ if (Number(is_auto) === 1) {
|
|
|
+ this.$axios.post('/api/recruit/addInvoiceWithdrawalApply', {
|
|
|
+ coins: this.coins,
|
|
|
+ invoice_url: this.fpUrl
|
|
|
+ }).then(res=>{
|
|
|
+ this._toast('上传成功')
|
|
|
+ })
|
|
|
+ } else {
|
|
|
+ this.$axios.post('/api/account/takeSalary', {
|
|
|
+ coins: this.coins,
|
|
|
+ payment_id: id
|
|
|
+ }).then(res=>{
|
|
|
+ this._toast('上传成功')
|
|
|
+ })
|
|
|
+ }
|
|
|
},
|
|
|
}
|
|
|
}
|