Commit 3bb8c7f7 by wangzhihui

积分提现管理

1 parent 216ff96c
......@@ -10,7 +10,16 @@ const getList = params => {
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 => {
params.method = `scrm.api.shopmall.integral.transfer.out.getAdmin`
......@@ -312,5 +321,34 @@ const payApprovalAgain = (params={}) => {
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 @@
<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="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">
<div class="flex_sc" slot="colorStatus" slot-scope="scope">
......@@ -26,7 +30,7 @@ import * as dayjs from 'dayjs'
import url from '@/assets/empty.png'
import DetailDialog from './approveView.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 {
components: {
DetailDialog,
......@@ -46,6 +50,7 @@ export default {
url: url,
searchForm: {
batchNo: '',
channelList: [],
paymentChannel: '',
approvalTime: [],
oaApprovalTime: [],
......@@ -69,23 +74,24 @@ export default {
maxlength: 20
},
{
label: '付款渠道',
name: 'paymentChannel',
type: 'select',
optionList: [],
optionId: 'confId',
optionLabel: 'confLabel',
optionsName: 'channelList'
},
{
label: '付款主体',
name: 'paymentSubject',
name: 'channelList',
type: 'select',
addHtml: 'channelHtml',
optionList: [],
optionId: 'confId',
optionLabel: 'confLabel',
optionsName: 'PayerelList'
optionsName: 'channelList'
},
// {
// label: '付款主体',
// name: 'paymentSubject',
// type: 'select',
// optionList: [],
// optionId: 'confId',
// optionLabel: 'confLabel',
// optionsName: 'PayerelList'
// },
{
label: '状态',
name: 'status',
......@@ -137,8 +143,8 @@ export default {
fn: '编辑'
},
condition: row => {
return row.status == 0||row.status ==3
},
return row.status == 0 || row.status == 3
},
listeners: {
click: row => {
this.handleEdit(row)
......@@ -152,9 +158,9 @@ export default {
type: 'text',
fn: '付款审批'
},
condition: row => {
return row.status == 0||row.status ==3
},
condition: row => {
return row.status == 0 || row.status == 3
},
listeners: {
click: row => {
this.handleCheck(row)
......@@ -169,7 +175,7 @@ export default {
fn: '到账明细'
},
condition: row => {
return row.status == 5|| row.status == 6
return row.status == 5 || row.status == 6
},
listeners: {
click: row => {
......@@ -229,7 +235,14 @@ export default {
prop: 'paymentSubject',
width: '200px'
},
{
label: '代征主体',
prop: 'levyName',
width: '200px',
formatter: cellValue => {
return cellValue.channelAccount ? cellValue.channelAccount.levyName : '--'
}
},
{
label: '状态',
prop: 'status',
......@@ -281,7 +294,38 @@ export default {
PayerelList,
merchantList: [],
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 {
this.$utils.getOptionsList(this, 'showFormData')
},
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() {
this.detailVisible = false
},
......@@ -308,7 +396,7 @@ export default {
},
//导出
handleExport(row) {
const params ={approvalId: row.id}
const params = { approvalId: row.id }
this.$apis.withdraw.orderExport(params).then(res => {
this.$utils.aToExport(res)
})
......@@ -347,7 +435,7 @@ export default {
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'
}
delete params.channelList
delete params.userSettleTime, delete params.approvalTime, delete params.oaApprovalTime
return params
},
......@@ -363,9 +451,9 @@ export default {
handleReset() {
this.searchForm = {
batchNo: '',
oaSpNo:'',
paymentSubject: '',
paymentChannel: '',
oaSpNo: '',
paymentSubjectId: '',
paymentChannelId: '',
approvalTime: [],
oaApprovalTime: [],
userSettleTime: []
......@@ -392,6 +480,5 @@ export default {
.gl-form-page /deep/ .el-dialog__footer {
text-align: center !important;
}
</style>
\ No newline at end of file
......@@ -166,6 +166,13 @@ export default {
label: '付款主体',
name: 'paymentSubject'
},
{
label: '代征主体',
name: 'levyName',
addHtml:(cellValue)=>{
return cellValue.channelAccount ? cellValue.channelAccount.levyName : '-'
}
},
{
label: '渠道到账时间',
......
......@@ -38,7 +38,7 @@
</el-row>
</el-form>
</div>
<div v-if="recordInfo.operationList&&recordInfo.operationList.length">
<div v-if="recordInfo.operationList && recordInfo.operationList.length">
<p class="edit-title">操作记录</p>
<template v-for="(record, recordIdx) in recordInfo.operationList">
<el-form label-width="154px" :inline="true" :key="recordIdx">
......@@ -61,7 +61,7 @@
const tableStatus = ['待审核', '已审核', '第三方处理', '成功', '失败', '驳回']
const colors = ['#FDB757', '#2CCA74', '#5850FF', '#2CCA74', '#999999', '#EB4E4E']
import { channelObj,sourceList } from '@/utils/constants.js'
import { sourceList } from '@/utils/constants.js'
export default {
name: 'DetailDialog',
data() {
......@@ -74,7 +74,10 @@ export default {
paymentData: [],
operationData: [],
isVisible: this.detailVisible,
sourceList:sourceList
sourceList: sourceList,
baseData: {
channelList: []
}
}
},
props: {
......@@ -94,8 +97,50 @@ export default {
}
},
computed: {},
mounted() {},
mounted() {
this.getChannelTree()
},
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() {
const text = this.recordInfo.errorMessage
const input = document.createElement('input')
......@@ -107,7 +152,7 @@ export default {
const isSuccessful = document.execCommand('copy')
document.body.removeChild(input)
if(isSuccessful){
if (isSuccessful) {
this.$message.success('复制成功')
}
},
......@@ -203,12 +248,17 @@ export default {
label: '付款渠道',
name: 'channel',
addHtml: obj => {
return channelObj[obj.channel] ? channelObj[obj.channel] : '--'
let item = this.findChannelByCode(this.baseData.channelList, obj.channel)
return item ? item.name : '--'
}
},
{
label: '付款主体',
name: 'paymentSubject'
name: 'paymentEntityName'
},
{
label: '代征主体',
name: 'levyName'
},
{
label: '结算金额',
......@@ -239,7 +289,7 @@ export default {
this.operationData = [
{
label: obj => {
return ['审核', '付款','受理'][obj.type]
return ['审核', '付款', '受理'][obj.type]
},
name: 'type',
addHtml: obj => {
......@@ -251,7 +301,7 @@ export default {
} else if (obj.result == 1) {
status = '驳回'
color = '#EB4E4E'
}else if(obj.result == 2){
} else if (obj.result == 2) {
status = '失败'
color = '#999999'
}
......@@ -270,7 +320,7 @@ export default {
label = arr[obj.type]
} else if (obj.result == 1) {
label = '操作人'
}else{
} else {
label = arr[obj.type]
}
return label
......@@ -285,7 +335,7 @@ export default {
label = arr[obj.type]
} else if (obj.result == 1) {
label = '操作时间'
}else{
} else {
label = arr[obj.type]
}
return label
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!