diff --git a/src/views/index/supplierAdd.vue b/src/views/index/supplierAdd.vue index d6ca0114..8bb2c90b 100644 --- a/src/views/index/supplierAdd.vue +++ b/src/views/index/supplierAdd.vue @@ -156,6 +156,21 @@ minorCount: '', serviceAreaCode: [], linkEmail:'', + accountInfoDTO:{ + dutyParagraph:'', + accountNumber:'', + accountName:'', + accountType:'', + invoiceType:'', + settlementType:'', + shouldRate:'', + realRate:'', + unitName:'', + bankNo:'', + billingPhone:'', + billingAddress:'', + billHead:'', + } }, qrCodeUrl: '', qrCode: '', @@ -237,11 +252,11 @@ }, async applyAdd() { if( !this.idFrontPhoto ) { - this.$toast('法人身份证正面照未上传') + this.$toast('法人身份证人像页未上传') return } if( !this.idBackPhoto ) { - this.$toast('法人身份证反面照未上传') + this.$toast('法人身份证国徽页未上传') return } if( !this.companyPhoto ) { @@ -252,6 +267,7 @@ this.$toast('服务区域不能为空') return } + // this.wechatId='wmOTNXBwAABrvKkE_Fh8ZN8Xm2S9v2wQ' if(!this.wechatId) { await this.QrCodeResult(); if( !this.wechatId ) { @@ -259,7 +275,6 @@ return } } - if( this.$refs.tree.getCheckedKeys().length > 0 ) { await this.saveHandler() } else { @@ -283,19 +298,11 @@ _node.map(item => { checkArr.push(item.data.id) }) - - /* let treeArr = this.$refs.tree.getCheckedKeys(); - let childrenTreeArr = []; - treeArr.map(item => { - let _arr = this.supplierServiceList.filter(_item => _item.id == item) || [] // 获取对应的大类 - _arr[0]?.children?.map(childItem => { - childrenTreeArr?.push(childItem?.id) - }) - }) - let allArr = [...treeArr, ...childrenTreeArr]*/ let res = await saveSupplier({ id: this.id, ...this.form, + accountInfoJson:JSON.stringify(this.form.accountInfoDTO), + accountInfoDTO:{}, idCardFrontUrl: this.idFrontPhoto, idCardBackUrl: this.idBackPhoto, businessLicense: this.companyPhoto, @@ -405,6 +412,8 @@ }) this.form.name = res?.data?.name; this.form.areaName = res?.data?.address + this.form.accountInfoDTO.dutyParagraph=res?.data?.regNum + this.form.accountInfoDTO.unitName = res?.data?.name await this.QrCodeHandler(); }, async licensePhotoHandler(file){// 开户许可证 @@ -412,6 +421,15 @@ formData.append("file" , file.file); let res = await uploadImage(formData); this.licensePhoto = res.data + await this.licenseOcrHandler() + }, + async licenseOcrHandler(){// 开户许可证ocr识别 + let res = await ocrHandler({ + ocrType: 15, + imageUrl: this.licensePhoto, + }) + this.form.accountInfoDTO.accountNumber=res?.data?.accountNumber + this.form.accountInfoDTO.accountName = res?.data?.accountBank }, }, computed: {