Commit ea6f567d authored by pete谢兆麟's avatar pete谢兆麟

Merge commit 'e9280106' into xiezhaolin

parents addd150e e9280106
...@@ -132,7 +132,7 @@ class YHBasicInfoFillView: UIView, UITextViewDelegate { ...@@ -132,7 +132,7 @@ class YHBasicInfoFillView: UIView, UITextViewDelegate {
private var myTextView : UITextView! private var myTextView : UITextView!
private var arrCheckBtns : [UIButton] = [] private var arrCheckBtns : [UIButton] = []
private let kTipsString : String = "如选择“是”,请详细说明" private let kTipsString : String = "如选择“是”,请详细说明时间、地点"
private lazy var noChoiceTipsLable: UILabel = { private lazy var noChoiceTipsLable: UILabel = {
let label = UILabel() let label = UILabel()
......
...@@ -99,6 +99,19 @@ extension YHBasicInfoFillViewModel { ...@@ -99,6 +99,19 @@ extension YHBasicInfoFillViewModel {
} }
} }
do {
//配偶
if let spouse = dataModelForBasicInfo.spouse {
let model1 = YHBasicInfoCellModel(question: "1、是否曾被拒绝入境/递解/遣送或要求离开香港?", answer: spouse.child_departure?.has ?? "", info: spouse.child_departure?.info ?? "")
let model2 = YHBasicInfoCellModel(question: "2、是否曾被拒绝签发签证/进入许可以入境香港?", answer: spouse.child_deny?.has ?? "", info: spouse.child_deny?.info ?? "")
let arr = [model1,model2]
let sessionModel = YHBasicInfoSessionModel(sessionTitle: "配偶", arrQuestionItem: arr)
arrData.append(sessionModel)
}
}
do { do {
//子女 - xxx //子女 - xxx
if let arrChild = dataModelForBasicInfo.child { if let arrChild = dataModelForBasicInfo.child {
...@@ -117,18 +130,7 @@ extension YHBasicInfoFillViewModel { ...@@ -117,18 +130,7 @@ extension YHBasicInfoFillViewModel {
} }
do {
//配偶
if let spouse = dataModelForBasicInfo.spouse {
let model1 = YHBasicInfoCellModel(question: "1、是否曾被拒绝入境/递解/遣送或要求离开香港?", answer: spouse.child_departure?.has ?? "", info: spouse.child_departure?.info ?? "")
let model2 = YHBasicInfoCellModel(question: "2、是否曾被拒绝签发签证/进入许可以入境香港?", answer: spouse.child_deny?.has ?? "", info: spouse.child_deny?.info ?? "")
let arr = [model1,model2]
let sessionModel = YHBasicInfoSessionModel(sessionTitle: "配偶", arrQuestionItem: arr)
arrData.append(sessionModel)
}
}
do { do {
//家庭背景 //家庭背景
......
...@@ -89,7 +89,7 @@ extension YHCertificateUploadVC: UITableViewDelegate, UITableViewDataSource { ...@@ -89,7 +89,7 @@ extension YHCertificateUploadVC: UITableViewDelegate, UITableViewDataSource {
} }
func tableView(_ tableView: UITableView, heightForRowAt indexPath: IndexPath) -> CGFloat { func tableView(_ tableView: UITableView, heightForRowAt indexPath: IndexPath) -> CGFloat {
return 217.0 return UITableView.automaticDimension
} }
} }
...@@ -67,17 +67,33 @@ class YHSheetPickerView: UIView { ...@@ -67,17 +67,33 @@ class YHSheetPickerView: UIView {
view.addSubview(titleLabel) view.addSubview(titleLabel)
view.addSubview(cancelBtn) view.addSubview(cancelBtn)
view.addSubview(confirmBtn) view.addSubview(confirmBtn)
view.addSubview(topLineView)
titleLabel.snp.makeConstraints { make in titleLabel.snp.makeConstraints { make in
make.edges.equalToSuperview() make.edges.equalToSuperview()
} }
cancelBtn.snp.makeConstraints { make in cancelBtn.snp.makeConstraints { make in
make.left.top.bottom.equalToSuperview() make.left.equalToSuperview().offset(21)
make.width.equalTo(60) make.centerY.equalToSuperview()
make.size.equalTo(CGSizeMake(30, 20))
} }
confirmBtn.snp.makeConstraints { make in confirmBtn.snp.makeConstraints { make in
make.right.top.bottom.equalToSuperview() make.right.equalToSuperview().offset(-21)
make.width.equalTo(60) make.centerY.equalToSuperview()
make.size.equalTo(CGSizeMake(30, 20))
} }
topLineView.snp.makeConstraints { make in
make.left.equalToSuperview().offset(21)
make.right.equalToSuperview().offset(-21)
make.bottom.equalToSuperview()
make.height.equalTo(1)
}
return view
}()
lazy var topLineView:UIView = {
let view = UIView()
view.backgroundColor = UIColor(hexString: "#F0F0F0")
return view return view
}() }()
...@@ -85,7 +101,7 @@ class YHSheetPickerView: UIView { ...@@ -85,7 +101,7 @@ class YHSheetPickerView: UIView {
let label = UILabel() let label = UILabel()
label.textColor = UIColor.mainTextColor label.textColor = UIColor.mainTextColor
label.textAlignment = .center label.textAlignment = .center
label.font = UIFont.PFSC_R(ofSize: 16) label.font = UIFont.PFSC_M(ofSize: 17)
label.text = "请选择" label.text = "请选择"
return label return label
}() }()
...@@ -93,18 +109,20 @@ class YHSheetPickerView: UIView { ...@@ -93,18 +109,20 @@ class YHSheetPickerView: UIView {
lazy var cancelBtn: UIButton = { lazy var cancelBtn: UIButton = {
let btn = UIButton() let btn = UIButton()
btn.setTitle("取消".local, for: .normal) btn.setTitle("取消".local, for: .normal)
btn.titleLabel?.font = UIFont.PFSC_R(ofSize: 14) btn.titleLabel?.font = UIFont.PFSC_M(ofSize: 14)
btn.setTitleColor(UIColor.mainTextColor, for: .normal) btn.setTitleColor(UIColor.mainTextColor, for: .normal)
btn.addTarget(self, action: #selector(didClickCancelButton), for: .touchUpInside) btn.addTarget(self, action: #selector(didClickCancelButton), for: .touchUpInside)
btn.YH_clickEdgeInsets = UIEdgeInsets(top: 20, left: 20, bottom: 20, right: 20)
return btn return btn
}() }()
lazy var confirmBtn: UIButton = { lazy var confirmBtn: UIButton = {
let btn = UIButton() let btn = UIButton()
btn.setTitle("确定".local, for: .normal) btn.setTitle("确定".local, for: .normal)
btn.titleLabel?.font = UIFont.PFSC_R(ofSize: 14) btn.titleLabel?.font = UIFont.PFSC_M(ofSize: 14)
btn.setTitleColor(UIColor(hex: 0x4487F9), for: .normal) btn.setTitleColor(UIColor(hex: 0x4487F9), for: .normal)
btn.addTarget(self, action: #selector(didClickConfirmButton), for: .touchUpInside) btn.addTarget(self, action: #selector(didClickConfirmButton), for: .touchUpInside)
btn.YH_clickEdgeInsets = UIEdgeInsets(top: 20, left: 20, bottom: 20, right: 20)
return btn return btn
}() }()
...@@ -129,6 +147,7 @@ class YHSheetPickerView: UIView { ...@@ -129,6 +147,7 @@ class YHSheetPickerView: UIView {
pickerView.selectRow(selectRow, inComponent: 0, animated: true) pickerView.selectRow(selectRow, inComponent: 0, animated: true)
} else { } else {
selectRow = 0
pickerView.selectRow(0, inComponent: 0, animated: true) pickerView.selectRow(0, inComponent: 0, animated: true)
} }
} }
...@@ -296,11 +315,11 @@ class YHSheetPickerView: UIView { ...@@ -296,11 +315,11 @@ class YHSheetPickerView: UIView {
whiteContentView.addSubview(pickerView) whiteContentView.addSubview(pickerView)
let corner = UIRectCorner(rawValue: UIRectCorner.topLeft.rawValue | UIRectCorner.topRight.rawValue) let corner = UIRectCorner(rawValue: UIRectCorner.topLeft.rawValue | UIRectCorner.topRight.rawValue)
let path = UIBezierPath(roundedRect:bounds,byRoundingCorners: corner,cornerRadii:CGSizeMake(16.0, 16.0)); let path = UIBezierPath(roundedRect:bounds,byRoundingCorners: corner,cornerRadii:CGSizeMake(8.0, 8.0))
let layer = CAShapeLayer(); let layer = CAShapeLayer()
layer.frame = whiteContentView.bounds; layer.frame = whiteContentView.bounds
layer.path = path.cgPath; layer.path = path.cgPath
whiteContentView.layer.mask = layer; whiteContentView.layer.mask = layer
if let title = title { if let title = title {
titleLabel.text = title titleLabel.text = title
...@@ -312,9 +331,21 @@ class YHSheetPickerView: UIView { ...@@ -312,9 +331,21 @@ class YHSheetPickerView: UIView {
make.edges.equalToSuperview() make.edges.equalToSuperview()
} }
var whiteContentHeight = 322.0
if self.type == .educationDegree
|| self.type == .marriage
|| self.type == .profession
|| self.type == .certificate
|| self.type == .identity
|| self.type == .professionCertificate
|| self.type == .degreeCategory
{
whiteContentHeight = 411.0
}
whiteContentView.snp.makeConstraints { make in whiteContentView.snp.makeConstraints { make in
make.left.right.bottom.equalToSuperview() make.left.right.bottom.equalToSuperview()
make.top.equalToSuperview().offset(KScreenHeight*2/3.0) make.height.equalTo(whiteContentHeight)
} }
topView.snp.makeConstraints { make in topView.snp.makeConstraints { make in
...@@ -477,6 +508,8 @@ extension YHSheetPickerView: UIPickerViewDelegate, UIPickerViewDataSource { ...@@ -477,6 +508,8 @@ extension YHSheetPickerView: UIPickerViewDelegate, UIPickerViewDataSource {
let item :YHSheetPickerViewItem = arr[row] let item :YHSheetPickerViewItem = arr[row]
print(item.title) print(item.title)
selectRow = row selectRow = row
//刷新picker,看上面的代理
pickerView.reloadComponent(component)
} }
} }
} }
...@@ -486,16 +519,19 @@ extension YHSheetPickerView: UIPickerViewDelegate, UIPickerViewDataSource { ...@@ -486,16 +519,19 @@ extension YHSheetPickerView: UIPickerViewDelegate, UIPickerViewDataSource {
} }
func pickerView(_ pickerView: UIPickerView, rowHeightForComponent component: Int) -> CGFloat { func pickerView(_ pickerView: UIPickerView, rowHeightForComponent component: Int) -> CGFloat {
return 44 if self.type == .professionCertificate {
return 62.0
}
return 42.0
} }
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.font = UIFont.PFSC_R(ofSize: 14)
label.textAlignment = .center label.textAlignment = .center
label.numberOfLines = 2 label.numberOfLines = 2
label.font = UIFont.PFSC_R(ofSize: 14)
label.text = "" label.text = ""
if let arr = Self.dataSource[type] { if let arr = Self.dataSource[type] {
if 0 <= row && row < arr.count { if 0 <= row && row < arr.count {
...@@ -503,6 +539,13 @@ extension YHSheetPickerView: UIPickerViewDelegate, UIPickerViewDataSource { ...@@ -503,6 +539,13 @@ extension YHSheetPickerView: UIPickerViewDelegate, UIPickerViewDataSource {
label.text = item.title label.text = item.title
} }
} }
if selectRow == row {
label.font = UIFont.PFSC_M(ofSize: 14)
} else {
label.font = UIFont.PFSC_R(ofSize: 14)
}
// 选中背景色 // 选中背景色
if #available(iOS 14.0, *), pickerView.subviews.count > 1 { if #available(iOS 14.0, *), pickerView.subviews.count > 1 {
pickerView.subviews[1].backgroundColor = UIColor(hex: 0x4487F9, alpha: 0.06) pickerView.subviews[1].backgroundColor = UIColor(hex: 0x4487F9, alpha: 0.06)
......
...@@ -117,10 +117,10 @@ class YHIdentityCardCell: UITableViewCell { ...@@ -117,10 +117,10 @@ class YHIdentityCardCell: UITableViewCell {
contentView.addSubview(centerView) contentView.addSubview(centerView)
centerView.snp.makeConstraints { make in centerView.snp.makeConstraints { make in
make.left.equalTo(16) make.left.equalToSuperview().offset(16)
make.right.equalTo(-16) make.right.equalToSuperview().offset(-16)
make.top.equalTo(7) make.top.equalToSuperview().offset(14)
make.bottom.equalTo(-16) make.bottom.equalToSuperview()
} }
titleLabel = { titleLabel = {
...@@ -163,7 +163,7 @@ class YHIdentityCardCell: UITableViewCell { ...@@ -163,7 +163,7 @@ class YHIdentityCardCell: UITableViewCell {
centerView.addSubview(lineView) centerView.addSubview(lineView)
lineView.snp.makeConstraints { make in lineView.snp.makeConstraints { make in
make.left.equalTo(18) make.left.equalTo(18)
make.top.equalTo(52) make.top.equalTo(titleLabel.snp.bottom).offset(12)
make.height.equalTo(1) make.height.equalTo(1)
make.right.equalTo(-18) make.right.equalTo(-18)
} }
...@@ -179,7 +179,7 @@ class YHIdentityCardCell: UITableViewCell { ...@@ -179,7 +179,7 @@ class YHIdentityCardCell: UITableViewCell {
frontLabel.snp.makeConstraints { make in frontLabel.snp.makeConstraints { make in
make.left.equalTo(18) make.left.equalTo(18)
make.right.equalTo(centerView.snp.centerX) make.right.equalTo(centerView.snp.centerX)
make.top.equalTo(64) make.top.equalTo(lineView.snp.bottom).offset(12)
make.height.equalTo(20) make.height.equalTo(20)
} }
...@@ -194,7 +194,7 @@ class YHIdentityCardCell: UITableViewCell { ...@@ -194,7 +194,7 @@ class YHIdentityCardCell: UITableViewCell {
backSurfaceLabel.snp.makeConstraints { make in backSurfaceLabel.snp.makeConstraints { make in
make.right.equalTo(-18) make.right.equalTo(-18)
make.left.equalTo(centerView.snp.centerX) make.left.equalTo(centerView.snp.centerX)
make.top.equalTo(64) make.top.equalTo(lineView.snp.bottom).offset(12)
make.height.equalTo(20) make.height.equalTo(20)
} }
...@@ -210,9 +210,10 @@ class YHIdentityCardCell: UITableViewCell { ...@@ -210,9 +210,10 @@ class YHIdentityCardCell: UITableViewCell {
centerView.addSubview(frontImageButton) centerView.addSubview(frontImageButton)
frontImageButton.snp.makeConstraints { make in frontImageButton.snp.makeConstraints { make in
make.left.equalTo(18) make.left.equalTo(18)
make.top.equalTo(96) make.top.equalTo(frontLabel.snp.bottom).offset(12)
make.height.equalTo(91) make.height.equalTo(91)
make.width.equalTo(147) make.width.equalTo(147)
make.bottom.equalToSuperview().offset(-16)
} }
frontDeleteButton = { frontDeleteButton = {
...@@ -242,7 +243,7 @@ class YHIdentityCardCell: UITableViewCell { ...@@ -242,7 +243,7 @@ class YHIdentityCardCell: UITableViewCell {
centerView.addSubview(backSurfaceImageButton) centerView.addSubview(backSurfaceImageButton)
backSurfaceImageButton.snp.makeConstraints { make in backSurfaceImageButton.snp.makeConstraints { make in
make.right.equalTo(-18) make.right.equalTo(-18)
make.top.equalTo(96) make.top.equalTo(frontLabel.snp.bottom).offset(12)
make.height.equalTo(91) make.height.equalTo(91)
make.width.equalTo(147) make.width.equalTo(147)
} }
......
...@@ -122,10 +122,13 @@ class YHWorkExperienceTextItemView: UIView { ...@@ -122,10 +122,13 @@ class YHWorkExperienceTextItemView: UIView {
} }
@objc func showPrompts() { @objc func showPrompts() {
if dataSource?.id == .id18 { if dataSource?.id == .id3 {
return YHWholeScreenTipsView.show(type: .company, targetView: nextStepImageView)
} else if dataSource?.id == .id4 {
YHWholeScreenTipsView.show(type: .officialWebsite, targetView: nextStepImageView)
} }
YHWholeScreenTipsView.show(type: .residenceInfo, targetView: nextStepImageView)
} }
} }
......
...@@ -100,8 +100,11 @@ class YHInformationFillTipsAlertView: UIView { ...@@ -100,8 +100,11 @@ class YHInformationFillTipsAlertView: UIView {
centerView.addSubview(bottomView) centerView.addSubview(bottomView)
bottomView.snp.makeConstraints { make in bottomView.snp.makeConstraints { make in
make.left.right.bottom.equalToSuperview() make.left.right.bottom.equalToSuperview()
make.height.equalTo(96)
} }
// bottomView.backgroundColor = .red //for test hjl
let checkBtn = UIButton(type: .custom) let checkBtn = UIButton(type: .custom)
checkBtn.addTarget(self, action: #selector(onClickReadyBtn), for: .touchUpInside) checkBtn.addTarget(self, action: #selector(onClickReadyBtn), for: .touchUpInside)
checkBtn.setTitle("准备完毕", for: .normal) checkBtn.setTitle("准备完毕", for: .normal)
...@@ -112,7 +115,7 @@ class YHInformationFillTipsAlertView: UIView { ...@@ -112,7 +115,7 @@ class YHInformationFillTipsAlertView: UIView {
bottomView.addSubview(checkBtn) bottomView.addSubview(checkBtn)
checkBtn.snp.makeConstraints { make in checkBtn.snp.makeConstraints { make in
make.bottom.equalToSuperview().offset(-24) make.top.equalToSuperview().offset(8)
make.left.equalTo(kMargin) make.left.equalTo(kMargin)
make.right.equalTo(-kMargin) make.right.equalTo(-kMargin)
make.height.equalTo(48) make.height.equalTo(48)
...@@ -121,38 +124,6 @@ class YHInformationFillTipsAlertView: UIView { ...@@ -121,38 +124,6 @@ class YHInformationFillTipsAlertView: UIView {
checkBtn.addYinHeGradualLayer() checkBtn.addYinHeGradualLayer()
let lable00 = UILabel(text: "我确认我所提供的材料真实有效,并知悉其中内容。")
lable00.font = UIFont.PFSC_R(ofSize: 12)
lable00.textColor = UIColor.labelTextColor2
let tap = UITapGestureRecognizer(target: self, action: #selector(onClickAgree))
lable00.isUserInteractionEnabled = true
lable00.addGestureRecognizer(tap)
bottomView.addSubview(lable00)
lable00.snp.makeConstraints { make in
make.bottom.equalTo(checkBtn.snp.top).offset(-26)
make.left.equalTo(41)
make.right.equalTo(-16)
make.height.equalTo(20)
make.top.equalTo(16)
}
let selectedBtn = UIButton(type: .custom)
selectedBtn.setImage(UIImage(named: "selected_icon_0"), for: .normal)
selectedBtn.setImage(UIImage(named: "selected_icon_1"), for: .selected)
selectedBtn.addTarget(self, action: #selector(onClickAgree), for: .touchUpInside)
bottomView.addSubview(selectedBtn)
selectedBtn.snp.makeConstraints { make in
make.centerY.equalTo(lable00)
make.left.equalTo(21)
make.height.width.equalTo(12)
}
agreeButton = selectedBtn
agreeButton.YH_clickEdgeInsets = UIEdgeInsets(top: 20, left: 20, bottom: 20, right: 20)
let topView = UIView() let topView = UIView()
topView.backgroundColor = .white topView.backgroundColor = .white
topView.layer.zPosition = 1 topView.layer.zPosition = 1
...@@ -185,7 +156,7 @@ class YHInformationFillTipsAlertView: UIView { ...@@ -185,7 +156,7 @@ class YHInformationFillTipsAlertView: UIView {
make.width.height.equalTo(24) make.width.height.equalTo(24)
} }
closeBtn.YH_clickEdgeInsets = UIEdgeInsets(top: 10, left: 10, bottom: 10, right: 10) closeBtn.YH_clickEdgeInsets = UIEdgeInsets(top: 20, left: 20, bottom: 20, right: 20)
let line = UIView() let line = UIView()
line.backgroundColor = UIColor.separatorColor line.backgroundColor = UIColor.separatorColor
...@@ -214,6 +185,37 @@ class YHInformationFillTipsAlertView: UIView { ...@@ -214,6 +185,37 @@ class YHInformationFillTipsAlertView: UIView {
} }
homeTableView.delegate = self homeTableView.delegate = self
homeTableView.dataSource = self homeTableView.dataSource = self
let footer = UIView(frame: CGRect(x: 0, y: 0, width: KScreenWidth, height: 34))
homeTableView.tableFooterView = footer
let lable00 = UILabel(text: "我确认我所提供的材料真实有效,并知悉其中内容。")
lable00.font = UIFont.PFSC_R(ofSize: 12)
lable00.textColor = UIColor.labelTextColor2
let tap = UITapGestureRecognizer(target: self, action: #selector(onClickAgree))
lable00.isUserInteractionEnabled = true
lable00.addGestureRecognizer(tap)
footer.addSubview(lable00)
lable00.snp.makeConstraints { make in
make.left.equalTo(41)
make.right.equalTo(-16)
make.height.equalTo(20)
make.top.equalTo(8)
}
let selectedBtn = UIButton(type: .custom)
selectedBtn.setImage(UIImage(named: "selected_icon_0"), for: .normal)
selectedBtn.setImage(UIImage(named: "selected_icon_1"), for: .selected)
selectedBtn.addTarget(self, action: #selector(onClickAgree), for: .touchUpInside)
footer.addSubview(selectedBtn)
selectedBtn.snp.makeConstraints { make in
make.centerY.equalTo(lable00)
make.left.equalTo(21)
make.height.width.equalTo(12)
}
agreeButton = selectedBtn
agreeButton.YH_clickEdgeInsets = UIEdgeInsets(top: 20, left: 20, bottom: 20, right: 20)
} }
@objc func onClickReadyBtn() { @objc func onClickReadyBtn() {
......
...@@ -13,6 +13,7 @@ enum YHWholeScreenTipsViewType : Int { ...@@ -13,6 +13,7 @@ enum YHWholeScreenTipsViewType : Int {
case residenceInfo //居住信息 case residenceInfo //居住信息
case degreeType //学位类型 case degreeType //学位类型
case company //用人单位介绍 case company //用人单位介绍
case officialWebsite //用人单位官网
} }
...@@ -63,6 +64,8 @@ class YHWholeScreenTipsView: UIView { ...@@ -63,6 +64,8 @@ class YHWholeScreenTipsView: UIView {
return "该内容在学位证上,通常是授予后面,如授予“理学”学士学位,则填理学" return "该内容在学位证上,通常是授予后面,如授予“理学”学士学位,则填理学"
case .company: case .company:
return "可先填写用人单位名称,选择指定的用人单位后,系统将为您自动填写单位介绍" return "可先填写用人单位名称,选择指定的用人单位后,系统将为您自动填写单位介绍"
case .officialWebsite:
return "可先填写用人单位名称,选择指定的用人单位后,系统将为您自动填写单位官网"
default: default:
return "--" 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