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
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!