Commit 13ca66bb authored by Steven杜宇's avatar Steven杜宇

Merge branch 'GZL' into 'develop'

Gzl

See merge request !20
parents 781ca816 abbb77e2
......@@ -42,9 +42,10 @@ platform :ios do
txIM = "develop-desk-tx"
gift = "gift_push"
Im_618 = "develop-tx-618"
GZL = "GZL"
#打包正使用的分支
myPack_branch = Im_618
myPack_branch = GZL
# 打adhoc包 执行命令 fastlane galaxyTest
......
......@@ -3,7 +3,7 @@
archiveVersion = 1;
classes = {
};
objectVersion = 60;
objectVersion = 70;
objects = {
/* Begin PBXBuildFile section */
......@@ -8608,7 +8608,7 @@
CODE_SIGN_ENTITLEMENTS = yinheReplayExt/yinheReplayExt.entitlements;
CODE_SIGN_IDENTITY = "Apple Development";
CODE_SIGN_STYLE = Automatic;
CURRENT_PROJECT_VERSION = 2;
CURRENT_PROJECT_VERSION = 10;
DEVELOPMENT_TEAM = RXHYW88XR7;
GENERATE_INFOPLIST_FILE = YES;
INFOPLIST_FILE = yinheReplayExt/Info.plist;
......@@ -8620,7 +8620,7 @@
"@executable_path/Frameworks",
"@executable_path/../../Frameworks",
);
MARKETING_VERSION = 2.2.7;
MARKETING_VERSION = 2.2.8;
PRODUCT_BUNDLE_IDENTIFIER = com.intelligence.galaxy.yinheReplayExt;
PRODUCT_NAME = "$(TARGET_NAME)";
PROVISIONING_PROFILE_SPECIFIER = "";
......@@ -8638,7 +8638,7 @@
CODE_SIGN_ENTITLEMENTS = yinheReplayExt/yinheReplayExt.entitlements;
CODE_SIGN_IDENTITY = "Apple Development";
CODE_SIGN_STYLE = Automatic;
CURRENT_PROJECT_VERSION = 2;
CURRENT_PROJECT_VERSION = 10;
DEVELOPMENT_TEAM = RXHYW88XR7;
GENERATE_INFOPLIST_FILE = YES;
INFOPLIST_FILE = yinheReplayExt/Info.plist;
......@@ -8650,7 +8650,7 @@
"@executable_path/Frameworks",
"@executable_path/../../Frameworks",
);
MARKETING_VERSION = 2.2.7;
MARKETING_VERSION = 2.2.8;
PRODUCT_BUNDLE_IDENTIFIER = com.intelligence.galaxy.yinheReplayExt;
PRODUCT_NAME = "$(TARGET_NAME)";
PROVISIONING_PROFILE_SPECIFIER = "";
......@@ -8668,7 +8668,7 @@
CODE_SIGN_ENTITLEMENTS = yinheReplayExt/yinheReplayExt.entitlements;
CODE_SIGN_IDENTITY = "Apple Development";
CODE_SIGN_STYLE = Automatic;
CURRENT_PROJECT_VERSION = 2;
CURRENT_PROJECT_VERSION = 10;
DEVELOPMENT_TEAM = RXHYW88XR7;
GENERATE_INFOPLIST_FILE = YES;
INFOPLIST_FILE = yinheReplayExt/Info.plist;
......@@ -8680,7 +8680,7 @@
"@executable_path/Frameworks",
"@executable_path/../../Frameworks",
);
MARKETING_VERSION = 2.2.7;
MARKETING_VERSION = 2.2.8;
PRODUCT_BUNDLE_IDENTIFIER = com.intelligence.galaxy.yinheReplayExt;
PRODUCT_NAME = "$(TARGET_NAME)";
PROVISIONING_PROFILE_SPECIFIER = "";
......@@ -8698,7 +8698,7 @@
CODE_SIGN_ENTITLEMENTS = yinheReplayExt/yinheReplayExt.entitlements;
CODE_SIGN_IDENTITY = "Apple Development";
CODE_SIGN_STYLE = Automatic;
CURRENT_PROJECT_VERSION = 2;
CURRENT_PROJECT_VERSION = 10;
DEVELOPMENT_TEAM = RXHYW88XR7;
GENERATE_INFOPLIST_FILE = YES;
INFOPLIST_FILE = yinheReplayExt/Info.plist;
......@@ -8710,7 +8710,7 @@
"@executable_path/Frameworks",
"@executable_path/../../Frameworks",
);
MARKETING_VERSION = 2.2.7;
MARKETING_VERSION = 2.2.8;
PRODUCT_BUNDLE_IDENTIFIER = com.intelligence.galaxy.yinheReplayExt;
PRODUCT_NAME = "$(TARGET_NAME)";
PROVISIONING_PROFILE_SPECIFIER = "";
......@@ -8787,7 +8787,7 @@
CODE_SIGN_ENTITLEMENTS = galaxy/galaxyTestEnv.entitlements;
CODE_SIGN_IDENTITY = "Apple Development";
CODE_SIGN_STYLE = Automatic;
CURRENT_PROJECT_VERSION = 2;
CURRENT_PROJECT_VERSION = 10;
DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
DEVELOPMENT_TEAM = RXHYW88XR7;
ENABLE_USER_SCRIPT_SANDBOXING = NO;
......@@ -8815,7 +8815,7 @@
"$(inherited)",
"@executable_path/Frameworks",
);
MARKETING_VERSION = 2.2.7;
MARKETING_VERSION = 2.2.8;
PRODUCT_BUNDLE_IDENTIFIER = com.intelligence.galaxy;
PRODUCT_NAME = "$(TARGET_NAME)";
PROVISIONING_PROFILE_SPECIFIER = "";
......@@ -8936,7 +8936,7 @@
CODE_SIGN_ENTITLEMENTS = galaxy/galaxy.entitlements;
CODE_SIGN_IDENTITY = "Apple Development";
CODE_SIGN_STYLE = Automatic;
CURRENT_PROJECT_VERSION = 2;
CURRENT_PROJECT_VERSION = 10;
DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
DEVELOPMENT_TEAM = RXHYW88XR7;
ENABLE_USER_SCRIPT_SANDBOXING = NO;
......@@ -8964,7 +8964,7 @@
"$(inherited)",
"@executable_path/Frameworks",
);
MARKETING_VERSION = 2.2.7;
MARKETING_VERSION = 2.2.8;
PRODUCT_BUNDLE_IDENTIFIER = com.intelligence.galaxy;
PRODUCT_NAME = "$(TARGET_NAME)";
PROVISIONING_PROFILE_SPECIFIER = "";
......@@ -9147,7 +9147,7 @@
CODE_SIGN_ENTITLEMENTS = galaxy/galaxyDebug.entitlements;
CODE_SIGN_IDENTITY = "Apple Development";
CODE_SIGN_STYLE = Automatic;
CURRENT_PROJECT_VERSION = 2;
CURRENT_PROJECT_VERSION = 10;
DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
DEVELOPMENT_TEAM = RXHYW88XR7;
ENABLE_USER_SCRIPT_SANDBOXING = NO;
......@@ -9175,7 +9175,7 @@
"$(inherited)",
"@executable_path/Frameworks",
);
MARKETING_VERSION = 2.2.7;
MARKETING_VERSION = 2.2.8;
PRODUCT_BUNDLE_IDENTIFIER = com.intelligence.galaxy;
PRODUCT_NAME = "$(TARGET_NAME)";
PROVISIONING_PROFILE_SPECIFIER = "";
......@@ -9198,7 +9198,7 @@
CODE_SIGN_ENTITLEMENTS = galaxy/galaxy.entitlements;
CODE_SIGN_IDENTITY = "Apple Development";
CODE_SIGN_STYLE = Automatic;
CURRENT_PROJECT_VERSION = 2;
CURRENT_PROJECT_VERSION = 10;
DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
DEVELOPMENT_TEAM = RXHYW88XR7;
ENABLE_USER_SCRIPT_SANDBOXING = NO;
......@@ -9226,7 +9226,7 @@
"$(inherited)",
"@executable_path/Frameworks",
);
MARKETING_VERSION = 2.2.7;
MARKETING_VERSION = 2.2.8;
PRODUCT_BUNDLE_IDENTIFIER = com.intelligence.galaxy;
PRODUCT_NAME = "$(TARGET_NAME)";
PROVISIONING_PROFILE_SPECIFIER = "";
......
......@@ -202,6 +202,77 @@ class AppDelegate: UIResponder, UIApplicationDelegate, WXApiDelegate {
}
}
}
} else if iType == 7 {
/*
店铺页 https://test-businessh5.galaxy-immi.com/pre-sale/business
店单页 https://test-businessh5.galaxy-immi.com/pre-sale/store
*/
// 生意星店铺页面
DispatchQueue.main.asyncAfter(deadline: .now() + 0.25) {
if !YHLoginManager.shared.isLogin() {
printLog("需要登录")
return
}
var url = YHBaseUrlManager.shared.curBusinessStarUrl()
if YHLoginManager.shared.isLogin() {
let token = YHLoginManager.shared.h5Token
let urlHasParam = String.hasQueryParameters(urlString: url)
if urlHasParam {
url = url + "&param=" + token
} else {
url = url + "?param=" + token
}
}
// 2.增加导航栏高度
var tUrl = url
if !url.contains("navigationH=") {
tUrl = url + "?navigationH=\(k_Height_NavigationtBarAndStatuBar)"
if url.contains("?") {
tUrl = url + "&navigationH=\(k_Height_NavigationtBarAndStatuBar)"
}
}
let vc = YHH5WebViewVC()
vc.url = tUrl
UIViewController.current?.navigationController?.pushViewController(vc)
}
} else if iType == 8 {
// 生意星看店单页面
DispatchQueue.main.asyncAfter(deadline: .now() + 0.25) {
if !YHLoginManager.shared.isLogin() {
printLog("需要登录")
return
}
var url = YHBaseUrlManager.shared.curBusinessStarStoreUrl()
if YHLoginManager.shared.isLogin() {
let token = YHLoginManager.shared.h5Token
let urlHasParam = String.hasQueryParameters(urlString: url)
if urlHasParam {
url = url + "&param=" + token
} else {
url = url + "?param=" + token
}
}
// 2.增加导航栏高度
var tUrl = url
if !url.contains("navigationH=") {
tUrl = url + "?navigationH=\(k_Height_NavigationtBarAndStatuBar)"
if url.contains("?") {
tUrl = url + "&navigationH=\(k_Height_NavigationtBarAndStatuBar)"
}
}
let vc = YHH5WebViewVC()
vc.url = tUrl
UIViewController.current?.navigationController?.pushViewController(vc)
}
} else {
printLog("未处理的类型 \(iType)")
}
......
......@@ -93,6 +93,7 @@ private extension YHHomeKingKongBlockView {
let vc = YHHKEventCenterViewController()
self.parentViewController?.navigationController?.pushViewController(vc)
case 6:
// 银河商务
if YHLoginManager.shared.isLogin() {
} else {
YHOneKeyLoginManager.shared.oneKeyLogin()
......@@ -112,10 +113,11 @@ private extension YHHomeKingKongBlockView {
#endif
if YHLoginManager.shared.isLogin() {
let token = YHLoginManager.shared.h5Token
url = url + "?param=" + token
let urlHasParam = String.hasQueryParameters(urlString: url)
if urlHasParam {
url = url + "&param=" + token
} else {
url = url + "?param=" + token
}
}
......@@ -131,12 +133,49 @@ private extension YHHomeKingKongBlockView {
let vc = YHH5WebViewVC()
vc.url = tUrl
self.parentViewController?.navigationController?.pushViewController(vc)
case 7:
// 生意星
gotoBusinessStar()
default:
break
}
}
}
func gotoBusinessStar() {
if YHLoginManager.shared.isLogin() {
} else {
YHOneKeyLoginManager.shared.oneKeyLogin()
return
}
YHAnalytics.track("APP_Home_Page_HKbusiness")
var url = YHBaseUrlManager.shared.curBusinessStarUrl()
if YHLoginManager.shared.isLogin() {
let token = YHLoginManager.shared.h5Token
let urlHasParam = String.hasQueryParameters(urlString: url)
if urlHasParam {
url = url + "&param=" + token
} else {
url = url + "?param=" + token
}
}
// 2.增加导航栏高度
var tUrl = url
if !url.contains("navigationH=") {
tUrl = url + "?navigationH=\(k_Height_NavigationtBarAndStatuBar)"
if url.contains("?") {
tUrl = url + "&navigationH=\(k_Height_NavigationtBarAndStatuBar)"
}
}
let vc = YHH5WebViewVC()
vc.url = tUrl
self.parentViewController?.navigationController?.pushViewController(vc)
}
func tapShareForGiftView() {
// 判断是否登录成功
if YHLoginManager.shared.isLogin() {
......
......@@ -164,11 +164,17 @@ extension YHOrderTipsItemView {
@objc func tapButton(gestureRecognizer: UITapGestureRecognizer) {
if let msg = self.message {
let vc = YHMessageDetailListVC()
vc.type = Int(msg.type)
vc.title = self.getTypeString()
UIViewController.current?.navigationController?.pushViewController(vc)
if msg.type == YHMessageType.article.rawValue {
let vc = YHGalaxyNewsListViewController()
UIViewController.current?.navigationController?.pushViewController(vc)
} else {
let vc = YHMessageDetailListVC()
vc.type = Int(msg.type)
vc.title = self.getTypeString()
UIViewController.current?.navigationController?.pushViewController(vc)
}
NotificationCenter.default.post(name: YhConstant.YhNotification.clickHomeMsgNotifiction, object: nil)
}
}
......
......@@ -545,11 +545,11 @@ extension YHInformationPerfectListVC: UITableViewDelegate, UITableViewDataSource
}
private func handleJumpLogic(tapIndex: Int) {
#if DEBUG
// 开发模式下 任意跳转
handleJumpLogicDebug(tapIndex: tapIndex)
return
#endif
// #if DEBUG
// // 开发模式下 任意跳转
// handleJumpLogicDebug(tapIndex: tapIndex)
// return
// #endif
// 正式环境
handleJumpLogicRelease(tapIndex: tapIndex)
}
......
......@@ -16,6 +16,11 @@ class YHServerCenterHoldViewController: UIViewController {
var mobile: String = ""
var orderType: Int = 0
var productInfoMode: YHContactItemModel = YHContactItemModel()
var defaultSelectedIndex: Int = 0 {
didSet {
segmentedView.defaultSelectedIndex = defaultSelectedIndex
}
}
var orderId: Int = 0 {
didSet {
for i in 0..<arrItemTitles.count {
......
......@@ -31,7 +31,7 @@ class YHServiceCenterViewController: YHBaseViewController {
var state: Int = 0
var isCanSelectStep: Bool = false
var stepID: Int = 0
var headIndex = 0
var headIndex = 0 // 批次
private weak var tipsView: YHServiceOrderTipsView?
private var needShowYHManagerGuideView = false
......@@ -75,7 +75,7 @@ class YHServiceCenterViewController: YHBaseViewController {
didSet {
DispatchQueue.global().asyncAfter(wallDeadline: .now() ) {[weak self] in
DispatchQueue.main.async {
// self?.cellView.myDefaultNavItemIndex = self?.myDefaultIndex ?? 0
self?.cellView.defaultSelectedIndex = self?.myDefaultIndex ?? 0
}
}
}
......@@ -124,6 +124,8 @@ class YHServiceCenterViewController: YHBaseViewController {
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)
NotificationCenter.default.addObserver(self, selector: #selector(didSwitchIndex(_:)), name: YhConstant.YhNotification.didJumpToServicePageSwitchIndexNotification, object: nil)
}
private func goToServiceProgressVC() {
......@@ -154,6 +156,13 @@ class YHServiceCenterViewController: YHBaseViewController {
}
}
@objc func didSwitchIndex(_ notification: Notification) {
if let userInfo = notification.userInfo, let status = userInfo["status"] as? String {
let index = Int(status) ?? 0
self.myDefaultIndex = index
}
}
@objc func logoutSuccess() {
self.model = YHContactItemModel()
self.oldModel = YHContactItemModel()
......@@ -493,6 +502,34 @@ extension YHServiceCenterViewController {
self.titleLabel.setImage(UIImage(named: ""), for: .normal)
}
}
if self.state == 5 {
if self.serviceCenterMainReqVM.mainModel.renewalNewSection.list.count > headIndex {
self.arrDataForSeviceCenterProgress = self.serviceCenterMainReqVM.mainModel.renewalNewSection.list[headIndex].list
self.stepID = self.serviceCenterMainReqVM.mainModel.renewalNewSection.list[headIndex].id
self.homeTableView.tableHeaderView = headView
self.headView.block = {[weak self] stepIndex, id, array in
guard let self = self else { return }
self.headIndex = stepIndex
self.stepID = id
self.arrDataForSeviceCenterProgress = array
self.homeTableView.reloadData()
}
self.headView.selectIndex = self.headIndex
self.headView.dataSource = self.serviceCenterMainReqVM.mainModel.renewalNewSection.list
if self.model.product_type == 1 {
self.titleLabel.setTitle("优才续签阶段", for: .normal)
} else if self.model.product_type == 2 {
self.titleLabel.setTitle("高才续签阶段", for: .normal)
} else if self.model.product_type == 4 {
self.titleLabel.setTitle("专才续签阶段", for: .normal)
} else if self.model.product_type == 5 {
self.titleLabel.setTitle("留学续签阶段", for: .normal)
}
}
}
self.homeTableView.reloadData()
// 首次显示指引
if UserDefaults.standard.string(forKey: "service_tip_show") != nil {
......
......@@ -63,6 +63,16 @@ class YHServiceOrderListViewController: YHBaseViewController {
NotificationCenter.default.addObserver(self, selector: #selector(endDragging), name: Notification.Name(rawValue: "scrollViewDidEndDragging0"), object: nil)
}
static func enterWebPage(_ partUrl: String, _ orderId: Int, _ batchId: Int, _ isFullScreen: Bool = false) {
var url = YHBaseUrlManager.shared.renewalURL() + partUrl
url = url + "?param=" + YHLoginManager.shared.h5Token + "&batchId=\(batchId)" + "&orderId=\(orderId)"
let vc = YHH5WebViewVC()
vc.url = url
vc.isSupportWebviewInterBackFlag = true
vc.isFullScreenFlag = isFullScreen
UIViewController.current?.navigationController?.pushViewController(vc)
}
// swiftlint:disable function_body_length
// swiftlint:disable cyclomatic_complexity
class func jumpToMessageController(type: Int, orderId: Int, _ stepId: Int = 0, productType: Int = 0) {
......@@ -594,9 +604,41 @@ class YHServiceOrderListViewController: YHBaseViewController {
vc.orderId = orderId
vc.batchId = stepId
UIViewController.current?.navigationController?.pushViewController(vc)
} else if type == 51 {
// 续签资料管理
self.enterWebPage("pages/renewal-information-management/index", orderId, stepId)
} else if type == 52 {
// 续签文书管理
self.enterWebPage("pages/renewal-document-management/index", orderId, stepId)
} else if type == 53 {
// 续签信息确认
self.enterWebPage("pages/renewal-confirm/index", orderId, stepId)
} else if type == 54 {
// 在港递交预约
self.enterWebPage("pages/send-reserve/index", orderId, stepId)
} else if type == 55 {
// 查看续签结果
self.enterWebPage("pages/xu-qian/result", orderId, stepId, true)
} else if type == 56 {
// 续签补件
self.enterWebPage("pages/renewal-supplement-result/index", orderId, stepId)
} else if type == 57 {
// 在港签证缴费
self.enterWebPage("pages/xu-qian/visa-payment", orderId, stepId)
} else if type == 58 {
// 上传旅行证件
self.enterWebPage("pages/travel-certificate/index", orderId, stepId)
} else if type == 101 {
// 身份续签指引
gotoResignGuideVC()
gotoResignGuideVC(orderID: orderId, stepID: stepId)
} else if type == 102 {
// 我的续签方案
gotoResignMethod(orderID: orderId, stepID: stepId)
......@@ -605,7 +647,7 @@ class YHServiceOrderListViewController: YHBaseViewController {
gotoHKImmigrationRecordsVC(orderID: orderId)
} else if type == 104 {
// 续签证件管理
gotoResignCertificateListVC(orderID: orderId)
gotoResignCertificateListVC(orderID: orderId, stepID: stepId)
}
/*
......@@ -666,7 +708,7 @@ extension YHServiceOrderListViewController {
if self.arrDataForSeviceCenterProgress.count == 0 {
self.homeTableView.tableFooterView = footView
self.homeTableView.reloadData()
if (state == 3 || state == 4) && (type == 0 || type == 2) {
if (state == 3 || state == 4 || state == 5) && (type == 0 || type == 2) {
self.homeTableView.tableFooterView = UIView()
self.homeTableView.reloadData()
}
......@@ -741,11 +783,10 @@ extension YHServiceOrderListViewController {
return true
}
static func gotoResignGuideVC() {
static func gotoResignGuideVC(orderID: Int, stepID: Int) {
if let param = YHLoginManager.shared.userModel?.token, param.count>5 {
var url = YHBaseUrlManager.shared.curH5URL() + "superAppBridge.html#/guide/identity"
// var url = "http://192.168.23.35:10300/" + "superAppBridge.html#/guide/identity"
url = url + "?param=" + YHLoginManager.shared.h5Token
url = url + "?param=" + YHLoginManager.shared.h5Token + "&batchId=\(stepID)" + "&orderId=\(orderID)"
let vc = YHH5WebViewVC()
vc.title = "身份续签指引"
vc.navTitle = "身份续签指引"
......@@ -778,9 +819,10 @@ extension YHServiceOrderListViewController {
UIViewController.current?.navigationController?.pushViewController(vc)
}
static func gotoResignCertificateListVC(orderID: Int) {
static func gotoResignCertificateListVC(orderID: Int, stepID: Int) {
let vc = YHResignCertificateListViewController()
vc.orderId = orderID
vc.batchId = stepID
UIViewController.current?.navigationController?.pushViewController(vc)
}
}
......@@ -799,7 +841,7 @@ extension YHServiceOrderListViewController: UITableViewDelegate, UITableViewData
if orderType == 3 {
return 42.fix + 20
}
if (state == 3 || state == 4) && (type == 0 || type == 2) {
if (state == 3 || state == 4 || state == 5) && (type == 0 || type == 2) {
return 104
} else {
return kMargin
......@@ -817,25 +859,48 @@ extension YHServiceOrderListViewController: UITableViewDelegate, UITableViewData
}
return view
}
if (state == 3 || state == 4) && (type == 0 || type == 2) {
if (state == 3 || state == 4 || state == 5) && (type == 0 || type == 2) {
let view = YHServiceStepThreeSectionView(frame: CGRect(x: 0, y: 0, width: KScreenWidth, height: 104))
view.block = { [weak self] tag in
guard let self = self else { return }
if tag == 1 {
// 身份续签指引
printLog("身份续签指引")
YHServiceOrderListViewController.gotoResignGuideVC()
if state == 5 { // 高专留续签
if tag == 1 {
// 身份续签指引
printLog("身份续签指引")
YHServiceOrderListViewController.gotoResignGuideVC(orderID: orderID, stepID: stepID)
} else if tag == 2 {
// 我的续签方案
printLog("续签方案")
YHServiceOrderListViewController.gotoResignMethod(orderID: orderID, stepID: stepID)
} else if tag == 3 {
// 添加在港记录
Self.enterWebPage("pages/hk-record/index", orderID, stepID)
} else if tag == 4 {
// 续签证件管理
Self.enterWebPage("pages/renewal-certificate-management/index", orderID, stepID)
}
} else if tag == 2 {
// 我的续签方案
printLog("续签方案")
YHServiceOrderListViewController.gotoResignMethod(orderID: orderID, stepID: stepID)
} else if tag == 3 {
// 添加在港记录
YHServiceOrderListViewController.gotoHKImmigrationRecordsVC(orderID: orderID)
} else if tag == 4 {
// 续签证件管理
YHServiceOrderListViewController.gotoResignCertificateListVC(orderID: orderID)
} else {
if tag == 1 {
// 身份续签指引
printLog("身份续签指引")
YHServiceOrderListViewController.gotoResignGuideVC(orderID: orderID, stepID: stepID)
} else if tag == 2 {
// 我的续签方案
printLog("续签方案")
YHServiceOrderListViewController.gotoResignMethod(orderID: orderID, stepID: stepID)
} else if tag == 3 {
// 添加在港记录
YHServiceOrderListViewController.gotoHKImmigrationRecordsVC(orderID: orderID)
} else if tag == 4 {
// 续签证件管理
YHServiceOrderListViewController.gotoResignCertificateListVC(orderID: orderID, stepID: stepID)
}
}
}
return view
......@@ -857,7 +922,7 @@ extension YHServiceOrderListViewController: UITableViewDelegate, UITableViewData
let arr = self.arrDataForSeviceCenterProgress
if 0 <= indexPath.row, indexPath.row < arr.count {
let model = arr[indexPath.row]
if model.type == 27 || model.type == 227 || model.type == 327 || model.type == 427 || model.type == 32 || model.type == 31 || model.type == 34 || model.type == 42 || model.type == 41 || model.type == 44 {
if model.type == 27 || model.type == 227 || model.type == 327 || model.type == 427 || model.type == 32 || model.type == 31 || model.type == 34 || model.type == 42 || model.type == 41 || model.type == 44 || model.type == 52 || model.type == 51 || model.type == 54 {
return 162
}
return 144
......
......@@ -49,12 +49,13 @@ struct YHServiceStepProgressThreeModel: SmartCodable {
}
struct YHServiceCenterMainModel: SmartCodable {
var applySection: YHServiceProgressModel = YHServiceProgressModel()
var certificateSection: YHServiceProgressModel = YHServiceProgressModel()
var renewalSection: YHServiceStepProgressModel = YHServiceStepProgressModel()
var permanentSection: YHServiceStepProgressModel = YHServiceStepProgressModel()
var stage: Int = 0 // 1 申请阶段 2办证阶段 3续期阶段 4永居
var applySection: YHServiceProgressModel = YHServiceProgressModel() // 申请阶段
var certificateSection: YHServiceProgressModel = YHServiceProgressModel() // 办证阶段
var renewalSection: YHServiceStepProgressModel = YHServiceStepProgressModel() // 优才续签阶段
var permanentSection: YHServiceStepProgressModel = YHServiceStepProgressModel() // 永居
var renewalNewSection: YHServiceStepProgressModel = YHServiceStepProgressModel() // 高专留续签段
var stage: Int = 0 // 1 申请阶段 2办证阶段 3优才续签阶段 4永居 5高专留续签段
var master_id: Int = 0 // 批次
var status: Int = 0
var category_type: Int = 0 // 1.优才 2.高才 3永居
var category_type: Int = 0 // 1.优才 2.高才 3永居 4专才 5留学
}
......@@ -377,6 +377,46 @@ extension YHServiceOrderProgressTableViewCell {
messageLabel.text = "请上传&核对续签旅行证件~"
}
if model.type == 51 {
titleLabel.text = "续签资料管理"
messageLabel.text = "请根据资料清单上传您的续签证明文件~"
}
if model.type == 52 {
titleLabel.text = "续签文书管理"
messageLabel.text = "请确认您的续签文书内容并完成签字~"
}
if model.type == 53 {
titleLabel.text = "续签信息确认"
messageLabel.text = "请确认家庭续签信息是否有变更~"
}
if model.type == 54 {
titleLabel.text = "在港递交预约"
messageLabel.text = "请预约在港递交续签时间&确认在港时间~"
}
if model.type == 55 {
titleLabel.text = "查看续签结果"
messageLabel.text = "请查看递交凭证&续签结果~"
}
if model.type == 56 {
titleLabel.text = "续签补件"
messageLabel.text = "请尽快补件~"
}
if model.type == 57 {
titleLabel.text = "续签签证缴费"
messageLabel.text = "请根据指引缴费并领取新电子签证~"
}
if model.type == 58 {
titleLabel.text = "上传旅行证件"
messageLabel.text = "请上传&核对续签旅行证件~"
}
if model.type == 201 {
titleLabel.text = "我的信息"
}
......@@ -1118,6 +1158,62 @@ extension YHServiceOrderProgressTableViewCell {
messageLabel.textColor = UIColor.mainTextColor50
}
if model.type == 51 {
titleLabel.text = "续签资料管理"
messageLabel.text = "请根据资料清单上传您的续签证明文件~"
buttonLabel.text = "去上传"
messageLabel.textColor = UIColor.mainTextColor50
}
if model.type == 52 {
titleLabel.text = "续签文书管理"
messageLabel.text = "请确认您的续签文书内容并完成签字~"
buttonLabel.text = "去确认"
messageLabel.textColor = UIColor.mainTextColor50
}
if model.type == 53 {
titleLabel.text = "续签信息确认"
messageLabel.text = "请确认家庭续签信息是否有变更~"
buttonLabel.text = "去查看"
messageLabel.textColor = UIColor.mainTextColor50
}
if model.type == 54 {
titleLabel.text = "在港递交预约"
messageLabel.text = "请预约在港递交续签时间&确认在港时间~"
buttonLabel.text = "去查看"
messageLabel.textColor = UIColor.mainTextColor50
}
if model.type == 55 {
titleLabel.text = "查看续签结果"
messageLabel.text = "请查看递交凭证&续签结果~"
buttonLabel.text = "去查看"
messageLabel.textColor = UIColor.mainTextColor50
}
if model.type == 56 {
titleLabel.text = "续签补件"
messageLabel.text = "请尽快补件~"
buttonLabel.text = "去查看"
messageLabel.textColor = UIColor.mainTextColor50
}
if model.type == 57 {
titleLabel.text = "续签签证缴费"
messageLabel.text = "请根据指引缴费并领取新电子签证~"
buttonLabel.text = "去查看"
messageLabel.textColor = UIColor.mainTextColor50
}
if model.type == 58 {
titleLabel.text = "上传旅行证件"
messageLabel.text = "请上传&核对续签旅行证件~"
buttonLabel.text = "去查看"
messageLabel.textColor = UIColor.mainTextColor50
}
if model.type == 201 {
titleLabel.text = "我的信息"
buttonLabel.text = "去填写"
......@@ -1432,6 +1528,54 @@ extension YHServiceOrderProgressTableViewCell {
buttonLabel.text = "去查看"
}
if model.type == 51 {
titleLabel.text = "续签资料管理"
messageLabel.text = "请根据资料清单上传您的续签证明文件~"
buttonLabel.text = "已完成"
}
if model.type == 52 {
titleLabel.text = "续签文书管理"
messageLabel.text = "请确认您的续签文书内容并完成签字~"
buttonLabel.text = "已完成"
}
if model.type == 53 {
titleLabel.text = "续签信息确认"
messageLabel.text = "请确认家庭续签信息是否有变更~"
buttonLabel.text = "去查看"
}
if model.type == 54 {
titleLabel.text = "在港递交预约"
messageLabel.text = "请预约在港递交续签时间&确认在港时间~"
buttonLabel.text = "去查看"
}
if model.type == 55 {
titleLabel.text = "查看续签结果"
messageLabel.text = "请查看递交凭证&续签结果~"
buttonLabel.text = "去查看"
}
if model.type == 56 {
titleLabel.text = "续签补件"
messageLabel.text = "恭喜您,已完成补件~"
buttonLabel.text = "已完成"
}
if model.type == 57 {
titleLabel.text = "续签签证缴费"
messageLabel.text = "请根据指引缴费并领取新电子签证~"
buttonLabel.text = "去查看"
}
if model.type == 58 {
titleLabel.text = "上传旅行证件"
messageLabel.text = "请上传&核对续签旅行证件~"
buttonLabel.text = "去查看"
}
if model.type == 201 {
titleLabel.text = "我的信息"
messageLabel.text = "恭喜您,信息已全部填写完~"
......
......@@ -123,7 +123,7 @@ extension YHVisaRenewalTroubleshootingGuideVC {
let secAtt: ASAttributedString = .init(string: "有效旅行证件原件、香港身份证原件、获批函", .font(UIFont.PFSC_R(ofSize: 13)), .foreground(UIColor.mainTextColor70), .paragraph(.lineHeightMultiple(1.07)))
datas.append(.tips("携带资料:", secAtt))
datas.append(.workflow("操作流程:", ["将军澳出入境6楼接待窗口取号", "等待叫号,告知主任需要缴费查看签证,等待主任核实", "若核实是以访客身份入境,现场写一份声明解释为何没有及时回港", "等待重发,预计3-6周,重发期间可以先离开香港", "重发后再持有效申请旅行证件入境香港后线上缴费"]))
datas.append(.workflow("操作流程:", ["将军澳出入境优才(优秀人才入境计划)、高才(高才通计划)、专才(输入内地人才计划)、留学(非本地毕业生留港/回港就业安排)等对应签证类型的延期接待窗口取号", "等待叫号,告知主任需要缴费查看签证,等待主任核实", "若核实是以访客身份入境,现场写一份声明解释为何没有及时回港", "(如您为港澳通行证申请,记得返回内地后及时打印签证+更新逗留D签注哦~)"]))
let fourthAtt: ASAttributedString = .init(string: "1、可尝试现场和主任说明为何不能长期待在香港的原因,争取能够直接签证缴费,比如两地都有业务需要自己处理\n\n2、如验证码失效、网页加载无法接入确认缴费页面,请退出后检查网络后重新操作\n\n3、如缴费提示正在有一笔付款进行中要隔1个小时后再重新进到网页操作", .font(UIFont.PFSC_R(ofSize: 13)), .foreground(UIColor.mainTextColor70), .paragraph(.lineHeightMultiple(1.07)))
datas.append(.tips("注意事项:", fourthAtt))
......
......@@ -16,7 +16,9 @@ class YHResignCertificateDetailEVisaViewController: YHBaseViewController {
var clickIndex = -1
var file: [YHWorkExperienceFileModel] = []
var data: YHResignCertificateModel = YHResignCertificateModel()
var viewModel: YHResignCertificateDetailViewModel = YHResignCertificateDetailViewModel()
var isDisablEdit: Bool = false
var orderId: Int = 0
lazy var previewFileTool: YHFilePreviewTool = {
......@@ -34,6 +36,8 @@ class YHResignCertificateDetailEVisaViewController: YHBaseViewController {
}
func getData() {
isDisablEdit = data.status == ResignCertificateStatus.Complete.rawValue
if data.cert_info.e_visa_url.count != 0 {
let model = YHWorkExperienceFileModel()
model.fileName = data.cert_info.name
......@@ -42,6 +46,12 @@ class YHResignCertificateDetailEVisaViewController: YHBaseViewController {
file = [model]
}
tableView.reloadData()
nextButton.snp.remakeConstraints { make in
make.left.equalTo(16)
make.right.equalTo(-16)
make.bottom.equalTo(-8 - k_Height_safeAreaInsetsBottom())
make.height.equalTo(isDisablEdit ? 0 : 48)
}
}
func setView() {
......@@ -198,6 +208,7 @@ extension YHResignCertificateDetailEVisaViewController: UITableViewDelegate, UIT
let starRange = NSRange(location: 0, length: 2)
questionAttrStr.addAttribute(NSAttributedString.Key.foregroundColor, value: UIColor.failColor, range: starRange)
cell.titleLabel.attributedText = questionAttrStr
cell.dataModel = self.data
cell.dataSource = self.file
cell.experienceListBlock = {[weak self] model, type in
guard let self = self else { return }
......@@ -316,7 +327,7 @@ extension YHResignCertificateDetailEVisaViewController: UITableViewDelegate, UIT
}
func tableView(_ tableView: UITableView, heightForRowAt indexPath: IndexPath) -> CGFloat {
return 145
return UITableView.automaticDimension
}
func tableView(_ tableView: UITableView, didSelectRowAt indexPath: IndexPath) {
......
......@@ -27,6 +27,7 @@ class YHResignCertificateDetailHkViewController: YHBaseViewController {
var data: [YHItemModel] = []
var isShowPrompt = false
var failString: String = ""
var isDisableEdit: Bool = false
lazy var tableView: UITableView = {
let tableView = UITableView(frame: .zero, style: .grouped)
......@@ -48,7 +49,7 @@ class YHResignCertificateDetailHkViewController: YHBaseViewController {
lazy var bottomView: UIView = {
let view = UIView()
view.backgroundColor = .white
view.backgroundColor = UIColor(hex: 0xF8F9FB)
view.addSubview(bottomBtn)
bottomBtn.snp.makeConstraints { make in
make.left.equalTo(16)
......@@ -139,6 +140,10 @@ class YHResignCertificateDetailHkViewController: YHBaseViewController {
}
@objc func didSaveBtnClicked() {
if isDisableEdit {
return
}
if !checkInfo() {
isShowPrompt = true
updateData()
......@@ -195,6 +200,11 @@ class YHResignCertificateDetailHkViewController: YHBaseViewController {
self.dataModel = model
self.loadDetailInfo()
self.showExampleView()
isDisableEdit = dataModel.status == ResignCertificateStatus.Complete.rawValue
bottomView.isHidden = isDisableEdit ? true : false
bottomView.snp.updateConstraints { make in
make.height.equalTo(self.isDisableEdit ? 0 : 98)
}
}
}
......@@ -362,23 +372,7 @@ extension YHResignCertificateDetailHkViewController: UITableViewDelegate, UITabl
}
func tableView(_ tableView: UITableView, heightForRowAt indexPath: IndexPath) -> CGFloat {
if indexPath.section != 0 {
if urls[0].count == 0 && urls[1].count == 0 {
return 211
} else {
var tatol = 0
for item in data {
let isShow = item.isShowPrompts ?? false
let message = item.message ?? ""
let isNeed = item.isNeed ?? false
if isShow && message.count == 0 && isNeed {
tatol += 20
}
}
return CGFloat(649 + tatol)
}
}
return UITableView.automaticDimension
}
......
......@@ -27,6 +27,7 @@ class YHResignCertificateDetailPassPortViewController: YHBaseViewController {
var data: [YHItemModel] = []
var isShowPrompt = false
var failString: String = ""
var isDisableEdit: Bool = false
lazy var tableView: UITableView = {
let tableView = UITableView(frame: .zero, style: .grouped)
......@@ -48,7 +49,7 @@ class YHResignCertificateDetailPassPortViewController: YHBaseViewController {
lazy var bottomView: UIView = {
let view = UIView()
view.backgroundColor = .white
view.backgroundColor = UIColor(hex: 0xF8F9FB)
view.addSubview(bottomBtn)
bottomBtn.snp.makeConstraints { make in
make.left.equalTo(16)
......@@ -132,6 +133,11 @@ class YHResignCertificateDetailPassPortViewController: YHBaseViewController {
}
@objc func didSaveBtnClicked() {
if isDisableEdit {
return
}
if !checkInfo() {
isShowPrompt = true
updateData()
......@@ -178,6 +184,12 @@ class YHResignCertificateDetailPassPortViewController: YHBaseViewController {
self.dataModel = model
self.loadDetailInfo()
self.showExampleView()
isDisableEdit = dataModel.status == ResignCertificateStatus.Complete.rawValue
bottomView.isHidden = isDisableEdit ? true : false
bottomView.snp.updateConstraints { make in
make.height.equalTo(self.isDisableEdit ? 0 : 98)
}
}
}
......@@ -287,23 +299,6 @@ extension YHResignCertificateDetailPassPortViewController: UITableViewDelegate,
}
func tableView(_ tableView: UITableView, heightForRowAt indexPath: IndexPath) -> CGFloat {
if indexPath.section != 0 {
if urls[0].count == 0 {
return 211
} else {
var tatol = 0
for item in data {
let isShow = item.isShowPrompts ?? false
let message = item.message ?? ""
let isNeed = item.isNeed ?? false
if isShow && message.count == 0 && isNeed {
tatol += 20
}
}
return CGFloat(501 + tatol)
}
}
return UITableView.automaticDimension
}
......
......@@ -17,10 +17,34 @@ class YHResignCertificateDetailViewController: YHBaseViewController {
var dataModel: YHResignCertificateModel = YHResignCertificateModel() {
didSet {
isDisableEdit = dataModel.status == ResignCertificateStatus.Complete.rawValue
if dataModel.status == ResignCertificateStatus.NotUpload.rawValue {
self.statusLabel.backgroundColor = UIColor.brandMainColor(alpha: 0.08)
self.statusLabel.text = "待上传"
self.statusLabel.textColor = UIColor.brandMainColor
} else if dataModel.status == ResignCertificateStatus.Review.rawValue {
self.statusLabel.backgroundColor = UIColor(hex: 0xFF8000).withAlphaComponent(0.08)
self.statusLabel.text = "审核中"
self.statusLabel.textColor = UIColor(hex: 0xFF8000)
} else if dataModel.status == ResignCertificateStatus.Complete.rawValue {
self.statusLabel.backgroundColor = UIColor(hex: 0x3CC694).withAlphaComponent(0.08)
self.statusLabel.text = "已完成"
self.statusLabel.textColor = UIColor(hex: 0x3CC694)
} else if dataModel.status == ResignCertificateStatus.Rejected.rawValue {
self.statusLabel.backgroundColor = UIColor(hex: 0xF81D22).withAlphaComponent(0.08)
self.statusLabel.text = "已驳回"
self.statusLabel.textColor = UIColor(hex: 0xF81D22)
}
}
}
var detailType: UploadCertificateDetailType = .SmallWhiteNote
var canEditFlag: Bool = true // 已上传状态也可以重新传
var isDisableEdit: Bool = false
lazy var uploadImageVM: YHBaseViewModel = {
let vm = YHBaseViewModel()
......@@ -70,6 +94,18 @@ class YHResignCertificateDetailViewController: YHBaseViewController {
return lable
}()
private lazy var statusLabel: UILabel = {
let lable = UILabel(frame: CGRect(x: 0, y: 0, width: 38, height: 16))
lable.text = "待上传"
lable.font = .PFSC_M(ofSize: 10)
lable.backgroundColor = UIColor(hex: 0x2F7EF6, transparency: 0.08)
lable.textColor = .brandMainColor
lable.layer.cornerRadius = kCornerRadius3
lable.clipsToBounds = true
lable.textAlignment = .center
return lable
}()
lazy var lineView: UIView = {
let view = UIView()
view.backgroundColor = .separatorColor
......@@ -109,6 +145,16 @@ class YHResignCertificateDetailViewController: YHBaseViewController {
return view
}()
private lazy var reasonLabel: UILabel = {
let label = UILabel()
label.font = UIFont.PFSC_R(ofSize: 12)
label.textColor = UIColor.failColor
label.textAlignment = .left
label.numberOfLines = 0
label.text = "被驳回原因:"
return label
}()
private var startDateStr: String = ""
private var endDateStr: String = ""
private var uploadImageUrl: String = ""
......@@ -276,6 +322,9 @@ private extension YHResignCertificateDetailViewController {
}
@objc func tapItem(gestureRecognizer: UITapGestureRecognizer) {
if isDisableEdit {
return
}
var title = ""
var defaultDate = ""
......@@ -386,7 +435,11 @@ private extension YHResignCertificateDetailViewController {
guard let self = self else { return }
guard let url = success else { return }
self.cardButton.kf.setBackgroundImage(with: URL(string: url), for: .normal, completionHandler: { _ in
self.delImageButton.isHidden = false
if self.isDisableEdit {
self.delImageButton.isHidden = true
} else {
self.delImageButton.isHidden = false
}
})
self.cardButton.setContent("", "")
}
......@@ -405,12 +458,33 @@ private extension YHResignCertificateDetailViewController {
guard let self = self else { return }
guard let url = success else { return }
self.cardButton.kf.setBackgroundImage(with: URL(string: url), for: .normal, completionHandler: { _ in
self.delImageButton.isHidden = false
if self.isDisableEdit {
self.delImageButton.isHidden = true
} else {
self.delImageButton.isHidden = false
}
})
self.cardButton.setContent("", "")
}
}
}
bottomView.snp.remakeConstraints { make in
make.left.equalToSuperview()
make.right.equalToSuperview()
make.bottom.equalToSuperview()
make.height.equalTo(isDisableEdit ? 0 : YHFileListBottomView.viewH)
}
reasonLabel.text = "被驳回原因:" + dataModel.audit_remark
reasonLabel.snp.remakeConstraints { make in
make.top.equalTo(lineView.snp.bottom).offset(dataModel.status == ResignCertificateStatus.Rejected.rawValue ? 12 : 0)
make.left.equalToSuperview().offset(18)
make.right.equalToSuperview().offset(-18)
if dataModel.status != ResignCertificateStatus.Rejected.rawValue {
make.height.equalTo(0)
}
}
}
func setupUI() {
......@@ -470,10 +544,18 @@ private extension YHResignCertificateDetailViewController {
make.height.equalTo(1)
}
whiteContentView.addSubview(reasonLabel)
reasonLabel.snp.makeConstraints { make in
make.top.equalTo(lineView.snp.bottom).offset(12)
make.left.equalToSuperview().offset(18)
make.right.equalToSuperview().offset(-18)
make.height.equalTo(0)
}
whiteContentView.addSubview(cardLabel)
cardLabel.snp.makeConstraints { make in
make.left.equalToSuperview().offset(18)
make.top.equalTo(lineView.snp.bottom).offset(12)
make.top.equalTo(reasonLabel.snp.bottom).offset(12)
make.height.equalTo(20)
make.width.equalTo(160)
}
......@@ -481,7 +563,7 @@ private extension YHResignCertificateDetailViewController {
if detailType == .SmallWhiteNote {
titleTextView.attributed.text = """
\("*", .foreground(UIColor.failColor), .font(UIFont.PFSC_M(ofSize: 17)))\(" \(dataModel.name)的第一次赴港激活小白条 ", .foreground(UIColor.mainTextColor), .font(UIFont.PFSC_M(ofSize: 17)))\(.view(customLabel, .original(.center)))
\("*", .foreground(UIColor.failColor), .font(UIFont.PFSC_M(ofSize: 17)))\(" \(dataModel.name)的第一次赴港激活小白条 ", .foreground(UIColor.mainTextColor), .font(UIFont.PFSC_M(ofSize: 17)))\(.view(customLabel, .original(.center))) \(.view(statusLabel, .original(.center)))
"""
whiteContentView.addSubview(cardButton)
......@@ -518,7 +600,7 @@ private extension YHResignCertificateDetailViewController {
endDateItem.addGestureRecognizer(tap2)
} else if detailType == .HongKongCard {
titleTextView.attributed.text = """
\("*", .foreground(UIColor.failColor), .font(UIFont.PFSC_M(ofSize: 17)))\(" \(dataModel.name)的香港身份证 ", .foreground(UIColor.mainTextColor), .font(UIFont.PFSC_M(ofSize: 17)))\(.view(customLabel, .original(.center)))
\("*", .foreground(UIColor.failColor), .font(UIFont.PFSC_M(ofSize: 17)))\(" \(dataModel.name)的香港身份证 ", .foreground(UIColor.mainTextColor), .font(UIFont.PFSC_M(ofSize: 17)))\(.view(customLabel, .original(.center))) \(.view(statusLabel, .original(.center)))
"""
whiteContentView.addSubview(cardButton)
......
......@@ -11,6 +11,7 @@ import UIKit
class YHResignCertificateListViewController: YHBaseViewController {
var tableView: UITableView!
var orderId: Int = 0
var batchId: Int = 0
var viewModel = YHResignCertificateListViewModel()
override func viewDidLoad() {
......@@ -27,7 +28,7 @@ class YHResignCertificateListViewController: YHBaseViewController {
}
func getData() {
viewModel.getResignCertificateList(orderId: orderId) {[weak self] _, _ in
viewModel.getResignCertificateList(orderId: orderId, batchId: batchId) {[weak self] _, _ in
guard let self = self else { return }
self.tableView.reloadData()
}
......@@ -92,16 +93,19 @@ extension YHResignCertificateListViewController: UITableViewDelegate, UITableVie
guard let self = self else { return }
if indexPath.row == 0 {
if model.cert_type == "PASS_PORT" {
// 护照
let vc = YHResignCertificateDetailPassPortViewController()
vc.cerId = model.id
self.navigationController?.pushViewController(vc)
} else {
// 港澳通行证
let vc = YHResignCertificateDetailHkViewController()
vc.cerId = model.id
self.navigationController?.pushViewController(vc)
}
}
if indexPath.row == 1 {
// 电子签证
let vc = YHResignCertificateDetailEVisaViewController()
vc.data = model
self.navigationController?.pushViewController(vc)
......@@ -110,12 +114,14 @@ extension YHResignCertificateListViewController: UITableViewDelegate, UITableVie
if model.age < 11 {
return
}
// 香港身份证
let vc = YHResignCertificateDetailViewController()
vc.detailType = .HongKongCard
vc.dataModel = model
self.navigationController?.pushViewController(vc)
}
if indexPath.row == 3 {
// 小白条
let vc = YHResignCertificateDetailViewController()
vc.detailType = .SmallWhiteNote
vc.dataModel = model
......
......@@ -37,6 +37,7 @@ class YHResignCertificateModel: SmartCodable {
var user_type: String = ""
var valid_date: String = ""
var sign_valid_date: String = "" // 签注有效期
var audit_remark: String = ""
var cert_info: YHResignCertificateInfoModel = YHResignCertificateInfoModel()
required init() {
......
......@@ -15,9 +15,13 @@ class YHResignCertificateEvisaTableViewCell: UITableViewCell {
var experienceListBlock: ExperienceListBlock?
typealias NewFileBlock = () -> Void
var newFileBlock: NewFileBlock?
var dataModel: YHResignCertificateModel = YHResignCertificateModel()
var isDisablEdit: Bool = false
var centerView: UIView!
var titleLabel: UILabel!
var statusLabel: UILabel!
var reasonLabel: UILabel!
var lineView: UIView!
var itemView: YHWorkFileItemView!
var bottomView: YHWorkItemAddView!
......@@ -66,9 +70,28 @@ class YHResignCertificateEvisaTableViewCell: UITableViewCell {
make.left.equalTo(18)
make.top.equalTo(16)
make.height.equalTo(24)
make.right.equalTo(-20)
}
statusLabel = {
let lable = UILabel(frame: CGRect(x: 0, y: 0, width: 38, height: 16))
lable.text = "待上传"
lable.font = .PFSC_M(ofSize: 10)
lable.backgroundColor = UIColor(hex: 0x2F7EF6, transparency: 0.08)
lable.textColor = .brandMainColor
lable.layer.cornerRadius = kCornerRadius3
lable.clipsToBounds = true
lable.textAlignment = .center
return lable
}()
centerView.addSubview(statusLabel)
statusLabel.snp.makeConstraints { make in
make.left.equalTo(titleLabel.snp.right).offset(8)
make.centerY.equalTo(titleLabel.snp.centerY)
make.height.equalTo(16)
make.width.equalTo(38)
make.right.lessThanOrEqualTo(-8)
}
lineView = {
let view = UIView()
view.backgroundColor = UIColor.separatorColor
......@@ -82,6 +105,23 @@ class YHResignCertificateEvisaTableViewCell: UITableViewCell {
make.top.equalTo(51.5)
}
reasonLabel = {
let label = UILabel()
label.font = UIFont.PFSC_R(ofSize: 12)
label.textColor = UIColor.failColor
label.textAlignment = .left
label.numberOfLines = 0
label.text = "被驳回原因:"
return label
}()
centerView.addSubview(reasonLabel)
reasonLabel.snp.makeConstraints { make in
make.left.equalTo(18)
make.right.equalTo(-20)
make.top.equalTo(lineView.snp.bottom).offset(0)
make.height.equalTo(0)
}
itemView = {
let view = YHWorkFileItemView()
view.block = {[weak self] model, type in
......@@ -97,6 +137,7 @@ class YHResignCertificateEvisaTableViewCell: UITableViewCell {
make.left.equalToSuperview()
make.right.equalToSuperview()
make.height.equalTo(74)
make.top.equalTo(reasonLabel.snp.bottom).offset(0)
make.bottom.equalToSuperview()
}
......@@ -116,6 +157,7 @@ class YHResignCertificateEvisaTableViewCell: UITableViewCell {
make.right.equalTo(-18)
make.left.equalTo(18)
make.height.equalTo(45)
make.top.equalTo(reasonLabel.snp.bottom).offset(0)
make.bottom.equalTo(-16)
}
}
......@@ -129,5 +171,40 @@ class YHResignCertificateEvisaTableViewCell: UITableViewCell {
itemView.dataSource = model.first
bottomView.isHidden = true
itemView.isHidden = false
reasonLabel.isHidden = (dataModel.status != ResignCertificateStatus.Rejected.rawValue)
reasonLabel.text = "被驳回原因:" + dataModel.audit_remark
reasonLabel.snp.remakeConstraints { make in
make.left.equalTo(18)
make.right.equalTo(-18)
if dataModel.status != ResignCertificateStatus.Rejected.rawValue {
make.height.equalTo(0)
}
make.top.equalTo(lineView.snp.bottom).offset(dataModel.status == ResignCertificateStatus.Rejected.rawValue ? 18 : 0)
}
isDisablEdit = dataModel.status == ResignCertificateStatus.Complete.rawValue
itemView.editBtn.isHidden = isDisablEdit
if dataModel.status == ResignCertificateStatus.NotUpload.rawValue {
self.statusLabel.backgroundColor = UIColor.brandMainColor(alpha: 0.08)
self.statusLabel.text = "待上传"
self.statusLabel.textColor = UIColor.brandMainColor
} else if dataModel.status == ResignCertificateStatus.Review.rawValue {
self.statusLabel.backgroundColor = UIColor(hex: 0xFF8000).withAlphaComponent(0.08)
self.statusLabel.text = "审核中"
self.statusLabel.textColor = UIColor(hex: 0xFF8000)
} else if dataModel.status == ResignCertificateStatus.Complete.rawValue {
self.statusLabel.backgroundColor = UIColor(hex: 0x3CC694).withAlphaComponent(0.08)
self.statusLabel.text = "已完成"
self.statusLabel.textColor = UIColor(hex: 0x3CC694)
} else if dataModel.status == ResignCertificateStatus.Rejected.rawValue {
self.statusLabel.backgroundColor = UIColor(hex: 0xF81D22).withAlphaComponent(0.08)
self.statusLabel.text = "已驳回"
self.statusLabel.textColor = UIColor(hex: 0xF81D22)
}
}
}
......@@ -20,7 +20,10 @@ class YHResignCertificateHKTableViewCell: UITableViewCell {
var block: ItemBlock?
var centerView: UIView!
var titleLabel: UILabel!
var lineView: UIView!
var exampleButton: UIButton!
var statusButton: UIButton!
var reasonLabel: UILabel!
var frontLabel: UILabel!
var backSurfaceLabel: UILabel!
var frontImageButton: YHCardButton!
......@@ -29,6 +32,8 @@ class YHResignCertificateHKTableViewCell: UITableViewCell {
var backSurfaceDeleteButton: UIButton!
var activityIndicator: UIActivityIndicatorView!
var showMessageLabel: UILabel!
var infoView: UIView!
var cerInfoLabel: UILabel!
var cerNumberView: YHItemView!
var cerSignPlaceView: YHItemView!
......@@ -41,7 +46,53 @@ class YHResignCertificateHKTableViewCell: UITableViewCell {
var viewModel: YHBaseViewModel = YHBaseViewModel()
var firstUrl: String = ""
var lastUrl: String = ""
var dataModel: YHResignCertificateModel = YHResignCertificateModel()
var isDisableEdit: Bool = false
var dataModel: YHResignCertificateModel = YHResignCertificateModel() {
didSet {
isDisableEdit = dataModel.status == ResignCertificateStatus.Complete.rawValue
reasonLabel.isHidden = (dataModel.status != ResignCertificateStatus.Rejected.rawValue)
reasonLabel.text = "被驳回原因:" + dataModel.audit_remark
reasonLabel.snp.remakeConstraints { make in
make.left.equalTo(18)
make.right.equalTo(-18)
if dataModel.status != ResignCertificateStatus.Rejected.rawValue {
make.height.equalTo(0)
}
make.top.equalTo(lineView.snp.bottom).offset(dataModel.status == ResignCertificateStatus.Rejected.rawValue ? 18 : 0)
}
cardBeginView.isUserInteractionEnabled = !isDisableEdit
cardEndView.isUserInteractionEnabled = !isDisableEdit
cerNumberView.isUserInteractionEnabled = !isDisableEdit
cerSignPlaceView.isUserInteractionEnabled = !isDisableEdit
signBeginView.isUserInteractionEnabled = !isDisableEdit
signEndView.isUserInteractionEnabled = !isDisableEdit
if dataModel.status == ResignCertificateStatus.NotUpload.rawValue {
statusButton.backgroundColor = UIColor.brandMainColor(alpha: 0.08)
statusButton.setTitle("待上传", for: .normal)
statusButton.setTitleColor(UIColor.brandMainColor, for: .normal)
} else if dataModel.status == ResignCertificateStatus.Review.rawValue {
statusButton.backgroundColor = UIColor(hex: 0xFF8000).withAlphaComponent(0.08)
statusButton.setTitle("审核中", for: .normal)
statusButton.setTitleColor(UIColor(hex: 0xFF8000), for: .normal)
} else if dataModel.status == ResignCertificateStatus.Complete.rawValue {
statusButton.backgroundColor = UIColor(hex: 0x3CC694).withAlphaComponent(0.08)
statusButton.setTitle("已完成", for: .normal)
statusButton.setTitleColor(UIColor(hex: 0x3CC694), for: .normal)
} else if dataModel.status == ResignCertificateStatus.Rejected.rawValue {
statusButton.backgroundColor = UIColor(hex: 0xF81D22).withAlphaComponent(0.08)
statusButton.setTitle("已驳回", for: .normal)
statusButton.setTitleColor(UIColor(hex: 0xF81D22), for: .normal)
}
}
}
var failString: String = "" {
didSet {
showMessageLabel.text = failString
......@@ -71,57 +122,53 @@ class YHResignCertificateHKTableViewCell: UITableViewCell {
didSet {
guard let firstUrl = urls?.first, firstUrl.count != 0 else {
guard let lastUrl = urls?.last, lastUrl.count != 0 else {
cerInfoLabel.isHidden = true
cerNumberView.isHidden = true
cerSignPlaceView.isHidden = true
cardLabel.isHidden = true
signLabel.isHidden = true
cardBeginView.isHidden = true
cardEndView.isHidden = true
signBeginView.isHidden = true
signEndView.isHidden = true
showMessageLabel.isHidden = true
infoView.isHidden = true
infoView.snp.remakeConstraints { make in
make.left.right.equalToSuperview()
make.top.equalTo(frontImageButton.snp.bottom).offset(0)
make.height.equalTo(0)
make.bottom.equalToSuperview().offset(-18)
}
return
}
cerInfoLabel.isHidden = false
cerNumberView.isHidden = false
cerSignPlaceView.isHidden = false
cardLabel.isHidden = false
signLabel.isHidden = false
cardBeginView.isHidden = false
cardEndView.isHidden = false
signBeginView.isHidden = false
signEndView.isHidden = false
showMessageLabel.isHidden = false
infoView.isHidden = false
infoView.snp.remakeConstraints { make in
make.left.right.equalToSuperview()
make.top.equalTo(frontImageButton.snp.bottom).offset(0)
make.bottom.equalToSuperview().offset(0)
}
self.lastUrl = lastUrl
self.viewModel.getPublicImageUrl(lastUrl) {[weak self] success, _ in
guard let self = self else { return }
guard let url = success else { return }
self.backSurfaceImageButton.kf.setBackgroundImage(with: URL(string: url), for: .normal, completionHandler: { _ in
self.backSurfaceDeleteButton.isHidden = false
if self.isDisableEdit {
self.backSurfaceDeleteButton.isHidden = true
} else {
self.backSurfaceDeleteButton.isHidden = false
}
})
self.backSurfaceImageButton.setContent("", "")
}
return
}
cerInfoLabel.isHidden = false
cerNumberView.isHidden = false
cerSignPlaceView.isHidden = false
cardLabel.isHidden = false
signLabel.isHidden = false
cardBeginView.isHidden = false
cardEndView.isHidden = false
signBeginView.isHidden = false
signEndView.isHidden = false
showMessageLabel.isHidden = false
infoView.isHidden = false
infoView.snp.remakeConstraints { make in
make.left.right.equalToSuperview()
make.top.equalTo(frontImageButton.snp.bottom).offset(0)
make.bottom.equalToSuperview().offset(0)
}
self.firstUrl = firstUrl
self.viewModel.getPublicImageUrl(firstUrl) {[weak self] success, _ in
guard let self = self else { return }
guard let url = success else { return }
self.frontImageButton.kf.setBackgroundImage(with: URL(string: url), for: .normal, completionHandler: { _ in
self.frontDeleteButton.isHidden = false
if self.isDisableEdit {
self.frontDeleteButton.isHidden = true
} else {
self.frontDeleteButton.isHidden = false
}
})
self.frontImageButton.setContent("", "")
}
......@@ -131,7 +178,11 @@ class YHResignCertificateHKTableViewCell: UITableViewCell {
guard let self = self else { return }
guard let url = success else { return }
self.backSurfaceImageButton.kf.setBackgroundImage(with: URL(string: url), for: .normal, completionHandler: { _ in
self.backSurfaceDeleteButton.isHidden = false
if self.isDisableEdit {
self.backSurfaceDeleteButton.isHidden = true
} else {
self.backSurfaceDeleteButton.isHidden = false
}
})
self.backSurfaceImageButton.setContent("", "")
}
......@@ -291,6 +342,35 @@ class YHResignCertificateHKTableViewCell: UITableViewCell {
return button
}()
centerView.addSubview(exampleButton)
statusButton = {
let button = UIButton(type: .custom)
button.backgroundColor = UIColor.brandMainColor.withAlphaComponent(0.08)
button.titleLabel?.font = UIFont.PFSC_M(ofSize: 10)
button.contentHorizontalAlignment = .center
button.setTitle("", for: .normal)
button.setTitleColor( UIColor.brandMainColor, for: .normal)
button.layer.cornerRadius = kCornerRadius2
return button
}()
centerView.addSubview(statusButton)
lineView = {
let view = UIView()
view.backgroundColor = UIColor.separatorColor
return view
}()
centerView.addSubview(lineView)
reasonLabel = {
let label = UILabel()
label.font = UIFont.PFSC_R(ofSize: 12)
label.textColor = UIColor.failColor
label.textAlignment = .left
label.numberOfLines = 0
label.text = "被驳回原因:"
return label
}()
centerView.addSubview(reasonLabel)
frontLabel = {
let label = UILabel()
label.font = UIFont.PFSC_R(ofSize: 12)
......@@ -357,6 +437,12 @@ class YHResignCertificateHKTableViewCell: UITableViewCell {
return view
}()
centerView.addSubview(activityIndicator)
infoView = {
let view = UIView()
return view
}()
centerView.addSubview(infoView)
showMessageLabel = {
let label = UILabel()
label.font = UIFont.PFSC_R(ofSize: 12)
......@@ -364,7 +450,7 @@ class YHResignCertificateHKTableViewCell: UITableViewCell {
label.text = "无法识别,请核查文件"
return label
}()
centerView.addSubview(showMessageLabel)
infoView.addSubview(showMessageLabel)
cerInfoLabel = {
let label = UILabel()
label.font = UIFont.PFSC_M(ofSize: 15)
......@@ -372,7 +458,7 @@ class YHResignCertificateHKTableViewCell: UITableViewCell {
label.text = "证件信息"
return label
}()
centerView.addSubview(cerInfoLabel)
infoView.addSubview(cerInfoLabel)
cerNumberView = {
let view = YHItemView()
let line = UIView()
......@@ -390,7 +476,7 @@ class YHResignCertificateHKTableViewCell: UITableViewCell {
block(model)
}
}
centerView.addSubview(cerNumberView)
infoView.addSubview(cerNumberView)
cerSignPlaceView = {
let view = YHItemView()
......@@ -409,7 +495,7 @@ class YHResignCertificateHKTableViewCell: UITableViewCell {
block(model)
}
}
centerView.addSubview(cerSignPlaceView)
infoView.addSubview(cerSignPlaceView)
// 【卡片有效期 UI】
cardLabel = {
let label = UILabel()
......@@ -418,7 +504,7 @@ class YHResignCertificateHKTableViewCell: UITableViewCell {
label.text = "卡片有效期"
return label
}()
centerView.addSubview(cardLabel)
infoView.addSubview(cardLabel)
cardBeginView = {
let view = YHItemView()
let line = UIView()
......@@ -436,7 +522,7 @@ class YHResignCertificateHKTableViewCell: UITableViewCell {
block(model)
}
}
centerView.addSubview(cardBeginView)
infoView.addSubview(cardBeginView)
cardEndView = {
let view = YHItemView()
let line = UIView()
......@@ -461,7 +547,7 @@ class YHResignCertificateHKTableViewCell: UITableViewCell {
}
}
}
centerView.addSubview(cardEndView)
infoView.addSubview(cardEndView)
// 【签注有效期 UI】
signLabel = {
......@@ -471,7 +557,7 @@ class YHResignCertificateHKTableViewCell: UITableViewCell {
label.text = "签注有效期"
return label
}()
centerView.addSubview(signLabel)
infoView.addSubview(signLabel)
signBeginView = {
let view = YHItemView()
......@@ -490,7 +576,7 @@ class YHResignCertificateHKTableViewCell: UITableViewCell {
block(model)
}
}
centerView.addSubview(signBeginView)
infoView.addSubview(signBeginView)
signEndView = {
let view = YHItemView()
......@@ -509,7 +595,7 @@ class YHResignCertificateHKTableViewCell: UITableViewCell {
}
}
}
centerView.addSubview(signEndView)
infoView.addSubview(signEndView)
makeConstraints()
}
......@@ -532,36 +618,44 @@ class YHResignCertificateHKTableViewCell: UITableViewCell {
make.height.equalTo(16)
make.width.equalTo(48)
}
statusButton.snp.makeConstraints { make in
make.left.equalTo(exampleButton.snp.right).offset(8)
make.centerY.equalTo(titleLabel.snp.centerY)
make.height.equalTo(16)
make.width.equalTo(38)
make.right.lessThanOrEqualTo(-8)
}
let lineView = {
let view = UIView()
view.backgroundColor = UIColor.separatorColor
return view
}()
centerView.addSubview(lineView)
lineView.snp.makeConstraints { make in
make.left.right.equalToSuperview()
make.top.equalTo(52)
make.height.equalTo(1)
}
reasonLabel.snp.makeConstraints { make in
make.left.equalTo(18)
make.right.equalTo(-18)
make.height.equalTo(0)
make.top.equalTo(lineView.snp.bottom).offset(18)
}
frontLabel.snp.makeConstraints { make in
make.left.equalTo(18)
make.right.equalTo(self.snp.centerX)
make.top.equalTo(70)
make.top.equalTo(reasonLabel.snp.bottom).offset(18)
make.height.equalTo(20)
}
backSurfaceLabel.snp.makeConstraints { make in
make.right.equalTo(-18)
make.left.equalTo(self.snp.centerX)
make.top.equalTo(70)
make.top.equalTo(reasonLabel.snp.bottom).offset(18)
make.height.equalTo(20)
}
frontImageButton.snp.makeConstraints { make in
make.left.equalTo(18)
make.top.equalTo(102)
make.top.equalTo(frontLabel.snp.bottom).offset(12)
make.height.equalTo(91)
make.width.equalTo(CGFloat(147).fix)
}
......@@ -575,7 +669,7 @@ class YHResignCertificateHKTableViewCell: UITableViewCell {
backSurfaceImageButton.snp.makeConstraints { make in
make.right.equalTo(-18)
make.top.equalTo(102)
make.top.equalTo(backSurfaceLabel.snp.bottom).offset(12)
make.height.equalTo(91)
make.width.equalTo(CGFloat(147).fix)
}
......@@ -593,17 +687,23 @@ class YHResignCertificateHKTableViewCell: UITableViewCell {
make.width.equalTo(25)
}
infoView.snp.makeConstraints { make in
make.left.right.equalToSuperview()
make.top.equalTo(frontImageButton.snp.bottom).offset(0)
make.bottom.equalToSuperview().offset(-18)
}
showMessageLabel.snp.makeConstraints { make in
make.left.equalTo(18)
make.right.equalTo(-18)
make.top.equalTo(201)
make.top.equalToSuperview().offset(8)
make.height.equalTo(20)
}
cerInfoLabel.snp.makeConstraints { make in
make.left.equalTo(18)
make.right.equalTo(-18)
make.top.equalTo(229)
make.top.equalTo(showMessageLabel.snp.bottom).offset(8)
make.height.equalTo(20)
}
......@@ -654,12 +754,13 @@ class YHResignCertificateHKTableViewCell: UITableViewCell {
make.height.equalTo(52)
make.right.equalTo(-18)
}
centerView.addSubview(signEndView)
infoView.addSubview(signEndView)
signEndView.snp.makeConstraints { make in
make.left.equalTo(18)
make.top.equalTo(signBeginView.snp.bottom)
make.height.equalTo(52)
make.right.equalTo(-18)
make.bottom.equalTo(0)
}
}
......@@ -722,6 +823,9 @@ class YHResignCertificateHKTableViewCell: UITableViewCell {
}
@objc func frontDeleteClick() {
if self.isDisableEdit {
return
}
firstUrl = ""
frontDeleteButton.isHidden = true
frontImageButton.setBackgroundImage(UIImage(named: firstImageName), for: .normal)
......@@ -732,6 +836,9 @@ class YHResignCertificateHKTableViewCell: UITableViewCell {
}
@objc func backSurfaceDeleteClick() {
if self.isDisableEdit {
return
}
lastUrl = ""
backSurfaceDeleteButton.isHidden = true
backSurfaceImageButton.setBackgroundImage(UIImage(named: lastImageName), for: .normal)
......
......@@ -8,6 +8,13 @@
import UIKit
enum ResignCertificateStatus: Int {
case NotUpload = 0 // 待上传
case Review = 1 // 审核中
case Complete = 2 // 已完成
case Rejected = 3 // 已驳回
}
class YHResignCertificateListTableViewCell: UITableViewCell {
typealias ResignCertificateBlock = (_ model: YHResignCertificateModel) -> Void
var clickBlock: ResignCertificateBlock?
......@@ -213,15 +220,32 @@ class YHResignCertificateView: UIView {
func updateAllViews() {
guard let dataSource = dataSource else { return }
titleLabel.text = dataSource.name
if dataSource.status == 1 {
if dataSource.status == ResignCertificateStatus.NotUpload.rawValue {
explainLabel.text = "待上传"
explainLabel.textColor = UIColor.brandMainColor
nextStepImageView.image = UIImage(named: "service_adopter_income_start")
nextStepImageView.image = UIImage(named: "service_adopter_income_start")?.withRenderingMode(.alwaysTemplate)
nextStepImageView.tintColor = UIColor.brandMainColor
}
if dataSource.status == ResignCertificateStatus.Review.rawValue {
explainLabel.text = "审核中"
explainLabel.textColor = UIColor(hex: 0xFF8000)
nextStepImageView.image = UIImage(named: "service_adopter_income_start")?.withRenderingMode(.alwaysTemplate)
nextStepImageView.tintColor = UIColor(hex: 0xFF8000)
}
if dataSource.status == 2 {
if dataSource.status == ResignCertificateStatus.Complete.rawValue {
explainLabel.text = "已完成"
explainLabel.textColor = UIColor(hex: 0x3cc694)
nextStepImageView.image = UIImage(named: "service_adopter_income_success")
nextStepImageView.image = UIImage(named: "service_adopter_income_success")?.withRenderingMode(.alwaysTemplate)
nextStepImageView.tintColor = UIColor(hex: 0x3cc694)
}
if dataSource.status == ResignCertificateStatus.Rejected.rawValue {
explainLabel.text = "已驳回"
explainLabel.textColor = UIColor(hex: 0xF81D22)
nextStepImageView.image = UIImage(named: "service_adopter_income_start")?.withRenderingMode(.alwaysTemplate)
nextStepImageView.tintColor = UIColor(hex: 0xF81D22)
}
if dataSource.cert_type == "PASS_PORT" {
......
......@@ -18,12 +18,16 @@ class YHResignCertificatePassportTableViewCell: UITableViewCell {
var block: ItemBlock?
var centerView: UIView!
var titleLabel: UILabel!
var lineView: UIView!
var exampleButton: UIButton!
var statusButton: UIButton!
var reasonLabel: UILabel!
var frontLabel: UILabel!
var frontImageButton: YHCardButton!
var frontDeleteButton: UIButton!
var activityIndicator: UIActivityIndicatorView!
var showMessageLabel: UILabel!
var infoView: UIView!
var cerInfoLabel: UILabel!
var cerNumberView: YHItemView!
var cerSignPlaceView: YHItemView!
......@@ -33,7 +37,51 @@ class YHResignCertificatePassportTableViewCell: UITableViewCell {
var viewModel: YHBaseViewModel = YHBaseViewModel()
var firstUrl: String = ""
var lastUrl: String = ""
var dataModel: YHResignCertificateModel = YHResignCertificateModel()
var dataModel: YHResignCertificateModel = YHResignCertificateModel() {
didSet {
isDisableEdit = dataModel.status == ResignCertificateStatus.Complete.rawValue
reasonLabel.isHidden = (dataModel.status != ResignCertificateStatus.Rejected.rawValue)
reasonLabel.text = "被驳回原因:" + dataModel.audit_remark
reasonLabel.snp.remakeConstraints { make in
make.left.equalTo(18)
make.right.equalTo(-18)
if dataModel.status != ResignCertificateStatus.Rejected.rawValue {
make.height.equalTo(0)
}
make.top.equalTo(lineView.snp.bottom).offset(dataModel.status == ResignCertificateStatus.Rejected.rawValue ? 18 : 0)
}
cardBeginView.isUserInteractionEnabled = !isDisableEdit
cardEndView.isUserInteractionEnabled = !isDisableEdit
cerNumberView.isUserInteractionEnabled = !isDisableEdit
cerSignPlaceView.isUserInteractionEnabled = !isDisableEdit
if dataModel.status == ResignCertificateStatus.NotUpload.rawValue {
statusButton.backgroundColor = UIColor.brandMainColor(alpha: 0.08)
statusButton.setTitle("待上传", for: .normal)
statusButton.setTitleColor(UIColor.brandMainColor, for: .normal)
} else if dataModel.status == ResignCertificateStatus.Review.rawValue {
statusButton.backgroundColor = UIColor(hex: 0xFF8000).withAlphaComponent(0.08)
statusButton.setTitle("审核中", for: .normal)
statusButton.setTitleColor(UIColor(hex: 0xFF8000), for: .normal)
} else if dataModel.status == ResignCertificateStatus.Complete.rawValue {
statusButton.backgroundColor = UIColor(hex: 0x3CC694).withAlphaComponent(0.08)
statusButton.setTitle("已完成", for: .normal)
statusButton.setTitleColor(UIColor(hex: 0x3CC694), for: .normal)
} else if dataModel.status == ResignCertificateStatus.Rejected.rawValue {
statusButton.backgroundColor = UIColor(hex: 0xF81D22).withAlphaComponent(0.08)
statusButton.setTitle("已驳回", for: .normal)
statusButton.setTitleColor(UIColor(hex: 0xF81D22), for: .normal)
}
}
}
var isDisableEdit: Bool = false
var failString: String = "" {
didSet {
showMessageLabel.text = failString
......@@ -54,30 +102,34 @@ class YHResignCertificatePassportTableViewCell: UITableViewCell {
var urls: [String]? {
didSet {
guard let firstUrl = urls?.first, firstUrl.count != 0 else {
cerInfoLabel.isHidden = true
cerNumberView.isHidden = true
cerSignPlaceView.isHidden = true
cardLabel.isHidden = true
cardBeginView.isHidden = true
cardEndView.isHidden = true
showMessageLabel.isHidden = true
infoView.isHidden = true
infoView.snp.remakeConstraints { make in
make.left.right.equalToSuperview()
make.top.equalTo(frontImageButton.snp.bottom).offset(0)
make.height.equalTo(0)
make.bottom.equalToSuperview().offset(-18)
}
return
}
cerInfoLabel.isHidden = false
cerNumberView.isHidden = false
cerSignPlaceView.isHidden = false
cardLabel.isHidden = false
cardBeginView.isHidden = false
cardEndView.isHidden = false
showMessageLabel.isHidden = false
infoView.isHidden = false
infoView.snp.remakeConstraints { make in
make.left.right.equalToSuperview()
make.top.equalTo(frontImageButton.snp.bottom).offset(0)
make.bottom.equalToSuperview().offset(0)
}
self.firstUrl = firstUrl
self.viewModel.getPublicImageUrl(firstUrl) {[weak self] success, _ in
guard let self = self else { return }
guard let url = success else { return }
self.frontImageButton.kf.setBackgroundImage(with: URL(string: url), for: .normal, completionHandler: { _ in
self.frontDeleteButton.isHidden = false
if self.isDisableEdit {
self.frontDeleteButton.isHidden = true
} else {
self.frontDeleteButton.isHidden = false
}
})
self.frontImageButton.setContent("", "")
}
......@@ -218,7 +270,26 @@ class YHResignCertificatePassportTableViewCell: UITableViewCell {
make.width.equalTo(48)
}
let lineView = {
statusButton = {
let button = UIButton(type: .custom)
button.backgroundColor = UIColor.brandMainColor.withAlphaComponent(0.08)
button.titleLabel?.font = UIFont.PFSC_M(ofSize: 10)
button.contentHorizontalAlignment = .center
button.setTitle("", for: .normal)
button.setTitleColor( UIColor.brandMainColor, for: .normal)
button.layer.cornerRadius = kCornerRadius2
return button
}()
centerView.addSubview(statusButton)
statusButton.snp.makeConstraints { make in
make.left.equalTo(exampleButton.snp.right).offset(8)
make.centerY.equalTo(titleLabel.snp.centerY)
make.height.equalTo(16)
make.width.equalTo(38)
make.right.lessThanOrEqualTo(-8)
}
lineView = {
let view = UIView()
view.backgroundColor = UIColor.separatorColor
return view
......@@ -230,6 +301,23 @@ class YHResignCertificatePassportTableViewCell: UITableViewCell {
make.height.equalTo(1)
}
reasonLabel = {
let label = UILabel()
label.font = UIFont.PFSC_R(ofSize: 12)
label.textColor = UIColor.failColor
label.textAlignment = .left
label.numberOfLines = 0
label.text = "被驳回原因:"
return label
}()
centerView.addSubview(reasonLabel)
reasonLabel.snp.makeConstraints { make in
make.left.equalTo(18)
make.right.equalTo(-18)
make.height.equalTo(0)
make.top.equalTo(lineView.snp.bottom).offset(18)
}
frontLabel = {
let label = UILabel()
label.font = UIFont.PFSC_R(ofSize: 12)
......@@ -242,7 +330,7 @@ class YHResignCertificatePassportTableViewCell: UITableViewCell {
frontLabel.snp.makeConstraints { make in
make.left.equalTo(18)
make.right.equalTo(self.snp.centerX)
make.top.equalTo(70)
make.top.equalTo(reasonLabel.snp.bottom).offset(18)
make.height.equalTo(20)
}
......@@ -258,7 +346,7 @@ class YHResignCertificatePassportTableViewCell: UITableViewCell {
centerView.addSubview(frontImageButton)
frontImageButton.snp.makeConstraints { make in
make.left.equalTo(18)
make.top.equalTo(102)
make.top.equalTo(frontLabel.snp.bottom).offset(12)
make.height.equalTo(91)
make.width.equalTo(CGFloat(147).fix)
}
......@@ -290,6 +378,17 @@ class YHResignCertificatePassportTableViewCell: UITableViewCell {
make.width.equalTo(25)
}
infoView = {
let view = UIView()
return view
}()
centerView.addSubview(infoView)
infoView.snp.makeConstraints { make in
make.left.right.equalToSuperview()
make.top.equalTo(frontImageButton.snp.bottom).offset(0)
make.bottom.equalToSuperview().offset(-18)
}
showMessageLabel = {
let label = UILabel()
label.font = UIFont.PFSC_R(ofSize: 12)
......@@ -297,11 +396,11 @@ class YHResignCertificatePassportTableViewCell: UITableViewCell {
label.text = "无法识别,请核查文件"
return label
}()
centerView.addSubview(showMessageLabel)
infoView.addSubview(showMessageLabel)
showMessageLabel.snp.makeConstraints { make in
make.left.equalTo(18)
make.right.equalTo(-18)
make.top.equalTo(201)
make.top.equalToSuperview().offset(8)
make.height.equalTo(20)
}
......@@ -313,11 +412,11 @@ class YHResignCertificatePassportTableViewCell: UITableViewCell {
label.text = "证件信息"
return label
}()
centerView.addSubview(cerInfoLabel)
infoView.addSubview(cerInfoLabel)
cerInfoLabel.snp.makeConstraints { make in
make.left.equalTo(18)
make.right.equalTo(-18)
make.top.equalTo(229)
make.top.equalTo(showMessageLabel.snp.bottom).offset(8)
make.height.equalTo(20)
}
cerNumberView = {
......@@ -337,7 +436,7 @@ class YHResignCertificatePassportTableViewCell: UITableViewCell {
block(model)
}
}
centerView.addSubview(cerNumberView)
infoView.addSubview(cerNumberView)
cerNumberView.snp.makeConstraints { make in
make.left.equalTo(18)
make.top.equalTo(cerInfoLabel.snp.bottom)
......@@ -362,7 +461,7 @@ class YHResignCertificatePassportTableViewCell: UITableViewCell {
block(model)
}
}
centerView.addSubview(cerSignPlaceView)
infoView.addSubview(cerSignPlaceView)
cerSignPlaceView.snp.makeConstraints { make in
make.left.equalTo(18)
make.top.equalTo(cerNumberView.snp.bottom)
......@@ -378,7 +477,7 @@ class YHResignCertificatePassportTableViewCell: UITableViewCell {
label.text = "卡片有效期"
return label
}()
centerView.addSubview(cardLabel)
infoView.addSubview(cardLabel)
cardLabel.snp.makeConstraints { make in
make.left.equalTo(18)
make.right.equalTo(-18)
......@@ -403,7 +502,7 @@ class YHResignCertificatePassportTableViewCell: UITableViewCell {
block(model)
}
}
centerView.addSubview(cardBeginView)
infoView.addSubview(cardBeginView)
cardBeginView.snp.makeConstraints { make in
make.left.equalTo(18)
make.top.equalTo(cardLabel.snp.bottom).offset(0)
......@@ -426,12 +525,13 @@ class YHResignCertificatePassportTableViewCell: UITableViewCell {
}
}
}
centerView.addSubview(cardEndView)
infoView.addSubview(cardEndView)
cardEndView.snp.makeConstraints { make in
make.left.equalTo(18)
make.top.equalTo(cardBeginView.snp.bottom)
make.height.equalTo(52)
make.right.equalTo(-18)
make.bottom.equalTo(0)
}
}
......
......@@ -11,8 +11,9 @@ import UIKit
class YHResignCertificateListViewModel: YHBaseViewModel {
var mainModel: YHResignCertificateMainModel = YHResignCertificateMainModel()
func getResignCertificateList(orderId: Int, callBackBlock: @escaping (_ success: Bool, _ error: YHErrorModel?) -> Void) {
let param = ["orderId": orderId]
func getResignCertificateList(orderId: Int, batchId: Int, callBackBlock: @escaping (_ success: Bool, _ error: YHErrorModel?) -> Void) {
let param = ["orderId": orderId,
"renewal_id": batchId]
let strUrl = YHBaseUrlManager.shared.curURL() + YHAllApiName.ResignCertificate.resignCertificateList
_ = YHNetRequest.getRequest(url: strUrl, params: param) { [weak self] json, _ in
// 1. json字符串 转 对象
......
......@@ -818,4 +818,15 @@ extension YHJsApi {
}
}
}
@objc func goServiceStatus(_ status: Any) {
DispatchQueue.main.async {
UIViewController.current?.navigationController?.popToRootViewController(animated: false)
goTabBarBy(tabType: .service)
let value: String = status as? String ?? "0"
NotificationCenter.default.post(name: YhConstant.YhNotification.didJumpToServicePageSwitchIndexNotification, object: nil, userInfo: ["status": value])
}
}
}
......@@ -616,6 +616,7 @@ extension YHMessageDetailListVC: UITableViewDelegate, UITableViewDataSource {
if let orderId = Int(msg.orderId) {
let vc = YHResignCertificateListViewController()
vc.orderId = orderId
vc.batchId = self.serviceCenterViewModel.mainModel.master_id
UIViewController.current?.navigationController?.pushViewController(vc)
}
......
......@@ -411,6 +411,7 @@ extension YhConstant {
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")
public static let didJumpToServicePageSwitchIndexNotification = Notification.Name(rawValue: "com.yinhe.service.tab.switch")
// txIM未读消息数量变化
public static let didTxIMUnReadMsgCountChangeNotification = Notification.Name(rawValue: "com.yinhe.txIM.unReadMsgCountChange")
......
......@@ -30,6 +30,19 @@ class YHBaseUrlManager {
#endif
}
// 高专留续签
func renewalURL() -> String {
#if DEBUG
return "https://test-unih5.galaxy-immi.com" + "/#/"
#elseif TESTENV
return "https://test-unih5.galaxy-immi.com" + "/#/"
#elseif UATENV
return "https://unih5.galaxy-immi.com" + "/#/"
#else
return "https://unih5.galaxy-immi.com" + "/#/"
#endif
}
// ossUrl
func curOssURL() -> String {
return YHConfigManager.shared.ossUrl
......@@ -53,4 +66,34 @@ class YHBaseUrlManager {
func curUserItemsUrl() -> String {
return curH5URL() + "superApp/service"
}
// 生意星
func curBusinessStarUrl() -> String {
var url = ""
#if DEBUG
url = "https://test-businessh5.galaxy-immi.com/pre-sale/business"
#elseif TESTENV
url = "https://test-businessh5.galaxy-immi.com/pre-sale/business"
#elseif UATENV
url = "https://businessh5.galaxy-immi.com/pre-sale/business"
#else
url = "https://businessh5.galaxy-immi.com/pre-sale/business"
#endif
return url
}
// 生意星
func curBusinessStarStoreUrl() -> String {
var url = ""
#if DEBUG
url = "https://test-businessh5.galaxy-immi.com/pre-sale/store"
#elseif TESTENV
url = "https://test-businessh5.galaxy-immi.com/pre-sale/store"
#elseif UATENV
url = "https://businessh5.galaxy-immi.com/pre-sale/store"
#else
url = "https://businessh5.galaxy-immi.com/pre-sale/store"
#endif
return url
}
}
......@@ -5,12 +5,12 @@
"scale" : "1x"
},
{
"filename" : "service_adopter_example_travel@2x.png",
"filename" : "Group 2033195748.png",
"idiom" : "universal",
"scale" : "2x"
},
{
"filename" : "service_adopter_example_travel@3x.png",
"filename" : "Group 2033195748-1.png",
"idiom" : "universal",
"scale" : "3x"
}
......
......@@ -18,5 +18,8 @@
"info" : {
"author" : "xcode",
"version" : 1
},
"properties" : {
"template-rendering-intent" : "template"
}
}
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