Commit d30a3548 authored by David黄金龙's avatar David黄金龙

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

* 'develop' of http://gitlab.galaxy-immi.com/mobile-group/galaxy-iOS:
  //  预约
  上传旅行证件UI走查bug
  // 预约
  // 确认
  // 确认
  // 续签信息确认
  银河管家消息跳转bug修复
parents b74f7767 b5bffdd6
...@@ -98,7 +98,6 @@ class YHButlerServiceManager: NSObject { ...@@ -98,7 +98,6 @@ class YHButlerServiceManager: NSObject {
self.curentPresentedVC = nav self.curentPresentedVC = nav
UIViewController.current?.present(nav, animated: true, completion: nil) UIViewController.current?.present(nav, animated: true, completion: nil)
} else { } else {
sessionViewController.hidesBottomBarWhenPushed = true
navigationController?.pushViewController(sessionViewController) navigationController?.pushViewController(sessionViewController)
} }
} }
...@@ -130,7 +129,7 @@ extension YHButlerServiceManager { ...@@ -130,7 +129,7 @@ extension YHButlerServiceManager {
do { do {
if let jsonObject = try JSONSerialization.jsonObject(with: data, options: []) as? [String: Any] { if let jsonObject = try JSONSerialization.jsonObject(with: data, options: []) as? [String: Any] {
// 转换成功,jsonObject 是一个字典 // 转换成功,jsonObject 是一个字典
print("JSON字符串转换为字典成功: \(jsonObject)") printLog("JSON字符串转换为字典成功: \(jsonObject)")
/* /*
"{\"order_id\":151824,\"type\":27}" "{\"order_id\":151824,\"type\":27}"
*/ */
......
...@@ -241,6 +241,18 @@ class YHServiceOrderListView: YHBaseViewController { ...@@ -241,6 +241,18 @@ class YHServiceOrderListView: YHBaseViewController {
vc.orderId = orderId vc.orderId = orderId
vc.batchId = stepId vc.batchId = stepId
UIViewController.current?.navigationController?.pushViewController(vc) UIViewController.current?.navigationController?.pushViewController(vc)
} else if type == 101 {
//身份续签指引
gotoResignGuideVC()
} else if type == 102 {
//我的续签方案
gotoResignMethod(orderID: orderId, stepID: stepId)
} else if type == 103 {
//添加在港记录
gotoHKImmigrationRecordsVC(orderID: orderId)
} else if type == 104 {
//续签证件管理
gotoResignCertificateListVC(orderID: orderId)
} }
} }
} }
...@@ -337,6 +349,47 @@ extension YHServiceOrderListView { ...@@ -337,6 +349,47 @@ extension YHServiceOrderListView {
// 本地没有红点记录存储则必展示红点 // 本地没有红点记录存储则必展示红点
return true return true
} }
static func gotoResignGuideVC() {
if let param = YHLoginManager.shared.userModel?.token,param.count>5 {
var url = YHBaseUrlManager.shared.curH5URL() + "superAppBridge.html#/guide/identity"
// var url = "http://192.168.23.35:10300/" + "superAppBridge.html#/guide/identity"
url = url + "?param=" + YHLoginManager.shared.h5Token
let vc = YHH5WebViewVC()
vc.navTitle = "身份续签指引"
vc.url = url
vc.isFullScreenFlag = false
vc.isNeedRefreshDataFlag = true
vc.isSupportWebviewInterBackFlag = true
UIViewController.current?.navigationController?.pushViewController(vc)
}
}
static func gotoResignMethod(orderID: Int, stepID: Int) {
if let param = YHLoginManager.shared.userModel?.token,param.count>5 {
printLog(param)
var url = YHBaseUrlManager.shared.curH5URL() + "superAppBridge.html#/report/program"
// var url = "http://192.168.23.75:10301/" + "superAppBridge.html#/report/program"
url = url + "?param=" + YHLoginManager.shared.h5Token + "&batchID=\(stepID)" + "&order_id=\(orderID)"
let vc = YHH5WebViewVC()
vc.navTitle = "我的续签方案"
vc.url = url
vc.isSupportWebviewInterBackFlag = true
UIViewController.current?.navigationController?.pushViewController(vc)
}
}
static func gotoHKImmigrationRecordsVC(orderID: Int) {
let vc = YHHKImmigrationRecordsVC(orderId: orderID)
UIViewController.current?.navigationController?.pushViewController(vc)
}
static func gotoResignCertificateListVC(orderID: Int) {
let vc = YHResignCertificateListViewController()
vc.orderId = orderID
UIViewController.current?.navigationController?.pushViewController(vc)
}
} }
extension YHServiceOrderListView : UITableViewDelegate,UITableViewDataSource { extension YHServiceOrderListView : UITableViewDelegate,UITableViewDataSource {
...@@ -365,43 +418,18 @@ extension YHServiceOrderListView : UITableViewDelegate,UITableViewDataSource { ...@@ -365,43 +418,18 @@ extension YHServiceOrderListView : UITableViewDelegate,UITableViewDataSource {
if tag == 1 { if tag == 1 {
//身份续签指引 //身份续签指引
printLog("身份续签指引") printLog("身份续签指引")
if let param = YHLoginManager.shared.userModel?.token,param.count>5 { YHServiceOrderListView.gotoResignGuideVC()
var url = YHBaseUrlManager.shared.curH5URL() + "superAppBridge.html#/guide/identity"
// var url = "http://192.168.23.35:10300/" + "superAppBridge.html#/guide/identity"
url = url + "?param=" + YHLoginManager.shared.h5Token
let vc = YHH5WebViewVC()
vc.navTitle = "身份续签指引"
vc.url = url
vc.isFullScreenFlag = false
vc.isNeedRefreshDataFlag = true
vc.isSupportWebviewInterBackFlag = true
UIViewController.current?.navigationController?.pushViewController(vc)
}
} else if tag == 2 { } else if tag == 2 {
//我的续签方案 //我的续签方案
printLog("续签方案") printLog("续签方案")
if let param = YHLoginManager.shared.userModel?.token,param.count>5 { YHServiceOrderListView.gotoResignMethod(orderID: orderID, stepID: stepID)
printLog(param)
var url = YHBaseUrlManager.shared.curH5URL() + "superAppBridge.html#/report/program"
// var url = "http://192.168.23.75:10301/" + "superAppBridge.html#/report/program"
url = url + "?param=" + YHLoginManager.shared.h5Token + "&batchID=\(stepID)" + "&order_id=\(orderID)"
let vc = YHH5WebViewVC()
vc.navTitle = "我的续签方案"
vc.url = url
vc.isSupportWebviewInterBackFlag = true
UIViewController.current?.navigationController?.pushViewController(vc)
}
} else if tag == 3 { } else if tag == 3 {
//添加在港记录 //添加在港记录
let vc = YHHKImmigrationRecordsVC(orderId: orderID) YHServiceOrderListView.gotoHKImmigrationRecordsVC(orderID: orderID)
UIViewController.current?.navigationController?.pushViewController(vc)
} else if tag == 4 { } else if tag == 4 {
//续签证件管理 //续签证件管理
let vc = YHResignCertificateListViewController() YHServiceOrderListView.gotoResignCertificateListVC(orderID: orderID)
vc.orderId = orderID
UIViewController.current?.navigationController?.pushViewController(vc)
} }
} }
return view return view
......
...@@ -36,7 +36,7 @@ class YHResignAppointContainerViewController: YHBaseViewController { ...@@ -36,7 +36,7 @@ class YHResignAppointContainerViewController: YHBaseViewController {
override func viewDidLoad() { override func viewDidLoad() {
super.viewDidLoad() super.viewDidLoad()
NotificationCenter.default.addObserver(self, selector: #selector(requestData), name: YhConstant.YhNotification.didUpdateResignAppointStatusList, object: nil) NotificationCenter.default.addObserver(self, selector: #selector(refreshList), name: YhConstant.YhNotification.didUpdateResignAppointStatusList, object: nil)
self.addChild(appointVC) self.addChild(appointVC)
self.addChild(scheduleVC) self.addChild(scheduleVC)
...@@ -54,7 +54,13 @@ class YHResignAppointContainerViewController: YHBaseViewController { ...@@ -54,7 +54,13 @@ class YHResignAppointContainerViewController: YHBaseViewController {
NotificationCenter.default.removeObserver(self) NotificationCenter.default.removeObserver(self)
} }
@objc func requestData() { @objc func refreshList() {
requestData {
self.scheduleVC.firstShowGuideSheetView()
}
}
@objc func requestData(_ scheduleBlock :(()->())? = nil) {
YHHUD.show(.progress(message: "加载中...")) YHHUD.show(.progress(message: "加载中..."))
viewModel.getScheduleInfoList(renewalId: renewalId) { viewModel.getScheduleInfoList(renewalId: renewalId) {
...@@ -89,6 +95,7 @@ class YHResignAppointContainerViewController: YHBaseViewController { ...@@ -89,6 +95,7 @@ class YHResignAppointContainerViewController: YHBaseViewController {
self.scheduleVC.isTogether = self.viewModel.scheduleInfoList.is_together self.scheduleVC.isTogether = self.viewModel.scheduleInfoList.is_together
self.scheduleVC.view.isHidden = false self.scheduleVC.view.isHidden = false
self.appointVC.view.isHidden = true self.appointVC.view.isHidden = true
scheduleBlock?()
} }
} }
} }
......
...@@ -123,10 +123,21 @@ class YHResignAppointScheduleListViewController: YHBaseViewController { ...@@ -123,10 +123,21 @@ class YHResignAppointScheduleListViewController: YHBaseViewController {
self.navigationController?.pushViewController(vc) self.navigationController?.pushViewController(vc)
} }
@objc func didGuideBtnClicked() { func firstShowGuideSheetView() {
let key = "resignGuideLine_watch_\(renewalId)" let key = "resignGuideLine_is_first_watch_\(renewalId)"
if let isHaveFirstShow = UserDefaults.standard.value(forKey: key) as? Bool, isHaveFirstShow == true {
} else {
showGuideSheetView()
UserDefaults.standard.set(true, forKey: key)
UserDefaults.standard.synchronize()
}
}
func showGuideSheetView() {
let key = "resignGuideLine_watch_\(renewalId)"
let view = YHResignAppointGuideLineView.sheetView() let view = YHResignAppointGuideLineView.sheetView()
if let isWatched = UserDefaults.standard.value(forKey: key) as? Bool, isWatched == true { if let isWatched = UserDefaults.standard.value(forKey: key) as? Bool, isWatched == true {
view.ischeckBeforeFlag = true view.ischeckBeforeFlag = true
...@@ -141,6 +152,10 @@ class YHResignAppointScheduleListViewController: YHBaseViewController { ...@@ -141,6 +152,10 @@ class YHResignAppointScheduleListViewController: YHBaseViewController {
view.show() view.show()
} }
@objc func didGuideBtnClicked() {
self.showGuideSheetView()
}
// 更新底部下一步按钮点击状态 // 更新底部下一步按钮点击状态
func updateBottomBtnAndMotifyBtnStatus() { func updateBottomBtnAndMotifyBtnStatus() {
// 至少有一个行程已确认在港 // 至少有一个行程已确认在港
...@@ -168,7 +183,13 @@ class YHResignAppointScheduleListViewController: YHBaseViewController { ...@@ -168,7 +183,13 @@ class YHResignAppointScheduleListViewController: YHBaseViewController {
alert.show() alert.show()
} else if status == .canConfirmHK { // 可点击确认在港 } else if status == .canConfirmHK { // 可点击确认在港
requestConfirmInHK(model) let alertView = YHResignAppointedScheduleRiskTipsView.alertView()
alertView.confirmBlock = {
[weak self] in
guard let self = self else { return }
self.requestConfirmInHK(model)
}
alertView.show()
} }
} }
......
...@@ -121,7 +121,8 @@ class YHResignConfirmInfoListViewController: YHBaseViewController { ...@@ -121,7 +121,8 @@ class YHResignConfirmInfoListViewController: YHBaseViewController {
YHHUD.flash(message: msg) YHHUD.flash(message: msg)
return return
} }
self.navigationController?.popToRootViewController(animated: true) self.navigationController?.popToRootViewController(animated: false)
YHButlerServiceManager.shared.sessionGoBack()
goTabBarBy(tabType: .service) goTabBarBy(tabType: .service)
} }
} }
......
...@@ -170,7 +170,8 @@ class YHResignInfoConfirmModifyViewController: YHBaseViewController { ...@@ -170,7 +170,8 @@ class YHResignInfoConfirmModifyViewController: YHBaseViewController {
func requestNamePinYin() { func requestNamePinYin() {
YHHUD.hide() YHHUD.hide()
if !self.detailMember.name.isEmpty, self.detailMember.familyName.isEmpty { let pinyinIsEmpty = (self.detailMember.familyName.isEmpty || self.detailMember.givenName.isEmpty)
if !self.detailMember.name.isEmpty, pinyinIsEmpty {
YHHUD.show(.progress(message: "加载中...")) YHHUD.show(.progress(message: "加载中..."))
self.viewModel.getPinYinFromName(self.detailMember.name) { self.viewModel.getPinYinFromName(self.detailMember.name) {
[weak self] firstName, lastName in [weak self] firstName, lastName in
......
...@@ -58,6 +58,7 @@ class YHResignFamilyInfoItem { ...@@ -58,6 +58,7 @@ class YHResignFamilyInfoItem {
var options:[YHResignFamilyInfoOption] = [] var options:[YHResignFamilyInfoOption] = []
var isEditMode: Bool = false var isEditMode: Bool = false
var isShowPreviousInfo: Bool = false var isShowPreviousInfo: Bool = false
var valueIndex: Int = -1
var tips: String { var tips: String {
get { get {
...@@ -71,6 +72,16 @@ class YHResignFamilyInfoItem { ...@@ -71,6 +72,16 @@ class YHResignFamilyInfoItem {
if self.id == .hongKongId, !self.value.isHKIdentityCardNumber() { if self.id == .hongKongId, !self.value.isHKIdentityCardNumber() {
return "请输入正确的香港身份证号" return "请输入正确的香港身份证号"
} }
if self.id == .marriage {
if let marriageOptions = YHSheetPickerView.dataSource[.marriage1] {
let options = marriageOptions.map {
return "\($0.index)"
}
if !options.contains("\(self.valueIndex)") {
return "请选择婚姻状况"
}
}
}
return "" return ""
} }
...@@ -105,6 +116,9 @@ class YHResignFamilyInfoItem { ...@@ -105,6 +116,9 @@ class YHResignFamilyInfoItem {
} else if self.id == .hongkongAddress { } else if self.id == .hongkongAddress {
return "请输入香港住址" return "请输入香港住址"
} else if self.id == .marriage {
return "请选择婚姻状况"
} }
return "" return ""
} }
......
...@@ -327,7 +327,7 @@ extension YHResignInfoItemView: UITextFieldDelegate { ...@@ -327,7 +327,7 @@ extension YHResignInfoItemView: UITextFieldDelegate {
} }
if self.item.id == .hongkongAddress { // 香港住址 if self.item.id == .hongkongAddress { // 香港住址
if newText.count > 200 { // 上限30个字符 if newText.count > 200 { // 上限200个字符
newText = String(newText.prefix(200)) newText = String(newText.prefix(200))
textField.text = newText textField.text = newText
textFieldChanged(textField: textField) textFieldChanged(textField: textField)
......
...@@ -147,6 +147,13 @@ class YHResignInfoValidTimeItemView: UIView { ...@@ -147,6 +147,13 @@ class YHResignInfoValidTimeItemView: UIView {
titleLabel.attributed.text = title titleLabel.attributed.text = title
detailLabel.text = item.value detailLabel.text = item.value
detailLabel.snp.remakeConstraints { make in
make.top.equalTo(16)
make.left.equalTo(titleLabel.snp.right)
make.right.equalTo(-18)
make.height.greaterThanOrEqualTo(20)
}
// 是否隐藏有效期不足灰色视图 // 是否隐藏有效期不足灰色视图
var isNeedHiddenGrayView = true var isNeedHiddenGrayView = true
if let identity = familyInfo.identity { if let identity = familyInfo.identity {
...@@ -154,8 +161,10 @@ class YHResignInfoValidTimeItemView: UIView { ...@@ -154,8 +161,10 @@ class YHResignInfoValidTimeItemView: UIView {
} }
grayContentView.isHidden = isNeedHiddenGrayView grayContentView.isHidden = isNeedHiddenGrayView
grayContentView.snp.updateConstraints { make in grayContentView.snp.remakeConstraints { make in
make.left.right.equalToSuperview()
make.top.equalTo(detailLabel.snp.bottom).offset(isNeedHiddenGrayView ? 0 : 16) make.top.equalTo(detailLabel.snp.bottom).offset(isNeedHiddenGrayView ? 0 : 16)
make.bottom.equalTo(-16)
make.height.equalTo(isNeedHiddenGrayView ? 0 : 42) make.height.equalTo(isNeedHiddenGrayView ? 0 : 42)
} }
self.setNeedsLayout() self.setNeedsLayout()
......
...@@ -207,6 +207,7 @@ extension YHResignInfoConfirmViewModel { ...@@ -207,6 +207,7 @@ extension YHResignInfoConfirmViewModel {
previousValue: model.getHistoryMarriageState(), previousValue: model.getHistoryMarriageState(),
isEditMode: isEditMode, isEditMode: isEditMode,
isShowPreviousInfo: !isEditMode && !model.getHistoryMarriageState().isEmpty) isShowPreviousInfo: !isEditMode && !model.getHistoryMarriageState().isEmpty)
marriageInfo.valueIndex = Int(model.married) ?? -1
resultArr.append(marriageInfo) resultArr.append(marriageInfo)
// 申报国籍 // 申报国籍
...@@ -297,7 +298,10 @@ extension YHResignInfoConfirmViewModel { ...@@ -297,7 +298,10 @@ extension YHResignInfoConfirmViewModel {
resultArr.append(cerIdInfo) resultArr.append(cerIdInfo)
// 有效期 // 有效期
let validTime = "\(identity.begin) ~ \(identity.end)" var validTime = " "
if !identity.begin.isEmpty, !identity.end.isEmpty {
validTime = "\(identity.begin) ~ \(identity.end)"
}
let validTimeInfo = YHResignFamilyInfoItem(id: .certificateValidTime, let validTimeInfo = YHResignFamilyInfoItem(id: .certificateValidTime,
action: .edit, action: .edit,
isMust: false, isMust: false,
......
...@@ -116,7 +116,9 @@ class YHResignUploadDocDetailViewController: YHBaseViewController { ...@@ -116,7 +116,9 @@ class YHResignUploadDocDetailViewController: YHBaseViewController {
@objc func didClickUploadBtn() { @objc func didClickUploadBtn() {
if self.materialModel.unavailable_reason.count != 0 { if self.materialModel.unavailable_reason.count != 0 {
YHHUD.show(.progress(message: ""))
self.viewModel.postUploadDocFillUnavailableReason(id: id, reason: self.materialModel.unavailable_reason) {[weak self] success, err in self.viewModel.postUploadDocFillUnavailableReason(id: id, reason: self.materialModel.unavailable_reason) {[weak self] success, err in
YHHUD.hide()
guard let self = self else { return } guard let self = self else { return }
if success { if success {
self.navigationController?.popViewController(animated: true) self.navigationController?.popViewController(animated: true)
...@@ -127,7 +129,9 @@ class YHResignUploadDocDetailViewController: YHBaseViewController { ...@@ -127,7 +129,9 @@ class YHResignUploadDocDetailViewController: YHBaseViewController {
YHHUD.flash(message: "请上传必填文件") YHHUD.flash(message: "请上传必填文件")
return return
} }
YHHUD.show(.progress(message: ""))
self.viewModel.postUploadDocUpload(id: id, file: self.items) { [weak self] success, err in self.viewModel.postUploadDocUpload(id: id, file: self.items) { [weak self] success, err in
YHHUD.hide()
guard let self = self else { return } guard let self = self else { return }
if success { if success {
self.navigationController?.popViewController(animated: true) self.navigationController?.popViewController(animated: true)
......
...@@ -131,6 +131,18 @@ private extension YHResignUploadTravelCardListViewController { ...@@ -131,6 +131,18 @@ private extension YHResignUploadTravelCardListViewController {
make.top.equalTo(k_Height_NavigationtBarAndStatuBar) make.top.equalTo(k_Height_NavigationtBarAndStatuBar)
make.bottom.equalTo(-98) make.bottom.equalTo(-98)
} }
let sublineView = {
let view = UIView()
view.backgroundColor = UIColor.separatorColor
return view
}()
view.addSubview(sublineView)
sublineView.snp.remakeConstraints { make in
make.left.right.equalToSuperview()
make.bottom.equalTo(bottomView.snp.top)
make.height.equalTo(1)
}
} }
} }
......
...@@ -29,7 +29,7 @@ class YHResignUploadTravelHKViewController: YHBaseViewController { ...@@ -29,7 +29,7 @@ class YHResignUploadTravelHKViewController: YHBaseViewController {
lazy var tableView: UITableView = { lazy var tableView: UITableView = {
let tableView = UITableView(frame:.zero, style:.grouped) let tableView = UITableView(frame:.zero, style:.grouped)
tableView.estimatedSectionHeaderHeight = 0.01 tableView.estimatedSectionHeaderHeight = 0.01
tableView.estimatedSectionFooterHeight = 14.0 tableView.estimatedSectionFooterHeight = 16.0
tableView.contentInsetAdjustmentBehavior = .never tableView.contentInsetAdjustmentBehavior = .never
tableView.showsVerticalScrollIndicator = false tableView.showsVerticalScrollIndicator = false
tableView.separatorStyle = .none tableView.separatorStyle = .none
...@@ -321,7 +321,7 @@ extension YHResignUploadTravelHKViewController: UITableViewDelegate, UITableView ...@@ -321,7 +321,7 @@ extension YHResignUploadTravelHKViewController: UITableViewDelegate, UITableView
func tableView(_ tableView: UITableView, heightForRowAt indexPath: IndexPath) -> CGFloat { func tableView(_ tableView: UITableView, heightForRowAt indexPath: IndexPath) -> CGFloat {
if indexPath.section != 0 { if indexPath.section != 0 {
if urls[0].count == 0 && urls[1].count == 0 { if urls[0].count == 0 && urls[1].count == 0 {
return 243 return 223
} else { } else {
var tatol = 0 var tatol = 0
for item in data { for item in data {
...@@ -332,7 +332,7 @@ extension YHResignUploadTravelHKViewController: UITableViewDelegate, UITableView ...@@ -332,7 +332,7 @@ extension YHResignUploadTravelHKViewController: UITableViewDelegate, UITableView
tatol = tatol + 20 tatol = tatol + 20
} }
} }
return CGFloat(521 + tatol) return CGFloat(501 + tatol)
} }
} }
return UITableView.automaticDimension return UITableView.automaticDimension
...@@ -348,7 +348,7 @@ extension YHResignUploadTravelHKViewController: UITableViewDelegate, UITableView ...@@ -348,7 +348,7 @@ extension YHResignUploadTravelHKViewController: UITableViewDelegate, UITableView
private func tableView(_ tableView: UITableView, viewForFooterInSection section: Int) -> CGFloat { private func tableView(_ tableView: UITableView, viewForFooterInSection section: Int) -> CGFloat {
return 14.0 return 16.0
} }
func tableView(_ tableView: UITableView, viewForHeaderInSection section: Int) -> UIView? { func tableView(_ tableView: UITableView, viewForHeaderInSection section: Int) -> UIView? {
......
...@@ -30,7 +30,7 @@ class YHResignUploadTravelPassportViewController: YHBaseViewController { ...@@ -30,7 +30,7 @@ class YHResignUploadTravelPassportViewController: YHBaseViewController {
lazy var tableView: UITableView = { lazy var tableView: UITableView = {
let tableView = UITableView(frame:.zero, style:.grouped) let tableView = UITableView(frame:.zero, style:.grouped)
tableView.estimatedSectionHeaderHeight = 0.01 tableView.estimatedSectionHeaderHeight = 0.01
tableView.estimatedSectionFooterHeight = 14.0 tableView.estimatedSectionFooterHeight = 16.0
tableView.contentInsetAdjustmentBehavior = .never tableView.contentInsetAdjustmentBehavior = .never
tableView.showsVerticalScrollIndicator = false tableView.showsVerticalScrollIndicator = false
tableView.separatorStyle = .none tableView.separatorStyle = .none
...@@ -259,7 +259,7 @@ extension YHResignUploadTravelPassportViewController: UITableViewDelegate, UITab ...@@ -259,7 +259,7 @@ extension YHResignUploadTravelPassportViewController: UITableViewDelegate, UITab
func tableView(_ tableView: UITableView, heightForRowAt indexPath: IndexPath) -> CGFloat { func tableView(_ tableView: UITableView, heightForRowAt indexPath: IndexPath) -> CGFloat {
if indexPath.section != 0 { if indexPath.section != 0 {
if urls[0].count == 0 { if urls[0].count == 0 {
return 243 return 231
} else { } else {
var tatol = 0 var tatol = 0
for item in data { for item in data {
...@@ -270,7 +270,7 @@ extension YHResignUploadTravelPassportViewController: UITableViewDelegate, UITab ...@@ -270,7 +270,7 @@ extension YHResignUploadTravelPassportViewController: UITableViewDelegate, UITab
tatol = tatol + 20 tatol = tatol + 20
} }
} }
return CGFloat(345 + tatol) return CGFloat(333 + tatol)
} }
} }
return UITableView.automaticDimension return UITableView.automaticDimension
...@@ -286,7 +286,7 @@ extension YHResignUploadTravelPassportViewController: UITableViewDelegate, UITab ...@@ -286,7 +286,7 @@ extension YHResignUploadTravelPassportViewController: UITableViewDelegate, UITab
private func tableView(_ tableView: UITableView, viewForFooterInSection section: Int) -> CGFloat { private func tableView(_ tableView: UITableView, viewForFooterInSection section: Int) -> CGFloat {
return 14.0 return 16.0
} }
func tableView(_ tableView: UITableView, viewForHeaderInSection section: Int) -> UIView? { func tableView(_ tableView: UITableView, viewForHeaderInSection section: Int) -> UIView? {
......
...@@ -37,14 +37,15 @@ extension YHResignUploadTravelCardFootViewController { ...@@ -37,14 +37,15 @@ extension YHResignUploadTravelCardFootViewController {
view.addSubview(imageView) view.addSubview(imageView)
var height = 0.0 var height = 0.0
if type == 0 { if type == 0 {
height = 528.fix height = 488.fix
imageView.image = UIImage(named: "resign_upload_travel_foot_one") imageView.image = UIImage(named: "resign_upload_travel_foot_one")
} else { } else {
height = 699.fix height = 659.fix
imageView.image = UIImage(named: "resign_upload_travel_foot_two") imageView.image = UIImage(named: "resign_upload_travel_foot_two")
} }
imageView.snp.makeConstraints { make in imageView.snp.makeConstraints { make in
make.top.right.left.equalToSuperview() make.top.left.equalTo(20)
make.right.equalTo(-20)
make.height.equalTo(height) make.height.equalTo(height)
} }
......
...@@ -117,12 +117,14 @@ private extension YHResignUploadTravelCardListTableViewCell { ...@@ -117,12 +117,14 @@ private extension YHResignUploadTravelCardListTableViewCell {
contentView.addSubview(whiteContentView) contentView.addSubview(whiteContentView)
whiteContentView.snp.makeConstraints { make in whiteContentView.snp.makeConstraints { make in
make.edges.equalToSuperview() make.left.equalTo(16)
make.right.equalTo(-16)
make.top.bottom.equalToSuperview()
} }
whiteContentView.addSubview(statusImageView) whiteContentView.addSubview(statusImageView)
statusImageView.snp.makeConstraints { make in statusImageView.snp.makeConstraints { make in
make.right.equalTo(-18) make.right.equalTo(-16)
make.width.height.equalTo(20) make.width.height.equalTo(20)
make.centerY.equalToSuperview() make.centerY.equalToSuperview()
} }
...@@ -138,7 +140,7 @@ private extension YHResignUploadTravelCardListTableViewCell { ...@@ -138,7 +140,7 @@ private extension YHResignUploadTravelCardListTableViewCell {
whiteContentView.addSubview(titleLable) whiteContentView.addSubview(titleLable)
titleLable.snp.makeConstraints { make in titleLable.snp.makeConstraints { make in
make.centerY.equalToSuperview() make.centerY.equalToSuperview()
make.left.equalToSuperview().offset(18) make.left.equalToSuperview().offset(20)
make.height.equalTo(20) make.height.equalTo(20)
} }
......
...@@ -104,7 +104,7 @@ class YHResignUploadTravelCardListfootView: UIView { ...@@ -104,7 +104,7 @@ class YHResignUploadTravelCardListfootView: UIView {
indicator.indicatorColor = UIColor.brandMainColor indicator.indicatorColor = UIColor.brandMainColor
indicator.indicatorHeight = 2 indicator.indicatorHeight = 2
indicator.indicatorCornerRadius = 0 indicator.indicatorCornerRadius = 0
indicator.verticalOffset = 4 indicator.verticalOffset = 1
segmentedView.indicators = [indicator] segmentedView.indicators = [indicator]
segmentedView.backgroundColor = UIColor(red: 0.95, green: 0.95, blue: 0.95, alpha: 1) segmentedView.backgroundColor = UIColor(red: 0.95, green: 0.95, blue: 0.95, alpha: 1)
...@@ -133,6 +133,16 @@ class YHResignUploadTravelCardListfootView: UIView { ...@@ -133,6 +133,16 @@ class YHResignUploadTravelCardListfootView: UIView {
make.height.equalTo(6) make.height.equalTo(6)
} }
let sublineView = {
let view = UIView()
view.backgroundColor = UIColor.separatorColor
return view
}()
segmentedView.addSubview(sublineView)
sublineView.snp.remakeConstraints { make in
make.left.right.bottom.equalToSuperview()
make.height.equalTo(1)
}
} }
} }
......
...@@ -220,12 +220,24 @@ private extension YHResignUploadTravelGuideView { ...@@ -220,12 +220,24 @@ private extension YHResignUploadTravelGuideView {
make.height.equalTo(98) make.height.equalTo(98)
} }
let sublineView = {
let view = UIView()
view.backgroundColor = UIColor.separatorColor
return view
}()
whiteContentView.addSubview(sublineView)
sublineView.snp.remakeConstraints { make in
make.left.right.equalToSuperview()
make.bottom.equalTo(bottomView.snp.top)
make.height.equalTo(1)
}
whiteContentView.addSubview(myScrollView) whiteContentView.addSubview(myScrollView)
myScrollView.snp.makeConstraints { make in myScrollView.snp.makeConstraints { make in
make.top.equalToSuperview().offset(20) make.top.equalToSuperview().offset(20)
make.right.equalToSuperview() make.right.equalToSuperview()
make.width.equalTo(KScreenWidth) make.width.equalTo(KScreenWidth)
make.height.equalTo(whiteHeight-98 - 20) make.height.equalTo(whiteHeight - 98 - 21)
} }
if let tmpImage = UIImage(named:"resign_upload_guideline") { if let tmpImage = UIImage(named:"resign_upload_guideline") {
......
...@@ -40,6 +40,33 @@ class YHResignUploadTravelHKTableViewCell: UITableViewCell { ...@@ -40,6 +40,33 @@ class YHResignUploadTravelHKTableViewCell: UITableViewCell {
var failString: String = "" { var failString: String = "" {
didSet { didSet {
showMessageLabel.text = failString showMessageLabel.text = failString
if failString.count != 0 {
centerView.snp.remakeConstraints { make in
make.left.equalTo(16)
make.right.equalTo(-16)
make.top.equalTo(0)
make.bottom.equalTo(0)
}
cardLabel.snp.remakeConstraints { make in
make.left.equalTo(18)
make.right.equalTo(-18)
make.top.equalTo(229)
make.height.equalTo(20)
}
} else {
centerView.snp.remakeConstraints { make in
make.left.equalTo(16)
make.right.equalTo(-16)
make.top.equalTo(0)
make.bottom.equalTo(-12)
}
cardLabel.snp.makeConstraints { make in
make.left.equalTo(18)
make.right.equalTo(-18)
make.top.equalTo(217)
make.height.equalTo(20)
}
}
} }
} }
var firstImageName: String = "" { var firstImageName: String = "" {
...@@ -173,11 +200,6 @@ class YHResignUploadTravelHKTableViewCell: UITableViewCell { ...@@ -173,11 +200,6 @@ class YHResignUploadTravelHKTableViewCell: UITableViewCell {
make.height.equalTo(52) make.height.equalTo(52)
} }
} }
// if self.compareDates(dateString1: item.message ?? "", dateString2: self.dataModel.latest_validaty_date) {
//
// } else {
// failString = "签注有效期不足,需要为\(self.dataModel.latest_validaty_date)或以后"
// }
} }
} }
} }
...@@ -219,12 +241,11 @@ class YHResignUploadTravelHKTableViewCell: UITableViewCell { ...@@ -219,12 +241,11 @@ class YHResignUploadTravelHKTableViewCell: UITableViewCell {
make.left.equalTo(16) make.left.equalTo(16)
make.right.equalTo(-16) make.right.equalTo(-16)
make.top.equalTo(0) make.top.equalTo(0)
make.bottom.equalTo(-16) make.bottom.equalTo(0)
} }
titleLabel = { titleLabel = {
let label = UILabel() let label = UILabel()
// label.font = UIFont.PFSC_M(ofSize: 17)
let str = "* " + "港澳通行证 (逗留D签注)" let str = "* " + "港澳通行证 (逗留D签注)"
let attributes: [NSAttributedString.Key: Any] = [ let attributes: [NSAttributedString.Key: Any] = [
.font: UIFont.PFSC_M(ofSize: 17), .font: UIFont.PFSC_M(ofSize: 17),
...@@ -234,7 +255,6 @@ class YHResignUploadTravelHKTableViewCell: UITableViewCell { ...@@ -234,7 +255,6 @@ class YHResignUploadTravelHKTableViewCell: UITableViewCell {
let starRange = NSRange(location: 0, length: 2) let starRange = NSRange(location: 0, length: 2)
questionAttrStr.addAttribute(NSAttributedString.Key.foregroundColor, value: UIColor.failColor, range: starRange) questionAttrStr.addAttribute(NSAttributedString.Key.foregroundColor, value: UIColor.failColor, range: starRange)
label.attributedText = questionAttrStr label.attributedText = questionAttrStr
// label.textColor = UIColor.mainTextColor
return label return label
}() }()
centerView.addSubview(titleLabel) centerView.addSubview(titleLabel)
...@@ -270,10 +290,9 @@ class YHResignUploadTravelHKTableViewCell: UITableViewCell { ...@@ -270,10 +290,9 @@ class YHResignUploadTravelHKTableViewCell: UITableViewCell {
}() }()
centerView.addSubview(lineView) centerView.addSubview(lineView)
lineView.snp.makeConstraints { make in lineView.snp.makeConstraints { make in
make.left.equalTo(18) make.left.right.equalToSuperview()
make.top.equalTo(52) make.top.equalTo(52)
make.height.equalTo(1) make.height.equalTo(1)
make.right.equalTo(-18)
} }
frontLabel = { frontLabel = {
...@@ -288,7 +307,7 @@ class YHResignUploadTravelHKTableViewCell: UITableViewCell { ...@@ -288,7 +307,7 @@ class YHResignUploadTravelHKTableViewCell: UITableViewCell {
frontLabel.snp.makeConstraints { make in frontLabel.snp.makeConstraints { make in
make.left.equalTo(18) make.left.equalTo(18)
make.right.equalTo(self.snp.centerX) make.right.equalTo(self.snp.centerX)
make.top.equalTo(64) make.top.equalTo(70)
make.height.equalTo(20) make.height.equalTo(20)
} }
...@@ -304,7 +323,7 @@ class YHResignUploadTravelHKTableViewCell: UITableViewCell { ...@@ -304,7 +323,7 @@ class YHResignUploadTravelHKTableViewCell: UITableViewCell {
backSurfaceLabel.snp.makeConstraints { make in backSurfaceLabel.snp.makeConstraints { make in
make.right.equalTo(-18) make.right.equalTo(-18)
make.left.equalTo(self.snp.centerX) make.left.equalTo(self.snp.centerX)
make.top.equalTo(64) make.top.equalTo(70)
make.height.equalTo(20) make.height.equalTo(20)
} }
...@@ -320,8 +339,8 @@ class YHResignUploadTravelHKTableViewCell: UITableViewCell { ...@@ -320,8 +339,8 @@ class YHResignUploadTravelHKTableViewCell: UITableViewCell {
centerView.addSubview(frontImageButton) centerView.addSubview(frontImageButton)
frontImageButton.snp.makeConstraints { make in frontImageButton.snp.makeConstraints { make in
make.left.equalTo(18) make.left.equalTo(18)
make.top.equalTo(96) make.top.equalTo(102)
make.height.equalTo(102) make.height.equalTo(90)
make.width.equalTo(CGFloat(147).fix) make.width.equalTo(CGFloat(147).fix)
} }
...@@ -352,8 +371,8 @@ class YHResignUploadTravelHKTableViewCell: UITableViewCell { ...@@ -352,8 +371,8 @@ class YHResignUploadTravelHKTableViewCell: UITableViewCell {
centerView.addSubview(backSurfaceImageButton) centerView.addSubview(backSurfaceImageButton)
backSurfaceImageButton.snp.makeConstraints { make in backSurfaceImageButton.snp.makeConstraints { make in
make.right.equalTo(-18) make.right.equalTo(-18)
make.top.equalTo(96) make.top.equalTo(102)
make.height.equalTo(102) make.height.equalTo(90)
make.width.equalTo(CGFloat(147).fix) make.width.equalTo(CGFloat(147).fix)
} }
......
...@@ -33,6 +33,33 @@ class YHResignUploadTravelPassportTableViewCell: UITableViewCell { ...@@ -33,6 +33,33 @@ class YHResignUploadTravelPassportTableViewCell: UITableViewCell {
var failString: String = "" { var failString: String = "" {
didSet { didSet {
showMessageLabel.text = failString showMessageLabel.text = failString
if failString.count != 0 {
centerView.snp.remakeConstraints { make in
make.left.equalTo(16)
make.right.equalTo(-16)
make.top.equalTo(0)
make.bottom.equalTo(0)
}
cardBeginView.snp.remakeConstraints { make in
make.left.equalTo(18)
make.top.equalTo(229)
make.height.equalTo(52)
make.right.equalTo(-18)
}
} else {
centerView.snp.remakeConstraints { make in
make.left.equalTo(16)
make.right.equalTo(-16)
make.top.equalTo(0)
make.bottom.equalTo(-20)
}
cardBeginView.snp.remakeConstraints { make in
make.left.equalTo(18)
make.top.equalTo(209)
make.height.equalTo(52)
make.right.equalTo(-18)
}
}
} }
} }
var firstImageName: String = "" { var firstImageName: String = "" {
...@@ -97,11 +124,6 @@ class YHResignUploadTravelPassportTableViewCell: UITableViewCell { ...@@ -97,11 +124,6 @@ class YHResignUploadTravelPassportTableViewCell: UITableViewCell {
make.height.equalTo(52) make.height.equalTo(52)
} }
} }
// if self.compareDates(dateString1: item.message ?? "", dateString2: self.dataModel.latest_validaty_date) {
// failString = ""
// } else {
// failString = "有效期不足,需要为\(self.dataModel.latest_validaty_date)或以后"
// }
} }
} }
} }
...@@ -143,7 +165,7 @@ class YHResignUploadTravelPassportTableViewCell: UITableViewCell { ...@@ -143,7 +165,7 @@ class YHResignUploadTravelPassportTableViewCell: UITableViewCell {
make.left.equalTo(16) make.left.equalTo(16)
make.right.equalTo(-16) make.right.equalTo(-16)
make.top.equalTo(0) make.top.equalTo(0)
make.bottom.equalTo(-16) make.bottom.equalTo(0)
} }
titleLabel = { titleLabel = {
...@@ -192,10 +214,9 @@ class YHResignUploadTravelPassportTableViewCell: UITableViewCell { ...@@ -192,10 +214,9 @@ class YHResignUploadTravelPassportTableViewCell: UITableViewCell {
}() }()
centerView.addSubview(lineView) centerView.addSubview(lineView)
lineView.snp.makeConstraints { make in lineView.snp.makeConstraints { make in
make.left.equalTo(18) make.left.right.equalToSuperview()
make.top.equalTo(52) make.top.equalTo(52)
make.height.equalTo(1) make.height.equalTo(1)
make.right.equalTo(-18)
} }
frontLabel = { frontLabel = {
...@@ -210,7 +231,7 @@ class YHResignUploadTravelPassportTableViewCell: UITableViewCell { ...@@ -210,7 +231,7 @@ class YHResignUploadTravelPassportTableViewCell: UITableViewCell {
frontLabel.snp.makeConstraints { make in frontLabel.snp.makeConstraints { make in
make.left.equalTo(18) make.left.equalTo(18)
make.right.equalTo(self.snp.centerX) make.right.equalTo(self.snp.centerX)
make.top.equalTo(64) make.top.equalTo(70)
make.height.equalTo(20) make.height.equalTo(20)
} }
...@@ -226,8 +247,8 @@ class YHResignUploadTravelPassportTableViewCell: UITableViewCell { ...@@ -226,8 +247,8 @@ class YHResignUploadTravelPassportTableViewCell: UITableViewCell {
centerView.addSubview(frontImageButton) centerView.addSubview(frontImageButton)
frontImageButton.snp.makeConstraints { make in frontImageButton.snp.makeConstraints { make in
make.left.equalTo(18) make.left.equalTo(18)
make.top.equalTo(96) make.top.equalTo(102)
make.height.equalTo(102) make.height.equalTo(90)
make.width.equalTo(CGFloat(147).fix) make.width.equalTo(CGFloat(147).fix)
} }
...@@ -293,7 +314,7 @@ class YHResignUploadTravelPassportTableViewCell: UITableViewCell { ...@@ -293,7 +314,7 @@ class YHResignUploadTravelPassportTableViewCell: UITableViewCell {
centerView.addSubview(cardBeginView) centerView.addSubview(cardBeginView)
cardBeginView.snp.makeConstraints { make in cardBeginView.snp.makeConstraints { make in
make.left.equalTo(18) make.left.equalTo(18)
make.top.equalTo(229) make.top.equalTo(209)
make.height.equalTo(52) make.height.equalTo(52)
make.right.equalTo(-18) make.right.equalTo(-18)
} }
......
...@@ -5,12 +5,12 @@ ...@@ -5,12 +5,12 @@
"scale" : "1x" "scale" : "1x"
}, },
{ {
"filename" : "resign_upload_guideline@2x.png", "filename" : "Group 2033196192@2x.png",
"idiom" : "universal", "idiom" : "universal",
"scale" : "2x" "scale" : "2x"
}, },
{ {
"filename" : "resign_upload_guideline@3x.png", "filename" : "Group 2033196192@3x.png",
"idiom" : "universal", "idiom" : "universal",
"scale" : "3x" "scale" : "3x"
} }
......
...@@ -5,12 +5,12 @@ ...@@ -5,12 +5,12 @@
"scale" : "1x" "scale" : "1x"
}, },
{ {
"filename" : "resign_upload_travel_foot_one@2x.png", "filename" : "大陆办理@2x.png",
"idiom" : "universal", "idiom" : "universal",
"scale" : "2x" "scale" : "2x"
}, },
{ {
"filename" : "resign_upload_travel_foot_one@3x.png", "filename" : "大陆办理@3x.png",
"idiom" : "universal", "idiom" : "universal",
"scale" : "3x" "scale" : "3x"
} }
......
...@@ -5,12 +5,12 @@ ...@@ -5,12 +5,12 @@
"scale" : "1x" "scale" : "1x"
}, },
{ {
"filename" : "resign_upload_travel_foot_two@2x.png", "filename" : "香港办理@2x.png",
"idiom" : "universal", "idiom" : "universal",
"scale" : "2x" "scale" : "2x"
}, },
{ {
"filename" : "resign_upload_travel_foot_two@3x.png", "filename" : "香港办理@3x.png",
"idiom" : "universal", "idiom" : "universal",
"scale" : "3x" "scale" : "3x"
} }
......
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