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

// 家庭成员

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