Commit 88c3595b 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 2e69886b 3b76634f
......@@ -274,7 +274,6 @@
0472CBA72C5A11640096F48F /* YHPrincipleCongratulationVC.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0472CB9B2C5A11640096F48F /* YHPrincipleCongratulationVC.swift */; };
0472CBA82C5A11640096F48F /* YHPrincipleReviewListVC.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0472CB9C2C5A11640096F48F /* YHPrincipleReviewListVC.swift */; };
0472CBA92C5A11640096F48F /* YHPrincleGroupModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0472CB9E2C5A11640096F48F /* YHPrincleGroupModel.swift */; };
0472CBAA2C5A11640096F48F /* YHPrincipleGroupReviewListCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0472CBA02C5A11640096F48F /* YHPrincipleGroupReviewListCell.swift */; };
0472CBAB2C5A11640096F48F /* YHPrincipleGroupUploadCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0472CBA12C5A11640096F48F /* YHPrincipleGroupUploadCell.swift */; };
0472CBAC2C5A11640096F48F /* YHPrincleViewModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0472CBA32C5A11640096F48F /* YHPrincleViewModel.swift */; };
0472E25C2C521E64008EAB6E /* YHHomeIdentityListVC.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0472E25B2C521E64008EAB6E /* YHHomeIdentityListVC.swift */; };
......@@ -915,7 +914,6 @@
0472CB9B2C5A11640096F48F /* YHPrincipleCongratulationVC.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = YHPrincipleCongratulationVC.swift; sourceTree = "<group>"; };
0472CB9C2C5A11640096F48F /* YHPrincipleReviewListVC.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = YHPrincipleReviewListVC.swift; sourceTree = "<group>"; };
0472CB9E2C5A11640096F48F /* YHPrincleGroupModel.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = YHPrincleGroupModel.swift; sourceTree = "<group>"; };
0472CBA02C5A11640096F48F /* YHPrincipleGroupReviewListCell.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = YHPrincipleGroupReviewListCell.swift; sourceTree = "<group>"; };
0472CBA12C5A11640096F48F /* YHPrincipleGroupUploadCell.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = YHPrincipleGroupUploadCell.swift; sourceTree = "<group>"; };
0472CBA32C5A11640096F48F /* YHPrincleViewModel.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = YHPrincleViewModel.swift; sourceTree = "<group>"; };
0472E25B2C521E64008EAB6E /* YHHomeIdentityListVC.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHHomeIdentityListVC.swift; sourceTree = "<group>"; };
......@@ -2204,7 +2202,6 @@
0472CBA22C5A11640096F48F /* V */ = {
isa = PBXGroup;
children = (
0472CBA02C5A11640096F48F /* YHPrincipleGroupReviewListCell.swift */,
0472CBA12C5A11640096F48F /* YHPrincipleGroupUploadCell.swift */,
0409BEEA2C5B41D4003FCFD7 /* YHPrincipleUnapprovedCell.swift */,
04B360E22C60A346001EB053 /* YHPrinciplePhotoListCell.swift */,
......@@ -3802,7 +3799,6 @@
A59B43C72C48F68200B28379 /* YHEvaluationView.swift in Sources */,
045EEF122B9F171A0022A143 /* YHCNIDCardModel.swift in Sources */,
045EEF032B9F171A0022A143 /* YHFormItemDoubleChoiceCell.swift in Sources */,
0472CBAA2C5A11640096F48F /* YHPrincipleGroupReviewListCell.swift in Sources */,
045EEEAE2B9F171A0022A143 /* YHWorkHighlightsTableViewCell.swift in Sources */,
A567E59A2BD7643D00D5D5A0 /* YHHomeKingKongBlockModel.swift in Sources */,
045EEF062B9F171A0022A143 /* YHFormItemQuestionsCell.swift in Sources */,
......
......@@ -22,9 +22,8 @@ class YHPrincipleReviewListVC: YHBaseViewController {
tableView.dataSource = self
tableView.backgroundColor = UIColor.white
tableView.register(UITableViewCell.self, forCellReuseIdentifier: "UITableViewCell")
tableView.register(YHPrincipleGroupReviewListCell.self, forCellReuseIdentifier: YHPrincipleGroupReviewListCell.cellReuseIdentifier)
tableView.register(YHPrincipleGroupUploadCell.self, forCellReuseIdentifier: YHPrincipleGroupUploadCell.cellReuseIdentifier)
tableView.register(YHPrincipleEnvelopeCell.self, forCellReuseIdentifier: YHPrincipleEnvelopeCell.cellReuseIdentifier)
tableView.register(YHPrincipleUploadStatusCell.self, forCellReuseIdentifier: YHPrincipleUploadStatusCell.cellReuseIdentifier)
return tableView
}()
......@@ -42,24 +41,7 @@ class YHPrincipleReviewListVC: YHBaseViewController {
"新公司在职证明.pdf",
"主申人的曾用名证明文件.pdf",
"无刑事罪行记录证明.pdf"]
let m2 = YHPrincleGroupModel()
m2.fileList = ["新公司在职证明.pdf",
"主申人的曾用名证明文件.pdf"]
let m3 = YHPrincleGroupModel()
m3.fileList = ["新公司在职证明.pdf",
"主申人的曾用名证明文件.pdf",
"主申人的曾用名证明文件.pdf",
"无刑事罪行记录证明.pdf"]
let m4 = YHPrincleGroupModel()
m4.fileList = ["新公司在职证明.pdf",
"主申人的曾用名证明文件.pdf",
"主申人的曾用名证明文件.pdf",
"无刑事罪行记录证明.pdf"]
items.append(contentsOf: [m1, m2, m3, m4])
items.append(contentsOf: [m1])
self.tableView.reloadData()
}
......@@ -84,42 +66,20 @@ extension YHPrincipleReviewListVC: UITableViewDelegate, UITableViewDataSource {
func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell {
if indexPath.section%3 == 0 {
let cell = tableView.dequeueReusableCell(withIdentifier: YHPrincipleGroupUploadCell.cellReuseIdentifier, for: indexPath) as! YHPrincipleGroupUploadCell
return cell
} else if indexPath.section%3 == 1 {
let cell = tableView.dequeueReusableCell(withIdentifier: YHPrincipleGroupReviewListCell.cellReuseIdentifier, for: indexPath) as! YHPrincipleGroupReviewListCell
if 0 <= indexPath.section && indexPath.section < items.count {
let model = items[indexPath.section]
cell.updateModel(model)
cell.expandClick = {
[weak self] isExpand in
guard let self = self else { return }
model.isExpand = isExpand
self.tableView.reloadData()
}
}
return cell
}
// YHPrinciplePhotoCell
// YHPrincipleUnapprovedCell
let cell = tableView.dequeueReusableCell(withIdentifier: YHPrincipleEnvelopeCell.cellReuseIdentifier, for: indexPath) as! YHPrincipleEnvelopeCell
let cell = tableView.dequeueReusableCell(withIdentifier: YHPrincipleUploadStatusCell.cellReuseIdentifier, for: indexPath) as! YHPrincipleUploadStatusCell
if 0 <= indexPath.section && indexPath.section < items.count {
let model = items[indexPath.section]
cell.updateModel(model)
cell.expandClick = {
[weak self] isExpand in
guard let self = self else { return }
model.isExpand = isExpand
self.tableView.reloadData()
}
if 0 <= indexPath.section && indexPath.section < items.count {
let model = items[indexPath.section]
cell.updateModel(model)
cell.expandClick = {
[weak self] isExpand in
guard let self = self else { return }
model.isExpand = isExpand
self.tableView.reloadData()
}
}
return cell
}
......@@ -139,14 +99,13 @@ extension YHPrincipleReviewListVC: UITableViewDelegate, UITableViewDataSource {
}
#endif
}
}
func tableView(_ tableView: UITableView, viewForHeaderInSection section: Int) -> CGFloat {
private func tableView(_ tableView: UITableView, viewForHeaderInSection section: Int) -> CGFloat {
return 24.0
}
func tableView(_ tableView: UITableView, viewForFooterInSection section: Int) -> CGFloat {
private func tableView(_ tableView: UITableView, viewForFooterInSection section: Int) -> CGFloat {
return 1.0
}
......
......@@ -7,9 +7,23 @@
//
import UIKit
import AttributedString
class YHPrincleGroupModel: NSObject {
var fileList:[String] = []
var isExpand:Bool = false
var isNeedTemplate: Bool = false
var isNeedUploadBtn: Bool = true
var tips: String = "1.新公司在职证明(在申请期间更换了工作时必传)\n2.主申人的曾用名证明文件,例如户口本副本\n3.主申请人的中国无刑事罪行记录证明书副本(由公安局开具)"
var tips1: ASAttributedString = YHPrincleGroupModel.getTips()
var redTips: String = ""
static func getTips() -> ASAttributedString {
let a: ASAttributedString = .init("请【下载模板】,填写信息,贵单位", .font(UIFont.PFSC_R(ofSize: 12)),.foreground(UIColor.mainTextColor))
let b: ASAttributedString = .init("签字盖章", .font(UIFont.PFSC_R(ofSize: 12)),.foreground(UIColor.init(hex: 0x3570DC)))
let c: ASAttributedString = .init("后,拍照or扫描上传", .font(UIFont.PFSC_R(ofSize: 12)),.foreground(UIColor.mainTextColor))
return a + b + c
}
}
//
// YHPrincipleGroupReviewListCell.swift
// galaxy
//
// Created by edy on 2024/4/29.
// Copyright © 2024 https://www.galaxy-immi.com. All rights reserved.
//
import UIKit
class YHPrincipleGroupReviewItemView: UIView {
static let height = 55.0
var iconImgV: UIImageView!
var titleLabel: UILabel!
var timeLabel: UILabel!
override init(frame: CGRect) {
super.init(frame: frame)
setupUI()
}
required init?(coder: NSCoder) {
super.init(coder: coder)
}
func updateModel(_ str: String) {
titleLabel.text = str
timeLabel.text = "上传于2023.02.06"
}
func setupUI() {
iconImgV = UIImageView(image: UIImage(named: "my_cer_type_pdf"))
self.addSubview(iconImgV)
titleLabel = UILabel()
titleLabel.font = UIFont.PFSC_M(ofSize: 14)
titleLabel.textColor = UIColor.mainTextColor
titleLabel.text = "新公司在职证明.pdf"
self.addSubview(titleLabel)
timeLabel = UILabel()
timeLabel.font = UIFont.PFSC_R(ofSize: 11)
timeLabel.textColor = UIColor.labelTextColor2
timeLabel.text = "上传于2024.12.12"
self.addSubview(timeLabel)
iconImgV.snp.makeConstraints { make in
make.left.equalTo(22)
make.centerY.equalToSuperview()
make.width.height.equalTo(31.0)
}
titleLabel.snp.makeConstraints { make in
make.bottom.equalTo(self.snp.centerY).offset(-1)
make.left.equalTo(iconImgV.snp.right).offset(18)
make.right.equalTo(-16)
make.height.equalTo(20)
}
timeLabel.snp.makeConstraints { make in
make.top.equalTo(self.snp.centerY).offset(1)
make.left.equalTo(iconImgV.snp.right).offset(18)
make.height.equalTo(20)
make.right.equalTo(-16)
}
}
}
class YHPrincipleGroupReviewListCell: UITableViewCell {
static let cellReuseIdentifier = "YHPrincipleGroupReviewListCell"
var itemModel:YHPrincleGroupModel?
var expandClick:((Bool)->())?
var iconImgV: UIImageView!
var titleLabel: UILabel!
var grayView: UIView!
var expandBtn: UIButton!
lazy var listTitleLabel: UILabel = {
let label = UILabel()
label.font = UIFont.PFSC_M(ofSize: 17)
label.textColor = UIColor.mainTextColor
label.text = "已获得港府甄选名额"
return label
}()
lazy var detailLabel: UILabel = {
let label = UILabel()
label.numberOfLines = 0
label.font = UIFont.PFSC_R(ofSize: 12)
label.textColor = UIColor.labelTextColor2
label.text = "1.新公司在职证明(在申请期间更换了工作时必传)\n2.主申人的曾用名证明文件,例如户口本副本\n3.主申请人的中国无刑事罪行记录证明书副本(由公安局开具)"
return label
}()
lazy var statusLabel: UILabel = {
let label = UILabel()
label.textAlignment = .center
label.font = UIFont.PFSC_R(ofSize: 10)
label.textColor = UIColor.init(hex: 0xFF9900)
label.backgroundColor = UIColor.init(hex:0xFF9900, alpha:0.3)
label.text = "审核中"
label.layer.cornerRadius = 4.0
label.clipsToBounds = true
return label
}()
lazy var listView: UIView = {
let view = UIView()
return view
}()
var items: [String] = []
required init?(coder: NSCoder) {
super.init(coder: coder)
}
override init(style: UITableViewCell.CellStyle, reuseIdentifier: String?) {
super.init(style: style, reuseIdentifier: reuseIdentifier)
setupUI()
}
func updateModel(_ model:YHPrincleGroupModel) {
itemModel = model
items.removeAll()
items.append(contentsOf: model.fileList)
grayView.isHidden = !model.isExpand
if !model.isExpand {
grayView.removeSubviews()
grayView.snp.remakeConstraints { make in
make.left.right.equalTo(titleLabel)
make.top.equalTo(titleLabel.snp.bottom)
make.height.equalTo(0)
make.bottom.equalToSuperview()
}
return
}
// 展开状态
listView.removeSubviews()
grayView.addSubview(listTitleLabel)
grayView.addSubview(statusLabel)
grayView.addSubview(detailLabel)
grayView.addSubview(listView)
grayView.snp.remakeConstraints { make in
make.left.right.equalTo(titleLabel)
make.top.equalTo(titleLabel.snp.bottom).offset(12.0)
make.bottom.equalToSuperview()
}
listTitleLabel.snp.remakeConstraints { make in
make.left.equalTo(16)
make.top.equalTo(16)
make.height.equalTo(24)
}
statusLabel.snp.remakeConstraints { make in
make.left.equalTo(listTitleLabel.snp.right).offset(8)
make.size.equalTo(CGSize(width: 38, height: 15))
make.centerY.equalTo(listTitleLabel)
make.right.lessThanOrEqualTo(-16)
}
detailLabel.snp.remakeConstraints { make in
make.left.equalTo(16)
make.right.equalTo(-16)
make.top.equalTo(listTitleLabel.snp.bottom).offset(28)
}
listView.snp.remakeConstraints { make in
make.left.right.equalTo(0)
make.top.equalTo(detailLabel.snp.bottom).offset(16)
let listHeight = Double(model.fileList.count) * YHPrincipleGroupReviewItemView.height
make.height.equalTo(listHeight)
let bottomMargin = model.fileList.count > 0 ? -16.0 : 0
make.bottom.equalTo(bottomMargin)
}
var lastItemView: YHPrincipleGroupReviewItemView? = nil
for (index, title) in items.enumerated() {
let itemView = YHPrincipleGroupReviewItemView(frame: .zero)
itemView.updateModel(title)
listView.addSubview(itemView)
itemView.snp.makeConstraints { make in
make.left.right.equalTo(0)
make.height.equalTo(YHPrincipleGroupReviewItemView.height)
if let lastItemView = lastItemView {
make.top.equalTo(lastItemView.snp.bottom)
} else {
make.top.equalToSuperview()
}
}
lastItemView = itemView
}
self.setNeedsLayout()
self.layoutIfNeeded()
}
@objc func didExpandBtnClicked() {
guard let model = itemModel else { return }
expandClick?(!model.isExpand)
}
func setupUI() {
self.selectionStyle = .none
contentView.backgroundColor = UIColor.white
iconImgV = UIImageView(image: UIImage(named: "custom_service_icon_right"))
contentView.addSubview(iconImgV)
titleLabel = UILabel()
titleLabel.font = UIFont.PFSC_R(ofSize: 13)
titleLabel.textColor = UIColor.mainTextColor
titleLabel.text = "已获得港府甄选名额"
contentView.addSubview(titleLabel)
expandBtn = UIButton()
expandBtn.addTarget(self, action: #selector(didExpandBtnClicked), for: .touchUpInside)
contentView.addSubview(expandBtn)
grayView = UIView()
grayView.backgroundColor = UIColor.init(hex: 0xf8f9fb)
grayView.layer.cornerRadius = 6.0
grayView.clipsToBounds = true
contentView.addSubview(grayView)
iconImgV.snp.makeConstraints { make in
make.left.equalTo(24)
make.width.height.equalTo(14.0)
make.centerY.equalTo(titleLabel)
}
titleLabel.snp.makeConstraints { make in
make.left.equalTo(iconImgV.snp.right).offset(8)
make.right.equalTo(-24)
make.top.equalTo(0)
make.height.equalTo(22)
}
expandBtn.snp.makeConstraints { make in
make.left.right.top.equalToSuperview()
make.bottom.equalTo(titleLabel)
}
grayView.snp.makeConstraints { make in
make.top.equalTo(titleLabel.snp.bottom).offset(12)
make.left.right.equalTo(titleLabel)
make.bottom.equalToSuperview()
}
}
}
......@@ -173,6 +173,72 @@ extension YHServiceOrderProgressTableViewCell {
let b: ASAttributedString = .init(NSAttributedString(string: "\(model.percentage)"), .font(UIFont(name: "DINAlternate-Bold", size: 24)!),.foreground(UIColor.mainTextColor))
let bb: ASAttributedString = .init("%", .font(UIFont.PFSC_M(ofSize: 10)),.foreground(UIColor.mainTextColor.withAlphaComponent(0.3)))
progressLabel.attributed.text = b + bb
if model.type == 11 {
titleLabel.text = "港府获批结果"
messageLabel.text = "正在等待原则批结果~"
buttonLabel.text = "去查看"
buttonLabel.backgroundColor = UIColor.brandMainColor
messageLabel.textColor = UIColor.yhGreyColor50
progress.changeColor(UIColor.brandMainColor)
progressImageView.image = UIImage(named: "service_progress_normal")
let b: ASAttributedString = .init(NSAttributedString(string: "\(model.percentage)"), .font(UIFont(name: "DINAlternate-Bold", size: 24)!),.foreground(UIColor.mainTextColor.withAlphaComponent(0.3)))
let bb: ASAttributedString = .init("%", .font(UIFont.PFSC_M(ofSize: 10)),.foreground(UIColor.mainTextColor.withAlphaComponent(0.3)))
progressLabel.attributed.text = b + bb
}
if model.type == 12 {
titleLabel.text = "港府获批结果"
messageLabel.text = "正在进行原则批补件~"
buttonLabel.text = "去查看"
buttonLabel.backgroundColor = UIColor.brandMainColor
messageLabel.textColor = UIColor.yhGreyColor50
progress.changeColor(UIColor.brandMainColor)
progressImageView.image = UIImage(named: "service_progress_normal")
let b: ASAttributedString = .init(NSAttributedString(string: "\(model.percentage)"), .font(UIFont(name: "DINAlternate-Bold", size: 24)!),.foreground(UIColor.mainTextColor.withAlphaComponent(0.3)))
let bb: ASAttributedString = .init("%", .font(UIFont.PFSC_M(ofSize: 10)),.foreground(UIColor.mainTextColor.withAlphaComponent(0.3)))
progressLabel.attributed.text = b + bb
}
if model.type == 13 {
titleLabel.text = "港府获批结果"
messageLabel.text = "恭喜您,原则批已获批~"
buttonLabel.text = "去查看"
buttonLabel.backgroundColor = UIColor.brandMainColor
messageLabel.textColor = UIColor.yhGreyColor50
progress.changeColor(UIColor.brandMainColor)
progressImageView.image = UIImage(named: "service_progress_start")
let b: ASAttributedString = .init(NSAttributedString(string: "\(model.percentage)"), .font(UIFont(name: "DINAlternate-Bold", size: 24)!),.foreground(UIColor.mainTextColor))
let bb: ASAttributedString = .init("%", .font(UIFont.PFSC_M(ofSize: 10)),.foreground(UIColor.mainTextColor.withAlphaComponent(0.3)))
progressLabel.attributed.text = b + bb
}
if model.type == 14 {
titleLabel.text = "港府获批结果"
messageLabel.text = "很遗憾,您未获批准~"
buttonLabel.text = "去查看"
buttonLabel.backgroundColor = UIColor(hex: 0x55cba0)
messageLabel.textColor = UIColor.yhGreyColor50
progress.changeColor(UIColor(hex: 0x55cba0))
progressImageView.image = UIImage(named: "service_progress_end")
let b: ASAttributedString = .init(NSAttributedString(string: "\(model.percentage)"), .font(UIFont(name: "DINAlternate-Bold", size: 24)!),.foreground(UIColor.mainTextColor))
let bb: ASAttributedString = .init("%", .font(UIFont.PFSC_M(ofSize: 10)),.foreground(UIColor.mainTextColor.withAlphaComponent(0.3)))
progressLabel.attributed.text = b + bb
}
if model.type == 15 {
titleLabel.text = "港府获批结果"
messageLabel.text = "恭喜您,正式批已获批~"
buttonLabel.text = "去查看"
buttonLabel.backgroundColor = UIColor(hex: 0x55cba0)
messageLabel.textColor = UIColor.yhGreyColor50
progress.changeColor(UIColor(hex: 0x55cba0))
progressImageView.image = UIImage(named: "service_progress_end")
let b: ASAttributedString = .init(NSAttributedString(string: "\(model.percentage)"), .font(UIFont(name: "DINAlternate-Bold", size: 24)!),.foreground(UIColor.mainTextColor))
let bb: ASAttributedString = .init("%", .font(UIFont.PFSC_M(ofSize: 10)),.foreground(UIColor.mainTextColor.withAlphaComponent(0.3)))
progressLabel.attributed.text = b + bb
}
}
if model.status == 3 {
titleLabel.textColor = UIColor.mainTextColor
......
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