Commit 04f92847 authored by pete谢兆麟's avatar pete谢兆麟

UI走查bug修复

parent eae35793
......@@ -33,6 +33,7 @@
0411CF162D1C0D0C00644D35 /* YHGCSignatureAddTableViewCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0411CF152D1C0D0C00644D35 /* YHGCSignatureAddTableViewCell.swift */; };
0411CF182D1D502D00644D35 /* YHlifeCollectionReusableView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0411CF172D1D502D00644D35 /* YHlifeCollectionReusableView.swift */; };
0411CF1A2D22960900644D35 /* YHGCWorkExperienceListReasonTableViewCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0411CF192D22960900644D35 /* YHGCWorkExperienceListReasonTableViewCell.swift */; };
0411CF1C2D2BA99500644D35 /* YHGCWorkExperienceListTableViewCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0411CF1B2D2BA99500644D35 /* YHGCWorkExperienceListTableViewCell.swift */; };
04307B662D1942F500ED8E8D /* YHDynamicSheetPickerView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 04307B652D1942F500ED8E8D /* YHDynamicSheetPickerView.swift */; };
04307B682D19911800ED8E8D /* YHIncomeInfoEditCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = 04307B672D19911800ED8E8D /* YHIncomeInfoEditCell.swift */; };
04307B6A2D1A4C6500ED8E8D /* YHIncomeInfoSelectCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = 04307B692D1A4C6500ED8E8D /* YHIncomeInfoSelectCell.swift */; };
......@@ -1250,6 +1251,7 @@
0411CF152D1C0D0C00644D35 /* YHGCSignatureAddTableViewCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHGCSignatureAddTableViewCell.swift; sourceTree = "<group>"; };
0411CF172D1D502D00644D35 /* YHlifeCollectionReusableView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHlifeCollectionReusableView.swift; sourceTree = "<group>"; };
0411CF192D22960900644D35 /* YHGCWorkExperienceListReasonTableViewCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHGCWorkExperienceListReasonTableViewCell.swift; sourceTree = "<group>"; };
0411CF1B2D2BA99500644D35 /* YHGCWorkExperienceListTableViewCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHGCWorkExperienceListTableViewCell.swift; sourceTree = "<group>"; };
04307B652D1942F500ED8E8D /* YHDynamicSheetPickerView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHDynamicSheetPickerView.swift; sourceTree = "<group>"; };
04307B672D19911800ED8E8D /* YHIncomeInfoEditCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHIncomeInfoEditCell.swift; sourceTree = "<group>"; };
04307B692D1A4C6500ED8E8D /* YHIncomeInfoSelectCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHIncomeInfoSelectCell.swift; sourceTree = "<group>"; };
......@@ -2504,6 +2506,7 @@
0411CEEC2D15154A00644D35 /* YHGCWorkListHasWorkExperienceTableViewCell.swift */,
0411CEEE2D151E5F00644D35 /* YHGCWorkListHasDocTableViewCell.swift */,
0411CF192D22960900644D35 /* YHGCWorkExperienceListReasonTableViewCell.swift */,
0411CF1B2D2BA99500644D35 /* YHGCWorkExperienceListTableViewCell.swift */,
);
path = V;
sourceTree = "<group>";
......@@ -7654,6 +7657,7 @@
045C12BE2D12CA5F00BD2DC0 /* YHAddressPickViewTableViewCell.swift in Sources */,
045C12BF2D12CA5F00BD2DC0 /* YHAppVersionManager.swift in Sources */,
045C12C02D12CA5F00BD2DC0 /* Applegate(JPush).swift in Sources */,
0411CF1C2D2BA99500644D35 /* YHGCWorkExperienceListTableViewCell.swift in Sources */,
045C12C12D12CA5F00BD2DC0 /* YHResignScheduleSingleInfoCell.swift in Sources */,
045C12C22D12CA5F00BD2DC0 /* YHHKRecordsRemarkCell.swift in Sources */,
045C12C32D12CA5F00BD2DC0 /* YHLookResignResultHeadView.swift in Sources */,
......
......@@ -120,7 +120,6 @@ extension YHlifeCollectionReusableView: UITableViewDelegate, UITableViewDataSour
class YHlifeCollectionReusableViewHeadView: UIView {
var lineView: UIView!
var flagView: UIView!
var titleLabel: UILabel!
......@@ -136,18 +135,7 @@ class YHlifeCollectionReusableViewHeadView: UIView {
func setUpView() {
backgroundColor = .white
lineView = {
let view = UIView()
view.backgroundColor = UIColor.separatorColor
return view
}()
addSubview(lineView)
lineView.snp.makeConstraints { make in
make.left.right.equalToSuperview()
make.top.equalToSuperview()
make.height.equalTo(1)
}
flagView = {
let view = UIView()
view.backgroundColor = UIColor.brandMainColor
......@@ -163,7 +151,7 @@ class YHlifeCollectionReusableViewHeadView: UIView {
titleLabel = {
let label = UILabel()
label.text = "即将开播"
label.font = UIFont.PFSC_R(ofSize: 14)
label.font = UIFont(name: "AlimamaShuHeiTi-Bold", size: 14)
label.textColor = UIColor.mainTextColor
return label
}()
......@@ -226,7 +214,7 @@ class YHlifeCollectionReusableViewTableViewCell: UITableViewCell {
self.backgroundColor = .white
let bgview = {
let view = UIView()
view.layer.borderWidth = 1
view.layer.borderWidth = 0.5
view.layer.borderColor = UIColor.separatorColor.cgColor
return view
}()
......
......@@ -139,17 +139,17 @@ class YHServiceOrderAlertView: UIView {
make.top.equalTo(157)
}
let a: ASAttributedString = .init("1.当前仅支持查看", .font(UIFont.PFSC_M(ofSize: 15)),.foreground(UIColor.mainTextColor.withAlphaComponent(0.7)))
let a: ASAttributedString = .init("1.当前仅支持查看", .font(UIFont.PFSC_R(ofSize: 15)),.foreground(UIColor.mainTextColor.withAlphaComponent(0.7)))
let aa: ASAttributedString = .init(NSAttributedString(string: "优才与高才订单"), .font(UIFont.PFSC_M(ofSize: 15)),.foreground(UIColor.brandMainColor))
let aa: ASAttributedString = .init(NSAttributedString(string: "优才与高才订单"), .font(UIFont.PFSC_R(ofSize: 15)),.foreground(UIColor.brandMainColor))
let aaa: ASAttributedString = .init(",如果是签约了其他高才、专才、留学等订单,请与您的服务管家或销售顾问企微沟通联系哦", .font(UIFont.PFSC_M(ofSize: 15)),.foreground(UIColor.mainTextColor.withAlphaComponent(0.7)))
let aaa: ASAttributedString = .init(",如果是签约了其他高才、专才、留学等订单,请与您的服务管家或销售顾问企微沟通联系哦", .font(UIFont.PFSC_R(ofSize: 15)),.foreground(UIColor.mainTextColor.withAlphaComponent(0.7)))
let b: ASAttributedString = .init(NSAttributedString(string: "2.使用其他手机号签约合同/订单,请退出登录"), .font(UIFont.PFSC_M(ofSize: 15)),.foreground(UIColor.mainTextColor.withAlphaComponent(0.7)))
let b: ASAttributedString = .init(NSAttributedString(string: "2.使用其他手机号签约合同/订单,请退出登录"), .font(UIFont.PFSC_R(ofSize: 15)),.foreground(UIColor.mainTextColor.withAlphaComponent(0.7)))
let bb: ASAttributedString = .init("切换账号", .font(UIFont.PFSC_M(ofSize: 15)),.foreground(UIColor.brandMainColor))
let bbb: ASAttributedString = .init("查看", .font(UIFont.PFSC_M(ofSize: 15)),.foreground(UIColor.mainTextColor.withAlphaComponent(0.7)))
let bb: ASAttributedString = .init("切换账号", .font(UIFont.PFSC_R(ofSize: 15)),.foreground(UIColor.brandMainColor))
let bbb: ASAttributedString = .init("查看", .font(UIFont.PFSC_R(ofSize: 15)),.foreground(UIColor.mainTextColor.withAlphaComponent(0.7)))
measageLabel.attributed.text = a + aa + aaa
subMeasageLabel.attributed.text = b + bb + bbb
......
......@@ -184,7 +184,7 @@ extension YHSelectViewController: UITableViewDelegate, UITableViewDataSource {
}
func tableView(_ tableView: UITableView, heightForRowAt indexPath: IndexPath) -> CGFloat {
return 120
return 108
}
func tableView(_ tableView: UITableView, heightForHeaderInSection section: Int) -> CGFloat {
......@@ -266,9 +266,9 @@ class YHSelectLookTableViewCell: UITableViewCell {
if dataSource.catAttr == 2 {
flagLabel.isHidden = false
}
let a: ASAttributedString = .init("¥", .font(UIFont.PFSC_B(ofSize: 14)),.foreground(UIColor.mainTextColor))
let b: ASAttributedString = .init("\(dataSource.linePrice) ", .font(UIFont.PFSC_B(ofSize: 20)),.foreground(UIColor.mainTextColor))
let c: ASAttributedString = .init(\(dataSource.price)", .font(UIFont.PFSC_M(ofSize: 14)),.foreground(UIColor(hex:0x8993a2)), .strikethrough(.single))
let a: ASAttributedString = .init("¥", .font(UIFont(name: "DINAlternate-Bold", size: 14) ?? UIFont()),.foreground(UIColor.mainTextColor))
let b: ASAttributedString = .init("\(dataSource.linePrice) ", .font(UIFont(name: "DINAlternate-Bold", size: 20) ?? UIFont()),.foreground(UIColor.mainTextColor))
let c: ASAttributedString = .init(\(dataSource.price)", .font(UIFont(name: "DINAlternate-Bold", size: 20) ?? UIFont()),.foreground(UIColor(hex:0x8993a2)), .strikethrough(.single))
if dataSource.linePrice == dataSource.price {
self.subTitleLabel.attributed.text = a + b
} else {
......@@ -333,7 +333,7 @@ class YHSelectLookTableViewCell: UITableViewCell {
centerImageView.snp.makeConstraints { make in
make.centerY.equalToSuperview()
make.left.equalTo(20)
make.height.width.equalTo(80)
make.height.width.equalTo(68)
}
titleLabel = {
......
......@@ -283,7 +283,7 @@ class YHOrderDetailTableViewCell: UITableViewCell {
}
orderTitleLabel = {
let label = UILabel()
label.font = UIFont.PFSC_M(ofSize: 14)
label.font = UIFont.PFSC_R(ofSize: 14)
label.textColor = UIColor.mainTextColor.withAlphaComponent(0.5)
label.text = "订单类型: "
return label
......@@ -297,7 +297,7 @@ class YHOrderDetailTableViewCell: UITableViewCell {
orderTitleNumLabel = {
let label = UILabel()
label.font = UIFont.PFSC_M(ofSize: 14)
label.font = UIFont.PFSC_R(ofSize: 14)
label.textColor = UIColor.mainTextColor
// label.text = model.orderSn
label.textAlignment = .right
......@@ -312,7 +312,7 @@ class YHOrderDetailTableViewCell: UITableViewCell {
orderLabel = {
let label = UILabel()
label.font = UIFont.PFSC_M(ofSize: 14)
label.font = UIFont.PFSC_R(ofSize: 14)
label.textColor = UIColor.mainTextColor.withAlphaComponent(0.5)
label.text = "合同编号: "
return label
......@@ -326,7 +326,7 @@ class YHOrderDetailTableViewCell: UITableViewCell {
phoneLabel = {
let label = UILabel()
label.font = UIFont.PFSC_M(ofSize: 14)
label.font = UIFont.PFSC_R(ofSize: 14)
label.textColor = UIColor.mainTextColor.withAlphaComponent(0.5)
label.text = "签约手机号:"
return label
......@@ -340,7 +340,7 @@ class YHOrderDetailTableViewCell: UITableViewCell {
nameLabel = {
let label = UILabel()
label.font = UIFont.PFSC_M(ofSize: 14)
label.font = UIFont.PFSC_R(ofSize: 14)
label.textColor = UIColor.mainTextColor.withAlphaComponent(0.5)
label.text = "签约人姓名:"
return label
......@@ -354,7 +354,7 @@ class YHOrderDetailTableViewCell: UITableViewCell {
nameValueLabel = {
let label = UILabel()
label.font = UIFont.PFSC_M(ofSize: 14)
label.font = UIFont.PFSC_R(ofSize: 14)
label.textColor = UIColor.mainTextColor
// label.text = model.orderSn
label.textAlignment = .right
......@@ -369,7 +369,7 @@ class YHOrderDetailTableViewCell: UITableViewCell {
orderNumLabel = {
let label = UILabel()
label.font = UIFont.PFSC_M(ofSize: 14)
label.font = UIFont.PFSC_R(ofSize: 14)
label.textColor = UIColor.mainTextColor
// label.text = model.orderSn
label.textAlignment = .right
......@@ -384,7 +384,7 @@ class YHOrderDetailTableViewCell: UITableViewCell {
phoneNumLabel = {
let label = UILabel()
label.font = UIFont.PFSC_M(ofSize: 14)
label.font = UIFont.PFSC_R(ofSize: 14)
label.textColor = UIColor.mainTextColor
// label.text = model.mobile
label.textAlignment = .right
......@@ -400,7 +400,7 @@ class YHOrderDetailTableViewCell: UITableViewCell {
copyButton = {
let button = UIButton(type: .custom)
button.setTitle("复制", for: .normal)
button.titleLabel?.font = UIFont.PFSC_M(ofSize: 13)
button.titleLabel?.font = UIFont.PFSC_R(ofSize: 13)
button.setTitleColor(UIColor.brandMainColor, for: .normal)
button.addTarget(self, action: #selector(copyButtonClick), for: .touchUpInside)
return button
......@@ -416,7 +416,7 @@ class YHOrderDetailTableViewCell: UITableViewCell {
phoneCopyButton = {
let button = UIButton(type: .custom)
button.setTitle("复制", for: .normal)
button.titleLabel?.font = UIFont.PFSC_M(ofSize: 13)
button.titleLabel?.font = UIFont.PFSC_R(ofSize: 13)
button.setTitleColor(UIColor.brandMainColor, for: .normal)
button.addTarget(self, action: #selector(phoneCopyButtonClick), for: .touchUpInside)
return button
......@@ -469,7 +469,7 @@ class YHOrderDetailTableViewCell: UITableViewCell {
serviceLabel = {
let label = UILabel()
label.font = UIFont.PFSC_M(ofSize: 14)
label.font = UIFont.PFSC_R(ofSize: 14)
label.textColor = UIColor.mainTextColor.withAlphaComponent(0.5)
label.text = "服务内容"
return label
......@@ -483,7 +483,7 @@ class YHOrderDetailTableViewCell: UITableViewCell {
serviceValueLabel = {
let label = UILabel()
label.font = UIFont.PFSC_M(ofSize: 14)
label.font = UIFont.PFSC_R(ofSize: 14)
label.textColor = UIColor.mainTextColor
// label.text = model.orderSn
label.textAlignment = .right
......@@ -501,7 +501,7 @@ class YHOrderDetailTableViewCell: UITableViewCell {
button.setImage(UIImage(named: "service_right_icon"), for: .normal)
button.setTitleColor(UIColor.brandMainColor, for: .normal)
button.setTitle("查看详情", for: .normal)
button.titleLabel?.font = UIFont.PFSC_M(ofSize: 14)
button.titleLabel?.font = UIFont.PFSC_R(ofSize: 14)
button.contentHorizontalAlignment = .right
button.addTarget(self, action: #selector(showDetailClick), for: .touchUpInside)
button.isSelected = false
......
......@@ -449,7 +449,7 @@ extension YHServiceOrderListViewController : UITableViewDelegate,UITableViewData
func tableView(_ tableView: UITableView, heightForHeaderInSection section: Int) -> CGFloat {
if orderType == 3 {
return 42.fix + 16
return 42.fix + 20
}
if state == 3 && (type == 0 || type == 2) {
return 104
......@@ -460,7 +460,7 @@ extension YHServiceOrderListViewController : UITableViewDelegate,UITableViewData
func tableView(_ tableView: UITableView, viewForHeaderInSection section: Int) -> UIView? {
if orderType == 3 {
let view = YHServiceOrderInIncubationSectionView(frame: CGRect(x: 0, y: 0, width: KScreenWidth, height: 42.fix + 16))
let view = YHServiceOrderInIncubationSectionView(frame: CGRect(x: 0, y: 0, width: KScreenWidth, height: 42.fix + 20))
view.block = { [weak self] tag in
guard let self = self else { return }
YHServiceOrderInIncubationView.show(false) {
......
......@@ -143,7 +143,7 @@ class YHServiceOrderGuideTipsView: UIView {
buttonContentView.isHidden = !flag
if flag {
tableView.snp.remakeConstraints { make in
make.top.equalToSuperview().offset(120)
make.top.equalToSuperview().offset(100)
make.left.right.equalToSuperview()
make.width.equalTo(KScreenWidth)
make.height.equalTo(KScreenHeight - k_Height_NavigationtBarAndStatuBar - 98 - 120)
......@@ -315,7 +315,7 @@ private extension YHServiceOrderGuideTipsView {
whiteContentView.addSubview(tableView)
tableView.snp.makeConstraints { make in
make.top.equalToSuperview().offset(120)
make.top.equalToSuperview().offset(100)
make.right.left.equalToSuperview()
make.height.equalTo(whiteHeight - 98 - 120)
}
......@@ -406,10 +406,7 @@ class YHServiceOrderGuideTableViewCell: UITableViewCell {
}()
contentView.addSubview(centerImageView)
centerImageView.snp.makeConstraints { make in
make.top.equalTo(10)
make.left.equalTo(20)
make.right.equalTo(-20)
make.bottom.equalTo(-10)
make.top.left.right.bottom.equalToSuperview()
}
}
}
......@@ -148,12 +148,12 @@ class YHServiceOrderInIncubationView: UIView {
make.top.equalTo(131)
}
let a: ASAttributedString = .init("您的高才订单目前处于孵化状态, 若自评已满足申请条件(", .font(UIFont.PFSC_M(ofSize: 15)),.foreground(UIColor(hex: 0x6d788a)))
let a: ASAttributedString = .init("您的高才订单目前处于孵化状态, 若自评已满足申请条件(", .font(UIFont.PFSC_R(ofSize: 15)),.foreground(UIColor(hex: 0x6d788a)))
let aa: ASAttributedString = .init(NSAttributedString(string: "过去12个月收入为250W港币以上或获得入境处认可的院校学士学位"), .font(UIFont.PFSC_M(ofSize: 15)),.foreground(UIColor.brandMainColor))
let aaa: ASAttributedString = .init("),可点击进入【我的信息】,如实更新完善您的信息, 检查无误后提交,文案老师会进行评估并反馈。", .font(UIFont.PFSC_M(ofSize: 15)),.foreground(UIColor(hex: 0x6d788a)))
let aaa: ASAttributedString = .init("),可点击进入【我的信息】,如实更新完善您的信息, 检查无误后提交,文案老师会进行评估并反馈。", .font(UIFont.PFSC_R(ofSize: 15)),.foreground(UIColor(hex: 0x6d788a)))
measageLabel.attributed.text = a + aa + aaa
......
......@@ -45,11 +45,20 @@ extension YHServiceCenterViewModel {
}
DispatchQueue.main.async {
self.hasTTPS = false
var QMAS = false
var TTPS = false
self.arrContactList = resultModel.orders
for item in self.arrContactList {
if item.product_type == 2 {
self.hasTTPS = true
TTPS = true
}
if item.product_type == 1 {
QMAS = true
}
}
if TTPS && QMAS {
self.hasTTPS = true
}
callBackBlock(true,nil)
}
......
......@@ -142,7 +142,7 @@ class YHGCDocumentPromptTableViewCell: UITableViewCell {
}
} else {
if state == 1000 || state == 1001 || state == 1002 || state == 1003{
let a: ASAttributedString = .init("请您尽快核对文本内容,如需修改,可进行在线编辑\n内容无误,请主申请人", .font(UIFont.PFSC_R(ofSize: 12)),.foreground(UIColor.subTextColor2))
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 {
......
......@@ -35,6 +35,13 @@ class YHGCWorkExperienceListViewController: YHBaseViewController {
getData()
}
override func viewWillDisappear(_ animated: Bool) {
super.viewWillDisappear(animated)
viewModel?.requestWorkTimeRemarkWorkExperience(false, "\(orderId)", 1, callBackBlock: {[weak self] success, error in
guard let self = self else { return }
})
}
func getData() {
viewModel?.requestWorkList("\(orderId)", callBackBlock: {[weak self] success, error in
guard let self = self else { return }
......@@ -61,7 +68,9 @@ class YHGCWorkExperienceListViewController: YHBaseViewController {
tableView.separatorStyle = .none
tableView.delegate = self
tableView.dataSource = self
tableView.register(cellWithClass: YHWorkExperienceListTableViewCell.self)
tableView.tableHeaderView = UIView(frame: CGRect(x: 0, y: 0, width: KScreenWidth, height: 7))
tableView.tableFooterView = UIView(frame: CGRect(x: 0, y: 0, width: KScreenWidth, height: 7))
tableView.register(cellWithClass: YHGCWorkExperienceListTableViewCell.self)
tableView.register(cellWithClass: YHGCWorkListHasWorkExperienceTableViewCell.self)
tableView.register(cellWithClass: YHGCWorkListHasDocTableViewCell.self)
tableView.register(cellWithClass: YHGCWorkExperienceListReasonTableViewCell.self)
......@@ -92,7 +101,7 @@ class YHGCWorkExperienceListViewController: YHBaseViewController {
YHHUD.flash(message: "您的工作经验未全部填写完成,请先填写完成再提交")
return
}
viewModel?.requestWorkTimeRemarkWorkExperience("\(orderId)", 1, callBackBlock: {[weak self] success, error in
viewModel?.requestWorkTimeRemarkWorkExperience(true, "\(orderId)", 1, callBackBlock: {[weak self] success, error in
guard let self = self else { return }
if success ?? false {
self.navigationController?.popViewController(animated: true)
......@@ -101,9 +110,8 @@ class YHGCWorkExperienceListViewController: YHBaseViewController {
}
bottom.saveBlock = { [weak self] in
guard let self = self else { return }
viewModel?.requestWorkTimeRemarkWorkExperience("\(orderId)", callBackBlock: {[weak self] success, error in
viewModel?.requestWorkTimeRemarkWorkExperience(false, "\(orderId)", 1, callBackBlock: {[weak self] success, error in
guard let self = self else { return }
})
}
return bottom
......@@ -143,7 +151,7 @@ extension YHGCWorkExperienceListViewController: UITableViewDelegate, UITableView
}
return cell
} else if indexPath.row == 1 {
let cell = tableView.dequeueReusableCell(withClass: YHWorkExperienceListTableViewCell.self)
let cell = tableView.dequeueReusableCell(withClass: YHGCWorkExperienceListTableViewCell.self)
if self.viewModel.mainModel.has_work_experience == 1 {
cell.isHidden = false
} else {
......@@ -250,7 +258,7 @@ extension YHGCWorkExperienceListViewController: UITableViewDelegate, UITableView
let data = array[i]
let message = data.message ?? ""
let isShow = data.isShowPrompts ?? false
h = h + 62
h = h + 68
if isShow && message.count == 0 {
h = h + 20
}
......@@ -263,7 +271,7 @@ extension YHGCWorkExperienceListViewController: UITableViewDelegate, UITableView
if self.viewModel.mainModel.has_work_experience == 1 {
_ = dataSource?.count ?? 0
var height = 23 + 154
var height = 14 + 154
if let data = dataSource {
for item in data {
if item.company_name == "" {
......
......@@ -22,7 +22,7 @@ class YHGCWorkModel: SmartCodable {
var consent_work_id: Int = 0 //高才使用 可以提供赴港同意书的工作经历id
var has_center_consent: Int = 1 //高才使用 人才中心是否可以提供赴港同意书 0 未知 1 是 2 否
var why_work_time_overlap: String = "" //高才使用 关于工作时间重叠的说明
var has_work_experience: Int = 0 //高BC使用 是否有工作经历 0.未知 1.是 2.否
var has_work_experience: Int = 1 //高BC使用 是否有工作经历 0.未知 1.是 2.否
var is_consent_required: Int = 0 //高才使用 是否必须提供赴港同意书 0-否 1-是
var consent_template_url: String = ""
var list: [YHWorkItemListModel]?
......
//
// YHGCWorkExperienceListTableViewCell.swift
// galaxy
//
// Created by EDY on 2025/1/6.
// Copyright © 2025 https://www.galaxy-immi.com. All rights reserved.
//
import UIKit
class YHGCWorkExperienceListTableViewCell: UITableViewCell {
typealias ExperienceListBlock = (_ model: YHWorkItemListModel) -> ()
typealias IsMoreBlock = (_ isMore: Bool) -> ()
typealias NewWorkBlock = () -> ()
var clickBlock: ExperienceListBlock?
var deleteBlock: ExperienceListBlock?
var isMoreBlock: IsMoreBlock?
var newWorkBlock: NewWorkBlock?
var centerView: UIView!
var titleLabel: UILabel!
var subTitleLabel: UILabel!
var cannalButton: UIButton!
var moreButton: UIButton!
var mainItemView: UIView!
var bottomView: YHWorkItemAddView!
var showPrompt: Bool = false
var dataSource: [YHWorkItemListModel]?{
didSet {
updateAllViews()
}
}
override func awakeFromNib() {
super.awakeFromNib()
// Initialization code
}
override func setSelected(_ selected: Bool, animated: Bool) {
super.setSelected(selected, animated: animated)
// Configure the view for the selected state
}
required init?(coder: NSCoder) {
super.init(coder: coder)
}
override init(style: UITableViewCell.CellStyle, reuseIdentifier: String?) {
super.init(style: style, reuseIdentifier: reuseIdentifier)
selectionStyle = .none
setupUI()
}
func setupUI() {
backgroundColor = .clear
centerView = {
let view = UIView()
view.backgroundColor = .white
view.layer.cornerRadius = kCornerRadius6
return view
}()
contentView.addSubview(centerView)
centerView.snp.makeConstraints { make in
make.left.equalTo(16)
make.right.equalTo(-16)
make.top.equalTo(7)
make.bottom.equalTo(-7)
}
titleLabel = {
let label = UILabel()
label.font = UIFont.PFSC_M(ofSize: 17)
label.text = "主申请人工作经历"
label.textColor = UIColor.mainTextColor
return label
}()
centerView.addSubview(titleLabel)
titleLabel.snp.makeConstraints { make in
make.left.equalTo(20)
make.top.equalTo(23)
make.height.equalTo(24)
make.right.equalTo(-20)
}
subTitleLabel = {
let label = UILabel()
label.font = UIFont.PFSC_R(ofSize: 12)
label.text = "(仅填写近5年内的所有工作经验即可)"
label.textColor = UIColor.labelTextColor2
label.numberOfLines = 0
return label
}()
centerView.addSubview(subTitleLabel)
subTitleLabel.snp.makeConstraints { make in
make.left.equalTo(20)
make.top.equalTo(50)
make.right.equalTo(-20)
}
cannalButton = {
let button = UIButton(type: .custom)
button.titleLabel?.font = UIFont.PFSC_M(ofSize: 14)
button.contentHorizontalAlignment = .right
button.setTitle("取消编辑", for: .normal)
button.setTitleColor(UIColor.brandMainColor, for: .normal)
button.addTarget(self, action: #selector(cannal), for: .touchUpInside)
button.isHidden = true
return button
}()
centerView.addSubview(cannalButton)
cannalButton.snp.makeConstraints { make in
make.right.equalTo(-18)
make.top.equalTo(24)
make.height.equalTo(20)
make.width.equalTo(60)
}
moreButton = {
let button = UIButton(type: .custom)
button.titleLabel?.font = UIFont.PFSC_M(ofSize: 14)
button.contentHorizontalAlignment = .right
button.setTitle("编辑", for: .normal)
button.setTitleColor(UIColor.brandMainColor, for: .normal)
button.addTarget(self, action: #selector(more), for: .touchUpInside)
return button
}()
centerView.addSubview(moreButton)
moreButton.snp.makeConstraints { make in
make.right.equalTo(-18)
make.top.equalTo(24)
make.height.equalTo(20)
make.width.equalTo(60)
}
mainItemView = {
let view = UIView()
view.backgroundColor = .white
view.layer.cornerRadius = kCornerRadius6
return view
}()
centerView.addSubview(mainItemView)
mainItemView.snp.makeConstraints { make in
make.left.right.equalToSuperview()
make.bottom.equalTo(-65)
make.top.equalTo(85)
}
bottomView = {
let view = YHWorkItemAddView()
view.addBtn.setTitle("新增工作经验".local, for: .normal)
view.clickBlock = {[weak self] in
guard let self = self else { return }
if let block = self.newWorkBlock {
block()
}
}
return view
}()
centerView.addSubview(bottomView)
bottomView.snp.makeConstraints { make in
make.right.bottom.equalTo(-18)
make.left.equalTo(18)
make.height.equalTo(45)
}
}
func updateAllViews() {
mainItemView.removeSubviews()
guard let dataSource = dataSource else {
let line = UIView()
line.backgroundColor = UIColor.separatorColor
mainItemView.addSubview(line)
line.snp.makeConstraints { make in
make.left.equalTo(18)
make.top.equalToSuperview()
make.height.equalTo(1)
make.right.equalTo(-18)
}
let itemView = YHWorkItemView()
itemView.dataSource = YHWorkItemListModel()
mainItemView.addSubview(itemView)
itemView.snp.makeConstraints { make in
make.left.equalTo(18)
make.top.equalTo(1)
make.height.equalTo(51)
make.right.equalTo(-18)
}
return
}
var total = 0
for i in 0 ..< dataSource.count {
let line = UIView()
line.backgroundColor = UIColor.separatorColor
mainItemView.addSubview(line)
line.snp.makeConstraints { make in
make.left.equalTo(18)
make.top.equalTo(total)
make.height.equalTo(1)
make.right.equalTo(-18)
}
total = total + 1
let itemView = YHWorkItemView()
itemView.clickBlock = {[weak self] model in
guard let self = self else { return }
if let block = self.clickBlock {
block(model)
}
}
itemView.deleteBlock = {[weak self] model in
guard let self = self else { return }
if let block = self.deleteBlock {
block(model)
}
}
let model = dataSource[i]
itemView.tag = 4000 + i
itemView.dataSource = dataSource[i]
itemView.showPrompt = showPrompt
var h = 0
if model.company_name == "" {
h = 75
} else {
let text = model.company_name // 要显示的文本内容
let font = UIFont.PFSC_B(ofSize: 14) // 字体大小
let maxWidth = 143.0 // 最大宽度限制
// 创建NSAttributedString对象并设置属性
let attributes = [NSAttributedString.Key.font : font] as [NSAttributedString.Key : Any]
_ = NSMutableAttributedString(string: text ?? "", attributes: attributes)
// 根据指定的最大宽度和字体大小计算文本的高度
let size = (text! as NSString).boundingRect(with: CGSize(width: maxWidth, height: .greatestFiniteMagnitude), options: .usesLineFragmentOrigin, attributes: attributes, context: nil).size
if size.height > 20 {
h = 95
} else {
h = 75
}
}
mainItemView.addSubview(itemView)
itemView.snp.makeConstraints { make in
make.left.equalTo(18)
make.top.equalTo(total)
make.height.equalTo(h)
make.right.equalTo(-18)
}
total = total + h
}
}
@objc func cannal() {
moreButton.isHidden = false
cannalButton.isHidden = true
for i in 0..<(dataSource?.count ?? 0) {
let view = mainItemView.viewWithTag(4000 + i) as! YHWorkItemView
view.isShowDelete(i, isShow: false)
}
if let block = isMoreBlock {
block(false)
}
}
@objc func more() {
moreButton.isHidden = true
cannalButton.isHidden = false
for i in 0..<(dataSource?.count ?? 0) {
let view = mainItemView.viewWithTag(4000 + i) as! YHWorkItemView
view.isShowDelete(i, isShow: true)
}
if let block = isMoreBlock {
block(true)
}
}
}
......@@ -97,12 +97,7 @@ class YHGCWorkListHasDocTableViewCell: UITableViewCell {
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 viewModel = YHBaseViewModel()
viewModel.getPublicImageUrl(self.url) { success, error in
if let success = success {
self.previewFileTool.openXLSXRemoteFile(urlString: success, fileName:"")
}
}
self.previewFileTool.openXLSXRemoteFile(urlString: self.url, fileName:"")
})
label.attributed.text = a + b
return label
......@@ -147,7 +142,7 @@ class YHGCWorkListHasDocTableViewCell: UITableViewCell {
let data = dataSource?.models?[i]
let isShow = data?.isShowPrompts ?? false
let message = data?.message ?? ""
var h = 61
var h = 67
if isShow && message.count == 0 {
h = h + 20
}
......
......@@ -35,7 +35,7 @@ class YHGCWorkItemListViewModel: YHBaseViewModel {
} else if mainModel.has_company_consent == 2 {
has_company_consent = 0
}
let item = YHWorkExperienceModel(id: .id2, isNeed: true, title: "在职公司是否可以提供赴港同意书", isUserKeyBoard: false, prompts: "", message: "\(has_company_consent)", leftButtonString: "是", rightButtonString: "否", isShowPrompts: isShowPrompt, alertMessage:"请选择")
let item = YHWorkExperienceModel(id: .id2, isNeed: true, title: "在职公司是否可以提供赴港同意书", isUserKeyBoard: false, prompts: "", message: "\(has_company_consent)", leftButtonString: "是", rightButtonString: "否", isShowPrompts: isShowPrompt, alertMessage:"请选择")
var has_center_consent = 2
if mainModel.has_center_consent == 1 {
has_center_consent = 1
......@@ -114,14 +114,14 @@ class YHGCWorkItemListViewModel: YHBaseViewModel {
}
func requestWorkTimeRemarkWorkExperience(_ orderId: String, _ isSaveAll: Int = 0, callBackBlock:@escaping (_ success: Bool?, _ error:YHErrorModel?)->()) {
func requestWorkTimeRemarkWorkExperience(_ isSubmit: Bool = true, _ orderId: String, _ isSaveAll: Int = 0, callBackBlock:@escaping (_ success: Bool?, _ error:YHErrorModel?)->()) {
let params: [String : Any] = ["order_id": orderId,
"has_company_consent": self.mainModel.has_company_consent,
"consent_work_id": self.mainModel.consent_work_id,
"has_center_consent": self.mainModel.has_center_consent,
"why_work_time_overlap": self.mainModel.why_work_time_overlap,
"has_work_experience": self.mainModel.has_work_experience,
"is_submit": true]
"is_submit": isSubmit]
let strUrl = YHBaseUrlManager.shared.curURL() + YHAllApiName.WorkExperience.saveAll
let _ = YHNetRequest.postRequest(url: strUrl, params: params) { [weak self] json, code in
//1. json字符串 转 对象
......
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