Commit 9bf4eb2e by 前端

1031版本功能提交

1 parent 510b2f2f
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: "到账失败" }
]
...@@ -435,4 +435,8 @@ export default { ...@@ -435,4 +435,8 @@ export default {
@include spotBase(); @include spotBase();
background: #eb4e4e; background: #eb4e4e;
} }
.blueSpot {
@include spotBase();
background: #5850ff;
}
</style> </style>
...@@ -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")
} }
} }
<!-- 运营审核 -->
<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'
}],
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="请输入验证码"
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.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="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"
@change="getBankBalance">
<el-option v-for="(item,index) in baseData.merchantList"
:key="index"
:label="item.merchantName"
:value="item.merchantId" />
</el-select>
<p>
银盛账户余额:{{balance?balance:'-'}}
</p>
</el-form-item>
<el-form-item label="提现金额:"
prop="totalAmount">
<el-input v-model="infoForm.totalAmount"
placeholder="请输入提现金额"
style="width: 310px"
@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"
: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.withdrawPhone ? infoForm.withdrawPhone.slice(-4) : '' }}的手机号发送验证码,验证码30分钟内有效
</p>
</el-form-item>
<el-form-item label="备注:"
prop="remark">
<el-input v-model="infoForm.remark"
placeholder="请输入备注"
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'
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: ''
}
},
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
})
},
getAdminList() {
getWithdrawTreasurerList({}).then(res => {
this.baseData.administratorsList = res
})
},
getBankBalance(val) {
this.infoForm.totalAmount = 0
getBankBalance({ merchantId: val }).then(res => {
this.balance = res || ''
})
},
handleUpgradeNum(newVal) {
var maxVal = 999999
if (this.balance) {
maxVal = this.balance
}
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
params.totalAmount = this.infoForm.totalAmount
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: '',
merchantId: '',
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: 'merchantId',
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'
}
]
},
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()
},
handleReset() {
this.searchForm = {
withdrawTradeNo: '',
merchantName: '',
merchantId: '',
merchantIds: [],
status: '',
statuses: [],
withdrawalDate: ''
}
this.$refs.recordTable.refreshTable()
},
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'
}).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>
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!