Commit 94becfc6 authored by Steven杜宇's avatar Steven杜宇

// 行程

parent 7f75569a
...@@ -214,6 +214,7 @@ class YHServiceOrderListView: YHBaseViewController { ...@@ -214,6 +214,7 @@ class YHServiceOrderListView: YHBaseViewController {
} else if type == 34 { } else if type == 34 {
//在港递交预约 //在港递交预约
let vc = YHResignAppointContainerViewController() let vc = YHResignAppointContainerViewController()
vc.orderId = orderId
vc.renewalId = stepId vc.renewalId = stepId
UIViewController.current?.navigationController?.pushViewController(vc) UIViewController.current?.navigationController?.pushViewController(vc)
......
...@@ -10,11 +10,16 @@ import UIKit ...@@ -10,11 +10,16 @@ import UIKit
class YHResignAppointContainerViewController: YHBaseViewController { class YHResignAppointContainerViewController: YHBaseViewController {
// 订单ID
var orderId: Int = 0
// 批次ID
var renewalId: Int = 0 var renewalId: Int = 0
let viewModel = YHResignAppointViewModel() let viewModel = YHResignAppointViewModel()
lazy var appointVC: YHResignAppointTimeViewController = { lazy var appointVC: YHResignAppointTimeViewController = {
let vc = YHResignAppointTimeViewController() let vc = YHResignAppointTimeViewController()
vc.orderId = orderId
vc.renewalId = renewalId vc.renewalId = renewalId
vc.view.isHidden = true vc.view.isHidden = true
return vc return vc
...@@ -22,6 +27,7 @@ class YHResignAppointContainerViewController: YHBaseViewController { ...@@ -22,6 +27,7 @@ class YHResignAppointContainerViewController: YHBaseViewController {
lazy var scheduleVC: YHResignAppointSubmitScheduleViewController = { lazy var scheduleVC: YHResignAppointSubmitScheduleViewController = {
let vc = YHResignAppointSubmitScheduleViewController() let vc = YHResignAppointSubmitScheduleViewController()
vc.orderId = orderId
vc.renewalId = renewalId vc.renewalId = renewalId
vc.view.isHidden = true vc.view.isHidden = true
return vc return vc
......
...@@ -10,7 +10,11 @@ import UIKit ...@@ -10,7 +10,11 @@ import UIKit
class YHResignAppointSubmitScheduleViewController: YHBaseViewController { class YHResignAppointSubmitScheduleViewController: YHBaseViewController {
// 订单ID
var orderId: Int = 0
// 批次ID
var renewalId: Int = 0 var renewalId: Int = 0
let viewModel = YHResignAppointViewModel() let viewModel = YHResignAppointViewModel()
var scheduleArr: [YHResignAppointGroup] = [] { var scheduleArr: [YHResignAppointGroup] = [] {
didSet { didSet {
...@@ -111,7 +115,11 @@ class YHResignAppointSubmitScheduleViewController: YHBaseViewController { ...@@ -111,7 +115,11 @@ class YHResignAppointSubmitScheduleViewController: YHBaseViewController {
} }
@objc func didNextBtnClicked() { @objc func didNextBtnClicked() {
//查看续签结果
let vc = YHLookResignResultViewController()
vc.orderId = orderId
vc.batchId = renewalId
self.navigationController?.pushViewController(vc)
} }
@objc func didGuideBtnClicked() { @objc func didGuideBtnClicked() {
......
...@@ -14,6 +14,9 @@ import SwifterSwift ...@@ -14,6 +14,9 @@ import SwifterSwift
class YHResignAppointTimeViewController: YHBaseViewController { class YHResignAppointTimeViewController: YHBaseViewController {
// 订单ID
var orderId: Int = 0
// 批次ID
var renewalId: Int = 0 var renewalId: Int = 0
// 所有预约人员 // 所有预约人员
......
...@@ -42,7 +42,7 @@ class YHResignAppointGroup: SmartCodable { ...@@ -42,7 +42,7 @@ class YHResignAppointGroup: SmartCodable {
func getConfirmInHKStatus() -> YHResignConfirmHKStatus { func getConfirmInHKStatus() -> YHResignConfirmHKStatus {
let dateFormatter = DateFormatter() let dateFormatter = DateFormatter()
dateFormatter.dateFormat = "yyyy-MM-dd HH:mm:ss" dateFormatter.dateFormat = "yyyy-MM-dd HH:mm"
let nowDateString = dateFormatter.string(from: Date()) let nowDateString = dateFormatter.string(from: Date())
var confirmStatus = YHResignConfirmHKStatus.waitConfirmHK var confirmStatus = YHResignConfirmHKStatus.waitConfirmHK
...@@ -59,9 +59,20 @@ class YHResignAppointGroup: SmartCodable { ...@@ -59,9 +59,20 @@ class YHResignAppointGroup: SmartCodable {
} }
// dateString1 是否不小于dateString2 // dateString1 是否不小于dateString2
func compareDates(_ dateString1: String, _ dateString2: String) -> Bool { func compareDates(_ dateStr1: String, _ dateStr2: String) -> Bool {
let dateFormatter = DateFormatter() let dateFormatter = DateFormatter()
dateFormatter.dateFormat = "yyyy-MM-dd HH:mm" dateFormatter.dateFormat = "yyyy-MM-dd HH:mm"
let dateFormatCount = dateFormatter.dateFormat.count
var dateString1 = dateStr1
if dateString1.count > dateFormatCount {
dateString1 = String(dateString1.prefix(dateFormatCount))
}
var dateString2 = dateStr2
if dateString2.count > dateFormatCount {
dateString2 = String(dateString2.prefix(dateFormatCount))
}
// 将字符串转换为 Date 对象 // 将字符串转换为 Date 对象
guard let date1 = dateFormatter.date(from: dateString1), guard let date1 = dateFormatter.date(from: dateString1),
......
...@@ -102,7 +102,7 @@ class YHResignAppointTimeMultipleCell: UITableViewCell { ...@@ -102,7 +102,7 @@ class YHResignAppointTimeMultipleCell: UITableViewCell {
self.selectDetailDate(title: "选择在港递交时间") { self.selectDetailDate(title: "选择在港递交时间") {
[weak self] dateStr in [weak self] dateStr in
guard let self = self else { return } guard let self = self else { return }
self.model.ready_to_submit_at = "2024-11-04 17:44:" self.model.ready_to_submit_at = "2024-11-04 17:44"
self.refreshBlock?() self.refreshBlock?()
} }
} }
......
...@@ -121,11 +121,11 @@ class YHResignAppointedScheduleSingleItemView: UIView { ...@@ -121,11 +121,11 @@ class YHResignAppointedScheduleSingleItemView: UIView {
} }
} }
confirmHKTimeLabel.removeFromSuperview() confirmHKTimeLabel.isHidden = true
confirmHKTimeLabel.snp.removeConstraints() confirmHKTimeLabel.snp.removeConstraints()
if self.confirmHKStatus == .haveConfirmHK { // 已确认在港 需要显示确认在港时间 if self.confirmHKStatus == .haveConfirmHK { // 已确认在港 需要显示确认在港时间
self.addSubview(confirmHKTimeLabel) confirmHKTimeLabel.isHidden = false
confirmHKTimeLabel.snp.remakeConstraints { make in confirmHKTimeLabel.snp.remakeConstraints { make in
make.left.equalTo(18) make.left.equalTo(18)
make.right.equalTo(-18) make.right.equalTo(-18)
...@@ -156,26 +156,6 @@ class YHResignAppointedScheduleSingleItemView: UIView { ...@@ -156,26 +156,6 @@ class YHResignAppointedScheduleSingleItemView: UIView {
self.layoutIfNeeded() self.layoutIfNeeded()
} }
// dateString1 是否不小于dateString2
func compareDates(_ dateString1: String, _ dateString2: String) -> Bool {
let dateFormatter = DateFormatter()
dateFormatter.dateFormat = "yyyy-MM-dd HH:mm"
// 将字符串转换为 Date 对象
guard let date1 = dateFormatter.date(from: dateString1),
let date2 = dateFormatter.date(from: dateString2) else {
print("日期格式错误")
return false
}
// 比较日期
if date1 < date2 {
print("\(dateString1) 小于 \(dateString2)")
return false
}
return true
}
func createUI() { func createUI() {
self.addSubview(lineView) self.addSubview(lineView)
self.addSubview(applicantNamesLabel) self.addSubview(applicantNamesLabel)
......
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