Commit 5cd6143d by 前端

Merge branch 'SAAS+V5.2.0-1030' into 'master'

上线合并

See merge request !18
2 parents 216ff96c 4c7c1cac
......@@ -206,7 +206,8 @@ const updateCustomerIntegral = params => {
url: 'rop-scrm-shopmall/router',
method: 'POST',
data: params,
sign: true
sign: true,
returnAll: true
})
}
......
......@@ -10,10 +10,9 @@ const getList = params => {
sign: true
})
}
// 获分提现获取管理员信息
const getAdmin = params => {
params.method = `scrm.api.shopmall.integral.transfer.out.getAdmin`
//付款渠道树形接口
const getChannelTree = params => {
params.method = `scrm.api.shopmall.integral.transfer.channel.config.tree`
return http({
url: 'rop-scrm-shopmall/router',
method: 'POST',
......@@ -21,6 +20,16 @@ const getAdmin = params => {
sign: true
})
}
// 获分提现获取管理员信息
// const getAdmin = params => {
// params.method = `scrm.api.shopmall.integral.transfer.out.getAdmin`
// return http({
// url: 'rop-scrm-shopmall/router',
// method: 'POST',
// data: params,
// sign: true
// })
// }
// 积分提现列表-导出
const orderExport = params => {
......@@ -312,5 +321,43 @@ 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
})
}
const getAdmin = (params={}) => {
params.method = `scrm.api.shopmall.integral.transfer.channel.config.get`
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}
......@@ -149,3 +149,53 @@ export const channelObj = {
'BIRDWORK':'智鸟-银行卡',
'SHENBIANYUN_JX':'身边云(江西)-银行卡'
}
export const statisticsTypeList = [
{
confId: 'yiXuanSettleAmount',
confLabel: '熠轩-银行卡'
},
{
confId: 'zxSettleAmount',
confLabel: '中雄-银行卡'
},
{
confId: 'yunHuoSettleAmount',
confLabel: '云获(嘀加)-银行卡'
},
{
confId: 'yunHuoZYSettleAmount',
confLabel: '云获(中赢)-银行卡'
},
{
confId: 'yunHuoWXSettleAmount',
confLabel: '云获(中赢)-微信'
},
{
confId: 'shenBianYunXHSettleAmount',
confLabel: '身边云(翔禾)-银行卡'
},
{
confId: 'shenBianYunYJSettleAmount',
confLabel: '身边云(雅钧)-银行卡'
},
{
confId: 'shenBianYunBCSettleAmount',
confLabel: '身边云(博晟)-银行卡'
},
{
confId: 'shenBianYunCJSettleAmount',
confLabel: '身边云(晨景)-银行卡'
},
{
confId: 'birdWorkSettleAmount',
confLabel: '智鸟-银行卡'
},
{
confId: 'shenBianYunJXSettleAmount',
confLabel: '身边云(江西)-银行卡'
},
{
confId: 'xinXiangYunSettleAmount',
confLabel: '薪享云-银行卡'
}
]
\ No newline at end of file
......@@ -22,7 +22,7 @@
<template #merchantId>
<div class="upload">
<div class="upload-btn">
<el-button size="small" @click="relateStoreVisible = true" :disabled="pageObject.id">
<el-button size="small" @click="relateStoreVisible = true" :disabled="pageObject.id || $globalState.session.loginpath == '/login'">
<i class="el-icon-plus"></i>
选择商户
</el-button>
......@@ -364,6 +364,33 @@ export default {
}
}
},
created() {
/** loginpath:标识系统
* 门店版:/login
* 1、默认带出商户,“选择商户”按钮置灰
* 2、导入充值人群,去掉“管理层”
* 运营版:/oss
*/
if (this.$globalState.session.loginpath == '/login') {
this.baseData.personTypeList.splice(1, 1)
this.configForm.merchantId = this.$globalState.session.merchantId
this.configForm.merchantName = this.$globalState.session.merchantName
this.loading = true
this.$apis.points.getMerchantCharge({ merchantId: this.configForm.merchantId }).then(res => {
if (res) {
this.totalFormData.map(e => {
if (['gasCardServiceCharge', 'passageServiceCharge'].includes(e.name)) {
const val = res[e.name] || 0
e.label = e.label.replace(/\d+/g, val)
this.chargeObject[e.name] = val
}
})
}
}).finally(() => {
this.loading = false
})
}
},
mounted() {
const { id, type } = this.$route.query
if (id) this.getDetail(id, type)
......@@ -413,6 +440,9 @@ export default {
handleConfirm() {
const { disabled, id } = this.pageObject
if (disabled) return this.$router.go(-1)
if (this.loading) {
return true
}
this.$refs.fromRef.$refs.formRef.validate(async valid => {
if (valid) {
try {
......@@ -460,14 +490,16 @@ export default {
}
if (id) params.id = id
const res = await this.$apis.points.updateCustomerIntegral(params)
if (res) {
console.log(res)
if (res.code == 0) {
this.$message({
message: id ? '编辑成功' : '创建成功',
type: 'success'
})
setTimeout(() => this.$router.go(-1), 1e3)
} else {
this.loading = false
}
this.loading = false
} catch (error) {
this.loading = false
this.$message.error(error || '操作失败')
......
......@@ -15,8 +15,7 @@
@click="jump"
size="small"
>门店客户积分充值</el-button>
<el-button @click="toSMS" size="small">提醒短信
</el-button>
<GLButton @click="toSMS" fn="提醒短信" size="small">提醒短信</GLButton>
<el-button @click="handleExport" size="small">导出
</el-button>
</div>
......@@ -187,6 +186,11 @@ export default {
addHtml: 'status',
},
{
label: '创建人',
prop: 'createdByName',
minWidth: 150,
},
{
label: '创建时间',
minWidth: 150,
formatter: cell => dayjs(cell.createdDate).format('YYYY/MM/DD HH:mm:ss')
......@@ -205,10 +209,11 @@ export default {
},
tableButtonList: [
{
type: 'el-button',
type: 'GLButton',
name: '审核',
attrs: {
type: 'text',
fn: '审核'
},
condition: row => row.status == 0,
listeners: {
......@@ -230,10 +235,11 @@ export default {
}
},
{
type: 'el-button',
type: 'GLButton',
name: '编辑',
attrs: {
type: 'text',
fn: '编辑'
},
condition: row => row.status == 0,
listeners: {
......@@ -247,6 +253,22 @@ export default {
auditObj: {}
}
},
created () {
/** loginpath:标识系统
* 门店版:/login
* 1、筛选去掉“商户名称”
* 2、去掉“提醒短信” - 系统权限控制
* 3、列表去掉“审核”和“编辑” - 系统权限控制
* 运营版:/oss
*/
if(this.$globalState.session.loginpath == '/login') {
// 1、筛选去掉“商户名称”
const searchIdx = this.searchFormData.findIndex(item => item.name == 'merchantName')
if(searchIdx != -1) {
this.searchFormData.splice(searchIdx, 1)
}
}
},
mounted () {
},
methods: {
......
......@@ -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: [],
......@@ -70,22 +75,23 @@ export default {
},
{
label: '付款渠道',
name: 'paymentChannel',
name: 'channelList',
type: 'select',
addHtml: 'channelHtml',
optionList: [],
optionId: 'confId',
optionLabel: 'confLabel',
optionsName: 'channelList'
},
{
label: '付款主体',
name: 'paymentSubject',
type: 'select',
optionList: [],
optionId: 'confId',
optionLabel: 'confLabel',
optionsName: 'PayerelList'
},
// {
// 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) => {
console.log(node, 'node')
const { level, value } = node
let res
let obj = {
0: async () => {
res = await this.getlistChannel()
resolve(res)
},
1: async () => {
res = await this.getListPaymentEntity(value)
resolve(res)
},
2: async () => {
this.searchForm.paymentSubjectId = value
let channel=node.parent?node.parent.value:''
res = await this.getListPayLevy(value,channel)
resolve(res)
},
3: async () => {
this.searchForm.paymentChannelId = value
// resolve({
// leaf:true
// })
}
}
obj[level]()
}
}
}
},
......@@ -290,6 +334,49 @@ 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(paymentEntityId,channel) {
let arr = await this.$apis.withdraw.getListPayLevy({
paymentEntityId,
channel
})
let list = arr.map(item => {
return {
label: item.levyName,
value: item.id,
leaf: true
}
})
return list
},
selectAddAttr(e, formName) {
let [value1, value2, value3] = e
if (value2) this[formName].paymentSubjectId = value2
if (value3) this[formName].paymentChannelId = value3 //代征主体
},
dialogClose() {
this.detailVisible = false
},
......@@ -308,7 +395,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)
})
......@@ -342,12 +429,11 @@ export default {
params.userSettleTimeStart = dayjs(this.searchForm.userSettleTime[0]).format('YYYY-MM-DD') + ' 00:00:01'
params.userSettleTimeEnd = dayjs(this.searchForm.userSettleTime[1]).format('YYYY-MM-DD') + ' 23:59:59'
}
console.log(this.searchForm.oaApprovalTime)
if (this.searchForm.oaApprovalTime && this.searchForm.oaApprovalTime.length) {
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 +449,10 @@ export default {
handleReset() {
this.searchForm = {
batchNo: '',
oaSpNo:'',
paymentSubject: '',
paymentChannel: '',
oaSpNo: '',
paymentSubjectId: '',
channelList:[],
paymentChannelId: '',
approvalTime: [],
oaApprovalTime: [],
userSettleTime: []
......@@ -392,6 +479,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,49 @@ export default {
}
},
computed: {},
mounted() {},
mounted() {
this.getChannelTree()
},
methods: {
removeEmptyChild(arr) {
return arr.map(item => {
// 如果有 child 字段,递归处理
if (item.child) {
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 +151,7 @@ export default {
const isSuccessful = document.execCommand('copy')
document.body.removeChild(input)
if(isSuccessful){
if (isSuccessful) {
this.$message.success('复制成功')
}
},
......@@ -203,12 +247,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 +288,7 @@ export default {
this.operationData = [
{
label: obj => {
return ['审核', '付款','受理'][obj.type]
return ['审核', '付款', '受理'][obj.type]
},
name: 'type',
addHtml: obj => {
......@@ -251,7 +300,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 +319,7 @@ export default {
label = arr[obj.type]
} else if (obj.result == 1) {
label = '操作人'
}else{
} else {
label = arr[obj.type]
}
return label
......@@ -285,7 +334,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!