Commit 3bb8c7f7 by wangzhihui

积分提现管理

1 parent 216ff96c
...@@ -10,7 +10,16 @@ const getList = params => { ...@@ -10,7 +10,16 @@ const getList = params => {
sign: true sign: true
}) })
} }
//付款渠道树形接口
const getChannelTree = params => {
params.method = `scrm.api.shopmall.integral.transfer.channel.config.tree`
return http({
url: 'rop-scrm-shopmall/router',
method: 'POST',
data: params,
sign: true
})
}
// 获分提现获取管理员信息 // 获分提现获取管理员信息
const getAdmin = params => { const getAdmin = params => {
params.method = `scrm.api.shopmall.integral.transfer.out.getAdmin` params.method = `scrm.api.shopmall.integral.transfer.out.getAdmin`
...@@ -312,5 +321,34 @@ const payApprovalAgain = (params={}) => { ...@@ -312,5 +321,34 @@ const payApprovalAgain = (params={}) => {
returnAll: true returnAll: true
}) })
} }
// (积分提现获取付款渠道列表)
export default {payApprovalAgain,getChannelAccount,approvalDetail,removeApproval,getPaymentEntityList,applyApprovalOA,getApprovalLog,getApprovalPage,generateBatchCount, integralorderBatch,getPayAmount,getAllPayAmount, integralAllOut, integralAllpay, getList, getAdmin, orderExport, integralpay, integralApprove, integralOut, getSms, getMerchantList, getDetails, uploadXlsx, handleSaveImport, getBalance, getSettleAmount,getChannel ,checkRecordsTransferType} const getChannelList = (params={}) => {
params.method = `scrm.api.shopmall.integral.transfer.out.listChannel`
return http({
url: 'rop-scrm-shopmall/router',
method: 'POST',
data: params,
sign: true
})
}
// 积分提现获取付款主体列表
const getListPaymentEntity = (params={}) => {
params.method = `scrm.api.shopmall.integral.transfer.out.listPayEntity`
return http({
url: 'rop-scrm-shopmall/router',
method: 'POST',
data: params,
sign: true
})
}
//(积分提现获取付款代征主体列表, paymentEntityId
const getListPayLevy = (params={}) => {
params.method = `scrm.api.shopmall.integral.transfer.out.listPayLevy`
return http({
url: 'rop-scrm-shopmall/router',
method: 'POST',
data: params,
sign: true
})
}
export default {getListPayLevy,getListPaymentEntity,getChannelList,getChannelTree,payApprovalAgain,getChannelAccount,approvalDetail,removeApproval,getPaymentEntityList,applyApprovalOA,getApprovalLog,getApprovalPage,generateBatchCount, integralorderBatch,getPayAmount,getAllPayAmount, integralAllOut, integralAllpay, getList, getAdmin, orderExport, integralpay, integralApprove, integralOut, getSms, getMerchantList, getDetails, uploadXlsx, handleSaveImport, getBalance, getSettleAmount,getChannel ,checkRecordsTransferType}
...@@ -2,7 +2,11 @@ ...@@ -2,7 +2,11 @@
<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="channelHtml">
<el-cascader style="width: 100%" :props="props" v-model="searchForm.channelList" :placeholder="'请选择'" filterable @change="selectAddAttr($event, 'searchForm')"></el-cascader>
</template>
</GLCombiForm>
<!-- 表格区域 开始 --> <!-- 表格区域 开始 -->
<GLTable ref="withdrawRef" :getListApi="getListApi" :noDataImg="url" :searchForm="tableSearchForm" :tableParams="tableParams" :pageConf="pageConf" :beforeSearchFn="beforeSearchFn" @setTableFinishFun="setTableFinishFun" @selectionTable="selectionTable"> <GLTable ref="withdrawRef" :getListApi="getListApi" :noDataImg="url" :searchForm="tableSearchForm" :tableParams="tableParams" :pageConf="pageConf" :beforeSearchFn="beforeSearchFn" @setTableFinishFun="setTableFinishFun" @selectionTable="selectionTable">
<div class="flex_sc" slot="colorStatus" slot-scope="scope"> <div class="flex_sc" slot="colorStatus" slot-scope="scope">
...@@ -26,7 +30,7 @@ import * as dayjs from 'dayjs' ...@@ -26,7 +30,7 @@ import * as dayjs from 'dayjs'
import url from '@/assets/empty.png' import url from '@/assets/empty.png'
import DetailDialog from './approveView.vue' import DetailDialog from './approveView.vue'
import PayApproval from './payApproval.vue' import PayApproval from './payApproval.vue'
import { colors, tableStatus,PayerelList,channelList,statusList } from '@/utils/constants.js' import { colors, tableStatus, PayerelList, channelList, statusList } from '@/utils/constants.js'
export default { export default {
components: { components: {
DetailDialog, DetailDialog,
...@@ -46,6 +50,7 @@ export default { ...@@ -46,6 +50,7 @@ export default {
url: url, url: url,
searchForm: { searchForm: {
batchNo: '', batchNo: '',
channelList: [],
paymentChannel: '', paymentChannel: '',
approvalTime: [], approvalTime: [],
oaApprovalTime: [], oaApprovalTime: [],
...@@ -69,23 +74,24 @@ export default { ...@@ -69,23 +74,24 @@ export default {
maxlength: 20 maxlength: 20
}, },
{ {
label: '付款渠道',
name: 'paymentChannel',
type: 'select',
optionList: [],
optionId: 'confId',
optionLabel: 'confLabel',
optionsName: 'channelList'
},
{
label: '付款主体', label: '付款主体',
name: 'paymentSubject', name: 'channelList',
type: 'select', type: 'select',
addHtml: 'channelHtml',
optionList: [], optionList: [],
optionId: 'confId', optionId: 'confId',
optionLabel: 'confLabel', optionLabel: 'confLabel',
optionsName: 'PayerelList' optionsName: 'channelList'
}, },
// {
// label: '付款主体',
// name: 'paymentSubject',
// type: 'select',
// optionList: [],
// optionId: 'confId',
// optionLabel: 'confLabel',
// optionsName: 'PayerelList'
// },
{ {
label: '状态', label: '状态',
name: 'status', name: 'status',
...@@ -137,7 +143,7 @@ export default { ...@@ -137,7 +143,7 @@ export default {
fn: '编辑' fn: '编辑'
}, },
condition: row => { condition: row => {
return row.status == 0||row.status ==3 return row.status == 0 || row.status == 3
}, },
listeners: { listeners: {
click: row => { click: row => {
...@@ -153,7 +159,7 @@ export default { ...@@ -153,7 +159,7 @@ export default {
fn: '付款审批' fn: '付款审批'
}, },
condition: row => { condition: row => {
return row.status == 0||row.status ==3 return row.status == 0 || row.status == 3
}, },
listeners: { listeners: {
click: row => { click: row => {
...@@ -169,7 +175,7 @@ export default { ...@@ -169,7 +175,7 @@ export default {
fn: '到账明细' fn: '到账明细'
}, },
condition: row => { condition: row => {
return row.status == 5|| row.status == 6 return row.status == 5 || row.status == 6
}, },
listeners: { listeners: {
click: row => { click: row => {
...@@ -229,7 +235,14 @@ export default { ...@@ -229,7 +235,14 @@ export default {
prop: 'paymentSubject', prop: 'paymentSubject',
width: '200px' width: '200px'
}, },
{
label: '代征主体',
prop: 'levyName',
width: '200px',
formatter: cellValue => {
return cellValue.channelAccount ? cellValue.channelAccount.levyName : '--'
}
},
{ {
label: '状态', label: '状态',
prop: 'status', prop: 'status',
...@@ -281,7 +294,38 @@ export default { ...@@ -281,7 +294,38 @@ export default {
PayerelList, PayerelList,
merchantList: [], merchantList: [],
statusList, statusList,
channelList, channelList
},
props: {
lazy: true,
lazyLoad: (node, resolve) => {
const { level, value } = node
let res
let obj = {
0: async () => {
console.log(await this.getlistChannel(), 'await this.getlistChannel()')
res = await this.getlistChannel()
resolve(res)
},
1: async () => {
this.searchForm.channel = value
res = await this.getListPaymentEntity(value)
resolve(res)
},
2: async () => {
this.searchForm.paymentSubjectId = value
res = await this.getListPayLevy(value)
resolve(res)
},
3: async () => {
this.searchForm.paymentChannelId = value
// resolve({
// leaf:true
// })
}
}
obj[level]()
}
} }
} }
}, },
...@@ -290,6 +334,50 @@ export default { ...@@ -290,6 +334,50 @@ export default {
this.$utils.getOptionsList(this, 'showFormData') this.$utils.getOptionsList(this, 'showFormData')
}, },
methods: { methods: {
async getlistChannel() {
let arr = await this.$apis.withdraw.getChannelList()
let list = arr.map(item => {
return {
label: item.channelName,
value: item.channel
}
})
return list
},
async getListPaymentEntity(value) {
let arr = await this.$apis.withdraw.getListPaymentEntity({
channel: value
})
let list = arr.map(item => {
return {
label: item.paymentEntityName,
value: item.paymentEntityId
}
})
return list
},
async getListPayLevy(value) {
let arr = await this.$apis.withdraw.getListPayLevy({
paymentEntityId: value,
channel: this.searchForm.channel
})
let list = arr.map(item => {
return {
label: item.levyName,
value: item.id,
leaf: true
}
})
return list
},
selectAddAttr(e, formName) {
console.log(e)
let [value1, value2, value3] = e
if (value2) this[formName].paymentSubjectId = value2
if (value3) this[formName].paymentChannelId = value3 //代征主体
},
dialogClose() { dialogClose() {
this.detailVisible = false this.detailVisible = false
}, },
...@@ -308,7 +396,7 @@ export default { ...@@ -308,7 +396,7 @@ export default {
}, },
//导出 //导出
handleExport(row) { handleExport(row) {
const params ={approvalId: row.id} const params = { approvalId: row.id }
this.$apis.withdraw.orderExport(params).then(res => { this.$apis.withdraw.orderExport(params).then(res => {
this.$utils.aToExport(res) this.$utils.aToExport(res)
}) })
...@@ -347,7 +435,7 @@ export default { ...@@ -347,7 +435,7 @@ export default {
params.oaApprovalTimeStart = dayjs(this.searchForm.oaApprovalTime[0]).format('YYYY-MM-DD') + ' 00:00:01' params.oaApprovalTimeStart = dayjs(this.searchForm.oaApprovalTime[0]).format('YYYY-MM-DD') + ' 00:00:01'
params.oaApprovalTimeEnd = dayjs(this.searchForm.oaApprovalTime[1]).format('YYYY-MM-DD') + ' 23:59:59' params.oaApprovalTimeEnd = dayjs(this.searchForm.oaApprovalTime[1]).format('YYYY-MM-DD') + ' 23:59:59'
} }
delete params.channelList
delete params.userSettleTime, delete params.approvalTime, delete params.oaApprovalTime delete params.userSettleTime, delete params.approvalTime, delete params.oaApprovalTime
return params return params
}, },
...@@ -363,9 +451,9 @@ export default { ...@@ -363,9 +451,9 @@ export default {
handleReset() { handleReset() {
this.searchForm = { this.searchForm = {
batchNo: '', batchNo: '',
oaSpNo:'', oaSpNo: '',
paymentSubject: '', paymentSubjectId: '',
paymentChannel: '', paymentChannelId: '',
approvalTime: [], approvalTime: [],
oaApprovalTime: [], oaApprovalTime: [],
userSettleTime: [] userSettleTime: []
...@@ -392,6 +480,5 @@ export default { ...@@ -392,6 +480,5 @@ export default {
.gl-form-page /deep/ .el-dialog__footer { .gl-form-page /deep/ .el-dialog__footer {
text-align: center !important; text-align: center !important;
} }
</style> </style>
\ No newline at end of file \ No newline at end of file
...@@ -166,6 +166,13 @@ export default { ...@@ -166,6 +166,13 @@ export default {
label: '付款主体', label: '付款主体',
name: 'paymentSubject' name: 'paymentSubject'
}, },
{
label: '代征主体',
name: 'levyName',
addHtml:(cellValue)=>{
return cellValue.channelAccount ? cellValue.channelAccount.levyName : '-'
}
},
{ {
label: '渠道到账时间', label: '渠道到账时间',
......
...@@ -38,7 +38,7 @@ ...@@ -38,7 +38,7 @@
</el-row> </el-row>
</el-form> </el-form>
</div> </div>
<div v-if="recordInfo.operationList&&recordInfo.operationList.length"> <div v-if="recordInfo.operationList && recordInfo.operationList.length">
<p class="edit-title">操作记录</p> <p class="edit-title">操作记录</p>
<template v-for="(record, recordIdx) in recordInfo.operationList"> <template v-for="(record, recordIdx) in recordInfo.operationList">
<el-form label-width="154px" :inline="true" :key="recordIdx"> <el-form label-width="154px" :inline="true" :key="recordIdx">
...@@ -61,7 +61,7 @@ ...@@ -61,7 +61,7 @@
const tableStatus = ['待审核', '已审核', '第三方处理', '成功', '失败', '驳回'] const tableStatus = ['待审核', '已审核', '第三方处理', '成功', '失败', '驳回']
const colors = ['#FDB757', '#2CCA74', '#5850FF', '#2CCA74', '#999999', '#EB4E4E'] const colors = ['#FDB757', '#2CCA74', '#5850FF', '#2CCA74', '#999999', '#EB4E4E']
import { channelObj,sourceList } from '@/utils/constants.js' import { sourceList } from '@/utils/constants.js'
export default { export default {
name: 'DetailDialog', name: 'DetailDialog',
data() { data() {
...@@ -74,7 +74,10 @@ export default { ...@@ -74,7 +74,10 @@ export default {
paymentData: [], paymentData: [],
operationData: [], operationData: [],
isVisible: this.detailVisible, isVisible: this.detailVisible,
sourceList:sourceList sourceList: sourceList,
baseData: {
channelList: []
}
} }
}, },
props: { props: {
...@@ -94,8 +97,50 @@ export default { ...@@ -94,8 +97,50 @@ export default {
} }
}, },
computed: {}, computed: {},
mounted() {}, mounted() {
this.getChannelTree()
},
methods: { methods: {
removeEmptyChild(arr) {
return arr.map(item => {
// 如果有 child 字段,递归处理
if (item.child) {
console.log(this)
item.child = this.removeEmptyChild(item.child)
}
// 移除 child 为 null 或空数组的情况
if (item.child === null || (Array.isArray(item.child) && item.child.length === 0)) {
delete item.child
}
return item
})
},
getChannelTree() {
this.$apis.withdraw.getChannelTree({}).then(res => {
this.baseData.channelList = this.removeEmptyChild(res)
})
},
findChannelByCode(list, code) {
for (let item of list) {
// 如果当前项的 code 匹配,直接返回该项
if (item.code === code) {
return item
}
// 如果有 child 字段且不为空数组,递归查找
if (item.child && item.child.length > 0) {
const found = this.findChannelByCode(item.child, code)
if (found) {
return found
}
}
}
// 没有找到匹配项时返回 null
return null
},
handleCopy() { handleCopy() {
const text = this.recordInfo.errorMessage const text = this.recordInfo.errorMessage
const input = document.createElement('input') const input = document.createElement('input')
...@@ -107,7 +152,7 @@ export default { ...@@ -107,7 +152,7 @@ export default {
const isSuccessful = document.execCommand('copy') const isSuccessful = document.execCommand('copy')
document.body.removeChild(input) document.body.removeChild(input)
if(isSuccessful){ if (isSuccessful) {
this.$message.success('复制成功') this.$message.success('复制成功')
} }
}, },
...@@ -203,12 +248,17 @@ export default { ...@@ -203,12 +248,17 @@ export default {
label: '付款渠道', label: '付款渠道',
name: 'channel', name: 'channel',
addHtml: obj => { addHtml: obj => {
return channelObj[obj.channel] ? channelObj[obj.channel] : '--' let item = this.findChannelByCode(this.baseData.channelList, obj.channel)
return item ? item.name : '--'
} }
}, },
{ {
label: '付款主体', label: '付款主体',
name: 'paymentSubject' name: 'paymentEntityName'
},
{
label: '代征主体',
name: 'levyName'
}, },
{ {
label: '结算金额', label: '结算金额',
...@@ -239,7 +289,7 @@ export default { ...@@ -239,7 +289,7 @@ export default {
this.operationData = [ this.operationData = [
{ {
label: obj => { label: obj => {
return ['审核', '付款','受理'][obj.type] return ['审核', '付款', '受理'][obj.type]
}, },
name: 'type', name: 'type',
addHtml: obj => { addHtml: obj => {
...@@ -251,7 +301,7 @@ export default { ...@@ -251,7 +301,7 @@ export default {
} else if (obj.result == 1) { } else if (obj.result == 1) {
status = '驳回' status = '驳回'
color = '#EB4E4E' color = '#EB4E4E'
}else if(obj.result == 2){ } else if (obj.result == 2) {
status = '失败' status = '失败'
color = '#999999' color = '#999999'
} }
...@@ -270,7 +320,7 @@ export default { ...@@ -270,7 +320,7 @@ export default {
label = arr[obj.type] label = arr[obj.type]
} else if (obj.result == 1) { } else if (obj.result == 1) {
label = '操作人' label = '操作人'
}else{ } else {
label = arr[obj.type] label = arr[obj.type]
} }
return label return label
...@@ -285,7 +335,7 @@ export default { ...@@ -285,7 +335,7 @@ export default {
label = arr[obj.type] label = arr[obj.type]
} else if (obj.result == 1) { } else if (obj.result == 1) {
label = '操作时间' label = '操作时间'
}else{ } else {
label = arr[obj.type] label = arr[obj.type]
} }
return label return label
......
...@@ -4,7 +4,7 @@ ...@@ -4,7 +4,7 @@
<div class="container"> <div class="container">
<GLCombiForm ref="showSearch" :rowNumber="1" :formObj="searchForm" :formData="showFormData" @handleOk="handleSearch" @handleRest="handleReset"> <GLCombiForm ref="showSearch" :rowNumber="1" :formObj="searchForm" :formData="showFormData" @handleOk="handleSearch" @handleRest="handleReset">
<template slot="channel"> <template slot="channel">
<el-cascader :options="baseData.channelList" style="width: 100%" v-model="searchForm.channel" :placeholder="'请选择'" filterable @change="selectAddAttr($event)"></el-cascader> <el-cascader :options="baseData.channelList" :props="props" style="width: 100%" v-model="searchForm.channelList" :placeholder="'请选择'" filterable @change="selectAddAttr($event, 'searchForm')"></el-cascader>
</template> </template>
</GLCombiForm> </GLCombiForm>
<div class="table-header"> <div class="table-header">
...@@ -27,6 +27,7 @@ ...@@ -27,6 +27,7 @@
</div> </div>
</div> </div>
<div class="statistics"> <div class="statistics">
<div :class="['content', !isFold ? 'dynamic' : '']">
累计结算金额:熠轩-银行卡 累计结算金额:熠轩-银行卡
<span class="price">{{ settleAmount.yiXuanSettleAmount }}</span> <span class="price">{{ settleAmount.yiXuanSettleAmount }}</span>
元, 中雄-银行卡 元, 中雄-银行卡
...@@ -49,6 +50,19 @@ ...@@ -49,6 +50,19 @@
<span class="price">{{ settleAmount.birdWorkSettleAmount }}</span> <span class="price">{{ settleAmount.birdWorkSettleAmount }}</span>
元, 身边云(江西)-银行卡 元, 身边云(江西)-银行卡
<span class="price">{{ settleAmount.shenBianYunJXSettleAmount }}</span> <span class="price">{{ settleAmount.shenBianYunJXSettleAmount }}</span>
元, 薪享云-银行卡
<span class="price">{{ settleAmount.xinXiangYunSettleAmount }}</span>
</div>
<div @click="handleFold">
<div class="fold" v-if="isFold">
展开
<i class="el-icon-arrow-down"></i>
</div>
<div class="fold" v-else>
收起
<i class="el-icon-arrow-up"></i>
</div>
</div>
</div> </div>
<!-- 表格区域 开始 --> <!-- 表格区域 开始 -->
<GLTable ref="withdrawRef" :getListApi="getListApi" :noDataImg="url" :searchForm="tableSearchForm" :tableParams="tableParams" :pageConf="pageConf" :beforeSearchFn="beforeSearchFn" @setTableFinishFun="setTableFinishFun" @selectionTable="selectionTable"> <GLTable ref="withdrawRef" :getListApi="getListApi" :noDataImg="url" :searchForm="tableSearchForm" :tableParams="tableParams" :pageConf="pageConf" :beforeSearchFn="beforeSearchFn" @setTableFinishFun="setTableFinishFun" @selectionTable="selectionTable">
...@@ -60,7 +74,7 @@ ...@@ -60,7 +74,7 @@
<span :class="{ idCardNo: scope.scope.idCardFront }" @click="openIdCardDialog(scope.scope)">{{ scope.scope.idCardNo }}</span> <span :class="{ idCardNo: scope.scope.idCardFront }" @click="openIdCardDialog(scope.scope)">{{ scope.scope.idCardNo }}</span>
</div> </div>
<div slot="agreement" slot-scope="scope"> <div slot="agreement" slot-scope="scope">
<span :class="{ 'agreement': scope.scope.disclaimerAgreementUrl }" @click="openAgreement(scope.scope.disclaimerAgreementUrl)">{{scope.scope.disclaimerAgreementUrl?'协议':'--'}}</span> <span :class="{ agreement: scope.scope.disclaimerAgreementUrl }" @click="openAgreement(scope.scope.disclaimerAgreementUrl)">{{ scope.scope.disclaimerAgreementUrl ? '协议' : '--' }}</span>
</div> </div>
<div class="table-btns" slot="auth-button" slot-scope="scope"> <div class="table-btns" slot="auth-button" slot-scope="scope">
<GLTableButton :buttonList="tableButtonList" :buttonItem="scope.scope" :buttonNum="3"></GLTableButton> <GLTableButton :buttonList="tableButtonList" :buttonItem="scope.scope" :buttonNum="3"></GLTableButton>
...@@ -95,10 +109,13 @@ ...@@ -95,10 +109,13 @@
</el-radio-group> </el-radio-group>
</div> </div>
</template> </template>
<template slot="channelHtml">
<el-cascader :options="baseData.channelList" :props="props" style="width: 100%" v-model="payForm.channelList" :placeholder="'请选择'" filterable @change="selectAddAttr($event, 'payForm')"></el-cascader>
</template>
<tempalte slot="balance"> <tempalte slot="balance">
<div class="channelMoney"> <div class="channelMoney">
可用余额: 可用余额:
<span class="price">{{ this.payForm.balance }}</span> <span class="price">{{ this.payForm.balance || '-' }}</span>
<template v-if="this.payForm.balance != '-'">元</template> <template v-if="this.payForm.balance != '-'">元</template>
</div> </div>
</tempalte> </tempalte>
...@@ -181,9 +198,9 @@ import DetailDialog from './detail.vue' ...@@ -181,9 +198,9 @@ import DetailDialog from './detail.vue'
import * as dayjs from 'dayjs' import * as dayjs from 'dayjs'
import url from '@/assets/empty.png' import url from '@/assets/empty.png'
import util from '@/utils/index' import util from '@/utils/index'
import { modeTypeList,auditStatusStatusList,sourceList,withdrawalTypeList } from '@/utils/constants.js' import { modeTypeList, auditStatusStatusList, sourceList, withdrawalTypeList } from '@/utils/constants.js'
const tableStatus = ['待审核', '已审核', '第三方处理', '成功', '失败', '驳回', '受理失败','批次处理中'] const tableStatus = ['待审核', '已审核', '第三方处理', '成功', '失败', '驳回', '受理失败', '批次处理中']
const colors = ['#FDB757', '#2CCA74', '#5850FF', '#2CCA74', '#999999', '#EB4E4E', '#2CCA74','#F59619FF'] const colors = ['#FDB757', '#2CCA74', '#5850FF', '#2CCA74', '#999999', '#EB4E4E', '#2CCA74', '#F59619FF']
const tabelHeaderModel = ['商户名称', '商户号', '客户名称', '客户手机号', '提现金额', '收款人姓名', '收款人身份证', '收款银行卡号', '收款银行', '收款人手机号'] const tabelHeaderModel = ['商户名称', '商户号', '客户名称', '客户手机号', '提现金额', '收款人姓名', '收款人身份证', '收款银行卡号', '收款银行', '收款人手机号']
export default { export default {
components: { components: {
...@@ -191,6 +208,12 @@ export default { ...@@ -191,6 +208,12 @@ export default {
}, },
data() { data() {
return { return {
props: {
value: 'code',
label: 'name',
children: 'child'
},
isFold: true,
id: '', id: '',
isIdCard: false, isIdCard: false,
checkLoading: false, checkLoading: false,
...@@ -214,12 +237,12 @@ export default { ...@@ -214,12 +237,12 @@ export default {
} }
], ],
searchForm: { searchForm: {
name:'', name: '',
outSettleOrderId: '', outSettleOrderId: '',
customerName: '', customerName: '',
customerPhone: '', customerPhone: '',
status: '', status: '',
channel: '', channelList: [],
merchantName: '', merchantName: '',
transferType: '', transferType: '',
mode: '', mode: '',
...@@ -353,7 +376,7 @@ export default { ...@@ -353,7 +376,7 @@ export default {
fn: '审核' fn: '审核'
}, },
condition: row => { condition: row => {
return row.status == 0&&row.transferType!=0 return row.status == 0 && row.transferType != 0
}, },
listeners: { listeners: {
click: row => { click: row => {
...@@ -385,7 +408,7 @@ export default { ...@@ -385,7 +408,7 @@ export default {
fn: '付款' fn: '付款'
}, },
condition: row => { condition: row => {
return (row.status == 1 || row.status == 6)&&row.transferType!=0 return (row.status == 1 || row.status == 6) && row.transferType != 0
}, },
listeners: { listeners: {
click: row => { click: row => {
...@@ -512,28 +535,30 @@ export default { ...@@ -512,28 +535,30 @@ export default {
} }
}, },
{ {
label: '付款渠道',
prop: 'channel',
width: '200px',
formatter: cellValue => {
let item = this.findChannelByCode(this.baseData.channelList, cellValue.channel)
return item ? item.name : '--'
}
},
{
label: '付款主体', label: '付款主体',
prop: 'paymentSubject', prop: 'paymentEntityName',
width: '200px' width: '200px'
// formatter: cellValue => {
// // 类型为「积分提现」该提现记录所归属的提现批次审批时选择的付款主体(嘀加/数科),非「积分提现」类型,或「积分提现」待审批,则展示=“-”
// cellValue.transferType ==0&&cellValue.status!=0?cellValue.paymentSubject:'--'
// }
}, },
{ {
label: '付款时间', label: '代征主体',
prop: 'payDate', prop: 'levyName',
width: '200px' width: '200px'
}, },
{ {
label: '付款渠道', label: '付款时间',
prop: 'channel', prop: 'payDate',
width: '200px', width: '200px'
formatter: cellValue => {
let arr = this.baseData.channelList.filter(item => item.value == cellValue.channel)
return arr.length > 0 ? arr[0].label : '--'
}
}, },
{ {
label: '服务商', label: '服务商',
prop: 'channelProvider', prop: 'channelProvider',
...@@ -588,62 +613,11 @@ export default { ...@@ -588,62 +613,11 @@ export default {
baseData: { baseData: {
adminList: [], adminList: [],
merchantList: [], merchantList: [],
auditStatusStatusList:auditStatusStatusList, auditStatusStatusList: auditStatusStatusList,
channelList: [ channelList: [],
{ withdrawalTypeList: withdrawalTypeList,
value: 'SHENBIANYUN', modeTypeList: modeTypeList,
label: '身边云-银行卡', sourceList: sourceList,
children: [
{
value: 'SHENBIANYUN-XH',
label: '翔禾'
},
{
value: 'SHENBIANYUN-YJ',
label: '雅钧'
},
{
value: 'SHENBIANYUN-BC',
label: '博晟'
},
{
value: 'SHENBIANYUN-CJ',
label: '晨景'
}
]
},
{
value: 'TXIAT',
label: '熠轩-银行卡'
},
{
value: 'ZX',
label: '中雄-银行卡'
},
{
value: 'YUNHUO',
label: '云获(嘀加)-银行卡'
},
{
value: 'YUNHUO-ZY',
label: '云获(中赢)-银行卡'
},
{
value: 'YUNHUO-WX',
label: '云获(中赢)-微信'
},
{
value: 'BIRDWORK',
label: '智鸟-银行卡'
},
{
value: 'SHENBIANYUN_JX',
label: '身边云(江西)-银行卡'
}
],
withdrawalTypeList:withdrawalTypeList,
modeTypeList:modeTypeList,
sourceList:sourceList,
payChannelList: [] payChannelList: []
}, },
showPassDialog: false, showPassDialog: false,
...@@ -665,7 +639,8 @@ export default { ...@@ -665,7 +639,8 @@ export default {
captcha: '', captcha: '',
remark: '', remark: '',
balance: '', balance: '',
channelProvider: '' channelProvider: '',
channelList: []
}, },
payFormData: [ payFormData: [
{ {
...@@ -682,8 +657,8 @@ export default { ...@@ -682,8 +657,8 @@ export default {
optionLabel: 'channelName', optionLabel: 'channelName',
optionsName: 'payChannelList', optionsName: 'payChannelList',
optionList: [], optionList: [],
isHide: true,
handleRadioChange: val => { handleRadioChange: val => {
console.log(555)
this.payForm.channelProvider = '' this.payForm.channelProvider = ''
this.getBalance() this.getBalance()
this.getAdmin() this.getAdmin()
...@@ -695,7 +670,15 @@ export default { ...@@ -695,7 +670,15 @@ export default {
}, },
{ {
label: '', label: '',
addHtml: 'channelProvider' name: 'channelProvider',
addHtml: 'channelProvider',
isHide: true
},
{
label: '付款渠道',
name: 'channelList',
addHtml: 'channelHtml',
isHide: true
}, },
{ {
label: '', label: '',
...@@ -732,8 +715,9 @@ export default { ...@@ -732,8 +715,9 @@ export default {
} }
], ],
payRule: { payRule: {
channel: [{ required: true, message: '请选择付款渠道', trigger: 'change' }], channelList: [{ required: true, message: '请选择付款渠道', trigger: 'change' }],
captcha: [{ required: true, message: '请输入验证码', trigger: 'blur' }] captcha: [{ required: true, message: '请输入验证码', trigger: 'blur' }],
admin: [{ required: true, message: '请选择管理员', trigger: 'change' }]
}, },
importRule: { importRule: {
fileName: [{ required: true, message: '请选择', trigger: 'blur' }] fileName: [{ required: true, message: '请选择', trigger: 'blur' }]
...@@ -770,10 +754,39 @@ export default { ...@@ -770,10 +754,39 @@ export default {
}, },
mounted() { mounted() {
this.$utils.getOptionsList(this, 'showFormData') this.$utils.getOptionsList(this, 'showFormData')
this.getChannelTree()
this.getMerchantList() this.getMerchantList()
this.getSettleAmount() this.getSettleAmount()
}, },
methods: { methods: {
removeEmptyChild(arr) {
return arr.map(item => {
// 如果有 child 字段,递归处理
if (item.child) {
console.log(this)
item.child = this.removeEmptyChild(item.child)
}
// 移除 child 为 null 或空数组的情况
if (item.child === null || (Array.isArray(item.child) && item.child.length === 0)) {
delete item.child
}
return item
})
},
getChannelTree() {
this.$apis.withdraw.getChannelTree({}).then(res => {
this.baseData.channelList = this.removeEmptyChild(res)
})
},
findFormAttrId(formData, name) {
return this[formData].findIndex(item => item.name == name) || 0
},
handleFold() {
this.isFold = !this.isFold
},
generateBatchCount(all = true) { generateBatchCount(all = true) {
return new Promise((resolve, reject) => { return new Promise((resolve, reject) => {
let params = { let params = {
...@@ -812,15 +825,13 @@ export default { ...@@ -812,15 +825,13 @@ export default {
openIdCardDialog(row) { openIdCardDialog(row) {
if (row.idCardFront) { if (row.idCardFront) {
this.idCardForm = row this.idCardForm = row
console.log( this.idCardForm)
this.isIdCard = true this.isIdCard = true
} }
}, },
//协议 //协议
openAgreement(url) { openAgreement(url) {
this.pdfUrl=url this.pdfUrl = url
this.isAgreement = true this.isAgreement = true
console.log(this.pdfUrl)
}, },
CloseIdCard() { CloseIdCard() {
this.isIdCard = false this.isIdCard = false
...@@ -834,8 +845,51 @@ export default { ...@@ -834,8 +845,51 @@ export default {
this.getAdmin() this.getAdmin()
} }
}, },
selectAddAttr(e) { findChannelByCode(list, code) {
console.log(e) for (let item of list) {
// 如果当前项的 code 匹配,直接返回该项
if (item.code === code) {
return item
}
// 如果有 child 字段且不为空数组,递归查找
if (item.child && item.child.length > 0) {
const found = this.findChannelByCode(item.child, code)
if (found) {
return found
}
}
}
// 没有找到匹配项时返回 null
return null
},
selectAddAttr(e, formName) {
let [value1, value2, value3] = e
this[formName].channel = value1
if (value3) {
this[formName].levyCode = value3 //代征主体
}
if (value2) {
let item = this.findChannelByCode(this.baseData.channelList, value2)
if (item.type == 1) {
//服务商
this[formName].channelProvider = value2
this[formName].paymentEntityCode = ''
} else {
//付款主体
this[formName].paymentEntityCode = value2
this[formName].channelProvider = ''
}
}
if (this.isPay) {
this.getBalance()
this.getAdmin()
this.isCodeDisabled = false
clearInterval(this.timer)
this.timer = null
this.payForm.captcha = ''
}
}, },
//批量操作/一键操作 //批量操作/一键操作
async handleSelectBtn(index, type) { async handleSelectBtn(index, type) {
...@@ -951,9 +1005,8 @@ export default { ...@@ -951,9 +1005,8 @@ 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) { if (this.searchForm.channelList.length) {
params.channel = this.searchForm.channel[0] delete params.channelList
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
...@@ -977,10 +1030,14 @@ export default { ...@@ -977,10 +1030,14 @@ export default {
customerName: '', customerName: '',
customerPhone: '', customerPhone: '',
status: '', status: '',
channel: '', channelList: [],
merchantName: '', merchantName: '',
mode: '', mode: '',
withdrawalSource: '' withdrawalSource: '',
channelProvider: '',
paymentEntityCode: '',
levyCode: '',
channel: ''
} }
this.handleSearch() this.handleSearch()
}, },
...@@ -1162,7 +1219,17 @@ export default { ...@@ -1162,7 +1219,17 @@ export default {
this.payForm.transferType = row.transferType this.payForm.transferType = row.transferType
this.payForm.mode = row.mode this.payForm.mode = row.mode
} }
//积分提现类型
if (this.payForm.transferType == 0 || this.payForm.transferType == 2) {
this.payFormData[this.findFormAttrId('payFormData', 'channel')].isHide = true
this.payFormData[this.findFormAttrId('payFormData', 'channelProvider')].isHide = true
this.payFormData[this.findFormAttrId('payFormData', 'channelList')].isHide = false
} else {
this.getChannel() this.getChannel()
this.payFormData[this.findFormAttrId('payFormData', 'channel')].isHide = false
this.payFormData[this.findFormAttrId('payFormData', 'channelProvider')].isHide = false
this.payFormData[this.findFormAttrId('payFormData', 'channelList')].isHide = true
}
this.isPay = true this.isPay = true
}, },
getAdmin() { getAdmin() {
...@@ -1177,9 +1244,14 @@ export default { ...@@ -1177,9 +1244,14 @@ export default {
} }
}) })
this.$utils.getOptionsList(this, 'payFormData', false, 'admin') this.$utils.getOptionsList(this, 'payFormData', false, 'admin')
if (this.baseData.adminList.length == 0) {
this.payForm.admin = ''
this.payForm.phone = ''
} else {
this.payForm.admin = this.baseData.adminList[0].adminId this.payForm.admin = this.baseData.adminList[0].adminId
this.payForm.phone = this.baseData.adminList[0].phone this.payForm.phone = this.baseData.adminList[0].phone
} }
}
}) })
}, },
//积分提现获取业务对应的付款渠道 //积分提现获取业务对应的付款渠道
...@@ -1215,18 +1287,12 @@ export default { ...@@ -1215,18 +1287,12 @@ export default {
}) })
}, },
getBalance() { getBalance() {
this.$apis.withdraw.getBalance({ channel: this.payForm.channel, channelProvider: this.payForm.channelProvider }).then(res => { this.$apis.withdraw.getBalance({ channel: this.payForm.channel, channelProvider: this.payForm.channelProvider, paymentEntityCode: this.payForm.paymentEntityCode, levyCode: this.payForm.levyCode }).then(res => {
if (res) { if (res) {
this.payForm.balance = res this.payForm.balance = res
} else { } else {
this.payForm.balance = '-' this.payForm.balance = '-'
} }
// this.payFormData.forEach((item, index) => {
// if (item.name == 'balance') {
// item.isHide = !res
// // this.$set(this.payFormData, index, item)
// }
// })
}) })
}, },
comfirmCheck() { comfirmCheck() {
...@@ -1288,7 +1354,9 @@ export default { ...@@ -1288,7 +1354,9 @@ export default {
payChannel: this.payForm.channel, payChannel: this.payForm.channel,
captcha: this.payForm.captcha, captcha: this.payForm.captcha,
remark: this.payForm.remark, remark: this.payForm.remark,
payChannelProvider: this.payForm.channelProvider payChannelProvider: this.payForm.channelProvider,
paymentEntityCode: this.payForm.paymentEntityCode,
levyCode: this.payForm.levyCode
} }
: { : {
phone: this.payForm.phone, phone: this.payForm.phone,
...@@ -1296,7 +1364,9 @@ export default { ...@@ -1296,7 +1364,9 @@ export default {
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 channelProvider: this.payForm.channelProvider,
paymentEntityCode: this.payForm.paymentEntityCode,
levyCode: this.payForm.levyCode
} }
this.loading = true this.loading = true
this.$apis.withdraw[Methods](params) this.$apis.withdraw[Methods](params)
...@@ -1406,7 +1476,7 @@ export default { ...@@ -1406,7 +1476,7 @@ export default {
padding: 0 20px 0 10px; padding: 0 20px 0 10px;
} }
} }
.selectOneBtn{ .selectOneBtn {
width: 100px; width: 100px;
margin-right: 10px; margin-right: 10px;
/deep/.el-input__inner { /deep/.el-input__inner {
...@@ -1423,6 +1493,28 @@ export default { ...@@ -1423,6 +1493,28 @@ export default {
color: #999999; color: #999999;
line-height: 18px; line-height: 18px;
margin-bottom: 12px; margin-bottom: 12px;
display: flex;
align-items: center;
.content {
height: 18px;
overflow: hidden;
white-space: nowrap;
text-overflow: ellipsis;
}
.dynamic {
height: auto;
overflow: initial;
white-space: wrap;
}
.fold {
cursor: pointer;
color: #5850ff;
font-size: 12px;
display: flex;
align-items: center;
white-space: nowrap;
margin-left: 16px;
}
} }
.price { .price {
color: #5850ff; color: #5850ff;
......
...@@ -2,6 +2,9 @@ ...@@ -2,6 +2,9 @@
<template> <template>
<GLDialog class="gl-form-page gl-form-min payWrap" title="付款审批" mode="mid" :visible.sync="isVisible" :close-on-click-modal="false" :before-close="cancelPay"> <GLDialog class="gl-form-page gl-form-min payWrap" title="付款审批" mode="mid" :visible.sync="isVisible" :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="channelHtml">
<el-cascader style="width: 100%" :props="props" v-model="payForm.channelList" :placeholder="'请选择'" filterable @change="selectAddAttr($event, 'payForm')"></el-cascader>
</template>
<template slot="captcha"> <template slot="captcha">
<div class="captcha-wrap"> <div class="captcha-wrap">
<el-input v-model="payForm.captcha" placeholder="请输入"></el-input> <el-input v-model="payForm.captcha" placeholder="请输入"></el-input>
...@@ -36,37 +39,35 @@ export default { ...@@ -36,37 +39,35 @@ export default {
approverId: '', approverId: '',
phone: '', phone: '',
captcha: '', captcha: '',
remark: '' remark: '',
channelList: []
}, },
payFormData: [ payFormData: [
// {
// label: '付款渠道',
// name: 'paymentChannelId',
// type: 'select',
// optionsName: 'payChannelList',
// optionId: 'id',
// optionLabel: 'name',
// changeAttr: val => {
// this.payForm.channel = this.baseData.payChannelList.find(item => item.id === val).channel
// this.recordInfo.taxRate = this.baseData.payChannelList.find(item => item.id === val).tax + '%'
// this.payForm.paymentSubjectId=''
// this.getAdmin()
// this.getPaymentEntityList()
// this.calculateAmount()
// this.isCodeDisabled = false
// clearInterval(this.timer)
// this.timer = null
// this.payForm.captcha = ''
// }
// },
{ {
label: '此次付款渠道', label: '付款渠道',
name: 'paymentChannelId', name: 'channelList',
type: 'select', addHtml: 'channelHtml'
optionsName: 'payChannelList',
optionId: 'id',
optionLabel: 'name',
changeAttr: val => {
this.payForm.channel = this.baseData.payChannelList.find(item => item.id === val).channel
this.recordInfo.taxRate = this.baseData.payChannelList.find(item => item.id === val).tax + '%'
this.payForm.paymentSubjectId=''
this.getAdmin()
this.getPaymentEntityList()
this.calculateAmount()
this.isCodeDisabled = false
clearInterval(this.timer)
this.timer = null
this.payForm.captcha = ''
}
},
{
label: '此次付款主体',
name: 'paymentSubjectId',
type: 'select',
optionsName: 'paymentEntityList',
optionId: 'id',
optionLabel: 'name',
changeAttr: val => {}
}, },
{ {
label: '批次号', label: '批次号',
...@@ -129,13 +130,41 @@ export default { ...@@ -129,13 +130,41 @@ export default {
paymentChannelId: [{ required: true, message: '请选择付款渠道', trigger: 'change' }], paymentChannelId: [{ required: true, message: '请选择付款渠道', trigger: 'change' }],
paymentSubjectId: [{ required: true, message: '请选择付款主体', trigger: 'change' }], paymentSubjectId: [{ required: true, message: '请选择付款主体', trigger: 'change' }],
captcha: [{ required: true, message: '请输入验证码', trigger: 'blur' }], captcha: [{ required: true, message: '请输入验证码', trigger: 'blur' }],
explain: [{ required: true, message: '请输入发票及其他说明', trigger: 'blur' }] explain: [{ required: true, message: '请输入发票及其他说明', trigger: 'blur' }],
channelList: [{ required: true, message: '请选择付款渠道', trigger: 'change' }]
}, },
// 基本数据 // 基本数据
baseData: { baseData: {
payChannelList: [], payChannelList: [],
//付款主体 //付款主体
paymentEntityList: [] paymentEntityList: []
},
props: {
lazy: true,
lazyLoad: (node, resolve) => {
const { level, value } = node
let res
let obj = {
0: async () => {
res = await this.getlistChannel()
resolve(res)
},
1: async () => {
this.payForm.channel = value
res = await this.getListPaymentEntity(value)
resolve(res)
},
2: async () => {
this.payForm.paymentSubjectId = value
res = await this.getListPayLevy(value)
resolve(res)
},
3: async () => {
this.payForm.paymentChannelId = value
}
}
obj[level]()
}
} }
} }
}, },
...@@ -150,70 +179,113 @@ export default { ...@@ -150,70 +179,113 @@ export default {
}, },
watch: { watch: {
payVisible(newVal) { payVisible(newVal) {
console.log(newVal)
this.isVisible = newVal this.isVisible = newVal
if (newVal) {
this.getChannel()
this.$utils.getOptionsList(this, 'payFormData', false)
}
} }
}, },
mounted() {}, mounted() {},
methods: { methods: {
async getlistChannel() {
let arr = await this.$apis.withdraw.getChannelList()
let list = arr.map(item => {
return {
label: item.channelName,
value: item.channel
}
})
return list
},
async getListPaymentEntity(value) {
let arr = await this.$apis.withdraw.getListPaymentEntity({
channel: value
})
let list = arr.map(item => {
return {
label: item.paymentEntityName,
value: item.paymentEntityId
}
})
return list
},
async getListPayLevy(value) {
this.baseData.paymentEntityList = await this.$apis.withdraw.getListPayLevy({
paymentEntityId: value,
channel:this.payForm.channel
})
let list = this.baseData.paymentEntityList.map(item => {
return {
label: item.levyName,
value: item.id,
leaf: true
}
})
return list
},
selectAddAttr(e, formName) {
console.log(e)
this.payForm.paymentSubjectId = ''
let [value1, value2, value3] = e
if (value1) this[formName].channel = value1
if (value2) this[formName].paymentSubjectId = value2
if (value3) this[formName].paymentChannelId = value3 //代征主体
this.recordInfo.taxRate = this.baseData.paymentEntityList.find(item => item.id === value3).tax + '%'
this.getAdmin()
this.calculateAmount()
this.isCodeDisabled = false
clearInterval(this.timer)
this.timer = null
this.payForm.captcha = ''
},
calculateAmount() { calculateAmount() {
let { taxRate, pointTotal } = this.recordInfo, let { taxRate, pointTotal } = this.recordInfo,
rate = taxRate.split('%')[0] rate = taxRate.split('%')[0]
console.log(rate)
//本批次号积分提现总金额+渠道税点(积分总额×税点),保留小数点后 2位 //本批次号积分提现总金额+渠道税点(积分总额×税点),保留小数点后 2位
this.recordInfo.paymentTotal = (pointTotal + pointTotal * (rate / 100)).toFixed(2) this.recordInfo.paymentTotal = (pointTotal + pointTotal * (rate / 100)).toFixed(2)
}, },
//积分提现获取业务对应的付款渠道 // //积分提现获取业务对应的付款渠道
getChannel(transferType) { // getChannel(transferType) {
let arr = [] // let arr = []
this.$apis.withdraw.getChannelAccount().then(res => { // this.$apis.withdraw.getChannelAccount().then(res => {
if (res) { // if (res) {
console.log(res) // console.log(res)
// arr = res.map(item => { // // arr = res.map(item => {
// let channelInfo = item.name // // let channelInfo = item.name
// return { // // return {
// channelInfo, // // channelInfo,
// ...item // // ...item
// // }
// // })
// this.baseData.payChannelList = [...res]
// this.$utils.getOptionsList(this, 'payFormData', false, 'paymentChannelId')
// //默认选择
// if (this.baseData.payChannelList.length > 0) {
// this.payForm.paymentChannelId = this.baseData.payChannelList[0].id
// this.payForm.channel = this.baseData.payChannelList[0].channel
// this.recordInfo.taxRate = this.baseData.payChannelList[0].tax + '%'
// this.calculateAmount()
// }
// this.getPaymentEntityList()
// this.getAdmin()
// } // }
// }) // })
this.baseData.payChannelList = [ // },
...res // //支付主体
] // getPaymentEntityList() {
this.$utils.getOptionsList(this, 'payFormData', false, 'paymentChannelId') // let params = { channelAccountId: this.payForm.paymentChannelId }
//默认选择 // this.$apis.withdraw.getPaymentEntityList(params).then(res => {
if (this.baseData.payChannelList.length > 0) { // if (res) {
this.payForm.paymentChannelId = this.baseData.payChannelList[0].id // console.log(res)
this.payForm.channel = this.baseData.payChannelList[0].channel // this.baseData.paymentEntityList = res
this.recordInfo.taxRate = this.baseData.payChannelList[0].tax + '%' // this.$utils.getOptionsList(this, 'payFormData', false, 'paymentSubjectId')
this.calculateAmount() // // 默认选择
} // if (this.baseData.paymentEntityList.length > 0) {
this.getPaymentEntityList() // this.payForm.paymentSubjectId = this.baseData.paymentEntityList[0].id
this.getAdmin() // }
} // }
}) // })
}, // },
//支付主体
getPaymentEntityList() {
let params = { channelAccountId: this.payForm.paymentChannelId }
this.$apis.withdraw.getPaymentEntityList(params).then(res => {
if (res) {
console.log(res)
this.baseData.paymentEntityList = res
this.$utils.getOptionsList(this, 'payFormData', false, 'paymentSubjectId')
// 默认选择
if (this.baseData.paymentEntityList.length > 0) {
this.payForm.paymentSubjectId = this.baseData.paymentEntityList[0].id
}
}
})
},
getAdmin() { getAdmin() {
this.$apis.withdraw.getAdmin({ channel: this.payForm.channel }).then(res => { this.$apis.withdraw.getAdmin({ channel: this.payForm.channel }).then(res => {
if (res) { if (res && res.length > 0) {
this.baseData.adminList = res.map(item => { this.baseData.adminList = res.map(item => {
return { return {
adminId: `${item.phone}`, adminId: `${item.phone}`,
...@@ -222,10 +294,15 @@ export default { ...@@ -222,10 +294,15 @@ export default {
phone: item.phone phone: item.phone
} }
}) })
this.$utils.getOptionsList(this, 'payFormData', false, 'approverId')
this.payForm.approverId = this.baseData.adminList[0].adminId this.payForm.approverId = this.baseData.adminList[0].adminId
this.payForm.phone = this.baseData.adminList[0].phone this.payForm.phone = this.baseData.adminList[0].phone
} else {
this.payForm.approverId = ''
this.payForm.phone = ''
this.baseData.adminList = []
} }
this.$utils.getOptionsList(this, 'payFormData', false, 'approverId')
}) })
}, },
//付款 //付款
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!