Commit 657d872e 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:
  部分新增受养人接口逻辑
  // 赴港办证
parents 1e7f9245 42988e1c
......@@ -78,6 +78,7 @@
04256E212C76CA7800A37BA4 /* YHActivateHKVisaCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = 04256E202C76CA7800A37BA4 /* YHActivateHKVisaCell.swift */; };
04256E232C76D22400A37BA4 /* YHAppointItem.swift in Sources */ = {isa = PBXBuildFile; fileRef = 04256E222C76D22400A37BA4 /* YHAppointItem.swift */; };
04256E252C76E26100A37BA4 /* YHNoNeedAppointMembersCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = 04256E242C76E26100A37BA4 /* YHNoNeedAppointMembersCell.swift */; };
04256E272C77127600A37BA4 /* YHWaitAppointMembersCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = 04256E262C77127600A37BA4 /* YHWaitAppointMembersCell.swift */; };
0425E63D2BA9345200A5E763 /* YHSchemeTableViewCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0425E63C2BA9345200A5E763 /* YHSchemeTableViewCell.swift */; };
0425E6402BA9357D00A5E763 /* YHScemeItemModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0425E63F2BA9357D00A5E763 /* YHScemeItemModel.swift */; };
0425E6422BA95B1B00A5E763 /* YHSchemeTableFooterView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0425E6412BA95B1B00A5E763 /* YHSchemeTableFooterView.swift */; };
......@@ -120,6 +121,7 @@
0430E6822C75E068000511E2 /* YHAdopterCardOtherGuideView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0430E6812C75E067000511E2 /* YHAdopterCardOtherGuideView.swift */; };
0430E6842C76D702000511E2 /* YHAddpterViewModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0430E6832C76D702000511E2 /* YHAddpterViewModel.swift */; };
0430E6862C76DF6A000511E2 /* YHAdopterMainModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0430E6852C76DF6A000511E2 /* YHAdopterMainModel.swift */; };
0430E6882C771B06000511E2 /* YHAdopterItemView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0430E6872C771B06000511E2 /* YHAdopterItemView.swift */; };
0435FA7F2BA178C100024EAE /* YHCommonAlertView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0435FA7E2BA178C100024EAE /* YHCommonAlertView.swift */; };
0435FA812BA186D600024EAE /* YHMyFileMethodTableViewCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0435FA802BA186D600024EAE /* YHMyFileMethodTableViewCell.swift */; };
0435FA832BA2DEB100024EAE /* YHCardButton.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0435FA822BA2DEB100024EAE /* YHCardButton.swift */; };
......@@ -818,6 +820,7 @@
04256E202C76CA7800A37BA4 /* YHActivateHKVisaCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHActivateHKVisaCell.swift; sourceTree = "<group>"; };
04256E222C76D22400A37BA4 /* YHAppointItem.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHAppointItem.swift; sourceTree = "<group>"; };
04256E242C76E26100A37BA4 /* YHNoNeedAppointMembersCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHNoNeedAppointMembersCell.swift; sourceTree = "<group>"; };
04256E262C77127600A37BA4 /* YHWaitAppointMembersCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHWaitAppointMembersCell.swift; sourceTree = "<group>"; };
0425E63C2BA9345200A5E763 /* YHSchemeTableViewCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHSchemeTableViewCell.swift; sourceTree = "<group>"; };
0425E63F2BA9357D00A5E763 /* YHScemeItemModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHScemeItemModel.swift; sourceTree = "<group>"; };
0425E6412BA95B1B00A5E763 /* YHSchemeTableFooterView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHSchemeTableFooterView.swift; sourceTree = "<group>"; };
......@@ -860,6 +863,7 @@
0430E6812C75E067000511E2 /* YHAdopterCardOtherGuideView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHAdopterCardOtherGuideView.swift; sourceTree = "<group>"; };
0430E6832C76D702000511E2 /* YHAddpterViewModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHAddpterViewModel.swift; sourceTree = "<group>"; };
0430E6852C76DF6A000511E2 /* YHAdopterMainModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHAdopterMainModel.swift; sourceTree = "<group>"; };
0430E6872C771B06000511E2 /* YHAdopterItemView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHAdopterItemView.swift; sourceTree = "<group>"; };
0435FA7E2BA178C100024EAE /* YHCommonAlertView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHCommonAlertView.swift; sourceTree = "<group>"; };
0435FA802BA186D600024EAE /* YHMyFileMethodTableViewCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHMyFileMethodTableViewCell.swift; sourceTree = "<group>"; };
0435FA822BA2DEB100024EAE /* YHCardButton.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHCardButton.swift; sourceTree = "<group>"; };
......@@ -1646,6 +1650,7 @@
04256DED2C73338200A37BA4 /* YHGrabNumberListCell.swift */,
04256E202C76CA7800A37BA4 /* YHActivateHKVisaCell.swift */,
04256E242C76E26100A37BA4 /* YHNoNeedAppointMembersCell.swift */,
04256E262C77127600A37BA4 /* YHWaitAppointMembersCell.swift */,
04256DF12C734E7E00A37BA4 /* YHGrabFileCell.swift */,
04256DF52C736A0800A37BA4 /* YHServiceItemCell.swift */,
04256DE32C72E3FA00A37BA4 /* YHInfoItemOptionView.swift */,
......@@ -1761,6 +1766,7 @@
0430E6432C72E6A1000511E2 /* YHAdopterMainTableViewCell.swift */,
0430E6452C73171E000511E2 /* YHAdopterStepTableViewCell.swift */,
0430E6472C731B0A000511E2 /* YHAdopterAddNewTableViewCell.swift */,
0430E6872C771B06000511E2 /* YHAdopterItemView.swift */,
0430E6492C731E02000511E2 /* YHAdopterIncomeTableViewCell.swift */,
0430E64B2C732821000511E2 /* YHNoAdopterAlertView.swift */,
0430E64F2C733769000511E2 /* YHAdopterIncomeTitleTableViewCell.swift */,
......@@ -4209,6 +4215,7 @@
A5CA3F542C744CAB00EB22F5 /* YHUploadCertificateDetailCell.swift in Sources */,
04A7BD172BA43A0F00BD35A2 /* YHMyDocumentsDetailViewModel.swift in Sources */,
04256DF82C73726C00A37BA4 /* YHCerAppointViewModel.swift in Sources */,
0430E6882C771B06000511E2 /* YHAdopterItemView.swift in Sources */,
045EEEB32B9F171A0022A143 /* YHWorkFileSyncTableViewCell.swift in Sources */,
045EEEF12B9F171A0022A143 /* YHChildInfoContainerVC.swift in Sources */,
045EEF0B2B9F171A0022A143 /* YHBasicInfoFillViewController.swift in Sources */,
......@@ -4505,6 +4512,7 @@
A5ACE9402B4564F7002C94D2 /* String+Extension.swift in Sources */,
045EEEE42B9F171A0022A143 /* YHMySignatureDetailModel.swift in Sources */,
A5EB6C722C69FB9A0081FB6C /* YHOffivialApprovalGuildLineCheckView.swift in Sources */,
04256E272C77127600A37BA4 /* YHWaitAppointMembersCell.swift in Sources */,
047AA3D72C4A4399009C4554 /* YHInvitationWithGiftsShareView.swift in Sources */,
A58A8C8F2BA6978100632765 /* YHMineCertificateEntryViewController.swift in Sources */,
045EEF1B2B9F171A0022A143 /* YHAddressPickViewTableViewCell.swift in Sources */,
......
......@@ -254,13 +254,16 @@ 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 = 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)
}
}
......
......@@ -11,7 +11,7 @@ import UIKit
class YHAddAdoptersViewController: YHBaseViewController {
var tableView: UITableView!
var nextButton: UIButton!
var clickIndex = -1
var clickIndex = 2
let viewModel = YHAddpterViewModel()
var orderId: Int = 0
......@@ -27,11 +27,9 @@ class YHAddAdoptersViewController: YHBaseViewController {
func getData() {
viewModel.getAddpterMainData(orderId: orderId) {[weak self] success, error in
guard let self = self else { return }
self.clickIndex = self.viewModel.model?.has_dependent ?? 2
tableView.reloadData()
}
tableView.reloadData()
let view = YHNoAdopterAlertView(frame: CGRect(x: 0, y: 0, width: KScreenWidth, height: KScreenHeight))
let window = UIApplication.shared.yhKeyWindow()
window?.addSubview(view)
}
func setView() {
......@@ -94,11 +92,11 @@ class YHAddAdoptersViewController: YHBaseViewController {
extension YHAddAdoptersViewController: UITableViewDelegate, UITableViewDataSource {
func tableView(_ tableView: UITableView, numberOfRowsInSection section: Int) -> Int {
if clickIndex == -1 || clickIndex == 1 {
// if clickIndex == 1 {
return 4
} else {
return 1
}
// } else {
// return 1
// }
}
func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell {
......@@ -107,11 +105,14 @@ extension YHAddAdoptersViewController: UITableViewDelegate, UITableViewDataSourc
cell.clickBlock = { [weak self] index in
guard let self = self else { return }
self.clickIndex = index
self.tableView.reloadData()
if self.clickIndex == 0 {
let view = YHNoAdopterAlertView(frame: CGRect(x: 0, y: 0, width: KScreenWidth, height: KScreenHeight))
let window = UIApplication.shared.yhKeyWindow()
window?.addSubview(view)
self.viewModel.postDependentAdd(dependent: index) {[weak self] success, error in
guard let self = self else { return }
if self.clickIndex == 0 {
let view = YHNoAdopterAlertView(frame: CGRect(x: 0, y: 0, width: KScreenWidth, height: KScreenHeight))
let window = UIApplication.shared.yhKeyWindow()
window?.addSubview(view)
}
self.getData()
}
}
cell.clickIndex = clickIndex
......
......@@ -11,7 +11,7 @@ import SmartCodable
class YHAdopterMainModel: SmartCodable {
var order_id : Int = 0
var has_dependent : Int = 0 //是否有受养人
var has_dependent : Int = 2 //是否有受养人
var spouse_name : String = "" //配偶姓名
var spouse_used_name : String = "" //配偶曾用名
var spouse_id : Int = 0
......
......@@ -9,7 +9,7 @@
import UIKit
class YHAdopterAddNewTableViewCell: UITableViewCell {
typealias ExperienceListBlock = (_ model: YHWorkItemListModel) -> ()
typealias ExperienceListBlock = (_ model: YHAdopterDependentModel) -> ()
typealias IsMoreBlock = (_ isMore: Bool) -> ()
typealias NewAdopterBlock = () -> ()
var clickBlock: ExperienceListBlock?
......@@ -24,7 +24,7 @@ class YHAdopterAddNewTableViewCell: UITableViewCell {
var lineView: UIView!
var bottomView: YHWorkItemAddView!
var showPrompt: Bool = false
var dataSource: [YHWorkItemListModel]?{
var dataSource: [YHAdopterDependentModel]?{
didSet {
updateAllViews()
}
......@@ -174,7 +174,7 @@ class YHAdopterAddNewTableViewCell: UITableViewCell {
make.right.equalTo(-18)
}
total = total + 1
let itemView = YHWorkItemView()
let itemView = YHAdopterItemView()
itemView.clickBlock = {[weak self] model in
guard let self = self else { return }
if let block = self.clickBlock {
......@@ -196,10 +196,10 @@ class YHAdopterAddNewTableViewCell: UITableViewCell {
itemView.snp.makeConstraints { make in
make.left.equalTo(18)
make.top.equalTo(total)
make.height.equalTo(75)
make.height.equalTo(51)
make.right.equalTo(-18)
}
total = total + 75
total = total + 51
}
}
......
//
// YHAdopterItemView.swift
// galaxy
//
// Created by EDY on 2024/8/22.
// Copyright © 2024 https://www.galaxy-immi.com. All rights reserved.
//
import UIKit
class YHAdopterItemView: UIView {
typealias ItemBlock = (_ model: YHAdopterDependentModel) -> ()
var clickBlock: ItemBlock?
var deleteBlock: ItemBlock?
var titleLabel: UILabel!
var explainLabel: UILabel!
var nextStepImageView: UIImageView!
var deleteButton: UIButton!
var centerButton: UIButton!
var showPrompt: Bool = false
var dataSource: YHAdopterDependentModel? {
didSet {
updateAllViews()
}
}
override init(frame: CGRect) {
super.init(frame: frame)
backgroundColor = .white
setUpView()
}
required init?(coder: NSCoder) {
fatalError("init(coder:) has not been implemented")
}
func setUpView() {
titleLabel = {
let label = UILabel()
label.font = UIFont.PFSC_B(ofSize: 14)
label.textAlignment = .left
label.numberOfLines = 2
label.textColor = UIColor.mainTextColor
return label
}()
addSubview(titleLabel)
titleLabel.snp.makeConstraints { make in
make.left.top.bottom.equalToSuperview()
make.width.equalTo(143)
}
explainLabel = {
let label = UILabel()
label.font = UIFont.PFSC_R(ofSize: 14)
label.textAlignment = .right
label.textColor = UIColor.labelTextColor2
return label
}()
addSubview(explainLabel)
explainLabel.snp.makeConstraints { make in
make.right.equalTo(-24)
make.left.equalTo(titleLabel.snp.right)
make.height.equalTo(20)
make.centerY.equalToSuperview()
}
nextStepImageView = {
let imageView = UIImageView()
imageView.image = UIImage(named: "form_right_arrow")
return imageView
}()
addSubview(nextStepImageView)
nextStepImageView.snp.makeConstraints { make in
make.right.equalToSuperview()
make.centerY.equalTo(explainLabel.snp.centerY)
make.height.width.equalTo(20)
}
centerButton = {
let button = UIButton(type: .custom)
button.addTarget(self, action: #selector(centerClick), for: .touchUpInside)
return button
}()
addSubview(centerButton)
centerButton.snp.makeConstraints { make in
make.right.top.bottom.equalToSuperview()
make.left.equalTo(112)
}
deleteButton = {
let button = UIButton(type: .custom)
button.titleLabel?.font = UIFont.PFSC_R(ofSize: 14)
button.contentHorizontalAlignment = .center
button.setTitle("删除", for: .normal)
button.contentHorizontalAlignment = .right
button.setTitleColor(UIColor.failColor, for: .normal)
button.addTarget(self, action: #selector(deleteClick), for: .touchUpInside)
button.isHidden = true
return button
}()
addSubview(deleteButton)
deleteButton.snp.makeConstraints { make in
make.right.equalToSuperview()
make.height.equalTo(20)
make.width.equalTo(35)
make.centerY.equalTo(titleLabel.snp.centerY)
}
}
func updateAllViews() {
guard let dataSource = dataSource else { return }
titleLabel.text = dataSource.applicant_name
if dataSource.status == 0 {
explainLabel.text = "待上传"
explainLabel.textColor = UIColor.brandMainColor
nextStepImageView.image = UIImage(named: "service_adopter_income_start")
}
if dataSource.status == 1 {
explainLabel.text = "审核中"
explainLabel.textColor = UIColor(hex: 0xff8000)
nextStepImageView.image = UIImage(named: "service_adopter_income_wait")
}
if dataSource.status == 2 {
explainLabel.text = "已驳回"
explainLabel.textColor = UIColor.failColor
nextStepImageView.image = UIImage(named: "service_adopter_income_fail")
}
if dataSource.status == 3 {
explainLabel.text = "已完成"
explainLabel.textColor = UIColor(hex: 0x3cc694)
nextStepImageView.image = UIImage(named: "service_adopter_income_success")
}
}
@objc func centerClick() {
if let block = clickBlock {
block(self.dataSource ?? YHAdopterDependentModel())
}
}
@objc func deleteClick() {
if let block = deleteBlock {
block(self.dataSource ?? YHAdopterDependentModel())
}
}
func isShowDelete(_ index: Int, isShow: Bool) {
if isShow {
explainLabel.isHidden = true
nextStepImageView.isHidden = true
deleteButton.isHidden = false
} else {
explainLabel.isHidden = false
nextStepImageView.isHidden = false
deleteButton.isHidden = true
}
}
}
......@@ -41,4 +41,23 @@ class YHAddpterViewModel: YHBaseViewModel {
}
}
func postDependentAdd(dependent: Int, callBackBlock:@escaping (_ success: Bool,_ error:YHErrorModel?)->()) {
let params: [String: Any] = ["has_dependent": dependent]
let strUrl = YHBaseUrlManager.shared.curURL() + YHAllApiName.Adopter.add
let _ = YHNetRequest.postRequest(url: strUrl, params: params) { [weak self] json, code in
//1. json字符串 转 对象
guard let self = self else { return }
if json.code == 200 {
callBackBlock(true,nil)
} else {
let err = YHErrorModel(errorCode: Int32(json.code), errorMsg: json.msg.isEmpty ? "" : json.msg)
callBackBlock(false,err)
}
} failBlock: { err in
callBackBlock(false,err)
}
}
}
......@@ -16,7 +16,7 @@ class YHCertificateAppointViewController: YHBaseViewController {
// 无需预约办证人员
var noNeedAppointMembers:[YHHKMemberModel] = []
// 需要办证人员
var appointMembers:[YHHKMemberModel] = []
var waitAppointMembers:[YHHKMemberModel] = []
let viewModel = YHCerAppointViewModel()
// 是否赴港办证
......@@ -44,9 +44,8 @@ class YHCertificateAppointViewController: YHBaseViewController {
tableView.register(YHGrabNumberListCell.self, forCellReuseIdentifier: YHGrabNumberListCell.cellReuseIdentifier)
tableView.register(YHActivateHKVisaCell.self, forCellReuseIdentifier: YHActivateHKVisaCell.cellReuseIdentifier)
tableView.register(YHNoNeedAppointMembersCell.self, forCellReuseIdentifier: YHNoNeedAppointMembersCell.cellReuseIdentifier)
tableView.register(YHWaitAppointMembersCell.self, forCellReuseIdentifier: YHWaitAppointMembersCell.cellReuseIdentifier)
return tableView
}()
......@@ -96,9 +95,26 @@ class YHCertificateAppointViewController: YHBaseViewController {
items.append(item3)
}
// 赴港激活签证
let item4 = YHAppointItem(type: .activeVisa)
items.append(item4)
if self.reservationToHK == 0 { // 没有预约过人员
// 赴港激活签证 申请人是否统一赴港激活签证
let item4 = YHAppointItem(type: .activeVisa)
items.append(item4)
if self.isAllMembersGo { // 申请人统一赴港激活签证
} else { // 申请人不是统一赴港激活签证
}
} else { // 有预约过的人员
if waitAppointMembers.count > 0 {
let item5 = YHAppointItem(type: .needReAppointMembers)
items.append(item5)
}
}
self.tableView.reloadData()
......@@ -145,6 +161,10 @@ extension YHCertificateAppointViewController: UITableViewDelegate, UITableViewDa
self.updateData()
}
}
if self.reservationToHK == 1 { // 已经预约过
// 是否赴港办证不能点击否 index 0是是按钮 1是否按钮
cell.disableBtn(index: 1)
}
return cell
}
......@@ -167,6 +187,14 @@ extension YHCertificateAppointViewController: UITableViewDelegate, UITableViewDa
return cell
}
if item.type == .needReAppointMembers {
// 待预约赴港成员
let cell = tableView.dequeueReusableCell(withIdentifier: YHWaitAppointMembersCell.cellReuseIdentifier, for: indexPath) as! YHWaitAppointMembersCell
cell.members = waitAppointMembers
return cell
}
if item.type == .confirmGoHKInfo {
// 请您确认第X批赴港信息
let cell = tableView.dequeueReusableCell(withIdentifier: YHSelectApplicantGroupCell.cellReuseIdentifier, for: indexPath) as! YHSelectApplicantGroupCell
......@@ -232,6 +260,7 @@ extension YHCertificateAppointViewController {
[weak self] needGoHK, reservationToHK in
guard let self = self else { return }
self.isNeedGoHK = needGoHK
self.reservationToHK = reservationToHK
completion?()
}
}
......@@ -253,14 +282,23 @@ extension YHCertificateAppointViewController {
guard let self = self else { return }
let users = self.viewModel.hkUsers
noNeedAppointMembers.removeAll()
appointMembers.removeAll()
waitAppointMembers.removeAll()
for user in users {
if user.isAtLeast11Years() {
appointMembers.append(user)
waitAppointMembers.append(user)
} else {
noNeedAppointMembers.append(user)
}
}
let item1 = YHHKMemberModel()
item1.name = "艾师傅"
let item2 = YHHKMemberModel()
item2.name = "艾傅"
waitAppointMembers.append(contentsOf: [item1, item2])
completion?()
}
}
......
......@@ -20,6 +20,10 @@ class YHCertificateAppointOptionCell: UITableViewCell {
}
}
func disableBtn(index: Int) {
optionsView.setOptionBtnDisabled(index)
}
var selectBlock:((Int)->())?
lazy var whiteContentView: UIView = {
......
......@@ -111,6 +111,14 @@ class YHInfoItemOptionView: UIView {
btn.setTitleColor(isSelect ? UIColor.brandMainColor : UIColor.init(hex: 0x222222), for: .normal)
}
func setOptionBtnDisabled(_ index: Int) {
if let btn = self.viewWithTag(baseBtnTag + index) as? UIButton {
setOptionBtnSelected(btn: btn, isSelect:false)
btn.isEnabled = false
btn.setTitleColor(.mainTextColor(alpha: 0.18), for: .normal)
}
}
override init(frame: CGRect) {
super.init(frame: frame)
createUI()
......
//
// YHWaitAppointMembersCell.swift
// galaxy
//
// Created by edy on 2024/8/22.
// Copyright © 2024 https://www.galaxy-immi.com. All rights reserved.
//
import UIKit
class YHWaitAppointMembersCell: UITableViewCell {
static let cellReuseIdentifier = "YHWaitAppointMembersCell"
var members:[YHHKMemberModel] = [] {
didSet {
var text = ""
for (index, user) in members.enumerated() {
text += "\(user.name)"
if index != members.count-1 {
text += "、"
}
}
detailLabel.text = text
}
}
lazy var whiteContentView: UIView = {
let view = UIView()
view.backgroundColor = .white
view.layer.cornerRadius = kCornerRadius6
return view
}()
lazy var titleLabel: UILabel = {
let label = UILabel()
label.numberOfLines = 0
label.textColor = .mainTextColor
label.font = UIFont.PFSC_M(ofSize: 14)
label.text = "待预约赴港成员"
return label
}()
lazy var lineView: UIView = {
let view = UIView()
view.backgroundColor = .separatorColor
return view
}()
lazy var detailLabel: UILabel = {
let label = UILabel()
label.numberOfLines = 0
label.textColor = .mainTextColor(alpha: 0.7)
label.font = UIFont.PFSC_R(ofSize: 14)
return label
}()
lazy var bottomBtn: UIButton = {
let btn = UIButton()
btn.backgroundColor = .brandMainColor
btn.setTitle("去预约", for: .normal)
btn.setTitleColor(.white, for: .normal)
btn.titleLabel?.font = .PFSC_M(ofSize: 14)
btn.layer.cornerRadius = 4.0
btn.addTarget(self, action: #selector(didBottomBtnClicked), for: .touchUpInside)
return btn
}()
required init?(coder: NSCoder) {
super.init(coder: coder)
}
override init(style: UITableViewCell.CellStyle, reuseIdentifier: String?) {
super.init(style: style, reuseIdentifier: reuseIdentifier)
setupUI()
}
@objc func didBottomBtnClicked() {
}
func setupUI() {
self.selectionStyle = .none
self.backgroundColor = .clear
self.contentView.backgroundColor = .clear
contentView.addSubview(whiteContentView)
whiteContentView.addSubview(titleLabel)
whiteContentView.addSubview(detailLabel)
whiteContentView.addSubview(bottomBtn)
whiteContentView.addSubview(lineView)
whiteContentView.snp.makeConstraints { make in
make.top.equalTo(16)
make.left.equalTo(16)
make.right.equalTo(-16)
make.bottom.equalTo(0)
}
titleLabel.snp.makeConstraints { make in
make.top.equalTo(16)
make.left.equalTo(18)
make.right.equalTo(-18)
}
lineView.snp.makeConstraints { make in
make.top.equalTo(titleLabel.snp.bottom).offset(12)
make.left.equalTo(0)
make.right.equalTo(0)
make.height.equalTo(0.5)
}
detailLabel.snp.makeConstraints { make in
make.top.equalTo(lineView.snp.bottom).offset(16)
make.left.equalTo(18)
make.right.equalTo(-18)
}
bottomBtn.snp.makeConstraints { make in
make.top.equalTo(detailLabel.snp.bottom).offset(16)
make.left.equalTo(18)
make.right.equalTo(-18)
make.height.equalTo(45)
make.bottom.equalTo(-16)
}
}
}
......@@ -96,8 +96,11 @@ extension YHServiceCenterMainViewModel {
for item in result {
if item?.type == orderType {
resultItem = item ?? YHServiceProgressModel()
} else {
if orderType == 2 && (item?.type == 2 || item?.type == 3) {
resultItem = item ?? YHServiceProgressModel()
}
}
}
self.arrDataForSeviceCenterProgress = resultItem.list
// self.arrDataForSeviceCenterProgress = result as! [YHServiceCenterProgressModel]
......
......@@ -352,7 +352,7 @@ extension YHMyViewController : UITableViewDelegate, UITableViewDataSource {
// }
let vc = YHCertificateAppointViewController()
vc.orderId = 151085
vc.orderId = 151090
self.navigationController?.pushViewController(vc)
return
}
......
......@@ -450,7 +450,8 @@ class YHAllApiName {
struct Adopter {
// 新增受养人首页
static let main = "super-app/order/information/getDepList"
// 点击新增受养人
static let add = "super-app/order/information/dependent/add"
}
}
{
"images" : [
{
"idiom" : "universal",
"scale" : "1x"
},
{
"filename" : "service_adopter_income_wait@2x.png",
"idiom" : "universal",
"scale" : "2x"
},
{
"filename" : "service_adopter_income_wait@3x.png",
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}
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