Commit ff5944f2 by 张立顺

feat 签约功能开发

1 parent b18409e3
...@@ -119,3 +119,8 @@ export function accountPage(data) { ...@@ -119,3 +119,8 @@ export function accountPage(data) {
data.method = `${djPath2}merchant.paymentChannel.account.page` data.method = `${djPath2}merchant.paymentChannel.account.page`
return request(data, "post") return request(data, "post")
} }
// 获取签约链接
export function getSignUrl(data) {
data.method = `dj.api.yseMerchant.getSignUrl`
return request(data, "post")
}
...@@ -335,7 +335,17 @@ export const withdrawStatusList = [ ...@@ -335,7 +335,17 @@ export const withdrawStatusList = [
confLabel: "提现失败" confLabel: "提现失败"
} }
] ]
// (1:未签约,2:已签约))
export const withdrawSignStatusList = [
{
confId: 1,
confLabel: "未签约"
},
{
confId: 2,
confLabel: "已签约"
}
]
// 提现渠道 // 提现渠道
export const withdrawChannelList = [ export const withdrawChannelList = [
{ {
......
...@@ -447,6 +447,12 @@ export const routerName = { ...@@ -447,6 +447,12 @@ export const routerName = {
parentId: "90610", parentId: "90610",
label: "修改到账模式", label: "修改到账模式",
handle: "handleEditAccountMode" handle: "handleEditAccountMode"
},
{
authId: "9061009",
parentId: "90610",
label: "获取签约链接",
handle: "handleCopyLink"
} }
], ],
component: _import("systemConfig/accountNew/accountList_newIndex") component: _import("systemConfig/accountNew/accountList_newIndex")
......
<!-- 虚拟账户成本 --> <!-- 虚拟账户成本 -->
<template> <template>
<div> <div>
<div class="d2-container-content" <div class="d2-container-content" style="padding: 10px 20px;">
style="padding: 10px 20px;"> <div class=" header" slot="header">
<div class=" header" <d2-search ref="showSearch" :search-form="searchForm" :form-data="showFormData">
slot="header">
<d2-search ref="showSearch"
:search-form="searchForm"
:form-data="showFormData">
<!-- :slot-scope="item" --> <!-- :slot-scope="item" -->
<template slot="channelType"> <template slot="channelType">
<el-cascader style="width: 50%;" <el-cascader style="width: 50%;" :options="merchantLevelOptions[nameToOption[searchForm.channelType]]"
:options="merchantLevelOptions[nameToOption[searchForm.channelType]]" :props="{ checkStrictly: true, value: 'id', label: 'merchantName' }" :show-all-levels="false"
:props="{ checkStrictly: true, value: 'id', label: 'merchantName' }" v-model="merchantLevelVal" clearable filterable />
:show-all-levels="false"
v-model="merchantLevelVal"
clearable
filterable />
</template> </template>
</d2-search> </d2-search>
<div class="up-btns"> <div class="up-btns">
<el-button @click="searchList" <el-button @click="searchList" size="small" type="primary">
size="small"
type="primary">
查询 查询
</el-button> </el-button>
<el-button size="small" <el-button size="small" @click="handleReset">
@click="handleReset">
重置 重置
</el-button> </el-button>
</div> </div>
...@@ -34,56 +23,37 @@ ...@@ -34,56 +23,37 @@
</div> </div>
<div class="d2-container-content"> <div class="d2-container-content">
<span slot="left"> <span slot="left">
<auth-button category="Button" <auth-button category="Button" :show-btn-ids="['9061003']" />
:show-btn-ids="['9061003']" />
</span> </span>
<!-- :get-list-api="getListApi" --> <!-- :get-list-api="getListApi" -->
<d2-table ref="merchantTable" <d2-table ref="merchantTable" :table-data="restructureList" :search-form="searchFormSearch"
:table-data="restructureList" :table-params="tableParams" :before-search-fn="beforeSearchFn" :has-num="false" :table-total="total"
:search-form="searchFormSearch" :array-span-method="arraySpanMethod" @refreshTable="jumpPage">
:table-params="tableParams"
:before-search-fn="beforeSearchFn"
:has-num="false"
:table-total="total"
:array-span-method="arraySpanMethod"
@refreshTable="jumpPage">
<!-- <auth-button slot="auth-button" slot-scope="scope" :data="scope.scope" /> --> <!-- <auth-button slot="auth-button" slot-scope="scope" :data="scope.scope" /> -->
<div slot="auth-button" <div slot="auth-button" slot-scope="scope" class="btnClass">
slot-scope="scope"
class="btnClass">
<template v-if="scope.scope.yseRefFlag == 'Y'"> <template v-if="scope.scope.yseRefFlag == 'Y'">
<auth-button slot="auth-button" <auth-button slot="auth-button" :show-btn-ids="['9061007']" :data="scope.scope" />
:show-btn-ids="['9061007']"
:data="scope.scope" />
<auth-button v-if="!scope.scope.ineffectiveReceiptMode && scope.scope.payPlatform == 'ysepay'" <auth-button v-if="!scope.scope.ineffectiveReceiptMode && scope.scope.payPlatform == 'ysepay'"
slot="auth-button" slot="auth-button" :show-btn-ids="['9061008']" :data="scope.scope" />
:show-btn-ids="['9061008']" <!-- 未签约 -->
:data="scope.scope" /> <auth-button v-if="scope.scope.withdrawSignStatus == 1" slot="auth-button" :show-btn-ids="['9061009']"
:data="scope.scope" />
</template>
<template v-else>
<auth-button slot="auth-button" :show-btn-ids="['9061001']" :data="scope.scope" />
</template> </template>
<auth-button v-else
slot="auth-button"
:show-btn-ids="['9061001']"
:data="scope.scope" />
</div> </div>
</d2-table> </d2-table>
</div> </div>
<baseDialog :is-show.sync="accountDetailVisible" <baseDialog :is-show.sync="accountDetailVisible" class="dialog" :config="dialogConfig.setting"
class="dialog" :dialog-config="dialogConfig.config" @closeDialog="handleDetailClose">
:config="dialogConfig.setting" <account-detail v-if="accountDetailVisible" :account-detail-visible="accountDetailVisible"
:dialog-config="dialogConfig.config" :merchant-row="merchantRow" />
@closeDialog="handleDetailClose">
<account-detail v-if="accountDetailVisible"
:account-detail-visible="accountDetailVisible"
:merchant-row="merchantRow" />
</baseDialog> </baseDialog>
<baseDialog :is-show.sync="receiptModeVisible" <baseDialog :is-show.sync="receiptModeVisible" :dialog-config="modeDialogConfig.config"
:dialog-config="modeDialogConfig.config" @closeDialog="handleModeClose" @handleClick="handleModeConfirm">
@closeDialog="handleModeClose" <edit-account-mode ref="editAccountModeForm" v-if="receiptModeVisible" @handleModeClose="handleModeClose"
@handleClick="handleModeConfirm"> :merchant-row="merchantRow" />
<edit-account-mode ref="editAccountModeForm"
v-if="receiptModeVisible"
@handleModeClose="handleModeClose"
:merchant-row="merchantRow" />
</baseDialog> </baseDialog>
<!-- <settingDetail :show="settingDetailVisible"></settingDetail> --> <!-- <settingDetail :show="settingDetailVisible"></settingDetail> -->
</div> </div>
...@@ -91,11 +61,11 @@ ...@@ -91,11 +61,11 @@
<script> <script>
import { Util, deepClone } from '@/common/util' import { Util, deepClone } from '@/common/util'
import { getListApi, getMerchantLevelApi, synchronizeBusinessInformation, accountPage } from '@api/publicAccount' import { getListApi, getMerchantLevelApi, synchronizeBusinessInformation, accountPage, getSignUrl } from '@api/publicAccount'
import { mapActions } from 'vuex' import { mapActions } from 'vuex'
import accountDetail from './accountDetail' import accountDetail from './accountDetail'
import editAccountMode from './components/editAccountMode.vue' import editAccountMode from './components/editAccountMode.vue'
import { BaseData, merchantStoreServiceList, receiptModeList } from '@/common/constants.js' import { BaseData, merchantStoreServiceList, receiptModeList, withdrawSignStatusList } from '@/common/constants.js'
import { paymentChannelList } from '@api/index' import { paymentChannelList } from '@api/index'
// import baseDialog from '@/components/baseDialog/baseDialog' // import baseDialog from '@/components/baseDialog/baseDialog'
// import settingDetail from './settingDetail.vue' // import settingDetail from './settingDetail.vue'
...@@ -216,7 +186,17 @@ export default { ...@@ -216,7 +186,17 @@ export default {
optionId: 'paymentChannelId', optionId: 'paymentChannelId',
optionLabel: 'paymentChannelName', optionLabel: 'paymentChannelName',
optionsName: 'payChannelList' optionsName: 'payChannelList'
}], },
{
label: '提现状态',
name: 'withdrawSignStatus',
type: 'select',
optionList: [],
optionId: 'confId',
optionLabel: 'confLabel',
optionsName: 'withdrawSignStatusList'
}
],
// 表格 // 表格
getListApi: getListApi, getListApi: getListApi,
restructureList: [], restructureList: [],
...@@ -284,6 +264,13 @@ export default { ...@@ -284,6 +264,13 @@ export default {
} }
}, },
{ {
label: '提现状态',
prop: 'withdrawSignStatus',
formatter: (cellValue) => {
return cellValue.withdrawSignStatus == '1' ? '未签约' : cellValue.withdrawSignStatus == '2' ? '已签约' : '-'
}
},
{
label: '虚账编码', label: '虚账编码',
prop: 'yseUserCode', prop: 'yseUserCode',
width: '200px' width: '200px'
...@@ -327,7 +314,8 @@ export default { ...@@ -327,7 +314,8 @@ export default {
}], }],
merchantStoreServiceList: merchantStoreServiceList, merchantStoreServiceList: merchantStoreServiceList,
receiptModeList: JSON.parse(JSON.stringify(receiptModeList)), receiptModeList: JSON.parse(JSON.stringify(receiptModeList)),
payChannelList: [] payChannelList: [],
withdrawSignStatusList: withdrawSignStatusList
}, },
dialogConfig: { dialogConfig: {
setting: { setting: {
...@@ -389,6 +377,56 @@ export default { ...@@ -389,6 +377,56 @@ export default {
// associationSettings() { // associationSettings() {
// this.settingDetailVisible = true // this.settingDetailVisible = true
// }, // },
async handleCopyLink(item) {
// const ok = await this.copyText('测试')
// if (ok) {
// this.$message.success('复制成功')
// } else {
// this.$message.error('复制失败,请手动复制')
// }
const res = await getSignUrl({
platformYseMerchantId: '4',
paymentChannelId: '65339644694B4D56ADE2999692864E44'
// platformYseMerchantId: item.yseMerchantId,
// paymentChannelId: item.paymentChannelId
})
console.log(res)
if (res && res.signUrl) {
const ok = await this.copyText(res.signUrl)
if (ok) {
this.$message.success('复制成功')
} else {
this.$message.error('复制失败,请手动复制')
}
} else {
this.$message.error(res && res.msg ? res.msg : '获取签约链接失败')
}
},
async copyText(text) {
try {
if (navigator && navigator.clipboard && navigator.clipboard.writeText) {
await navigator.clipboard.writeText(text)
return true
}
} catch (e) { }
const input = document.createElement('textarea')
input.value = text || ''
input.setAttribute('readonly', '')
input.style.position = 'fixed'
input.style.top = '-1000px'
input.style.opacity = '0'
document.body.appendChild(input)
input.focus()
input.select()
let ok = false
try {
ok = document.execCommand('copy')
} catch (e) {
ok = false
}
document.body.removeChild(input)
return ok
},
async getBaseData() { async getBaseData() {
this.baseData.channelTypeList = await this.get(BaseData.channelType) this.baseData.channelTypeList = await this.get(BaseData.channelType)
this.getOptionsList() this.getOptionsList()
...@@ -633,7 +671,7 @@ export default { ...@@ -633,7 +671,7 @@ export default {
arraySpanMethod({ row, column, rowIndex, columnIndex }) { arraySpanMethod({ row, column, rowIndex, columnIndex }) {
const len = this.restructureList.length const len = this.restructureList.length
// const t = this.columns.length // const t = this.columns.length
const t = 12 const t = 13
if (columnIndex === 0) { if (columnIndex === 0) {
// 第一列 序号 // 第一列 序号
const _row_1 = this.spanArr1[rowIndex] const _row_1 = this.spanArr1[rowIndex]
...@@ -707,6 +745,7 @@ export default { ...@@ -707,6 +745,7 @@ export default {
.el-cascader-panel .el-cascader-menu { .el-cascader-panel .el-cascader-menu {
width: 260px; width: 260px;
} }
.btnClass span { .btnClass span {
margin-right: 5px; margin-right: 5px;
} }
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!