Commit 4bc22a28 authored by Steven杜宇's avatar Steven杜宇

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

parents 23d8066e a2e36b0f
...@@ -4946,7 +4946,7 @@ ...@@ -4946,7 +4946,7 @@
CODE_SIGN_ENTITLEMENTS = galaxy/galaxyTestEnv.entitlements; CODE_SIGN_ENTITLEMENTS = galaxy/galaxyTestEnv.entitlements;
CODE_SIGN_IDENTITY = "Apple Development"; CODE_SIGN_IDENTITY = "Apple Development";
CODE_SIGN_STYLE = Automatic; CODE_SIGN_STYLE = Automatic;
CURRENT_PROJECT_VERSION = 1; CURRENT_PROJECT_VERSION = 2;
DEVELOPMENT_TEAM = RXHYW88XR7; DEVELOPMENT_TEAM = RXHYW88XR7;
ENABLE_USER_SCRIPT_SANDBOXING = NO; ENABLE_USER_SCRIPT_SANDBOXING = NO;
FRAMEWORK_SEARCH_PATHS = ( FRAMEWORK_SEARCH_PATHS = (
...@@ -5087,7 +5087,7 @@ ...@@ -5087,7 +5087,7 @@
CODE_SIGN_ENTITLEMENTS = galaxy/galaxy.entitlements; CODE_SIGN_ENTITLEMENTS = galaxy/galaxy.entitlements;
CODE_SIGN_IDENTITY = "Apple Development"; CODE_SIGN_IDENTITY = "Apple Development";
CODE_SIGN_STYLE = Automatic; CODE_SIGN_STYLE = Automatic;
CURRENT_PROJECT_VERSION = 1; CURRENT_PROJECT_VERSION = 2;
DEVELOPMENT_TEAM = RXHYW88XR7; DEVELOPMENT_TEAM = RXHYW88XR7;
ENABLE_USER_SCRIPT_SANDBOXING = NO; ENABLE_USER_SCRIPT_SANDBOXING = NO;
FRAMEWORK_SEARCH_PATHS = ( FRAMEWORK_SEARCH_PATHS = (
...@@ -5291,7 +5291,7 @@ ...@@ -5291,7 +5291,7 @@
CODE_SIGN_ENTITLEMENTS = galaxy/galaxyDebug.entitlements; CODE_SIGN_ENTITLEMENTS = galaxy/galaxyDebug.entitlements;
CODE_SIGN_IDENTITY = "Apple Development"; CODE_SIGN_IDENTITY = "Apple Development";
CODE_SIGN_STYLE = Automatic; CODE_SIGN_STYLE = Automatic;
CURRENT_PROJECT_VERSION = 1; CURRENT_PROJECT_VERSION = 2;
DEVELOPMENT_TEAM = RXHYW88XR7; DEVELOPMENT_TEAM = RXHYW88XR7;
ENABLE_USER_SCRIPT_SANDBOXING = NO; ENABLE_USER_SCRIPT_SANDBOXING = NO;
FRAMEWORK_SEARCH_PATHS = ( FRAMEWORK_SEARCH_PATHS = (
...@@ -5337,7 +5337,7 @@ ...@@ -5337,7 +5337,7 @@
CODE_SIGN_ENTITLEMENTS = galaxy/galaxy.entitlements; CODE_SIGN_ENTITLEMENTS = galaxy/galaxy.entitlements;
CODE_SIGN_IDENTITY = "Apple Development"; CODE_SIGN_IDENTITY = "Apple Development";
CODE_SIGN_STYLE = Automatic; CODE_SIGN_STYLE = Automatic;
CURRENT_PROJECT_VERSION = 1; CURRENT_PROJECT_VERSION = 2;
DEVELOPMENT_TEAM = RXHYW88XR7; DEVELOPMENT_TEAM = RXHYW88XR7;
ENABLE_USER_SCRIPT_SANDBOXING = NO; ENABLE_USER_SCRIPT_SANDBOXING = NO;
FRAMEWORK_SEARCH_PATHS = ( FRAMEWORK_SEARCH_PATHS = (
......
...@@ -254,16 +254,19 @@ extension YHServiceCenterMainViewController { ...@@ -254,16 +254,19 @@ extension YHServiceCenterMainViewController {
} }
@objc func pushOrderView() { @objc func pushOrderView() {
// let vc = YHOrderDetailViewController() let vc = YHOrderDetailViewController()
// vc.model = oldModel vc.model = oldModel
// vc.backDate = { [weak self] model in vc.backDate = { [weak self] model in
// guard let self = self else { return } guard let self = self else { return }
// self.model = model self.model = model
// } }
// self.navigationController?.pushViewController(vc) self.navigationController?.pushViewController(vc)
let vc = YHAddAdoptersViewController()
vc.orderId = orderId
navigationController?.pushViewController(vc)
// let vc = YHAddAdoptersViewController()
// vc.orderId = orderId
// navigationController?.pushViewController(vc) //for test pete
} }
} }
......
...@@ -484,6 +484,14 @@ private extension YHSelectApplicantGroupCell { ...@@ -484,6 +484,14 @@ private extension YHSelectApplicantGroupCell {
guard let self = self else { return } guard let self = self else { return }
//1.判断选择的日期是否不在今天之前
if !dateLessGreatToday(date: dateStr) {
YHHUD.flash(message: "不能选择今天之前的日期")
return
}
//2.
if let model = dataModel?.model { if let model = dataModel?.model {
if !showHKHolidayWarmTips(startDateStr: dateStr,endDateStr:nil) { if !showHKHolidayWarmTips(startDateStr: dateStr,endDateStr:nil) {
model.detailDateStr = dateStr model.detailDateStr = dateStr
...@@ -494,6 +502,36 @@ private extension YHSelectApplicantGroupCell { ...@@ -494,6 +502,36 @@ private extension YHSelectApplicantGroupCell {
} }
} }
func dateLessGreatToday(date : String) -> Bool {
if date.count == "2022.02.02".count {
let dateFormatter = DateFormatter()
dateFormatter.dateFormat = "yyyy-MM-dd"
// 假设我们有两个日期
if let date1 = dateFormatter.date(from: date) {
let today = Date()
// 使用Calendar比较两个日期
let calendar = Calendar(identifier: .chinese)
let comparisonResult = calendar.compare(today, to: date1, toGranularity: .day)
switch comparisonResult {
case .orderedAscending:
return true
case .orderedDescending:
print("第一个日期在第二个日期之后")
return false
case .orderedSame:
return true
}
}
}
return false
}
// 选择时间段 // 选择时间段
func selectDurationTime() { func selectDurationTime() {
let view = YHRangeDatePickerSheetView.sheetView() let view = YHRangeDatePickerSheetView.sheetView()
......
...@@ -9,8 +9,6 @@ ...@@ -9,8 +9,6 @@
import UIKit import UIKit
class YHUploadCertificateVC: YHBaseViewController { class YHUploadCertificateVC: YHBaseViewController {
var items: [String] = ["1", "1"]
lazy var viewModel: YHUploadCertificateViewModel = { lazy var viewModel: YHUploadCertificateViewModel = {
let vm = YHUploadCertificateViewModel() let vm = YHUploadCertificateViewModel()
...@@ -69,9 +67,6 @@ class YHUploadCertificateVC: YHBaseViewController { ...@@ -69,9 +67,6 @@ class YHUploadCertificateVC: YHBaseViewController {
override func viewDidLoad() { override func viewDidLoad() {
super.viewDidLoad() super.viewDidLoad()
setupUI() setupUI()
orderId = 150661 //for test hjl
loadData() loadData()
} }
} }
...@@ -149,48 +144,43 @@ extension YHUploadCertificateVC: UITableViewDelegate, UITableViewDataSource { ...@@ -149,48 +144,43 @@ extension YHUploadCertificateVC: UITableViewDelegate, UITableViewDataSource {
} }
func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell { func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell {
if 0 <= indexPath.section && indexPath.section < items.count { if indexPath.row == 0 {
if indexPath.row == 0 { let warningCell = tableView.dequeueReusableCell(withIdentifier: YHUploadCertificateTitleCell.cellReuseIdentifier, for: indexPath) as! YHUploadCertificateTitleCell
let warningCell = tableView.dequeueReusableCell(withIdentifier: YHUploadCertificateTitleCell.cellReuseIdentifier, for: indexPath) as! YHUploadCertificateTitleCell
var title = ""
var title = "" if indexPath.section == 0 {
if indexPath.section == 0 { title = "小白条"
title = "小白条"
} else {
title = "香港身份证"
}
warningCell.updateTitle(title)
return warningCell
} else { } else {
let approveCell = tableView.dequeueReusableCell(withIdentifier: YHUploadCertificateDetailCell.cellReuseIdentifier, for: indexPath) as! YHUploadCertificateDetailCell title = "香港身份证"
}
if let model = viewModel.uploadCertificateDataListModel { warningCell.updateTitle(title)
if indexPath.section == 0 { return warningCell
let tmp = model.small_whites[indexPath.row - 1] } else {
approveCell.dataModel = tmp let approveCell = tableView.dequeueReusableCell(withIdentifier: YHUploadCertificateDetailCell.cellReuseIdentifier, for: indexPath) as! YHUploadCertificateDetailCell
if indexPath.row == model.small_whites.count { if let model = viewModel.uploadCertificateDataListModel {
approveCell.isLastCell = true if indexPath.section == 0 {
} else { let tmp = model.small_whites[indexPath.row - 1]
approveCell.isLastCell = false approveCell.dataModel = tmp
}
} else if indexPath.section == 1 { if indexPath.row == model.small_whites.count {
let tmp = model.id_cards[indexPath.row - 1] approveCell.isLastCell = true
approveCell.dataModel = tmp } else {
approveCell.isLastCell = false
if indexPath.row == model.id_cards.count { }
approveCell.isLastCell = true } else if indexPath.section == 1 {
} else { let tmp = model.id_cards[indexPath.row - 1]
approveCell.isLastCell = false approveCell.dataModel = tmp
}
if indexPath.row == model.id_cards.count {
approveCell.isLastCell = true
} else {
approveCell.isLastCell = false
} }
} }
return approveCell
} }
return approveCell
} }
let approveCell = tableView.dequeueReusableCell(withIdentifier: "cell", for: indexPath)
return approveCell
} }
func tableView(_ tableView: UITableView, heightForRowAt indexPath: IndexPath) -> CGFloat { func tableView(_ tableView: UITableView, heightForRowAt indexPath: IndexPath) -> CGFloat {
...@@ -201,14 +191,22 @@ extension YHUploadCertificateVC: UITableViewDelegate, UITableViewDataSource { ...@@ -201,14 +191,22 @@ extension YHUploadCertificateVC: UITableViewDelegate, UITableViewDataSource {
} }
func tableView(_ tableView: UITableView, didSelectRowAt indexPath: IndexPath) { func tableView(_ tableView: UITableView, didSelectRowAt indexPath: IndexPath) {
let vc = YHUploadCertificateDetailVC()
//
if 0 <= indexPath.section && indexPath.section < items.count { if let model = viewModel.uploadCertificateDataListModel {
var tmp : YHUploadCertificateModel?
if indexPath.section == 0 {
let vc = YHUploadCertificateDetailVC() tmp = model.small_whites[indexPath.row - 1]
vc.detailType = .SmallWhiteNote vc.detailType = .SmallWhiteNote
self.navigationController?.pushViewController(vc) } else if indexPath.section == 1 {
tmp = model.id_cards[indexPath.row - 1]
vc.detailType = .HongKongCard
}
if let tmp = tmp {
vc.dataModel = tmp
self.navigationController?.pushViewController(vc)
}
} }
} }
......
...@@ -99,5 +99,9 @@ extension YHUploadCertificateDateItem { ...@@ -99,5 +99,9 @@ extension YHUploadCertificateDateItem {
cardLabel.attributed.text = b cardLabel.attributed.text = b
} }
} }
func updateDate(date : String) {
dateTextField.text = date
}
} }
...@@ -130,9 +130,7 @@ private extension YHVisaPaymentVC { ...@@ -130,9 +130,7 @@ private extension YHVisaPaymentVC {
self.orderID = (id as? Int) ?? 0 self.orderID = (id as? Int) ?? 0
} }
} }
// orderID = 133874//for test hjl
view.addSubview(tableView) view.addSubview(tableView)
view.addSubview(bottomView) view.addSubview(bottomView)
bottomView.snp.makeConstraints { make in bottomView.snp.makeConstraints { make in
...@@ -155,6 +153,7 @@ private extension YHVisaPaymentVC { ...@@ -155,6 +153,7 @@ private extension YHVisaPaymentVC {
if self.viewModel.isAllMemberPay() { if self.viewModel.isAllMemberPay() {
//跳转 //跳转
let vc = YHUploadCertificateVC() let vc = YHUploadCertificateVC()
vc.orderId = orderID
self.navigationController?.push(vc, removeClass: YHVisaPaymentVC.self) self.navigationController?.push(vc, removeClass: YHVisaPaymentVC.self)
} else { } else {
postPaymentResult() postPaymentResult()
......
...@@ -39,6 +39,7 @@ private extension YHFileListBottomView { ...@@ -39,6 +39,7 @@ private extension YHFileListBottomView {
button.layer.cornerRadius = kCornerRadius3 button.layer.cornerRadius = kCornerRadius3
button.clipsToBounds = true button.clipsToBounds = true
button.addTarget(self, action: #selector(submit), for: .touchUpInside) button.addTarget(self, action: #selector(submit), for: .touchUpInside)
button.backgroundColor = UIColor.brandMainColor
return button return button
}() }()
addSubview(nextButton) addSubview(nextButton)
...@@ -49,14 +50,16 @@ private extension YHFileListBottomView { ...@@ -49,14 +50,16 @@ private extension YHFileListBottomView {
make.left.equalTo(kMargin) make.left.equalTo(kMargin)
} }
nextButton.layoutIfNeeded()
nextButton.addYinHeGradualLayer()
} }
@objc func save() {
block?(0)
}
@objc func submit() { @objc func submit() {
block?(1) block?(1)
} }
} }
extension YHFileListBottomView {
func updateBtnTitle(title : String) {
nextButton.setTitle(title, for: .normal)
}
}
...@@ -142,16 +142,6 @@ class YHMyViewController: YHBaseViewController, ConstraintRelatableTarget { ...@@ -142,16 +142,6 @@ class YHMyViewController: YHBaseViewController, ConstraintRelatableTarget {
vc.myDefaultNavItemIndex = 2 vc.myDefaultNavItemIndex = 2
self.navigationController?.pushViewController(vc) self.navigationController?.pushViewController(vc)
print("最近浏览") print("最近浏览")
// let view = YHRangeDatePickerSheetView.sheetView()
// view.block = { (startDate,endDate) in
// print("选择的日期是:")
// print(startDate)
// print(endDate)
// }
// view.show() //for test hjl
} }
return view return view
}() }()
...@@ -346,12 +336,12 @@ extension YHMyViewController : UITableViewDelegate, UITableViewDataSource { ...@@ -346,12 +336,12 @@ extension YHMyViewController : UITableViewDelegate, UITableViewDataSource {
return return
} }
if true { // if true {
let vc = YHCertificateAppointViewController() // let vc = YHCertificateAppointViewController()
vc.orderId = 151085 // vc.orderId = 151085
self.navigationController?.pushViewController(vc) // self.navigationController?.pushViewController(vc)
return // return
} // } //for test dy
let item: PersonalModuleItem = items[indexPath.row] let item: PersonalModuleItem = items[indexPath.row]
......
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