Commit c2375805 authored by Steven杜宇's avatar Steven杜宇

// 家庭成员

parent 02441494
...@@ -429,7 +429,13 @@ extension YHChildBasicInfoVC : UITableViewDelegate, UITableViewDataSource { ...@@ -429,7 +429,13 @@ extension YHChildBasicInfoVC : UITableViewDelegate, UITableViewDataSource {
let detailItem = item as! YHFormDetailItem let detailItem = item as! YHFormDetailItem
if detailItem.type == .birthday || detailItem.type == .stayHKDate { // 出生日期/获准滞留至 if detailItem.type == .birthday || detailItem.type == .stayHKDate { // 出生日期/获准滞留至
YHDatePickView.show(type: .yyyymmdd) { [weak self] date in var title = ""
if detailItem.type == .birthday {
title = "选择出生日期"
} else if detailItem.type == .stayHKDate {
title = "选择逗留日期"
}
YHDatePickView.show(type: .yyyymmdd, title:title) { [weak self] date in
guard let self = self else { return } guard let self = self else { return }
if detailItem.type == .birthday { if detailItem.type == .birthday {
...@@ -437,7 +443,7 @@ extension YHChildBasicInfoVC : UITableViewDelegate, UITableViewDataSource { ...@@ -437,7 +443,7 @@ extension YHChildBasicInfoVC : UITableViewDelegate, UITableViewDataSource {
} else if detailItem.type == .stayHKDate { } else if detailItem.type == .stayHKDate {
self.child?.childInHk.info = date self.child?.childInHk.info = date
} }
self.loadInfo() loadInfo()
save() save()
} }
......
...@@ -220,8 +220,7 @@ extension YHChildPrimaryInfoVC : UITableViewDelegate, UITableViewDataSource { ...@@ -220,8 +220,7 @@ extension YHChildPrimaryInfoVC : UITableViewDelegate, UITableViewDataSource {
} }
if detailItem.type == .isAccompanyToHK, let child = child, child.is18YearsOld() { // 是否随行至香港 if detailItem.type == .isAccompanyToHK, let child = child, child.is18YearsOld() { // 是否随行至香港
// 年满18岁不能随行 // 年满18岁不能随行 随行按钮不可编辑固定为否
select = false
cell.isCanEdit = isFollowCanEdit cell.isCanEdit = isFollowCanEdit
} }
...@@ -364,6 +363,7 @@ extension YHChildPrimaryInfoVC : UITableViewDelegate, UITableViewDataSource { ...@@ -364,6 +363,7 @@ extension YHChildPrimaryInfoVC : UITableViewDelegate, UITableViewDataSource {
} }
self.loadInfo() self.loadInfo()
save()
} }
self.navigationController?.pushViewController(vc) self.navigationController?.pushViewController(vc)
...@@ -383,6 +383,7 @@ extension YHChildPrimaryInfoVC : UITableViewDelegate, UITableViewDataSource { ...@@ -383,6 +383,7 @@ extension YHChildPrimaryInfoVC : UITableViewDelegate, UITableViewDataSource {
} }
self.child?.address.area = citys self.child?.address.area = citys
self.loadInfo() self.loadInfo()
save()
} }
self.present(vc, animated: true) self.present(vc, animated: true)
...@@ -397,8 +398,15 @@ extension YHChildPrimaryInfoVC : UITableViewDelegate, UITableViewDataSource { ...@@ -397,8 +398,15 @@ extension YHChildPrimaryInfoVC : UITableViewDelegate, UITableViewDataSource {
guard let child = child else { return } guard let child = child else { return }
child.birthday = date child.birthday = date
isFollowCanEdit = !child.is18YearsOld() isFollowCanEdit = !child.is18YearsOld()
if child.is18YearsOld() {
child.setFollow(false)
}
if let delegate = delegate, delegate.responds(to: #selector(YHSpouseInfoVCProtocol.updateStepView)) {
delegate.updateStepView()
}
} }
self.loadInfo() self.loadInfo()
save()
} }
} }
} }
......
...@@ -617,7 +617,13 @@ extension YHSpouseBasicInfoVC : UITableViewDelegate, UITableViewDataSource { ...@@ -617,7 +617,13 @@ extension YHSpouseBasicInfoVC : UITableViewDelegate, UITableViewDataSource {
let detailItem = item as! YHFormDetailItem let detailItem = item as! YHFormDetailItem
if detailItem.type == .birthday || detailItem.type == .stayHKDate { // 出生日期/获准滞留至 if detailItem.type == .birthday || detailItem.type == .stayHKDate { // 出生日期/获准滞留至
YHDatePickView.show(type: .yyyymmdd) { [weak self] date in var title = ""
if detailItem.type == .birthday {
title = "选择出生日期"
} else if detailItem.type == .stayHKDate {
title = "选择逗留日期"
}
YHDatePickView.show(type: .yyyymmdd, title:title) { [weak self] date in
guard let self = self else { return } guard let self = self else { return }
if detailItem.type == .birthday { if detailItem.type == .birthday {
......
...@@ -890,7 +890,7 @@ class YHFamilyMember: SmartCodable, YHFormItemProtocol { ...@@ -890,7 +890,7 @@ class YHFamilyMember: SmartCodable, YHFormItemProtocol {
var relation: String = "" var relation: String = ""
var hasDegree: String = "" var hasDegree: String = ""
var hasDegreeJson: [YHHasDegreeJson] = [] var hasDegreeJson: [YHHasDegreeJson] = []
var follow: Int = 0 var follow: Int = 1
var statement: Int = 0 var statement: Int = 0
var subsetName: String = "" var subsetName: String = ""
var subsetNamePinyin: YHSubsetNamePinyin = YHSubsetNamePinyin() var subsetNamePinyin: YHSubsetNamePinyin = YHSubsetNamePinyin()
...@@ -1258,11 +1258,16 @@ class YHAddress: SmartCodable { ...@@ -1258,11 +1258,16 @@ class YHAddress: SmartCodable {
class YHChildStepchildClass: SmartCodable { class YHChildStepchildClass: SmartCodable {
var has: String = "" var has: String = ""
var info: String = "" var info: String = ""
var number: String = "" var year: String = ""
var month: String = ""
// 龙哥所加字段
var number:String = ""
enum CodingKeys: String, CodingKey { enum CodingKeys: String, CodingKey {
case has = "has" case has = "has"
case info = "info" case info = "info"
case year = "year"
case month = "month"
case number = "number" case number = "number"
} }
......
...@@ -66,8 +66,11 @@ class YHFamilyMemberViewModel { ...@@ -66,8 +66,11 @@ class YHFamilyMemberViewModel {
mainModel.subsetName = model.name mainModel.subsetName = model.name
} }
if model.birth.count != 0 { if model.birth.count != 0 {
if mainModel.relationType != .child {
// 孩子生日设置大于18岁后必须设置为不能随行 导致证件上传和证件信息页面隐藏 会产生异常
mainModel.birthday = model.birth.toTimeString() mainModel.birthday = model.birth.toTimeString()
} }
}
if model.gender.count != 0 { if model.gender.count != 0 {
if model.gender == "女" { if model.gender == "女" {
mainModel.setMale(false) mainModel.setMale(false)
...@@ -95,8 +98,11 @@ class YHFamilyMemberViewModel { ...@@ -95,8 +98,11 @@ class YHFamilyMemberViewModel {
mainModel.subsetName = model.name mainModel.subsetName = model.name
} }
if model.birth.count != 0 { if model.birth.count != 0 {
if mainModel.relationType != .child {
// 孩子生日设置大于18岁后必须设置为不能随行 导致证件上传和证件信息页面隐藏 会产生异常
mainModel.birthday = model.birth.toTimeString() mainModel.birthday = model.birth.toTimeString()
} }
}
if model.gender.count != 0 { if model.gender.count != 0 {
if model.gender == "女" { if model.gender == "女" {
mainModel.setMale(false) mainModel.setMale(false)
......
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