Commit 274d4514 authored by Steven杜宇's avatar Steven杜宇

// 原则批 信封UI

parent 15a1a916
......@@ -356,6 +356,7 @@
04B360E52C60B5D3001EB053 /* YHPrinciplePhotoCollectCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = 04B360E42C60B5D3001EB053 /* YHPrinciplePhotoCollectCell.swift */; };
04B360E72C60CD37001EB053 /* YHPrincipleUploadFileCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = 04B360E62C60CD37001EB053 /* YHPrincipleUploadFileCell.swift */; };
04B360EB2C60E88C001EB053 /* YHPrincipleCongratulationAlertView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 04B360EA2C60E88C001EB053 /* YHPrincipleCongratulationAlertView.swift */; };
04B360ED2C61F157001EB053 /* YHPrincipleEnvelopeCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = 04B360EC2C61F157001EB053 /* YHPrincipleEnvelopeCell.swift */; };
04B9EE5A2C06CC3100A4018D /* YHCodeSueecssViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 04B9EE582C06CC3100A4018D /* YHCodeSueecssViewController.swift */; };
04B9EE5B2C06CC3100A4018D /* YHOtherLoginViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 04B9EE592C06CC3100A4018D /* YHOtherLoginViewController.swift */; };
04C693622B723AB8004C1758 /* YHMySettingViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 04C693612B723AB8004C1758 /* YHMySettingViewController.swift */; };
......@@ -991,6 +992,7 @@
04B360E42C60B5D3001EB053 /* YHPrinciplePhotoCollectCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHPrinciplePhotoCollectCell.swift; sourceTree = "<group>"; };
04B360E62C60CD37001EB053 /* YHPrincipleUploadFileCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHPrincipleUploadFileCell.swift; sourceTree = "<group>"; };
04B360EA2C60E88C001EB053 /* YHPrincipleCongratulationAlertView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHPrincipleCongratulationAlertView.swift; sourceTree = "<group>"; };
04B360EC2C61F157001EB053 /* YHPrincipleEnvelopeCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHPrincipleEnvelopeCell.swift; sourceTree = "<group>"; };
04B9EE582C06CC3100A4018D /* YHCodeSueecssViewController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = YHCodeSueecssViewController.swift; sourceTree = "<group>"; };
04B9EE592C06CC3100A4018D /* YHOtherLoginViewController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = YHOtherLoginViewController.swift; sourceTree = "<group>"; };
04C693612B723AB8004C1758 /* YHMySettingViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHMySettingViewController.swift; sourceTree = "<group>"; };
......@@ -2197,6 +2199,7 @@
04B360E22C60A346001EB053 /* YHPrinciplePhotoCell.swift */,
04B360E42C60B5D3001EB053 /* YHPrinciplePhotoCollectCell.swift */,
04B360E62C60CD37001EB053 /* YHPrincipleUploadFileCell.swift */,
04B360EC2C61F157001EB053 /* YHPrincipleEnvelopeCell.swift */,
04B360EA2C60E88C001EB053 /* YHPrincipleCongratulationAlertView.swift */,
);
path = V;
......@@ -3580,6 +3583,7 @@
045EEE8D2B9F171A0022A143 /* YHPreviewInfoCell.swift in Sources */,
047AA3E22C4A66CE009C4554 /* YHLifeItemTableViewCell.swift in Sources */,
048FA0362BFDE04000AD3BA9 /* YHSubmitAllInfoSuccessAlertView.swift in Sources */,
04B360ED2C61F157001EB053 /* YHPrincipleEnvelopeCell.swift in Sources */,
04B9EE5B2C06CC3100A4018D /* YHOtherLoginViewController.swift in Sources */,
045EEF0C2B9F171A0022A143 /* YHBasicInfoFillBottomView.swift in Sources */,
A5ACE93D2B4564F7002C94D2 /* UIButton+Extension.swift in Sources */,
......
......@@ -24,7 +24,7 @@ class YHPrincipleReviewListVC: YHBaseViewController {
tableView.register(UITableViewCell.self, forCellReuseIdentifier: "UITableViewCell")
tableView.register(YHPrincipleGroupReviewListCell.self, forCellReuseIdentifier: YHPrincipleGroupReviewListCell.cellReuseIdentifier)
tableView.register(YHPrincipleGroupUploadCell.self, forCellReuseIdentifier: YHPrincipleGroupUploadCell.cellReuseIdentifier)
tableView.register(YHPrinciplePhotoCell.self, forCellReuseIdentifier: YHPrinciplePhotoCell.cellReuseIdentifier)
tableView.register(YHPrincipleEnvelopeCell.self, forCellReuseIdentifier: YHPrincipleEnvelopeCell.cellReuseIdentifier)
return tableView
}()
......@@ -108,7 +108,7 @@ extension YHPrincipleReviewListVC: UITableViewDelegate, UITableViewDataSource {
// YHPrinciplePhotoCell
// YHPrincipleUnapprovedCell
let cell = tableView.dequeueReusableCell(withIdentifier: YHPrinciplePhotoCell.cellReuseIdentifier, for: indexPath) as! YHPrinciplePhotoCell
let cell = tableView.dequeueReusableCell(withIdentifier: YHPrincipleEnvelopeCell.cellReuseIdentifier, for: indexPath) as! YHPrincipleEnvelopeCell
if 0 <= indexPath.section && indexPath.section < items.count {
let model = items[indexPath.section]
......
//
// YHPrincipleEnvelopeCell.swift
// galaxy
//
// Created by edy on 2024/8/6.
// Copyright © 2024 https://www.galaxy-immi.com. All rights reserved.
//
import UIKit
class YHPrincipleEnvelopeCell: UITableViewCell {
static let cellReuseIdentifier = "YHPrincipleEnvelopeCell"
var itemModel:YHPrincleGroupModel?
var items: [String] = []
var expandClick:((Bool)->())?
lazy var titleLabel: UILabel = {
let label = UILabel()
label.font = UIFont.PFSC_R(ofSize: 15)
label.textColor = UIColor.mainTextColor
label.text = "申请资料已递交港府留档"
return label
}()
lazy var iconImgView:UIImageView = {
let view = UIImageView(image: UIImage(named: "custom_service_icon_right"))
return view
}()
lazy var whiteView: UIView = {
let view = UIView()
view.backgroundColor = .white
view.layer.cornerRadius = 6.0
view.clipsToBounds = true
return view
}()
lazy var expandBtn:UIButton = {
let btn = UIButton()
btn.setImage(UIImage(named: "custom_service_expand_0"), for: .normal)
btn.addTarget(self, action: #selector(didExpandBtnClicked), for: .touchUpInside)
return btn
}()
lazy var envelopImgView: UIImageView = {
let view = UIImageView(image: UIImage(named: "principle_envelope_unsee"))
view.addSubview(self.nameLabel)
nameLabel.snp.makeConstraints { make in
make.top.equalTo(58.0)
make.centerX.equalToSuperview()
make.height.equalTo(25)
}
return view
}()
lazy var nameLabel: UILabel = {
let label = UILabel()
label.font = UIFont.PFSC_M(ofSize: 18)
label.textColor = UIColor(hex: 0xB75E24)
label.text = "XXXX"
return label
}()
override init(style: UITableViewCell.CellStyle, reuseIdentifier: String?) {
super.init(style: style, reuseIdentifier: reuseIdentifier)
setupUI()
}
required init?(coder: NSCoder) {
super.init(coder: coder)
}
@objc func didExpandBtnClicked() {
guard let model = itemModel else { return }
expandClick?(!model.isExpand)
}
func updateModel(_ model:YHPrincleGroupModel) {
itemModel = model
items.removeAll()
items.append(contentsOf: model.fileList)
whiteView.isHidden = !model.isExpand
let imgName = model.isExpand ? "custom_service_expand_1" : "custom_service_expand_0"
expandBtn.setImage(UIImage(named: imgName), for: .normal)
expandBtn.isHidden = items.count <= 0
if !model.isExpand || items.count <= 0 {
whiteView.removeSubviews()
whiteView.snp.remakeConstraints { make in
make.top.equalTo(titleLabel.snp.bottom).offset(0.0)
make.height.equalTo(0.0)
make.left.equalTo(20)
make.right.equalTo(-20)
make.bottom.equalTo(-32)
}
self.setNeedsLayout()
self.layoutIfNeeded()
return
}
whiteView.removeSubviews()
whiteView.addSubview(self.envelopImgView)
whiteView.snp.remakeConstraints { make in
make.top.equalTo(titleLabel.snp.bottom).offset(16.0)
make.left.equalTo(20)
make.right.equalTo(-20)
make.bottom.equalTo(-32)
}
envelopImgView.snp.remakeConstraints { make in
make.top.equalTo(16)
make.centerX.equalToSuperview()
make.width.equalTo(194)
make.height.equalTo(179)
make.bottom.equalTo(-17)
}
self.setNeedsLayout()
self.layoutIfNeeded()
}
func setupUI() {
self.selectionStyle = .none
contentView.backgroundColor = UIColor.init(hex: 0xf8f9fb)
contentView.addSubview(iconImgView)
contentView.addSubview(titleLabel)
contentView.addSubview(expandBtn)
contentView.addSubview(whiteView)
whiteView.addSubview(self.envelopImgView)
iconImgView.snp.makeConstraints { make in
make.left.equalTo(20)
make.width.height.equalTo(15.0)
make.centerY.equalTo(titleLabel)
}
titleLabel.snp.makeConstraints { make in
make.left.equalTo(iconImgView.snp.right).offset(6)
make.right.equalTo(expandBtn.snp.left)
make.top.equalTo(0)
make.height.equalTo(20)
}
expandBtn.snp.makeConstraints { make in
make.width.height.equalTo(20.0)
make.centerY.equalTo(titleLabel)
make.right.equalTo(-20.0)
}
whiteView.snp.makeConstraints { make in
make.top.equalTo(titleLabel.snp.bottom).offset(0.0)
make.height.equalTo(0.0)
make.left.equalTo(20)
make.right.equalTo(-20)
make.bottom.equalTo(-32)
}
envelopImgView.snp.makeConstraints { make in
make.top.equalTo(16)
make.centerX.equalToSuperview()
make.width.equalTo(194)
make.height.equalTo(179)
}
}
}
......@@ -332,18 +332,16 @@ extension YHMyViewController : UITableViewDelegate, UITableViewDataSource {
if (indexPath.row >= items.count) { return }
if !checkLogin() {
return
}
if true {
YHPrincipleCongratulationAlertView.alertView().show()
// YHPrincipleCongratulationAlertView.alertView().show()
// let vc = YHPrincipleReviewListVC()
// self.navigationController?.pushViewController(vc)
let vc = YHPrincipleReviewListVC()
self.navigationController?.pushViewController(vc)
return
}
......
{
"images" : [
{
"idiom" : "universal",
"scale" : "1x"
},
{
"filename" : "已查看@2x.png",
"idiom" : "universal",
"scale" : "2x"
},
{
"filename" : "已查看@3x.png",
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}
{
"images" : [
{
"idiom" : "universal",
"scale" : "1x"
},
{
"filename" : "点击查看@2x.png",
"idiom" : "universal",
"scale" : "2x"
},
{
"filename" : "点击查看@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