源文件

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,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>