Commit 94cb1c0a 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:
  签字跳转
  详情4和5 不展示签署按钮
  服务中心逻辑  发送邮箱bug处理
  查看按钮逻辑
  提示修改
parents 1156d47c 0b928949
...@@ -238,6 +238,8 @@ ...@@ -238,6 +238,8 @@
049A48A82B49417300D0C641 /* YHAboutUsViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 049A48A72B49417300D0C641 /* YHAboutUsViewController.swift */; }; 049A48A82B49417300D0C641 /* YHAboutUsViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 049A48A72B49417300D0C641 /* YHAboutUsViewController.swift */; };
049A48AA2B49536000D0C641 /* YHAboutUsAdvantageCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = 049A48A92B49536000D0C641 /* YHAboutUsAdvantageCell.swift */; }; 049A48AA2B49536000D0C641 /* YHAboutUsAdvantageCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = 049A48A92B49536000D0C641 /* YHAboutUsAdvantageCell.swift */; };
049AC4C62BC3E55300F857F4 /* YHServiceSectionView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 049AC4C52BC3E55300F857F4 /* YHServiceSectionView.swift */; }; 049AC4C62BC3E55300F857F4 /* YHServiceSectionView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 049AC4C52BC3E55300F857F4 /* YHServiceSectionView.swift */; };
049AC4C82BC513AB00F857F4 /* YHOrderListView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 049AC4C72BC513AB00F857F4 /* YHOrderListView.swift */; };
049AC4CA2BC5141600F857F4 /* YHServerNoOrderView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 049AC4C92BC5141600F857F4 /* YHServerNoOrderView.swift */; };
04A271232BABFF3200652B1B /* YHCertificateUploadTypeCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = 04A271222BABFF3200652B1B /* YHCertificateUploadTypeCell.swift */; }; 04A271232BABFF3200652B1B /* YHCertificateUploadTypeCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = 04A271222BABFF3200652B1B /* YHCertificateUploadTypeCell.swift */; };
04A271252BAC33BB00652B1B /* YHFilePreviewTool.swift in Sources */ = {isa = PBXBuildFile; fileRef = 04A271242BAC33BB00652B1B /* YHFilePreviewTool.swift */; }; 04A271252BAC33BB00652B1B /* YHFilePreviewTool.swift in Sources */ = {isa = PBXBuildFile; fileRef = 04A271242BAC33BB00652B1B /* YHFilePreviewTool.swift */; };
04A671592B9F18C800C1FB91 /* YHCertificateUploadSheetView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 04A671582B9F18C800C1FB91 /* YHCertificateUploadSheetView.swift */; }; 04A671592B9F18C800C1FB91 /* YHCertificateUploadSheetView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 04A671582B9F18C800C1FB91 /* YHCertificateUploadSheetView.swift */; };
...@@ -670,6 +672,8 @@ ...@@ -670,6 +672,8 @@
049A48A72B49417300D0C641 /* YHAboutUsViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHAboutUsViewController.swift; sourceTree = "<group>"; }; 049A48A72B49417300D0C641 /* YHAboutUsViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHAboutUsViewController.swift; sourceTree = "<group>"; };
049A48A92B49536000D0C641 /* YHAboutUsAdvantageCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHAboutUsAdvantageCell.swift; sourceTree = "<group>"; }; 049A48A92B49536000D0C641 /* YHAboutUsAdvantageCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHAboutUsAdvantageCell.swift; sourceTree = "<group>"; };
049AC4C52BC3E55300F857F4 /* YHServiceSectionView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHServiceSectionView.swift; sourceTree = "<group>"; }; 049AC4C52BC3E55300F857F4 /* YHServiceSectionView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHServiceSectionView.swift; sourceTree = "<group>"; };
049AC4C72BC513AB00F857F4 /* YHOrderListView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHOrderListView.swift; sourceTree = "<group>"; };
049AC4C92BC5141600F857F4 /* YHServerNoOrderView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHServerNoOrderView.swift; sourceTree = "<group>"; };
04A271222BABFF3200652B1B /* YHCertificateUploadTypeCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHCertificateUploadTypeCell.swift; sourceTree = "<group>"; }; 04A271222BABFF3200652B1B /* YHCertificateUploadTypeCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHCertificateUploadTypeCell.swift; sourceTree = "<group>"; };
04A271242BAC33BB00652B1B /* YHFilePreviewTool.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHFilePreviewTool.swift; sourceTree = "<group>"; }; 04A271242BAC33BB00652B1B /* YHFilePreviewTool.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHFilePreviewTool.swift; sourceTree = "<group>"; };
04A671582B9F18C800C1FB91 /* YHCertificateUploadSheetView.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = YHCertificateUploadSheetView.swift; sourceTree = "<group>"; }; 04A671582B9F18C800C1FB91 /* YHCertificateUploadSheetView.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = YHCertificateUploadSheetView.swift; sourceTree = "<group>"; };
...@@ -2081,6 +2085,8 @@ ...@@ -2081,6 +2085,8 @@
044414062BC3C54B00784A14 /* YHHomeCollectionViewCell.swift */, 044414062BC3C54B00784A14 /* YHHomeCollectionViewCell.swift */,
044414082BC3CE8500784A14 /* YHHomeCollectionLayout.swift */, 044414082BC3CE8500784A14 /* YHHomeCollectionLayout.swift */,
04CC2EEF2BC3DDB2000305DD /* YHServiceBannerView.swift */, 04CC2EEF2BC3DDB2000305DD /* YHServiceBannerView.swift */,
049AC4C72BC513AB00F857F4 /* YHOrderListView.swift */,
049AC4C92BC5141600F857F4 /* YHServerNoOrderView.swift */,
); );
path = V; path = V;
sourceTree = "<group>"; sourceTree = "<group>";
...@@ -2479,6 +2485,7 @@ ...@@ -2479,6 +2485,7 @@
044413FB2BC27E6F00784A14 /* YHHomeWebBottomButton.swift in Sources */, 044413FB2BC27E6F00784A14 /* YHHomeWebBottomButton.swift in Sources */,
045EEEB32B9F171A0022A143 /* YHWorkFileSyncTableViewCell.swift in Sources */, 045EEEB32B9F171A0022A143 /* YHWorkFileSyncTableViewCell.swift in Sources */,
045EEEF12B9F171A0022A143 /* YHChildInfoContainerVC.swift in Sources */, 045EEEF12B9F171A0022A143 /* YHChildInfoContainerVC.swift in Sources */,
049AC4C82BC513AB00F857F4 /* YHOrderListView.swift in Sources */,
045EEF0B2B9F171A0022A143 /* YHBasicInfoFillViewController.swift in Sources */, 045EEF0B2B9F171A0022A143 /* YHBasicInfoFillViewController.swift in Sources */,
A582B2452BBA4CF9009D098C /* YHHKPlanDocModel.swift in Sources */, A582B2452BBA4CF9009D098C /* YHHKPlanDocModel.swift in Sources */,
045EEF142B9F171A0022A143 /* YHItemModel.swift in Sources */, 045EEF142B9F171A0022A143 /* YHItemModel.swift in Sources */,
...@@ -2627,6 +2634,7 @@ ...@@ -2627,6 +2634,7 @@
A5ACE9552B4564F7002C94D2 /* YHTabBarViewController.swift in Sources */, A5ACE9552B4564F7002C94D2 /* YHTabBarViewController.swift in Sources */,
045EEF0A2B9F171A0022A143 /* YHBasicInfoSessionModel.swift in Sources */, 045EEF0A2B9F171A0022A143 /* YHBasicInfoSessionModel.swift in Sources */,
045EEF022B9F171A0022A143 /* YHFormItemDegreeInfoCell.swift in Sources */, 045EEF022B9F171A0022A143 /* YHFormItemDegreeInfoCell.swift in Sources */,
049AC4CA2BC5141600F857F4 /* YHServerNoOrderView.swift in Sources */,
045EEEF72B9F171A0022A143 /* YHFormItemAddCell.swift in Sources */, 045EEEF72B9F171A0022A143 /* YHFormItemAddCell.swift in Sources */,
045EEEC82B9F171A0022A143 /* YHOtherSelecteItemView.swift in Sources */, 045EEEC82B9F171A0022A143 /* YHOtherSelecteItemView.swift in Sources */,
A5C5B3122B57B47D00A7C5D1 /* YHDavidCell0.swift in Sources */, A5C5B3122B57B47D00A7C5D1 /* YHDavidCell0.swift in Sources */,
......
...@@ -34,12 +34,10 @@ class YHServerHKLifeViewController: YHBaseViewController { ...@@ -34,12 +34,10 @@ class YHServerHKLifeViewController: YHBaseViewController {
override func viewDidLoad() { override func viewDidLoad() {
super.viewDidLoad() super.viewDidLoad()
setupUI() setupUI()
handleRightUI()
} }
override func viewWillAppear(_ animated: Bool) { override func viewWillAppear(_ animated: Bool) {
super.viewWillAppear(animated) super.viewWillAppear(animated)
handleRightUI()
loadData() loadData()
} }
} }
...@@ -56,7 +54,6 @@ extension YHServerHKLifeViewController { ...@@ -56,7 +54,6 @@ extension YHServerHKLifeViewController {
} else { } else {
YHHUD.flash(message: error?.errorMsg ?? "请求出错") YHHUD.flash(message: error?.errorMsg ?? "请求出错")
} }
self.handleRightUI()
} }
} }
...@@ -82,13 +79,6 @@ extension YHServerHKLifeViewController { ...@@ -82,13 +79,6 @@ extension YHServerHKLifeViewController {
} }
homeTableView.delegate = self homeTableView.delegate = self
homeTableView.dataSource = self homeTableView.dataSource = self
self.homeTableView.isHidden = true
NotificationCenter.default.addObserver(self, selector: #selector(loginSuccess), name: YhConstant.YhNotification.didLoginSuccessNotifiction, object: nil)
NotificationCenter.default.addObserver(self, selector: #selector(logoutSuccess), name: YhConstant.YhNotification.didLogoutSuccessNotifiction, object: nil)
} }
} }
...@@ -135,32 +125,6 @@ extension YHServerHKLifeViewController : UITableViewDelegate,UITableViewDataSour ...@@ -135,32 +125,6 @@ extension YHServerHKLifeViewController : UITableViewDelegate,UITableViewDataSour
} }
} }
extension YHServerHKLifeViewController {
@objc func loginSuccess() {
printLog("登录成功,进行相应的 UI刷新操作")
loadData()
}
@objc func logoutSuccess() {
handleRightUI()
}
private func handleRightUI() {
if YHLoginManager.shared.isLogin() == false {
homeTableView.isHidden = true
} else {
if serviceCenterMainReqVM.arrContactList.isEmpty {
homeTableView.isHidden = true
} else {
homeTableView.isHidden = false
}
}
homeTableView.reloadData()
}
}
extension YHServerHKLifeViewController: JXSegmentedListContainerViewListDelegate { extension YHServerHKLifeViewController: JXSegmentedListContainerViewListDelegate {
func listView() -> UIView { func listView() -> UIView {
return view return view
......
...@@ -13,37 +13,8 @@ class YHServiceListViewController: YHBaseViewController { ...@@ -13,37 +13,8 @@ class YHServiceListViewController: YHBaseViewController {
private let serviceCenterMainReqVM : YHServiceCenterMainViewModel = YHServiceCenterMainViewModel() private let serviceCenterMainReqVM : YHServiceCenterMainViewModel = YHServiceCenterMainViewModel()
private let loginTipsView : YHLoginTipsView = { var orderListView: YHOrderListView!
let view = YHLoginTipsView() var normalView: YHServerNoOrderView!
view.viewType = 0
view.isHidden = true
return view
}()
private let noDataView : YHLoginTipsView = {
let view = YHLoginTipsView()
view.viewType = 1
view.isHidden = true
return view
}()
private func loginOp() {
let vc = UINavigationController(rootVC: YHPhoneLoginViewController())
vc.modalPresentationStyle = .custom
self.navigationController?.present(vc, animated: true)
}
var homeTableView: UITableView = {
let tableView = UITableView(frame: .zero, style: .grouped)
tableView.backgroundColor = .clear
tableView.separatorStyle = .none
tableView.showsHorizontalScrollIndicator = false
tableView.showsVerticalScrollIndicator = false
tableView.rowHeight = UITableView.automaticDimension
tableView.estimatedRowHeight = 81.0
tableView.register(YHContractCell.self,forCellReuseIdentifier: YHContractCell.cellReuseIdentifier)
return tableView
}()
override func viewDidLoad() { override func viewDidLoad() {
super.viewDidLoad() super.viewDidLoad()
...@@ -62,6 +33,7 @@ extension YHServiceListViewController { ...@@ -62,6 +33,7 @@ extension YHServiceListViewController {
func loadData() { func loadData() {
if YHLoginManager.shared.isLogin() == false { if YHLoginManager.shared.isLogin() == false {
self.handleRightUI()
return return
} }
...@@ -79,131 +51,44 @@ extension YHServiceListViewController { ...@@ -79,131 +51,44 @@ extension YHServiceListViewController {
gk_navBarAlpha = 0 gk_navBarAlpha = 0
gk_navigationBar.isHidden = true gk_navigationBar.isHidden = true
loginTipsView.clickLoginBtnCallBackBlock = { orderListView = {
self.loginOp() let view = YHOrderListView()
} return view
}()
view.addSubview(loginTipsView) view.addSubview(orderListView)
loginTipsView.snp.makeConstraints { make in orderListView.snp.makeConstraints { make in
make.centerX.equalToSuperview()
make.centerY.equalToSuperview()
make.width.equalTo(KScreenWidth)
}
view.addSubview(noDataView)
noDataView.snp.makeConstraints { make in
make.centerX.equalToSuperview()
make.centerY.equalToSuperview()
make.width.equalTo(KScreenWidth)
}
view.addSubview(homeTableView)
homeTableView.snp.makeConstraints { make in
make.top.left.right.equalToSuperview() make.top.left.right.equalToSuperview()
make.bottom.equalToSuperview().offset(-k_Height_TabBar) make.bottom.equalToSuperview().offset(-k_Height_TabBar)
} }
homeTableView.delegate = self
homeTableView.dataSource = self
self.homeTableView.isHidden = true
self.noDataView.isHidden = false
NotificationCenter.default.addObserver(self, selector: #selector(loginSuccess), name: YhConstant.YhNotification.didLoginSuccessNotifiction, object: nil)
NotificationCenter.default.addObserver(self, selector: #selector(logoutSuccess), name: YhConstant.YhNotification.didLogoutSuccessNotifiction, object: nil)
}
}
// MARK: - UITableViewDelegate 和 UITableViewDataSource
extension YHServiceListViewController : UITableViewDelegate,UITableViewDataSource {
func numberOfSections(in tableView: UITableView) -> Int {
return self.serviceCenterMainReqVM.arrContactList.count
}
func tableView(_ tableView: UITableView, numberOfRowsInSection section: Int) -> Int {
return 1
}
func tableView(_ tableView: UITableView, heightForHeaderInSection section: Int) -> CGFloat {
return kMargin
}
func tableView(_ tableView: UITableView, viewForHeaderInSection section: Int) -> UIView? { normalView = {
let view = UIView(frame: CGRect(x: 0, y: 0, width: KScreenWidth, height: kMargin)) let view = YHServerNoOrderView()
return view return view
}()
view.addSubview(normalView)
normalView.snp.makeConstraints { make in
make.top.left.right.equalToSuperview()
make.bottom.equalToSuperview().offset(-k_Height_TabBar)
} }
func tableView(_ tableView: UITableView, heightForFooterInSection section: Int) -> CGFloat {
return 0
}
func tableView(_ tableView: UITableView, viewForFooterInSection section: Int) -> UIView? {
return UIView()
}
func tableView(_ tableView: UITableView, heightForRowAt indexPath: IndexPath) -> CGFloat {
return 81
}
func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell {
let cell0 = tableView.dequeueReusableCell(withClass: YHContractCell.self)
cell0.selectionStyle = .none
if indexPath.section < self.serviceCenterMainReqVM.arrContactList.count {
cell0.dataModel = self.serviceCenterMainReqVM.arrContactList[indexPath.section]
}
return cell0
}
func tableView(_ tableView: UITableView, didSelectRowAt indexPath: IndexPath) {
tableView.deselectRow(at: indexPath, animated: true)
printLog("点击了 tableView Cell \(indexPath.section)")
//获取订单号
let orderId = serviceCenterMainReqVM.arrContactList[indexPath.section].id
UserDefaults.standard.set(orderId, forKey: "orderIdForPreview")
UserDefaults.standard.synchronize()
let vc = YHServiceCenterSecondViewController()
vc.orderId = orderId
vc.mobile = serviceCenterMainReqVM.arrContactList[indexPath.section].mobile
self.navigationController?.pushViewController(vc)
} }
} }
extension YHServiceListViewController { extension YHServiceListViewController {
@objc func loginSuccess() {
printLog("登录成功,进行相应的 UI刷新操作")
loadData()
}
@objc func logoutSuccess() {
handleRightUI()
}
private func handleRightUI() { private func handleRightUI() {
if YHLoginManager.shared.isLogin() == false { if YHLoginManager.shared.isLogin() == false {
loginTipsView.isHidden = false normalView.isHidden = false
noDataView.isHidden = true orderListView.isHidden = true
homeTableView.isHidden = true
} else { } else {
loginTipsView.isHidden = true
if serviceCenterMainReqVM.arrContactList.isEmpty { if serviceCenterMainReqVM.arrContactList.isEmpty {
homeTableView.isHidden = true normalView.isHidden = false
noDataView.isHidden = false orderListView.isHidden = true
} else { } else {
homeTableView.isHidden = false normalView.isHidden = true
noDataView.isHidden = true orderListView.isHidden = false
orderListView.dataSource = serviceCenterMainReqVM.arrContactList
} }
} }
homeTableView.reloadData()
} }
} }
...@@ -211,4 +96,8 @@ extension YHServiceListViewController: JXSegmentedListContainerViewListDelegate ...@@ -211,4 +96,8 @@ extension YHServiceListViewController: JXSegmentedListContainerViewListDelegate
func listView() -> UIView { func listView() -> UIView {
return view return view
} }
func listWillAppear() {
loadData()
}
} }
...@@ -116,8 +116,11 @@ class YHMyDocumentsDetailViewController: YHBaseViewController { ...@@ -116,8 +116,11 @@ class YHMyDocumentsDetailViewController: YHBaseViewController {
} else { } else {
YHHUD.flash(message: error?.errorMsg ?? "") YHHUD.flash(message: error?.errorMsg ?? "")
} }
self.checkSign()
}) })
}
func checkSign() {
viewModel?.requestSignCallBack("\(self.viewModel.mainModel?.writing_document.doc_sign.id ?? 0)", callBackBlock: {[weak self] success, error in viewModel?.requestSignCallBack("\(self.viewModel.mainModel?.writing_document.doc_sign.id ?? 0)", callBackBlock: {[weak self] success, error in
guard let self = self else { return } guard let self = self else { return }
self.isSign = success self.isSign = success
...@@ -245,7 +248,7 @@ class YHMyDocumentsDetailViewController: YHBaseViewController { ...@@ -245,7 +248,7 @@ class YHMyDocumentsDetailViewController: YHBaseViewController {
//发送接口 //发送接口
if let orderID = UserDefaults.standard.value(forKey: "orderIdForPreview") { if let orderID = UserDefaults.standard.value(forKey: "orderIdForPreview") {
YHHUD.show(.progress(message: "发送中...")) YHHUD.show(.progress(message: "发送中..."))
let params = ["order_id":orderID,"ids":[self.id],"email":text] let params = ["order_id":orderID,"ids":[self.viewModel.mainModel?.writing_document.doc_sign.id ?? 0],"email":text]
self.viewModel?.sendEmailForDocs(params, callBackBlock: { success, error in self.viewModel?.sendEmailForDocs(params, callBackBlock: { success, error in
YHHUD.hide() YHHUD.hide()
if success { if success {
...@@ -271,11 +274,13 @@ class YHMyDocumentsDetailViewController: YHBaseViewController { ...@@ -271,11 +274,13 @@ class YHMyDocumentsDetailViewController: YHBaseViewController {
} }
@objc func submit() { @objc func submit() {
YHHUD.show(.progress(message: ""))
viewModel.requestSignConfirm("\(self.viewModel.mainModel?.writing_document.doc_sign.id ?? 0)") {[weak self] success, error in viewModel.requestSignConfirm("\(self.viewModel.mainModel?.writing_document.doc_sign.id ?? 0)") {[weak self] success, error in
guard let self = self else { return } guard let self = self else { return }
YHHUD.hide()
if success { if success {
self.getData()
YHHUD.flash(message: "提交成功") YHHUD.flash(message: "提交成功")
self.getData()
} else { } else {
if let errorMsg = error?.errorMsg, !errorMsg.isEmpty { if let errorMsg = error?.errorMsg, !errorMsg.isEmpty {
YHHUD.flash(message: errorMsg) YHHUD.flash(message: errorMsg)
...@@ -407,9 +412,6 @@ extension YHMyDocumentsDetailViewController: UITableViewDelegate, UITableViewDat ...@@ -407,9 +412,6 @@ extension YHMyDocumentsDetailViewController: UITableViewDelegate, UITableViewDat
cell.block = {[weak self] type in cell.block = {[weak self] type in
guard let self = self else { return } guard let self = self else { return }
if type == .edit { if type == .edit {
if self.viewModel.mainModel?.prospectus.id != 0 {
// 跳转赴港计划书编辑页面
} else {
YHHUD.show(.progress(message: "")) YHHUD.show(.progress(message: ""))
self.viewModel.requestDocumentsTemporaryUrl("\(id)", callBackBlock: {[weak self] success, error in self.viewModel.requestDocumentsTemporaryUrl("\(id)", callBackBlock: {[weak self] success, error in
YHHUD.hide() YHHUD.hide()
...@@ -427,16 +429,12 @@ extension YHMyDocumentsDetailViewController: UITableViewDelegate, UITableViewDat ...@@ -427,16 +429,12 @@ extension YHMyDocumentsDetailViewController: UITableViewDelegate, UITableViewDat
} }
}) })
} }
}
if type == .submit { if type == .submit {
self.showSureAlert() self.showSureAlert()
} }
if type == .look { if type == .look {
if self.viewModel.mainModel?.prospectus.id != 0 {
// 跳转赴港计划书查看页面
} else {
YHHUD.show(.progress(message: "")) YHHUD.show(.progress(message: ""))
self.viewModel.requestDocumentsTemporaryUrl("\(id)", callBackBlock: {[weak self] success, error in self.viewModel.requestDocumentsTemporaryUrl("\(id)", callBackBlock: {[weak self] success, error in
YHHUD.hide() YHHUD.hide()
...@@ -455,11 +453,11 @@ extension YHMyDocumentsDetailViewController: UITableViewDelegate, UITableViewDat ...@@ -455,11 +453,11 @@ extension YHMyDocumentsDetailViewController: UITableViewDelegate, UITableViewDat
}) })
} }
} }
}
return cell return cell
} else { } else {
if indexPath.row == 0 { if indexPath.row == 0 {
let cell = tableView.dequeueReusableCell(withClass: YHDocumentPromptTableViewCell.self) let cell = tableView.dequeueReusableCell(withClass: YHDocumentPromptTableViewCell.self)
cell.type = self.viewModel.mainModel?.writing_document.doc_sign.doc_type ?? 0
cell.backgroundColor = .clear cell.backgroundColor = .clear
cell.contentView.backgroundColor = .clear cell.contentView.backgroundColor = .clear
return cell return cell
...@@ -467,6 +465,9 @@ extension YHMyDocumentsDetailViewController: UITableViewDelegate, UITableViewDat ...@@ -467,6 +465,9 @@ extension YHMyDocumentsDetailViewController: UITableViewDelegate, UITableViewDat
let cell = tableView.dequeueReusableCell(withClass: YHDocumentToActionTableViewCell.self) let cell = tableView.dequeueReusableCell(withClass: YHDocumentToActionTableViewCell.self)
cell.dataSource = self.viewModel.mainModel cell.dataSource = self.viewModel.mainModel
cell.isSign = self.isSign cell.isSign = self.isSign
if self.type == 5 || self.type == 4 {
cell.isSign = true
}
cell.backgroundColor = .clear cell.backgroundColor = .clear
cell.contentView.backgroundColor = .clear cell.contentView.backgroundColor = .clear
cell.block = { [weak self] type in cell.block = { [weak self] type in
......
...@@ -360,7 +360,7 @@ extension YHMyDocumentsListViewController: UITableViewDelegate, UITableViewDataS ...@@ -360,7 +360,7 @@ extension YHMyDocumentsListViewController: UITableViewDelegate, UITableViewDataS
} }
} else { } else {
let vc = YHMySignatureDetailViewController() let vc = YHMySignatureDetailViewController()
vc.id = model.id vc.id = model.sign_doc.id
self.navigationController?.pushViewController(vc) self.navigationController?.pushViewController(vc)
} }
} }
......
...@@ -216,50 +216,61 @@ class YHDocumentMessageTableViewCell: UITableViewCell { ...@@ -216,50 +216,61 @@ class YHDocumentMessageTableViewCell: UITableViewCell {
let status = dataSource.writing_document.status let status = dataSource.writing_document.status
if status == 1 { if status == 1 {
statusTxt = "不展示" statusTxt = " 不展示 "
color = UIColor.brandMainColor color = UIColor.brandMainColor
lookButton.isHidden = true lookButton.isHidden = true
editButton.isHidden = false
submitButton.isHidden = false
} else if status == 2 { } else if status == 2 {
statusTxt = " 待确认 " statusTxt = " 待确认 "
color = UIColor.brandMainColor color = UIColor.brandMainColor
lookButton.isHidden = true lookButton.isHidden = true
editButton.isHidden = false
submitButton.isHidden = false
} else if status == 3 { } else if status == 3 {
statusTxt = " 核对中 " statusTxt = " 核对中 "
color = UIColor.warnColor color = UIColor.warnColor
lookButton.isHidden = false
editButton.isHidden = true editButton.isHidden = true
submitButton.isHidden = true submitButton.isHidden = true
bottomCenterLineView.isHidden = true bottomCenterLineView.isHidden = true
} else if status == 4 { } else if status == 4 {
statusTxt = " 核对中 " statusTxt = " 核对中 "
color = UIColor.warnColor color = UIColor.warnColor
lookButton.isHidden = false
editButton.isHidden = true editButton.isHidden = true
submitButton.isHidden = true submitButton.isHidden = true
bottomCenterLineView.isHidden = true bottomCenterLineView.isHidden = true
} else if status == 5 { } else if status == 5 {
statusTxt = " 已驳回 " statusTxt = " 已驳回 "
color = UIColor.successColor color = UIColor.successColor
lookButton.isHidden = false
editButton.isHidden = true editButton.isHidden = true
submitButton.isHidden = true submitButton.isHidden = true
bottomCenterLineView.isHidden = true bottomCenterLineView.isHidden = true
} else if status == 6 { } else if status == 6 {
statusTxt = " 已定稿 " statusTxt = " 已定稿 "
color = UIColor.labelTextColor2 color = UIColor.labelTextColor2
lookButton.isHidden = false
editButton.isHidden = true editButton.isHidden = true
submitButton.isHidden = true submitButton.isHidden = true
bottomCenterLineView.isHidden = true bottomCenterLineView.isHidden = true
} else if status == 7 { } else if status == 7 {
statusTxt = " 已完成 " statusTxt = " 已完成 "
color = UIColor.labelTextColor2 color = UIColor.labelTextColor2
lookButton.isHidden = false
editButton.isHidden = true editButton.isHidden = true
submitButton.isHidden = true submitButton.isHidden = true
bottomCenterLineView.isHidden = true bottomCenterLineView.isHidden = true
} else { } else {
statusTxt = " -- " statusTxt = " -- "
color = UIColor.failColor color = UIColor.failColor
lookButton.isHidden = false
editButton.isHidden = true editButton.isHidden = true
submitButton.isHidden = true submitButton.isHidden = true
bottomCenterLineView.isHidden = true bottomCenterLineView.isHidden = true
} }
subTitleLabel.text = statusTxt subTitleLabel.text = statusTxt
subTitleLabel.textColor = color subTitleLabel.textColor = color
subTitleLabel.backgroundColor = color.withAlphaComponent(0.08) subTitleLabel.backgroundColor = color.withAlphaComponent(0.08)
......
...@@ -14,10 +14,9 @@ class YHDocumentPromptTableViewCell: UITableViewCell { ...@@ -14,10 +14,9 @@ class YHDocumentPromptTableViewCell: UITableViewCell {
var promptImageView: UIImageView! var promptImageView: UIImageView!
var titleLabel: UILabel! var titleLabel: UILabel!
var subTitleLabel: UILabel! var subTitleLabel: UILabel!
var type: Int = 0 {
var dataSource: YHMyDocumentDetailModel? {
didSet { didSet {
updateAllViews() updatePrompt()
} }
} }
...@@ -104,10 +103,22 @@ class YHDocumentPromptTableViewCell: UITableViewCell { ...@@ -104,10 +103,22 @@ class YHDocumentPromptTableViewCell: UITableViewCell {
} }
func updateAllViews() { func updatePrompt() {
guard let dataSource = dataSource else { return } // 1-代理委托书,2-受养人声明,3-工作经验补充表,4-声明书,5-人才清单声明书,6-个人陈述书,7-推荐信,8-组织架构图
// titleLabel.text = dataSource.doc_name
// subTitleLabel.text = "\(dataSource.doc_type)" if type == 7 || type == 8 {
let a: ASAttributedString = .init("您可以", .font(UIFont.PFSC_R(ofSize: 12)),.foreground(UIColor.subTextColor2))
let aa: ASAttributedString = .init("转发给需签署的人签字,若需要盖章,则先确认文书是否已签完,然后下载打印去盖章,扫描签章件上传", .font(UIFont.PFSC_R(ofSize: 12)),.foreground(UIColor.brandMainColor))
subTitleLabel.attributed.text = a + aa
} else if type == 2 {
let a: ASAttributedString = .init("您可以", .font(UIFont.PFSC_R(ofSize: 12)),.foreground(UIColor.subTextColor2))
let aa: ASAttributedString = .init("先下载原件,然后打印去签字/盖章,最后扫描签字/盖章件上传", .font(UIFont.PFSC_R(ofSize: 12)),.foreground(UIColor.brandMainColor))
subTitleLabel.attributed.text = a + aa
} else {
let a: ASAttributedString = .init("您可以", .font(UIFont.PFSC_R(ofSize: 12)),.foreground(UIColor.subTextColor2))
let aa: ASAttributedString = .init("直接电子签署文书,或上传已签章件", .font(UIFont.PFSC_R(ofSize: 12)),.foreground(UIColor.brandMainColor))
subTitleLabel.attributed.text = a + aa
}
} }
} }
......
...@@ -99,8 +99,11 @@ class YHMySignatureDetailViewController: YHBaseViewController { ...@@ -99,8 +99,11 @@ class YHMySignatureDetailViewController: YHBaseViewController {
} else { } else {
YHHUD.flash(message: error?.errorMsg ?? "") YHHUD.flash(message: error?.errorMsg ?? "")
} }
self.checkSign()
}) })
}
func checkSign() {
viewModel?.requestSignCallBack("\(self.id)", callBackBlock: {[weak self] success, error in viewModel?.requestSignCallBack("\(self.id)", callBackBlock: {[weak self] success, error in
guard let self = self else { return } guard let self = self else { return }
self.isSign = success self.isSign = success
...@@ -354,6 +357,7 @@ extension YHMySignatureDetailViewController: UITableViewDelegate, UITableViewDat ...@@ -354,6 +357,7 @@ extension YHMySignatureDetailViewController: UITableViewDelegate, UITableViewDat
func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell { func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell {
if indexPath.row == 0 { if indexPath.row == 0 {
let cell = tableView.dequeueReusableCell(withClass: YHDocumentPromptTableViewCell.self) let cell = tableView.dequeueReusableCell(withClass: YHDocumentPromptTableViewCell.self)
cell.type = self.viewModel.mainModel?.doc_type ?? 0
cell.backgroundColor = .clear cell.backgroundColor = .clear
cell.contentView.backgroundColor = .clear cell.contentView.backgroundColor = .clear
return cell return cell
...@@ -361,6 +365,9 @@ extension YHMySignatureDetailViewController: UITableViewDelegate, UITableViewDat ...@@ -361,6 +365,9 @@ extension YHMySignatureDetailViewController: UITableViewDelegate, UITableViewDat
let cell = tableView.dequeueReusableCell(withClass: YHSignatureToActionTableViewCell.self) let cell = tableView.dequeueReusableCell(withClass: YHSignatureToActionTableViewCell.self)
cell.dataSource = self.viewModel.mainModel cell.dataSource = self.viewModel.mainModel
cell.isSign = self.isSign cell.isSign = self.isSign
if self.type == 5 || self.type == 4 {
cell.isSign = true
}
cell.backgroundColor = .clear cell.backgroundColor = .clear
cell.contentView.backgroundColor = .clear cell.contentView.backgroundColor = .clear
cell.block = { [weak self] type in cell.block = { [weak self] type in
......
//
// YHOrderListView.swift
// galaxy
//
// Created by EDY on 2024/4/9.
// Copyright © 2024 https://www.galaxy-immi.com. All rights reserved.
//
import UIKit
class YHOrderListView: UIView {
var dataSource: [YHContactItemModel] = [] {
didSet {
self.homeTableView.reloadData()
}
}
var homeTableView: UITableView = {
let tableView = UITableView(frame: .zero, style: .grouped)
tableView.backgroundColor = .clear
tableView.separatorStyle = .none
tableView.showsHorizontalScrollIndicator = false
tableView.showsVerticalScrollIndicator = false
tableView.rowHeight = UITableView.automaticDimension
tableView.estimatedRowHeight = 81.0
tableView.register(YHContractCell.self,forCellReuseIdentifier: YHContractCell.cellReuseIdentifier)
return tableView
}()
override init(frame: CGRect) {
super.init(frame: frame)
setupUI()
}
required init?(coder: NSCoder) {
fatalError("init(coder:) has not been implemented")
}
func setupUI() {
addSubview(homeTableView)
homeTableView.snp.makeConstraints { make in
make.top.left.right.equalToSuperview()
make.bottom.equalToSuperview()
}
homeTableView.delegate = self
homeTableView.dataSource = self
}
}
extension YHOrderListView : UITableViewDelegate,UITableViewDataSource {
func numberOfSections(in tableView: UITableView) -> Int {
return self.dataSource.count
}
func tableView(_ tableView: UITableView, numberOfRowsInSection section: Int) -> Int {
return 1
}
func tableView(_ tableView: UITableView, heightForHeaderInSection section: Int) -> CGFloat {
return kMargin
}
func tableView(_ tableView: UITableView, viewForHeaderInSection section: Int) -> UIView? {
let view = UIView(frame: CGRect(x: 0, y: 0, width: KScreenWidth, height: kMargin))
return view
}
func tableView(_ tableView: UITableView, heightForFooterInSection section: Int) -> CGFloat {
return 0
}
func tableView(_ tableView: UITableView, viewForFooterInSection section: Int) -> UIView? {
return UIView()
}
func tableView(_ tableView: UITableView, heightForRowAt indexPath: IndexPath) -> CGFloat {
return 81
}
func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell {
let cell0 = tableView.dequeueReusableCell(withClass: YHContractCell.self)
cell0.selectionStyle = .none
if indexPath.section < self.dataSource.count {
cell0.dataModel = self.dataSource[indexPath.section]
}
return cell0
}
func tableView(_ tableView: UITableView, didSelectRowAt indexPath: IndexPath) {
tableView.deselectRow(at: indexPath, animated: true)
printLog("点击了 tableView Cell \(indexPath.section)")
//获取订单号
let orderId = dataSource[indexPath.section].id
UserDefaults.standard.set(orderId, forKey: "orderIdForPreview")
UserDefaults.standard.synchronize()
let vc = YHServiceCenterSecondViewController()
vc.orderId = orderId
vc.mobile = dataSource[indexPath.section].mobile
UIViewController.current?.navigationController?.pushViewController(vc)
}
}
//
// YHServerNoOrderView.swift
// galaxy
//
// Created by EDY on 2024/4/9.
// Copyright © 2024 https://www.galaxy-immi.com. All rights reserved.
//
import UIKit
class YHServerNoOrderView: UIView {
var tableHeadView: YHServerTableHeadView!
var tableFootView: YHServiceTableFootView!
var sectionView: YHServiceSectionView!
var homeTableView: UITableView = {
let tableView = UITableView(frame: .zero, style: .plain)
if #available(iOS 15.0, *) {
tableView.sectionHeaderTopPadding = 0
}
tableView.backgroundColor = .clear
tableView.separatorStyle = .none
tableView.showsHorizontalScrollIndicator = false
tableView.showsVerticalScrollIndicator = false
tableView.rowHeight = UITableView.automaticDimension
tableView.estimatedRowHeight = 81.0
tableView.register(YHServerHKLifeViewCell.self,forCellReuseIdentifier: YHServerHKLifeViewCell.cellReuseIdentifier)
return tableView
}()
override init(frame: CGRect) {
super.init(frame: frame)
setupUI()
}
required init?(coder: NSCoder) {
fatalError("init(coder:) has not been implemented")
}
func setupUI() {
sectionView = {
let view = YHServiceSectionView()
return view
}()
tableHeadView = YHServerTableHeadView()
tableHeadView.frame = CGRect(x: 0, y: 0, width: KScreenWidth, height: 365)
// tableFootView = YHServiceTableFootView()
// tableFootView.frame = CGRect(x: 0, y: 0, width: KScreenWidth, height: KScreenHeight)
addSubview(homeTableView)
homeTableView.tableHeaderView = tableHeadView
homeTableView.tableFooterView = tableFootView
homeTableView.snp.makeConstraints { make in
make.top.left.right.equalToSuperview()
make.bottom.equalToSuperview()
}
homeTableView.delegate = self
homeTableView.dataSource = self
}
}
// MARK: - UITableViewDelegate 和 UITableViewDataSource
extension YHServerNoOrderView : UITableViewDelegate,UITableViewDataSource {
func numberOfSections(in tableView: UITableView) -> Int {
return 1
}
func tableView(_ tableView: UITableView, numberOfRowsInSection section: Int) -> Int {
return 1
}
func tableView(_ tableView: UITableView, heightForHeaderInSection section: Int) -> CGFloat {
return 48
}
func tableView(_ tableView: UITableView, viewForHeaderInSection section: Int) -> UIView? {
return sectionView
}
func tableView(_ tableView: UITableView, heightForFooterInSection section: Int) -> CGFloat {
return 0.01
}
func tableView(_ tableView: UITableView, viewForFooterInSection section: Int) -> UIView? {
return UIView()
}
func tableView(_ tableView: UITableView, heightForRowAt indexPath: IndexPath) -> CGFloat {
return KScreenHeight
}
func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell {
let cell0 = tableView.dequeueReusableCell(withClass: YHServerHKLifeViewCell.self)
cell0.selectionStyle = .none
return cell0
}
func tableView(_ tableView: UITableView, didSelectRowAt indexPath: IndexPath) {
}
}
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