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