|
@@ -21,7 +21,7 @@
|
|
<!-- 操作按钮 -->
|
|
<!-- 操作按钮 -->
|
|
<div class="table-operator">
|
|
<div class="table-operator">
|
|
<a-button id="withdrawalManagementList-tx" type="primary" class="button-warning" @click="handleCashOut">申请提现</a-button>
|
|
<a-button id="withdrawalManagementList-tx" type="primary" class="button-warning" @click="handleCashOut">申请提现</a-button>
|
|
- <div style="display: inline-block;margin-left: 80px;">可提现余额: <strong>¥6</strong> 元</div>
|
|
|
|
|
|
+ <div style="display: inline-block;margin-left: 80px;">可提现余额: <strong>¥{{ accountInfo&&(accountInfo.balance || accountInfo.balance==0) ? accountInfo.balance : '--' }}</strong> 元</div>
|
|
</div>
|
|
</div>
|
|
<!-- 列表 -->
|
|
<!-- 列表 -->
|
|
<s-table
|
|
<s-table
|
|
@@ -45,7 +45,7 @@
|
|
</ul>
|
|
</ul>
|
|
</div>
|
|
</div>
|
|
<!-- 申请提现 -->
|
|
<!-- 申请提现 -->
|
|
- <cashOutModal :openModal="openModal" :nowData="nowData" :itemId="itemId" @ok="handleOk" @close="closeModal" />
|
|
|
|
|
|
+ <cashOutModal :openModal="openModal" :nowData="accountInfo" @ok="handleOk" @close="closeModal" />
|
|
</a-card>
|
|
</a-card>
|
|
</template>
|
|
</template>
|
|
|
|
|
|
@@ -53,7 +53,7 @@
|
|
import { STable, VSelect } from '@/components'
|
|
import { STable, VSelect } from '@/components'
|
|
import rangeDateTime from '@/views/common/rangeDateTime.vue'
|
|
import rangeDateTime from '@/views/common/rangeDateTime.vue'
|
|
import cashOutModal from './cashOutModal.vue'
|
|
import cashOutModal from './cashOutModal.vue'
|
|
-import { satelliteWHWithdrawalList } from '@/api/satelliteWH'
|
|
|
|
|
|
+import { satelliteWHWithdrawalList, satelliteWHWithdrawalAccount } from '@/api/satelliteWH'
|
|
export default {
|
|
export default {
|
|
components: { STable, VSelect, rangeDateTime, cashOutModal },
|
|
components: { STable, VSelect, rangeDateTime, cashOutModal },
|
|
data () {
|
|
data () {
|
|
@@ -62,19 +62,19 @@ export default {
|
|
disabled: false, // 查询、重置按钮是否可操作
|
|
disabled: false, // 查询、重置按钮是否可操作
|
|
// 查询参数
|
|
// 查询参数
|
|
queryParam: {
|
|
queryParam: {
|
|
- // beginDate: '',
|
|
|
|
- // endDate: ''
|
|
|
|
|
|
+ beginDate: '',
|
|
|
|
+ endDate: ''
|
|
},
|
|
},
|
|
// 表头
|
|
// 表头
|
|
columns: [
|
|
columns: [
|
|
{ title: '序号', dataIndex: 'no', width: 80, align: 'center', fixed: 'left' },
|
|
{ title: '序号', dataIndex: 'no', width: 80, align: 'center', fixed: 'left' },
|
|
{ title: '提现时间', dataIndex: 'cashOutDate', width: 160, align: 'center', customRender: function (text) { return text || '--' } },
|
|
{ title: '提现时间', dataIndex: 'cashOutDate', width: 160, align: 'center', customRender: function (text) { return text || '--' } },
|
|
- { title: '提现单号', dataIndex: 'cashOutNo', width: 220, align: 'center', customRender: function (text) { return text || '--' } },
|
|
|
|
|
|
+ { title: '提现单号', dataIndex: 'withdrawalNo', width: 220, align: 'center', customRender: function (text) { return text || '--' } },
|
|
{ title: '申请提现金额', dataIndex: 'amount', width: 120, align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
|
|
{ title: '申请提现金额', dataIndex: 'amount', width: 120, align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
|
|
{ title: '开户名', dataIndex: 'bankAccount', width: 150, align: 'center', customRender: function (text) { return text || '--' }, ellipsis: true },
|
|
{ title: '开户名', dataIndex: 'bankAccount', width: 150, align: 'center', customRender: function (text) { return text || '--' }, ellipsis: true },
|
|
{ title: '银行卡号', dataIndex: 'bankAccountNo', width: 220, align: 'center', customRender: function (text) { return text || '--' } },
|
|
{ title: '银行卡号', dataIndex: 'bankAccountNo', width: 220, align: 'center', customRender: function (text) { return text || '--' } },
|
|
{ title: '状态', dataIndex: 'stateDictValue', width: 150, align: 'center', customRender: function (text) { return text || '--' } },
|
|
{ title: '状态', dataIndex: 'stateDictValue', width: 150, align: 'center', customRender: function (text) { return text || '--' } },
|
|
- { title: '备注', dataIndex: 'remark', align: 'center', customRender: function (text) { return text || '--' }, ellipsis: true }
|
|
|
|
|
|
+ { title: '备注', dataIndex: 'resultDesc', align: 'center', customRender: function (text) { return text || '--' }, ellipsis: true }
|
|
],
|
|
],
|
|
// 加载数据方法 必须为 Promise 对象
|
|
// 加载数据方法 必须为 Promise 对象
|
|
loadData: parameter => {
|
|
loadData: parameter => {
|
|
@@ -91,7 +91,8 @@ export default {
|
|
},
|
|
},
|
|
openModal: false, // 弹框
|
|
openModal: false, // 弹框
|
|
itemId: '', // 当前id
|
|
itemId: '', // 当前id
|
|
- nowData: null // 当前记录数据
|
|
|
|
|
|
+ nowData: null, // 当前记录数据
|
|
|
|
+ accountInfo: null
|
|
}
|
|
}
|
|
},
|
|
},
|
|
methods: {
|
|
methods: {
|
|
@@ -100,53 +101,47 @@ export default {
|
|
this.queryParam.beginDate = date[0]
|
|
this.queryParam.beginDate = date[0]
|
|
this.queryParam.endDate = date[1]
|
|
this.queryParam.endDate = date[1]
|
|
},
|
|
},
|
|
|
|
+ // 账户信息
|
|
|
|
+ getAccount () {
|
|
|
|
+ satelliteWHWithdrawalAccount().then(res => {
|
|
|
|
+ if (res.status == 200) {
|
|
|
|
+ this.accountInfo = res.data
|
|
|
|
+ } else {
|
|
|
|
+ this.accountInfo = null
|
|
|
|
+ }
|
|
|
|
+ })
|
|
|
|
+ },
|
|
// 申请提现
|
|
// 申请提现
|
|
handleCashOut () {
|
|
handleCashOut () {
|
|
- this.openModal = true
|
|
|
|
|
|
+ if (this.accountInfo && this.accountInfo.balance && this.accountInfo.serviceCharge) {
|
|
|
|
+ const balance = Number(this.accountInfo.balance) * 100
|
|
|
|
+ const serviceCharge = Number(this.accountInfo.serviceCharge) * 100
|
|
|
|
+ if ((balance - serviceCharge) <= 0) {
|
|
|
|
+ this.$message.warning('余额不足,暂不能提现!')
|
|
|
|
+ } else {
|
|
|
|
+ this.openModal = true
|
|
|
|
+ }
|
|
|
|
+ }
|
|
},
|
|
},
|
|
handleOk () {
|
|
handleOk () {
|
|
this.$refs.table.refresh(true)
|
|
this.$refs.table.refresh(true)
|
|
|
|
+ this.getAccount()
|
|
},
|
|
},
|
|
closeModal () {
|
|
closeModal () {
|
|
this.openModal = false
|
|
this.openModal = false
|
|
},
|
|
},
|
|
- // 详情
|
|
|
|
- handleDetail (row) {
|
|
|
|
- this.$router.push({ path: `/financialManagement/withdrawalManagement/detail/${row.id}` })
|
|
|
|
- },
|
|
|
|
- // 审核
|
|
|
|
- handleExamine (row, type) {
|
|
|
|
- const _this = this
|
|
|
|
- this.$confirm({
|
|
|
|
- title: '提示',
|
|
|
|
- content: '操作后不可恢复,确定要进行' + (type == 1 ? ' 通过 ' : ' 不通过 ') + '操作吗?',
|
|
|
|
- centered: true,
|
|
|
|
- onOk () {
|
|
|
|
- // delectRolePower({
|
|
|
|
- // id: row.id
|
|
|
|
- // }).then(res => {
|
|
|
|
- // console.log(res, 'res1111')
|
|
|
|
- // if (res.status == 200) {
|
|
|
|
- // _this.$message.success(res.message)
|
|
|
|
- // _this.$refs.table.refresh()
|
|
|
|
- // }
|
|
|
|
- // })
|
|
|
|
- }
|
|
|
|
- })
|
|
|
|
- },
|
|
|
|
// 重置
|
|
// 重置
|
|
resetSearchForm () {
|
|
resetSearchForm () {
|
|
this.$refs.rangeDate.resetDate()
|
|
this.$refs.rangeDate.resetDate()
|
|
this.queryParam.beginDate = ''
|
|
this.queryParam.beginDate = ''
|
|
this.queryParam.endDate = ''
|
|
this.queryParam.endDate = ''
|
|
- this.queryParam.orderBundleNo = ''
|
|
|
|
- this.queryParam.orderBundle.custMobile = ''
|
|
|
|
- this.queryParam.bundleName = ''
|
|
|
|
- this.queryParam.itemName = ''
|
|
|
|
- this.oldTime = undefined
|
|
|
|
- this.newTime = undefined
|
|
|
|
this.$refs.table.refresh(true)
|
|
this.$refs.table.refresh(true)
|
|
}
|
|
}
|
|
|
|
+ },
|
|
|
|
+ beforeRouteEnter (to, from, next) {
|
|
|
|
+ next(vm => {
|
|
|
|
+ vm.getAccount()
|
|
|
|
+ })
|
|
}
|
|
}
|
|
}
|
|
}
|
|
</script>
|
|
</script>
|