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

// 学历

parent 579b547e
......@@ -159,7 +159,14 @@ class YHEducationInfoListVC: YHBaseViewController {
let questions = YHQuestionInfo.getEducationQuestion(eduList: educationInfo)
for questionInfo in questions {
if questionInfo.key == "qualification" {
questionInfo.answer = educationInfo.isNameSame
if educationInfo.isNameSameNew == 1 {
questionInfo.answer = true
} else if educationInfo.isNameSameNew == 2 {
questionInfo.answer = false
} else {
questionInfo.answer = nil
}
arr2.append(questionInfo)
} else if questionInfo.key == "graduate" {
......@@ -292,7 +299,7 @@ extension YHEducationInfoListVC : UITableViewDelegate, UITableViewDataSource {
let selectItem:YHFormChoiceItem = arr[selectIndex]
let option = (selectItem.title == "是".local ? true : false)
if detailItem.key == "qualification" {
self.educationInfo?.isNameSame = option
self.educationInfo?.isNameSameNew = option ? 1 : 2
} else if detailItem.key == "graduate" {
self.educationInfo?.isSpouseNameSame = option
......@@ -561,7 +568,8 @@ extension YHEducationInfoListVC {
let params:[String : Any] = [ "order_id": self.orderId,
"goNextFlow": isSubmit,
"isSpouseNameSame": educationInfo.isSpouseNameSame ?? false,
"isNameSame": educationInfo.isNameSame ?? false]
"isNameSame": educationInfo.isNameSame ?? false,
"isNameSameNew" : educationInfo.isNameSameNew]
self.educationRequest.saveAllEducationInfo(params: params) {
[weak self] success, error in
......@@ -613,7 +621,7 @@ extension YHEducationInfoListVC {
}
// 检查所有问题是否有未答项
if educationInfo.isNameSame == nil {
if educationInfo.isNameSameNew != 1 && educationInfo.isNameSameNew != 2 {
return false
}
return true
......
......@@ -17,6 +17,7 @@ class YHEducationListInfo: SmartCodable {
var isSpouseNameSame:Bool?
// 1=已婚,2=未婚,3=离婚,4=分居,5=丧偶,6=事实婚姻,7=鳏寡
var married: Int = 0
var isNameSameNew: Int = 0
func isMarried() ->Bool {
return married != 2
......@@ -27,6 +28,8 @@ class YHEducationListInfo: SmartCodable {
case eduList = "edu_list"
case quaList = "qua_list"
case isNameSame = "is_name_same"
case isNameSameNew = "is_name_same_new"
case isSpouseNameSame = "is_spouse_name_same"
case married = "married"
}
......
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