From 08ca4feaa4ecd0c4b9e4f1cad0e5b7a05d0dde16 Mon Sep 17 00:00:00 2001 From: admin-lmm <2497833386@QQ.com> Date: Mon, 10 Jul 2023 15:12:31 +0800 Subject: [PATCH] =?UTF-8?q?=E6=8F=90=E4=BA=A4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../pile/merchant/components/adapayMember.vue | 286 +++++++++++------- 1 file changed, 179 insertions(+), 107 deletions(-) diff --git a/jsowell-ui/src/views/pile/merchant/components/adapayMember.vue b/jsowell-ui/src/views/pile/merchant/components/adapayMember.vue index e966cb4d6..72eafb752 100644 --- a/jsowell-ui/src/views/pile/merchant/components/adapayMember.vue +++ b/jsowell-ui/src/views/pile/merchant/components/adapayMember.vue @@ -97,23 +97,54 @@ - - - 点击上传 -
上传法人身份证正面照,法人身份证反面照,开户银行许可证
+ + + +
只能上传jpg/png文件格式
+ + + +
只能上传jpg/png文件格式
+
+
+ + + +
只能上传jpg/png文件格式
+
+
+ + + +
只能上传jpg/png文件格式
+
+
+ --> - - - - @@ -402,21 +399,51 @@ - - - 点击上传 -
上传法人身份证正面照,法人身份证反面照,开户银行许可证以及营业执照
+ + + +
只能上传jpg/png文件格式
+
+
+ + + +
只能上传jpg/png文件格式
+
+
+ + + +
只能上传jpg/png文件格式
+
+
+ + + +
只能上传jpg/png文件格式
@@ -607,7 +634,7 @@ export default { { required: true, message: "请填写银行类型", - trigger: "blur", + trigger: "change", } ], cardNo:[ @@ -617,13 +644,6 @@ export default { trigger: "blur", } ], - imgList: [ - { - required: true, - message: "请上传四张照片", - trigger: "change", - } - ], businessName:[{ required: true, message: "请输入企业名称", @@ -700,10 +720,86 @@ export default { Authorization: "Bearer " + getToken(), }, imageUrl: null, - fileList: [], + idCardList:[], + sideCardList:[], + depositBankList:[], + businessList:[] }; }, methods: { + businessExceed(files) { + this.$message.warning( + `当前限制选择 1 张图片,本次选择了 ${ + files.length + }张` + ); + }, + businessSuccess(res, file) { + this.$refs.dialogForm.clearValidate() + this.imageUrl = URL.createObjectURL(file.raw); + console.log("图片上传成功 url:", this.imageUrl); + this.businessList.push({ url: res.url }); + }, + businessRemove(file, fileList) { + console.log("移除图片", file, fileList); + const i = this.businessList.findIndex((x) => x.uid === file.uid); + this.businessList.splice(i, 1); + }, + depositBankExceed(files) { + this.$message.warning( + `当前限制选择 1 张图片,本次选择了 ${ + files.length + }张` + ); + }, + depositBankSuccess(res, file) { + this.$refs.dialogForm.clearValidate() + this.imageUrl = URL.createObjectURL(file.raw); + console.log("图片上传成功 url:", this.imageUrl); + this.depositBankList.push({ url: res.url }); + }, + depositBankRemove(file, fileList) { + console.log("移除图片", file, fileList); + const i = this.depositBankList.findIndex((x) => x.uid === file.uid); + this.depositBankList.splice(i, 1); + }, + sideCardExceed(files) { + this.$message.warning( + `当前限制选择 1 张图片,本次选择了 ${ + files.length + }张` + ); + }, + sideCardSuccess(res) { + this.$refs.dialogForm.clearValidate() + console.log("图片上传成功 url:", this.imageUrl); + this.sideCardList.push({ url: res.url }); + }, + sideCardRemove(file, fileList) { + console.log("移除图片", file, fileList); + // 从pics数组中,找到图片对应的索引值 + const i = this.sideCardList.findIndex((x) => x.uid === file.uid); + // 调用splice方法,移除图片信息 + this.sideCardList.splice(i, 1); + }, + idCardExceed(files) { + this.$message.warning( + `当前限制选择 1 张图片,本次选择了 ${ + files.length + }张` + ); + }, + idCardSuccess(res, file) { + this.$refs.dialogForm.clearValidate() + this.idCardList.push({ url: res.url }); + }, + idCardRemove(file, fileList) { + console.log("移除图片", file, fileList); + // 从pics数组中,找到图片对应的索引值 + const i = this.idCardList.findIndex((x) => x.uid === file.uid); + // 调用splice方法,移除图片信息 + this.idCardList.splice(i, 1); + }, updateDialogForm(form){ console.log(this.adapayCorpMember,'this.adapayCorpMember') this.adapayCorpMember.merchantId = this.merchantId @@ -729,36 +825,6 @@ export default { return str.statusTitle } }, - handleExceed(files, fileList) { - this.$message.warning( - `当前限制选择 4 张图片,本次选择了 ${ - files.length - } 张,共选择了 ${files.length + fileList.length} 张` - ); - }, - handleSuccess(res, file) { - this.$refs.dialogForm.clearValidate() - // this.$refs.updateForm.clearValidate() - this.imageUrl = URL.createObjectURL(file.raw); - console.log("图片上传成功 url:", this.imageUrl); - // console.log("图片上传成功 res:", res); - this.fileList.push({ url: res.url }); - // console.log('push方法', this.fileList); - this.dialogForm.imgList = this.fileList.map(obj => obj.url) - console.log(this.dialogForm.imgList,'this.dialogForm.imgList'); - }, - handleRemove(file, fileList) { - console.log("移除图片", file, fileList); - // 从pics数组中,找到图片对应的索引值 - const i = this.fileList.findIndex((x) => x.uid === file.uid); - // 调用splice方法,移除图片信息 - this.fileList.splice(i, 1); - }, - handlePreview(file) { - // console.log(file); - this.dialogImageUrl = file.url; - console.log(this.dialogImageUrl); - }, provCode(code){ let arr = this.options.find(item => item.value == code) if (arr ==null){ @@ -770,7 +836,6 @@ export default { }, areaCode(area){ let arr = this.areaList.find(item => item.value === area); - // console.log("areaCode code:{}, value:{}", area, arr); if (arr ==null){ return '一' } else{ @@ -783,13 +848,17 @@ export default { this.dialogForm.areaCode = value[1] }, submitDialogForm(dialogForm){ - console.log(this.dialogForm); this.$refs[dialogForm].validate((valid) =>{ if (valid) { - if(this.dialogForm.imgList.length !== 3 ) return this.$message.warning('请上传三张照片') - console.log(valid,'valid'); + if(!this.idCardList[0] || !this.sideCardList[0] || !this.depositBankList[0] ||!this.businessList[0]){ + return this.$message.warning('请上传图片') + } else{ + this.dialogForm.imgList = [this.idCardList[0].url,this.sideCardList[0].url,this.depositBankList[0].url,this.businessList[0].url] + } + console.log(this.dialogForm.imgList.length,'this.dialogForm.imgList') createSettleAccount(this.dialogForm).then((response) =>{ console.log('新增',response); + this.$message.success('新增成功') this.dialog = false this.selectAdapayMember(); }) @@ -856,6 +925,9 @@ export default { ::v-deep .el-input .el-input--medium{ width: 43% !important; } +.freePic ::v-deep .el-upload--picture-card { + display: none; +} .status-card{ display: flex;background-color: #f6f7f8;padding: 15px; }