Commit 27976fff by wangzhihui

身边云需求开发

1 parent 3ffa53f5
......@@ -40,7 +40,7 @@
</div>
<!-- radio -->
<div v-else-if="item.type === 'radio'">
<el-radio-group v-model="formObj[item.name]" v-bind="item.attrs ? item.attrs : {}" v-on="item.listeners ? item.listeners : {}" :disabled="item.isDisabled" @change="item.handleRadioChange">
<el-radio-group v-model="formObj[item.name]" v-bind="item.attrs ? item.attrs : {}" v-on="item.listeners ? item.listeners : {}" :disabled="item.isDisabled" @change="item.handleRadioChange" >
<el-radio v-for="subItem in item.optionList" :key="subItem[item.optionId]" :disabled="subItem.isDisabled" :label="subItem[item.optionId]">
{{ subItem[item.optionLabel] }}
<slot :name="subItem.suffixSonSlot" :scope="subItem"></slot>
......
<template>
<div class="points">
<div class="container">
<GLCombiForm ref="showSearch" :rowNumber="1" :formObj="searchForm" :formData="showFormData" @handleOk="handleSearch" @handleRest="handleReset"></GLCombiForm>
<GLCombiForm ref="showSearch" :rowNumber="1" :formObj="searchForm" :formData="showFormData" @handleOk="handleSearch" @handleRest="handleReset">
<template slot="channel">
<el-cascader :options="baseData.channelList" style="width: 100%" v-model="searchForm.channel" :placeholder="'请选择'" filterable @change="selectAddAttr($event)"></el-cascader>
</template>
</GLCombiForm>
<div class="table-header">
<!-- <h2>积分提现列表</h2> -->
<div class="statistics">
......@@ -62,6 +66,17 @@
<!-- 付款 -->
<GLDialog class="gl-form-page gl-form-min payWrap" title="付款" mode="mid" :visible.sync="isPay" :close-on-click-modal="false" :before-close="cancelPay">
<glsx-combi-form formRef="payChildRef" defaultWidth="284px" ref="payFormRef" :formObj="payForm" :formData="payFormData" :formRules="payRule">
<template slot="channelProvider">
<div v-if="providers && providers.channelProviderList" class="provider-wrap">
<div class="provider-title">
<img src="@/assets/icon.png" alt class="provider-icon" />
<div>身边云-银行卡</div>
</div>
<el-radio-group v-model="payForm.channelProvider" class="provider-radio" @change="selectChannelProvider()">
<el-radio v-for="item in providers.channelProviderList" :key="item.value" :label="item.value">{{ item.text }}</el-radio>
</el-radio-group>
</div>
</template>
<tempalte slot="balance">
<div class="channelMoney">
可用余额:
......@@ -214,6 +229,7 @@ export default {
name: 'channel',
type: 'select',
optionList: [],
addHtml: 'channel',
optionId: 'confId',
optionLabel: 'confLabel',
optionsName: 'channelList'
......@@ -449,8 +465,35 @@ export default {
prop: 'channel',
width: '200px',
formatter: cellValue => {
let arr = this.baseData.channelList.filter(item => item.confId == cellValue.channel)
return arr.length > 0 ? arr[0].confLabel : '--'
let arr = this.baseData.channelList.filter(item => item.value == cellValue.channel)
return arr.length > 0 ? arr[0].label : '--'
}
},
{
label: '服务商',
prop: 'channelProvider',
width: '200px',
formatter: cellValue => {
let Providers = [
{
value: 'SHENBIANYUN-XH',
label: '翔禾'
},
{
value: 'SHENBIANYUN-YJ',
label: '雅钧'
},
{
value: 'SHENBIANYUN-BC',
label: '博晟'
},
{
value: 'SHENBIANYUN-CJ',
label: '晨景'
}
]
let arr = cellValue.channelProvider ? Providers.filter(item => item.value == cellValue.channelProvider) : ''
return arr.length > 0 ? arr[0].label : '--'
}
},
{
......@@ -468,6 +511,7 @@ export default {
}
]
},
providers: {},
pageConf: { pageSize: 'pageSize', pageNum: 'currentPage', totalCount: 'total' },
// 基本数据
baseData: {
......@@ -505,28 +549,46 @@ export default {
],
channelList: [
{
confId: 'SHENBIANYUN',
confLabel: '身边云-银行卡'
value: 'SHENBIANYUN',
label: '身边云-银行卡',
children: [
{
value: 'SHENBIANYUN-XH',
label: '翔禾'
},
{
value: 'SHENBIANYUN-YJ',
label: '雅钧'
},
{
value: 'SHENBIANYUN-BC',
label: '博晟'
},
{
value: 'SHENBIANYUN-CJ',
label: '晨景'
}
]
},
{
confId: 'TXIAT',
confLabel: '熠轩-银行卡'
value: 'TXIAT',
label: '熠轩-银行卡'
},
{
confId: 'ZX',
confLabel: '中雄-银行卡'
value: 'ZX',
label: '中雄-银行卡'
},
{
confId: 'YUNHUO',
confLabel: '云获(嘀加)-银行卡'
value: 'YUNHUO',
label: '云获(嘀加)-银行卡'
},
{
confId: 'YUNHUO-ZY',
confLabel: '云获(中赢)-银行卡'
value: 'YUNHUO-ZY',
label: '云获(中赢)-银行卡'
},
{
confId: 'YUNHUO-WX',
confLabel: '云获(中赢)-微信'
value: 'YUNHUO-WX',
label: '云获(中赢)-微信'
}
],
withdrawalTypeList: [
......@@ -591,7 +653,8 @@ export default {
channel: '',
captcha: '',
remark: '',
balance: ''
balance: '',
channelProvider: ''
},
payFormData: [
{
......@@ -607,7 +670,21 @@ export default {
optionId: 'channel',
optionLabel: 'channelName',
optionsName: 'payChannelList',
optionList: []
optionList: [],
handleRadioChange: val => {
console.log(555)
this.payForm.channelProvider = ''
this.getBalance()
this.getAdmin()
this.isCodeDisabled = false
clearInterval(this.timer)
this.timer = null
this.payForm.captcha = ''
}
},
{
label: '',
addHtml: 'channelProvider'
},
{
label: '',
......@@ -675,17 +752,12 @@ export default {
if (isNaN(Number(newVal))) {
this.searchForm.customerPhone = newVal.replace(/[^\d]/g, '')
}
},
'payForm.channel'(newVal) {
if (newVal) {
this.getBalance()
this.getAdmin()
this.isCodeDisabled = false
clearInterval(this.timer)
this.timer = null
this.payForm.captcha = ''
}
}
// 'payForm.channel'(newVal) {
// if (newVal) {
// }
// }
},
mounted() {
this.$utils.getOptionsList(this, 'showFormData')
......@@ -693,6 +765,18 @@ export default {
this.getSettleAmount()
},
methods: {
//选择服务商
selectChannelProvider(e) {
console.log(e, this.payForm.channelProvider)
if (this.payForm.channelProvider) {
this.payForm.channel = this.providers.channel
this.getBalance()
this.getAdmin()
}
},
selectAddAttr(e) {
console.log(e)
},
//批量操作/一键操作
async handleSelectBtn(index, type) {
this.operaForm.select = type == 'batch' ? false : true
......@@ -700,7 +784,7 @@ export default {
let result = await this.getAllPayAmount(index, type)
if (result) {
if (index == 0) {
this.handleCheck()
this.handleCheck()
} else if (index == 1) {
//付款前校验记录列表是否是同一个提现类型
let data = await this.checkRecordsTransferType(type)
......@@ -798,6 +882,10 @@ export default {
params.receiptDateStart = dayjs(this.searchForm.receiptDateStr[0]).format('YYYY-MM-DD') + ' 00:00:01'
params.receiptDateEnd = dayjs(this.searchForm.receiptDateStr[1]).format('YYYY-MM-DD') + ' 23:59:59'
}
if (this.searchForm.channel) {
params.channel = this.searchForm.channel[0]
params.channelProvider = this.searchForm.channel.length > 1 ? this.searchForm.channel[1] : ''
}
delete params.payTimeStr, delete params.applyDateStr, delete params.receiptDateStr
return params
......@@ -1034,15 +1122,32 @@ export default {
})
.then(res => {
if (res) {
this.baseData.payChannelList = res
let index = this.baseData.payChannelList.findIndex(item => {
return item.channel == 'SHENBIANYUN'
})
if(index!=-1){
this.providers = this.baseData.payChannelList.splice(index, 1)[0]
}
if(this.baseData.payChannelList.length==0){
this.payForm.channel=this.providers.channel
this.payForm.channelProvider=this.providers.channelProviderList[0].value
}
this.$utils.getOptionsList(this, 'payFormData', false, 'channel')
//默认选择
this.payForm.channel = res[0].channel
if(this.baseData.payChannelList.length>0){
this.payForm.channel = this.baseData.payChannelList[0].channel
}
this.getBalance()
this.getAdmin()
}
})
},
getBalance() {
this.$apis.withdraw.getBalance({ channel: this.payForm.channel }).then(res => {
this.$apis.withdraw.getBalance({ channel: this.payForm.channel, channelProvider: this.payForm.channelProvider }).then(res => {
if (res) {
this.payForm.balance = res
} else {
......@@ -1114,14 +1219,16 @@ export default {
...this.tableSearchForm,
payChannel: this.payForm.channel,
captcha: this.payForm.captcha,
remark: this.payForm.remark
remark: this.payForm.remark,
channelProvider: this.payForm.channelProvider
}
: {
phone: this.payForm.phone,
ids: this.ids,
channel: this.payForm.channel,
captcha: this.payForm.captcha,
remark: this.payForm.remark
remark: this.payForm.remark,
channelProvider: this.payForm.channelProvider
}
this.loading = true
this.$apis.withdraw[Methods](params)
......@@ -1366,4 +1473,23 @@ export default {
}
}
}
.provider-wrap {
color: #666666;
font-size: 14px;
margin-left: 154px;
margin-top: -20px;
}
.provider-title {
display: flex;
align-items: center;
.provider-icon {
width: 16px;
height: 16px;
margin-right: 4px;
}
}
.provider-radio {
margin-left: 20px;
}
</style>
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!