Commit 8cb67c62 authored by pete谢兆麟's avatar pete谢兆麟

Merge commit '26693db0' into xiezhaolin

parents 420d5f69 26693db0
This diff is collapsed.
......@@ -34,7 +34,7 @@ class YHCertificateCategoryItem {
}
}
class YHMaterialListViewController: YHBaseViewController {
class YHCertificateListContainerVC: YHBaseViewController {
static let segmentHeight = 53.0
......@@ -66,7 +66,7 @@ class YHMaterialListViewController: YHBaseViewController {
YHCertificateCategoryItem(type: .rejected),
YHCertificateCategoryItem(type: .review),
YHCertificateCategoryItem(type: .finish)]
var itemVCs:[YHCertificateResourceUploadVC] = []
var itemVCs:[YHCertificateListVC] = []
lazy var segmentedView : JXSegmentedView = {
let segview = JXSegmentedView(frame: CGRect(x: 0, y: k_Height_NavigationtBarAndStatuBar, width: KScreenWidth, height: Self.segmentHeight))
......@@ -132,7 +132,7 @@ class YHMaterialListViewController: YHBaseViewController {
NotificationCenter.default.addObserver(self, selector: #selector(didCertificateCountStatistics(_:)), name:countStatisticsNotify , object: nil)
for item in categoryItems {
let vc = YHCertificateResourceUploadVC()
let vc = YHCertificateListVC()
vc.orderId = orderId
vc.status = item.type
vc.categoryInfo = categoryInfo
......@@ -219,7 +219,7 @@ class YHMaterialListViewController: YHBaseViewController {
}
extension YHMaterialListViewController: JXSegmentedViewDelegate {
extension YHCertificateListContainerVC: JXSegmentedViewDelegate {
func segmentedView(_ segmentedView: JXSegmentedView, didSelectedItemAt index: Int) {
if 0 <= index && index < itemVCs.count {
......@@ -240,7 +240,7 @@ extension YHMaterialListViewController: JXSegmentedViewDelegate {
}
}
extension YHMaterialListViewController: JXSegmentedListContainerViewDataSource {
extension YHCertificateListContainerVC: JXSegmentedListContainerViewDataSource {
func numberOfLists(in listContainerView: JXSegmentedListContainerView) -> Int {
if let titleDataSource = segmentedView.dataSource as? JXSegmentedBaseDataSource {
......
......@@ -12,7 +12,7 @@ import UniformTypeIdentifiers
import IQKeyboardManagerSwift
import SwifterSwift
class YHCertificateResourceUploadVC: YHBaseViewController {
class YHCertificateListVC: YHBaseViewController {
var orderId : Int?
var status: YHCertificateUploadStatus = .all
......@@ -84,12 +84,12 @@ class YHCertificateResourceUploadVC: YHBaseViewController {
view.addSubview(tableView)
tableView.snp.makeConstraints { make in
make.top.left.right.equalToSuperview()
make.height.equalTo(KScreenHeight - k_Height_NavigationtBarAndStatuBar - YHMaterialListViewController.segmentHeight)
make.height.equalTo(KScreenHeight - k_Height_NavigationtBarAndStatuBar - YHCertificateListContainerVC.segmentHeight)
}
}
}
extension YHCertificateResourceUploadVC: UITableViewDelegate, UITableViewDataSource {
extension YHCertificateListVC: UITableViewDelegate, UITableViewDataSource {
func numberOfSections(in tableView: UITableView) -> Int {
return items.count
......@@ -138,7 +138,7 @@ extension YHCertificateResourceUploadVC: UITableViewDelegate, UITableViewDataSou
return
}
// 非待上传的进入详情
let vc = YHUploadContentVC()
let vc = YHCertificateUploadContentListVC()
vc.orderId = orderId
vc.categoryInfo = categoryInfo
vc.supplementInfo = item
......@@ -166,13 +166,13 @@ extension YHCertificateResourceUploadVC: UITableViewDelegate, UITableViewDataSou
}
// MARK: - JXSegmentedListContainerViewListDelegate
extension YHCertificateResourceUploadVC: JXSegmentedListContainerViewListDelegate {
extension YHCertificateListVC: JXSegmentedListContainerViewListDelegate {
func listView() -> UIView {
return view
}
}
extension YHCertificateResourceUploadVC {
extension YHCertificateListVC {
func requestList(status: YHCertificateUploadStatus, extra:[String:Any] = [:]) {
......
......@@ -169,7 +169,7 @@ extension YHCertificateSearchViewController: UITableViewDelegate, UITableViewDat
return
}
// 非待上传的进入详情
let vc = YHUploadContentVC()
let vc = YHCertificateUploadContentListVC()
vc.orderId = orderId
vc.categoryInfo = categoryInfo
vc.supplementInfo = item
......
......@@ -9,7 +9,7 @@
import UIKit
import IQKeyboardManagerSwift
class YHUploadContentVC: YHBaseViewController {
class YHCertificateUploadContentListVC: YHBaseViewController {
var orderId : Int!
var categoryInfo: YHCategoryData!
......@@ -159,7 +159,7 @@ class YHUploadContentVC: YHBaseViewController {
}
}
extension YHUploadContentVC: UITableViewDelegate, UITableViewDataSource {
extension YHCertificateUploadContentListVC: UITableViewDelegate, UITableViewDataSource {
func numberOfSections(in tableView: UITableView) -> Int {
return 2
......@@ -224,7 +224,12 @@ extension YHUploadContentVC: UITableViewDelegate, UITableViewDataSource {
}
} else if editType == .preview { // 预览
// 预览 contentItem
print(contentItem.url)
self.viewModel.getPublicImageUrl(contentItem.url) { success, error in
if let success = success {
self.previewFileTool.openXLSXRemoteFile(urlString: success)
}
}
}
}.show()
}
......@@ -408,7 +413,7 @@ extension YHUploadContentVC: UITableViewDelegate, UITableViewDataSource {
}
}
extension YHUploadContentVC {
extension YHCertificateUploadContentListVC {
func addKeyBoardNotify() {
......@@ -443,7 +448,7 @@ extension YHUploadContentVC {
}
}
extension YHUploadContentVC {
extension YHCertificateUploadContentListVC {
func requestList() {
......
......@@ -190,7 +190,7 @@ extension YHMineCertificateEntryViewController : UITableViewDelegate,UITableView
guard let model = certificateReqVM.certificateEntryModel else { return }
let vc = YHMaterialListViewController()
let vc = YHCertificateListContainerVC()
vc.orderId = orderId
if indexPath.section < model.category_data.count {
vc.categoryInfo = model.category_data[indexPath.section]
......
......@@ -160,7 +160,7 @@ class YHNameExtra: SmartCodable {
enum CodingKeys: String, CodingKey {
case applicant = "applicant"
case userName = "userName"
case userName = "user_name"
case organization = "organization"
}
......
......@@ -103,7 +103,7 @@ class YHCertificateNameCell: UITableViewCell {
editBtn = UIButton()
editBtn.setImage(UIImage(named:"my_cer_btn_edit"), for:.normal)
editBtn.YH_clickEdgeInsets = UIEdgeInsets(top: 20, left: 20, bottom: 20, right: 20)
editBtn.YH_clickEdgeInsets = UIEdgeInsets(top: 30, left: 30, bottom: 30, right: 30)
editBtn.addTarget(self, action: #selector(didEditBtnClicked), for: .touchUpInside)
whiteView.addSubview(editBtn)
......
......@@ -38,7 +38,6 @@ class YHChildPrimaryInfoVC: YHBaseViewController, YHFamilyMemberProtol {
tableView.register(YHFormItemEnterDetailCell.self, forCellReuseIdentifier: YHFormItemEnterDetailCell.cellReuseIdentifier)
tableView.register(YHFormItemTitleCell.self, forCellReuseIdentifier: YHFormItemTitleCell.cellReuseIdentifier)
tableView.register(YHFormItemAddCell.self, forCellReuseIdentifier: YHFormItemAddCell.cellReuseIdentifier)
tableView.register(YHFormItemQuestionsCell.self, forCellReuseIdentifier: YHFormItemQuestionsCell.cellReuseIdentifier)
tableView.register(YHFormItemSelectSheetCell.self, forCellReuseIdentifier: YHFormItemSelectSheetCell.cellReuseIdentifier)
return tableView
......@@ -165,14 +164,12 @@ class YHChildPrimaryInfoVC: YHBaseViewController, YHFamilyMemberProtol {
}
if detailItem.type == .isAccompanyToHK
|| detailItem.type == .isHandleHKPassPort
|| detailItem.type == .ownCustody
|| detailItem.type == .isLiveTother
|| detailItem.type == .isLiveOverSeasMore1Year
{
return .twoChoice
}
if detailItem.type == .ownCustody
|| detailItem.type == .isLiveTother
|| detailItem.type == .isLiveOverSeasMore1Year{
return .question
}
}
return .defaultType
}
......@@ -251,6 +248,17 @@ extension YHChildPrimaryInfoVC : UITableViewDelegate, UITableViewDataSource {
} else if detailItem.type == .isHandleHKPassPort { // 是否办理港澳通行证
self.child?.setNeedHandleHKPassPort(option)
} else if detailItem.type == .isLiveTother { // 是否与主申请人同住
self.child?.setLiveTother(option)
if option {
self.child?.address.clearAddress()
}
} else if detailItem.type == .isLiveOverSeasMore1Year { // 是否在海外居住满1年及以上
self.child?.setOverSearsOver1Year(option)
} else if detailItem.type == .ownCustody { // 抚养权
self.child?.setOwnCustody(option)
}
self.loadInfo()
save()
......@@ -299,46 +307,8 @@ extension YHChildPrimaryInfoVC : UITableViewDelegate, UITableViewDataSource {
}
}
return cell
} else if cellType == .question {
let cell = tableView.dequeueReusableCell(withIdentifier: YHFormItemQuestionsCell.cellReuseIdentifier, for: indexPath) as! YHFormItemQuestionsCell
cell.isMust = detailItem.isNeed
cell.title = detailItem.getTitle()
var select = false
if let value = detailItem.value {
select = Bool(value)!
}
let answers = [YHFormChoiceItem(title: "是".local, isSelect: select),YHFormChoiceItem(title: "否".local, isSelect: !select)]
cell.answerArr = answers
cell.answerBlock = {
[weak self] (arr, selectIndex) in
let selectItem:YHFormChoiceItem = arr[selectIndex]
let option = (selectItem.title == "是".local ? true : false)
guard let self = self else { return }
if detailItem.type == .isLiveTother { // 是否与主申请人同住
self.child?.setLiveTother(option)
if option {
self.child?.address.clearAddress()
}
} else if detailItem.type == .isLiveOverSeasMore1Year { // 是否在海外居住满1年及以上
self.child?.setOverSearsOver1Year(option)
} else if detailItem.type == .ownCustody { // 抚养权
self.child?.setOwnCustody(option)
}
self.loadInfo()
save()
}
return cell
}
}
return createDefaultCell(indexPath)
}
......
......@@ -582,9 +582,14 @@ extension YHSpouseBasicInfoVC : UITableViewDelegate, UITableViewDataSource {
cell.deleteBlock = {
[weak self] in
guard let self = self else { return }
self.spouse?.hasDegreeJson.remove(at: indexPath.row-2)
loadInfo()
save()
var msg = "确定删除学位信息\(indexPath.row-1)吗"
YHTwoOptionAlertView.showAlertView(message:msg) { sure in
if !sure { return }
self.spouse?.hasDegreeJson.remove(at: indexPath.row-2)
self.loadInfo()
self.save()
}
}
}
......
......@@ -38,7 +38,6 @@ class YHSpousePrimaryInfoVC: YHBaseViewController, YHFamilyMemberProtol {
tableView.register(YHFormItemDoubleChoiceCell.self, forCellReuseIdentifier: YHFormItemDoubleChoiceCell.cellReuseIdentifier)
tableView.register(YHFormItemInputTextCell.self, forCellReuseIdentifier: YHFormItemInputTextCell.cellReuseIdentifier)
tableView.register(YHFormItemSelectSheetCell.self, forCellReuseIdentifier: YHFormItemSelectSheetCell.cellReuseIdentifier)
tableView.register(YHFormItemQuestionsCell.self, forCellReuseIdentifier: YHFormItemQuestionsCell.cellReuseIdentifier)
tableView.register(YHFormItemTitleCell.self, forCellReuseIdentifier: YHFormItemTitleCell.cellReuseIdentifier)
tableView.register(YHFormItemAddCell.self, forCellReuseIdentifier: YHFormItemAddCell.cellReuseIdentifier)
return tableView
......@@ -168,7 +167,7 @@ extension YHSpousePrimaryInfoVC : UITableViewDelegate, UITableViewDataSource {
let detailItem = item as! YHFormDetailItem
// 是否随行到香港 / 是否办理港澳通行证 / // 是否与主申请人同住 均用双项按钮cell
if detailItem.type == .isAccompanyToHK || detailItem.type == .isHandleHKPassPort || detailItem.type == .isLiveTother {
if detailItem.type == .isAccompanyToHK || detailItem.type == .isHandleHKPassPort || detailItem.type == .isLiveTother || detailItem.type == .isLiveOverSeasMore1Year {
let cell = tableView.dequeueReusableCell(withIdentifier: YHFormItemDoubleChoiceCell.cellReuseIdentifier, for: indexPath) as! YHFormItemDoubleChoiceCell
cell.isMust = detailItem.isNeed
......@@ -212,32 +211,7 @@ extension YHSpousePrimaryInfoVC : UITableViewDelegate, UITableViewDataSource {
} else if detailItem.type == .isLiveOverSeasMore1Year { // 是否在海外居住满1年及以上
self.spouse?.setOverSearsOver1Year(option)
self.loadInfo()
}
save()
}
return cell
}
if detailItem.type == .isLiveOverSeasMore1Year {
let cell = tableView.dequeueReusableCell(withIdentifier: YHFormItemQuestionsCell.cellReuseIdentifier, for: indexPath) as! YHFormItemQuestionsCell
cell.isMust = detailItem.isNeed
cell.title = detailItem.getTitle()
cell.setTips(detailItem.tips, isShow: isNeedShowError && detailItem.isShowTips)
var select = false
if let value = detailItem.value {
select = Bool(value)!
}
let answers = [YHFormChoiceItem(title: "是".local, isSelect: select),YHFormChoiceItem(title: "否".local, isSelect: !select)]
cell.answerArr = answers
cell.answerBlock = {
[weak self] (arr, selectIndex) in
guard let self = self else { return }
let selectItem:YHFormChoiceItem = arr[selectIndex]
let option = (selectItem.title == "是".local ? true : false)
if detailItem.type == .isLiveOverSeasMore1Year { // 是否在海外居住满1年及以上
} else if detailItem.type == .isLiveOverSeasMore1Year { // 是否在海外居住满1年及以上
self.spouse?.setOverSearsOver1Year(option)
self.loadInfo()
}
......@@ -245,7 +219,7 @@ extension YHSpousePrimaryInfoVC : UITableViewDelegate, UITableViewDataSource {
}
return cell
}
if detailItem.type == .nationOrArea || detailItem.type == .liveCity {
let cell = tableView.dequeueReusableCell(withIdentifier: YHFormItemSelectSheetCell.cellReuseIdentifier, for: indexPath) as! YHFormItemSelectSheetCell
......
......@@ -190,7 +190,10 @@ class YHCodeSueecssViewController: YHBaseViewController {
@objc func startClicked() {
YHHUD.show(.progress(message: ""))
viewModel?.getLoginCode(phoneNumber ?? "", callBackBlock: {[weak self] success,error in
YHHUD.hide()
guard let self = self else { return }
if success == true {
......
......@@ -181,7 +181,10 @@ class YHPhoneLoginViewController: YHBaseViewController {
return
}
if privacyView.isAgree {
YHHUD.show(.progress(message: ""))
viewModel?.getLoginCode(phoneNumer, callBackBlock: {[weak self] success,error in
YHHUD.hide()
guard let self = self else { return }
if success == true {
......@@ -195,9 +198,9 @@ class YHPhoneLoginViewController: YHBaseViewController {
}
YHHUD.flash(message: msg)
#if DEBUG
let vc = YHCodeSueecssViewController()
vc.phoneNumber = self.phoneMessageView.phoneTextField.text
self.navigationController?.pushViewController(vc)
// let vc = YHCodeSueecssViewController()
// vc.phoneNumber = self.phoneMessageView.phoneTextField.text
// self.navigationController?.pushViewController(vc)
#endif
}
})
......
......@@ -207,19 +207,16 @@ extension YHMyViewController : UITableViewDelegate, UITableViewDataSource {
} else {
YHHUD.flash(message: "已登录: 功能完善中...")
}
return
let item: PersonalModuleItem = items[indexPath.row];
// 预览文件预研 杜宇todo
if item.title == "我的消息" {
YHHUD.flash(message: "预览image")
self.openXLSXRemoteFile(urlString: "https://upload-cdn.galaxy-immi.com/crm/production/1620280305822.jpg")
} else if item.title == "我的进度" {
YHHUD.flash(message: "预览pdf")
self.openXLSXRemoteFile(urlString: "https://upload-cdn.galaxy-immi.com/crm/production/1620271660487.pdf")
} else if item.title == "积分中心" {
YHHUD.flash(message: "预览xlsx")
self.openXLSXRemoteFile(urlString: "https://test-cdn.galaxy-immi.com/4001001/8979989729091623170120240321152216.xlsx?Expires=1711007546&OSSAccessKeyId=LTAI5tNFvK2xGRrBeJ2z8R2j&Signature=UfM6tRcws5ObN4rp/3ZESEWbM2E%3D&v=1711005746")
} else if item.title == "推荐有理" {
} else if item.title == "我的海报" {
......
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