|
@@ -7,7 +7,7 @@
|
|
|
<a-row :gutter="15">
|
|
|
<a-col :xl="6" :lg="6" :md="12" :sm="24">
|
|
|
<a-form-item label="交易时间">
|
|
|
- <a-range-picker v-model="time" allowClear :disabledDate="disabledDate" format="YYYY-MM-DD"/>
|
|
|
+ <a-range-picker v-model="time" allowClear :disabledDate="disabledDate" format="YYYY-MM-DD" @change="dateChange"/>
|
|
|
</a-form-item>
|
|
|
</a-col>
|
|
|
<a-col :xl="6" :lg="6" :md="6" :sm="6">
|
|
@@ -20,7 +20,7 @@
|
|
|
<div style="margin:10px 0">
|
|
|
<div style="display: flex;align-items: center;padding: 2px 0;">
|
|
|
<div style="display: flex;align-items: center;">
|
|
|
- 可提现金额:<a-statistic :precision="2" :value="112893" />
|
|
|
+ 可提现金额:<span>{{pageInfo?toThousands(pageInfo.activeAmount,2):'--'}}</span>
|
|
|
<a-button size="small" type="primary" class="button-primary" @click="handleTX">申请提现</a-button>
|
|
|
<span>(提示:① 提现手续费为0.5元/笔;② 资金到账周期为工作日+1天)</span>
|
|
|
</div>
|
|
@@ -35,7 +35,7 @@
|
|
|
:columns="columns"
|
|
|
:data="loadData"
|
|
|
:scroll="{ y:tableHeight }"
|
|
|
- :defaultLoadData="true"
|
|
|
+ :defaultLoadData="false"
|
|
|
bordered>
|
|
|
</s-table>
|
|
|
</a-spin>
|
|
@@ -49,74 +49,85 @@ import { commonMixin } from '@/utils/mixin'
|
|
|
import moment from 'moment'
|
|
|
import { STable } from '@/components'
|
|
|
import applyWithdrawal from './applyWithdrawal.vue'
|
|
|
+import {queryMerchantCashOutPage,merchantCashOutDetail} from '@/api/merchant'
|
|
|
+import {toThousands} from '@/libs/tools.js'
|
|
|
export default {
|
|
|
components: { STable, applyWithdrawal, commonMixin },
|
|
|
data () {
|
|
|
return {
|
|
|
+ toThousands,
|
|
|
spinning: false,
|
|
|
disabled: false,
|
|
|
tableHeight: 0,
|
|
|
showModal: false,
|
|
|
currentData: null,
|
|
|
time: [],
|
|
|
+ pageInfo:null,
|
|
|
+ queryParam:{
|
|
|
+ beginDate:'',
|
|
|
+ endDate:''
|
|
|
+ },
|
|
|
columns: [
|
|
|
{ title: '序号', dataIndex: 'no', width: '5%', align: 'center' },
|
|
|
- { title: '提现单号', dataIndex: 'createDate', width: '15%', align: 'center', customRender: function (text) { return text || '--' } },
|
|
|
- { title: '提现时间', dataIndex: 'name', width: '10%', align: 'center', customRender: function (text) { return text || '--' } },
|
|
|
- { title: '申请提现金额', dataIndex: '', width: '10%', align: 'right', customRender: function (text) { return text || '--' } },
|
|
|
- { title: '开户名', dataIndex: '', width: '15%', align: 'center', customRender: function (text) { return text || '--' } },
|
|
|
- { title: '银行卡号', dataIndex: '', width: '20%', align: 'center', customRender: function (text) { return text || '--' } },
|
|
|
- { title: '提现人', dataIndex: '', width: '10%', align: 'center', customRender: function (text) { return text || '--' } },
|
|
|
- { title: '状态', dataIndex: '', width: '5%', align: 'center', customRender: function (text) { return text || '--' } },
|
|
|
- { title: '备注', dataIndex: '', width: '10%', align: 'center', customRender: function (text) { return text || '--' } }
|
|
|
+ { title: '提现单号', dataIndex: 'cashOutNo', width: '15%', align: 'center', customRender: function (text) { return text || '--' } },
|
|
|
+ { title: '提现时间', dataIndex: 'cashOutDate', width: '10%', align: 'center', customRender: function (text) { return text || '--' } },
|
|
|
+ { title: '申请提现金额', dataIndex: 'amount', width: '10%', align: 'right', customRender: function (text) { return toThousands(text,2) || '--' } },
|
|
|
+ { title: '开户名', dataIndex: 'bankAccount', width: '15%', align: 'center', customRender: function (text) { return text || '--' } },
|
|
|
+ { title: '银行卡号', dataIndex: 'bankCard', width: '20%', align: 'center', customRender: function (text) { return text || '--' } },
|
|
|
+ { title: '提现人', dataIndex: 'operName', width: '10%', align: 'center', customRender: function (text) { return text || '--' } },
|
|
|
+ { title: '状态', dataIndex: 'state', width: '5%', align: 'center', customRender: function (text) { return text || '--' } },
|
|
|
+ { title: '备注', dataIndex: 'remarks', width: '10%', align: 'center', customRender: function (text) { return text || '--' } }
|
|
|
],
|
|
|
// 加载数据方法 必须为 Promise 对象
|
|
|
loadData: parameter => {
|
|
|
const _this = this
|
|
|
_this.disabled = true
|
|
|
_this.spinning = true
|
|
|
- return new Promise(function (resolve, reject) {
|
|
|
- const data = {
|
|
|
- list: [{ id: 1, createDate: '2020-08-09' }]
|
|
|
+ const paramsPage = Object.assign(parameter,this.queryParam) // 有分页
|
|
|
+ paramsPage.merchantSn=this.pageInfo?this.pageInfo.merchantSn:''
|
|
|
+ paramsPage.merchantType='DEALER'
|
|
|
+ return queryMerchantCashOutPage(paramsPage).then(res => {
|
|
|
+ let data
|
|
|
+ if (res.status == 200) {
|
|
|
+ data = res.data
|
|
|
+ const no = (data.pageNo - 1) * data.pageSize
|
|
|
+ for (var i = 0; i < data.list.length; i++) {
|
|
|
+ data.list[i].no = no + i + 1
|
|
|
+ }
|
|
|
+ this.disabled = false
|
|
|
}
|
|
|
- for (var i = 0; i < data.list.length; i++) {
|
|
|
- data.list[i].no = i + 1
|
|
|
- }
|
|
|
- _this.spinning = false
|
|
|
- _this.disabled = false
|
|
|
- resolve(data)
|
|
|
+ this.spinning = false
|
|
|
+ return data
|
|
|
})
|
|
|
-
|
|
|
- // const paramsPage = Object.assign(this.queryParam) // 有分页
|
|
|
- // return reportSalesReturnThjdReportList(paramsPage).then(res => {
|
|
|
- // let data
|
|
|
- // if (res.status == 200) {
|
|
|
- // data = res.data
|
|
|
- // // this.getCount(paramsPage)
|
|
|
- // const no = (data.pageNo - 1) * data.pageSize
|
|
|
- // for (var i = 0; i < data.list.length; i++) {
|
|
|
- // data.list[i].no = no + i + 1
|
|
|
- // }
|
|
|
- // this.disabled = false
|
|
|
- // }
|
|
|
- // this.spinning = false
|
|
|
- // return data
|
|
|
- // })
|
|
|
}
|
|
|
}
|
|
|
},
|
|
|
methods: {
|
|
|
// 时间改变
|
|
|
dateChange (date) {
|
|
|
-
|
|
|
+ console.log(date,'date')
|
|
|
+ this.queryParam.beginDate=moment(date[0]).format('YYYY-MM-DD')
|
|
|
+ this.queryParam.endDate=moment(date[1]).format('YYYY-MM-DD')
|
|
|
},
|
|
|
// 禁止选择今天之后的日期
|
|
|
disabledDate (current) {
|
|
|
return current && current > moment().endOf('day')
|
|
|
},
|
|
|
+ getPageInfo () {
|
|
|
+ merchantCashOutDetail({}).then(res => {
|
|
|
+ console.log(res, '===========')
|
|
|
+ if (res.status == 200) {
|
|
|
+ this.pageInfo = res.data
|
|
|
+ this.$refs.table.refresh(true)
|
|
|
+ } else {
|
|
|
+ this.pageInfo = null
|
|
|
+ }
|
|
|
+ })
|
|
|
+ },
|
|
|
// 重置
|
|
|
resetSearchForm () {
|
|
|
this.time = []
|
|
|
+ this.$refs.table.refresh(true)
|
|
|
},
|
|
|
// 申请提现
|
|
|
handleTX () {
|
|
@@ -131,6 +142,7 @@ export default {
|
|
|
this.$nextTick(() => { // 页面渲染完成后的回调
|
|
|
_this.setTableH()
|
|
|
})
|
|
|
+ _this.getPageInfo()
|
|
|
}
|
|
|
},
|
|
|
mounted () {
|