From b07d5f16634fc4a695fa8e6f6b18c33806f2b05a Mon Sep 17 00:00:00 2001
From: xuxy <1059738716@qq.com>
Date: 星期五, 28 六月 2024 16:28:32 +0800
Subject: [PATCH] update 合伙人的功能
---
sub_pages/supplier/supplier-info/supplier-info.vue | 51 +++++++++++++++++++++++++++++++++++----------------
1 files changed, 35 insertions(+), 16 deletions(-)
diff --git a/sub_pages/farmer/farmer-info/farmer-info.vue b/sub_pages/supplier/supplier-info/supplier-info.vue
similarity index 91%
rename from sub_pages/farmer/farmer-info/farmer-info.vue
rename to sub_pages/supplier/supplier-info/supplier-info.vue
index 335673c..72cb1c1 100644
--- a/sub_pages/farmer/farmer-info/farmer-info.vue
+++ b/sub_pages/supplier/supplier-info/supplier-info.vue
@@ -283,14 +283,29 @@
methods: {
PickArea(item, e) {
- // console.log('PickArea', item, e)
+ console.log('PickArea', item, e)
if (e.detail.value) {
- if (!!e.detail.value[0])
- this.dto.province = e.detail.value[0].value
- if (!!e.detail.value[1])
- this.dto.city = e.detail.value[1].value
- if (!!e.detail.value[2])
- this.dto.region = e.detail.value[2].value
+ this.dto.province = ''
+ this.dto.city = ''
+ this.dto.region = ''
+ if(e.detail.value.length<=3){
+ if (!!e.detail.value[0])
+ this.dto.province = e.detail.value[0].value
+ if (!!e.detail.value[1])
+ this.dto.city = e.detail.value[1].value
+ if (!!e.detail.value[2])
+ this.dto.region = e.detail.value[2].value
+ }else{
+ //说明有重复的
+ var plusnum = e.detail.value.length - 3
+ if (!!e.detail.value[plusnum+0])
+ this.dto.province = e.detail.value[plusnum+0].value
+ if (!!e.detail.value[plusnum+1])
+ this.dto.city = e.detail.value[plusnum+1].value
+ if (!!e.detail.value[plusnum+2])
+ this.dto.region = e.detail.value[plusnum+2].value
+ }
+
this.$forceUpdate()
}
@@ -312,6 +327,8 @@
// console.log('area', JSON.parse(res.data))
this.regionDataPlus = res.data && JSON.parse(res.data.replaceAll('code', 'value').replaceAll('name',
'text')) || []
+
+ console.log('area', this.regionDataPlus)
},
@@ -339,20 +356,20 @@
}
if (!this.dto.pictures) {
this.dto.pictures = []
- }else if(typeof this.dto.pictures == 'string'){
+ } else if (typeof this.dto.pictures == 'string') {
this.dto.pictures = JSON.parse(this.dto.pictures)
}
if (!this.dto.idCards) {
this.dto.idCards = []
- }else if(typeof this.dto.idCards == 'string'){
+ } else if (typeof this.dto.idCards == 'string') {
this.dto.idCards = JSON.parse(this.dto.idCards)
}
- // if (this.dto.idCards.length > 0) {
- // this.dto.idcardType = '身份证'
- // }
+ if (this.dto.idcardType == '1') {
+ this.dto.idcardType = '身份证'
+ }
this.dto.userId = this.currentInfo.id
-
+
}
this.$message.hideLoading()
@@ -370,15 +387,15 @@
}
if (!this.dto.pictures) {
this.dto.pictures = []
- }else if(typeof this.dto.pictures == 'string'){
+ } else if (typeof this.dto.pictures == 'string') {
this.dto.pictures = JSON.parse(this.dto.pictures)
}
if (!this.dto.idCards) {
this.dto.idCards = []
- }else if(typeof this.dto.idCards == 'string'){
+ } else if (typeof this.dto.idCards == 'string') {
this.dto.idCards = JSON.parse(this.dto.idCards)
}
- if (this.dto.idCards.length > 0) {
+ if (this.dto.idcardType == '1') {
this.dto.idcardType = '身份证'
}
}
@@ -393,6 +410,7 @@
var dto = {
...this.dto,
+ idcardType: this.dto.idcardType === '身份证' ? "1" : '2'
}
this.$message.showLoading()
const re = await this.$http.request('post', '/api/supplier/addOrUpdate', {
@@ -403,6 +421,7 @@
this.$message.showToast('操作成功')
//需要标记加一下
this.$store.dispatch('sign_add', 'application');
+ this.$store.dispatch('getCurrentInfo')
this.backpage()
}
--
Gitblit v1.9.3