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

Merge branch 'develop' of http://gitlab.galaxy-immi.com/mobile-group/galaxy-iOS into develop

parents 37701cd9 564f9713
...@@ -8018,7 +8018,7 @@ ...@@ -8018,7 +8018,7 @@
CODE_SIGN_ENTITLEMENTS = galaxy/galaxyTestEnv.entitlements; CODE_SIGN_ENTITLEMENTS = galaxy/galaxyTestEnv.entitlements;
CODE_SIGN_IDENTITY = "Apple Development"; CODE_SIGN_IDENTITY = "Apple Development";
CODE_SIGN_STYLE = Automatic; CODE_SIGN_STYLE = Automatic;
CURRENT_PROJECT_VERSION = 2; CURRENT_PROJECT_VERSION = 4;
DEVELOPMENT_TEAM = RXHYW88XR7; DEVELOPMENT_TEAM = RXHYW88XR7;
ENABLE_USER_SCRIPT_SANDBOXING = NO; ENABLE_USER_SCRIPT_SANDBOXING = NO;
FRAMEWORK_SEARCH_PATHS = ( FRAMEWORK_SEARCH_PATHS = (
...@@ -8162,7 +8162,7 @@ ...@@ -8162,7 +8162,7 @@
CODE_SIGN_ENTITLEMENTS = galaxy/galaxy.entitlements; CODE_SIGN_ENTITLEMENTS = galaxy/galaxy.entitlements;
CODE_SIGN_IDENTITY = "Apple Development"; CODE_SIGN_IDENTITY = "Apple Development";
CODE_SIGN_STYLE = Automatic; CODE_SIGN_STYLE = Automatic;
CURRENT_PROJECT_VERSION = 2; CURRENT_PROJECT_VERSION = 4;
DEVELOPMENT_TEAM = RXHYW88XR7; DEVELOPMENT_TEAM = RXHYW88XR7;
ENABLE_USER_SCRIPT_SANDBOXING = NO; ENABLE_USER_SCRIPT_SANDBOXING = NO;
FRAMEWORK_SEARCH_PATHS = ( FRAMEWORK_SEARCH_PATHS = (
...@@ -8369,7 +8369,7 @@ ...@@ -8369,7 +8369,7 @@
CODE_SIGN_ENTITLEMENTS = galaxy/galaxyDebug.entitlements; CODE_SIGN_ENTITLEMENTS = galaxy/galaxyDebug.entitlements;
CODE_SIGN_IDENTITY = "Apple Development"; CODE_SIGN_IDENTITY = "Apple Development";
CODE_SIGN_STYLE = Automatic; CODE_SIGN_STYLE = Automatic;
CURRENT_PROJECT_VERSION = 2; CURRENT_PROJECT_VERSION = 4;
DEVELOPMENT_TEAM = RXHYW88XR7; DEVELOPMENT_TEAM = RXHYW88XR7;
ENABLE_USER_SCRIPT_SANDBOXING = NO; ENABLE_USER_SCRIPT_SANDBOXING = NO;
FRAMEWORK_SEARCH_PATHS = ( FRAMEWORK_SEARCH_PATHS = (
...@@ -8416,7 +8416,7 @@ ...@@ -8416,7 +8416,7 @@
CODE_SIGN_ENTITLEMENTS = galaxy/galaxy.entitlements; CODE_SIGN_ENTITLEMENTS = galaxy/galaxy.entitlements;
CODE_SIGN_IDENTITY = "Apple Development"; CODE_SIGN_IDENTITY = "Apple Development";
CODE_SIGN_STYLE = Automatic; CODE_SIGN_STYLE = Automatic;
CURRENT_PROJECT_VERSION = 2; CURRENT_PROJECT_VERSION = 4;
DEVELOPMENT_TEAM = RXHYW88XR7; DEVELOPMENT_TEAM = RXHYW88XR7;
ENABLE_USER_SCRIPT_SANDBOXING = NO; ENABLE_USER_SCRIPT_SANDBOXING = NO;
FRAMEWORK_SEARCH_PATHS = ( FRAMEWORK_SEARCH_PATHS = (
......
...@@ -196,7 +196,7 @@ class YHMyInformationItemCell: UITableViewCell { ...@@ -196,7 +196,7 @@ class YHMyInformationItemCell: UITableViewCell {
case .school: case .school:
let vc = YHCollegeSearchViewController() let vc = YHCollegeSearchViewController()
vc.searchCollegeName = self.dataSource?.message vc.searchCollegeName = self.dataSource?.message
vc.selectBlock = {[weak self] text in vc.selectBlock = {[weak self] text, id in
guard let self = self else { return } guard let self = self else { return }
self.dataSource?.message = text self.dataSource?.message = text
self.updateAllViews() self.updateAllViews()
......
...@@ -68,6 +68,22 @@ class YHHomeHoldViewPageViewController: YHBaseViewController, WKUIDelegate, WKNa ...@@ -68,6 +68,22 @@ class YHHomeHoldViewPageViewController: YHBaseViewController, WKUIDelegate, WKNa
super.viewDidLoad() super.viewDidLoad()
setupUI() setupUI()
// getConfigData() // getConfigData()
// if UIDevice.isUsedProxy() {
// YHHUD.flash(message: "有代理")
// } else {
// YHHUD.flash(message: "无代理")
// }
//
// if UIDevice.isJailbroken() {
// YHHUD.flash(message: "越狱")
// } else {
// YHHUD.flash(message: "未越狱")
// }
} }
func webView(_ webView: WKWebView, didFinish navigation: WKNavigation!) { func webView(_ webView: WKWebView, didFinish navigation: WKNavigation!) {
......
...@@ -32,6 +32,7 @@ class YHLifeViewController: YHBaseViewController { ...@@ -32,6 +32,7 @@ class YHLifeViewController: YHBaseViewController {
collectinoView.backgroundColor = .white collectinoView.backgroundColor = .white
// collectinoView.contentInset = UIEdgeInsets(top: 16, left: 20, bottom: 0, right: 20) // collectinoView.contentInset = UIEdgeInsets(top: 16, left: 20, bottom: 0, right: 20)
collectinoView.register(YHLookCollectionViewCell.self, forCellWithReuseIdentifier:YHLookCollectionViewCell.cellReuseIdentifier) collectinoView.register(YHLookCollectionViewCell.self, forCellWithReuseIdentifier:YHLookCollectionViewCell.cellReuseIdentifier)
collectinoView.register(YHLookNodataCollectionViewCell.self, forCellWithReuseIdentifier:YHLookNodataCollectionViewCell.cellReuseIdentifier)
collectinoView.register(YHlifeCollectionReusableView.self, forSupplementaryViewOfKind: UICollectionView.elementKindSectionFooter, withReuseIdentifier: YHlifeCollectionReusableView.reuseIdentifier) collectinoView.register(YHlifeCollectionReusableView.self, forSupplementaryViewOfKind: UICollectionView.elementKindSectionFooter, withReuseIdentifier: YHlifeCollectionReusableView.reuseIdentifier)
collectinoView.delegate = self collectinoView.delegate = self
collectinoView.dataSource = self collectinoView.dataSource = self
...@@ -42,12 +43,6 @@ class YHLifeViewController: YHBaseViewController { ...@@ -42,12 +43,6 @@ class YHLifeViewController: YHBaseViewController {
return collectinoView return collectinoView
}() }()
lazy var noDataView: YHEmptyDataView = {
let view = YHEmptyDataView.createView("暂无直播", kEmptyCommonBgName)
view.isHidden = true
return view
}()
override func viewDidLoad() { override func viewDidLoad() {
super.viewDidLoad() super.viewDidLoad()
...@@ -57,6 +52,7 @@ class YHLifeViewController: YHBaseViewController { ...@@ -57,6 +52,7 @@ class YHLifeViewController: YHBaseViewController {
override func viewWillAppear(_ animated: Bool) { override func viewWillAppear(_ animated: Bool) {
super.viewWillAppear(animated) super.viewWillAppear(animated)
loadData()
} }
} }
...@@ -89,13 +85,6 @@ extension YHLifeViewController { ...@@ -89,13 +85,6 @@ extension YHLifeViewController {
self.viewModel.getLiveList {[weak self] success, error in self.viewModel.getLiveList {[weak self] success, error in
guard let self = self else { return } guard let self = self else { return }
self.myCollectView.reloadData() self.myCollectView.reloadData()
if hideFlag {
if self.viewModel.liveArr.count == 0 {
noDataView.isHidden = false
} else {
noDataView.isHidden = true
}
}
} }
self.viewModel.getSchedulLiveList {[weak self] success, error in self.viewModel.getSchedulLiveList {[weak self] success, error in
...@@ -200,21 +189,12 @@ extension YHLifeViewController { ...@@ -200,21 +189,12 @@ extension YHLifeViewController {
make.right.equalToSuperview().offset(-20) make.right.equalToSuperview().offset(-20)
} }
view.addSubview(noDataView)
noDataView.snp.makeConstraints { make in
make.centerX.equalToSuperview()
make.centerY.equalToSuperview()
make.width.equalTo(KScreenWidth)
make.height.equalTo(150)
}
myCollectView.es.addYHPullToRefresh { myCollectView.es.addYHPullToRefresh {
self.loadData() self.loadData()
self.myCollectView.es.stopPullToRefresh() self.myCollectView.es.stopPullToRefresh()
} }
myCollectView.isHidden = !hideFlag myCollectView.isHidden = !hideFlag
noDataView.isHidden = !hideFlag
} }
func checkLogin()->Bool { func checkLogin()->Bool {
...@@ -280,10 +260,17 @@ extension YHLifeViewController: JXSegmentedListContainerViewListDelegate { ...@@ -280,10 +260,17 @@ extension YHLifeViewController: JXSegmentedListContainerViewListDelegate {
extension YHLifeViewController: UICollectionViewDelegate, UICollectionViewDataSource, UICollectionViewDelegateFlowLayout { extension YHLifeViewController: UICollectionViewDelegate, UICollectionViewDataSource, UICollectionViewDelegateFlowLayout {
func collectionView(_ collectionView: UICollectionView, numberOfItemsInSection section: Int) -> Int { func collectionView(_ collectionView: UICollectionView, numberOfItemsInSection section: Int) -> Int {
if self.viewModel.liveArr.count == 0 {
return 1
}
return self.viewModel.liveArr.count return self.viewModel.liveArr.count
} }
func collectionView(_ collectionView: UICollectionView, cellForItemAt indexPath: IndexPath) -> UICollectionViewCell { func collectionView(_ collectionView: UICollectionView, cellForItemAt indexPath: IndexPath) -> UICollectionViewCell {
if self.viewModel.liveArr.count == 0 {
let cell = collectionView.dequeueReusableCell(withReuseIdentifier: YHLookNodataCollectionViewCell.cellReuseIdentifier, for: indexPath) as! YHLookNodataCollectionViewCell
return cell
}
let cell = collectionView.dequeueReusableCell(withReuseIdentifier: YHLookCollectionViewCell.cellReuseIdentifier, for: indexPath) as! YHLookCollectionViewCell let cell = collectionView.dequeueReusableCell(withReuseIdentifier: YHLookCollectionViewCell.cellReuseIdentifier, for: indexPath) as! YHLookCollectionViewCell
cell.dataSource = self.viewModel.liveArr[indexPath.row] cell.dataSource = self.viewModel.liveArr[indexPath.row]
...@@ -321,6 +308,13 @@ extension YHLifeViewController: UICollectionViewDelegate, UICollectionViewDataSo ...@@ -321,6 +308,13 @@ extension YHLifeViewController: UICollectionViewDelegate, UICollectionViewDataSo
} }
return CGSize(width: KScreenWidth, height: 0) // 根据需要设置高度 return CGSize(width: KScreenWidth, height: 0) // 根据需要设置高度
} }
func collectionView(_ collectionView: UICollectionView, layout collectionViewLayout: UICollectionViewLayout, sizeForItemAt indexPath: IndexPath) -> CGSize {
if self.viewModel.liveArr.count == 0 {
return CGSize(width: KScreenWidth - 40, height: 250)
}
return CGSize(width: (KScreenWidth - 52)/2, height: 222)
}
} }
class YHLookCollectionViewCell: UICollectionViewCell { class YHLookCollectionViewCell: UICollectionViewCell {
...@@ -425,3 +419,34 @@ class YHLookCollectionViewCell: UICollectionViewCell { ...@@ -425,3 +419,34 @@ class YHLookCollectionViewCell: UICollectionViewCell {
} }
} }
class YHLookNodataCollectionViewCell: UICollectionViewCell {
static let cellReuseIdentifier = "YHLookNodataCollectionViewCell"
lazy var noDataView: YHEmptyDataView = {
let view = YHEmptyDataView.createView("暂无直播", kEmptyCommonBgName)
return view
}()
required init?(coder: NSCoder) {
super.init(coder: coder)
}
override init(frame: CGRect) {
super.init(frame: frame)
setupUI()
}
private func setupUI() {
contentView.addSubview(noDataView)
noDataView.snp.makeConstraints { make in
make.centerX.equalToSuperview()
make.centerY.equalToSuperview()
make.width.equalToSuperview()
make.height.equalTo(150)
}
}
}
...@@ -39,6 +39,11 @@ class YHSelectViewController: YHBaseViewController { ...@@ -39,6 +39,11 @@ class YHSelectViewController: YHBaseViewController {
self.viewModel.getLiveList {[weak self] success, error in self.viewModel.getLiveList {[weak self] success, error in
guard let self = self else { return } guard let self = self else { return }
self.sectionView.items = self.viewModel.liveArr self.sectionView.items = self.viewModel.liveArr
if self.viewModel.liveArr.count == 0 {
sectionView.frame = CGRect(x: 0, y: 0, width: KScreenWidth, height: 0)
} else {
sectionView.frame = CGRect(x: 0, y: 0, width: KScreenWidth, height: 92)
}
} }
} }
...@@ -93,16 +98,6 @@ extension YHSelectViewController { ...@@ -93,16 +98,6 @@ extension YHSelectViewController {
} }
} }
} }
self.viewModel.getLiveList {[weak self] success, error in
guard let self = self else { return }
self.sectionView.items = self.viewModel.liveArr
if self.viewModel.liveArr.count == 0 {
sectionView.frame = CGRect(x: 0, y: 0, width: KScreenWidth, height: 0)
} else {
sectionView.frame = CGRect(x: 0, y: 0, width: KScreenWidth, height: 92)
}
}
} }
func setupUI() { func setupUI() {
...@@ -122,11 +117,18 @@ extension YHSelectViewController { ...@@ -122,11 +117,18 @@ extension YHSelectViewController {
head.frame = CGRect(x: 0, y: 0, width: KScreenWidth, height: 66) head.frame = CGRect(x: 0, y: 0, width: KScreenWidth, height: 66)
head.block = { index in head.block = { index in
self.selectItem = index self.selectItem = index
self.updataData() self.buttonItem = 0
DispatchQueue.main.asyncAfter(deadline: .now() + 0.3) {
self.updataData()
self.tableView.contentOffset = CGPoint(x: 0, y: 92)
}
} }
head.buttonBlock = { index in head.buttonBlock = { index in
self.buttonItem = index self.buttonItem = index
self.updataData() DispatchQueue.main.asyncAfter(deadline: .now() + 0.3) {
self.updataData()
self.tableView.contentOffset = CGPoint(x: 0, y: 92)
}
} }
return head return head
}() }()
......
...@@ -15,7 +15,29 @@ class YHSelectLookHeadView: UIView { ...@@ -15,7 +15,29 @@ class YHSelectLookHeadView: UIView {
var normalButton: UIButton! var normalButton: UIButton!
var hotButton: UIButton! var hotButton: UIButton!
var priceButton: UIButton! var priceButton: UIButton!
var buttonIndex = 0 var buttonIndex = 0 {
didSet {
if buttonIndex == 0 {
normalButton.isSelected = true
hotButton.isSelected = false
priceButton.isSelected = false
} else if buttonIndex == 1 {
normalButton.isSelected = false
hotButton.isSelected = true
priceButton.isSelected = false
} else if buttonIndex == 2 {
normalButton.isSelected = false
hotButton.isSelected = false
priceButton.isSelected = true
priceButton.setImage(UIImage(named: "home_select_icon_select"), for: .selected)
} else if buttonIndex == 3 {
normalButton.isSelected = false
hotButton.isSelected = false
priceButton.isSelected = true
priceButton.setImage(UIImage(named: "home_select_icon_select_two"), for: .selected)
}
}
}
var items: [String] = [] { var items: [String] = [] {
didSet { didSet {
self.myCollectView.reloadData() self.myCollectView.reloadData()
...@@ -76,6 +98,7 @@ class YHSelectLookHeadView: UIView { ...@@ -76,6 +98,7 @@ class YHSelectLookHeadView: UIView {
button.setTitleColor(UIColor.brandMainColor, for: .selected) button.setTitleColor(UIColor.brandMainColor, for: .selected)
// button.setImage(UIImage(named: "home_select_icon_select"), for: .selected) // button.setImage(UIImage(named: "home_select_icon_select"), for: .selected)
button.addTarget(self, action: #selector(normalClick), for: .touchUpInside) button.addTarget(self, action: #selector(normalClick), for: .touchUpInside)
button.isSelected = true
return button return button
}() }()
addSubview(normalButton) addSubview(normalButton)
...@@ -186,6 +209,7 @@ extension YHSelectLookHeadView: UICollectionViewDelegate, UICollectionViewDataSo ...@@ -186,6 +209,7 @@ extension YHSelectLookHeadView: UICollectionViewDelegate, UICollectionViewDataSo
func collectionView(_ collectionView: UICollectionView, didSelectItemAt indexPath: IndexPath) { func collectionView(_ collectionView: UICollectionView, didSelectItemAt indexPath: IndexPath) {
selectIndex = indexPath.row selectIndex = indexPath.row
buttonIndex = 0
collectionView.reloadData() collectionView.reloadData()
if let block = block { if let block = block {
block(indexPath.row) block(indexPath.row)
......
...@@ -13,7 +13,6 @@ import UIKit ...@@ -13,7 +13,6 @@ import UIKit
*/ */
class YHInformationPerfectListVC: YHBaseViewController { class YHInformationPerfectListVC: YHBaseViewController {
var orderId : Int? var orderId : Int?
var productType2 : Int = 0 //1-优才 2-高才
private var firstCheckFlag : Bool = false private var firstCheckFlag : Bool = false
private lazy var serviceCenterMainReqVM : YHServiceCenterMainViewModel = { private lazy var serviceCenterMainReqVM : YHServiceCenterMainViewModel = {
...@@ -111,7 +110,6 @@ class YHInformationPerfectListVC: YHBaseViewController { ...@@ -111,7 +110,6 @@ class YHInformationPerfectListVC: YHBaseViewController {
override func viewDidLoad() { override func viewDidLoad() {
super.viewDidLoad() super.viewDidLoad()
serviceCenterMainReqVM.productType2 = productType2
setupUI() setupUI()
} }
...@@ -235,7 +233,6 @@ extension YHInformationPerfectListVC { ...@@ -235,7 +233,6 @@ extension YHInformationPerfectListVC {
guard let orderId = orderId else { return} guard let orderId = orderId else { return}
self.serviceCenterMainReqVM.getPersonInfoFillStep(params: ["orderId":orderId]) { success, error in self.serviceCenterMainReqVM.getPersonInfoFillStep(params: ["orderId":orderId]) { success, error in
if success { if success {
if self.serviceCenterMainReqVM.myInfoFillStep == 7 { if self.serviceCenterMainReqVM.myInfoFillStep == 7 {
self.hasSubmitFlag = true self.hasSubmitFlag = true
} else { } else {
...@@ -286,7 +283,7 @@ extension YHInformationPerfectListVC { ...@@ -286,7 +283,7 @@ extension YHInformationPerfectListVC {
//我的方案 //我的方案
@objc func goMySchemeVC() { @objc func goMySchemeVC() {
if productType2 == 1 { // 优才 if serviceCenterMainReqVM.application_type == 0 { // 优才
YHMyNewSchemeViewController.shared.goToSchemePage() YHMyNewSchemeViewController.shared.goToSchemePage()
} else if serviceCenterMainReqVM.application_type == 1 || serviceCenterMainReqVM.application_type == 2 || serviceCenterMainReqVM.application_type == 3 { // 高才ABC } else if serviceCenterMainReqVM.application_type == 1 || serviceCenterMainReqVM.application_type == 2 || serviceCenterMainReqVM.application_type == 3 { // 高才ABC
...@@ -303,7 +300,7 @@ extension YHInformationPerfectListVC { ...@@ -303,7 +300,7 @@ extension YHInformationPerfectListVC {
private func goInfoListVCOp(index : Int = 0) { private func goInfoListVCOp(index : Int = 0) {
if productType2 == 1 { // 优才 if serviceCenterMainReqVM.application_type == 0 { // 优才
let vc = YHPreviewMainViewController() let vc = YHPreviewMainViewController()
vc.orderId = orderId vc.orderId = orderId
vc.myDefaultIndex = index vc.myDefaultIndex = index
...@@ -601,7 +598,7 @@ extension YHInformationPerfectListVC : UITableViewDelegate,UITableViewDataSource ...@@ -601,7 +598,7 @@ extension YHInformationPerfectListVC : UITableViewDelegate,UITableViewDataSource
private func handleJumpLogicDebug(tapIndex : Int) { private func handleJumpLogicDebug(tapIndex : Int) {
if productType2 == 1 { if serviceCenterMainReqVM.application_type == 0 {
//优才 //优才
if tapIndex == 0 { if tapIndex == 0 {
if self.serviceCenterMainReqVM.informationFillStepModel?.sweet_notify_status == 0 { if self.serviceCenterMainReqVM.informationFillStepModel?.sweet_notify_status == 0 {
......
...@@ -116,6 +116,28 @@ class YHServiceCenterViewController: YHBaseViewController { ...@@ -116,6 +116,28 @@ class YHServiceCenterViewController: YHBaseViewController {
NotificationCenter.default.addObserver(self, selector: #selector(leaveTopOp), name:Notification.Name(rawValue: "leaveTop0"), object: nil) NotificationCenter.default.addObserver(self, selector: #selector(leaveTopOp), name:Notification.Name(rawValue: "leaveTop0"), object: nil)
NotificationCenter.default.addObserver(self, selector: #selector(beginDragging), name:Notification.Name(rawValue: "scrollViewWillBeginDragging0"), object: nil) NotificationCenter.default.addObserver(self, selector: #selector(beginDragging), name:Notification.Name(rawValue: "scrollViewWillBeginDragging0"), object: nil)
NotificationCenter.default.addObserver(self, selector: #selector(endDragging), name:Notification.Name(rawValue: "scrollViewDidEndDragging0"), object: nil) NotificationCenter.default.addObserver(self, selector: #selector(endDragging), name:Notification.Name(rawValue: "scrollViewDidEndDragging0"), object: nil)
NotificationCenter.default.addObserver(self, selector: #selector(didJumpToServiceProgess), name: YhConstant.YhNotification.didJumpToServiceProgressNotification, object: nil)
}
private func goToServiceProgressVC() {
let vc = YHOrderDetailViewController()
vc.model = oldModel
vc.backDate = { [weak self] model in
guard let self = self else { return }
self.model = model
self.state = 0
self.headIndex = 0
self.isCanSelectStep = false
}
self.navigationController?.pushViewController(vc)
}
@objc func didJumpToServiceProgess() {
/// 服务进度
goToServiceProgressVC()
} }
@objc func logoutSuccess() { @objc func logoutSuccess() {
...@@ -175,7 +197,7 @@ extension YHServiceCenterViewController { ...@@ -175,7 +197,7 @@ extension YHServiceCenterViewController {
titleLabel = { titleLabel = {
let button = UIButton(type: .custom) let button = UIButton(type: .custom)
button.setTitle("我的服务", for: .normal) button.setTitle("我的我的服务", for: .normal)
button.titleLabel?.font = UIFont.PFSC_M(ofSize: 21) button.titleLabel?.font = UIFont.PFSC_M(ofSize: 21)
button.setTitleColor(UIColor.mainTextColor, for: .normal) button.setTitleColor(UIColor.mainTextColor, for: .normal)
button.setImage(UIImage(named: "service_center_select_step"), for: .normal) button.setImage(UIImage(named: "service_center_select_step"), for: .normal)
...@@ -229,7 +251,7 @@ extension YHServiceCenterViewController { ...@@ -229,7 +251,7 @@ extension YHServiceCenterViewController {
make.top.equalTo(53) make.top.equalTo(53)
make.left.equalTo(47) make.left.equalTo(47)
make.height.equalTo(29) make.height.equalTo(29)
make.width.equalTo(102) make.width.equalTo(18 + 126)
} }
} else { } else {
navBar.isHidden = true navBar.isHidden = true
...@@ -245,16 +267,7 @@ extension YHServiceCenterViewController { ...@@ -245,16 +267,7 @@ extension YHServiceCenterViewController {
YHServiceMoreAlertView.show(flag) {[weak self] index in YHServiceMoreAlertView.show(flag) {[weak self] index in
guard let self = self else { return } guard let self = self else { return }
if index == 1 { if index == 1 {
let vc = YHOrderDetailViewController() self.goToServiceProgressVC()
vc.model = oldModel
vc.backDate = { [weak self] model in
guard let self = self else { return }
self.model = model
self.state = 0
self.headIndex = 0
self.isCanSelectStep = false
}
self.navigationController?.pushViewController(vc)
} else { } else {
if self.state == 1 { if self.state == 1 {
let view = YHServiceOrderGuideTipsView.sheetView(serviceCenterMainReqVM.hasTTPS, model.product_type) let view = YHServiceOrderGuideTipsView.sheetView(serviceCenterMainReqVM.hasTTPS, model.product_type)
...@@ -353,6 +366,7 @@ extension YHServiceCenterViewController { ...@@ -353,6 +366,7 @@ extension YHServiceCenterViewController {
func getStep() { func getStep() {
serviceCenterMainReqVM.getServiceMainData(orderId: orderId) {[weak self] success, error in serviceCenterMainReqVM.getServiceMainData(orderId: orderId) {[weak self] success, error in
guard let self = self else { return } guard let self = self else { return }
self.model.product_type = self.serviceCenterMainReqVM.mainModel.category_type
if self.serviceCenterMainReqVM.mainModel.stage == 3 { if self.serviceCenterMainReqVM.mainModel.stage == 3 {
self.isCanSelectStep = true self.isCanSelectStep = true
} }
......
...@@ -277,7 +277,6 @@ class YHServiceOrderListViewController: YHBaseViewController { ...@@ -277,7 +277,6 @@ class YHServiceOrderListViewController: YHBaseViewController {
// UIViewController.current?.navigationController?.pushViewController(vc) // UIViewController.current?.navigationController?.pushViewController(vc)
let vc = YHInformationPerfectListVC() let vc = YHInformationPerfectListVC()
vc.productType2 = productType
vc.orderId = orderId vc.orderId = orderId
UIViewController.current?.navigationController?.pushViewController(vc) UIViewController.current?.navigationController?.pushViewController(vc)
......
...@@ -55,4 +55,5 @@ struct YHServiceCenterMainModel: SmartCodable { ...@@ -55,4 +55,5 @@ struct YHServiceCenterMainModel: SmartCodable {
var stage: Int = 0 // 1 申请阶段 2办证阶段 3续期阶段 var stage: Int = 0 // 1 申请阶段 2办证阶段 3续期阶段
var master_id: Int = 0 // 批次 var master_id: Int = 0 // 批次
var status: Int = 0 var status: Int = 0
var category_type: Int = 0 // 1.优才 2.高才
} }
...@@ -93,7 +93,7 @@ class YHServiceMoreAlertView: UIView { ...@@ -93,7 +93,7 @@ class YHServiceMoreAlertView: UIView {
guideButton = { guideButton = {
let button = UIButton(type: .custom) let button = UIButton(type: .custom)
button.setImage(UIImage(named: "service_more_guide"), for: .normal) button.setImage(UIImage(named: "service_more_guide"), for: .normal)
button.setTitle("获批操作指引", for: .normal) button.setTitle("申请操作指引", for: .normal)
button.setTitleColor(UIColor.mainTextColor, for: .normal) button.setTitleColor(UIColor.mainTextColor, for: .normal)
button.titleLabel?.font = UIFont.PFSC_R(ofSize: 16) button.titleLabel?.font = UIFont.PFSC_R(ofSize: 16)
button.addTarget(self, action: #selector(guideButtonClick), for: .touchUpInside) button.addTarget(self, action: #selector(guideButtonClick), for: .touchUpInside)
......
...@@ -14,7 +14,8 @@ class YHServiceOrderGuideTipsView: UIView { ...@@ -14,7 +14,8 @@ class YHServiceOrderGuideTipsView: UIView {
var block: Block? var block: Block?
var isShow: Bool = true var isShow: Bool = true
var type: Int = 0 var type: Int = 0
var tableView: UITableView!
var image: String = "service_order_guideline_one"
lazy var blackMaskView: UIView = { lazy var blackMaskView: UIView = {
let view = UIView() let view = UIView()
view.backgroundColor = UIColor(hex: 0x0F1214, alpha: 0.5) view.backgroundColor = UIColor(hex: 0x0F1214, alpha: 0.5)
...@@ -95,15 +96,6 @@ class YHServiceOrderGuideTipsView: UIView { ...@@ -95,15 +96,6 @@ class YHServiceOrderGuideTipsView: UIView {
return button return button
}() }()
lazy var myScrollView: UIScrollView = {
let view = UIScrollView()
view.backgroundColor = .clear
view.showsVerticalScrollIndicator = false
view.delegate = self
return view
}()
lazy var bkgImageV: UIImageView = { lazy var bkgImageV: UIImageView = {
let imageV = UIImageView() let imageV = UIImageView()
imageV.image = UIImage(named: "service_order_guideline_one") imageV.image = UIImage(named: "service_order_guideline_one")
...@@ -150,14 +142,14 @@ class YHServiceOrderGuideTipsView: UIView { ...@@ -150,14 +142,14 @@ class YHServiceOrderGuideTipsView: UIView {
func isShow(flag: Bool) { func isShow(flag: Bool) {
buttonContentView.isHidden = !flag buttonContentView.isHidden = !flag
if flag { if flag {
myScrollView.snp.remakeConstraints { make in tableView.snp.remakeConstraints { make in
make.top.equalToSuperview().offset(120) make.top.equalToSuperview().offset(120)
make.left.right.equalToSuperview() make.left.right.equalToSuperview()
make.width.equalTo(KScreenWidth) make.width.equalTo(KScreenWidth)
make.height.equalTo(KScreenHeight - k_Height_NavigationtBarAndStatuBar - 98 - 120) make.height.equalTo(KScreenHeight - k_Height_NavigationtBarAndStatuBar - 98 - 120)
} }
} else { } else {
myScrollView.snp.remakeConstraints { make in tableView.snp.remakeConstraints { make in
make.top.equalToSuperview().offset(68) make.top.equalToSuperview().offset(68)
make.left.right.equalToSuperview() make.left.right.equalToSuperview()
make.height.equalTo(KScreenHeight - k_Height_NavigationtBarAndStatuBar - 98 - 68) make.height.equalTo(KScreenHeight - k_Height_NavigationtBarAndStatuBar - 98 - 68)
...@@ -201,37 +193,15 @@ extension YHServiceOrderGuideTipsView { ...@@ -201,37 +193,15 @@ extension YHServiceOrderGuideTipsView {
@objc func clickLeftBtn() { @objc func clickLeftBtn() {
leftBtn.isSelected = true leftBtn.isSelected = true
rightBtn.isSelected = false rightBtn.isSelected = false
if let tmpImage = UIImage(named:"service_order_guideline_one") { image = "service_order_guideline_one"
let scale = Double(tmpImage.size.height / tmpImage.size.width) tableView.reloadData()
let imageH = scale * (KScreenWidth - 40)
bkgImageV.snp.remakeConstraints { make in
make.top.equalToSuperview()
make.left.equalTo(20)
make.right.equalTo(-20)
make.height.equalTo(imageH)
}
bkgImageV.image = tmpImage
myScrollView.contentSize = CGSize(width: KScreenWidth, height: imageH)
}
} }
@objc func clickRightBtn() { @objc func clickRightBtn() {
leftBtn.isSelected = false leftBtn.isSelected = false
rightBtn.isSelected = true rightBtn.isSelected = true
if let tmpImage = UIImage(named:"service_order_guideline_two") { image = "service_order_guideline_two"
let scale = Double(tmpImage.size.height / tmpImage.size.width) tableView.reloadData()
let imageH = scale * (KScreenWidth - 40)
bkgImageV.snp.remakeConstraints { make in
make.top.equalToSuperview()
make.left.equalTo(20)
make.right.equalTo(-20)
make.height.equalTo(imageH)
}
bkgImageV.image = tmpImage
myScrollView.contentSize = CGSize(width: KScreenWidth, height: imageH)
}
} }
} }
...@@ -291,16 +261,13 @@ private extension YHServiceOrderGuideTipsView { ...@@ -291,16 +261,13 @@ private extension YHServiceOrderGuideTipsView {
} }
let whiteHeight = KScreenHeight - k_Height_NavigationtBarAndStatuBar let whiteHeight = KScreenHeight - k_Height_NavigationtBarAndStatuBar
// whiteContentView.snp.makeConstraints { make in
// make.left.right.bottom.equalToSuperview()
// make.height.equalTo(whiteHeight)
// }
whiteContentView.frame = CGRect(x: 0, y: KScreenHeight, width: KScreenWidth, height: whiteHeight) whiteContentView.frame = CGRect(x: 0, y: KScreenHeight, width: KScreenWidth, height: whiteHeight)
whiteContentView.addSubview(bkgImageV2) whiteContentView.addSubview(bkgImageV2)
bkgImageV2.snp.makeConstraints { make in bkgImageV2.snp.makeConstraints { make in
make.top.left.right.equalToSuperview() make.top.left.right.equalToSuperview()
make.height.equalTo(68) make.height.equalTo(68.fix)
} }
whiteContentView.addSubview(bottomView) whiteContentView.addSubview(bottomView)
...@@ -333,46 +300,116 @@ private extension YHServiceOrderGuideTipsView { ...@@ -333,46 +300,116 @@ private extension YHServiceOrderGuideTipsView {
make.width.equalTo(108) make.width.equalTo(108)
} }
whiteContentView.addSubview(myScrollView) tableView = {
myScrollView.snp.makeConstraints { make in let tableView = UITableView(frame: .zero, style: .grouped)
tableView.contentInsetAdjustmentBehavior = .never
tableView.backgroundColor = .clear
tableView.separatorStyle = .none
tableView.showsHorizontalScrollIndicator = false
tableView.showsVerticalScrollIndicator = false
tableView.dataSource = self
tableView.delegate = self
tableView.register(cellWithClass: YHServiceOrderGuideTableViewCell.self)
return tableView
}()
whiteContentView.addSubview(tableView)
tableView.snp.makeConstraints { make in
make.top.equalToSuperview().offset(120) make.top.equalToSuperview().offset(120)
make.right.left.equalToSuperview() make.right.left.equalToSuperview()
make.height.equalTo(whiteHeight - 98 - 120) make.height.equalTo(whiteHeight - 98 - 120)
} }
if let tmpImage = UIImage(named:"service_order_guideline_one") {
let scale = Double(tmpImage.size.height / tmpImage.size.width)
let imageH = scale * (KScreenWidth - 40)
myScrollView.addSubview(bkgImageV)
bkgImageV.snp.makeConstraints { make in
make.top.equalToSuperview()
make.left.equalTo(20)
make.right.equalTo(-20)
make.height.equalTo(imageH)
}
myScrollView.contentSize = CGSize(width: KScreenWidth, height: imageH)
}
} }
} }
extension YHServiceOrderGuideTipsView : UIScrollViewDelegate { extension YHServiceOrderGuideTipsView: UITableViewDelegate, UITableViewDataSource {
func scrollViewDidScroll(_ scrollView: UIScrollView) { func tableView(_ tableView: UITableView, numberOfRowsInSection section: Int) -> Int {
return 1
}
func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell {
let cell = tableView.dequeueReusableCell(withClass: YHServiceOrderGuideTableViewCell.self)
cell.dataSource = image
return cell
}
func tableView(_ tableView: UITableView, heightForRowAt indexPath: IndexPath) -> CGFloat {
return 1024.fix
}
func tableView(_ tableView: UITableView, heightForHeaderInSection section: Int) -> CGFloat {
return 6
}
func tableView(_ tableView: UITableView, viewForHeaderInSection section: Int) -> UIView? {
return UIView()
}
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, didSelectRowAt indexPath: IndexPath) {
}
}
class YHServiceOrderGuideTableViewCell: UITableViewCell {
var centerImageView: UIImageView!
var dataSource: String? {
didSet {
centerImageView.image = UIImage(named: dataSource ?? "")
}
}
var imageUrl: String? {
didSet {
guard let url = URL(string: imageUrl) else { return }
centerImageView.kf.setImage(with: url)
}
}
override func awakeFromNib() {
super.awakeFromNib()
// Initialization code
}
override func setSelected(_ selected: Bool, animated: Bool) {
super.setSelected(selected, animated: animated)
if !ischeckBeforeFlag { // Configure the view for the selected state
let scrollViewContentHeight = scrollView.contentSize.height }
let scrollOffsetThreshold = scrollViewContentHeight - scrollView.bounds.size.height
required init?(coder: NSCoder) {
// 当前滚动位置 super.init(coder: coder)
let currentOffset = scrollView.contentOffset.y }
if currentOffset > scrollOffsetThreshold { // 接近底部
// 滚动到了底部 override init(style: UITableViewCell.CellStyle, reuseIdentifier: String?) {
ischeckBeforeFlag = true super.init(style: style, reuseIdentifier: reuseIdentifier)
stopTimer() selectionStyle = .none
setButtonEnable(true) setupUI()
} else { }
// 没有滚动到底部
} func setupUI() {
self.backgroundColor = .white
centerImageView = {
let imageView = UIImageView()
imageView.isUserInteractionEnabled = true
imageView.image = UIImage(named: "invitation_with_gifts_first")
imageView.contentMode = .scaleAspectFill
return imageView
}()
contentView.addSubview(centerImageView)
centerImageView.snp.makeConstraints { make in
make.top.equalTo(10)
make.left.equalTo(20)
make.right.equalTo(-20)
make.bottom.equalTo(-10)
} }
} }
} }
...@@ -10,7 +10,6 @@ import UIKit ...@@ -10,7 +10,6 @@ import UIKit
import SmartCodable import SmartCodable
class YHServiceCenterMainViewModel: YHBaseViewModel { class YHServiceCenterMainViewModel: YHBaseViewModel {
var productType2 : Int = 0 //1-优才 2-高才
var application_type : Int = 0 // 高才 才使用该数据 1-高A 2-高B 3-高C var application_type : Int = 0 // 高才 才使用该数据 1-高A 2-高B 3-高C
//合同列表 数据 //合同列表 数据
...@@ -317,7 +316,7 @@ extension YHServiceCenterMainViewModel { ...@@ -317,7 +316,7 @@ extension YHServiceCenterMainViewModel {
var arr : [Int] = [] var arr : [Int] = []
if productType2 == 1 { if application_type == 0 {
//优才 //优才
arr = [0,1,2,3,4,5,8] arr = [0,1,2,3,4,5,8]
} else if application_type == 1 { } else if application_type == 1 {
...@@ -328,8 +327,8 @@ extension YHServiceCenterMainViewModel { ...@@ -328,8 +327,8 @@ extension YHServiceCenterMainViewModel {
arr = [0,1,2,3,4,5] arr = [0,1,2,3,4,5]
} else { } else {
//未知 //未知
printLog("未处理的 订单类型 \(application_type)")
} }
let target = myInfoFillStep let target = myInfoFillStep
var targetIndex : Int = -1 var targetIndex : Int = -1
...@@ -343,7 +342,7 @@ extension YHServiceCenterMainViewModel { ...@@ -343,7 +342,7 @@ extension YHServiceCenterMainViewModel {
for (index,item) in arr.enumerated() { for (index,item) in arr.enumerated() {
let model = YHInformationPerfectModel() let model = YHInformationPerfectModel()
model.productType = productType2 == 1 ? 0 : application_type model.productType = application_type
model.helpModel = resultModel model.helpModel = resultModel
model.type = item model.type = item
arrInfoFillStep.append(model) arrInfoFillStep.append(model)
......
...@@ -12,8 +12,9 @@ class YHCollegeSearchViewController: YHBaseViewController { ...@@ -12,8 +12,9 @@ class YHCollegeSearchViewController: YHBaseViewController {
var orderId:Int = 0 var orderId:Int = 0
var searchCollegeName:String? var searchCollegeName:String?
var selectBlock:((String?)->Void)? var selectBlock:((String?, Int)->Void)?
var colleges:[YHCollegeInfo] = [] var colleges:[YHCollegeInfo] = []
var isShowSureButton: Bool = true
let educationRequest:YHEducationRequestViewModel = YHEducationRequestViewModel() let educationRequest:YHEducationRequestViewModel = YHEducationRequestViewModel()
lazy var searchBar: YHCollegeSearchBar = { lazy var searchBar: YHCollegeSearchBar = {
...@@ -61,7 +62,7 @@ class YHCollegeSearchViewController: YHBaseViewController { ...@@ -61,7 +62,7 @@ class YHCollegeSearchViewController: YHBaseViewController {
view.addSubview(tableView) view.addSubview(tableView)
view.addSubview(searchBar) view.addSubview(searchBar)
searchBar.confirmBtn.isHidden = !isShowSureButton
if let searchCollegeName = searchCollegeName { if let searchCollegeName = searchCollegeName {
searchBar.textField.text = searchCollegeName searchBar.textField.text = searchCollegeName
} }
...@@ -75,7 +76,7 @@ class YHCollegeSearchViewController: YHBaseViewController { ...@@ -75,7 +76,7 @@ class YHCollegeSearchViewController: YHBaseViewController {
[weak self] in [weak self] in
guard let self = self else { return } guard let self = self else { return }
if let selectBlock = selectBlock { if let selectBlock = selectBlock {
selectBlock(searchBar.textField.text) selectBlock(searchBar.textField.text, 0)
self.navigationController?.popViewController(animated: true) self.navigationController?.popViewController(animated: true)
} }
} }
...@@ -150,7 +151,7 @@ extension YHCollegeSearchViewController: UITableViewDelegate, UITableViewDataSou ...@@ -150,7 +151,7 @@ extension YHCollegeSearchViewController: UITableViewDelegate, UITableViewDataSou
if let selectBlock = selectBlock { if let selectBlock = selectBlock {
if indexPath.row < colleges.count { if indexPath.row < colleges.count {
let college:YHCollegeInfo = colleges[indexPath.row] let college:YHCollegeInfo = colleges[indexPath.row]
selectBlock(college.getCollegeName()) selectBlock(college.getCollegeName(), college.id)
self.navigationController?.popViewController(animated: true) self.navigationController?.popViewController(animated: true)
} }
......
...@@ -364,12 +364,15 @@ extension YHEducationDetailVC : UITableViewDelegate, UITableViewDataSource { ...@@ -364,12 +364,15 @@ extension YHEducationDetailVC : UITableViewDelegate, UITableViewDataSource {
vc.orderId = self.orderId vc.orderId = self.orderId
vc.searchCollegeName = detailInfo.college vc.searchCollegeName = detailInfo.college
vc.selectBlock = { vc.selectBlock = {
[weak self] text in [weak self] text,collegeId in
guard let self = self else { return } guard let self = self else { return }
if let text = text, !text.isEmpty { if let text = text, !text.isEmpty {
detailInfo.college = text detailInfo.college = text
detailInfo.college_id = collegeId
} else { } else {
detailInfo.college = "" detailInfo.college = ""
detailInfo.college_id = 0
} }
loadInfo() loadInfo()
saveInfoSilent() saveInfoSilent()
......
...@@ -46,7 +46,7 @@ class YHEducationInfo: SmartCodable { ...@@ -46,7 +46,7 @@ class YHEducationInfo: SmartCodable {
var vacantNum: Int = 0 var vacantNum: Int = 0
var majorOther: String? var majorOther: String?
var hasBachelorDegree: Int = 0 var hasBachelorDegree: Int = 0
var college_id: Int = 0
enum CodingKeys: String, CodingKey { enum CodingKeys: String, CodingKey {
case id = "id" case id = "id"
case college = "college" case college = "college"
...@@ -112,6 +112,7 @@ class YHEducationDetailInfo: SmartCodable { ...@@ -112,6 +112,7 @@ class YHEducationDetailInfo: SmartCodable {
var isAboardSchool: Bool = false var isAboardSchool: Bool = false
var majorOther: String = "" var majorOther: String = ""
var hasBachelorDegree: Int = 0 var hasBachelorDegree: Int = 0
var college_id: Int = 0
// 证件提供确认 0 未选择 1 是 2 否 // 证件提供确认 0 未选择 1 是 2 否
var certConfirm: Int = 0 var certConfirm: Int = 0
...@@ -144,6 +145,7 @@ class YHEducationDetailInfo: SmartCodable { ...@@ -144,6 +145,7 @@ class YHEducationDetailInfo: SmartCodable {
case majorOther = "major_other" case majorOther = "major_other"
case hasBachelorDegree = "has_bachelor_degree" case hasBachelorDegree = "has_bachelor_degree"
case certConfirm = "cert_confirm" case certConfirm = "cert_confirm"
case college_id = "college_id"
} }
required init() { required init() {
......
...@@ -81,37 +81,14 @@ class YHIncomeRecordFromCell: YHResignDocumentCell { ...@@ -81,37 +81,14 @@ class YHIncomeRecordFromCell: YHResignDocumentCell {
extension YHIncomeRecordFromCell { extension YHIncomeRecordFromCell {
private func updateFailLabel(_ needShowFailButton: Bool) { private func updateFailLabel(_ needShowFailButton: Bool) {
if needShowFailButton { if needShowFailButton {
let isRightArrowIconHidden = rightArrowIcon.isHidden
infoDetailLabel.snp.remakeConstraints { make in
make.top.equalToSuperview().offset(16)
make.left.equalToSuperview().offset(147)
if isRightArrowIconHidden {
make.right.lessThanOrEqualToSuperview().offset(-18)
} else {
make.right.lessThanOrEqualTo(rightArrowIcon.snp.left).offset(-18)
}
}
infoFailLabel.snp.remakeConstraints { make in infoFailLabel.snp.remakeConstraints { make in
make.top.equalTo(infoDetailLabel.snp.bottom).offset(6) make.top.equalTo(infoTitleLabel.snp.bottom).offset(6)
make.left.equalTo(dotIcon) make.left.equalTo(dotIcon)
make.right.lessThanOrEqualToSuperview().offset(-18) make.right.lessThanOrEqualToSuperview().offset(-18)
make.bottom.equalToSuperview().offset(-16) make.bottom.equalToSuperview().offset(-16)
} }
infoFailLabel.isHidden = false infoFailLabel.isHidden = false
} else { } else {
let isRightArrowIconHidden = rightArrowIcon.isHidden
infoDetailLabel.snp.remakeConstraints { make in
make.top.equalToSuperview().offset(16)
make.bottom.equalToSuperview().offset(-16)
make.left.equalToSuperview().offset(147)
if isRightArrowIconHidden {
make.right.lessThanOrEqualToSuperview().offset(-18)
} else {
make.right.lessThanOrEqualTo(rightArrowIcon.snp.left).offset(-18)
}
}
infoFailLabel.snp.remakeConstraints { make in infoFailLabel.snp.remakeConstraints { make in
make.left.equalTo(dotIcon) make.left.equalTo(dotIcon)
make.right.lessThanOrEqualToSuperview().offset(-18) make.right.lessThanOrEqualToSuperview().offset(-18)
...@@ -153,8 +130,9 @@ extension YHIncomeRecordFromCell { ...@@ -153,8 +130,9 @@ extension YHIncomeRecordFromCell {
} }
infoDetailLabel.snp.makeConstraints { make in infoDetailLabel.snp.makeConstraints { make in
make.top.equalToSuperview().offset(16) make.top.greaterThanOrEqualToSuperview().offset(16)
make.bottom.equalToSuperview().offset(-16) make.bottom.lessThanOrEqualToSuperview().offset(-16)
make.centerY.equalToSuperview()
make.left.equalToSuperview().offset(147) make.left.equalToSuperview().offset(147)
make.right.lessThanOrEqualTo(rightArrowIcon.snp.left).offset(-18) make.right.lessThanOrEqualTo(rightArrowIcon.snp.left).offset(-18)
} }
......
...@@ -295,7 +295,9 @@ class YHItemView: UIView { ...@@ -295,7 +295,9 @@ class YHItemView: UIView {
buttonState(isLeft: true) buttonState(isLeft: true)
} }
} }
if dataSource.id == .id40 && dataSource.message == "2" {
buttonStateNormal()
}
} else { } else {
leftButton.isHidden = true leftButton.isHidden = true
} }
...@@ -386,6 +388,19 @@ class YHItemView: UIView { ...@@ -386,6 +388,19 @@ class YHItemView: UIView {
} }
func buttonStateNormal() {
leftButton.isSelected = false
rightButton.isSelected = false
leftButton.layer.borderWidth = 0
leftButton.layer.borderColor = UIColor.brandMainColor.cgColor
leftButton.backgroundColor = UIColor.contentBkgColor
rightButton.backgroundColor = UIColor.contentBkgColor
rightButton.layer.borderWidth = 0
leftButton.titleLabel?.font = UIFont.PFSC_M(ofSize: 13)
rightButton.titleLabel?.font = UIFont.PFSC_R(ofSize: 13)
}
@objc func rightClick() { @objc func rightClick() {
rightButton.isSelected = true rightButton.isSelected = true
leftButton.isSelected = false leftButton.isSelected = false
......
...@@ -40,7 +40,7 @@ class eduListModel: SmartCodable { ...@@ -40,7 +40,7 @@ class eduListModel: SmartCodable {
var school_address: schoolAddressModel? var school_address: schoolAddressModel?
var major_other: String = "" var major_other: String = ""
var has_bachelor_degree: Int = 0 var has_bachelor_degree: Int = 0
var college_id: Int = 0
required init() { required init() {
} }
......
...@@ -560,6 +560,10 @@ class YHWorkExperienceItemView: UIView { ...@@ -560,6 +560,10 @@ class YHWorkExperienceItemView: UIView {
let model = YHOtherPickerViewItemData(title: item.company_name ?? "", subTitle: "", index: "\(item.id ?? 0)") let model = YHOtherPickerViewItemData(title: item.company_name ?? "", subTitle: "", index: "\(item.id ?? 0)")
arrData.append(model) arrData.append(model)
} }
if arrData.count == 0 {
YHHUD.flash(message: "请确认工作经验中您是否已填写在职公司")
return
}
YHOtherPickerView.show(type: .myCompany, selectTitle: self.dataSource?.message ?? "", arrData) {[weak self] data in YHOtherPickerView.show(type: .myCompany, selectTitle: self.dataSource?.message ?? "", arrData) {[weak self] data in
guard let self = self else { return } guard let self = self else { return }
self.dataSource?.message = data.title self.dataSource?.message = data.title
......
...@@ -313,7 +313,7 @@ extension YHGCMySignatureDetailViewController: UITableViewDelegate, UITableViewD ...@@ -313,7 +313,7 @@ extension YHGCMySignatureDetailViewController: UITableViewDelegate, UITableViewD
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: YHGCDocumentPromptTableViewCell.self) let cell = tableView.dequeueReusableCell(withClass: YHGCDocumentPromptTableViewCell.self)
cell.type = self.viewModel.mainModel?.doc_type ?? 0 cell.type = self.viewModel.mainModel
cell.backgroundColor = .clear cell.backgroundColor = .clear
cell.contentView.backgroundColor = .clear cell.contentView.backgroundColor = .clear
return cell return cell
......
...@@ -16,7 +16,7 @@ class YHGCDocumentPromptTableViewCell: UITableViewCell { ...@@ -16,7 +16,7 @@ class YHGCDocumentPromptTableViewCell: UITableViewCell {
var titleLabel: UILabel! var titleLabel: UILabel!
var subTitleLabel: UILabel! var subTitleLabel: UILabel!
var link: String = "" var link: String = ""
var type: Int = 0 { var type: YHMySignatureDetailModel? {
didSet { didSet {
updatePrompt() updatePrompt()
} }
...@@ -92,8 +92,8 @@ class YHGCDocumentPromptTableViewCell: UITableViewCell { ...@@ -92,8 +92,8 @@ class YHGCDocumentPromptTableViewCell: UITableViewCell {
label.font = UIFont.PFSC_R(ofSize: 12) label.font = UIFont.PFSC_R(ofSize: 12)
label.textColor = UIColor.labelTextColor2 label.textColor = UIColor.labelTextColor2
label.numberOfLines = 0 label.numberOfLines = 0
let a: ASAttributedString = .init("请如实填写,以下补充信息将使用于生成赴港同意书\n工作单位名称", .font(UIFont.PFSC_R(ofSize: 12)),.foreground(UIColor.subTextColor2)) let a: ASAttributedString = .init("请如实填写,以下补充信息将使用于生成赴港同意书\n单位名称", .font(UIFont.PFSC_R(ofSize: 12)),.foreground(UIColor.subTextColor2))
let aa: ASAttributedString = .init("需要与盖章公司名称一致", .font(UIFont.PFSC_R(ofSize: 12)),.foreground(UIColor.brandMainColor)) let aa: ASAttributedString = .init("需要与盖章单位名称一致", .font(UIFont.PFSC_R(ofSize: 12)),.foreground(UIColor.brandMainColor))
label.attributed.text = a + aa label.attributed.text = a + aa
return label return label
}() }()
...@@ -108,19 +108,51 @@ class YHGCDocumentPromptTableViewCell: UITableViewCell { ...@@ -108,19 +108,51 @@ class YHGCDocumentPromptTableViewCell: UITableViewCell {
func updatePrompt() { func updatePrompt() {
// 1000-代理委托书,1001-同意书,1002-声明书 // 1000-代理委托书,1001-同意书,1002-声明书
guard let dataSource = type else { return }
let type = dataSource.docType // 1000-代理委托书; 1001-赴港同意书; 1002-声明书
let state = dataSource.docStatus // 1003-待签署; 1004-已签署; 1005-待审核; 1006-已驳回; 1007-已完成
if type == 1000 { if type == 1000 {
let a: ASAttributedString = .init("请主申请人", .font(UIFont.PFSC_R(ofSize: 12)),.foreground(UIColor.subTextColor2)) if state == 1000 || state == 1001 || state == 1002 || state == 1003 {
let aa: ASAttributedString = .init("点击签署或上传已签章文件", .font(UIFont.PFSC_R(ofSize: 12)),.foreground(UIColor.brandMainColor)) let a: ASAttributedString = .init("请主申请人", .font(UIFont.PFSC_R(ofSize: 12)),.foreground(UIColor.subTextColor2))
subTitleLabel.attributed.text = a + aa let aa: ASAttributedString = .init("点击签署或上传已签署文件", .font(UIFont.PFSC_R(ofSize: 12)),.foreground(UIColor.brandMainColor))
subTitleLabel.attributed.text = a + aa
} else if state == 1004 || state == 1005 || state == 1006 {
let a: ASAttributedString = .init("审核中,请您耐心等待~", .font(UIFont.PFSC_R(ofSize: 12)),.foreground(UIColor.subTextColor2))
subTitleLabel.attributed.text = a
} else {
let a: ASAttributedString = .init("您已完成签署,预祝您早日获批!", .font(UIFont.PFSC_R(ofSize: 12)),.foreground(UIColor.subTextColor2))
subTitleLabel.attributed.text = a
}
} else if type == 1001 { } else if type == 1001 {
let a: ASAttributedString = .init("请主申请人", .font(UIFont.PFSC_R(ofSize: 12)),.foreground(UIColor.subTextColor2)) if state == 1000 || state == 1001 || state == 1002 {
let aa: ASAttributedString = .init("点击签署或上传已签章文件", .font(UIFont.PFSC_R(ofSize: 12)),.foreground(UIColor.brandMainColor)) let a: ASAttributedString = .init("请主申请人", .font(UIFont.PFSC_R(ofSize: 12)),.foreground(UIColor.subTextColor2))
subTitleLabel.attributed.text = a + aa let aa: ASAttributedString = .init("补充", .font(UIFont.PFSC_R(ofSize: 12)),.foreground(UIColor.brandMainColor))
let aaa: ASAttributedString = .init("信息以便进行后续签章", .font(UIFont.PFSC_R(ofSize: 12)),.foreground(UIColor.subTextColor2))
subTitleLabel.attributed.text = a + aa + aaa
} else if state == 1003 {
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 state == 1004 || state == 1005 || state == 1006 {
let a: ASAttributedString = .init("审核中,请您耐心等待~", .font(UIFont.PFSC_R(ofSize: 12)),.foreground(UIColor.subTextColor2))
subTitleLabel.attributed.text = a
} else {
let a: ASAttributedString = .init("您已完成签章,预祝您早日获批!", .font(UIFont.PFSC_R(ofSize: 12)),.foreground(UIColor.subTextColor2))
subTitleLabel.attributed.text = a
}
} else { } else {
let a: ASAttributedString = .init("请您尽快核对文本内容,如需修改,可进行在线编辑\n如内容无误,请主申请人", .font(UIFont.PFSC_R(ofSize: 12)),.foreground(UIColor.subTextColor2)) if state == 1000 || state == 1001 || state == 1002 || state == 1003{
let aa: ASAttributedString = .init("点击签署或上传已签署文件", .font(UIFont.PFSC_R(ofSize: 12)),.foreground(UIColor.brandMainColor)) let a: ASAttributedString = .init("请您尽快核对文本内容,如需修改,可进行在线编辑\n如内容无误,请主申请人", .font(UIFont.PFSC_R(ofSize: 12)),.foreground(UIColor.subTextColor2))
subTitleLabel.attributed.text = a + aa let aa: ASAttributedString = .init("点击签署或上传已签署文件", .font(UIFont.PFSC_R(ofSize: 12)),.foreground(UIColor.brandMainColor))
subTitleLabel.attributed.text = a + aa
} else if state == 1004 || state == 1005 || state == 1006 {
let a: ASAttributedString = .init("审核中,请您耐心等待~", .font(UIFont.PFSC_R(ofSize: 12)),.foreground(UIColor.subTextColor2))
subTitleLabel.attributed.text = a
} else {
let a: ASAttributedString = .init("您已完成签署,预祝您早日获批!", .font(UIFont.PFSC_R(ofSize: 12)),.foreground(UIColor.subTextColor2))
subTitleLabel.attributed.text = a
}
} }
} }
} }
......
...@@ -17,8 +17,8 @@ class YHGCSignatureAddViewModel: YHBaseViewModel { ...@@ -17,8 +17,8 @@ class YHGCSignatureAddViewModel: YHBaseViewModel {
func getBaseDataSource(_ isShowPrompt: Bool) -> [YHSectionWorkExperienceModel] { func getBaseDataSource(_ isShowPrompt: Bool) -> [YHSectionWorkExperienceModel] {
let item = YHWorkExperienceModel(id: .id1, isNeed: true, title: "档案所在单位", isUserKeyBoard: true, prompts: "请输入", message: position.archives_location, isShowPrompts: isShowPrompt, alertMessage:"请输入") let item = YHWorkExperienceModel(id: .id1, isNeed: true, title: "档案所在单位", isUserKeyBoard: true, prompts: "请输入", message: position.archives_location, isShowPrompts: isShowPrompt, alertMessage:"请输入")
let item1 = YHWorkExperienceModel(id: .id2, isNeed: true, title: "工作单位名称", isUserKeyBoard: true, prompts: "请选择", message: position.unit_name, isShowPrompts: isShowPrompt, alertMessage:"请选择") let item1 = YHWorkExperienceModel(id: .id2, isNeed: true, title: "单位名称", isUserKeyBoard: true, prompts: "请选择", message: position.unit_name, isShowPrompts: isShowPrompt, alertMessage:"请选择")
let item2 = YHWorkExperienceModel(id: .id3, isNeed: true, title: "工作单位地址", isUserKeyBoard: true, prompts: "请选择", message: position.unit_address, isShowPrompts: isShowPrompt, alertMessage:"请输入") let item2 = YHWorkExperienceModel(id: .id3, isNeed: true, title: "单位地址", isUserKeyBoard: true, prompts: "请选择", message: position.unit_address, isShowPrompts: isShowPrompt, alertMessage:"请输入")
let item3 = YHWorkExperienceModel(id: .id4, isNeed: true, title: "负责人电话", isUserKeyBoard: true, prompts: "请输入", message: position.phone, isShowPrompts: isShowPrompt, alertMessage:"请输入") let item3 = YHWorkExperienceModel(id: .id4, isNeed: true, title: "负责人电话", isUserKeyBoard: true, prompts: "请输入", message: position.phone, isShowPrompts: isShowPrompt, alertMessage:"请输入")
let item4 = YHWorkExperienceModel(id: .id5, isNeed: false, title: "公司邮箱", isUserKeyBoard: true, prompts: "请输入", message: position.email, isShowPrompts: isShowPrompt, alertMessage:"请输入") let item4 = YHWorkExperienceModel(id: .id5, isNeed: false, title: "公司邮箱", isUserKeyBoard: true, prompts: "请输入", message: position.email, isShowPrompts: isShowPrompt, alertMessage:"请输入")
......
...@@ -345,16 +345,18 @@ extension YHGCEducationDetailVC : UITableViewDelegate, UITableViewDataSource { ...@@ -345,16 +345,18 @@ extension YHGCEducationDetailVC : UITableViewDelegate, UITableViewDataSource {
} }
let vc = YHCollegeSearchViewController() let vc = YHCollegeSearchViewController()
vc.isShowSureButton = false
vc.orderId = self.orderId vc.orderId = self.orderId
vc.searchCollegeName = detailInfo.college vc.searchCollegeName = detailInfo.college
vc.selectBlock = { vc.selectBlock = {
[weak self] text in [weak self] text, id in
guard let self = self else { return } guard let self = self else { return }
if let text = text, !text.isEmpty { if let text = text, !text.isEmpty {
detailInfo.college = text detailInfo.college = text
} else { } else {
detailInfo.college = "" detailInfo.college = ""
} }
detailInfo.college_id = id
loadInfo() loadInfo()
saveInfoSilent() saveInfoSilent()
} }
...@@ -665,7 +667,8 @@ extension YHGCEducationDetailVC { ...@@ -665,7 +667,8 @@ extension YHGCEducationDetailVC {
guard var dict:[String:Any] = detailInfo.toDictionary() else { return } guard var dict:[String:Any] = detailInfo.toDictionary() else { return }
dict["order_id"] = self.orderId dict["order_id"] = self.orderId
dict["is_aboard_school"] = detailInfo.isSchoolInAboard() dict["is_aboard_school"] = detailInfo.isSchoolInAboard()
dict["college_id"] = detailInfo.college_id
self.educationRequest.saveEducationInfo(params: dict, isSilent: !isShowToast) { self.educationRequest.saveEducationInfo(params: dict, isSilent: !isShowToast) {
[weak self] success, error in [weak self] success, error in
guard let self = self else { return } guard let self = self else { return }
......
...@@ -232,8 +232,13 @@ extension YHGCIncomeRecordViewController { ...@@ -232,8 +232,13 @@ extension YHGCIncomeRecordViewController {
}) })
thirdSection.append(.consentForHKTravel("赴港同意书提供", detail + actionStr, "在职公司是否可以提供赴港同意书")) thirdSection.append(.consentForHKTravel("赴港同意书提供", detail + actionStr, "在职公司是否可以提供赴港同意书"))
if viewModel.mainModel.has_company_consent == 1 { if viewModel.mainModel.has_company_consent == 1 {
//let id = viewModel.mainModel.consent_work_id > 0 ? viewModel.mainModel.consent_work_id : nil let employments = viewModel.listModel.filter {
// thirdSection.append(.employmentVerification(viewModel.listModel, id)) $0.departure_time == "至今"
}
if viewModel.mainModel.consent_work_id == 0, employments.count == 1 {
viewModel.mainModel.consent_work_id = employments.first?.id ?? 0
consentWorkIdOK = true
}
thirdSection.append(.employmentVerification) thirdSection.append(.employmentVerification)
} else if viewModel.mainModel.has_company_consent == 2 { //选择否时才显示 } else if viewModel.mainModel.has_company_consent == 2 { //选择否时才显示
thirdSection.append(.questionSelect("人才中心是否可以提供赴港同意书")) thirdSection.append(.questionSelect("人才中心是否可以提供赴港同意书"))
...@@ -489,12 +494,14 @@ extension YHGCIncomeRecordViewController: UITableViewDelegate, UITableViewDataSo ...@@ -489,12 +494,14 @@ extension YHGCIncomeRecordViewController: UITableViewDelegate, UITableViewDataSo
} }
navigationController?.pushViewController(ctl, animated: true) navigationController?.pushViewController(ctl, animated: true)
} else if case .employmentVerification = tableRow { } else if case .employmentVerification = tableRow {
let employments = viewModel.listModel let employments = viewModel.listModel.filter {
$0.departure_time == "至今"
}
if employments.count == 0 {
YHHUD.flash(message: "请确认工作经验中您是否已填写在职公司")
return
}
let selectedId = viewModel.mainModel.consent_work_id > 0 ? viewModel.mainModel.consent_work_id : nil let selectedId = viewModel.mainModel.consent_work_id > 0 ? viewModel.mainModel.consent_work_id : nil
// guard employments.count > 1 else {
// return
// }
let companies = employments.compactMap { let companies = employments.compactMap {
$0.company_name $0.company_name
} }
...@@ -528,41 +535,44 @@ extension YHGCIncomeRecordViewController { ...@@ -528,41 +535,44 @@ extension YHGCIncomeRecordViewController {
} }
private func checkInput() -> Bool { private func checkInput() -> Bool {
var retValue = true
var updateRows: [IndexPath] = []
if viewModel.listModel.count == 0 { if viewModel.listModel.count == 0 {
hasWorkListOK = false hasWorkListOK = false
if let hasWorkListIndexPath = hasWorkListIndexPath, tableView.numberOfSections > hasWorkListIndexPath.section, tableView.numberOfRows(inSection: hasWorkListIndexPath.section) > hasWorkListIndexPath.row { if let hasWorkListIndexPath = hasWorkListIndexPath, tableView.numberOfSections > hasWorkListIndexPath.section, tableView.numberOfRows(inSection: hasWorkListIndexPath.section) > hasWorkListIndexPath.row {
tableView.reloadRows(at: [hasWorkListIndexPath], with: .none) updateRows.append(hasWorkListIndexPath)
} }
return false retValue = false
} }
hasWorkListOK = true
if viewModel.mainModel.has_company_consent == YHCheckboxSelectType.unknown.rawValue { if viewModel.mainModel.has_company_consent == YHCheckboxSelectType.unknown.rawValue {
hasCompanyConsentOK = false hasCompanyConsentOK = false
if let hasCompanyConsentIndexPath = hasCompanyConsentIndexPath, tableView.numberOfSections > hasCompanyConsentIndexPath.section, tableView.numberOfRows(inSection: hasCompanyConsentIndexPath.section) > hasCompanyConsentIndexPath.row { if let hasCompanyConsentIndexPath = hasCompanyConsentIndexPath, tableView.numberOfSections > hasCompanyConsentIndexPath.section, tableView.numberOfRows(inSection: hasCompanyConsentIndexPath.section) > hasCompanyConsentIndexPath.row {
tableView.reloadRows(at: [hasCompanyConsentIndexPath], with: .none) updateRows.append(hasCompanyConsentIndexPath)
} }
return false retValue = false
} }
hasCompanyConsentOK = true
if viewModel.mainModel.has_company_consent == YHCheckboxSelectType.true.rawValue, viewModel.mainModel.consent_work_id == 0 { if viewModel.mainModel.has_company_consent == YHCheckboxSelectType.true.rawValue, viewModel.mainModel.consent_work_id == 0 {
consentWorkIdOK = false consentWorkIdOK = false
if let consentWorkIdOKIndexPath = consentWorkIdOKIndexPath, tableView.numberOfSections > consentWorkIdOKIndexPath.section, tableView.numberOfRows(inSection: consentWorkIdOKIndexPath.section) > consentWorkIdOKIndexPath.row { if let consentWorkIdOKIndexPath = consentWorkIdOKIndexPath, tableView.numberOfSections > consentWorkIdOKIndexPath.section, tableView.numberOfRows(inSection: consentWorkIdOKIndexPath.section) > consentWorkIdOKIndexPath.row {
tableView.reloadRows(at: [consentWorkIdOKIndexPath], with: .none) updateRows.append(consentWorkIdOKIndexPath)
} }
return false retValue = false
} }
consentWorkIdOK = true
if viewModel.mainModel.has_company_consent == YHCheckboxSelectType.false.rawValue, viewModel.mainModel.has_center_consent == YHCheckboxSelectType.unknown.rawValue { if viewModel.mainModel.has_company_consent == YHCheckboxSelectType.false.rawValue, viewModel.mainModel.has_center_consent == YHCheckboxSelectType.unknown.rawValue {
hasCenterConsentOK = false hasCenterConsentOK = false
if let hasCenterConsentIndexPath = hasCenterConsentIndexPath, tableView.numberOfSections > hasCenterConsentIndexPath.section, tableView.numberOfRows(inSection: hasCenterConsentIndexPath.section) > hasCenterConsentIndexPath.row { if let hasCenterConsentIndexPath = hasCenterConsentIndexPath, tableView.numberOfSections > hasCenterConsentIndexPath.section, tableView.numberOfRows(inSection: hasCenterConsentIndexPath.section) > hasCenterConsentIndexPath.row {
tableView.reloadRows(at: [hasCenterConsentIndexPath], with: .none) updateRows.append(hasCenterConsentIndexPath)
} }
return false retValue = false
}
if updateRows.count > 0 {
tableView.reloadRows(at: updateRows, with: .none)
hasWorkListOK = true
hasCompanyConsentOK = true
consentWorkIdOK = true
hasCenterConsentOK = true
} }
hasCenterConsentOK = true return retValue
return true
} }
private func requestData(isNeedLoading: Bool = false, lastSelectedIncomeOver100: Int? = nil) { private func requestData(isNeedLoading: Bool = false, lastSelectedIncomeOver100: Int? = nil) {
......
...@@ -93,25 +93,16 @@ extension YHIncomeDateTillNowCell { ...@@ -93,25 +93,16 @@ extension YHIncomeDateTillNowCell {
private func updateFailLabel(_ needShowFailButton: Bool) { private func updateFailLabel(_ needShowFailButton: Bool) {
if needShowFailButton { if needShowFailButton {
infoFailLabel.isHidden = false infoFailLabel.isHidden = false
infoDetailLabel.snp.remakeConstraints { make in
make.top.equalToSuperview().offset(16)
make.left.equalToSuperview().offset(147)
make.right.lessThanOrEqualTo(tillNowButton.snp.left).offset(-18)
}
infoFailLabel.snp.remakeConstraints { make in infoFailLabel.snp.remakeConstraints { make in
make.top.equalTo(infoDetailLabel.snp.bottom).offset(6) make.top.equalTo(infoTitleLabel.snp.bottom).offset(6)
make.left.equalToSuperview().offset(18) make.left.equalToSuperview().offset(18)
make.right.lessThanOrEqualToSuperview().offset(-18) make.right.lessThanOrEqualToSuperview().offset(-18)
make.bottom.equalToSuperview().offset(-16) make.bottom.equalToSuperview().offset(-16)
} }
} else { } else {
infoFailLabel.isHidden = true infoFailLabel.isHidden = true
infoDetailLabel.snp.remakeConstraints { make in
make.top.equalToSuperview().offset(16)
make.bottom.equalToSuperview().offset(-16)
make.left.equalToSuperview().offset(147)
make.right.lessThanOrEqualTo(tillNowButton.snp.left).offset(-18)
}
infoFailLabel.snp.remakeConstraints { make in infoFailLabel.snp.remakeConstraints { make in
make.left.equalToSuperview().offset(18) make.left.equalToSuperview().offset(18)
make.right.lessThanOrEqualToSuperview().offset(-18) make.right.lessThanOrEqualToSuperview().offset(-18)
...@@ -137,8 +128,9 @@ extension YHIncomeDateTillNowCell { ...@@ -137,8 +128,9 @@ extension YHIncomeDateTillNowCell {
} }
infoDetailLabel.snp.remakeConstraints { make in infoDetailLabel.snp.remakeConstraints { make in
make.top.equalToSuperview().offset(16) make.top.greaterThanOrEqualToSuperview().offset(16)
make.bottom.equalToSuperview().offset(-16) make.bottom.lessThanOrEqualToSuperview().offset(-16)
make.centerY.equalToSuperview()
make.left.equalToSuperview().offset(147) make.left.equalToSuperview().offset(147)
} }
...@@ -152,8 +144,9 @@ extension YHIncomeDateTillNowCell { ...@@ -152,8 +144,9 @@ extension YHIncomeDateTillNowCell {
make.height.equalTo(30) make.height.equalTo(30)
} }
infoDetailLabel.snp.remakeConstraints { make in infoDetailLabel.snp.remakeConstraints { make in
make.top.equalToSuperview().offset(16) make.top.greaterThanOrEqualToSuperview().offset(16)
make.bottom.equalToSuperview().offset(-16) make.bottom.lessThanOrEqualToSuperview().offset(-16)
make.centerY.equalToSuperview()
make.left.equalToSuperview().offset(147) make.left.equalToSuperview().offset(147)
make.right.lessThanOrEqualTo(tillNowButton.snp.left).offset(-18) make.right.lessThanOrEqualTo(tillNowButton.snp.left).offset(-18)
} }
...@@ -213,8 +206,9 @@ extension YHIncomeDateTillNowCell { ...@@ -213,8 +206,9 @@ extension YHIncomeDateTillNowCell {
} }
infoDetailLabel.snp.makeConstraints { make in infoDetailLabel.snp.makeConstraints { make in
make.top.equalToSuperview().offset(16) make.top.greaterThanOrEqualToSuperview().offset(16)
make.bottom.equalToSuperview().offset(-16) make.bottom.lessThanOrEqualToSuperview().offset(-16)
make.centerY.equalToSuperview()
make.left.equalToSuperview().offset(147) make.left.equalToSuperview().offset(147)
make.right.lessThanOrEqualTo(tillNowButton.snp.left).offset(-18) make.right.lessThanOrEqualTo(tillNowButton.snp.left).offset(-18)
} }
......
...@@ -24,7 +24,6 @@ class YHIncomeInfoEditCell: YHResignDocumentCell { ...@@ -24,7 +24,6 @@ class YHIncomeInfoEditCell: YHResignDocumentCell {
let label = UILabel() let label = UILabel()
label.font = .PFSC_R(ofSize: 14) label.font = .PFSC_R(ofSize: 14)
label.textColor = UIColor.mainTextColor label.textColor = UIColor.mainTextColor
label.text = "收入来源公司"
return label return label
}() }()
...@@ -61,7 +60,7 @@ class YHIncomeInfoEditCell: YHResignDocumentCell { ...@@ -61,7 +60,7 @@ class YHIncomeInfoEditCell: YHResignDocumentCell {
fatalError("init(coder:) has not been implemented") fatalError("init(coder:) has not been implemented")
} }
func setupCellInfo(title: String, detail: String?, placeholder: String = "请输入", showBottomLine: Bool = true, needShowFailButton: Bool) { func setupCellInfo(title: String, detail: String?, placeholder: String = "请输入", showBottomLine: Bool = true, needShowFailButton: Bool, cellType: YHResignRoundCellType = .mid) {
infoTitleLabel.text = title infoTitleLabel.text = title
inputTextField.text = detail inputTextField.text = detail
inputTextField.attributedPlaceholder = NSAttributedString( inputTextField.attributedPlaceholder = NSAttributedString(
...@@ -73,6 +72,7 @@ class YHIncomeInfoEditCell: YHResignDocumentCell { ...@@ -73,6 +72,7 @@ class YHIncomeInfoEditCell: YHResignDocumentCell {
) )
bottomLineView.isHidden = !showBottomLine bottomLineView.isHidden = !showBottomLine
updateFailLabel(needShowFailButton) updateFailLabel(needShowFailButton)
updateCellCorner(cellType)
} }
} }
...@@ -80,25 +80,16 @@ extension YHIncomeInfoEditCell { ...@@ -80,25 +80,16 @@ extension YHIncomeInfoEditCell {
private func updateFailLabel(_ needShowFailButton: Bool) { private func updateFailLabel(_ needShowFailButton: Bool) {
if needShowFailButton { if needShowFailButton {
infoFailLabel.isHidden = false infoFailLabel.isHidden = false
inputTextField.snp.remakeConstraints { make in
make.top.equalToSuperview().offset(16)
make.left.equalToSuperview().offset(147)
make.right.lessThanOrEqualToSuperview().offset(-18)
}
infoFailLabel.snp.remakeConstraints { make in infoFailLabel.snp.remakeConstraints { make in
make.top.equalTo(inputTextField.snp.bottom).offset(6) make.top.equalTo(infoTitleLabel.snp.bottom).offset(6)
make.left.equalToSuperview().offset(18) make.left.equalToSuperview().offset(18)
make.right.lessThanOrEqualToSuperview().offset(-18) make.right.lessThanOrEqualToSuperview().offset(-18)
make.bottom.equalToSuperview().offset(-16) make.bottom.equalToSuperview().offset(-16)
} }
} else { } else {
infoFailLabel.isHidden = true infoFailLabel.isHidden = true
inputTextField.snp.remakeConstraints { make in
make.top.equalToSuperview().offset(16)
make.bottom.equalToSuperview().offset(-16)
make.left.equalToSuperview().offset(147)
make.right.lessThanOrEqualToSuperview().offset(-18)
}
infoFailLabel.snp.remakeConstraints { make in infoFailLabel.snp.remakeConstraints { make in
make.left.equalToSuperview().offset(18) make.left.equalToSuperview().offset(18)
make.right.lessThanOrEqualToSuperview().offset(-18) make.right.lessThanOrEqualToSuperview().offset(-18)
...@@ -126,14 +117,17 @@ extension YHIncomeInfoEditCell { ...@@ -126,14 +117,17 @@ extension YHIncomeInfoEditCell {
} }
infoTitleLabel.snp.makeConstraints { make in infoTitleLabel.snp.makeConstraints { make in
make.top.greaterThanOrEqualToSuperview().offset(16)
make.bottom.lessThanOrEqualToSuperview().offset(-16)
make.centerY.equalToSuperview() make.centerY.equalToSuperview()
make.left.equalTo(dotIcon.snp.right).offset(2) make.left.equalTo(dotIcon.snp.right).offset(2)
} }
inputTextField.snp.makeConstraints { make in inputTextField.snp.makeConstraints { make in
make.top.equalToSuperview().offset(16) make.top.greaterThanOrEqualToSuperview()
make.bottom.equalToSuperview().offset(-16) make.bottom.lessThanOrEqualToSuperview()
make.left.equalToSuperview().offset(147) make.left.equalToSuperview().offset(147)
make.centerY.equalToSuperview()
make.right.lessThanOrEqualToSuperview().offset(-18) make.right.lessThanOrEqualToSuperview().offset(-18)
} }
......
...@@ -63,12 +63,13 @@ class YHIncomeInfoSelectCell: YHResignDocumentCell { ...@@ -63,12 +63,13 @@ class YHIncomeInfoSelectCell: YHResignDocumentCell {
fatalError("init(coder:) has not been implemented") fatalError("init(coder:) has not been implemented")
} }
func setupCellInfo(title: String, detail: String?, placeholder: String = "请选择", showBottomLine: Bool = true, needShowFailButton: Bool) { func setupCellInfo(title: String, detail: String?, placeholder: String = "请选择", showBottomLine: Bool = true, needShowFailButton: Bool, cellType: YHResignRoundCellType = .mid) {
infoTitleLabel.text = title infoTitleLabel.text = title
updateContentState(detail: detail, placeholder: placeholder) updateContentState(detail: detail, placeholder: placeholder)
bottomLineView.isHidden = !showBottomLine bottomLineView.isHidden = !showBottomLine
infoFailLabel.text = placeholder infoFailLabel.text = placeholder
updateFailLabel(needShowFailButton) updateFailLabel(needShowFailButton)
updateCellCorner(cellType)
} }
} }
...@@ -76,25 +77,16 @@ extension YHIncomeInfoSelectCell { ...@@ -76,25 +77,16 @@ extension YHIncomeInfoSelectCell {
private func updateFailLabel(_ needShowFailButton: Bool) { private func updateFailLabel(_ needShowFailButton: Bool) {
if needShowFailButton { if needShowFailButton {
infoFailLabel.isHidden = false infoFailLabel.isHidden = false
infoDetailLabel.snp.remakeConstraints { make in
make.top.equalToSuperview().offset(16)
make.left.equalToSuperview().offset(147)
make.right.lessThanOrEqualTo(rightArrowIcon.snp.left).offset(-18)
}
infoFailLabel.snp.remakeConstraints { make in infoFailLabel.snp.remakeConstraints { make in
make.top.equalTo(infoDetailLabel.snp.bottom).offset(6) make.top.equalTo(infoTitleLabel.snp.bottom).offset(6)
make.left.equalToSuperview().offset(18) make.left.equalToSuperview().offset(18)
make.right.lessThanOrEqualToSuperview().offset(-18) make.right.lessThanOrEqualToSuperview().offset(-18)
make.bottom.equalToSuperview().offset(-16) make.bottom.equalToSuperview().offset(-16)
} }
} else { } else {
infoFailLabel.isHidden = true infoFailLabel.isHidden = true
infoDetailLabel.snp.remakeConstraints { make in
make.top.equalToSuperview().offset(16)
make.bottom.equalToSuperview().offset(-16)
make.left.equalToSuperview().offset(147)
make.right.lessThanOrEqualTo(rightArrowIcon.snp.left).offset(-18)
}
infoFailLabel.snp.remakeConstraints { make in infoFailLabel.snp.remakeConstraints { make in
make.left.equalToSuperview().offset(18) make.left.equalToSuperview().offset(18)
make.right.lessThanOrEqualToSuperview().offset(-18) make.right.lessThanOrEqualToSuperview().offset(-18)
...@@ -148,8 +140,9 @@ extension YHIncomeInfoSelectCell { ...@@ -148,8 +140,9 @@ extension YHIncomeInfoSelectCell {
} }
infoDetailLabel.snp.makeConstraints { make in infoDetailLabel.snp.makeConstraints { make in
make.top.equalToSuperview().offset(16) make.top.greaterThanOrEqualToSuperview().offset(16)
make.bottom.equalToSuperview().offset(-16) make.bottom.lessThanOrEqualToSuperview().offset(-16)
make.centerY.equalToSuperview()
make.left.equalToSuperview().offset(147) make.left.equalToSuperview().offset(147)
make.right.lessThanOrEqualTo(rightArrowIcon.snp.left).offset(-18) make.right.lessThanOrEqualTo(rightArrowIcon.snp.left).offset(-18)
} }
......
...@@ -186,6 +186,12 @@ class YHGCMainApplicantInformationViewModel: YHBaseViewModel { ...@@ -186,6 +186,12 @@ class YHGCMainApplicantInformationViewModel: YHBaseViewModel {
} }
} else if nationality.contains("中国") && is_live_oversea_year == 1 { } else if nationality.contains("中国") && is_live_oversea_year == 1 {
return [section, section2] return [section, section2]
} else if nationality.contains("中国") && !addressCountry.contains("中国") {
if mainModel.is_handled == 1 {
return [section, section1]
} else {
return [section]
}
} else { } else {
return [section2] return [section2]
} }
...@@ -197,8 +203,10 @@ class YHGCMainApplicantInformationViewModel: YHBaseViewModel { ...@@ -197,8 +203,10 @@ class YHGCMainApplicantInformationViewModel: YHBaseViewModel {
case .id1: case .id1:
mainModel.nationality = item.message ?? "" mainModel.nationality = item.message ?? ""
mainModel.is_live_oversea_year = 0
case .id2: case .id2:
mainModel.address.country = item.message ?? "" mainModel.address.country = item.message ?? ""
mainModel.is_live_oversea_year = 0
case .id3: case .id3:
mainModel.address.area = item.value ?? [] mainModel.address.area = item.value ?? []
case .id4: case .id4:
......
...@@ -80,10 +80,6 @@ class YHGCWorkExperienceListViewController: YHBaseViewController { ...@@ -80,10 +80,6 @@ class YHGCWorkExperienceListViewController: YHBaseViewController {
bottom.nextblock = { [weak self] in bottom.nextblock = { [weak self] in
guard let self = self else { return } guard let self = self else { return }
guard let dataSource = dataSource else { return } guard let dataSource = dataSource else { return }
if dataSource.count == 0 {
YHHUD.flash(message: "至少需要有一条工作经验")
return
}
for item in dataSource { for item in dataSource {
if item.vacant_num ?? 0 > 0 { if item.vacant_num ?? 0 > 0 {
showPrompt = true showPrompt = true
...@@ -133,14 +129,6 @@ class YHGCWorkExperienceListViewController: YHBaseViewController { ...@@ -133,14 +129,6 @@ class YHGCWorkExperienceListViewController: YHBaseViewController {
extension YHGCWorkExperienceListViewController: UITableViewDelegate, UITableViewDataSource { extension YHGCWorkExperienceListViewController: UITableViewDelegate, UITableViewDataSource {
func tableView(_ tableView: UITableView, numberOfRowsInSection section: Int) -> Int { func tableView(_ tableView: UITableView, numberOfRowsInSection section: Int) -> Int {
// var count = 1
// if self.viewModel.mainModel.has_work_experience == 1 {
// count = count + 1
// }
// if self.viewModel.mainModel.is_consent_required == 1 {
// count = count + 1
// }
// return count
return 4 return 4
} }
...@@ -199,8 +187,7 @@ extension YHGCWorkExperienceListViewController: UITableViewDelegate, UITableView ...@@ -199,8 +187,7 @@ extension YHGCWorkExperienceListViewController: UITableViewDelegate, UITableView
return cell return cell
} else if indexPath.row == 2 { } else if indexPath.row == 2 {
let cell = tableView.dequeueReusableCell(withClass: YHGCWorkExperienceListReasonTableViewCell.self) let cell = tableView.dequeueReusableCell(withClass: YHGCWorkExperienceListReasonTableViewCell.self)
if viewModel.mainModel.has_work_time_overlap == 1 { if viewModel.mainModel.has_work_time_overlap == 1 && self.viewModel.mainModel.has_work_experience == 1 { cell.isHidden = false
cell.isHidden = false
} else { } else {
cell.isHidden = true cell.isHidden = true
} }
...@@ -247,7 +234,8 @@ extension YHGCWorkExperienceListViewController: UITableViewDelegate, UITableView ...@@ -247,7 +234,8 @@ extension YHGCWorkExperienceListViewController: UITableViewDelegate, UITableView
} }
if indexPath.row == 2 { if indexPath.row == 2 {
if viewModel.mainModel.has_work_time_overlap == 1 {
if viewModel.mainModel.has_work_time_overlap == 1 && self.viewModel.mainModel.has_work_experience == 1 {
return UITableView.automaticDimension return UITableView.automaticDimension
} else { } else {
return 0 return 0
...@@ -306,8 +294,6 @@ extension YHGCWorkExperienceListViewController: UITableViewDelegate, UITableView ...@@ -306,8 +294,6 @@ extension YHGCWorkExperienceListViewController: UITableViewDelegate, UITableView
} else { } else {
return 0 return 0
} }
} }
} }
...@@ -18,9 +18,9 @@ class YHGCWorkModel: SmartCodable { ...@@ -18,9 +18,9 @@ class YHGCWorkModel: SmartCodable {
var work_time_empty_remark: String = "" //空窗期 var work_time_empty_remark: String = "" //空窗期
var agree_work_doc_url: String = "" var agree_work_doc_url: String = ""
var has_company_consent: Int = 0 //高才使用 在职公司是否可以提供赴港同意书 0 未知 1 是 2 否 var has_company_consent: Int = 2 //高才使用 在职公司是否可以提供赴港同意书 0 未知 1 是 2 否
var consent_work_id: Int = 0 //高才使用 可以提供赴港同意书的工作经历id var consent_work_id: Int = 0 //高才使用 可以提供赴港同意书的工作经历id
var has_center_consent: Int = 0 //高才使用 人才中心是否可以提供赴港同意书 0 未知 1 是 2 否 var has_center_consent: Int = 1 //高才使用 人才中心是否可以提供赴港同意书 0 未知 1 是 2 否
var why_work_time_overlap: String = "" //高才使用 关于工作时间重叠的说明 var why_work_time_overlap: String = "" //高才使用 关于工作时间重叠的说明
var has_work_experience: Int = 0 //高BC使用 是否有工作经历 0.未知 1.是 2.否 var has_work_experience: Int = 0 //高BC使用 是否有工作经历 0.未知 1.是 2.否
var is_consent_required: Int = 0 //高才使用 是否必须提供赴港同意书 0-否 1-是 var is_consent_required: Int = 0 //高才使用 是否必须提供赴港同意书 0-否 1-是
......
...@@ -26,6 +26,10 @@ class YHGCWorkListHasDocTableViewCell: UITableViewCell { ...@@ -26,6 +26,10 @@ class YHGCWorkListHasDocTableViewCell: UITableViewCell {
} }
} }
var selectDataSource: [ASAttributedString]? var selectDataSource: [ASAttributedString]?
lazy var previewFileTool:YHFilePreviewTool = {
let tool = YHFilePreviewTool(targetVC: UIViewController.current)
return tool
}()
override func awakeFromNib() { override func awakeFromNib() {
super.awakeFromNib() super.awakeFromNib()
// Initialization code // Initialization code
...@@ -93,6 +97,12 @@ class YHGCWorkListHasDocTableViewCell: UITableViewCell { ...@@ -93,6 +97,12 @@ class YHGCWorkListHasDocTableViewCell: UITableViewCell {
let a: ASAttributedString = .init("备注:赴港同意书为目前在职公司盖章提供,若目前未就职于任何公司,则由档案所在地人才中心盖章提供,", .font(UIFont.PFSC_R(ofSize: 13)),.foreground(UIColor(hex: 0x8893a2))) let a: ASAttributedString = .init("备注:赴港同意书为目前在职公司盖章提供,若目前未就职于任何公司,则由档案所在地人才中心盖章提供,", .font(UIFont.PFSC_R(ofSize: 13)),.foreground(UIColor(hex: 0x8893a2)))
let b: ASAttributedString = .init("查看示例模板", .font(UIFont.PFSC_R(ofSize: 13)),.foreground(UIColor.brandMainColor),.underline(.single),.action { let b: ASAttributedString = .init("查看示例模板", .font(UIFont.PFSC_R(ofSize: 13)),.foreground(UIColor.brandMainColor),.underline(.single),.action {
//跳转模版 //跳转模版
let viewModel = YHBaseViewModel()
viewModel.getPublicImageUrl(self.url) { success, error in
if let success = success {
self.previewFileTool.openXLSXRemoteFile(urlString: success, fileName:"")
}
}
}) })
label.attributed.text = a + b label.attributed.text = a + b
return label return label
......
...@@ -168,6 +168,8 @@ class YHGCWorkItemListViewModel: YHBaseViewModel { ...@@ -168,6 +168,8 @@ class YHGCWorkItemListViewModel: YHBaseViewModel {
let value = model.value?.first?.int ?? 0 let value = model.value?.first?.int ?? 0
if value == 0 { if value == 0 {
mainModel.has_work_experience = 2 mainModel.has_work_experience = 2
mainModel.has_company_consent = 2
mainModel.has_center_consent = 1
} else if value == 1 { } else if value == 1 {
mainModel.has_work_experience = 1 mainModel.has_work_experience = 1
} }
......
...@@ -19,8 +19,20 @@ class YHJsApi: NSObject { ...@@ -19,8 +19,20 @@ class YHJsApi: NSObject {
extension YHJsApi { extension YHJsApi {
// 返回tab服务页
// 30、跳转到APP底部的服务Tab-再推出服务进度页面
@objc func goServiceProgressPage(_ tag : Any) {
DispatchQueue.main.async {
UIViewController.current?.navigationController?.popToRootViewController(animated: false)
goTabBarBy(tabType: .service)
DispatchQueue.main.asyncAfter(deadline: .now() + 0.25) {
NotificationCenter.default.post(name: YhConstant.YhNotification.didJumpToServiceProgressNotification, object: nil)
}
}
}
// 29、返回tab服务页
@objc func goAppTab(_ tag : Any) { @objc func goAppTab(_ tag : Any) {
DispatchQueue.main.async { DispatchQueue.main.async {
if let tag = tag as? String { if let tag = tag as? String {
......
...@@ -213,4 +213,52 @@ extension UIDevice { ...@@ -213,4 +213,52 @@ extension UIDevice {
static func iPhoneVersion() -> String { static func iPhoneVersion() -> String {
return "iOS" + (Device.current.systemVersion ?? "") return "iOS" + (Device.current.systemVersion ?? "")
} }
//判断 网络 是否设置了代理
public class func isUsedProxy() -> Bool {
guard let proxy = CFNetworkCopySystemProxySettings()?.takeUnretainedValue() else {
return false
}
guard let dict = proxy as? [String: Any] else {
return false
}
_ = dict.isEmpty // 有时候未设置代理dictionary也不为空,而是一个空字典
guard let HTTPProxy = dict["HTTPProxy"] as? String else {
return false
}
if(HTTPProxy.count > 0) {
return true
}
return false
}
//判断手机是否越狱
public class func isJailbroken() -> Bool {
let fileManager = FileManager.default
let pathsToCheck = [
"/Applications/Cydia.app",
"/private/var/lib/apt/",
"/private/var/lib/cydia/",
"/private/var/stash/",
"/private/var/tmp/cydia.log",
"/private/var/mobile/Library/Cydia/",
"/private/var/mobile/Library/MobileSubstrate/DynamicLibraries/",
"/private/var/mobile/bin/bash",
"/private/var/mobile/bin/sh",
"/private/var/mobile/bin/zsh",
"/private/var/mobile/usr/sbin/sshd",
"/private/var/mobile/usr/bin/sshd",
"/private/var/mobile/Media/Cydia",
"/private/var/root/Documents/Cydia",
"/private/var/tmp/cydia.log",
"/private/var/lib/dpkg/"
]
for path in pathsToCheck {
if fileManager.fileExists(atPath: path) {
return true
}
}
return false
}
} }
...@@ -406,5 +406,7 @@ extension YhConstant { ...@@ -406,5 +406,7 @@ extension YhConstant {
//关闭直播间弹出的分享界面 //关闭直播间弹出的分享界面
public static let closeShareUIInLiveRoomNotifiction = Notification.Name(rawValue: "com.yinhe.app.close.share.ui") public static let closeShareUIInLiveRoomNotifiction = Notification.Name(rawValue: "com.yinhe.app.close.share.ui")
// 跳转到服务Tab 中的 服务进度
public static let didJumpToServiceProgressNotification = Notification.Name(rawValue: "com.yinhe.service.tab.serviceprogress")
} }
} }
...@@ -5,12 +5,12 @@ ...@@ -5,12 +5,12 @@
"scale" : "1x" "scale" : "1x"
}, },
{ {
"filename" : "service_center_In_section@2x.png", "filename" : "Group 2033196223@2x.png",
"idiom" : "universal", "idiom" : "universal",
"scale" : "2x" "scale" : "2x"
}, },
{ {
"filename" : "service_center_In_section@3x.png", "filename" : "Group 2033196223@3x.png",
"idiom" : "universal", "idiom" : "universal",
"scale" : "3x" "scale" : "3x"
} }
......
...@@ -5,12 +5,12 @@ ...@@ -5,12 +5,12 @@
"scale" : "1x" "scale" : "1x"
}, },
{ {
"filename" : "service_order_guideline_one@2x.png", "filename" : "Frame 2033196309@2x.png",
"idiom" : "universal", "idiom" : "universal",
"scale" : "2x" "scale" : "2x"
}, },
{ {
"filename" : "service_order_guideline_one@3x.png", "filename" : "Frame 2033196309@3x.png",
"idiom" : "universal", "idiom" : "universal",
"scale" : "3x" "scale" : "3x"
} }
......
...@@ -5,12 +5,12 @@ ...@@ -5,12 +5,12 @@
"scale" : "1x" "scale" : "1x"
}, },
{ {
"filename" : "3@2x.png", "filename" : "Frame 2033196309@2x.png",
"idiom" : "universal", "idiom" : "universal",
"scale" : "2x" "scale" : "2x"
}, },
{ {
"filename" : "3@3x.png", "filename" : "Frame 2033196309@3x.png",
"idiom" : "universal", "idiom" : "universal",
"scale" : "3x" "scale" : "3x"
} }
......
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