Commit 12ccba0c authored by pete谢兆麟's avatar pete谢兆麟

我的签字和我的文书签字入口。

parent 7e7d6c23
......@@ -81,6 +81,8 @@
046975162B96EB2200A0CB66 /* YHImageResultViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 046975152B96EB2200A0CB66 /* YHImageResultViewController.swift */; };
046975182B96EEB200A0CB66 /* YHResultBottomView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 046975172B96EEB200A0CB66 /* YHResultBottomView.swift */; };
047294E82B988A19008E0B84 /* YHNewWebViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 047294E72B988A19008E0B84 /* YHNewWebViewController.swift */; };
047294EE2B9B0547008E0B84 /* YHMySignatureListViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 047294ED2B9B0547008E0B84 /* YHMySignatureListViewController.swift */; };
047294F02B9B0585008E0B84 /* YHMyDocumentsListViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 047294EF2B9B0585008E0B84 /* YHMyDocumentsListViewController.swift */; };
04754A952B96FF3D00F8ADCA /* UITextField+Extension.swift in Sources */ = {isa = PBXBuildFile; fileRef = 04754A942B96FF3D00F8ADCA /* UITextField+Extension.swift */; };
04808C062B4686510056D53C /* ATAuthSDK.bundle in Resources */ = {isa = PBXBuildFile; fileRef = 04808C042B4686510056D53C /* ATAuthSDK.bundle */; };
04808C082B4686C10056D53C /* ATAuthSDK_D.framework in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = 04808C032B4686510056D53C /* ATAuthSDK_D.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; };
......@@ -402,6 +404,8 @@
046975152B96EB2200A0CB66 /* YHImageResultViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHImageResultViewController.swift; sourceTree = "<group>"; };
046975172B96EEB200A0CB66 /* YHResultBottomView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHResultBottomView.swift; sourceTree = "<group>"; };
047294E72B988A19008E0B84 /* YHNewWebViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHNewWebViewController.swift; sourceTree = "<group>"; };
047294ED2B9B0547008E0B84 /* YHMySignatureListViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHMySignatureListViewController.swift; sourceTree = "<group>"; };
047294EF2B9B0585008E0B84 /* YHMyDocumentsListViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHMyDocumentsListViewController.swift; sourceTree = "<group>"; };
04754A942B96FF3D00F8ADCA /* UITextField+Extension.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "UITextField+Extension.swift"; sourceTree = "<group>"; };
04808C032B4686510056D53C /* ATAuthSDK_D.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; path = ATAuthSDK_D.framework; sourceTree = "<group>"; };
04808C042B4686510056D53C /* ATAuthSDK.bundle */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.plug-in"; path = ATAuthSDK.bundle; sourceTree = "<group>"; };
......@@ -826,6 +830,38 @@
path = YHAddressPicker;
sourceTree = "<group>";
};
047294E92B9B0470008E0B84 /* MyDocuments(我的文书) */ = {
isa = PBXGroup;
children = (
047294EC2B9B0508008E0B84 /* C */,
);
path = "MyDocuments(我的文书)";
sourceTree = "<group>";
};
047294EA2B9B0496008E0B84 /* MySignature(我的签字) */ = {
isa = PBXGroup;
children = (
047294EB2B9B04FC008E0B84 /* C */,
);
path = "MySignature(我的签字)";
sourceTree = "<group>";
};
047294EB2B9B04FC008E0B84 /* C */ = {
isa = PBXGroup;
children = (
047294ED2B9B0547008E0B84 /* YHMySignatureListViewController.swift */,
);
path = C;
sourceTree = "<group>";
};
047294EC2B9B0508008E0B84 /* C */ = {
isa = PBXGroup;
children = (
047294EF2B9B0585008E0B84 /* YHMyDocumentsListViewController.swift */,
);
path = C;
sourceTree = "<group>";
};
04754A962B97286F00F8ADCA /* Certificates(证书上传和证书信息) */ = {
isa = PBXGroup;
children = (
......@@ -1628,6 +1664,8 @@
A5C382C82B5E101E00C5E65C /* ServiceProcess(流程) */ = {
isa = PBXGroup;
children = (
047294EA2B9B0496008E0B84 /* MySignature(我的签字) */,
047294E92B9B0470008E0B84 /* MyDocuments(我的文书) */,
04E86E222B81EA1000A35F4B /* WorkExperience(工作经验) */,
04C693652B73183E004C1758 /* Education&Qualification(学历专业资格填写) */,
A5234E382B72346A00A33433 /* OtherInformation(其他信息) */,
......@@ -1981,6 +2019,7 @@
A5167B272B692CF20084C08F /* YHPreviewInfoCertificatePictureItemView.swift in Sources */,
04754A952B96FF3D00F8ADCA /* UITextField+Extension.swift in Sources */,
A5ACE9312B4564F7002C94D2 /* YHPersonalCenterCell.swift in Sources */,
047294F02B9B0585008E0B84 /* YHMyDocumentsListViewController.swift in Sources */,
04E86E5D2B84CC9700A35F4B /* YHWorkExampleMessageView.swift in Sources */,
A5ACE9532B4564F7002C94D2 /* YHBaseViewController.swift in Sources */,
042FBBC32B63DA4C00F9DE23 /* YHParentInfoVC.swift in Sources */,
......@@ -2036,6 +2075,7 @@
A5C382CC2B5EA11800C5E65C /* YHContractCell.swift in Sources */,
042FBBC12B63B21700F9DE23 /* YHFormItemDegreeInfoCell.swift in Sources */,
04C8F4832B7216D800ADF59B /* YHUserInfoHeaderView.swift in Sources */,
047294EE2B9B0547008E0B84 /* YHMySignatureListViewController.swift in Sources */,
A5ACE9492B4564F7002C94D2 /* YHHUDSuccessView.swift in Sources */,
A58556BA2B6BCF1A003746B2 /* YHPersonInfoFillStepModel.swift in Sources */,
A5FD63D42B65F99500D1D9DA /* YHScoreItemCell.swift in Sources */,
......
......@@ -180,6 +180,14 @@ extension YHServiceCenterSecondViewController : UITableViewDelegate,UITableViewD
vc.orderId = orderId
vc.model = serviceCenterMainReqVM.allInfoScoreModel
navigationController?.pushViewController(vc)
} else if model.type == 4 {
let vc = YHMySignatureListViewController()
vc.orderId = orderId ?? 0
navigationController?.pushViewController(vc)
} else if model.type == 5 {
let vc = YHMyDocumentsListViewController()
vc.orderId = orderId ?? 0
navigationController?.pushViewController(vc)
} else {
}
......
......@@ -21,6 +21,12 @@ class YHContactMainItemStatusModel {
} else if type == 3 {
iconName = "service_center_sfsq_wdpf_icon"
itemName = "我的评分"
} else if type == 4 {
iconName = "service_center_sfsq_wdpf_icon"
itemName = "我的文书"
} else if type == 5 {
iconName = "service_center_sfsq_wdpf_icon"
itemName = "我的签字"
}
}
}
......
//
// YHMyDocumentsListViewController.swift
// galaxy
//
// Created by EDY on 2024/3/8.
// Copyright © 2024 https://www.galaxy-immi.com. All rights reserved.
//
import UIKit
class YHMyDocumentsListViewController: YHBaseViewController {
var bottomView: UIView!
var bottomButton: UIButton!
var tableView: UITableView!
var dataSource: [YHWorkItemListModel]?
var viewModel: YHWorkItemListViewModel?
var isMore: Bool = false
var orderId: Int = 0
var showPrompt: Bool = false
override func viewDidLoad() {
super.viewDidLoad()
viewModel = YHWorkItemListViewModel()
gk_navTitle = "我的文书"
setView()
getData()
// Do any additional setup after loading the view.
}
override func viewWillAppear(_ animated: Bool) {
super.viewWillAppear(animated)
getData()
}
func getData() {
viewModel?.requestWorkList("\(orderId)", callBackBlock: {[weak self] success, error in
guard let self = self else { return }
self.dataSource = success
self.tableView.reloadData()
})
}
func updateDataSource() {
self.tableView.reloadData()
}
func setView() {
tableView = {
let tableView = UITableView(frame:.zero, style:.plain)
if #available(iOS 11.0, *) {
tableView.contentInsetAdjustmentBehavior = .never
}
tableView.backgroundColor = .clear
tableView.separatorStyle = .none
tableView.delegate = self
tableView.dataSource = self
tableView.register(cellWithClass: YHWorkExperienceListTableViewCell.self)
return tableView
}()
view.addSubview(tableView)
tableView.snp.makeConstraints { make in
make.top.equalTo(k_Height_NavigationtBarAndStatuBar)
make.bottom.equalTo(-k_Height_safeAreaInsetsBottom() - 64)
make.left.right.bottom.equalTo(view)
}
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.backgroundColor = UIColor(hex:0x2274ee)
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()
}
@objc func submit() {
guard let dataSource = dataSource else { return }
for item in dataSource {
if item.vacant_num ?? 0 > 0 {
showPrompt = true
tableView.reloadData()
YHHUD.flash(message: "您的工作经验未全部填写完成,请先填写完成再提交")
return
}
}
viewModel?.requestSaveAllWorkExperience("\(orderId)", callBackBlock: {[weak self] success, error in
guard let self = self else { return }
if success ?? false {
self.navigationController?.popViewController(animated: true)
}
})
}
}
extension YHMyDocumentsListViewController: UITableViewDelegate, UITableViewDataSource {
func tableView(_ tableView: UITableView, numberOfRowsInSection section: Int) -> Int {
return 1
}
func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell {
let cell = tableView.dequeueReusableCell(withClass: YHWorkExperienceListTableViewCell.self)
cell.showPrompt = showPrompt
cell.dataSource = dataSource
if isMore {
cell.more()
} else {
cell.cannal()
}
cell.clickBlock = {[weak self] model in
guard let self = self else { return }
let firstModel = self.dataSource?.first
let vc = YHWorkExperienceViewController()
vc.workExperienceID = "\(model.id ?? 0)"
vc.orderID = self.orderId
vc.isShowMessageSelect = true
if firstModel?.id == model.id {
vc.isShowMessageSelect = false
}
self.navigationController?.pushViewController(vc, animated: true)
}
cell.deleteBlock = {[weak self] model in
guard let self = self else { return }
self.viewModel?.requestDeleteWorkExperience("\(model.id ?? 0)", callBackBlock: {[weak self] success, error in
guard let self = self else { return }
self.getData()
})
}
cell.isMoreBlock = {[weak self] isMore in
guard let self = self else { return }
self.isMore = isMore
}
cell.newWorkBlock = {[weak self] in
guard let self = self else { return }
if self.dataSource?.count == 10 {
YHHUD.flash(message: "新增工作经历不能超过10条")
} else {
let vc = YHWorkExperienceViewController()
vc.isShowMessageSelect = true
vc.orderID = self.orderId
self.navigationController?.pushViewController(vc, animated: true)
}
}
cell.backgroundColor = .clear
cell.contentView.backgroundColor = .clear
return cell
}
func tableView(_ tableView: UITableView, heightForRowAt indexPath: IndexPath) -> CGFloat {
let number = dataSource?.count ?? 0
if number == 0 {
return CGFloat(16 + 216)
} else {
return CGFloat(16 + 154 + 76 * number)
}
}
}
//
// YHMySignatureListViewController.swift
// galaxy
//
// Created by EDY on 2024/3/8.
// Copyright © 2024 https://www.galaxy-immi.com. All rights reserved.
//
import UIKit
class YHMySignatureListViewController: YHBaseViewController {
var bottomView: UIView!
var bottomButton: UIButton!
var tableView: UITableView!
var dataSource: [YHWorkItemListModel]?
var viewModel: YHWorkItemListViewModel?
var isMore: Bool = false
var orderId: Int = 0
var showPrompt: Bool = false
override func viewDidLoad() {
super.viewDidLoad()
viewModel = YHWorkItemListViewModel()
gk_navTitle = "我的签字"
setView()
getData()
// Do any additional setup after loading the view.
}
override func viewWillAppear(_ animated: Bool) {
super.viewWillAppear(animated)
getData()
}
func getData() {
viewModel?.requestWorkList("\(orderId)", callBackBlock: {[weak self] success, error in
guard let self = self else { return }
self.dataSource = success
self.tableView.reloadData()
})
}
func updateDataSource() {
self.tableView.reloadData()
}
func setView() {
tableView = {
let tableView = UITableView(frame:.zero, style:.plain)
if #available(iOS 11.0, *) {
tableView.contentInsetAdjustmentBehavior = .never
}
tableView.backgroundColor = .clear
tableView.separatorStyle = .none
tableView.delegate = self
tableView.dataSource = self
tableView.register(cellWithClass: YHWorkExperienceListTableViewCell.self)
return tableView
}()
view.addSubview(tableView)
tableView.snp.makeConstraints { make in
make.top.equalTo(k_Height_NavigationtBarAndStatuBar)
make.bottom.equalTo(-k_Height_safeAreaInsetsBottom() - 64)
make.left.right.bottom.equalTo(view)
}
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.backgroundColor = UIColor(hex:0x2274ee)
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()
}
@objc func submit() {
guard let dataSource = dataSource else { return }
for item in dataSource {
if item.vacant_num ?? 0 > 0 {
showPrompt = true
tableView.reloadData()
YHHUD.flash(message: "您的工作经验未全部填写完成,请先填写完成再提交")
return
}
}
viewModel?.requestSaveAllWorkExperience("\(orderId)", callBackBlock: {[weak self] success, error in
guard let self = self else { return }
if success ?? false {
self.navigationController?.popViewController(animated: true)
}
})
}
}
extension YHMySignatureListViewController: UITableViewDelegate, UITableViewDataSource {
func tableView(_ tableView: UITableView, numberOfRowsInSection section: Int) -> Int {
return 1
}
func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell {
let cell = tableView.dequeueReusableCell(withClass: YHWorkExperienceListTableViewCell.self)
cell.showPrompt = showPrompt
cell.dataSource = dataSource
if isMore {
cell.more()
} else {
cell.cannal()
}
cell.clickBlock = {[weak self] model in
guard let self = self else { return }
let firstModel = self.dataSource?.first
let vc = YHWorkExperienceViewController()
vc.workExperienceID = "\(model.id ?? 0)"
vc.orderID = self.orderId
vc.isShowMessageSelect = true
if firstModel?.id == model.id {
vc.isShowMessageSelect = false
}
self.navigationController?.pushViewController(vc, animated: true)
}
cell.deleteBlock = {[weak self] model in
guard let self = self else { return }
self.viewModel?.requestDeleteWorkExperience("\(model.id ?? 0)", callBackBlock: {[weak self] success, error in
guard let self = self else { return }
self.getData()
})
}
cell.isMoreBlock = {[weak self] isMore in
guard let self = self else { return }
self.isMore = isMore
}
cell.newWorkBlock = {[weak self] in
guard let self = self else { return }
if self.dataSource?.count == 10 {
YHHUD.flash(message: "新增工作经历不能超过10条")
} else {
let vc = YHWorkExperienceViewController()
vc.isShowMessageSelect = true
vc.orderID = self.orderId
self.navigationController?.pushViewController(vc, animated: true)
}
}
cell.backgroundColor = .clear
cell.contentView.backgroundColor = .clear
return cell
}
func tableView(_ tableView: UITableView, heightForRowAt indexPath: IndexPath) -> CGFloat {
let number = dataSource?.count ?? 0
if number == 0 {
return CGFloat(16 + 216)
} else {
return CGFloat(16 + 154 + 76 * number)
}
}
}
......@@ -150,6 +150,7 @@ extension YHCompanySelectViewController: UITextFieldDelegate {
self.tableView.isHidden = true
} else {
self.searchDataSource = success
self.alertLabel.isHidden = true
self.tableView.isHidden = false
self.tableView.reloadData()
}
......
......@@ -140,7 +140,7 @@ class YHWorkItemView: UIView {
if dataSource.vacant_num != 0 {
explainLabel.text = "有" + "\(dataSource.vacant_num ?? 0)" + "项未填写"
} else {
explainLabel.text = (dataSource.entry_time ?? "") + "-" + (dataSource.entry_time ?? "")
explainLabel.text = (dataSource.entry_time ?? "") + "-" + (dataSource.departure_time ?? "")
}
if dataSource.company_name?.count == 0 {
titleLabel.text = "工作经验\(tag - 4000 + 1)"
......
......@@ -144,6 +144,16 @@ extension YHServiceCenterMainViewModel {
model3.type = 3
model3.isFinished = false
arrContactStausItmes.append(model3)
let model4 = YHContactMainItemStatusModel()
model4.type = 4
model4.isFinished = false
arrContactStausItmes.append(model4)
let model5 = YHContactMainItemStatusModel()
model5.type = 5
model5.isFinished = false
arrContactStausItmes.append(model5)
} else {
let model = YHContactMainItemStatusModel()
......@@ -156,6 +166,16 @@ extension YHServiceCenterMainViewModel {
model2.type = 2
model2.isFinished = false
arrContactStausItmes.append(model2)
let model4 = YHContactMainItemStatusModel()
model4.type = 4
model4.isFinished = false
arrContactStausItmes.append(model4)
let model5 = YHContactMainItemStatusModel()
model5.type = 5
model5.isFinished = false
arrContactStausItmes.append(model5)
}
callBackBlock(true,nil)
} else {
......
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