Commit 09d5851f 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:
  续签补件部分接口逻辑 未通
  //  预约
  // 预约
  //  预约

# Conflicts:
#	galaxy/galaxy/Classes/Modules/Mine(我的)/C/YHMyViewController.swift
parents 61fbdeb6 b91c09f8
This diff is collapsed.
...@@ -199,13 +199,16 @@ class YHServiceOrderListView: YHBaseViewController { ...@@ -199,13 +199,16 @@ class YHServiceOrderListView: YHBaseViewController {
} else if type == 34 { } else if type == 34 {
//在港递交预约 //在港递交预约
} else if type == 35 { } else if type == 35 {
//查看续签结果 //查看续签结果
} else if type == 36 { } else if type == 36 {
//续签补件 //续签补件
let vc = YHResignUploadDocListViewController()
vc.orderId = orderId
vc.batchId = stepId
UIViewController.current?.navigationController?.pushViewController(vc)
} else if type == 37 { } else if type == 37 {
//在港签证缴费 //在港签证缴费
...@@ -416,6 +419,7 @@ extension YHServiceOrderListView : UITableViewDelegate,UITableViewDataSource { ...@@ -416,6 +419,7 @@ extension YHServiceOrderListView : UITableViewDelegate,UITableViewDataSource {
func tableView(_ tableView: UITableView, didSelectRowAt indexPath: IndexPath) { func tableView(_ tableView: UITableView, didSelectRowAt indexPath: IndexPath) {
let model = self.arrDataForSeviceCenterProgress[indexPath.row] let model = self.arrDataForSeviceCenterProgress[indexPath.row]
if model.status == 1 || model.status == 4 { if model.status == 1 || model.status == 4 {
YHServiceOrderListView.jumpToMessageController(type: model.type, orderId: orderID, stepID)
return return
} else { } else {
YHServiceOrderListView.jumpToMessageController(type: model.type, orderId: orderID, stepID) YHServiceOrderListView.jumpToMessageController(type: model.type, orderId: orderID, stepID)
......
//
// YHResignAppointSubmitScheduleViewController.swift
// galaxy
//
// Created by edy on 2024/10/11.
// Copyright © 2024 https://www.galaxy-immi.com. All rights reserved.
//
import UIKit
class YHResignAppointSubmitScheduleViewController: YHBaseViewController {
override func viewDidLoad() {
super.viewDidLoad()
}
}
//
// YHForwardArriveHKAlertView.swift
// galaxy
//
// Created by edy on 2024/10/11.
// Copyright © 2024 https://www.galaxy-immi.com. All rights reserved.
//
import UIKit
import AttributedString
class YHForwardArriveHKAlertView: UIView {
var confirmBlock: ((Bool)->())?
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 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 lineView: UIView = {
let view = UIView()
view.backgroundColor = .separatorColor
return view
}()
lazy var messageLabel: UILabel = {
let label = UILabel()
label.numberOfLines = 0
let a = ASAttributedString.init("若申请人已提前到达香港,", .font(UIFont.PFSC_R(ofSize:15)), .foreground(UIColor.mainTextColor70))
let b = ASAttributedString.init("需先修改预约递交时间后再【确认在港】", .font(UIFont.PFSC_B(ofSize:15)),.foreground(UIColor.brandMainColor))
let c = ASAttributedString.init(",请确认是否提前到港?", .font(UIFont.PFSC_R(ofSize:15)), .foreground(UIColor.mainTextColor70))
label.attributed.text = a+b+c
return label
}()
lazy var falseBtn: UIButton = {
let button = UIButton(type: .custom)
button.backgroundColor = UIColor.brandMainColor
button.titleLabel?.font = UIFont.PFSC_M(ofSize: 14)
button.setTitle("否".local, for: .normal)
button.setTitleColor(UIColor.white, for: .normal)
button.layer.cornerRadius = kCornerRadius3
button.addTarget(self, action: #selector(disagree), for: .touchUpInside)
return button
}()
lazy var sureBtn: UIButton = {
let button = UIButton(type: .custom)
button.backgroundColor = UIColor.white
button.titleLabel?.font = UIFont.PFSC_M(ofSize: 14)
button.setTitle("是".local, for: .normal)
button.setTitleColor( UIColor.brandMainColor, for: .normal)
button.layer.cornerRadius = kCornerRadius3
button.layer.borderWidth = 1
button.layer.borderColor = UIColor.brandMainColor.cgColor
button.addTarget(self, action: #selector(agree), for: .touchUpInside)
return button
}()
static func alertView() -> YHForwardArriveHKAlertView {
let view = YHForwardArriveHKAlertView(frame: UIScreen.main.bounds)
return view
}
func show() {
UIApplication.shared.yhKeyWindow()?.addSubview(self)
}
func dismiss() {
self.removeFromSuperview()
}
@objc func agree() {
confirmBlock?(true)
dismiss()
}
@objc func disagree() {
confirmBlock?(false)
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(titleLabel)
whiteContentView.addSubview(lineView)
whiteContentView.addSubview(messageLabel)
whiteContentView.addSubview(sureBtn)
whiteContentView.addSubview(falseBtn)
blackMaskView.snp.makeConstraints { make in
make.edges.equalToSuperview()
}
whiteContentView.snp.makeConstraints { make in
make.left.equalTo(38)
make.right.equalTo(-38)
make.centerY.equalToSuperview()
}
titleLabel.snp.makeConstraints { make in
make.top.equalTo(16)
make.height.equalTo(24)
make.left.equalTo(21)
make.right.equalTo(-21)
}
lineView.snp.makeConstraints { make in
make.left.right.equalTo(0)
make.height.equalTo(0.5)
make.top.equalTo(titleLabel.snp.bottom).offset(12)
}
messageLabel.snp.makeConstraints { make in
make.left.equalTo(21)
make.right.equalTo(-21)
make.top.equalTo(lineView.snp.bottom).offset(16)
}
sureBtn.snp.makeConstraints { make in
make.left.equalTo(21)
make.top.equalTo(messageLabel.snp.bottom).offset(21)
make.height.equalTo(45)
make.width.equalTo(falseBtn.snp.width)
make.right.equalTo(falseBtn.snp.left).offset(-10)
make.bottom.equalTo(-16)
}
falseBtn.snp.makeConstraints { make in
make.right.equalTo(-21)
make.centerY.equalTo(sureBtn)
make.height.equalTo(45)
}
}
}
...@@ -8,7 +8,7 @@ ...@@ -8,7 +8,7 @@
import UIKit import UIKit
class YHResignAppointTipsView: UIView { class YHResignAppointSubmitTipsView: UIView {
var confirmBlock:(()->())? var confirmBlock:(()->())?
...@@ -56,8 +56,8 @@ class YHResignAppointTipsView: UIView { ...@@ -56,8 +56,8 @@ class YHResignAppointTipsView: UIView {
return button return button
}() }()
static func alertView() -> YHResignAppointTipsView { static func alertView() -> YHResignAppointSubmitTipsView {
let view = YHResignAppointTipsView(frame: UIScreen.main.bounds) let view = YHResignAppointSubmitTipsView(frame: UIScreen.main.bounds)
return view return view
} }
...@@ -130,6 +130,8 @@ class YHResignAppointTipsView: UIView { ...@@ -130,6 +130,8 @@ class YHResignAppointTipsView: UIView {
make.bottom.equalTo(-16) make.bottom.equalTo(-16)
make.height.equalTo(45) make.height.equalTo(45)
} }
} }
} }
...@@ -25,7 +25,7 @@ class YHResignAppointedScheduleLineCell: UICollectionViewCell { ...@@ -25,7 +25,7 @@ class YHResignAppointedScheduleLineCell: UICollectionViewCell {
lazy var titleLabel: UILabel = { lazy var titleLabel: UILabel = {
var label = UILabel() var label = UILabel()
label.font = .PFSC_R(ofSize: 12) label.font = .PFSC_R(ofSize: 11)
label.textAlignment = .left label.textAlignment = .left
label.textColor = UIColor.mainTextColor label.textColor = UIColor.mainTextColor
return label return label
...@@ -33,32 +33,22 @@ class YHResignAppointedScheduleLineCell: UICollectionViewCell { ...@@ -33,32 +33,22 @@ class YHResignAppointedScheduleLineCell: UICollectionViewCell {
lazy var timeLabel: UILabel = { lazy var timeLabel: UILabel = {
var label = UILabel() var label = UILabel()
label.font = .PFSC_R(ofSize: 12) label.font = .PFSC_R(ofSize: 11)
label.textAlignment = .left label.textAlignment = .left
label.textColor = UIColor.mainTextColor label.textColor = UIColor.mainTextColor(alpha: 0.3)
return label return label
}() }()
lazy var leftDotView: UIView = { lazy var leftDotView: YHDashLineView = {
let view = UIView() let view = YHDashLineView(strokeColor: UIColor.init(hex: 0x121A26, alpha: 0.12).cgColor, lineWidth: 0.8, lineDashPattern: [3, 3])
return view return view
}() }()
lazy var rightDotView: UIView = { lazy var rightDotView: YHDashLineView = {
let view = UIView() let view = YHDashLineView(strokeColor: UIColor.init(hex: 0x121A26, alpha: 0.12).cgColor, lineWidth: 0.8, lineDashPattern: [3, 3])
return view return view
}() }()
lazy var leftDotLayer: CAShapeLayer = {
let layer = self.createDotLine(frame: leftDotView.bounds)
return layer
}()
lazy var rightDotLayer: CAShapeLayer = {
let layer = self.createDotLine(frame: leftDotView.bounds)
return layer
}()
required init?(coder: NSCoder) { required init?(coder: NSCoder) {
super.init(coder: coder) super.init(coder: coder)
} }
...@@ -115,25 +105,9 @@ class YHResignAppointedScheduleLineCell: UICollectionViewCell { ...@@ -115,25 +105,9 @@ class YHResignAppointedScheduleLineCell: UICollectionViewCell {
titleLabel.text = model.title titleLabel.text = model.title
timeLabel.text = model.time timeLabel.text = model.time
leftDotLayer.removeFromSuperlayer() numLabel.textColor = model.isNeedUserAction ? UIColor.mainTextColor(alpha: 0.7) : UIColor.mainTextColor(alpha: 0.18)
rightDotLayer.removeFromSuperlayer() titleLabel.textColor = model.isNeedUserAction ? UIColor.mainTextColor(alpha: 0.7) : UIColor.mainTextColor(alpha: 0.3)
leftDotLayer = createDotLine(frame: leftDotView.bounds) timeLabel.textColor = model.isNeedUserAction ? UIColor.mainTextColor(alpha: 0.3) : UIColor.mainTextColor(alpha: 0.18)
rightDotLayer = createDotLine(frame: rightDotView.bounds)
leftDotView.layer.addSublayer(leftDotLayer)
rightDotView.layer.addSublayer(rightDotLayer)
}
func createDotLine(frame:CGRect) -> CAShapeLayer {
let borderLayer = CAShapeLayer()
borderLayer.path = UIBezierPath(roundedRect: frame, cornerRadius: 0.0).cgPath
borderLayer.lineWidth = 0.8
//[数组第一个数字表示单个虚线长度,第二个数字表示间隔]
borderLayer.lineDashPattern = [3,3] as [NSNumber]?
//前边是虚线的长度,后边是虚线之间空隙的长度
borderLayer.lineDashPhase = 0.1
//实线边框
borderLayer.fillColor = UIColor.clear.cgColor
borderLayer.strokeColor = UIColor.init(hex: 0x121A26, alpha: 0.12).cgColor
return borderLayer
} }
} }
...@@ -13,9 +13,12 @@ class YHScheduleLineStepModel { ...@@ -13,9 +13,12 @@ class YHScheduleLineStepModel {
var index: Int = 0 var index: Int = 0
var title: String = "" var title: String = ""
var time: String = "" var time: String = ""
init(title: String, time: String) { var isNeedUserAction: Bool = true // 该步骤是否需要用户操作
init(title: String, time: String, isNeedUserAction: Bool = true) {
self.title = title self.title = title
self.time = time self.time = time
self.isNeedUserAction = isNeedUserAction
} }
} }
...@@ -24,7 +27,7 @@ class YHResignAppointedScheduleLineView: UIView { ...@@ -24,7 +27,7 @@ class YHResignAppointedScheduleLineView: UIView {
var steps:[YHScheduleLineStepModel] = { var steps:[YHScheduleLineStepModel] = {
let model1 = YHScheduleLineStepModel(title: "入境香港准备", time: "") let model1 = YHScheduleLineStepModel(title: "入境香港准备", time: "")
let model2 = YHScheduleLineStepModel(title: "已确认在港", time: "2024-03-14") let model2 = YHScheduleLineStepModel(title: "已确认在港", time: "2024-03-14")
let model3 = YHScheduleLineStepModel(title: "银河递交续签资料", time: "2024-03-14") let model3 = YHScheduleLineStepModel(title: "银河递交续签资料", time: "2024-03-14", isNeedUserAction: false)
let model4 = YHScheduleLineStepModel(title: "查看递交回执", time: "2024-03-14") let model4 = YHScheduleLineStepModel(title: "查看递交回执", time: "2024-03-14")
let model5 = YHScheduleLineStepModel(title: "在港等待获批/离港", time: "") let model5 = YHScheduleLineStepModel(title: "在港等待获批/离港", time: "")
let model6 = YHScheduleLineStepModel(title: "在港等缴费领取新签证", time: "") let model6 = YHScheduleLineStepModel(title: "在港等缴费领取新签证", time: "")
...@@ -85,7 +88,7 @@ extension YHResignAppointedScheduleLineView: UICollectionViewDelegate, UICollect ...@@ -85,7 +88,7 @@ extension YHResignAppointedScheduleLineView: UICollectionViewDelegate, UICollect
if width < 65.0 { if width < 65.0 {
width = 65.0 width = 65.0
} }
width += 9.0*2 width += 18.0
return CGSize(width: width, height: 84.0) return CGSize(width: width, height: 84.0)
} }
return .zero return .zero
......
//
// YHResignAppointedRiskTipsView.swift
// galaxy
//
// Created by edy on 2024/10/11.
// Copyright © 2024 https://www.galaxy-immi.com. All rights reserved.
//
import UIKit
import AttributedString
class YHResignAppointedScheduleRiskTipsView: UIView {
var confirmBlock:(()->())?
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
}()
static func alertView() -> YHResignAppointedScheduleRiskTipsView {
let view = YHResignAppointedScheduleRiskTipsView(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()
}
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)
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)
}
confirmBtn.snp.makeConstraints { make in
make.top.equalTo(secondDetailLabel.snp.bottom).offset(21)
make.left.equalTo(16)
make.right.equalTo(-16)
make.bottom.equalTo(-16)
make.height.equalTo(45)
}
}
}
...@@ -11,8 +11,10 @@ import AttributedString ...@@ -11,8 +11,10 @@ import AttributedString
class YHResignUploadDocListViewController: YHBaseViewController { class YHResignUploadDocListViewController: YHBaseViewController {
var orderId: Int = 0 var orderId: Int = 0
lazy var viewModel: YHTravelDocsPreparationViewModel = { // 批次id
let vm = YHTravelDocsPreparationViewModel() var batchId: Int = 0
lazy var viewModel: YHResignUploadDocListViewModel = {
let vm = YHResignUploadDocListViewModel()
return vm return vm
}() }()
...@@ -85,21 +87,14 @@ class YHResignUploadDocListViewController: YHBaseViewController { ...@@ -85,21 +87,14 @@ class YHResignUploadDocListViewController: YHBaseViewController {
private extension YHResignUploadDocListViewController { private extension YHResignUploadDocListViewController {
func loadData() { func loadData() {
let params: [String : Any] = ["order_id": orderId] viewModel.getUploadDocProgress(orderID: orderId, stepID: batchId) {[weak self] success, err in
YHHUD.show(.progress(message: "加载中...")) guard let self = self else { return }
viewModel.getTravelDocsList(param: params){ success, error in viewModel.getUploadDocList(orderID: orderId, stepID: batchId) {[weak self] success, err in
YHHUD.hide() guard let self = self else { return }
if success { self.tableView.reloadData()
} else {
// let msg = error?.errorMsg ?? "获取数据出错"
// YHHUD.flash(message: msg)
// DispatchQueue.main.asyncAfter(deadline: .now() + 0.5) {
// self.navigationController?.popViewController()
// }
} }
self.tableView.reloadData()
} }
} }
func setupUI() { func setupUI() {
...@@ -180,6 +175,22 @@ extension YHResignUploadDocListViewController: UITableViewDelegate, UITableViewD ...@@ -180,6 +175,22 @@ extension YHResignUploadDocListViewController: UITableViewDelegate, UITableViewD
func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell { func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell {
let approveCell = tableView.dequeueReusableCell(withIdentifier: YHResignUploadDocListCell.cellReuseIdentifier, for: indexPath) as! YHResignUploadDocListCell let approveCell = tableView.dequeueReusableCell(withIdentifier: YHResignUploadDocListCell.cellReuseIdentifier, for: indexPath) as! YHResignUploadDocListCell
approveCell.section = indexPath.section
if indexPath.section == 0 {
approveCell.title = "资料上传"
approveCell.dataSource = self.viewModel.mainModel.upload_list
} else {
approveCell.title = "文书确认"
approveCell.dataSource = self.viewModel.mainModel.doc_list
}
approveCell.clickBlock = { [weak self] model, section in
guard let self = self else { return }
if section == 0 {
// 跳转文件上传
} else {
// 跳转列表
}
}
return approveCell return approveCell
} }
......
//
// YHResignUploadDocListProgressModel.swift
// galaxy
//
// Created by EDY on 2024/10/11.
// Copyright © 2024 https://www.galaxy-immi.com. All rights reserved.
//
import UIKit
import SmartCodable
class YHResignUploadDocListProgressModel: SmartCodable {
var progress : Int = -1 //电子签证有效期
var is_need_supplement : Bool = true
required init() {
}
}
class YHResignUploadDocListModel: SmartCodable {
var supplement_voucher_url : String = ""
var supplement_deadline : String = ""
var upload_list : [YHResignUploadDocModel] = []
var doc_list : [YHResignUploadDocModel] = []
required init() {
}
}
class YHResignUploadDocModel: SmartCodable {
var name : String = ""
var status : Int = 0
var id : Int = 0
required init() {
}
}
...@@ -11,13 +11,19 @@ import UIKit ...@@ -11,13 +11,19 @@ import UIKit
class YHResignUploadDocListCell: UITableViewCell { class YHResignUploadDocListCell: UITableViewCell {
static let cellReuseIdentifier = "YHResignUploadDocListCell" static let cellReuseIdentifier = "YHResignUploadDocListCell"
typealias ExperienceListBlock = (_ model: YHAdopterDependentModel) -> () typealias ExperienceListBlock = (_ model: YHResignUploadDocModel, _ section: Int) -> ()
var clickBlock: ExperienceListBlock? var clickBlock: ExperienceListBlock?
var centerView: UIView! var centerView: UIView!
var titleLabel: UILabel! var titleLabel: UILabel!
var mainItemView: UIView! var mainItemView: UIView!
var lineView: UIView! var lineView: UIView!
var dataSource: [YHAdopterDependentModel]? { var title: String = "" {
didSet {
titleLabel.text = title
}
}
var section : Int = 0
var dataSource: [YHResignUploadDocModel]? {
didSet { didSet {
updateAllViews() updateAllViews()
} }
...@@ -123,13 +129,17 @@ class YHResignUploadDocListCell: UITableViewCell { ...@@ -123,13 +129,17 @@ class YHResignUploadDocListCell: UITableViewCell {
itemView.clickBlock = {[weak self] model in itemView.clickBlock = {[weak self] model in
guard let self = self else { return } guard let self = self else { return }
if let block = self.clickBlock { if let block = self.clickBlock {
block(model) block(model, self.section)
} }
} }
let model = dataSource[i] let model = dataSource[i]
itemView.tag = 4000 + i itemView.tag = 4000 + i
itemView.dataSource = dataSource[i] if section == 0 {
itemView.dataSource = dataSource[i]
} else {
itemView.docDataSource = dataSource[i]
}
mainItemView.addSubview(itemView) mainItemView.addSubview(itemView)
itemView.snp.makeConstraints { make in itemView.snp.makeConstraints { make in
make.left.equalTo(18) make.left.equalTo(18)
...@@ -145,7 +155,7 @@ class YHResignUploadDocListCell: UITableViewCell { ...@@ -145,7 +155,7 @@ class YHResignUploadDocListCell: UITableViewCell {
class YHResignUploadDocItemView: UIView { class YHResignUploadDocItemView: UIView {
typealias ItemBlock = (_ model: YHAdopterDependentModel) -> () typealias ItemBlock = (_ model: YHResignUploadDocModel) -> ()
var clickBlock: ItemBlock? var clickBlock: ItemBlock?
var deleteBlock: ItemBlock? var deleteBlock: ItemBlock?
var titleLabel: UILabel! var titleLabel: UILabel!
...@@ -153,11 +163,16 @@ class YHResignUploadDocItemView: UIView { ...@@ -153,11 +163,16 @@ class YHResignUploadDocItemView: UIView {
var nextStepImageView: UIImageView! var nextStepImageView: UIImageView!
var centerButton: UIButton! var centerButton: UIButton!
var dataSource: YHAdopterDependentModel? { var dataSource: YHResignUploadDocModel? {
didSet { didSet {
updateAllViews() updateAllViews()
} }
} }
var docDataSource: YHResignUploadDocModel? {
didSet {
updateDocAllViews()
}
}
override init(frame: CGRect) { override init(frame: CGRect) {
super.init(frame: frame) super.init(frame: frame)
backgroundColor = .white backgroundColor = .white
...@@ -224,21 +239,13 @@ class YHResignUploadDocItemView: UIView { ...@@ -224,21 +239,13 @@ class YHResignUploadDocItemView: UIView {
func updateAllViews() { func updateAllViews() {
guard let dataSource = dataSource else { return } guard let dataSource = dataSource else { return }
var spouse = "子女" titleLabel.text = dataSource.name
if dataSource.is_spouse == 1 { if dataSource.status == 3 {
spouse = "配偶"
}
if dataSource.dep_name.count != 0 {
titleLabel.text = spouse + "(\(dataSource.dep_name))"
} else {
titleLabel.text = spouse
}
if dataSource.status == 0 {
explainLabel.text = "待上传" explainLabel.text = "待上传"
explainLabel.textColor = UIColor.brandMainColor explainLabel.textColor = UIColor.brandMainColor
nextStepImageView.image = UIImage(named: "service_adopter_income_start") nextStepImageView.image = UIImage(named: "service_adopter_income_start")
} }
if dataSource.status == 1 { if dataSource.status == 0 {
explainLabel.text = "审核中" explainLabel.text = "审核中"
explainLabel.textColor = UIColor(hex: 0xff8000) explainLabel.textColor = UIColor(hex: 0xff8000)
nextStepImageView.image = UIImage(named: "service_adopter_income_wait") nextStepImageView.image = UIImage(named: "service_adopter_income_wait")
...@@ -248,32 +255,46 @@ class YHResignUploadDocItemView: UIView { ...@@ -248,32 +255,46 @@ class YHResignUploadDocItemView: UIView {
explainLabel.textColor = UIColor.failColor explainLabel.textColor = UIColor.failColor
nextStepImageView.image = UIImage(named: "service_adopter_income_fail") nextStepImageView.image = UIImage(named: "service_adopter_income_fail")
} }
if dataSource.status == 3 { if dataSource.status == 1 {
explainLabel.text = "已完成" explainLabel.text = "已完成"
explainLabel.textColor = UIColor(hex: 0x3cc694) explainLabel.textColor = UIColor(hex: 0x3cc694)
nextStepImageView.image = UIImage(named: "service_adopter_income_success") nextStepImageView.image = UIImage(named: "service_adopter_income_success")
} }
} }
func updateDocAllViews() { func updateDocAllViews() {
guard let dataSource = dataSource else { return } guard let dataSource = dataSource else { return }
if dataSource.status == 0 { titleLabel.text = dataSource.name
explainLabel.text = "待确认"// “待签字” if dataSource.status == 1 {
explainLabel.textColor = UIColor.brandMainColor explainLabel.textColor = UIColor.brandMainColor
nextStepImageView.image = UIImage(named: "service_adopter_income_start") nextStepImageView.image = UIImage(named: "service_adopter_income_start")
} }
if dataSource.status == 1 { if dataSource.status == 4 {
explainLabel.text = "写作中"// 定稿中 审核中 explainLabel.text = "待签字"
explainLabel.textColor = UIColor.brandMainColor
nextStepImageView.image = UIImage(named: "service_adopter_income_start")
}
if dataSource.status == 0 {
explainLabel.text = "写作中"//
explainLabel.textColor = UIColor(hex: 0xff8000) explainLabel.textColor = UIColor(hex: 0xff8000)
nextStepImageView.image = UIImage(named: "service_adopter_income_wait") nextStepImageView.image = UIImage(named: "service_adopter_income_wait")
} }
if dataSource.status == 2 { if dataSource.status == 2 {
explainLabel.text = "定稿中"// 定稿中 审核中
explainLabel.textColor = UIColor(hex: 0xff8000)
nextStepImageView.image = UIImage(named: "service_adopter_income_wait")
}
if dataSource.status == 3 {
explainLabel.text = "审核中"// 定稿中 审核中
explainLabel.textColor = UIColor(hex: 0xff8000)
nextStepImageView.image = UIImage(named: "service_adopter_income_wait")
}
if dataSource.status == 6 {
explainLabel.text = "已驳回" explainLabel.text = "已驳回"
explainLabel.textColor = UIColor.failColor explainLabel.textColor = UIColor.failColor
nextStepImageView.image = UIImage(named: "service_adopter_income_fail") nextStepImageView.image = UIImage(named: "service_adopter_income_fail")
} }
if dataSource.status == 3 { if dataSource.status == 5 {
explainLabel.text = "已完成" explainLabel.text = "已完成"
explainLabel.textColor = UIColor(hex: 0x3cc694) explainLabel.textColor = UIColor(hex: 0x3cc694)
nextStepImageView.image = UIImage(named: "service_adopter_income_success") nextStepImageView.image = UIImage(named: "service_adopter_income_success")
...@@ -284,7 +305,7 @@ class YHResignUploadDocItemView: UIView { ...@@ -284,7 +305,7 @@ class YHResignUploadDocItemView: UIView {
@objc func centerClick() { @objc func centerClick() {
if let block = clickBlock { if let block = clickBlock {
block(self.dataSource ?? YHAdopterDependentModel()) block(self.dataSource ?? YHResignUploadDocModel())
} }
} }
......
//
// YHResignUploadDocListViewModel.swift
// galaxy
//
// Created by EDY on 2024/10/11.
// Copyright © 2024 https://www.galaxy-immi.com. All rights reserved.
//
import UIKit
class YHResignUploadDocListViewModel: YHBaseViewModel {
var progressModel : YHResignUploadDocListProgressModel = YHResignUploadDocListProgressModel()
//列表信息
var mainModel : YHResignUploadDocListModel = YHResignUploadDocListModel()
}
extension YHResignUploadDocListViewModel {
func getUploadDocProgress(orderID: Int, stepID: Int, callBackBlock:@escaping (_ success: Bool,_ err:YHErrorModel?)->()) {
let params: [String : Any] = ["order_id": orderID, "renewal_id": stepID]
let strUrl = YHBaseUrlManager.shared.curURL() + YHAllApiName.ResignUploadDoc.progress
let _ = YHNetRequest.getRequest(url: strUrl, params:params) { [weak self] json, code in
//1. json字符串 转 对象
guard let self = self else { return }
if json.code == 200 {
guard let dic = json.data?.peel as? [String : Any], let resultModel = YHResignUploadDocListProgressModel.deserialize(from: dic) else {
let err = YHErrorModel(errorCode: YHErrorCode.dictParseError.rawValue, errorMsg: YHErrorCode.dictParseError.description())
callBackBlock(false, err)
return
}
self.progressModel = resultModel
callBackBlock(true, nil)
} else {
let err = YHErrorModel(errorCode: Int32(json.code), errorMsg: json.msg.isEmpty ? "" : json.msg)
callBackBlock(false,err)
}
} failBlock: { err in
callBackBlock(false,err)
}
}
func getUploadDocList(orderID: Int, stepID: Int, callBackBlock:@escaping (_ success: Bool,_ err:YHErrorModel?)->()) {
let params: [String : Any] = ["order_id": orderID, "renewal_id": stepID]
let strUrl = YHBaseUrlManager.shared.curURL() + YHAllApiName.ResignUploadDoc.list
let _ = YHNetRequest.getRequest(url: strUrl, params:params) { [weak self] json, code in
//1. json字符串 转 对象
guard let self = self else { return }
if json.code == 200 {
guard let dic = json.data?.peel as? [String : Any], let resultModel = YHResignUploadDocListModel.deserialize(from: dic) else {
let err = YHErrorModel(errorCode: YHErrorCode.dictParseError.rawValue, errorMsg: YHErrorCode.dictParseError.description())
callBackBlock(false, err)
return
}
self.mainModel = resultModel
callBackBlock(true, nil)
} else {
let err = YHErrorModel(errorCode: Int32(json.code), errorMsg: json.msg.isEmpty ? "" : json.msg)
callBackBlock(false,err)
}
} failBlock: { err in
callBackBlock(false,err)
}
}
}
...@@ -349,7 +349,6 @@ extension YHMyViewController : UITableViewDelegate, UITableViewDataSource { ...@@ -349,7 +349,6 @@ extension YHMyViewController : UITableViewDelegate, UITableViewDataSource {
//// self.navigationController?.pushViewController(vc) //// self.navigationController?.pushViewController(vc)
// return // return
// } // }
let item: PersonalModuleItem = items[indexPath.row] let item: PersonalModuleItem = items[indexPath.row]
switch item.type { switch item.type {
case .myCard://我的名片 case .myCard://我的名片
......
...@@ -563,4 +563,11 @@ class YHAllApiName { ...@@ -563,4 +563,11 @@ class YHAllApiName {
// 在港记录-家庭成员列表 // 在港记录-家庭成员列表
static let stayInHKRecordFamilyMembers = "super-app/stay-in-hk-record/family-members" static let stayInHKRecordFamilyMembers = "super-app/stay-in-hk-record/family-members"
} }
//续签段 - 10续签补件
struct ResignUploadDoc {
static let progress = "super-app/renewal/supplement/progress"
static let list = "super-app/renewal/supplement/list"
}
} }
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