This commit is contained in:
yangtao 2024-04-01 18:47:20 +08:00
parent 223f232499
commit 9812f6e52f
14 changed files with 693 additions and 427 deletions

View File

@ -777,3 +777,19 @@ export function queryIdCard(data) {
export function queryCheck(data) {
return request.post('intention/check', data, {noAuth: true})
}
/**
* 查询银行卡信息
* @param object data
*
*/
export function queryBankCard(data) {
return request.post('intention/bank', data, {noAuth: true})
}
/**
* 查询联行号
* @param object data
*
*/
export function queryCNAPS(data) {
return request.post('intention/interbank', data, {noAuth: true})
}

View File

@ -219,9 +219,12 @@ export function throttle(fn, delay) {
var delay = delay || 200;
return function(...args) {
lastArgs = args;
console.log('没进来');
if(!timer){
console.log('进来了');
timer = setTimeout(()=>{
timer = null;
console.log('节----');
fn.apply(this, lastArgs);
}, delay);
}

File diff suppressed because it is too large Load Diff

View File

@ -31,7 +31,7 @@
<view class="uni-list-cell-db acea-row row-middle">
<text class="item-name required">身份证正反面上传</text>
<view class="">
{{pics.length}}/2
{{shopInfo.idCardPhoto.length}}/2
</view>
</view>
<view class="acea-row row-middle">
@ -112,7 +112,7 @@
<view class="uni-list-cell-db acea-row row-middle">
<text class="item-name required">营业执照</text>
<view class="">
{{pics.length}}/1
{{shopInfo.businessLicense.length}}/1
</view>
</view>
<view class="acea-row row-middle">
@ -123,7 +123,7 @@
<image :src='item'></image>
<text class='iconfont icon-guanbi1' @click.stop='DelPic(shopInfo.businessLicense,index)'></text>
</view>
<view class='pictrue acea-row row-center-wrapper row-column' @click='uploadpic(shopInfo.businessLicense)' v-if="pics.length < 1">
<view class='pictrue acea-row row-center-wrapper row-column' @click='uploadpic(shopInfo.businessLicense)' v-if="shopInfo.businessLicense.length < 1">
<text class='iconfont icon-icon25201' style="left: 25px;top: 25px;"></text>
<!-- <view>上传图片</view> -->
</view>
@ -156,7 +156,12 @@
<text class="tips-text" >请检查格式是否为x年x月x日</text>
</view>
</view>
<view class="item">
<view class="acea-row row-middle">
<text class="item-name required">营业执照注册地址</text>
<input type="text" style="text-align: right;flex:1;" placeholder="请输入" v-model="shopInfo.registerAddressDetail" @input="validateBtn" placeholder-class='placeholder' />
</view>
</view>
<view class="item">
<view class="acea-row row-middle">
<text class="item-name required">经营范围</text>
@ -214,11 +219,11 @@
countStartTime:'',
countEndTime:'',
businessScope:'',
registerAddressDetail:'',
},
successful: false,
isType: false,
showProtocol: false,
pics:[],
};
},
onLoad(options) {
@ -271,10 +276,9 @@
},
verifyBusinessLicense(){
queryCheck({image:this.shopInfo.businessLicense[0]}).then((res)=>{
console.log('res: ',res);
this.shopInfo.countId=res.data.result.creditno;
this.shopInfo.countStartTime=res.data.result.startdate;
this.shopInfo.countEndTime=res.data.result.enddate;
this.shopInfo.countStartTime=res.data.result.start;
this.shopInfo.countEndTime=res.data.result.end;
})
},
getAgreement() {
@ -308,26 +312,27 @@
this.shopInfo.businessAddress = address.map(v=>v.name).join('/');
},
validateBtn(){
let {idCardPhoto,
idCardName,
idCardNumber,
idCardStartTime,
idCardEndTime,
businessLicense,
countId,
countStartTime,
countEndTime,
businessScope,}=this.shopInfo;
if(idCardPhoto&&
idCardName&&
idCardNumber&&
idCardStartTime&&
idCardEndTime&&
businessLicense&&
countId&&
countStartTime&&
countEndTime&&
businessScope){
let data2=uni.getStorageSync('shopInfo');
console.log('data2: ',data2);
let {idCardPhoto,idCardName,idCardNumber,idCardStartTime,idCardEndTime,businessLicense,countId,countStartTime,countEndTime,businessScope,registerAddressDetail}=this.shopInfo;
if(idCardPhoto&&idCardName&&idCardNumber&&idCardStartTime&&idCardEndTime&&businessLicense&&countId&&countStartTime&&countEndTime&&businessScope&&registerAddressDetail){
let idcard={
image1:idCardPhoto[0],
image2:idCardPhoto[1],
name:idCardName,
number:idCardNumber,
start:idCardStartTime,
end:idCardEndTime,
}
let biz=data2.biz;
biz.image=businessLicense;
biz.number=countId;
biz.start=countStartTime;
biz.end=countEndTime;
biz.address=registerAddressDetail;
data2.idcard=idcard;
uni.setStorageSync('shopInfo',data2);
console.log('data2: ',data2);
this.validate=true;
}
},
@ -356,7 +361,6 @@
let that = this;
that.$util.uploadImageOne('upload/image', function(res) {
item.push(res.data.path);
// that.$set(that, 'pics', that.pics);
});
},
/**
@ -367,7 +371,6 @@
let that = this,
pic = item[index];
item.splice(index, 1);
// that.$set(that, 'pics', that.pics);
},
//
// idx

View File

@ -1,5 +1,5 @@
<template>
<view v-if="!successful" :style="viewColor">
<view v-if="!successful" :style="viewColor" @click="hiddenSerachList">
<form report-submit='true'>
<view class='merchantsSettled'>
<!-- <view class="merchantBgCount">
@ -29,26 +29,22 @@
<view class="uni-list">
<view class="uni-list-cell">
<view class="uni-list-cell-db acea-row row-middle">
<text class="item-name required">身份证正反面上传</text>
<text class="item-name required">银行卡正反面上传</text>
<view class="">
{{pics.length}}/2
{{shopInfo.bankCardImg.length}}/1
</view>
</view>
<view class="acea-row row-middle">
<text class="tips-text" style="color: #0ca6cb;">提示上传完该项,下面几项会自动填写</text>
</view>
<view class="acea-row row-middle" style="justify-content: flex-start;">
<view class='pictrue' v-for="(item,index) in shopInfo.idCardPhoto" :key="index" :data-index="index" @click="getPhotoClickIdx(shopInfo.idCardPhoto,index)">
<view class='pictrue' v-for="(item,index) in shopInfo.bankCardImg" :key="index" :data-index="index" @click="getPhotoClickIdx(shopInfo.bankCardImg,index)">
<image :src='item'></image>
<text class='iconfont icon-guanbi1' @click.stop='DelPic(shopInfo.idCardPhoto,index)'></text>
<text class='iconfont icon-guanbi1' @click.stop='DelPic(shopInfo.bankCardImg,index)'></text>
</view>
<view class='pictrue acea-row row-center-wrapper row-column' @click='uploadpic(shopInfo.idCardPhoto)' v-if="shopInfo.idCardPhoto.length < 1">
<view class='pictrue acea-row row-center-wrapper row-column' @click='uploadpic(shopInfo.bankCardImg)' v-if="shopInfo.bankCardImg.length < 1">
<text class='iconfont icon-icon25201' style="left: 25px;top: 10px;"></text>
<view>身份证正面</view>
</view>
<view class='pictrue acea-row row-center-wrapper row-column' @click='uploadpic(shopInfo.idCardPhoto)' v-else-if="shopInfo.idCardPhoto.length <2">
<text class='iconfont icon-icon25201' style="left: 25px;top: 10px;"></text>
<view>身份证反面</view>
<view>银行卡正面</view>
</view>
</view>
</view>
@ -56,8 +52,18 @@
</view>
<view class="item">
<view class="acea-row row-middle">
<text class="item-name required" >法人名称</text>
<input type="text" style="text-align: right;flex:1;" maxlength="30" placeholder="请输入" v-model="shopInfo.idCardName" @input="validateBtn" placeholder-class='placeholder' />
<text class="item-name required">户名</text>
<input type="text" style="text-align: right;flex:1;" placeholder="请输入" v-model="shopInfo.bankCardUserName" @input="validateBtn" placeholder-class='placeholder' />
</view>
<view class="acea-row row-middle">
<text class="tips-text" >(户名需手动填写)</text>
</view>
</view>
<view class="item">
<view class="acea-row row-middle">
<text class="item-name required">银行卡号</text>
<input type="text" style="text-align: right;flex:1;" placeholder="请输入" v-model="shopInfo.bankCard" @input="validateBtn" placeholder-class='placeholder' />
</view>
<view class="acea-row row-middle">
<text class="tips-text" >提示请核验信息是否正确</text>
@ -65,105 +71,46 @@
</view>
<view class="item">
<view class="acea-row row-middle">
<text class="item-name required">法人身份证号</text>
<input type="text" style="text-align: right;flex:1;" placeholder="请输入" v-model="shopInfo.idCardNumber" @input="validateBtn" placeholder-class='placeholder' />
<text class="item-name required" >银行名称</text>
<input type="text" style="text-align: right;flex:1;" maxlength="30" placeholder="请输入" v-model="shopInfo.bankName" @input="validateBtn" placeholder-class='placeholder' />
</view>
<view class="acea-row row-middle">
<text class="tips-text" >提示请核验信息是否正确</text>
</view>
</view>
<view class="item">
<view class="uni-list">
<view class="uni-list-cell">
<view class="uni-list-cell-db acea-row row-middle">
<text class="item-name required">法人身份证有效期开始</text>
<view class="acea-row row-middle">
<input style="text-align: right;" placeholder="请输入" type="text" v-model="shopInfo.idCardStartTime">
</view>
</view>
<view class="acea-row row-middle">
<text class="tips-text" >请检查格式是否为20190101</text>
<view class="acea-row row-middle">
<text class="item-name required" >支行名称</text>
<input type="text" style="text-align: right;flex:1;" maxlength="30" @mousedown="searchBranch" placeholder="请输入" v-model="shopInfo.bankBranchName" @input="validateBtn" placeholder-class='placeholder' />
<view class="search-list" v-show="searchFlag">
<view class="search-tips" v-for="(item,index) in searchList" @click="selectSearch(item)">
<text>{{item.lname}}</text>
<text style="color: #999;font-size: 10px;">{{item.addr}}</text>
</view>
</view>
</view>
</view>
<view class="item">
<view class="uni-list">
<view class="uni-list-cell">
<view class="uni-list-cell-db acea-row row-middle">
<text class="item-name required">法人身份证有效期结束</text>
<view class="acea-row row-middle" >
<input style="text-align: right;" placeholder="请输入" type="text" v-model="shopInfo.idCardEndTime">
</view>
</view>
<view class="acea-row row-middle">
<text class="tips-text" >请检查格式是否为20190101</text>
</view>
</view>
<view class="acea-row row-middle">
<text class="tips-text" >提示请核验信息是否正确</text>
</view>
</view>
</view>
<view class='list'>
<view class="item">
<view class="uni-list">
<view class="uni-list-cell">
<view class="uni-list-cell-db acea-row row-middle">
<text class="item-name required">营业执照</text>
<view class="">
{{pics.length}}/1
</view>
</view>
<view class="acea-row row-middle">
<text class="tips-text" style="color: #0ca6cb;">提示上传完该项,下面几项会自动填写</text>
</view>
<view class="acea-row row-middle" style="justify-content: flex-start;">
<view class='pictrue' v-for="(item,index) in shopInfo.businessLicense" :key="index" :data-index="index" @click="getPhotoClickIdx(shopInfo.businessLicense,index)">
<image :src='item'></image>
<text class='iconfont icon-guanbi1' @click.stop='DelPic(shopInfo.businessLicense,index)'></text>
</view>
<view class='pictrue acea-row row-center-wrapper row-column' @click='uploadpic(shopInfo.businessLicense)' v-if="pics.length < 1">
<text class='iconfont icon-icon25201' style="left: 25px;top: 25px;"></text>
<!-- <view>上传图片</view> -->
</view>
</view>
</view>
<view class="acea-row row-middle">
<text class="item-name required" >联行号</text>
<input type="text" style="text-align: right;flex:1;" maxlength="30" placeholder="请输入" v-model="shopInfo.CNAPS" @input="validateBtn" placeholder-class='placeholder' />
</view>
<view class="acea-row row-middle">
<text class="tips-text" >提示请核验信息是否正确</text>
</view>
</view>
<view class="item">
<view class="acea-row row-middle">
<text class="item-name required">统一社会信用码</text>
<input type="text" style="text-align: right;flex:1;" placeholder="请输入" v-model="shopInfo.countId" @input="validateBtn" placeholder-class='placeholder' />
</view>
<view class="item no-border">
<checkbox-group @change='ChangeIsAgree'>
<checkbox class="checkbox" :checked="isAgree ? true : false" />已阅读并同意</checkbox-group>
<button class="settleAgree" @click="getConfig">入驻协议</button>
</view>
<view class="item">
<view class="acea-row row-middle">
<text class="item-name required">统一社会信用证开始日期</text>
<input type="text" style="text-align: right;flex:1;" placeholder="请输入" v-model="shopInfo.countStartTime" @input="validateBtn" placeholder-class='placeholder' />
</view>
<view class="acea-row row-middle">
<text class="tips-text" >请检查格式是否为x年x月x日</text>
</view>
</view>
<view class="item">
<view class="acea-row row-middle">
<text class="item-name required">统一社会信用证截止日期</text>
<input type="text" style="text-align: right;flex:1;" placeholder="请输入" v-model="shopInfo.countEndTime" @input="validateBtn" placeholder-class='placeholder' />
</view>
<view class="acea-row row-middle">
<text class="tips-text" >请检查格式是否为x年x月x日</text>
</view>
</view>
<view class="item">
<view class="acea-row row-middle">
<text class="item-name required">经营范围</text>
<input type="text" style="text-align: right;flex:1;" placeholder="请输入" v-model="shopInfo.businessScope" @input="validateBtn" placeholder-class='placeholder' />
</view>
</view>
<button class='submitBtn' :disabled="!validate" :class="validate === true ? 'on':''" @click="nextStep">下一步</button>
</view>
</view>
@ -191,7 +138,9 @@
import { mapGetters } from "vuex";
import parser from "@/components/jyf-parser/jyf-parser";
import { toLogin } from '@/libs/login.js';
import {queryIdCard,queryCheck} from '@/api/user.js'
import {queryBankCard,queryCNAPS} from '@/api/user.js';
import { configMap,throttle } from "@/utils";
import {updateGoodsRecord,create,getGoodsDetails} from '@/api/store.js';
const app = getApp();
export default {
components: {
@ -203,22 +152,28 @@
display: false,
display2: false,
shopInfo:{
idCardPhoto:[],
idCardName:'',
idCardNumber:'',
idCardStartTime:'',
idCardEndTime:'',
businessLicense:[],
countId:'',
countStartTime:'',
countEndTime:'',
businessScope:'',
bankCardImg:[],
bankCardUserName:'',
bankCard:'',
bankName:'',
bankBranchName:'',
CNAPS:'',
bankProvince:'',
bankCity:'',
},
successful: false,
isType: false,
showProtocol: false,
isAgree:false,
searchFlag:false,
searchList:[],
pics:[],
protocol: this.sys_intention_agree,
tagStyle: {
img: 'width:100%;display:block;'
},
dataInfo:{},
mer_i_id:'',
};
},
onLoad(options) {
@ -227,54 +182,61 @@
} else {
toLogin()
}
if (options.mer_i_id) {
this.mer_i_id = options.mer_i_id
}
},
onShow() {},
computed: {
...mapGetters(['isLogin','viewColor']),
addressText(){
return this.shopInfo.registerAddress.map(v=>v.name).join('/');
}
},
computed: configMap({sys_intention_agree:''},mapGetters(['isLogin','viewColor'])),
watch:{
deep:true,
'shopInfo.idCardPhoto':{
'shopInfo.bankCardImg':{
handler:function(newVal, oldVal){
if(newVal.length==1){
this.verifyIDcard(0)
}else if(newVal.length==2){
this.verifyIDcard(1)
}
this.verifyBankCard()
}
},
'shopInfo.businessLicense':{
'shopInfo.bankBranchName':{
handler:function(newVal, oldVal){
this.verifyBusinessLicense();
}
}
},
},
methods: {
verifyIDcard(index){
let img={image:this.shopInfo.idCardPhoto[index],type:index+2};
queryIdCard(img).then((res)=>{
if(res.status==200){
let i=res.data.result;
if(index==0){
this.shopInfo.idCardName=i.name;
this.shopInfo.idCardNumber=i.number;
searchBranch(){
let val=this.shopInfo;
}else if(index==1){
this.shopInfo.idCardStartTime=i.startdate;
this.shopInfo.idCardEndTime=i.enddate;
if(val.bankCard&&val.bankName){
throttle(()=>{
let data1={
bankcard:val.bankCard,
bank:val.bankName,
province:val.bankProvince,
city:val.bankCity,
keyword:val.bankBranchName,
}
}
})
queryCNAPS(data1).then((res)=>{
let d=res.data.result.data;
if(d.record.length){
this.searchFlag=true;
this.searchList=d.record;
}
})
},2000)
}
},
verifyBusinessLicense(){
queryCheck({image:this.shopInfo.businessLicense[0]}).then((res)=>{
console.log('res: ',res);
this.shopInfo.countId=res.data.result.creditno;
this.shopInfo.countStartTime=res.data.result.startdate;
this.shopInfo.countEndTime=res.data.result.enddate;
getConfig() {
this.showProtocol = true;
//
this.protocol = this.sys_intention_agree
},
verifyBankCard(){
queryBankCard({image:this.shopInfo.bankCardImg[0]}).then((res)=>{
if(res){
let b=res.data.result;
this.shopInfo.bankCard=b.bankcard;
this.shopInfo.bankName=b.bankname;
}
})
},
getAgreement() {
@ -308,28 +270,15 @@
this.shopInfo.businessAddress = address.map(v=>v.name).join('/');
},
validateBtn(){
let {idCardPhoto,
idCardName,
idCardNumber,
idCardStartTime,
idCardEndTime,
businessLicense,
countId,
countStartTime,
countEndTime,
businessScope,}=this.shopInfo;
if(idCardPhoto&&
idCardName&&
idCardNumber&&
idCardStartTime&&
idCardEndTime&&
businessLicense&&
countId&&
countStartTime&&
countEndTime&&
businessScope){
let data2=uni.getStorageSync('shopInfo')
let {bankCardImg,bankCardUserName,bankCard,bankName,bankBranchName,CNAPS}=this.shopInfo;
if(bankCardImg&&bankCardUserName&&bankCard&&bankName&&bankBranchName&&CNAPS){
this.validate=true;
let bank={bankCardImg,bankCardUserName,bankCard,bankName,bankBranchName,CNAPS}
data2.bank=bank;
this.dataInfo=data2;
}
},
changeBusiness(e){
this.shopInfo.EnterpriseIndustry=this.businessArray[e.target.value];
@ -344,15 +293,48 @@
this.validateBtn();
},
nextStep(){
uni.navigateTo({
url:'/pages/store/settled/step3'
})
let that=this;
if (that.mer_i_id) {
updateGoodsRecord(that.mer_i_id, that.dataInfo).then(res => {
if (res.status == 200) {
title: '提交成功',
that.loading = true;
that.timer = setTimeout(() => {
that.successful = true;
that.validate = true;
}, 1000)
}
}).catch(res => {
that.validate = true;
that.$util.Tips({
title: res
});
})
} else {
create(that.dataInfo).then(data => {
if (data.status == 200) {
title: '提交成功',
that.loading = true;
this.timer = setTimeout(() => {
that.successful = true;
that.validate = true;
}, 1000)
}
}).catch(res => {
that.validate = true;
that.$util.Tips({
title: res
});
})
}
},
/**
* 上传文件
*
*/
uploadpic: function(item) {
uploadpic(item) {
let that = this;
that.$util.uploadImageOne('upload/image', function(res) {
item.push(res.data.path);
@ -363,7 +345,7 @@
* 删除图片
*
*/
DelPic: function(item,index) {
DelPic(item,index) {
let that = this,
pic = item[index];
item.splice(index, 1);
@ -377,7 +359,7 @@
_this.imgPreview(item, idx);
},
//
imgPreview: function(list, idx) {
imgPreview(list, idx) {
// list url
if (list && list.length > 0) {
uni.previewImage({
@ -386,6 +368,18 @@
});
}
},
ChangeIsAgree(e) {
this.isAgree = !this.isAgree;
this.validateBtn();
},
selectSearch(i){
this.shopInfo.bankBranchName=i.lname;
this.shopInfo.CNAPS=i.bankCode;
this.hiddenSerachList();
},
hiddenSerachList(){
this.searchFlag=false;
},
}
}
</script>
@ -558,6 +552,30 @@
justify-content: space-between;
flex: 1;
}
.search-list{
width: 100%;
position: absolute;
top: -48rpx;
background-color: white;
z-index: 1000;
border-radius: 12rpx;
padding: 12rpx;
border: solid 1px #999;
overflow: scroll;
height: 400rpx;
.search-tips{
padding: 8rpx 0;
display: flex;
flex-direction: column;
text{
overflow: hidden;
white-space: nowrap;
text-overflow: ellipsis;
color: #666;
}
}
}
.acea-row .tips-text{
color: #e40000;
font-size:20rpx;

View File

@ -192,7 +192,7 @@
</view>
<view v-else class="copy-right">
<view class="iconfont icon- "></view>
<view class="text">©海悦版权所有</view>
<view class="text">©铸源版权所有</view>
</view>
<view style="height: 50rpx;"></view>
<!-- #ifndef H5 -->

View File

@ -27,8 +27,11 @@
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale;
}
.haiyue-zhuyi:before {
content: "\e904";
}
.haiyueqiehuan:before {
.haiyue-qiehuan:before {
content: "\e903";
}

File diff suppressed because one or more lines are too long

View File

@ -5,10 +5,17 @@
"css_prefix_text": "haiyue",
"description": "",
"glyphs": [
{
"icon_id": "39769738",
"name": "注意",
"font_class": "-zhuyi",
"unicode": "e904",
"unicode_decimal": 59652
},
{
"icon_id": "39724446",
"name": "切换",
"font_class": "qiehuan",
"font_class": "-qiehuan",
"unicode": "e903",
"unicode_decimal": 59651
},

Binary file not shown.

Binary file not shown.

Binary file not shown.

View File

@ -81,6 +81,17 @@ export function silenceBindingSpread() {
}
}
let lastCall = 0;
export function throttle(fn,delay){
const now = new Date().getTime();
if(now-lastCall<delay){
return
}
lastCall = now
fn.apply(this,arguments)
}
export function isWeixin() {
return navigator.userAgent.toLowerCase().indexOf("micromessenger") !== -1;
}