源文件

This commit is contained in:
gyq
2024-05-23 14:39:33 +08:00
commit a1128dd791
2997 changed files with 500069 additions and 0 deletions

View File

@@ -0,0 +1,439 @@
<template>
<view class="page">
<view class="box">
<!-- 商户类型 渠道信息 进件信息 -->
<!-- 微信小程序不能用动态组件 -->
<shengpay
:ref="refHandle"
@applyHandle="applyHandle"
v-if="showRef('shengpay')"
/>
<alipay
:ref="refHandle"
@applyHandle="applyHandle"
v-if="showRef('alipay')"
/>
<wxpay
:ref="refHandle"
@applyHandle="applyHandle"
v-if="showRef('wxpay')"
/>
<zftpay
:ref="refHandle"
@applyHandle="applyHandle"
v-if="showRef('zftpay')"
/>
<sftpay
:ref="refHandle"
@applyHandle="applyHandle"
v-if="showRef('sftpay')"
/>
<lklpay
:ref="refHandle"
@applyHandle="applyHandle"
v-if="showRef('lklpay')"
/>
<ysfpay
:ref="refHandle"
@applyHandle="applyHandle"
v-if="showRef('ysfpay')"
/>
<dgpay
:ref="refHandle"
@applyHandle="applyHandle"
v-if="showRef('dgpay')"
/>
<yspay
:ref="refHandle"
@applyHandle="applyHandle"
v-if="showRef('yspay')"
/>
<utmpay
:ref="refHandle"
@applyHandle="applyHandle"
v-if="showRef('utmpay')"
/>
<fuioupay
:ref="refHandle"
@applyHandle="applyHandle"
v-if="showRef('fuioupay')"
/>
<lklspay
:ref="refHandle"
@applyHandle="applyHandle"
v-if="showRef('lklspay')"
/>
<view class="notes" v-if="['0', '3', '8'].includes(channelInfo.state)">
<image
src="@/static/img/exclamation.svg"
style="height: 22rpx; width: 22rpx"
></image>
<text>请确保信息的真实性和准确性否则将影响通道申请成功率</text>
</view>
<!-- 错误信息 -->
<view class="result-fail" v-if="channelInfo.state == 3 && applyErrorInfo">
<text style="width: 83%">驳回原因{{ applyErrorInfo }} </text>
<image src="@/static/img/passerror.svg"></image>
</view>
<view class="result-wait" v-if="channelInfo.state == 1">
<text style="width: 83%">信息审核中请耐心等待</text>
<image src="@/static/img/passwait.svg"></image>
</view>
<!-- channelInfo.state -->
<view class="result-success" v-if="channelInfo.state == 2">
<text style="width: 83%">恭喜你通道已开通</text>
<image src="@/static/img/passok.svg"></image>
</view>
<!-- 状态: 0-未发起 1-审核中 2-进件成功 3-驳回待修改 4-待验证 5-待签约
状态为 1,2,4,5 开启disable (也就是状态不为 0 3) -->
<template v-if="['0', '3', '8'].includes(channelInfo.state)">
<view class="btn-area">
<view @click.stop="read" class="read">智能读取</view>
<view @click.stop="draft" style="margin-left: 30rpx" class="read">保存草稿</view>
</view>
<button @click.stop="submit(false)" class="submit">提交</button>
</template>
</view>
</view>
</template>
<script setup>
import { ref, reactive, onMounted, toRaw, provide, nextTick } from "vue";
import shengpay from "./channel/shengft/shengft.vue"; // 盛付通
import alipay from "./channel/zfbpay.vue"; // 支付宝官方
import wxpay from "./channel/wxpay.vue"; // 微信官方
import zftpay from "./channel/zftpay.vue"; // 支付宝直付通
import sftpay from "./channel/sftpay.vue"; // 微信收付通
import lklpay from "./channel/lklpay.vue"; // 拉卡拉
import ysfpay from "./channel/ysfpay.vue"; // 云闪付
import fuioupay from "./channel/fuiou/fuioupay.vue"; // 富友
import dgpay from "./channel/dgpay/dgpay.vue"; // 斗拱
import utmpay from "./channel/utmpay/utmpay.vue"; // 银联前置
import yspay from "./channel/yspay/yspay.vue"; // 银盛
import lklspay from "./channel/lklspay/lklspay.vue"; // lklsass
import { onLoad, onShow } from "@dcloudio/uni-app";
import {
$mchApplymentsInfo,
$mergeApplyDetailInfos,
$mchApplyments,
$updateApply,
} from "@/http/apiManager.js";
import { debounce } from "@/util/tool.js";
import rules from "./components/rules.js"; //引入表单校验规则
import graceChecker from "@/util/graceChecker.js"; //引入表单校验工具函数
// 进件渠道信息,包含 支付接口代码 名称 状态 进件ID
const channelInfo = reactive({});
const vdata = reactive({
channelRef: "",
});
// 动态ref
const refHandle = (el) => {
if (el) vdata.channelRef = el;
};
// 动态展示隐藏
const showRef = (code) => code === channelInfo.code;
onLoad((option) => {
for (let key in option) {
if (option[key] === "undefined") {
option[key] = undefined;
continue;
}
if (key == "codeUrl") {
channelInfo.codeUrl = decodeURIComponent(option.codeUrl);
continue;
}
channelInfo[key] = option[key];
}
});
provide("channelInfo", channelInfo);
onMounted(() => {
if (channelInfo.applyId) mchApplyInfoHandle(); // 调用查询进件信息函数只有进件完之后才有该ID
});
// 查询进件信息
let mchApplyInfo = ref({}); // 进件信息
let applyErrorInfo = ref(false); // 错误信息
const mchApplyInfoHandle = () => {
let originData = ""; // 进件资料回显 是否查询原始数据 状态1原始 状态0不填加密数据
if (["0", "3", "8"].includes(channelInfo.state)) originData = 1;
$mchApplymentsInfo(channelInfo.applyId, originData).then(({ bizData }) => {
// 错误信息
if (bizData) {
bizData.applyErrorInfo
? (applyErrorInfo.value = bizData.applyErrorInfo)
: (applyErrorInfo.value = false);
// 获取进件信息对象后,为子页码赋值
assignment(JSON.parse(bizData.applyDetailInfo));
}
});
};
// 智能读取按钮
const read = () => {
uni.showLoading({ title: "读取中", icon: "none" });
$mergeApplyDetailInfos(channelInfo.mchNo)
.then((res) => {
uni.hideLoading();
// 非空校验,然后剔除为空属性, 再将读取到的信息放到子组件进行合并
if (res.bizData && Object.keys(res.bizData).length !== 0) {
let obj = {};
for (let item in res.bizData) {
if (res.bizData[item]) obj[item] = res.bizData[item];
}
assignment(obj);
uni.showToast({ title: "读取成功", icon: "none" });
} else {
uni.showToast({ title: "读取信息为空", icon: "none" });
}
})
.catch((err) => {});
};
// 保存草稿 (接口一致传参为true)
const draft = () => submit(true);
// 为子页面赋值通过code值来判断为谁赋值
const assignment = (obj) => {
vdata.channelRef.assignObj(obj);
};
// 发起按钮
const isLoad = ref(false);
let timer; // 定时器
const submit = (isTempData) => {
if (timer) clearTimeout(timer);
timer = setTimeout(() => {
timer = null;
vdata.channelRef.launchApply(isTempData);
}, 500);
};
// 受益人前置校验函数
const ownerCheck = (index, val) => {
let errText = "";
switch (val) {
case "idcard1Img":
errText = `请上传第${index + 1}项受益人身份证人像面照`;
break;
1;
case "idcardNo":
errText = `请输入第${index + 1}项受益人身份证号`;
break;
case "idcardName":
errText = `请输入第${index + 1}项受益人身份证名称`;
break;
case "idcardAddress":
errText = `请输入第${index + 1}项受益人身份证地址`;
break;
case "idcard2Img":
errText = `请上传第${index + 1}项受益人身份证国徽面照`;
break;
case "idcardEffectEnd":
errText = `请选择第${index + 1}项受益人身份证起始有效期`;
break;
case "idcardEffectBegin":
errText = `请选择第${index + 1}项受益人身份证结束有效期`;
}
uni.showToast({ title: errText, icon: "none" });
};
// 最终版,发起进件
const applyHandle = (objData, ownerFlag = false) => {
const { name, isTempData, applyDetailInfo } = objData;
// 从reactive中拿回被代理的对象 (商户进件详细消息)
const rowApplyDetailInfo = toRaw(applyDetailInfo);
// 每次进来都要重置一次进件规则 需要深拷贝,因为下方会动态添加很多东西
let check = JSON.parse(JSON.stringify(rules[name + "Rule"]));
// 添加额外的进件规则
objData.formCheck ? rules[name + "Fun"](check, ...objData.formCheck) : null;
let checkRes = graceChecker.check(rowApplyDetailInfo, check);
if (!checkRes && !isTempData)
return uni.showToast({ title: graceChecker.error, icon: "none" });
// 受益人校验,比较特殊,放在最后手动校验
if (
ownerFlag &&
!isTempData &&
applyDetailInfo.companyBeneficiaryList.length > 0
) {
let ownerList = applyDetailInfo.companyBeneficiaryList;
for (let ownerIndex = 0; ownerIndex < ownerList.length; ownerIndex++) {
for (let key in ownerList[ownerIndex]) {
if (!ownerList[ownerIndex][key]) return ownerCheck(ownerIndex, key);
}
}
}
// 传参对象
let params = {
ifCode: channelInfo.code, // 支付接口代码
productType: applyDetailInfo.productType, //产品类型
address: applyDetailInfo.address,
contactName: applyDetailInfo.contactName,
mchFullName: applyDetailInfo.mchFullName || applyDetailInfo.mchShortName,
areaCode: applyDetailInfo.areaCode ? applyDetailInfo.areaCode[2] : "", // 只要区县码即可
contactPhone: applyDetailInfo.contactPhone,
applyDetailInfo: JSON.stringify(rowApplyDetailInfo),
mchNo: channelInfo.mchNo,
};
let applyId;
channelInfo.applyId ? (applyId = channelInfo.applyId) : (applyId = undefined);
if (applyId) params.applyId = applyId; // 有就传
if (isTempData && channelInfo.applyId) {
uni.showLoading({ title: "保存中...", icon: "none" }); // 开启loading
params.isTempData = true;
// 保存草稿调用update方法进行提交
$updateApply(params.applyId, params)
.then((res) => {
uni.hideLoading();
uni.showToast({ title: "保存成功", icon: "none" });
if (channelInfo.applyId) {
uni.navigateBack();
} else {
uni.navigateBack({ delta: 2 });
}
})
.catch((err) => {});
return;
}
if (isTempData) params.isTempData = true;
uni.showLoading({
title: isTempData ? "保存中..." : "发送中...",
icon: "none",
});
// 存在applyid情况下的发起进件也走更新接口
if (channelInfo.applyId) {
$updateApply(params.applyId, params)
.then((res) => {
uni.hideLoading();
uni.showToast({ title: "发送成功", icon: "none" });
if (channelInfo.applyId) {
uni.navigateBack();
} else {
uni.navigateBack({ delta: 2 });
}
})
.catch((err) => {});
return;
}
// 发起进件函数
$mchApplyments(params)
.then((res) => {
uni.hideLoading();
uni.showToast({
title: isTempData ? "保存成功" : "发送成功",
icon: "none",
});
if (channelInfo.applyId) {
uni.navigateBack();
} else {
uni.navigateBack({ delta: 2 });
}
})
.catch((err) => {});
};
</script>
<style lang="scss" scoped>
@import "./static/information.scss";
.page {
padding: 30rpx;
box-sizing: border-box;
padding-bottom: 150rpx;
background-color: #f5f6fd;
min-height: calc(100vh - 0px);
}
.box {
border-radius: 10px;
overflow: hidden;
padding-bottom: 10px;
background-color: #fff;
}
.mch-title {
font-weight: bold;
font-size: 28rpx;
color: #3981ff;
}
.mch-type {
display: flex;
align-items: center;
image {
margin-left: 10px;
height: 20rpx;
width: 20rpx;
}
}
.btn-area {
position: relative;
z-index: 20;
box-sizing: border-box;
width: 100%;
background: #fff;
// background: linear-gradient(transparent,#fff 85%);
padding: 10rpx 30rpx 30rpx;
display: flex;
position: fixed;
bottom: 1rpx;
left: 0;
justify-content: space-between;
.read {
display: flex;
justify-content: center;
align-items: center;
flex-grow: 1;
height: 90rpx;
border: 1rpx solid #c5c7cc;
border-radius: 10rpx;
background: #fff;
font-weight: 500;
font-size: 30rpx;
letter-spacing: 0.07em;
color: #808080;
}
}
.submit {
display: flex;
justify-content: center;
margin: 0 auto;
margin-bottom: 150rpx;
width: 380rpx;
height: 90rpx;
line-height: 90rpx;
border-radius: 10rpx;
background: #3981ff;
font-weight: 500;
font-size: 30rpx;
color: #fff;
}
</style>

View File

@@ -0,0 +1,115 @@
<template>
<view class="page">
<!-- 注意 App 网页向应用 postMessage 为实时消息 -->
<web-view v-if="vdata.url" :src="vdata.url" @message="onMessageFunc"></web-view>
</view>
</template>
<script setup>
import { ref, reactive, onMounted, toRaw, provide, nextTick } from "vue"
import { onLoad, onShow } from "@dcloudio/uni-app"
import appConfig from "@/config/appConfig.js"
import storageManage from "@/util/storageManage.js"
const vdata = reactive({
url: null,
})
onLoad((option) => {
let jeepayToken = storageManage.token()
let uploadImgSize = storageManage.uploadImgSize() || ''
let isView = false // 是否预览模式
let baseUrl = `${appConfig.env.JEEPAY_BASE_URL}`
vdata.url = `${baseUrl}/h5MchApplymentOption?configPage=${option.configPage}&jeepayToken=${jeepayToken}&applyId=${option.applyId}&uploadImgSize=${uploadImgSize}`
})
// App 网页向应用 postMessage 为实时消息
// 接收到 web-view事件 ,
// 注意:放置数据, 必须在data字段下 比如: uni.postMessage({data: {ctrl: 'TOTOTOTOTOT'}})
function onMessageFunc(msg) {
// 接收到响应的数据 [数组格式, 比如接收到 web-view的返回等特定事件 将数据入栈全部返回 ]
let postDataArray = msg.detail.data
// 无数据
if (!postDataArray || !Array.isArray(postDataArray)) {
return false
}
}
</script>
<style lang="scss" scoped>
@import "./static/information.scss";
.page {
padding: 30rpx;
box-sizing: border-box;
padding-bottom: 150rpx;
background-color: #f5f6fd;
min-height: calc(100vh - 0px);
}
.box {
border-radius: 10px;
overflow: hidden;
padding-bottom: 10px;
background-color: #fff;
}
.mch-title {
font-weight: bold;
font-size: 28rpx;
color: #3981ff;
}
.mch-type {
display: flex;
align-items: center;
image {
margin-left: 10px;
height: 20rpx;
width: 20rpx;
}
}
.btn-area {
position: relative;
z-index: 20;
box-sizing: border-box;
width: 100%;
background: #fff;
// background: linear-gradient(transparent,#fff 85%);
padding: 10rpx 30rpx 30rpx;
display: flex;
position: fixed;
bottom: 1rpx;
left: 0;
justify-content: space-between;
.read {
display: flex;
justify-content: center;
align-items: center;
flex-grow: 1;
height: 90rpx;
border: 1rpx solid #c5c7cc;
border-radius: 10rpx;
background: #fff;
font-weight: 500;
font-size: 30rpx;
letter-spacing: 0.07em;
color: #808080;
}
}
.submit {
display: flex;
justify-content: center;
margin: 0 auto;
margin-bottom: 150rpx;
width: 380rpx;
height: 90rpx;
line-height: 90rpx;
border-radius: 10rpx;
background: #3981ff;
font-weight: 500;
font-size: 30rpx;
color: #fff;
}
</style>

View File

@@ -0,0 +1,152 @@
<template>
<view class="page">
<!-- 注意 App 网页向应用 postMessage 为实时消息 -->
<web-view v-if="vdata.url" :src="vdata.url" @message="onMessageFunc"></web-view>
</view>
</template>
<script setup>
import { ref, reactive, onMounted, toRaw, provide, nextTick } from 'vue'
import { onLoad, onShow } from '@dcloudio/uni-app'
import appConfig from '@/config/appConfig.js'
import storageManage from '@/util/storageManage.js'
const vdata = reactive({
url: null,
isAdd: false, // 是否新增, 新增将返回两个页面, 修改返回一个。
})
onLoad((option) => {
let jeepayToken = storageManage.token()
let isView = option.isView == 1 ? true : false // 是否预览模式
let baseUrl = `${appConfig.env.JEEPAY_BASE_URL}`
let uploadImgSize = storageManage.uploadImgSize() || ''
let autoConfigMchAppId = option.autoConfigMchAppId || ''
let isvNo = option.isvNo || ''
let url = ''
console.log(option,'optionoptionoptionoption');
// 包含 记录ID
if (!option.applyId) {
// url = `${baseUrl}/h5MchApplyment?isView=${isView ? 1 : 0}&jeepayToken=${jeepayToken}&applyId=${option.applyId}&uploadImgSize=${uploadImgSize}&autoConfigMchAppId=${autoConfigMchAppId}&isvNo=${isvNo}`
url = `${baseUrl}/h5MchApplyment?isView=${isView ? 1 : 0}&jeepayToken=${jeepayToken}&mchNo=${option.mchNo}&ifCode=${option.ifCode}&autoConfigMchAppId=${autoConfigMchAppId}&isvNo=${isvNo}&range=${option.range}`
console.log('url', url)
} else {
vdata.isAdd = true
console.log(222222);
if(!option.copyInfoSourceApplyId){
option.copyInfoSourceApplyId=''
}
// $mchApplymentsInfo
// url = `${baseUrl}/h5MchApplyment?isView=${isView ? 1 : 0}&jeepayToken=${jeepayToken}&mchNo=${option.mchNo}&ifCode=${option.ifCode}&copyInfoSourceApplyId=${option.copyInfoSourceApplyId}&uploadImgSize=${uploadImgSize}&autoConfigMchAppId=${autoConfigMchAppId}&isvNo=${isvNo}`
url = `${baseUrl}/h5MchApplyment?isView=${isView ? 1 : 0}&jeepayToken=${jeepayToken}&mchNo=${option.mchNo}&ifCode=${option.ifCode}&copyInfoSourceApplyId=${option.copyInfoSourceApplyId}&applyId=${option.applyId}&isvNo=${isvNo}&range=${option.range}`
}
console.log(url);
vdata.url = url
})
// App 网页向应用 postMessage 为实时消息
// 接收到 web-view事件 ,
// 注意:放置数据, 必须在data字段下 比如: uni.postMessage({data: {ctrl: 'TOTOTOTOTOT'}})
function onMessageFunc(msg) {
// 接收到响应的数据 [数组格式, 比如接收到 web-view的返回等特定事件 将数据入栈全部返回 ]
let postDataArray = msg.detail.data
// 无数据
if (!postDataArray || !Array.isArray(postDataArray)) {
return false
}
for (var i = 0; i < postDataArray.length; i++) {
if (postDataArray[i].ctrl == 'toApplymentListAndRef') {
// 跳转到进件列表 && 刷新
// APP 可以实时接收到消息, 微信小程序需要在返回事件时再接收到消息。
// #ifdef APP-PLUS
vdata.isAdd ? uni.navigateBack({ delta: 2 }) : uni.navigateBack()
// #endif
// #ifdef MP-WEIXIN
vdata.isAdd ? uni.navigateBack() : null
// #endif
break
}
}
}
</script>
<style lang="scss" scoped>
@import './static/information.scss';
.page {
padding: 30rpx;
box-sizing: border-box;
padding-bottom: 150rpx;
background-color: #f5f6fd;
min-height: calc(100vh - 0px);
}
.box {
border-radius: 10px;
overflow: hidden;
padding-bottom: 10px;
background-color: #fff;
}
.mch-title {
font-weight: bold;
font-size: 28rpx;
color: #3981ff;
}
.mch-type {
display: flex;
align-items: center;
image {
margin-left: 10px;
height: 20rpx;
width: 20rpx;
}
}
.btn-area {
position: relative;
z-index: 20;
box-sizing: border-box;
width: 100%;
background: #fff;
// background: linear-gradient(transparent,#fff 85%);
padding: 10rpx 30rpx 30rpx;
display: flex;
position: fixed;
bottom: 1rpx;
left: 0;
justify-content: space-between;
.read {
display: flex;
justify-content: center;
align-items: center;
flex-grow: 1;
height: 90rpx;
border: 1rpx solid #c5c7cc;
border-radius: 10rpx;
background: #fff;
font-weight: 500;
font-size: 30rpx;
letter-spacing: 0.07em;
color: #808080;
}
}
.submit {
display: flex;
justify-content: center;
margin: 0 auto;
margin-bottom: 150rpx;
width: 380rpx;
height: 90rpx;
line-height: 90rpx;
border-radius: 10rpx;
background: #3981ff;
font-weight: 500;
font-size: 30rpx;
color: #fff;
}
</style>

View File

@@ -0,0 +1,156 @@
<template>
<view class="page-wrapper global-wrapper bgF2">
<JHeaderTitle title="进件管理" bgColor="#f2f2f2" />
<JSearchInput place="搜索用户名、用户号、进件单号" ref="searchInfo" @search="search" @resetSearch="resetSearch" />
<ApplyHeader @selected="selected" />
<block v-for="v in useDataResult.dataList" :key="v.applyId">
<ApplyCard
:ifName="v.ifName"
:icon="v.icon"
:bgColor="v.bgColor"
:createdAt="v.createdAt"
:mchFullName="v.mchFullName"
:mchNo="v.mchNo"
:applyId="v.applyId"
:state="v.state"
:applyErrorInfo="v.applyErrorInfo"
:ifCode="v.ifCode"
@click="toPage(v.ifCode, v.state, v.ifName, v.applyId, v.applyErrorInfo, v.mchNo, v.channelVar1,v.isvNo,v.autoConfigMchAppId,v.range)"
@getNewState="getNewState(v)"
/>
<view></view>
</block>
<jeepayListNull :isShow="true" :list="useDataResult.dataList.length" />
<view class="block"></view>
<view class="apply-footer ButtonBor">
<JButton pd="30rpx 30rpx 50rpx 30rpx" pdTop="0" @HandleTouch="goToApply">发起进件</JButton>
</view>
<!-- 选择支付 接口 -->
<JeepayPopupListSelect
ref="selectIncomingRef"
title='请选择场景类型'
:reqTableDataFunc="reqTableIncomingDataByIfcodeFunc"
:fields="{ key: 'range', left: 'name' }"
@confirm="confirmIncoming"
>
</JeepayPopupListSelect>
</view>
</template>
<script setup>
import { ref } from 'vue'
import { onLoad, onBackPress, onShow } from '@dcloudio/uni-app'
import { $applyList, $getMchApplymentChannelState } from '@/http/apiManager.js'
import useGetList from '@/hooks/useList.js'
import JHeaderTitle from '@/components/newComponents/JHeaderTitle/JHeaderTitle'
import JSearchInput from '@/components/newComponents/JSearchInput/JSearchInput'
import jeepayListNull from '@/components/jeepayListNull/jeepayListNull.vue'
import JeepayPopupListSelect from '@/components/JeepayPopupConfirm/JeepayPopupListSelect.vue'
import JButton from '@/components/newComponents/JButton/JButton'
import ApplyHeader from './components/ApplyHeader.vue'
import ApplyCard from './components/ApplyCard.vue'
const { useDataResult, getList } = useGetList({
requestFun: $applyList,
params: { state: '' },
})
const searchInfo = ref(null)
const params = ref({
state: '',
mch: '',
})
const selectIncomingRef = ref()
const search = (data) => {
params.value.mch = data
getList(params.value)
}
const resetSearch = (data) => {
params.value.mch = ''
getList(params.value)
}
const selected = (val) => {
params.value.state = val
getList(params.value)
}
const goToApply = () => {
console.log(selectIncomingRef,'selectIncomingRefselectIncomingRef')
selectIncomingRef.value.open()
// uni.navigateTo({
// url: './selectChannel',
// })
}
function toPage(code, state, name, applyId, src, mchNo, channelVar1,isvNo,autoConfigMchAppId,range) {
console.log(code, state, name, applyId, src, mchNo, channelVar1,isvNo,autoConfigMchAppId,range);
let isView = state == 0 || state == 3 || state == 8
uni.navigateTo({ url: `./applyDetailWeb?applyId=${applyId}&isView=${isView ? 0 : 1}&ifCode=${code}&autoConfigMchAppId=${autoConfigMchAppId}&mchNo=${mchNo}&range=${range}&isvNo=${isvNo}&applyId=${applyId}` })
}
function toH5ApplyOptionPage(applyId, configPage) {
uni.navigateTo({ url: `./applyDetailH5ApplyOption?applyId=${applyId}&configPage=${configPage}` })
}
// 获取进件最新状态
const getNewState = (val) => {
$getMchApplymentChannelState(val.applyId)
.then(({ bizData }) => {
val.state = bizData.state
uni.showToast({
title: '获取最新结果成功',
icon: 'none',
mask: true,
})
})
.catch((err) => {
uni.showToast({
title: '获取最新结果失败请稍后重试',
icon: 'none',
mask: true,
})
})
}
onBackPress(() => {
if (searchInfo.value.searchText !== '' || params.value.mch !== '') {
searchInfo.value.searchText = ''
params.value.state = ''
params.value.mch = ''
getList(params.value)
return true
} else {
return false
}
})
function confirmIncoming(selected){
if(!selected){
ak.infoBox.showToast('请选择场景类型')
return false;
}
selectIncomingRef.value.close()
uni.navigateTo({
url: './selectChannel?range='+selected.range,
})
ak.go.to('PAGES_APPLYMENT_SELECETDPAY', { range: selected.range })
}
function reqTableIncomingDataByIfcodeFunc(){
const incomingList = [
{range:0,name:"线下场景"},
{range:1,name:"线上场景"}
];
return Promise.resolve({ bizData: { records: incomingList, hasNext: false }})
}
</script>
<style lang="scss" scoped>
.page-wrapper {
.block {
height: 210rpx;
}
.apply-footer {
position: fixed;
left: 0;
right: 0;
bottom: 0;
}
}
</style>

View File

@@ -0,0 +1,278 @@
<template>
<!-- 开通业务 -->
<view class="title-center"> 开通业务 </view>
<view style="margin-bottom: 20px">
<JeePayForm text="商户类型">
{{ openService.merchantType == '1' ? '个人' : '企业' }}
</JeePayForm>
<template v-if="openService.merchantType != '1'">
<JeePayForm text="法人身份证人像面照片">
<JeepayUpLoad :imgUrl="openService.idcard1Img" @uploadSuccess="uploadSuccess($event, 'idcard1Img')" @clear="clear('idcard1Img')" />
</JeePayForm>
<JeePayForm text="法人身份证国徽面照片">
<JeepayUpLoad :imgUrl="openService.idcard2Img" @uploadSuccess="uploadSuccess($event, 'idcard2Img')" @clear="clear('idcard2Img')" />
</JeePayForm>
<JeePayForm text="营业执照照片">
<JeepayUpLoad :imgUrl="openService.licenseImg" @uploadSuccess="uploadSuccess($event, 'licenseImg')" @clear="clear('licenseImg')" />
</JeePayForm>
<JeePayForm text="门头照">
<JeepayUpLoad :imgUrl="openService.storeOuterImg" @uploadSuccess="uploadSuccess($event, 'storeOuterImg')" @clear="clear('storeOuterImg')" />
</JeePayForm>
<JeePayForm text="店内环境照">
<JeepayUpLoad :imgUrl="openService.storeInnerImg" @uploadSuccess="uploadSuccess($event, 'storeInnerImg')" @clear="clear('storeInnerImg')" />
</JeePayForm>
<JeePayForm text="收银台照">
<JeepayUpLoad :imgUrl="openService.storeCashierImg" @uploadSuccess="uploadSuccess($event, 'storeCashierImg')" @clear="clear('storeCashierImg')" />
</JeePayForm>
<JeePayForm text="开户许可证照片">
<JeepayUpLoad :imgUrl="openService.companyAccountLicenseImg" @uploadSuccess="uploadSuccess($event, 'companyAccountLicenseImg')" @clear="clear('companyAccountLicenseImg')" />
</JeePayForm>
</template>
<template v-if="openService.settAccountType == 'C'">
<JeePayForm text="结算卡正面照片">
<JeepayUpLoad :imgUrl="openService.settAccountLicenseImg" @uploadSuccess="uploadSuccess($event, 'settAccountLicenseImg')" @clear="clear('settAccountLicenseImg')" />
</JeePayForm>
<JeePayForm text="结算卡反面照片">
<JeepayUpLoad :imgUrl="openService.settBankCardBackImg" @uploadSuccess="uploadSuccess($event, 'settBankCardBackImg')" @clear="clear('settBankCardBackImg')" />
</JeePayForm>
<JeePayForm text="结算人身份证人像照片">
<JeepayUpLoad :imgUrl="openService.settAccountIdcard1Img" @uploadSuccess="uploadSuccess($event, 'settAccountIdcard1Img')" @clear="clear('settAccountIdcard1Img')" />
</JeePayForm>
<JeePayForm text="结算人身份证国徽面照片">
<JeepayUpLoad :imgUrl="openService.settAccountIdcard2Img" @uploadSuccess="uploadSuccess($event, 'settAccountIdcard2Img')" @clear="clear('settAccountIdcard2Img')" />
</JeePayForm>
</template>
<JeePayForm text="授权委托书" v-if="openService.settAccountType == 'D'">
<JeepayUpLoad :imgUrl="openService.authEnturstPic" @uploadSuccess="uploadSuccess($event, 'authEnturstPic')" @clear="clear('authEnturstPic')" />
</JeePayForm>
<JeePayForm text="商务协议" v-if="openService.settAccountType == '3'" :start="false">
<JeepayUpLoad :imgUrl="openService.bankPic" @uploadSuccess="uploadSuccess($event, 'bankPic')" @clear="clear('bankPic')" />
</JeePayForm>
<JeePayForm text="支付宝商户经营类目">
<jeeDataPicker :localdata="aliMcc" :code="openService.aliFeeMcc" @change="publicSelect($event, 'aliFeeMcc')" paramType="oneLevel" />
</JeePayForm>
</view>
<!-- 费率组件 -->
<defaultRate ref="defaultRateRef" @autoPos="autoPosHandle" />
<view class="authentication-btn" @click="onSubmitWxRealName">发起认证</view>
<!-- 商户实名认证 -->
<view class="authentication">
<view class="title">
<text>商户实名认证</text>
<view v-if="vdata.wxOpenInfo.signUrl" @click="refreshWxOpenInfo" class="btn">刷新</view>
</view>
<view>{{vdata.wxOpenInfo.state || "异常[" + vdata.wxOpenInfo.errInfo + "]"}}</view>
</view>
<view class="reject" v-if="vdata.wxOpenInfo.errInfo">
<text class="title">驳回原因</text>
<view style="color: #fd2821">{{ vdata.wxOpenInfo.errInfo }}</view>
</view>
<view class="code-box" v-if="vdata.wxOpenInfo.signUrl">
<view>商户联系人使用已绑定银行卡的微信扫下面的二维码:</view>
<image :src="tool.drawQRcode(vdata.wxOpenInfo.signUrl)" />
<view class="jeepay-tip-text">(温馨提示:自助认证不限制谁来操作认证,但建议是商户联系人进行认证,以免后期需要扫码找不到微信认证管理员)</view>
</view>
</template>
<script setup>
import JeePayForm from "@/components/applyComponents/JeePayForm.vue"; // 通用左右结构布局
import JeepayUpLoad from "@/components/JeepayUpLoad/JeepayUpLoad.vue"; // 图片上传
import { ref, reactive, inject, toRaw } from 'vue'
import { $mchApplymentsInfo, $getMchApplymentWxOpenInfo, $dgpayWxRealName, } from "@/http/apiManager.js";
import tool from "@/util/tool.js"; // 工具类函数
import jeeDataPicker from "@/components/applyComponents/dataPicker.vue"; // 通用级联选择
import wxMcc from "@/components/applyJson/jeepayMcc.json"; // 微信mcc
import defaultRate from "../../components/defaultRate.vue"; // 默认费率
/*
开通业务板块 只在进件成功后开启 state:2
*/
let vdata = reactive({
wxOpenInfo: {}, // 微信开户意愿信息
});
let openService = reactive({ // 进件信息
// aliConfList:[], // 支付宝业务
// wxConfList: [], // 微信业务
})
let defaultRateRef = ref(null); // 费率组件
const channelInfo = inject('channelInfo')
// 支付宝经营类目
const aliMcc = reactive([
{ value: '2015050700000000', text: '美食' },
{ value: '2015091000052157', text: '超市便利店' },
{ value: '2015062600004525', text: '休闲娱乐' },
{ value: '2015062600002758', text: '购物' },
{ value: '2016062900190124', text: '爱车' },
{ value: '2015063000020189', text: '生活服务' },
{ value: '2016042200000148', text: '教育培训' },
{ value: '2016062900190296', text: '医疗健康' },
{ value: '2015080600000001', text: '航旅' },
{ value: '2016062900190337', text: '专业销售/批发' },
{ value: '2016062900190371', text: '政府/社会组织' },
])
// 通用选择器回调
const publicSelect = (e, name) => {
openService[name] = e.detail.value
}
// 请求微信实名认证查询
const getWxOpenInfo = () => {
$getMchApplymentWxOpenInfo(channelInfo.applyId)
.then((res) => {
if (vdata.isRefresh) {
uni.showToast({ title: "已刷新", icon: "none" });
vdata.isRefresh = false;
}
vdata.wxOpenInfo = res.bizData;
})
};
// 刷新微信实名认证
const refreshWxOpenInfo = () => {
vdata.isRefresh = true;
getWxOpenInfo();
};
if (channelInfo.state == 2) {
// 请求非加密的进件信息
let originData = 1
$mchApplymentsInfo(channelInfo.applyId, originData)
.then(({ bizData }) => {
Object.assign(openService, JSON.parse(bizData.applyDetailInfo));
}).catch((err) => console.log(err));
// 请求微信实名认证查询
getWxOpenInfo();
}
// 上传图片成功 及OCR识别回显
const uploadSuccessOS = (res, name) => {
openService[name] = res.data;
if (res.ocrInfo && Object.keys(res.ocrInfo).length < 1) return false;
// OCR图片识别 idCard-身份证 idcard1Imgidcard2Img license-营业执照 licenseImg
if (name == "idcard1Img") {
openService.idcardName = res.ocrInfo.idcardName; // 法人身份证姓名
openService.idcardNo = res.ocrInfo.idcardNo; // 法人身份证号
}
};
// 清除图片 仅前端
const clear = (name, url) => openService[name] = ""
// 发起认证
const onSubmitWxRealName = () => {
// 有费率的进件渠道,要在发起进件之前,获取所选择的费率信息
openService.paywayFeeList = defaultRateRef.value.getList(false)
uni.showLoading({ title: "提交中..." });
$dgpayWxRealName(channelInfo.applyId, toRaw(openService)).then((res) => {
uni.hideLoading();
uni.showToast({ title: "提交成功", icon: "none" })
uni.navigateBack()
})
}
</script>
<style scoped lang="scss">
@import "../../static/information.scss";
// 微信实名认证
.authentication {
padding: 35rpx 30rpx 35rpx 30rpx;
box-sizing: border-box;
border-bottom: 1rpx solid #e8e8e8;
.title {
display: flex;
justify-content: space-between;
margin-bottom: 30rpx;
}
}
// 驳回原因
.reject {
padding: 35rpx 30rpx 35rpx 30rpx;
box-sizing: border-box;
display: flex;
flex-direction: column;
justify-content: space-between;
border-bottom: 1rpx solid #e8e8e8;
.title {
margin-right: 30rpx;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
margin-bottom: 30rpx;
}
}
// 发起认证
.authentication-btn {
display: flex;
justify-content: center;
margin: 30rpx auto;
width: 380rpx;
height: 90rpx;
line-height: 90rpx;
border-radius: 10rpx;
background: #0041c4;
font-weight: 500;
font-size: 30rpx;
color: #fff;
}
// 图片
.code-box {
box-sizing: border-box;
padding: 35rpx 30rpx 35rpx 30rpx;
display: flex;
flex-direction: column;
image {
margin: 40rpx auto;
width: 200px;
height: 200px;
}
}
.btn {
border-radius: 10rpx;
background: #3981FF;
color: #fff;
padding: 5rpx 15rpx;
}
.title-center {
padding: 30rpx;
text-align: center;
background-color: #fafbfc;
border-top: 1rpx solid #e8e8e8;
}
.business-title {
padding: 30rpx;
box-sizing: border-box;
display: flex;
justify-content: space-between;
}
.business-content {
margin: 0 30rpx 30rpx ;
border: 1rpx solid #e8e8e8;
box-sizing: border-box;
border-radius: 10rpx;
}
</style>

View File

@@ -0,0 +1,727 @@
<template>
<!-- 该页面为填写信息的组件 -->
<!-- 只读文件 -->
<readOnlyInfo
v-if="isDisable"
ref="dgpayRef"
applyName="dgpay"
:applyId="channelInfo.applyId"
/>
<view v-if="!isDisable">
<uni-collapse ref="collapse">
<uni-collapse-item title="主体信息" class="coll-title" :open="true">
<view class="content">
<JeePayForm text="商户类型">
<uni-data-checkbox
v-model="applyDetailInfo.merchantType"
:localdata="merchantTypeList"
></uni-data-checkbox>
</JeePayForm>
<template v-if="applyDetailInfo.merchantType != 1">
<JeePayForm text="营业执照图片">
<JeepayUpLoad
ocrFlag="license"
:imgUrl="applyDetailInfo.licenseImg"
@uploadSuccess="uploadSuccess($event, 'licenseImg')"
@clear="clear('licenseImg')"
/>
</JeePayForm>
<JeePayForm
text="商户简称"
v-model:value="applyDetailInfo.mchShortName"
/>
<JeePayForm
text="营业执照编号"
v-model:value="applyDetailInfo.licenseNo"
/>
<JeePayForm text="营业执照起始有效期">
<termOfValidity
:defaultDate="applyDetailInfo.licenseEffectBegin"
@publicSelect="publicSelect($event, 'licenseEffectBegin')"
:isEnd="false"
/>
</JeePayForm>
<JeePayForm text="营业执照有效期截止">
<termOfValidity
:defaultDate="applyDetailInfo.licenseEffectEnd"
@publicSelect="publicSelect($event, 'licenseEffectEnd')"
/>
</JeePayForm>
</template>
<JeePayForm
text="用户名称"
v-model:value="applyDetailInfo.mchFullName"
/>
<JeePayForm text="管理员账号" v-model:value="applyDetailInfo.loginUserName" tipText="斗拱商户登录名,用于商户平台登录。全局唯一。支持英文、数字、下划线,区分大小写" />
<template v-if="applyDetailInfo.merchantType != 1">
<JeePayForm text="法人身份证人像面照片">
<JeepayUpLoad
ocrFlag="idCard"
:imgUrl="applyDetailInfo.idcard1Img"
@uploadSuccess="uploadSuccess($event, 'idcard1Img')"
@clear="clear('idcard1Img')"
/>
</JeePayForm>
<JeePayForm text="法人身份证国徽面照片">
<JeepayUpLoad
ocrFlag="idCard"
:imgUrl="applyDetailInfo.idcard2Img"
@uploadSuccess="uploadSuccess($event, 'idcard2Img')"
@clear="clear('idcard2Img')"
/>
</JeePayForm>
<JeePayForm
text="法人身份证姓名"
v-model:value="applyDetailInfo.idcardName"
/>
<JeePayForm
text="法人身份证号"
v-model:value="applyDetailInfo.idcardNo"
/>
<JeePayForm text="法人身份证起始有效期">
<termOfValidity
:defaultDate="applyDetailInfo.idcardEffectBegin"
@publicSelect="publicSelect($event, 'idcardEffectBegin')"
:isEnd="false"
/>
</JeePayForm>
<JeePayForm text="法人身份证结束有效期">
<termOfValidity
:defaultDate="applyDetailInfo.idcardEffectEnd"
@publicSelect="publicSelect($event, 'idcardEffectEnd')"
/>
</JeePayForm>
</template>
</view>
</uni-collapse-item>
<uni-collapse-item title="经营信息" class="coll-title">
<view class="content">
<JeePayForm text="经营类目">
<jeeDataPicker
:code="codeBack.mccCode"
:localdata="mcc"
@change="publicSelect($event, 'mccCode')"
paramType="last"
/>
</JeePayForm>
<template v-if="applyDetailInfo.merchantType != 1">
<JeePayForm text="经营类型">
<uni-data-checkbox
v-model="applyDetailInfo.busiType"
:localdata="busiTypeList"
></uni-data-checkbox>
</JeePayForm>
<JeePayForm
text="小票名称"
v-model:value="applyDetailInfo.receiptName"
/>
<JeePayForm text="公司类型">
<uni-data-picker
:localdata="entArray"
@change="publicSelect($event, 'entType')"
v-slot:default="{ data }"
>{{ entText ? entText : "请选择" }}</uni-data-picker
>
</JeePayForm>
</template>
<JeePayForm
text="联系人姓名"
v-model:value="applyDetailInfo.contactName"
/>
<JeePayForm
text="联系人手机号"
v-model:value="applyDetailInfo.contactPhone"
/>
<JeePayForm
text="联系人邮箱"
v-model:value="applyDetailInfo.contactEmail"
/>
<JeePayForm text="经营省市县">
<jeeDataPicker
:code="codeBack.areaCode"
:localdata="address"
@change="publicSelect($event, 'areaCode')"
paramType="arr"
/>
</JeePayForm>
<JeePayForm text="经营地址" v-model:value="applyDetailInfo.address" />
<JeePayForm
text="客服电话"
v-model:value="applyDetailInfo.servicePhone"
/>
</view>
</uni-collapse-item>
<uni-collapse-item title="结算账户" class="coll-title">
<view class="content">
<JeePayForm text="账户类型">
<uni-data-checkbox
v-model="applyDetailInfo.settAccountType"
:localdata="settAccountTypeList"
></uni-data-checkbox>
</JeePayForm>
<JeePayForm
text="银行卡开户名"
v-model:value="applyDetailInfo.settAccountName"
/>
<template v-if="applyDetailInfo.settAccountType == 'C'">
<JeePayForm text="结算卡正面照">
<JeepayUpLoad
:imgUrl="applyDetailInfo.settAccountLicenseImg"
@uploadSuccess="uploadSuccess($event, 'settAccountLicenseImg')"
@clear="clear('settAccountLicenseImg')"
ocrFlag="bankCard"
/>
</JeePayForm>
<JeePayForm text="结算卡反面照">
<JeepayUpLoad
:imgUrl="applyDetailInfo.settBankCardBackImg"
@uploadSuccess="uploadSuccess($event, 'settBankCardBackImg')"
@clear="clear('settBankCardBackImg')"
/>
</JeePayForm>
</template>
<JeePayForm
text="银行卡号"
v-model:value="applyDetailInfo.settAccountNo"
/>
<JeePayForm text="银行卡开户地">
<jeeDataPicker
:code="codeBack.settAccountBankBranchAreaCode"
:localdata="address"
@change="publicSelect($event, 'settAccountBankBranchAreaCode')"
paramType="arr"
/>
</JeePayForm>
<template v-if="applyDetailInfo.settAccountType == 'B'">
<JeePayForm
text="银行编码"
v-model:value="applyDetailInfo.bankCode"
/>
<JeePayForm
text="联行行号"
v-model:value="applyDetailInfo.branchCode"
/>
</template>
<JeePayForm text="是否为法人信息" :start="false">
<uni-data-checkbox :localdata="[{'value':1,'text':'是'},{'value':0,'text':'否'}]" @change="publicSelect($event, 'isLegal')" />
</JeePayForm>
<JeePayForm text="结算人身份证人像面照片">
<JeepayUpLoad
ocrFlag="idCard"
:imgUrl="applyDetailInfo.settAccountIdcard1Img"
@uploadSuccess="uploadSuccess($event, 'settAccountIdcard1Img')"
@clear="clear('settAccountIdcard1Img')"
/>
</JeePayForm>
<JeePayForm text="结算人身份证国徽面照片">
<JeepayUpLoad
ocrFlag="idCard"
:imgUrl="applyDetailInfo.settAccountIdcard2Img"
@uploadSuccess="uploadSuccess($event, 'settAccountIdcard2Img')"
@clear="clear('settAccountIdcard2Img')"
/>
</JeePayForm>
<JeePayForm
text="[持卡人]人身份证号"
v-model:value="applyDetailInfo.settAccountIdcardNo"
/>
<JeePayForm text="[持卡人]身份证起始有效期">
<termOfValidity
:defaultDate="applyDetailInfo.settAccountIdcardEffectBegin"
@publicSelect="
publicSelect($event, 'settAccountIdcardEffectBegin')
"
:isEnd="false"
/>
</JeePayForm>
<JeePayForm text="[持卡人]身份证结束有效期">
<termOfValidity
:defaultDate="applyDetailInfo.settAccountIdcardEffectEnd"
@publicSelect="publicSelect($event, 'settAccountIdcardEffectEnd')"
/>
</JeePayForm>
<JeePayForm
text="[持卡人]手机号"
v-model:value="applyDetailInfo.settAccountBindPhone"
/>
</view>
</uni-collapse-item>
<uni-collapse-item
:show-animation="false"
title="材料信息"
class="coll-title"
>
<view class="content">
<!-- <JeePayForm text="业务类型" :start="false">
<uni-data-picker
:localdata="cashArray"
@change="publicSelect($event, 'cashType')"
v-slot:default="{ data }"
>{{ cashText ? cashText : "不设置" }}</uni-data-picker
>
</JeePayForm>
<JeePayForm text="手续费类型" :start="false">
<uni-data-picker
:localdata="selectFeeArray"
@change="publicSelect($event, 'selectFeeType')"
v-slot:default="{ data }"
>{{ selectFeeText ? selectFeeText : "不设置" }}</uni-data-picker
>
</JeePayForm>
<JeePayForm
text="提现手续费(固定/元)"
v-model:value="applyDetailInfo.fixAmt"
:start="false"
tipText="请输入提现手续费"
v-if="applyDetailInfo.selectFeeType == '1'"
/>
<JeePayForm
text="费率(百分比/%"
v-model:value="applyDetailInfo.feeRate"
:start="false"
v-if="applyDetailInfo.selectFeeType == '2'"
/>
<JeePayForm text="结算周期" :start="false">
<uni-data-picker
:localdata="settleCycleArray"
@change="publicSelect($event, 'settleCycle')"
v-slot:default="{ data }"
>{{
settleCycleText ? settleCycleText : "不设置"
}}</uni-data-picker
>
</JeePayForm>
<JeePayForm
text="起结金额(元)"
v-model:value="applyDetailInfo.minAmt"
:start="false"
/>
<JeePayForm
text="留存金额(元)"
v-model:value="applyDetailInfo.remainedAmt"
:start="false"
/>
-->
<template v-if="applyDetailInfo.merchantType != 1">
<JeePayForm text="门头照">
<JeepayUpLoad
:imgUrl="applyDetailInfo.storeOuterImg"
@uploadSuccess="uploadSuccess($event, 'storeOuterImg')"
@clear="clear('storeOuterImg')"
/>
</JeePayForm>
<JeePayForm text="店内环境照">
<JeepayUpLoad
:imgUrl="applyDetailInfo.storeInnerImg"
@uploadSuccess="uploadSuccess($event, 'storeInnerImg')"
@clear="clear('storeInnerImg')"
/>
</JeePayForm>
<JeePayForm text="收银台照">
<JeepayUpLoad
:imgUrl="applyDetailInfo.storeCashierImg"
@uploadSuccess="uploadSuccess($event, 'storeCashierImg')"
@clear="clear('storeCashierImg')"
:start="false"
/>
</JeePayForm>
<!-- <JeePayForm text="组织机构代码证照片">
<JeepayUpLoad
:imgUrl="applyDetailInfo.orgCodePic"
@uploadSuccess="uploadSuccess($event, 'orgCodePic')"
@clear="clear('orgCodePic')"
:start="false"
/>
</JeePayForm> -->
<JeePayForm text="开户许可证照片">
<JeepayUpLoad
:imgUrl="applyDetailInfo.companyAccountLicenseImg"
@uploadSuccess="
uploadSuccess($event, 'companyAccountLicenseImg')
"
@clear="clear('companyAccountLicenseImg')"
:start="false"
/>
</JeePayForm>
<!-- <JeePayForm text="税务登记证照片">
<JeepayUpLoad
:imgUrl="applyDetailInfo.taxRegPic"
@uploadSuccess="uploadSuccess($event, 'taxRegPic')"
@clear="clear('taxRegPic')"
:start="false"
/>
</JeePayForm> -->
</template>
<JeePayForm
text="D1结算协议图片"
v-if="applyDetailInfo.merchantType == 1"
:start="false"
>
<JeepayUpLoad
:imgUrl="applyDetailInfo.settleAgreePic"
@uploadSuccess="uploadSuccess($event, 'settleAgreePic')"
@clear="clear('settleAgreePic')"
:start="false"
/>
</JeePayForm>
<JeePayForm
text="授权委托书"
v-if="applyDetailInfo.settAccountType == 'D'"
>
<JeepayUpLoad
:imgUrl="applyDetailInfo.authEnturstPic"
@uploadSuccess="uploadSuccess($event, 'authEnturstPic')"
@clear="clear('authEnturstPic')"
:start="false"
/>
</JeePayForm>
<JeePayForm text="商务协议" v-if="applyDetailInfo.settAccountType == '3'" :start="false">
<JeepayUpLoad :imgUrl="applyDetailInfo.bankPic" @uploadSuccess="uploadSuccess($event, 'bankPic')" @clear="clear('bankPic')" :start="false"/>
</JeePayForm>
<JeePayForm text="支付宝商户经营类目">
<jeeDataPicker :code="applyDetailInfo.aliFeeMcc" :localdata="aliMcc" @change="publicSelect($event, 'aliFeeMcc')" paramType="oneLevel" />
</JeePayForm>
</view>
</uni-collapse-item>
</uni-collapse>
<!-- 费率组件 -->
<defaultRate ref="defaultRateRef" @autoPos="autoPosHandle" />
</view>
<!-- 进件完毕后的操作 -->
<dgEvent v-if="channelInfo.state == 2" />
</template>
<script setup>
import { ref, reactive, inject } from "vue";
import address from "@/components/applyJson/address.json"; // 地址
import mcc from "@/components/applyJson/jeePayMcc.json"; // 行业
import JeepayUpLoad from "@/components/JeepayUpLoad/JeepayUpLoad.vue"; // 图片上传
import readOnlyInfo from "../../components/readOnlyInfo.vue"; // 只读文件
import tool from "@/util/tool.js"; // 工具类函数
import JeePayForm from "@/components/applyComponents/JeePayForm.vue"; // 通用左右结构布局
import termOfValidity from "@/components/applyComponents/termOfValidity.vue"; // 选择证件有效期
import jeeDataPicker from "@/components/applyComponents/dataPicker.vue"; // 通用级联选择
import dgEvent from "./dgEvent.vue"; // 进件完成后的操作
import { filterDcit } from "@/hooks/dict";
import defaultRate from "../../components/defaultRate.vue"; // 默认费率
const merchantTypeList = reactive(filterDcit(["A0", "A2"])); //商户类型
const settAccountTypeList = reactive(filterDcit(["B0", "B1", "B2"])); //账户类型
const busiTypeList = reactive(filterDcit(["G0", "G1"])); // 经营类型
const agreementTypeList = reactive(filterDcit(["M0", "M1"])); // 协议类型
const channelInfo = inject('channelInfo')
const emit = defineEmits(["applyHandle"]);
let defaultRateRef = ref(null); // 费率组件
// 状态分类: 0-未发起、 1-审核中、 2-进件成功、 3-驳回待修改、 4-待验证、 5-待签约
// 当状态为 1 2 4 5 时要开启只读模式1 3 不开启
let isDisable = ref(false);
if (!["0", "3", "8"].includes(channelInfo.state)) isDisable.value = true;
// 商户进件详细信息JSON类型字符串
let applyDetailInfo = reactive({
merchantType: 3, // 商户类型 默认为3 代表企业
settAccountType: "B", // 结算账号类型 默认为B 对公
});
// 支付宝经营类目
const aliMcc = reactive([
{ value: '2015050700000000', text: '美食' },
{ value: '2015091000052157', text: '超市便利店' },
{ value: '2015062600004525', text: '休闲娱乐' },
{ value: '2015062600002758', text: '购物' },
{ value: '2016062900190124', text: '爱车' },
{ value: '2015063000020189', text: '生活服务' },
{ value: '2016042200000148', text: '教育培训' },
{ value: '2016062900190296', text: '医疗健康' },
{ value: '2015080600000001', text: '航旅' },
{ value: '2016062900190337', text: '专业销售/批发' },
{ value: '2016062900190371', text: '政府/社会组织' },
])
// 公司类型文字回显
let entText = ref("");
// 公司类型列表
const entArray = [
{ value: "1", text: "政府机构" },
{ value: "2", text: "国营企业" },
{ value: "3", text: "私营企业" },
{ value: "4", text: "外资企业" },
{ value: "5", text: "个体工商户" },
{ value: "6", text: "其它组织" },
{ value: "7", text: "事业单位" },
];
// 业务类型文字回显
let cashText = ref("");
// 业务类型列表
const cashArray = [
{ value: "", text: "不设置" },
{ value: "D0", text: "当日到账" },
{ value: "T1", text: "下个工作日到账" },
{ value: "D1", text: "下个自然日到账" },
];
// 手续费类型
let selectFeeText = ref("");
const selectFeeArray = [
{ value: "", text: "不设置" },
{ value: "1", text: "固定费用" },
{ value: "2", text: "费率设置" },
];
// 结算周期
let settleCycleText = ref("");
const settleCycleArray = [
{ value: "", text: "不设置" },
{ value: "T1", text: "下个工作日到账" },
{ value: "D1", text: "下个自然日到账" },
];
// 小微经营类型
let microBizText = ref("");
const microBizArray = [
{ value: "", text: "不设置" },
{ value: "MICRO_TYPE_STORE", text: "门店场所" },
{ value: "MICRO_TYPE_MOBILE", text: "流动经营/便民服务" },
{ value: "MICRO_TYPE_ONLINE", text: "线上商品/服务交易" },
];
// 通用选择函数
const publicSelect = (e, key) => {
// 是否为法人信息,该字段不提交
if (key === 'isLegal') {
if (e.detail.value) {
applyDetailInfo.settAccountIdcard1Img = applyDetailInfo.idcard1Img
applyDetailInfo.settAccountIdcard2Img = applyDetailInfo.idcard2Img
applyDetailInfo.settAccountIdcardNo = applyDetailInfo.idcardNo
applyDetailInfo.settAccountIdcardEffectBegin = applyDetailInfo.idcardEffectBegin
applyDetailInfo.settAccountIdcardEffectEnd = applyDetailInfo.idcardEffectEnd
applyDetailInfo.settAccountBindPhone = applyDetailInfo.contactPhone
} else {
applyDetailInfo.settAccountIdcard1Img = ''
applyDetailInfo.settAccountIdcard2Img = ''
applyDetailInfo.settAccountIdcardNo = ''
applyDetailInfo.settAccountIdcardEffectBegin = ''
applyDetailInfo.settAccountIdcardEffectEnd = ''
applyDetailInfo.settAccountBindPhone = ''
}
return
}
applyDetailInfo[key] = e.detail.value;
if (key === "merchantType") {
applyDetailInfo.merchantType = Number(e.detail.value);
} else if (key === "entType") {
applyDetailInfo.entType = e.detail.value[0].value;
entText.value = entArray.find(
(item) => item.value == e.detail.value[0].value
).text;
} else if (key === "cashType") {
applyDetailInfo.cashType = e.detail.value[0].value;
cashText.value = cashArray.find(
(item) => item.value == e.detail.value[0].value
).text;
} else if (key === "selectFeeType") {
applyDetailInfo.selectFeeType = e.detail.value[0].value;
selectFeeText.value = selectFeeArray.find(
(item) => item.value == e.detail.value[0].value
).text;
} else if (key === "settleCycle") {
applyDetailInfo.settleCycle = e.detail.value[0].value;
settleCycleText.value = settleCycleArray.find(
(item) => item.value == e.detail.value[0].value
).text;
} else if (key === "microBizType") {
applyDetailInfo.microBizType = e.detail.value[0].value;
microBizText.value = microBizArray.find(
(item) => item.value == e.detail.value[0].value
).text;
}
};
// 上传图片成功 及OCR识别回显
const uploadSuccess = (res, name) => {
applyDetailInfo[name] = res.data;
if (res.ocrInfo && Object.keys(res.ocrInfo).length < 1) return false;
// OCR图片识别 idCard-身份证 idcard1Imgidcard2Img license-营业执照 licenseImg
if (name == "idcard1Img") {
applyDetailInfo.idcardName = res.ocrInfo.idcardName; // 法人身份证姓名
applyDetailInfo.idcardNo = res.ocrInfo.idcardNo; // 法人身份证号
} else if (name == "idcard2Img") {
applyDetailInfo.idcardEffectBegin = res.ocrInfo.idcardEffectBegin; // 有效期
applyDetailInfo.idcardEffectEnd = res.ocrInfo.idcardEffectEnd; // 有效期end
} else if (name == "licenseImg") {
applyDetailInfo.licenseEffectBegin = res.ocrInfo.licenseEffectBegin; // 执照有效期
applyDetailInfo.licenseEffectEnd = res.ocrInfo.licenseEffectEnd; // 有效期end
applyDetailInfo.mchFullName = res.ocrInfo.mchFullName; // 全称
applyDetailInfo.licenseNo = res.ocrInfo.licenseNo; // 编号
applyDetailInfo.address = res.ocrInfo.address;
} else if (name == "settAccountLicenseImg") {
applyDetailInfo.settAccountNo = res.ocrInfo.settAccountNo; // 银行卡号
} else if (name == "settAccountIdcard2Img") {
applyDetailInfo.settAccountIdcardEffectBegin =
res.ocrInfo.idcardEffectBegin; // 持卡人有效期
applyDetailInfo.settAccountIdcardEffectEnd = res.ocrInfo.idcardEffectEnd; // 持卡人有效期end
} else if (name == "settAccountIdcard1Img") {
applyDetailInfo.settAccountIdcardNo = res.ocrInfo.idcardNo; // 持卡人身份证号
} else if (name == "settAccountIdcard2Img") {
applyDetailInfo.settAccountIdcardEffectBegin =
res.ocrInfo.idcardEffectBegin; // 持卡人身份证有效期
applyDetailInfo.settAccountIdcardEffectEnd = res.ocrInfo.idcardEffectEnd; // 持卡人身份证有效期end
}
};
// 清除图片 仅前端
const clear = (name, url) => (applyDetailInfo[name] = "");
// 发起进件 注意后面的formCheck参数表单校验要用
const launchApply = (isTempData) =>
emit("applyHandle", {
name: "dgpay",
isTempData,
applyDetailInfo,
formCheck: [applyDetailInfo.merchantType, applyDetailInfo.settAccountType],
});
// 只读组件信息
let dgpayRef = ref(null);
// 行业类型,地理位置回显
let codeBack = reactive({
areaCode: "", // 商户地理位置回显
mccCode: "", // 行业回显
settAccountBankBranchAreaCode: "", // 银行开户地
});
// 合并信息方法, 职能读取,和信息回显,通过此方法合并
const assignObj = (obj) => {
Object.assign(applyDetailInfo, obj);
// 行业类型,地理位置回显
codeBack.areaCode = obj.areaCode ? obj.areaCode[2] : null; // 省市区
codeBack.mccCode = obj.mccCode; // mcc
codeBack.settAccountBankBranchAreaCode = obj.settAccountBankBranchAreaCode
? obj.settAccountBankBranchAreaCode[2]
: null; // 银行开户地
// 公司类型 obj.xxx 用于只读信息页
if (obj.entType)
entText.value = ob.entText = entArray.find(
(item) => item.value == obj.entType
).text;
// 业务类型
if (obj.cashType)
cashText.value =
obj.cashText =
obj.cashText =
cashArray.find((item) =>
item.value == obj.cashType ? obj.cashType : ""
).text;
// 手续费类型
if (obj.selectFeeType)
selectFeeText.value = obj.selectFeeText = selectFeeArray.find((item) =>
item.value == obj.selectFeeType ? obj.selectFeeType : ""
).text;
// 结算周期
if (obj.settleCycle)
settleCycleText.value = obj.settleCycleText = settleCycleArray.find(
(item) => (item.value == obj.settleCycle ? obj.settleCycle : "")
).text;
// 小微经营类型
if (obj.microBizType)
microBizText.value = obj.microBizText = microBizArray.find((item) =>
item.value == obj.microBizType ? obj.microBizType : ""
).text;
// 以下用于只读信息页
if (isDisable.value) {
for (var i = 0; i < mcc.length; i++) {
// mcc码转文字
let info = mcc[i].children.find((val) => val.value == obj.mccCode);
info ? obj.mccText = info.text : ''
}
if (obj.aliFeeMcc) {
// 支付宝商户经营类目码转文字
obj.aliMccText = aliMcc.find(val => val.value == obj.aliFeeMcc).text
}
if (obj.cashType) {
obj.cashText ? obj.cashText : (obj.cashText = "不设置");
}
if (obj.selectFeeType) {
obj.selectFeeText ? obj.selectFeeText : (obj.selectFeeText = "不设置");
}
if (obj.settleCycle) {
obj.settleCycleText ? obj.settleCycleText: (obj.settleCycleText = "不设置");
}
obj.areaText = tool.addressBack(obj.areaCode, address); // 地址码转文字
obj.settAccountBankBranchAreaText = tool.addressBack(
obj.settAccountBankBranchAreaCode,
address
); // 开户银行所在地码转字
if (obj.busiType) obj.busiTypeText = (obj.busiType == 1 ? "实体" : "虚拟")
// 传值给只读组件
if (dgpayRef.value) dgpayRef.value.getApplyInof(obj);
}
};
defineExpose({ launchApply, assignObj });
</script>
<style scoped lang="scss">
@import "../../static/information.scss";
</style>

View File

@@ -0,0 +1,197 @@
<template>
<!-- 支付宝开通参数微信开通参数暂不需要 -->
<!-- <view class="business-title">
<text>支付宝开通参数</text>
<view class="btn" @click="addZfb">添加支付场景</view>
</view>
<view class="business-content zfb" v-for="(item, index) in openService.aliConfList" :key="index">
<view class="business-title">
<text>支付场景{{ index + 1 }}</text>
<view class="btn" @click="delZfb(index)">删除</view>
</view>
<JeePayForm text="支付场景" :start='false'>
<jeeDataPicker :code="openService.aliConfList[index].pay_scene" :localdata="zfbArray" paramType="oneLevel" @change="publicSelect($event, 'pay_scene', 'aliConfList', index)"/>
</JeePayForm>
<JeePayForm text="手续费率" :start='false' v-model:value="openService.aliConfList[index].fee_rate" />
<JeePayForm text="商户经营类目" :start='false'>
<jeeDataPicker :code="openService.aliConfList[index].mcc" :localdata="zfbMccArray" paramType="oneLevel" @change="publicSelect($event, 'mcc', 'aliConfList', index)"/>
</JeePayForm>
<JeePayForm text="子渠道号" :start='false' v-model:value="openService.aliConfList[index].pay_channel_id" />
<JeePayForm text="间联商户等级" :start='false'>
<jeeDataPicker :code="openService.aliConfList[index].indirect_level" :localdata="zfbLevelArray" paramType="oneLevel" @change="publicSelect($event, 'indirect_level', 'aliConfList', index)"/>
</JeePayForm>
</view>
<view class="business-title">
<text>微信开通参数</text>
<view class="btn" @click="addWx">添加支付场景</view>
</view>
<view class="business-content " v-for="(item, index) in openService.wxConfList" :key="index">
<view class="business-title">
<text>支付场景{{ index + 1 }}</text>
<view class="btn" @click="delWx(index)">删除</view>
</view>
<JeePayForm text="支付场景" :start='false'>
<jeeDataPicker :code="openService.wxConfList[index].pay_scene" :localdata="wxArray" paramType="oneLevel" @change="publicSelect($event, 'pay_scene', 'wxConfList', index)"/>
</JeePayForm>
<JeePayForm text="手续费率" :start='false' v-model:value="openService.wxConfList[index].fee_rate" />
<JeePayForm text="费率规则" :start='false'>
<jeeDataPicker :code="openService.wxConfList[index].fee_rule_id" :localdata="wxRateList[index]" paramType="oneLevel" @change="publicSelect($event, 'fee_rule_id', 'wxConfList', index)"/>
</JeePayForm>
<JeePayForm text="商户经营类目" :start='false'>
<jeeDataPicker :code="openService.wxConfList[index].mcc" :localdata="wxMcc" paramType="oneLevel" @change="publicSelect($event, 'mcc', 'wxConfList', index)"/>
</JeePayForm>
</view>
-->
</template>
<script>
// // 新增支付宝支付场景
// const addZfb = () => openService.aliConfList.push({
// pay_scene: '',
// fee_rate: '',
// mcc: '',
// pay_channel_id: '',
// indirect_level: ''
// })
// // 删除支付宝支付场景
// const delZfb = index => openService.aliConfList.splice(index, 1)
// // 微信费率规则 大数组 集合, 内容不确定根据选择的支付场景来
// const wxRateList = reactive([])
// // 新增微信支付场景
// const addWx = () => {
// openService.wxConfList.push({
// pay_scene: '',
// fee_rate: '',
// fee_rule_id: '',
// mcc: '',
// })
// wxRateList.push([])
// }
// // 删除微信支付场景
// const delWx = index => {
// openService.wxConfList.splice(index, 1)
// wxRateList.splice(index, 1)
// }
// 开通业务通用选择函数
/* const publicSelect = (e, key, list, index) => {
openService[list][index][key] = e.detail.value
// 微信费率规则,根据支付场景进行切换
if ((key == 'pay_scene') && (list == 'wxConfList')) {
wxRateList[index] = wxRateArray(e.detail.value)
console.log(e.detail.value, wxRateArray(e.detail.value))
}
} */
// // 支付宝支付场景种类
// const zfbArray = [
// { value: "1", text: "线下扫码" },
// ];
// // 支付宝mcc种类
// const zfbMccArray = [
// { value: "2015050700000000", text: "美食" },
// { value: "2015091000052157", text: "超市便利店" },
// { value: "2015062600004525", text: "休闲娱乐" },
// { value: "2015062600002758", text: "购物" },
// { value: "2016062900190124", text: "爱车" },
// { value: "2015063000020189", text: "生活服务" },
// { value: "2016042200000148", text: "教育培训" },
// { value: "2016062900190296", text: "医疗健康" },
// { value: "2015080600000001", text: "航旅" },
// { value: "2016062900190337", text: "专业销售/批发" },
// { value: "2016062900190371", text: "政府/社会组织" },
// ];
// // 支付宝连商户等级种类
// const zfbLevelArray = [
// { value: "INDIRECT_LEVEL_M1", text: "M1" },
// { value: "INDIRECT_LEVEL_M2", text: "M2" },
// { value: "INDIRECT_LEVEL_M3", text: "M3" },
// { value: "INDIRECT_LEVEL_M4", text: "M4" },
// ];
// // 微信支付场景
// const wxArray = [
// { value: "1", text: "线下反扫" },
// { value: "2", text: "线下公众号" },
// { value: "3", text: "线下小程序" },
// { value: "4", text: "线上公众号" },
// { value: "5", text: "线上小程序" },
// { value: "6", text: "缴费行业" },
// { value: "7", text: "校园餐饮" },
// { value: "8", text: "教育K12" },
// { value: "9", text: "非在线教培" },
// { value: "10", text: "非盈利费率" },
// { value: "11", text: "保险费率" },
// ];
// 文字回显函数
// let arrFindBack = (arr, e) => arr.find((item) => item.value == e.detail.value[0].value).text
/* // 微信费率规则(函数)
const wxRateArray = val => {
val = Number(val)
let arr = null
if ([4, 5].includes(val)) {
arr = [
{ value: "756", text: "企业" },
{ value: "761", text: "个体户" },
]
} else if ([1, 2, 3].includes(val)) {
arr = [
{ value: "758", text: "企业" },
{ value: "762", text: "个体户" },
{ value: "763", text: "政府事业单位" },
{ value: "766", text: "其他组织" },
{ value: "770", text: "小微商户" },
]
} else if ([6].includes(val)) {
arr = [
{ value: "760", text: "企业" },
{ value: "764", text: "政府事业单位" },
{ value: "768", text: "其他组织" },
]
} else if ([7].includes(val)) {
arr = [
{ value: "758", text: "企业" },
{ value: "762", text: "个体户" },
{ value: "766", text: "其他组织" },
{ value: "770", text: "小微商户" },
]
} else if ([8].includes(val)) {
arr = [
{ value: "759", text: "企业" },
{ value: "767", text: "其他组织" },
]
} else if ([9].includes(val)) {
arr = [
{ value: "756", text: "企业" },
]
}
return arr
} */
</script>
<style>
</style>

View File

@@ -0,0 +1,213 @@
<template>
<!-- 富有待签约
富有签约分为两部分
1. 如果状态为5 则展示签约地址 二维码 与失效时间等信息签约后在调用进件详细信息接口更新状态
2. 若状态为6 则展示图片上传列表
-->
<view class="box wx-open" v-if="(channelInfo.state == 5 || channelInfo.state == 6) && channelInfo.code == 'fuioupay'">
<template v-if="(channelInfo.state == 5) && (vdata.fuiouState != 6)">
<view class="flex" style="margin-bottom: 20rpx">
<view>协议编号</view>
<view>{{ vdata.storeSuccResParameter.contractNo }}</view>
</view>
<view class="flex" style="margin-bottom: 20rpx">
<view>过期时间</view>
<view>{{ vdata.storeSuccResParameter.expireTs }}</view>
</view>
<view class="down-img">
<image :src="vdata.contractImg" mode="aspectFit"></image>
<view style="margin-top: 30rpx">请用微信扫描二维码根据页面指引完成签约</view>
<view class="down" @click="down(vdata.contractImg)">保存至相册</view>
</view>
<view class="second-title">电子合同签约地址和二维码</view>
<view style="margin-top: 20rpx;white-space: pre-wrap; word-wrap: break-word; color: #3981ff" @click="toContract('fuioupay')">
{{ vdata.storeSuccResParameter.signUrl }}
</view>
<view class="down-img">
<view class="down" @click="fuiouhandle()">确认签署</view>
</view>
</template>
<!-- 当点击上面的确认签署后则展示图片上传列表 -->
<template v-if="(channelInfo.state == 6) || (vdata.fuiouState == 6)">
<JeePayForm text="营业执照照片" :start="false" v-if="vdata.applyDetailInfo.licenseImg">
<image :src="vdata.applyDetailInfo.licenseImg" mode="aspectFit" @click="openBackImg(vdata.applyDetailInfo.licenseImg)" class="fuiou-img" />
</JeePayForm>
<JeePayForm text="法人身份证人像面照片" :start="false" v-if="vdata.applyDetailInfo.idcard1Img">
<image :src="vdata.applyDetailInfo.idcard1Img" mode="aspectFit" @click="openBackImg(vdata.applyDetailInfo.idcard1Img)" class="fuiou-img" />
</JeePayForm>
<JeePayForm text="法人身份证国徽面照片" :start="false" v-if="vdata.applyDetailInfo.idcard2Img">
<image :src="vdata.applyDetailInfo.idcard2Img" mode="aspectFit" @click="openBackImg(vdata.applyDetailInfo.idcard2Img)" class="fuiou-img" />
</JeePayForm>
<JeePayForm text="门头照" :start="false" v-if="vdata.applyDetailInfo.storeOuterImg">
<image :src="vdata.applyDetailInfo.storeOuterImg" mode="aspectFit" @click="openBackImg(vdata.applyDetailInfo.storeOuterImg)" class="fuiou-img" />
</JeePayForm>
<JeePayForm text="店内环境照" :start="false" v-if="vdata.applyDetailInfo.storeInnerImg">
<image :src="vdata.applyDetailInfo.storeInnerImg" mode="aspectFit" @click="openBackImg(vdata.applyDetailInfo.storeInnerImg)" class="fuiou-img" />
</JeePayForm>
<JeePayForm text="结算银行卡照片" :start="false" v-if="vdata.applyDetailInfo.settAccountLicenseImg">
<image :src="vdata.applyDetailInfo.settAccountLicenseImg" mode="aspectFit" @click="openBackImg(vdata.applyDetailInfo.settAccountLicenseImg)" class="fuiou-img" />
</JeePayForm>
<JeePayForm text="开户许可证照片" :start="false" v-if="vdata.applyDetailInfo.companyAccountLicenseImg">
<image :src="vdata.applyDetailInfo.companyAccountLicenseImg" mode="aspectFit" @click="openBackImg(vdata.applyDetailInfo.companyAccountLicenseImg)" class="fuiou-img" />
</JeePayForm>
<JeePayForm text="入账账户身份证人像照" :start="false" v-if="vdata.applyDetailInfo.settAccountIdcard1Img">
<image :src="vdata.applyDetailInfo.settAccountIdcard1Img" mode="aspectFit" @click="openBackImg(vdata.applyDetailInfo.settAccountIdcard1Img)" class="fuiou-img" />
</JeePayForm>
<JeePayForm text="入账账户身份证国徽面照片" :start="false" v-if="vdata.applyDetailInfo.settAccountIdcard2Img">
<image :src="vdata.applyDetailInfo.settAccountIdcard2Img" mode="aspectFit" @click="openBackImg(vdata.applyDetailInfo.settAccountIdcard2Img)" class="fuiou-img" />
</JeePayForm>
<JeePayForm text="入账非法人证明照片" :start="false" v-if="vdata.applyDetailInfo.acntArtifImg">
<image :src="vdata.applyDetailInfo.acntArtifImg" mode="aspectFit" @click="openBackImg(vdata.applyDetailInfo.acntArtifImg)" class="fuiou-img" />
</JeePayForm>
<JeePayForm text="组织机构代码证照片" :start="false" v-if="vdata.applyDetailInfo.organizationImg">
<image :src="vdata.applyDetailInfo.organizationImg" mode="aspectFit" @click="openBackImg(vdata.applyDetailInfo.organizationImg)" class="fuiou-img" />
</JeePayForm>
<JeePayForm text="税务登记证照片" :start="false" v-if="vdata.applyDetailInfo.taxRegistrationImg">
<image :src="vdata.applyDetailInfo.taxRegistrationImg" mode="aspectFit" @click="openBackImg(vdata.applyDetailInfo.taxRegistrationImg)" class="fuiou-img" />
</JeePayForm>
<JeePayForm text="手持证件照片" :start="false" v-if="vdata.applyDetailInfo.handCertificateImg">
<image :src="vdata.applyDetailInfo.handCertificateImg" mode="aspectFit" @click="openBackImg(vdata.applyDetailInfo.handCertificateImg)" class="fuiou-img" />
</JeePayForm>
<JeePayForm text="补充资料照片" :start="false" v-if="vdata.applyDetailInfo.additionImg">
<image :src="vdata.applyDetailInfo.additionImg" mode="aspectFit" @click="openBackImg(vdata.applyDetailInfo.additionImg)" class="fuiou-img" />
</JeePayForm>
<view class="down-img">
<view class="down" @click="fuiouUpload()">提交审核</view>
</view>
</template>
</view>
</template>
<script setup>
import { ref, reactive, onMounted, inject } from 'vue'
import JeePayForm from '@/components/applyComponents/JeePayForm.vue' // 通用左右结构布局
import JeepayUpLoad from '@/components/JeepayUpLoad/JeepayUpLoad.vue' // 图片上传
import { $elecContractGenerate, $elecContractSign, $fuiouUpload } from '@/http/apiManager.js'
import qrcode from '@/util/qrcode.js'
const channelInfo = inject('channelInfo')
const vdata = reactive({
storeSuccResParameter: {}, // 富友协议信息
})
onMounted(() => {
// 调用富友签约接口,生成图片的操作,在接口返回的信息中进行
if (channelInfo.state == 5) getFuiouInfo()
})
// 富有进件专用, 用于获取签约信息
const getFuiouInfo = () => {
$elecContractGenerate(channelInfo.applyId).then(({bizData}) => {
vdata.storeSuccResParameter = JSON.parse(bizData.storeSuccResParameter)
vdata.contractImg = drawQRcode(vdata.storeSuccResParameter.signUrl) // 生成富友签约图片
})
}
// 富友确认签署
const fuiouhandle = () => {
$elecContractSign(channelInfo.applyId).then(res => {
uni.showToast({ title: '签署成功', icon: 'none'})
vdata.fuiouState = 6 // 切换富友的状态
})
}
// 富友提交审核
const fuiouUpload = () => {
$fuiouUpload(channelInfo.applyId).then(res => {
uni.showToast({ title: '审核成功', icon: 'none'})
})
}
// 跳转至电子合同页 盛付通 富友 会用到
const toContract = () => {
let uri = vdata.storeSuccResParameter.signUrl
uni.navigateTo({ url: './contract?url=' + uri })
}
// 制作图片
const drawQRcode = url => {
return qrcode.drawImg(url, {
typeNumber: 4, // 密度
errorCorrectLevel: 'Q', // 纠错等级
size: 175, // 白色边框
})
}
</script>
<style scoped lang="scss">
.flex {
display: flex;
justify-content: space-between;
}
.box {
height: auto;
transition: .3s;
position: relative;
border-radius: 20rpx;
background: #f5f6fc;
padding: 10rpx 40rpx;
box-sizing: border-box;
}
.fuiou-img {
width: 120rpx;
height: 120rpx;
overflow: hidden;
}
// 微信签约
.wx-open {
margin-top: 30rpx;
padding: 40rpx;
.first-title {
font-size: 28rpx;
color: #18191d;
font-weight: bold;
}
.tips {
font-size: 25rpx;
color: #7e7e80;
margin: 20rpx 0 40rpx;
}
.state {
margin-bottom: 30rpx;
display: flex;
justify-content: space-between;
}
.second-title {
font-size: 27rpx;
color: #000;
}
.wx-img {
width: 300rpx;
height: 300rpx;
margin: 30rpx 0 20rpx ;
}
}
</style>

View File

@@ -0,0 +1,584 @@
<template>
<!-- 该页面为填写信息的组件 -->
<!-- 只读文件 -->
<readOnlyInfo v-if="isDisable" ref="applyInfoRef" applyName="fuioupay" />
<view v-if="!isDisable">
<uni-collapse ref="collapse">
<uni-collapse-item title="基础信息" class="coll-title" :open="true">
<view class="content">
<JeePayForm text="选择商户类型">
<uni-data-checkbox
v-model="applyDetailInfo.merchantType"
:localdata="merchantTypeList"
@change="mchTypeInfo"
></uni-data-checkbox>
</JeePayForm>
<JeePayForm text="是否开通微信">
<uni-data-checkbox
v-model="applyDetailInfo.wxFlag"
:localdata="whetherList"
></uni-data-checkbox>
</JeePayForm>
<JeePayForm text="是否开通支付宝">
<uni-data-checkbox
v-model="applyDetailInfo.aliFlag"
:localdata="whetherList"
></uni-data-checkbox>
</JeePayForm>
<JeePayForm text="选择证件类型">
<radio-group
class="radio-group"
@change="publicSelect($event, 'licenseType')"
>
<label
class="radio"
v-for="(item, index) in licenseList"
:key="index"
><radio
:value="item.value"
:checked="applyDetailInfo.licenseType == item.value"
/>{{ item.name }}</label
>
</radio-group>
</JeePayForm>
<JeePayForm
text="营业执照图片"
v-if="['0', '1', 'B'].includes(applyDetailInfo.licenseType)"
>
<JeepayUpLoad
ocrFlag="license"
:imgUrl="applyDetailInfo.licenseImg"
@uploadSuccess="uploadSuccess($event, 'licenseImg')"
@clear="clear('licenseImg')"
/>
</JeePayForm>
<JeePayForm
text="商户名称全称"
v-model:value="applyDetailInfo.mchFullName"
tipText="小微商户,请命名为个体户xxx"
/>
<JeePayForm
:text="
applyDetailInfo.licenseType == 'A' ? '身份证号码' : '营业执照号'
"
v-model:value="applyDetailInfo.licenseNo"
tipText="请输入编号"
/>
<JeePayForm
v-if="['0', '1', 'B'].includes(applyDetailInfo.licenseType)"
text="营业执照注册地址"
v-model:value="applyDetailInfo.licRegisAddr"
/>
<JeePayForm text="证件有效期开始时间">
<termOfValidity
:defaultDate="applyDetailInfo.licenseEffectBegin"
@publicSelect="publicSelect($event, 'licenseEffectBegin')"
:isEnd="false"
/>
</JeePayForm>
<JeePayForm text="证件有效期截止">
<termOfValidity
:defaultDate="applyDetailInfo.licenseEffectEnd"
@publicSelect="publicSelect($event, 'licenseEffectEnd')"
/>
</JeePayForm>
<JeePayForm text="法人身份证人像面照片">
<JeepayUpLoad
ocrFlag="idCard"
:imgUrl="applyDetailInfo.idcard1Img"
@uploadSuccess="uploadSuccess($event, 'idcard1Img')"
@clear="clear('idcard1Img')"
/>
</JeePayForm>
<JeePayForm
text="法人身份证姓名"
v-model:value="applyDetailInfo.idcardName"
/>
<JeePayForm
text="法人身份证号"
v-model:value="applyDetailInfo.idcardNo"
/>
<JeePayForm text="法人身份证国徽面照片">
<JeepayUpLoad
ocrFlag="idCard"
:imgUrl="applyDetailInfo.idcard2Img"
@uploadSuccess="uploadSuccess($event, 'idcard2Img')"
@clear="clear('idcard2Img')"
/>
</JeePayForm>
<JeePayForm text="法人身份证起始有效期">
<termOfValidity
:defaultDate="applyDetailInfo.idcardEffectBegin"
@publicSelect="publicSelect($event, 'idcardEffectBegin')"
:isEnd="false"
/>
</JeePayForm>
<JeePayForm text="法人身份证结束有效期">
<termOfValidity
:defaultDate="applyDetailInfo.idcardEffectEnd"
@publicSelect="publicSelect($event, 'idcardEffectEnd')"
@endHandle="endHandle"
/>
</JeePayForm>
</view>
</uni-collapse-item>
<uni-collapse-item title="经营信息" class="coll-title">
<view class="content">
<JeePayForm text="选择行业MCC">
<jeeDataPicker
:code="codeBack.mccCode"
:localdata="mccFuiouList"
@change="publicSelect($event, 'mccCode')"
paramType="last"
/>
</JeePayForm>
<JeePayForm
text="商户简称"
v-model:value="applyDetailInfo.mchShortName"
tipText="建议和商户门头名称保持一致"
/>
<JeePayForm
text="客服电话"
v-model:value="applyDetailInfo.servicePhone"
/>
<JeePayForm text="商户经营地区县代码">
<jeeDataPicker
:code="codeBack.areaCode"
:localdata="address"
@change="publicSelect($event, 'areaCode')"
paramType="arr"
/>
</JeePayForm>
<JeePayForm
text="商户详细地址"
v-model:value="applyDetailInfo.address"
/>
<JeePayForm text="门头照">
<JeepayUpLoad
:imgUrl="applyDetailInfo.storeOuterImg"
@uploadSuccess="uploadSuccess($event, 'storeOuterImg')"
@clear="clear('storeOuterImg')"
/>
</JeePayForm>
<JeePayForm text="店内环境照">
<JeepayUpLoad
:imgUrl="applyDetailInfo.storeInnerImg"
@uploadSuccess="uploadSuccess($event, 'storeInnerImg')"
@clear="clear('storeInnerImg')"
/>
</JeePayForm>
<JeePayForm
text="商户联系人姓名"
v-model:value="applyDetailInfo.contactName"
/>
<JeePayForm
text="商户联系人身份证号"
v-model:value="applyDetailInfo.contactCertNo"
/>
<JeePayForm
text="商户联系人电话"
v-model:value="applyDetailInfo.contactPhone"
/>
<JeePayForm
text="商户联系人邮箱"
v-model:value="applyDetailInfo.contactEmail"
/>
</view>
</uni-collapse-item>
<uni-collapse-item title="结算账户" class="coll-title">
<view class="content">
<JeePayForm text="账户类型">
<uni-data-checkbox
v-model="applyDetailInfo.settAccountType"
:localdata="settlementTypeList"
></uni-data-checkbox>
</JeePayForm>
<JeePayForm
text="结算银行卡照片"
v-if="applyDetailInfo.settAccountType == 'C'"
>
<JeepayUpLoad
ocrFlag="bankCard"
:imgUrl="applyDetailInfo.settAccountLicenseImg"
@uploadSuccess="uploadSuccess($event, 'settAccountLicenseImg')"
@clear="clear('settAccountLicenseImg')"
/>
</JeePayForm>
<JeePayForm
text="开户许可证照片"
v-if="
applyDetailInfo.settAccountType == 'B' ||
applyDetailInfo.licenseType == '0' ||
applyDetailInfo.licenseType == '1'
"
>
<JeepayUpLoad
:imgUrl="applyDetailInfo.companyAccountLicenseImg"
@uploadSuccess="uploadSuccess($event, 'companyAccountLicenseImg')"
@clear="clear('companyAccountLicenseImg')"
/>
</JeePayForm>
<JeePayForm
text="开户名称"
v-model:value="applyDetailInfo.settAccountName"
/>
<JeePayForm
text="银行账号"
v-model:value="applyDetailInfo.settAccountNo"
/>
<JeePayForm text="开户行">
<jeeDataPicker
:code="codeBack.settAccountBankName"
:localdata="bankFuiou"
@change="publicSelect($event, 'settAccountBankName')"
paramType="oneLevel"
/>
</JeePayForm>
<JeePayForm
text="联行号"
v-model:value="applyDetailInfo.interBankNo"
/>
<JeePayForm
text="开户支行名称"
v-model:value="applyDetailInfo.settAccountBankBranchName"
/>
<JeePayForm text="法人入账标识">
<uni-data-checkbox
v-model="applyDetailInfo.acntArtifFlag"
:localdata="acntArtifFlagList"
></uni-data-checkbox>
</JeePayForm>
<template v-if="applyDetailInfo.acntArtifFlag == 0">
<JeePayForm text="入账账户身份证人像面照片">
<JeepayUpLoad
:imgUrl="applyDetailInfo.settAccountIdcard1Img"
@uploadSuccess="uploadSuccess($event, 'settAccountIdcard1Img')"
@clear="clear('settAccountIdcard1Img')"
/>
</JeePayForm>
<JeePayForm text="入账账户身份证国徽面照片">
<JeepayUpLoad
:imgUrl="applyDetailInfo.settAccountIdcard2Img"
@uploadSuccess="uploadSuccess($event, 'settAccountIdcard2Img')"
@clear="clear('settAccountIdcard2Img')"
ocrFlag="idCard"
/>
</JeePayForm>
<JeePayForm text="入账非法人证明照片">
<JeepayUpLoad
:imgUrl="applyDetailInfo.acntArtifImg"
@uploadSuccess="uploadSuccess($event, 'acntArtifImg')"
@clear="clear('acntArtifImg')"
/>
</JeePayForm>
</template>
<JeePayForm
text="入账证件号"
v-model:value="applyDetailInfo.acntCertifId"
:start="false"
/>
<JeePayForm text="入账证件到期日" :start="false">
<termOfValidity
:defaultDate="applyDetailInfo.acntCertifExpireDt"
@publicSelect="publicSelect($event, 'acntCertifExpireDt')"
/>
</JeePayForm>
<JeePayForm text="清算类型">
<uni-data-checkbox
v-model="applyDetailInfo.settleTp"
:localdata="settleTpList"
></uni-data-checkbox>
</JeePayForm>
<JeePayForm
text="选择清算类型扣率"
v-if="
applyDetailInfo.settleTp == 3 || applyDetailInfo.settleTp == 4
"
>
<jeeDataPicker
:code="codeBack.settleTpCd"
:localdata="settleTpCdArr"
@change="publicSelect($event, 'settleTpCd')"
paramType="oneLevel"
:mapText="{ text: 'rate', value: 'settleTpCd' }"
/>
</JeePayForm>
<JeePayForm
text="清算时间"
v-model:value="applyDetailInfo.settleTs"
tipText="24小时制,如上午8点输入08"
v-if="applyDetailInfo.settleTp == 4"
/>
<!-- <view style="height: 800px">成高度</view> -->
</view>
</uni-collapse-item>
<uni-collapse-item title="补充资料" class="coll-title">
<view class="content">
<JeePayForm
text="组织机构代码证照片"
v-if="applyDetailInfo.licenseType == '0'"
>
<JeepayUpLoad
:imgUrl="applyDetailInfo.organizationImg"
@uploadSuccess="uploadSuccess($event, 'organizationImg')"
@clear="clear('organizationImg')"
/>
</JeePayForm>
<JeePayForm
text="税务登记证照片"
v-if="applyDetailInfo.licenseType == '0'"
>
<JeepayUpLoad
:imgUrl="applyDetailInfo.taxRegistrationImg"
@uploadSuccess="uploadSuccess($event, 'taxRegistrationImg')"
@clear="clear('taxRegistrationImg')"
/>
</JeePayForm>
<JeePayForm
text="手持证件照片"
v-if="applyDetailInfo.licenseType == 'A'"
>
<JeepayUpLoad
:imgUrl="applyDetailInfo.handCertificateImg"
@uploadSuccess="uploadSuccess($event, 'handCertificateImg')"
@clear="clear('handCertificateImg')"
/>
</JeePayForm>
<JeePayForm text="补充资料照片" :start="false">
<JeepayUpLoad
:imgUrl="applyDetailInfo.additionImg"
@uploadSuccess="uploadSuccess($event, 'additionImg')"
@clear="clear('additionImg')"
/>
</JeePayForm>
</view>
</uni-collapse-item>
<!-- 费率组件-->
<defaultRate
ref="defaultRateRef"
isCheck="separate"
/>
</uni-collapse>
</view>
<!-- 富有进价后操作 -->
<fuiouEvent />
</template>
<script setup>
import { ref, reactive, inject } from "vue";
import address from "@/components/applyJson/addressFuiou.json"; // 地址
import mccFuiou from "@/components/applyJson/mccFuiou.json"; // 行业
import JeepayUpLoad from "@/components/JeepayUpLoad/JeepayUpLoad.vue"; // 图片上传
import defaultRate from "../../components/defaultRate.vue"; // 默认费率
import readOnlyInfo from "../../components/readOnlyInfo.vue"; // 只读文件
import tool from "@/util/tool.js"; // 工具类函数
import JeePayForm from "@/components/applyComponents/JeePayForm.vue"; // 通用左右结构布局
import termOfValidity from "@/components/applyComponents/termOfValidity.vue"; // 选择证件有效期
import jeeDataPicker from "@/components/applyComponents/dataPicker.vue"; // 通用级联选择
import bankFuiou from "@/components/applyJson/bankFuiou.json"; // 选择银行
import settleTpCdArr from "@/components/applyJson/settleTpCd.json"; // 选择清算折扣率
import { filterDcit } from "@/hooks/dict"; // 字典
import fuiouEvent from './fuiouEvent.vue' // 富有进件后的操作
const merchantTypeList = reactive(filterDcit(["A1", "A3", "A2"])); //商户类型
const whetherList = reactive(filterDcit(["C0", "C1"])); // 开通or不开通
const settlementTypeList = reactive(filterDcit(["B0", "B1"])); // 结算类型
const settleTpList = reactive(filterDcit(["D2", "D1", "D0", "D3"])); // 清算类型
const acntArtifFlagList = reactive(filterDcit(["K0", "K1"])); // 法人入账标识
const channelInfo = inject("channelInfo");
const emit = defineEmits(["paramsHandle", "applyHandle"]);
// 商户进件详细信息JSON类型字符串
const applyDetailInfo = reactive({
licenseType: "A", // 证件类型
settleTp: "1", // 结算类型默认1
});
// 状态分类: 0-未发起、 1-审核中、 2-进件成功、 3-驳回待修改、 4-待验证、 5-待签约
// 当状态为 1 2 4 5 时要开启只读模式0 3 不开启
let isDisable = ref(false);
if (!["0", "3", "8"].includes(channelInfo.state)) isDisable.value = true;
// 上传图片成功 以及OCR识别信息回显
const uploadSuccess = (res, name) => {
applyDetailInfo[name] = res.data;
if (res.ocrInfo && Object.keys(res.ocrInfo).length < 1) return false;
// OCR图片识别 idCard-身份证 idcard1Imgidcard2Img license-营业执照 licenseImg
if (name == "idcard1Img") {
applyDetailInfo.idcardName = res.ocrInfo.idcardName; // 法人身份证姓名
applyDetailInfo.idcardNo = res.ocrInfo.idcardNo; // 法人身份证号
} else if (name == "idcard2Img") {
applyDetailInfo.idcardEffectBegin = res.ocrInfo.idcardEffectBegin; // 有效期
applyDetailInfo.idcardEffectEnd = res.ocrInfo.idcardEffectEnd; // 有效期end
} else if (name == "licenseImg") {
applyDetailInfo.licenseEffectBegin = res.ocrInfo.licenseEffectBegin; // 执照有效期
applyDetailInfo.licenseEffectEnd = res.ocrInfo.licenseEffectEnd; // 有效期end
applyDetailInfo.mchFullName = res.ocrInfo.mchFullName; // 全称
applyDetailInfo.licenseNo = res.ocrInfo.licenseNo; // 编号
applyDetailInfo.address = applyDetailInfo.licRegisAddr =
res.ocrInfo.address;
} else if (name == "settAccountLicenseImg") {
applyDetailInfo.settAccountNo = res.ocrInfo.settAccountNo; // 银行卡号
} else if (name == "settAccountIdcard2Img") {
applyDetailInfo.acntCertifExpireDt = res.ocrInfo.idcardEffectEnd; // 持卡人有效期end
}
};
// 清除图片 仅前端
const clear = (key) => (applyDetailInfo[key] = "");
let mccFuiouList = ref(); // 富有具体的行业类型
// 通用选择事件 回调函数
const publicSelect = (e, key) => {
applyDetailInfo[key] = e.detail.value;
// 根据不同的主体类型 走不同的json
applyDetailInfo.merchantType == 3
? (mccFuiouList.value = mccFuiou.corporationList)
: (mccFuiouList.value = mccFuiou.personalList);
if (key == "merchantType") {
mchTypeInfo(e.detail.value);
}
};
// 证件类型,随主体类型变更
const licenseList = ref([]);
// 证件类型具体内容
const mchTypeInfo = (val) => {
const value = typeof val == "object" ? val.detail.value : val;
if (value == 1) {
licenseList.value = [{ value: "A", name: "身份证" }];
applyDetailInfo.licenseType = "A";
} else if (value == 2) {
licenseList.value = [{ value: "B", name: "营业执照" }];
} else if (value == 3) {
licenseList.value = [
{ value: "0", name: "营业执照" },
{ value: "1", name: "三证合一" },
];
}
};
// 发起进件
const launchApply = (isTempData) => {
// 拿费率组件的值
applyDetailInfo.paywayFeeList = defaultRateRef.value.getList(isTempData)
// 判断类型,对象类型是费率正常提交 Sting 是错误信息
if (typeof applyDetailInfo.paywayFeeList === "string")
return uni.showToast({
title: applyDetailInfo.paywayFeeList,
icon: "none",
});
emit("applyHandle", {
name: "fuioupay",
isTempData,
applyDetailInfo,
formCheck: [
applyDetailInfo.settAccountType,
applyDetailInfo.licenseType,
applyDetailInfo.acntArtifFlag,
applyDetailInfo.settleTp,
],
});
};
let codeBack = reactive({}); // 用于级联选择器 文字回显
let applyInfoRef = ref(null); // 只读组件信息
// 合并信息方法, 智能读取,和信息回显,通过此方法合并
const assignObj = (obj) => {
obj.merchantType == 3
? (mccFuiouList.value = mccFuiou.corporationList)
: (mccFuiouList.value = mccFuiou.personalList);
mchTypeInfo(obj.merchantType);
// 开启只读模式
if (isDisable.value) {
// 证件码转文字
let mchType = obj.merchantType;
if (mchType == "A") {
obj.licenseText = "身份证";
} else if (mchType == "B") {
obj.licenseText = "营业执照";
} else if (mchType == "0") {
obj.licenseText = "营业执照";
} else if (mchType == "1") {
obj.licenseText = "三证合一";
}
obj.mccText = tool.mccBack(obj.mccCode, mccFuiouList.value, "last"); // 行业码转文字
obj.areaText = tool.addressBack(obj.areaCode, address); // 地址码转文字
obj.settAccountText = obj.settAccountType == "C" ? "对私" : "对公"; // 账户类型
obj.acntArtifText = obj.acntArtifFlag == "0" ? "非法人入账" : "法人入账";
if (applyDetailInfo.settleTp == "1") {
// 清算类型
obj.acntArtifText = "自动结算T1";
} else if (applyDetailInfo.settleTp == "2") {
obj.acntArtifText = "手动结算";
}
applyInfoRef.value.getApplyInof(obj);
}
// 用于级联选择器 文字回显
Object.assign(applyDetailInfo, obj);
codeBack.mccCode = obj.mccCode;
codeBack.areaCode = obj.areaCode;
codeBack.settAccountBankName = obj.settAccountBankName;
codeBack.settleTpCd = obj.settleTpCd; // 清算类型扣率
};
const defaultRateRef = ref(); // 费率组件
defineExpose({ launchApply, assignObj });
</script>
<style scoped lang="scss">
@import "../../static/information.scss";
</style>

View File

@@ -0,0 +1,457 @@
<template>
<!-- 只读文件 -->
<readOnlyInfo
v-if="isDisable"
ref="applyInfoRef"
applyName="lklpay"
></readOnlyInfo>
<!-- 盛付通进件模板 -->
<view v-if="!isDisable">
<uni-collapse ref="collapse">
<uni-collapse-item
:show-animation="false"
title="主体信息"
class="coll-title"
:open="true"
>
<view class="content">
<JeePayForm text="商户类型">
<uni-data-checkbox
v-model="applyDetailInfo.merchantType"
:localdata="merchantTypeList"
@change="mchTypeInfo"
></uni-data-checkbox>
</JeePayForm>
<template v-if="applyDetailInfo.merchantType != 1">
<JeePayForm text="营业执照照片">
<JeepayUpLoad
ocrFlag="license"
:imgUrl="applyDetailInfo.licenseImg"
@uploadSuccess="uploadSuccess($event, 'licenseImg')"
@clear="clear('licenseImg')"
/>
</JeePayForm>
<JeePayForm
text="营业执照编号"
v-model:value="applyDetailInfo.licenseNo"
/>
<JeePayForm text="营业执照起始有效期">
<termOfValidity
:defaultDate="applyDetailInfo.licenseEffectBegin"
@publicSelect="publicSelect($event, 'licenseEffectBegin')"
:isEnd="false"
/>
</JeePayForm>
<JeePayForm text="营业执照有效期截止">
<termOfValidity
:defaultDate="applyDetailInfo.licenseEffectEnd"
@publicSelect="publicSelect($event, 'licenseEffectEnd')"
@endHandle="endHandle"
/>
</JeePayForm>
</template>
<JeePayForm
text="用户名称"
v-model:value="applyDetailInfo.mchFullName"
tipText="商户名称不少于7个汉字"
/>
<JeePayForm text="法人身份证人像面照">
<JeepayUpLoad
ocrFlag="idCard"
:imgUrl="applyDetailInfo.idcard1Img"
@uploadSuccess="uploadSuccess($event, 'idcard1Img')"
@clear="clear('idcard1Img')"
/>
</JeePayForm>
<JeePayForm
text="法人身份证姓名"
v-model:value="applyDetailInfo.idcardName"
/>
<JeePayForm
text="法人身份证号"
v-model:value="applyDetailInfo.idcardNo"
/>
<JeePayForm text="法人身份证国徽面照片">
<JeepayUpLoad
ocrFlag="idCard"
:imgUrl="applyDetailInfo.idcard2Img"
@uploadSuccess="uploadSuccess($event, 'idcard2Img')"
@clear="clear('idcard2Img')"
/>
</JeePayForm>
<JeePayForm text="法人身份证起始有效期">
<termOfValidity
:defaultDate="applyDetailInfo.idcardEffectBegin"
@publicSelect="publicSelect($event, 'idcardEffectBegin')"
:isEnd="false"
/>
</JeePayForm>
<JeePayForm text="法人身份证结束有效期">
<termOfValidity
:defaultDate="applyDetailInfo.idcardEffectEnd"
@publicSelect="publicSelect($event, 'idcardEffectEnd')"
/>
</JeePayForm>
</view>
</uni-collapse-item>
<uni-collapse-item
:show-animation="false"
title="经营信息"
class="coll-title"
>
<view class="content">
<JeePayForm text="选择行业MCC">
<jeeDataPicker
:code="codeBack.mccCode"
:localdata="mcc"
@change="publicSelect($event, 'mccCode')"
paramType="splicing"
/>
</JeePayForm>
<JeePayForm text="经营内容">
<uni-data-picker
:localdata="merBusiArray"
@change="publicSelect($event, 'merBusiContent')"
v-slot:default="{ data }"
>{{ merBusiText ? merBusiText : "请选择" }}</uni-data-picker
>
</JeePayForm>
<JeePayForm
text="商户联系人姓名"
v-model:value="applyDetailInfo.contactName"
/>
<JeePayForm
text="商户联系人手机号"
v-model:value="applyDetailInfo.contactPhone"
/>
<JeePayForm text="商户经营省市县">
<jeeDataPicker
:code="codeBack.areaCode"
:localdata="address"
@change="publicSelect($event, 'areaCode')"
paramType="arr"
/>
</JeePayForm>
<JeePayForm
text="商户经营地址"
v-model:value="applyDetailInfo.address"
/>
<JeePayForm text="门头照">
<JeepayUpLoad
:imgUrl="applyDetailInfo.storeOuterImg"
@uploadSuccess="uploadSuccess($event, 'storeOuterImg')"
@clear="clear('storeOuterImg')"
/>
</JeePayForm>
<JeePayForm text="店内环境照">
<JeepayUpLoad
:imgUrl="applyDetailInfo.storeInnerImg"
@uploadSuccess="uploadSuccess($event, 'storeInnerImg')"
@clear="clear('storeInnerImg')"
/>
</JeePayForm>
</view>
</uni-collapse-item>
<uni-collapse-item
:show-animation="false"
title="结算账户"
class="coll-title"
>
<view class="content">
<JeePayForm text="账户类型">
<uni-data-checkbox
v-model="applyDetailInfo.settAccountType"
:localdata="settlementTypeList"
></uni-data-checkbox>
</JeePayForm>
<JeePayForm
text="银行开户名"
v-model:value="applyDetailInfo.settAccountName"
/>
<JeePayForm text="银行卡照片" :start="false">
<JeepayUpLoad
ocrFlag="bankCard"
:imgUrl="applyDetailInfo.settAccountLicenseImg"
@uploadSuccess="uploadSuccess($event, 'settAccountLicenseImg')"
@clear="clear('settAccountLicenseImg')"
/>
</JeePayForm>
<JeePayForm
text="银行账号"
v-model:value="applyDetailInfo.settAccountNo"
/>
<!-- <JeePayForm text="结算周期">
<uni-data-picker
:localdata="settleArray"
@change="publicSelect($event, 'settlePeriod')"
v-slot:default="{ data }"
>{{ settleText ? settleText : "请选择" }}</uni-data-picker
>
</JeePayForm> -->
<JeePayForm
text="结算人身份证号"
:start="false"
tipText="结算人信息不填写默认为法人信息"
v-model:value="applyDetailInfo.settAccountIdcardNo"
/>
<JeePayForm :start="false" text="结算人身份证结束有效期">
<termOfValidity
:defaultDate="applyDetailInfo.settAccountIdcardEffectEnd"
@publicSelect="publicSelect($event, 'settAccountIdcardEffectEnd')"
/>
</JeePayForm>
<!-- <JeePayForm text="POS类型">
<uni-data-picker
:localdata="posArray"
@change="publicSelect($event, 'posType')"
v-slot:default="{ data }"
>{{ posText ? posText : "请选择" }}</uni-data-picker
>
</JeePayForm> -->
<JeePayForm text="其他类型" :start="false">
<JeepayUpLoad
:imgUrl="applyDetailInfo.otherFile"
@uploadSuccess="uploadSuccess($event, 'otherFile')"
@clear="clear('otherFile')"
/>
</JeePayForm>
</view>
</uni-collapse-item>
<!-- 盛付通费率组件 -->
<defaultRate ref="defaultRateRef" />
</uni-collapse>
</view>
</template>
<script setup>
import { ref, reactive, inject } from "vue";
import address from "@/components/applyJson/lklAdress.json"; // 地址
import mcc from "@/components/applyJson/mccLkl.json"; // 行业
import JeepayUpLoad from "@/components/JeepayUpLoad/JeepayUpLoad.vue"; // 图片上传
import defaultRate from "../components/defaultRate.vue"; // 默认费率
import readOnlyInfo from "../components//readOnlyInfo.vue"; // 只读文件
import tool from "@/util/tool.js"; // 工具类函数
import JeePayForm from "@/components/applyComponents/JeePayForm.vue"; // 通用左右结构布局
import termOfValidity from "@/components/applyComponents/termOfValidity.vue"; // 选择证件有效期
import jeeDataPicker from "@/components/applyComponents/dataPicker.vue"; // 通用级联选择
import { filterDcit } from "@/hooks/dict"; //字典
const merchantTypeList = reactive(filterDcit(["A0", "A1", "A2"])); // 商户类型
const settlementTypeList = reactive(filterDcit(["B0", "B1"])); // 结算类型
const channelInfo = inject("channelInfo");
const emit = defineEmits(["applyHandle"]);
// 状态分类: 0-未发起、 1-审核中、 2-进件成功、 3-驳回待修改、 4-待验证、 5-待签约
// 当状态为 1 2 4 5 时要开启只读模式1 3 不开启
let isDisable = ref(false);
if (!["0", "3", "8"].includes(channelInfo.state)) isDisable.value = true;
// 商户进件详细信息JSON类型字符串
let applyDetailInfo = reactive({
merchantType: 3, // 商户类型 默认为3 代表企业
settAccountType: "B", // 结算账号类型 默认为B 对公
});
// 用于回显的经营内容的文字
let merBusiText = ref("");
// 经营内容
const merBusiArray = [
{ value: "642", text: "百货、中介、培训、景区门票等" },
{ value: "645", text: "交通运输售票" },
{ value: "646", text: "电气缴费" },
{ value: "647", text: "政府类" },
{ value: "648", text: "便民类" },
{ value: "649", text: "公立医院、公立学校、慈善" },
{ value: "650", text: "宾馆餐饮娱乐类" },
{ value: "651", text: "房产汽车类" },
{ value: "652", text: "批发类" },
{ value: "653", text: "超市加油类" },
{ value: "654", text: "一般类商户" },
{ value: "655", text: "三农商户" },
];
// 结算周期
let settleText = ref("");
const settleArray = [
{ value: "T+1", text: "T+1结算" },
{ value: "T+1+N", text: "T+1普通结算批次" },
{ value: "T+3", text: "收单T+3结算" },
{ value: "D+1+N", text: "D+1普通结算批次" },
{ value: "W_T+9999", text: "喔噻T+9999不结算批次" },
{ value: "D+1", text: "收单D+1结算批次" },
{ value: "D1+24", text: "D1+24结算批次" },
{ value: "D+30", text: "收单D+30结算" },
{ value: "BT_D+1", text: "D+1四方补贴结算批次" },
{ value: "QZT_FULL_D+1", text: "钱账通D+1全额结算批次" },
{ value: "QZT_NET_D+1", text: "钱账通D+1净额结算批次" },
];
// 结算周POS类型期
let posText = ref("");
const posArray = [
{ value: " GENERAL_POS", text: "传统POS" },
{ value: "SUPER_POS", text: "智能POS" },
{ value: "BLUE_WIZARD", text: "蓝精灵" },
{ value: "WECHAT_PAY", text: "专业化扫码" },
{ value: "SQB_SCAN_CODE", text: "收钱吧扫码" },
{ value: "SQB_PAPER_CODE", text: "收钱吧码牌" },
{ value: "SQB_DESK_CODE", text: "收钱吧桌码" },
{ value: "SQB_POS", text: "收钱吧POS" },
{ value: "CLOUD_STORE_NEW", text: "新云小店" },
{ value: "CLOUD_DISTRIBUTION", text: "云分销" },
{ value: "CLOUD_DISTRIBUTION_CB", text: "云分销线上" },
{ value: "CLOUD_STORE_CB", text: "云小店线上" },
{ value: "CLOUD_STORE_BC", text: "云小店线下" },
{ value: "CLOUD_STORE_BC_NOTLKL", text: "云小店非收银机" },
{ value: "HM", text: "惠码" },
{ value: "HM_CB", text: "惠码线上" },
{ value: "HM_BC", text: "惠码线下" },
{ value: "SCAN_CODE_ORDER", text: "扫码点餐" },
{ value: "B2B_CASHIER_DESK", text: "B2B收银台" },
{ value: "B2B_QR_CODE", text: "B2B收款码" },
{ value: "MOBILE_POS", text: "手机POS" },
{ value: "YF_YM", text: "御风云码" },
{ value: "YF_YM_CB", text: "御风云码线上" },
{ value: "TRANSFER_ACCOUNT", text: "大额理财" },
{ value: "SUPER_MPOS", text: "超级收款宝" },
{ value: "W_BOX", text: "收钱宝盒" },
{ value: "SCANNING_GUN_PAY", text: "Q码精灵" },
];
// 通用选择函数
const publicSelect = (e, key) => {
applyDetailInfo[key] = e.detail.value;
if (key == "merBusiContent") {
// 经营内容文字回显
applyDetailInfo.merBusiContent = e.detail.value[0].value;
merBusiText.value = merBusiArray.find(
(item) => item.value == e.detail.value[0].value
).text;
} else if (key == "settlePeriod") {
// 结算周期文字回显
applyDetailInfo.settlePeriod = e.detail.value[0].value;
settleText.value = settleArray.find(
(item) => item.value == e.detail.value[0].value
).text;
} else if (key == "posType") {
// POS类型文字回显
applyDetailInfo.posType = e.detail.value[0].value;
posText.value = posArray.find(
(item) => item.value == e.detail.value[0].value
).text;
}
};
// 上传图片成功
const uploadSuccess = (res, name) => {
applyDetailInfo[name] = res.data;
if (res.ocrInfo && Object.keys(res.ocrInfo).length < 1) return false;
// OCR图片识别 idCard-身份证 idcard1Imgidcard2Img license-营业执照 licenseImg
if (name == "idcard1Img") {
applyDetailInfo.idcardName = res.ocrInfo.idcardName; // 法人身份证姓名
applyDetailInfo.idcardNo = res.ocrInfo.idcardNo; // 法人身份证号
} else if (name == "idcard2Img") {
applyDetailInfo.idcardEffectBegin = res.ocrInfo.idcardEffectBegin; // 有效期
applyDetailInfo.idcardEffectEnd = res.ocrInfo.idcardEffectEnd; // 有效期end
} else if (name == "licenseImg") {
applyDetailInfo.licenseEffectBegin = res.ocrInfo.licenseEffectBegin; // 执照有效期
applyDetailInfo.licenseEffectEnd = res.ocrInfo.licenseEffectEnd; // 有效期end
applyDetailInfo.mchFullName = res.ocrInfo.mchFullName; // 全称
applyDetailInfo.licenseNo = res.ocrInfo.licenseNo; // 编号
applyDetailInfo.address = res.ocrInfo.address;
} else if (name == "settAccountLicenseImg") {
applyDetailInfo.settAccountNo = res.ocrInfo.settAccountNo; // 银行卡号
}
};
// 清除图片 仅前端
const clear = (name, url) => (applyDetailInfo[name] = "");
const defaultRateRef = ref(); // 获取费率组件
// 发起进件 注意后面的formCheck参数表单校验要用
const launchApply = (isTempData) => {
// 有费率的进件渠道,要在发起进件之前,获取所选择的费率信息
applyDetailInfo.paywayFeeList = defaultRateRef.value.getList(isTempData);
emit("applyHandle", {
name: "lklpay",
isTempData,
applyDetailInfo,
formCheck: [applyDetailInfo.merchantType],
});
};
// 只读组件信息
let applyInfoRef = ref(null);
// 行业类型,地理位置回显
let codeBack = reactive({
areaCode: "", // 商户地理位置回显
mccCode: "",
});
// 合并信息方法, 职能读取,和信息回显,通过此方法合并
const assignObj = (obj) => {
Object.assign(applyDetailInfo, obj);
if (!isDisable.value) {
codeBack.areaCode = obj.areaCode ? obj.areaCode[2] : obj.areaCode; // mcc码拼接类型要截取
obj.mccCode ? (codeBack.mccCode = obj.mccCode.split("_")[1]) : null; // mcc码拼接类型要截取
// 各类文字回显 经营内容 结算周期 POS类型
if (obj.merBusiContent)
merBusiText.value = merBusiArray.find(
(item) => item.value == obj.merBusiContent
).text;
if (obj.settlePeriod)
settleText.value = settleArray.find(
(item) => item.value == obj.settlePeriod
).text;
if (obj.posType)
posText.value = posArray.find((item) => item.value == obj.posType).text;
}
// 以下用于只读信息页
obj.mccText = tool.mccBack(obj.mccCode, mcc, "splicing"); // 行业码转文字
obj.areaText = tool.addressBack(obj.areaCode, address); // 地址码转文字
obj.settAccountText = obj.settAccountType == "C" ? "对私" : "对公";
obj.merchantText =
obj.merchantType == 1
? "个人"
: obj.merchantType == 2
? "个体工商户"
: "企业";
// 传值给只读组件
if (applyInfoRef.value) applyInfoRef.value.getApplyInof(obj);
};
defineExpose({ launchApply, assignObj });
</script>
<style scoped lang="scss">
@import "../static/information.scss";
</style>

View File

@@ -0,0 +1,458 @@
<template>
<!-- 只读文件 -->
<readOnlyInfo
v-if="isDisable"
ref="applyInfoRef"
applyName="lklspay"
></readOnlyInfo>
<view v-if="!isDisable">
<uni-collapse ref="collapse">
<uni-collapse-item title="主体信息" class="coll-title" :open="true">
<view class="content">
<JeePayForm text="商户类型">
<uni-data-checkbox
v-model="applyDetailInfo.merchantType"
:localdata="merchantTypeList"
></uni-data-checkbox>
</JeePayForm>
<!-- 个人不需要营业执照 -->
<template v-if="applyDetailInfo.merchantType != 1">
<JeePayForm
text="营业执照名称"
v-model:value="applyDetailInfo.mchFullName"
/>
<JeePayForm text="营业执照照片">
<JeepayUpLoad
ocrFlag="license"
:imgUrl="applyDetailInfo.licenseImg"
@uploadSuccess="uploadSuccess($event, 'licenseImg')"
@clear="clear('licenseImg')"
/>
</JeePayForm>
<JeePayForm
text="营业执照编号"
v-model:value="applyDetailInfo.licenseNo"
/>
<JeePayForm text="营业执照起始有效期">
<termOfValidity
:defaultDate="applyDetailInfo.licenseEffectBegin"
@publicSelect="publicSelect($event, 'licenseEffectBegin')"
:isEnd="false"
/>
</JeePayForm>
<JeePayForm text="营业执照有效期截止">
<termOfValidity
:defaultDate="applyDetailInfo.licenseEffectEnd"
@publicSelect="publicSelect($event, 'licenseEffectEnd')"
@endHandle="endHandle"
/>
</JeePayForm>
</template>
<JeePayForm
text="商户注册名称"
v-model:value="applyDetailInfo.merRegName"
/>
<JeePayForm
text="商户经营名称"
v-model:value="applyDetailInfo.mchShortName"
/>
<JeePayForm text="法人身份证人像面照">
<JeepayUpLoad
ocrFlag="idCard"
:imgUrl="applyDetailInfo.idcard1Img"
@uploadSuccess="uploadSuccess($event, 'idcard1Img')"
@clear="clear('idcard1Img')"
/>
</JeePayForm>
<JeePayForm
text="法人身份证姓名"
v-model:value="applyDetailInfo.idcardName"
/>
<JeePayForm
text="法人身份证号"
v-model:value="applyDetailInfo.idcardNo"
/>
<JeePayForm text="法人身份证国徽面照片">
<JeepayUpLoad
ocrFlag="idCard"
:imgUrl="applyDetailInfo.idcard2Img"
@uploadSuccess="uploadSuccess($event, 'idcard2Img')"
@clear="clear('idcard2Img')"
/>
</JeePayForm>
<JeePayForm text="法人身份证起始有效期">
<termOfValidity
:defaultDate="applyDetailInfo.idcardEffectBegin"
@publicSelect="publicSelect($event, 'idcardEffectBegin')"
:isEnd="false"
/>
</JeePayForm>
<JeePayForm text="法人身份证结束有效期">
<termOfValidity
:defaultDate="applyDetailInfo.idcardEffectEnd"
@publicSelect="publicSelect($event, 'idcardEffectEnd')"
@endHandle="endHandle"
/>
</JeePayForm>
</view>
</uni-collapse-item>
<uni-collapse-item
:show-animation="false"
title="经营信息"
class="coll-title"
>
<view class="content">
<JeePayForm text="选择行业MCC">
<jeeDataPicker
:code="codeBack.mccCode"
:localdata="mcc"
@change="publicSelect($event, 'mccCode')"
paramType="splicing"
/>
</JeePayForm>
<JeePayForm
text="商户联系人姓名"
v-model:value="applyDetailInfo.contactName"
/>
<JeePayForm
text="商户联系人手机号"
v-model:value="applyDetailInfo.contactPhone"
/>
<JeePayForm
text="商户联系人邮箱"
v-model:value="applyDetailInfo.contactEmail"
/>
<JeePayForm text="商户经营省市县">
<jeeDataPicker
:code="codeBack.mchAreaCode"
:localdata="address"
@change="publicSelect($event, 'mchAreaCode')"
paramType="arr"
/>
</JeePayForm>
<JeePayForm text="门头照">
<JeepayUpLoad
:imgUrl="applyDetailInfo.storeOuterImg"
@uploadSuccess="uploadSuccess($event, 'storeOuterImg')"
@clear="clear('storeOuterImg')"
/>
</JeePayForm>
<JeePayForm text="店内环境照">
<JeepayUpLoad
:imgUrl="applyDetailInfo.storeInnerImg"
@uploadSuccess="uploadSuccess($event, 'storeInnerImg')"
@clear="clear('storeInnerImg')"
/>
</JeePayForm>
<JeePayForm text="收银台照">
<JeepayUpLoad
:imgUrl="applyDetailInfo.storeCashierImg"
@uploadSuccess="uploadSuccess($event, 'storeCashierImg')"
@clear="clear('storeCashierImg')"
/>
</JeePayForm>
<JeePayForm text="选择经纬度" tipHolder="点击选择经纬度">
<text @tap="lnglatAmap">{{
applyDetailInfo.lnglat || '点击选择经纬度'
}}</text>
</JeePayForm>
</view>
</uni-collapse-item>
<uni-collapse-item
:show-animation="false"
title="账户信息"
class="coll-title"
>
<view class="content">
<JeePayForm text="账户类型">
<uni-data-checkbox
v-model="applyDetailInfo.settAccountType"
:localdata="settlementTypeList"
></uni-data-checkbox>
</JeePayForm>
<JeePayForm
text="银行开户名"
v-model:value="applyDetailInfo.settAccountName"
/>
<JeePayForm
text="银行账号"
v-model:value="applyDetailInfo.settAccountNo"
/>
<JeePayForm text="银行查询地区">
<uni-data-checkbox
v-model="applyDetailInfo.selectAreaCode"
:localdata="selectAreaCodeList"
></uni-data-checkbox>
</JeePayForm>
<JeePayForm text="支行地址">
<jeeDataPicker
:localdata="address"
@change="changeSubBranch($event)"
paramType="arr"
/>
</JeePayForm>
<JeePayForm v-if="bankInfoList.length > 0" text="支行">
<text @tap="bank.open()">{{
applyDetailInfo.settAccountBankName || '选择银行'
}}</text>
</JeePayForm>
<JeePayForm
text="银行名称"
v-model:value="applyDetailInfo.settAccountBankName"
>
</JeePayForm>
<JeePayForm
text="联行行号"
v-model:value="applyDetailInfo.openningBankCode"
>
</JeePayForm>
<JeePayForm
text="清算行号"
v-model:value="applyDetailInfo.clearingBankCode"
>
</JeePayForm>
</view>
</uni-collapse-item>
<uni-collapse-item
:show-animation="false"
title="结算人信息"
class="coll-title"
>
<JeePayForm text="结算人是否为法人">
<uni-data-checkbox
v-model="applyDetailInfo.isLegalInfo"
:localdata="isLegalInfoList"
></uni-data-checkbox>
</JeePayForm>
<template v-if="applyDetailInfo.isLegalInfo == '0'">
<JeePayForm text="结算人身份证人像面照">
<JeepayUpLoad
ocrFlag="idCard"
:imgUrl="applyDetailInfo.settAccountIdcard1Img"
@uploadSuccess="uploadSuccess($event, 'settAccountIdcard1Img')"
@clear="clear('settAccountIdcard1Img')"
/>
</JeePayForm>
<JeePayForm text="结算人身份证国徽面照">
<JeepayUpLoad
ocrFlag="idCard"
:imgUrl="applyDetailInfo.settAccountIdcard2Img"
@uploadSuccess="uploadSuccess($event, 'settAccountIdcard2Img')"
@clear="clear('settAccountIdcard2Img')"
/>
</JeePayForm>
<JeePayForm
text="结算人身份证号"
v-model:value="applyDetailInfo.settAccountIdcardNo"
>
</JeePayForm>
<JeePayForm text="结算人身份证起始有效期">
<termOfValidity
:defaultDate="applyDetailInfo.settAccountIdcardEffectBegin"
@publicSelect="
publicSelect($event, 'settAccountIdcardEffectBegin')
"
:isEnd="false"
/>
</JeePayForm>
<JeePayForm text="法人身份证结束有效期">
<termOfValidity
:defaultDate="applyDetailInfo.settAccountIdcardEffectEnd"
@publicSelect="publicSelect($event, 'settAccountIdcardEffectEnd')"
@endHandle="endHandle"
/>
</JeePayForm>
</template>
<JeePayForm text="其他材料">
<JeepayUpLoad
:imgUrl="applyDetailInfo.otherFile"
@uploadSuccess="uploadSuccess($event, 'otherFile')"
@clear="clear('otherFile')"
/>
</JeePayForm>
</uni-collapse-item>
<!-- 盛付通费率组件 -->
<defaultRate ref="defaultRateRef" />
</uni-collapse>
<SelectBank
ref="bank"
:list="bankInfoList"
key="id"
value="branchBankName"
@choiceValue="updataBank"
></SelectBank>
</view>
</template>
<script setup>
import { reactive, ref, inject } from 'vue'
import readOnlyInfo from '../../components/readOnlyInfo.vue' // 只读文件
import JeePayForm from '@/components/applyComponents/JeePayForm.vue' // 通用左右结构布局
import JeepayUpLoad from '@/components/JeepayUpLoad/JeepayUpLoad.vue' // 图片上传
import termOfValidity from '@/components/applyComponents/termOfValidity.vue' // 选择证件有效期
import jeeDataPicker from '@/components/applyComponents/dataPicker.vue' // 通用级联选择
import tool from '@/util/tool.js' // 工具类函数
import address from '@/components/applyJson/lklAdress.json' // 地址
import mcc from '@/components/applyJson/mccLkl.json' // 行业
import { $lklGetBankList } from '@/http/apiManager.js' //获取银行列表
import SelectBank from '../../components/SelectBank.vue'
import { filterDcit } from '@/hooks/dict' // 字典
const settlementTypeList = reactive(filterDcit(['B0', 'B1'])) // 结算类型
const merchantTypeList = reactive(filterDcit(['A5', 'A2'])) // 商户
const selectAreaCodeList = reactive(filterDcit(['N0', 'N1'])) // 银行卡查询地区
const isLegalInfoList = reactive(filterDcit(['C2', 'C3'])) // 银行卡查询地区
import defaultRate from '../../components/defaultRate.vue' // 默认费率
const emit = defineEmits(['applyHandle'])
const bankInfoList = ref([])
const bank = ref()
const defaultRateRef = ref() // 获取费率组件
const applyDetailInfo = reactive({
merchantType: 1,
selectAreaCode: '1',
isLegalInfo: '1',
})
const channelInfo = inject('channelInfo')
let isDisable = ref(false)
if (!['0', '3', '8'].includes(channelInfo.state)) isDisable.value = true
// 行业类型,地理位置回显
let codeBack = reactive({
areaCode: '', // 商户地理位置回显
mccCode: '',
})
// 只读组件信息
let applyInfoRef = ref(null)
// 通用选择函数
const publicSelect = (e, key) => {
applyDetailInfo[key] = e.detail.value
if (key == 'merBusiContent') {
// 经营内容文字回显
applyDetailInfo.merBusiContent = e.detail.value[0].value
merBusiText.value = merBusiArray.find(
(item) => item.value == e.detail.value[0].value
).text
} else if (key == 'settlePeriod') {
// 结算周期文字回显
applyDetailInfo.settlePeriod = e.detail.value[0].value
settleText.value = settleArray.find(
(item) => item.value == e.detail.value[0].value
).text
} else if (key == 'posType') {
// POS类型文字回显
applyDetailInfo.posType = e.detail.value[0].value
posText.value = posArray.find(
(item) => item.value == e.detail.value[0].value
).text
}
}
// 上传图片成功
const uploadSuccess = (res, name) => {
applyDetailInfo[name] = res.data
if (res.ocrInfo && Object.keys(res.ocrInfo).length < 1) return false
// OCR图片识别 idCard-身份证 idcard1Imgidcard2Img license-营业执照 licenseImg
if (name == 'idcard1Img') {
applyDetailInfo.idcardName = res.ocrInfo.idcardName // 法人身份证姓名
applyDetailInfo.idcardNo = res.ocrInfo.idcardNo // 法人身份证号
} else if (name == 'idcard2Img') {
applyDetailInfo.idcardEffectBegin = res.ocrInfo.idcardEffectBegin // 有效期
applyDetailInfo.idcardEffectEnd = res.ocrInfo.idcardEffectEnd // 有效期end
} else if (name == 'licenseImg') {
applyDetailInfo.licenseEffectBegin = res.ocrInfo.licenseEffectBegin // 执照有效期
applyDetailInfo.licenseEffectEnd = res.ocrInfo.licenseEffectEnd // 有效期end
applyDetailInfo.mchFullName = res.ocrInfo.mchFullName // 全称
applyDetailInfo.licenseNo = res.ocrInfo.licenseNo // 编号
applyDetailInfo.address = res.ocrInfo.address
}
}
// 选择经纬度
const lnglatAmap = () => {
console.log(1)
uni.chooseLocation({
success: function (res) {
// console.log("位置名称:" + res.name);
// console.log("详细地址:" + res.address);
// console.log("纬度:" + res.latitude);
// console.log("经度:" + res.longitude);
applyDetailInfo.lnglat = `${res.longitude},${res.latitude}`
applyDetailInfo.longtude = res.longitude
applyDetailInfo.latitude = res.latitude
applyDetailInfo.address = res.address
},
})
}
// 清除图片 仅前端
const clear = (name, url) => (applyDetailInfo[name] = '')
// 选择支行的回调
const changeSubBranch = (val) => {
const areaCode = val.detail.value[applyDetailInfo.selectAreaCode]
applyDetailInfo.settAccountBankBranchAreaCode = val.detail.value
$lklGetBankList(areaCode).then((res) => {
const { bizData } = res
bankInfoList.value = JSON.parse(bizData)
})
}
// 选择银行回调
const updataBank = (val) => {
// branchBankName 联行 行号
// clearNo 清算行号
applyDetailInfo.bankInfo = val.id
applyDetailInfo.settAccountBankName = val.branchBankName
applyDetailInfo.openningBankCode = val.branchBankNo
applyDetailInfo.clearingBankCode = val.clearNo
console.log(val, '银行回调')
}
const launchApply = (isTempData) => {
// 有费率的进件渠道,要在发起进件之前,获取所选择的费率信息
applyDetailInfo.paywayFeeList = defaultRateRef.value.getList(isTempData)
applyDetailInfo.mchFullName = applyDetailInfo.mchFullName
? applyDetailInfo.mchFullName
: applyDetailInfo.mchShortName
// return;
emit('applyHandle', {
name: 'lklspay',
isTempData,
applyDetailInfo,
formCheck: [applyDetailInfo.merchantType, applyDetailInfo.isLegalInfo],
})
}
// 合并信息方法, 职能读取,和信息回显,通过此方法合并
// const assignObj = (obj) => {
// Object.assign(applyDetailInfo, obj);
// };
// 合并信息方法, 职能读取,和信息回显,通过此方法合并
const assignObj = (obj) => {
Object.assign(applyDetailInfo, obj)
// 行业类型,地理位置回显
codeBack.bankCode = obj.settAccountBankBranchAreaCode
? obj.settAccountBankBranchAreaCode[2]
: null
codeBack.branchCode = obj.bankBranchAreaCode
? obj.bankBranchAreaCode[1]
: null
// 以下用于只读信息页
obj.settAccountBankBranchAreaText = tool.addressBack(
obj.settAccountBankBranchAreaCode,
address
)
obj.bankBranchAreaCodeText = tool.addressBack(obj.bankBranchAreaCode, address)
obj.areaText = tool.addressBack(obj.mchAreaCode, address)
// 传值给只读组件
if (applyInfoRef.value) applyInfoRef.value.getApplyInof(obj)
}
defineExpose({ launchApply, assignObj })
</script>
<style lang="scss" scoped></style>

View File

@@ -0,0 +1,753 @@
<template>
<!-- 只读文件 -->
<readOnlyInfo
v-if="isDisable"
ref="applyInfoRef"
applyName="sftpay"
></readOnlyInfo>
<!-- 以盛付通进件模板 收付通基于它改的-->
<view v-if="!isDisable">
<uni-collapse ref="collapse">
<uni-collapse-item
:show-animation="false"
title="主体信息"
class="coll-title"
:open="true"
>
<view class="content">
<JeePayForm text="商户类型">
<uni-data-checkbox
v-model="applyDetailInfo.merchantType"
:localdata="merchantTypeList"
@change="mchTypeInfo"
></uni-data-checkbox>
</JeePayForm>
<template
v-if="
applyDetailInfo.merchantType == 2 ||
applyDetailInfo.merchantType == 3
"
>
<JeePayForm text="营业执照照片">
<JeepayUpLoad
ocrFlag="license"
:imgUrl="applyDetailInfo.licenseImg"
@uploadSuccess="uploadSuccess($event, 'licenseImg')"
@clear="clear('licenseImg')"
/>
</JeePayForm>
<JeePayForm
text="营业执照编号"
v-model:value="applyDetailInfo.licenseNo"
/>
<JeePayForm
text="商户名称全称"
v-model:value="applyDetailInfo.mchFullName"
/>
</template>
<JeePayForm text="法人身份证人像面照片">
<JeepayUpLoad
ocrFlag="idCard"
:imgUrl="applyDetailInfo.idcard1Img"
@uploadSuccess="uploadSuccess($event, 'idcard1Img')"
@clear="clear('idcard1Img')"
/>
</JeePayForm>
<JeePayForm text="法人身份证国徽面照片">
<JeepayUpLoad
ocrFlag="idCard"
:imgUrl="applyDetailInfo.idcard2Img"
@uploadSuccess="uploadSuccess($event, 'idcard2Img')"
@clear="clear('idcard2Img')"
/>
</JeePayForm>
<JeePayForm
text="法人身份证姓名"
v-model:value="applyDetailInfo.idcardName"
/>
<JeePayForm
text="法人身份证号"
v-model:value="applyDetailInfo.idcardNo"
/>
<JeePayForm
v-if="applyDetailInfo.merchantType == 3"
text="法人身份证居住地址"
v-model:value="applyDetailInfo.idcardAddress"
/>
<JeePayForm text="法人身份证起始有效期">
<termOfValidity
:defaultDate="applyDetailInfo.idcardEffectBegin"
@publicSelect="publicSelect($event, 'idcardEffectBegin')"
:isEnd="false"
/>
</JeePayForm>
<JeePayForm text="法人身份证结束有效期">
<termOfValidity
:defaultDate="applyDetailInfo.idcardEffectEnd"
@publicSelect="publicSelect($event, 'idcardEffectEnd')"
/>
</JeePayForm>
<JeePayForm
text="经营者/法人是否为受益人"
v-if="applyDetailInfo.merchantType == '3'"
>
<view>
{{ applyDetailInfo.owner ? "是" : "否" }}
<switch
@change="publicSelect($event, 'owner')"
:checked="applyDetailInfo.owner"
/>
</view>
</JeePayForm>
</view>
</uni-collapse-item>
<!-- 受益人卡片 -->
<ownerCard
v-if="applyDetailInfo.merchantType == '3'"
ref="ownerCardRef"
:isOwner="applyDetailInfo.owner"
:ownerInfoBack="applyDetailInfo.companyBeneficiaryList"
/>
<uni-collapse-item
:show-animation="false"
title="店铺信息"
class="coll-title"
>
<view class="content">
<JeePayForm
text="商户简称"
v-model:value="applyDetailInfo.mchShortName"
/>
<JeePayForm
text="店铺名称"
v-model:value="applyDetailInfo.storeName"
/>
<JeePayForm
text="店铺链接"
v-model:value="applyDetailInfo.storeUrl"
tipText="链接或二维码二选一必填"
/>
<JeePayForm text="店铺二维码">
<JeepayUpLoad
ocrFlag="idCard"
:imgUrl="applyDetailInfo.storeQrCode"
@uploadSuccess="uploadSuccess($event, 'storeQrCode')"
@clear="clear('storeQrCode')"
/>
</JeePayForm>
<JeePayForm
text="小程序AppID"
v-model:value="applyDetailInfo.miniProgramSubAppid"
:start="false"
/>
</view>
</uni-collapse-item>
<uni-collapse-item title="结算规则" class="coll-title">
<view class="content">
<JeePayForm text="结算规则信息" :start="false">
<view @click="setRulesRef.open('bottom')">{{
setRulesText ? setRulesText : "请选择"
}}</view>
</JeePayForm>
<JeePayForm text="选择行业" :start="false">
<view @click="openSecond">{{
applyDetailInfo.mccCode ? applyDetailInfo.mccCode : "请选择"
}}</view>
</JeePayForm>
<JeePayForm
text="特殊资质照"
:start="false"
v-if="applyDetailInfo.isNeedQualification"
>
<JeepayUpLoad
:imgUrl="applyDetailInfo.qualifications"
@uploadSuccess="uploadSuccess($event, 'qualifications')"
@clear="clear('qualifications')"
/>
</JeePayForm>
<!-- 撑开高度的元素 -->
<!-- <view style="height: 200px"></view> -->
</view>
</uni-collapse-item>
<uni-collapse-item title="超级管理员" class="coll-title">
<view class="content">
<JeePayForm text="超管身份">
<radio-group
class="radio-group"
@change="publicSelect($event, 'contactType')"
>
<label class="radio"
><radio
value="65"
:checked="applyDetailInfo.contactType == '65'"
/>经营者/法人</label
>
<label
class="radio"
v-if="
applyDetailInfo.merchantType == 2 ||
applyDetailInfo.merchantType == 3
"
><radio
value="66"
:checked="applyDetailInfo.contactType == '66'"
/>经办人</label
>
</radio-group>
</JeePayForm>
<template v-if="applyDetailInfo.contactType == '66'">
<JeePayForm text="超管身份证人像面照片">
<JeepayUpLoad
ocrFlag="idCard"
:imgUrl="applyDetailInfo.contactIdDocCopy"
@uploadSuccess="uploadSuccess($event, 'contactIdDocCopy')"
@clear="clear('contactIdDocCopy')"
/>
</JeePayForm>
<JeePayForm text="超管身份证国徽面照片">
<JeepayUpLoad
ocrFlag="idCard"
:imgUrl="applyDetailInfo.contactIdDocCopyBack"
@uploadSuccess="uploadSuccess($event, 'contactIdDocCopyBack')"
@clear="clear('contactIdDocCopyBack')"
/>
</JeePayForm>
<JeePayForm
text="超管身份证姓名"
v-model:value="applyDetailInfo.contactName"
/>
<JeePayForm
text="超管身份证号"
v-model:value="applyDetailInfo.contactIdNumber"
/>
<JeePayForm text="超管身份证起始有效期">
<termOfValidity
:defaultDate="applyDetailInfo.contactIdDocPeriodBegin"
@publicSelect="publicSelect($event, 'contactIdDocPeriodBegin')"
:isEnd="false"
/>
</JeePayForm>
<JeePayForm text="超管身份证结束有效期">
<termOfValidity
:defaultDate="applyDetailInfo.contactIdDocPeriodEnd"
@publicSelect="publicSelect($event, 'contactIdDocPeriodEnd')"
/>
</JeePayForm>
<JeePayForm text="业务办理授权函">
<JeepayUpLoad
:imgUrl="applyDetailInfo.businessAuthorizationLetter"
@uploadSuccess="
uploadSuccess($event, 'businessAuthorizationLetter')
"
@clear="clear('businessAuthorizationLetter')"
/>
</JeePayForm>
</template>
<JeePayForm
text="手机号"
v-model:value="applyDetailInfo.contactPhone"
/>
<JeePayForm
text="邮箱"
v-model:value="applyDetailInfo.contactEmail"
/>
</view>
</uni-collapse-item>
<uni-collapse-item
:show-animation="false"
title="结算账户"
class="coll-title"
>
<view class="content">
<view class="item">
<view class="title"><text class="require">*</text>账户类型</view>
<radio-group
class="radio-group"
@change="publicSelect($event, 'settAccountType')"
>
<label
class="radio"
v-if="
applyDetailInfo.merchantType == 1 ||
applyDetailInfo.merchantType == 6 ||
applyDetailInfo.merchantType == 2
"
><radio
value="C"
:checked="applyDetailInfo.settAccountType == 'C'"
/>对私</label
>
<label
class="radio"
v-if="
applyDetailInfo.merchantType == 2 ||
applyDetailInfo.merchantType == 3
"
><radio
value="B"
:checked="applyDetailInfo.settAccountType == 'B'"
/>对公</label
>
</radio-group>
</view>
<JeePayForm
text="开户名称"
v-model:value="applyDetailInfo.settAccountName"
/>
<JeePayForm
text="银行账号"
v-model:value="applyDetailInfo.settAccountNo"
/>
<JeePayForm text="开户行">
<view @click="openBankSelect">{{
applyDetailInfo.accountBankNameShow
? applyDetailInfo.accountBankNameShow
: "请选择"
}}</view>
</JeePayForm>
<JeePayForm text="开户行省市区">
<jeeDataPicker
:code="codeBack.bankCode"
:localdata="address"
@change="publicSelect($event, 'settAccountBankBranchAreaCode')"
paramType="arr"
/>
</JeePayForm>
<template v-if="applyDetailInfo.needBankBranch">
<JeePayForm text="支行所在地区">
<jeeDataPicker
:code="codeBack.branchCode"
:localdata="sftAddress"
@change="publicSelect($event, 'bankBranchAreaCode')"
paramType="arr"
/>
</JeePayForm>
<JeePayForm text="支行名称">
<view @click="selectBranchBank">{{
applyDetailInfo.settAccountBankBranchName
? applyDetailInfo.settAccountBankBranchName
: "请选择"
}}</view>
</JeePayForm>
</template>
</view>
</uni-collapse-item>
</uni-collapse>
<!-- 选择开户行组件 -->
<sftSelectBank
ref="sftSelectBankRef"
:settAccountType="applyDetailInfo.settAccountType"
@bankInfo="bankInfo"
:ifCode="channelInfo.code"
/>
<!-- 选择支行 -->
<sftSelectBankBranch
ref="sftSelectBankBranckRef"
@bankBranckInfo="bankBranckInfo"
:bankList="bankBranchList"
/>
</view>
<!-- 一级类目弹窗 -->
<uni-popup ref="setRulesRef" type="bottom">
<scroll-view
:scroll-y="true"
style="width: 100%; height: 50vh; overflow: auto; background: #fff"
class="firstradius"
>
<view
v-for="(item, index) in sftMccList"
:key="index"
:class="{ firstradius: index === 0 }"
class="set-rules"
@click="selectRule(index)"
>
<view>
<text>{{ item.settlementName }}</text>
<text style="color: #8c8c8c; margin-left: 20px">{{
item.settRule
}}</text>
</view>
<view>
<image
v-if="index === setRulesIndex"
src="../../static/indexImg/select-radio.svg"
mode=""
></image>
<image
v-else
src="../../static/indexImg/un-raido.svg"
mode=""
></image>
</view>
</view>
</scroll-view>
</uni-popup>
<!-- 二级类目弹窗 -->
<uni-popup ref="secondListRef" type="bottom">
<scroll-view
style="width: 100%; height: 50vh; overflow: auto; background: #fff"
class="firstradius"
:scroll-y="true"
>
<view
v-for="(item, index) in secondList"
:key="index"
:class="{ firstradius: index === 0 }"
class="set-rules"
@click="secondListChange(index)"
>
<view>
<text>{{ item.qualificationType }}</text>
<text style="color: #8c8c8c; margin-left: 20px">{{
item.qualifications
}}</text>
</view>
<view>
<image
v-if="index === secondListIndex"
src="../../static/indexImg/select-radio.svg"
mode=""
></image>
<image
v-else
src="../../static/indexImg/un-raido.svg"
mode=""
></image>
</view>
</view>
</scroll-view>
</uni-popup>
</template>
<script setup>
import { ref, reactive, toRaw, inject, nextTick } from "vue";
import address from "@/components/applyJson/address.json"; // 地址
import JeepayUpLoad from "@/components/JeepayUpLoad/JeepayUpLoad.vue"; // 图片上传
import { $bankBranchList } from "@/http/apiManager.js";
import readOnlyInfo from "../components/readOnlyInfo.vue"; // 只读文件
import tool from "@/util/tool.js"; // 工具类函数
import sftAddress from "@/components/applyJson/sftAddress.json"; // 选择支行地址用的json只到市
import JeePayForm from "@/components/applyComponents/JeePayForm.vue"; // 通用左右结构布局
import sftMcc from "@/components/applyJson/sftMcc.json"; // 行业
import termOfValidity from "@/components/applyComponents/termOfValidity.vue"; // 选择证件有效期
import jeeDataPicker from "@/components/applyComponents/dataPicker.vue"; // 通用级联选择
import ownerCard from "../components/ownerCard.vue"; // 受益人卡片组件
import sftSelectBank from "@/components/sftSelectBank/sftSelectBank.vue"; // 选择开户行
import sftSelectBankBranch from "@/components/sftSelectBank/sftSelectBankBranch.vue"; // 选择支行
import { filterDcit } from "@/hooks/dict"; // 字典
const merchantTypeList = reactive(filterDcit(["A3", "A4", "A1", "A2"])); // 商户类型
const channelInfo = inject('channelInfo')
const emit = defineEmits(["applyHandle"]);
// 商户进件详细信息JSON类型字符串
let applyDetailInfo = reactive({
merchantType: "", // 商户类型 3 代表企业
settAccountType: "", // 结算账号类型 B 对公
companyBeneficiaryList: [],
owner: false
});
// 状态: 0-未发起、 1-审核中、 2-进件成功、 3-驳回待修改、 4-待验证、 5-待签约
// 状态为 1,2,4,5 开启disable (也就是状态不为 0 3)
let isDisable = ref(false);
if (!["0", "3", "8"].includes(channelInfo.state)) isDisable.value = true;
const ownerCardRef = ref(null);
/*
* 选择开户银行板块
*/
const sftSelectBankRef = ref();
const sftSelectBankBranckRef = ref();
// 调起选择开户行弹窗
const openBankSelect = () => {
if (!applyDetailInfo.settAccountType)
return uni.showToast({
title: "请先选择账户类型",
icon: "none",
});
sftSelectBankRef.value.openHandle(applyDetailInfo.settAccountType);
};
// 接收选择的银行
const bankInfo = (val) => {
console.log(val.bank_alias)
applyDetailInfo.accountBankNameShow = val.bank_alias;
applyDetailInfo.settAccountBankName = val.account_bank;
applyDetailInfo.needBankBranch = val.need_bank_branch; // 是否需要填写分支
applyDetailInfo.bankAliasCode = val.bank_alias_code; // 银行别名编码,请求银行分支时使用
};
let bankBranchList = ref([]); // 支行列表
// 选择支行
const selectBranchBank = () => {
// 空值校验
if (bankBranchList.value.length == 0)
return uni.showToast({ title: "请先选择支行地址", icon: "none" });
sftSelectBankBranckRef.value.open();
};
// 选择支行完毕
const bankBranckInfo = (val) =>
(applyDetailInfo.settAccountBankBranchName = val.bank_branch_name); // 支行名称
// 上传图片成功
const uploadSuccess = (res, name) => {
applyDetailInfo[name] = res.data;
if (name == "contactIdDocCopy") {
applyDetailInfo.contactName = res.ocrInfo.idcardName;
applyDetailInfo.contactIdNumber = res.ocrInfo.idcardNo;
return;
}
if (name == "contactIdDocCopyBack") {
applyDetailInfo.contactIdDocPeriodBegin = res.ocrInfo.idcardEffectBegin;
applyDetailInfo.contactIdDocPeriodEnd = res.ocrInfo.idcardEffectEnd;
return;
}
Object.assign(applyDetailInfo, res.ocrInfo); // ocr信息回显
};
// 清除图片 仅前端
const clear = (name) => (applyDetailInfo[name] = "");
// 通用radio checkbox选择事件 回调函数
const publicSelect = (e, key) => {
applyDetailInfo[key] = e.detail.value;
// 如果超管身份选定为经营者法人 则固定超管姓名与身份证号为法人身份证号、姓名
if (key == "merchantType") {
applyDetailInfo.merchantType = Number(e.detail.value);
if (e.detail.value == 1) {
applyDetailInfo.settAccountType = "C"; // 微小商户,结算类型限制为 对私
sftMccList.value = sftMcc.micro; // 切换mcc
} else if (e.detail.value == 2) {
sftMccList.value = sftMcc.individual;
} else if (e.detail.value == 3) {
sftMccList.value = sftMcc.enterprise;
}
setRulesText.value = '' // 重置一级类目文字
applyDetailInfo.settlementId = '' // 重置一级类目ID
applyDetailInfo.mccCode = ""; // 重置二级类目
applyDetailInfo.qualificationId = ""; // 重置二级类目
applyDetailInfo.isNeedQualification = ""; // 是否要上传证书的标识
} else if (key == "bankBranchAreaCode") {
// 备注: 盛付通支行地址表也出现了value相同的情况需要改一下数据类型
// 请求支行数据
$bankBranchList(channelInfo.mchNo, channelInfo.code, {
cityCode: e.detail.value[1],
bankAliasCode: applyDetailInfo.bankAliasCode,
}).then((res) => {
bankBranchList.value = res.bizData;
applyDetailInfo.settAccountBankBranchName = ""; // 请求完毕赋空
})
}
};
/*
* 结算规则板块
*/
let sftMccList = ref(sftMcc.individual); // 结算规则数组 个人是individual 企业是enterprise 默认给individual
let setRulesIndex = ref(-1); // 一级类目 默认选中项
const setRulesRef = ref(null); // 一级类目弹窗
const setRulesText = ref(""); // 结算规则回显文字
let secondList = ref([]); // 二级类目列表
// 一级类目选择完毕
const selectRule = (index) => {
setRulesRef.value.close();
// 结算规则变化,重置行业/特殊资质信息
applyDetailInfo.settlementId = sftMccList.value[index].settlementId; // 给后台的一级类目
setRulesIndex.value = index; // 选择完一级类目的下标
setRulesText.value = sftMccList.value[index].settlementName; // 选择完一级类目的文字
applyDetailInfo.mccCode = ""; // 重置二级类目
applyDetailInfo.qualificationId = ""; // 重置二级类目
applyDetailInfo.isNeedQualification = ""; // 是否要上传证书的标识
secondList.value = sftMccList.value[index].qualification; // 二级类目列表
};
const secondListRef = ref(null); // 二级类目弹窗
const secondListIndex = ref(-1); // 二级类目 默认选中项
let qualifications = ref(false); // 是否展示特殊资质照
// 二级类目选择完毕
const secondListChange = (index) => {
secondListRef.value.close();
secondListIndex.value = index;
applyDetailInfo.mccCode = secondList.value[index].qualificationType; // 二级文字
applyDetailInfo.isNeedQualification =
secondList.value[index].isNeedQualification; // 上传特殊资质照是否必填
applyDetailInfo.qualificationId = secondList.value[index].qualificationId; // 二级类目 code码赋值
};
// 展开选择二级行业弹窗
const openSecond = () => {
if (!secondList.value.length)
return uni.showToast({ title: "请先选择结算规则信息", icon: "none" });
secondListRef.value.open("bottom");
};
// 发起进件
const launchApply = (isTempData) => {
if (
!applyDetailInfo.storeUrl &&
!applyDetailInfo.storeQrCode &&
!isTempData
) {
return uni.showToast({
title: "商户链接,商户二维码二选一必填",
icon: "none",
});
}
// 获取受益人信息
if (applyDetailInfo.merchantType == 3) {
applyDetailInfo.companyBeneficiaryList = ownerCardRef.value.ownerInfo();
}
emit(
"applyHandle",
{
name: "sftpay",
isTempData,
applyDetailInfo,
formCheck: [applyDetailInfo.merchantType, applyDetailInfo.contactType],
},
((applyDetailInfo.merchantType == 3) && !applyDetailInfo.owner) // 该字段为true则对受益人信息进行校验
);
};
// 只读组件信息
let applyInfoRef = ref(null);
// 行业类型,地理位置回显
let codeBack = reactive({
bankCode: "", // 银行地址回显
branchCode: "", // 银行支行地址回显
});
// 合并信息方法, 职能读取,和信息回显,通过此方法合并
const assignObj = (obj) => {
Object.assign(applyDetailInfo, obj);
// 受益人信息回显
nextTick(() => {
if (ownerCardRef.value) ownerCardRef.value.ownerInfoBack(obj.companyBeneficiaryList)
})
// 行业类型,地理位置回显
codeBack.bankCode = obj.settAccountBankBranchAreaCode
? obj.settAccountBankBranchAreaCode[2]
: null;
codeBack.branchCode = obj.bankBranchAreaCode
? obj.bankBranchAreaCode[1]
: null;
// 根据商户类型 切换行业类型
if (obj.merchantType == 1) {
sftMccList.value = sftMcc.micro
} else if (obj.merchantType == 2) {
sftMccList.value = sftMcc.individual
} else if (obj.merchantType == 3) {
sftMccList.value = sftMcc.enterprise
}
if (obj.settlementId) {
setRulesText.value = sftMccList.value.find(val => val.settlementId == obj.settlementId).settlementName // 结算规则信息回显(通过settlementId匹配ID)
secondList.value = sftMccList.value.find(val => val.settlementId == obj.settlementId).qualification // 信息合并之后,要给二级类目数组赋值
}
// 为一级类目,二级类目选中的值做回显
for (let i = 0; i < sftMccList.value.length; i++) {
if (sftMccList.value[i].settlementId == obj.settlementId) {
setRulesIndex.value = i
break
}
}
for (let i = 0; i < secondList.value.length; i++) {
if (secondList.value[i].qualificationType == obj.mccCode) {
secondListIndex.value = i
break
}
}
// 以下用于只读信息页
obj.settAccountBankBranchAreaText = tool.addressBack(
obj.settAccountBankBranchAreaCode,
address
);
obj.bankBranchAreaCodeText = tool.addressBack(
obj.bankBranchAreaCode,
address,
sftAddress
);
obj.settAccountText = obj.settAccountType == "C" ? "对私" : "对公";
if (obj.merchantType == 1) {
obj.merchantText = "小微商户";
} else if (obj.merchantType == 2) {
obj.merchantText = "个体工商户";
} else if (obj.merchantType == 3) {
obj.merchantText = "企业";
} else {
obj.merchantText = "个人卖家";
}
// 传值给只读组件
if (applyInfoRef.value) applyInfoRef.value.getApplyInof(obj);
};
defineExpose({ launchApply, assignObj });
</script>
<style scoped lang="scss">
@import "../static/information.scss";
.set-rules {
width: 100%;
background: #fff;
padding: 30rpx;
box-sizing: border-box;
display: flex;
flex-direction: row;
justify-content: space-between;
image {
width: 40rpx;
height: 40rpx;
margin-left: 10rpx;
}
}
.firstradius {
border-top-left-radius: 10rpx;
border-top-right-radius: 10rpx;
}
</style>

View File

@@ -0,0 +1,139 @@
<template>
<view class="page">
<view class="pos-title" >
<text>pos产品开通</text>
<view class="btn" @click="addPos">添加POS终端</view>
</view>
<view v-for="(item, index) in posInfoList" :key="index" class="pos-list">
<view class="pos-title">
<text>pos终端{{ index + 1 }}</text>
<view class="btn remove" @click="removePos(index)">删除终端</view>
</view>
<JeePayForm text="pos安装位置" >
<!-- -->
<jeeDataPicker :localdata="address" :code="codeback[index]" @change="addressHandle($event, index)" paramType="arr" />
</JeePayForm>
<JeePayForm text="具体位置" v-model:value="item.terminalDetailAddress" />
<JeePayForm text="小品名称" v-model:value="item.ticketName" />
<JeePayForm text="终端数量" v-model:value="item.terminalCount" />
</view>
</view>
</template>
<script setup>
import { ref, reactive, toRaw } from 'vue'
import address from '@/components/applyJson/address.json' // 盛付通地址json
import JeePayForm from '@/components/applyComponents/JeePayForm.vue' // 通用左右结构布局
import jeeDataPicker from '@/components/applyComponents/dataPicker.vue' // 通用级联选择
// pos信息列表
let posInfoList = reactive([
{
terminalCityId: '', // pos位置
terminalDetailAddress: '', // 具体位置
ticketName: '', // 小票名称
terminalCount: '', // 终端数量
}
])
// 地址回显
let codeback = reactive([])
// pos信息合并
const merge = list => {
posInfoList.length = 0
posInfoList.push(...list)
posInfoList.forEach((item, index) => {
codeback[index] = item.terminalCityId[2]
})
}
// 选择地址回调
const addressHandle = (e, index) => {
posInfoList[index].terminalCityId = e.detail.value
codeback[index] = e.detail.value[2]
}
// 新增POS
const addPos = () => {
posInfoList.push({
terminalCityId: '', // pos位置
terminalDetailAddress: '', // 具体位置
ticketName: '', // 小票名称
terminalCount: '', // 终端数量
})
}
// 删除终端
const removePos = index => {
if (posInfoList.length == 1) return uni.showToast({
title: '最后一项不可删除',
icon: 'none'
})
posInfoList.splice(index, 1)
}
// 提供给父组件的数据
const getPosInfo = (isTempData) => {
let num = 0 // pos数量不能超过五个
// 先进行校验 在传给父元素
if (!isTempData) {
num =+posInfoList[i].terminalCount
for (var i = 0; i < posInfoList.length; i++) {
if (!posInfoList[i].terminalCityId || !posInfoList[i].terminalDetailAddress || !posInfoList[i].ticketName || !posInfoList[i].terminalCount) {
uni.showToast({
title: `${i + 1}项pos信息填写不完整`,
icon: 'none'
})
return false
}
if (num > 5) {
uni.showToast({title: '所有终端产品数量不能超过5个', icon: 'none'})
return false
}
}
}
return JSON.stringify(toRaw(posInfoList))
}
defineExpose({ getPosInfo, merge })
</script>
<style scoped lang="scss">
.page {
padding: 30rpx;
box-sizing: border-box;
}
.pos-title {
display: flex;
justify-content: space-between;
margin: 30rpx 0;
}
.btn {
border-radius: 10rpx;
background: #3981FF;
color: #fff;
padding: 5rpx 15rpx;
}
.remove {
background: #ff4d4f;
}
</style>

View File

@@ -0,0 +1,680 @@
<template>
<!-- 只读文件 -->
<readOnlyInfo
v-if="isDisable"
ref="applyInfoRef"
applyName="shengpay"
></readOnlyInfo>
<!-- 盛付通进件模板 -->
<view v-if="!isDisable">
<uni-collapse ref="collapse">
<uni-collapse-item
:show-animation="false"
title="基础信息"
class="coll-title"
:open="true"
>
<view class="content">
<JeePayForm text="商户类型">
<uni-data-checkbox
v-model="applyDetailInfo.merchantType"
:localdata="merchantTypeList"
@change="mchTypeInfo"
></uni-data-checkbox>
</JeePayForm>
<JeePayForm text="选择行业MCC">
<jeeDataPicker
:code="codeBack.mccCode"
:localdata="mcc"
@change="publicSelect($event, 'mccCode')"
paramType="last"
/>
</JeePayForm>
<JeePayForm
text="商户联系人姓名"
v-model:value="applyDetailInfo.contactName"
/>
<JeePayForm
text="商户联系人电话"
v-model:value="applyDetailInfo.contactPhone"
/>
<JeePayForm
text="商户联系人邮箱"
v-model:value="applyDetailInfo.contactEmail"
/>
</view>
</uni-collapse-item>
<uni-collapse-item
:show-animation="false"
title="经营信息"
class="coll-title"
>
<view class="content">
<JeePayForm
text="商户简称"
v-model:value="applyDetailInfo.mchShortName"
/>
<template v-if="applyDetailInfo.merchantType != 1">
<!-- 营业执照信息 小微不填 企业/个体工商户必填 -->
<JeePayForm text="营业执照图片">
<JeepayUpLoad
ocrFlag="license"
:imgUrl="applyDetailInfo.licenseImg"
@uploadSuccess="uploadSuccess($event, 'licenseImg')"
@clear="clear('licenseImg')"
/>
</JeePayForm>
<JeePayForm
text="营业执照编号"
v-model:value="applyDetailInfo.licenseNo"
/>
<JeePayForm text="营业执照起始有效期">
<termOfValidity
:defaultDate="applyDetailInfo.licenseEffectBegin"
@publicSelect="publicSelect($event, 'licenseEffectBegin')"
:isEnd="false"
/>
</JeePayForm>
<JeePayForm text="营业执照有效期截止">
<termOfValidity
:defaultDate="applyDetailInfo.licenseEffectEnd"
@publicSelect="publicSelect($event, 'licenseEffectEnd')"
/>
</JeePayForm>
</template>
<JeePayForm
text="商户名称全称"
v-model:value="applyDetailInfo.mchFullName"
/>
<JeePayForm
text="请输入商户详细地址"
v-model:value="applyDetailInfo.address"
/>
<JeePayForm text="商户地理位置选择省市县">
<jeeDataPicker
:code="codeBack.areaCode"
:localdata="address"
@change="publicSelect($event, 'areaCode')"
paramType="arr"
/>
</JeePayForm>
<JeePayForm text="门头照">
<JeepayUpLoad
:imgUrl="applyDetailInfo.storeOuterImg"
@uploadSuccess="uploadSuccess($event, 'storeOuterImg')"
@clear="clear('storeOuterImg')"
/>
</JeePayForm>
<JeePayForm text="收银台照片">
<JeepayUpLoad
:imgUrl="applyDetailInfo.storeCashierImg"
@uploadSuccess="uploadSuccess($event, 'storeCashierImg')"
@clear="clear('storeCashierImg')"
/>
</JeePayForm>
<JeePayForm text="店内环境照">
<JeepayUpLoad
:imgUrl="applyDetailInfo.storeInnerImg"
@uploadSuccess="uploadSuccess($event, 'storeInnerImg')"
@clear="clear('storeInnerImg')"
/>
</JeePayForm>
</view>
</uni-collapse-item>
<uni-collapse-item
:show-animation="false"
title="证件信息"
class="coll-title"
>
<view class="content">
<JeePayForm text="法人身份证人像面照">
<JeepayUpLoad
ocrFlag="idCard"
:imgUrl="applyDetailInfo.idcard1Img"
@uploadSuccess="uploadSuccess($event, 'idcard1Img')"
@clear="clear('idcard1Img')"
/>
</JeePayForm>
<JeePayForm text="法人身份证国徽面照片">
<JeepayUpLoad
ocrFlag="idCard"
:imgUrl="applyDetailInfo.idcard2Img"
@uploadSuccess="uploadSuccess($event, 'idcard2Img')"
@clear="clear('idcard2Img')"
/>
</JeePayForm>
<JeePayForm
text="法人身份证姓名"
v-model:value="applyDetailInfo.idcardName"
/>
<JeePayForm
text="法人身份证号"
v-model:value="applyDetailInfo.idcardNo"
/>
<JeePayForm
text="法人身份证居住地址"
v-model:value="applyDetailInfo.idcardAddress"
/>
<JeePayForm text="法人身份证起始有效期">
<termOfValidity
:defaultDate="applyDetailInfo.idcardEffectBegin"
@publicSelect="publicSelect($event, 'idcardEffectBegin')"
:isEnd="false"
/>
</JeePayForm>
<JeePayForm text="法人身份证结束有效期">
<termOfValidity
:defaultDate="applyDetailInfo.idcardEffectEnd"
@publicSelect="publicSelect($event, 'idcardEffectEnd')"
/>
</JeePayForm>
<JeePayForm text="法人手持身份证照片" :start="false">
<JeepayUpLoad
:imgUrl="applyDetailInfo.idcardInHandImg"
@uploadSuccess="uploadSuccess($event, 'idcardInHandImg')"
@clear="clear('idcardInHandImg')"
/>
</JeePayForm>
</view>
</uni-collapse-item>
<!-- 受益人卡片 -->
<ownerCard
v-if="applyDetailInfo.merchantType == '3'"
ref="ownerCardRef"
@setLegalInfo="setLegalInfo"
:legalBtn="true"
:isShengft="true"
/>
<uni-collapse-item
:show-animation="false"
title="联系人证件信息(联系人法人不一致时必填)"
class="coll-title"
>
<view class="content">
<JeePayForm text="商户联系人身份证人像面照片" :start="nameResult">
<JeepayUpLoad
ocrFlag="idCard"
:imgUrl="applyDetailInfo.contactIdcard1Img"
@uploadSuccess="uploadSuccess($event, 'contactIdcard1Img')"
@clear="clear('contactIdcard1Img')"
/>
</JeePayForm>
<JeePayForm text="商户联系人身份证国徽面照片" :start="nameResult">
<JeepayUpLoad
ocrFlag="idCard"
:imgUrl="applyDetailInfo.contactIdcard2Img"
@uploadSuccess="uploadSuccess($event, 'contactIdcard2Img')"
@clear="clear('contactIdcard2Img')"
/>
</JeePayForm>
<JeePayForm
text="商户联系人身份证号"
v-model:value="applyDetailInfo.contactIdcardNo"
:start="nameResult"
/>
<JeePayForm text="商户联系人身份证起始有效期" :start="nameResult">
<termOfValidity
:defaultDate="applyDetailInfo.contactIdcardEffectBegin"
@publicSelect="publicSelect($event, 'contactIdcardEffectBegin')"
:isEnd="false"
/>
</JeePayForm>
<JeePayForm text="商户联系人身份证结束有效期" :start="nameResult">
<termOfValidity
:defaultDate="applyDetailInfo.contactIdcardEffectEnd"
@publicSelect="publicSelect($event, 'contactIdcardEffectEnd')"
/>
</JeePayForm>
<JeePayForm
text="商户联系人身份证居住地址"
v-model:value="applyDetailInfo.contactIdcardAddress"
:start="nameResult"
/>
<JeePayForm text="业务办理授权函图片" :start="nameResult">
<JeepayUpLoad
ocrFlag="idCard"
:imgUrl="applyDetailInfo.contactWxAuthImg"
@uploadSuccess="uploadSuccess($event, 'contactWxAuthImg')"
@clear="clear('contactWxAuthImg')"
/>
</JeePayForm>
</view>
</uni-collapse-item>
<uni-collapse-item
:show-animation="false"
title="账号信息"
class="coll-title"
>
<view class="content">
<JeePayForm text="结算账号类型">
<uni-data-checkbox
v-model="applyDetailInfo.settAccountType"
:localdata="settlementTypeList"
></uni-data-checkbox>
</JeePayForm>
<JeePayForm
:text="
applyDetailInfo.settAccountType == 'B'
? '开户许可证照片'
: '结算银行卡照片'
"
>
<JeepayUpLoad
ocrFlag="bankCard"
:imgUrl="applyDetailInfo.settAccountLicenseImg"
@uploadSuccess="uploadSuccess($event, 'settAccountLicenseImg')"
@clear="clear('settAccountLicenseImg')"
/>
</JeePayForm>
<JeePayForm
:text="
applyDetailInfo.settAccountType == 'B'
? '对公账户名称'
: '持卡人姓名'
"
v-model:value="applyDetailInfo.settAccountName"
/>
<JeePayForm
:text="
applyDetailInfo.settAccountType == 'B' ? '对公账号' : '银行卡号'
"
v-model:value="applyDetailInfo.settAccountNo"
/>
<!-- 以下几个 开户银行名称支行所在地支行名称对公结算必填 -->
<template v-if="applyDetailInfo.settAccountType == 'B'">
<JeePayForm
text="开户银行名称"
v-model:value="applyDetailInfo.settAccountBankName"
/>
<JeePayForm text="开户银行卡分支行所在地区">
<jeeDataPicker
:code="codeBack.bankCode"
:localdata="address"
@change="publicSelect($event, 'settAccountBankBranchAreaCode')"
paramType="arr"
/>
</JeePayForm>
<JeePayForm
text="开户银行卡支行名称"
v-model:value="applyDetailInfo.settAccountBankBranchName"
/>
</template>
<!-- 企业类型 && 结算到个人 -->
<template
v-if="
applyDetailInfo.settAccountType == 'C' &&
applyDetailInfo.merchantType == 3
"
>
<JeePayForm
text="对公账户名称"
v-model:value="applyDetailInfo.companyAccountName"
/>
<JeePayForm
text="对公账户银行卡号"
v-model:value="applyDetailInfo.companyAccountNo"
/>
<JeePayForm
text="对公账户开户银行名称"
v-model:value="applyDetailInfo.companyAccountBankName"
/>
<JeePayForm text="对公账户开户支行所在地区">
<jeeDataPicker
:code="codeBack.branchCode"
:localdata="address"
@change="
publicSelect($event, 'companyAccountBankBranchAreaCode')
"
paramType="arr"
/>
</JeePayForm>
<JeePayForm
text="对公账户开户支行名称"
v-model:value="applyDetailInfo.companyAccountBankBranchName"
/>
<JeePayForm text="开户许可证照片">
<JeepayUpLoad
:imgUrl="applyDetailInfo.companyAccountLicenseImg"
@uploadSuccess="
uploadSuccess($event, 'companyAccountLicenseImg')
"
@clear="clear('companyAccountLicenseImg')"
/>
</JeePayForm>
</template>
<!-- 企业性质 && 对私结算 && 结算到非法人银行卡时 需要传以下信息 -->
<template
v-if="
(applyDetailInfo.merchantType == 2 ||
applyDetailInfo.merchantType == 3) &&
applyDetailInfo.settAccountType == 'C' &&
applyDetailInfo.settAccountName != applyDetailInfo.idcardName
"
>
<JeePayForm
text="持卡人身份证号"
v-model:value="applyDetailInfo.settAccountIdcardNo"
/>
<JeePayForm text="持卡人身份证人像照">
<JeepayUpLoad
ocrFlag="idCard"
:imgUrl="applyDetailInfo.settAccountIdcard1Img"
@uploadSuccess="uploadSuccess($event, 'settAccountIdcard1Img')"
@clear="clear('settAccountIdcard1Img')"
/>
</JeePayForm>
<JeePayForm text="持卡人身份证国徽面照片">
<JeepayUpLoad
ocrFlag="idCard"
:imgUrl="applyDetailInfo.settAccountIdcard2Img"
@uploadSuccess="uploadSuccess($event, 'settAccountIdcard2Img')"
@clear="clear('settAccountIdcard2Img')"
/>
</JeePayForm>
<JeePayForm text="持卡人身份证起始有效期">
<termOfValidity
:defaultDate="applyDetailInfo.settAccountIdcardEffectBegin"
@publicSelect="
publicSelect($event, 'settAccountIdcardEffectBegin')
"
:isEnd="false"
/>
</JeePayForm>
<JeePayForm text="持卡人身份证结束有效期">
<termOfValidity
:defaultDate="applyDetailInfo.settAccountIdcardEffectEnd"
@publicSelect="
publicSelect($event, 'settAccountIdcardEffectEnd')
"
/>
</JeePayForm>
</template>
</view>
</uni-collapse-item>
<!-- 盛付通费率组件 -->
<defaultRate ref="defaultRateRef" @autoPos="autoPosHandle" />
<!-- pos产品开通组件 -->
<autoPos ref="autoPosRef" v-if="vdata.isAutoPos" />
</uni-collapse>
</view>
<!-- 自主签约组件 -->
<signing v-if="channelInfo.state == 2" />
</template>
<script setup>
import { ref, reactive, toRaw, computed, inject, nextTick } from "vue";
import address from "@/components/applyJson/address.json"; // 地址
import mcc from "@/components/applyJson/mcc.json"; // 行业
import JeepayUpLoad from "@/components/JeepayUpLoad/JeepayUpLoad.vue"; // 图片上传
import defaultRate from "../../components/defaultRate.vue"; // 默认费率
import readOnlyInfo from "../../components/readOnlyInfo.vue"; // 只读文件
import tool from "@/util/tool.js"; // 工具类函数
import JeePayForm from "@/components/applyComponents/JeePayForm.vue"; // 通用左右结构布局
import termOfValidity from "@/components/applyComponents/termOfValidity.vue"; // 选择证件有效期
import jeeDataPicker from "@/components/applyComponents/dataPicker.vue"; // 通用级联选择
import ownerCard from "../../components/ownerCard.vue"; // 受益人卡片组件
import { filterDcit } from "@/hooks/dict"; // 字典
import signing from '../../components/signing.vue' // 自主签约组件
import autoPos from './pos.vue' // pos产品开通
const merchantTypeList = reactive(filterDcit(["A0", "A1", "A2"])); // 商家类型
const settlementTypeList = reactive(filterDcit(["B3", "B4"])); // 结算类型
const channelInfo = inject('channelInfo')
const emit = defineEmits(["applyHandle"]);
// 商户进件详细信息JSON类型字符串
let applyDetailInfo = reactive({
merchantType: 3, // 商户类型 默认为3 代表企业
settAccountType: "B", // 结算账号类型 默认为B 对公
companyBeneficiaryList: [], // 受益人
});
const vdata = reactive({
isAutoPos: true, // 是否展示pos产品开通组件
wayCodeList: [], // 渠道名称列表
})
// 判断渠道名称中,是否包含 auto-pos
const posHandle = list => {
list.forEach(item => vdata.wayCodeList.push(item))
return vdata.wayCodeList.includes('AUTO_POS')
}
// 费率组件内部 开启或关闭auto-pos的回调
const autoPosHandle = flag => {
vdata.isAutoPos = flag
if (!flag) applyDetailInfo.posListStr = [] // pos信息重置
}
let autoPosRef = ref(null) // pos产品开通组件
let ownerCardRef = ref(null); // 受益人卡片
let defaultRateRef = ref(null); // 费率组件
// 将法人信息传递给受益人
const setLegalInfo = (index) => {
ownerCardRef.value.getLegalInfo(
{
idcard1Img: applyDetailInfo.idcard1Img ? applyDetailInfo.idcard1Img : "",
idcard2Img: applyDetailInfo.idcard2Img ? applyDetailInfo.idcard2Img : "",
idcardNo: applyDetailInfo.idcardNo ? applyDetailInfo.idcardNo : "",
idcardName: applyDetailInfo.idcardName ? applyDetailInfo.idcardName : "",
idcardAddress: applyDetailInfo.idcardAddress
? applyDetailInfo.idcardAddress
: "",
idcardEffectEnd: applyDetailInfo.idcardEffectEnd
? applyDetailInfo.idcardEffectEnd
: "",
idcardEffectBegin: applyDetailInfo.idcardEffectBegin
? applyDetailInfo.idcardEffectBegin
: "",
},
index
);
};
// 法人与商户联系人不一致时,联系人证件信息必填(判断二者姓名)(加上*号)
let nameResult = computed(() => {
return !(applyDetailInfo.contactName === applyDetailInfo.idcardName);
});
// 状态分类: 0-未发起、 1-审核中、 2-进件成功、 3-驳回待修改、 4-待验证、 5-待签约
// 当状态为 0 2 4 5 时要开启只读模式1 3 不开启
let isDisable = ref(false);
if (!["0", "3", "8"].includes(channelInfo.state)) isDisable.value = true;
// 通用选择函数
const publicSelect = (e, key) => {
applyDetailInfo[key] = e.detail.value;
};
// 上传图片成功
const uploadSuccess = (res, name) => {
applyDetailInfo[name] = res.data;
if (res.ocrInfo && Object.keys(res.ocrInfo).length < 1) return false;
// OCR图片识别 idCard-身份证 idcard1Imgidcard2Img license-营业执照 licenseImg
// ocr识别返回的字段与当前字段不一致时走以下判断
if (name == "settAccountIdcard2Img") {
applyDetailInfo.settAccountIdcardEffectBegin =
res.ocrInfo.idcardEffectBegin; // 持卡人有效期
applyDetailInfo.settAccountIdcardEffectEnd = res.ocrInfo.idcardEffectEnd; // 持卡人有效期end
return;
}
if (name == "contactIdcard1Img") {
// 商户联系人身份证人像面照片回显
applyDetailInfo.contactIdcardNo = res.ocrInfo.idcardNo;
applyDetailInfo.contactIdcardAddress = res.ocrInfo.idcardAddress;
return;
}
if (name == "contactIdcard2Img") {
// 商户联系人身份证国徽面照片回显
applyDetailInfo.contactIdcardEffectBegin = res.ocrInfo.idcardEffectBegin;
applyDetailInfo.contactIdcardEffectEnd = res.ocrInfo.idcardEffectEnd;
return;
}
Object.assign(applyDetailInfo, res.ocrInfo); // ocr信息回显字段一致直接合并
};
// 清除图片 仅前端
const clear = (name, url) => (applyDetailInfo[name] = "");
// 发起进件 注意后面的formCheck参数表单校验要用
const launchApply = (isTempData) => {
// 有费率的进件渠道,要在发起进件之前,获取所选择的费率信息
applyDetailInfo.paywayFeeList = defaultRateRef.value.getList(isTempData)
if (applyDetailInfo.paywayFeeList.length <= 0 && !isTempData) {
return uni.showToast({
title: '请至少包含一个签约产品, 若无产品请先配置服务商相关底价信息。', icon: 'none'
})
}
// pos信息
if (vdata.isAutoPos) {
applyDetailInfo.posListStr = autoPosRef.value.getPosInfo(isTempData)
// pos组件内校验失败ruturn false了所以这里也不能进行下一步了
if (!applyDetailInfo.posListStr) return
}
// 获取受益人信息
if (applyDetailInfo.merchantType == 3) {
applyDetailInfo.companyBeneficiaryList = ownerCardRef.value.ownerInfo();
}
emit(
"applyHandle",
{
name: "shengpay",
isTempData,
applyDetailInfo,
formCheck: [
applyDetailInfo.merchantType,
applyDetailInfo.settAccountType,
applyDetailInfo.settAccountName,
applyDetailInfo.idcardName,
toRaw(nameResult.value),
],
},
applyDetailInfo.merchantType == 3 // 该字段为true则对受益人信息进行校验
);
};
// 只读组件信息
let applyInfoRef = ref(null);
// 行业类型,地理位置回显
let codeBack = reactive({
areaCode: "", // 商户地理位置回显
bankCode: "", // 银行地址回显
mccCode: "", // 行业回显
branchCode: "", // 企业类型 && 结算到个人 银行支行地址回显
});
// 合并信息方法, 职能读取,和信息回显,通过此方法合并
const assignObj = (obj) => {
Object.assign(applyDetailInfo, obj);
posHandle(obj.paywayFeeList) // 费率信息中存在 AUTO_POS 则打开pos组件
// 受益人信息回显
nextTick(() => {
// 受益人组件信息回显
if (ownerCardRef.value) ownerCardRef.value.ownerInfoBack(obj.companyBeneficiaryList)
// pos信息组件信息回显
if (autoPosRef.value) autoPosRef.value.merge(JSON.parse(obj.posListStr))
})
if (!isDisable.value) {
ownerCardRef.value.ownerInfoBack(obj.companyBeneficiaryList); // 受益人信息回显
// 行业类型,地理位置回显
codeBack.areaCode = obj.areaCode ? obj.areaCode[2] : obj.areaCode;
codeBack.bankCode = obj.settAccountBankBranchAreaCode
? obj.settAccountBankBranchAreaCode[2]
: null;
codeBack.mccCode = obj.mccCode;
codeBack.branchCode = obj.companyAccountBankBranchAreaCode
? obj.companyAccountBankBranchAreaCode[2]
: null;
}
// 以下用于只读信息页
let mccInfo; // 行业文字回显
for (var i = 0; i < mcc.length; i++) {
mccInfo = mcc[i].children.find((val) => val.value == obj.mccCode);
if (mccInfo) break;
}
obj.mccText = mccInfo ? mccInfo.text : ""; // 行业码转文字
obj.areaText = tool.addressBack(obj.areaCode, address); // 地址码转文字
obj.settAccountBankBranchAreaText = tool.addressBack(
obj.settAccountBankBranchAreaCode,
address
);
obj.settAccountText = obj.settAccountType == "C" ? "对私" : "对公";
obj.merchantText =
obj.merchantType == 1
? "小微企业"
: obj.merchantType == 2
? "个体工商户"
: "企业";
// pos信息
let posInfoList = JSON.parse(obj.posListStr)
if (posInfoList && posInfoList.length > 0) {
posInfoList.forEach(item => {
item.areaText = tool.addressBack(item.terminalCityId, address)
})
}
obj.posInfoList = posInfoList
// 传值给只读组件
if (applyInfoRef.value) applyInfoRef.value.getApplyInof(obj);
};
defineExpose({ launchApply, assignObj });
</script>
<style scoped lang="scss">
@import "../../static/information.scss";
</style>

View File

@@ -0,0 +1,55 @@
<template>
<view>
<defaultRate ref="defaultRateRef" title="新增支付类型" isCheck="all" :isUtmpay="true" />
<!-- 银联前置平台专属 -->
<view class="submit" @click="submitHandle">保存新增支付类型</view>
</view>
</template>
<script setup>
import { ref, reactive, inject, toRaw } from 'vue'
import { $payConfAdd } from '@/http/apiManager.js'
import defaultRate from '../../components/defaultRate.vue' // 默认费率
let vdata = reactive({
paywayFeeList: []
})
const defaultRateRef = ref()
const channelInfo = inject('channelInfo')
const submitHandle = () => {
// 拿费率组件的值
applyDetailInfo.paywayFeeList = defaultRateRef.value.getList(false)
payConfAdd()
}
const payConfAdd = () => {
$payConfAdd(channelInfo.applyId, { paywayFeeList: toRaw(vdata.paywayFeeList) }).then((res) => {
console.log(vdata.paywayFeeList)
uni.showToast({title: '保存成功', icon: 'none'})
})
}
</script>
<style scoped lang="scss">
.submit{
display: flex;
justify-content: center;
margin: 30rpx auto;
width: 380rpx;
height: 90rpx;
line-height: 90rpx;
border-radius: 10rpx;
background: #3981FF;
font-weight: 500;
font-size: 30rpx;
color: #fff;
}
</style>

View File

@@ -0,0 +1,238 @@
<template>
<!-- 盛付通进件模板 -->
<view v-if="!isDisable">
<uni-collapse ref="collapse">
<uni-collapse-item :show-animation="false" title="基础信息" class="coll-title" :open="true">
<view class="content">
<JeePayForm text="商户类型" >
<radio-group class="radio-group" @change="publicSelect($event, 'merchantType')" >
<label class="radio"><radio value="2" :checked="applyDetailInfo.merchantType == '2'" />个体工商户</label>
<label class="radio"><radio value="3" :checked="applyDetailInfo.merchantType == '3'" />企业</label>
</radio-group>
</JeePayForm>
<JeePayForm text="执照类型" >
<radio-group class="radio-group" @change="publicSelect($event, 'businessLicenseType')" >
<label class="radio"><radio value="00" :checked="applyDetailInfo.businessLicenseType == '00'" />统一社会信用代码证号(三证合一)</label>
<label class="radio"><radio value="01" :checked="applyDetailInfo.businessLicenseType == '01'" />营业执照(非三证合一)</label>
<label class="radio"><radio value="02" :checked="applyDetailInfo.businessLicenseType == '02'" />其他</label>
</radio-group>
</JeePayForm>
<JeePayForm text="营业执照图片">
<JeepayUpLoad ocrFlag="license" :imgUrl="applyDetailInfo.licenseImg" @uploadSuccess="uploadSuccess($event, 'licenseImg')" @clear="clear('licenseImg')" />
</JeePayForm>
<JeePayForm text="营业执照编号" v-model:value="applyDetailInfo.licenseNo" />
<JeePayForm text="法人姓名" v-model:value="applyDetailInfo.legalPerson" />
<JeePayForm text="用户名称" v-model:value="applyDetailInfo.mchFullName" />
<JeePayForm text="商户简称" v-model:value="applyDetailInfo.mchShortName" />
<JeePayForm text="法人身份证人像面照">
<JeepayUpLoad ocrFlag="idCard" :imgUrl="applyDetailInfo.idcard1Img" @uploadSuccess="uploadSuccess($event, 'idcard1Img')" @clear="clear('idcard1Img')" />
</JeePayForm>
<JeePayForm text="法人身份证国徽面照片">
<JeepayUpLoad ocrFlag="idCard" :imgUrl="applyDetailInfo.idcard2Img" @uploadSuccess="uploadSuccess($event, 'idcard2Img')" @clear="clear('idcard2Img')" />
</JeePayForm>
<JeePayForm text="联系人身份证姓名" v-model:value="applyDetailInfo.idcardName" />
<JeePayForm text="联系人身份证号" v-model:value="applyDetailInfo.idcardNo" />
<JeePayForm text="商户联系人手机号" v-model:value="applyDetailInfo.contactPhone" />
<JeePayForm text="商户联系人邮箱" v-model:value="applyDetailInfo.contactEmail" />
</view>
</uni-collapse-item>
<uni-collapse-item :show-animation="false" title="经营信息" class="coll-title">
<view class="content">
<JeePayForm text="经营类目" >
<jeeDataPicker :code="codeBack.mccCode" :localdata="mcc" @change="publicSelect($event, 'mccCode')" paramType="last" />
</JeePayForm>
<JeePayForm text="商户地理位置选择省市县" >
<jeeDataPicker :code="codeBack.areaCode" :localdata="address" @change="publicSelect($event, 'areaCode')" paramType="arr" />
</JeePayForm>
<JeePayForm text="商户经营地址" v-model:value="applyDetailInfo.address" />
<JeePayForm text="客服电话" v-model:value="applyDetailInfo.customerPhone" />
<JeePayForm text="门头照">
<JeepayUpLoad :imgUrl="applyDetailInfo.storeOuterImg" @uploadSuccess="uploadSuccess($event, 'storeOuterImg')" @clear="clear('storeOuterImg')" />
</JeePayForm>
<JeePayForm text="店内环境照">
<JeepayUpLoad :imgUrl="applyDetailInfo.storeInnerImg" @uploadSuccess="uploadSuccess($event, 'storeInnerImg')" @clear="clear('storeInnerImg')" />
</JeePayForm>
</view>
</uni-collapse-item>
<uni-collapse-item :show-animation="false" title="账户信息" class="coll-title">
<view class="content">
<JeePayForm text="账户类型" >
<radio-group class="radio-group" @change="publicSelect($event, 'settAccountType')" >
<label class="radio"><radio value="C" :checked="applyDetailInfo.settAccountType == 'C'" />个人</label>
<label class="radio"><radio value="B" :checked="applyDetailInfo.settAccountType == 'B'" />企业</label>
</radio-group>
</JeePayForm>
<JeePayForm text="是否为负责人信息" >
<radio-group class="radio-group" @change="publicSelect($event, 'isContactInfo')" >
<label class="radio"><radio value="1" :checked="applyDetailInfo.isContactInfo == '1'" /></label>
<label class="radio"><radio value="0" :checked="applyDetailInfo.isContactInfo == '0'" /></label>
</radio-group>
</JeePayForm>
<JeePayForm text="银行开户名" v-model:value="applyDetailInfo.settAccountName" />
<JeePayForm text="持卡人身份证号" v-model:value="applyDetailInfo.settAccountIdcardNo" v-if="applyDetailInfo.settAccountType == 'C'" :start="false" />
<JeePayForm text="银行预留手机号" v-model:value="applyDetailInfo.bankCardPhone" />
<JeePayForm text="银行卡照片" :start="false">
<JeepayUpLoad ocrFlag="bankCard" :imgUrl="applyDetailInfo.settAccountLicenseImg" @uploadSuccess="uploadSuccess($event, 'settAccountLicenseImg')" @clear="clear('settAccountLicenseImg')" />
</JeePayForm>
<JeePayForm text="银行账号" v-model:value="applyDetailInfo.settAccountNo" />
<JeePayForm text="开户行省市县" >
<jeeDataPicker :code="codeBack.settAccountBankBranchAreaCode" :localdata="address" @change="publicSelect($event, 'settAccountBankBranchAreaCode')" paramType="arr" />
</JeePayForm>
<JeePayForm text="开户行支行名称" v-model:value="applyDetailInfo.settAccountBankBranchName" :start="false" />
<JeePayForm text="开户银行ID" v-model:value="applyDetailInfo.bankId" />
<JeePayForm text="联行行号" v-model:value="applyDetailInfo.contactLine" />
</view>
</uni-collapse-item>
<uni-collapse-item :show-animation="false" title="其他信息" class="coll-title">
<view class="content">
<JeePayForm text="商户协议照片1" :start="false">
<JeepayUpLoad :imgUrl="applyDetailInfo.protocolPhoto1" @uploadSuccess="uploadSuccess($event, 'protocolPhoto1')" @clear="clear('protocolPhoto1')" />
</JeePayForm>
<JeePayForm text="商户协议照片2" :start="false">
<JeepayUpLoad :imgUrl="applyDetailInfo.protocolPhoto2" @uploadSuccess="uploadSuccess($event, 'protocolPhoto2')" @clear="clear('protocolPhoto2')" />
</JeePayForm>
<JeePayForm text="商户协议照片3" :start="false">
<JeepayUpLoad :imgUrl="applyDetailInfo.protocolPhoto3" @uploadSuccess="uploadSuccess($event, 'protocolPhoto3')" @clear="clear('protocolPhoto3')" />
</JeePayForm>
<JeePayForm text="商户协议照片4" :start="false">
<JeepayUpLoad :imgUrl="applyDetailInfo.protocolPhoto4" @uploadSuccess="uploadSuccess($event, 'protocolPhoto4')" @clear="clear('protocolPhoto4')" />
</JeePayForm>
<JeePayForm text="组织机构代码证照片" :start="false">
<JeepayUpLoad :imgUrl="applyDetailInfo.orgPhoto" @uploadSuccess="uploadSuccess($event, 'orgPhoto')" @clear="clear('orgPhoto')" />
</JeePayForm>
<JeePayForm text="其他资料照片" :start="false">
<JeepayUpLoad :imgUrl="applyDetailInfo.otherDoc" @uploadSuccess="uploadSuccess($event, 'otherDoc')" @clear="clear('otherDoc')" />
</JeePayForm>
</view>
</uni-collapse-item>
<!-- 费率组件 银联前置平台在驳回待修改时不显示费率板块 -->
<defaultRate ref="defaultRateRef" isCheck="all" v-if="channelInfo.state == 0" />
</uni-collapse>
</view>
<!-- 只读文件 进件完成后的额外操作 -->
<readOnlyInfo v-if="isDisable" ref="applyInfoRef" applyName="utmpay" />
<utmRead v-if="channelInfo.state != 0" />
</template>
<script setup>
import {ref , reactive, computed, toRaw, inject } from 'vue'
import address from '@/components/applyJson/ysfAddress.json' // 地址
import mcc from '@/components/applyJson/jeePayMcc.json' // 行业
import JeepayUpLoad from '@/components/JeepayUpLoad/JeepayUpLoad.vue' // 图片上传
import defaultRate from '../../components/defaultRate.vue' // 默认费率
import readOnlyInfo from '../../components/readOnlyInfo.vue' // 只读文件
import tool from '@/util/tool.js' // 工具类函数
import JeePayForm from '@/components/applyComponents/JeePayForm.vue' // 通用左右结构布局
import jeeDataPicker from '@/components/applyComponents/dataPicker.vue' // 通用级联选择
import utmRead from './utmRead.vue' // 服务于进件完成之后的操作
const channelInfo = inject('channelInfo')
const defaultRateRef = ref(null)
const emit = defineEmits(['applyHandle'])
// 状态分类: 0-未发起、 1-审核中、 2-进件成功、 3-驳回待修改、 4-待验证、 5-待签约
// 当状态为 1 2 4 5 时要开启只读模式1 3 不开启
let isDisable = ref(false)
if (!['0', '3', '8'].includes(channelInfo.state)) isDisable.value = true
// 商户进件详细信息JSON类型字符串
let applyDetailInfo = reactive({})
// 通用选择函数
const publicSelect = (e, key) => {
applyDetailInfo[key] = e.detail.value
// 是负责人直接赋值,不是清空
if (key == 'isContactInfo') {
if (e.detail.value == '1') {
applyDetailInfo.settAccountName = applyDetailInfo.idcardName
applyDetailInfo.settAccountIdcardNo = applyDetailInfo.idcardNo
applyDetailInfo.bankCardPhone = applyDetailInfo.contactPhone
} else {
applyDetailInfo.settAccountName = applyDetailInfo.settAccountIdcardNo = applyDetailInfo.bankCardPhone = ''
}
}
}
// 上传图片成功
const uploadSuccess = (res, name) => {
applyDetailInfo[name] = res.data
if (res.ocrInfo && Object.keys(res.ocrInfo).length < 1) return false
// OCR图片识别 idCard-身份证 idcard1Imgidcard2Img license-营业执照 licenseImg
Object.assign(applyDetailInfo, res.ocrInfo) // ocr信息回显字段一致直接合并
}
// 清除图片 仅前端
const clear = (name, url) => applyDetailInfo[name] = ''
// 发起进件 注意后面的formCheck参数表单校验要用
const launchApply = isTempData => {
if (channelInfo.state == 0) {
applyDetailInfo.paywayFeeList = defaultRateRef.value.getList(isTempData)
}
emit('applyHandle', {name: 'utmpay', isTempData, applyDetailInfo})
}
// 只读组件信息
let applyInfoRef = ref(null)
// 行业类型,地理位置回显
let codeBack = reactive({
areaCode: '', // 商户地理位置回显
mccCode: '', // 行业回显
})
// 合并信息方法, 职能读取,和信息回显,通过此方法合并
const assignObj = (obj) => {
Object.assign(applyDetailInfo, obj)
if(!isDisable.value) {
// 行业类型,地理位置回显
codeBack.areaCode = obj.areaCode ? obj.areaCode[2] : obj.areaCode
codeBack.mccCode = obj.mccCode
} else {
// 以下用于只读信息页
obj.mccText = tool.mccBack(obj.mccCode, mcc, 'last') // 行业码转文字
obj.areaText = tool.addressBack(obj.areaCode, address) // 地址码转文字
obj.settAccountBankBranchAreaText = tool.addressBack(obj.settAccountBankBranchAreaCode, address)
// 传值给只读组件
if(applyInfoRef.value) applyInfoRef.value.getApplyInof(obj)
}
}
defineExpose({ launchApply, assignObj})
</script>
<style scoped lang="scss">
@import '../../static/information.scss';
</style>

View File

@@ -0,0 +1,709 @@
<template>
<!-- 只读文件 -->
<readOnlyInfo v-if="isDisable" ref="applyInfoRef" applyName="wxpay" />
<!-- 该页码为填写信息的组件 -->
<view v-if="!isDisable">
<uni-collapse ref="collapse">
<uni-collapse-item title="主体信息" class="coll-title" :open="true">
<view class="content">
<JeePayForm text="选择商户类型">
<uni-data-checkbox
v-model="applyDetailInfo.merchantType"
:localdata="merchantTypeList"
></uni-data-checkbox>
</JeePayForm>
<JeePayForm text="营业执照照片">
<JeepayUpLoad
ocrFlag="license"
:imgUrl="applyDetailInfo.licenseImg"
@uploadSuccess="uploadSuccess($event, 'licenseImg')"
@clear="clear('licenseImg')"
/>
</JeePayForm>
<JeePayForm
text="营业执照编号"
v-model:value="applyDetailInfo.licenseNo"
/>
<JeePayForm
text="商户名称全称"
v-model:value="applyDetailInfo.mchFullName"
/>
<JeePayForm text="法人身份证人像面照">
<JeepayUpLoad
ocrFlag="idCard"
:imgUrl="applyDetailInfo.idcard1Img"
@uploadSuccess="uploadSuccess($event, 'idcard1Img')"
@clear="clear('idcard1Img')"
/>
</JeePayForm>
<JeePayForm text="法人身份证国徽面照">
<JeepayUpLoad
ocrFlag="idCard"
:imgUrl="applyDetailInfo.idcard2Img"
@uploadSuccess="uploadSuccess($event, 'idcard2Img')"
@clear="clear('idcard2Img')"
/>
</JeePayForm>
<JeePayForm
text="法人身份证姓名"
v-model:value="applyDetailInfo.idcardName"
/>
<JeePayForm
text="法人身份证号"
v-model:value="applyDetailInfo.idcardNo"
/>
<JeePayForm
v-if="applyDetailInfo.merchantType == 3"
text="法人身份证居住地址"
v-model:value="applyDetailInfo.idcardAddress"
/>
<JeePayForm text="法人身份证起始有效期">
<termOfValidity
:defaultDate="applyDetailInfo.idcardEffectBegin"
@publicSelect="publicSelect($event, 'idcardEffectBegin')"
:isEnd="false"
/>
</JeePayForm>
<JeePayForm text="法人身份证结束有效期">
<termOfValidity
:defaultDate="applyDetailInfo.idcardEffectEnd"
@publicSelect="publicSelect($event, 'idcardEffectEnd')"
/>
</JeePayForm>
<JeePayForm
text="经营者/法人是否为受益人"
v-if="applyDetailInfo.merchantType == '3'"
>
<view>
{{ applyDetailInfo.owner ? "是" : "否" }}
<switch
@change="publicSelect($event, 'owner')"
:checked="applyDetailInfo.owner"
/>
</view>
</JeePayForm>
</view>
</uni-collapse-item>
<!-- 受益人卡片 -->
<ownerCard
v-if="applyDetailInfo.merchantType == '3'"
ref="ownerCardRef"
:isOwner="applyDetailInfo.owner"
:ownerInfoBack="applyDetailInfo.companyBeneficiaryList"
/>
<uni-collapse-item title="经营信息" class="coll-title">
<view class="content">
<JeePayForm
text="商户简称"
v-model:value="applyDetailInfo.mchShortName"
/>
<JeePayForm
text="客服电话"
v-model:value="applyDetailInfo.servicePhone"
/>
<JeePayForm
text="门店名称"
v-model:value="applyDetailInfo.storeName"
/>
<JeePayForm text="商户地理位置选择省市县">
<jeeDataPicker
:code="areaCode"
:localdata="address"
@change="publicSelect($event, 'areaCode')"
paramType="arr"
/>
</JeePayForm>
<JeePayForm
text="商户详细地址"
v-model:value="applyDetailInfo.address"
/>
<JeePayForm text="门头照">
<JeepayUpLoad
ocrFlag="idCard"
:imgUrl="applyDetailInfo.storeOuterImg"
@uploadSuccess="uploadSuccess($event, 'storeOuterImg')"
@clear="clear('storeOuterImg')"
/>
</JeePayForm>
<JeePayForm text="店内环境照">
<JeepayUpLoad
ocrFlag="idCard"
:imgUrl="applyDetailInfo.storeInnerImg"
@uploadSuccess="uploadSuccess($event, 'storeInnerImg')"
@clear="clear('storeInnerImg')"
/>
</JeePayForm>
</view>
</uni-collapse-item>
<uni-collapse-item title="结算规则" class="coll-title">
<view class="content">
<JeePayForm text="结算规则信息">
<view @click="setRulesRef.open('bottom')">{{
setRulesText ? setRulesText : "请选择"
}}</view>
</JeePayForm>
<JeePayForm text="选择行业">
<view @click="openSecond">{{
applyDetailInfo.mccCode ? applyDetailInfo.mccCode : "请选择"
}}</view>
</JeePayForm>
<!-- 该特殊资质照并非每个行业都必填根据 isNeedQualification 判断-->
<JeePayForm
text="特殊资质照"
:start="applyDetailInfo.isNeedQualification"
>
<JeepayUpLoad
ocrFlag="idCard"
:imgUrl="applyDetailInfo.qualifications"
@uploadSuccess="uploadSuccess($event, 'qualifications')"
@clear="clear('qualifications')"
/>
</JeePayForm>
<!-- 优惠费率活动费率值 商户不可修改 根据 isInActivities 判断是否展开 -->
<JeePayForm text="优惠费率活动">
<picker
@change="activityChange"
:value="activityIndex"
:range="activityList"
>
<view class="uni-input">{{
activityIndex == 0
? "泛行业活动【优惠区间0.2%~0.6%】"
: "不参与活动"
}}</view>
</picker>
</JeePayForm>
<!-- 撑开高度的元素 -->
<!-- <view style="height: 200px"></view> -->
</view>
</uni-collapse-item>
<uni-collapse-item title="结算账户" class="coll-title">
<view class="content">
<JeePayForm text="结算账号类型">
<uni-data-checkbox
v-model="applyDetailInfo.settAccountType"
:localdata="settlementTypeList"
></uni-data-checkbox>
</JeePayForm>
<JeePayForm
text="开户名称"
v-model:value="applyDetailInfo.settAccountName"
/>
<JeePayForm
text="银行卡账号"
v-model:value="applyDetailInfo.settAccountNo"
/>
<JeePayForm text="开户行">
<uni-data-picker
:localdata="data.bankList"
v-model="applyDetailInfo.settAccountBankName"
:value="BankName"
@change="BankChange"
v-slot:default="{ data, error, options }"
>
{{
applyDetailInfo.settAccountBankName
? applyDetailInfo.settAccountBankName
: "请选择"
}}
</uni-data-picker>
</JeePayForm>
<JeePayForm text="结算银行卡分支行所在地区">
<jeeDataPicker
:code="bankCode"
:localdata="address"
@change="publicSelect($event, 'settAccountBankBranchAreaCode')"
paramType="arr"
/>
</JeePayForm>
<JeePayForm
v-if="
!applyDetailInfo.settAccountBankName ||
applyDetailInfo.settAccountBankName == '其他银行'
"
text="开户行支行名称"
v-model:value="applyDetailInfo.settAccountBankBranchName"
/>
</view>
</uni-collapse-item>
<uni-collapse-item title="超管信息" class="coll-title">
<view class="content">
<JeePayForm text="超管身份">
<uni-data-checkbox
v-model="applyDetailInfo.contactType"
:localdata="superList"
></uni-data-checkbox>
</JeePayForm>
<template v-if="applyDetailInfo.contactType == 'SUPER'">
<JeePayForm text="超管身份证人像面照片">
<JeepayUpLoad
ocrFlag="idCard"
:imgUrl="applyDetailInfo.contactIdDocCopy"
@uploadSuccess="uploadSuccess($event, 'contactIdDocCopy')"
@clear="clear('contactIdDocCopy')"
/>
</JeePayForm>
<JeePayForm text="超管身份证国徽面照片">
<JeepayUpLoad
ocrFlag="idCard"
:imgUrl="applyDetailInfo.contactIdDocCopyBack"
@uploadSuccess="uploadSuccess($event, 'contactIdDocCopyBack')"
@clear="clear('contactIdDocCopyBack')"
/>
</JeePayForm>
<JeePayForm
text="超管身份证姓名"
v-model:value="applyDetailInfo.contactName"
/>
<JeePayForm
text="超管身份证号"
v-model:value="applyDetailInfo.contactIdNumber"
/>
<JeePayForm text="超管身份证起始有效期">
<termOfValidity
:defaultDate="applyDetailInfo.contactIdDocPeriodBegin"
@publicSelect="publicSelect($event, 'contactIdDocPeriodBegin')"
:isEnd="false"
/>
</JeePayForm>
<JeePayForm text="超管身份证结束有效期">
<termOfValidity
:defaultDate="applyDetailInfo.contactIdDocPeriodEnd"
@publicSelect="publicSelect($event, 'contactIdDocPeriodEnd')"
/>
</JeePayForm>
<JeePayForm text="业务办理授权函">
<JeepayUpLoad
:imgUrl="applyDetailInfo.businessAuthorizationLetter"
@uploadSuccess="
uploadSuccess($event, 'businessAuthorizationLetter')
"
@clear="clear('businessAuthorizationLetter')"
/>
</JeePayForm>
</template>
<JeePayForm
text="手机号"
v-model:value="applyDetailInfo.contactPhone"
/>
<JeePayForm
text="邮箱"
v-model:value="applyDetailInfo.contactEmail"
/>
</view>
</uni-collapse-item>
<!-- 费率组件 -->
<defaultRate
v-if="activityIndex == 0"
ref="defaultRateRef"
isCheck="all"
/>
</uni-collapse>
<!-- 一级类目弹窗 -->
<uni-popup ref="setRulesRef" type="bottom">
<scroll-view
:scroll-y="true"
style="width: 100%; height: 50vh; overflow: auto; background: #fff"
class="firstradius"
>
<view
v-for="(item, index) in mccWxList"
:key="index"
:class="{ firstradius: index === 0 }"
class="set-rules"
@click="selectRule(index)"
>
<view>
<text>{{ item.settlementName }}</text>
<text style="color: #8c8c8c; margin-left: 20px">{{
item.settRule
}}</text>
</view>
<view>
<image
v-if="index === setRulesIndex"
src="../../static/indexImg/select-radio.svg"
mode=""
></image>
<image
v-else
src="../../static/indexImg/un-raido.svg"
mode=""
></image>
</view>
</view>
</scroll-view>
</uni-popup>
<!-- 二级类目弹窗 -->
<uni-popup ref="secondListRef" type="bottom">
<scroll-view
:scroll-y="true"
style="width: 100%; height: 50vh; overflow: auto; background: #fff"
class="firstradius"
>
<view
v-for="(item, index) in secondList"
:key="index"
:class="{ firstradius: index === 0 }"
class="set-rules"
@click="secondListChange(index)"
>
<view>
<text>{{ item.qualificationType }}</text>
<text style="color: #8c8c8c; margin-left: 20px">{{
item.qualifications
}}</text>
</view>
<view>
<image
v-if="index === secondListIndex"
src="../../static/indexImg/select-radio.svg"
mode=""
></image>
<image
v-else
src="../../static/indexImg/un-raido.svg"
mode=""
></image>
</view>
</view>
</scroll-view>
</uni-popup>
</view>
</template>
<script setup>
import { ref, reactive, inject, nextTick } from "vue";
import address from "@/components/applyJson/address.json"; // 地址
import mccWx from "@/components/applyJson/mccWx.json"; // 行业
import defaultRate from "../components/defaultRate.vue"; // 默认费率
import JeepayUpLoad from "@/components/JeepayUpLoad/JeepayUpLoad.vue"; // 图片上传
import readOnlyInfo from "../components/readOnlyInfo.vue"; // 只读文件
import tool from "@/util/tool.js"; // 工具类函数
import JeePayForm from "@/components/applyComponents/JeePayForm.vue"; // 通用左右结构布局
import termOfValidity from "@/components/applyComponents/termOfValidity.vue"; // 选择证件有效期
import JeeDataPicker from "@/components/applyComponents/dataPicker.vue"; // 通用级联选择
import ownerCard from "../components/ownerCard.vue"; // 受益人卡片组件
import { filterDcit } from "@/hooks/dict.js"; //字典
const merchantTypeList = reactive(filterDcit(["A1", "A2"])); //商户类型
const settlementTypeList = reactive(filterDcit(["B0", "B1"])); // 结算类型
const superList = reactive(filterDcit(["L0", "L1"])); // 超管身份
const channelInfo = inject('channelInfo')
const emit = defineEmits(["applyHandle"]);
let applyInfoRef = ref(null); // 只读组件信息
let ownerCardRef = ref(null); // 受益人卡片
const defaultRateRef = ref(null); // 默认费率组件
//一些会用到的数据
const data = reactive({
bankList: [
{ text: "工商银行", value: "工商银行" },
{ text: "交通银行", value: "交通银行" },
{ text: "招商银行", value: "招商银行" },
{ text: "民生银行", value: "民生银行" },
{ text: "中信银行", value: "中信银行" },
{ text: "浦发银行", value: "浦发银行" },
{ text: "兴业银行", value: "兴业银行" },
{ text: "光大银行", value: "光大银行" },
{ text: "广发银行", value: "广发银行" },
{ text: "平安银行", value: "平安银行" },
{ text: "北京银行", value: "北京银行" },
{ text: "华夏银行", value: "华夏银行" },
{ text: "农业银行", value: "农业银行" },
{ text: "建设银行", value: "建设银行" },
{ text: "邮政储蓄银行", value: "邮政储蓄银行" },
{ text: "中国银行", value: "中国银行" },
{ text: "宁波银行", value: "宁波银行" },
{ text: "其他银行", value: "其他银行" },
],
});
// 状态: 0-未发起、 1-审核中、 2-进件成功、 3-驳回待修改、 4-待验证、 5-待签约
// 状态为 1,2,4,5 开启disable (也就是状态不为 0 3)
let isDisable = ref(false);
if (!["0", "3", "8"].includes(channelInfo.state)) isDisable.value = true;
// 商户进件详细信息JSON类型字符串
const applyDetailInfo = reactive({
merchantType: "2", // 商户类型
settAccountType: "C",
paywayFeeList: [],
companyBeneficiaryList: [], // 受益人列表
owner: false
});
// 上传图片成功 含ocr识别
const uploadSuccess = (res, name) => {
applyDetailInfo[name] = res.data; // 图片回显
if (name == "contactIdDocCopy") {
applyDetailInfo.contactName = res.ocrInfo.idcardName;
applyDetailInfo.contactIdNumber = res.ocrInfo.idcardNo;
return;
}
if (name == "contactIdDocCopyBack") {
applyDetailInfo.contactIdDocPeriodBegin = res.ocrInfo.idcardEffectBegin;
applyDetailInfo.contactIdDocPeriodEnd = res.ocrInfo.idcardEffectEnd;
return;
}
Object.assign(applyDetailInfo, res.ocrInfo); // ocr信息回显
};
// 清除图片 仅前端
const clear = (name) => (applyDetailInfo[name] = "");
// 通用选择事件回调
const publicSelect = (e, key) => {
applyDetailInfo[key] = e.detail.value;
if (key == "merchantType") {
// 结算规则数组 个人是individual 企业是enterprise
e.detail.value == 2
? (mccWxList.value = mccWx.individual)
: (mccWxList.value = mccWx.enterprise);
setRulesText.value = '' // 重置一级类目文字
applyDetailInfo.settlementId = '' // 重置一级类目ID
applyDetailInfo.mccCode = ""; // 重置二级类目
applyDetailInfo.qualificationId = ""; // 重置二级类目
applyDetailInfo.isNeedQualification = ""; // 是否要上传证书的标识
} else if (key == "settAccountBankBranchAreaCode") {
// 如果银行选择的是非其他银行,则清空 settAccountBankBranchName 字段
applyDetailInfo.settAccountBankBranchName = "";
}
};
/*
* 结算规则板块
*/
let mccWxList = ref(mccWx.individual); // 结算规则数组 个人是individual 企业是enterprise 默认给individual
let setRulesIndex = ref(-1); // 一级类目 默认选中项
const setRulesRef = ref(null); // 一级类目弹窗
const setRulesText = ref(""); // 结算规则回显文字
let secondList = ref([]); // 二级类目列表
// 一级类目选择完毕
const selectRule = (index) => {
setRulesRef.value.close();
// 结算规则变化,重置行业/特殊资质信息
applyDetailInfo.settlementId = mccWxList.value[index].settlementId; // 给后台的一级类目
setRulesIndex.value = index; // 选择完一级类目的下标
setRulesText.value = mccWxList.value[index].settlementName; // 选择完一级类目的文字
applyDetailInfo.mccCode = ""; // 重置二级类目
applyDetailInfo.qualificationId = ""; // 重置二级类目
applyDetailInfo.isNeedQualification = ""; // 是否要上传证书的标识
secondList.value = mccWxList.value[index].qualification; // 二级类目列表
// 重置费率信息
applyDetailInfo.isInActivities = mccWxList.value[index].isInActivities; // 是否可参与优惠费率活动
if (!applyDetailInfo.isInActivities) {
applyDetailInfo.activitiesId = "";
} else {
applyDetailInfo.activitiesId = activitiesId.value;
}
};
const secondListRef = ref(null); // 二级类目弹窗
const secondListIndex = ref(-1); // 二级类目 默认选中项
let qualifications = ref(false); // 是否展示特殊资质照
// 二级类目选择完毕
const secondListChange = (index) => {
secondListRef.value.close();
secondListIndex.value = index;
applyDetailInfo.mccCode = secondList.value[index].qualificationType; // 二级文字
applyDetailInfo.isNeedQualification =
secondList.value[index].isNeedQualification; // 上传特殊资质照是否必填
applyDetailInfo.qualificationId = secondList.value[index].qualificationId; // 二级类目 code码赋值
};
// 展开选择二级行业弹窗
const openSecond = () => {
if (!secondList.value.length)
return uni.showToast({ title: "请先选择结算规则信息", icon: "none" });
secondListRef.value.open("bottom");
};
let activitiesId = ref("20191030111cff5b5e"); // 参加活动ID
let activityList = ref(["泛行业活动【优惠区间0.2%~0.6%】", "不参与活动"]);
let activityIndex = ref(0); // 是否参加活动
// 选择活动回调事件
const activityChange = (e) => {
activityIndex.value = e.detail.value;
// 当选择不参与活动时,隐藏费率板块
e.detail.value == 0
? (applyDetailInfo.activitiesId = activitiesId.value)
: (applyDetailInfo.activitiesId = "");
};
//银行选择函数
const BankChange = (e) => {
if (e.detail.value[0].value === "其他银行")
applyDetailInfo.settAccountBankBranchName = "";
};
// 合并信息方法, 职能读取,和信息回显,通过此方法合并
let mccCode = ref();
let areaCode = ref("");
let BankName = ref(""); // 银行位置回显
const bankCode = ref();
// 信息合并
const assignObj = (obj) => {
Object.assign(applyDetailInfo, obj); // obj是回显的信息
// 受益人信息回显
nextTick(() => {
if (ownerCardRef.value) ownerCardRef.value.ownerInfoBack(obj.companyBeneficiaryList)
})
// 开启只读模式直接return以下不在进行
if (isDisable.value) {
obj.areaText = tool.addressBack(obj.areaCode, address); // 商户地址
obj.bankText = tool.addressBack(obj.bankCode, address); // 分行地址
if (applyInfoRef.value) applyInfoRef.value.getApplyInof(obj); // 传值给只读组件
return;
}
mccCode.value = obj.mccCode;
obj.areaCode ? (areaCode.value = obj.areaCode[2]) : null;
BankName.value = obj.settAccountBankName;
obj.settAccountBankBranchAreaCode
? (bankCode.value = obj.settAccountBankBranchAreaCode[2])
: null;
// 结算规则数组 个人是individual 企业是enterprise
obj.merchantType == 2
? (mccWxList.value = mccWx.individual)
: (mccWxList.value = mccWx.enterprise);
if (obj.settlementId) {
setRulesText.value = mccWxList.value.find(
(val) => val.settlementId == obj.settlementId
).settlementName; // 结算规则信息回显(通过settlementId匹配ID)
}
if (obj.settlementId) {
secondList.value = mccWxList.value.find(
(val) => val.settlementId == obj.settlementId
).qualification; // 信息合并之后,要给二级类目数组赋值
}
// 为一级类目,二级类目选中的值做回显
for (let i = 0; i < mccWxList.value.length; i++) {
if (mccWxList.value[i].settlementId == obj.settlementId) {
setRulesIndex.value = i;
break;
}
}
for (let i = 0; i < secondList.value.length; i++) {
if (secondList.value[i].qualificationType == obj.mccCode) {
secondListIndex.value = i;
break;
}
}
// 是否参加活动回显
applyDetailInfo.activitiesId
? (activityIndex.value = 0)
: (activityIndex.value = 1);
};
// 发起进件
const launchApply = (isTempData) => {
// 微信进件特有,当选择不参与优惠费率活动时,不显示费率板块,也不校验费率
if (activityIndex.value == 0) {
// 拿费率组件的值
applyDetailInfo.paywayFeeList = defaultRateRef.value.getList(isTempData)
// 判断类型,对象类型是费率正常提交 Sting 是错误信息
if (typeof applyDetailInfo.paywayFeeList === "string")
return uni.showToast({
title: applyDetailInfo.paywayFeeList, icon: "none",
});
// 费率必填,空值校验
if (applyDetailInfo.paywayFeeList.length == 0 && !isTempData)
return uni.showToast({ title: "请至少设置一项费率值", icon: "none" });
} else {
applyDetailInfo.paywayFeeList = "";
}
// 获取受益人信息
if (applyDetailInfo.merchantType == 3) {
applyDetailInfo.companyBeneficiaryList = ownerCardRef.value.ownerInfo();
}
emit(
"applyHandle",
{
name: "wxpay",
isTempData,
applyDetailInfo,
formCheck: [
applyDetailInfo.isNeedQualification,
applyDetailInfo.merchantType,
applyDetailInfo.contactType,
],
},
((applyDetailInfo.merchantType == 3) && !applyDetailInfo.owner) // 该字段为true则对受益人信息进行校验
);
};
defineExpose({ launchApply, assignObj });
</script>
<style scoped lang="scss">
@import "../static/information.scss";
.set-rules {
width: 100%;
background: #fff;
padding: 30rpx;
box-sizing: border-box;
display: flex;
flex-direction: row;
justify-content: space-between;
image {
width: 40rpx;
height: 40rpx;
margin-left: 10rpx;
}
}
.firstradius {
border-top-left-radius: 10rpx;
border-top-right-radius: 10rpx;
}
</style>

View File

@@ -0,0 +1,428 @@
<template>
<!-- 只读文件 -->
<readOnlyInfo
v-if="isDisable"
ref="applyInfoRef"
applyName="ysfpay"
></readOnlyInfo>
<!-- 盛付通进件模板 -->
<view v-if="!isDisable">
<uni-collapse ref="collapse">
<uni-collapse-item
:show-animation="false"
title="基础项"
class="coll-title"
:open="true"
>
<view class="content">
<JeePayForm text="商户类型">
<uni-data-checkbox
v-model="applyDetailInfo.merchantType"
:localdata="merchantTypeList"
@change="mchTypeInfo"
></uni-data-checkbox>
</JeePayForm>
<JeePayForm text="机构类型">
<uni-data-checkbox
v-model="applyDetailInfo.acqOrgType"
:localdata="acqOrgTypeList"
@change="mchTypeInfo"
></uni-data-checkbox>
</JeePayForm>
<template v-if="applyDetailInfo.merchantType != 1">
<JeePayForm text="营业执照照片">
<JeepayUpLoad
ocrFlag="license"
:imgUrl="applyDetailInfo.licenseImg"
@uploadSuccess="uploadSuccess($event, 'licenseImg')"
@clear="clear('licenseImg')"
/>
</JeePayForm>
<JeePayForm
text="营业执照编号"
v-model:value="applyDetailInfo.licenseNo"
/>
<JeePayForm text="营业执照有效期截止">
<termOfValidity
:defaultDate="applyDetailInfo.licenseEffectEnd"
@publicSelect="publicSelect($event, 'licenseEffectEnd')"
@endHandle="endHandle"
/>
</JeePayForm>
</template>
<JeePayForm
text="用户名称"
v-model:value="applyDetailInfo.mchFullName"
/>
<JeePayForm text="法人身份证人像面照片">
<JeepayUpLoad
ocrFlag="idCard"
:imgUrl="applyDetailInfo.idcard1Img"
@uploadSuccess="uploadSuccess($event, 'idcard1Img')"
@clear="clear('idcard1Img')"
/>
</JeePayForm>
<JeePayForm
text="法人身份证姓名"
v-model:value="applyDetailInfo.idcardName"
/>
<JeePayForm
text="法人身份证号"
v-model:value="applyDetailInfo.idcardNo"
/>
<JeePayForm text="法人身份证国徽面照片">
<JeepayUpLoad
:imgUrl="applyDetailInfo.idcard2Img"
@uploadSuccess="uploadSuccess($event, 'idcard2Img')"
@clear="clear('idcard2Img')"
/>
</JeePayForm>
</view>
</uni-collapse-item>
<uni-collapse-item
:show-animation="false"
title="经营信息"
class="coll-title"
>
<view class="content">
<JeePayForm text="经营类目">
<jeeDataPicker
:code="applyDetailInfo.mccCode"
:localdata="mcc"
@change="publicSelect($event, 'mccCode')"
paramType="oneLevel"
/>
</JeePayForm>
<JeePayForm
text="商户联系人姓名"
v-model:value="applyDetailInfo.contactName"
/>
<JeePayForm
text="商户联系人手机号"
v-model:value="applyDetailInfo.contactPhone"
/>
<JeePayForm
text="客服电话"
v-model:value="applyDetailInfo.serviceTel"
/>
<JeePayForm
text="邮箱地址"
v-model:value="applyDetailInfo.contactEmail"
/>
<JeePayForm text="商户经营省市县">
<jeeDataPicker
:code="codeBack.areaCode"
:localdata="address"
@change="publicSelect($event, 'areaCode')"
paramType="arr"
/>
</JeePayForm>
<JeePayForm
text="商户经营地址"
v-model:value="applyDetailInfo.address"
/>
<JeePayForm text="门头照">
<JeepayUpLoad
:imgUrl="applyDetailInfo.storeOuterImg"
@uploadSuccess="uploadSuccess($event, 'storeOuterImg')"
@clear="clear('storeOuterImg')"
/>
</JeePayForm>
<JeePayForm text="门店外景照">
<JeepayUpLoad
:imgUrl="applyDetailInfo.storeOuter2Img"
@uploadSuccess="uploadSuccess($event, 'storeOuter2Img')"
@clear="clear('storeOuter2Img')"
/>
</JeePayForm>
<JeePayForm text="店内环境照">
<JeepayUpLoad
:imgUrl="applyDetailInfo.storeInnerImg"
@uploadSuccess="uploadSuccess($event, 'storeInnerImg')"
@clear="clear('storeInnerImg')"
/>
</JeePayForm>
<JeePayForm text="收银台照">
<JeepayUpLoad
:imgUrl="applyDetailInfo.storeCashierImg"
@uploadSuccess="uploadSuccess($event, 'storeCashierImg')"
@clear="clear('storeCashierImg')"
/>
</JeePayForm>
</view>
</uni-collapse-item>
<uni-collapse-item
:show-animation="false"
title="结算账户"
class="coll-title"
>
<view class="content">
<JeePayForm text="账户类型">
<uni-data-checkbox
v-model="applyDetailInfo.settAccountType"
:localdata="settlementTypeList"
></uni-data-checkbox>
</JeePayForm>
<JeePayForm text="结算周期">
<uni-data-picker
:localdata="settleArray"
@change="publicSelect($event, 'settlePeriod')"
v-slot:default="{ data }"
>{{ settleText ? settleText : "请选择" }}</uni-data-picker
>
</JeePayForm>
<JeePayForm text="银行卡正面照">
<JeepayUpLoad
ocrFlag="bankCard"
:imgUrl="applyDetailInfo.settAccountLicenseImg"
@uploadSuccess="uploadSuccess($event, 'settAccountLicenseImg')"
@clear="clear('settAccountLicenseImg')"
/>
</JeePayForm>
<JeePayForm
text="银行开户名"
v-model:value="applyDetailInfo.settAccountName"
/>
<JeePayForm
text="银行预留手机号"
v-model:value="applyDetailInfo.openBankReservePhone"
/>
<JeePayForm
text="银行账号"
v-model:value="applyDetailInfo.settAccountNo"
/>
<JeePayForm
text="银行名称"
v-model:value="applyDetailInfo.settAccountBankName"
/>
<JeePayForm
text="开户支行名称"
v-model:value="applyDetailInfo.settAccountBankBranchName"
/>
<JeePayForm
text="联行行号"
v-model:value="applyDetailInfo.openBankCode"
/>
<template v-if="applyDetailInfo.settleAccountType == 3">
<JeePayForm text="被授权人证件人像照">
<JeepayUpLoad
ocrFlag="idCard"
:imgUrl="applyDetailInfo.settAccountIdcard1Img"
@uploadSuccess="uploadSuccess($event, 'settAccountIdcard1Img')"
@clear="clear('settAccountIdcard1Img')"
/>
</JeePayForm>
<JeePayForm text="被授权人证件国徽照">
<JeepayUpLoad
:imgUrl="applyDetailInfo.settAccountIdcard2Img"
@uploadSuccess="uploadSuccess($event, 'settAccountIdcard2Img')"
@clear="clear('settAccountIdcard2Img')"
/>
</JeePayForm>
<JeePayForm
text="被授权人身份证号"
v-model:value="applyDetailInfo.settAccountIdcardNo"
/>
<JeePayForm text="结算授权证书">
<JeepayUpLoad
:imgUrl="applyDetailInfo.applymentDetailInfo"
@uploadSuccess="uploadSuccess($event, 'applymentDetailInfo')"
@clear="clear('applymentDetailInfo')"
/>
</JeePayForm>
</template>
<JeePayForm
text="开户许可证"
v-if="applyDetailInfo.settleAccountType == 1"
>
<JeepayUpLoad
:imgUrl="applyDetailInfo.companyAccountLicenseImg"
@uploadSuccess="uploadSuccess($event, 'companyAccountLicenseImg')"
@clear="clear('companyAccountLicenseImg')"
/>
</JeePayForm>
<JeePayForm text="商户收单协议">
<JeepayUpLoad
:imgUrl="applyDetailInfo.acquiringAgreementPhoto"
@uploadSuccess="uploadSuccess($event, 'acquiringAgreementPhoto')"
@clear="clear('acquiringAgreementPhoto')"
/>
</JeePayForm>
<JeePayForm text="拓展资料" :start="false">
<JeepayUpLoad
:imgUrl="applyDetailInfo.reserve1"
@uploadSuccess="uploadSuccess($event, 'reserve1')"
@clear="clear('reserve1')"
/>
</JeePayForm>
</view>
</uni-collapse-item>
<!-- 盛付通费率组件 -->
<defaultRate ref="defaultRateRef" />
</uni-collapse>
</view>
</template>
<script setup>
import { ref, reactive, inject } from "vue";
import address from "@/components/applyJson/ysfAddress.json"; // 地址
import mcc from "@/components/applyJson/mccYsf.json"; // 行业
import JeepayUpLoad from "@/components/JeepayUpLoad/JeepayUpLoad.vue"; // 图片上传
import defaultRate from "../components/defaultRate.vue"; // 默认费率
import readOnlyInfo from "../components/readOnlyInfo.vue"; // 只读文件
import tool from "@/util/tool.js"; // 工具类函数
import JeePayForm from "@/components/applyComponents/JeePayForm.vue"; // 通用左右结构布局
import termOfValidity from "@/components/applyComponents/termOfValidity.vue"; // 选择证件有效期
import jeeDataPicker from "@/components/applyComponents/dataPicker.vue"; // 通用级联选择
import { filterDcit } from "@/hooks/dict"; // 字典
const merchantTypeList = reactive(filterDcit(["A0", "A1", "A2"])); // 商户类型
const acqOrgTypeList = reactive(filterDcit(["E0", "E1", "E2"])); // 机构类型
const settlementTypeList = reactive(filterDcit(["B3", "B4", "B5"])); // 结算类型
const channelInfo = inject('channelInfo')
const emit = defineEmits(["applyHandle"]);
// 状态分类: 0-未发起、 1-审核中、 2-进件成功、 3-驳回待修改、 4-待验证、 5-待签约
// 当状态为 1 2 4 5 时要开启只读模式1 3 不开启
let isDisable = ref(false);
if (!["0", "3", "8"].includes(channelInfo.state)) isDisable.value = true;
// 商户进件详细信息JSON类型字符串
let applyDetailInfo = reactive({
merchantType: 3, // 商户类型 默认为3 代表企业
settleAccountType: "", // 结算账号类型 默认为B 对公
});
// 结算周期
let settleText = ref("");
const settleArray = [
{ value: "1", text: "T+1" },
{ value: "2", text: "D+0" },
{ value: "3", text: "T+0" },
{ value: "4", text: "D+1" },
];
/*
云闪付的地址JSON不是国标码, 直辖市的一级和二级是一样的value, 在uni的级联选择器中存在bug,可以做到无限分级, 所以要手动改一下json, 把其中一个字符串类型,改为数字类型即可
*/
// 通用选择函数
const publicSelect = (e, key) => {
applyDetailInfo[key] = e.detail.value;
if (key == "settlePeriod") {
// 结算周期文字回显
applyDetailInfo.settlePeriod = e.detail.value[0].value;
settleText.value = settleArray.find(
(item) => item.value == e.detail.value[0].value
).text;
}
};
// 上传图片成功
const uploadSuccess = (res, name) => {
applyDetailInfo[name] = res.data;
if (res.ocrInfo && Object.keys(res.ocrInfo).length < 1) return false;
// OCR图片识别 idCard-身份证 idcard1Imgidcard2Img license-营业执照 licenseImg
if (name == "idcard1Img") {
applyDetailInfo.idcardName = res.ocrInfo.idcardName; // 法人身份证姓名
applyDetailInfo.idcardNo = res.ocrInfo.idcardNo; // 法人身份证号
} else if (name == "licenseImg") {
applyDetailInfo.licenseEffectEnd = res.ocrInfo.licenseEffectEnd; // 有效期end
applyDetailInfo.mchFullName = res.ocrInfo.mchFullName; // 全称
applyDetailInfo.licenseNo = res.ocrInfo.licenseNo; // 编号
applyDetailInfo.address = res.ocrInfo.address;
} else if (name == "settAccountLicenseImg") {
applyDetailInfo.settAccountNo = res.ocrInfo.settAccountNo; // 银行卡号
} else if (name == "settAccountIdcard1Img") {
applyDetailInfo.settAccountIdcardNo = res.ocrInfo.idcardNo; // 被授权人身份证号
}
};
// 清除图片 仅前端
const clear = (name, url) => (applyDetailInfo[name] = "");
const defaultRateRef = ref(); // 获取费率组件
// 发起进件 注意后面的formCheck参数表单校验要用
const launchApply = (isTempData) => {
// 有费率的进件渠道,要在发起进件之前,获取所选择的费率信息
applyDetailInfo.paywayFeeList = defaultRateRef.value.getList(isTempData)
emit("applyHandle", {
name: "ysfpay",
isTempData,
applyDetailInfo,
formCheck: [
applyDetailInfo.merchantType,
applyDetailInfo.settleAccountType,
],
});
};
// 只读组件信息
let applyInfoRef = ref(null);
// 行业类型,地理位置回显
let codeBack = reactive({
areaCode: "", // 商户地理位置回显
});
// 合并信息方法, 职能读取,和信息回显,通过此方法合并
const assignObj = (obj) => {
Object.assign(applyDetailInfo, obj);
if (!isDisable.value) {
codeBack.areaCode = obj.areaCode ? obj.areaCode[2] : obj.areaCode; // 地址码,取最后一个
// 各类文字回显 结算周期
if (obj.settlePeriod)
settleText.value = settleArray.find(
(item) => item.value == obj.settlePeriod
).text;
} else {
// 以下用于只读信息页
obj.mccText = obj.mccCode.split("_")[0]; // 行业码转文字
obj.areaText = tool.addressBack(obj.areaCode, address); // 地址码转文字
obj.settAccountText = obj.settAccountType == "C" ? "对私" : "对公";
obj.merchantText =
obj.merchantType == 1
? "个人"
: obj.merchantType == 2
? "个体工商户"
: "企业";
// 传值给只读组件
if (applyInfoRef.value) applyInfoRef.value.getApplyInof(obj);
}
};
defineExpose({ launchApply, assignObj });
</script>
<style scoped lang="scss">
@import "../static/information.scss";
</style>

File diff suppressed because one or more lines are too long

View File

@@ -0,0 +1,205 @@
<template>
<!-- 上传图片&提交审核 状态4 出现-->
<view v-if="channelInfo.state == 4">
<view class="title">上传图片</view>
<JeePayForm text="营业执照照片" v-if="applyInfo.merchantType != '1'">
<JeepayUpLoad :imgUrl="applyInfo.idcard1Img" @uploadSuccess="uploadSuccess($event, 'idcard1Img')" @clear="clear('idcard1Img')" />
</JeePayForm>
<JeePayForm text="法人身份证国徽面照片" >
<JeepayUpLoad :imgUrl="applyInfo.idcard1Img" @uploadSuccess="uploadSuccess($event, 'idcard1Img')" @clear="clear('idcard1Img')" />
</JeePayForm>
<JeePayForm text="法人身份证人像面照片" >
<JeepayUpLoad :imgUrl="applyInfo.idcard2Img" @uploadSuccess="uploadSuccess($event, 'idcard2Img')" @clear="clear('idcard2Img')" />
</JeePayForm>
<JeePayForm text="手持证件照片" >
<JeepayUpLoad :imgUrl="applyInfo.idcardInHandImg" @uploadSuccess="uploadSuccess($event, 'idcardInHandImg')" @clear="clear('idcardInHandImg')" />
</JeePayForm>
<JeePayForm text="门头照" >
<JeepayUpLoad :imgUrl="applyInfo.storeOuterImg" @uploadSuccess="uploadSuccess($event, 'storeOuterImg')" @clear="clear('storeOuterImg')" />
</JeePayForm>
<JeePayForm text="店内环境照" >
<JeepayUpLoad :imgUrl="applyInfo.storeInnerImg" @uploadSuccess="uploadSuccess($event, 'storeInnerImg')" @clear="clear('storeInnerImg')" />
</JeePayForm>
<JeePayForm text="收银台照" >
<JeepayUpLoad :imgUrl="applyInfo.storeCashierImg" @uploadSuccess="uploadSuccess($event, 'storeCashierImg')" @clear="clear('storeCashierImg')" />
</JeePayForm>
<JeePayForm text="结算银行卡正面照片" >
<JeepayUpLoad :imgUrl="applyInfo.settAccountLicenseImg" @uploadSuccess="uploadSuccess($event, 'settAccountLicenseImg')" @clear="clear('settAccountLicenseImg')" />
</JeePayForm>
<JeePayForm text="结算银行卡反面照片" >
<JeepayUpLoad :imgUrl="applyInfo.settAccountBankImg2" @uploadSuccess="uploadSuccess($event, 'settAccountBankImg2')" @clear="clear('settAccountBankImg2')" />
</JeePayForm>
<JeePayForm text="开户许可证照片" v-if="applyInfo.merchantType == '3'">
<JeepayUpLoad :imgUrl="applyInfo.companyAccountLicenseImg" @uploadSuccess="uploadSuccess($event, 'companyAccountLicenseImg')" @clear="clear('companyAccountLicenseImg')" />
</JeePayForm>
<JeePayForm text="入账账户身份证人像面照片" v-if="applyInfo.codeLegalPersonAcc == 0">
<JeepayUpLoad :imgUrl="applyInfo.settAccountIdcard1Img" @uploadSuccess="uploadSuccess($event, 'settAccountIdcard1Img')" @clear="clear('settAccountIdcard1Img')" />
</JeePayForm>
<JeePayForm text="入账账户身份证国徽面照片" v-if="applyInfo.codeLegalPersonAcc == 0">
<JeepayUpLoad :imgUrl="applyInfo.settAccountIdcard2Img" @uploadSuccess="uploadSuccess($event, 'settAccountIdcard2Img')" @clear="clear('settAccountIdcard2Img')" />
</JeePayForm>
<JeePayForm text="结算授权证书照片" v-if="applyInfo.codeLegalPersonAcc == 0">
<JeepayUpLoad :imgUrl="applyInfo.settleAuthLetterPhoto" @uploadSuccess="uploadSuccess($event, 'settleAuthLetterPhoto')" @clear="clear('settleAuthLetterPhoto')" />
</JeePayForm>
<JeePayForm text="收单协议盖章页照片" :start="false">
<JeepayUpLoad :imgUrl="applyInfo.acquiringAgreementPhoto" @uploadSuccess="uploadSuccess($event, 'acquiringAgreementPhoto')" @clear="clear('acquiringAgreementPhoto')" />
</JeePayForm>
<JeePayForm text="其他材料照片" :start="false">
<JeepayUpLoad :imgUrl="applyInfo.other1" @uploadSuccess="uploadSuccess($event, 'other1')" @clear="clear('other1')" />
</JeePayForm>
<view class="submit" @tap="onSubmit">提交审核</view>
</view>
<!-- 自主签约 -->
<signing v-if="['2','5'].includes(channelInfo.state)" />
<!-- 费率组件 与按钮 -->
<template v-if="(channelInfo.state == 2)&&(vdata.paywayFeeList.length>0)" >
<defaultRate ref="defaultRateRef" />
<view class="exhibition">请展开费率列表进行配置已经配置过费率商户的不需重复配置</view>
<view v-if="channelInfo.channelVar1" class="exhibition">
<view>错误信息</view>
{{ channelInfo.channelVar1 }}
</view>
<view class="submit" @tap="rateSubmit">费率配置</view>
</template>
</template>
<script setup>
import {ref ,reactive, toRaw, inject, onMounted } from 'vue';
import JeepayUpLoad from '@/components/JeepayUpLoad/JeepayUpLoad.vue' // 图片上传
import { $yspayUpload ,$ysPayRateConfig, $mchApplymentsInfo } from '@/http/apiManager.js'
import graceChecker from '@/util/graceChecker.js'//引入表单校验工具函数
import signing from '../../components/signing.vue' // 自主签约组件
import defaultRate from '../../components/defaultRate.vue' // 费率
import JeePayForm from '@/components/applyComponents/JeePayForm.vue' // 通用左右结构布局
const channelInfo = inject('channelInfo')
const applyInfo = ref({}) // 本页面的进件信息
const vdata = reactive({
paywayFeeList: [] // 费率
})
const defaultRateRef = ref(null) // 费率组件
// 提交审核
const onSubmit = () => {
let check = JSON.parse(JSON.stringify(rules)) // 深拷贝一份
if (applyInfo.value.merchantType != 1) {
check.push(
{name: "licenseImg",checkType: "notnull",errorMsg: "请上传营业执照照片"}
)
}
if (applyInfo.value.merchantType == 3) {
check.push(
{name: "companyAccountLicenseImg",checkType: "notnull",errorMsg: "请上传开户许可证照片"}
)
}
if (applyInfo.value.codeLegalPersonAcc == 0) {
check.push(
{name: "settAccountIdcard1Img",checkType: "notnull",errorMsg: "请上传入账账户身份证人像面照片"},
{name: "settAccountIdcard2Img",checkType: "notnull",errorMsg: "请上传入账账户身份证国徽面照片"},
{name: "settleAuthLetterPhoto",checkType: "notnull",errorMsg: "请上传结算授权证书照片"},
)
}
let checkRes = graceChecker.check(applyInfo.value, check);
if (!checkRes) return uni.showToast({ title: graceChecker.error, icon: "none"})
uni.showLoading({ title: '提交中' })
$yspayUpload(channelInfo.applyId, toRaw(applyInfo.value)).then(res => {
uni.hideLoading()
uni.showToast({ title: '操作成功', icon: 'none' })
uni.navigateBack({})
})
}
const rules = [
{name: "idcard1Img",checkType: "notnull",errorMsg: "请上传法人身份证人像面照片"},
{name: "idcard2Img",checkType: "notnull",errorMsg: "请上传法人身份证国徽面照片"},
{name: "idcardInHandImg",checkType: "notnull",errorMsg: "请上传手持证件照片"},
{name: "storeOuterImg",checkType: "notnull",errorMsg: "请上传门头照"},
{name: "storeInnerImg",checkType: "notnull",errorMsg: "请上传店内环境照"},
{name: "storeCashierImg",checkType: "notnull",errorMsg: "请上传收银台照"},
{name: "settAccountLicenseImg",checkType: "notnull",errorMsg: "请上传结算银行卡正面照片"},
{name: "settAccountBankImg2",checkType: "notnull",errorMsg: "请上传结算银行卡反面照片"},
{name: "settAccountBankImg2",checkType: "notnull",errorMsg: "请上传结算银行卡反面照片"},
]
// 调用进件查询接口
const mchApplyInfoHandle = () => {
let originData = 1
$mchApplymentsInfo(channelInfo.applyId, originData).then( ({bizData}) => {
applyInfo.value = JSON.parse(bizData.applyDetailInfo)
})
}
const setApplyInfo = () => mchApplyInfoHandle()
// 上传图片成功
const uploadSuccess = (res, name) => applyInfo.value[name] = res.data
// 清除图片 仅前端
const clear = (name, url) => applyInfo.value[name] = ''
// 配置费率
const rateSubmit = () => {
uni.showLoading({title: '提交中'})
vdata.paywayFeeList = defaultRateRef.value.getList(false)
$ysPayRateConfig(channelInfo.applyId, { paywayFeeList: vdata.paywayFeeList }).then((res) => {
uni.hideLoading()
uni.navigateBack({})
uni.showToast({title: '提交成功', icon: 'none'})
})
}
defineExpose({ setApplyInfo })
</script>
<style scoped lang="scss">
.title {
text-align: center;
margin: 30rpx;
}
.submit{
display: flex;
justify-content: center;
margin: 30rpx auto;
width: 380rpx;
height: 90rpx;
line-height: 90rpx;
border-radius: 10rpx;
background: #3981FF;
font-weight: 500;
font-size: 30rpx;
color: #fff;
}
.exhibition {
margin: 30rpx;
}
</style>

View File

@@ -0,0 +1,378 @@
<template>
<!-- 只读文件 -->
<readOnlyInfo v-if="isDisable" ref="applyInfoRef" applyName="yspay" />
<!-- 盛付通进件模板 -->
<view v-if="!isDisable">
<uni-collapse ref="collapse">
<uni-collapse-item :show-animation="false" title="基础信息" class="coll-title" :open="true">
<view class="content">
<JeePayForm text="商户类型" >
<radio-group class="radio-group" @change="publicSelect($event, 'merchantType')" >
<label class="radio"><radio value="1" :checked="applyDetailInfo.merchantType == '1'" />小微商户</label>
<label class="radio"><radio value="2" :checked="applyDetailInfo.merchantType == '2'"/>个体商户</label>
<label class="radio"><radio value="3" :checked="applyDetailInfo.merchantType == '3'"/>企业商户</label>
</radio-group>
</JeePayForm>
<template v-if="applyDetailInfo.merchantType != 1">
<!-- 营业执照信息 小微不填 企业/个体工商户必填 -->
<JeePayForm text="营业执照照片">
<JeepayUpLoad ocrFlag="license" :imgUrl="applyDetailInfo.licenseImg" @uploadSuccess="uploadSuccess($event, 'licenseImg')" @clear="clear('licenseImg')" />
</JeePayForm>
<JeePayForm text="营业执照编号" v-model:value="applyDetailInfo.licenseNo" />
<JeePayForm text="营业执照起始有效期">
<termOfValidity :defaultDate="applyDetailInfo.licenseEffectBegin" @publicSelect="publicSelect($event, 'licenseEffectBegin')" :isEnd="false" />
</JeePayForm>
<JeePayForm text="营业执照有效期截止">
<termOfValidity :defaultDate="applyDetailInfo.licenseEffectEnd" @publicSelect="publicSelect($event, 'licenseEffectEnd')" />
</JeePayForm>
</template>
<JeePayForm :text="applyDetailInfo.merchantType == 1 ? '用户名称':'营业执照名称'" v-model:value="applyDetailInfo.mchFullName" />
<JeePayForm text="商户简称" v-if="applyDetailInfo.merchantType !== 1" v-model:value="applyDetailInfo.mchShortName" :start="false" />
<JeePayForm text="法人身份证人像面照">
<JeepayUpLoad ocrFlag="idCard" :imgUrl="applyDetailInfo.idcard1Img" @uploadSuccess="uploadSuccess($event, 'idcard1Img')" @clear="clear('idcard1Img')" />
</JeePayForm>
<JeePayForm text="法人身份证国徽面照片">
<JeepayUpLoad ocrFlag="idCard" :imgUrl="applyDetailInfo.idcard2Img" @uploadSuccess="uploadSuccess($event, 'idcard2Img')" @clear="clear('idcard2Img')" />
</JeePayForm>
<JeePayForm text="法人手持身份证照片">
<JeepayUpLoad :imgUrl="applyDetailInfo.idcardInHandImg" @uploadSuccess="uploadSuccess($event, 'idcardInHandImg')" @clear="clear('idcardInHandImg')" />
</JeePayForm>
<JeePayForm text="法人身份证姓名" v-model:value="applyDetailInfo.idcardName" />
<JeePayForm text="法人身份证号" v-model:value="applyDetailInfo.idcardNo" />
<JeePayForm text="法人地址" v-model:value="applyDetailInfo.idcardAddress" />
<JeePayForm text="法人电话" v-model:value="applyDetailInfo.legalPersonPhone" />
<JeePayForm text="法人性别" >
<radio-group class="radio-group" @change="publicSelect($event, 'crpGender')" >
<label class="radio"><radio value="0" :checked="applyDetailInfo.crpGender == '0'" /></label>
<label class="radio"><radio value="1" :checked="applyDetailInfo.crpGender == '1'"/></label>
</radio-group>
</JeePayForm>
<JeePayForm text="法人职业" >
<jeeDataPicker :code="applyDetailInfo.crpProfession" :localdata="professionList" @change="publicSelect($event, 'crpProfession')" paramType="arr" />
</JeePayForm>
<JeePayForm text="法人身份证起始有效期">
<termOfValidity :defaultDate="applyDetailInfo.idcardEffectBegin" @publicSelect="publicSelect($event, 'idcardEffectBegin')" :isEnd="false" />
</JeePayForm>
<JeePayForm text="法人身份证结束有效期">
<termOfValidity :defaultDate="applyDetailInfo.idcardEffectEnd" @publicSelect="publicSelect($event, 'idcardEffectEnd')" />
</JeePayForm>
</view>
</uni-collapse-item>
<uni-collapse-item :show-animation="false" title="经营信息" class="coll-title">
<view class="content">
<JeePayForm text="经营类目MCC" >
<jeeDataPicker :code="codeBack.mccCode" :localdata="mcc" @change="publicSelect($event, 'mccCode')" paramType="last" />
</JeePayForm>
<JeePayForm text="实际控制人姓名" v-model:value="applyDetailInfo.actualManager" v-if="applyDetailInfo.merchantType != 1" />
<JeePayForm text="是否为法人信息" >
<radio-group class="radio-group" @change="publicSelect($event, 'isLegalInfo')" >
<label class="radio"><radio value="1" :checked="applyDetailInfo.isLegalInfo == '1'" /></label>
<label class="radio"><radio value="0" :checked="applyDetailInfo.isLegalInfo == '0'"/></label>
</radio-group>
</JeePayForm>
<JeePayForm text="商户联系人姓名" v-model:value="applyDetailInfo.contactName" />
<JeePayForm text="商户联系人手机号" v-model:value="applyDetailInfo.contactPhone" />
<JeePayForm text="商户联系人邮箱" v-model:value="applyDetailInfo.contactEmail" />
<JeePayForm text="商户经营省市县" >
<jeeDataPicker :code="codeBack.areaCode" :localdata="address" @change="publicSelect($event, 'areaCode')" paramType="arr" />
</JeePayForm>
<JeePayForm text="商户经营地址" v-model:value="applyDetailInfo.address" />
<JeePayForm text="门头照">
<JeepayUpLoad :imgUrl="applyDetailInfo.storeOuterImg" @uploadSuccess="uploadSuccess($event, 'storeOuterImg')" @clear="clear('storeOuterImg')" />
</JeePayForm>
<JeePayForm text="店内环境照">
<JeepayUpLoad :imgUrl="applyDetailInfo.storeInnerImg" @uploadSuccess="uploadSuccess($event, 'storeInnerImg')" @clear="clear('storeInnerImg')" />
</JeePayForm>
<JeePayForm text="收银台照">
<JeepayUpLoad :imgUrl="applyDetailInfo.storeCashierImg" @uploadSuccess="uploadSuccess($event, 'storeCashierImg')" @clear="clear('storeCashierImg')" />
</JeePayForm>
</view>
</uni-collapse-item>
<uni-collapse-item :show-animation="false" title="结算账户" class="coll-title">
<view class="content">
<JeePayForm text="账户类型">
<radio-group class="radio-group" @change="publicSelect($event, 'settAccountType')" >
<label class="radio"><radio value="C" :checked="applyDetailInfo.settAccountType == 'C'" />对私</label>
<label class="radio"><radio value="B" :checked="applyDetailInfo.settAccountType == 'B'"/>对公</label>
</radio-group>
</JeePayForm>
<JeePayForm text="结算类型">
<radio-group class="radio-group" @change="publicSelect($event, 'settlementType')" >
<label class="radio"><radio value="00" :checked="applyDetailInfo.settlementType == '00'" />结算至内部</label>
<label class="radio"><radio value="01" :checked="applyDetailInfo.settlementType == '01'"/>结算至银行卡</label>
</radio-group>
</JeePayForm>
<JeePayForm text="银行开户名" v-model:value="applyDetailInfo.settAccountName" />
<template v-if="applyDetailInfo.settAccountType == 'B' && applyDetailInfo.merchantType == '3'">
<JeePayForm text="开户许可证照片">
<JeepayUpLoad :imgUrl="applyDetailInfo.companyAccountLicenseImg" @uploadSuccess="uploadSuccess($event, 'companyAccountLicenseImg')" @clear="clear('companyAccountLicenseImg')" />
</JeePayForm>
</template>
<template v-else>
<JeePayForm text="银行卡正面照">
<JeepayUpLoad ocrFlag="bankCard" :imgUrl="applyDetailInfo.settAccountLicenseImg" @uploadSuccess="uploadSuccess($event, 'settAccountLicenseImg')" @clear="clear('settAccountLicenseImg')" />
</JeePayForm>
<JeePayForm text="银行卡反面照">
<JeepayUpLoad :imgUrl="applyDetailInfo.settAccountBankImg2" @uploadSuccess="uploadSuccess($event, 'settAccountBankImg2')" @clear="clear('settAccountBankImg2')" />
</JeePayForm>
</template>
<JeePayForm text="选择银行">
<text @tap="bankRef.open()">{{ applyDetailInfo.settAccountBankName || "选择银行" }}</text>
</JeePayForm>
<JeePayForm text="银行卡账号" v-model:value="applyDetailInfo.settAccountNo" />
<JeePayForm text="开户行省市县" >
<jeeDataPicker :code="codeBack.bankCode" :localdata="address" @change="publicSelect($event, 'settAccountBankBranchAreaCode')" paramType="arr" />
</JeePayForm>
<JeePayForm text="选择支行">
<view @click="selectBranchBank">{{ applyDetailInfo.settAccountBankBranchName ? applyDetailInfo.settAccountBankBranchName : "请选择" }}</view>
</JeePayForm>
<JeePayForm text="开户行编号" v-model:value="applyDetailInfo.bankType" />
<JeePayForm text="开户行行号" v-model:value="applyDetailInfo.openAccBanktype" />
<JeePayForm text="银行预留手机号" v-model:value="applyDetailInfo.bankMobile" />
<JeePayForm text="是否法人结算">
<radio-group class="radio-group" @change="publicSelect($event, 'codeLegalPersonAcc')" >
<label class="radio"><radio value="0" :checked="applyDetailInfo.codeLegalPersonAcc == 0" />非法人</label>
<label class="radio"><radio value="1" :checked="applyDetailInfo.codeLegalPersonAcc == 1"/>法人</label>
</radio-group>
</JeePayForm>
<template v-if="applyDetailInfo.codeLegalPersonAcc == '0'">
<JeePayForm text="结算人身份证人像面照片">
<JeepayUpLoad ocrFlag="idCard" :imgUrl="applyDetailInfo.settAccountIdcard1Img" @uploadSuccess="uploadSuccess($event, 'settAccountIdcard1Img')" @clear="clear('settAccountIdcard1Img')" />
</JeePayForm>
<JeePayForm text="结算人身份证国徽面照片">
<JeepayUpLoad ocrFlag="idCard" :imgUrl="applyDetailInfo.settAccountIdcard2Img" @uploadSuccess="uploadSuccess($event, 'settAccountIdcard2Img')" @clear="clear('settAccountIdcard2Img')" />
</JeePayForm>
<JeePayForm text="结算人姓名" v-model:value="applyDetailInfo.unincorporatedName" />
<JeePayForm text="结算人身份证号" v-model:value="applyDetailInfo.settAccountIdcardNo" />
<JeePayForm text="结算人证件有效期">
<termOfValidity :defaultDate="applyDetailInfo.settAccountIdcardEffectEnd" @publicSelect="publicSelect($event, 'settAccountIdcardEffectEnd')" />
</JeePayForm>
<JeePayForm text="结算人身份证地址" v-model:value="applyDetailInfo.authAddress" />
</template>
</view>
</uni-collapse-item>
</uni-collapse>
</view>
<!-- 选择银行 -->
<SelectBank ref="bankRef" :list="bankInfoList" value="label" @choiceValue="updataBank" />
<!-- 选择支行 -->
<sftSelectBankBranch ref="sftSelectBankBranckRef" @bankBranckInfo="bankBranckInfo" :bankList="bankBranchList" field="bankName" />
<!-- 上传图片提交审核 状态4触发 -->
<ysEvent ref="ysEventRef" />
</template>
<script setup>
import {ref , reactive, computed, toRaw, inject } from 'vue'
import address from '@/components/applyJson/ysfAddress.json' // 地址
import mcc from '@/components/applyJson/jeePayMcc.json' // 行业
import JeepayUpLoad from '@/components/JeepayUpLoad/JeepayUpLoad.vue' // 图片上传
import readOnlyInfo from '../../components/readOnlyInfo.vue' // 只读文件
import tool from '@/util/tool.js' // 工具类函数
import JeePayForm from '@/components/applyComponents/JeePayForm.vue' // 通用左右结构布局
import termOfValidity from '@/components/applyComponents/termOfValidity.vue' // 选择证件有效期
import jeeDataPicker from '@/components/applyComponents/dataPicker.vue' // 通用级联选择
import ysEvent from './ysEvent.vue'
import { $bankBranchList } from "@/http/apiManager.js";
import sftSelectBankBranch from "@/components/sftSelectBank/sftSelectBankBranch.vue"; // 选择支行
import SelectBank from "../../components/SelectBank.vue"; // 选择银行组件
import bankInfoList from './ysBank.json' // 银行列表
const channelInfo = inject('channelInfo')
const emit = defineEmits(['applyHandle'])
const ysEventRef = ref(null) // 进件完毕之后的操作页面
const bankRef = ref(null)
// 状态分类: 0-未发起、 1-审核中、 2-进件成功、 3-驳回待修改、 4-待验证、 5-待签约
// 当状态为 1 2 4 5 时要开启只读模式1 3 不开启
let isDisable = ref(false)
if (!['0', '3', '8'].includes(channelInfo.state)) isDisable.value = true
// 商户进件详细信息JSON类型字符串
let applyDetailInfo = reactive({})
const sftSelectBankBranckRef = ref(null) // 选择支行组件
const bankBranchList = ref([]) // 支行列表,用于交付上方的组件渲染并选择
// 选择银行回调
const updataBank = val => applyDetailInfo.settAccountBankName = val.label
// 通用选择函数
const publicSelect = (e, key) => {
applyDetailInfo[key] = e.detail.value
if (key === 'isLegalInfo') {
if (e.detail.value == 1) {
applyDetailInfo.contactName = applyDetailInfo.idcardName
applyDetailInfo.contactPhone = applyDetailInfo.legalPersonPhone
applyDetailInfo.settAccountName = applyDetailInfo.idcardName
applyDetailInfo.contactsAddr = applyDetailInfo.idcardAddress
} else {
applyDetailInfo.contactName = applyDetailInfo.contactPhone = ''
applyDetailInfo.contactsAddr = applyDetailInfo.settAccountName = ''
}
} else if (key == 'crpProfession') {
applyDetailInfo.crpProfession = e.detail.value[0]
} else if (key == 'areaCode') {
applyDetailInfo.mercProv = e.detail.text[0]
applyDetailInfo.mercCity = e.detail.text[1]
applyDetailInfo.mercArea = e.detail.text[2]
} else if (key == 'settAccountBankBranchAreaCode') {
applyDetailInfo.openAccProvince = e.detail.text[0]
applyDetailInfo.openAccCity = e.detail.text[1]
// 选择开户行省市区的回调
$bankBranchList(channelInfo.mchNo, channelInfo.code, {
cityCode: e.detail.value[1], // 市编码
bankAliasCode: applyDetailInfo.settAccountBankName, // 银行名称
}).then((res) => {
bankBranchList.value = res.bizData;
applyDetailInfo.settAccountBankBranchName = ""; // 请求完毕赋空
})
}
}
// 选择支行
const selectBranchBank = () => {
// 空值校验
if (bankBranchList.value.length == 0) return uni.showToast({ title: "支行列表为空", icon: "none" });
sftSelectBankBranckRef.value.open();
}
// 选择支行完毕
const bankBranckInfo = val => {
applyDetailInfo.settAccountBankBranchName = val.bankName
applyDetailInfo.bankType = val.bankType
applyDetailInfo.openAccBanktype = val.bankCode
}
// 法人职业
const professionList = [
{ value: '1', text: '机关团体企事业单位' },
{ value: '2', text: '公共事业' },
{ value: '3', text: '农牧业' },
{ value: '4', text: '交通运输业' },
{ value: '5', text: '餐旅业' },
{ value: '6', text: '建筑工程业' },
{ value: '7', text: '制造业' },
{ value: '8', text: '医疗保健业' },
{ value: '9', text: '娱乐业' },
{ value: '10', text: '其他' },
]
// 上传图片成功
const uploadSuccess = (res, name) => {
applyDetailInfo[name] = res.data
if (res.ocrInfo && Object.keys(res.ocrInfo).length < 1) return false
if (name == 'settAccountIdcard1Img') {
applyDetailInfo.unincorporatedName = res.ocrInfo.idcardName
applyDetailInfo.settAccountIdcardNo = res.ocrInfo.idcardNo
applyDetailInfo.authAddress = res.ocrInfo.idcardAddress
return
}
if (name == 'settAccountIdcard2Img') {
applyDetailInfo.settAccountIdcardEffectEnd = res.ocrInfo.idcardEffectEnd
return
}
Object.assign(applyDetailInfo, res.ocrInfo) // ocr信息回显字段一致直接合并
}
// 清除图片 仅前端
const clear = (name, url) => applyDetailInfo[name] = ''
// 发起进件 注意后面的formCheck参数表单校验要用
const launchApply = isTempData => {
emit(
'applyHandle',
{name: 'yspay',isTempData, applyDetailInfo, formCheck: [applyDetailInfo.merchantType, applyDetailInfo.codeLegalPersonAcc, applyDetailInfo.settAccountType]},
)
}
// 只读组件信息
let applyInfoRef = ref(null)
// 行业类型,地理位置回显
let codeBack = reactive({
areaCode: '', // 商户地理位置回显
mccCode: '', // 行业回显
bankCode: '', // 银行地址回显
})
// 合并信息方法, 职能读取,和信息回显,通过此方法合并
const assignObj = (obj) => {
Object.assign(applyDetailInfo, obj)
if (channelInfo.state == 4) ysEventRef.value.setApplyInfo()
if(!isDisable.value) {
// 行业类型,地理位置回显
codeBack.areaCode = obj.areaCode ? obj.areaCode[2] : null
codeBack.bankCode = obj.settAccountBankBranchAreaCode ? obj.settAccountBankBranchAreaCode[2] : null
codeBack.mccCode = obj.mccCode
} else {
// 以下用于只读信息页
obj.mccText = tool.mccBack(obj.mccCode, mcc, 'last') // 行业码转文字
obj.areaText = tool.addressBack(obj.areaCode, address) // 地址码转文字
obj.bankText = tool.addressBack(obj.settAccountBankBranchAreaCode, address)
obj.crpProfessionText = professionList.find(item => item.value == obj.crpProfession).text // 职业
// 传值给只读组件
if(applyInfoRef.value) applyInfoRef.value.getApplyInof(obj)
}
}
defineExpose({ launchApply, assignObj })
</script>
<style scoped lang="scss">
@import '../../static/information.scss';
</style>

View File

@@ -0,0 +1,154 @@
<template>
<!-- 该页码为填写信息的组件 -->
<!-- 只读文件 -->
<readOnlyInfo v-if="isDisable" ref="applyInfoRef" applyName="alipay" />
<view v-if="!isDisable">
<uni-collapse ref="collapse">
<uni-collapse-item title="经营信息" class="coll-title" :open="true">
<view class="content">
<JeePayForm text="产品类型" >
<label class="radio"><radio value="1" checked="true" style="transform: scale(0.6,0.6);" />当面付</label>
</JeePayForm>
<JeePayForm text="经营类目" >
<dataPicker :code="mccCode" :localdata="mccAli" @change="publicSelect($event, 'mccCode')" paramType="splicing" />
</JeePayForm>
<JeePayForm text="营业执照图片">
<JeepayUpLoad ocrFlag="license" :imgUrl="applyDetailInfo.licenseImg" @uploadSuccess="uploadSuccess($event, 'licenseImg')" @clear="clear('licenseImg')" />
</JeePayForm>
<JeePayForm text="营业执照编号" v-model:value="applyDetailInfo.licenseNo" />
<JeePayForm text="营业执照有效期截止">
<termOfValidity :defaultDate="applyDetailInfo.licenseEffectEnd" @publicSelect="publicSelect($event, 'licenseEffectEnd')" />
</JeePayForm>
<JeePayForm text="特殊资质照" >
<JeepayUpLoad :imgUrl="applyDetailInfo.specialLicenseImg" @uploadSuccess="uploadSuccess($event, 'specialLicenseImg')" @clear="clear('specialLicenseImg')" />
</JeePayForm>
</view>
</uni-collapse-item>
<uni-collapse-item title="门店信息" class="coll-title">
<view class="content">
<JeePayForm text="商户名称全称" v-model:value="applyDetailInfo.mchFullName" />
<JeePayForm text="商户地理位置" >
<dataPicker :code="areaCode" :localdata="address" @change="publicSelect($event, 'areaCode')" paramType="arr" />
</JeePayForm>
<JeePayForm text="商户详细地址" v-model:value="applyDetailInfo.address" />
<JeePayForm text="门头照">
<JeepayUpLoad :imgUrl="applyDetailInfo.storeOuterImg" @uploadSuccess="uploadSuccess($event, 'storeOuterImg')" @clear="clear('storeOuterImg')" />
</JeePayForm>
<JeePayForm text="店内环境照">
<JeepayUpLoad :imgUrl="applyDetailInfo.storeInnerImg" @uploadSuccess="uploadSuccess($event, 'storeInnerImg')" @clear="clear('storeInnerImg')" />
</JeePayForm>
</view>
</uni-collapse-item>
<uni-collapse-item title="联系人信息" class="coll-title">
<view class="content">
<JeePayForm text="支付宝账号" v-model:value="applyDetailInfo.accountNo" />
<JeePayForm text="商户联系人姓名" v-model:value="applyDetailInfo.contactName" />
<JeePayForm text="商户联系人电话" v-model:value="applyDetailInfo.contactPhone" />
<JeePayForm text="商户联系人邮箱" v-model:value="applyDetailInfo.contactEmail" />
</view>
</uni-collapse-item>
<!-- 费率组件 -->
<defaultRate ref="defaultRateRef" isCheck="all" />
</uni-collapse>
</view>
</template>
<script setup>
import {ref , reactive, inject } from 'vue'
import address from '@/components/applyJson/address.json' // 地址
import mccAli from '@/components/applyJson/mccAli.json' // 行业
import JeepayUpLoad from '@/components/JeepayUpLoad/JeepayUpLoad.vue' // 图片上传
import defaultRate from '../components/defaultRate.vue' // 默认费率
import readOnlyInfo from '../components/readOnlyInfo.vue' // 只读文件
import tool from '@/util/tool.js' // 工具类函数
import JeePayForm from '@/components/applyComponents/JeePayForm.vue' // 通用左右结构布局
import termOfValidity from '@/components/applyComponents/termOfValidity.vue' // 选择证件有效期
import dataPicker from '@/components/applyComponents/dataPicker.vue' // 通用级联选择
const channelInfo = inject('channelInfo')
const emit = defineEmits(['applyHandle'])
const defaultRateRef = ref(null) // 默认费率组件
// 商户进件详细信息JSON类型字符串
const applyDetailInfo = reactive({
productType: 1,//产品类型
})
// 状态: 0-未发起、 1-审核中、 2-进件成功、 3-驳回待修改、 4-待验证、 5-待签约
// 状态为 1,2,4,5 开启disable (也就是状态不为 0 3)
let isDisable = ref(false)
if (!['0', '3', '8'].includes(channelInfo.state)) isDisable.value = true
// 上传图片成功 以及OCR识别信息回显
const uploadSuccess = (res, name) => {
applyDetailInfo[name] = res.data
Object.assign(applyDetailInfo, res.ocrInfo) // ocr信息回显
}
// 清除图片 仅前端
const clear = key => applyDetailInfo[key] = ''
// 通用选择事件 回调函数
const publicSelect = (e, key) => applyDetailInfo[key] = e.detail.value
// 发起进件
const launchApply = isTempData => {
// 拿费率组件的值
applyDetailInfo.paywayFeeList = defaultRateRef.value.getList(isTempData)
// 判断类型,对象类型是费率正常提交 Sting 是错误信息
if (typeof applyDetailInfo.paywayFeeList === 'string') return uni.showToast({ title: applyDetailInfo.paywayFeeList, icon: 'none' })
emit('applyHandle', {name: 'alipay',isTempData, applyDetailInfo})
}
let mccCode = ref() // 行业mcc回显
let areaCode = ref('') // 商户省市区回显
let applyInfoRef = ref(null) // 只读组件信息
// 合并信息方法, 智能读取,和信息回显,通过此方法合并
const assignObj = (obj) => {
// 开启只读模式
if (isDisable.value) {
obj.mccText = tool.mccBack(obj.mccCode, mccAli, 'splicing') // 行业码转文字
obj.areaText = tool.addressBack(obj.areaCode, address) // 地理码转文字
applyInfoRef.value.getApplyInof(obj) // 传给只读组件
}
// 信息回显
Object.assign(applyDetailInfo, obj)
// 以下两个码是为了给级联选择器做回显用,需要最后一个码
obj.mccCode ? mccCode.value = obj.mccCode.split('_')[1] : null // mcc码拼接类型要截取
obj.areaCode ? areaCode.value = obj.areaCode[2] : null // 数组类型,直接拿最后一个
}
defineExpose({ launchApply, assignObj })
</script>
<style scoped lang="scss">
@import '../static/information.scss';
</style>

View File

@@ -0,0 +1,545 @@
<template>
<!-- 该页码为填写信息的组件 -->
<!-- 只读文件 -->
<readOnlyInfo
v-if="isDisable"
ref="applyInfoRef"
applyName="zftpay"
></readOnlyInfo>
<view v-if="!isDisable">
<uni-collapse ref="collapse">
<uni-collapse-item title="主体信息" class="coll-title" :open="true">
<view class="content">
<JeePayForm text="商户类型">
<uni-data-checkbox
v-model="applyDetailInfo.merchantType"
:localdata="merchantTypeList"
></uni-data-checkbox>
</JeePayForm>
<!-- 个人不需要营业执照 -->
<template v-if="applyDetailInfo.merchantType != 1">
<JeePayForm text="营业执照照片">
<JeepayUpLoad
ocrFlag="license"
:imgUrl="applyDetailInfo.licenseImg"
@uploadSuccess="uploadSuccess($event, 'licenseImg')"
@clear="clear('licenseImg')"
/>
</JeePayForm>
<JeePayForm
text="营业执照编号"
v-model:value="applyDetailInfo.licenseNo"
/>
</template>
<JeePayForm
text="用户名称"
v-model:value="applyDetailInfo.mchFullName"
tipText="个体工商户请填写法人姓名"
/>
<JeePayForm text="法人身份证人像面照">
<JeepayUpLoad
ocrFlag="idCard"
:imgUrl="applyDetailInfo.idcard1Img"
@uploadSuccess="uploadSuccess($event, 'idcard1Img')"
@clear="clear('idcard1Img')"
/>
</JeePayForm>
<JeePayForm
text="法人身份证姓名"
v-model:value="applyDetailInfo.idcardName"
/>
<JeePayForm
text="法人身份证号"
v-model:value="applyDetailInfo.idcardNo"
/>
<JeePayForm text="法人身份证国徽面照片">
<JeepayUpLoad
ocrFlag="idCard"
:imgUrl="applyDetailInfo.idcard2Img"
@uploadSuccess="uploadSuccess($event, 'idcard2Img')"
@clear="clear('idcard2Img')"
/>
</JeePayForm>
<JeePayForm text="法人身份证起始有效期">
<termOfValidity
:defaultDate="applyDetailInfo.idcardEffectBegin"
@publicSelect="publicSelect($event, 'idcardEffectBegin')"
:isEnd="false"
/>
</JeePayForm>
<JeePayForm text="法人身份证结束有效期">
<termOfValidity
:defaultDate="applyDetailInfo.idcardEffectEnd"
@publicSelect="publicSelect($event, 'idcardEffectEnd')"
/>
</JeePayForm>
</view>
</uni-collapse-item>
<uni-collapse-item title="经营信息" class="coll-title">
<view class="content">
<JeePayForm text="经营类目">
<jeeDataPicker
:code="codeBack.mccCode"
:localdata="mccAli"
@change="publicSelect($event, 'mccCode')"
paramType="splicing"
/>
</JeePayForm>
<JeePayForm text="资质图片">
<JeepayUpLoad
:imgUrl="applyDetailInfo.industryQualificationImage"
@uploadSuccess="
uploadSuccess($event, 'industryQualificationImage')
"
@clear="clear('industryQualificationImage')"
/>
</JeePayForm>
<JeePayForm
text="商户简称"
v-model:value="applyDetailInfo.mchShortName"
/>
<JeePayForm
text="商户联系人姓名"
v-model:value="applyDetailInfo.contactName"
/>
<JeePayForm
text="商户联系人手机号"
v-model:value="applyDetailInfo.contactPhone"
/>
<JeePayForm text="商户经营省市县">
<jeeDataPicker
:code="codeBack.areaCode"
:localdata="address"
@change="publicSelect($event, 'areaCode')"
paramType="arr"
/>
</JeePayForm>
<JeePayForm text="商户详细地址" v-model:value="applyDetailInfo.address" />
<JeePayForm text="门头照">
<JeepayUpLoad
:imgUrl="applyDetailInfo.storeOuterImg"
@uploadSuccess="uploadSuccess($event, 'storeOuterImg')"
@clear="clear('storeOuterImg')"
/>
</JeePayForm>
<JeePayForm text="店内环境照">
<JeepayUpLoad
:imgUrl="applyDetailInfo.storeInnerImg"
@uploadSuccess="uploadSuccess($event, 'storeInnerImg')"
@clear="clear('storeInnerImg')"
/>
</JeePayForm>
</view>
</uni-collapse-item>
<uni-collapse-item title="结算账户" class="coll-title">
<view class="content">
<JeePayForm text="结算类型">
<uni-data-checkbox
v-model="applyDetailInfo.defaultSettleType"
:localdata="defaultSettleTypeList"
></uni-data-checkbox>
</JeePayForm>
<JeePayForm
text="结算支付宝账号"
v-model:value="applyDetailInfo.alipayLogonId"
v-if="applyDetailInfo.defaultSettleType == 'alipayAccount'"
/>
<template v-if="applyDetailInfo.defaultSettleType == 'bankCard'">
<JeePayForm text="账户类型">
<uni-data-checkbox
v-model="applyDetailInfo.settAccountType"
:localdata="settlementTypeList"
></uni-data-checkbox>
</JeePayForm>
<JeePayForm
text="银行开户名"
v-model:value="applyDetailInfo.settAccountName"
/>
<JeePayForm
text="银行账号"
v-model:value="applyDetailInfo.settAccountNo"
/>
<JeePayForm
text="银行名称"
v-model:value="applyDetailInfo.settAccountBankName"
/>
<JeePayForm
text="银行简称"
v-model:value="applyDetailInfo.accountInstId"
/>
<JeePayForm text="开户行分支行所在地区">
<jeeDataPicker
:code="codeBack.bankCode"
:localdata="address"
@change="publicSelect($event, 'settAccountBankBranchAreaCode')"
paramType="arr"
/>
</JeePayForm>
<JeePayForm
text="开户支行名称"
v-model:value="applyDetailInfo.settAccountBankBranchName"
/>
<JeePayForm text="授权函照">
<JeepayUpLoad
:imgUrl="applyDetailInfo.licenseAuthLetterImage"
@uploadSuccess="uploadSuccess($event, 'licenseAuthLetterImage')"
@clear="clear('licenseAuthLetterImage')"
/>
</JeePayForm>
</template>
</view>
</uni-collapse-item>
<uni-collapse-item title="签约信息站点资料" class="coll-title">
<view class="content">
<view class="item">
<view class="title"
><text class="require">*</text><text>签约支付宝账号</text></view
>
<input
type="text"
v-model="applyDetailInfo.bindingAlipayLogonId"
placeholder="请输入签约支付宝账号"
/>
</view>
<view class="check">
<checkbox-group
@change="publicSelect($event, 'zftService')"
class="check-box"
>
<label v-for="(item, index) in plainOptions" :key="index">
<view>
<checkbox
:value="item.value"
:checked="applyDetailInfo.zftService.includes(item.value)"
/>
</view>
<view>{{ item.label }}</view>
</label>
</checkbox-group>
</view>
<view class="site">
<text class="title">站点信息</text>
<view class="btn" @click="addSite">
<text>添加站点</text>
<text class="add">+</text>
</view>
</view>
<template v-if="applyDetailInfo.siteInfos.length > 0">
<view
class="site-list"
v-for="(item, index) in applyDetailInfo.siteInfos"
:key="index"
>
<view class="site-item" style="padding: 0">
<view class="title">站点类型</view>
<radio-group
class="radio-group"
@change="siteTypeChange($event, index)"
>
<!-- 注意这里也是一个v-for 不能与父元素的冲突 -->
<label
class="radio"
v-for="(siteTtem, siteIndex) in siteInfoList"
:key="index"
><radio
:value="siteTtem.value"
:checked="
applyDetailInfo.siteInfos[index].siteType ==
siteTtem.value
"
/>
{{ siteTtem.label }}
</label>
</radio-group>
</view>
<view class="site-item">
<view class="title">站点地址</view>
<input
type="text"
v-model="item.siteUrl"
placeholder="请输入站点地址"
/>
</view>
<view class="site-item">
<view class="title">站点名称</view>
<input
type="text"
v-model="item.siteName"
placeholder="请输入站点名称"
/>
</view>
<view class="site-item">
<view class="title">测试账号</view>
<input
type="text"
v-model="item.account"
placeholder="请输入测试账号"
/>
</view>
<view class="site-item">
<view class="title">测试密码</view>
<input
type="text"
v-model="item.password"
placeholder="请输入测试密码"
/>
</view>
<view class="site-del" @click="siteDel(index)"> 删除 </view>
</view>
</template>
</view>
</uni-collapse-item>
</uni-collapse>
</view>
</template>
<script setup>
import { ref, reactive, toRaw, onMounted, inject } from "vue";
import address from "@/components/applyJson/address.json"; // 地址
import mccAli from "@/components/applyJson/zftMcc.json"; // 行业
import JeepayUpLoad from "@/components/JeepayUpLoad/JeepayUpLoad.vue"; // 图片上传
import readOnlyInfo from "../components/readOnlyInfo.vue"; // 只读文件
import JeePayForm from "@/components/applyComponents/JeePayForm.vue"; // 通用左右结构布局
import tool from "@/util/tool.js"; // 工具类函数
import termOfValidity from "@/components/applyComponents/termOfValidity.vue"; // 选择证件有效期
import JeeDataPicker from "@/components/applyComponents/dataPicker.vue"; // 通用级联选择
import { filterDcit } from "@/hooks/dict"; // 字典
const merchantTypeList = reactive(filterDcit(["A0", "A1", "A2"])); // 商户类型
const defaultSettleTypeList = reactive(filterDcit(["F0", "F1"])); // 结算类型
const settlementTypeList = reactive(filterDcit(["B0", "B1"])); // 账户类型
const channelInfo = inject('channelInfo')
const emit = defineEmits(["applyHandle"]);
// 商户进件详细信息JSON类型字符串
const applyDetailInfo = reactive({
merchantType: 3, // 商户类型 默认为3 代表企业
productType: 1, //产品类型
defaultSettleType: "bankCard", // 结算类型
siteInfos: [], // 选择站点
zftService: [], // 选择服务
});
// 状态: 0-未发起、 1-审核中、 2-进件成功、 3-驳回待修改、 4-待验证、 5-待签约
// 状态为 1,2,4,5 开启disable (也就是状态不为 0 3)
let isDisable = ref(false);
if (!["0", "3", "8"].includes(channelInfo.state)) isDisable.value = true;
// 通用radio checkbox选择事件 回调函数
const publicSelect = (e, key) => {
applyDetailInfo[key] = e.detail.value;
if (key == "merchantType") applyDetailInfo[key] = Number(e.detail.value);
};
// 服务选项
const plainOptions = ref([
{ label: "当面付", value: "当面付" },
{ label: "APP支付", value: "app支付" },
{ label: "WAP支付", value: "wap支付" },
{ label: "电脑支付", value: "电脑支付" },
{ label: "小程序支付", value: "小程序支付" },
]);
// 选择站点下拉选择内容
const siteInfoList = ref([
{ value: "01", label: "微信" },
{ value: "02", label: "APP" },
{ value: "03", label: "服务窗" },
{ value: "04", label: "公众号" },
{ value: "05", label: "其他" },
{ value: "06", label: "支付宝小程序" },
]);
// 添加站点
const addSite = () => {
applyDetailInfo.siteInfos.push({
siteType: "", // 站点类型
siteUrl: "", // 站点地址
siteName: "", // 站点名称
account: "", // 站点账号
password: "", // 站点密码
});
};
// 删除站点
const siteDel = (index) => applyDetailInfo.siteInfos.splice(index, 1);
// 切换站点类型
const siteTypeChange = (e, index) =>
(applyDetailInfo.siteInfos[index].siteType = e.detail.value);
// 上传图片成功
const uploadSuccess = (res, name) => {
applyDetailInfo[name] = res.data;
if (name === "licenseImg") {
applyDetailInfo.licenseNo = res.ocrInfo.licenseNo;
applyDetailInfo.licenseEffectEnd = res.ocrInfo.licenseEffectEnd; // 有效期end
} else if (name == "idcard1Img") {
applyDetailInfo.idcardName = res.ocrInfo.idcardName; // 法人身份证姓名
applyDetailInfo.idcardNo = res.ocrInfo.idcardNo; // 法人身份证号
} else if (name == "idcard2Img") {
applyDetailInfo.idcardEffectBegin = res.ocrInfo.idcardEffectBegin; // 有效期
applyDetailInfo.idcardEffectEnd = res.ocrInfo.idcardEffectEnd; // 有效期end
}
};
// 清除图片 仅前端
const clear = (name) => (applyDetailInfo[name] = "");
// 发起进件
const launchApply = (isTempData) => {
emit("applyHandle", {
name: "zftpay",
isTempData,
applyDetailInfo,
formCheck: [
applyDetailInfo.defaultSettleType,
applyDetailInfo.merchantType,
],
});
};
// 行业类型,地理位置回显
let codeBack = reactive({
areaCode: "", // 商户地理位置回显
bankCode: "", // 银行地址回显
mccCode: "", // 行业回显
});
const applyInfoRef = ref();
// 合并信息方法, 智能读取,和信息回显,通过此方法合并
const assignObj = (obj) => {
// 开启只读模式
if (isDisable.value) {
// 开启只读默认需要将 mcc码地址码银行地址码转为文字
let mccCodeText, areaCodeText, bankCodeText, code, mccInfo;
// mcc文字回显
if (obj.mccCode) code = obj.mccCode.split("_")[1];
for (var i = 0; i < mccAli.length; i++) {
mccInfo = mccAli[i].children.find((val) => val.value == code);
if (mccInfo) break;
}
obj.mccCodeText = obj.mccCode.split("_")[0] + "/" + mccInfo.text;
obj.areaCodeText = tool.addressBack(obj.areaCode, address); // 地理位置文字回显
obj.bankCodeText = tool.addressBack(
obj.settAccountBankBranchAreaCode,
address
); // 银行地理位置文字回显
// 传给只读组件
applyInfoRef.value.getApplyInof(obj);
}
Object.assign(applyDetailInfo, obj);
codeBack.mccCode = obj.mccCode;
obj.areaCode ? (codeBack.areaCode = obj.areaCode[2]) : null;
applyDetailInfo.mccCode
? (codeBack.mccCode = applyDetailInfo.mccCode.split("_")[1])
: null;
};
defineExpose({ launchApply, assignObj });
</script>
<style scoped lang="scss">
@import "../static/information.scss";
.check-box {
display: flex;
flex-wrap: wrap;
padding: 35rpx 30rpx 35rpx 30rpx;
}
.uni-label-pointer {
margin-right: 20rpx;
}
.site {
display: flex;
justify-content: space-between;
padding: 0 30rpx;
color: #666f80;
.title {
font-size: 28rpx;
}
.btn {
.add {
border: 1px dashed #ddd;
display: inline-block;
width: 16px;
height: 16px;
text-align: center;
line-height: 16px;
margin-left: 10px;
color: #666f80;
}
}
}
.site-list {
border: 1px solid #ddd;
border-radius: 20rpx;
margin: 30rpx;
padding: 30rpx;
.site-item {
display: flex;
padding: 20rpx 0;
.title {
text-align: left;
font-weight: 500;
font-size: 28rpx;
color: #666f80;
margin-right: 20rpx;
white-space: nowrap;
}
}
.site-del {
display: flex;
justify-content: center;
margin: 0 auto;
width: 280rpx;
height: 60rpx;
line-height: 60rpx;
border-radius: 10rpx;
background: #f00;
font-weight: 500;
font-size: 30rpx;
color: #fff;
}
}
input,
textarea {
flex-grow: 1;
text-align: right;
font-size: 28rpx;
}
</style>

View File

@@ -0,0 +1,230 @@
<template>
<JMainCard pd="0" wrapPd="15rpx 30rpx" @click="toParent">
<view class="apply-header">
<view class="apply-left">
<view class="apply-logo bdR10" :style="{ backgroundColor: bgColor }">
<image :src="icon" mode="scaleToFill" />
</view>
<view class="single-text-beyond">
{{ ifName }}
<text>{{ createdAt.split("-").join("/") }}</text>
</view>
</view>
<view class="apply-right">
<image :src="stateList[state].image" mode="scaleToFill" />
{{ stateList[state].text }}
</view>
</view>
<view class="apply-info">
<view>
<view>商户进件名</view>
{{ mchFullName }}
</view>
<view class="info-mar">
<view>用户号</view>
{{ mchNo }}
</view>
<view>
<view>进件单号</view>
{{ applyId }}
</view>
</view>
<view class="apply-err bdR10" v-if="applyErrorInfo && state === 3"> 驳回原因{{ applyErrorInfo }} </view>
<view class="button-wrapper">
<view
class="apply-button"
hover-class="u-cell-hover"
hover-stay-time="150"
@tap.stop="copyApply(applyId,mchNo,ifCode)">创建副本</view>
<view
class="apply-button"
hover-class="u-cell-hover"
hover-stay-time="150"
v-if="state == 1 || state == 4 || state == 5"
@tap.stop="emits('getNewState')"
>获取最新结果</view
>
<view
class="apply-button"
hover-class="u-cell-hover"
hover-stay-time="150"
v-if="state == 2"
@tap.stop="toH5ApplyOptionPage(applyId, 'APP_CONFIG')"
>参数配置</view
>
<view
class="apply-button"
hover-class="u-cell-hover"
hover-stay-time="150"
v-if="state == 2 || state == 1 || state == 4 || state == 5 || state == 6"
@tap.stop="toH5ApplyOptionPage(applyId, 'NEXT_BIZS')"
>签约开通</view
>
</view>
</JMainCard>
<SelectedPay :confirmBut="true" @confirm="confirm" />
</template>
<script setup>
import { reactive, ref } from "vue"
import JMainCard from "@/components/newComponents/JMainCard/JMainCard"
import SelectedPay from "./SelectedPay.vue"
const props = defineProps({
ifName: { type: String },
icon: { type: String },
bgColor: { type: String },
createdAt: { type: String },
mchFullName: { type: String },
mchNo: { type: String },
applyId: { type: String },
state: { type: Number },
applyErrorInfo: { type: String },
ifCode:{type:String}
})
const emits = defineEmits(["getNewState", "click"])
const stateList = reactive([
{
text: "草稿", //0
image: "/static/iconImg/draft.svg",
},
{
text: "审核中", //1
image: "/static/iconImg/icon-apply-examine.svg",
},
{
text: "已开通", //2
image: "/static/equipmentImg/check.svg",
},
{
text: "申请被驳回", //3
image: "/static/iconImg/icon-apply-error.svg",
},
{
text: "待验证", //4
image: "/static/iconImg/icon-apply-examine.svg",
},
{
text: "待签约", //5
image: "/static/equipmentImg/check.svg",
},
{
text: "", //6 占位
image: "/static/equipmentImg/check.svg",
},
{
text: "等待预审", //7
image: "/static/iconImg/pending-review.svg",
},
{
text: "预审拒绝", //8
image: "/static/iconImg/passerror.svg",
},
])
function confirm(){
}
const toParent=()=>{
emits('click')
}
function toH5ApplyOptionPage(applyId, configPage) {
uni.navigateTo({ url: `/pageApply/applyDetailH5ApplyOption?applyId=${applyId}&configPage=${configPage}` })
}
// 创建副本
function copyApply(applyId,mchNo,ifCode){
uni.navigateTo({url:`/pageApply/selectChannel?applyId=${applyId}&mchNo=${mchNo}&ifCode=${ifCode}`})
}
</script>
<style lang="scss" scoped>
.apply-header {
display: flex;
justify-content: space-between;
align-items: flex-start;
padding: 30rpx 30rpx 30rpx 0;
margin-left: 30rpx;
border-bottom: 1rpx solid rgba(0, 0, 0, 0.1);
.apply-left {
display: flex;
.apply-logo {
display: flex;
justify-content: center;
align-items: center;
margin-right: 30rpx;
width: 93rpx;
height: 93rpx;
overflow: hidden;
image {
width: 40rpx;
height: 40rpx;
}
}
view {
display: flex;
flex-direction: column;
font-size: 30rpx;
font-weight: 700;
text {
margin-top: 16rpx;
font-size: 25rpx;
font-weight: 500;
color: #8c8c8c;
}
}
}
.apply-right {
display: flex;
align-items: center;
white-space: nowrap;
image {
width: 40rpx;
height: 40rpx;
margin-right: 10rpx;
}
}
}
.apply-info {
padding: 30rpx;
view {
display: flex;
font-size: 28rpx;
view {
width: 190rpx;
color: #8c8c8c;
}
}
.info-mar {
margin: 23rpx 0;
}
}
.apply-err {
padding: 20rpx;
margin: 30rpx;
background-color: rgba(229, 61, 46, 0.1);
word-break: break-all;
font-size: 28rpx;
color: #e53d2e;
}
.button-wrapper {
display: flex;
justify-content: flex-end;
.apply-button {
display: flex;
align-items: center;
height: 70rpx;
padding: 0 33rpx;
margin: 20rpx;
margin-left: 0;
border-radius: 10rpx;
text-align: center;
font-size: 28rpx;
font-weight: 500;
border: 1rpx solid rgba(179, 179, 179, 1);
white-space: nowrap;
}
.u-cell-hover {
opacity: 0.5;
}
}
</style>

View File

@@ -0,0 +1,62 @@
<template>
<view class="a-wrapper">
<block v-for="v in list" :key="v.value">
<view class="a-text" :class="{ selected: v.value === index }" @tap="selected(v)">
{{ v.text }}
<view class="solid" v-show="v.value === index"></view>
</view>
</block>
</view>
</template>
<script setup>
import { reactive, ref } from "vue"
const emits = defineEmits(["selected"])
const list = reactive([
{
text: "全部",
value: "",
},
{
text: "成功",
value: 2,
},
{
text: "审核",
value: 1,
},
{
text: "驳回",
value: 3,
},
])
const index = ref("")
const selected = (val) => {
index.value = val.value
emits("selected", val.value)
}
</script>
<style lang="scss" scoped>
.a-wrapper {
display: flex;
justify-content: space-around;
.a-text {
display: flex;
flex-direction: column;
align-items: center;
font-size: 28rpx;
.solid {
width: 20rpx;
height: 6rpx;
margin-top: 12rpx;
background-color: $primaryColor;
}
}
.selected {
font-weight: 700;
color: $primaryColor;
}
}
</style>

View File

@@ -0,0 +1,81 @@
<template>
<uni-popup ref="popup" type="bottom">
<view class="list-wrapper">
<view class="search-input">
<input
focus
v-model="searchText"
placeholder="请输入银行名称"
@input="filerBank"
/>
</view>
<view class="list-mian">
<view
class="list-item"
v-for="v in filerBank()"
:key="v[key]"
@tap="choice(v)"
>
{{ v[value] }}
</view>
</view>
</view>
</uni-popup>
</template>
<script setup>
import { ref } from "vue";
const props = defineProps({
key: {
type: String,
},
value: {
type: String,
},
list: {
type: Array,
},
});
const emits = defineEmits(["choiceValue"]);
const popup = ref();
const open = () => {
popup.value.open();
};
const searchText = ref("");
const filerBank = () => {
return props.list.filter((v) => v[props.value].includes(searchText.value));
};
const choice = (val) => {
emits("choiceValue", val);
popup.value.close();
};
defineExpose({ open });
</script>
<style lang="scss" scoped>
.list-wrapper {
display: flex;
flex-direction: column;
border-radius: 16rpx 16rpx 0 0;
background-color: #fff;
max-height: 1000rpx;
padding: 30rpx;
.search-input {
input {
border-bottom: 1px solid #ccc;
text-indent: 1rem;
padding: 10rpx 0;
}
}
.list-mian {
flex: 1;
overflow-y: scroll;
margin-top: 20rpx;
.list-item {
margin: 10rpx 0;
padding: 10rpx;
font-size: 28rpx;
}
}
}
</style>

View File

@@ -0,0 +1,120 @@
<template>
<JPopup ref="popup">
<JMainCard pd="0" wrapPd="0 30rpx">
<view class="title">请选择渠道</view>
<view class="list-wrapper">
<block v-for="(v, i) in channelList" :key="i">
<view class="list" @tap="selected(v)">
<view class="list-left">
<view class="imag-wrapper" :style="{ backgroundColor: v.bgColor }">
<image :src="v.icon" mode="" />
</view>
<view>
<view class="l-f-top"> {{ v.isvName }} </view>
<view class="l-f-bottom">{{ v.isvNo }}</view>
</view>
</view>
<view class="list-selected" v-if="codeInfo.ifCode === v.ifCode">
<image src="/static/equipmentImg/check.svg" mode="scaleToFill" />
</view>
</view>
</block>
</view>
</JMainCard>
<JButton pd="30rpx 30rpx 50rpx 30rpx" bgColor="#f2f2f2" color="#000" pdTop="0" @HandleTouch="popup.close()">取消
</JButton>
</JPopup>
</template>
<script setup>
import { ref } from "vue"
import { $rateConfig, $getAcountInfo,$getIsvInfoList } from "@/http/apiManager.js"
import JPopup from "@/components/newComponents/JPopup/JPopup"
import JMainCard from "@/components/newComponents/JMainCard/JMainCard"
import JButton from "@/components/newComponents/JButton/JButton"
const emits = defineEmits(["selected"])
const popup = ref(null)
const channelList = ref([])
const codeInfo = ref("")
// 定义父组件的传值
const props = defineProps({
channelRange: { type: String, default:0 }, // 当前配置的所属infoId
channelIfCode: { type: String ,default: '' }, // 默认选中的支付接口
infoId: { type: String ,default: '' }, // 默认选中的支付接口
})
console.log(props,'propsprops');
const open = () => {
getList()
popup.value.open()
}
const getList = () => {
console.log(props,'propsprops')
$getIsvInfoList({pageNumber:-1,ifCode:props.channelIfCode,range:props.channelRange,infoId:props.infoId}).then(({ bizData }) => {
channelList.value=bizData.records
console.log(bizData);
})
}
const selected = (val) => {
emits("selected", val)
popup.value.close()
}
defineExpose({ open })
</script>
<style lang="scss" scoped>
.title {
padding: 30rpx;
text-align: center;
border-bottom: 1rpx solid #999;
}
.list-wrapper {
height: calc(100vh - 500rpx);
padding-bottom: 40rpx;
overflow-y: scroll;
.list {
display: flex;
justify-content: space-between;
align-items: center;
padding: 30rpx;
.list-left {
display: flex;
align-items: flex-start;
.imag-wrapper {
display: flex;
justify-content: center;
align-items: center;
width: 52rpx;
height: 52rpx;
border-radius: 50%;
margin-right: 20rpx;
image {
width: 40rpx;
height: 40rpx;
border-radius: 50%;
}
}
.l-f-top {
font-size: 30rpx;
}
.l-f-bottom {
margin-top: 15rpx;
font-size: 22rpx;
color: #666f80;
}
}
.list-selected {
image {
width: 40rpx;
height: 40rpx;
}
}
}
}</style>

View File

@@ -0,0 +1,115 @@
<template>
<JPopup ref="popup">
<JMainCard pd="0" wrapPd="0 30rpx">
<view class="title">请选择通道</view>
<view class="list-wrapper">
<block v-for="(v, i) in channelList" :key="i">
<view class="list" @tap="selected(v)">
<view class="list-left">
<view class="imag-wrapper" :style="{ backgroundColor: v.bgColor }">
<image :src="v.icon" mode="" />
</view>
<view>
<view class="l-f-top"> {{ v.ifName }} </view>
<view class="l-f-bottom">{{ v.remark }}</view>
</view>
</view>
<view class="list-selected" v-if="codeInfo.ifCode === v.ifCode">
<image src="/static/equipmentImg/check.svg" mode="scaleToFill" />
</view>
</view>
</block>
</view>
</JMainCard>
<JButton pd="30rpx 30rpx 50rpx 30rpx" bgColor="#f2f2f2" color="#000" pdTop="0" @HandleTouch="popup.close()">取消
</JButton>
</JPopup>
</template>
<script setup>
import { ref } from "vue"
import { $rateConfig, $getAcountInfo } from "@/http/apiManager.js"
import JPopup from "@/components/newComponents/JPopup/JPopup"
import JMainCard from "@/components/newComponents/JMainCard/JMainCard"
import JButton from "@/components/newComponents/JButton/JButton"
const emits = defineEmits(["selected"])
const popup = ref(null)
const channelList = ref([])
const codeInfo = ref("")
const open = () => {
getList()
popup.value.open()
}
const getList = () => {
$getAcountInfo().then(({ bizData }) => {
$rateConfig(bizData.agentNo).then(({ bizData }) => {
channelList.value = bizData.filter(v => {
return v.isOpenApplyment == 1
})
})
})
}
const selected = (val) => {
emits("selected", val)
popup.value.close()
}
defineExpose({ open })
</script>
<style lang="scss" scoped>
.title {
padding: 30rpx;
text-align: center;
border-bottom: 1rpx solid #999;
}
.list-wrapper {
height: calc(100vh - 500rpx);
padding-bottom: 40rpx;
overflow-y: scroll;
.list {
display: flex;
justify-content: space-between;
align-items: center;
padding: 30rpx;
.list-left {
display: flex;
align-items: flex-start;
.imag-wrapper {
display: flex;
justify-content: center;
align-items: center;
width: 52rpx;
height: 52rpx;
border-radius: 50%;
margin-right: 20rpx;
image {
width: 40rpx;
height: 40rpx;
border-radius: 50%;
}
}
.l-f-top {
font-size: 30rpx;
}
.l-f-bottom {
margin-top: 15rpx;
font-size: 22rpx;
color: #666f80;
}
}
.list-selected {
image {
width: 40rpx;
height: 40rpx;
}
}
}
}</style>

View File

@@ -0,0 +1,20 @@
<template>
<view>
<web-view :src="url"></web-view>
</view>
</template>
<script setup>
import { onLoad } from '@dcloudio/uni-app'
import { ref } from 'vue'
let url = ref('')
onLoad((option) => {
url.value = option.url
})
</script>
<style scoped>
</style>

View File

@@ -0,0 +1,810 @@
function shengpay(val) {
return [
[
{ title: "基础信息" },
{ text: "商户类型", value: val.merchantText },
{ text: "行业MCC", value: val.mccText },
{ text: "商户联系人姓名", value: val.contactName },
{ text: "商户联系人电话", value: val.contactPhone },
{ text: "商户联系人邮箱", value: val.contactEmail },
],
[
{ title: "经营信息" },
{ text: "商户简称", value: val.mchShortName },
{ text: "商户名称全称", value: val.mchFullName },
{ text: "商户地理位置", value: val.areaText },
{ text: "商户详细地址", value: val.address },
{ text: "门头照", src: val.storeOuterImg },
{ text: "收银台照片", src: val.storeCashierImg },
{ text: "店内环境照", src: val.storeInnerImg },
],
[
{ title: "证件信息" },
{ text: "法人身份证人像面照", src: val.idcard1Img },
{ text: "法人身份证姓名", value: val.idcardName },
{ text: "法人身份证号", value: val.idcardNo },
{ text: "法人身份证国徽面照片", src: val.idcard2Img },
{ text: "法人身份证起始有效期", value: val.idcardEffectBegin },
{ text: "法人身份证结束有效期", value: val.idcardEffectEnd },
{ text: "法人手持身份证照片", src: val.idcardInHandImg },
{ text: "营业执照编号", value: val.licenseNo },
{ text: "营业执照照片", src: val.licenseImg },
{ text: "营业执照起始有效期", value: val.licenseEffectBegin },
{ text: "营业执照有效期截止", value: val.licenseEffectEnd },
],
ownerInfo(val), // 受益人卡片
[
{ title: "账号信息" },
{ text: "结算账号类型", value: val.settAccountText },
{ text: "结算银行名称", value: val.settAccountBankName },
{
text: "结算银行卡分支行所在地区",
value: val.settAccountBankBranchAreaText,
},
{ text: "结算银行卡支行名称", value: val.settAccountBankBranchName },
{
text: val.settAccountType == "B" ? "开户许可证照片" : "结算银行卡照片",
src: val.settAccountLicenseImg,
},
{
text: val.settAccountType == "B" ? "对公账号" : "银行卡帐号",
value: val.settAccountNo,
},
{ text: "对公账户名称", value: val.companyAccountName },
{ text: "对公账户银行卡号", value: val.companyAccountNo },
{ text: "对公账户开户银行名称", value: val.companyAccountBankName },
{
text: "对公账户开户支行所在地区",
value: val.settAccountBankBranchAreaText,
},
{
text: "对公账户开户支行名称",
value: val.companyAccountBankBranchName,
},
{ text: "开户许可证照片", src: val.companyAccountLicenseImg },
{ text: "持卡人身份证号", value: val.settAccountIdcardNo },
{ text: "请输入持卡人身份证号", value: val.settAccountIdcardNo },
{ text: "持卡人身份证人像照", src: val.settAccountIdcard1Img },
{ text: "持卡人身份证国徽面照片", src: val.settAccountIdcard2Img },
{
text: "持卡人身份证起始有效期",
value: val.settAccountIdcardEffectBegin,
},
{
text: "持卡人身份证结束有效期",
value: val.settAccountIdcardEffectEnd,
},
],
rate(val),
[
{ title: "pos信息" },
{ type: "posInfo", typevalue: val.posInfoList }
]
];
}
function alipay(val) {
return [
[
{ title: "经营信息" },
{ text: "选择产品类型", value: "当面付" },
{ text: "经营类目", value: val.mccText },
{ text: "营业执照图片", src: val.licenseImg },
{ text: "请输入营业执照编号", value: val.licenseNo },
{ text: "营业执照有效期截止", value: val.licenseEffectEnd },
{ text: "特殊资质照", src: val.specialLicenseImg },
],
[
{ title: "门店信息" },
{ text: "商户名称全称", value: val.mchFullName },
{ text: "商户地理位置选择省市县", value: val.areaText },
{ text: "商户详细地址", value: val.address },
{ text: "门头照", src: val.storeOuterImg },
{ text: "店内环境照", src: val.storeInnerImg },
],
[
{ title: "联系人信息" },
{ text: "支付宝账号", value: val.accountNo },
{ text: "商户联系人姓名", value: val.contactName },
{ text: "商户联系人电话", value: val.contactPhone },
{ text: "商户联系人邮箱", value: val.contactEmail },
],
rate(val),
];
}
function wxpay(val) {
return [
[
{ title: "主体信息" },
{ text: "商户类型", value: val.merchantType == 2 ? "个体" : "企业" },
{ text: "营业执照照片", src: val.licenseImg },
{ text: "营业执照编号", value: val.licenseNo },
{ text: "商户名称全称", value: val.mchFullName },
{ text: "法人身份证人像面照", src: val.idcard1Img },
{ text: "法人身份证国徽面照", src: val.idcard2Img },
{ text: "法人身份证姓名", value: val.idcardName },
{ text: "法人身份证号", value: val.idcardNo },
{ text: "法人身份证起始有效期", value: val.idcardEffectBegin },
{ text: "法人身份证结束有效期", value: val.idcardEffectEnd },
],
ownerInfo(val), // 受益人卡片
[
{ title: "经营信息" },
{ text: "商户简称", value: val.mchShortName },
{ text: "客服电话", value: val.servicePhone },
{ text: "门店名称", value: val.storeName },
{ text: "商户地理位置", value: val.areaText },
{ text: "商户详细地址", value: val.address },
{ text: "门头照", src: val.storeOuterImg },
{ text: "店内环境照", src: val.storeInnerImg },
],
[
{ title: "结算规则" },
{ text: "结算规则信息", value: val.setRulesText },
{ text: "行业", value: val.mccCode },
{ text: "特殊资质照", src: val.qualifications },
{
text: "优惠费率活动",
value:
val.activityIndex == 0
? "泛行业活动【优惠区间0.2%~0.6%】"
: "不参与活动",
},
],
[
{ title: "结算账户" },
{
text: "结算账号类型",
value: val.settAccountType == "C" ? "对私" : "对公",
},
{ text: "开户名称", value: val.settAccountName },
{ text: "银行卡账号", value: val.settAccountNo },
{ text: "开户行", value: val.settAccountBankName },
{ text: "结算银行卡分支行所在地区", value: val.bankText },
{ text: "开户行支行名称", value: val.settAccountBankBranchName },
],
[
{ title: "超管信息" },
{
text: "超管身份",
value: val.adminIdentity == "legel" ? "法人" : "负责人",
},
{ text: "超级管理员姓名", value: val.contactName },
{ text: "超级管理员身份证号", value: val.contactIdNumber },
{ text: "手机号", value: val.contactPhone },
{ text: "邮箱", value: val.contactEmail },
],
rate(val),
];
}
function zftpay(val) {
return [
[
{ title: "主体信息" },
{
text: "超管身份",
value:
val.merchantType == 1
? "个人"
: val.merchantType == 2
? "个体"
: "企业",
},
{ text: "营业执照图片", src: val.licenseImg },
{ text: "营业执照编号", value: val.licenseNo },
{ text: "用户名称", value: val.mchFullName },
{ text: "法人身份证人像面照", src: val.idcard1Img },
{ text: "法人身份证姓名", value: val.idcardName },
{ text: "法人身份证号", value: val.idcardNo },
{ text: "法人身份证国徽面照片", src: val.idcard2Img },
{ text: "法人身份证起始有效期", value: val.idcardEffectBegin },
{ text: "法人身份证结束有效期", value: val.idcardEffectEnd },
],
[
{ title: "经营信息" },
{ text: "经营类目", value: val.mccCodeText },
{ text: "资质图片", src: val.industryQualificationImage },
{ text: "商户简称", value: val.mchShortName },
{ text: "商户联系人姓名", value: val.contactName },
{ text: "商户联系人手机号", value: val.contactPhone },
{ text: "商户经营省市县", value: val.areaCodeText },
{ text: "商户详细地址", value: val.address },
{ text: "门头照", src: val.storeOuterImg },
{ text: "店内环境照", src: val.storeInnerImg },
],
[
{ title: "结算账户" },
{
text: "结算类型",
value:
val.defaultSettleType == "alipayAccount" ? "支付宝账号" : "银行卡",
},
{ text: "结算支付宝账号", value: val.alipayLogonId },
{
text: "账户类型",
value: val.settAccountType == "C" ? "对私" : "对公",
},
{ text: "银行开户名", value: val.settAccountName },
{ text: "银行账号", value: val.settAccountNo },
{ text: "银行名称", value: val.settAccountBankName },
{ text: "银行简称", value: val.accountInstId },
{ text: "开户行分支行所在地区", value: val.bankCodeText },
{ text: "开户支行名称", value: val.settAccountBankBranchName },
{ text: "授权函照", src: val.licenseAuthLetterImage },
],
[
{ title: "签约信息站点资料" },
{ text: "签约支付宝账号", value: val.bindingAlipayLogonId },
{ text: "选择服务", value: val.bindingAlipayLogonId },
{ text: "站点信息 ", type: "siteInfos", typevalue: val.siteInfos },
],
];
}
function sftpay(val) {
return [
[
{ title: "主体信息" },
{ text: "商户类型", value: val.merchantText },
{ text: "营业执照照片", src: val.licenseImg },
{ text: "营业执照编号", value: val.licenseNo },
{ text: "商户名称全称", value: val.mchFullName },
{ text: "法人身份证人像面照片", src: val.idcard1Img },
{ text: "法人身份证国徽面照片", src: val.idcard2Img },
{ text: "法人身份证姓名", value: val.idcardName },
{ text: "法人身份证号", value: val.idcardNo },
{ text: "法人身份证结束有效期", value: val.idcardEffectEnd },
],
ownerInfo(val), // 受益人卡片
[
{ title: "店铺信息" },
{ text: "商户简称", value: val.mchShortName },
{ text: "店铺名称", value: val.storeName },
{ text: "店铺链接", value: val.storeUrl },
{ text: "店铺二维码", src: val.storeUrl },
{ text: "小程序AppID", value: val.miniProgramSubAppid },
],
[
{ title: "超级管理员" },
{
text: "超管身份",
value: val.contactType == "65" ? "经营者/法人" : "负责人",
},
{ text: "超管姓名", value: val.contactName },
{ text: "超管身份证号码", value: val.contactIdNumber },
{ text: "手机号", value: val.contactPhone },
{ text: "邮箱", value: val.contactEmail },
],
[
{ title: "结算账户" },
{ text: "账户类型", value: val.settAccountText },
{ text: "开户名称", value: val.settAccountName },
{ text: "银行账号", value: val.settAccountNo },
{ text: "开户行", value: val.accountBankNameShow },
{ text: "开户行省市区", value: val.settAccountBankBranchAreaText },
{ text: "支行所在地区", value: val.bankBranchAreaCodeText },
{ text: "支行名称", value: val.settAccountBankBranchName },
],
];
}
function lklpay(val) {
return [
[
{ title: "主体信息" },
{ text: "商户类型", value: val.merchantText },
{ text: "营业执照照片", src: val.licenseImg },
{ text: "营业执照编号", value: val.licenseNo },
{ text: "营业执照起始有效期", value: val.licenseEffectBegin },
{ text: "营业执照有效期截止", value: val.licenseEffectEnd },
{ text: "用户名称", value: val.mchFullName },
{ text: "法人身份证人像面照", src: val.idcard1Img },
{ text: "法人身份证姓名", value: val.idcardName },
{ text: "法人身份证号", value: val.idcardNo },
{ text: "法人身份证国徽面照片", src: val.idcard2Img },
{ text: "法人身份证起始有效期", value: val.idcardEffectBegin },
{ text: "法人身份证结束有效期", value: val.idcardEffectEnd },
],
[
{ title: "经营信息" },
{ text: "经营类目", value: val.mccText },
{ text: "经营内容", value: val.merBusiText },
{ text: "商户联系人姓名", value: val.contactName },
{ text: "商户联系人手机号", value: val.contactPhone },
{ text: "商户经营省市县", value: val.areaText },
{ text: "商户经营地址", value: val.address },
{ text: "门头照", src: val.storeOuterImg },
{ text: "店内环境照", src: val.storeInnerImg },
],
[
{ title: "结算账户" },
{
text: "账户类型",
value: val.settAccountType == "C" ? "对私" : "对公",
},
{ text: "银行开户名", value: val.settAccountName },
{ text: "银行账号", value: val.settAccountNo },
// { text: "结算周期", value: val.settleText },
{ text: "结算人身份证号", value: val.settAccountIdcardNo },
{
text: "结算人身份证结束有效期",
value: val.settAccountIdcardEffectEnd,
},
// { text: "POS类型", value: val.posText },
{ text: "其他材料", value: val.otherFile },
],
rate(val),
];
}
function ysfpay(val) {
return [
[
{ title: "基础项" },
{
text: "商户类型",
value:
val.merchantType == 1
? "个人"
: val.merchantType == 2
? "个体工商户"
: "企业",
},
{
text: "机构类型",
value:
val.acqOrgType == "RYX"
? "瑞银信"
: val.acqOrgType == "ZF"
? "中付"
: "其他",
},
{ text: "营业执照照片", src: val.licenseImg },
{ text: "营业执照编号", value: val.licenseNo },
{ text: "营业执照有效期截止", value: val.licenseEffectEnd },
{ text: "用户名称", value: val.mchFullName },
{ text: "法人身份证人像面照", src: val.idcard1Img },
{ text: "法人身份证姓名", value: val.idcardName },
{ text: "法人身份证号", value: val.idcardNo },
{ text: "法人身份证国徽面照片", src: val.idcard2Img },
],
[
{ title: "经营信息" },
{ text: "经营类目", value: val.mccText },
{ text: "商户联系人姓名", value: val.contactName },
{ text: "商户联系人手机号", value: val.contactPhone },
{ text: "客服电话", value: val.serviceTel },
{ text: "邮箱地址", value: val.contactEmail },
{ text: "商户经营省市县", value: val.areaText },
{ text: "商户经营地址", value: val.address },
{ text: "门头照", src: val.storeOuterImg },
{ text: "门店外景照", src: val.storeOuter2Img },
{ text: "店内环境照", src: val.storeInnerImg },
{ text: "收银台照", src: val.storeCashierImg },
],
[
{ title: "结算账户" },
{
text: "账户类型",
value:
val.settleAccountType == 1
? "对公"
: val.settleAccountType == 2
? "对私"
: "授权人账户",
},
{ text: "结算周期", value: val.settleText },
{ text: "银行卡正面照", src: val.settAccountLicenseImg },
{ text: "银行开户名", value: val.settAccountName },
{ text: "银行预留手机号", value: val.openBankReservePhone },
{ text: "银行账号", value: val.settAccountNo },
{ text: "银行名称", value: val.settAccountBankName },
{ text: "开户支行名称", value: val.settAccountBankBranchName },
{ text: "联行行号", value: val.openBankCode },
{ text: "被授权人证件人像照", src: val.settAccountIdcard1Img },
{ text: "被授权人证件国徽照", src: val.settAccountIdcard2Img },
{ text: "被授权人身份证号", value: val.settAccountIdcardNo },
{ text: "结算授权证书", src: val.applymentDetailInfo },
{ text: "开户许可证", src: val.applymentDetailInfo },
{ text: "商户收单协议", src: val.acquiringAgreementPhoto },
{ text: "拓展资料", src: val.reserve1 },
],
rate(val),
];
}
function fuioupay(val) {
return [
[
{ title: "基础信息" },
{
text: "商户类型",
value:
val.merchantType == 1
? "个人"
: val.merchantType == 2
? "个体工商户"
: "企业",
},
{ text: "证件类型", value: val.licenseText },
{ text: "营业执照照片", src: val.licenseImg },
{ text: "商户名称全称", value: val.mchFullName },
{
text: val.licenseType == "A" ? "身份证号码" : "营业执照号",
value: val.licenseNo,
},
{ text: "营业执照注册地址", value: val.licRegisAddr },
{ text: "证件有效期开始时间", value: val.licenseEffectBegin },
{ text: "营业执照有效期截止", value: val.licenseEffectEnd },
{ text: "法人身份证人像面照", src: val.idcard1Img },
{ text: "法人身份证姓名", value: val.idcardName },
{ text: "法人身份证号", value: val.idcardNo },
{ text: "法人身份证国徽面照片", src: val.idcard2Img },
{ text: "法人身份证起始有效期", value: val.idcardEffectBegin },
{ text: "法人身份证结束有效期", value: val.idcardEffectEnd },
],
[
{ title: " 经营信息" },
{ text: "经营类目", value: val.mccText },
{ text: "商户简称", value: val.mchShortName },
{ text: "客服电话", value: val.servicePhone },
{ text: "商户经营地区县代码", value: val.areaText },
{ text: "商户详细地址", value: val.address },
{ text: "门头照", src: val.storeOuterImg },
{ text: "店内环境照", src: val.storeInnerImg },
{ text: "商户联系人姓名", value: val.contactName },
{ text: "商户联系人身份证号", value: val.contactCertNo },
{ text: "商户联系人电话", value: val.contactPhone },
{ text: "商户联系人邮箱", value: val.contactEmail },
],
[
{ title: "结算账户" },
{ text: "账户类型", value: val.settAccountText },
{ text: "结算银行卡照片", src: val.settAccountLicenseImg },
{ text: "开户许可证照片", src: val.companyAccountLicenseImg },
{ text: "开户名称", value: val.settAccountName },
{ text: "银行账号", value: val.settAccountNo },
{ text: "开户行", value: val.settAccountBankName },
{ text: "联行号", value: val.interBankNo },
{ text: "开户支行名称", value: val.settAccountBankBranchName },
{ text: "法人入账标识", value: val.acntArtifText },
{ text: "入账账户身份证人像面照片", src: val.settAccountIdcard1Img },
{ text: "入账非法人证明照片", src: val.acntArtifImg },
{ text: "入账证件号", value: val.acntCertifId },
{ text: "入账证件到期日", value: val.acntCertifExpireDt },
{ text: "清算类型", value: val.settleText },
],
[
{ title: "补充资料" },
{ text: "组织机构代码证照片", src: val.organizationImg },
{ text: "税务登记证照片", src: val.taxRegistrationImg },
{ text: "手持证件照片", src: val.handCertificateImg },
{ text: "补充资料照片", src: val.additionImg },
],
];
}
function dgpay(val) {
return [
[
{ title: "主体信息" },
{ text: "商户类型", value: val.merchantType == 1 ? "个人" : "企业" },
{ text: "营业执照", src: val.licenseImg },
{ text: "商户简称", value: val.mchShortName },
{ text: "营业执照编号", value: val.licenseNo },
{ text: "营业执照起始有效期", value: val.licenseEffectBegin },
{ text: "营业执照有效期截止", value: val.licenseEffectEnd },
{ text: "用户名称", value: val.mchFullName },
{ text: "管理员账号", value: val.loginUserName },
{ text: "法人身份证人像面照片", src: val.idcard1Img },
{ text: "法人身份证国徽面照片", src: val.idcard2Img },
{ text: "法人身份证姓名", value: val.idcardName },
{ text: "法人身份证号", value: val.idcardNo },
{ text: "法人身份证起始有效期", value: val.idcardEffectBegin },
{ text: "法人身份证结束有效期", value: val.idcardEffectEnd },
],
[
{ title: "经营信息" },
{ text: "经营类目", value: val.mccText },
{ text: "经营类型", value: val.busiTypeText },
{ text: "小票名称", value: val.receiptName },
{ text: "公司类型", value: val.entText },
{ text: "联系人姓名", value: val.contactName },
{ text: "联系人手机号", value: val.contactPhone },
{ text: "联系人邮箱", value: val.contactEmail },
{ text: "经营省市县", value: val.areaText },
{ text: "经营地址", value: val.address },
{ text: "客服电话", value: val.servicePhone },
],
[
{ title: "结算账户" },
{
text: "账户类型",
value:
val.settAccountType == "B"
? "对公"
: val.settAccountType == "C"
? "对私"
: "对私非法人",
},
{ text: "银行卡开户名", value: val.settAccountName },
{ text: "结算卡正面", src: val.settAccountLicenseImg },
{ text: "结算卡反面", src: val.settBankCardBackImg },
{ text: "银行卡号", value: val.settAccountNo },
{ text: "银行卡开户地", value: val.settAccountBankBranchAreaText },
{ text: "银行编码", value: val.bankCode },
{ text: "联行行号", value: val.branchCode },
{ text: "结算人身份证人像面照片", src: val.settAccountIdcard1Img },
{ text: "结算人身份证国徽面照片", src: val.settAccountIdcard2Img },
{ text: "[持卡人]人身份证号", value: val.settAccountIdcardNo },
{
text: "[持卡人]身份证起始有效期",
value: val.settAccountIdcardEffectBegin,
},
{
text: "[持卡人]身份证结束有效期",
value: val.settAccountIdcardEffectEnd,
},
{ text: "[持卡人]手机号", value: val.settAccountBindPhone },
],
[
{ title: "材料信息" },
{ text: "业务类型", value: val.cashText },
{ text: "手续费类型", value: val.selectFeeText },
{ text: "提现手续费(固定/元)", value: val.fixAmt },
{ text: "费率(百分比/%", value: val.feeRate },
{ text: "结算周期", value: val.settleCycleText },
{ text: "起结金额(元)", value: val.minAmt },
{ text: "留存金额(元)", value: val.remainedAmt },
{ text: "门头照", src: val.storeOuterImg },
{ text: "店内环境照", src: val.storeInnerImg },
{ text: "收银台照", src: val.storeCashierImg },
{ text: "组织机构代码证照片", src: val.orgCodePic },
{ text: "开户许可证照片", src: val.companyAccountLicenseImg },
{ text: "税务登记证照片", src: val.taxRegPic },
{ text: "商务协议", src: val.bankPic },
{ text: "D1结算协议图片", value: val.settleAgreePic },
{ text: "授权委托书", value: val.authEnturstPic },
{ text: "支付宝商户经营类目", value: val.aliMccText },
],
];
}
function utmpay(val) {
return [
[
{ title: "基础项" },
{
text: "商户类型",
value: val.merchantType == "2" ? "个体工商户" : "企业",
},
{
text: "执照类型",
value:
val.businessLicenseType == "00"
? "统一社会信用代码证号(三证合一) "
: obj.businessLicenseType == "01"
? "营业执照(非三证合一)"
: "其他",
},
{ text: "营业执照图片", src: val.licenseImg },
{ text: "营业执照编号", value: val.licenseNo },
{ text: "法人姓名", value: val.legalPerson },
{ text: "用户名称", value: val.mchFullName },
{ text: "商户简称", value: val.mchShortName },
{ text: "法人身份证人像面照", src: val.idcard1Img },
{ text: "法人身份证国徽面照", src: val.idcard2Img },
{ text: "联系人身份证姓名", value: val.idcardName },
{ text: "联系人身份证号", value: val.idcardNo },
{ text: "商户联系人手机号", value: val.contactPhone },
{ text: "商户联系人邮箱", value: val.contactEmail },
],
[
{ title: "经营信息" },
{ text: "经营类目", value: val.mccText },
{ text: "商户地理位置省市县", value: val.areaText },
{ text: "商户经营地址", value: val.address },
{ text: "客服电话", value: val.customerPhone },
{ text: "门头照", src: val.storeOuterImg },
{ text: "店内环境照", src: val.storeInnerImg },
],
[
{ title: "账户信息" },
{ text: "账户类型", value: val.settAccountType == "C" ? "个人" : "企业" },
{ text: "是否为负责人", value: val.isContactInfo == "1" ? "是" : "否" },
{ text: "银行开户名", value: val.settAccountName },
{ text: "持卡人身份证号", value: val.settAccountIdcardNo },
{ text: "银行预留手机号", value: val.bankCardPhone },
{ text: "银行卡照片", src: val.settAccountLicenseImg },
{ text: "银行账号", value: val.settAccountNo },
{ text: "开户行省市县", value: val.settAccountBankBranchAreaText },
{ text: "开户行支行名称", value: val.settAccountBankBranchName },
{ text: "开户银行ID", value: val.bankId },
{ text: "银行账号", value: val.settAccountNo },
{ text: "联行行号", value: val.contactLine },
],
[
{ title: "其他信息" },
{ text: "商户协议照片1", src: val.protocolPhoto1 },
{ text: "商户协议照片2", src: val.protocolPhoto2 },
{ text: "商户协议照片3", src: val.protocolPhoto3 },
{ text: "商户协议照片4", src: val.protocolPhoto4 },
{ text: "其他资料照片", src: val.otherDoc },
{ text: "组织机构代码证照片", src: val.orgPhoto },
],
];
}
function yspay(val) {
return [
[
{ title: "基础项" },
{
text: "商户类型",
value:
val.merchantType == 1
? "小微商户"
: val.merchantType == 2
? "个体商户"
: "企业",
},
{ text: "营业执照照片", src: val.licenseImg },
{ text: "营业执照编号", value: val.licenseNo },
{ text: "营业执照起始有效期", value: val.licenseEffectBegin },
{ text: "营业执照有效期截止", value: val.licenseEffectEnd },
{
text: val.merchantType == 1 ? "用户名称" : "营业执照名称",
value: val.mchFullName,
},
{ text: "商户简称", value: val.mchShortName },
{ text: "法人身份证人像面照", src: val.idcard1Img },
{ text: "法人身份证国徽面照片", src: val.idcard2Img },
{ text: "法人手持身份证照片", src: val.idcardInHandImg },
{ text: "法人身份证姓名", value: val.idcardName },
{ text: "法人身份证号", value: val.idcardNo },
{ text: "法人地址", value: val.idcardAddress },
{ text: "法人电话", value: val.legalPersonPhone },
{ text: "法人性别", value: val.crpGender == 0 ? "男" : "女" },
{ text: "法人职业", value: val.crpProfessionText },
{ text: "法人身份证起始有效期", value: val.idcardEffectBegin },
{ text: "法人身份证结束有效期", value: val.idcardEffectEnd },
],
[
{ title: "经营信息" },
{ text: "经营类目MCC", value: val.mccText },
{ text: "实际控制人姓名", value: val.actualManager },
{ text: "是否为法人信息", value: val.isLegalInfo == 1 ? "是" : "否" },
{ text: "商户联系人姓名", value: val.contactName },
{ text: "商户联系人手机号", value: val.contactPhone },
{ text: "商户联系人邮箱", value: val.contactEmail },
{ text: "商户经营省市县", value: val.areaText },
{ text: "商户经营地址", value: val.address },
{ text: "门头照", src: val.storeOuterImg },
{ text: "店内环境照", src: val.storeInnerImg },
{ text: "收银台照", src: val.storeCashierImg },
],
[
{ title: "结算账户" },
{ text: "账户类型", value: val.settAccountType == "C" ? "对私" : "对公" },
{
text: "结算类型",
value: val.settlementType == "00" ? "结算至内部" : "结算至银行卡",
},
{ text: "银行开户名", value: val.settAccountName },
{ text: "开户许可证照片", value: val.companyAccountLicenseImg },
{ text: "银行卡正面照", src: val.settAccountLicenseImg },
{ text: "银行卡反面照", src: val.settAccountBankImg2 },
{ text: "银行卡账号", value: val.settAccountNo },
{ text: "开户行编号", value: val.bankType },
{ text: "银行名称", value: val.settAccountBankName },
{ text: "开户行行号", value: val.openAccBanktype },
{ text: "开户行支行名称", value: val.settAccountBankBranchName },
{ text: "开户行省市县", value: val.bankText },
{ text: "银行预留手机号", value: val.bankMobile },
{
text: "是否法人结算",
value: val.codeLegalPersonAcc == "0" ? "非法人" : "法人",
},
{ text: "结算人身份证人像面照片", src: val.settAccountIdcard1Img },
{ text: "结算人身份证国徽面照片", src: val.settAccountIdcard2Img },
{ text: "结算人姓名", value: val.unincorporatedName },
{ text: "结算人身份证号", value: val.settAccountIdcardNo },
{ text: "结算人证件有效期", value: val.settAccountIdcardEffectEnd },
{ text: "结算人身份证地址", value: val.authAddress },
],
rate(val),
];
}
function lklspay(val) {
return [
[
{ title: "基础项" },
{
text: "商户类型",
value:
val.merchantType == 1
? "小微商户"
: val.merchantType == 3
? "企业"
: "'",
},
{
text: "营业执照名称",
value: val.merchantType == 1 ? "" : val.mchFullName,
},
{ text: "营业执照照片", src: val.licenseImg },
{ text: "营业执照编号", value: val.licenseNo },
{ text: "营业执照起始有效期", value: val.licenseEffectBegin },
{ text: "营业执照有效期截止", value: val.licenseEffectEnd },
{ text: "商户注册名称", value: val.merRegName },
{ text: "商户经营名称", value: val.mchShortName },
{ text: "法人身份证人像面照", src: val.idcard1Img },
{ text: "法人身份证国徽面照片", src: val.idcard2Img },
{ text: "法人手持身份证照片", src: val.idcardInHandImg },
{ text: "法人身份证姓名", value: val.idcardName },
{ text: "法人身份证号", value: val.idcardNo },
{ text: "法人身份证起始有效期", value: val.idcardEffectBegin },
{ text: "法人身份证结束有效期", value: val.idcardEffectEnd },
],
[
{ title: "经营信息" },
{ text: "经营类目MCC", value: val.mccText },
{ text: "商户联系人姓名", value: val.contactName },
{ text: "商户联系人手机号", value: val.contactPhone },
{ text: "商户联系人邮箱", value: val.contactEmail },
{ text: "商户经营省市县", value: val.areaText },
{ text: "门头照", src: val.storeOuterImg },
{ text: "店内环境照", src: val.storeInnerImg },
{ text: "收银台照", src: val.storeCashierImg },
{ text: "经纬度地址", value: val.address },
],
[
{ title: "结算账户" },
{ text: "账户类型", value: val.settAccountType == "C" ? "对私" : "对公" },
{ text: "银行开户名", value: val.settAccountName },
{ text: "银行卡账号", value: val.settAccountNo },
{ text: "支行地址", value: val.settAccountBankBranchAreaText },
{ text: "银行名称", value: val.settAccountBankName },
{ text: "联行行号", value: val.openningBankCode },
{ text: "清算行号", value: val.clearingBankCode },
{
text: "是否法人结算",
value: val.codeLegalPersonAcc == "0" ? "非法人" : "法人",
},
{ text: "结算人身份证人像面照片", src: val.settAccountIdcard1Img },
{ text: "结算人身份证国徽面照片", src: val.settAccountIdcard2Img },
{ text: "结算人姓名", value: val.unincorporatedName },
{ text: "结算人身份证号", value: val.settAccountIdcardNo },
{ text: "结算人证件有效期", value: val.settAccountIdcardEffectEnd },
{ text: "结算人身份证地址", value: val.authAddress },
{ text: "其他材料", value: val.otherFile },
],
rate(val),
];
}
// 费率
function rate(val) {
return ["fee", val.paywayFeeList ? val.paywayFeeList : ""];
}
// 受益人卡片
function ownerInfo(val) {
return [
"owner",
val.companyBeneficiaryList && val.companyBeneficiaryList.length > 0
? val.companyBeneficiaryList
: "",
];
}
export default {
shengpay,
alipay,
wxpay,
sftpay,
lklpay,
ysfpay,
fuioupay,
dgpay,
utmpay,
yspay,
lklspay,
};

View File

@@ -0,0 +1,428 @@
<template>
<!-- 板块标题 -->
<view class="rate-title" @click="rateHeightHandle" v-if="vdata.isShowRate">
<view style="font-size: 28rpx; font-weight: 700;">{{ props.title }}</view>
<text class="svg" :class="{trans:(rateheight != '0px')}"></text>
</view>
<!-- 父元素 用于展开和收起 -->
<view class="rate-list" ref="rateListRef" :style="{height: rateheight}" v-if="vdata.isShowRate">
<!-- 一键全开全关 -->
<JeePayForm :start="false" text="全部开启" backColor="#fff" border="bottom-border">
<switch @change="allOnHandle" :checked="vdata.allOn" class="name" />
</JeePayForm>
<view class="list-item" v-for="(item, index) in paramsList" :key="index">
<view class="title">
<view class="name">{{ item.wayName }} {{ item.wayCode }}</view>
<switch :checked="item.state == 1" @change="switchHandle($event, index)" class="name" />
</view>
<!-- 是否为银联模式 有bug 待后台优化 -->
<!-- <view class="title" v-if="item.feeType == 'LEVEL'">
<view class="name">银联模式</view>
<switch :checked="item.creditCardPaywayFee" @change="isUpMode($event, index)" class="name" />
</view> -->
<view class="line" v-if="item.feeType == 'SINGLE'">单笔费率: <input type="text" v-model="item.feeRate" /> %</view>
<view v-if="item.feeType == 'LEVEL'">
<template v-if="item.creditCardPaywayFee">
<view>借记卡储蓄卡:</view>
<view class="line">保底费用<input type="text" v-model="item.minFee" /> ,</view>
<view class="line">封顶费用<input type="text" v-model="item.maxFee" /></view>
<template v-for="(levelItem, i) in item.levelList" :key="i">
<view style="margin: 10rpx 0;"></view>
{{ levelItem.minFee }} ~ {{ levelItem.maxFee }}
<view class="line">费率<input type="text" v-model='levelItem.feeRate' /> %</view>
</template>
<view style="margin-top: 20rpx">贷记卡信用卡:</view>
<view class="line">保底费用<input type="text" v-model="item.creditCardPaywayFee.minFee" /> ,</view>
<view class="line">封顶费用<input type="text" v-model="item.creditCardPaywayFee.maxFee" /></view>
<template v-for="(levelItem, i) in item.creditCardPaywayFee.levelList" :key="i">
<view style="margin: 10rpx 0;"></view>
{{ levelItem.minFee }} ~ {{ levelItem.maxFee }}
<view class="line">费率<input type="text" v-model='levelItem.feeRate' /> %</view>
</template>
</template>
<template v-else>
阶梯费率:
<view class="line">保底费用<input type="text" v-model="item.minFee" /> ,</view>
<view class="line">封顶费用<input type="text" v-model="item.maxFee" /></view>
<template v-for="(levelItem, i) in item.levelList" :key="i">
<view style="margin: 10rpx 0;"></view>
{{ levelItem.minFee }} ~ {{ levelItem.maxFee }}
<view class="line">费率<input type="text" v-model='levelItem.feeRate' /> %</view>
</template>
</template>
</view>
</view>
</view>
</template>
<script setup>
import { ref, inject, reactive } from 'vue'
import {$getRateConfigPayways, $getRateConfigSavedMapData} from '@/http/apiManager.js'
import JeePayForm from "@/components/applyComponents/JeePayForm.vue"; // 通用左右结构布局
/*
* 核心逻辑
* 1. 从可配置接口中,获取费率列表 payways 接口)
* 2. 从已配置接口中,获取具体的费率值 savedMapData接口
MCHRATE 进件时自己配置的费率,如果存在进件信息,费率值和状态以此为准
READONLYPARENTDEFRATE 代理商给商户配置的费率,不存在进件信息以此为准,费率组件展示几条数据,以此为准
READONLYPARENTAGENT 代理商自己配置的费率,只读即可,目前用不到
* 3. 将上面两个接口中的相关字段存入一个新数组
* 4. 切换与修改费率值时,都在修改这个新数组
* 5. 点击提交按钮后父组件调用子组件的方法将该数组传递至父组件提交前删除渠道名字段wayName
* 6. 遍历该数组将状态为1开通的费率对象保存至用于提交的参数数组中
* 7. 获取费率时要整乘100提交前费率要整除100
* 8. 针对'支付宝产品和微信产品'的费率值,要确保所有的费率值一致
* 9. 针对微信进件'渠道',选择参与费率活动时,才展开费率板块
*/
const props = defineProps({
// 是否对费率值进行校验 all:全部校验 separate:支付宝 微信分开校验 默认不校验
// 目前只有微信 支付宝 和 富友会进行校验
isCheck: {type: String, default: ''},
title: {type: String, default: '签约产品费率'},
isUtmpay: {type: Boolean, default: false },
})
const emits = defineEmits(['autoPos'])
const channelInfo = inject('channelInfo')
let rateheight = ref('0px') // 费率板块的高度
// 如果是银联前置渠道 则rateheight的高度 变为auto 让其自动展开
if (props.isUtmpay) rateheight.value = 'auto'
function rateHeightHandle () {
rateheight.value == '0px' ? rateheight.value = 'auto' : rateheight.value = '0px'
}
let rateListRef = ref(null)
let infoId = `_${channelInfo.mchNo}` // 用于传参
const vdata = reactive({
isShowRate: true, // 是否展示签约产品费率列表READONLYPARENTDEFRATE为空不展示
allOn: false, // 是否全部展开
})
// 存在进件信息时,存入以下信息
if (channelInfo.applyId) {
infoId = `${channelInfo.applyId}_${channelInfo.mchNo}`
}
let paramsList = ref([]) // 用于传值
// 可配置费率列表
$getRateConfigPayways(infoId,'agentApplyment', channelInfo.code).then( ({bizData}) => {
bizData.records.forEach(item => {
// 从可配置列表中,获取并保存以下信息
paramsList.value.push({
wayCode: item.wayCode, // 渠道code
wayName: item.wayName // 渠道名
})
})
// 请求已配置费率列表
return $getRateConfigSavedMapData(infoId, 'agentApplyment', channelInfo.code)
}).then(({bizData}) => {
// 如果可配置列表中内容为空,则不可进选择费率
if (Object.keys(paramsList.value).length === 0) {
vdata.isShowRate = false
return false
}
// 从此处获取 费率类型 费率值等信息以READONLYPARENTDEFRATE为准READONLYPARENTAGENT 只读, 并且将其状态设置为 未开启 0
Object.keys(bizData.READONLYPARENTAGENT).forEach(item => {
bizData.READONLYPARENTAGENT[item].state = 0
})
let rateConfigList = Object.assign(bizData.READONLYPARENTAGENT, bizData.READONLYPARENTDEFRATE)
// 组装数据rateConfigListparamsList 用于渲染与传参
Object.keys(rateConfigList).forEach(item => {
for (let i = 0; i < paramsList.value.length; i++) {
if (item === paramsList.value[i].wayCode) {
Object.assign(paramsList.value[i], rateConfigList[item])
break
}
}
})
paramsList.value.forEach(item => {
// 如果某一项没有 费率类型,则代表未匹配到费率, 未其添加默认值
if (!item.feeType) {
item['state'] = '0'
item['feeType'] = 'SINGLE'
item['feeRate'] = '0'
}
})
// 判断是否存在进件信息,若存在则用进件信息的费率再匹配一次
if (channelInfo.applyId) {
Object.keys(bizData.MCHRATE).forEach(item => {
for (let i = 0; i < paramsList.value.length; i++) {
if (item === paramsList.value[i].wayCode) {
Object.assign(paramsList.value[i], bizData.MCHRATE[item])
break
}
}
})
}
// 合并之后调用遍历数据方法,费率百分比值 乘100 金额分转元 除100
rateEach(paramsList.value)
})
// 遍历费率的方法
const rateEach = data => {
data.forEach(item => {
// 如果某一项的state为0则代表未全部开启费率
if(item.state == 0) vdata.allOn = false
if (item['feeRate']) item['feeRate'] = (item['feeRate'] * 100).toFixed(2)
if (item['levelList']) {
for (let i = 0; i< item['levelList'].length; i++) {
item['levelList'][i].feeRate = (item['levelList'][i].feeRate * 100).toFixed(2)
}
}
if (item['creditCardPaywayFee']) {
item['creditCardPaywayFee'].maxFee = (item['creditCardPaywayFee'].maxFee / 100).toFixed(2)
item['creditCardPaywayFee'].minFee = (item['creditCardPaywayFee'].minFee / 100).toFixed(2)
for (let i = 0; i< item['creditCardPaywayFee']['levelList'].length; i++) {
item['creditCardPaywayFee']['levelList'][i].feeRate = (item['creditCardPaywayFee']['levelList'][i].feeRate * 100).toFixed(2)
}
}
if (item['maxFee']) item['maxFee'] = (item['maxFee'] / 100).toFixed(2)
if (item['minFee']) item['minFee'] = (item['minFee'] / 100).toFixed(2)
})
}
// 全部开启的开关
const allOnHandle = e => {
let flag = e.detail.value
flag ? paramsList.value.forEach(item => item.state = 1)
: paramsList.value.forEach(item => item.state = 0)
}
// 切换事件
const switchHandle = (e, index) => {
let flag = e.detail.value
flag ? paramsList.value[index].state = 1
: paramsList.value[index].state = 0
for (let i = 0; i < paramsList.value.length; i++) {
if (paramsList.value[i].state == 0) {
vdata.allOn = false
} else {
vdata.allOn = true
}
}
// 如果开启了 auto-pos 则向父组件传递信息
if (paramsList.value[index].wayCode === 'AUTO_POS') {
emits('autoPos', e.detail.value)
}
}
// 银联模式切换事件
const isUpMode = (e, index) => {
// 打开银联模式
if (e.detail.value) {
paramsList.value[index].creditCardPaywayFee = {
levelList: [{
maxFee: 0,
feeRate: 0,
minFee: 0
}, {
maxFee: 0,
feeRate: 0,
minFee: 0
}],
maxFee: 0,
minFee: 0
}
} else {
delete paramsList.value[index].creditCardPaywayFee
}
}
// 父组件调用此方法,传值回去
const getList = isTempData => {
// 深拷贝,因为要整除100防止页面中的值受到影响
let data = JSON.parse(JSON.stringify(paramsList.value)),
rateList = [], // 传给父组件的费率信息
errInfo = '' // 错误信息
// 费率值校验,判断是否相等 全部判断模式 适用于 支付宝官方和微信官方
if ((props.isCheck == 'all') && !isTempData) {
for(let i = 0; i < data.length; i++) {
if (data[i].state != 1) continue
if (data[0].feeRate != data[i].feeRate) {
errInfo = '设置了不同的费率值,请确保一致'
break
}
}
}
// 支付宝和微信分开 验证 适用于 富友进件
if ((props.isCheck == 'separate') && !isTempData) {
let wxList = []
let aliList = []
data.forEach(item => {
if ((item.wayCode.indexOf('ALI') != -1) && item.state == 1) aliList.push(item)
if ((item.wayCode.indexOf('WX') != -1) && item.state == 1) wxList.push(item)
})
for (let j = 0; j < aliList.length; j++) {
if (aliList[0].feeRate != aliList[j].feeRate) {
errInfo = '支付宝费率设置了不同的费率值,请确保一致'
break
}
}
for (let i = 0; i < wxList.length; i++) {
if (wxList[0].feeRate != wxList[i].feeRate) {
errInfo = '微信费率设置了不同的费率值,请确保一致'
break
}
}
}
// 如果存在保存信息往下不执行
if (errInfo) return errInfo
// 要把费率都除100
data.forEach(item => {
delete item.wayName // 删除渠道名字
// 金额元转分
if (item.feeType === 'SINGLE' ) {
item.feeRate = (item.feeRate / 100).toFixed(4)
} else {
item.levelList.forEach(item => item.feeRate = (item.feeRate / 100).toFixed(4))
item.maxFee *= 100
item.minFee *= 100
if (item.creditCardPaywayFee) {
item.creditCardPaywayFee.levelList.forEach(item => item.feeRate = (item.feeRate / 100).toFixed(4))
item.creditCardPaywayFee.maxFee *= 100
item.creditCardPaywayFee.minFee *= 100
}
}
// 传值时只传已开通的
if(item.state == 1) {
rateList.push(item)
}
})
return rateList
}
// 向父元素导出方法
defineExpose({ getList })
</script>
<style scoped lang="scss">
.rate-title {
display: flex;
justify-content: space-between;
align-items: center;
padding: 30rpx;
color:#000;
font-weight: 550;
border-bottom: 1px solid #ebeef5;
image {
width: 28rpx;
height: 28rpx;
}
.svg {
font-family: uniicons;
text-decoration: none;
text-align: center;
color: rgb(187, 187, 187);
font-size: 14px;
&::before {
content: "\e6b8";
}
}
}
.trans{
transform: rotate(180deg);
}
.rate-list {
// height: 600rpx;
overflow: hidden;
display: flex;
flex-direction: column;
.list-item {
border-bottom: 1px solid #ebeef5;
padding: 35rpx 30rpx;
display: flex;
flex-direction: column;
font-size: 28rpx;
input {
border: 1px solid #ebeef5;
display: inline-block;
width: 180rpx;
margin: 0 10rpx;
padding: 0 10rpx;
}
.title {
display: flex;
justify-content: space-between;
align-items: center;
margin-bottom: 30rpx;
}
}
}
// 不存咋费率值时设置的属性
.none {
padding: 0 !important;
border: none !important;
height: 0;
overflow: hidden;
}
.line {
display: flex;
align-items: center;
}
.submit{
display: flex;
justify-content: center;
margin: 0 auto ;
width: 380rpx;
height: 90rpx;
line-height: 90rpx;
border-radius: 10rpx;
background: #3981FF;
font-weight: 500;
font-size: 30rpx;
color: #fff;
}
</style>

View File

@@ -0,0 +1,227 @@
<template>
<!-- 折叠面版存在BUG所以收益人卡片也采取了 手写的折叠面板 所用样式和 费率板块一致 -->
<view class="rate-title" @click="rateHeightHandle">
<view style="font-size: 28rpx; font-weight: 700;">受益人卡片</view>
<text class="svg" :class="{trans:(rateheight != '0px')}"></text>
</view>
<view class="rate-list" ref="rateListRef" :style="{height: rateheight}">
<view @click="addOwner" class="add-owner">新增企业受益人</view>
<view class="owner-box" v-for="(item, index) in vdata.companyBeneficiaryList" :key="index">
<view class="owner-title">
<view>企业受益人信息{{ index + 1 }}</view>
<view>
<view v-if="props.legalBtn" @click="emits('setLegalInfo', index)" class="owner-del" style="margin-bottom: 20rpx;">将法人设置为受益人</view>
<view @click="delOwnerCard(index)" class="owner-del">删除该受益人</view>
</view>
</view>
<JeePayForm text="受益人身份证人像面照" backColor="#fff" :start="!props.isOwner">
<JeepayUpLoad ocrFlag="idCard" :imgUrl="vdata.companyBeneficiaryList[index].idcard1Img" @uploadSuccess="uploadSucOwner($event, index, 'idcard1Img')" @clear="clearOwner('idcard1Img', index)" />
</JeePayForm>
<JeePayForm text="受益人身份证国徽面照" backColor="#fff" :start="!props.isOwner">
<JeepayUpLoad ocrFlag="idCard" :imgUrl="vdata.companyBeneficiaryList[index].idcard2Img" @uploadSuccess="uploadSucOwner($event, index, 'idcard2Img')" @clear="clearOwner('idcard2Img', index)" />
</JeePayForm>
<JeePayForm text="受益人身份证姓名" v-model:value="vdata.companyBeneficiaryList[index].idcardName" backColor="#fff" :start="!props.isOwner" />
<JeePayForm text="受益人身份证号" v-model:value="vdata.companyBeneficiaryList[index].idcardNo" backColor="#fff" :start="!props.isOwner" />
<JeePayForm text="受益人身份证起始有效期" backColor="#fff" :start="!props.isOwner">
<termOfValidity :defaultDate="vdata.companyBeneficiaryList[index].idcardEffectBegin" @publicSelect="publicSelect($event, 'idcardEffectBegin')" :isEnd="false" />
</JeePayForm>
<JeePayForm text="受益人身份证结束有效期" backColor="#fff" :start="!props.isOwner">
<termOfValidity :defaultDate="vdata.companyBeneficiaryList[index].idcardEffectEnd" @publicSelect="publicSelect($event, 'idcardEffectEnd')" />
</JeePayForm>
<JeePayForm text="受益人身份证居住地址" backColor="#fff" v-model:value="vdata.companyBeneficiaryList[index].idcardAddress" :start="!props.isOwner" />
</view>
</view>
</template>
<script setup>
import { ref, reactive, watch, onMounted, toRaw, nextTick } from 'vue'
import JeepayUpLoad from '@/components/JeepayUpLoad/JeepayUpLoad.vue' // 图片上传
import { onLoad } from '@dcloudio/uni-app'
import JeePayForm from '@/components/applyComponents/JeePayForm.vue' // 通用左右结构布局
import termOfValidity from '@/components/applyComponents/termOfValidity.vue' // 选择证件有效期
const props = defineProps({
isOwner: { type: Boolean, default: false }, // 法人是否为收益人,是收益人可以删除最后一个卡片,不是则不能删除最后一个
legalBtn: { type: Boolean, default: false }, // 法人设置为收益人按钮
isShengft: { type: Boolean, default: false }, // 盛付通页面 会自动生成一个卡片
})
const emits = defineEmits(['setLegalInfo'])
let rateheight = ref('0px') // 费率板块的高度
function rateHeightHandle () {
rateheight.value == '0px' ? rateheight.value = 'auto' : rateheight.value = '0px'
}
const vdata = reactive({
companyBeneficiaryList: []
})
// 盛付通进件 受益人信息必填一项
onMounted(() => {
if (props.isShengft && vdata.companyBeneficiaryList.length == 0) {
addOwner()
}
})
// 信息回显
const ownerInfoBack = info => Object.assign(vdata.companyBeneficiaryList, info)
// 新增受益人卡片
const addOwner = () => {
nextTick(() => {
// 法人是受益人最多数组最多3项 不是数组最多4项
let len = vdata.companyBeneficiaryList.length
if (props.owner && len >= 3) {
return uni.showToast({ title: '最多新增三个企业受益人', icon: 'none' })
}
if (!props.owner && len >= 4) {
return uni.showToast({ title: '最多新增四个企业受益人', icon: 'none' })
}
vdata.companyBeneficiaryList.push({
idcard1Img: '',
idcardNo: '',
idcardName: '',
idcardAddress: '',
idcard2Img: '',
idcardEffectEnd: '',
idcardEffectBegin: '',
})
})
}
// 删除卡片
const delOwnerCard = i => {
if (vdata.companyBeneficiaryList.length == 1 && !props.isOwner) {
return uni.showToast({ title: '最后一项不可删除', icon: 'none' })
}
vdata.companyBeneficiaryList.splice(i, 1)
}
// 受益人身份证图片上传成功
const uploadSucOwner = (res, index, name) => {
vdata.companyBeneficiaryList[index][name] = res.data // 图片回显
// ocr信息回显
Object.assign(vdata.companyBeneficiaryList[index], res.ocrInfo)
}
// 删除收益人图片
const clearOwner = (name, index) => vdata.companyBeneficiaryList[index][name] = ''
// 父组件进件时,会调用该方法获取参数
const ownerInfo = () => toRaw(vdata.companyBeneficiaryList)
defineExpose({ ownerInfo, ownerInfoBack })
</script>
<style lang="scss" scoped>
// 新建受益人卡片
.add-owner {
width: 320rpx;
height: 60rpx;
line-height: 60rpx;
border-radius: 0.3125rem;
text-align: center;
background: #0041c4;
font-weight: 500;
font-size: 0.9375rem;
color: #fff;
margin: 20rpx auto;
}
.owner-box {
border: 1rpx solid #e8e8e8;
margin: 20rpx;
padding: 30rpx 30rpx 3rpx 30rpx;
box-sizing: border-box;
border-radius: 10rpx;
.item {
padding-left: 0;
padding-right: 0;
}
.owner-title {
display: flex;
justify-content: space-between;
align-items: center;
margin-bottom: 30rpx;
}
.owner-del {
border-radius: 0.3125rem;
background: #0041c4;
font-weight: 500;
color: #fff;
text-align: center;
padding: 8rpx 20rpx;
}
}
.rate-title {
display: flex;
justify-content: space-between;
align-items: center;
padding: 30rpx;
color:#000;
font-weight: 550;
border-bottom: 1px solid #ebeef5;
image {
width: 28rpx;
height: 28rpx;
}
.svg {
font-family: uniicons;
text-decoration: none;
text-align: center;
color: rgb(187, 187, 187);
font-size: 14px;
&::before {
content: "\e6b8";
}
}
}
.trans{
transform: rotate(180deg);
}
.rate-list {
// height: 600rpx;
overflow: hidden;
display: flex;
flex-direction: column;
.list-item {
border-bottom: 1px solid #ebeef5;
padding: 35rpx 30rpx;
display: flex;
flex-direction: column;
font-size: 28rpx;
input {
border: 1px solid #ebeef5;
display: inline-block;
width: 180rpx;
margin: 0 10rpx;
padding: 0 10rpx;
}
.title {
display: flex;
justify-content: space-between;
align-items: center;
margin-bottom: 30rpx;
}
}
}
</style>

View File

@@ -0,0 +1,519 @@
<template>
<view class="read-page">
<!-- 本页面为只读信息页面 -->
<!-- 双重for循环 -->
<view class="box" :class="{ fold: isFold }" ref="boxRef">
<view v-for="(item, index) in applyInfoList" :key="index" class="list">
<view v-for="(val, valIndex) in item" :key="valIndex">
<!-- 只有标题 -->
<view v-if="val.title" class="title">{{ val.title }}</view>
<!-- 文字回显 -->
<view v-if="val.value" class="item-text">
<text class="grey">{{ val.text }}</text>
<view style="white-space: pre-wrap; word-wrap: break-word">{{
val.value
}}</view>
</view>
<!-- 图片回显 -->
<view v-if="val.src" class="item-img">
<text class="grey">{{ val.text }}</text>
<image
:src="val.src"
mode="aspectFit"
@click="openBackImg(val.src)"
></image>
</view>
<!-- 支付通站点回显 -->
<template v-if="val.type == 'siteInfos'">
<view v-for="(siteTtem, siteIndex) in val.typevalue" :key="siteIndex">
<view class="item-img"
><text class="grey">站点类型</text>
<text> {{ siteTypeHandle(siteTtem.siteType) }}</text></view
>
<view class="item-img"
><text class="grey">站点地址</text>
<text> {{ siteTtem.siteUrl }}</text></view
>
<view class="item-img"
><text class="grey">站点名称</text>
<text> {{ siteTtem.siteName }}</text></view
>
<view class="item-img"
><text class="grey">站点账号</text>
<text> {{ siteTtem.account }}</text></view
>
<view class="item-img"
><text class="grey">站点密码</text>
<text> {{ siteTtem.password }}</text></view
>
</view>
</template>
<!-- 受益人卡片 -->
<view v-if="val == 'owner' && val[0].idcard1Img" class="title"
>受益人信息</view
>
<view v-if="Array.isArray(val) && val[0].idcard1Img">
<view v-for="(ownerItem, ownerIndex) in val" :key="ownerIndex">
<view class="item-img margin-b-20">
<text class="grey">受益人身份证人像面照</text>
<image
:src="ownerItem.idcard1Img"
mode="aspectFit"
@click="openBackImg(ownerItem.idcard1Img)"
/>
</view>
<view class="item-img margin-b-20">
<text class="grey">受益人身份证国徽面照</text>
<image
:src="ownerItem.idcard2Img"
mode="aspectFit"
@click="openBackImg(ownerItem.idcard2Img)"
/>
</view>
<view class="item-img margin-b-20">
<text class="grey">受益人身份证姓名</text>
<text>{{ ownerItem.idcardName }}</text>
</view>
<view class="item-img margin-b-20">
<text class="grey">受益人身份证号</text>
<text>{{ ownerItem.idcardNo }}</text>
</view>
<view class="item-img margin-b-20">
<text class="grey">受益人身份证起始有效期</text>
<text>{{ ownerItem.idcardEffectBegin }}</text>
</view>
<view class="item-img margin-b-20">
<text class="grey">受益人身份证结束有效期</text>
<text>{{ ownerItem.idcardEffectEnd }}</text>
</view>
<view class="item-img margin-b-20">
<text class="grey">受益人身份证居住地址</text>
<text>{{ ownerItem.idcardAddress }}</text>
</view>
</view>
</view>
<!-- 只有标题 -->
<view v-if="val == 'fee'" class="title">费率信息</view>
<!-- 费率回显 -->
<view v-if="Array.isArray(val) && val[0].wayCode">
<view
v-for="(feeItem, index) in val"
:key="index"
class="margin-30"
>
<view class="name grey">{{ feeItem.wayCode }}</view>
<view v-if="feeItem.feeType == 'SINGLE'" class="item-text">
<text class="grey">单笔费率:</text>
<text>{{ (feeItem.feeRate * 100).toFixed(2) }} %</text>
</view>
<view v-if="feeItem.feeType == 'LEVEL'">
<!-- 银联模式的阶梯费率 -->
<template v-if="feeItem.creditCardPaywayFee">
<view
>借记卡储蓄卡: [ 保底费用{{
feeItem.minFee / 100
}}
, 封顶费用{{ feeItem.maxFee / 100 }} ]</view
>
<template
v-for="(levelItem, i) in feeItem.levelList"
:key="i"
>
<view style="margin: 10rpx 0"></view>
{{ levelItem.minFee }} ~ {{ levelItem.maxFee }}
费率 {{ (levelItem.feeRate * 100).toFixed(2) }}%
</template>
<view style="margin-top: 20rpx"
>贷记卡信用卡: [ 保底费用{{
feeItem.creditCardPaywayFee.minFee / 100
}}
, 封顶费用{{
feeItem.creditCardPaywayFee.maxFee / 100
}}
]</view
>
<template
v-for="(levelItem, i) in feeItem.creditCardPaywayFee
.levelList"
:key="i"
>
<view style="margin: 10rpx 0"></view>
{{ levelItem.minFee }} 元 ~ {{ levelItem.maxFee }}元,
费率: {{ (levelItem.feeRate * 100).toFixed(2) }}%
</template>
</template>
<!-- 普通模式的阶梯费率 -->
<template v-else>
阶梯费率: [ 保底费用:{{ feeItem.minFee / 100 }} 元,
封顶费用:{{ feeItem.maxFee / 100 }} 元 ]
<template
v-for="(levelItem, i) in feeItem.levelList"
:key="i"
>
<view style="margin: 10rpx 0"></view>
{{ levelItem.minFee }} 元 ~ {{ levelItem.maxFee }}元,
费率: {{ (levelItem.feeRate * 100).toFixed(2) }}%
</template>
</template>
</view>
</view>
</view>
<!-- POS信息回显 -->
<template v-if="val.type == 'posInfo'">
<view v-for="(posItem, posIndex) in val.typevalue" :key="posIndex">
<view class="item-img margin-b-20"
><text class="grey">pos安装地址</text>
<text> {{ posItem.areaText }}</text></view
>
<view class="item-img margin-b-20"
><text class="grey">具体位置</text>
<text> {{ posItem.terminalDetailAddress }}</text></view
>
<view class="item-img margin-b-20"
><text class="grey">小票名称</text>
<text> {{ posItem.ticketName }}</text></view
>
<view class="item-img margin-b-20">
<text class="grey">终端数量</text>
<text> {{ posItem.terminalCount }}</text>
</view>
</view>
</template>
</view>
</view>
<!-- 挑高用 -->
<view v-if="!isFold" style="height: 70rpx"></view>
<!-- 上下拉 -->
<view class="btn-box">
<!-- <view v-if="isFold" class="btn-back"></view> -->
<view v-if="false" class="btn-back"></view>
<view class="btn" @click="changeHeight">
{{ isFold ? "查看全部" : "收起" }}
<image
v-if="isFold"
src="../../static/img/jt-btm.svg"
style="transform: rotate(180deg)"
mode=""
></image>
<image
v-if="!isFold"
src="../../static/img/jt-btm.svg"
mode=""
></image>
</view>
</view>
</view>
<!-- 支付宝待签约二维码 -->
<view
class="box wx-open"
v-if="channelInfo.state == 5 && channelInfo.applyName == 'alipay'"
>
<view class="down-img">
<image :src="vdata.contractImg" mode="aspectFit"></image>
<view style="margin-top: 30rpx"
>请使用支付宝扫描二维码,根据页面指引完成签约</view
>
<view class="down" @click="down(vdata.contractImg)">保存至相册</view>
</view>
</view>
<!-- 微信待签约二维码 -->
<view
class="box wx-open"
v-if="channelInfo.state == 5 && channelInfo.applyName == 'wxpay'"
>
<view class="down-img">
<image :src="channelInfo.img" mode="aspectFit"></image>
<view style="margin-top: 30rpx"
>请超级管理员使用微信扫描二维码,根据页面指引完成签约</view
>
</view>
</view>
<!-- 收付通待签约二维码 -->
<view
class="box wx-open"
v-if="channelInfo.state == 5 && channelInfo.applyName == 'sftpay'"
>
<view class="down-img">
<image :src="vdata.contractImg" mode="aspectFit"></image>
<view style="margin-top: 30rpx"
>请超级管理员使用微信扫描二维码,根据页面指引完成签约</view
>
<view class="down" @click="down(vdata.contractImg)">保存至相册</view>
</view>
</view>
<!-- 图片预览(手写非原生) -->
<enlarge
v-if="isPreview"
:imgs="imgBackUrl"
@enlargeClose="enlargeClose"
:changeIsShow="false"
/>
</view>
</template>
<script setup>
import qrcode from "@/util/qrcode.js";
import { ref, onMounted, reactive, inject } from "vue";
import {
$elecContractGenerate,
$elecContractSign,
$fuiouUpload,
} from "@/http/apiManager.js";
import { saveHeadImgFile } from "@/util/saveImg.js"; // 用于base64图片下载
import enlarge from "@/components/JeepayUpLoad/enlarge.vue"; // 图片预览
import useBackPress from "@/hooks/useBackPress.js"; // 返回阻断函数
import JeepayUpLoad from "@/components/JeepayUpLoad/JeepayUpLoad.vue"; // 图片上传
import echo from "./dataEcho/dataEcho";
const channelInfo = inject("channelInfo");
const vdata = reactive({
contractImg: "", // 签约图片
});
let applyInfoList = ref([]); // 信息列表
// 高度切换
let isFold = ref(true);
const changeHeight = () => {
isFold.value = !isFold.value;
};
let isPreview = ref(false); // 图片预览是否展示
let imgBackUrl = ref(""); // 图片预览大图
const openBackImg = (url) => {
isPreview.value = true;
imgBackUrl.value = url;
// #ifdef H5 || APP-PLUS
active();
// #endif
};
// 关闭图片预览
const enlargeClose = () => {
isPreview.value = false;
// #ifdef H5 || APP-PLUS
inactive();
// #endif
};
const { active, inactive } = useBackPress(enlargeClose); // onBackPress 阻断返回
// 在这里处理不同进件渠道的签约
onMounted(() => {
if (channelInfo.applyName == "alipay") {
vdata.contractImg = drawQRcode(channelInfo.img); // 生成支付宝签约图片
}
});
// 保存待签约图片
const down = (url) => {
// #ifdef APP-PLUS
saveHeadImgFile(url, 80)
.then((success) => {
uni.showToast({ title: "保存成功", icon: "none" });
})
.catch((err) => {
uni.showToast({ title: "保存失败,请重试", icon: "none" });
});
// #endif
//#ifdef MP-WEIXIN
var aa = wx.getFileSystemManager();
aa.writeFile({
filePath: wx.env.USER_DATA_PATH + "/ali.png",
data: url.slice(22),
encoding: "base64",
success: (res) => {
wx.saveImageToPhotosAlbum({
filePath: wx.env.USER_DATA_PATH + "/ali.png",
success: function (res) {
wx.showToast({ title: "保存成功" });
},
});
},
});
//#endif
};
// 制作图片
const drawQRcode = (url) => {
return qrcode.drawImg(url, {
typeNumber: 4, // 密度
errorCorrectLevel: "Q", // 纠错等级
size: 175, // 白色边框
});
};
// 用于甄选数据
const getApplyInof = (val) => {
// vdata.applyDetailInfo = val;
applyInfoList.value = echo[channelInfo.code](val);
};
// 转换站点类型
const siteTypeHandle = (val) => {
let text;
switch (val) {
case "01":
text = "微信";
break;
case "02":
text = "APP";
break;
case "03":
text = "服务窗";
break;
case "04":
text = "公众号";
break;
case "05":
text = "其他";
break;
case "06":
text = "支付宝小程序";
break;
}
return text;
};
defineExpose({ getApplyInof });
</script>
<style scoped lang="scss">
.page-only {
box-sizing: border-box;
}
.box {
height: auto;
transition: 0.3s;
position: relative;
border-radius: 20rpx;
background: #fff;
padding: 0rpx 40rpx;
box-sizing: border-box;
}
.list {
& > view {
margin: 30rpx 0;
}
.title {
font-weight: 600;
color: #000;
}
.item-text {
display: flex;
justify-content: space-between;
}
.item-img {
display: flex;
align-items: flex-start;
justify-content: space-between;
image {
width: 120rpx;
height: 120rpx;
}
}
}
// 微信签约
.wx-open {
margin-top: 30rpx;
padding: 40rpx;
.first-title {
font-size: 28rpx;
color: #18191d;
font-weight: bold;
}
.tips {
font-size: 25rpx;
color: #7e7e80;
margin: 20rpx 0 40rpx;
}
.state {
margin-bottom: 30rpx;
display: flex;
justify-content: space-between;
}
.second-title {
font-size: 27rpx;
color: #000;
}
.wx-img {
width: 300rpx;
height: 300rpx;
margin: 30rpx 0 20rpx;
}
}
// 灰色文字/
.grey {
white-space: nowrap;
color: #a3a3a5;
margin-right: 20rpx;
}
// 下拉按钮
.btn {
height: 100rpx;
color: #3981ff;
display: flex;
flex-direction: row;
align-items: center;
justify-content: center;
background-color: #fff;
image {
width: 20rpx;
height: 20rpx;
margin-left: 20rpx;
}
}
.btn-back {
background: linear-gradient(transparent, #f5f6fc);
height: 100rpx;
}
.fold {
height: 460rpx;
overflow: hidden;
}
.btn-box {
position: absolute;
width: 100%;
bottom: 0;
left: 0;
}
// 图片预览
.preview-img {
position: fixed;
top: 0;
left: 0;
width: 100vw;
height: 100vh;
background-color: #000;
z-index: 25;
display: flex;
justify-content: center;
align-items: center;
}
.margin-30 {
margin: 30rpx 0;
}
.margin-b-20 {
margin-bottom: 20rpx;
}
</style>

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,164 @@
<template>
<!-- 自主签约 -->
<view class="box wx-open">
<view class="first-title">
<text>电子合同签约</text>
<view class="submit-btn" @tap="getSignInfo(true)">刷新</view>
</view>
<view class="tips">如需使用支付功能请完成以下签约和授权</view>
<view class="state">
<text>签约状态</text>
<view>{{ vdata.bizSignInfo.state || '异常[' + vdata.bizSignInfo.errInfo + ']' }}</view>
</view>
<template v-if="vdata.bizSignInfo.signUrl">
<view class="second-title">电子合同签约地址和二维码</view>
<view style="margin-top: 20rpx;white-space: pre-wrap; word-wrap: break-word; color: #3981ff" @click="toContract()">
{{ vdata.bizSignInfo.signUrl }}
</view>
<view style="display: flex;justify-content: center;margin-bottom: 20rpx">
<image :src="drawQRcode(vdata.bizSignInfo.signUrl)" class="wx-img" />
</view>
</template>
<view class="state" style="margin-top: 40rpx;">
<text style="white-space: nowrap; margin-right: 10rpx">商户确认状态</text>
<view>{{ vdata.wxOpenInfo.state || '异常[' + vdata.wxOpenInfo.errInfo + ']' }}</view>
</view>
<template v-if="vdata.wxOpenInfo.signUrl">
<view class="second-title">
<text>微信开户意愿确认</text>
<view class="submit-btn" @tap="getWxInfo(true)">刷新</view>
</view>
<view style="color:#666666;font-size: 25rpx;margin-top: 20rpx">商户联系人使用已绑定银行卡的微信扫下面的二维码:</view>
<view style="display: flex;justify-content: center;">
<image v-if="vdata.wxOpenInfo.imgType == 'qrContent'" :src="drawQRcode(vdata.wxOpenInfo.signUrl)" class="wx-img" />
<image v-else :src="'data:image/jpg;base64,' + vdata.wxOpenInfo.signUrl" mode="" class="wx-img" />
</view>
<view style="color:#666666;font-size: 25rpx;margin-top: 20rpx">(温馨提示:自助认证不限制谁来操作认证,但建议是商户联系人进行认证,以免后期需要扫码找不到微信认证管理员)</view>
</template>
</view>
</template>
<script setup>
import { ref, reactive, onMounted, inject } from 'vue'
import JeePayForm from '@/components/applyComponents/JeePayForm.vue' // 通用左右结构布局
import JeepayUpLoad from '@/components/JeepayUpLoad/JeepayUpLoad.vue' // 图片上传
import qrcode from '@/util/qrcode.js'
import { $getMchApplymentChannelSignInfo, $getMchApplymentWxOpenInfo } from '@/http/apiManager.js'
const channelInfo = inject('channelInfo')
onMounted(() => {
if (['2', '5'].includes(channelInfo.state)) {
getWxInfo()
getSignInfo()
}
})
const vdata = reactive({
bizSignInfo: {}, // 电子合同状态查询
wxOpenInfo: {}, // 微信开户意愿信息
isRefresh: false, // 是否点击了刷新按钮
})
// 电子合同状态查询
const getSignInfo = (flag = false) => {
vdata.isRefresh = flag
$getMchApplymentChannelSignInfo(channelInfo.applyId).then(({bizData}) => {
vdata.bizSignInfo = bizData
if (vdata.isRefresh) {
uni.showToast({title: '已刷新', icon: 'none'})
vdata.isRefresh = false
}
}).catch(err => vdata.isRefresh = false)
}
// 微信开户意愿查询
const getWxInfo = (flag = false) => {
vdata.isRefresh = flag
$getMchApplymentWxOpenInfo(channelInfo.applyId).then(({bizData}) => {
vdata.wxOpenInfo = bizData
if (vdata.isRefresh) {
uni.showToast({title: '已刷新', icon: 'none'})
vdata.isRefresh = false
}
}).catch(err => vdata.isRefresh = false)
}
// 跳转至电子合同页 盛付通 富友 会用到
const toContract = () => {
uni.navigateTo({ url: '../../components/contract?url=' + vdata.bizSignInfo.signUrl })
}
// 制作图片
const drawQRcode = url => {
return qrcode.drawImg(url, {
typeNumber: 4, // 密度
errorCorrectLevel: 'Q', // 纠错等级
size: 175, // 白色边框
})
}
</script>
<style scoped lang="less">
.flex {
display: flex;
justify-content: space-between;
}
.box {
height: auto;
transition: .3s;
position: relative;
border-radius: 20rpx;
background: #f5f6fc;
padding: 10rpx 40rpx;
box-sizing: border-box;
}
// 微信签约
.wx-open {
margin-top: 30rpx;
padding: 40rpx;
.first-title {
font-size: 28rpx;
color: #18191d;
font-weight: bold;
display: flex;
justify-content: space-between;
}
.tips {
font-size: 25rpx;
color: #7e7e80;
margin: 20rpx 0 40rpx;
}
.state {
margin-bottom: 30rpx;
display: flex;
justify-content: space-between;
}
.second-title {
font-size: 27rpx;
color: #000;
display: flex;
justify-content: space-between;
}
.wx-img {
width: 300rpx;
height: 300rpx;
margin: 30rpx 0 20rpx ;
}
}
.submit-btn {
border-radius: 0.3125rem;
background: #3981FF;
color: #fff;
padding: 0.15625rem 0.46875rem;
}
</style>

View File

@@ -0,0 +1,245 @@
<template>
<view class="page-wrapper global-wrapper bgF2">
<JHeaderTitle title="发起进件" bgColor="#f2f2f2" />
<view class="select-title">商户</view>
<JMainCard pd="0" wrapPd="20rpx">
<view class="select-wrapper" @tap="jumpPage('mch')">
<view class="select-mch" v-if="mchInfo.mchNo == undefined"> 请选择商户 </view>
<view class="mch-info" v-else>
<image src="/static/equipmentImg/mch-list.svg" mode="scaleToFill" />
<view
>{{ mchInfo.mchName }} <text>{{ mchInfo.mchNo }}</text>
</view>
</view>
<image src="/static/iconImg/right-arrow.svg" mode="scaleToFill" />
</view>
</JMainCard>
<template v-if="mchInfo.mchNo && vdata.range == 1">
<view class="select-title change-config">
<text>自动配置到应用</text>
<switch style=" transform: scale(1.2)" color="#BF80FF" :checked="vdata.configAppIdFlag" @change="isConfigAppId" />
</view>
<JMainCard pd="0" wrapPd="20rpx" v-if="vdata.configAppIdFlag">
<view class="select-wrapper" @tap="jumpPageAppId('appId', appInfo.appId, { mchNo: mchInfo.mchNo })">
<view class="select-mch" v-if="!appInfo.appId"> 请选择应用 </view>
<view class="mch-info" v-else>
<image src="/static/iconImg/icon-app-selected.svg" mode="scaleToFill" />
<view
>{{ appInfo.appName }} <text>{{ appInfo.appId }}</text>
</view>
</view>
<image src="/static/iconImg/right-arrow.svg" mode="scaleToFill" />
</view>
</JMainCard>
</template>
<view class="select-title">通道</view>
<JMainCard pd="0" wrapPd="20rpx">
<view class="select-wrapper" @tap="pay.open(payInfo)">
<view class="select-mch" v-if="payInfo.ifCode === undefined"> 请选择通道 </view>
<view class="mch-info" v-else>
<view class="img-wrapper bdR10" :style="{ backgroundColor: payInfo.bgColor }">
<image :src="payInfo.icon" mode="scaleToFill" />
</view>
<view
>{{ payInfo.ifName }} <text>{{ payInfo.remark }}</text>
</view>
</view>
<image src="/static/iconImg/right-arrow.svg" mode="scaleToFill" />
</view>
</JMainCard>
<view class="select-title">渠道</view>
<JMainCard pd="0" wrapPd="20rpx">
<view class="select-wrapper" @tap="isv.open(isvInfo)">
<view class="select-mch" v-if="isvInfo.isvNo === undefined"> 请选择通道 </view>
<view class="mch-info" v-else>
<view>{{ isvInfo.isvName }}<text>{{isvInfo.isvNo}}</text> </view>
</view>
<image src="/static/iconImg/right-arrow.svg" mode="scaleToFill" />
</view>
</JMainCard>
<view class="select-footer">
<JButton pd="30rpx 30rpx 50rpx 30rpx" @HandleTouch="next">下一步</JButton>
</view>
</view>
<SelectedPay ref="pay" @selected="selected" />
<SelectedIsv ref="isv" :infoId="vdata.mchNo" :channelRange="1" :channelIfCode="vdata.ifCode" @selected="selectedIsv" />
</template>
<script setup>
import { ref,reactive } from 'vue'
import { onShow,onLoad,onUnload } from '@dcloudio/uni-app'
import { $getIsvInfoList,$findMer,$getMchAppList } from '@/http/apiManager.js'
import JHeaderTitle from '@/components/newComponents/JHeaderTitle/JHeaderTitle'
import JMainCard from '@/components/newComponents/JMainCard/JMainCard'
import JButton from '@/components/newComponents/JButton/JButton'
import SelectedPay from './components/SelectedPay.vue'
import SelectedIsv from './components/SelectedIsv.vue'
import useStore from '@/hooks/useStore.js'
const { getStore, clearItem } = useStore()
onLoad((options)=>{
if (options.range) vdata.range = options.range
if(options.applyId){
Object.assign(vdata,options)
getApplyInfo(options)
}
})
onShow(() => {
if (getStore('mch') && getStore('mch').mchNo && getStore('mch').mchNo !== mchInfo.value.mchNo) {
mchInfo.value = getStore('mch')
vdata.mchNo=mchInfo.value.mchNo
getAppList()
}
if (getStore("appId") && getStore("appId").appId) {
console.log(getStore("appId"));
appInfo.value = getStore("appId")
}
})
const mchInfo = ref({})
const payInfo = ref({})
const isvInfo = ref({})
const appInfo = ref({}) //应用信息
const pay = ref(null)
const isv = ref(null)
const vdata = reactive({
ifCode:"",
range:0,
configAppIdFlag:true
})
const jumpPage = (val) => {
uni.navigateTo({
url: `/pageWork/SelectedList/SelectedList?title=${val}&selected=${mchInfo.value.mchNo}`,
})
}
// 跳转到通用选择页面
const jumpPageAppId = (val, selected, search) => {
if (search) search = JSON.stringify(search)
uni.navigateTo({
url: `/pageWork/SelectedList/SelectedList?title=${val}&selected=${selected}&&search=${search}`,
})
}
const next = () => {
console.log(mchInfo);
if (!mchInfo.value.mchNo){
return uni.showToast({ title: '请选择商户', icon: 'none' })
}
if (!payInfo.value.ifCode) return uni.showToast({ title: '请选择通道', icon: 'none' })
uni.showLoading({ title: '加载中...' })
// 缺参数
$getIsvInfoList({pageNumber:-1,ifCode:payInfo.value.ifCode,range:vdata.range,infoId:mchInfo.value.mchNo}).then((res) => {
// $getIsvInfoList().then((res) => {
uni.hideLoading()
// uni.navigateTo({
// url: `./applyDetail?code=${payInfo.value.ifCode}&state=${0}&name=${
// payInfo.value.ifName
// }&applyId=${""}&codeUrl=${false}&mchNo=${mchInfo.value.mchNo}`,
// })
let copyInfoSourceApplyIdParam = vdata.applyId || ''
vdata.applyId = vdata.applyId? vdata.applyId :'' // 防止地址栏被转为 undefined
console.log(`./applyDetailWeb?mchNo=${mchInfo.value.mchNo}&ifCode=${payInfo.value.ifCode}&isView=0&copyInfoSourceApplyId=${copyInfoSourceApplyIdParam}&isvNo=${isvInfo.value.isvNo}&range=${vdata.range}`);
uni.navigateTo({ url: `./applyDetailWeb?mchNo=${mchInfo.value.mchNo}&ifCode=${payInfo.value.ifCode}&isView=0&copyInfoSourceApplyId=${copyInfoSourceApplyIdParam}&isvNo=${isvInfo.value.isvNo}&range=${vdata.range}` })
// uni.navigateTo({ url: `./applyDetailWeb?mchNo=${mchInfo.value.mchNo}&ifCode=${payInfo.value.ifCode}&isView=0&copyInfoSourceApplyId=${vdata.applyId}&autoConfigMchAppId=${vdata.configAppIdFlag?appInfo.value.appId:''}` })
})
}
const selected = (data) => {
payInfo.value = data
vdata.ifCode = data.ifCode
}
const selectedIsv = (data) => {
isvInfo.value = data
console.log(isvInfo.value);
}
function getApplyInfo(options) {
$findMer(options.mchNo).then(({bizData})=>{
mchInfo.value = bizData
getAppList()
})
}
const isConfigAppId = (e) => {
vdata.configAppIdFlag = e.detail.value
}
// 查询默认应用
const getAppList = () => {
if(!mchInfo.value.mchNo) return
$getMchAppList({ mchNo: mchInfo.value.mchNo,defaultFlag: 1 }).then(({ bizData }) => {
if (bizData.records.length > 0) {
appInfo.value = bizData.records[0]
}
})
}
onUnload(()=>{
clearItem('mch')
clearItem('appId')
})
</script>
<style lang="scss" scoped>
.page-wrapper {
.select-title {
margin-top: 30rpx;
margin-left: 50rpx;
font-size: 33rpx;
}
.select-wrapper {
display: flex;
justify-content: space-between;
align-items: center;
padding: 30rpx;
.select-mch {
margin: 20rpx;
}
.mch-info {
display: flex;
image {
width: 93rpx;
height: 93rpx;
margin-right: 10rpx;
}
view {
display: flex;
flex-direction: column;
font-size: 33rpx;
font-weight: 700;
text {
margin-top: 15rpx;
color: #8c8c8c;
font-size: 25rpx;
font-weight: 500;
}
}
}
image {
width: 40rpx;
height: 40rpx;
}
.img-wrapper {
display: flex;
justify-content: center;
align-items: center;
overflow: hidden;
width: 93rpx;
height: 93rpx;
margin-right: 20rpx;
image {
width: 60rpx;
height: 66rpx;
}
}
}
.select-footer {
position: fixed;
right: 0;
left: 0;
bottom: 0;
}
}
.change-config{
display: flex;
justify-content: space-between;
align-items: center;
padding-right: 20rpx;
}
</style>

View File

@@ -0,0 +1,205 @@
::v-deep .uni-collapse-item__title-text{
font-weight: bold;
font-size: 28rpx;
color: #000;
}
.mch-title {
font-weight: bold;
font-size: 28rpx;
color: #3981FF;
}
.item{
box-sizing: border-box;
//height: 110rpx;
width: 100%;
background-color: #fff;
border-top: 1rpx solid #e8e8e8;
display: flex;
justify-content: space-between;
align-items: flex-start;
padding: 35rpx 30rpx 35rpx 30rpx;
font-weight: 500;
font-size: 28rpx;
text-align: left;
color: #000;
.title{
text-align: left;
font-weight: 500;
font-size: 28rpx;
color: #666f80;
margin-right: 20rpx;
white-space: nowrap;
}
input, textarea {
flex-grow: 1;
text-align: right;
font-size: 28rpx;
}
.imgupload{
position: relative;
height: 120rpx;
width: 120rpx;
background-color: #E6E9ED;
border-radius: 10rpx;
display: flex;
align-items: center;
justify-content: center;
}
.delate{
position: absolute;
top: 70rpx;
left: -20rpx;
height: 40rpx;
width: 40rpx;
border-radius: 5rpx;
background-color: #ff0000;
}
}
.radio-group{
display: flex;
width: auto;
flex-wrap: wrap;
}
.radio{
margin-left: 10rpx;
margin-bottom: 10rpx;
}
.notes{
height: 30rpx;
display: flex;
align-items: center;
justify-content: flex-start;
padding-left: 30rpx;
padding-top: 30rpx;
padding-bottom: 30rpx;
//background-color: #18BC37;
image {
margin: 6rpx 10rpx 0 0;
}
text {
font-weight: 500;
font-size: 22rpx;
color: #666f80;
}
}
.result{
box-sizing: border-box;
display: flex;
justify-content: space-between;
align-items: flex-start;
margin: 0 auto;
width: 630rpx;
border-radius: 5rpx;
padding: 20rpx;
margin-bottom: 50rpx;
border: 1px solid rgba(253, 40, 33, 0.3);
font-weight: 500;
font-size: 22rpx;
line-height: 39rpx;
image{
height: 20rpx;
width: 20rpx;
margin-top: 6rpx;
}
}
.result-fail{
@extend .result;
color: #991b17;
background: rgba(253, 40, 33, 0.05);
}
.result-wait{
@extend .result;
align-items: center;
color: #FE7F00;
background: rgba(253, 143, 33, 0.05);
border: 1px solid rgba(253, 143, 33, 0.3);
}
.result-success{
@extend .result;
align-items: center;
color: #175BE6;
background: rgba(23, 91, 230, 0.05);
border: 1px solid rgba(23, 91, 230, 0.3);
}
// 星号
.require {
width: 20rpx;
color: red;
}
.mch-type {
display: flex;
flex-direction: row;
align-items: center;
image {
margin-left: 10px;
height: 20rpx;
width: 20rpx;
}
}
.mch-title {
font-weight: bold;
font-size: 28rpx;
color: #3981FF;
}
.mch-type {
display: flex;
align-items: center;
image {
margin-left: 10px;
height: 20rpx;
width: 20rpx;
}
}
// 复选框样式穿透
::v-deep .uni-checkbox-input {
width: 30rpx;
height: 30rpx;
}
::v-deep .uni-label-pointer {
display: flex;
align-items: center;
}
// 有效期
.validity-tiem {
display: flex;
flex-direction: column;
align-items: center;
image {
width: 20rpx;
height: 20rpx;
margin-left: 20rpx;
}
}
.validity-row {
display: flex;
flex-direction: row;
align-items: center;
image {
width: 20rpx;
height: 20rpx;
margin-left: 20rpx;
}
}
// 透明遮罩层
.mark {
position: relative;
&::before {
position: absolute;
left: 0;
top: 0;
content: '';
width: 100%;
height: 100%;
background: #fff;
opacity: 0;
z-index: 10;
}
}