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,55 +23,36 @@ ...@@ -34,55 +23,36 @@
</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']" <!-- 未签约 -->
<auth-button v-if="scope.scope.withdrawSignStatus == 1" slot="auth-button" :show-btn-ids="['9061009']"
:data="scope.scope" /> :data="scope.scope" />
</template> </template>
<auth-button v-else <template v-else>
slot="auth-button" <auth-button slot="auth-button" :show-btn-ids="['9061001']" :data="scope.scope" />
:show-btn-ids="['9061001']" </template>
: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"
@closeDialog="handleDetailClose">
<account-detail v-if="accountDetailVisible"
:account-detail-visible="accountDetailVisible"
:merchant-row="merchantRow" /> :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">
<edit-account-mode ref="editAccountModeForm"
v-if="receiptModeVisible"
@handleModeClose="handleModeClose"
:merchant-row="merchantRow" /> :merchant-row="merchantRow" />
</baseDialog> </baseDialog>
<!-- <settingDetail :show="settingDetailVisible"></settingDetail> --> <!-- <settingDetail :show="settingDetailVisible"></settingDetail> -->
...@@ -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;
} }
......
<!-- 申请虚拟账户成本-通联 --> <!-- 申请虚拟账户成本-通联 -->
<template> <template>
<div class="apply-account"> <div class="apply-account">
<edit-form ref="editFormRef" <edit-form ref="editFormRef" :title="formTitle" :current-page="custType" :settlement-page="editForm.settlementType"
:title="formTitle" :contract-type-page="editForm.contractType" :account-type-page="editForm.bankAccountType" :edit-form="editForm"
:current-page="custType" :form-rules="formRules" :form-list="formList" @handleConfirm="handleConfirm" @handleDraft="handleDraft"
:settlement-page="editForm.settlementType"
:contract-type-page="editForm.contractType"
:account-type-page="editForm.bankAccountType"
:edit-form="editForm"
:form-rules="formRules"
:form-list="formList"
@handleConfirm="handleConfirm"
@handleDraft="handleDraft"
@handleCancel="handleCancel"> @handleCancel="handleCancel">
<span style="display: inline-block; color: red; margin: 10px 54px" <span style="display: inline-block; color: red; margin: 10px 54px" slot="failMessage">{{ failMessage }}</span>
slot="failMessage">{{ failMessage }}</span> <span slot="custType" slot-scope="scope">
<span slot="custType" <el-radio-group size="mini" v-model="custType" @change="scope.scope.handleRadioChange">
slot-scope="scope"> <el-radio v-for="(subItem, subIdx) in scope.scope.radioOptList" :key="subIdx" :label="subItem.value">{{
<el-radio-group size="mini"
v-model="custType"
@change="scope.scope.handleRadioChange">
<el-radio v-for="(subItem, subIdx) in scope.scope.radioOptList"
:key="subIdx"
:label="subItem.value">{{
subItem.label }}</el-radio> subItem.label }}</el-radio>
</el-radio-group> </el-radio-group>
</span> </span>
<div slot="businessLicense" <div slot="businessLicense" slot-scope="scope" class="flex">
slot-scope="scope" <gl-upload-img :id="scope.scope.slotName" :form-obj="scope.scope" :pic-obj="picObj" txt-descript="营业执照"
class="flex"> @handleImgChange="handleImgChange" @handleImgRemove="handleImgRemove" />
<gl-upload-img :id="scope.scope.slotName"
:form-obj="scope.scope"
:pic-obj="picObj"
txt-descript="营业执照"
@handleImgChange="handleImgChange"
@handleImgRemove="handleImgRemove" />
<span class="img-explain">营业执照必须清晰可见,图片大小在2MB以内,支持jpg/png格式。</span> <span class="img-explain">营业执照必须清晰可见,图片大小在2MB以内,支持jpg/png格式。</span>
</div> </div>
<span slot="provincesAndCities"> <span slot="provincesAndCities">
<el-cascader v-model="editForm.provincesAndCities" <el-cascader v-model="editForm.provincesAndCities" size="mini" ref="cascader" placeholder="请选择 省/市/区"
size="mini" style="width: 350px" :options="provincesAndCities_options"
ref="cascader"
placeholder="请选择 省/市/区"
style="width: 350px"
:options="provincesAndCities_options"
:props="{ label: 'name', value: 'code', children: 'childrenList' }" /> :props="{ label: 'name', value: 'code', children: 'childrenList' }" />
</span> </span>
<span slot="companyAddr"> <span slot="companyAddr">
<el-input v-model="editForm.companyAddr" <el-input v-model="editForm.companyAddr" type="textarea" placeholder="请输入企业地址" style="width: 350px" :rows="3"
type="textarea" maxlength="100" size="mini" show-word-limit />
placeholder="请输入企业地址"
style="width: 350px"
:rows="3"
maxlength="100"
size="mini"
show-word-limit />
</span> </span>
<div slot="idCard" <div slot="idCard" slot-scope="scope" class="idImg">
slot-scope="scope"
class="idImg">
<div class="idItem"> <div class="idItem">
<gl-upload-img :id="scope.scope.slotName" <gl-upload-img :id="scope.scope.slotName" :form-obj="scope.scope" :pic-obj="picObj" txt-descript="法人身份证正面照"
:form-obj="scope.scope" @handleImgChange="handleImgChange" @handleImgRemove="handleImgRemove" />
:pic-obj="picObj" <gl-upload-img :id="scope.scope.otherName" :form-obj="scope.scope" attr-name="otherName" :pic-obj="picObj"
txt-descript="法人身份证正面照" txt-descript="法人身份证反面照" :show="editForm.legalCertType == '00'" @handleImgChange="handleImgChange"
@handleImgChange="handleImgChange"
@handleImgRemove="handleImgRemove" />
<gl-upload-img :id="scope.scope.otherName"
:form-obj="scope.scope"
attr-name="otherName"
:pic-obj="picObj"
txt-descript="法人身份证反面照"
:show="editForm.legalCertType == '00'"
@handleImgChange="handleImgChange"
@handleImgRemove="handleImgRemove" /> @handleImgRemove="handleImgRemove" />
</div> </div>
<span class="img-explain">身份证照片必须清晰可见,图片大小在2M以内,支持jpg\png格式。</span> <span class="img-explain">身份证照片必须清晰可见,图片大小在2M以内,支持jpg\png格式。</span>
</div> </div>
<div slot="clientAgreement" <div slot="clientAgreement" slot-scope="scope" class="uploadfileDiv">
slot-scope="scope" <el-upload action="" accept=".xlsx,.xls,.doc,.pdf,.docx,.jpg,.png" class="upload-file" :show-file-list="false"
class="uploadfileDiv"> :file-list="uploadFileList" :limit="1" :auto-upload="false" :on-remove="importFileChange" :on-change="(file, fileList) => handleFileChange(file, fileList, scope.scope)
<el-upload action="" " :on-exceed="hanldeOnExceed" multiple>
accept=".xlsx,.xls,.doc,.pdf,.docx,.jpg,.png"
class="upload-file"
:show-file-list="false"
:file-list="uploadFileList"
:limit="5"
:auto-upload="false"
:on-remove="importFileChange"
:on-change="(file, fileList) => handleFileChange(file, fileList, scope.scope)
"
:on-exceed="hanldeOnExceed"
multiple>
<div class="upload-txt">+ 上传文件</div> <div class="upload-txt">+ 上传文件</div>
</el-upload> </el-upload>
<!-- 文件列表区域 --> <!-- 文件列表区域 -->
<div class="file-box"> <div class="file-box">
<div v-for="(subItem, subIndex) in editForm.clientAgreement" <div v-for="(subItem, subIndex) in editForm.clientAgreement" :key="subIndex">
:key="subIndex"> <div class="file-item" v-if="!filterEmpty(subItem.uploadProgress) || subItem.fileUrl">
<div class="file-item" <div class="file-content" @click="handleFileView(subItem)">
v-if="!filterEmpty(subItem.uploadProgress) || subItem.fileUrl"> <el-progress define-back-color="#F5F7FA" :text-inside="true" text-color="#333333" :show-text="false"
<div class="file-content" :stroke-width="26" stroke-linecap="butt" :percentage="subItem.uploadProgress"></el-progress>
@click="handleFileView(subItem)">
<el-progress define-back-color="#F5F7FA"
:text-inside="true"
text-color="#333333"
:show-text="false"
:stroke-width="26"
stroke-linecap="butt"
:percentage="subItem.uploadProgress"></el-progress>
<div class="file-name">{{ subItem.fileName }}</div> <div class="file-name">{{ subItem.fileName }}</div>
</div> </div>
<i v-if="!subItem.fileUrl" <i v-if="!subItem.fileUrl" class="el-icon-close del-icon" @click="doCancel(scope.scope, subIndex)"></i>
class="el-icon-close del-icon" <i v-if="subItem.fileUrl" class="el-icon-delete" @click="handleFileDelete(scope.scope, subIndex)"></i>
@click="doCancel(scope.scope, subIndex)"></i>
<i v-if="subItem.fileUrl"
class="el-icon-delete"
@click="handleFileDelete(scope.scope, subIndex)"></i>
</div> </div>
</div> </div>
</div> </div>
<div class="upload-tips"> <div class="upload-tips">
大小在2M以内,支持jpg、png、pdf格式,最多不能超过5份文件。 大小在2M以内,支持jpg、png、pdf格式,最多不能超过1份文件。
</div> </div>
</div> </div>
<!-- smsCode --> <!-- smsCode -->
<div slot="smsCode" <div slot="smsCode" slot-scope="scope">
slot-scope="scope"> <el-input v-model="editForm[scope.scope.name]" size="mini" placeholder="请输入验证码"
<el-input v-model="editForm[scope.scope.name]"
size="mini"
placeholder="请输入验证码"
style="width: 200px; margin-right: 10px" /> style="width: 200px; margin-right: 10px" />
<el-button size="mini" <el-button size="mini" @click="handleSend" :disabled="isSend || editForm.operPhone.length !== 11">
@click="handleSend"
:disabled="isSend || editForm.operPhone.length !== 11">
{{ isSend ? sendMsg + "秒后,重试" : "获取验证码" }} {{ isSend ? sendMsg + "秒后,重试" : "获取验证码" }}
</el-button> </el-button>
</div> </div>
</edit-form> </edit-form>
<el-dialog :visible.sync="lookImgVisible"> <el-dialog :visible.sync="lookImgVisible">
<img width="100%" <img width="100%" :src="lookUrl" alt="图片" />
:src="lookUrl"
alt="图片" />
</el-dialog> </el-dialog>
</div> </div>
</template> </template>
...@@ -168,7 +97,7 @@ import { ...@@ -168,7 +97,7 @@ import {
import { baseConfig } from "@/main" import { baseConfig } from "@/main"
import GlOssApi from "glsk-oss-jssdk" import GlOssApi from "glsk-oss-jssdk"
export default { export default {
name: "ApplyAccount", name: "ApplyAccountTonglian",
data() { data() {
var checkPhoneObj = { var checkPhoneObj = {
required: true, required: true,
...@@ -1464,7 +1393,7 @@ export default { ...@@ -1464,7 +1393,7 @@ export default {
hanldeOnExceed(files, fileList) { hanldeOnExceed(files, fileList) {
this.$message({ this.$message({
message: "最多可上传5个文件", message: "最多可上传1个文件",
type: "error" type: "error"
}) })
}, },
...@@ -1522,7 +1451,7 @@ export default { ...@@ -1522,7 +1451,7 @@ export default {
/* margin-bottom: 20px; */ /* margin-bottom: 20px; */
} }
.idItem + .idItem { .idItem+.idItem {
margin-top: 20px; margin-top: 20px;
} }
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!