Commit 2310572c authored by Steven杜宇's avatar Steven杜宇

// 家庭信息

parent 14b6bfff
...@@ -161,16 +161,16 @@ class YHChildInfoContainerVC: YHBaseViewController, YHSpouseInfoVCProtocol { ...@@ -161,16 +161,16 @@ class YHChildInfoContainerVC: YHBaseViewController, YHSpouseInfoVCProtocol {
func submit() { func submit() {
if let targetVC = getCurrentStepViewController() { if let targetVC = getCurrentStepViewController() {
if targetVC.nextStep() { if targetVC.nextStep() {
// 当前步骤已是最后一步
if let vc = stepVCs.last, vc.step == currentStep {
YHHUD.flash(message: "已经是最后一步!")
return
}
saveInfo(isSubmit: true, isShowLoading: true) { saveInfo(isSubmit: true, isShowLoading: true) {
[weak self] success, error in [weak self] success, error in
guard let self = self else { return } guard let self = self else { return }
if success { if success {
// 当前步骤已是最后一步
if let vc = stepVCs.last, vc.step == currentStep {
self.navigationController?.popViewController()
return
}
if let cur = getArrayIndexOfCurrentStep(), let item = stepVCs[safe:cur+1] { if let cur = getArrayIndexOfCurrentStep(), let item = stepVCs[safe:cur+1] {
currentStep = item.step currentStep = item.step
} }
......
...@@ -218,14 +218,13 @@ extension YHSpouseInfoContainerVC { ...@@ -218,14 +218,13 @@ extension YHSpouseInfoContainerVC {
func submit() { func submit() {
if let targetVC = getCurrentStepViewController() { if let targetVC = getCurrentStepViewController() {
if targetVC.nextStep() { if targetVC.nextStep() {
saveInfo(isSubmit: true, isLoading: true) { saveInfo(isSubmit: true, isLoading: true) {
[weak self] success, tips in [weak self] success, tips in
guard let self = self else { return } guard let self = self else { return }
if success { if success {
// 当前步骤已是最后一步 // 当前步骤已是最后一步
if let vc = stepVCs.last, vc.step == currentStep { if let vc = stepVCs.last, vc.step == currentStep {
YHHUD.flash(message: "已经是最后一步!") self.navigationController?.popViewController()
return return
} }
......
...@@ -19,7 +19,8 @@ class YHBrotherInfoVC: YHBaseViewController { ...@@ -19,7 +19,8 @@ class YHBrotherInfoVC: YHBaseViewController {
var bottomView: YHSaveAndSubmitView = { var bottomView: YHSaveAndSubmitView = {
let view = YHSaveAndSubmitView.createView() let view = YHSaveAndSubmitView.createView()
view.isHiddenSubmit = true view.isHiddenSave = true
view.changeRightBtnTitle("保存")
return view return view
}() }()
...@@ -478,6 +479,46 @@ extension YHBrotherInfoVC { ...@@ -478,6 +479,46 @@ extension YHBrotherInfoVC {
// 检查填写信息完整性 // 检查填写信息完整性
func checkIntegrity() -> Bool { func checkIntegrity() -> Bool {
guard let brotherInfo = brotherInfo else { return false }
if isEmptyString(brotherInfo.subsetName) || isEmptyString(brotherInfo.birthday) || isEmptyString(brotherInfo.married) || isEmptyString(brotherInfo.occupation) {
return false
}
if brotherInfo.isBirthOverSeas() {
if isEmptyString(brotherInfo.birthPlace.foreign) {
return false
}
} else {
if isEmptyArray(brotherInfo.birthPlace.area) {
return false
}
}
if brotherInfo.sex == 0 {
return false
}
if brotherInfo.isNowHaveJob() {
if isEmptyString(brotherInfo.occupationName) {
return false
}
}
if brotherInfo.isHaveHKIdentityCard() { // 办理过香港身份证才显示证号
if isEmptyString(brotherInfo.hkIdentityCard) {
return false
}
if let hkIdCard = brotherInfo.hkIdentityCard, !hkIdCard.isHKIdentityCardNumber() {
return false
}
}
return true return true
} }
......
...@@ -20,6 +20,7 @@ class YHParentInfoVC: YHBaseViewController { ...@@ -20,6 +20,7 @@ class YHParentInfoVC: YHBaseViewController {
var bottomView: YHSaveAndSubmitView = { var bottomView: YHSaveAndSubmitView = {
let view = YHSaveAndSubmitView.createView() let view = YHSaveAndSubmitView.createView()
view.isHiddenSave = true view.isHiddenSave = true
view.changeRightBtnTitle("保存")
return view return view
}() }()
......
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