Commit 212e27c5 authored by Steven杜宇's avatar Steven杜宇

// 预约

parent cc737efd
......@@ -487,6 +487,8 @@
04912F8E2CB916F500CC3105 /* YHResignAppointViewModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = 04912F8D2CB916F500CC3105 /* YHResignAppointViewModel.swift */; };
04912F902CB917BC00CC3105 /* YHResignAppointMember.swift in Sources */ = {isa = PBXBuildFile; fileRef = 04912F8F2CB917BC00CC3105 /* YHResignAppointMember.swift */; };
04912F922CB91A6F00CC3105 /* YHResignAppointGroup.swift in Sources */ = {isa = PBXBuildFile; fileRef = 04912F912CB91A6F00CC3105 /* YHResignAppointGroup.swift */; };
04912F942CB921C300CC3105 /* YHResignAppointContainerViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 04912F932CB921C300CC3105 /* YHResignAppointContainerViewController.swift */; };
04912F962CB924DA00CC3105 /* YHResignAppointTimeModifyViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 04912F952CB924DA00CC3105 /* YHResignAppointTimeModifyViewController.swift */; };
0493B3DC2BA7EFE600AF9393 /* YHCertificateSearchViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0493B3DB2BA7EFE600AF9393 /* YHCertificateSearchViewController.swift */; };
0493B3DE2BA80C2300AF9393 /* YHCertificateFilterButton.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0493B3DD2BA80C2300AF9393 /* YHCertificateFilterButton.swift */; };
049537852BA9B28500AF7E59 /* YHCertificateTemplateCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = 049537842BA9B28500AF7E59 /* YHCertificateTemplateCell.swift */; };
......@@ -1392,6 +1394,8 @@
04912F8D2CB916F500CC3105 /* YHResignAppointViewModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHResignAppointViewModel.swift; sourceTree = "<group>"; };
04912F8F2CB917BC00CC3105 /* YHResignAppointMember.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHResignAppointMember.swift; sourceTree = "<group>"; };
04912F912CB91A6F00CC3105 /* YHResignAppointGroup.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHResignAppointGroup.swift; sourceTree = "<group>"; };
04912F932CB921C300CC3105 /* YHResignAppointContainerViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHResignAppointContainerViewController.swift; sourceTree = "<group>"; };
04912F952CB924DA00CC3105 /* YHResignAppointTimeModifyViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHResignAppointTimeModifyViewController.swift; sourceTree = "<group>"; };
0493B3DB2BA7EFE600AF9393 /* YHCertificateSearchViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHCertificateSearchViewController.swift; sourceTree = "<group>"; };
0493B3DD2BA80C2300AF9393 /* YHCertificateFilterButton.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHCertificateFilterButton.swift; sourceTree = "<group>"; };
049537842BA9B28500AF7E59 /* YHCertificateTemplateCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHCertificateTemplateCell.swift; sourceTree = "<group>"; };
......@@ -3463,7 +3467,9 @@
04912F662CB6A59500CC3105 /* C */ = {
isa = PBXGroup;
children = (
04912F932CB921C300CC3105 /* YHResignAppointContainerViewController.swift */,
04912F6F2CB765FE00CC3105 /* YHResignAppointTimeViewController.swift */,
04912F952CB924DA00CC3105 /* YHResignAppointTimeModifyViewController.swift */,
04F4A5272CB8D4270026D469 /* YHResignAppointSubmitScheduleViewController.swift */,
);
path = C;
......@@ -5514,6 +5520,7 @@
045EEEBC2B9F171A0022A143 /* YHClipperButton.swift in Sources */,
0414708B2C88627B00B7B688 /* YHButlerServiceManager.swift in Sources */,
0430E66A2C7493A5000511E2 /* YHAdopterExampleTableViewCell.swift in Sources */,
04912F962CB924DA00CC3105 /* YHResignAppointTimeModifyViewController.swift in Sources */,
045EEF102B9F171A0022A143 /* YHMainApplicantInformationViewModel.swift in Sources */,
0493B3DC2BA7EFE600AF9393 /* YHCertificateSearchViewController.swift in Sources */,
A5DF9C632C78733200CE48E6 /* YHHKLegaldaysModel.swift in Sources */,
......@@ -5914,6 +5921,7 @@
0430E65E2C74624E000511E2 /* YHAdopterCardTableViewCell.swift in Sources */,
045EEF1F2B9F171A0022A143 /* YHDatePickView.swift in Sources */,
04174D7A2BCD5B74000BA46D /* YHDetailMessageCell.swift in Sources */,
04912F942CB921C300CC3105 /* YHResignAppointContainerViewController.swift in Sources */,
045EEE972B9F171A0022A143 /* YHPreviewInfoWorkExpView.swift in Sources */,
044BACC72BCFA58E00184C64 /* YHNoDataTipsView.swift in Sources */,
04D5C5662B8ED92600190021 /* YHBaseModel.swift in Sources */,
......
//
// YHResignAppointContainerViewController.swift
// galaxy
//
// Created by edy on 2024/10/11.
// Copyright © 2024 https://www.galaxy-immi.com. All rights reserved.
//
import UIKit
class YHResignAppointContainerViewController: YHBaseViewController {
var renewalId: Int = 0
let viewModel = YHResignAppointViewModel()
lazy var appointVC: YHResignAppointTimeViewController = {
let vc = YHResignAppointTimeViewController()
vc.view.isHidden = true
return vc
}()
lazy var scheduleVC: YHResignAppointSubmitScheduleViewController = {
let vc = YHResignAppointSubmitScheduleViewController()
vc.view.isHidden = true
return vc
}()
override func viewDidLoad() {
super.viewDidLoad()
gk_navigationBar.isHidden = true
self.addChild(appointVC)
self.addChild(scheduleVC)
self.view.addSubview(appointVC.view)
self.view.addSubview(scheduleVC.view)
YHHUD.show(.progress(message: "加载中..."))
viewModel.getAppointInfoList(renewalId: renewalId) { success, error in
YHHUD.hide()
guard let self = self else { return }
if self.viewModel.appointInfoListModel.renewal_List.count <= 0 { // 没有预约过
self.appointVC.view.isHidden = false
self.scheduleVC.view.isHidden = true
} else { // 预约过
self.scheduleVC.view.isHidden = false
self.appointVC.view.isHidden = true
}
}
}
}
......@@ -24,13 +24,9 @@ class YHResignAppointSubmitScheduleViewController: YHBaseViewController {
tableView.backgroundColor = .clear
tableView.separatorStyle = .none
tableView.bounces = false
tableView.register(YHResignAppointTimeSingleCell.self, forCellReuseIdentifier: YHResignAppointTimeSingleCell.cellReuseIdentifier)
tableView.register(YHResignAppointOptionCell.self, forCellReuseIdentifier: YHResignAppointOptionCell.cellReuseIdentifier)
tableView.register(YHResignAppointApplicantInfoCell.self, forCellReuseIdentifier: YHResignAppointApplicantInfoCell.cellReuseIdentifier)
tableView.register(YHResignAppointOptionResultCell.self, forCellReuseIdentifier: YHResignAppointOptionResultCell.cellReuseIdentifier)
tableView.register(YHResignHaveAppointedMultipleInfoCell.self, forCellReuseIdentifier: YHResignHaveAppointedMultipleInfoCell.cellReuseIdentifier)
tableView.register(YHResignHaveAppointedSingleInfoCell.self, forCellReuseIdentifier: YHResignHaveAppointedSingleInfoCell.cellReuseIdentifier)
tableView.register(YHResignAppointTimeMultipleCell.self, forCellReuseIdentifier: YHResignAppointTimeMultipleCell.cellReuseIdentifier)
tableView.delegate = self
tableView.dataSource = self
return tableView
......
//
// YHResignAppointTimeModifyViewController.swift
// galaxy
//
// Created by edy on 2024/10/11.
// Copyright © 2024 https://www.galaxy-immi.com. All rights reserved.
//
import UIKit
import AttributedString
import SwifterSwift
class YHResignAppointTimeModifyViewController: YHBaseViewController {
var familyArr: [String] = ["", "", "", "", ""]
lazy var tableView: UITableView = {
let tableView = UITableView(frame: CGRect.zero, style:.grouped)
if #available(iOS 15.0, *) {
tableView.sectionHeaderTopPadding = 0.0
}
tableView.estimatedSectionHeaderHeight = 0.1
tableView.estimatedSectionFooterHeight = 16.0
tableView.contentInsetAdjustmentBehavior = .never
tableView.showsVerticalScrollIndicator = false
tableView.backgroundColor = .clear
tableView.separatorStyle = .none
tableView.bounces = false
tableView.register(YHResignAppointTimeSingleCell.self, forCellReuseIdentifier: YHResignAppointTimeSingleCell.cellReuseIdentifier)
tableView.register(YHResignAppointOptionCell.self, forCellReuseIdentifier: YHResignAppointOptionCell.cellReuseIdentifier)
tableView.register(YHResignAppointApplicantInfoCell.self, forCellReuseIdentifier: YHResignAppointApplicantInfoCell.cellReuseIdentifier)
tableView.register(YHResignAppointOptionResultCell.self, forCellReuseIdentifier: YHResignAppointOptionResultCell.cellReuseIdentifier)
tableView.register(YHResignHaveAppointedMultipleInfoCell.self, forCellReuseIdentifier: YHResignHaveAppointedMultipleInfoCell.cellReuseIdentifier)
tableView.register(YHResignHaveAppointedSingleInfoCell.self, forCellReuseIdentifier: YHResignHaveAppointedSingleInfoCell.cellReuseIdentifier)
tableView.register(YHResignAppointTimeMultipleCell.self, forCellReuseIdentifier: YHResignAppointTimeMultipleCell.cellReuseIdentifier)
tableView.delegate = self
tableView.dataSource = self
return tableView
}()
lazy var tipsBtn: UIButton = {
let button = UIButton()
button.setTitle("递交提示", for: .normal)
button.titleLabel?.font = .PFSC_R(ofSize: 11)
button.setTitleColor(UIColor.mainTextColor, for: .normal)
button.setImage(UIImage(named: "resign_appoint_tips_btn"), for: .normal)
button.centerTextAndImage(imageAboveText: true, spacing: 0.0)
return button
}()
lazy var submitBtn: UIButton = {
let btn = UIButton()
btn.backgroundColor = .brandMainColor
btn.setTitle("确认提交", for: .normal)
btn.setTitleColor(.white, for: .normal)
btn.titleLabel?.font = UIFont.PFSC_M(ofSize: 15)
btn.addTarget(self, action: #selector(didSubmitBtnClicked), for: .touchUpInside)
btn.layer.cornerRadius = kCornerRadius3
return btn
}()
lazy var bottomView: UIView = {
let view = UIView()
view.backgroundColor = .white
view.addSubview(tipsBtn)
view.addSubview(submitBtn)
tipsBtn.snp.makeConstraints { make in
make.left.equalTo(22)
make.width.equalTo(44)
make.height.equalTo(48)
make.centerY.equalTo(submitBtn)
}
submitBtn.snp.makeConstraints { make in
make.left.equalTo(tipsBtn.snp.right).offset(22)
make.right.equalTo(-20)
make.top.equalTo(8)
make.height.equalTo(48)
}
return view
}()
override func viewDidLoad() {
super.viewDidLoad()
self.gk_navTitle = "预约在港递交时间"
self.gk_navigationBar.backgroundColor = .white
self.view.backgroundColor = .init(hex: 0xF8F9FB)
self.view.addSubview(tableView)
self.view.addSubview(bottomView)
self.tableView.snp.makeConstraints { make in
make.left.equalTo(16)
make.right.equalTo(-16)
make.top.equalTo(k_Height_NavigationtBarAndStatuBar+16)
make.bottom.equalTo(bottomView.snp.top)
}
self.bottomView.snp.makeConstraints { make in
make.left.right.bottom.equalToSuperview()
make.height.equalTo(98)
}
}
@objc func didSubmitBtnClicked() {
}
}
extension YHResignAppointTimeModifyViewController: UITableViewDelegate, UITableViewDataSource {
func tableView(_ tableView: UITableView, numberOfRowsInSection section: Int) -> Int {
return familyArr.count
}
func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell {
let cell2 = tableView.dequeueReusableCell(withIdentifier: YHResignAppointTimeSingleCell.cellReuseIdentifier, for: indexPath) as! YHResignAppointTimeSingleCell
if 0 <= indexPath.row && indexPath.row < familyArr.count {
if indexPath.row == 0 {
let cell1 = tableView.dequeueReusableCell(withIdentifier: YHResignAppointOptionResultCell.cellReuseIdentifier, for: indexPath) as! YHResignAppointOptionResultCell
return cell1
}
if indexPath.row == 1 {
let cell1 = tableView.dequeueReusableCell(withIdentifier: YHResignAppointOptionCell.cellReuseIdentifier, for: indexPath) as! YHResignAppointOptionCell
return cell1
}
if indexPath.row == 2 {
let cell1 = tableView.dequeueReusableCell(withIdentifier: YHResignAppointApplicantInfoCell.cellReuseIdentifier, for: indexPath) as! YHResignAppointApplicantInfoCell
return cell1
}
if indexPath.row == 3 {
let cell1 = tableView.dequeueReusableCell(withIdentifier: YHResignHaveAppointedSingleInfoCell.cellReuseIdentifier, for: indexPath) as! YHResignHaveAppointedSingleInfoCell
return cell1
}
if indexPath.row == 4 {
let cell1 = tableView.dequeueReusableCell(withIdentifier: YHResignAppointTimeMultipleCell.cellReuseIdentifier, for: indexPath) as! YHResignAppointTimeMultipleCell
return cell1
}
}
return cell2
}
func tableView(_ tableView: UITableView, heightForRowAt indexPath: IndexPath) -> CGFloat {
return UITableView.automaticDimension
}
func tableView(_ tableView: UITableView, didSelectRowAt indexPath: IndexPath) {
if 0 <= indexPath.row && indexPath.row < familyArr.count {
let model = familyArr[indexPath.row]
}
}
private func tableView(_ tableView: UITableView, viewForHeaderInSection section: Int) -> CGFloat {
return 0.1
}
private func tableView(_ tableView: UITableView, viewForFooterInSection section: Int) -> CGFloat {
return 16
}
func tableView(_ tableView: UITableView, viewForFooterInSection section: Int) -> UIView? {
let view = UIView()
return view
}
func tableView(_ tableView: UITableView, viewForHeaderInSection section: Int) -> UIView? {
let view = UIView()
return view
}
}
......@@ -9,6 +9,16 @@
import UIKit
import SmartCodable
class YHResignAppointListModel: SmartCodable {
var is_together: Int = 0 // 1 是2不是 一起赴港
var renewal_List: [YHResignAppointGroup] = []
required init() {
}
}
class YHResignAppointGroup: SmartCodable {
var id: Int = 0
......
......@@ -149,8 +149,5 @@ class YHResignAppointedScheduleMultipleItemView: UIView {
make.height.equalTo(84.0)
make.bottom.equalTo(-18)
}
}
}
......@@ -10,7 +10,10 @@ import UIKit
class YHResignAppointViewModel: NSObject {
// 赴港人员列表
var appointUsers: [YHResignAppointMember] = []
// 预约列表预约
var appointInfoListModel: YHResignAppointListModel = YHResignAppointListModel()
// 赴港人员列表
func getResignAppointUserlist(renewalId: Int, callBack: @escaping (_ success: Bool,_ error: YHErrorModel?)->()) {
......@@ -43,5 +46,28 @@ class YHResignAppointViewModel: NSObject {
}
}
// 预约列表预约
func getAppointInfoList(renewalId: Int, callBack: @escaping (_ success: Bool,_ error: YHErrorModel?)->()) {
let params = ["renewal_id" : renewalId]
let strUrl = YHBaseUrlManager.shared.curURL() + YHAllApiName.ResignAppoint.appointInfoList
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 = YHResignAppointListModel.deserialize(from: dic) else {
let err = YHErrorModel(errorCode: YHErrorCode.dictParseError.rawValue, errorMsg: YHErrorCode.dictParseError.description())
callBackBlock(false, err)
return
}
self.appointInfoListModel = 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)
}
}
}
......@@ -552,6 +552,8 @@ class YHAllApiName {
struct ResignAppoint {
// 赴港人员列表
static let appointUserList = "super-app/renewal/user"
// 预约列表预约
static let appointInfoList = "super-app/renewal/reservation/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