Commit 81df950a authored by Steven杜宇's avatar Steven杜宇

// 专业证书选择器

parent 39ff4ae0
......@@ -210,9 +210,20 @@ class YHFormPickerView: UIView {
YHFormPickerViewItem(type: .degreeLocation(.forgin))],
.professionCertificate:
[YHFormPickerViewItem(type: .professionCertificate(.CFA)),
YHFormPickerViewItem(type: .professionCertificate(.CFP)),
YHFormPickerViewItem(type: .professionCertificate(.FRM)),
YHFormPickerViewItem(type: .professionCertificate(.FIA)),
YHFormPickerViewItem(type: .professionCertificate(.CPA)),
YHFormPickerViewItem(type: .professionCertificate(.CIIA)),
YHFormPickerViewItem(type: .professionCertificate(.RFC)),
YHFormPickerViewItem(type: .professionCertificate(.ACCA)),
YHFormPickerViewItem(type: .professionCertificate(.CIA)),
YHFormPickerViewItem(type: .professionCertificate(.CMA)),
YHFormPickerViewItem(type: .professionCertificate(.CQF)),
YHFormPickerViewItem(type: .professionCertificate(.CIMA)),
YHFormPickerViewItem(type: .professionCertificate(.ACA))],
]
}()
......@@ -365,6 +376,8 @@ class YHFormPickerView: UIView {
return "选择学位"
case .profession:
return "职业"
case .professionCertificate:
return "选择证书名称"
}
}
}
......@@ -401,6 +414,10 @@ extension YHFormPickerView: UIPickerViewDelegate, UIPickerViewDataSource {
}
}
func rowSize(forComponent component: Int) -> CGSize {
return CGSize(width: KScreenWidth, height: 250)
}
func pickerView(_ pickerView: UIPickerView, viewForRow row: Int, forComponent component: Int, reusing view: UIView?) -> UIView {
let label = UILabel()
......@@ -556,8 +573,49 @@ extension YHFormPickerView {
} else if title.contains("其他") {
return .profession(.other)
}
case .professionCertificate:
if title.contains("CFA") {
return .professionCertificate(.CFA)
} else if title.contains("CFP") {
return .professionCertificate(.CFP)
} else if title.contains("FRM") {
return .professionCertificate(.FRM)
} else if title.contains("FIA") {
return .professionCertificate(.FIA)
} else if title.contains("CPA") {
return .professionCertificate(.CPA)
} else if title.contains("CIIA") {
return .professionCertificate(.CIIA)
} else if title.contains("RFC") {
return .professionCertificate(.RFC)
} else if title.contains("ACCA") {
return .professionCertificate(.ACCA)
} else if title.contains("CIA") {
return .professionCertificate(.CIA)
} else if title.contains("CMA") {
return .professionCertificate(.CMA)
} else if title.contains("CQF") {
return .professionCertificate(.CQF)
} else if title.contains("CIMA") {
return .professionCertificate(.CIMA)
} else if title.contains("英国皇家特许会计师") {
return .professionCertificate(.ACA)
}
}
return .none
}
......
......@@ -31,6 +31,8 @@ enum YHFormPickerViewType: Int {
case identity
// 颁发地区
case degreeLocation
// 专业证书
case professionCertificate
}
......@@ -157,6 +159,35 @@ enum YHPickerViewDegreeLocationType:Int {
case forgin = 2
}
enum YHPickerViewProfessionalCertificateType:Int {
// CFA(注册金融分析师)
case CFA = 0
// CFP(CFP证书是目前世界上权威的权威理财顾问认证项目之一)
case CFP
// FRM(金融风险管理师)
case FRM
// FIA(保险精算师)
case FIA
// CPA(注册会计师)
case CPA
// CIIA(注册国际投资分析师)
case CIIA
// RFC(财务顾问师)
case RFC
// ACCA(特许公认会计师)
case ACCA
// CIA(国际注册内部审计师)
case CIA
// CMA(美国管理会计师)
case CMA
// CQF(国际数量金融工程认证)
case CQF
// CIMA(管理会计师考试)
case CIMA
// The Associate Chartered Accountant(英国皇家特许会计师)
case ACA
}
enum YHFormPickerViewSubType {
case none
......@@ -170,6 +201,7 @@ enum YHFormPickerViewSubType {
case identity(YHPickerViewIdentityType)
case degreeLocation(YHPickerViewDegreeLocationType)
case profession(YHPicerViewProfessionType)
case professionCertificate(YHPickerViewProfessionalCertificateType)
var title:String {
switch self {
......@@ -279,6 +311,33 @@ enum YHFormPickerViewSubType {
case .profession(.other):
return "其他".local
case .professionCertificate(.CFA):
return "CFA(注册金融分析师)"
case .professionCertificate(.CFP):
return "CFP(CFP证书是目前世界上权威的权威理财顾问认证项目之一)"
case .professionCertificate(.FRM):
return "FRM(金融风险管理师)"
case .professionCertificate(.FIA):
return "FIA(保险精算师)"
case .professionCertificate(.CPA):
return "CPA(注册会计师)"
case .professionCertificate(.CIIA):
return "CIIA(注册国际投资分析师)"
case .professionCertificate(.RFC):
return "RFC(财务顾问师)"
case .professionCertificate(.ACCA):
return "ACCA(特许公认会计师)"
case .professionCertificate(.CIA):
return "CIA(国际注册内部审计师)"
case .professionCertificate(.CMA):
return "CMA(美国管理会计师)"
case .professionCertificate(.CQF):
return "CQF(国际数量金融工程认证)"
case .professionCertificate(.CIMA):
return "CIMA(管理会计师考试)"
case .professionCertificate(.ACA):
return "The Associate Chartered Accountant(英国皇家特许会计师)"
return ""
}
}
......@@ -391,7 +450,35 @@ enum YHFormPickerViewSubType {
return 10
case .profession(.other):
return 11
}
case .professionCertificate(.CFA):
return 1
case .professionCertificate(.CFP):
return 2
case .professionCertificate(.FRM):
return 3
case .professionCertificate(.FIA):
return 4
case .professionCertificate(.CPA):
return 5
case .professionCertificate(.CIIA):
return 6
case .professionCertificate(.RFC):
return 7
case .professionCertificate(.ACCA):
return 8
case .professionCertificate(.CIA):
return 9
case .professionCertificate(.CMA):
return 10
case .professionCertificate(.CQF):
return 11
case .professionCertificate(.CIMA):
return 12
case .professionCertificate(.ACA):
return 13
return -1
}
}
}
......@@ -80,7 +80,7 @@ class YHProfessionalQualificationVC: YHBaseViewController {
let title0 = YHFormTitleItem(type: .mainApplicantEducation)
let item00 = YHFormDetailItem(type: .qualificationCertificateName)
item00.placeHolder = "请输入资格证书名称".local
item00.placeHolder = "请选择资格证书名称".local
let item01 = YHFormDetailItem(type: .conferAgencyFullName)
item01.placeHolder = "请输入颁授机构全称".local
let item02 = YHFormDetailItem(type: .conferTime)
......@@ -194,7 +194,16 @@ extension YHProfessionalQualificationVC : UITableViewDelegate, UITableViewDataSo
}
if item is YHFormDetailItem {
let detailItem = item as! YHFormDetailItem
if detailItem.type == .conferTime { // 授权年份
if detailItem.type == .qualificationCertificateName { // 资格证书名称
YHFormPickerView.show(type: .professionCertificate, selectType: .professionCertificate(.ACA)) {
[weak self] selectType in
guard let self = self else { return }
}
} else if detailItem.type == .conferTime { // 授权年份
YHDatePickView.show(type: .yyyy) {
[weak self] date in
......@@ -250,13 +259,13 @@ extension YHProfessionalQualificationVC : UITableViewDelegate, UITableViewDataSo
if item is YHFormDetailItem {
let detailItem = item as! YHFormDetailItem
if detailItem.type == .conferAgencyFullName
|| detailItem.type == .qualificationCertificateName {
if detailItem.type == .conferAgencyFullName {
return .inputText
}
if detailItem.type == .conferTime
|| detailItem.type == .conferCountry
|| detailItem.type == .conferCity {
|| detailItem.type == .conferCity
|| detailItem.type == .qualificationCertificateName{
return .selectSheet
}
......
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