Commit 8164798b 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
  // 家庭信息确认
parents 28ecb9d0 3b1f8911
...@@ -54,6 +54,8 @@ class YHAddAdoptersViewController: YHBaseViewController { ...@@ -54,6 +54,8 @@ class YHAddAdoptersViewController: YHBaseViewController {
tableView.separatorStyle = .none tableView.separatorStyle = .none
tableView.delegate = self tableView.delegate = self
tableView.dataSource = self tableView.dataSource = self
tableView.showsVerticalScrollIndicator = false
tableView.showsHorizontalScrollIndicator = false
tableView.register(cellWithClass: YHAdopterMainTableViewCell.self) tableView.register(cellWithClass: YHAdopterMainTableViewCell.self)
tableView.register(cellWithClass: YHAdopterStepTableViewCell.self) tableView.register(cellWithClass: YHAdopterStepTableViewCell.self)
tableView.register(cellWithClass: YHAdopterAddNewTableViewCell.self) tableView.register(cellWithClass: YHAdopterAddNewTableViewCell.self)
...@@ -63,7 +65,8 @@ class YHAddAdoptersViewController: YHBaseViewController { ...@@ -63,7 +65,8 @@ class YHAddAdoptersViewController: YHBaseViewController {
view.addSubview(tableView) view.addSubview(tableView)
tableView.snp.makeConstraints { make in tableView.snp.makeConstraints { make in
make.top.equalTo(k_Height_NavigationtBarAndStatuBar + 8) make.top.equalTo(k_Height_NavigationtBarAndStatuBar + 8)
make.bottom.left.right.equalTo(view) make.left.right.equalTo(view)
make.bottom.equalTo(-k_Height_safeAreaInsetsBottom())
} }
bottonView = UIView() bottonView = UIView()
......
...@@ -108,8 +108,13 @@ extension YHAdoptedChinaTravelViewController: UITableViewDelegate, UITableViewDa ...@@ -108,8 +108,13 @@ extension YHAdoptedChinaTravelViewController: UITableViewDelegate, UITableViewDa
func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell { func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell {
if indexPath.row == 0 { if indexPath.row == 0 {
let cell = tableView.dequeueReusableCell(withClass: YHAdopterCardExplainTableViewCell.self) let cell = tableView.dequeueReusableCell(withClass: YHAdopterCardExplainTableViewCell.self)
cell.titleLabel.text = "中国居留许可签证" cell.titleLabel.text = "中国旅行证"
cell.docDataSource = model cell.docDataSource = model
cell.titleLabel.snp.makeConstraints { make in
make.left.equalTo(18)
make.top.equalTo(16)
make.height.equalTo(24)
}
return cell return cell
} }
if indexPath.row == 1 { if indexPath.row == 1 {
......
...@@ -108,8 +108,13 @@ extension YHAdopterChinaLifeViewController: UITableViewDelegate, UITableViewData ...@@ -108,8 +108,13 @@ extension YHAdopterChinaLifeViewController: UITableViewDelegate, UITableViewData
func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell { func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell {
if indexPath.row == 0 { if indexPath.row == 0 {
let cell = tableView.dequeueReusableCell(withClass: YHAdopterCardExplainTableViewCell.self) let cell = tableView.dequeueReusableCell(withClass: YHAdopterCardExplainTableViewCell.self)
cell.titleLabel.text = "中国旅行证" cell.titleLabel.text = "中国居留许可签证"
cell.docDataSource = model cell.docDataSource = model
cell.titleLabel.snp.makeConstraints { make in
make.left.equalTo(18)
make.top.equalTo(16)
make.height.equalTo(24)
}
return cell return cell
} }
if indexPath.row == 1 { if indexPath.row == 1 {
......
...@@ -46,6 +46,7 @@ class YHAdopterIncomeDetailViewController: YHBaseViewController { ...@@ -46,6 +46,7 @@ class YHAdopterIncomeDetailViewController: YHBaseViewController {
} }
func setView() { func setView() {
view.backgroundColor = .white
tableView = { tableView = {
let tableView = UITableView(frame:.zero, style:.plain) let tableView = UITableView(frame:.zero, style:.plain)
tableView.contentInsetAdjustmentBehavior = .never tableView.contentInsetAdjustmentBehavior = .never
...@@ -338,7 +339,7 @@ extension YHAdopterIncomeDetailViewController: UITableViewDelegate, UITableViewD ...@@ -338,7 +339,7 @@ extension YHAdopterIncomeDetailViewController: UITableViewDelegate, UITableViewD
if self.data.status == 2 { if self.data.status == 2 {
return 119 return 119
} else { } else {
return 66 return 86
} }
} }
if indexPath.row == 1 { if indexPath.row == 1 {
...@@ -350,7 +351,7 @@ extension YHAdopterIncomeDetailViewController: UITableViewDelegate, UITableViewD ...@@ -350,7 +351,7 @@ extension YHAdopterIncomeDetailViewController: UITableViewDelegate, UITableViewD
} }
} }
if indexPath.row == 2 { if indexPath.row == 2 {
return 71 return 61
} }
return 45 return 45
} }
......
...@@ -257,7 +257,7 @@ extension YHAdopterNewPeopleViewController: UITableViewDelegate, UITableViewData ...@@ -257,7 +257,7 @@ extension YHAdopterNewPeopleViewController: UITableViewDelegate, UITableViewData
func tableView(_ tableView: UITableView, heightForRowAt indexPath: IndexPath) -> CGFloat { func tableView(_ tableView: UITableView, heightForRowAt indexPath: IndexPath) -> CGFloat {
if stepView.currentIndex == 1 { if stepView.currentIndex == 1 {
let model = cardDataSource[indexPath.row] let model = cardDataSource[indexPath.row]
if model.dep_id == 1 || model.dep_id == 2 { if model.dep_type == 1 || model.dep_type == 2 {
return 90 return 90
} else { } else {
return 78 return 78
......
...@@ -111,6 +111,7 @@ extension YHAdopterOtherViewController: UITableViewDelegate, UITableViewDataSour ...@@ -111,6 +111,7 @@ extension YHAdopterOtherViewController: UITableViewDelegate, UITableViewDataSour
if indexPath.row == 0 { if indexPath.row == 0 {
let cell = tableView.dequeueReusableCell(withClass: YHAdopterExampleTableViewCell.self) let cell = tableView.dequeueReusableCell(withClass: YHAdopterExampleTableViewCell.self)
cell.titleLabel.text = "其他相关证件说明" cell.titleLabel.text = "其他相关证件说明"
cell.templateView.titleLabel.text = "查看其他相关证件说明"
cell.exampleBlock = {[weak self] in cell.exampleBlock = {[weak self] in
let view = YHAdopterCardExampleView(frame: CGRect(x: 0, y: 0, width: KScreenWidth, height: KScreenHeight)) let view = YHAdopterCardExampleView(frame: CGRect(x: 0, y: 0, width: KScreenWidth, height: KScreenHeight))
view.type = .other view.type = .other
...@@ -144,19 +145,18 @@ extension YHAdopterOtherViewController: UITableViewDelegate, UITableViewDataSour ...@@ -144,19 +145,18 @@ extension YHAdopterOtherViewController: UITableViewDelegate, UITableViewDataSour
} }
} }
} }
if indexPath.row == 3 { return cell
let cell = tableView.dequeueReusableCell(withClass: YHAdopterIncomeFileCountTableViewCell.self) }
cell.setContentData(self.urls.count) if indexPath.row == 3 {
if urls.count == 0 { let cell = tableView.dequeueReusableCell(withClass: YHAdopterIncomeFileCountTableViewCell.self)
cell.isHidden = true cell.setContentData(self.urls.count)
} else { if urls.count == 0 {
cell.isHidden = false cell.isHidden = true
} } else {
return cell cell.isHidden = false
} }
return cell return cell
} }
return UITableViewCell() return UITableViewCell()
} }
......
...@@ -121,7 +121,7 @@ class YHAdopterAddNewTableViewCell: UITableViewCell { ...@@ -121,7 +121,7 @@ class YHAdopterAddNewTableViewCell: UITableViewCell {
centerView.addSubview(lineView) centerView.addSubview(lineView)
lineView.snp.makeConstraints { make in lineView.snp.makeConstraints { make in
make.left.right.equalToSuperview() make.left.right.equalToSuperview()
make.top.equalTo(63) make.top.equalTo(62.5)
make.height.equalTo(0.5) make.height.equalTo(0.5)
} }
...@@ -171,14 +171,16 @@ class YHAdopterAddNewTableViewCell: UITableViewCell { ...@@ -171,14 +171,16 @@ class YHAdopterAddNewTableViewCell: UITableViewCell {
} }
var total = 0 var total = 0
for i in 0 ..< dataSource.count { for i in 0 ..< dataSource.count {
let line = UIView() if i != 0 {
line.backgroundColor = UIColor.separatorColor let line = UIView()
mainItemView.addSubview(line) line.backgroundColor = UIColor.separatorColor
line.snp.makeConstraints { make in mainItemView.addSubview(line)
make.left.equalTo(18) line.snp.makeConstraints { make in
make.top.equalTo(total) make.left.equalTo(18)
make.height.equalTo(1) make.top.equalTo(total)
make.right.equalTo(-18) make.height.equalTo(0.5)
make.right.equalTo(-18)
}
} }
total = total + 1 total = total + 1
let itemView = YHAdopterItemView() let itemView = YHAdopterItemView()
......
...@@ -44,7 +44,7 @@ class YHAdopterCardExplainTableViewCell: UITableViewCell { ...@@ -44,7 +44,7 @@ class YHAdopterCardExplainTableViewCell: UITableViewCell {
titleLabel = { titleLabel = {
let label = UILabel() let label = UILabel()
label.font = UIFont.PFSC_R(ofSize: 17) label.font = UIFont.PFSC_M(ofSize: 17)
label.textColor = UIColor.mainTextColor label.textColor = UIColor.mainTextColor
label.text = "中国身份证" label.text = "中国身份证"
return label return label
...@@ -59,7 +59,7 @@ class YHAdopterCardExplainTableViewCell: UITableViewCell { ...@@ -59,7 +59,7 @@ class YHAdopterCardExplainTableViewCell: UITableViewCell {
subTitleLabel = { subTitleLabel = {
let label = UILabel() let label = UILabel()
label.text = "已完成" label.text = "已完成"
label.font = UIFont.PFSC_R(ofSize: 10) label.font = UIFont.PFSC_M(ofSize: 10)
label.textColor = UIColor(hex: 0x3cc694) label.textColor = UIColor(hex: 0x3cc694)
label.backgroundColor = UIColor(hex: 0xf0fbf7) label.backgroundColor = UIColor(hex: 0xf0fbf7)
label.textAlignment = .center label.textAlignment = .center
...@@ -114,7 +114,7 @@ class YHAdopterCardExplainTableViewCell: UITableViewCell { ...@@ -114,7 +114,7 @@ class YHAdopterCardExplainTableViewCell: UITableViewCell {
if data.status == 3 { if data.status == 3 {
subTitleLabel.textColor = UIColor(hex: 0x3cc694) subTitleLabel.textColor = UIColor(hex: 0x3cc694)
subTitleLabel.backgroundColor = UIColor(hex: 0xf0fbf7) subTitleLabel.backgroundColor = UIColor(hex: 0xf0fbf7)
subTitleLabel.text = "已通过" subTitleLabel.text = "已完成"
} }
if data.status == 2 { if data.status == 2 {
subTitleLabel.textColor = UIColor(hex: 0xf81d22) subTitleLabel.textColor = UIColor(hex: 0xf81d22)
......
...@@ -60,13 +60,13 @@ class YHAdopterCardTableViewCell: UITableViewCell { ...@@ -60,13 +60,13 @@ class YHAdopterCardTableViewCell: UITableViewCell {
titleLabel = { titleLabel = {
let label = UILabel() let label = UILabel()
label.font = UIFont.PFSC_R(ofSize: 17) label.font = UIFont.PFSC_M(ofSize: 17)
label.textColor = UIColor.mainTextColor label.textColor = UIColor.mainTextColor
label.text = "主申请人资料" label.text = "主申请人资料"
label.numberOfLines = 0 label.numberOfLines = 0
let str = "*" + "受养人信息核实" let str = "* " + "受养人信息核实"
let attributes: [NSAttributedString.Key: Any] = [ let attributes: [NSAttributedString.Key: Any] = [
.font: UIFont.PFSC_R(ofSize: 17), .font: UIFont.PFSC_M(ofSize: 17),
.foregroundColor: UIColor.mainTextColor .foregroundColor: UIColor.mainTextColor
] ]
let questionAttrStr = NSMutableAttributedString(string: str, attributes: attributes) let questionAttrStr = NSMutableAttributedString(string: str, attributes: attributes)
...@@ -98,7 +98,7 @@ class YHAdopterCardTableViewCell: UITableViewCell { ...@@ -98,7 +98,7 @@ class YHAdopterCardTableViewCell: UITableViewCell {
centerView.addSubview(selectLabel) centerView.addSubview(selectLabel)
selectLabel.snp.makeConstraints { make in selectLabel.snp.makeConstraints { make in
make.left.equalTo(20) make.left.equalTo(20)
make.bottom.equalTo(-12) make.top.equalTo(titleLabel.snp.bottom).offset(6)
make.right.equalTo(-20) make.right.equalTo(-20)
} }
...@@ -115,9 +115,9 @@ class YHAdopterCardTableViewCell: UITableViewCell { ...@@ -115,9 +115,9 @@ class YHAdopterCardTableViewCell: UITableViewCell {
centerView.addSubview(moreButton) centerView.addSubview(moreButton)
moreButton.snp.makeConstraints { make in moreButton.snp.makeConstraints { make in
make.centerY.equalToSuperview() make.centerY.equalToSuperview()
make.right.equalTo(-20) make.right.equalTo(-14)
make.height.equalTo(20) make.height.equalTo(20)
make.width.equalTo(69) make.width.equalTo(62)
} }
moreButton.iconInRight(with: 1) moreButton.iconInRight(with: 1)
...@@ -132,13 +132,13 @@ class YHAdopterCardTableViewCell: UITableViewCell { ...@@ -132,13 +132,13 @@ class YHAdopterCardTableViewCell: UITableViewCell {
func updateContent() { func updateContent() {
guard let data = dataSource else { return } guard let data = dataSource else { return }
if data.require == 1 { if data.require == 1 {
let str = "*" + data.dep_name let str = "* " + data.dep_name
let attributes: [NSAttributedString.Key: Any] = [ let attributes: [NSAttributedString.Key: Any] = [
.font: UIFont.PFSC_R(ofSize: 16), .font: UIFont.PFSC_M(ofSize: 16),
.foregroundColor: UIColor.mainTextColor .foregroundColor: UIColor.mainTextColor
] ]
let questionAttrStr = NSMutableAttributedString(string: str, attributes: attributes) let questionAttrStr = NSMutableAttributedString(string: str, attributes: attributes)
let starRange = NSRange(location: 0, length: 1) 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)
titleLabel.attributedText = questionAttrStr titleLabel.attributedText = questionAttrStr
} else { } else {
...@@ -146,27 +146,27 @@ class YHAdopterCardTableViewCell: UITableViewCell { ...@@ -146,27 +146,27 @@ class YHAdopterCardTableViewCell: UITableViewCell {
} }
if data.dep_type == 1 { if data.dep_type == 1 {
let a: ASAttributedString = .init("如有", .font(UIFont.PFSC_R(ofSize: 13)),.foreground(UIColor.mainTextColor50)) let a: ASAttributedString = .init("如有", .font(UIFont.PFSC_R(ofSize: 12)),.foreground(UIColor.mainTextColor50))
let b: ASAttributedString = .init("中国身份证", .font(UIFont.PFSC_R(ofSize: 13)),.foreground(UIColor.brandMainColor)) let b: ASAttributedString = .init("中国身份证", .font(UIFont.PFSC_R(ofSize: 12)),.foreground(UIColor.brandMainColor))
let c: ASAttributedString = .init(",需要供用做证明", .font(UIFont.PFSC_R(ofSize: 13)),.foreground(UIColor.mainTextColor50)) let c: ASAttributedString = .init(",需要供用做证明", .font(UIFont.PFSC_R(ofSize: 13)),.foreground(UIColor.mainTextColor50))
selectLabel.attributed.text = a + b + c selectLabel.attributed.text = a + b + c
titleLabel.snp.remakeConstraints { make in titleLabel.snp.remakeConstraints { make in
make.left.equalTo(20) make.left.equalTo(20)
make.top.equalTo(12) make.top.equalTo(14)
make.height.equalTo(22) make.height.equalTo(22)
make.right.equalTo(-18) make.right.equalTo(-18)
} }
} else if data.dep_type == 2 { } else if data.dep_type == 2 {
let a: ASAttributedString = .init("如曾更名,需要供用做证明", .font(UIFont.PFSC_R(ofSize: 13)),.foreground(UIColor.mainTextColor50)) let a: ASAttributedString = .init("如曾更名,需要供用做证明", .font(UIFont.PFSC_R(ofSize: 12)),.foreground(UIColor.mainTextColor50))
selectLabel.attributed.text = a selectLabel.attributed.text = a
titleLabel.snp.remakeConstraints { make in titleLabel.snp.remakeConstraints { make in
make.left.equalTo(20) make.left.equalTo(20)
make.top.equalTo(12) make.top.equalTo(14)
make.height.equalTo(22) make.height.equalTo(22)
make.right.equalTo(-18) make.right.equalTo(-18)
} }
} else { } else {
let a: ASAttributedString = .init("", .font(UIFont.PFSC_R(ofSize: 13)),.foreground(UIColor.mainTextColor50)) let a: ASAttributedString = .init("", .font(UIFont.PFSC_R(ofSize: 12)),.foreground(UIColor.mainTextColor50))
selectLabel.attributed.text = a selectLabel.attributed.text = a
titleLabel.snp.remakeConstraints { make in titleLabel.snp.remakeConstraints { make in
make.left.equalTo(20) make.left.equalTo(20)
......
...@@ -41,7 +41,7 @@ class YHAdopterExampleTableViewCell: UITableViewCell { ...@@ -41,7 +41,7 @@ class YHAdopterExampleTableViewCell: UITableViewCell {
titleLabel = { titleLabel = {
let label = UILabel() let label = UILabel()
label.font = UIFont.PFSC_R(ofSize: 17) label.font = UIFont.PFSC_M(ofSize: 17)
label.textColor = UIColor.mainTextColor label.textColor = UIColor.mainTextColor
label.text = "中国身份证示例模版" label.text = "中国身份证示例模版"
return label return label
......
...@@ -58,7 +58,6 @@ class YHAdopterIncomeFileTableViewCell: UITableViewCell { ...@@ -58,7 +58,6 @@ class YHAdopterIncomeFileTableViewCell: UITableViewCell {
mainItemView.removeSubviews() mainItemView.removeSubviews()
for i in 0 ..< (dataSource?.count ?? 0) { for i in 0 ..< (dataSource?.count ?? 0) {
let itemView = YHWorkFileItemView() let itemView = YHWorkFileItemView()
itemView.backgroundColor = UIColor.pageBkgColor
itemView.dataSource = dataSource?[i] itemView.dataSource = dataSource?[i]
itemView.block = {[weak self] model, type in itemView.block = {[weak self] model, type in
guard let self = self else { return } guard let self = self else { return }
......
...@@ -63,7 +63,7 @@ class YHAdopterIncomeTableViewCell: UITableViewCell { ...@@ -63,7 +63,7 @@ class YHAdopterIncomeTableViewCell: UITableViewCell {
titleLabel = { titleLabel = {
let label = UILabel() let label = UILabel()
label.font = UIFont.PFSC_R(ofSize: 17) label.font = UIFont.PFSC_M(ofSize: 17)
label.textColor = UIColor.mainTextColor label.textColor = UIColor.mainTextColor
label.text = "主申请人资料" label.text = "主申请人资料"
return label return label
......
...@@ -52,7 +52,7 @@ class YHAdopterIncomeTitleTableViewCell: UITableViewCell { ...@@ -52,7 +52,7 @@ class YHAdopterIncomeTitleTableViewCell: UITableViewCell {
titleLabel = { titleLabel = {
let label = UILabel() let label = UILabel()
label.font = UIFont.PFSC_R(ofSize: 17) label.font = UIFont.PFSC_M(ofSize: 17)
label.textColor = UIColor.mainTextColor label.textColor = UIColor.mainTextColor
label.text = "存款证明" label.text = "存款证明"
return label return label
...@@ -67,7 +67,7 @@ class YHAdopterIncomeTitleTableViewCell: UITableViewCell { ...@@ -67,7 +67,7 @@ class YHAdopterIncomeTitleTableViewCell: UITableViewCell {
subTitleLabel = { subTitleLabel = {
let label = UILabel() let label = UILabel()
label.text = "已完成" label.text = "已完成"
label.font = UIFont.PFSC_R(ofSize: 10) label.font = UIFont.PFSC_M(ofSize: 10)
label.textColor = UIColor(hex: 0x3cc694) label.textColor = UIColor(hex: 0x3cc694)
label.backgroundColor = UIColor(hex: 0xf0fbf7) label.backgroundColor = UIColor(hex: 0xf0fbf7)
label.textAlignment = .center label.textAlignment = .center
...@@ -188,7 +188,7 @@ class YHAdopterIncomeTitleTableViewCell: UITableViewCell { ...@@ -188,7 +188,7 @@ class YHAdopterIncomeTitleTableViewCell: UITableViewCell {
subTitleLabel.backgroundColor = UIColor(hex: 0xf0fbf7) subTitleLabel.backgroundColor = UIColor(hex: 0xf0fbf7)
failImageView.isHidden = true failImageView.isHidden = true
failLabel.isHidden = true failLabel.isHidden = true
subTitleLabel.text = "已通过" subTitleLabel.text = "已完成"
} }
if data.status == 2 { if data.status == 2 {
subTitleLabel.textColor = UIColor(hex: 0xf81d22) subTitleLabel.textColor = UIColor(hex: 0xf81d22)
......
...@@ -76,15 +76,15 @@ class YHAdopterMainTableViewCell: UITableViewCell { ...@@ -76,15 +76,15 @@ class YHAdopterMainTableViewCell: UITableViewCell {
titleLabel = { titleLabel = {
let label = UILabel() let label = UILabel()
label.font = UIFont.PFSC_R(ofSize: 17) label.font = UIFont.PFSC_M(ofSize: 17)
label.textColor = UIColor.mainTextColor label.textColor = UIColor.mainTextColor
let str = "*" + "受养人信息核实" let str = "* " + "受养人信息核实"
let attributes: [NSAttributedString.Key: Any] = [ let attributes: [NSAttributedString.Key: Any] = [
.font: UIFont.PFSC_R(ofSize: 17), .font: UIFont.PFSC_M(ofSize: 17),
.foregroundColor: UIColor.mainTextColor .foregroundColor: UIColor.mainTextColor
] ]
let questionAttrStr = NSMutableAttributedString(string: str, attributes: attributes) let questionAttrStr = NSMutableAttributedString(string: str, attributes: attributes)
let starRange = NSRange(location: 0, length: 1) 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
return label return label
...@@ -93,7 +93,7 @@ class YHAdopterMainTableViewCell: UITableViewCell { ...@@ -93,7 +93,7 @@ class YHAdopterMainTableViewCell: UITableViewCell {
titleLabel.snp.makeConstraints { make in titleLabel.snp.makeConstraints { make in
make.left.equalTo(18) make.left.equalTo(18)
make.top.equalTo(16) make.top.equalTo(16)
make.height.equalTo(24) // make.height.equalTo(24)
make.right.equalTo(-18) make.right.equalTo(-18)
} }
......
...@@ -77,6 +77,9 @@ class YHAdopterMarryCardTableViewCell: UITableViewCell { ...@@ -77,6 +77,9 @@ class YHAdopterMarryCardTableViewCell: UITableViewCell {
frontDeleteButton.isHidden = true frontDeleteButton.isHidden = true
backSurfaceDeleteButton.isHidden = true backSurfaceDeleteButton.isHidden = true
thirdDeleteButton.isHidden = true thirdDeleteButton.isHidden = true
frontImageButton.isEnabled = false
backSurfaceImageButton.isEnabled = false
thirdImageButton.isEnabled = false
} }
} }
} }
...@@ -121,7 +124,7 @@ class YHAdopterMarryCardTableViewCell: UITableViewCell { ...@@ -121,7 +124,7 @@ class YHAdopterMarryCardTableViewCell: UITableViewCell {
frontLabel = { frontLabel = {
let label = UILabel() let label = UILabel()
label.font = UIFont.PFSC_R(ofSize: 12) label.font = UIFont.PFSC_R(ofSize: 12)
label.textColor = UIColor.subTextColor label.textColor = UIColor.mainTextColor50
label.text = "证件页1" label.text = "证件页1"
label.textAlignment = .center label.textAlignment = .center
return label return label
...@@ -137,7 +140,7 @@ class YHAdopterMarryCardTableViewCell: UITableViewCell { ...@@ -137,7 +140,7 @@ class YHAdopterMarryCardTableViewCell: UITableViewCell {
backSurfaceLabel = { backSurfaceLabel = {
let label = UILabel() let label = UILabel()
label.font = UIFont.PFSC_R(ofSize: 12) label.font = UIFont.PFSC_R(ofSize: 12)
label.textColor = UIColor.subTextColor label.textColor = UIColor.mainTextColor50
label.textAlignment = .center label.textAlignment = .center
label.text = "证件页2" label.text = "证件页2"
return label return label
...@@ -153,7 +156,7 @@ class YHAdopterMarryCardTableViewCell: UITableViewCell { ...@@ -153,7 +156,7 @@ class YHAdopterMarryCardTableViewCell: UITableViewCell {
thirdLabel = { thirdLabel = {
let label = UILabel() let label = UILabel()
label.font = UIFont.PFSC_R(ofSize: 12) label.font = UIFont.PFSC_R(ofSize: 12)
label.textColor = UIColor.subTextColor label.textColor = UIColor.mainTextColor50
label.text = "证件页3" label.text = "证件页3"
label.textAlignment = .center label.textAlignment = .center
return label return label
......
...@@ -12,13 +12,13 @@ class YHAdopterOtherCardTableViewCell: UITableViewCell { ...@@ -12,13 +12,13 @@ class YHAdopterOtherCardTableViewCell: UITableViewCell {
typealias UrlBlock = (_ url: String, _ index: Int) -> () typealias UrlBlock = (_ url: String, _ index: Int) -> ()
var urlBlock: UrlBlock? var urlBlock: UrlBlock?
var deleteBlock: UrlBlock? var deleteBlock: UrlBlock?
lazy var collectView = { lazy var collectView = {
// 设置布局方向 // 设置布局方向
let flowLayout = YHHomeCollectionLayout() let flowLayout = YHHomeCollectionLayout()
flowLayout.minimumInteritemSpacing = 7.0 flowLayout.minimumInteritemSpacing = 7.0
flowLayout.minimumColumnSpacing = 7.0 flowLayout.minimumColumnSpacing = 7.0
flowLayout.sectionInset = UIEdgeInsets(top: 8, left: 20, bottom: 0, right: 20) flowLayout.sectionInset = UIEdgeInsets(top: 16, left: 20, bottom: 0, right: 20)
let collectinoView = UICollectionView(frame: .zero, collectionViewLayout: flowLayout) let collectinoView = UICollectionView(frame: .zero, collectionViewLayout: flowLayout)
collectinoView.backgroundColor = .white collectinoView.backgroundColor = .white
...@@ -32,7 +32,7 @@ class YHAdopterOtherCardTableViewCell: UITableViewCell { ...@@ -32,7 +32,7 @@ class YHAdopterOtherCardTableViewCell: UITableViewCell {
var state: Int = 0 var state: Int = 0
var dataSource: [String] = [] { var dataSource: [String] = [] {
didSet { didSet {
if state == 1 || state == 2 { if state == 1 || state == 3 {
} else { } else {
self.dataSource.append("") self.dataSource.append("")
...@@ -64,9 +64,21 @@ class YHAdopterOtherCardTableViewCell: UITableViewCell { ...@@ -64,9 +64,21 @@ class YHAdopterOtherCardTableViewCell: UITableViewCell {
func setupUI() { func setupUI() {
backgroundColor = .clear backgroundColor = .clear
let lineView = UIView()
lineView.backgroundColor = UIColor.separatorColor
contentView.addSubview(lineView)
lineView.snp.makeConstraints { make in
make.left.equalTo(20)
make.right.equalTo(-20)
make.height.equalTo(0.5)
make.top.equalTo(16)
}
contentView.addSubview(collectView) contentView.addSubview(collectView)
collectView.snp.makeConstraints { make in collectView.snp.makeConstraints { make in
make.left.right.top.bottom.equalToSuperview() make.left.right.bottom.equalToSuperview()
make.top.equalTo(17)
} }
} }
} }
...@@ -80,6 +92,7 @@ extension YHAdopterOtherCardTableViewCell: UICollectionViewDelegate, UICollectio ...@@ -80,6 +92,7 @@ extension YHAdopterOtherCardTableViewCell: UICollectionViewDelegate, UICollectio
func collectionView(_ collectionView: UICollectionView, cellForItemAt indexPath: IndexPath) -> UICollectionViewCell { func collectionView(_ collectionView: UICollectionView, cellForItemAt indexPath: IndexPath) -> UICollectionViewCell {
let cell = collectionView.dequeueReusableCell(withReuseIdentifier: YHAdopterOtherCardCollectionViewCell.cellReuseIdentifier, for: indexPath) as! YHAdopterOtherCardCollectionViewCell let cell = collectionView.dequeueReusableCell(withReuseIdentifier: YHAdopterOtherCardCollectionViewCell.cellReuseIdentifier, for: indexPath) as! YHAdopterOtherCardCollectionViewCell
cell.url = self.dataSource[indexPath.row] cell.url = self.dataSource[indexPath.row]
cell.index = indexPath.row + 1
cell.state = state cell.state = state
cell.urlBlock = { [weak self] url, index in cell.urlBlock = { [weak self] url, index in
guard let self = self else { return } guard let self = self else { return }
...@@ -128,6 +141,12 @@ class YHAdopterOtherCardCollectionViewCell: UICollectionViewCell { ...@@ -128,6 +141,12 @@ class YHAdopterOtherCardCollectionViewCell: UICollectionViewCell {
} }
} }
} }
var index: Int = 0 {
didSet {
imagePickView.defaultName = "相关证件\(index)"
}
}
required init?(coder: NSCoder) { required init?(coder: NSCoder) {
super.init(coder: coder) super.init(coder: coder)
} }
......
...@@ -50,6 +50,7 @@ class YHAdopterResidentTableViewCell: UITableViewCell { ...@@ -50,6 +50,7 @@ class YHAdopterResidentTableViewCell: UITableViewCell {
didSet { didSet {
if state == 1 || state == 3 { if state == 1 || state == 3 {
frontDeleteButton.isHidden = true frontDeleteButton.isHidden = true
frontImageButton.isEnabled = false
} }
} }
} }
...@@ -94,7 +95,7 @@ class YHAdopterResidentTableViewCell: UITableViewCell { ...@@ -94,7 +95,7 @@ class YHAdopterResidentTableViewCell: UITableViewCell {
frontLabel = { frontLabel = {
let label = UILabel() let label = UILabel()
label.font = UIFont.PFSC_R(ofSize: 12) label.font = UIFont.PFSC_R(ofSize: 12)
label.textColor = UIColor.subTextColor label.textColor = UIColor.mainTextColor50
label.text = "证件页1" label.text = "证件页1"
label.textAlignment = .center label.textAlignment = .center
return label return label
......
...@@ -79,6 +79,8 @@ class YHAdopterTravelCardTableViewCell: UITableViewCell { ...@@ -79,6 +79,8 @@ class YHAdopterTravelCardTableViewCell: UITableViewCell {
if state == 1 || state == 3 { if state == 1 || state == 3 {
frontDeleteButton.isHidden = true frontDeleteButton.isHidden = true
backSurfaceDeleteButton.isHidden = true backSurfaceDeleteButton.isHidden = true
frontImageButton.isEnabled = false
backSurfaceImageButton.isEnabled = false
} }
} }
} }
...@@ -124,7 +126,7 @@ class YHAdopterTravelCardTableViewCell: UITableViewCell { ...@@ -124,7 +126,7 @@ class YHAdopterTravelCardTableViewCell: UITableViewCell {
frontLabel = { frontLabel = {
let label = UILabel() let label = UILabel()
label.font = UIFont.PFSC_R(ofSize: 12) label.font = UIFont.PFSC_R(ofSize: 12)
label.textColor = UIColor.subTextColor label.textColor = UIColor.mainTextColor50
label.text = "证件页1" label.text = "证件页1"
label.textAlignment = .center label.textAlignment = .center
return label return label
...@@ -140,7 +142,7 @@ class YHAdopterTravelCardTableViewCell: UITableViewCell { ...@@ -140,7 +142,7 @@ class YHAdopterTravelCardTableViewCell: UITableViewCell {
backSurfaceLabel = { backSurfaceLabel = {
let label = UILabel() let label = UILabel()
label.font = UIFont.PFSC_R(ofSize: 12) label.font = UIFont.PFSC_R(ofSize: 12)
label.textColor = UIColor.subTextColor label.textColor = UIColor.mainTextColor50
label.textAlignment = .center label.textAlignment = .center
label.text = "证件页2" label.text = "证件页2"
return label return label
......
...@@ -79,7 +79,7 @@ class YHCardUploadView: UIView { ...@@ -79,7 +79,7 @@ class YHCardUploadView: UIView {
frontLabel = { frontLabel = {
let label = UILabel() let label = UILabel()
label.font = UIFont.PFSC_R(ofSize: 12) label.font = UIFont.PFSC_R(ofSize: 12)
label.textColor = UIColor.subTextColor label.textColor = UIColor.mainTextColor50
label.text = defaultName label.text = defaultName
label.textAlignment = .center label.textAlignment = .center
return label return label
......
...@@ -198,13 +198,13 @@ class YHItemView: UIView { ...@@ -198,13 +198,13 @@ class YHItemView: UIView {
messageTextField.keyboardType = .numberPad messageTextField.keyboardType = .numberPad
} }
if dataSource.isNeed ?? false { if dataSource.isNeed ?? false {
let str = "*" + (dataSource.title ?? "") let str = "* " + (dataSource.title ?? "")
let attributes: [NSAttributedString.Key: Any] = [ let attributes: [NSAttributedString.Key: Any] = [
.font: UIFont.PFSC_R(ofSize: 14), .font: UIFont.PFSC_R(ofSize: 14),
.foregroundColor: UIColor.mainTextColor .foregroundColor: UIColor.mainTextColor
] ]
let questionAttrStr = NSMutableAttributedString(string: str, attributes: attributes) let questionAttrStr = NSMutableAttributedString(string: str, attributes: attributes)
let starRange = NSRange(location: 0, length: 1) 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)
titleLabel.attributedText = questionAttrStr titleLabel.attributedText = questionAttrStr
} else { } else {
...@@ -430,7 +430,7 @@ class YHItemView: UIView { ...@@ -430,7 +430,7 @@ class YHItemView: UIView {
} }
@objc func centerClick() { @objc func centerClick() {
if state == 1 || state == 2 { if state == 1 || state == 3 {
return return
} }
UIViewController.current?.view.endEditing(true) // 收起键盘 UIViewController.current?.view.endEditing(true) // 收起键盘
......
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