Commit 1bcfd057 authored by David黄金龙's avatar David黄金龙

解决冲突

parents 48cf65a4 3bf2a545
...@@ -8,7 +8,7 @@ ...@@ -8,7 +8,7 @@
/* Begin PBXBuildFile section */ /* Begin PBXBuildFile section */
0408C3632BEC7C6900DB1E25 /* YHVideoPlayerControlView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0408C3622BEC7C6900DB1E25 /* YHVideoPlayerControlView.swift */; }; 0408C3632BEC7C6900DB1E25 /* YHVideoPlayerControlView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0408C3622BEC7C6900DB1E25 /* YHVideoPlayerControlView.swift */; };
0409BEEB2C5B41D4003FCFD7 /* YHPrincipleUnapprovedCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0409BEEA2C5B41D4003FCFD7 /* YHPrincipleUnapprovedCell.swift */; }; 0409BEEB2C5B41D4003FCFD7 /* YHPrincipleProfileListCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0409BEEA2C5B41D4003FCFD7 /* YHPrincipleProfileListCell.swift */; };
041390692C1081FA0098CB8A /* YHFileListEmptyView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 041390682C1081FA0098CB8A /* YHFileListEmptyView.swift */; }; 041390692C1081FA0098CB8A /* YHFileListEmptyView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 041390682C1081FA0098CB8A /* YHFileListEmptyView.swift */; };
0414BDA92BC7E81500225367 /* YHMyPermissionSettingVC.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0414BDA82BC7E81500225367 /* YHMyPermissionSettingVC.swift */; }; 0414BDA92BC7E81500225367 /* YHMyPermissionSettingVC.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0414BDA82BC7E81500225367 /* YHMyPermissionSettingVC.swift */; };
0414BDAB2BC7E9C200225367 /* YHMyPermissionCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0414BDAA2BC7E9C200225367 /* YHMyPermissionCell.swift */; }; 0414BDAB2BC7E9C200225367 /* YHMyPermissionCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0414BDAA2BC7E9C200225367 /* YHMyPermissionCell.swift */; };
...@@ -362,7 +362,7 @@ ...@@ -362,7 +362,7 @@
04B360E32C60A346001EB053 /* YHPrinciplePhotoListCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = 04B360E22C60A346001EB053 /* YHPrinciplePhotoListCell.swift */; }; 04B360E32C60A346001EB053 /* YHPrinciplePhotoListCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = 04B360E22C60A346001EB053 /* YHPrinciplePhotoListCell.swift */; };
04B360E52C60B5D3001EB053 /* YHPrinciplePhotoCollectCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = 04B360E42C60B5D3001EB053 /* YHPrinciplePhotoCollectCell.swift */; }; 04B360E52C60B5D3001EB053 /* YHPrinciplePhotoCollectCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = 04B360E42C60B5D3001EB053 /* YHPrinciplePhotoCollectCell.swift */; };
04B360E72C60CD37001EB053 /* YHPrincipleUploadFileCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = 04B360E62C60CD37001EB053 /* YHPrincipleUploadFileCell.swift */; }; 04B360E72C60CD37001EB053 /* YHPrincipleUploadFileCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = 04B360E62C60CD37001EB053 /* YHPrincipleUploadFileCell.swift */; };
04B360EB2C60E88C001EB053 /* YHPrincipleCongratulationAlertView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 04B360EA2C60E88C001EB053 /* YHPrincipleCongratulationAlertView.swift */; }; 04B360EB2C60E88C001EB053 /* YHPrincipleApprovedAlertView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 04B360EA2C60E88C001EB053 /* YHPrincipleApprovedAlertView.swift */; };
04B360ED2C61F157001EB053 /* YHPrincipleEnvelopeCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = 04B360EC2C61F157001EB053 /* YHPrincipleEnvelopeCell.swift */; }; 04B360ED2C61F157001EB053 /* YHPrincipleEnvelopeCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = 04B360EC2C61F157001EB053 /* YHPrincipleEnvelopeCell.swift */; };
04B360EF2C620975001EB053 /* YHPrincipleUploadStatusCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = 04B360EE2C620975001EB053 /* YHPrincipleUploadStatusCell.swift */; }; 04B360EF2C620975001EB053 /* YHPrincipleUploadStatusCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = 04B360EE2C620975001EB053 /* YHPrincipleUploadStatusCell.swift */; };
04B360F12C635A33001EB053 /* YHPrincipleWaitResultModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = 04B360F02C635A33001EB053 /* YHPrincipleWaitResultModel.swift */; }; 04B360F12C635A33001EB053 /* YHPrincipleWaitResultModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = 04B360F02C635A33001EB053 /* YHPrincipleWaitResultModel.swift */; };
...@@ -659,7 +659,7 @@ ...@@ -659,7 +659,7 @@
/* Begin PBXFileReference section */ /* Begin PBXFileReference section */
0408C3622BEC7C6900DB1E25 /* YHVideoPlayerControlView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHVideoPlayerControlView.swift; sourceTree = "<group>"; }; 0408C3622BEC7C6900DB1E25 /* YHVideoPlayerControlView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHVideoPlayerControlView.swift; sourceTree = "<group>"; };
0409BEEA2C5B41D4003FCFD7 /* YHPrincipleUnapprovedCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHPrincipleUnapprovedCell.swift; sourceTree = "<group>"; }; 0409BEEA2C5B41D4003FCFD7 /* YHPrincipleProfileListCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHPrincipleProfileListCell.swift; sourceTree = "<group>"; };
041390682C1081FA0098CB8A /* YHFileListEmptyView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHFileListEmptyView.swift; sourceTree = "<group>"; }; 041390682C1081FA0098CB8A /* YHFileListEmptyView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHFileListEmptyView.swift; sourceTree = "<group>"; };
0414BDA82BC7E81500225367 /* YHMyPermissionSettingVC.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHMyPermissionSettingVC.swift; sourceTree = "<group>"; }; 0414BDA82BC7E81500225367 /* YHMyPermissionSettingVC.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHMyPermissionSettingVC.swift; sourceTree = "<group>"; };
0414BDAA2BC7E9C200225367 /* YHMyPermissionCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHMyPermissionCell.swift; sourceTree = "<group>"; }; 0414BDAA2BC7E9C200225367 /* YHMyPermissionCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHMyPermissionCell.swift; sourceTree = "<group>"; };
...@@ -1015,7 +1015,7 @@ ...@@ -1015,7 +1015,7 @@
04B360E22C60A346001EB053 /* YHPrinciplePhotoListCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHPrinciplePhotoListCell.swift; sourceTree = "<group>"; }; 04B360E22C60A346001EB053 /* YHPrinciplePhotoListCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHPrinciplePhotoListCell.swift; sourceTree = "<group>"; };
04B360E42C60B5D3001EB053 /* YHPrinciplePhotoCollectCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHPrinciplePhotoCollectCell.swift; sourceTree = "<group>"; }; 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>"; }; 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>"; }; 04B360EA2C60E88C001EB053 /* YHPrincipleApprovedAlertView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHPrincipleApprovedAlertView.swift; sourceTree = "<group>"; };
04B360EC2C61F157001EB053 /* YHPrincipleEnvelopeCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHPrincipleEnvelopeCell.swift; sourceTree = "<group>"; }; 04B360EC2C61F157001EB053 /* YHPrincipleEnvelopeCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHPrincipleEnvelopeCell.swift; sourceTree = "<group>"; };
04B360EE2C620975001EB053 /* YHPrincipleUploadStatusCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHPrincipleUploadStatusCell.swift; sourceTree = "<group>"; }; 04B360EE2C620975001EB053 /* YHPrincipleUploadStatusCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHPrincipleUploadStatusCell.swift; sourceTree = "<group>"; };
04B360F02C635A33001EB053 /* YHPrincipleWaitResultModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHPrincipleWaitResultModel.swift; sourceTree = "<group>"; }; 04B360F02C635A33001EB053 /* YHPrincipleWaitResultModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHPrincipleWaitResultModel.swift; sourceTree = "<group>"; };
...@@ -2234,13 +2234,13 @@ ...@@ -2234,13 +2234,13 @@
0472CBA22C5A11640096F48F /* V */ = { 0472CBA22C5A11640096F48F /* V */ = {
isa = PBXGroup; isa = PBXGroup;
children = ( children = (
0409BEEA2C5B41D4003FCFD7 /* YHPrincipleUnapprovedCell.swift */, 0409BEEA2C5B41D4003FCFD7 /* YHPrincipleProfileListCell.swift */,
04B360E22C60A346001EB053 /* YHPrinciplePhotoListCell.swift */, 04B360E22C60A346001EB053 /* YHPrinciplePhotoListCell.swift */,
04B360E42C60B5D3001EB053 /* YHPrinciplePhotoCollectCell.swift */, 04B360E42C60B5D3001EB053 /* YHPrinciplePhotoCollectCell.swift */,
04B360E62C60CD37001EB053 /* YHPrincipleUploadFileCell.swift */, 04B360E62C60CD37001EB053 /* YHPrincipleUploadFileCell.swift */,
04B360EE2C620975001EB053 /* YHPrincipleUploadStatusCell.swift */, 04B360EE2C620975001EB053 /* YHPrincipleUploadStatusCell.swift */,
04B360EC2C61F157001EB053 /* YHPrincipleEnvelopeCell.swift */, 04B360EC2C61F157001EB053 /* YHPrincipleEnvelopeCell.swift */,
04B360EA2C60E88C001EB053 /* YHPrincipleCongratulationAlertView.swift */, 04B360EA2C60E88C001EB053 /* YHPrincipleApprovedAlertView.swift */,
0485DFD72C66036600B50293 /* YHPrincipleFileRenameView.swift */, 0485DFD72C66036600B50293 /* YHPrincipleFileRenameView.swift */,
0485DFDB2C670C7200B50293 /* YHPrincipleSendMailView.swift */, 0485DFDB2C670C7200B50293 /* YHPrincipleSendMailView.swift */,
); );
...@@ -3665,7 +3665,7 @@ ...@@ -3665,7 +3665,7 @@
047AA40B2C65C1AC009C4554 /* YHOffivialApprovalGuildLineCheckView.swift in Sources */, 047AA40B2C65C1AC009C4554 /* YHOffivialApprovalGuildLineCheckView.swift in Sources */,
045EEE7C2B9F171A0022A143 /* YHPreviewInfoSessionModel.swift in Sources */, 045EEE7C2B9F171A0022A143 /* YHPreviewInfoSessionModel.swift in Sources */,
049A48AA2B49536000D0C641 /* YHAboutUsAdvantageCell.swift in Sources */, 049A48AA2B49536000D0C641 /* YHAboutUsAdvantageCell.swift in Sources */,
04B360EB2C60E88C001EB053 /* YHPrincipleCongratulationAlertView.swift in Sources */, 04B360EB2C60E88C001EB053 /* YHPrincipleApprovedAlertView.swift in Sources */,
04CE1AD42C2AD91F001CB80A /* YHActivityDetailModel.swift in Sources */, 04CE1AD42C2AD91F001CB80A /* YHActivityDetailModel.swift in Sources */,
045EEF112B9F171A0022A143 /* YHMainInformationModel.swift in Sources */, 045EEF112B9F171A0022A143 /* YHMainInformationModel.swift in Sources */,
A58AC09D2BABD59600A30FA9 /* YHFileListModel.swift in Sources */, A58AC09D2BABD59600A30FA9 /* YHFileListModel.swift in Sources */,
...@@ -3715,7 +3715,7 @@ ...@@ -3715,7 +3715,7 @@
045EEED72B9F171A0022A143 /* YHEducationInfo.swift in Sources */, 045EEED72B9F171A0022A143 /* YHEducationInfo.swift in Sources */,
047AA3D92C4A4A91009C4554 /* YHInvatationShareViewController.swift in Sources */, 047AA3D92C4A4A91009C4554 /* YHInvatationShareViewController.swift in Sources */,
045EEEDE2B9F171A0022A143 /* YHEducationInfoCell.swift in Sources */, 045EEEDE2B9F171A0022A143 /* YHEducationInfoCell.swift in Sources */,
0409BEEB2C5B41D4003FCFD7 /* YHPrincipleUnapprovedCell.swift in Sources */, 0409BEEB2C5B41D4003FCFD7 /* YHPrincipleProfileListCell.swift in Sources */,
A5ACE93A2B4564F7002C94D2 /* NSAttributedString+Extension.swift in Sources */, A5ACE93A2B4564F7002C94D2 /* NSAttributedString+Extension.swift in Sources */,
A5F886B42C61CEA700B63CF5 /* YHPictureReviewManager.swift in Sources */, A5F886B42C61CEA700B63CF5 /* YHPictureReviewManager.swift in Sources */,
04E86E662B86EB6F00A35F4B /* YHLoginManager.swift in Sources */, 04E86E662B86EB6F00A35F4B /* YHLoginManager.swift in Sources */,
......
...@@ -149,6 +149,7 @@ extension YHHomeHoldViewPageViewController { ...@@ -149,6 +149,7 @@ extension YHHomeHoldViewPageViewController {
} }
// model.type = 1 //for test hjl // model.type = 1 //for test hjl
if model.type == 1 { if model.type == 1 {
//正式弹窗 //正式弹窗
...@@ -187,6 +188,23 @@ extension YHHomeHoldViewPageViewController { ...@@ -187,6 +188,23 @@ extension YHHomeHoldViewPageViewController {
} }
} else if model.type == 2 { } else if model.type == 2 {
//原则批弹窗 //原则批弹窗
let view = YHPrincipleApprovedAlertView.alertView()
view.lookBlock = {
if let orderID = UserDefaults.standard.value(forKey: "orderIdForPreview") as? Int {
self.princleVM.postAlertStatus(14) { success, error in
}
let vc = YHPrincipleApprovedWaitSubmitVC()
vc.orderId = orderID
self.navigationController?.pushViewController(vc)
} else {
YHHUD.flash(message: "订单号为空")
}
}
view.show()
} }
} }
} }
......
...@@ -28,7 +28,7 @@ class YHPrincipleApprovedMailViewController: YHBaseViewController { ...@@ -28,7 +28,7 @@ class YHPrincipleApprovedMailViewController: YHBaseViewController {
tableView.dataSource = self tableView.dataSource = self
tableView.backgroundColor = .clear tableView.backgroundColor = .clear
tableView.register(UITableViewCell.self, forCellReuseIdentifier: "UITableViewCell") tableView.register(UITableViewCell.self, forCellReuseIdentifier: "UITableViewCell")
tableView.register(YHPrincipleUnapprovedCell.self, forCellReuseIdentifier: YHPrincipleUnapprovedCell.cellReuseIdentifier) tableView.register(YHPrincipleProfileListCell.self, forCellReuseIdentifier: YHPrincipleProfileListCell.cellReuseIdentifier)
tableView.register(YHPrincipleEnvelopeCell.self, forCellReuseIdentifier: YHPrincipleEnvelopeCell.cellReuseIdentifier) tableView.register(YHPrincipleEnvelopeCell.self, forCellReuseIdentifier: YHPrincipleEnvelopeCell.cellReuseIdentifier)
return tableView return tableView
}() }()
...@@ -125,7 +125,7 @@ extension YHPrincipleApprovedMailViewController: UITableViewDelegate, UITableVie ...@@ -125,7 +125,7 @@ extension YHPrincipleApprovedMailViewController: UITableViewDelegate, UITableVie
func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell { func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell {
if 0 <= indexPath.row && indexPath.row < items.count { if 0 <= indexPath.row && indexPath.row < items.count {
let cell = tableView.dequeueReusableCell(withIdentifier: YHPrincipleUnapprovedCell.cellReuseIdentifier, for: indexPath) as! YHPrincipleUnapprovedCell let cell = tableView.dequeueReusableCell(withIdentifier: YHPrincipleProfileListCell.cellReuseIdentifier, for: indexPath) as! YHPrincipleProfileListCell
let m = items[indexPath.row] let m = items[indexPath.row]
if m is YHPrincipleWaitResultModel { if m is YHPrincipleWaitResultModel {
let model = m as! YHPrincipleWaitResultModel let model = m as! YHPrincipleWaitResultModel
......
...@@ -27,7 +27,7 @@ class YHPrincipleApprovedWaitSubmitVC: YHBaseViewController { ...@@ -27,7 +27,7 @@ class YHPrincipleApprovedWaitSubmitVC: YHBaseViewController {
tableView.dataSource = self tableView.dataSource = self
tableView.backgroundColor = .clear tableView.backgroundColor = .clear
tableView.register(UITableViewCell.self, forCellReuseIdentifier: "UITableViewCell") tableView.register(UITableViewCell.self, forCellReuseIdentifier: "UITableViewCell")
tableView.register(YHPrincipleUnapprovedCell.self, forCellReuseIdentifier: YHPrincipleUnapprovedCell.cellReuseIdentifier) tableView.register(YHPrincipleProfileListCell.self, forCellReuseIdentifier: YHPrincipleProfileListCell.cellReuseIdentifier)
tableView.register(YHPrincipleEnvelopeCell.self, forCellReuseIdentifier: YHPrincipleEnvelopeCell.cellReuseIdentifier) tableView.register(YHPrincipleEnvelopeCell.self, forCellReuseIdentifier: YHPrincipleEnvelopeCell.cellReuseIdentifier)
return tableView return tableView
}() }()
......
...@@ -31,7 +31,7 @@ class YHPrincipleUploadListVC: YHBaseViewController { ...@@ -31,7 +31,7 @@ class YHPrincipleUploadListVC: YHBaseViewController {
tableView.backgroundColor = .clear tableView.backgroundColor = .clear
tableView.register(UITableViewCell.self, forCellReuseIdentifier: "UITableViewCell") tableView.register(UITableViewCell.self, forCellReuseIdentifier: "UITableViewCell")
tableView.register(YHPrincipleUploadStatusCell.self, forCellReuseIdentifier: YHPrincipleUploadStatusCell.cellReuseIdentifier) tableView.register(YHPrincipleUploadStatusCell.self, forCellReuseIdentifier: YHPrincipleUploadStatusCell.cellReuseIdentifier)
tableView.register(YHPrincipleUnapprovedCell.self, forCellReuseIdentifier: YHPrincipleUnapprovedCell.cellReuseIdentifier) tableView.register(YHPrincipleProfileListCell.self, forCellReuseIdentifier: YHPrincipleProfileListCell.cellReuseIdentifier)
tableView.register(YHPrincipleEnvelopeCell.self, forCellReuseIdentifier: YHPrincipleEnvelopeCell.cellReuseIdentifier) tableView.register(YHPrincipleEnvelopeCell.self, forCellReuseIdentifier: YHPrincipleEnvelopeCell.cellReuseIdentifier)
return tableView return tableView
}() }()
...@@ -302,7 +302,7 @@ extension YHPrincipleUploadListVC { ...@@ -302,7 +302,7 @@ extension YHPrincipleUploadListVC {
func showUploadSheetView(supplementId: Int, completion:(()->())?) { func showUploadSheetView(supplementId: Int, completion:(()->())?) {
let sheetView = YHCertificateUploadSheetView.sheetView() let sheetView = YHCertificateUploadSheetView.sheetView()
sheetView.maxSelectCount = 9 sheetView.maxSelectImageCount = 9
sheetView.uploadImageBlock = { sheetView.uploadImageBlock = {
[weak self] targetImgArr in [weak self] targetImgArr in
guard let self = self else { return } guard let self = self else { return }
...@@ -327,7 +327,7 @@ extension YHPrincipleUploadListVC: UITableViewDelegate, UITableViewDataSource { ...@@ -327,7 +327,7 @@ extension YHPrincipleUploadListVC: UITableViewDelegate, UITableViewDataSource {
if m is YHPrincipleWaitResultModel { if m is YHPrincipleWaitResultModel {
// 入境处已认收受理 和 申请资料已递交港府留档 cell // 入境处已认收受理 和 申请资料已递交港府留档 cell
let cell = tableView.dequeueReusableCell(withIdentifier: YHPrincipleUnapprovedCell.cellReuseIdentifier, for: indexPath) as! YHPrincipleUnapprovedCell let cell = tableView.dequeueReusableCell(withIdentifier: YHPrincipleProfileListCell.cellReuseIdentifier, for: indexPath) as! YHPrincipleProfileListCell
let model = m as! YHPrincipleWaitResultModel let model = m as! YHPrincipleWaitResultModel
cell.updateModel(model) cell.updateModel(model)
cell.expandClick = { cell.expandClick = {
...@@ -380,18 +380,7 @@ extension YHPrincipleUploadListVC: UITableViewDelegate, UITableViewDataSource { ...@@ -380,18 +380,7 @@ extension YHPrincipleUploadListVC: UITableViewDelegate, UITableViewDataSource {
cell.uploadBtnClick = { cell.uploadBtnClick = {
[weak self] selectModel in [weak self] selectModel in
guard let self = self else { return } guard let self = self else { return }
YHImagePickerView.show() {[weak self] image in self.showSelectImageAndFileView(model)
guard let self = self else { return }
let item = YHSelectImageItem()
item.name = self.randomAlphaNumericString(10) + ".png"
item.data = image
let arr = [item]
self.viewModel.uploadImageArr(arr) {
resultArr in
model.content_url.append(contentsOf: resultArr)
self.tableView.reloadData()
}
}
} }
// 点击模版 // 点击模版
cell.templateBtnClick = { cell.templateBtnClick = {
...@@ -512,4 +501,60 @@ extension YHPrincipleUploadListVC: UITableViewDelegate, UITableViewDataSource { ...@@ -512,4 +501,60 @@ extension YHPrincipleUploadListVC: UITableViewDelegate, UITableViewDataSource {
} }
}.show() }.show()
} }
func showSelectImageAndFileView(_ model: YHPrincipleAgreementModel) {
let sheetView = YHCertificateUploadSheetView.sheetView()
sheetView.maxSelectImageCount = 9
sheetView.fileTypes = [ "public.image",
"com.adobe.pdf",
"com.microsoft.word.doc",
"org.openxmlformats.wordprocessingml.document",
"com.microsoft.powerpoint.ppt",
"org.openxmlformats.presentationml.presentation",
"org.openxmlformats.spreadsheetml.sheet",
"com.microsoft.excel.xls",]
// 上传文件
sheetView.uploadFilesBlock = {
[weak self] fileUrl in
guard let self = self else { return }
print(fileUrl)
YHHUD.show(.progress(message: "上传中..."))
self.viewModel.uploadFile(fileUrl.absoluteString) {
[weak self] successUrl, error in
YHHUD.hide()
guard let self = self else { return }
// 再调用业务接口
if let successUrl = successUrl, !successUrl.isEmpty {
let fileName = successUrl.lastPathComponent
let suffixName = successUrl.pathExtension.lowercased()
let urlModel = YHPrincipleContentUrlModel()
urlModel.name = fileName
urlModel.url = successUrl
urlModel.fileUrl = successUrl
let dateFormatter = self.viewModel.getUploadTimeFormat()
let dateString = dateFormatter.string(from: Date())
urlModel.updated_at = dateString
model.content_url.insert(urlModel, at: 0)
self.tableView.reloadData()
}
}
}
// 上传图片
sheetView.uploadImageBlock = {
[weak self] targetImgArr in
guard let self = self else { return }
self.viewModel.uploadImageArr(targetImgArr) {
[weak self] resultArr in
guard let self = self else { return }
model.content_url.insert(contentsOf: resultArr, at: 0)
self.tableView.reloadData()
}
}
sheetView.show()
}
} }
...@@ -38,7 +38,7 @@ class YHPrincipleWaitResultViewController: YHBaseViewController { ...@@ -38,7 +38,7 @@ class YHPrincipleWaitResultViewController: YHBaseViewController {
tableView.dataSource = self tableView.dataSource = self
tableView.backgroundColor = .clear tableView.backgroundColor = .clear
tableView.register(UITableViewCell.self, forCellReuseIdentifier: "UITableViewCell") tableView.register(UITableViewCell.self, forCellReuseIdentifier: "UITableViewCell")
tableView.register(YHPrincipleUnapprovedCell.self, forCellReuseIdentifier: YHPrincipleUnapprovedCell.cellReuseIdentifier) tableView.register(YHPrincipleProfileListCell.self, forCellReuseIdentifier: YHPrincipleProfileListCell.cellReuseIdentifier)
tableView.register(YHPrinciplePhotoListCell.self, forCellReuseIdentifier: YHPrinciplePhotoListCell.cellReuseIdentifier) tableView.register(YHPrinciplePhotoListCell.self, forCellReuseIdentifier: YHPrinciplePhotoListCell.cellReuseIdentifier)
return tableView return tableView
}() }()
...@@ -166,7 +166,7 @@ extension YHPrincipleWaitResultViewController: UITableViewDelegate, UITableViewD ...@@ -166,7 +166,7 @@ extension YHPrincipleWaitResultViewController: UITableViewDelegate, UITableViewD
} }
} }
let cell = tableView.dequeueReusableCell(withIdentifier: YHPrincipleUnapprovedCell.cellReuseIdentifier, for: indexPath) as! YHPrincipleUnapprovedCell let cell = tableView.dequeueReusableCell(withIdentifier: YHPrincipleProfileListCell.cellReuseIdentifier, for: indexPath) as! YHPrincipleProfileListCell
if 0 <= indexPath.row && indexPath.row < items.count { if 0 <= indexPath.row && indexPath.row < items.count {
let model = items[indexPath.row] let model = items[indexPath.row]
......
...@@ -9,8 +9,10 @@ ...@@ -9,8 +9,10 @@
import UIKit import UIKit
import AttributedString import AttributedString
class YHPrincipleCongratulationAlertView: UIView { class YHPrincipleApprovedAlertView: UIView {
var lookBlock: (()->())?
lazy var blackMaskView: UIView = { lazy var blackMaskView: UIView = {
let view = UIView() let view = UIView()
view.backgroundColor = .alertMaskColor view.backgroundColor = .alertMaskColor
...@@ -71,8 +73,8 @@ class YHPrincipleCongratulationAlertView: UIView { ...@@ -71,8 +73,8 @@ class YHPrincipleCongratulationAlertView: UIView {
return button return button
}() }()
static func alertView() -> YHPrincipleCongratulationAlertView { static func alertView() -> YHPrincipleApprovedAlertView {
let view = YHPrincipleCongratulationAlertView(frame: UIScreen.main.bounds) let view = YHPrincipleApprovedAlertView(frame: UIScreen.main.bounds)
return view return view
} }
...@@ -81,7 +83,8 @@ class YHPrincipleCongratulationAlertView: UIView { ...@@ -81,7 +83,8 @@ class YHPrincipleCongratulationAlertView: UIView {
} }
@objc func didLookBtnClicked() { @objc func didLookBtnClicked() {
self.lookBlock?()
self.dismiss()
} }
@objc func show() { @objc func show() {
......
...@@ -12,6 +12,8 @@ class YHPrincipleEnvelopeCell: UITableViewCell { ...@@ -12,6 +12,8 @@ class YHPrincipleEnvelopeCell: UITableViewCell {
static let cellReuseIdentifier = "YHPrincipleEnvelopeCell" static let cellReuseIdentifier = "YHPrincipleEnvelopeCell"
var itemModel:YHPrincipleEnvelopeModel? var itemModel:YHPrincipleEnvelopeModel?
var viewModel = YHPrincleViewModel()
var expandClick:((Bool)->())? var expandClick:((Bool)->())?
lazy var titleLabel: UILabel = { lazy var titleLabel: UILabel = {
...@@ -32,6 +34,9 @@ class YHPrincipleEnvelopeCell: UITableViewCell { ...@@ -32,6 +34,9 @@ class YHPrincipleEnvelopeCell: UITableViewCell {
view.backgroundColor = .white view.backgroundColor = .white
view.layer.cornerRadius = 6.0 view.layer.cornerRadius = 6.0
view.clipsToBounds = true view.clipsToBounds = true
view.isUserInteractionEnabled = true
let gap = UITapGestureRecognizer(target: self, action: #selector(didWatchClicked))
view.addGestureRecognizer(gap)
return view return view
}() }()
...@@ -48,19 +53,25 @@ class YHPrincipleEnvelopeCell: UITableViewCell { ...@@ -48,19 +53,25 @@ class YHPrincipleEnvelopeCell: UITableViewCell {
view.addSubview(self.nameLabel) view.addSubview(self.nameLabel)
nameLabel.snp.makeConstraints { make in nameLabel.snp.makeConstraints { make in
make.top.equalTo(58.0) make.top.equalTo(58.0)
make.centerX.equalToSuperview() make.left.equalTo(50)
make.height.equalTo(25) make.right.equalTo(-20)
} }
return view return view
}() }()
lazy var nameLabel: UILabel = { lazy var nameLabel: UILabel = {
let label = UILabel() let label = UILabel()
label.numberOfLines = 2
label.font = UIFont.PFSC_M(ofSize: 18) label.font = UIFont.PFSC_M(ofSize: 18)
label.textColor = UIColor(hex: 0xB75E24) label.textColor = UIColor(hex: 0xB75E24)
return label return label
}() }()
lazy var previewFileTool:YHFilePreviewTool = {
let tool = YHFilePreviewTool(targetVC: UIViewController.current)
return tool
}()
override init(style: UITableViewCell.CellStyle, reuseIdentifier: String?) { override init(style: UITableViewCell.CellStyle, reuseIdentifier: String?) {
super.init(style: style, reuseIdentifier: reuseIdentifier) super.init(style: style, reuseIdentifier: reuseIdentifier)
setupUI() setupUI()
...@@ -75,6 +86,28 @@ class YHPrincipleEnvelopeCell: UITableViewCell { ...@@ -75,6 +86,28 @@ class YHPrincipleEnvelopeCell: UITableViewCell {
expandClick?(!model.isUnfold) expandClick?(!model.isUnfold)
} }
@objc func didWatchClicked() {
guard let model = itemModel else { return }
if !model.url.isEmpty {
self.viewModel.getPublicImageUrl(model.url) { success, error in
if let success = success {
self.previewFileTool.openXLSXRemoteFile(urlString: success, fileName:model.name)
}
}
let key = self.getUrlKey(model)
UserDefaults.standard.set(true, forKey: key)
UserDefaults.standard.synchronize()
self.updateModel(model)
}
}
func getUrlKey(_ model: YHPrincipleEnvelopeModel) -> String {
let key = "CustomerServiceFile_" + model.url
return key
}
func updateModel(_ model:YHPrincipleEnvelopeModel) { func updateModel(_ model:YHPrincipleEnvelopeModel) {
itemModel = model itemModel = model
...@@ -83,6 +116,14 @@ class YHPrincipleEnvelopeCell: UITableViewCell { ...@@ -83,6 +116,14 @@ class YHPrincipleEnvelopeCell: UITableViewCell {
expandBtn.setImage(UIImage(named: imgName), for: .normal) expandBtn.setImage(UIImage(named: imgName), for: .normal)
nameLabel.text = model.name nameLabel.text = model.name
let key = self.getUrlKey(model)
if let isWatch = UserDefaults.standard.value(forKey: key) as? Bool, isWatch == true {
envelopImgView.image = UIImage(named: "principle_envelope_see")
} else {
envelopImgView.image = UIImage(named: "principle_envelope_unsee")
}
if !model.isUnfold { if !model.isUnfold {
whiteView.removeSubviews() whiteView.removeSubviews()
whiteView.snp.remakeConstraints { make in whiteView.snp.remakeConstraints { make in
......
...@@ -20,7 +20,7 @@ class YHPrincipleFileModel { ...@@ -20,7 +20,7 @@ class YHPrincipleFileModel {
} }
} }
class YHPrincipleUnapprovedItemView: UIView { class YHPrincipleProfileItemView: UIView {
static let viewH: CGFloat = 20.0 static let viewH: CGFloat = 20.0
var btnClick: (()->())? var btnClick: (()->())?
...@@ -94,9 +94,9 @@ class YHPrincipleUnapprovedItemView: UIView { ...@@ -94,9 +94,9 @@ class YHPrincipleUnapprovedItemView: UIView {
} }
} }
class YHPrincipleUnapprovedCell: UITableViewCell { class YHPrincipleProfileListCell: UITableViewCell {
static let cellReuseIdentifier = "YHPrincipleUnapprovedCell" static let cellReuseIdentifier = "YHPrincipleProfileListCell"
var itemModel:YHPrincipleWaitResultModel? var itemModel:YHPrincipleWaitResultModel?
var items: [YHPrincipleFileModel] = [] var items: [YHPrincipleFileModel] = []
var expandClick:((Bool)->())? var expandClick:((Bool)->())?
...@@ -201,7 +201,7 @@ class YHPrincipleUnapprovedCell: UITableViewCell { ...@@ -201,7 +201,7 @@ class YHPrincipleUnapprovedCell: UITableViewCell {
var lastItemView: UIView = listTitleLabel var lastItemView: UIView = listTitleLabel
for (index, item) in items.enumerated() { for (index, item) in items.enumerated() {
let itemView = YHPrincipleUnapprovedItemView(frame: .zero) let itemView = YHPrincipleProfileItemView(frame: .zero)
itemView.updateModel(item) itemView.updateModel(item)
if model.type == .entry { if model.type == .entry {
itemView.btnClick = { itemView.btnClick = {
...@@ -224,7 +224,7 @@ class YHPrincipleUnapprovedCell: UITableViewCell { ...@@ -224,7 +224,7 @@ class YHPrincipleUnapprovedCell: UITableViewCell {
whiteView.addSubview(itemView) whiteView.addSubview(itemView)
itemView.snp.makeConstraints { make in itemView.snp.makeConstraints { make in
make.left.right.equalTo(0) make.left.right.equalTo(0)
make.height.equalTo(YHPrincipleUnapprovedItemView.viewH) make.height.equalTo(YHPrincipleProfileItemView.viewH)
make.top.equalTo(lastItemView.snp.bottom).offset(16.0) make.top.equalTo(lastItemView.snp.bottom).offset(16.0)
if index == items.count-1 { if index == items.count-1 {
make.bottom.equalTo(-16.0) make.bottom.equalTo(-16.0)
......
...@@ -350,8 +350,7 @@ extension YHPrincleViewModel { ...@@ -350,8 +350,7 @@ extension YHPrincleViewModel {
model.url = url model.url = url
model.fileUrl = url model.fileUrl = url
let dateFormatter = DateFormatter() let dateFormatter = self.getUploadTimeFormat()
dateFormatter.dateFormat = "HH:mm:ss"
let dateString = dateFormatter.string(from: Date()) let dateString = dateFormatter.string(from: Date())
model.updated_at = dateString model.updated_at = dateString
...@@ -363,49 +362,9 @@ extension YHPrincleViewModel { ...@@ -363,49 +362,9 @@ extension YHPrincleViewModel {
} }
} }
// func getEnvelopModel() -> YHPrincipleEnvelopeModel { func getUploadTimeFormat() -> DateFormatter {
// let model = YHPrincipleEnvelopeModel() let dateFormatter = DateFormatter()
// model.name = "黄金龙" dateFormatter.dateFormat = "YYYY.MM.dd"
// model.sex = 1 return dateFormatter
// model.date = "2024-12-12" }
// return model
// }
//
// func getTestModel() -> YHPrincipleWaitResultModel {
//
// var files: [YHFileNumberList] = []
// let m = YHFileNumberList()
// m.applicationName = "杜宇"
// m.fileNumber = "23412-AVAVS-SADFAS"
// let m2 = YHFileNumberList()
// m2.applicationName = "宇"
// m2.fileNumber = "23412-AVAVS-SADFAS"
// files.append(m)
// files.append(m2)
//
// var imgs: [YHResultImageList] = []
// let n = YHResultImageList()
// n.applicationName = "嘟嘟"
// let n1 = YHResultImageList()
// n1.applicationName = "嘟嘟"
// let n2 = YHResultImageList()
// n2.applicationName = "嘟嘟"
// imgs.append(n)
// imgs.append(n1)
// imgs.append(n2)
//
// let applicant = YHApplicant()
// applicant.userName = "哈哈哈"
//
// let model = YHPrincipleWaitResultModel(lastQueryAt: "2024-12-01 23:34:12",
// queryCount: 40,
// fileNumberList: files,
// resultImageList: imgs,
// applicant: applicant,
// applicationFileNumberAttachment: "你要死啊")
// return model
// }
//
} }
...@@ -146,7 +146,7 @@ class YHCertificateUploadContentListVC: YHBaseViewController { ...@@ -146,7 +146,7 @@ class YHCertificateUploadContentListVC: YHBaseViewController {
} }
let sheetView = YHCertificateUploadSheetView.sheetView() let sheetView = YHCertificateUploadSheetView.sheetView()
sheetView.maxSelectCount = 99-items.count sheetView.maxSelectImageCount = 99-items.count
sheetView.uploadFilesBlock = { sheetView.uploadFilesBlock = {
[weak self] fileUrl in [weak self] fileUrl in
guard let self = self else { return } guard let self = self else { return }
......
...@@ -42,16 +42,16 @@ enum YHCertificateUploadType: Int { ...@@ -42,16 +42,16 @@ enum YHCertificateUploadType: Int {
class YHCertificateUploadSheetView: UIView { class YHCertificateUploadSheetView: UIView {
private var _maxSelectCount: Int = 9 private var _maxSelectImageCount: Int = 9
let tips = "支持的文件格式为jpg/jpeg、png、doc/docx、pptx、pdf,最多可上传99张图片或文件" var tips = "支持的文件格式为jpg/jpeg、png、doc/docx、pptx、pdf,最多可上传99张图片或文件"
var maxSelectCount = 9 { var maxSelectImageCount = 9 {
didSet { didSet {
if maxSelectCount >= 9 { if maxSelectImageCount >= 9 {
_maxSelectCount = 9 _maxSelectImageCount = 9
} else if 0 < maxSelectCount && maxSelectCount < 9 { } else if 0 < maxSelectImageCount && maxSelectImageCount < 9 {
_maxSelectCount = maxSelectCount _maxSelectImageCount = maxSelectImageCount
} else { } else {
_maxSelectCount = 0 _maxSelectImageCount = 0
} }
} }
} }
...@@ -145,28 +145,28 @@ class YHCertificateUploadSheetView: UIView { ...@@ -145,28 +145,28 @@ class YHCertificateUploadSheetView: UIView {
return tableView return tableView
}() }()
var fileTypes: [String] = [ "public.image",
"com.adobe.pdf",
"com.microsoft.word.doc",
"org.openxmlformats.wordprocessingml.document",
"com.microsoft.powerpoint.ppt",
"org.openxmlformats.presentationml.presentation",
]
lazy var documentPickerVC: UIDocumentPickerViewController = { lazy var documentPickerVC: UIDocumentPickerViewController = {
let docTypes = [ "public.image",
"com.adobe.pdf",
"com.microsoft.word.doc",
"org.openxmlformats.wordprocessingml.document",
"com.microsoft.powerpoint.ppt",
"org.openxmlformats.presentationml.presentation",]
if #available(iOS 14.0, *) { if #available(iOS 14.0, *) {
var arr:[UTType] = [] var arr:[UTType] = []
for docStr in docTypes { for fileType in self.fileTypes {
if let type = UTType(docStr) { if let type = UTType(fileType) {
arr.append(type) arr.append(type)
} }
} }
let docPickerVC = UIDocumentPickerViewController(forOpeningContentTypes: arr) let docPickerVC = UIDocumentPickerViewController(forOpeningContentTypes: arr)
docPickerVC.delegate = self docPickerVC.delegate = self
return docPickerVC return docPickerVC
} }
let docPickerVC = UIDocumentPickerViewController(documentTypes: docTypes, in: .open) let docPickerVC = UIDocumentPickerViewController(documentTypes: self.fileTypes, in: .open)
docPickerVC.delegate = self docPickerVC.delegate = self
return docPickerVC return docPickerVC
}() }()
...@@ -407,7 +407,7 @@ extension YHCertificateUploadSheetView: (UIImagePickerControllerDelegate & UINav ...@@ -407,7 +407,7 @@ extension YHCertificateUploadSheetView: (UIImagePickerControllerDelegate & UINav
var configuration = PHPickerConfiguration() var configuration = PHPickerConfiguration()
// 设置最大选择数量 // 设置最大选择数量
configuration.selectionLimit = _maxSelectCount configuration.selectionLimit = _maxSelectImageCount
// 设置选择器的过滤条件 只显示图片 // 设置选择器的过滤条件 只显示图片
configuration.filter = .images configuration.filter = .images
let picker = PHPickerViewController(configuration: configuration) let picker = PHPickerViewController(configuration: configuration)
......
...@@ -226,7 +226,7 @@ extension YHCertificateViewModel { ...@@ -226,7 +226,7 @@ extension YHCertificateViewModel {
func showUploadSheetView(supplementId: Int, completion:(()->())?) { func showUploadSheetView(supplementId: Int, completion:(()->())?) {
let sheetView = YHCertificateUploadSheetView.sheetView() let sheetView = YHCertificateUploadSheetView.sheetView()
sheetView.maxSelectCount = 9 sheetView.maxSelectImageCount = 9
sheetView.uploadFilesBlock = { sheetView.uploadFilesBlock = {
[weak self] fileUrl in [weak self] fileUrl in
guard let self = self else { return } guard let self = self else { return }
......
...@@ -571,7 +571,7 @@ extension YHWorkExperienceViewController: UITableViewDelegate, UITableViewDataSo ...@@ -571,7 +571,7 @@ extension YHWorkExperienceViewController: UITableViewDelegate, UITableViewDataSo
maxCount = 9 maxCount = 9
} }
let sheetView = YHCertificateUploadSheetView.sheetView() let sheetView = YHCertificateUploadSheetView.sheetView()
sheetView.maxSelectCount = maxCount sheetView.maxSelectImageCount = maxCount
sheetView.uploadFilesBlock = { sheetView.uploadFilesBlock = {
[weak self] fileUrl in [weak self] fileUrl in
guard let self = self else { return } guard let self = self else { return }
...@@ -703,7 +703,7 @@ extension YHWorkExperienceViewController: UITableViewDelegate, UITableViewDataSo ...@@ -703,7 +703,7 @@ extension YHWorkExperienceViewController: UITableViewDelegate, UITableViewDataSo
maxCount = 9 maxCount = 9
} }
let sheetView = YHCertificateUploadSheetView.sheetView() let sheetView = YHCertificateUploadSheetView.sheetView()
sheetView.maxSelectCount = maxCount sheetView.maxSelectImageCount = maxCount
sheetView.uploadFilesBlock = { sheetView.uploadFilesBlock = {
[weak self] fileUrl in [weak self] fileUrl in
guard let self = self else { return } guard let self = self else { return }
......
...@@ -337,15 +337,6 @@ extension YHMyViewController : UITableViewDelegate, UITableViewDataSource { ...@@ -337,15 +337,6 @@ extension YHMyViewController : UITableViewDelegate, UITableViewDataSource {
return return
} }
if true {
// YHPrincipleCongratulationAlertView.alertView().show()
// YHPrincipleWaitResultViewController
let vc = YHPrincipleApprovedWaitSubmitVC()
self.navigationController?.pushViewController(vc)
return
}
let item: PersonalModuleItem = items[indexPath.row] let item: PersonalModuleItem = items[indexPath.row]
switch item.type { switch item.type {
case .myCard://我的名片 case .myCard://我的名片
......
...@@ -56,6 +56,17 @@ ...@@ -56,6 +56,17 @@
<string>com.microsoft.powerpoint.ppt</string> <string>com.microsoft.powerpoint.ppt</string>
</array> </array>
</dict> </dict>
<dict>
<key>CFBundleTypeName</key>
<string>Microsoft Excel Document</string>
<key>LSHandlerRank</key>
<string>Default</string>
<key>LSItemContentTypes</key>
<array>
<string>org.openxmlformats.spreadsheetml.sheet</string>
<string>com.microsoft.excel.xls</string>
</array>
</dict>
</array> </array>
<key>CFBundleURLTypes</key> <key>CFBundleURLTypes</key>
<array> <array>
......
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