Commit 98c28726 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
parents 6efc06e1 aac95372
......@@ -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 */; };
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 */; };
0472E25E2C534723008EAB6E /* YHLifeDetailViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0472E25D2C534723008EAB6E /* YHLifeDetailViewController.swift */; };
......@@ -914,7 +913,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>"; };
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>"; };
0472E25D2C534723008EAB6E /* YHLifeDetailViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHLifeDetailViewController.swift; sourceTree = "<group>"; };
......@@ -2202,7 +2200,6 @@
0472CBA22C5A11640096F48F /* V */ = {
isa = PBXGroup;
children = (
0472CBA12C5A11640096F48F /* YHPrincipleGroupUploadCell.swift */,
0409BEEA2C5B41D4003FCFD7 /* YHPrincipleUnapprovedCell.swift */,
04B360E22C60A346001EB053 /* YHPrinciplePhotoListCell.swift */,
04B360E42C60B5D3001EB053 /* YHPrinciplePhotoCollectCell.swift */,
......@@ -3875,7 +3872,6 @@
04CE1AD22C2AD91F001CB80A /* YHActivityModel.swift in Sources */,
0445E6AF2BE9CFF6003C52F9 /* YHAppVersionForceUpdateView.swift in Sources */,
04213B272C48C95E00797900 /* YHHomeIdentityCell.swift in Sources */,
0472CBAB2C5A11640096F48F /* YHPrincipleGroupUploadCell.swift in Sources */,
04CE1AD32C2AD91F001CB80A /* YHTravelModel.swift in Sources */,
04213B372C4F87C600797900 /* YHHomeLifeCategoryDetailModel.swift in Sources */,
04B9EE5A2C06CC3100A4018D /* YHCodeSueecssViewController.swift in Sources */,
......
......@@ -20,34 +20,56 @@ class YHPrincipleReviewListVC: YHBaseViewController {
tableView.separatorStyle = .none
tableView.delegate = self
tableView.dataSource = self
tableView.backgroundColor = UIColor.init(hex: 0xf8f9fb)
tableView.backgroundColor = .clear
tableView.register(UITableViewCell.self, forCellReuseIdentifier: "UITableViewCell")
tableView.register(YHPrincipleGroupUploadCell.self, forCellReuseIdentifier: YHPrincipleGroupUploadCell.cellReuseIdentifier)
tableView.register(YHPrincipleUnapprovedCell.self, forCellReuseIdentifier: YHPrincipleUnapprovedCell.cellReuseIdentifier)
tableView.register(YHPrincipleUploadStatusCell.self, forCellReuseIdentifier: YHPrincipleUploadStatusCell.cellReuseIdentifier)
return tableView
}()
lazy var bgView:UIView = {
let view = UIView()
view.backgroundColor = UIColor.init(hex: 0xF8F8F8)
let imgView = UIImageView(image: UIImage(named: "principle_detail_head_bg"))
view.addSubview(imgView)
imgView.snp.makeConstraints { make in
make.left.right.top.equalToSuperview()
make.height.equalTo(imgView.snp.width)
}
return view
}()
override func viewDidLoad() {
super.viewDidLoad()
self.view.backgroundColor = .white
self.gk_navTitle = "原则批"
gk_navigationBar.backgroundColor = .clear
createUI()
items.removeAll()
let m1 = YHPrincleGroupModel()
m1.fileList = ["新公司在职证明.pdf",
"主申人的曾用名证明文件.pdf"]
let m2 = YHPrincleGroupModel()
m2.fileList = ["新公司在职证明.pdf",
"主申人的曾用名证明文件.pdf",
"无刑事罪行记录证明.pdf",
"新公司在职证明.pdf",
"主申人的曾用名证明文件.pdf",
"无刑事罪行记录证明.pdf"]
items.append(contentsOf: [m1])
items.append(contentsOf: [m1, m2])
self.tableView.reloadData()
}
func createUI() {
view.addSubview(bgView)
view.addSubview(tableView)
bgView.snp.makeConstraints { make in
make.top.left.right.equalToSuperview()
make.bottom.equalToSuperview()
}
tableView.snp.makeConstraints { make in
make.top.equalToSuperview().offset(k_Height_NavigationtBarAndStatuBar)
make.left.right.bottom.equalToSuperview()
......@@ -57,21 +79,35 @@ class YHPrincipleReviewListVC: YHBaseViewController {
extension YHPrincipleReviewListVC: UITableViewDelegate, UITableViewDataSource {
func numberOfSections(in tableView: UITableView) -> Int {
return items.count
}
func tableView(_ tableView: UITableView, numberOfRowsInSection section: Int) -> Int {
return 1
return items.count
}
func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell {
// YHPrinciplePhotoCell
// YHPrincipleUnapprovedCell
if indexPath.row%2 == 0 {
let cell = tableView.dequeueReusableCell(withIdentifier: YHPrincipleUnapprovedCell.cellReuseIdentifier, for: indexPath) as! YHPrincipleUnapprovedCell
if 0 <= indexPath.row && indexPath.row < items.count {
let model = items[indexPath.row]
cell.updateModel(model)
cell.expandClick = {
[weak self] isExpand in
guard let self = self else { return }
model.isExpand = isExpand
self.tableView.reloadData()
}
}
return cell
}
let cell = tableView.dequeueReusableCell(withIdentifier: YHPrincipleUploadStatusCell.cellReuseIdentifier, for: indexPath) as! YHPrincipleUploadStatusCell
if 0 <= indexPath.section && indexPath.section < items.count {
let model = items[indexPath.section]
if 0 <= indexPath.row && indexPath.row < items.count {
let model = items[indexPath.row]
cell.updateModel(model)
cell.expandClick = {
[weak self] isExpand in
......
......@@ -122,7 +122,8 @@ class YHPrincipleEnvelopeCell: UITableViewCell {
func setupUI() {
self.selectionStyle = .none
contentView.backgroundColor = UIColor.init(hex: 0xf8f9fb)
self.contentView.backgroundColor = .clear
self.backgroundColor = .clear
contentView.addSubview(iconImgView)
contentView.addSubview(titleLabel)
contentView.addSubview(expandBtn)
......
//
// YHPrincipleGroupUploadCell.swift
// galaxy
//
// Created by edy on 2024/5/6.
// Copyright © 2024 https://www.galaxy-immi.com. All rights reserved.
//
import UIKit
import AttributedString
class YHPrincipleGroupUploadCell: UITableViewCell {
static let cellReuseIdentifier = "YHPrincipleGroupUploadCell"
let btnTitleColor:UIColor = .brandMainColor
let uploadBtnSize = CGSize(width: (KScreenWidth-(40)*2), height: 44)
var isNeedTemplate: Bool = false
lazy var whiteView: UIView = {
let view = UIView()
view.backgroundColor = UIColor.white
view.layer.cornerRadius = 6.0
view.clipsToBounds = true
return view
}()
lazy var lineView: UIView = {
let view = UIView()
view.backgroundColor = UIColor.init(hex: 0xF0F0F0)
return view
}()
lazy var titleLabel: UILabel = {
let label = UILabel()
label.font = UIFont.PFSC_M(ofSize: 17)
label.textColor = UIColor.mainTextColor
label.text = "《赴港居留同意书》"
return label
}()
lazy var titleView: UITextView = {
let view = UITextView()
view.text = "《赴港居留同意书》"
view.textColor = UIColor.mainTextColor
view.font = UIFont.PFSC_M(ofSize: 17)
view.isScrollEnabled = false
view.isEditable = false
view.isSelectable = false
return view
}()
lazy var detailLabel: UILabel = {
var label = UILabel()
label.numberOfLines = 0
let a: ASAttributedString = .init("由你现時所属內地工作单位或负责储存你的記錄的內地有关当局所发出的赴港居留同意书。\n", .font(UIFont.PFSC_R(ofSize: 12)),.foreground(UIColor.init(hex: 0x888F98)))
let b: ASAttributedString = .init("请【下载模板】,填写信息,贵单位", .font(UIFont.PFSC_R(ofSize: 12)),.foreground(UIColor.mainTextColor))
let c: ASAttributedString = .init("签字盖章", .font(UIFont.PFSC_R(ofSize: 12)),.foreground(UIColor.init(hex: 0x3570DC)))
let d: ASAttributedString = .init("后,拍照or扫描上传", .font(UIFont.PFSC_R(ofSize: 12)),.foreground(UIColor.mainTextColor))
label.attributed.text = a+b+c+d
return label
}()
lazy var uploadBtn: UIButton = {
let btn = UIButton()
btn.setTitle("上传".local, for: .normal)
btn.titleLabel?.font = UIFont.PFSC_M(ofSize: 14)
btn.setTitleColor(UIColor.init(hex: 0x3570DC), for: .normal)
btn.iconInLeft(spacing: 6)
btn.setImage(UIImage(named: "form_add_info"), for: .normal)
btn.addTarget(self, action: #selector(didClickUploadBtn), for: .touchUpInside)
return btn
}()
lazy var dotLineLayer:CAShapeLayer = {
let borderLayer = CAShapeLayer()
borderLayer.path = UIBezierPath(roundedRect: CGRect(x: 0, y: 0, width: uploadBtnSize.width, height: uploadBtnSize.height), cornerRadius: 3.0).cgPath
borderLayer.lineWidth = 1
//[数组第一个数字表示单个虚线长度,第二个数字表示间隔]
borderLayer.lineDashPattern = [3,1] as [NSNumber]?
//前边是虚线的长度,后边是虚线之间空隙的长度
borderLayer.lineDashPhase = 0.1
//实线边框
borderLayer.fillColor = UIColor.clear.cgColor
borderLayer.strokeColor = btnTitleColor.cgColor
return borderLayer
}()
required init?(coder: NSCoder) {
super.init(coder: coder)
}
override init(style: UITableViewCell.CellStyle, reuseIdentifier: String?) {
super.init(style: style, reuseIdentifier: reuseIdentifier)
setupUI()
}
@objc func didClickUploadBtn() {
}
func updateStatus(_ status: Int) {
}
func setupUI() {
self.selectionStyle = .none
contentView.backgroundColor = UIColor.init(hex: 0xf8f9fb)
contentView.addSubview(whiteView)
whiteView.addSubview(titleLabel)
whiteView.addSubview(lineView)
whiteView.addSubview(detailLabel)
whiteView.addSubview(uploadBtn)
uploadBtn.layer.addSublayer(dotLineLayer)
whiteView.snp.makeConstraints { make in
make.left.equalTo(24)
make.right.equalTo(-24)
make.top.bottom.equalTo(0)
}
titleLabel.snp.makeConstraints { make in
make.left.equalTo(16)
make.right.equalTo(-16)
make.top.equalTo(16)
make.height.equalTo(24)
}
lineView.snp.makeConstraints { make in
make.left.right.equalToSuperview()
make.height.equalTo(0.5)
make.top.equalTo(titleLabel.snp.bottom).offset(12)
}
detailLabel.snp.makeConstraints { make in
make.left.equalTo(16)
make.right.equalTo(-16)
make.top.equalTo(lineView.snp.bottom).offset(16)
}
uploadBtn.snp.makeConstraints { make in
make.left.equalTo(16)
make.right.equalTo(-16)
make.top.equalTo(detailLabel.snp.bottom).offset(16)
make.height.equalTo(44)
make.bottom.equalTo(-16)
}
}
}
......@@ -56,6 +56,8 @@ class YHPrinciplePhotoCollectCell: UICollectionViewCell {
func createUI() {
self.contentView.backgroundColor = .clear
self.backgroundColor = .clear
self.addSubview(imgView)
self.addSubview(titleLabel)
......
......@@ -143,7 +143,8 @@ class YHPrinciplePhotoListCell: UITableViewCell {
func setupUI() {
self.selectionStyle = .none
contentView.backgroundColor = UIColor.init(hex: 0xf8f9fb)
self.contentView.backgroundColor = .clear
self.backgroundColor = .clear
contentView.addSubview(iconImgView)
contentView.addSubview(titleLabel)
contentView.addSubview(expandBtn)
......
......@@ -192,7 +192,8 @@ class YHPrincipleUnapprovedCell: UITableViewCell {
func setupUI() {
self.selectionStyle = .none
contentView.backgroundColor = UIColor.init(hex: 0xf8f9fb)
self.contentView.backgroundColor = .clear
self.backgroundColor = .clear
contentView.addSubview(iconImgView)
contentView.addSubview(titleLabel)
contentView.addSubview(expandBtn)
......
......@@ -164,7 +164,8 @@ class YHPrincipleUploadStatusCell: UITableViewCell {
}
func setupUI() {
contentView.backgroundColor = UIColor.init(hex: 0xf8f9fb)
self.contentView.backgroundColor = .clear
self.backgroundColor = .clear
}
func updateModel(_ model:YHPrincleGroupModel) {
......
......@@ -377,4 +377,11 @@ class YHAllApiName {
static let record = "super-app/record/list"
}
struct Principle {
// 原则批审批结果
static let getReviewResult = "super-app/order/approval/principle"
// ApprovalInfo 获取档案号
static let getProfileList = "super-app/order/approval/info"
}
}
{
"images" : [
{
"idiom" : "universal",
"scale" : "1x"
},
{
"filename" : "Mask group@2x.png",
"idiom" : "universal",
"scale" : "2x"
},
{
"filename" : "Mask group@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