Commit 791da675 authored by David黄金龙's avatar David黄金龙

至今 -> 长期

parent db7682af
......@@ -34,7 +34,7 @@ class Residence : SmartCodable {
var end_time: String = ""
var order_id: Int = -1
var end_time_checked: Bool = false //是否勾选 至今
var end_time_checked: Bool = false //是否勾选 长期
......
......@@ -75,7 +75,7 @@ class YHCNIdentityCardPreviewModel: SmartCodable {
case issueDateEndAt = "issue_date_end_at"
case imgFront = "img_front"
case imgBack = "img_back"
case passport_type = "passport_type"
case passport_type = "pass_port_type"
case type = "type"
}
......
......@@ -333,7 +333,9 @@ private extension YHPreviewViewModel {
let tmp7 = YHPreviewQuestionAndAnswerModel(question: "上课地点:", answer:title)
let arr = [tmp0,tmp1,tmp2,tmp3,tmp4,tmp5,tmp6,tmp7]
let model2 = YHPreviewInfoSessionModel(cellType: .countryInfoType, cellTitle: "主申请人学历" + String(index + 1), cellData0: arr)
let addationIndex = arr.count > 1 ? String(index + 1) : ""
let model2 = YHPreviewInfoSessionModel(cellType: .countryInfoType, cellTitle: "主申请人学历" + addationIndex, cellData0: arr)
arrDataForAcademicInfo.append(model2)
}
}
......@@ -361,8 +363,11 @@ private extension YHPreviewViewModel {
title = "--"
}
let tmp3 = YHPreviewQuestionAndAnswerModel(question: "颁授城市:", answer:title)
let arr = [tmp0,tmp1,tmp2,tmp3]
let model2 = YHPreviewInfoSessionModel(cellType: .countryInfoType, cellTitle: "主申请人专业资格及会员资格" + String(index + 1), cellData0: arr)
let arr000 = [tmp0,tmp1,tmp2,tmp3]
let addationIndex = arr.count > 1 ? String(index + 1) : ""
let model2 = YHPreviewInfoSessionModel(cellType: .countryInfoType, cellTitle: "主申请人专业资格及会员资格" + addationIndex, cellData0: arr000)
arrDataForAcademicInfo.append(model2)
}
}
......@@ -402,8 +407,13 @@ private extension YHPreviewViewModel {
let tmp2 = YHPreviewQuestionAndAnswerModel(question: "婚前姓氏:", answer: model.surname.isEmpty ? "--" : model.surname)
let tmp3 = YHPreviewQuestionAndAnswerModel(question: "出生日期:", answer: model.birthday)
let tmp4 = YHPreviewQuestionAndAnswerModel(question: "出生城市:", answer: model.birth_place)
let tmp5 = YHPreviewQuestionAndAnswerModel(question: "性别:", answer: model.sex)//for test hjl todo
let tmp6 = YHPreviewQuestionAndAnswerModel(question: "婚姻状况:", answer: model.married)//for test hjl todo
var msg = YHConstantArrayData.getSexNameBy(index: Int(model.sex) ?? 0)
let tmp5 = YHPreviewQuestionAndAnswerModel(question: "性别:", answer: msg)
msg = YHConstantArrayData.getMarryNameBy(index: Int(model.married) ?? 0)
let tmp6 = YHPreviewQuestionAndAnswerModel(question: "婚姻状况:", answer: msg)
let tmp7 = YHPreviewQuestionAndAnswerModel(question: "手机号:", answer: model.mobile)
let tmp8 = YHPreviewQuestionAndAnswerModel(question: "邮箱:", answer: model.email)
let tmp9 = YHPreviewQuestionAndAnswerModel(question: "现居住地址:", answer:model.live_address)
......@@ -458,7 +468,7 @@ private extension YHPreviewViewModel {
str = "无"
} else {
if str == "8888-01-01" {
str = "至今"
str = "长期"
}
}
let tmp3 = YHPreviewQuestionAndAnswerModel(question: "届满日期:", answer: str)
......@@ -491,7 +501,7 @@ private extension YHPreviewViewModel {
str = "无"
} else {
if str == "8888-01-01" {
str = "至今"
str = "长期"
}
}
let tmp7 = YHPreviewQuestionAndAnswerModel(question: "届满日期:", answer: str)
......@@ -502,7 +512,7 @@ private extension YHPreviewViewModel {
if model.nationality != "中国-China" {
//护照及其他旅行证件
var str = String(model2.passport.passport_type)//for test hjl todo
var str = YHConstantArrayData.getIdTypeBy(index:model2.passport.passport_type)
let tmp8 = YHPreviewQuestionAndAnswerModel(question: "证件类别:", answer: str)
str = model2.passport.number
......@@ -528,7 +538,7 @@ private extension YHPreviewViewModel {
str = "无"
} else {
if str == "8888-01-01" {
str = "至今"
str = "长期"
}
}
let tmp12 = YHPreviewQuestionAndAnswerModel(question: "届满日期:", answer: str)
......@@ -1097,7 +1107,7 @@ private extension YHPreviewViewModel {
str = "无"
} else {
if str == "8888-01-01" {
str = "至今"
str = "长期"
}
}
let tmp3 = YHPreviewQuestionAndAnswerModel(question: "届满日期:", answer: str)
......@@ -1130,7 +1140,7 @@ private extension YHPreviewViewModel {
str = "无"
} else {
if str == "8888-01-01" {
str = "至今"
str = "长期"
}
}
let tmp7 = YHPreviewQuestionAndAnswerModel(question: "届满日期:", answer: str)
......@@ -1167,7 +1177,7 @@ private extension YHPreviewViewModel {
str = "无"
} else {
if str == "8888-01-01" {
str = "至今"
str = "长期"
}
}
let tmp12 = YHPreviewQuestionAndAnswerModel(question: "届满日期:", answer: str)
......@@ -1415,7 +1425,7 @@ private extension YHPreviewViewModel {
str = "无"
} else {
if str == "8888-01-01" {
str = "至今"
str = "长期"
}
}
let tmp3 = YHPreviewQuestionAndAnswerModel(question: "届满日期:", answer: str)
......@@ -1448,7 +1458,7 @@ private extension YHPreviewViewModel {
str = "无"
} else {
if str == "8888-01-01" {
str = "至今"
str = "长期"
}
}
let tmp7 = YHPreviewQuestionAndAnswerModel(question: "届满日期:", answer: str)
......@@ -1485,7 +1495,7 @@ private extension YHPreviewViewModel {
str = "无"
} else {
if str == "8888-01-01" {
str = "至今"
str = "长期"
}
}
let tmp12 = YHPreviewQuestionAndAnswerModel(question: "届满日期:", answer: str)
......
......@@ -140,7 +140,7 @@ class YHWorkExperienceItemView: UIView {
button.setImage(UIImage(named: "main_time_normal"), for: .normal)
button.setImage(UIImage(named: "main_time_select"), for: .selected)
button.setTitleColor(UIColor.mainTextColor, for: .normal)
button.setTitle("至今", for: .normal)
button.setTitle("长期", for: .normal)
button.titleLabel?.font = UIFont.PFSC_M(ofSize: 14)
button.contentHorizontalAlignment = .right
button.addTarget(self, action: #selector(longTimeButtonClick), for: .touchUpInside)
......@@ -160,7 +160,7 @@ class YHWorkExperienceItemView: UIView {
@objc func longTimeButtonClick() {
longTimeButton.isSelected = !longTimeButton.isSelected
if longTimeButton.isSelected {
self.dataSource?.message = "至今"
self.dataSource?.message = "长期"
self.updateAllViews()
if let block = self.block {
block(self.dataSource ?? YHWorkExperienceModel())
......@@ -282,7 +282,7 @@ class YHWorkExperienceItemView: UIView {
if dataSource.id == .id10 {
longTimeButton.isHidden = false
nextStepImageView.isHidden = true
if dataSource.message == "至今" {
if dataSource.message == "长期" {
longTimeButton.isSelected = true
longTimeButton.snp.remakeConstraints { make in
make.left.equalTo(messageTextField.snp.left)
......
......@@ -287,6 +287,15 @@ class YHConstantArrayData {
"id": "10"
]
]
static func getIdTypeBy(index : Int) -> String {
for item in YHConstantArrayData.arrIdType {
if let target = item["id"],index == Int(target) {
return item["title"] ?? "未知"
}
}
return "未知"
}
static let arrSex : [[String : String]] = [
["title": "男",
......@@ -296,6 +305,14 @@ class YHConstantArrayData {
"id": "2"
]
]
static func getSexNameBy(index : Int) -> String {
for item in YHConstantArrayData.arrSex {
if let target = item["id"],index == Int(target) {
return item["title"] ?? "未知"
}
}
return "未知"
}
static let arrMarry : [[String : String]] = [
["title": "已婚",
......@@ -314,5 +331,13 @@ class YHConstantArrayData {
"id": "5"
]
]
static func getMarryNameBy(index : Int) -> String {
for item in YHConstantArrayData.arrMarry {
if let target = item["id"],index == Int(target) {
return item["title"] ?? "未知"
}
}
return "未知"
}
}
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