diff --git a/App.vue b/App.vue index 2c380b8..d3e98db 100644 --- a/App.vue +++ b/App.vue @@ -2,20 +2,21 @@ export default { globalData: { // url: 'http://192.168.3.4:9301/crest', - // brestUrl: 'http://192.168.3.4:9302/brest', // imgUrl: 'https://192.168.3.4:9301/filesystem/', //正式 // url: 'https://hsg.dctpay.com/crest', // imgUrl: 'https://hsg.dctpay.com/filesystem/', - // imageWxImg:'https://hsg.dctpay.com/filesystem/wxApplets/', //测试 - url: 'https://hlt.dctpay.com/crest', - brestUrl: 'https://hsgcs.dctpay.com/brest', - imageWxImg: 'https://hsgcs.dctpay.com/filesystem/wxApplets/', + url: 'https://paycs.dctpay.com/crest', + imgUrl: 'https://xuan-pay-private.obs.cn-southwest-2.myhuaweicloud.com', userInfo: "", openId: '', code: '', - token: '', + token: '', + //行业id + businessid:'', + //行业名称 + businessname:'' }, } diff --git a/Utils/Api.js b/Utils/Api.js index 8a29cb0..27e9bff 100644 --- a/Utils/Api.js +++ b/Utils/Api.js @@ -1,14 +1,57 @@ import { POST -} from './Request.js'; +} from './Request.js'; let app = getApp(); let base = app.globalData.url; -//H5 获取用户信息 -export const mpLogin = params => { - return POST('POST', `${base}/wechat/mpLogin`, params).then(res => res.data); +// 登录接口 +export const userLogin = params => { + return POST('POST', `${base}/login/userLogin`, params).then(res => res.data); +} +//退出登录 +export const logout = params => { + return POST('POST', `${base}/login/logout`, params).then(res => res.data); +} +//银行卡识别 +export const recognizeBankCard = params => { + return POST('GET', `${base}/ocr/recognizeBankCard`, params).then(res => res.data); +} +//营业执照识别 +export const recognizeBusinessLicense = params => { + return POST('GET', `${base}/ocr/recognizeBusinessLicense`, params).then(res => res.data); +} +// 身份证识别【正反面】 +export const recognizeIdCard = params => { + return POST('GET', `${base}/ocr/recognizeIdCard`, params).then(res => res.data); +} +// 查询行业 +export const getIndustry = params => { + return POST('GET', `${base}/common/getIndustry`, params).then(res => res.data); +} +// 上传商户图片 +export const uploadFile = params => { + return POST('POST', `${base}/mer/uploadFile`, params).then(res => res.data); +} + +//第一步上传商户信息 +export const configMerAccount = params => { + return POST('POST', `${base}/mer/configMerAccount`, params).then(res => res.data); +} +//查询商户详情 +export const getMerDetail = params => { + return POST('GET', `${base}/mer/getMerDetail`, params).then(res => res.data); } -//查询优惠券 -export const getDiscountList = params => { - return POST('GET', `${base}/discount/getDiscountList`, params).then(res => res.data); -} \ No newline at end of file +//第二步商户基本信息 +export const configMerBasis = params => { + return POST('POST', `${base}/mer/configMerBasis`, params).then(res => res.data); +} +//第三步商户结算信息 +export const configMerSettlement = params => { + return POST('POST', `${base}/mer/configMerSettlement`, params).then(res => res.data); +} +//第四步商户门店信心 +export const configMerStore = params => { + return POST('POST', `${base}/mer/configMerStore`, params).then(res => res.data); +} + + diff --git a/Utils/Request.js b/Utils/Request.js index 910c0b0..0f114d1 100644 --- a/Utils/Request.js +++ b/Utils/Request.js @@ -34,7 +34,7 @@ function request(method, url, data) { uni.navigateTo({ url: '/pages/login/login' }) - }, 800); + }, 2000); } }) } diff --git a/components/yunmiao-jobSelect/yunmiao-jobSelect.vue b/components/yunmiao-jobSelect/yunmiao-jobSelect.vue index cae3e81..675bad6 100644 --- a/components/yunmiao-jobSelect/yunmiao-jobSelect.vue +++ b/components/yunmiao-jobSelect/yunmiao-jobSelect.vue @@ -23,7 +23,7 @@ - {{item1[labelName]}} @@ -291,6 +291,7 @@ width: 100%; padding: 0 20rpx; align-items: center; - font-size: 32rpx; + font-size: 30rpx; + color: #999999; } diff --git a/pages/index/business-category/business-category.vue b/pages/index/business-category/business-category.vue index eaee08a..a1561fe 100644 --- a/pages/index/business-category/business-category.vue +++ b/pages/index/business-category/business-category.vue @@ -6,6 +6,10 @@ diff --git a/pages/index/merchant-incoming-parts/merchant-incoming-parts.vue b/pages/index/merchant-incoming-parts/merchant-incoming-parts.vue index 1c6f7dc..efe6c8c 100644 --- a/pages/index/merchant-incoming-parts/merchant-incoming-parts.vue +++ b/pages/index/merchant-incoming-parts/merchant-incoming-parts.vue @@ -2,14 +2,13 @@ - + - @@ -19,7 +18,7 @@ 门店信息与营业执照不符合 - + 商户联系人 - + 登录账号 - + 同意《什么什么什么什么法哦》 - + 商户手机号 - 15583658692 + {{merDetailInfo.account.telephone}} 登录账号 - 15583658692 + {{merDetailInfo.account.loginName}} - + 营业信息 @@ -74,51 +73,62 @@ placeholder-style="color: #bfbfbf;font-size:14px;padding-top:2px;" @click="showPopup()" /> - 营业执照 - - + 营业执照 + + + - + 公司名称 - + + 公司名称 + + + 公司名称应与营业执照一致 - + + + 若营业执照上无名称,请填写“个体户XXX”(XXX为营业执照上经营者姓名) + + 营业执照号 - + 注册地址 - + 营业期限 - - 选择时间 + + 选择时间 - - 长期有效 + + 长期有效 - + {{start_date}} - + {{end_date}} - 长期有效 + 长期有效 商户简称 @@ -149,6 +159,11 @@ + + mcc编号 + + 详情地址 - - + + + + @@ -197,96 +216,107 @@ 有效期 - - 选择时间 + + 选择时间 - - 长期有效 + + 长期有效 - - {{start_date}} + + {{cardstart_date}} - - {{end_date}} + + {{cardend_date}} - 长期有效 + 长期有效 - + 营业信息 商户类型 - 企业商户 + 个体商户 + 企业商户 + 小微商户 - 营业执照 - - + 营业执照 + + 公司名称 - 方式的放松放松放方式地方沙发上方式地方史蒂夫 + {{merDetailInfo.merName}} - + 营业执照号 - 423423423442FSDFSF32432 + {{merDetailInfo.merNo}} - + 注册地址 - 方式的放松放松放方式地方沙发上方式地方史蒂夫 + {{merDetailInfo.blisRegAddress}} - + 营业期限 - 2020-10-28 至 长期有效 + {{merDetailInfo.blisPeriodStart}} 至 + {{merDetailInfo.blisPeriodEnd}} + 商户简称 - 方式地方舒服舒服 + {{merDetailInfo.merAbbreviate}} 行业类目 - 教育培训-艺术培训 + + {{merDetailInfo.merIndustry.parentName}}-{{merDetailInfo.merIndustry.childName}} + 经营地区 - 四川省-成都市-青羊区 + + {{merDetailInfo.merRegion.provinceName}}-{{merDetailInfo.merRegion.cityName}}-{{merDetailInfo.merRegion.areaName}} + 详情地址 - 四川省成都市青羊区看风使舵可能放开你 + {{merDetailInfo.merRegion.address}} 经营者/法人信息 证件照片 - - + + + 姓名 - 房东的 + {{merDetailInfo.larName}} 身份证号 - 3423555234234234234223424 + {{merDetailInfo.larIdCard}} 有效期 - 2013-04-23 至 2025-04-23 + {{merDetailInfo.larIdCardPeriodStart}} 至 + {{merDetailInfo.larIdCardPeriodEnd}} + - + 结算信息 结算类型 @@ -295,7 +325,7 @@ - 非法人结算授权书 + + 非法人身份证照片 @@ -315,53 +345,62 @@ - - - - - + + + + + + + 姓名 - + 身份证号 - + 有效期 - - 选择时间 + + 选择时间 - - 长期有效 + + 长期有效 - - + - {{start_date}} + {{cardstart_date}} - - {{end_date}} + {{cardend_date}} - 长期有效 + 长期有效 - + 结算人银行卡照片 - - + + + + + + - + 开户许可证照片 @@ -370,27 +409,35 @@ - - + + + - 银行卡号 - 开户行号 + - 所属银行 - 所属支行 + - 所属地 - 银行卡号 + - 所属支行 - 银行卡持有人 + + + + 所属银行 + @@ -400,93 +447,83 @@ - + 结算信息 商户类型 - 对公结算 - - - 非法人结算授权书 - - - - - 结算人身份证照片 - - - + 对公结算 + + + 对私法人结算 + + 对私非法人结算 + + 结算人身份证照片 + + + - + 姓名 - 发发发 + {{merDetailInfo.merSettleAcct.settleIdCardName}} - + 身份证号 - 123131232131323123213131 + {{merDetailInfo.merSettleAcct.settleIdCardNo}} - + 有效期 - 2013-04-23 至 2025-04-23 + {{merDetailInfo.merSettleAcct.settleIdCardPeriodStart}} + 至 {{merDetailInfo.merSettleAcct.settleIdCardPeriodEnd}} - 结算人银行卡照片 - - + 结算人银行卡照片 + + - 开户许可证照片 - - + 开户许可证照片 + + - 所属地 - 123131232131323123213131 + 开户行号 + {{merDetailInfo.merSettleAcct.openningBankCode}} 所属支行 - 123131232131323123213131 + {{merDetailInfo.merSettleAcct.bankName}} 银行卡号 - 123131232131323123213131 + {{merDetailInfo.merSettleAcct.bankCardNo}} - 清算行号 - 123131232131323123213131 - - - 法人银行卡照片 - - + 银行卡持有人 + {{merDetailInfo.merSettleAcct.bankCardHolder}} - 银行卡号 - 123131232131323123213131 + 所属银行 + {{merDetailInfo.merSettleAcct.openningBankName}} - 所属银行 - 中国农业银行 + 清算行号 + {{merDetailInfo.merSettleAcct.clearingBankCode}} - + 门店账号 - - - - 门店密码 - @@ -505,22 +542,28 @@ - + + - + + - + + @@ -529,7 +572,7 @@ - + 选择商户类型 @@ -563,13 +606,13 @@ - + 选择商户类型 - 对私非法人结算 + 对公结算 @@ -587,7 +630,7 @@ - 对公结算 + 对私非法人结算 @@ -595,9 +638,9 @@ - 下一步 + 下一步 提交审核 - 查看上一步内容 + 查看上一步内容 @@ -606,6 +649,16 @@ import EvanStep from '../../../components/evan-steps/evan-step.vue'; import wybPopup from '../../../components/wyb-popup/wyb-popup.vue'; import pickRegions from '../../../components/pick-regions/pick-regions.vue'; + import { + recognizeBankCard, + recognizeBusinessLicense, + recognizeIdCard, + configMerAccount, + getMerDetail, + configMerBasis, + configMerSettlement, + configMerStore + } from '../../../Utils/Api.js'; let app = getApp(); export default { components: { @@ -618,7 +671,9 @@ format: true }) return { - merchart: 0, //当前第几步操作 + reqUrl: app.globalData.url, //请求地址 + imgsUrl: app.globalData.imgUrl, //图片访问地址 + merchart: 1, //当前第几步操作 mercontacts: '', //商户联系人 phoneNumber: '', //商户手机号 loginphone: '', //商户登录账号 @@ -629,10 +684,10 @@ getCodeisWaiting: false, //是否点击 ischecked: false, //是否同意条约 currentstatus: 0, //当前步骤状态 1: 已录入 其他:未录入 - merchantType: '', //商户类型 - merchantId: '', //商户id - lementType: '', //结算账户类型 - lementId: '', //结算id + merchantType: '个体商户', //商户类型 + merchantId: '1', //商户id + lementType: '对公结算', //结算账户类型 + lementId: '1', //结算id businimg: '', //营业执照图片 companyname: '', //公司名称 businnum: '', // 营业执照号 @@ -645,25 +700,38 @@ idcardsideimg: '', //证件照反面, idcardname: '', //证件姓名 idcard: '', //身份证号 + idcardtime: '1', // times:选择时间 longterm: 长期 uncorporsettelimg: '', //非法人结算授权书 settleimg: '', //结算人银行卡照片 accopenperimg: '', //开户许可证图片 + openingbankNo: '', //开户行号 bankNo: '', // 银行卡号 + bankName: '', // 银行卡持有人 belongbank: '', //所属银行 - belongaddress: '', //所属地 belongbranch: '', //所属支行 clearbankNo: '', //清算行号 storeaccount: '', //门店账号 - storepasd: '', //门店密码 storename: '', //门店名称 storephone: '', //门店电话 - storeimg1: '', //门店图片 - timetype: 'times', // times:选择时间 longterm: 长期 + storeimg1: '', //门头图片 + storeimg2: '', //收银台图片 + storeimg3: '', //室内图片 + timetype: '1', // times:选择时间 longterm: 长期 start_date: '开始时间', //开始时间 end_date: '结束时间', //到期时间 + cardstart_date: '开始时间', // 身份证开始时间 + cardend_date: '结束时间', //身份证结束时间 region: [], //选择区域 - defaultRegion: ['广东省', '广州市', '番禺区'], //默认地区 - defaultRegionCode: '440113', //区级编号 + areaCode: '', //区级 + mccno: '', //mcc编号 + defaultRegion: ['北京市', '市辖区', '东城区'], //默认地区 + defaultRegionCode: '110101', //区级编号 + businessLicenselist: [], // 营业执照识别数据 + bankCardlist: [], //银行卡识别数据 + idCardzm: [], //身份证正面 + idCardfm: [], //身份证反面 + merId: '9', //开户id + merDetailInfo: '' //用户信息 } }, computed: { @@ -678,9 +746,23 @@ //地区转换 regionName() { // 转为字符串 - return this.region.map(item => item.name).join('-') + this.areaCode = this.region.map(item => item.code)[2]; + return this.region.map(item => item.name).join('-'); } }, + onLoad() { + this.getMerDetail(1); + }, + onShow() { + if (app.globalData.businessid) { + this.industrycategory = app.globalData.businessname; + this.inducateid = app.globalData.businessid; + } + }, + onUnload() { + app.globalData.businessid = ''; + app.globalData.businessname = ''; + }, methods: { //显示商户弹出 showPopup() { @@ -694,6 +776,14 @@ bindDateChange2: function(e) { this.end_date = e.target.value; }, + // 身份证选择开始日期 + bindCardDateChange: function(e) { + this.cardstart_date = e.target.value + }, + // 身份证选择结束日期 + bindCardDateChange2: function(e) { + this.cardend_date = e.target.value; + }, //选择地区 handleGetRegion(region) { this.region = region; @@ -724,7 +814,7 @@ changelementtype(item) { if (item == 1) { this.lementId = 1; - this.lementType = '对私非法人结算'; + this.lementType = '对公结算'; } if (item == 2) { this.lementId = 2; @@ -732,7 +822,7 @@ } if (item == 3) { this.lementId = 3; - this.lementType = '对公结算'; + this.lementType = '对私非法人结算'; } this.$refs.popup.hide(); }, @@ -752,9 +842,7 @@ day = day > 9 ? day : '0' + day; return `${year}-${month}-${day}`; }, - /** - * 请求发送验证码 - */ + //请求发送验证码 getCode() { uni.hideKeyboard() if (this.getCodeisWaiting) { @@ -793,9 +881,7 @@ // } // }) }, - /** - * 倒计时 - */ + //倒计时 setTimer() { let holdTime = 60; this.getCodeText = "重新获取60s" @@ -812,9 +898,7 @@ }, 1000) }, - /** - * 勾选条约 - */ + //勾选条约 changechk() { if (this.ischecked) { this.ischecked = false; @@ -822,66 +906,807 @@ this.ischecked = true; } }, - /** - * @param {Object} item 放大图片 - */ + //item 放大图片 perImage(item) { uni.previewImage({ current: 0, //预览图片的下标 urls: [item] //预览图片的地址,必须要数组形式,如果不是数组形式就转换成数组形式就可以 }) }, - /** - * 上一步 - */ + //上传图片 + upload(item) { + let that = this; + uni.chooseImage({ + count: 1, + sizeType: ['original', 'compressed'], //可以指定是原图还是压缩图,默认二者都有 + sourceType: ['album', 'camera'], //从相册选择 + success: function(res) { + const tempFilePaths = res.tempFilePaths; + const uploadTask = uni.uploadFile({ + url: that.reqUrl + '/mer/uploadfile?merId=' + that.merId, + filePath: tempFilePaths[0], + header: { + "Authorization": app.globalData.token + }, + name: 'image', + formData: { + files: tempFilePaths[0] + }, + success: function(uploadFileRes) { + if (item == 1) { + that.recognizeBusinessLicense(JSON.parse(uploadFileRes.data) + .return_data[0]); + } + if (item == 2) { + that.recognizeIdCard(1, JSON.parse(uploadFileRes.data) + .return_data[0]); + } + if (item == 3) { + that.recognizeIdCard(2, JSON.parse(uploadFileRes.data) + .return_data[0]); + } + if (item == 4) { + that.recognizeBankCard(JSON.parse(uploadFileRes.data) + .return_data[0]); + } + if (item == 5) { + that.accopenperimg = JSON.parse(uploadFileRes.data) + .return_data[0]; + } + if (item == 6) { + that.storeimg1 = JSON.parse(uploadFileRes.data).return_data[0]; + } + if (item == 7) { + that.storeimg2 = JSON.parse(uploadFileRes.data).return_data[0]; + } + if (item == 8) { + that.storeimg3 = JSON.parse(uploadFileRes.data).return_data[0]; + } + } + }); + }, + error: function(e) { + console.log(e); + } + }); + }, + //营业执照识别 + recognizeBusinessLicense(item) { + uni.showLoading({ + title: '识别中...' + }) + let params = { + url: this.imgsUrl + item + } + recognizeBusinessLicense(params).then(res => { + uni.hideLoading(); + if (res.return_code == '000000' && res.return_data) { + this.businimg = item; + this.businessLicenselist = JSON.parse(res.return_data.data).data; + this.companyname = this.businessLicenselist.companyName; + this.businnum = this.businessLicenselist.creditCode; + this.regaddress = this.businessLicenselist.businessAddress; + this.start_date = this.businessLicenselist.RegistrationDate; + let times = this.businessLicenselist.validPeriod.split('至'); + if (times[1] == '永久') { + this.timetype = '2'; + } + } else { + uni.showToast({ + title: '请上传正确的营业执照', + duration: 2000, + icon: 'none' + }) + } + }) + }, + //身份证识别 + recognizeIdCard(item, items) { + uni.showLoading({ + title: '识别中...' + }) + let params = { + url: this.imgsUrl + items + } + recognizeIdCard(params).then(res => { + uni.hideLoading(); + if (res.return_code == '000000' && res.return_data) { + if (item == 1) { + if (JSON.parse(res.return_data.data).data.face != undefined) { + this.idCardzm = JSON.parse(res.return_data.data).data; + this.idcardname = this.idCardzm.face.data.name; + this.idcardposimg = items; + this.idcard = this.idCardzm.face.data.idNumber; + } else { + uni.showToast({ + title: '请上传身份证人脸信息', + duration: 2000, + icon: 'none' + }) + } + } + if (item == 2) { + if (JSON.parse(res.return_data.data).data.back != undefined) { + this.idCardfm = JSON.parse(res.return_data.data).data; + let times = this.idCardfm.back.data.validPeriod.split('-'); + this.cardstart_date = times[0]; + this.idcardsideimg = items; + this.cardend_date = times[1]; + } else { + uni.showToast({ + title: '请上传身份证国徽信息', + duration: 2000, + icon: 'none' + }) + } + } + } else { + uni.showToast({ + title: '请上传正确的身份证信息', + duration: 2000, + icon: 'none' + }) + } + }) + }, + //银行卡识别 + recognizeBankCard(item) { + uni.showLoading({ + title: '识别中...' + }) + let params = { + url: this.imgsUrl + item + } + recognizeBankCard(params).then(res => { + uni.hideLoading(); + if (res.return_code == '000000' && res.return_data) { + if (JSON.parse(res.return_data.data).data != undefined) { + this.bankCardlist = JSON.parse(res.return_data.data).data; + this.bankNo = this.bankCardlist.cardNumber; + this.settleimg = item; + this.belongbank = this.bankCardlist.bankName; + } else { + uni.showToast({ + title: '请上传正确的银行卡', + icon: 'none', + duration: 2000 + }) + } + } else { + uni.showToast({ + title: '请上传正确的银行卡', + icon: 'none', + duration: 2000 + }) + } + + }) + }, + //上一步 choicemer() { + this.getMerDetail(0); uni.pageScrollTo({ scrollTop: 0 }) - if (this.merchart != 0) { + if (this.merchart != 1) { this.merchart = this.merchart - 1; } }, - /** - * 下一步 - */ + //下一步 gonextstep() { uni.pageScrollTo({ scrollTop: 0 - }) + }) + this.getMerDetail(0); // 第一步 - if (this.merchart == 0) { + if (this.merchart == 1) { if (this.currentstatus == 1) { - this.merchart = 1; + this.merchart = 2; } else { - if (!this.ischecked) { - uni.showToast({ - title: '请勾选', - icon: "none" - }); - } else { - this.merchart = 1; - - } + this.accountsub(); } return; } // 第二步 - if (this.merchart == 1) { - this.merchart = 2; + if (this.merchart == 2) { + if (this.currentstatus == 1) { + this.merchart = 3; + } else { + this.submitbasic(); + } return; } // 第三步 - if (this.merchart == 2) { - this.merchart = 3; + if (this.merchart == 3) { + if (this.currentstatus == 1) { + this.merchart = 4; + } else { + this.submitsettlement(); + } return; } // 第四步 - if (this.merchart == 3) { + if (this.merchart == 4) { + this.submitsotre(); + return; + } + }, + //查询商户信息 + getMerDetail(item) { + // uni.showLoading({ + // title: '加载中...' + // }) + let datas = { + merId: this.merId + } + getMerDetail(datas).then(res => { + // uni.hideLoading(); + if (res.return_code == '000000' && res.return_data) { + this.merDetailInfo = res.return_data; + if (item == 1) { + this.merchart = res.return_data.completeStatus; + } + if (this.merchart == res.return_data.completeStatus) { + this.currentstatus = 0; + } else { + this.currentstatus = 1; + } + } + }) + }, + //账户信息提交 + accountsub() { + if (!this.mercontacts) { + uni.showToast({ + title: '请输入商户联系人', + icon: "none", + duration: 2000 + }); + return; + } + if (!this.phoneNumber) { + uni.showToast({ + title: '请输入商户手机号', + icon: "none", + duration: 2000 + }); + return; + } + // if (!this.code) { + // uni.showToast({ + // title: '请输入验证码', + // icon: "none", + // duration: 2000 + // }); + // return; + // } + if (!this.loginphone) { + uni.showToast({ + title: '请输入商户登录账号', + icon: "none", + duration: 2000 + }); + return; + } + if (!this.ischecked) { + uni.showToast({ + title: '请勾选', + icon: "none" + }); + return; + } + let datas = { + "loginName": this.loginphone, + "name": this.mercontacts, + "phone": this.phoneNumber + } + configMerAccount(datas).then(res => { + if (res.return_code == '000000') { + this.merchart = 2; + this.merId = res.return_data.id; + this.merDetailInfo = res.return_data; + } else { + uni.showToast({ + title: res.return_msg, + icon: 'none', + duration: 2000 + }) + } + }) + }, + // 提交基本信息 + submitbasic() { + let that = this; + if (that.merchantId == 1 || that.merchantId == 2) { + if (!that.businimg) { + uni.showToast({ + title: '请上传营业执照', + icon: "none", + duration: 2000 + }); + return; + } + if (!that.businnum) { + uni.showToast({ + title: '请填写营业执照号', + icon: "none", + duration: 2000 + }); + return; + } + if (!that.regaddress) { + uni.showToast({ + title: '请填写注册地址', + icon: "none", + duration: 2000 + }); + return; + } + if (!that.start_date) { + uni.showToast({ + title: '请填写营业执照开始时间', + icon: "none", + duration: 2000 + }); + return; + } + if (!that.end_date) { + uni.showToast({ + title: '请填写营业执照结束时间', + icon: "none", + duration: 2000 + }); + return; + } + } + if (!that.companyname) { + uni.showToast({ + title: '请填写公司名称', + icon: "none", + duration: 2000 + }); + return; + } + if (!that.merabbreviation) { + uni.showToast({ + title: '请填写公司简称', + icon: "none", + duration: 2000 + }); + return; + } + if (!that.inducateid) { + uni.showToast({ + title: '请选择行业类目', + icon: "none", + duration: 2000 + }); + return; + } + if (!that.areaCode) { + uni.showToast({ + title: '请选择经营地区', + icon: "none", + duration: 2000 + }); + return; + } + if (!that.mccno) { + uni.showToast({ + title: '请填写mcc编号', + icon: "none", + duration: 2000 + }); + return; + } + if (!that.detailsaddress) { + uni.showToast({ + title: '请填写详情地址', + icon: "none", + duration: 2000 + }); + return; + } + if (!that.idcardposimg) { + uni.showToast({ + title: '请上传身份证正面照', + icon: "none", + duration: 2000 + }); + return; + } + if (!that.idcardsideimg) { + uni.showToast({ + title: '请上传身份证反面照', + icon: "none", + duration: 2000 + }); + return; + } + if (!that.idcardname) { + uni.showToast({ + title: '请填写姓名', + icon: "none", + duration: 2000 + }); return; } - } + + if (!that.idcard) { + uni.showToast({ + title: '请填写身份证号', + icon: "none", + duration: 2000 + }); + return; + } + if (!that.cardstart_date) { + uni.showToast({ + title: '请选择身份证开始时间', + icon: "none", + duration: 2000 + }); + return; + } + if (!that.cardend_date) { + uni.showToast({ + title: '请选择身份证结束时间', + icon: "none", + duration: 2000 + }); + return; + } + + if (that.merchantId == 3) { + this.start_date = ''; + this.end_date = ''; + } else { + if (that.timetype == 2) { + that.end_date = '长期有效' + } + } + if (that.idcardtime == 2) { + that.cardend_date = '长期有效' + } + uni.showLoading({ + title: '提交中...' + }) + let datas = { + "id": that.merId, + "merType": that.merchantId, + "merName": that.companyname, + "merAbbreviate": that.merabbreviation, + "merMccCode": that.mccno, + "blisUrl": that.businimg, + "blisName": that.companyname, + "blisNo": that.businnum, + "blisRegAddress": that.regaddress, + "blisPeriodStart": that.start_date, + "blisPeriodType": that.timetype, // 营业执照期限类型 1:有效期 2:长期 + "blisPeriodEnd": that.end_date, + "larName": that.idcardname, + "larIdCard": that.idcard, + "larIdCardPortraitImg": that.idcardposimg, + "larIdCardNationalEmblemImg": that.idcardsideimg, + "larIdCardPeriodStart": that.cardstart_date, + "larIdCardPeriodType": that.idcardtime, // 法人身份证有效期类型 1:有效期 2:长期 + "larIdCardPeriodEnd": that.cardend_date, + "merIndustry": { + "childId": that.inducateid + }, + "merRegion": { + "address": that.detailsaddress, + "areaCode": that.areaCode + } + } + configMerBasis(datas).then(res => { + uni.hideLoading(); + if (res.return_code == '000000') { + that.idcardposimg = ''; + that.idcardsideimg = ''; + that.idcardname = ''; + that.idcard = ''; + that.idcardtime = 1; + that.cardstart_date = '开始时间'; + that.cardend_date = '结束时间' + uni.showToast({ + title: '提交成功', + icon: 'none', + duration: 2000, + success() { + setTimeout(() => { + that.merchart = 3; + }, 1000); + } + }) + } else { + uni.showToast({ + title: res.return_msg, + icon: 'none', + duration: 2000 + }) + } + }) + + + }, + //结算信息提交 + submitsettlement() { + let that = this; + if (that.lementId == 1) { + if (!that.accopenperimg) { + uni.showToast({ + title: '请上传开户许可证照片', + icon: "none", + duration: 2000 + }); + return; + } + } + if (that.lementId == 2 || that.lementId == 3) { + if (!that.settleimg) { + uni.showToast({ + title: '请上传银行卡照片', + icon: "none", + duration: 2000 + }); + return; + } + } + if (that.lementId == 3) { + if (!that.idcardposimg) { + uni.showToast({ + title: '请上传身份证正面照', + icon: "none", + duration: 2000 + }); + return; + } + if (!that.idcardsideimg) { + uni.showToast({ + title: '请上传身份证反面照', + icon: "none", + duration: 2000 + }); + return; + } + + if (!that.idcardname) { + uni.showToast({ + title: '请填写姓名', + icon: "none", + duration: 2000 + }); + return; + } + + if (!that.idcard) { + uni.showToast({ + title: '请填写身份证号', + icon: "none", + duration: 2000 + }); + return; + } + if (!that.cardstart_date) { + uni.showToast({ + title: '请选择身份证开始时间', + icon: "none", + duration: 2000 + }); + return; + } + if (!that.cardend_date) { + uni.showToast({ + title: '请选择身份证结束时间', + icon: "none", + duration: 2000 + }); + return; + } + } + + if (!that.openingbankNo) { + uni.showToast({ + title: '请填写开户行号', + icon: "none", + duration: 2000 + }); + return; + } + + if (!that.belongbranch) { + uni.showToast({ + title: '请填写所属支行', + icon: "none", + duration: 2000 + }); + return; + } + if (!that.bankNo) { + uni.showToast({ + title: '请填写银行卡号', + icon: "none", + duration: 2000 + }); + return; + } + if (!that.bankName) { + uni.showToast({ + title: '请填写银行卡持有人', + icon: "none", + duration: 2000 + }); + return; + } + if (!that.belongbank) { + uni.showToast({ + title: '请填写所属银行', + icon: "none", + duration: 2000 + }); + return; + } + if (!that.clearbankNo) { + uni.showToast({ + title: '请填写清算行号', + icon: "none", + duration: 2000 + }); + return; + } + if (that.lementId != 3) { + that.cardstart_date = ''; + that.cardend_date = ''; + } else { + if (that.idcardtime == 2) { + that.cardend_date = '长期有效' + } + } + uni.showLoading({ + title: '提交中...' + }) + let datas = { + "merId": that.merId, + "settleType": that.lementId, //结算类型 1:对公结算 2:对私法人结算 3:对私非法人结算, + "bankCardImg": that.settleimg, //"银行卡照片", + "bankName": that.belongbranch, //"银行名称", + "bankCardNo": that.bankNo, //"银行卡号", + "bankCardHolder": that.bankName, //"银行卡持有人", + "openningBankCode": that.openingbankNo, //"开户行号", + "openningBankName": that.belongbank, //"开户行名称", + "openningBankLicenseUrl": that.accopenperimg, //"开户许可证照片", + "clearingBankCode": that.clearbankNo, //"账户清算行号", + "settleIdCardName": that.idcardname, //身份证名字 + "settleIdCardNo": that.idcard, //身份证号 + "settleIdPeriodType": that.idcardtime, //【对私非法人结算】结算人身份证有效期类型 1:有效期 2:长期, + "settleIdCardPortraitImg": that.idcardposimg, //"【对私非法人结算】结算人身份证人像面图片", + "settleIdCardNationalEmblemImg": that.idcardsideimg, //"【对私非法人结算】结算人身份证国徽面图片", + "settleIdCardPeriodStart": that.cardstart_date, //"【对私非法人结算】结算人身份证有效期开始时间", + "settleIdCardPeriodEnd": that.cardend_date //"【对私非法人结算】结算人身份证有效期结束时间" + } + configMerSettlement(datas).then(res => { + uni.hideLoading(); + if (res.return_code == '000000') { + uni.showToast({ + title: '提交成功', + icon: 'none', + duration: 2000, + success() { + setTimeout(() => { + that.merchart = 4; + }, 1000); + } + }) + } else { + uni.showToast({ + title: res.return_msg, + icon: 'none', + duration: 2000 + }) + } + }) + }, + //提交门店进行审核 + submitsotre() { + let that = this; + if (!that.storeaccount) { + uni.showToast({ + title: '请填写门店账号', + icon: "none", + duration: 2000 + }); + return; + } + if (!that.storename) { + uni.showToast({ + title: '请填写门店名称', + icon: "none", + duration: 2000 + }); + return; + } + if (!that.storephone) { + uni.showToast({ + title: '请填写门店电话', + icon: "none", + duration: 2000 + }); + return; + } + if (!that.storeimg1) { + uni.showToast({ + title: '请上传门头照片', + icon: "none", + duration: 2000 + }); + return; + } + if (!that.storeimg2) { + uni.showToast({ + title: '请上传收银台照片', + icon: "none", + duration: 2000 + }); + return; + } + if (!that.storeimg3) { + uni.showToast({ + title: '请上传室内照片', + icon: "none", + duration: 2000 + }); + return; + } + uni.showModal({ + title: '提交审核', + content: '确认信息是否正确。', + success: (res) => { + if (res.confirm) { + uni.showLoading({ + title: '提交审核中...' + }) + let datas = { + "merId": that.merId, + "account": { + "loginName": that.storeaccount + }, + "name": that.storename, + "telephone": that.storephone, + "doorHeadImg": that.storeimg1, + "cashRegisterImg": that.storeimg2, + "internalImg": that.storeimg3, + } + configMerStore(datas).then(res => { + uni.hideLoading(); + if (res.return_code == '000000') { + uni.showToast({ + title: '提交成功', + icon: 'none', + duration: 1000, + success() { + setTimeout(() => { + uni.navigateBack({}) + }, 1000); + } + }) + } else { + uni.showToast({ + title: res.return_msg, + icon: 'none', + duration: 2000 + }) + } + }) + } else if (res.cancel) { + console.log('用户点击取消'); + } + } + }); + + }, + } } @@ -966,7 +1791,7 @@ .namecont { color: #666666; - width: 25%; + width: 28%; } } diff --git a/pages/login/login.vue b/pages/login/login.vue index efff565..b89af19 100644 --- a/pages/login/login.vue +++ b/pages/login/login.vue @@ -7,18 +7,21 @@ - - + + -