Commit 2f1277ef authored by Steven杜宇's avatar Steven杜宇

家庭信息

parent 8b8288e7
......@@ -95,12 +95,12 @@ class YHChildBasicInfoVC: YHBaseViewController, YHFamilyMemberProtol {
let item07 = YHFormDetailItem(type: .birthCity)
if child.isBirthOverSeas() {
item07.value = child.birthPlace?.foreign
item07.value = child.birthPlace.foreign
item07.placeHolder = "请输入".local
item07.tips = "请输入出生城市".local
} else {
item07.value = child.birthPlace?.area?.joined(separator: ",")
item07.value = child.birthPlace.area?.joined(separator: ",")
item07.placeHolder = "请选择出生城市".local
item07.tips = "请选择出生城市".local
}
......@@ -279,7 +279,7 @@ extension YHChildBasicInfoVC : UITableViewDelegate, UITableViewDataSource {
self.child?.surname = text ?? ""
} else if detailItem.type == .birthCity {
self.child?.birthPlace?.foreign = text
self.child?.birthPlace.foreign = text
} else if detailItem.type == .occupationName {
self.child?.occupationName = text ?? ""
......@@ -457,7 +457,7 @@ extension YHChildBasicInfoVC : UITableViewDelegate, UITableViewDataSource {
[weak self] (string1, string2, string3, string4) in
guard let self = self else { return }
print("\(string1)\n\(string2)\n\(string3)\n\(string4)")
self.child?.birthPlace?.area = [string2, string3, string4]
self.child?.birthPlace.area = [string2, string3, string4]
self.loadBasicInfo()
if let delegate = delegate {
delegate.saveInfo?()
......
......@@ -108,12 +108,12 @@ class YHSpouseBasicInfoVC: YHBaseViewController, YHFamilyMemberProtol {
let item05 = YHFormDetailItem(type: .birthCity)
if spouse.isBirthOverSeas() {
item05.value = spouse.birthPlace?.foreign
item05.value = spouse.birthPlace.foreign
item05.placeHolder = "请输入".local
item05.tips = "请输入出生城市".local
} else {
item05.value = spouse.birthPlace?.area?.joined(separator: ",")
item05.value = spouse.birthPlace.area?.joined(separator: ",")
item05.placeHolder = "请选择".local
item05.tips = "请选择出生城市".local
......@@ -215,12 +215,12 @@ class YHSpouseBasicInfoVC: YHBaseViewController, YHFamilyMemberProtol {
}
if spouse.isBirthOverSeas() {
if isEmptyString(spouse.birthPlace?.foreign) {
if isEmptyString(spouse.birthPlace.foreign) {
return false
}
} else {
if isEmptyArray(spouse.birthPlace?.area) {
if isEmptyArray(spouse.birthPlace.area) {
return false
}
}
......@@ -386,7 +386,7 @@ extension YHSpouseBasicInfoVC : UITableViewDelegate, UITableViewDataSource {
} else if detailItem.type == .befourMarryFirstName {
self.spouse?.surname = text ?? ""
} else if detailItem.type == .birthCity {
self.spouse?.birthPlace?.foreign = text
self.spouse?.birthPlace.foreign = text
} else if detailItem.type == .occupationName {
self.spouse?.occupationName = text ?? ""
} else if detailItem.type == .hkIdentityCardNumber {
......@@ -615,7 +615,7 @@ extension YHSpouseBasicInfoVC : UITableViewDelegate, UITableViewDataSource {
[weak self] (string1, string2, string3, string4) in
guard let self = self else { return }
print("\(string1)\n\(string2)\n\(string3)\n\(string4)")
self.spouse?.birthPlace?.area = [string2, string3, string4]
self.spouse?.birthPlace.area = [string2, string3, string4]
self.loadBasicInfo()
}
self.present(vc, animated: true)
......
......@@ -98,10 +98,10 @@ class YHBrotherInfoVC: YHBaseViewController {
let item13 = YHFormDetailItem(type: .birthCity)
if brotherInfo.isBirthOverSeas() {
item13.value = brotherInfo.birthPlace?.foreign
item13.value = brotherInfo.birthPlace.foreign
item13.placeHolder = "请输入".local
} else {
item13.value = brotherInfo.birthPlace?.area?.joined(separator: ",")
item13.value = brotherInfo.birthPlace.area?.joined(separator: ",")
item13.placeHolder = "请选择".local
}
......@@ -240,7 +240,7 @@ extension YHBrotherInfoVC : UITableViewDelegate, UITableViewDataSource {
self.brotherInfo?.subsetName = text ?? ""
} else if detailItem.type == .birthCity {
self.brotherInfo?.birthPlace?.foreign = text
self.brotherInfo?.birthPlace.foreign = text
} else if detailItem.type == .occupationName {
self.brotherInfo?.occupationName = text ?? ""
......@@ -414,7 +414,7 @@ extension YHBrotherInfoVC : UITableViewDelegate, UITableViewDataSource {
[weak self] (string1, string2, string3, string4) in
guard let self = self else { return }
print("\(string1)\n\(string2)\n\(string3)\n\(string4)")
self.brotherInfo?.birthPlace?.area = [string2, string3, string4]
self.brotherInfo?.birthPlace.area = [string2, string3, string4]
self.loadBasicInfo()
self.saveInfo()
}
......
......@@ -125,11 +125,11 @@ class YHParentInfoVC: YHBaseViewController {
let item13 = YHFormDetailItem(type: .birthCity)
if parentInfo.isBirthOverSeas() {
item13.value = parentInfo.birthPlace?.foreign
item13.value = parentInfo.birthPlace.foreign
item13.placeHolder = "请输入".local
item13.tips = "请输入城市".local
} else {
item13.value = parentInfo.birthPlace?.area?.joined(separator: ",")
item13.value = parentInfo.birthPlace.area?.joined(separator: ",")
item13.placeHolder = "请选择".local
item13.tips = "请选择城市".local
......@@ -300,7 +300,7 @@ extension YHParentInfoVC : UITableViewDelegate, UITableViewDataSource {
self.parentInfo?.subsetName = text ?? ""
} else if detailItem.type == .birthCity {
self.parentInfo?.birthPlace?.foreign = text
self.parentInfo?.birthPlace.foreign = text
} else if detailItem.type == .occupationName {
self.parentInfo?.occupationName = text ?? ""
......@@ -471,7 +471,7 @@ extension YHParentInfoVC : UITableViewDelegate, UITableViewDataSource {
[weak self] (string1, string2, string3, string4) in
guard let self = self else { return }
print("\(string1)\n\(string2)\n\(string3)\n\(string4)")
self.parentInfo?.birthPlace?.area = [string2, string3, string4]
self.parentInfo?.birthPlace.area = [string2, string3, string4]
self.loadBasicInfo()
}
self.present(vc, animated: true)
......@@ -540,11 +540,11 @@ extension YHParentInfoVC {
if parentInfo.isBirthOverSeas() {
if isEmptyString(parentInfo.birthPlace?.foreign) {
if isEmptyString(parentInfo.birthPlace.foreign) {
return false
}
} else {
if isEmptyArray(parentInfo.birthPlace?.area) {
if isEmptyArray(parentInfo.birthPlace.area) {
return false
}
}
......
......@@ -893,7 +893,7 @@ class YHFamilyMember: SmartCodable, YHFormItemProtocol {
var subsetNamePinyin: YHSubsetNamePinyin = YHSubsetNamePinyin()
var birthday: String = ""
var birthPlaceAboard: Int = 0
var birthPlace: YHAddress? = YHAddress()
var birthPlace: YHAddress = YHAddress()
var occupation: String = ""
var occupationName: String = ""
var operatorName: String = ""
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment