From 1596d913dea41288c557268aab2496e36ac1a83d Mon Sep 17 00:00:00 2001 From: "DESKTOP-GMUNQ1B\\k" <1154079537@qq.com> Date: Thu, 7 Mar 2024 15:15:20 +0800 Subject: [PATCH] 1 --- pages/store/settled/index.vue | 542 +++++++++++++++++----------------- 1 file changed, 276 insertions(+), 266 deletions(-) diff --git a/pages/store/settled/index.vue b/pages/store/settled/index.vue index c404073..10f6c12 100644 --- a/pages/store/settled/index.vue +++ b/pages/store/settled/index.vue @@ -39,11 +39,12 @@ 商户分类 - - - - + + + + - - - - - 公司性质 - - - - - - - - - - - - - 请上传营业执照 - (图片格式支持JPG、PNG、JPEG) - - - - - - - 上传图片 - - - - + + + + + 公司性质 + + + + + + + + + + + + + 请上传营业执照 + (图片格式支持JPG、PNG、JPEG) + + + + + + + 上传图片 + + + + @@ -202,87 +204,89 @@ - - - - 对公账号 - - - - - - 银行卡号 - - - - - - 开户银行 - - - - - - 开户网点 - - - - - - 持卡人 - - - - - - 请上传银行卡正面照片 - (图片格式支持JPG、PNG、JPEG) - - - - - - - 上传图片 - - - - - - - - 联系电话 - - - - - - 验证码 - - - - - - - 验证码 - - - - - - - + + + + 对公账号 + + + + + + 银行卡号 + + + + + + 开户银行 + + + + + + 开户网点 + + + + + + 持卡人 + + + + + + 请上传银行卡正面照片 + (图片格式支持JPG、PNG、JPEG) + + + + + + + 上传图片 + + + + + + + + 联系电话 + + + + + + 验证码 + + + + + + + 验证码 + + + + + + + 已阅读并同意 @@ -298,11 +302,12 @@ - + + +
{{isType ? '店铺类型说明' : '商户入驻协议'}}
-
@@ -325,15 +330,16 @@
- + - + - + - @@ -375,12 +381,12 @@ create, verify, merClassifly, - getCategoryList, + getCategoryList, getGoodsDetails, updateGoodsRecord, getStoreTypeApi, agreeiness, - merchantLicenseIdentify + merchantLicenseIdentify } from '@/api/store.js'; import { getCaptcha, @@ -407,7 +413,9 @@ import { HTTP_REQUEST_URL } from '@/config/app'; -import { Toast } from '../../../libs/uniApi'; + import { + Toast + } from '../../../libs/uniApi'; const app = getApp(); export default { components: { @@ -441,10 +449,10 @@ import { Toast } from '../../../libs/uniApi'; social_credit_code: '', company_name: '', address: '', - invitation_code: '', + invitation_code: '', }, - business_license: '',//营业执照 - bank_front: '', //银行卡照片 + business_license: '', //营业执照 + bank_front: '', //银行卡照片 validate: false, successful: false, keyCode: "", @@ -455,13 +463,13 @@ import { Toast } from '../../../libs/uniApi'; index1: 0, index2: [0, 0, 0], mer_classification: "", - nature_business: 0, + nature_business: 0, array: [{ category_name: '', merchant_category_id: '' }], - companyTypeList: ['对公户', '个体户'], - bindPickerChangeidx: [], + companyTypeList: ['对公户', '个体户'], + bindPickerChangeidx: [], storeTypeArr: [{ type_name: '', mer_type_id: '' @@ -521,8 +529,7 @@ import { Toast } from '../../../libs/uniApi'; this.$nextTick(function() { this.getGoodsDetails(options.mer_i_id) }) - } - else this.getArea() + } else this.getArea() this.statusBarHeight = uni.getSystemInfoSync().statusBarHeight + 45; }, onShow() { @@ -585,7 +592,7 @@ import { Toast } from '../../../libs/uniApi'; //获取商户入驻申请协议 shoplist(val) { - + agreeiness({ type: val }).then(res => { @@ -605,13 +612,13 @@ import { Toast } from '../../../libs/uniApi'; street_code: e }).then(res => { self.$set(self.business, 2, res.data); - if(self.mer_i_id&&!this.business_name){ - let area = self.business[0].find(item=>item.code==self.area_id)?.name; - let street = self.business[1].find(item=>item.code==self.street_id)?.name; - let village = self.business[2].find(item=>item.id==self.village_id)?.name; - this.business_name = `${area} ${street} ${village}`; - this.getArea(); - } + if (self.mer_i_id && !this.business_name) { + let area = self.business[0].find(item => item.code == self.area_id)?.name; + let street = self.business[1].find(item => item.code == self.street_id)?.name; + let village = self.business[2].find(item => item.id == self.village_id)?.name; + this.business_name = `${area} ${street} ${village}`; + this.getArea(); + } }) }, //获取镇 @@ -621,11 +628,11 @@ import { Toast } from '../../../libs/uniApi'; area_code: e }).then(res => { self.$set(self.business, 1, res.data) - self.getVillage(street?street:self.business[1][0].code) + self.getVillage(street ? street : self.business[1][0].code) }) }, //获取区 - getArea(code=null, street=null) { + getArea(code = null, street = null) { getArea({ city_code: 510500 }).then(res => { @@ -678,7 +685,7 @@ import { Toast } from '../../../libs/uniApi'; this.merchantData.social_credit_code = resData.social_credit_code this.merchantData.company_name = resData.company_name this.merchantData.address = resData.address - this.merchantData.invitation_code = resData.invitation_code + this.merchantData.invitation_code = resData.invitation_code this.merchantData.classification = resData.merchant_category_id this.merchantData.mer_type = resData.mer_type_id this.area_id = resData.area_id @@ -686,18 +693,18 @@ import { Toast } from '../../../libs/uniApi'; this.mer_storeType = resData.mer_storeType this.village_id = resData.village_id }) - this.business_license = resData.images[0]; - resData.images.shift(); + this.business_license = resData.images[0]; + resData.images.shift(); this.pics = resData.images; this.mer_classification = this.getCategoryName(resData.merchant_category_id, this.array) this.mer_storeType = this.getStoreTypeName(resData.mer_type_id, this.storeTypeArr) - this.business_name = ''; - this.getArea(this.area_id, this.street_id); - if(resData.mer_type_id!=12){ - this.shoplist('mer_services_agree') - }else{ - this.shoplist('mer_supply_agree') - } + this.business_name = ''; + this.getArea(this.area_id, this.street_id); + if (resData.mer_type_id != 12) { + this.shoplist('mer_services_agree') + } else { + this.shoplist('mer_supply_agree') + } uni.hideLoading(); }) }, @@ -717,37 +724,37 @@ import { Toast } from '../../../libs/uniApi'; } } }, - // 选择公司性质 - natureBusinessChange(e){ - this.nature_business = this.companyTypeList[e.detail.value]=='个体户'?2:1; - }, + // 选择公司性质 + natureBusinessChange(e) { + this.nature_business = this.companyTypeList[e.detail.value] == '个体户' ? 2 : 1; + }, bindPickerChange: function(e) { - // console.log(e.detail); + // console.log(e.detail); // this.index = e.target.value[1]; - let idx = e.target.value; + let idx = e.target.value; // let idx = e.target.value[1]; - this.merchantData.classification = this.array[idx]['merchant_category_id'] - this.mer_classification = this.array[idx]['category_name'] + this.merchantData.classification = this.array[idx]['merchant_category_id'] + this.mer_classification = this.array[idx]['category_name'] // this.merchantData.classification = this.bindPickerChangeidx[idx]['store_category_id'] // this.mer_classification = this.bindPickerChangeidx[idx]['cate_name'] this.validateBtn() }, - columnchange(e){ - // console.log(e.detail); - if(e.detail.column==0){ - this.bindPickerChangeidx = this.array[e.detail.value].children; - } - }, + columnchange(e) { + // console.log(e.detail); + if (e.detail.column == 0) { + this.bindPickerChangeidx = this.array[e.detail.value].children; + } + }, bindPickerChange1: function(e) { this.index1 = e.target.value let idx = e.target.value this.merchantData.mer_type = this.storeTypeArr[idx]['mer_type_id'] this.mer_storeType = this.storeTypeArr[idx]['type_name'] - // console.log(this.merchantData.mer_type) - if(this.storeTypeArr[idx]['type_code']== 'TypeStore'&&this.merchantData.mer_type){ + // console.log(this.merchantData.mer_type) + if (this.storeTypeArr[idx]['type_code'] == 'TypeStore' && this.merchantData.mer_type) { this.shoplist('mer_services_agree') - }else{ + } else { this.shoplist('mer_supply_agree') } this.validateBtn() @@ -760,8 +767,8 @@ import { Toast } from '../../../libs/uniApi'; `${this.business[0][this.index2[0]].name} ${this.business[1][this.index2[1]].name} ${this.business[2][this.index2[2]].name}` this.area_id = this.business[0][this.index2[0]].code this.street_id = this.business[1][this.index2[1]].code - this.village_id = this.business[2][this.index2[2]].id - if(this.merchantData.mer_type==12) return ; //市级供应链不需要查询镇农科公司 + this.village_id = this.business[2][this.index2[2]].id + if (this.merchantData.mer_type == 12) return; //市级供应链不需要查询镇农科公司 merstreet({ street_code: this.street_id }).then((res) => { @@ -793,21 +800,21 @@ import { Toast } from '../../../libs/uniApi'; title: res }); }); - // getCategoryList() - // .then(res => { - // // console.log(res); - // res.data.list.forEach(item=>{ - // item.category_name = item.cate_name; - // item.merchant_category_id = item.store_category_id; - // }) - // this.array = res.data.list; - // this.bindPickerChangeidx = this.array[0].children; - // }) - // .catch(res => { - // this.$util.Tips({ - // title: res - // }); - // }); + // getCategoryList() + // .then(res => { + // // console.log(res); + // res.data.list.forEach(item=>{ + // item.category_name = item.cate_name; + // item.merchant_category_id = item.store_category_id; + // }) + // this.array = res.data.list; + // this.bindPickerChangeidx = this.array[0].children; + // }) + // .catch(res => { + // this.$util.Tips({ + // title: res + // }); + // }); }, // 获取店铺类型 getStoreType: function() { @@ -870,38 +877,38 @@ import { Toast } from '../../../libs/uniApi'; that.$set(that, 'pics', that.pics); }); }, - uploadpicBack: function() { - let that = this; - that.$util.uploadImageOne('upload/image', function(res) { - that.bank_front = res.data.path; - }); - }, - /** - * 上传图片识别文字 - * - */ - uploadpicText: function() { - let that = this; - that.$util.uploadImageOne('upload/image', function(res) { - that.business_license = res.data.path; - uni.showLoading({ - title: '识别中' - }) - merchantLicenseIdentify({ - image: res.data.path - }).then(res=>{ - that.merchantData.address = res.data.address; - that.merchantData.user_name = res.data.legal_person; - that.merchantData.social_credit_code = res.data.register_number; - that.merchantData.company_name = res.data.name; - // that.$set('merchantData', that.merchantData); - uni.hideLoading(); - }).catch((e)=>{ - uni.hideLoading(); - Toast(e) - }) - }); - }, + uploadpicBack: function() { + let that = this; + that.$util.uploadImageOne('upload/image', function(res) { + that.bank_front = res.data.path; + }); + }, + /** + * 上传图片识别文字 + * + */ + uploadpicText: function() { + let that = this; + that.$util.uploadImageOne('upload/image', function(res) { + that.business_license = res.data.path; + uni.showLoading({ + title: '识别中' + }) + merchantLicenseIdentify({ + image: res.data.path + }).then(res => { + that.merchantData.address = res.data.address; + that.merchantData.user_name = res.data.legal_person; + that.merchantData.social_credit_code = res.data.register_number; + that.merchantData.company_name = res.data.name; + // that.$set('merchantData', that.merchantData); + uni.hideLoading(); + }).catch((e) => { + uni.hideLoading(); + Toast(e) + }) + }); + }, /** * 删除图片 * @@ -1005,11 +1012,11 @@ import { Toast } from '../../../libs/uniApi'; code: that.merchantData.yanzhengma, company_name: that.merchantData.company_name, address: that.merchantData.address, - invitation_code: that.merchantData.invitation_code, + invitation_code: that.merchantData.invitation_code, social_credit_code: that.merchantData.social_credit_code, merchant_category_id: that.merchantData.classification, - merchant_category_name: that.mer_classification, - is_company: that.nature_business==1?1:0, // 是否是公司, 1是公司, 0是个体 + merchant_category_name: that.mer_classification, + is_company: that.nature_business == 1 ? 1 : 0, // 是否是公司, 1是公司, 0是个体 mer_type_id: that.merchantData.mer_type, mer_storeType: this.mer_storeType, area_id: this.area_id, @@ -1017,14 +1024,15 @@ import { Toast } from '../../../libs/uniApi'; village_id: this.village_id, is_nmsc: this.isnum, images: [this.business_license, ...that.pics], - financial_bank:{ - // 开户信息 - bank_code: this.merchantData.bank_code, - bank: this.merchantData.bank_username, - bank_branch: this.merchantData.bank_opening, - name: this.nature_business == 1 ? that.merchantData.company_name : this.merchantData.bank_card_username, - bank_front: [this.bank_front] - } + financial_bank: { + // 开户信息 + bank_code: this.merchantData.bank_code, + bank: this.merchantData.bank_username, + bank_branch: this.merchantData.bank_opening, + name: this.nature_business == 1 ? that.merchantData.company_name : this.merchantData + .bank_card_username, + bank_front: [this.bank_front] + } } that.validate = false; if (that.mer_i_id) { @@ -1065,7 +1073,7 @@ import { Toast } from '../../../libs/uniApi'; }, formSubmit() { if (this.validateForm() && this.validate) { - if (this.merchantData.mer_type == '12') return this.agree(); + if (this.merchantData.mer_type == '12') return this.agree(); if (this.codenote.length == 0) { this.isshow = true this.countDown() @@ -1197,9 +1205,9 @@ import { Toast } from '../../../libs/uniApi'; if (!this.mer_classification) return that.$util.Tips({ title: '请选择商户分类' }); - if (!this.nature_business) return that.$util.Tips({ - title: '请选择公司性质' - }) + if (!this.nature_business) return that.$util.Tips({ + title: '请选择公司性质' + }) if (!this.mer_storeType) return that.$util.Tips({ title: '请选择店铺类型' }) @@ -1212,9 +1220,9 @@ import { Toast } from '../../../libs/uniApi'; if (that.isShowCode && !that.codeVal) return that.$util.Tips({ title: '请填写图片验证码' }); - if (!that.business_license) return that.$util.Tips({ - title: '请上传营业执照' - }); + if (!that.business_license) return that.$util.Tips({ + title: '请上传营业执照' + }); // if (that.pics.length == 0) return that.$util.Tips({ // title: '请上传一张或者多张图片' // }); @@ -1256,7 +1264,7 @@ import { Toast } from '../../../libs/uniApi'; background-color: var(--view-theme) !important; color: #fff !important; } - + .conten-top { width: 100%; @@ -1297,7 +1305,7 @@ import { Toast } from '../../../libs/uniApi'; } .merchantsSettled { - background-image: linear-gradient(var(--view-bntColor21) 0%, var(--view-bntColor22) 100%); + background-image: linear-gradient(var(--view-bntColor21) 0%, var(--view-bntColor22) 100%); min-height: 3200rpx; position: relative; } @@ -1633,6 +1641,12 @@ import { Toast } from '../../../libs/uniApi'; } } + .settlementAgreement .setAgCount .close { + position: absolute; + top: 15rpx; + right: 15rpx; + } + .settlementAgreement .setAgCount .icon { font-size: 42rpx; color: #b4b1b4; @@ -1649,19 +1663,16 @@ import { Toast } from '../../../libs/uniApi'; } .settlementAgreement .setAgCount .content { - color: #333; font-size: 26rpx; line-height: 22px; text-align: justify; text-justify: distribute-all-lines; - overflow-y: scroll; + padding-bottom: 20rpx; } - .settlementAgreement .setAgCount .contenta { - color: #333; font-size: 26rpx; line-height: 22px; @@ -1669,14 +1680,12 @@ import { Toast } from '../../../libs/uniApi'; text-justify: distribute-all-lines; height: 75%; overflow-y: scroll; - - } .setAgCountbtn { display: flex; justify-content: space-around; - position: relative; + position: relative; .setAgCountbtna { margin-top: 40rpx; @@ -1727,22 +1736,23 @@ import { Toast } from '../../../libs/uniApi'; color: #fff; } - - .border{ - position: absolute; - top: 0; - left: -28rpx; - width: 100vw; - height: 100%; - border-radius: 40rpx 40rpx 0 0; - box-shadow: 0px -5px 5px -2px rgba(0, 0, 0, 0.2); /* 在上边框添加阴影 */ - } - - .btn{ - width: 694rpx; - font-weight: bold; - font-size: 34rpx; - } + + .border { + position: absolute; + top: 0; + left: -28rpx; + width: 100vw; + height: 100%; + border-radius: 40rpx 40rpx 0 0; + box-shadow: 0px -5px 5px -2px rgba(0, 0, 0, 0.2); + /* 在上边框添加阴影 */ + } + + .btn { + width: 694rpx; + font-weight: bold; + font-size: 34rpx; + } } .settledSuccessMain {