Commit f8c1b27b authored by Steven杜宇's avatar Steven杜宇

// 原则批

parent 2f7389b1
......@@ -272,7 +272,7 @@
0468D4362B57752F00CFB916 /* YHUserModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0468D4352B57752F00CFB916 /* YHUserModel.swift */; };
0468D43A2B579EAC00CFB916 /* YHLoginViewModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0468D4392B579EAC00CFB916 /* YHLoginViewModel.swift */; };
0472CBA72C5A11640096F48F /* YHPrincipleCongratulationVC.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0472CB9B2C5A11640096F48F /* YHPrincipleCongratulationVC.swift */; };
0472CBA82C5A11640096F48F /* YHPrincipleReviewListVC.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0472CB9C2C5A11640096F48F /* YHPrincipleReviewListVC.swift */; };
0472CBA82C5A11640096F48F /* YHPrincipleUploadListVC.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0472CB9C2C5A11640096F48F /* YHPrincipleUploadListVC.swift */; };
0472CBA92C5A11640096F48F /* YHPrincleGroupModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0472CB9E2C5A11640096F48F /* YHPrincleGroupModel.swift */; };
0472CBAC2C5A11640096F48F /* YHPrincleViewModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0472CBA32C5A11640096F48F /* YHPrincleViewModel.swift */; };
0472E25C2C521E64008EAB6E /* YHHomeIdentityListVC.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0472E25B2C521E64008EAB6E /* YHHomeIdentityListVC.swift */; };
......@@ -922,7 +922,7 @@
046AB7772BD674170086C6F1 /* galaxyDebug.entitlements */ = {isa = PBXFileReference; lastKnownFileType = text.plist.entitlements; path = galaxyDebug.entitlements; sourceTree = "<group>"; };
046AB7782BD674170086C6F1 /* galaxyTestEnv.entitlements */ = {isa = PBXFileReference; lastKnownFileType = text.plist.entitlements; path = galaxyTestEnv.entitlements; sourceTree = "<group>"; };
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>"; };
0472CB9C2C5A11640096F48F /* YHPrincipleUploadListVC.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = YHPrincipleUploadListVC.swift; sourceTree = "<group>"; };
0472CB9E2C5A11640096F48F /* YHPrincleGroupModel.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = YHPrincleGroupModel.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>"; };
......@@ -2206,7 +2206,7 @@
isa = PBXGroup;
children = (
0472CB9B2C5A11640096F48F /* YHPrincipleCongratulationVC.swift */,
0472CB9C2C5A11640096F48F /* YHPrincipleReviewListVC.swift */,
0472CB9C2C5A11640096F48F /* YHPrincipleUploadListVC.swift */,
04B360F22C636525001EB053 /* YHPrincipleWaitResultViewController.swift */,
04B360F42C646844001EB053 /* YHPrincipleApprovedMailViewController.swift */,
0485DFD52C64E70200B50293 /* YHPrincipleApprovedWaitSubmitVC.swift */,
......@@ -3703,7 +3703,7 @@
A5F886B42C61CEA700B63CF5 /* YHPictureReviewManager.swift in Sources */,
04E86E662B86EB6F00A35F4B /* YHLoginManager.swift in Sources */,
04A7BD112BA4218B00BD35A2 /* YHMyDocumentsListViewModel.swift in Sources */,
0472CBA82C5A11640096F48F /* YHPrincipleReviewListVC.swift in Sources */,
0472CBA82C5A11640096F48F /* YHPrincipleUploadListVC.swift in Sources */,
A5EF21352BA6E05E005027E6 /* YHQuestionAndAnswerViewController.swift in Sources */,
A5EF213B2BA6EC98005027E6 /* YHQuestionAndAnswerCell.swift in Sources */,
045EEEA82B9F171A0022A143 /* YHWorkIntroductionViewController.swift in Sources */,
......
......@@ -89,8 +89,8 @@ class YHPrincipleApprovedWaitSubmitVC: YHBaseViewController {
}
@objc func didUploadBtnClicked() {
let vc = YHPrincipleReviewListVC()
vc.orderId = 12345
let vc = YHPrincipleUploadListVC()
vc.orderId = 150702
navigationController?.pushViewController(vc)
}
......
//
// YHPrincipleReviewListVC.swift
// YHPrincipleUploadListVC.swift
// galaxy
//
// Created by edy on 2024/4/29.
......@@ -10,7 +10,7 @@ import UIKit
import SmartCodable
import AttributedString
class YHPrincipleReviewListVC: YHBaseViewController {
class YHPrincipleUploadListVC: YHBaseViewController {
var orderId: Int = 0
var items: [SmartCodable] = []
......@@ -165,14 +165,14 @@ class YHPrincipleReviewListVC: YHBaseViewController {
}
}
extension YHPrincipleReviewListVC {
extension YHPrincipleUploadListVC {
@objc func didUploadBtnClicked() {
}
}
extension YHPrincipleReviewListVC: UITableViewDelegate, UITableViewDataSource {
extension YHPrincipleUploadListVC: UITableViewDelegate, UITableViewDataSource {
func tableView(_ tableView: UITableView, numberOfRowsInSection section: Int) -> Int {
return items.count
......@@ -237,14 +237,7 @@ extension YHPrincipleReviewListVC: UITableViewDelegate, UITableViewDataSource {
func tableView(_ tableView: UITableView, didSelectRowAt indexPath: IndexPath) {
if 0 <= indexPath.section && indexPath.section < items.count {
#if DEBUG
if true {
let vc = YHPrincipleCongratulationVC()
self.navigationController?.pushViewController(vc)
return
}
#endif
}
}
......
......@@ -155,14 +155,7 @@ extension YHPrincipleWaitResultViewController: UITableViewDelegate, UITableViewD
func tableView(_ tableView: UITableView, didSelectRowAt indexPath: IndexPath) {
if 0 <= indexPath.section && indexPath.section < items.count {
#if DEBUG
if true {
let vc = YHPrincipleCongratulationVC()
self.navigationController?.pushViewController(vc)
return
}
#endif
}
}
......@@ -177,13 +170,13 @@ extension YHPrincipleWaitResultViewController: UITableViewDelegate, UITableViewD
func tableView(_ tableView: UITableView, viewForHeaderInSection section: Int) -> UIView? {
let view = UIView()
var titleLabel = UILabel()
let titleLabel = UILabel()
titleLabel.numberOfLines = 0
var name = self.viewModel.waitResultModel.applicant.userName
if name.count > 5 {
name = String(name.prefix(5)) + "..."
}
var callName = self.viewModel.waitResultModel.applicant.sex == 2 ? "女士" : "先生"
let callName = self.viewModel.waitResultModel.applicant.sex == 2 ? "女士" : "先生"
let title: ASAttributedString = .init("您好,\(name)\(callName)!", .font(UIFont.PFSC_M(ofSize: 24)),.foreground(UIColor.mainTextColor))
titleLabel.attributed.text = title
view.addSubview(titleLabel)
......
......@@ -175,8 +175,6 @@ class YHPrincipleAgreementModel: SmartCodable {
var redTips: String = ""
// 是否展开
var isUnfold: Bool = false
//
var fileList:[String] = []
required init() {
......
......@@ -16,6 +16,7 @@ class YHPrincipleUploadFileCell: UITableViewCell {
var iconImgV: UIImageView!
var titleLabel: UILabel!
var timeLabel: UILabel!
var editBtn: UIButton!
override init(style: UITableViewCell.CellStyle, reuseIdentifier: String?) {
super.init(style: style, reuseIdentifier: reuseIdentifier)
......@@ -26,9 +27,9 @@ class YHPrincipleUploadFileCell: UITableViewCell {
super.init(coder: coder)
}
func updateModel(_ str: String) {
titleLabel.text = str
timeLabel.text = "上传于2023.02.06"
func updateModel(_ model: YHPrincipleContentUrlModel) {
titleLabel.text = model.name
timeLabel.text = model.updated_at
}
func setupUI() {
......@@ -40,15 +41,19 @@ class YHPrincipleUploadFileCell: UITableViewCell {
titleLabel = UILabel()
titleLabel.font = UIFont.PFSC_M(ofSize: 14)
titleLabel.textColor = UIColor.mainTextColor
titleLabel.text = "新公司在职证明.pdf"
titleLabel.text = "文件名称"
self.addSubview(titleLabel)
timeLabel = UILabel()
timeLabel.font = UIFont.PFSC_R(ofSize: 11)
timeLabel.textColor = UIColor.labelTextColor2
timeLabel.text = "上传于2024.12.12"
timeLabel.text = "上传于0000.00.00"
self.addSubview(timeLabel)
editBtn = UIButton()
editBtn.setImage(UIImage(named: "my_cer_btn_edit"), for: .normal)
self.addSubview(editBtn)
iconImgV.snp.makeConstraints { make in
make.left.equalTo(16)
make.centerY.equalToSuperview()
......@@ -68,5 +73,11 @@ class YHPrincipleUploadFileCell: UITableViewCell {
make.height.equalTo(20)
make.right.equalTo(-16)
}
editBtn.snp.makeConstraints { make in
make.width.height.equalTo(16)
make.centerY.equalToSuperview()
make.right.equalTo(-20)
}
}
}
......@@ -27,7 +27,7 @@ class YHPrincipleUploadStatusCell: UITableViewCell {
static let cellReuseIdentifier = "YHPrincipleUploadStatusCell"
var itemModel:YHPrincipleAgreementModel?
var items: [String] = []
var items: [YHPrincipleContentUrlModel] = []
var expandClick:((Bool)->())?
var status: YHPrincipleUploadStatus = .preUpload
......@@ -169,7 +169,7 @@ class YHPrincipleUploadStatusCell: UITableViewCell {
itemModel = model
items.removeAll()
// items.append(contentsOf: model.fileList)
items.append(contentsOf: model.content_url)
contentView.removeSubviews()
self.dotLineLayer.removeFromSuperlayer()
......@@ -269,15 +269,16 @@ class YHPrincipleUploadStatusCell: UITableViewCell {
}
tableView.snp.remakeConstraints { make in
make.top.equalTo(detailLabel.snp.bottom).offset(model.fileList.count <= 0 ? 0 : 16)
make.top.equalTo(detailLabel.snp.bottom).offset(model.content_url.count <= 0 ? 0 : 16)
make.left.equalTo(0)
make.right.equalTo(0)
var listHeight = 0.0
if model.fileList.count > 0 {
listHeight = Double(model.fileList.count) * 55.0 + Double(model.fileList.count-1) * 8.0
if model.content_url.count > 0 {
listHeight = Double(model.content_url.count) * 55.0 + Double(model.content_url.count-1) * 8.0
}
make.height.equalTo(listHeight)
}
tableView.reloadData()
uploadBtn.snp.remakeConstraints { make in
make.left.equalTo(16)
......@@ -425,6 +426,10 @@ extension YHPrincipleUploadStatusCell: UITableViewDataSource, UITableViewDelegat
func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell {
let cell = tableView.dequeueReusableCell(withIdentifier: YHPrincipleUploadFileCell.cellReuseIdentifier, for: indexPath) as! YHPrincipleUploadFileCell
if 0 <= indexPath.row, indexPath.row < items.count {
let model: YHPrincipleContentUrlModel = items[indexPath.row]
cell.updateModel(model)
}
return cell
}
......
......@@ -62,17 +62,17 @@ class YHPrincleViewModel: YHBaseViewModel {
return
}
self.envelopModel = resultModel
self.envelopModel = self.getEnvelopModel()
// self.envelopModel = self.getEnvelopModel()
callback?(true, nil)
} else {
let err = YHErrorModel(errorCode: Int32(json.code), errorMsg: json.msg.isEmpty ? "" : json.msg)
self.envelopModel = self.getEnvelopModel()
// self.envelopModel = self.getEnvelopModel()
callback?(false, err)
}
} failBlock: { err in
self.envelopModel = self.getEnvelopModel()
// self.envelopModel = self.getEnvelopModel()
callback?(false, err)
}
}
......
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