Commit 460a1a0e authored by David黄金龙's avatar David黄金龙

Merge branch 'davidhuang' into develop

* davidhuang:
  替换 一些图片
  我的文书  底部UI 及逻辑
  一处 UI展示
parents 8ed6edc7 479ab22e
......@@ -252,6 +252,8 @@
A51044182B493675006B60BB /* README.md in Resources */ = {isa = PBXBuildFile; fileRef = A51044172B493675006B60BB /* README.md */; };
A510441A2B495DD0006B60BB /* UIView+Extension.swift in Sources */ = {isa = PBXBuildFile; fileRef = A51044192B495DD0006B60BB /* UIView+Extension.swift */; };
A514E5DC2B60A2B700C93951 /* YHServiceCenterSecondViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = A514E5DB2B60A2B700C93951 /* YHServiceCenterSecondViewController.swift */; };
A517A4DF2BB53BE8000DEECD /* YHDocListBottomView.swift in Sources */ = {isa = PBXBuildFile; fileRef = A517A4DE2BB53BE8000DEECD /* YHDocListBottomView.swift */; };
A517A4E12BB573EB000DEECD /* YHDocListCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = A517A4E02BB573EB000DEECD /* YHDocListCell.swift */; };
A520124F2BABCE05008655EA /* YHFileListContentView.swift in Sources */ = {isa = PBXBuildFile; fileRef = A520124E2BABCE05008655EA /* YHFileListContentView.swift */; };
A53026902B4E6F2700F35102 /* YHHomeCustomCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = A530268F2B4E6F2700F35102 /* YHHomeCustomCell.swift */; };
A53B61122BB128AF0010B573 /* YHFileListItemsView2.swift in Sources */ = {isa = PBXBuildFile; fileRef = A53B61112BB128AF0010B573 /* YHFileListItemsView2.swift */; };
......@@ -648,6 +650,8 @@
A51044172B493675006B60BB /* README.md */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = net.daringfireball.markdown; path = README.md; sourceTree = "<group>"; };
A51044192B495DD0006B60BB /* UIView+Extension.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = "UIView+Extension.swift"; sourceTree = "<group>"; };
A514E5DB2B60A2B700C93951 /* YHServiceCenterSecondViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHServiceCenterSecondViewController.swift; sourceTree = "<group>"; };
A517A4DE2BB53BE8000DEECD /* YHDocListBottomView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHDocListBottomView.swift; sourceTree = "<group>"; };
A517A4E02BB573EB000DEECD /* YHDocListCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHDocListCell.swift; sourceTree = "<group>"; };
A520124E2BABCE05008655EA /* YHFileListContentView.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = YHFileListContentView.swift; sourceTree = "<group>"; };
A530268F2B4E6F2700F35102 /* YHHomeCustomCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHHomeCustomCell.swift; sourceTree = "<group>"; };
A53B61112BB128AF0010B573 /* YHFileListItemsView2.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHFileListItemsView2.swift; sourceTree = "<group>"; };
......@@ -1637,6 +1641,8 @@
isa = PBXGroup;
children = (
A53B61182BB3C9960010B573 /* YHMyDocListHeaderView.swift */,
A517A4DE2BB53BE8000DEECD /* YHDocListBottomView.swift */,
A517A4E02BB573EB000DEECD /* YHDocListCell.swift */,
);
path = V;
sourceTree = "<group>";
......@@ -2495,6 +2501,7 @@
045EEEE72B9F171A0022A143 /* YHMySignatureListTableViewCell.swift in Sources */,
A5C382CC2B5EA11800C5E65C /* YHContractCell.swift in Sources */,
0477E17C2BA4238400436346 /* YHCertificateListContainerVC.swift in Sources */,
A517A4DF2BB53BE8000DEECD /* YHDocListBottomView.swift in Sources */,
04C8F4832B7216D800ADF59B /* YHUserInfoHeaderView.swift in Sources */,
045EEEAF2B9F171A0022A143 /* YHWorkExperienceTextItemView.swift in Sources */,
A5ACE9492B4564F7002C94D2 /* YHHUDSuccessView.swift in Sources */,
......@@ -2562,6 +2569,7 @@
04A271252BAC33BB00652B1B /* YHFilePreviewTool.swift in Sources */,
045EEEC32B9F171A0022A143 /* YHOtherResidenceFillView.swift in Sources */,
045EEE792B9F171A0022A143 /* YHPreviewViewModel.swift in Sources */,
A517A4E12BB573EB000DEECD /* YHDocListCell.swift in Sources */,
A58037212BAD7B2A0031C312 /* YHMySchemeModel.swift in Sources */,
0493B3DE2BA80C2300AF9393 /* YHCertificateFilterButton.swift in Sources */,
045EEE822B9F171A0022A143 /* YHPersonInfoIdentityCardModel.swift in Sources */,
......
......@@ -23,7 +23,6 @@ class YHBaseViewController: UIViewController {
gk_navBarAlpha = 0
gk_backImage = UIImage(named: "nav_icon_back_back")
// gk_backImage = UIImage(named: "nav_back_icon")
#if DEBUG
......
......@@ -34,6 +34,7 @@ class YHFileListItemView: UIView {
lable0.textColor = UIColor.mainTextColor
lable0.font = UIFont.PFSC_R(ofSize: 15)
lable0.numberOfLines = 0
lable0.lineBreakMode = .byWordWrapping
return lable0
}()
......@@ -103,7 +104,7 @@ private extension YHFileListItemView {
titleLable.snp.makeConstraints { make in
make.top.equalTo(kMargin)
make.left.equalTo(40)
make.right.equalTo(statusLable.snp.left).offset(-6)
make.right.equalTo(statusLable.snp.left).offset(-12)
}
......
......@@ -12,7 +12,6 @@ import UIKit
*/
class YHMyDocumentsListViewController: YHBaseViewController {
var bottomView: UIView!
var bottomButton: UIButton!
var tableView: UITableView!
var dataSource: [YHMyDocumentsListModel]?
......@@ -21,13 +20,23 @@ class YHMyDocumentsListViewController: YHBaseViewController {
var mobile: String = ""
private var isEditFlag : Bool = false {
didSet {
updateUIForEditStatus()
}
}
lazy var headSessionView : YHMyDocListHeaderView = {
let view = YHMyDocListHeaderView()
return view
}()
lazy var bottomView : YHDocListBottomView = {
let view = YHDocListBottomView()
return view
}()
//头部背景图片
lazy var headBkgImagV: UIImageView = {
let imagV = UIImageView()
......@@ -81,6 +90,29 @@ extension YHMyDocumentsListViewController {
make.height.equalTo(YHMyDocListHeaderView.viewH)
}
headSessionView.block = { type in
self.updateUIForClickButton(type: type)
self.isEditFlag = type == .downAll ? true : false
}
view.addSubview(bottomView)
bottomView.snp.makeConstraints { make in
make.bottom.left.right.equalToSuperview()
make.height.equalTo(YHDocListBottomView.viewH)
}
bottomView.isHidden = true
bottomView.block = { (type,flag) in
if type == .downAllCheck {
} else if type == .allChoice {
if flag {
//全选
} else {
//全选 的 反选
}
}
}
tableView = {
let tableView = UITableView(frame:.zero, style:.plain)
......@@ -89,52 +121,52 @@ extension YHMyDocumentsListViewController {
tableView.separatorStyle = .none
tableView.delegate = self
tableView.dataSource = self
tableView.register(cellWithClass: YHMySignatureListTableViewCell.self)
tableView.register(cellWithClass: YHDocListCell.self)
return tableView
}()
view.addSubview(tableView)
tableView.snp.makeConstraints { make in
make.top.equalTo(headSessionView.snp.bottom)
make.left.right.bottom.equalToSuperview()
make.left.right.equalToSuperview()
make.bottom.equalToSuperview()
}
// bottomView = {
// let bottom = UIView()
// bottom.backgroundColor = .white
// return bottom
// }()
// view.addSubview(bottomView)
// bottomView.snp.makeConstraints { make in
// make.left.right.bottom.equalToSuperview()
// make.height.equalTo(k_Height_safeAreaInsetsBottom() + 64)
// }
//
// bottomButton = {
// let button = UIButton(type: .custom)
// button.titleLabel?.font = UIFont.PFSC_M(ofSize: 16)
// button.contentHorizontalAlignment = .center
// button.setTitle("提交", for: .normal)
// button.setTitleColor( UIColor(hex:0xffffff), for: .normal)
// button.layer.cornerRadius = kCornerRadius6
// button.clipsToBounds = true
// button.addTarget(self, action: #selector(submit), for: .touchUpInside)
// return button
// }()
// bottomView.addSubview(bottomButton)
// bottomButton.snp.makeConstraints { make in
// make.right.equalTo(-16)
// make.top.equalTo(8)
// make.height.equalTo(48)
// make.left.equalTo(16)
// }
//
// bottomButton.layoutIfNeeded()
// bottomButton.addYinHeGradualLayer()
bottomView.layoutIfNeeded()
bottomView.bottomButton.addYinHeGradualLayer()
}
@objc func submit() {
private func updateUIForEditStatus() {
//
}
private func updateUIForClickButton(type : ClickButtonType) {
bottomView.snp.removeConstraints()
tableView.snp.removeConstraints()
if type == .downAll {
bottomView.isHidden = false
bottomView.snp.remakeConstraints { make in
make.bottom.left.right.equalToSuperview()
make.height.equalTo(YHDocListBottomView.viewH)
}
tableView.snp.remakeConstraints { make in
make.top.equalTo(headSessionView.snp.bottom)
make.left.right.equalToSuperview()
make.bottom.equalTo(bottomView.snp.top)
}
} else if type == .cancel {
bottomView.isHidden = true
tableView.snp.remakeConstraints { make in
make.top.equalTo(headSessionView.snp.bottom)
make.left.right.equalToSuperview()
make.bottom.equalToSuperview()
}
}
}
}
extension YHMyDocumentsListViewController: UITableViewDelegate, UITableViewDataSource {
......@@ -143,13 +175,13 @@ extension YHMyDocumentsListViewController: UITableViewDelegate, UITableViewDataS
}
func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell {
let cell = tableView.dequeueReusableCell(withClass: YHMySignatureListTableViewCell.self)
cell.textLabel?.text = viewModel?.mainModel?.docs[indexPath.row].doc_type_name
let cell = tableView.dequeueReusableCell(withClass: YHDocListCell.self)
cell.dataSourceForDocs = viewModel?.mainModel?.docs[indexPath.row]
return cell
}
func tableView(_ tableView: UITableView, heightForRowAt indexPath: IndexPath) -> CGFloat {
return CGFloat(86)
return UITableView.automaticDimension
}
func tableView(_ tableView: UITableView, didSelectRowAt indexPath: IndexPath) {
......
//
// YHDocListBottomView.swift
// galaxy
//
// Created by davidhuangA on 2024/3/28.
// Copyright © 2024 https://www.galaxy-immi.com. All rights reserved.
//
import UIKit
class YHDocListBottomView: UIView {
static let viewH : CGFloat = 98.0
typealias Block = (ClickButtonType,Bool) -> ()
var block: Block?
override init(frame: CGRect) {
super.init(frame: frame)
initView()
}
required init?(coder: NSCoder) {
fatalError("init(coder:) has not been implemented")
}
lazy var bottomButton : UIButton = {
let button = UIButton(type: .custom)
button.titleLabel?.font = UIFont.PFSC_M(ofSize: 15)
button.contentHorizontalAlignment = .center
button.setTitle("下载", for: .normal)
button.setTitleColor( UIColor(hex:0xffffff), for: .normal)
button.layer.cornerRadius = kCornerRadius6
button.clipsToBounds = true
button.addTarget(self, action: #selector(clickDownloadBtn), for: .touchUpInside)
return button
}()
lazy var checkButton : UIButton = {
let button = UIButton(type: .custom)
button.titleLabel?.font = UIFont.PFSC_R(ofSize: 15)
button.contentHorizontalAlignment = .center
button.setTitleColor(UIColor.mainTextColor, for: .normal)
button.setImage(UIImage(named: "my_doc_check_btn_0"), for: .normal)
button.setImage(UIImage(named: "my_doc_check_btn_1"), for: .selected)
button.setTitle("全选", for: .normal)
button.addTarget(self, action: #selector(clickCheckBtn), for: .touchUpInside)
return button
}()
private lazy var titleLable : UILabel = {
let lable0 = UILabel(text: "已选0条")
lable0.textColor = UIColor(hex: 0xC0C0C0, alpha: 1.0)
lable0.font = UIFont.PFSC_R(ofSize: 15)
return lable0
}()
private lazy var line : UIView = {
let view = UIView()
view.backgroundColor = .separatorColor
return view
}()
}
private extension YHDocListBottomView {
func initView() {
addSubview(line)
line.snp.makeConstraints { make in
make.left.right.top.equalToSuperview()
make.height.equalTo(0.5)
}
addSubview(checkButton)
checkButton.snp.makeConstraints { make in
make.top.equalTo(21.5)
make.left.equalTo(kMargin)
make.width.equalTo(60)
make.height.equalTo(30)
}
checkButton.iconInLeft(spacing: 5)
addSubview(titleLable)
titleLable.snp.makeConstraints { make in
make.centerY.equalTo(checkButton)
make.left.equalTo(checkButton.snp.right).offset(6)
make.width.equalTo(60)
make.height.equalTo(22)
}
addSubview(bottomButton)
bottomButton.snp.makeConstraints { make in
make.right.equalTo(-kMargin)
make.centerY.equalTo(checkButton)
make.height.equalTo(44)
make.left.equalTo(titleLable.snp.right).offset(34)
}
}
@objc func clickCheckBtn() {
checkButton.isSelected = !checkButton.isSelected
block?(.allChoice,checkButton.isSelected)
}
@objc func clickDownloadBtn() {
block?(.downAllCheck,false)
}
}
//
// YHDocListCell.swift
// galaxy
//
// Created by davidhuangA on 2024/3/28.
// Copyright © 2024 https://www.galaxy-immi.com. All rights reserved.
//
import UIKit
class YHDocListCell: UITableViewCell {
var centerView: UIView = {
let view = UIView()
view.backgroundColor = .white
view.layer.cornerRadius = kCornerRadius6
return view
}()
var titleLabel: UILabel = {
let label = UILabel()
label.font = UIFont.PFSC_M(ofSize: 16)
label.textColor = UIColor.mainTextColor
label.lineBreakMode = .byWordWrapping
label.numberOfLines = 0
return label
}()
var statusLabel: UILabel!
lazy var statusHoldView : UIView = {
let view = UIView()
return view
}()
lazy var checkButton : UIButton = {
let button = UIButton(type: .custom)
button.titleLabel?.font = UIFont.PFSC_R(ofSize: 15)
button.contentHorizontalAlignment = .center
button.setTitleColor(UIColor.mainTextColor, for: .normal)
button.setImage(UIImage(named: "my_doc_check_btn_0"), for: .normal)
button.setImage(UIImage(named: "my_doc_check_btn_1"), for: .selected)
button.addTarget(self, action: #selector(clickCheckBtn), for: .touchUpInside)
return button
}()
var dataSourceForSign: YHMySignatureModel? {
didSet {
updateAllViewsForSign()
}
}
var dataSourceForDocs: YHMyDocumentsListModel? {
didSet {
updateAllViewsForDocs()
}
}
required init?(coder: NSCoder) {
super.init(coder: coder)
}
override init(style: UITableViewCell.CellStyle, reuseIdentifier: String?) {
super.init(style: style, reuseIdentifier: reuseIdentifier)
selectionStyle = .none
setupUI()
}
func setupUI() {
backgroundColor = .clear
contentView.addSubview(centerView)
centerView.snp.makeConstraints { make in
make.left.equalTo(kMargin)
make.right.equalTo(-kMargin)
make.top.equalTo(14)
make.bottom.equalToSuperview()
}
centerView.addSubview(statusHoldView)
statusHoldView.snp.makeConstraints { make in
make.centerY.equalToSuperview()
make.right.equalTo(-kMargin)
make.height.equalTo(20)
make.width.equalTo(62)
}
let imageV : UIImageView = UIImageView()
imageV.image = UIImage(named: "my_doc_right_arrow")
statusHoldView.addSubview(imageV)
imageV.snp.makeConstraints { make in
make.right.equalToSuperview()
make.centerY.equalToSuperview()
make.width.height.equalTo(kMargin)
}
statusLabel = {
let label = UILabel()
label.font = UIFont.PFSC_R(ofSize: 14)
label.textColor = UIColor.brandMainColor
label.textAlignment = .right
label.text = "待审核"
return label
}()
statusHoldView.addSubview(statusLabel)
statusLabel.snp.makeConstraints { make in
make.right.equalTo(imageV.snp.left).offset(-4)
make.centerY.equalToSuperview()
make.width.equalTo(42)
make.height.equalTo(20)
}
centerView.addSubview(titleLabel)
titleLabel.snp.makeConstraints { make in
make.top.equalTo(22)
make.left.equalTo(21)
make.right.equalTo(-90)
make.bottom.equalTo(-22)
}
centerView.addSubview(checkButton)
checkButton.snp.makeConstraints { make in
make.right.equalToSuperview().offset(-kMargin)
make.centerY.equalToSuperview()
make.width.height.equalTo(kMargin)
}
checkButton.isHidden = true
}
func updateAllViewsForDocs() {
guard let dataSource = dataSourceForDocs else { return }
titleLabel.text = dataSource.doc_type_name
/*
1: '待确认',
* 2: '待签章',
* 3: '已驳回',
* 4: '待核对',
* 5: '已签章',
* 6: '已定稿',
* 7: '已完成'
*/
var statusTxt = ""
var color : UIColor = .brandMainColor
let status = dataSource.document_check_status
if status == 1 {
statusTxt = "待确认"
color = UIColor.brandMainColor
} else if status == 2 {
statusTxt = "待签章"
color = UIColor.brandMainColor
} else if status == 3 {
statusTxt = "已驳回"
color = UIColor.failColor
} else if status == 4 {
statusTxt = "待审核"
color = UIColor.warnColor
} else if status == 5 {
statusTxt = "已签章"
color = UIColor.successColor
} else if status == 6 {
statusTxt = "已定稿"
color = UIColor.labelTextColor2
} else if status == 7 {
statusTxt = "已完成"
color = UIColor.labelTextColor2
} else {
statusTxt = "--"
color = UIColor.brandMainColor
}
statusLabel.text = statusTxt
statusLabel.textColor = color
}
func updateAllViewsForSign() {
guard let dataSource = dataSourceForSign else { return }
}
}
extension YHDocListCell {
@objc func clickCheckBtn() {
}
}
......@@ -8,8 +8,10 @@
import UIKit
enum ClickButtonType {
case downAll //全部下载
case cancel //取消
case downAll //全部下载 按钮
case cancel //取消 按钮
case allChoice //全选 按钮
case downAllCheck //下载确认按钮
}
class YHMyDocListHeaderView: UIView {
......
......@@ -9,13 +9,8 @@
import UIKit
class YHMyDocumentsListViewModel: YHBaseViewModel {
var mainModel: YHMyDocumentsModel?
override init() {
super.init()
}
func requestDocumentsList(_ orderId: String, _ mobile: String, callBackBlock:@escaping (_ success: Bool?, _ error: YHErrorModel?)->()) {
let params: [String : Any] = ["order_id": orderId,
"mobile": mobile]
......
{
"images" : [
{
"idiom" : "universal",
"scale" : "1x"
},
{
"filename" : "Ellipse 240@2x.png",
"idiom" : "universal",
"scale" : "2x"
},
{
"filename" : "Ellipse 240@3x.png",
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}
{
"images" : [
{
"idiom" : "universal",
"scale" : "1x"
},
{
"filename" : "Group 2500@2x.png",
"idiom" : "universal",
"scale" : "2x"
},
{
"filename" : "Group 2500@3x.png",
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}
{
"images" : [
{
"idiom" : "universal",
"scale" : "1x"
},
{
"filename" : "More@2x.png",
"idiom" : "universal",
"scale" : "2x"
},
{
"filename" : "More@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