Commit 46d28c8d authored by Steven杜宇's avatar Steven杜宇

// 时间选择

parent d96d357f
...@@ -61,7 +61,7 @@ class YHResignAppointGroup: SmartCodable { ...@@ -61,7 +61,7 @@ class YHResignAppointGroup: SmartCodable {
// dateString1 是否不小于dateString2 // dateString1 是否不小于dateString2
func compareDates(_ dateString1: String, _ dateString2: String) -> Bool { func compareDates(_ dateString1: String, _ dateString2: String) -> Bool {
let dateFormatter = DateFormatter() let dateFormatter = DateFormatter()
dateFormatter.dateFormat = "yyyy-MM-dd HH:mm:ss" dateFormatter.dateFormat = "yyyy-MM-dd HH:mm"
// 将字符串转换为 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:58" self.model.ready_to_submit_at = "2024-11-04 17:44:"
self.refreshBlock?() self.refreshBlock?()
} }
} }
...@@ -122,7 +122,7 @@ class YHResignAppointTimeMultipleCell: UITableViewCell { ...@@ -122,7 +122,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.leave_hk_at = "2024-12-04 17:44:58" self.model.leave_hk_at = "2024-12-04 17:44"
self.refreshBlock?() self.refreshBlock?()
} }
} }
......
...@@ -47,7 +47,7 @@ class YHResignAppointTimeSingleCell: UITableViewCell { ...@@ -47,7 +47,7 @@ class YHResignAppointTimeSingleCell: 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:58" self.model.ready_to_submit_at = "2024-11-04 17:44"
self.refreshBlock?() self.refreshBlock?()
} }
} }
...@@ -67,7 +67,7 @@ class YHResignAppointTimeSingleCell: UITableViewCell { ...@@ -67,7 +67,7 @@ class YHResignAppointTimeSingleCell: 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.leave_hk_at = "2024-12-04 17:44:58" self.model.leave_hk_at = "2024-12-04 17:44"
self.refreshBlock?() self.refreshBlock?()
} }
} }
......
...@@ -55,7 +55,7 @@ class YHResignAppointedScheduleSingleItemView: UIView { ...@@ -55,7 +55,7 @@ class YHResignAppointedScheduleSingleItemView: UIView {
label.numberOfLines = 0 label.numberOfLines = 0
label.font = UIFont.PFSC_R(ofSize: 12) label.font = UIFont.PFSC_R(ofSize: 12)
label.textColor = .mainTextColor(alpha: 0.5) label.textColor = .mainTextColor(alpha: 0.5)
label.text = "预约递交时间: 0000-00-00 00:00" label.text = "预约递交时间: 0000-00-00 00:00"
return label return label
}() }()
...@@ -64,7 +64,7 @@ class YHResignAppointedScheduleSingleItemView: UIView { ...@@ -64,7 +64,7 @@ class YHResignAppointedScheduleSingleItemView: UIView {
label.numberOfLines = 0 label.numberOfLines = 0
label.font = UIFont.PFSC_R(ofSize: 12) label.font = UIFont.PFSC_R(ofSize: 12)
label.textColor = .mainTextColor(alpha: 0.5) label.textColor = .mainTextColor(alpha: 0.5)
label.text = "确认在港时间: 0000-00-00 00:00" label.text = "确认在港时间: 0000-00-00 00:00"
return label return label
}() }()
...@@ -159,7 +159,7 @@ class YHResignAppointedScheduleSingleItemView: UIView { ...@@ -159,7 +159,7 @@ class YHResignAppointedScheduleSingleItemView: UIView {
// dateString1 是否不小于dateString2 // dateString1 是否不小于dateString2
func compareDates(_ dateString1: String, _ dateString2: String) -> Bool { func compareDates(_ dateString1: String, _ dateString2: String) -> Bool {
let dateFormatter = DateFormatter() let dateFormatter = DateFormatter()
dateFormatter.dateFormat = "yyyy-MM-dd HH:mm:ss" dateFormatter.dateFormat = "yyyy-MM-dd HH:mm"
// 将字符串转换为 Date 对象 // 将字符串转换为 Date 对象
guard let date1 = dateFormatter.date(from: dateString1), guard let date1 = dateFormatter.date(from: dateString1),
......
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