Commit 27976fff by wangzhihui

身边云需求开发

1 parent 3ffa53f5
...@@ -40,7 +40,7 @@ ...@@ -40,7 +40,7 @@
</div> </div>
<!-- radio --> <!-- radio -->
<div v-else-if="item.type === '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]"> <el-radio v-for="subItem in item.optionList" :key="subItem[item.optionId]" :disabled="subItem.isDisabled" :label="subItem[item.optionId]">
{{ subItem[item.optionLabel] }} {{ subItem[item.optionLabel] }}
<slot :name="subItem.suffixSonSlot" :scope="subItem"></slot> <slot :name="subItem.suffixSonSlot" :scope="subItem"></slot>
......
<template> <template>
<div class="points"> <div class="points">
<div class="container"> <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"> <div class="table-header">
<!-- <h2>积分提现列表</h2> --> <!-- <h2>积分提现列表</h2> -->
<div class="statistics"> <div class="statistics">
...@@ -62,6 +66,17 @@ ...@@ -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"> <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"> <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"> <tempalte slot="balance">
<div class="channelMoney"> <div class="channelMoney">
可用余额: 可用余额:
...@@ -214,6 +229,7 @@ export default { ...@@ -214,6 +229,7 @@ export default {
name: 'channel', name: 'channel',
type: 'select', type: 'select',
optionList: [], optionList: [],
addHtml: 'channel',
optionId: 'confId', optionId: 'confId',
optionLabel: 'confLabel', optionLabel: 'confLabel',
optionsName: 'channelList' optionsName: 'channelList'
...@@ -449,8 +465,35 @@ export default { ...@@ -449,8 +465,35 @@ export default {
prop: 'channel', prop: 'channel',
width: '200px', width: '200px',
formatter: cellValue => { formatter: cellValue => {
let arr = this.baseData.channelList.filter(item => item.confId == cellValue.channel) let arr = this.baseData.channelList.filter(item => item.value == cellValue.channel)
return arr.length > 0 ? arr[0].confLabel : '--' 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 { ...@@ -468,6 +511,7 @@ export default {
} }
] ]
}, },
providers: {},
pageConf: { pageSize: 'pageSize', pageNum: 'currentPage', totalCount: 'total' }, pageConf: { pageSize: 'pageSize', pageNum: 'currentPage', totalCount: 'total' },
// 基本数据 // 基本数据
baseData: { baseData: {
...@@ -505,28 +549,46 @@ export default { ...@@ -505,28 +549,46 @@ export default {
], ],
channelList: [ channelList: [
{ {
confId: 'SHENBIANYUN', value: 'SHENBIANYUN',
confLabel: '身边云-银行卡' label: '身边云-银行卡',
children: [
{
value: 'SHENBIANYUN-XH',
label: '翔禾'
},
{
value: 'SHENBIANYUN-YJ',
label: '雅钧'
},
{
value: 'SHENBIANYUN-BC',
label: '博晟'
},
{
value: 'SHENBIANYUN-CJ',
label: '晨景'
}
]
}, },
{ {
confId: 'TXIAT', value: 'TXIAT',
confLabel: '熠轩-银行卡' label: '熠轩-银行卡'
}, },
{ {
confId: 'ZX', value: 'ZX',
confLabel: '中雄-银行卡' label: '中雄-银行卡'
}, },
{ {
confId: 'YUNHUO', value: 'YUNHUO',
confLabel: '云获(嘀加)-银行卡' label: '云获(嘀加)-银行卡'
}, },
{ {
confId: 'YUNHUO-ZY', value: 'YUNHUO-ZY',
confLabel: '云获(中赢)-银行卡' label: '云获(中赢)-银行卡'
}, },
{ {
confId: 'YUNHUO-WX', value: 'YUNHUO-WX',
confLabel: '云获(中赢)-微信' label: '云获(中赢)-微信'
} }
], ],
withdrawalTypeList: [ withdrawalTypeList: [
...@@ -591,7 +653,8 @@ export default { ...@@ -591,7 +653,8 @@ export default {
channel: '', channel: '',
captcha: '', captcha: '',
remark: '', remark: '',
balance: '' balance: '',
channelProvider: ''
}, },
payFormData: [ payFormData: [
{ {
...@@ -607,7 +670,21 @@ export default { ...@@ -607,7 +670,21 @@ export default {
optionId: 'channel', optionId: 'channel',
optionLabel: 'channelName', optionLabel: 'channelName',
optionsName: 'payChannelList', 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: '', label: '',
...@@ -675,17 +752,12 @@ export default { ...@@ -675,17 +752,12 @@ export default {
if (isNaN(Number(newVal))) { if (isNaN(Number(newVal))) {
this.searchForm.customerPhone = newVal.replace(/[^\d]/g, '') 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() { mounted() {
this.$utils.getOptionsList(this, 'showFormData') this.$utils.getOptionsList(this, 'showFormData')
...@@ -693,6 +765,18 @@ export default { ...@@ -693,6 +765,18 @@ export default {
this.getSettleAmount() this.getSettleAmount()
}, },
methods: { 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) { async handleSelectBtn(index, type) {
this.operaForm.select = type == 'batch' ? false : true this.operaForm.select = type == 'batch' ? false : true
...@@ -700,7 +784,7 @@ export default { ...@@ -700,7 +784,7 @@ export default {
let result = await this.getAllPayAmount(index, type) let result = await this.getAllPayAmount(index, type)
if (result) { if (result) {
if (index == 0) { if (index == 0) {
this.handleCheck() this.handleCheck()
} else if (index == 1) { } else if (index == 1) {
//付款前校验记录列表是否是同一个提现类型 //付款前校验记录列表是否是同一个提现类型
let data = await this.checkRecordsTransferType(type) let data = await this.checkRecordsTransferType(type)
...@@ -798,6 +882,10 @@ export default { ...@@ -798,6 +882,10 @@ export default {
params.receiptDateStart = dayjs(this.searchForm.receiptDateStr[0]).format('YYYY-MM-DD') + ' 00:00:01' 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' 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 delete params.payTimeStr, delete params.applyDateStr, delete params.receiptDateStr
return params return params
...@@ -1034,15 +1122,32 @@ export default { ...@@ -1034,15 +1122,32 @@ export default {
}) })
.then(res => { .then(res => {
if (res) { if (res) {
this.baseData.payChannelList = 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.$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() { 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) { if (res) {
this.payForm.balance = res this.payForm.balance = res
} else { } else {
...@@ -1114,14 +1219,16 @@ export default { ...@@ -1114,14 +1219,16 @@ export default {
...this.tableSearchForm, ...this.tableSearchForm,
payChannel: this.payForm.channel, payChannel: this.payForm.channel,
captcha: this.payForm.captcha, captcha: this.payForm.captcha,
remark: this.payForm.remark remark: this.payForm.remark,
channelProvider: this.payForm.channelProvider
} }
: { : {
phone: this.payForm.phone, phone: this.payForm.phone,
ids: this.ids, ids: this.ids,
channel: this.payForm.channel, channel: this.payForm.channel,
captcha: this.payForm.captcha, captcha: this.payForm.captcha,
remark: this.payForm.remark remark: this.payForm.remark,
channelProvider: this.payForm.channelProvider
} }
this.loading = true this.loading = true
this.$apis.withdraw[Methods](params) this.$apis.withdraw[Methods](params)
...@@ -1366,4 +1473,23 @@ export default { ...@@ -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> </style>
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!