Commit 997aa49d by 张立顺

Merge branch 'SAAS+V4.38.8' into 'SAAS+V4.40.0-0624'

上线合并

See merge request !335
2 parents ace2d2db b935e7f8
......@@ -106,3 +106,9 @@ export function listWithPageAccountStatuses(data) {
data.method = `dj.api.serviceMerchant.listWithPage`
return request(data, "post")
}
// 修改到账模式
export function updateAccountMode(data) {
data.method = `${djPath}yseMerchant.updateReceiptMode`
return request(data, "post")
}
......@@ -844,3 +844,9 @@ export const auditTypeList = [
{ confId: 1, confValue: "新增" },
{ confId: 2, confValue: "删除" }
]
// 虚拟对公账户银盛到账模式
export const receiptModeList = [
{ confId: 1, confValue: "T+1" },
{ confId: 2, confValue: "D+1" }
]
......@@ -338,6 +338,12 @@ export const routerName = {
parentId: "90610",
label: "账户详情",
handle: "handleApply"
},
{
authId: "9061008",
parentId: "90610",
label: "修改到账模式",
handle: "handleEditAccountMode"
}
],
component: _import("systemConfig/accountNew/accountList_newIndex")
......
......@@ -28,11 +28,13 @@
<d2-table ref="merchantTable" :get-list-api="getListApi" :search-form="searchFormSearch" :table-params="tableParams"
:before-search-fn="beforeSearchFn">
<!-- <auth-button slot="auth-button" slot-scope="scope" :data="scope.scope" /> -->
<div slot="auth-button" slot-scope="scope">
<auth-button v-if="scope.scope.ysemRefedFlag == 'Y'" slot="auth-button" :show-btn-ids="['9061007']"
<div slot="auth-button" slot-scope="scope" class="btnClass">
<template v-if="scope.scope.ysemRefedFlag == 'Y'">
<auth-button slot="auth-button" :show-btn-ids="['9061007']"
:data="scope.scope" />
<auth-button v-if="!scope.scope.ineffectiveReceiptMode" slot="auth-button" :show-btn-ids="['9061008']" :data="scope.scope" />
</template>
<auth-button v-else slot="auth-button" :show-btn-ids="['9061001']" :data="scope.scope" />
<auth-button slot="auth-button" :show-btn-ids="['9061003']" :data="scope.scope" />
</div>
</d2-table>
</div>
......@@ -41,6 +43,10 @@
<account-detail v-if="accountDetailVisible" :account-detail-visible="accountDetailVisible"
:merchant-row="merchantRow" />
</baseDialog>
<baseDialog :is-show.sync="receiptModeVisible" :dialog-config="modeDialogConfig.config"
@closeDialog="handleModeClose" @handleClick="handleModeConfirm">
<edit-account-mode ref="editAccountModeForm" v-if="receiptModeVisible" @handleModeClose="handleModeClose" :merchant-row="merchantRow" />
</baseDialog>
<!-- <settingDetail :show="settingDetailVisible"></settingDetail> -->
</div>
</template>
......@@ -50,7 +56,8 @@ import { Util, deepClone } from '@/common/util'
import { getListApi, getMerchantLevelApi, synchronizeBusinessInformation } from '@api/publicAccount'
import { mapActions } from 'vuex'
import accountDetail from './accountDetail'
import { BaseData, merchantStoreServiceList } from '@/common/constants.js'
import editAccountMode from './components/editAccountMode.vue'
import { BaseData, merchantStoreServiceList, receiptModeList } from '@/common/constants.js'
// import baseDialog from '@/components/baseDialog/baseDialog'
// import settingDetail from './settingDetail.vue'
export default {
......@@ -59,6 +66,8 @@ export default {
return {
// 账户详情
accountDetailVisible: false,
// 修改到账模式
receiptModeVisible: false,
// settingDetailVisible: false,
merchantRow: {},
nameToOption: {
......@@ -80,7 +89,8 @@ export default {
accountStatus: '',
merchantId: '',
yseUserCode: '',
ysemRefedFlag: ''
ysemRefedFlag: '',
receiptMode: ''
},
searchFormSearch: {},
showFormData: [{
......@@ -145,6 +155,14 @@ export default {
optionId: "confId",
optionLabel: "confLabel",
optionsName: "ysemRefedFlagList"
}, {
label: '到账模式',
name: "receiptMode",
type: "select",
optionList: [],
optionId: "confId",
optionLabel: "confValue",
optionsName: "receiptModeList"
}],
// 表格
getListApi: getListApi,
......@@ -156,7 +174,7 @@ export default {
label: '名称',
prop: 'merchantName'
}, {
label: '编号',
label: '商户号',
prop: 'merchantId'
}, {
label: '商户分类',
......@@ -196,6 +214,13 @@ export default {
}
},
{
label: '到账模式',
prop: 'receiptMode',
formatter: (cellValue) => {
return cellValue.receiptMode == '1' ? 'T+1' : cellValue.receiptMode == '2' ? 'D+1' : '-'
}
},
{
label: '虚账编码',
prop: 'yseUserCode'
},
......@@ -235,7 +260,8 @@ export default {
confLabel: '未关联',
confId: 'N'
}],
merchantStoreServiceList: merchantStoreServiceList
merchantStoreServiceList: merchantStoreServiceList,
receiptModeList: JSON.parse(JSON.stringify(receiptModeList)),
},
dialogConfig: {
setting: {
......@@ -250,11 +276,18 @@ export default {
width: '720px'
}
},
modeDialogConfig: {
config: {
title: '修改到账模式',
width: '600px'
}
}
}
},
components: {
accountDetail
accountDetail,
editAccountMode
// baseDialog,
// settingDetail
},
......@@ -321,6 +354,21 @@ export default {
})
},
// 修改到账模式
handleEditAccountMode(row) {
this.merchantRow = row
this.handleModeClose()
},
// 修改到账模式确认
handleModeConfirm() {
this.$refs.editAccountModeForm.submitForm()
},
// 修改到账模式 关闭弹窗
handleModeClose(isRefreshTable = false) {
this.receiptModeVisible = !this.receiptModeVisible
if (isRefreshTable) this.$refs.merchantTable.refreshTable() // 只刷新页面 保留当前分页数据
},
handleReset() {
this.searchForm = {
merchantType: '',
......@@ -329,7 +377,8 @@ export default {
accountStatus: '',
merchantId: '',
yseUserCode: '',
ysemRefedFlag: ''
ysemRefedFlag: '',
receiptMode: ''
}
this.merchantLevelVal = []
this.$refs.merchantTable.resetRefreshTable()
......@@ -372,4 +421,7 @@ export default {
.el-cascader-panel .el-cascader-menu {
width: 260px;
}
.btnClass span{
margin-right: 5px;
}
</style>
<!-- 修改到账模式 -->
<template>
<div>
<el-form ref="form" :model="formObj" :rules="rules" label-suffix=":" label-width="180px">
<el-form-item label="到账模式" prop="receiptMode">
<el-radio-group v-model="formObj.receiptMode">
<el-radio v-for="subItem in receiptModeList"
:key="subItem['confId']"
:label="subItem['confId']">
{{ subItem['confValue'] }}
</el-radio>
</el-radio-group>
</el-form-item>
<el-form-item label="管理员手机号验证">
{{ adminInfo.name }} {{ adminInfo.phone }}
<el-button size="small" @click="handleSend" :disabled="isSend">
{{ isSend ? sendMsg + '秒后,重试' : '发送验证短信' }}
</el-button>
</el-form-item>
<el-form-item label="验证码" prop="smsCode">
<el-input placeholder="请填写验证码" v-model="formObj.smsCode" size="small" style="width: 220px;" />
</el-form-item>
</el-form>
<p class="title-tips">说明:一天仅允许修改一次到账模式,修改成功后第二天自动生效。<br>D+1模式按自然日第二天到账,手续费为结算额的0.02%;<br>T+1模式按工作日第二天到账,无额外手续费</p>
</div>
</template>
<script>
import { sendSms, getAdminInfo } from '@api/merchant'
import { receiptModeList } from '@/common/constants.js'
import { updateAccountMode } from '@/api/publicAccount'
export default {
name: 'editAccountMode',
props: {
merchantRow: {
type: Object,
default: () => {}
}
},
data() {
return {
receiptModeList: JSON.parse(JSON.stringify(receiptModeList)),
formObj: {
receiptMode: '',
smsCode: ''
},
rules: {
receiptMode: [{ required: true, message: '请选择到账模式', trigger: ['change', 'blur'] }],
smsCode: [{ required: true, message: '请输入验证码', trigger: ['change', 'blur'] }]
},
adminInfo: {
name: '',
phone: ''
},
isSend: false,
sendMsg: '发送验证短信'
}
},
mounted() {
this.formObj.receiptMode = this.merchantRow.receiptMode
getAdminInfo({}).then(res => {
this.adminInfo = res
})
},
methods: {
// 发送验证码
handleSend() {
sendSms({}).then((res) => {
this.notice.okTips('已发送,30分钟内有效')
this.isSend = true
this.sendMsg = 60
this.msgDown()
})
},
msgDown() {
var time = setTimeout(() => {
clearTimeout(time)
if (this.sendMsg > 1) {
--this.sendMsg
this.msgDown()
} else {
this.isSend = false
}
}, 1000)
},
// 保存提交
submitForm() {
this.$refs['form'].validate((valid) => {
if (valid) {
let params = {
receiptMode: this.formObj.receiptMode, // 到账模式
yseUserCode: this.merchantRow.yseUserCode, // 虚账编码
smsCode: this.formObj.smsCode // 验证码
}
updateAccountMode(params).then(res => {
this.notice.okTips('修改成功')
// 刷新列表页
this.$emit('handleModeClose', true)
})
}
})
}
}
}
</script>
<style lang="scss" scoped>
.title-tips{
margin: 30px 0 0 45px;
color: #999;
}
</style>
\ No newline at end of file
......@@ -66,7 +66,7 @@
import { Util, deepClone } from '@/common/util'
import { yseMerchantPage } from '@api/publicAccount'
import { mapActions } from 'vuex'
import { merchantClassifyList } from '@/common/constants'
import { merchantClassifyList, receiptModeList } from '@/common/constants'
import subordinateMerchantDialog from './components/subordinateMerchantDialog'
import virtualAccountManagementDetailDialog from './components/virtualAccountManagementDetailDialog'
import accountDetail from './accountDetail'
......@@ -104,7 +104,8 @@ export default {
searchForm: {
yseUserCode: '',
merchantName: '',
merchantIdFuzzy: ''
merchantIdFuzzy: '',
receiptMode: ''
},
searchFormSearch: {},
showFormData: [
......@@ -135,7 +136,16 @@ export default {
isClear: true,
placeholder: '请输入商户号',
keyFn: this.keyDowmGetList
}],
}, {
label: '到账模式',
name: "receiptMode",
type: "select",
optionList: [],
optionId: "confId",
optionLabel: "confValue",
optionsName: "receiptModeList"
}
],
// 表格
getListApi: yseMerchantPage,
tableParams: {
......@@ -147,6 +157,12 @@ export default {
label: '虚账编码',
prop: 'yseUserCode'
}, {
label: '到账模式',
prop: 'receiptMode',
formatter: (cellValue) => {
return cellValue.receiptMode == '1' ? 'T+1' : cellValue.receiptMode == '2' ? 'D+1' : '-'
}
}, {
label: '关联商户数量',
prop: 'yqMerchantName',
type: 'slot',
......@@ -185,6 +201,7 @@ export default {
}]
},
baseData: {
receiptModeList: JSON.parse(JSON.stringify(receiptModeList))
},
dialogConfig: {
setting: {
......@@ -259,7 +276,8 @@ export default {
this.searchForm = {
yseUserCode: '',
merchantName: '',
merchantIdFuzzy: ''
merchantIdFuzzy: '',
receiptMode: ''
}
this.$refs.merchantTable.resetRefreshTable()
},
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!