Commit 242d148a by 王琦琳

Merge branch 'dev_v4.31.0_1031' into 'develop'

Dev v4.31.0 1031

See merge request !244
2 parents 4cec4292 4cba0892
Showing 33 changed files with 1914 additions and 57 deletions
...@@ -321,3 +321,8 @@ export function getAccountMerchantList(data) { ...@@ -321,3 +321,8 @@ export function getAccountMerchantList(data) {
data.method = `${path}merchant.page.withYq` data.method = `${path}merchant.page.withYq`
return request(data, "post") return request(data, "post")
} }
// 获取获取嘀加智慧云子商户信息
export function getDjzhySubMerchant(data) {
data.method = `${path2}merchantDivisionRule.djzhySubMerchant`
return request(data)
}
import request from "./request"
import RequestMethods from "./request.methods"
const path = "dj.api.smartcarlife."
// 分页查询转账记录
export function transferAccountsRecordPage(data) {
data.method = `${path}transferAccountsRecord.page`
return request(data, RequestMethods.POST)
}
// 新增转账
export function transferAccountsRecordAdd(data) {
data.method = `${path}transferAccountsRecord.add`
return request(data, RequestMethods.POST)
}
// 查询转账记录详情
export function transferAccountsRecordDetail(data) {
data.method = `${path}transferAccountsRecord.detail`
return request(data, RequestMethods.POST)
}
// 更新转账状态
export function transferAccountsRecordUpdateStatus(data) {
data.method = `${path}transferAccountsRecord.updateStatus`
return request(data, RequestMethods.POST)
}
// 批量运营审核
export function batchOperatorAudit(data) {
data.method = `${path}transferAccountsRecord.batchOperatorAudit`
return request(data, RequestMethods.POST)
}
// 批量财务确认
export function batchTreasurerConfirm(data) {
data.method = `${path}transferAccountsRecord.batchTreasurerConfirm`
return request(data, RequestMethods.POST)
}
// 获取财务管理人员列表
export function getWithdrawTreasurerList(data) {
data.method = `${path}transferAccountsRecord.getWithdrawTreasurerList`
return request(data, RequestMethods.POST)
}
// 重新发起转账
export function reTransfer(data) {
data.method = `${path}transferAccountsRecord.reTransfer`
return request(data, RequestMethods.POST)
}
// 获取转账金额
export function getAmount(data) {
data.method = `${path}transferAccountsRecord.getAmount`
return request(data, RequestMethods.POST)
}
import request from "./request"
import RequestMethods from "./request.methods"
const path = "dj.api.smartcarlife."
// 分页查询提现订单记录
export function withdrawOrderRecordPage(data) {
data.method = `${path}withdrawOrderRecord.page`
return request(data, RequestMethods.POST)
}
// 发起提现请求
export function transferAccountsRecordCreate(data) {
data.method = `${path}withdrawOrderRecord.create`
return request(data, RequestMethods.POST)
}
// 获取商户可提现余额
export function getBankBalance(data) {
data.method = `${path}withdrawOrderRecord.bankBalance`
return request(data, RequestMethods.POST)
}
// 重新发起提现
export function rewithdraw(data) {
data.method = `${path}withdrawOrderRecord.rewithdraw`
return request(data, RequestMethods.POST)
}
...@@ -712,3 +712,40 @@ export const upgradeFlags = [ ...@@ -712,3 +712,40 @@ export const upgradeFlags = [
{ confId: "Y", confValue: "升级" }, { confId: "Y", confValue: "升级" },
{ confId: "N", confValue: "战败" } { confId: "N", confValue: "战败" }
] ]
//转账管理 状态
export const transferAccountsStatusList = [
{ confId: 1, confValue: "运营审核" },
{ confId: 2, confValue: "财务确认" },
{ confId: 3, confValue: "转账中" },
{ confId: 4, confValue: "已转账" },
{ confId: 5, confValue: "到账中" },
{ confId: 6, confValue: "已到账" },
{ confId: 7, confValue: "转账失败" },
{ confId: 8, confValue: "到账失败" },
{ confId: 9, confValue: "驳回" }
]
export const transferAccountsStatusShow = {
1: "运营审核",
2: "财务确认",
3: "转账中",
4: "已转账",
5: "到账中",
6: "已到账",
7: "转账失败",
8: "到账失败",
9: "驳回"
}
//转账管理 转账类型
export const transferTypeList = [{ confId: 1, confValue: "服务商款项" }]
export const transferTypeShow = { 1: "服务商款项" }
//提现管理 状态
export const withdrawalManageStatusList = [
{ confId: 5, confValue: "到账中" },
{ confId: 6, confValue: "已到账" },
{ confId: 8, confValue: "到账失败" }
]
<template> <template>
<el-dialog id="baseDialog" top="15vh" :close-on-click-modal="false" :close-on-press-escape="true" <el-dialog id="baseDialog"
:title="dialogConfig.title" :width="dialogConfig.width" :visible.sync="visible" :show-close="config.showClose" top="15vh"
class="noborder" :append-to-body="config.appendToBody"> :close-on-click-modal="false"
:close-on-press-escape="true"
:title="dialogConfig.title"
:width="dialogConfig.width"
:visible.sync="visible"
:show-close="config.showClose"
class="noborder"
:append-to-body="config.appendToBody">
<slot /> <slot />
<div slot="footer" v-if="config.isShowFooter"> <div slot="footer"
<el-button type="primary" @click="confirmBtn"> v-if="config.isShowFooter">
<el-button type="primary"
@click="confirmBtn"
:loading="$store.state.d2admin.loading.value">
{{ config.confirm_name }} {{ config.confirm_name }}
</el-button> </el-button>
<el-button v-preventReClick @click="visible = false"> <el-button v-preventReClick
@click="visible = false">
{{ config.cancel_name }} {{ config.cancel_name }}
</el-button> </el-button>
</div> </div>
......
...@@ -38,7 +38,8 @@ ...@@ -38,7 +38,8 @@
:width="item.width" :width="item.width"
:min-width="item.minWidth" :min-width="item.minWidth"
:align="item.align||'center'" :align="item.align||'center'"
:sortable="item.sortable"> :sortable="item.sortable"
:show-overflow-tooltip="item.showOverFlow">
<template slot="header"> <template slot="header">
<span>{{ item.label }}</span> <span>{{ item.label }}</span>
<table-head-search v-if="item.optionConfig" <table-head-search v-if="item.optionConfig"
...@@ -435,4 +436,8 @@ export default { ...@@ -435,4 +436,8 @@ export default {
@include spotBase(); @include spotBase();
background: #eb4e4e; background: #eb4e4e;
} }
.blueSpot {
@include spotBase();
background: #5850ff;
}
</style> </style>
...@@ -117,7 +117,7 @@ fetch( ...@@ -117,7 +117,7 @@ fetch(
) )
.then((response) => { .then((response) => {
const { code, data } = response const { code, data } = response
console.log("response", response) // console.log("response", response)
if (code == "200") { if (code == "200") {
console.log(data) console.log(data)
......
...@@ -121,9 +121,9 @@ service.interceptors.response.use( ...@@ -121,9 +121,9 @@ service.interceptors.response.use(
const ruleResult = baseConfig.axios.result const ruleResult = baseConfig.axios.result
const errCodeMsg = baseConfig.errCode const errCodeMsg = baseConfig.errCode
const errCodes = Object.keys(errCodeMsg) const errCodes = Object.keys(errCodeMsg)
console.log("baseConfig", baseConfig) // console.log("baseConfig", baseConfig)
console.log("response", response) // console.log("response", response)
console.log("errCodes", errCodes) // console.log("errCodes", errCodes)
// 这个状态码是和后端约定的 // 这个状态码是和后端约定的
// 有 code 代表这是一个后端接口 可以进行进一步的判断 // 有 code 代表这是一个后端接口 可以进行进一步的判断
var goBackArr = ["20", "21"] var goBackArr = ["20", "21"]
...@@ -142,12 +142,15 @@ service.interceptors.response.use( ...@@ -142,12 +142,15 @@ service.interceptors.response.use(
case ruleResult.code_success_value: case ruleResult.code_success_value:
// [ 示例 ] code === 0 代表没有错误 // [ 示例 ] code === 0 代表没有错误
return dataAxios[ruleResult.data_key] return dataAxios[ruleResult.data_key]
case ruleResult.code_error_value:
// [ 示例 ] code === -1 代表需将返回的message弹窗展示
return errorCreate(`${dataAxios[ruleResult.message_key]}`)
default: default:
// 不是正确的 code // 不是正确的 code
// console.log(dataAxios) // console.log(dataAxios)
// errorCreate(`${dataAxios[ruleResult.message_key]}`) // errorCreate(`${dataAxios[ruleResult.message_key]}`)
if (errCodes.includes(dataAxios[ruleResult.code_key])) { if (errCodes.includes(dataAxios[ruleResult.code_key])) {
errorCreate(`新提示:${errCodeMsg[dataAxios[ruleResult.code_key]]}`) errorCreate(`${errCodeMsg[dataAxios[ruleResult.code_key]]}`)
} }
break break
} }
......
...@@ -105,5 +105,123 @@ export const routerName = { ...@@ -105,5 +105,123 @@ export const routerName = {
activePath: "/onlineAccountList" activePath: "/onlineAccountList"
}, },
component: _import("financeManage/account/accountRecord") component: _import("financeManage/account/accountRecord")
},
90505: {
path: "/transferAccountsManage",
name: "transferAccountsManage",
meta: {
title: "转账管理",
authId: "90505",
parentId: "905",
cache: false
},
auth: [
{
authId: "9050501",
parentId: "90505",
label: "新增转账",
icon: "plus",
category: "Button",
type: "primary",
handle: "handleAdd"
},
{
authId: "9050502",
parentId: "90505",
label: "批量审核",
category: "Button",
type: "primary",
handle: "handleBatchExamine"
},
{
authId: "9050503",
parentId: "90505",
label: "批量确认",
category: "Button",
type: "primary",
handle: "handleBatchConfirm"
},
{
authId: "9050504",
parentId: "90505",
label: "导出",
category: "Button",
type: "primary",
handle: "handleExport"
},
{
authId: "9050505",
parentId: "90505",
label: "查看",
handle: "handleDetail"
},
{
authId: "9050506",
parentId: "90505",
label: "审核",
handle: "handleExamine"
},
{
authId: "9050507",
parentId: "90505",
label: "确认",
handle: "handleConfirm"
},
{
authId: "9050508",
parentId: "90505",
label: "驳回",
handle: "handleReject"
},
{
authId: "9050509",
parentId: "90505",
label: "重新发起转账",
handle: "handleReTransfer"
},
{
authId: "9050510",
parentId: "90505",
label: "重新发起提现",
handle: "handleReWithdrawal"
}
],
component: _import("financeManage/transferAccountsManage/index")
},
90506: {
path: "/withdrawalManage",
name: "withdrawalManage",
meta: {
title: "提现管理",
authId: "90506",
parentId: "905",
cache: false
},
auth: [
{
authId: "9050601",
parentId: "90506",
label: "新增提现",
icon: "plus",
category: "Button",
type: "primary",
handle: "handleAdd"
},
{
authId: "9050602",
parentId: "90506",
label: "导出",
category: "Button",
type: "primary",
handle: "handleExport"
},
{
authId: "9050603",
parentId: "90506",
label: "重新发起提现",
handle: "handleReWithdrawal"
}
],
component: _import("financeManage/withdrawalManage/index")
} }
} }
...@@ -205,7 +205,7 @@ export default { ...@@ -205,7 +205,7 @@ export default {
selectMerchant() { selectMerchant() {
var params = {} var params = {}
params.currentPage = 1 params.currentPage = 1
params.pageSize = 1000 params.pageSize = 10000
var merchantTypeList = [] var merchantTypeList = []
if (this.infoForm.merchantType) { if (this.infoForm.merchantType) {
if (this.infoForm.merchantType == 6) { if (this.infoForm.merchantType == 6) {
......
<!-- 运营审核 -->
<template>
<baseDialog :dialog-config="dialogConfig"
:is-show.sync="visible"
class="accountDailog"
@handleClick="handleAddConfirm">
<div class="reject-dialog">
<glsx-combi-form class="edit-form-container"
ref="formRef"
label-width="150px"
default-width="350px"
:form-ref="examineRef"
:form-obj="infoForm"
:form-data="editFormData"
:form-rules="formRules"></glsx-combi-form>
<span :style="{ 'margin-left': '150px' }">审核通过后,转账业务单据自动流转至财务确认。</span>
</div>
</baseDialog>
</template>
<script>
import { transferAccountsRecordUpdateStatus, batchOperatorAudit } from '@api/transferAccountsManage'
import { deepClone } from '@/common/util'
export default {
name: 'ExamineDialog',
data() {
return {
userInfo: this.$store.state.d2admin.user.info,
// txtObj: {
// procurementReview: '说明:订单审核后会自动流转至商务进行复审',
// procurementBusiness: '说明:订单审核后会自动流转至供应商进行确认并发货'
// },
infoForm: {
remark: ''
},
dialogConfig: {
title: '运营审核',
width: '600px'
},
examineRef: 'examineRef',
formRules: {
// sendOutMerchantId: [{ required: true, message: '请选择发货主体', trigger: 'change' }]
},
editFormData: [{
label: '备注',
name: 'remark',
type: 'input',
maxlength: '50'
}],
baseData: {
// shippingEntityList: []
}
}
},
props: {
// fromPage: {
// type: String,
// default: 'procurementReview'
// },
examineVisible: {
type: Boolean,
default: false
},
// paramsObj: {
// type: Object,
// default: {}
// }
infoList: {
type: Array,
default: () => { }
}
},
computed: {
visible: {
get() {
return this.examineVisible
},
set(newVal) {
this.$emit('dialogClose', { flag: newVal, attrName: 'examineVisible' })
}
}
},
mounted() {
},
methods: {
handleAddConfirm() {
var params = {}
params.remark = this.infoForm.remark
params.status = 2
if (this.infoList.length > 1) {
params.orderCodeList = this.infoList.map((item) => {
return item.orderCode
})
} else {
params.orderCode = this.infoList[0].orderCode
}
console.log(params);
const _api = this.infoList.length > 1 ? batchOperatorAudit : transferAccountsRecordUpdateStatus
_api(params).then(res => {
this.notice.okTips('操作成功')
this.visible = true
})
}
}
}
</script>
<style lang="scss" scoped>
.reject-dialog {
margin: 65px 0;
.reject-input {
::v-deep .el-textarea__inner {
height: 70px;
}
}
.el-textarea .el-input__count {
right: 90px;
bottom: -10px;
font-size: 12px;
color: #999999;
}
.tips {
color: #999999;
}
}
</style>
<!-- 财务确认弹窗 -->
<template>
<!-- <d2-dialog title="财务确认"
:is-visible.sync="financeConfirmVisible"
width="600px"
@confirmDialog="handleCashConfirm"
@closeDialog="handleCashClose"> -->
<baseDialog :dialog-config="dialogConfig"
:is-show.sync="visible"
class="accountDailog"
@handleClick="handleCashConfirm">
<!-- <span slot="sub-title">提现后不能撤回,确保资金安全,请谨慎操作!</span> -->
<el-form ref="formRef"
:model="cashForm"
:rules="cashRules"
label-width="120px">
<el-form-item label="财务管理员:"
prop="administrators">
<el-select v-model="cashForm.administrators"
filterable
style="width:310px">
<el-option v-for="(item,index) in baseData.administratorsList"
:key="index"
:label="item.name"
:value="item.phone" />
</el-select>
</el-form-item>
<el-form-item label="验证码:"
prop="smsCode">
<el-input v-model="cashForm.smsCode"
placeholder="请输入验证码"
style="width: 200px" />
<el-button type="primary"
size="small"
@click="handleSend"
:disabled="isSend"
class="cash-btn">
{{ isSend ? sendMsg + '秒后,重试' : '获取验证码' }}
</el-button>
<p v-show="showtips">
已向尾号为{{ cashForm.withdrawPhone ? cashForm.withdrawPhone.slice(-4) : '' }}的手机号发送验证码,验证码30分钟内有效
</p>
</el-form-item>
<el-form-item label="备注:"
prop="remark">
<el-input v-model="cashForm.remark"
placeholder="请输入备注"
style="width: 310px" />
<p>
财务确认后,转账业务单据自动流转至银盛完成正式转账。
</p>
</el-form-item>
</el-form>
<!-- </d2-dialog> -->
</baseDialog>
</template>
<script>
import { createWithdraw } from '@api/account'
import { sendToSmsCodeApi } from '@/api/sys.base'
import { getWithdrawTreasurerList, transferAccountsRecordUpdateStatus, batchTreasurerConfirm } from '@api/transferAccountsManage'
export default {
name: 'FinanceConfirmDialog',
data() {
return {
dialogConfig: {
title: '财务确认',
width: '600px'
},
cashForm: {
administrators: '',
smsCode: '',
remark: ''
},
cashRules: {
administrators: [{ required: true, message: '请选择财务管理员', trigger: 'change' }],
smsCode: [{ required: true, message: '请输入验证码', trigger: 'change' }]
},
// 验证码
showtips: false,
isSend: false,
sendMsg: '获取验证码',
time: '',
// 基本数据
baseData: {
administratorsList: []
},
}
},
props: {
financeConfirmVisible: {
type: Boolean,
default: false
},
// cashForm: {
// type: Object,
// default: () => { }
// }
infoList: {
type: Array,
default: () => { }
}
},
// watch: {
// financeConfirmVisible(newVal, val) {
// newVal ? this.reset() : this.closeReset()
// }
// },
computed: {
visible: {
get() {
return this.financeConfirmVisible
},
set(newVal) {
this.$emit('dialogClose', { flag: newVal, attrName: 'financeConfirmVisible' })
}
}
},
mounted() {
this.getAdminList()
},
methods: {
// reset() {
// this.$refs.formRef && this.$refs.formRef.resetFields()
// },
// closeReset() {
// this.isSend = false
// this.showtips = false
// this.time && clearTimeout(this.time)
// },
getAdminList() {
getWithdrawTreasurerList({}).then(res => {
this.baseData.administratorsList = res
})
},
handleCashConfirm() {
this.$refs.formRef.validate(valid => {
if (valid) {
var params = {}
params.remark = this.cashForm.remark
params.smsCode = this.cashForm.smsCode
params.phone = this.cashForm.administrators
params.status = 3
if (this.infoList.length > 1) {
params.orderCodeList = this.infoList.map((item) => {
return item.orderCode
})
} else {
params.orderCode = this.infoList[0].orderCode
}
console.log(params);
const _api = this.infoList.length > 1 ? batchTreasurerConfirm : transferAccountsRecordUpdateStatus
_api(params).then(res => {
this.notice.okTips('操作成功')
this.visible = true
})
// createWithdraw({ totalAmount: (+this.cashForm.balance - 2), smsCode: this.cashForm.smsCode }).then(res => {
// this.notice.okTips()
// this.$emit('handleCashConfirm')
// })
}
})
},
// handleCashClose() {
// this.$emit('dialogClose', true)
// },
handleSend() {
if (!this.cashForm.administrators) {
this.notice.warningTips('请选择管理员')
return
}
sendToSmsCodeApi({ phone: this.cashForm.administrators }).then((res) => {
this.notice.okTips('已发送,30分钟内有效')
this.isSend = true
this.showtips = true
this.sendMsg = 60
this.msgDown()
})
},
msgDown() {
this.time = setTimeout(() => {
clearTimeout(this.time)
if (this.sendMsg > 1) {
--this.sendMsg
this.msgDown()
} else {
this.isSend = false
}
}, 1000)
}
}
}
</script>
<style scoped>
p {
margin: 0 0;
}
.cash-btn {
margin-left: 20px;
}
</style>
<!-- 驳回 -->
<template>
<baseDialog :dialog-config="dialogConfig"
:is-show.sync="visible"
class="accountDailog"
@handleClick="handleAddConfirm">
<div class="reject-dialog">
<glsx-combi-form class="edit-form-container"
ref="formRef"
label-width="150px"
default-width="350px"
:form-ref="rejectRef"
:form-obj="infoForm"
:form-data="editFormData"
:form-rules="formRules"></glsx-combi-form>
</div>
</baseDialog>
</template>
<script>
import { transferAccountsRecordUpdateStatus } from '@api/transferAccountsManage'
import { deepClone } from '@/common/util'
export default {
name: 'RejectDialog',
data() {
return {
userInfo: this.$store.state.d2admin.user.info,
statusObj: {
'1': '运营驳回',
'2': '财务驳回'
},
infoForm: {
remark: ''
},
dialogConfig: {
title: '',
width: '600px'
},
rejectRef: 'rejectRef',
formRules: {
remark: [{ required: true, message: '请输入驳回原因', trigger: 'blur' }]
},
editFormData: [{
label: '驳回原因',
name: 'remark',
type: 'input',
maxlength: '50'
}],
baseData: {
}
}
},
props: {
rejectVisible: {
type: Boolean,
default: false
},
paramsObj: {
type: Object,
default: {}
}
},
computed: {
visible: {
get() {
return this.rejectVisible
},
set(newVal) {
this.$emit('dialogClose', { flag: newVal, attrName: 'rejectVisible' })
}
}
},
mounted() {
console.log('paramsObj', this.paramsObj);
this.dialogConfig.title = this.statusObj[this.paramsObj.status]
},
methods: {
handleAddConfirm() {
this.$refs.formRef.$refs[this.rejectRef].validate(valid => {
if (valid) {
var params = {}
params.remark = this.infoForm.remark
params.orderCode = this.paramsObj.orderCode
params.status = 9
transferAccountsRecordUpdateStatus(params).then(res => {
this.notice.okTips('操作成功')
this.visible = true
})
}
})
}
}
}
</script>
<style lang="scss" scoped>
.reject-dialog {
margin: 65px 0;
.reject-input {
::v-deep .el-textarea__inner {
height: 70px;
}
}
.el-textarea .el-input__count {
right: 90px;
bottom: -10px;
font-size: 12px;
color: #999999;
}
.tips {
color: #999999;
}
}
</style>
<!-- 运营审核 -->
<template>
<baseDialog :dialog-config="dialogConfig"
:is-show.sync="visible"
class="accountDailog"
@handleClick="handleAddConfirm">
<div class="reject-dialog">
<glsx-combi-form class="edit-form-container"
ref="formRef"
label-width="150px"
default-width="350px"
:form-ref="examineRef"
:form-obj="infoForm"
:form-data="editFormData"
:form-rules="formRules"></glsx-combi-form>
<span :style="{ 'margin-left': '150px' }">审核通过后,转账业务单据自动流转至财务确认。</span>
</div>
</baseDialog>
</template>
<script>
import { transferAccountsRecordUpdateStatus, batchOperatorAudit } from '@api/transferAccountsManage'
import { deepClone } from '@/common/util'
export default {
name: 'ExamineDialog',
data() {
return {
userInfo: this.$store.state.d2admin.user.info,
// txtObj: {
// procurementReview: '说明:订单审核后会自动流转至商务进行复审',
// procurementBusiness: '说明:订单审核后会自动流转至供应商进行确认并发货'
// },
infoForm: {
remark: ''
},
dialogConfig: {
title: '运营审核',
width: '600px'
},
examineRef: 'examineRef',
formRules: {
// sendOutMerchantId: [{ required: true, message: '请选择发货主体', trigger: 'change' }]
},
editFormData: [{
label: '备注',
name: 'remark',
type: 'input',
maxlength: 50,
inputType: 'textarea',
showLimit: true,
rows: 4
}],
baseData: {
// shippingEntityList: []
}
}
},
props: {
// fromPage: {
// type: String,
// default: 'procurementReview'
// },
examineVisible: {
type: Boolean,
default: false
},
// paramsObj: {
// type: Object,
// default: {}
// }
infoList: {
type: Array,
default: () => { }
}
},
computed: {
visible: {
get() {
return this.examineVisible
},
set(newVal) {
this.$emit('dialogClose', { flag: newVal, attrName: 'examineVisible' })
}
}
},
mounted() {
},
methods: {
handleAddConfirm() {
var params = {}
params.remark = this.infoForm.remark
params.status = 2
if (this.infoList.length > 1) {
params.orderCodeList = this.infoList.map((item) => {
return item.orderCode
})
} else {
params.orderCode = this.infoList[0].orderCode
}
console.log(params);
const _api = this.infoList.length > 1 ? batchOperatorAudit : transferAccountsRecordUpdateStatus
_api(params).then(res => {
this.notice.okTips('操作成功')
this.visible = true
})
}
}
}
</script>
<style lang="scss" scoped>
.reject-dialog {
margin: 65px 0;
.reject-input {
::v-deep .el-textarea__inner {
height: 70px;
}
}
.el-textarea .el-input__count {
right: 90px;
bottom: -10px;
font-size: 12px;
color: #999999;
}
.tips {
color: #999999;
}
}
</style>
<!-- 财务确认弹窗 -->
<template>
<!-- <d2-dialog title="财务确认"
:is-visible.sync="financeConfirmVisible"
width="600px"
@confirmDialog="handleCashConfirm"
@closeDialog="handleCashClose"> -->
<baseDialog :dialog-config="dialogConfig"
:is-show.sync="visible"
class="accountDailog"
@handleClick="handleCashConfirm">
<!-- <span slot="sub-title">提现后不能撤回,确保资金安全,请谨慎操作!</span> -->
<el-form ref="formRef"
:model="cashForm"
:rules="cashRules"
label-width="120px">
<el-form-item label="财务管理员:"
prop="administrators">
<el-select v-model="cashForm.administrators"
filterable
style="width:310px">
<el-option v-for="(item,index) in baseData.administratorsList"
:key="index"
:label="item.name + ' ' + item.phone"
:value="item.phone" />
</el-select>
</el-form-item>
<el-form-item label="验证码:"
prop="smsCode"
class="pdt">
<el-input v-model="cashForm.smsCode"
placeholder="请输入验证码"
maxlength="6"
style="width: 200px" />
<el-button type="primary"
size="small"
@click="handleSend"
:disabled="isSend"
class="cash-btn">
{{ isSend ? sendMsg + '秒后,重试' : '获取验证码' }}
</el-button>
<p v-show="showtips">
已向尾号为{{ cashForm.administrators ? cashForm.administrators.slice(-4) : '' }}的手机号发送验证码,验证码30分钟内有效
</p>
</el-form-item>
<el-form-item label="备注:"
prop="remark"
class="pdt">
<el-input v-model="cashForm.remark"
type="textarea"
maxlength="50"
placeholder="请输入备注"
show-word-limit
:rows="4"
style="width: 310px" />
<p>
财务确认后,转账业务单据自动流转至银盛完成正式转账。
</p>
</el-form-item>
</el-form>
<!-- </d2-dialog> -->
</baseDialog>
</template>
<script>
import { createWithdraw } from '@api/account'
import { sendToSmsCodeApi } from '@/api/sys.base'
import { getWithdrawTreasurerList, transferAccountsRecordUpdateStatus, batchTreasurerConfirm } from '@api/transferAccountsManage'
export default {
name: 'FinanceConfirmDialog',
data() {
return {
dialogConfig: {
title: '财务确认',
width: '600px'
},
cashForm: {
administrators: '',
smsCode: '',
remark: ''
},
cashRules: {
administrators: [{ required: true, message: '请选择财务管理员', trigger: 'change' }],
smsCode: [{ required: true, message: '请输入验证码', trigger: 'change' }]
},
// 验证码
showtips: false,
isSend: false,
sendMsg: '获取验证码',
time: '',
// 基本数据
baseData: {
administratorsList: []
},
}
},
props: {
financeConfirmVisible: {
type: Boolean,
default: false
},
// cashForm: {
// type: Object,
// default: () => { }
// }
infoList: {
type: Array,
default: () => { }
}
},
// watch: {
// financeConfirmVisible(newVal, val) {
// newVal ? this.reset() : this.closeReset()
// }
// },
computed: {
visible: {
get() {
return this.financeConfirmVisible
},
set(newVal) {
this.$emit('dialogClose', { flag: newVal, attrName: 'financeConfirmVisible' })
}
}
},
mounted() {
this.getAdminList()
},
methods: {
// reset() {
// this.$refs.formRef && this.$refs.formRef.resetFields()
// },
// closeReset() {
// this.isSend = false
// this.showtips = false
// this.time && clearTimeout(this.time)
// },
getAdminList() {
getWithdrawTreasurerList({}).then(res => {
this.baseData.administratorsList = res
this.cashForm.administrators = res[0].phone
})
},
handleCashConfirm() {
this.$refs.formRef.validate(valid => {
if (valid) {
var params = {}
params.remark = this.cashForm.remark
params.smsCode = this.cashForm.smsCode
params.phone = this.cashForm.administrators
params.status = 3
if (this.infoList.length > 1) {
params.orderCodeList = this.infoList.map((item) => {
return item.orderCode
})
} else {
params.orderCode = this.infoList[0].orderCode
}
console.log(params);
const _api = this.infoList.length > 1 ? batchTreasurerConfirm : transferAccountsRecordUpdateStatus
_api(params).then(res => {
this.notice.okTips('操作成功')
this.visible = true
})
// createWithdraw({ totalAmount: (+this.cashForm.balance - 2), smsCode: this.cashForm.smsCode }).then(res => {
// this.notice.okTips()
// this.$emit('handleCashConfirm')
// })
}
})
},
// handleCashClose() {
// this.$emit('dialogClose', true)
// },
handleSend() {
if (!this.cashForm.administrators) {
this.notice.warningTips('请选择管理员')
return
}
sendToSmsCodeApi({ phone: this.cashForm.administrators }).then((res) => {
this.notice.okTips('已发送,30分钟内有效')
this.isSend = true
this.showtips = true
this.sendMsg = 60
this.msgDown()
})
},
msgDown() {
this.time = setTimeout(() => {
clearTimeout(this.time)
if (this.sendMsg > 1) {
--this.sendMsg
this.msgDown()
} else {
this.isSend = false
}
}, 1000)
}
}
}
</script>
<style scoped>
p {
margin: 0 0;
}
.cash-btn {
margin-left: 20px;
}
.pdt {
padding-top: 10px;
}
</style>
<!-- 驳回 -->
<template>
<baseDialog :dialog-config="dialogConfig"
:is-show.sync="visible"
class="accountDailog"
@handleClick="handleAddConfirm">
<div class="reject-dialog">
<glsx-combi-form class="edit-form-container"
ref="formRef"
label-width="150px"
default-width="350px"
:form-ref="rejectRef"
:form-obj="infoForm"
:form-data="editFormData"
:form-rules="formRules"></glsx-combi-form>
</div>
</baseDialog>
</template>
<script>
import { transferAccountsRecordUpdateStatus } from '@api/transferAccountsManage'
import { deepClone } from '@/common/util'
export default {
name: 'RejectDialog',
data() {
return {
userInfo: this.$store.state.d2admin.user.info,
statusObj: {
'1': '运营驳回',
'2': '财务驳回'
},
infoForm: {
remark: ''
},
dialogConfig: {
title: '',
width: '600px'
},
rejectRef: 'rejectRef',
formRules: {
remark: [{ required: true, message: '请输入驳回原因', trigger: 'blur' }]
},
editFormData: [{
label: '驳回原因',
name: 'remark',
type: 'input',
maxlength: 50,
inputType: 'textarea',
showLimit: true,
rows: 4
}],
baseData: {
}
}
},
props: {
rejectVisible: {
type: Boolean,
default: false
},
paramsObj: {
type: Object,
default: {}
}
},
computed: {
visible: {
get() {
return this.rejectVisible
},
set(newVal) {
this.$emit('dialogClose', { flag: newVal, attrName: 'rejectVisible' })
}
}
},
mounted() {
console.log('paramsObj', this.paramsObj);
this.dialogConfig.title = this.statusObj[this.paramsObj.status]
},
methods: {
handleAddConfirm() {
this.$refs.formRef.$refs[this.rejectRef].validate(valid => {
if (valid) {
var params = {}
params.remark = this.infoForm.remark
params.orderCode = this.paramsObj.orderCode
params.status = 9
transferAccountsRecordUpdateStatus(params).then(res => {
this.notice.okTips('操作成功')
this.visible = true
})
}
})
}
}
}
</script>
<style lang="scss" scoped>
.reject-dialog {
margin: 65px 0;
.reject-input {
::v-deep .el-textarea__inner {
height: 70px;
}
}
.el-textarea .el-input__count {
right: 90px;
bottom: -10px;
font-size: 12px;
color: #999999;
}
.tips {
color: #999999;
}
}
</style>
<!-- 新增提现弹窗 -->
<template>
<baseDialog :dialog-config="dialogConfig"
:is-show.sync="visible"
class="accountDailog"
@handleClick="handleCashConfirm">
<el-form ref="formRef"
:model="infoForm"
:rules="cashRules"
label-width="120px">
<el-form-item label="提现方:"
prop="merchantId">
<el-select v-model="infoForm.merchantId"
filterable
style="width:310px"
placeholder="请选择提现商户"
@change="getBankBalance">
<el-option v-for="(item,index) in baseData.merchantList"
:key="index"
:label="item.merchantName"
:value="item.merchantId" />
</el-select>
<p>
银盛账户余额:{{(balance || balance === 0)?balance:'-'}}
</p>
</el-form-item>
<el-form-item label="提现金额:"
prop="totalAmount">
<el-input v-model="infoForm.totalAmount"
placeholder="请输入提现金额"
style="width: 310px"
:disabled="totalAmountDisabled"
@input="handleUpgradeNum" />
</el-form-item>
<el-form-item label="财务管理员:"
prop="administrators">
<el-select v-model="infoForm.administrators"
filterable
style="width:310px">
<el-option v-for="(item,index) in baseData.administratorsList"
:key="index"
:label="item.name + ' ' + item.phone"
:value="item.phone" />
</el-select>
</el-form-item>
<el-form-item label="验证码:"
prop="smsCode">
<el-input v-model="infoForm.smsCode"
placeholder="请输入验证码"
maxlength="6"
style="width: 200px" />
<el-button type="primary"
size="small"
@click="handleSend"
:disabled="isSend"
class="cash-btn">
{{ isSend ? sendMsg + '秒后,重试' : '获取验证码' }}
</el-button>
<p v-show="showtips">
已向尾号为{{ infoForm.administrators ? infoForm.administrators.slice(-4) : '' }}的手机号发送验证码,验证码30分钟内有效
</p>
</el-form-item>
<el-form-item label="备注:"
prop="remark">
<el-input v-model="infoForm.remark"
type="textarea"
maxlength="50"
placeholder="请输入备注"
show-word-limit
:rows="4"
style="width: 310px" />
</el-form-item>
</el-form>
<!-- </d2-dialog> -->
</baseDialog>
</template>
<script>
import { createWithdraw } from '@api/account'
import { sendToSmsCodeApi } from '@/api/sys.base'
import { getWithdrawTreasurerList } from '@api/transferAccountsManage'
import { getListApi } from '@api/publicAccount'
import { transferAccountsRecordCreate, getBankBalance } from '@api/withdrawalManage'
import { limitPrice } from '@/common/format'
import { getDjzhySubMerchant } from '@api/merchant'
export default {
// name: 'AddDialog',
data() {
return {
dialogConfig: {
title: '新增提现',
width: '600px'
},
infoForm: {
administrators: '',
smsCode: '',
remark: '',
merchantId: '',
totalAmount: ''
},
oldVal: {
totalAmount: '',
},
cashRules: {
merchantId: [{ required: true, message: '请选择提现方', trigger: 'change' }],
totalAmount: [{ required: true, message: '请输入金额,支持输入0~999999的数字,支持小数点后2位', trigger: 'change' }],
administrators: [{ required: true, message: '请选择财务管理员', trigger: 'change' }],
smsCode: [{ required: true, message: '请输入验证码', trigger: 'change' }]
},
// 验证码
showtips: false,
isSend: false,
sendMsg: '获取验证码',
time: '',
// 基本数据
baseData: {
administratorsList: [],
merchantList: []
},
balance: '',
totalAmountDisabled: true
}
},
props: {
addVisible: {
type: Boolean,
default: false
},
},
// watch: {
// addVisible(newVal, val) {
// newVal ? this.reset() : this.closeReset()
// }
// },
computed: {
visible: {
get() {
return this.addVisible
},
set(newVal) {
this.$emit('dialogClose', { flag: newVal, attrName: 'addVisible' })
}
}
},
mounted() {
this.getMerchantList()
this.getAdminList()
},
methods: {
getMerchantList() {
var params = {}
params.currentPage = 1
params.pageSize = 10000
params.accountStatus = 3 //生效
params.merchantTypeList = [2, 7, -1]
getListApi(params).then(res => {
this.baseData.merchantList = res.list
// 获取获取嘀加智慧云子商户信息
getDjzhySubMerchant({}).then(res => {
//转入方选项中去除嘀加智慧云子商户
this.baseData.merchantList = this.baseData.merchantList.filter((item) => item.merchantId != res.merchantId)
})
})
},
getAdminList() {
getWithdrawTreasurerList({}).then(res => {
this.baseData.administratorsList = res
this.infoForm.administrators = res[0].phone
})
},
getBankBalance(val) {
this.infoForm.totalAmount = ''
this.balance = ''
getBankBalance({ merchantId: val }).then(res => {
if (res || res == 0) {
this.balance = res
if (this.balance) {
this.totalAmountDisabled = false
} else {
this.totalAmountDisabled = true
}
}
})
},
handleUpgradeNum(newVal) {
var maxVal = 999999
if (this.balance) {
maxVal = this.balance
}
// else {
// newVal = ''
// }
this.infoForm.totalAmount = limitPrice(newVal, this.oldVal.totalAmount, 6, 2, 0, maxVal)
this.oldVal.totalAmount = this.infoForm.totalAmount
},
handleCashConfirm() {
this.$refs.formRef.validate(valid => {
if (valid) {
var params = {}
params.remark = this.infoForm.remark
params.smsCode = this.infoForm.smsCode
params.phone = this.infoForm.administrators
params.merchantId = this.infoForm.merchantId
if (this.infoForm.totalAmount > 0) {
params.totalAmount = this.infoForm.totalAmount
} else {
this.$message({
message: "提现金额必须大于0",
type: "warning",
showClose: true
})
return
}
console.log(params);
transferAccountsRecordCreate(params).then(res => {
this.notice.okTips('操作成功')
this.visible = true
})
}
})
},
handleSend() {
if (!this.infoForm.administrators) {
this.notice.warningTips('请选择管理员')
return
}
sendToSmsCodeApi({ phone: this.infoForm.administrators }).then((res) => {
this.notice.okTips('已发送,30分钟内有效')
this.isSend = true
this.showtips = true
this.sendMsg = 60
this.msgDown()
})
},
msgDown() {
this.time = setTimeout(() => {
clearTimeout(this.time)
if (this.sendMsg > 1) {
--this.sendMsg
this.msgDown()
} else {
this.isSend = false
}
}, 1000)
}
}
}
</script>
<style scoped>
p {
margin: 0 0;
}
.cash-btn {
margin-left: 20px;
}
</style>
<!-- 提现管理 - 列表 -->
<template>
<div>
<!-- class="order-detail" -->
<d2-container>
<!-- <div class="offline-account"> -->
<div class="header"
slot="header"
style="padding: 10px 20px;">
<d2-search ref="showSearch"
class="show-search"
:search-form="searchForm"
:labelWidth="labelWidth"
:form-data="showFormData" />
<div class="up-btns">
<el-button @click="handleSearch"
size="small"
type="primary">
查询
</el-button>
<el-button size="small"
@click="handleReset">
重置
</el-button>
</div>
</div>
<!-- </d2-container>
<d2-container> -->
<div class="d2-container-content">
<d2-table-header>
<auth-button category="Button" />
</d2-table-header>
<d2-table ref="recordTable"
:get-list-api="getListApi"
:search-form="searchFormSearch"
:table-params="tableParams"
:before-search-fn="beforeSearchFn">
<div slot="auth-button"
slot-scope="scope">
<!-- 重新发起提现 -->
<span style="margin-right: 10px;"
v-if="scope.scope.status == 8">
<auth-button :data="scope.scope"
:show-btn-ids="['9050603']" />
</span>
</div>
</d2-table>
</div>
</d2-container>
<!-- 新增提现 -->
<add-dialog :addVisible="addVisible"
v-if="addVisible"
@dialogClose="addDialogClose" />
</div>
</template>
<script>
import { Util, deepClone } from '@/common/util'
import { mapActions, mapState } from 'vuex'
import { withdrawalManageStatusList } from '@/common/constants.js'
import { withdrawOrderRecordPage, rewithdraw } from '@api/withdrawalManage'
import addDialog from './components/addDialog'
export default {
name: 'TransferAccountsList',
components: {
addDialog
},
data() {
return {
userInfo: this.$store.state.d2admin.user.info,
labelWidth: '100px',
searchForm: {
withdrawTradeNo: '',
merchantName: '',
merchantIdFuzzy: '',
// merchantIds: [],
status: '',
statuses: [],
withdrawalDate: ''
},
searchFormSearch: {},
showFormData: [{
label: '提现流水号',
name: 'withdrawTradeNo',
type: 'input',
maxlength: '20',
isClear: true
}, {
label: '提现商户',
name: 'merchantName',
type: 'input',
maxlength: '50',
isClear: true
}, {
label: '商户号',
name: 'merchantIdFuzzy',
type: 'input',
inputType: 'number',
maxlength: '20',
isClear: true
}, {
label: '状态',
name: 'status',
type: 'select',
optionList: [],
optionId: 'confId',
optionLabel: 'confValue',
optionsName: 'statusList'
}, {
label: '提现时间',
name: 'withdrawalDate',
type: 'datePicker',
isClear: true,
pickerOptions: 'rangePickerOptions'
}],
getListApi: withdrawOrderRecordPage,
tableParams: {
btnId: new Date().getTime() + parseInt(Math.random() * 1000),
listName: 'list',
// tableOption: { width: '200px' },
tableOption: true,
tableColumns: [{
label: '提现流水号',
prop: 'withdrawTradeNo',
width: '200px'
}, {
label: '提现商户',
prop: 'merchantName',
width: '160px'
}, {
label: '商户号',
prop: 'merchantId',
width: '160px'
}, {
label: '提现金额/元',
prop: 'totalAmount',
formatter: (cellValue) => {
return cellValue.totalAmount ? cellValue.totalAmount : '--'
}
}, {
label: '提现时间',
prop: 'withdrawTime',
width: '150px',
formatter: (cellValue) => {
return cellValue.withdrawTime ? Util.dateFormate(cellValue.withdrawTime, 'YYYY-MM-DD HH:mm:ss') : '--'
}
},
{
label: '状态',
prop: 'status',
width: '100px',
formatter: (cellValue) => {
return this.baseData.statusList.find(item => item.confId === cellValue.status)?.confValue
},
className: (cellValue) => {
return {
5: 'blueSpot',
6: 'greenSpot',
8: 'redSpot',
}[cellValue.status]
}
},
{
label: '创建人',
prop: 'createdBy'
},
{
label: '备注',
prop: 'remark',
width: '160px',
showOverFlow: true,
formatter: (cellValue) => {
return cellValue.remark ? cellValue.remark : '--'
}
}
]
},
baseData: {
statusList: deepClone(withdrawalManageStatusList),
},
infos: [],
recordInfo: null,
addVisible: false
}
},
computed: {
...mapState({
dowloadList: (state) => state.d2admin.user.dowloadList
})
},
mounted() {
this.getBaseData()
},
methods: {
...mapActions({
get: 'd2admin/base/get',
close: 'd2admin/page/close'
}),
...mapActions('d2admin/user', ['actionSetDownloadList']),
async getBaseData() {
this.getOptionsList()
},
beforeSearchFn() {
return new Promise(resolve => {
this.searchFormSearch = deepClone(this.searchForm)
if (this.searchFormSearch.withdrawalDate) {
this.searchFormSearch.withdrawStartTimeStr = Util.dateFormate(this.searchFormSearch.withdrawalDate[0], 'YYYY-MM-DD HH:mm:ss')
this.searchFormSearch.withdrawEndTimeStr = Util.dateFormate(this.searchFormSearch.withdrawalDate[1], 'YYYY-MM-DD') + ' 23:59:59'
delete this.searchFormSearch.withdrawalDate
}
// if (this.searchFormSearch.merchantId) {
// this.searchFormSearch.merchantIds[0] = this.searchFormSearch.merchantId
// delete this.searchFormSearch.merchantId
// }
if (this.searchFormSearch.status) {
this.searchFormSearch.statuses[0] = this.searchFormSearch.status
delete this.searchFormSearch.status
}
resolve()
})
},
getOptionsList() {
this.showFormData.forEach((item, index) => {
if (item.type === 'select') {
console.log('this.baseData[item.optionsName]', item.optionsName)
if (this.baseData[item.optionsName].length && this.baseData[item.optionsName][0][this.showFormData[index].optionLabel] !== '全部') {
const temp = {}
temp[this.showFormData[index].optionId] = ''
temp[this.showFormData[index].optionLabel] = '全部'
this.baseData[item.optionsName].unshift(temp)
}
this.$set(this.showFormData[index], 'optionList', this.baseData[item.optionsName])
}
})
},
handleSearch() {
this.$refs.recordTable.refreshTable(false, true)
},
handleReset() {
this.searchForm = {
withdrawTradeNo: '',
merchantName: '',
merchantIdFuzzy: '',
// merchantIds: [],
status: '',
statuses: [],
withdrawalDate: ''
}
this.$refs.recordTable.refreshTable(false, true)
},
handleAdd() {
this.addVisible = !this.addVisible
},
addDialogClose(obj) {
this[obj.attrName] = !this[obj.attrName]
if (obj.flag) {
this.$refs.recordTable.refreshTable()
}
},
handleExport() {
var params = this.searchFormSearch
if (params.statuses.length > 0) {
const statuses = `statuses[0]`
params[statuses] = params.statuses[0]
delete params.statuses
}
// if (params.merchantIds.length > 0) {
// const merchantIds = `merchantIds[0]`
// params[merchantIds] = params.merchantIds[0]
// delete params.merchantIds
// }
// 去除为null的值
for (const key in params) {
if (params[key] === null || params[key] === '' || params[key].length == 0) {
delete params[key]
}
}
params.method = 'dj.api.smartcarlife.withdrawOrderRecord.exportAsync'
const list = [
...this.dowloadList,
{
name: '提现记录',
exportParam: JSON.stringify(params),
status: 'waiting',
timeid: new Date().getTime()
}
]
this.actionSetDownloadList({ list, type: 'dowloadList' })
},
//重新发起提现
handleReWithdrawal(row) {
this.$confirm('重新发起提现,系统自动向银盛平台重新发起提现请求,是否确定发起?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning',
closeOnClickModal: false
}).then(() => {
rewithdraw({ orderCode: row.orderCode }).then(res => {
this.notice.okTips()
this.$refs.recordTable.refreshTable()
})
}).catch(err => {
console.log(err)
})
},
}
}
</script>
<style scoped>
.count-txt {
font-weight: 700;
color: #2a58ad;
margin: 0 2px;
}
.leftSpan {
display: inline-block;
box-sizing: border-box;
margin-right: 10px;
}
</style>
...@@ -76,12 +76,13 @@ export default { ...@@ -76,12 +76,13 @@ export default {
methods: { methods: {
getList() { getList() {
let storeApi = this.selectedScene == 2 ? getAccountMerchantList : getList // 会员权益场景 上架门店是账户中心所有门店 let storeApi = [1, 2, 3].includes(this.selectedScene) ? getList : getAccountMerchantList // 会员权益/积分商城场景 上架门店是账户中心所有门店
storeApi({ storeApi({
merchantName: this.searchMerchantName, merchantIdName: ![1, 2, 3].includes(this.selectedScene) ? this.searchMerchantName : '',
merchantName: [1, 2, 3].includes(this.selectedScene) ? this.searchMerchantName : '',
currentPage: this.currentPage, currentPage: this.currentPage,
pageSize: this.pageSize, pageSize: this.pageSize,
scene: this.selectedScene ? this.selectedScene : '' scene: this.selectedScene
}).then(res => { }).then(res => {
res?.list?.forEach(val => { // 账户中心门店返回商户号字段是merchantNo res?.list?.forEach(val => { // 账户中心门店返回商户号字段是merchantNo
if (val.merchantNo) val.merchantId = val.merchantNo if (val.merchantNo) val.merchantId = val.merchantNo
......
...@@ -609,10 +609,17 @@ export default { ...@@ -609,10 +609,17 @@ export default {
merchantName: info.realityShopMerchantName, merchantName: info.realityShopMerchantName,
targetMerchantType: 3 targetMerchantType: 3
} }
// 如果勾选商户 就追加进去
if (info.djzhySubMerchantId) {
const dizhySubMerchantObj = {
merchantId: info.djzhySubMerchantId, // 实际分账商户方商户id(嘀加智慧云为-1)
merchantName: info.djzhySubMerchantName,
targetMerchantType: 4
}
return [platformSideobj, dizhySubMerchantObj, ...this.serviceSelectList, merchantSideobj]
}
return [platformSideobj, ...this.serviceSelectList, merchantSideobj] return [platformSideobj, ...this.serviceSelectList, merchantSideobj]
} }
// this.tableSelectOptions =
}, },
tableClassificationObjSelect() { tableClassificationObjSelect() {
// return false // return false
......
...@@ -91,7 +91,8 @@ const targetType = { ...@@ -91,7 +91,8 @@ const targetType = {
const targetMerchantType = { const targetMerchantType = {
1: '平台方', 1: '平台方',
2: '服务商', 2: '服务商',
3: '4s店' 3: '4s店',
4: '平台方'
} }
export default { export default {
name: 'MerchantTestDialog', name: 'MerchantTestDialog',
......
...@@ -4,16 +4,9 @@ ...@@ -4,16 +4,9 @@
<p class="edit-sub-title"> <p class="edit-sub-title">
分账金额设置 分账金额设置
</p> </p>
<el-form ref="divisionRuleRef" <el-form ref="divisionRuleRef" :model="form" :rules="rules" label-suffix=":" label-width="180px">
:model="form" <el-form-item label="" label-width="54px">
:rules="rules" <table cellpadding="0" cellspacing="0" class="table-block">
label-suffix=":"
label-width="180px">
<el-form-item label=""
label-width="54px">
<table cellpadding="0"
cellspacing="0"
class="table-block">
<!-- <tr> <!-- <tr>
<th rowspan="2"> <th rowspan="2">
分账方-账户 分账方-账户
...@@ -23,10 +16,9 @@ ...@@ -23,10 +16,9 @@
</th> </th>
</tr> --> </tr> -->
<tr class="tableHeader"> <tr class="tableHeader">
<td>分账对象/分账方</td> <td>分账对象/分账类目</td>
<td>平台方分账金额</td> <td>平台方分账金额</td>
<td v-for="(item,index) in radioList" <td v-for="(item, index) in radioList" :key="index">{{ item.applicationObjectName }}</td>
:key="index">{{ item.applicationObjectName }}</td>
<!-- <td v-if="merchantAccountInfo.partnerSettleAccountModel == 1"> <!-- <td v-if="merchantAccountInfo.partnerSettleAccountModel == 1">
服务商分账金额 服务商分账金额
</td> --> </td> -->
...@@ -47,34 +39,24 @@ ...@@ -47,34 +39,24 @@
<!-- class="one-line-ellipsis" <!-- class="one-line-ellipsis"
style="width: 300px;" --> style="width: 300px;" -->
<!-- 对应的分账对象 --> <!-- 对应的分账对象 -->
<p :title="item|filterMerchantType" <p :title="item | filterMerchantType" v-for="(item, index) in tableSelectOptions" :key="index">
v-for="(item,index) in tableSelectOptions" {{ item | filterMerchantType }}
:key="index">
{{ item|filterMerchantType }}
</p> </p>
</td> </td>
<td class="p-b-20"> <td class="p-b-20">
<el-form-item label-width="0px"> <el-form-item label-width="0px">
<el-radio-group v-model="platformSideLabel"> <el-radio-group v-model="platformSideLabel">
<el-radio v-for="(item, index) in tableSelectOptions" <el-radio v-for="(item, index) in tableSelectOptions" :key="index + 'index'" :disabled="item != 0"
:key="index+'index'"
:disabled="item!=0"
:label="index" /> :label="index" />
</el-radio-group> </el-radio-group>
</el-form-item> </el-form-item>
</td> </td>
<td class="p-b-20" <td class="p-b-20" v-for="(item, index) in radioList" :key="index + 'radioList'">
v-for="(item,index) in radioList" <el-form-item label-width="0" :prop="`id${item.id}`"
:key="index+'radioList'">
<el-form-item label-width="0"
:prop="`id${item.id}`"
:rules="[{ required: true, message: `请选择${item.applicationObjectName}`, trigger: 'change' }]"> :rules="[{ required: true, message: `请选择${item.applicationObjectName}`, trigger: 'change' }]">
<el-radio-group v-model="form['id'+item.id]" <el-radio-group v-model="form['id' + item.id]" @change="e => handleClearValid(e, 'id' + item.id)">
@change="e => handleClearValid(e,'id'+item.id)"> <el-radio v-for="(el, index) in tableSelectOptions" :key="index" :label="+(el.merchantId)" />
<el-radio v-for="(el,index) in tableSelectOptions"
:key="index"
:label="+(el.merchantId)" />
</el-radio-group> </el-radio-group>
</el-form-item> </el-form-item>
</td> </td>
...@@ -106,7 +88,7 @@ export default { ...@@ -106,7 +88,7 @@ export default {
} }
}, },
// 分账对象选项 1:平台方 2:服务商 3:导流方 // 分账对象选项 1:平台方 2:服务商 3:导流方 4:子商户
tableSelectOptions: { tableSelectOptions: {
type: Array, type: Array,
default: () => [] default: () => []
...@@ -118,7 +100,8 @@ export default { ...@@ -118,7 +100,8 @@ export default {
const name = { const name = {
1: '平台方', 1: '平台方',
2: '服务商', 2: '服务商',
3: '导流方' 3: '导流方',
4: '平台方'
} }
const type = val.targetMerchantType const type = val.targetMerchantType
return `${name[type]}: ${val.merchantName}` return `${name[type]}: ${val.merchantName}`
...@@ -281,10 +264,12 @@ export default { ...@@ -281,10 +264,12 @@ export default {
border: 1px solid #e5e6e7; border: 1px solid #e5e6e7;
border-width: 1px 0 0 1px; border-width: 1px 0 0 1px;
} }
.division-rule table tr { .division-rule table tr {
height: 50px; height: 50px;
line-height: 50px; line-height: 50px;
} }
.division-rule table th, .division-rule table th,
.division-rule table td { .division-rule table td {
font-size: 12px; font-size: 12px;
...@@ -298,19 +283,23 @@ export default { ...@@ -298,19 +283,23 @@ export default {
/* overflow: hidden; */ /* overflow: hidden; */
/* text-overflow: ellipsis; */ /* text-overflow: ellipsis; */
} }
.division-rule .flex { .division-rule .flex {
display: flex; display: flex;
justify-content: space-around; justify-content: space-around;
} }
.division-rule .table-block .el-radio { .division-rule .table-block .el-radio {
display: block; display: block;
height: 60px; height: 60px;
line-height: 42px; line-height: 42px;
margin-right: 0; margin-right: 0;
} }
.division-rule .table-block .el-radio__label { .division-rule .table-block .el-radio__label {
display: none !important; display: none !important;
} }
.p-b-20 { .p-b-20 {
padding-bottom: 26px !important; padding-bottom: 26px !important;
} }
......
...@@ -59,6 +59,15 @@ ...@@ -59,6 +59,15 @@
<el-option v-for="item in baseData.PlatformLevelList" :key="item.merchantId" :label="item.showMerchantName" <el-option v-for="item in baseData.PlatformLevelList" :key="item.merchantId" :label="item.showMerchantName"
:value="item.merchantId" /> :value="item.merchantId" />
</el-select> </el-select>
<el-checkbox class="ml10" true-label="Y" false-label="N"
v-model="financialObj.multiPlatformMerchantFlag">开启多平台分账
</el-checkbox>
<el-tooltip class="item" effect="dark" placement="right">
<i class="el-icon-info"> </i>
<template slot="content"><i class="el-icon-info"></i>
开启多平台分账,可使用嘀加智慧云子商户作为分账方。</template>
</el-tooltip>
</el-form-item> </el-form-item>
<el-form-item label="流量方分账方" prop="realityShopMerchantId" required> <el-form-item label="流量方分账方" prop="realityShopMerchantId" required>
<!-- @change="refreshData" --> <!-- @change="refreshData" -->
...@@ -114,7 +123,7 @@ ...@@ -114,7 +123,7 @@
import { mapActions, mapGetters, mapMutations } from 'vuex' import { mapActions, mapGetters, mapMutations } from 'vuex'
import { sceneList, userType, attrToVal as attrToValOptions } from '@/common/constants' import { sceneList, userType, attrToVal as attrToValOptions } from '@/common/constants'
import { deepClone } from '@/common/util' import { deepClone } from '@/common/util'
import { scenemerchantrefQueryServiceRefByShop, merchantSettleDistributeRuleLastRule, merchantSettleDistributeRule, getMerchantLevelApi } from '@api/merchant' import { scenemerchantrefQueryServiceRefByShop, merchantSettleDistributeRuleLastRule, merchantSettleDistributeRule, getMerchantLevelApi, getDjzhySubMerchant } from '@api/merchant'
import { getPlatformMerchantList } from '@api/index' import { getPlatformMerchantList } from '@api/index'
import { queryFeeCategoryByType, getGoodsCategoryConfiguration } from '@/api/sys.base.js' import { queryFeeCategoryByType, getGoodsCategoryConfiguration } from '@/api/sys.base.js'
import verificationCodeDialog from './components/verificationCodeDialog' import verificationCodeDialog from './components/verificationCodeDialog'
...@@ -126,8 +135,8 @@ export default { ...@@ -126,8 +135,8 @@ export default {
// isNeedVuex: true, // isNeedVuex: true,
components: { components: {
classificationCpt, classificationCpt,
verificationCodeDialog, verificationCodeDialog, //
merchantTestDialog merchantTestDialog //
}, },
data() { data() {
return { return {
...@@ -161,6 +170,9 @@ export default { ...@@ -161,6 +170,9 @@ export default {
realityShopMerchantId: '', // 实际分账4S店商户号 realityShopMerchantId: '', // 实际分账4S店商户号
realityShopMerchantName: '', // 实际分账4S店商户名称 realityShopMerchantName: '', // 实际分账4S店商户名称
realityShopUserType: '', // 实际分账4S店商户用户类型(1工厂2省代3市代4门店) realityShopUserType: '', // 实际分账4S店商户用户类型(1工厂2省代3市代4门店)
djzhySubMerchantId: '',
djzhySubMerchantName: '',
multiPlatformMerchantFlag: 'N', // 是否多平台
goodsTypeGroupRules: [] goodsTypeGroupRules: []
}, },
// 结算周期 // 结算周期
...@@ -191,7 +203,11 @@ export default { ...@@ -191,7 +203,11 @@ export default {
upgradeGoodsList: [], upgradeGoodsList: [],
currentPage: 1, currentPage: 1,
pageSize: 20, pageSize: 20,
selectUpgradeGoodsList: [] selectUpgradeGoodsList: [],
DjzhySubMerchantObj: {
djzhySubMerchantId: '',
djzhySubMerchantName: ''
}
} }
}, },
computed: { computed: {
...@@ -215,12 +231,15 @@ export default { ...@@ -215,12 +231,15 @@ export default {
return (length1 - length3 - 2) > 0 && length1 > length2 return (length1 - length3 - 2) > 0 && length1 > length2
}, },
financialLedgerParty() { financialLedgerParty() {
const { realityPlatformMerchantId, realityPlatformMerchantName, realityShopMerchantId, realityShopMerchantName } = this.financialObj const { realityPlatformMerchantId, realityPlatformMerchantName, realityShopMerchantId, realityShopMerchantName, djzhySubMerchantId, djzhySubMerchantName } = this.financialObj
// console.log(realityShopMerchantName, dizhySubMerchantId, this.financialObj, 'this.financialObj')
return { return {
realityPlatformMerchantId, // 实际分账平台方商户id(嘀加智慧云为-1) realityPlatformMerchantId, // 实际分账平台方商户id(嘀加智慧云为-1)
realityPlatformMerchantName, // 实际分账平台方商户名称 realityPlatformMerchantName, // 实际分账平台方商户名称
realityShopMerchantId, realityShopMerchantId,
realityShopMerchantName realityShopMerchantName,
djzhySubMerchantName,
djzhySubMerchantId
} }
} }
}, },
...@@ -253,6 +272,23 @@ export default { ...@@ -253,6 +272,23 @@ export default {
} }
} }
}, },
'financialObj.multiPlatformMerchantFlag': {
handler(val) {
console.log(val, 'financialObj.multiPlatformMerchantFlag')
if (val == 'Y') {
// const { djzhySubMerchantId, djzhySubMerchantName } = this.DjzhySubMerchantObj
// console.log(djzhySubMerchantId, djzhySubMerchantName, 'djzhySubMerchantId')
this.financialObj = Object.assign(this.financialObj, this.DjzhySubMerchantObj)
// this.$forceUpdate()
// this.financialObj.djzhySubMerchantId = djzhySubMerchantId
// this.financialObj.djzhySubMerchantName = djzhySubMerchantName
console.log(this.financialObj, 'this.financialObj')
} else {
this.financialObj.djzhySubMerchantId = ''
this.financialObj.djzhySubMerchantName = ''
}
}
},
productType: { productType: {
handler(val) { handler(val) {
this.initBaseData() this.initBaseData()
...@@ -263,6 +299,7 @@ export default { ...@@ -263,6 +299,7 @@ export default {
}, },
mounted() { mounted() {
this.initFinancialObj()// 先默认初始化平台方和流量方 this.initFinancialObj()// 先默认初始化平台方和流量方
this.initDjzhySubMerchant() // 初始化嘀加智慧云子商户
this.getFinancialObj() this.getFinancialObj()
this.init4sServiceList() this.init4sServiceList()
this.initFeeCategoryByType() this.initFeeCategoryByType()
...@@ -276,6 +313,16 @@ export default { ...@@ -276,6 +313,16 @@ export default {
...mapActions('FinancialRules', ['reset']), ...mapActions('FinancialRules', ['reset']),
...mapMutations('FinancialRules', ['toggle', 'set4sService']), ...mapMutations('FinancialRules', ['toggle', 'set4sService']),
initDjzhySubMerchant() { // 初始化嘀加智慧云子商户
getDjzhySubMerchant({}).then(res => {
console.log(res, 'getDjzhySubMerchant')
const { merchantId, merchantName } = res
this.DjzhySubMerchantObj = {
djzhySubMerchantId: merchantId,
djzhySubMerchantName: merchantName
}
})
},
initFinancialObj() { // 先取默认值 initFinancialObj() { // 先取默认值
const { channelType, merchantName, merchantId } = this.routerInfo const { channelType, merchantName, merchantId } = this.routerInfo
this.financialObj = Object.assign(this.financialObj, { this.financialObj = Object.assign(this.financialObj, {
...@@ -363,10 +410,12 @@ export default { ...@@ -363,10 +410,12 @@ export default {
result.autoFlag = result.autoFlag ? result.autoFlag : 'N' result.autoFlag = result.autoFlag ? result.autoFlag : 'N'
result.settleTimeType = result.settleTimeType ? result.settleTimeType : 1 result.settleTimeType = result.settleTimeType ? result.settleTimeType : 1
result && result.divisionRuleId && (this.financialObj = result) result && result.divisionRuleId && (this.financialObj = result)
result.multiPlatformMerchantFlag = result.multiPlatformMerchantFlag || 'N'
const autoFlag = result?.autoFlag == 'Y' const autoFlag = result?.autoFlag == 'Y'
// 隐藏固定周期分账 处理历史数据 // 隐藏固定周期分账 处理历史数据
if (result?.settleTimeType == 2) result.settleTimeType = 1 if (result?.settleTimeType == 2) result.settleTimeType = 1
result && (this.financialObj = result) result && (this.financialObj = result)
// this.$forceUpdate()
// function compare(property) { // function compare(property) {
// return function (a, b) { // return function (a, b) {
// return a[property] - b[property] // return a[property] - b[property]
...@@ -767,6 +816,10 @@ export default { ...@@ -767,6 +816,10 @@ export default {
// background-color: #fff; // background-color: #fff;
} }
.ml10 {
margin-left: 10px;
}
.footer { .footer {
text-align: center; text-align: center;
} }
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!