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

Merge branch 'develop' into davidhuang

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