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

Merge commit 'e9280106' into xiezhaolin

parents addd150e e9280106
......@@ -132,7 +132,7 @@ class YHBasicInfoFillView: UIView, UITextViewDelegate {
private var myTextView : UITextView!
private var arrCheckBtns : [UIButton] = []
private let kTipsString : String = "如选择“是”,请详细说明"
private let kTipsString : String = "如选择“是”,请详细说明时间、地点"
private lazy var noChoiceTipsLable: UILabel = {
let label = UILabel()
......
......@@ -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 {
//子女 - xxx
if let arrChild = dataModelForBasicInfo.child {
......@@ -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 {
//家庭背景
......
......@@ -89,7 +89,7 @@ extension YHCertificateUploadVC: UITableViewDelegate, UITableViewDataSource {
}
func tableView(_ tableView: UITableView, heightForRowAt indexPath: IndexPath) -> CGFloat {
return 217.0
return UITableView.automaticDimension
}
}
......@@ -67,17 +67,33 @@ class YHSheetPickerView: UIView {
view.addSubview(titleLabel)
view.addSubview(cancelBtn)
view.addSubview(confirmBtn)
view.addSubview(topLineView)
titleLabel.snp.makeConstraints { make in
make.edges.equalToSuperview()
}
cancelBtn.snp.makeConstraints { make in
make.left.top.bottom.equalToSuperview()
make.width.equalTo(60)
make.left.equalToSuperview().offset(21)
make.centerY.equalToSuperview()
make.size.equalTo(CGSizeMake(30, 20))
}
confirmBtn.snp.makeConstraints { make in
make.right.top.bottom.equalToSuperview()
make.width.equalTo(60)
make.right.equalToSuperview().offset(-21)
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
}()
......@@ -85,7 +101,7 @@ class YHSheetPickerView: UIView {
let label = UILabel()
label.textColor = UIColor.mainTextColor
label.textAlignment = .center
label.font = UIFont.PFSC_R(ofSize: 16)
label.font = UIFont.PFSC_M(ofSize: 17)
label.text = "请选择"
return label
}()
......@@ -93,18 +109,20 @@ class YHSheetPickerView: UIView {
lazy var cancelBtn: UIButton = {
let btn = UIButton()
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.addTarget(self, action: #selector(didClickCancelButton), for: .touchUpInside)
btn.YH_clickEdgeInsets = UIEdgeInsets(top: 20, left: 20, bottom: 20, right: 20)
return btn
}()
lazy var confirmBtn: UIButton = {
let btn = UIButton()
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.addTarget(self, action: #selector(didClickConfirmButton), for: .touchUpInside)
btn.YH_clickEdgeInsets = UIEdgeInsets(top: 20, left: 20, bottom: 20, right: 20)
return btn
}()
......@@ -129,6 +147,7 @@ class YHSheetPickerView: UIView {
pickerView.selectRow(selectRow, inComponent: 0, animated: true)
} else {
selectRow = 0
pickerView.selectRow(0, inComponent: 0, animated: true)
}
}
......@@ -296,11 +315,11 @@ class YHSheetPickerView: UIView {
whiteContentView.addSubview(pickerView)
let corner = UIRectCorner(rawValue: UIRectCorner.topLeft.rawValue | UIRectCorner.topRight.rawValue)
let path = UIBezierPath(roundedRect:bounds,byRoundingCorners: corner,cornerRadii:CGSizeMake(16.0, 16.0));
let layer = CAShapeLayer();
layer.frame = whiteContentView.bounds;
layer.path = path.cgPath;
whiteContentView.layer.mask = layer;
let path = UIBezierPath(roundedRect:bounds,byRoundingCorners: corner,cornerRadii:CGSizeMake(8.0, 8.0))
let layer = CAShapeLayer()
layer.frame = whiteContentView.bounds
layer.path = path.cgPath
whiteContentView.layer.mask = layer
if let title = title {
titleLabel.text = title
......@@ -312,9 +331,21 @@ class YHSheetPickerView: UIView {
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
make.left.right.bottom.equalToSuperview()
make.top.equalToSuperview().offset(KScreenHeight*2/3.0)
make.height.equalTo(whiteContentHeight)
}
topView.snp.makeConstraints { make in
......@@ -477,6 +508,8 @@ extension YHSheetPickerView: UIPickerViewDelegate, UIPickerViewDataSource {
let item :YHSheetPickerViewItem = arr[row]
print(item.title)
selectRow = row
//刷新picker,看上面的代理
pickerView.reloadComponent(component)
}
}
}
......@@ -486,16 +519,19 @@ extension YHSheetPickerView: UIPickerViewDelegate, UIPickerViewDataSource {
}
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 {
let label = UILabel()
label.textColor = UIColor.mainTextColor
label.font = UIFont.PFSC_R(ofSize: 14)
label.textAlignment = .center
label.numberOfLines = 2
label.font = UIFont.PFSC_R(ofSize: 14)
label.text = ""
if let arr = Self.dataSource[type] {
if 0 <= row && row < arr.count {
......@@ -503,6 +539,13 @@ extension YHSheetPickerView: UIPickerViewDelegate, UIPickerViewDataSource {
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 {
pickerView.subviews[1].backgroundColor = UIColor(hex: 0x4487F9, alpha: 0.06)
......
......@@ -117,10 +117,10 @@ class YHIdentityCardCell: UITableViewCell {
contentView.addSubview(centerView)
centerView.snp.makeConstraints { make in
make.left.equalTo(16)
make.right.equalTo(-16)
make.top.equalTo(7)
make.bottom.equalTo(-16)
make.left.equalToSuperview().offset(16)
make.right.equalToSuperview().offset(-16)
make.top.equalToSuperview().offset(14)
make.bottom.equalToSuperview()
}
titleLabel = {
......@@ -163,7 +163,7 @@ class YHIdentityCardCell: UITableViewCell {
centerView.addSubview(lineView)
lineView.snp.makeConstraints { make in
make.left.equalTo(18)
make.top.equalTo(52)
make.top.equalTo(titleLabel.snp.bottom).offset(12)
make.height.equalTo(1)
make.right.equalTo(-18)
}
......@@ -179,7 +179,7 @@ class YHIdentityCardCell: UITableViewCell {
frontLabel.snp.makeConstraints { make in
make.left.equalTo(18)
make.right.equalTo(centerView.snp.centerX)
make.top.equalTo(64)
make.top.equalTo(lineView.snp.bottom).offset(12)
make.height.equalTo(20)
}
......@@ -194,7 +194,7 @@ class YHIdentityCardCell: UITableViewCell {
backSurfaceLabel.snp.makeConstraints { make in
make.right.equalTo(-18)
make.left.equalTo(centerView.snp.centerX)
make.top.equalTo(64)
make.top.equalTo(lineView.snp.bottom).offset(12)
make.height.equalTo(20)
}
......@@ -210,9 +210,10 @@ class YHIdentityCardCell: UITableViewCell {
centerView.addSubview(frontImageButton)
frontImageButton.snp.makeConstraints { make in
make.left.equalTo(18)
make.top.equalTo(96)
make.top.equalTo(frontLabel.snp.bottom).offset(12)
make.height.equalTo(91)
make.width.equalTo(147)
make.bottom.equalToSuperview().offset(-16)
}
frontDeleteButton = {
......@@ -242,7 +243,7 @@ class YHIdentityCardCell: UITableViewCell {
centerView.addSubview(backSurfaceImageButton)
backSurfaceImageButton.snp.makeConstraints { make in
make.right.equalTo(-18)
make.top.equalTo(96)
make.top.equalTo(frontLabel.snp.bottom).offset(12)
make.height.equalTo(91)
make.width.equalTo(147)
}
......
......@@ -122,10 +122,13 @@ class YHWorkExperienceTextItemView: UIView {
}
@objc func showPrompts() {
if dataSource?.id == .id18 {
return
if dataSource?.id == .id3 {
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 {
centerView.addSubview(bottomView)
bottomView.snp.makeConstraints { make in
make.left.right.bottom.equalToSuperview()
make.height.equalTo(96)
}
// bottomView.backgroundColor = .red //for test hjl
let checkBtn = UIButton(type: .custom)
checkBtn.addTarget(self, action: #selector(onClickReadyBtn), for: .touchUpInside)
checkBtn.setTitle("准备完毕", for: .normal)
......@@ -112,7 +115,7 @@ class YHInformationFillTipsAlertView: UIView {
bottomView.addSubview(checkBtn)
checkBtn.snp.makeConstraints { make in
make.bottom.equalToSuperview().offset(-24)
make.top.equalToSuperview().offset(8)
make.left.equalTo(kMargin)
make.right.equalTo(-kMargin)
make.height.equalTo(48)
......@@ -121,38 +124,6 @@ class YHInformationFillTipsAlertView: UIView {
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()
topView.backgroundColor = .white
topView.layer.zPosition = 1
......@@ -185,7 +156,7 @@ class YHInformationFillTipsAlertView: UIView {
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()
line.backgroundColor = UIColor.separatorColor
......@@ -214,6 +185,37 @@ class YHInformationFillTipsAlertView: UIView {
}
homeTableView.delegate = 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() {
......
......@@ -13,6 +13,7 @@ enum YHWholeScreenTipsViewType : Int {
case residenceInfo //居住信息
case degreeType //学位类型
case company //用人单位介绍
case officialWebsite //用人单位官网
}
......@@ -63,6 +64,8 @@ class YHWholeScreenTipsView: UIView {
return "该内容在学位证上,通常是授予后面,如授予“理学”学士学位,则填理学"
case .company:
return "可先填写用人单位名称,选择指定的用人单位后,系统将为您自动填写单位介绍"
case .officialWebsite:
return "可先填写用人单位名称,选择指定的用人单位后,系统将为您自动填写单位官网"
default:
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