Commit c644a4a9 authored by Steven杜宇's avatar Steven杜宇

Merge branch 'develop' of http://gitlab.galaxy-immi.com/mobile-group/galaxy-iOS into develop

parents 41d9a880 4d6be51a
This diff is collapsed.
......@@ -10,7 +10,7 @@ import UIKit
class YHBaseDynamicCornerRadiusView: UIView {
private var radius: CGFloat = 8
public var radius: CGFloat = 8
public var corner: UIRectCorner? {
didSet {
if corner != oldValue {
......
......@@ -202,7 +202,8 @@ class YHServiceOrderListView: YHBaseViewController {
} else if type == 35 {
//查看续签结果
let vc = YHLookResignResultViewController()
UIViewController.current?.navigationController?.pushViewController(vc)
} else if type == 36 {
//续签补件
let vc = YHResignUploadDocListViewController()
......
//
// YHVisaRenewalItemDetailType.swift
// galaxy
//
// Created by alexzzw on 2024/10/11.
// Copyright © 2024 https://www.galaxy-immi.com. All rights reserved.
//
import Foundation
import AttributedString
enum YHVisaRenewalItemDetailType {
case sectionHeader(_ title: String, _ actionTitle: String? = nil, _ action: (() -> Void)? = nil)
case tips(_ detail: ASAttributedString)
case residenceAction(_ title: String, _ status: YHVisaRenewalPresenceStatus, _ cellType: YHResignRoundCellType = .mid, _ action: (() -> Void)? = nil)
case payMethodUrl(_ title: String, _ tips: String, _ url: String, _ action: (() -> Void)? = nil)
case payMethodQrcode(_ title: String, _ tips: String, _ image: UIImage?)
case subHeader(_ title: String, _ status: YHVisaRenewalPaymentStatus)
case subInfo(_ title: String, _ detail: String, _ actionTitle: String? = nil, _ cellType: YHResignRoundCellType = .mid, _ defaultMargin: CGFloat? = nil, _ showBottomLine: Bool = false, _ action: (() -> Void)? = nil)
case subContent(_ title: String, _ detail: String, _ actionTitle: String? = nil, _ cellType: YHResignRoundCellType = .mid, _ action: (() -> Void)? = nil)
case subRemark(_ remark: String)
case occupyingSpace
}
//
// YHVisaRenewalPaymentStatus.swift
// galaxy
//
// Created by alexzzw on 2024/10/11.
// Copyright © 2024 https://www.galaxy-immi.com. All rights reserved.
//
import Foundation
enum YHVisaRenewalPaymentStatus {
// 待缴费 待获批 已缴费 已过期
case pendingPayment
case pendingApproval
case paid
case expired
var title: String {
switch self {
case .pendingPayment:
return "待缴费"
case .pendingApproval:
return "待获批"
case .paid:
return "已缴费"
case .expired:
return "已过期"
}
}
var titleColor: UIColor? {
switch self {
case .pendingPayment:
return .brandMainColor
case .pendingApproval:
return .yhOrangeColor
case .paid:
return .mainTextColor50
case .expired:
return .failColor
}
}
}
//
// YHVisaRenewalPresenceStatus.swift
// galaxy
//
// Created by alexzzw on 2024/10/11.
// Copyright © 2024 https://www.galaxy-immi.com. All rights reserved.
//
import Foundation
enum YHVisaRenewalPresenceStatus {
// 暂未获批 确认在港 已确认在港
case approvalPending
case confirmingPresence
case confirmedPresence
var title: String {
switch self {
case .approvalPending:
return "暂未获批"
case .confirmingPresence:
return "确认在港"
case .confirmedPresence:
return "已确认在港"
}
}
var titleColor: UIColor? {
switch self {
case .approvalPending:
return .mainTextColor30
case .confirmingPresence:
return UIColor(hexString: "#FFFFFF")
case .confirmedPresence:
return .yhGreenColor
}
}
var bgColor: UIColor? {
switch self {
case .approvalPending:
return UIColor(hexString: "#F4F6FA")
case .confirmingPresence:
return .brandMainColor
case .confirmedPresence:
return .clear
}
}
}
......@@ -125,25 +125,28 @@ extension YHHKVisaRenewalPaymentStepView {
make.top.equalTo(secondStepLabel.snp.bottom).offset(6)
make.centerX.equalTo(secondStepLabel.snp.centerX)
make.bottom.equalToSuperview().offset(-16)
make.left.greaterThanOrEqualTo(firstStepNameLabel.snp.right).offset(6)
}
thirdStepNameLabel.snp.makeConstraints { make in
make.top.equalTo(thirdStepLabel.snp.bottom).offset(6)
make.centerX.equalTo(thirdStepLabel.snp.centerX)
make.bottom.equalToSuperview().offset(-16)
make.left.greaterThanOrEqualTo(secondStepNameLabel.snp.right).offset(6)
}
fourthStepNameLabel.snp.makeConstraints { make in
make.top.equalTo(fourthStepLabel.snp.bottom).offset(6)
make.centerX.equalTo(fourthStepLabel.snp.centerX)
make.bottom.equalToSuperview().offset(-16)
make.left.greaterThanOrEqualTo(thirdStepNameLabel.snp.right).offset(6)
}
}
private func getStepLabel(_ title: String) -> UILabel {
let label = UILabel()
label.font = UIFont(name: "DIN Alternate Bold", size: 12)
label.font = UIFont(name: "DINAlternate-Bold", size: 12)
label.textColor = .brandMainColor
label.layer.cornerRadius = stepLabelHeight / 2.0
label.clipsToBounds = true
......
......@@ -61,6 +61,7 @@ class YHVisaRenewalGuideHeaderCell: UITableViewCell {
label.textColor = .mainTextColor70
label.text = "获批后,3个月内完成缴费,否则身份会失效"
label.numberOfLines = 0
label.lineBreakMode = .byCharWrapping
return label
}()
......@@ -70,6 +71,7 @@ class YHVisaRenewalGuideHeaderCell: UITableViewCell {
label.textColor = .mainTextColor70
label.text = "缴费领取电子签证时,涉及到的申请人应身在香港"
label.numberOfLines = 0
label.lineBreakMode = .byCharWrapping
return label
}()
......@@ -91,6 +93,7 @@ class YHVisaRenewalGuideHeaderCell: UITableViewCell {
label.textColor = UIColor(hex: 0xFF8000)
label.text = "在港缴费领取电子签证时使用的入境证件,请务必和递交续签资料时入境香港使用的旅行证件保持一致"
label.numberOfLines = 0
label.lineBreakMode = .byCharWrapping
return label
}()
......@@ -99,6 +102,7 @@ class YHVisaRenewalGuideHeaderCell: UITableViewCell {
label.font = .PFSC_B(ofSize: 16)
label.textColor = .mainTextColor
label.numberOfLines = 0
label.lineBreakMode = .byCharWrapping
label.text = "一、递交续签申请后,未离境一直在港"
return label
}()
......@@ -108,6 +112,7 @@ class YHVisaRenewalGuideHeaderCell: UITableViewCell {
label.font = .PFSC_R(ofSize: 14)
label.textColor = .mainTextColor70
label.numberOfLines = 0
label.lineBreakMode = .byCharWrapping
let paragraphStyle = NSMutableParagraphStyle()
paragraphStyle.lineHeightMultiple = 1.07
let attributedText = NSAttributedString(
......
......@@ -33,6 +33,7 @@ class YHVisaRenewalGuideIndentCell: UITableViewCell {
label.font = .PFSC_R(ofSize: 13)
label.textColor = .mainTextColor70
label.numberOfLines = 0
label.lineBreakMode = .byCharWrapping
return label
}()
......
......@@ -16,6 +16,7 @@ class YHVisaRenewalGuideParagraphCell: UITableViewCell {
label.font = .PFSC_B(ofSize: 16)
label.textColor = .mainTextColor
label.numberOfLines = 0
label.lineBreakMode = .byCharWrapping
return label
}()
......@@ -24,6 +25,7 @@ class YHVisaRenewalGuideParagraphCell: UITableViewCell {
label.font = .PFSC_R(ofSize: 14)
label.textColor = .mainTextColor70
label.numberOfLines = 0
label.lineBreakMode = .byCharWrapping
return label
}()
......
......@@ -16,6 +16,7 @@ class YHVisaRenewalGuideRemarkCell: UITableViewCell {
label.font = .PFSC_R(ofSize: 14)
label.textColor = .mainTextColor70
label.numberOfLines = 0
label.lineBreakMode = .byCharWrapping
return label
}()
......
......@@ -30,6 +30,7 @@ class YHVisaRenewalGuideTipsCell: UITableViewCell {
label.font = .PFSC_R(ofSize: 13)
label.textColor = .mainTextColor70
label.numberOfLines = 0
label.lineBreakMode = .byCharWrapping
return label
}()
......
//
// YHVisaRenewalPayConfirmingPresenceAlertView.swift
// galaxy
//
// Created by alexzzw on 2024/10/11.
// Copyright © 2024 https://www.galaxy-immi.com. All rights reserved.
//
import UIKit
import AttributedString
class YHVisaRenewalPayConfirmingPresenceAlertView: UIView {
var confirmBlock:(()->())?
var cancelBlock:(()->())?
lazy var blackMaskView: UIView = {
let view = UIView()
view.backgroundColor = UIColor.init(hex: 0x000000, alpha: 0.68)
return view
}()
lazy var whiteContentView: UIView = {
let view = UIView()
view.backgroundColor = .white
view.layer.cornerRadius = kCornerRadius6
return view
}()
lazy var iconImgView: UIImageView = {
let view = UIImageView(image: UIImage(named: "cs_family_risk"))
return view
}()
lazy var titleLabel: UILabel = {
let label = UILabel()
label.textAlignment = .center
label.font = UIFont.PFSC_M(ofSize: 17)
label.textColor = UIColor.mainTextColor
label.text = "风险提示"
return label
}()
lazy var firstDetailLabel: UILabel = {
var label = UILabel()
label.numberOfLines = 0
let a: ASAttributedString = .init("请申请人", .font(UIFont.PFSC_R(ofSize: 14)),.foreground(UIColor.mainTextColor(alpha: 0.7)))
let b: ASAttributedString = .init("务必已进入到香港境内后,再进行确认", .font(UIFont.PFSC_B(ofSize: 14)),.foreground(UIColor.brandMainColor))
let c: ASAttributedString = .init(",避免签证被锁", .font(UIFont.PFSC_R(ofSize: 14)),.foreground(UIColor.mainTextColor(alpha: 0.7)))
label.attributed.text = a+b+c
return label
}()
lazy var secondDetailLabel: UILabel = {
var label = UILabel()
label.numberOfLines = 0
let a: ASAttributedString = .init("建议入境香港后,", .font(UIFont.PFSC_R(ofSize: 14)),.foreground(UIColor.mainTextColor(alpha: 0.7)))
let b: ASAttributedString = .init("远离海关,并延迟20分钟后再进行确认", .font(UIFont.PFSC_B(ofSize: 14)),.foreground(UIColor.brandMainColor))
let c: ASAttributedString = .init(",避免香港海关系统还未识别到已入境!", .font(UIFont.PFSC_R(ofSize: 14)),.foreground(UIColor.mainTextColor(alpha: 0.7)))
label.attributed.text = a+b+c
return label
}()
lazy var confirmBtn: UIButton = {
let button = UIButton()
button.titleLabel?.font = UIFont.PFSC_R(ofSize: 14)
button.setTitle("确认在港", for: .normal)
button.setTitleColor(UIColor.white, for: .normal)
button.backgroundColor = .brandMainColor
button.addTarget(self, action: #selector(didConfirmBtnClicked), for: .touchUpInside)
button.layer.cornerRadius = kCornerRadius3
return button
}()
lazy var cancelBtn: UIButton = {
let button = UIButton()
button.titleLabel?.font = UIFont.PFSC_R(ofSize: 14)
button.setTitle("还未", for: .normal)
button.setTitleColor(UIColor.brandMainColor, for: .normal)
button.layer.borderWidth = 1
button.layer.borderColor = UIColor.brandMainColor.cgColor
button.addTarget(self, action: #selector(didCancelBtnClicked), for: .touchUpInside)
button.layer.cornerRadius = kCornerRadius3
return button
}()
static func alertView() -> YHVisaRenewalPayConfirmingPresenceAlertView {
let view = YHVisaRenewalPayConfirmingPresenceAlertView(frame: UIScreen.main.bounds)
return view
}
@objc func show() {
UIApplication.shared.yhKeyWindow()?.addSubview(self)
}
@objc func dismiss() {
self.removeFromSuperview()
}
@objc func didConfirmBtnClicked() {
confirmBlock?()
self.dismiss()
}
@objc func didCancelBtnClicked() {
cancelBlock?()
self.dismiss()
}
required init?(coder: NSCoder) {
fatalError("init(coder:) has not been implemented")
}
override init(frame: CGRect) {
super.init(frame: frame)
createUI()
}
func createUI() {
self.addSubview(blackMaskView)
self.addSubview(whiteContentView)
whiteContentView.addSubview(iconImgView)
whiteContentView.addSubview(titleLabel)
whiteContentView.addSubview(firstDetailLabel)
whiteContentView.addSubview(secondDetailLabel)
whiteContentView.addSubview(confirmBtn)
whiteContentView.addSubview(cancelBtn)
blackMaskView.snp.makeConstraints { make in
make.edges.equalToSuperview()
}
whiteContentView.snp.makeConstraints { make in
make.left.equalTo(38)
make.right.equalTo(-38)
make.centerY.equalToSuperview()
}
iconImgView.snp.makeConstraints { make in
make.width.height.equalTo(53)
make.top.equalTo(30)
make.centerX.equalToSuperview()
}
titleLabel.snp.makeConstraints { make in
make.top.equalTo(iconImgView.snp.bottom).offset(16)
make.height.equalTo(24)
make.left.equalTo(21)
make.right.equalTo(-21)
}
firstDetailLabel.snp.makeConstraints { make in
make.left.equalTo(21)
make.right.equalTo(-21)
make.top.equalTo(titleLabel.snp.bottom).offset(8)
}
secondDetailLabel.snp.makeConstraints { make in
make.left.equalTo(21)
make.right.equalTo(-21)
make.top.equalTo(firstDetailLabel.snp.bottom).offset(8)
}
cancelBtn.snp.makeConstraints { make in
make.left.equalTo(21)
make.bottom.equalTo(-16)
make.height.equalTo(45)
make.top.equalTo(secondDetailLabel.snp.bottom).offset(21)
}
confirmBtn.snp.makeConstraints { make in
make.top.bottom.equalTo(cancelBtn)
make.left.equalTo(cancelBtn.snp.right).offset(10)
make.right.equalTo(-21)
make.height.equalTo(45)
make.width.equalTo(cancelBtn)
}
}
}
//
// YHVisaRenewalPayContentCell.swift
// galaxy
//
// Created by alexzzw on 2024/10/11.
// Copyright © 2024 https://www.galaxy-immi.com. All rights reserved.
//
import UIKit
class YHVisaRenewalPayContentCell: YHVisaRenewalPayInfoBaseCell {
static let cellReuseIdentifier = "YHVisaRenewalPayContentCell"
var rightButtonEvent: (() -> Void)?
private lazy var infoTitleLabel: UILabel = {
let label = UILabel()
label.font = .PFSC_R(ofSize: 13)
label.textColor = .mainTextColor70
return label
}()
private lazy var infoDetailLabel: UILabel = {
let label = UILabel()
label.font = .PFSC_M(ofSize: 13)
label.textColor = UIColor(hexString: "#222222")
label.numberOfLines = 0
label.lineBreakMode = .byCharWrapping
return label
}()
private lazy var rightButton: UIButton = {
let button = UIButton(type: .custom)
button.setTitleColor(.mainTextColor, for: .normal)
button.titleLabel?.font = .PFSC_M(ofSize: 10)
button.backgroundColor = .separatorColor
button.layer.cornerRadius = 8
button.clipsToBounds = true
button.addTarget(self, action: #selector(rightButtonClicked), for: .touchUpInside)
return button
}()
private lazy var bottomLineView: UIView = {
let view = UIView()
view.backgroundColor = .separatorColor
return view
}()
override init(style: UITableViewCell.CellStyle, reuseIdentifier: String?) {
super.init(style: style, reuseIdentifier: reuseIdentifier)
setupUI()
}
required init?(coder: NSCoder) {
fatalError("init(coder:) has not been implemented")
}
func setupCellInfo(title: String, detail: String, rightButtonTitle: String? = nil, cellType: YHResignRoundCellType = .mid) {
infoTitleLabel.text = title
infoDetailLabel.text = detail
updateInnerCellCorner(cellType)
let bottomMargin = cellType == .bottom ? 16 : 12
bottomLineView.isHidden = cellType == .bottom
infoDetailLabel.snp.remakeConstraints { make in
make.top.equalTo(infoTitleLabel.snp.bottom).offset(12)
make.right.lessThanOrEqualToSuperview().offset(-16)
make.left.equalTo(infoTitleLabel)
make.bottom.equalToSuperview().offset(-bottomMargin)
}
if let rightButtonTitle = rightButtonTitle, rightButtonTitle.count > 0 {
rightButton.setTitle(rightButtonTitle, for: .normal)
rightButton.isHidden = false
} else {
rightButton.setTitle(nil, for: .normal)
rightButton.isHidden = true
}
}
}
extension YHVisaRenewalPayContentCell {
@objc private func rightButtonClicked() {
rightButtonEvent?()
}
private func setupUI() {
updateInnerCellCorner(.mid)
innerContainerView.addSubview(rightButton)
innerContainerView.addSubview(infoTitleLabel)
innerContainerView.addSubview(infoDetailLabel)
innerContainerView.addSubview(bottomLineView)
rightButton.setContentCompressionResistancePriority(.required, for: .horizontal)
infoTitleLabel.setContentCompressionResistancePriority(.defaultLow, for: .horizontal)
bottomLineView.snp.makeConstraints { make in
make.left.equalToSuperview().offset(16)
make.right.equalToSuperview().offset(-16)
make.bottom.equalToSuperview()
make.height.equalTo(0.5)
}
infoTitleLabel.snp.makeConstraints { make in
make.left.equalToSuperview().offset(16)
make.top.equalToSuperview().offset(12)
}
rightButton.snp.makeConstraints { make in
make.right.equalToSuperview().offset(-16)
make.width.equalTo(36)
make.height.equalTo(18)
make.centerY.equalTo(infoTitleLabel)
make.left.greaterThanOrEqualTo(infoTitleLabel.snp.right).offset(12)
}
infoDetailLabel.snp.makeConstraints { make in
make.top.equalTo(infoTitleLabel.snp.bottom).offset(12)
make.right.lessThanOrEqualToSuperview().offset(-16)
make.left.equalTo(infoTitleLabel)
make.bottom.equalToSuperview().offset(-12)
}
}
}
//
// YHVisaRenewalPayInfoBaseCell.swift
// galaxy
//
// Created by alexzzw on 2024/10/11.
// Copyright © 2024 https://www.galaxy-immi.com. All rights reserved.
//
import UIKit
class YHVisaRenewalPayInfoBaseCell: YHResignDocumentCell {
lazy var innerContainerView: YHBaseDynamicCornerRadiusView = {
let view = YHBaseDynamicCornerRadiusView(cornerRadius: 6, corner: .none)
view.backgroundColor = .contentBkgColor
return view
}()
override init(style: UITableViewCell.CellStyle, reuseIdentifier: String?) {
super.init(style: style, reuseIdentifier: reuseIdentifier)
setupUI()
}
required init?(coder: NSCoder) {
fatalError("init(coder:) has not been implemented")
}
func updateInnerCellCorner(_ cellType: YHResignRoundCellType) {
switch cellType {
case .top:
innerContainerView.corner = [.topLeft, .topRight]
case .mid:
innerContainerView.corner = .none
case .bottom:
innerContainerView.corner = [.bottomLeft, .bottomRight]
case .single:
innerContainerView.corner = .allCorners
}
}
}
extension YHVisaRenewalPayInfoBaseCell {
private func setupUI() {
subContainerView.radius = 6
updateCellCorner(.mid)
subContainerView.addSubview(innerContainerView)
innerContainerView.snp.makeConstraints { make in
make.top.bottom.equalToSuperview()
make.left.equalToSuperview().offset(18)
make.right.equalToSuperview().offset(-18)
}
}
}
//
// YHVisaRenewalPayInfoCell.swift
// galaxy
//
// Created by alexzzw on 2024/10/10.
// Copyright © 2024 https://www.galaxy-immi.com. All rights reserved.
//
import UIKit
class YHVisaRenewalPayInfoCell: YHVisaRenewalPayInfoBaseCell {
static let cellReuseIdentifier = "YHVisaRenewalPayInfoCell"
var rightButtonEvent: (() -> Void)?
private lazy var infoTitleLabel: UILabel = {
let label = UILabel()
label.font = .PFSC_R(ofSize: 13)
label.textColor = .mainTextColor70
return label
}()
private lazy var infoDetailLabel: UILabel = {
let label = UILabel()
label.font = .PFSC_M(ofSize: 13)
label.textColor = .mainTextColor
return label
}()
private lazy var rightButton: UIButton = {
let button = UIButton(type: .custom)
button.setTitleColor(.mainTextColor, for: .normal)
button.titleLabel?.font = .PFSC_M(ofSize: 10)
button.backgroundColor = .separatorColor
button.layer.cornerRadius = 8
button.clipsToBounds = true
button.addTarget(self, action: #selector(rightButtonClicked), for: .touchUpInside)
return button
}()
private lazy var bottomLineView: UIView = {
let view = UIView()
view.backgroundColor = .separatorColor
view.isHidden = true
return view
}()
override init(style: UITableViewCell.CellStyle, reuseIdentifier: String?) {
super.init(style: style, reuseIdentifier: reuseIdentifier)
setupUI()
}
required init?(coder: NSCoder) {
fatalError("init(coder:) has not been implemented")
}
func setupCellInfo(title: String, detail: String, rightButtonTitle: String? = nil, cellType: YHResignRoundCellType = .mid, defaultMargin: CGFloat? = nil, showBottomLine: Bool = false) {
infoTitleLabel.text = title
infoDetailLabel.text = detail
updateInnerCellCorner(cellType)
bottomLineView.isHidden = !showBottomLine
var bottomMargin: CGFloat = cellType == .bottom ? 16 : 0
if let defaultMargin = defaultMargin {
bottomMargin = defaultMargin
}
if let rightButtonTitle = rightButtonTitle, rightButtonTitle.count > 0 {
rightButton.setTitle(rightButtonTitle, for: .normal)
rightButton.isHidden = false
infoDetailLabel.snp.remakeConstraints { make in
make.right.equalTo(rightButton.snp.left).offset(-6)
make.left.greaterThanOrEqualTo(infoTitleLabel.snp.right).offset(12)
make.centerY.equalTo(infoTitleLabel)
make.bottom.equalToSuperview().offset(-bottomMargin)
}
} else {
rightButton.setTitle(nil, for: .normal)
rightButton.isHidden = true
infoDetailLabel.snp.remakeConstraints { make in
make.right.equalToSuperview().offset(-16)
make.left.greaterThanOrEqualTo(infoTitleLabel.snp.right).offset(12)
make.centerY.equalTo(infoTitleLabel)
make.bottom.equalToSuperview().offset(-bottomMargin)
}
}
}
}
extension YHVisaRenewalPayInfoCell {
@objc private func rightButtonClicked() {
rightButtonEvent?()
}
private func setupUI() {
updateInnerCellCorner(.mid)
innerContainerView.addSubview(rightButton)
innerContainerView.addSubview(infoTitleLabel)
innerContainerView.addSubview(infoDetailLabel)
innerContainerView.addSubview(bottomLineView)
rightButton.setContentCompressionResistancePriority(.required, for: .horizontal)
infoTitleLabel.setContentCompressionResistancePriority(.defaultLow, for: .horizontal)
infoDetailLabel.setContentCompressionResistancePriority(.required, for: .horizontal)
bottomLineView.snp.makeConstraints { make in
make.left.equalToSuperview().offset(16)
make.right.equalToSuperview().offset(-16)
make.bottom.equalToSuperview()
make.height.equalTo(0.5)
}
infoTitleLabel.snp.makeConstraints { make in
make.left.equalToSuperview().offset(16)
make.top.equalToSuperview().offset(12)
}
rightButton.snp.makeConstraints { make in
make.right.equalToSuperview().offset(-16)
make.width.equalTo(36)
make.height.equalTo(18)
make.centerY.equalTo(infoTitleLabel)
}
infoDetailLabel.snp.makeConstraints { make in
make.right.equalTo(rightButton.snp.left).offset(-6)
make.left.greaterThanOrEqualTo(infoTitleLabel.snp.right).offset(12)
make.centerY.equalTo(infoTitleLabel)
make.bottom.equalToSuperview()
}
}
}
//
// YHVisaRenewalPayMethodQrcodeCell.swift
// galaxy
//
// Created by alexzzw on 2024/10/10.
// Copyright © 2024 https://www.galaxy-immi.com. All rights reserved.
//
import UIKit
class YHVisaRenewalPayMethodQrcodeCell: YHResignDocumentCell {
static let cellReuseIdentifier = "YHVisaRenewalPayMethodQrcodeCell"
var onLongPressEvent: ((UIImage) -> Void)?
private lazy var infoTitleLabel: UILabel = {
let label = UILabel()
label.font = .PFSC_M(ofSize: 14)
label.textColor = .mainTextColor
return label
}()
private lazy var infoTipsLabel: UILabel = {
let label = UILabel()
label.font = .PFSC_R(ofSize: 12)
label.textColor = .mainTextColor50
label.numberOfLines = 0
label.lineBreakMode = .byCharWrapping
return label
}()
private lazy var qrcodeIcon: UIImageView = {
let view = UIImageView()
view.contentMode = .scaleAspectFit
view.isUserInteractionEnabled = false
view.addGestureRecognizer(longPress)
return view
}()
/// 已添加的长按手势
private lazy var longPress: UILongPressGestureRecognizer = {
return UILongPressGestureRecognizer(target: self, action: #selector(onLongPress(_:)))
}()
override init(style: UITableViewCell.CellStyle, reuseIdentifier: String?) {
super.init(style: style, reuseIdentifier: reuseIdentifier)
setupUI()
}
required init?(coder: NSCoder) {
fatalError("init(coder:) has not been implemented")
}
func setupCellInfo(title: String, tips: String, qrCode: UIImage?) {
infoTitleLabel.text = title
infoTipsLabel.text = tips
if let qrCode = qrCode {
qrcodeIcon.image = qrCode
qrcodeIcon.isUserInteractionEnabled = true
}
}
}
extension YHVisaRenewalPayMethodQrcodeCell {
/// 长按
@objc func onLongPress(_ press: UILongPressGestureRecognizer) {
if press.state == .began {
guard let image = self.qrcodeIcon.image else {
return
}
onLongPressEvent?(image)
}
}
private func setupUI() {
subContainerView.radius = 6
updateCellCorner(.bottom)
subContainerView.addSubview(infoTitleLabel)
subContainerView.addSubview(infoTipsLabel)
subContainerView.addSubview(qrcodeIcon)
qrcodeIcon.snp.makeConstraints { make in
make.top.equalToSuperview().offset(18)
make.right.equalToSuperview().offset(-18)
make.bottom.equalToSuperview().offset(-27)
make.width.height.equalTo(86)
}
infoTitleLabel.snp.makeConstraints { make in
make.left.equalToSuperview().offset(18)
make.top.equalToSuperview().offset(31)
make.right.lessThanOrEqualTo(qrcodeIcon.snp.left).offset(-16)
}
infoTipsLabel.snp.makeConstraints { make in
make.left.equalTo(infoTitleLabel.snp.left)
make.top.equalTo(infoTitleLabel.snp.bottom).offset(6)
make.right.lessThanOrEqualTo(qrcodeIcon.snp.left).offset(-16)
make.bottom.lessThanOrEqualToSuperview().offset(-18)
}
}
}
//
// YHVisaRenewalPayMethodUrlCell.swift
// galaxy
//
// Created by alexzzw on 2024/10/10.
// Copyright © 2024 https://www.galaxy-immi.com. All rights reserved.
//
import UIKit
import AttributedString
class YHVisaRenewalPayMethodUrlCell: YHResignDocumentCell {
static let cellReuseIdentifier = "YHVisaRenewalPayMethodUrlCell"
var urlClicked: ((String) -> Void)?
private lazy var infoTitleLabel: UILabel = {
let label = UILabel()
label.font = .PFSC_M(ofSize: 14)
label.textColor = .mainTextColor
return label
}()
private lazy var infoTipsLabel: UILabel = {
let label = UILabel()
label.font = .PFSC_R(ofSize: 12)
label.textColor = .mainTextColor50
label.numberOfLines = 0
label.lineBreakMode = .byCharWrapping
return label
}()
private lazy var bottomContainerView: YHBaseDynamicCornerRadiusView = {
let view = YHBaseDynamicCornerRadiusView(cornerRadius: 4, corner: .allCorners)
view.backgroundColor = .contentBkgColor
return view
}()
private lazy var urlLabel: UILabel = {
let label = UILabel()
label.font = .PFSC_R(ofSize: 12)
label.textColor = .brandMainColor
label.numberOfLines = 0
label.lineBreakMode = .byCharWrapping
return label
}()
private lazy var bottomLineView: UIView = {
let view = UIView()
view.backgroundColor = .separatorColor
return view
}()
override init(style: UITableViewCell.CellStyle, reuseIdentifier: String?) {
super.init(style: style, reuseIdentifier: reuseIdentifier)
setupUI()
}
required init?(coder: NSCoder) {
fatalError("init(coder:) has not been implemented")
}
func setupCellInfo(title: String, tips: String, url: String) {
infoTitleLabel.text = title
infoTipsLabel.text = tips
let attStr = ASAttributedString.init(string: url, .underline(.init(rawValue: 1)), .action { [weak self] in
self?.urlClicked?(url)
})
urlLabel.attributed.text = attStr
}
}
extension YHVisaRenewalPayMethodUrlCell {
private func setupUI() {
subContainerView.radius = 6
updateCellCorner(.mid)
subContainerView.addSubview(infoTitleLabel)
subContainerView.addSubview(infoTipsLabel)
subContainerView.addSubview(bottomContainerView)
subContainerView.addSubview(bottomLineView)
bottomContainerView.addSubview(urlLabel)
infoTitleLabel.snp.makeConstraints { make in
make.left.equalToSuperview().offset(18)
make.top.equalToSuperview()
make.right.lessThanOrEqualToSuperview().offset(-18)
}
infoTipsLabel.snp.makeConstraints { make in
make.left.equalTo(infoTitleLabel.snp.left)
make.top.equalTo(infoTitleLabel.snp.bottom).offset(6)
make.right.lessThanOrEqualToSuperview().offset(-18)
}
bottomContainerView.snp.makeConstraints { make in
make.top.equalTo(infoTipsLabel.snp.bottom).offset(12)
make.left.equalTo(infoTitleLabel.snp.left)
make.right.equalToSuperview().offset(-18)
make.bottom.equalToSuperview().offset(-18)
}
urlLabel.snp.makeConstraints { make in
make.left.equalToSuperview().offset(16)
make.right.equalToSuperview().offset(-16)
make.top.equalToSuperview().offset(16)
make.bottom.equalToSuperview().offset(-16)
}
bottomLineView.snp.makeConstraints { make in
make.left.equalTo(infoTitleLabel.snp.left)
make.right.equalTo(bottomContainerView.snp.right)
make.bottom.equalToSuperview()
make.height.equalTo(0.5)
}
}
}
//
// YHVisaRenewalPayOccupyingSpaceCell.swift
// galaxy
//
// Created by alexzzw on 2024/10/11.
// Copyright © 2024 https://www.galaxy-immi.com. All rights reserved.
//
import UIKit
class YHVisaRenewalPayOccupyingSpaceCell: YHResignDocumentCell {
static let cellReuseIdentifier = "YHVisaRenewalPayOccupyingSpaceCell"
override init(style: UITableViewCell.CellStyle, reuseIdentifier: String?) {
super.init(style: style, reuseIdentifier: reuseIdentifier)
setupUI()
}
required init?(coder: NSCoder) {
fatalError("init(coder:) has not been implemented")
}
func setupCellInfo(isBottom: Bool = false) {
subContainerView.corner = isBottom ? [.bottomLeft, .bottomRight] : .none
let height: CGFloat = isBottom ? 18 : 12
subContainerView.snp.remakeConstraints { make in
make.top.bottom.equalToSuperview()
make.left.equalToSuperview().offset(16)
make.right.equalToSuperview().offset(-16)
make.height.equalTo(height)
}
}
}
extension YHVisaRenewalPayOccupyingSpaceCell {
private func setupUI() {
subContainerView.radius = 6
updateCellCorner(.mid)
}
}
//
// YHVisaRenewalPayStatusCell.swift
// galaxy
//
// Created by alexzzw on 2024/10/10.
// Copyright © 2024 https://www.galaxy-immi.com. All rights reserved.
//
import UIKit
class YHVisaRenewalPayStatusCell: YHVisaRenewalPayInfoBaseCell {
static let cellReuseIdentifier = "YHVisaRenewalPayStatusCell"
private lazy var iconView: UIView = {
let view = UIView()
view.backgroundColor = .brandMainColor
return view
}()
private lazy var infoTitleLabel: UILabel = {
let label = UILabel()
label.font = .PFSC_M(ofSize: 15)
label.textColor = .mainTextColor
return label
}()
private lazy var infoDetailLabel: UILabel = {
let label = UILabel()
label.font = .PFSC_M(ofSize: 13)
label.textColor = .brandMainColor
return label
}()
private lazy var bottomLineView: UIView = {
let view = UIView()
view.backgroundColor = .separatorColor
return view
}()
override init(style: UITableViewCell.CellStyle, reuseIdentifier: String?) {
super.init(style: style, reuseIdentifier: reuseIdentifier)
setupUI()
}
required init?(coder: NSCoder) {
fatalError("init(coder:) has not been implemented")
}
func setupCellInfo(title: String, status: YHVisaRenewalPaymentStatus) {
infoTitleLabel.text = title
infoDetailLabel.text = status.title
infoDetailLabel.textColor = status.titleColor
}
}
extension YHVisaRenewalPayStatusCell {
private func setupUI() {
updateInnerCellCorner(.top)
innerContainerView.addSubview(iconView)
innerContainerView.addSubview(infoTitleLabel)
innerContainerView.addSubview(infoDetailLabel)
innerContainerView.addSubview(bottomLineView)
iconView.setContentCompressionResistancePriority(.required, for: .horizontal)
infoTitleLabel.setContentCompressionResistancePriority(.defaultLow, for: .horizontal)
infoDetailLabel.setContentCompressionResistancePriority(.required, for: .horizontal)
bottomLineView.snp.makeConstraints { make in
make.left.right.bottom.equalToSuperview()
make.height.equalTo(0.5)
}
iconView.snp.makeConstraints { make in
make.left.equalToSuperview()
make.width.equalTo(4)
make.height.equalTo(15)
make.centerY.equalTo(infoTitleLabel)
}
infoTitleLabel.snp.makeConstraints { make in
make.left.equalTo(iconView.snp.right).offset(12)
make.top.equalToSuperview().offset(16)
make.bottom.equalToSuperview().offset(-12)
}
infoDetailLabel.snp.makeConstraints { make in
make.right.equalToSuperview().offset(-16)
make.left.greaterThanOrEqualTo(infoTitleLabel.snp.right).offset(12)
make.centerY.equalTo(infoTitleLabel)
}
}
}
//
// YHVisaRenewalPayTipsCell.swift
// galaxy
//
// Created by alexzzw on 2024/10/10.
// Copyright © 2024 https://www.galaxy-immi.com. All rights reserved.
//
import UIKit
class YHVisaRenewalPayTipsCell: YHVisaRenewalPayInfoBaseCell {
static let cellReuseIdentifier = "YHVisaRenewalPayTipsCell"
private lazy var infoDetailLabel: UILabel = {
let label = UILabel()
label.font = .PFSC_M(ofSize: 13)
label.textColor = .mainTextColor50
label.numberOfLines = 0
label.lineBreakMode = .byCharWrapping
label.textAlignment = .center
return label
}()
override init(style: UITableViewCell.CellStyle, reuseIdentifier: String?) {
super.init(style: style, reuseIdentifier: reuseIdentifier)
setupUI()
}
required init?(coder: NSCoder) {
fatalError("init(coder:) has not been implemented")
}
func setupCellInfo(detail: String) {
infoDetailLabel.text = detail
}
}
extension YHVisaRenewalPayTipsCell {
private func setupUI() {
updateInnerCellCorner(.bottom)
innerContainerView.addSubview(infoDetailLabel)
infoDetailLabel.snp.makeConstraints { make in
make.top.equalToSuperview().offset(12)
make.bottom.equalToSuperview().offset(-16)
make.centerX.equalToSuperview()
make.left.greaterThanOrEqualToSuperview().offset(16)
make.right.lessThanOrEqualToSuperview().offset(-16)
}
}
}
//
// YHVisaRenewalResidenceActionCell.swift
// galaxy
//
// Created by alexzzw on 2024/10/10.
// Copyright © 2024 https://www.galaxy-immi.com. All rights reserved.
//
import UIKit
class YHVisaRenewalResidenceActionCell: YHResignDocumentCell {
static let cellReuseIdentifier = "YHVisaRenewalResidenceActionCell"
var rightButtonEvent: (() -> Void)?
private lazy var infoTitleLabel: UILabel = {
let label = UILabel()
label.font = .PFSC_R(ofSize: 14)
label.textColor = .mainTextColor
return label
}()
private lazy var rightButton: UIButton = {
let button = UIButton(type: .custom)
button.setTitleColor(.mainTextColor, for: .normal)
button.titleLabel?.font = .PFSC_M(ofSize: 12)
button.addTarget(self, action: #selector(rightButtonClicked), for: .touchUpInside)
button.layer.cornerRadius = 2
button.clipsToBounds = true
return button
}()
private lazy var bottomLineView: UIView = {
let view = UIView()
view.backgroundColor = .separatorColor
return view
}()
override init(style: UITableViewCell.CellStyle, reuseIdentifier: String?) {
super.init(style: style, reuseIdentifier: reuseIdentifier)
setupUI()
}
required init?(coder: NSCoder) {
fatalError("init(coder:) has not been implemented")
}
func setupCellInfo(title: String, presenceStatus: YHVisaRenewalPresenceStatus, cellType: YHResignRoundCellType = .mid) {
updateCellCorner(cellType)
infoTitleLabel.text = title
rightButton.setTitle(presenceStatus.title, for: .normal)
rightButton.setTitleColor(presenceStatus.titleColor, for: .normal)
rightButton.backgroundColor = presenceStatus.bgColor
let isBottom = cellType == .bottom
bottomLineView.isHidden = isBottom ? true : false
let bottomMargin: CGFloat = isBottom ? 38 : 16
infoTitleLabel.snp.remakeConstraints { make in
make.left.equalToSuperview().offset(18)
make.top.equalToSuperview().offset(16)
make.bottom.equalToSuperview().offset(-bottomMargin)
}
}
}
extension YHVisaRenewalResidenceActionCell {
@objc private func rightButtonClicked() {
rightButtonEvent?()
}
private func setupUI() {
subContainerView.radius = 6
updateCellCorner(.mid)
subContainerView.addSubview(infoTitleLabel)
subContainerView.addSubview(rightButton)
subContainerView.addSubview(bottomLineView)
infoTitleLabel.setContentCompressionResistancePriority(.defaultLow, for: .horizontal)
rightButton.setContentCompressionResistancePriority(.required, for: .horizontal)
infoTitleLabel.snp.makeConstraints { make in
make.left.equalToSuperview().offset(18)
make.top.equalToSuperview().offset(16)
make.bottom.equalToSuperview().offset(-16)
}
rightButton.snp.makeConstraints { make in
make.left.greaterThanOrEqualTo(infoTitleLabel.snp.right).offset(6)
make.centerY.equalTo(infoTitleLabel)
make.right.equalToSuperview().offset(-18)
make.height.equalTo(26)
make.width.equalTo(72)
}
bottomLineView.snp.makeConstraints { make in
make.left.equalTo(infoTitleLabel.snp.left)
make.right.equalTo(rightButton.snp.right)
make.bottom.equalToSuperview()
make.height.equalTo(0.5)
}
}
}
//
// YHVisaRenewalSectionHeaderCell.swift
// galaxy
//
// Created by alexzzw on 2024/10/10.
// Copyright © 2024 https://www.galaxy-immi.com. All rights reserved.
//
import UIKit
class YHVisaRenewalSectionHeaderCell: YHResignDocumentCell {
static let cellReuseIdentifier = "YHVisaRenewalSectionHeaderCell"
var rightButtonEvent: (() -> Void)?
private lazy var infoTitleLabel: UILabel = {
let label = UILabel()
label.font = .PFSC_B(ofSize: 17)
label.textColor = .mainTextColor
return label
}()
private lazy var rightButton: UIButton = {
let button = UIButton(type: .custom)
button.setTitleColor(.brandMainColor, for: .normal)
button.titleLabel?.font = .PFSC_R(ofSize: 12)
button.addTarget(self, action: #selector(rightButtonClicked), for: .touchUpInside)
return button
}()
private lazy var bottomLineView: UIView = {
let view = UIView()
view.backgroundColor = .separatorColor
return view
}()
override init(style: UITableViewCell.CellStyle, reuseIdentifier: String?) {
super.init(style: style, reuseIdentifier: reuseIdentifier)
setupUI()
}
required init?(coder: NSCoder) {
fatalError("init(coder:) has not been implemented")
}
func setupCellInfo(title: String, buttonTitle: String? = nil) {
infoTitleLabel.text = title
guard let buttonTitle = buttonTitle, buttonTitle.count > 0 else {
rightButton.setTitle(nil, for: .normal)
rightButton.isHidden = true
return
}
rightButton.isHidden = false
rightButton.setTitle(buttonTitle, for: .normal)
}
}
extension YHVisaRenewalSectionHeaderCell {
@objc private func rightButtonClicked() {
rightButtonEvent?()
}
private func setupUI() {
subContainerView.radius = 6
updateCellCorner(.top)
subContainerView.addSubview(infoTitleLabel)
subContainerView.addSubview(rightButton)
subContainerView.addSubview(bottomLineView)
infoTitleLabel.setContentCompressionResistancePriority(.defaultLow, for: .horizontal)
rightButton.setContentCompressionResistancePriority(.required, for: .horizontal)
infoTitleLabel.snp.makeConstraints { make in
make.left.equalToSuperview().offset(18)
make.top.equalToSuperview().offset(16)
make.bottom.equalToSuperview().offset(-12)
}
rightButton.snp.makeConstraints { make in
make.left.greaterThanOrEqualTo(infoTitleLabel.snp.right).offset(6)
make.centerY.equalTo(infoTitleLabel)
make.right.equalToSuperview().offset(-18)
}
bottomLineView.snp.makeConstraints { make in
make.left.right.bottom.equalToSuperview()
make.height.equalTo(0.5)
}
}
}
//
// YHVisaRenewalTipsCell.swift
// galaxy
//
// Created by alexzzw on 2024/10/10.
// Copyright © 2024 https://www.galaxy-immi.com. All rights reserved.
//
import UIKit
import AttributedString
class YHVisaRenewalTipsCell: YHResignDocumentCell {
static let cellReuseIdentifier = "YHVisaRenewalTipsCell"
private lazy var infoDetailLabel: UILabel = {
let label = UILabel()
label.font = .PFSC_R(ofSize: 12)
label.textColor = .mainTextColor50
return label
}()
override init(style: UITableViewCell.CellStyle, reuseIdentifier: String?) {
super.init(style: style, reuseIdentifier: reuseIdentifier)
setupUI()
}
required init?(coder: NSCoder) {
fatalError("init(coder:) has not been implemented")
}
func setupCellInfo(detail: ASAttributedString) {
infoDetailLabel.attributed.text = detail
}
}
extension YHVisaRenewalTipsCell {
private func setupUI() {
subContainerView.radius = 6
updateCellCorner(.mid)
subContainerView.addSubview(infoDetailLabel)
infoDetailLabel.snp.makeConstraints { make in
make.left.equalToSuperview().offset(18)
make.top.equalToSuperview().offset(12)
make.bottom.equalToSuperview().offset(-12)
make.right.lessThanOrEqualToSuperview().offset(-18)
}
}
}
......@@ -29,6 +29,7 @@ class YHVisaRenewalTroubleshootingGuideHeaderCell: UITableViewCell {
label.font = .PFSC_R(ofSize: 14)
label.textColor = .mainTextColor70
label.numberOfLines = 0
label.lineBreakMode = .byCharWrapping
let paragraphStyle = NSMutableParagraphStyle()
paragraphStyle.lineHeightMultiple = 1.07
let attributedText = NSAttributedString(
......
......@@ -47,6 +47,15 @@ class YHVisaRenewalWorkflowCell: UITableViewCell {
func setupCellInfo(title: String, workflows: [String]) {
infoTitleLabel.text = title
stepLabels.forEach {
$0.removeFromSuperview()
}
circleViews.forEach {
$0.removeFromSuperview()
}
dashLines.forEach {
$0.removeFromSuperview()
}
stepLabels.removeAll()
circleViews.removeAll()
dashLines.removeAll()
......@@ -141,6 +150,7 @@ extension YHVisaRenewalWorkflowCell {
label.font = .PFSC_R(ofSize: 13)
label.textColor = .mainTextColor70
label.numberOfLines = 0
label.lineBreakMode = .byCharWrapping
let paragraphStyle = NSMutableParagraphStyle()
paragraphStyle.lineHeightMultiple = 1.1
let attributedText = NSAttributedString(
......
//
// YHLookResignResultViewController.swift
// galaxy
//
// Created by EDY on 2024/10/11.
// Copyright © 2024 https://www.galaxy-immi.com. All rights reserved.
//
import UIKit
import AttributedString
class YHLookResignResultViewController: YHBaseViewController {
var orderId: Int = 0
// 批次id
var batchId: Int = 0
var state = 1
lazy var viewModel: YHResignUploadDocListViewModel = {
let vm = YHResignUploadDocListViewModel()
return vm
}()
var headView: YHLookResignResultHeadView!
lazy var tableView: UITableView = {
let tableView = UITableView(frame:.zero, style:.grouped)
tableView.estimatedSectionHeaderHeight = 16.0
tableView.estimatedSectionFooterHeight = 0.01
tableView.contentInsetAdjustmentBehavior = .never
tableView.showsVerticalScrollIndicator = false
tableView.separatorStyle = .none
tableView.delegate = self
tableView.dataSource = self
tableView.backgroundColor = .clear
tableView.register(YHLookResignResultStateOneTableViewCell.self, forCellReuseIdentifier: YHLookResignResultStateOneTableViewCell.cellReuseIdentifier)
tableView.register(YHTravelDocsPreparationTipsCell.self, forCellReuseIdentifier: YHTravelDocsPreparationTipsCell.cellReuseIdentifier)
return tableView
}()
//我已知悉,确认
lazy var rewardBtn: UIButton = {
let button = UIButton(type: .custom)
button.titleLabel?.font = UIFont.PFSC_M(ofSize: 15)
button.contentHorizontalAlignment = .center
button.setTitle("去缴费", for: .normal)
button.setTitleColor(UIColor.white, for: .normal)
button.setTitleColor(UIColor.white, for: .disabled)
button.layer.cornerRadius = kCornerRadius3
button.clipsToBounds = true
button.addTarget(self, action: #selector(clickNextBtn), for: .touchUpInside)
button.backgroundColor = UIColor.brandMainColor
return button
}()
lazy var bottomView: UIView = {
let view = UIView()
view.backgroundColor = .white
view.addSubview(self.rewardBtn)
self.rewardBtn.snp.makeConstraints { make in
make.top.equalToSuperview().offset(10)
make.left.equalTo(kMargin)
make.right.equalTo(-kMargin)
make.height.equalTo(44)
}
view.layer.zPosition = 10
return view
}()
override func viewDidLoad() {
super.viewDidLoad()
setupUI()
}
override func viewWillAppear(_ animated: Bool) {
super.viewWillAppear(animated)
loadData()
}
@objc func clickNextBtn() {
}
}
private extension YHLookResignResultViewController {
func loadData() {
// viewModel.getUploadDocProgress(orderID: orderId, stepID: batchId) {[weak self] success, err in
// guard let self = self else { return }
// viewModel.getUploadDocList(orderID: orderId, stepID: batchId) {[weak self] success, err in
// guard let self = self else { return }
// self.tableView.reloadData()
// }
// }
}
func setupUI() {
view.backgroundColor = UIColor.contentBkgColor
headView = {
let view = YHLookResignResultHeadView()
view.state = state
return view
}()
headView.frame = CGRect(x: 0, y: 0, width: KScreenWidth, height: 239.fix)
view.addSubview(bottomView)
bottomView.snp.makeConstraints { make in
make.left.equalToSuperview()
make.right.equalToSuperview()
make.height.equalTo(98)
make.bottom.equalToSuperview()
}
view.addSubview(tableView)
tableView.snp.makeConstraints { make in
make.left.equalToSuperview()
make.right.equalToSuperview()
make.top.equalToSuperview()
make.bottom.equalTo(-98)
}
tableView.tableHeaderView = headView
if state == 0 {
bottomView.isHidden = true
tableView.snp.remakeConstraints { make in
make.left.equalToSuperview()
make.right.equalToSuperview()
make.top.equalToSuperview()
make.bottom.equalToSuperview()
}
tableView.tableFooterView = YHLookResignResultFootView(frame: CGRect(x: 0, y: 0, width: KScreenWidth, height: 150))
} else if state == 1 {
bottomView.isHidden = false
rewardBtn.setTitle("去补件", for: .normal)
} else {
bottomView.isHidden = false
rewardBtn.setTitle("去缴费", for: .normal)
}
}
func convertNumberToChineseText(_ number: Int) -> String {
let numberFormatter = NumberFormatter()
numberFormatter.locale = Locale(identifier: "zh_CN")
numberFormatter.numberStyle = .spellOut
return numberFormatter.string(from: NSNumber(value: number)) ?? ""
}
}
extension YHLookResignResultViewController: UITableViewDelegate, UITableViewDataSource {
func numberOfSections(in tableView: UITableView) -> Int {
return 3
}
func tableView(_ tableView: UITableView, numberOfRowsInSection section: Int) -> Int {
return 1
}
func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell {
let approveCell = tableView.dequeueReusableCell(withIdentifier: YHLookResignResultStateOneTableViewCell.cellReuseIdentifier, for: indexPath) as! YHLookResignResultStateOneTableViewCell
approveCell.title = "第" + convertNumberToChineseText(indexPath.section + 1) + "批"
return approveCell
}
func tableView(_ tableView: UITableView, heightForRowAt indexPath: IndexPath) -> CGFloat {
return 140
}
func tableView(_ tableView: UITableView, didSelectRowAt indexPath: IndexPath) {
}
private func tableView(_ tableView: UITableView, viewForHeaderInSection section: Int) -> CGFloat {
return 16.0
}
private func tableView(_ tableView: UITableView, viewForFooterInSection section: Int) -> CGFloat {
return 0.01
}
func tableView(_ tableView: UITableView, viewForHeaderInSection section: Int) -> UIView? {
let view = UIView()
return view
}
func tableView(_ tableView: UITableView, viewForFooterInSection section: Int) -> UIView? {
let view = UIView()
return view
}
}
//
// YHLookResignResultFootView.swift
// galaxy
//
// Created by EDY on 2024/10/11.
// Copyright © 2024 https://www.galaxy-immi.com. All rights reserved.
//
import UIKit
class YHLookResignResultFootView: UIView {
var titleLabel: UILabel!
var messageLabel: UILabel!
override init(frame: CGRect) {
super.init(frame: frame)
setUpView()
}
required init?(coder: NSCoder) {
fatalError("init(coder:) has not been implemented")
}
func setUpView() {
titleLabel = {
let view = UILabel()
view.text = "温馨提示:"
view.textColor = UIColor.mainTextColor50
view.font = UIFont.PFSC_M(ofSize: 14)
view.numberOfLines = 0
return view
}()
addSubview(titleLabel)
titleLabel.snp.makeConstraints { make in
make.right.equalTo(-20)
make.top.left.equalTo(20)
}
messageLabel = {
let view = UILabel()
view.text = "1、收到《入境处递交回执》后,建议在港等待获批结果,若有需要离港,请在签证到期前离港。\n2、获批后,所有申请人需在港缴费领取新签证"
view.textColor = UIColor.mainTextColor50
view.font = UIFont.PFSC_M(ofSize: 14)
view.numberOfLines = 0
return view
}()
addSubview(messageLabel)
messageLabel.snp.makeConstraints { make in
make.right.equalTo(-20)
make.left.equalTo(20)
make.top.equalTo(titleLabel.snp.bottom).offset(12)
}
}
}
//
// YHLookResignResultHeadView.swift
// galaxy
//
// Created by EDY on 2024/10/11.
// Copyright © 2024 https://www.galaxy-immi.com. All rights reserved.
//
import UIKit
import AttributedString
class YHLookResignResultHeadView: UIView {
var bgImageView: UIImageView!
var titleImageView: UIImageView!
var messageLabel: UILabel!
var state: Int = 0 {
didSet {
if state == 0 {
bgImageView.image = UIImage(named: "look_resign_result_head_one")
titleImageView.image = UIImage(named: "look_resign_result_title_one")
} else if state == 1 {
bgImageView.image = UIImage(named: "look_resign_result_head_two")
titleImageView.image = UIImage(named: "look_resign_result_title_two")
} else {
bgImageView.image = UIImage(named: "look_resign_result_head_three")
titleImageView.image = UIImage(named: "look_resign_result_title_three")
}
}
}
override init(frame: CGRect) {
super.init(frame: frame)
setUpView()
}
required init?(coder: NSCoder) {
fatalError("init(coder:) has not been implemented")
}
func setUpView() {
self.layer.cornerRadius = 1
self.layer.masksToBounds = true
bgImageView = {
let imageView = UIImageView()
imageView.image = UIImage(named: "resign_upload_doc_head")
return imageView
}()
addSubview(bgImageView)
bgImageView.snp.makeConstraints { make in
make.left.right.top.equalToSuperview()
make.height.equalTo(298.fix)
}
titleImageView = {
let imageView = UIImageView()
imageView.image = UIImage(named: "resign_upload_doc_head")
return imageView
}()
addSubview(titleImageView)
titleImageView.snp.makeConstraints { make in
make.left.equalTo(20)
make.top.equalTo(20 + k_Height_NavigationtBarAndStatuBar)
make.height.equalTo(39)
make.width.equalTo(160)
}
messageLabel = {
let label = UILabel()
label.numberOfLines = 0
let a = ASAttributedString.init("欧阳先生,您的【优秀人才入境计划】续签申请资料已递交至港府,且港府", .font(UIFont.PFSC_M(ofSize:14)), .foreground(UIColor.mainTextColor50))
let b = ASAttributedString.init("已确认递交申请", .font(UIFont.PFSC_M(ofSize:14)),.foreground(UIColor.brandMainColor))
let c = ASAttributedString.init(",入境处审核周期预计4-8周,请耐心等待获批结果", .font(UIFont.PFSC_M(ofSize:14)), .foreground(UIColor.mainTextColor50))
label.attributed.text = a+b+c
return label
}()
addSubview(messageLabel)
messageLabel.snp.makeConstraints { make in
make.left.equalTo(20)
make.right.equalTo(-20)
make.top.equalTo(k_Height_NavigationtBarAndStatuBar + 71)
}
}
}
//
// YHLookResignResultStateOneTableViewCell.swift
// galaxy
//
// Created by EDY on 2024/10/11.
// Copyright © 2024 https://www.galaxy-immi.com. All rights reserved.
//
import UIKit
import AttributedString
class YHLookResignResultStateOneTableViewCell: UITableViewCell {
static let cellReuseIdentifier = "YHLookResignResultStateOneTableViewCell"
typealias ExperienceListBlock = (_ model: YHResignUploadDocModel, _ section: Int) -> ()
var clickBlock: ExperienceListBlock?
var centerView: UIView!
var titleLabel: UILabel!
var peopleLabel: UILabel!
var peopleValueLabel: UILabel!
var docLabel: UILabel!
var docValueLabel: UILabel!
var mainItemView: UIView!
var lineView: UIView!
var title: String = "" {
didSet {
titleLabel.text = title
}
}
var dataSource: [YHResignUploadDocModel]? {
didSet {
updateAllViews()
}
}
override func awakeFromNib() {
super.awakeFromNib()
// Initialization code
}
override func setSelected(_ selected: Bool, animated: Bool) {
super.setSelected(selected, animated: animated)
// Configure the view for the selected state
}
required init?(coder: NSCoder) {
super.init(coder: coder)
}
override init(style: UITableViewCell.CellStyle, reuseIdentifier: String?) {
super.init(style: style, reuseIdentifier: reuseIdentifier)
selectionStyle = .none
setupUI()
}
func setupUI() {
backgroundColor = .clear
centerView = {
let view = UIView()
view.backgroundColor = .white
view.layer.cornerRadius = kCornerRadius6
return view
}()
contentView.addSubview(centerView)
centerView.snp.makeConstraints { make in
make.left.equalTo(16)
make.right.equalTo(-16)
make.top.equalTo(0)
make.bottom.equalTo(0)
}
titleLabel = {
let label = UILabel()
label.font = UIFont.PFSC_M(ofSize: 17)
label.text = "第一批"
label.textColor = UIColor.mainTextColor
return label
}()
centerView.addSubview(titleLabel)
titleLabel.snp.makeConstraints { make in
make.left.equalTo(18)
make.top.equalTo(16)
make.height.equalTo(24)
make.right.equalTo(-20)
}
lineView = {
let view = UIView()
view.backgroundColor = UIColor.separatorColor
return view
}()
centerView.addSubview(lineView)
lineView.snp.makeConstraints { make in
make.left.right.equalToSuperview()
make.top.equalTo(52)
make.height.equalTo(0.5)
}
peopleLabel = {
let label = UILabel()
label.font = UIFont.PFSC_M(ofSize: 14)
label.text = "申请人:"
label.textColor = UIColor.mainTextColor50
return label
}()
centerView.addSubview(peopleLabel)
peopleLabel.snp.makeConstraints { make in
make.left.equalTo(18)
make.top.equalTo(68)
make.height.equalTo(20)
make.right.equalTo(-18)
}
peopleValueLabel = {
let label = UILabel()
label.font = UIFont.PFSC_M(ofSize: 14)
label.text = "张三丰、章一刀"
label.textColor = UIColor.mainTextColor
label.textAlignment = .right
return label
}()
centerView.addSubview(peopleValueLabel)
peopleValueLabel.snp.makeConstraints { make in
make.left.equalTo(18)
make.top.equalTo(68)
make.height.equalTo(20)
make.right.equalTo(-18)
}
docLabel = {
let label = UILabel()
label.font = UIFont.PFSC_M(ofSize: 14)
label.text = "递交回执:"
label.textColor = UIColor.mainTextColor50
return label
}()
centerView.addSubview(docLabel)
docLabel.snp.makeConstraints { make in
make.left.equalTo(18)
make.top.equalTo(104)
make.height.equalTo(20)
make.right.equalTo(-18)
}
peopleValueLabel = {
let label = UILabel()
label.textColor = UIColor.mainTextColor
let a = ASAttributedString.init("欧阳先生", .font(UIFont.PFSC_M(ofSize:14)), .foreground(UIColor.brandMainColor), .underline(.single), .action {
// 点击预览
})
label.attributed.text = a
label.textAlignment = .right
return label
}()
centerView.addSubview(peopleValueLabel)
peopleValueLabel.snp.makeConstraints { make in
make.left.equalTo(18)
make.top.equalTo(104)
make.height.equalTo(20)
make.right.equalTo(-18)
}
}
func updateAllViews() {
}
}
{
"images" : [
{
"idiom" : "universal",
"scale" : "1x"
},
{
"filename" : "look_resign_result_head_one@2x.png",
"idiom" : "universal",
"scale" : "2x"
},
{
"filename" : "look_resign_result_head_one@3x.png",
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}
{
"images" : [
{
"idiom" : "universal",
"scale" : "1x"
},
{
"filename" : "look_resign_result_head_three@2x.png",
"idiom" : "universal",
"scale" : "2x"
},
{
"filename" : "look_resign_result_head_three@3x.png",
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}
{
"images" : [
{
"idiom" : "universal",
"scale" : "1x"
},
{
"filename" : "look_resign_result_head_two@2x.png",
"idiom" : "universal",
"scale" : "2x"
},
{
"filename" : "look_resign_result_head_two@3x.png",
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}
{
"images" : [
{
"idiom" : "universal",
"scale" : "1x"
},
{
"filename" : "look_resign_result_title_one@2x.png",
"idiom" : "universal",
"scale" : "2x"
},
{
"filename" : "look_resign_result_title_one@3x.png",
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}
{
"images" : [
{
"idiom" : "universal",
"scale" : "1x"
},
{
"filename" : "look_resign_result_title_three@2x.png",
"idiom" : "universal",
"scale" : "2x"
},
{
"filename" : "look_resign_result_title_three@3x.png",
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}
{
"images" : [
{
"idiom" : "universal",
"scale" : "1x"
},
{
"filename" : "look_resign_result_title_two@2x.png",
"idiom" : "universal",
"scale" : "2x"
},
{
"filename" : "look_resign_result_title_two@3x.png",
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}
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