Commit 160687fe authored by David黄金龙's avatar David黄金龙

Merge branch 'develop' into davidhuang

* develop:
  // 学历资格
parents fc978ff8 f99765ae
...@@ -70,7 +70,7 @@ class YHEducationInfoListVC: YHBaseViewController { ...@@ -70,7 +70,7 @@ class YHEducationInfoListVC: YHBaseViewController {
bottomView.saveBlock = { bottomView.saveBlock = {
[weak self] in [weak self] in
guard let self = self else { return } guard let self = self else { return }
saveInfo() saveInfo(isSubmit: false)
self.navigationController?.popViewController(animated: true) self.navigationController?.popViewController(animated: true)
} }
...@@ -511,11 +511,11 @@ extension YHEducationInfoListVC { ...@@ -511,11 +511,11 @@ extension YHEducationInfoListVC {
} }
// 保存 // 保存
func saveInfo() { func saveInfo(isSubmit:Bool) {
guard let educationInfo = educationInfo else { return } guard let educationInfo = educationInfo else { return }
let params:[String : Any] = [ "order_id": self.orderId, let params:[String : Any] = [ "order_id": self.orderId,
"goNextFlow": 0, "goNextFlow": isSubmit,
"isSpouseNameSame": educationInfo.isSpouseNameSame ?? false, "isSpouseNameSame": educationInfo.isSpouseNameSame ?? false,
"isNameSame": educationInfo.isNameSame ?? false] "isNameSame": educationInfo.isNameSame ?? false]
...@@ -524,6 +524,7 @@ extension YHEducationInfoListVC { ...@@ -524,6 +524,7 @@ extension YHEducationInfoListVC {
guard let self = self else { return } guard let self = self else { return }
if success { if success {
requestEducationInfo() requestEducationInfo()
self.navigationController?.popViewController()
} }
} }
} }
...@@ -531,14 +532,13 @@ extension YHEducationInfoListVC { ...@@ -531,14 +532,13 @@ extension YHEducationInfoListVC {
func submitInfo() { func submitInfo() {
let isChecked = checkIntegrity() let isChecked = checkIntegrity()
isNeedShowError = !isChecked isNeedShowError = !isChecked
self.tableView .reloadData() self.tableView .reloadData()
if !isChecked { if !isChecked {
YHHUD.flash(message: "资料还未填完") YHHUD.flash(message: "资料还未填完")
return return
} }
saveInfo() saveInfo(isSubmit: true)
} }
// 检查填写信息完整性 // 检查填写信息完整性
......
...@@ -113,11 +113,13 @@ class YHQualificationDetailVC: YHBaseViewController { ...@@ -113,11 +113,13 @@ class YHQualificationDetailVC: YHBaseViewController {
let item02 = YHFormDetailItem(type: .conferTime) let item02 = YHFormDetailItem(type: .conferTime)
item02.placeHolder = "请选择颁授年份".local item02.placeHolder = "请选择颁授年份".local
item02.tips = "请选择颁授年份".local item02.tips = "请选择颁授年份".local
item02.value = String(detailInfo.issuingYear) if detailInfo.issuingYear > 0 {
item02.value = String(detailInfo.issuingYear)
}
let item03 = YHFormDetailItem(type: .conferCountry) let item03 = YHFormDetailItem(type: .conferCountry)
item03.placeHolder = "请选择颁授国家/地区".local item03.placeHolder = "请选择颁授国家/地区".local
item02.tips = "请选择颁授国家/地区".local item03.tips = "请选择颁授国家/地区".local
item03.value = detailInfo.issuingAddr.country item03.value = detailInfo.issuingAddr.country
let item04 = YHFormDetailItem(type: .conferCity) let item04 = YHFormDetailItem(type: .conferCity)
...@@ -261,11 +263,11 @@ extension YHQualificationDetailVC : UITableViewDelegate, UITableViewDataSource { ...@@ -261,11 +263,11 @@ extension YHQualificationDetailVC : UITableViewDelegate, UITableViewDataSource {
let detailItem = item as! YHFormDetailItem let detailItem = item as! YHFormDetailItem
if detailItem.type == .qualificationCertificateName { // 资格证书名称 if detailItem.type == .qualificationCertificateName { // 资格证书名称
YHFormPickerView.show(type: .professionCertificate, selectType: .professionCertificate(.ACA)) {
YHSheetPickerView.show(type: .professionCertificate, selectTitle:detailInfo.certName) {
[weak self] selectType in [weak self] selectItem in
guard let self = self else { return } guard let self = self else { return }
detailInfo.certName = selectType.title detailInfo.certName = selectItem.title
loadInfo() loadInfo()
if detailId != 0 { if detailId != 0 {
saveDetailInfo(isNeedPop: false, isShowToast: false) saveDetailInfo(isNeedPop: false, isShowToast: false)
...@@ -423,6 +425,7 @@ extension YHQualificationDetailVC { ...@@ -423,6 +425,7 @@ extension YHQualificationDetailVC {
YHHUD.flash(message: "资料还未填完") YHHUD.flash(message: "资料还未填完")
return return
} }
saveDetailInfo(isNeedPop: true, isShowToast: true) saveDetailInfo(isNeedPop: true, isShowToast: true)
} }
......
...@@ -62,17 +62,16 @@ class YHEducationInfoCell: UITableViewCell { ...@@ -62,17 +62,16 @@ class YHEducationInfoCell: UITableViewCell {
return imgView return imgView
}() }()
private lazy var bottomLine:UIView = { private lazy var topLine:UIView = {
let view = UIView() let view = UIView()
view.backgroundColor = .separatorColor view.backgroundColor = .separatorColor
view.isHidden = true
return view return view
}() }()
// 是否展示底部分割线 // 是否隐藏顶部分割线
var isShowBottomLine:Bool = false { var isHiddenTopLine:Bool = false {
didSet { didSet {
bottomLine.isHidden = !isShowBottomLine topLine.isHidden = isHiddenTopLine
} }
} }
...@@ -99,8 +98,8 @@ class YHEducationInfoCell: UITableViewCell { ...@@ -99,8 +98,8 @@ class YHEducationInfoCell: UITableViewCell {
contentView.addSubview(subTitleLabel) contentView.addSubview(subTitleLabel)
contentView.addSubview(timeLabel) contentView.addSubview(timeLabel)
contentView.addSubview(arrowImgView) contentView.addSubview(arrowImgView)
contentView.addSubview(bottomLine)
contentView.addSubview(deleteButton) contentView.addSubview(deleteButton)
contentView.addSubview(topLine)
titleLabel.setContentCompressionResistancePriority(.required, for: .horizontal) titleLabel.setContentCompressionResistancePriority(.required, for: .horizontal)
...@@ -134,11 +133,11 @@ class YHEducationInfoCell: UITableViewCell { ...@@ -134,11 +133,11 @@ class YHEducationInfoCell: UITableViewCell {
make.right.equalToSuperview().offset(-horizonalGap) make.right.equalToSuperview().offset(-horizonalGap)
} }
bottomLine.snp.makeConstraints { make in topLine.snp.makeConstraints { make in
make.left.equalToSuperview().offset(horizonalGap) make.left.equalToSuperview().offset(horizonalGap)
make.right.equalToSuperview().offset(-horizonalGap) make.right.equalToSuperview().offset(-horizonalGap)
make.height.equalTo(1.0) make.height.equalTo(1.0)
make.bottom.equalToSuperview() make.top.equalToSuperview()
} }
} }
} }
...@@ -254,6 +254,7 @@ class YHSheetPickerView: UIView { ...@@ -254,6 +254,7 @@ class YHSheetPickerView: UIView {
YHSheetPickerViewItem(title:"CQF(国际数量金融工程认证)".local, index:10), YHSheetPickerViewItem(title:"CQF(国际数量金融工程认证)".local, index:10),
YHSheetPickerViewItem(title:"CIMA(管理会计师考试)".local, index:11), YHSheetPickerViewItem(title:"CIMA(管理会计师考试)".local, index:11),
YHSheetPickerViewItem(title:"The Associate Chartered Accountant(英国皇家特许会计师)".local, index:12), YHSheetPickerViewItem(title:"The Associate Chartered Accountant(英国皇家特许会计师)".local, index:12),
YHSheetPickerViewItem(title:"FCA(Fellow Chartered Accountant)".local, index:13),
], ],
// 学位类型 // 学位类型
...@@ -441,11 +442,20 @@ extension YHSheetPickerView: UIPickerViewDelegate, UIPickerViewDataSource { ...@@ -441,11 +442,20 @@ extension YHSheetPickerView: UIPickerViewDelegate, UIPickerViewDataSource {
} }
} }
func pickerView(_ pickerView: UIPickerView, widthForComponent component: Int) -> CGFloat {
return KScreenWidth - 16*2
}
func pickerView(_ pickerView: UIPickerView, rowHeightForComponent component: Int) -> CGFloat {
return 44
}
func pickerView(_ pickerView: UIPickerView, viewForRow row: Int, forComponent component: Int, reusing view: UIView?) -> UIView { func pickerView(_ pickerView: UIPickerView, viewForRow row: Int, forComponent component: Int, reusing view: UIView?) -> UIView {
let label = UILabel() let label = UILabel()
label.textColor = UIColor.mainTextColor label.textColor = UIColor.mainTextColor
label.textAlignment = .center label.textAlignment = .center
label.numberOfLines = 2
label.font = UIFont.PFSC_R(ofSize: 14) label.font = UIFont.PFSC_R(ofSize: 14)
label.text = "" label.text = ""
if let arr = dataSource[type] { if let arr = dataSource[type] {
......
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