Commit 3ac5171a authored by David黄金龙's avatar David黄金龙

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

* 'develop' of http://gitlab.galaxy-immi.com/mobile-group/galaxy-iOS:
  //  旅游证件准备
  //  旅行证件准备
parents 3867ab6e 657c3a58
...@@ -392,6 +392,7 @@ ...@@ -392,6 +392,7 @@
048058332C7DC0CF00502CAA /* YHTravelCertificateTipsCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = 048058322C7DC0CF00502CAA /* YHTravelCertificateTipsCell.swift */; }; 048058332C7DC0CF00502CAA /* YHTravelCertificateTipsCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = 048058322C7DC0CF00502CAA /* YHTravelCertificateTipsCell.swift */; };
048058352C7DC7AC00502CAA /* YHMyTestViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 048058342C7DC7AC00502CAA /* YHMyTestViewController.swift */; }; 048058352C7DC7AC00502CAA /* YHMyTestViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 048058342C7DC7AC00502CAA /* YHMyTestViewController.swift */; };
048058372C7F03B500502CAA /* YHTravelCertificateUploadCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = 048058362C7F03B500502CAA /* YHTravelCertificateUploadCell.swift */; }; 048058372C7F03B500502CAA /* YHTravelCertificateUploadCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = 048058362C7F03B500502CAA /* YHTravelCertificateUploadCell.swift */; };
048058392C7F289700502CAA /* YHTravelCertificateItemView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 048058382C7F289700502CAA /* YHTravelCertificateItemView.swift */; };
0480976B2BA15269000B9DCA /* YHCertificateInfoCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0480976A2BA15269000B9DCA /* YHCertificateInfoCell.swift */; }; 0480976B2BA15269000B9DCA /* YHCertificateInfoCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0480976A2BA15269000B9DCA /* YHCertificateInfoCell.swift */; };
0480976D2BA158A1000B9DCA /* YHCertificateListVC.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0480976C2BA158A1000B9DCA /* YHCertificateListVC.swift */; }; 0480976D2BA158A1000B9DCA /* YHCertificateListVC.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0480976C2BA158A1000B9DCA /* YHCertificateListVC.swift */; };
048097712BA18D66000B9DCA /* YHCertificateSearchBar.swift in Sources */ = {isa = PBXBuildFile; fileRef = 048097702BA18D66000B9DCA /* YHCertificateSearchBar.swift */; }; 048097712BA18D66000B9DCA /* YHCertificateSearchBar.swift in Sources */ = {isa = PBXBuildFile; fileRef = 048097702BA18D66000B9DCA /* YHCertificateSearchBar.swift */; };
...@@ -1167,6 +1168,7 @@ ...@@ -1167,6 +1168,7 @@
048058322C7DC0CF00502CAA /* YHTravelCertificateTipsCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHTravelCertificateTipsCell.swift; sourceTree = "<group>"; }; 048058322C7DC0CF00502CAA /* YHTravelCertificateTipsCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHTravelCertificateTipsCell.swift; sourceTree = "<group>"; };
048058342C7DC7AC00502CAA /* YHMyTestViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHMyTestViewController.swift; sourceTree = "<group>"; }; 048058342C7DC7AC00502CAA /* YHMyTestViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHMyTestViewController.swift; sourceTree = "<group>"; };
048058362C7F03B500502CAA /* YHTravelCertificateUploadCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHTravelCertificateUploadCell.swift; sourceTree = "<group>"; }; 048058362C7F03B500502CAA /* YHTravelCertificateUploadCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHTravelCertificateUploadCell.swift; sourceTree = "<group>"; };
048058382C7F289700502CAA /* YHTravelCertificateItemView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHTravelCertificateItemView.swift; sourceTree = "<group>"; };
0480976A2BA15269000B9DCA /* YHCertificateInfoCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHCertificateInfoCell.swift; sourceTree = "<group>"; }; 0480976A2BA15269000B9DCA /* YHCertificateInfoCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHCertificateInfoCell.swift; sourceTree = "<group>"; };
0480976C2BA158A1000B9DCA /* YHCertificateListVC.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHCertificateListVC.swift; sourceTree = "<group>"; }; 0480976C2BA158A1000B9DCA /* YHCertificateListVC.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHCertificateListVC.swift; sourceTree = "<group>"; };
048097702BA18D66000B9DCA /* YHCertificateSearchBar.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHCertificateSearchBar.swift; sourceTree = "<group>"; }; 048097702BA18D66000B9DCA /* YHCertificateSearchBar.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHCertificateSearchBar.swift; sourceTree = "<group>"; };
...@@ -3510,6 +3512,7 @@ ...@@ -3510,6 +3512,7 @@
048058302C7DBDC900502CAA /* YHTravelCertificateTipsView.swift */, 048058302C7DBDC900502CAA /* YHTravelCertificateTipsView.swift */,
048058322C7DC0CF00502CAA /* YHTravelCertificateTipsCell.swift */, 048058322C7DC0CF00502CAA /* YHTravelCertificateTipsCell.swift */,
048058362C7F03B500502CAA /* YHTravelCertificateUploadCell.swift */, 048058362C7F03B500502CAA /* YHTravelCertificateUploadCell.swift */,
048058382C7F289700502CAA /* YHTravelCertificateItemView.swift */,
A54A07C82C7F478200F749AB /* YHTravelHKDLGuideSheetView.swift */, A54A07C82C7F478200F749AB /* YHTravelHKDLGuideSheetView.swift */,
); );
path = V; path = V;
...@@ -4400,6 +4403,7 @@ ...@@ -4400,6 +4403,7 @@
045EEF132B9F171A0022A143 /* YHCountryMessage.swift in Sources */, 045EEF132B9F171A0022A143 /* YHCountryMessage.swift in Sources */,
04EC2F812C22888E002907D7 /* YHFriendRequestView.swift in Sources */, 04EC2F812C22888E002907D7 /* YHFriendRequestView.swift in Sources */,
0430E6722C749E74000511E2 /* YHAdopterBirthViewController.swift in Sources */, 0430E6722C749E74000511E2 /* YHAdopterBirthViewController.swift in Sources */,
048058392C7F289700502CAA /* YHTravelCertificateItemView.swift in Sources */,
045EEE7B2B9F171A0022A143 /* YHPersonInfoCellModel2.swift in Sources */, 045EEE7B2B9F171A0022A143 /* YHPersonInfoCellModel2.swift in Sources */,
A53B61122BB128AF0010B573 /* YHFileListItemsView2.swift in Sources */, A53B61122BB128AF0010B573 /* YHFileListItemsView2.swift in Sources */,
04358E042C77322700811928 /* YHHaveGrabbedNumberListCell.swift in Sources */, 04358E042C77322700811928 /* YHHaveGrabbedNumberListCell.swift in Sources */,
......
...@@ -9,6 +9,23 @@ ...@@ -9,6 +9,23 @@
import UIKit import UIKit
class YHCardUploadView: UIView { class YHCardUploadView: UIView {
var titleHeight: CGFloat = 22.0 {
didSet {
self.frontLabel.snp.updateConstraints { make in
make.height.equalTo(titleHeight)
}
}
}
var imgHeight: CGFloat = 99.0 {
didSet {
frontImageButton.snp.updateConstraints { make in
make.height.equalTo(90.0)
}
}
}
typealias UrlBlock = (_ url: String, _ index: Int) -> () typealias UrlBlock = (_ url: String, _ index: Int) -> ()
var urlBlock: UrlBlock? var urlBlock: UrlBlock?
var deleteBlock: UrlBlock? var deleteBlock: UrlBlock?
......
...@@ -47,7 +47,7 @@ class YHMyTestViewController: YHBaseViewController { ...@@ -47,7 +47,7 @@ class YHMyTestViewController: YHBaseViewController {
override func viewDidLoad() { override func viewDidLoad() {
super.viewDidLoad() super.viewDidLoad()
self.gk_navTitle = "旅行证件准" self.gk_navTitle = "旅行证件准"
self.view.backgroundColor = .white self.view.backgroundColor = .white
self.view.addSubview(self.tableView) self.view.addSubview(self.tableView)
self.tableView.snp.makeConstraints { make in self.tableView.snp.makeConstraints { make in
......
...@@ -34,6 +34,28 @@ class YHTravelDocsPreparationDetailItemModel: SmartCodable { ...@@ -34,6 +34,28 @@ class YHTravelDocsPreparationDetailItemModel: SmartCodable {
var remark : String = ""//备注 var remark : String = ""//备注
var nationality : String = ""//国籍 1-中国 2-国外 var nationality : String = ""//国籍 1-中国 2-国外
// 自定义
var isNeedCheck: Bool = false
var checkTips: String = ""
var isNeedShowRejectReason: Bool = false
var rejectReason: String = ""
required init() { required init() {
} }
init(type: Int, order_id: Int, order_sn: String, img_back: String, img_front: String, status: Int, issue_start: String, issue_end: String, user_id: Int, user_type: String, remark: String, nationality: String) {
self.type = type
self.order_id = order_id
self.order_sn = order_sn
self.img_back = img_back
self.img_front = img_front
self.status = status
self.issue_start = issue_start
self.issue_end = issue_end
self.user_id = user_id
self.user_type = user_type
self.remark = remark
self.nationality = nationality
}
} }
//
// YHTravelCertificateItemView.swift
// galaxy
//
// Created by edy on 2024/8/28.
// Copyright © 2024 https://www.galaxy-immi.com. All rights reserved.
//
import UIKit
class YHTravelCertificateItemView: UIView {
var titleMaxWidth = 112.0
var clickBlock: (()->())?
var title: String = "" {
didSet {
titleLabel.text = title
}
}
var placeHolder: String = ""
var errorTips: String = "" {
didSet {
errorLabel.text = errorTips
}
}
var isNeedShowErrorTips: Bool = false {
didSet {
errorLabel.isHidden = !isNeedShowErrorTips
errorLabel.snp.remakeConstraints { make in
make.top.equalTo(detailLabel.snp.bottom).offset(isNeedShowErrorTips ? 5 : 0)
make.left.equalTo(titleLabel)
make.right.equalTo(0)
make.bottom.equalTo(-16)
if !isNeedShowErrorTips {
make.height.equalTo(0)
}
}
self.setNeedsLayout()
self.layoutIfNeeded()
}
}
var detail: String = "" {
didSet {
if detail.isEmpty {
// 显示placeHolder
detailLabel.text = self.placeHolder
detailLabel.textColor = .placeHolderColor
detailLabel.textAlignment = .left
return
}
detailLabel.text = detail
detailLabel.textColor = .mainTextColor
detailLabel.textAlignment = .left
}
}
lazy var lineView: UIView = {
let view = UIView()
view.backgroundColor = .separatorColor
return view
}()
lazy var titleLabel: UILabel = {
let label = UILabel()
label.numberOfLines = 0
label.font = UIFont.PFSC_R(ofSize: 14)
label.textColor = .mainTextColor
return label
}()
private lazy var detailLabel: UILabel = {
let label = UILabel()
label.numberOfLines = 0
label.font = UIFont.PFSC_M(ofSize: 14)
label.textColor = .mainTextColor
return label
}()
private lazy var errorLabel: UILabel = {
let label = UILabel()
label.numberOfLines = 0
label.font = UIFont.PFSC_R(ofSize: 12)
label.textColor = .failColor
return label
}()
lazy var arrowImgView: UIImageView = {
let view = UIImageView(image: UIImage(named: "family_info_arrow"))
return view
}()
override init(frame: CGRect) {
super.init(frame: frame)
createUI()
}
required init?(coder: NSCoder) {
fatalError("init(coder:) has not been implemented")
}
@objc func didSelectView() {
clickBlock?()
}
func createUI() {
self.addSubview(titleLabel)
self.addSubview(detailLabel)
self.addSubview(arrowImgView)
self.addSubview(lineView)
self.addSubview(errorLabel)
let tap = UITapGestureRecognizer(target: self, action: #selector(didSelectView))
self.addGestureRecognizer(tap)
lineView.snp.makeConstraints { make in
make.left.equalTo(0)
make.right.equalTo(0)
make.top.equalTo(0)
make.height.equalTo(0.5)
}
titleLabel.snp.makeConstraints { make in
make.left.equalTo(0)
make.top.equalTo(16)
make.width.equalTo(titleMaxWidth)
}
detailLabel.snp.makeConstraints { make in
make.top.equalTo(16)
make.left.equalTo(titleLabel.snp.right)
make.right.equalTo(arrowImgView.snp.left)
}
errorLabel.snp.makeConstraints { make in
make.top.equalTo(detailLabel.snp.bottom).offset(0)
make.left.equalTo(titleLabel)
make.right.equalTo(0)
make.bottom.equalTo(-16)
}
arrowImgView.snp.makeConstraints { make in
make.width.height.equalTo(22)
make.top.equalTo(15)
make.right.equalTo(0)
}
}
}
...@@ -7,6 +7,7 @@ ...@@ -7,6 +7,7 @@
// //
import UIKit import UIKit
import AttributedString
class YHTravelDocsPreparationViewModel: YHBaseViewModel { class YHTravelDocsPreparationViewModel: YHBaseViewModel {
...@@ -102,3 +103,63 @@ extension YHTravelDocsPreparationViewModel { ...@@ -102,3 +103,63 @@ extension YHTravelDocsPreparationViewModel {
} }
} }
extension YHTravelDocsPreparationViewModel {
func getTextWithType(type: Int) -> ASAttributedString {
if type == 0 {
return .init("上传《港澳通行证》(需有效期≥dd-mm-yyyy)", .font(UIFont.PFSC_R(ofSize:14)),.foreground(UIColor.mainTextColor(alpha: 0.5)))
}
if type == 1 {
let a = ASAttributedString.init("办理逗留D签注", .font(UIFont.PFSC_R(ofSize:14)), .foreground(UIColor.mainTextColor(alpha: 0.5)))
let b = ASAttributedString.init("《港澳通行证逗留 (D) -办理操作指引》", .font(UIFont.PFSC_R(ofSize:14)),.foreground(UIColor.brandMainColor))
let c = ASAttributedString.init("点击查看", .font(UIFont.PFSC_R(ofSize:14)),.foreground(UIColor.mainTextColor(alpha: 0.5)))
return a+b+c
}
if type == 2 {
return .init("上传《护照》(需有效期≥签证时长+3个月)", .font(UIFont.PFSC_R(ofSize:14)),.foreground(UIColor.mainTextColor(alpha: 0.5)))
}
if type == 3 {
return .init("上传《护照》(需有效期≥dd-mm-yyyy)", .font(UIFont.PFSC_R(ofSize:14)),.foreground(UIColor.mainTextColor(alpha: 0.5)))
}
if type == 4 {
return .init("上传中国居留许可签证", .font(UIFont.PFSC_R(ofSize:14)),.foreground(UIColor.mainTextColor(alpha: 0.5)))
}
return .init("", .font(UIFont.PFSC_R(ofSize:14)),.foreground(UIColor.mainTextColor(alpha: 0.5)))
}
func getTipsWithType(_ type: YHTravelDocsType) -> [ASAttributedString] {
if type == .HK {
return [self.getTextWithType(type: 0),
self.getTextWithType(type: 1)]
}
if type == .chinesePassPort {
return [self.getTextWithType(type: 2)]
}
if type == .forignPassPort {
return [self.getTextWithType(type: 3),
self.getTextWithType(type: 4)]
}
return []
}
func getCertificateDateSelectItemOfType(_ type: YHTravelDocsType) -> [YHCertificateDateItem] {
if type == .HK {
let item1 = YHCertificateDateItem(id: .signDate, title: "签发日期", value: "2018-07-31", placeHolder: "请选择", errorTips: "请选择签发日期", isShowErrorTips: false)
let item2 = YHCertificateDateItem(id: .deadDate, title: "届满日期", value: "", placeHolder: "请选择", errorTips: "请选择届满日期", isShowErrorTips: false)
return [item1, item2]
}
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