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

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

parents 486ba6aa 82c07a7a
......@@ -177,7 +177,6 @@
045EEF152B9F171A0022A143 /* YHHKIDCardModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = 045EEE652B9F171A0022A143 /* YHHKIDCardModel.swift */; };
045EEF162B9F171A0022A143 /* YHMainApplicantInformationViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 045EEE672B9F171A0022A143 /* YHMainApplicantInformationViewController.swift */; };
045EEF172B9F171A0022A143 /* YHSelectCountryViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 045EEE682B9F171A0022A143 /* YHSelectCountryViewController.swift */; };
045EEF182B9F171A0022A143 /* area.plist in Resources */ = {isa = PBXBuildFile; fileRef = 045EEE6B2B9F171A0022A143 /* area.plist */; };
045EEF192B9F171A0022A143 /* YHAddressModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = 045EEE6C2B9F171A0022A143 /* YHAddressModel.swift */; };
045EEF1A2B9F171A0022A143 /* YHAddressViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 045EEE6D2B9F171A0022A143 /* YHAddressViewController.swift */; };
045EEF1B2B9F171A0022A143 /* YHAddressPickViewTableViewCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = 045EEE6E2B9F171A0022A143 /* YHAddressPickViewTableViewCell.swift */; };
......@@ -205,6 +204,8 @@
0468D43A2B579EAC00CFB916 /* YHLoginViewModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0468D4392B579EAC00CFB916 /* YHLoginViewModel.swift */; };
047294E82B988A19008E0B84 /* YHNewWebViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 047294E72B988A19008E0B84 /* YHNewWebViewController.swift */; };
04754A952B96FF3D00F8ADCA /* UITextField+Extension.swift in Sources */ = {isa = PBXBuildFile; fileRef = 04754A942B96FF3D00F8ADCA /* UITextField+Extension.swift */; };
047619E92BA9867100F45358 /* YHCountryHotView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 047619E82BA9867100F45358 /* YHCountryHotView.swift */; };
047619ED2BA9B9C900F45358 /* area.plist in Resources */ = {isa = PBXBuildFile; fileRef = 047619EC2BA9B9C900F45358 /* area.plist */; };
0477E17A2BA41C7E00436346 /* YHCertificateModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0477E1792BA41C7E00436346 /* YHCertificateModel.swift */; };
0477E17C2BA4238400436346 /* YHMaterialListViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0477E17B2BA4238400436346 /* YHMaterialListViewController.swift */; };
0477E17E2BA4362A00436346 /* YHCustomNavigationBar.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0477E17D2BA4362A00436346 /* YHCustomNavigationBar.swift */; };
......@@ -551,7 +552,6 @@
045EEE652B9F171A0022A143 /* YHHKIDCardModel.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = YHHKIDCardModel.swift; sourceTree = "<group>"; };
045EEE672B9F171A0022A143 /* YHMainApplicantInformationViewController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = YHMainApplicantInformationViewController.swift; sourceTree = "<group>"; };
045EEE682B9F171A0022A143 /* YHSelectCountryViewController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = YHSelectCountryViewController.swift; sourceTree = "<group>"; };
045EEE6B2B9F171A0022A143 /* area.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; path = area.plist; sourceTree = "<group>"; };
045EEE6C2B9F171A0022A143 /* YHAddressModel.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = YHAddressModel.swift; sourceTree = "<group>"; };
045EEE6D2B9F171A0022A143 /* YHAddressViewController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = YHAddressViewController.swift; sourceTree = "<group>"; };
045EEE6E2B9F171A0022A143 /* YHAddressPickViewTableViewCell.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = YHAddressPickViewTableViewCell.swift; sourceTree = "<group>"; };
......@@ -579,6 +579,8 @@
0468D4392B579EAC00CFB916 /* YHLoginViewModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHLoginViewModel.swift; sourceTree = "<group>"; };
047294E72B988A19008E0B84 /* YHNewWebViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHNewWebViewController.swift; sourceTree = "<group>"; };
04754A942B96FF3D00F8ADCA /* UITextField+Extension.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "UITextField+Extension.swift"; sourceTree = "<group>"; };
047619E82BA9867100F45358 /* YHCountryHotView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHCountryHotView.swift; sourceTree = "<group>"; };
047619EC2BA9B9C900F45358 /* area.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; path = area.plist; sourceTree = "<group>"; };
0477E1792BA41C7E00436346 /* YHCertificateModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHCertificateModel.swift; sourceTree = "<group>"; };
0477E17B2BA4238400436346 /* YHMaterialListViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHMaterialListViewController.swift; sourceTree = "<group>"; };
0477E17D2BA4362A00436346 /* YHCustomNavigationBar.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHCustomNavigationBar.swift; sourceTree = "<group>"; };
......@@ -944,6 +946,7 @@
045EEDE42B9F171A0022A143 /* YHWorkIntroductionTableViewCell.swift */,
045EEDE52B9F171A0022A143 /* YHClipperButton.swift */,
045EEDE62B9F171A0022A143 /* YHWorkExampleTypeView.swift */,
047619E82BA9867100F45358 /* YHCountryHotView.swift */,
045EEDE72B9F171A0022A143 /* YHResultBottomView.swift */,
045EEDE82B9F171A0022A143 /* YHWorkFileItemView.swift */,
);
......@@ -1359,7 +1362,7 @@
045EEE6A2B9F171A0022A143 /* YHAddressPicker */ = {
isa = PBXGroup;
children = (
045EEE6B2B9F171A0022A143 /* area.plist */,
047619EC2BA9B9C900F45358 /* area.plist */,
045EEE6C2B9F171A0022A143 /* YHAddressModel.swift */,
045EEE6D2B9F171A0022A143 /* YHAddressViewController.swift */,
045EEE6E2B9F171A0022A143 /* YHAddressPickViewTableViewCell.swift */,
......@@ -2106,10 +2109,10 @@
04808C062B4686510056D53C /* ATAuthSDK.bundle in Resources */,
A5C5B2EE2B4F9B8800A7C5D1 /* Localizable.xcstrings in Resources */,
A58951C52B398D1000225C19 /* Launch Screen.storyboard in Resources */,
045EEF182B9F171A0022A143 /* area.plist in Resources */,
A51044182B493675006B60BB /* README.md in Resources */,
A5573EDB2B317C0000D98EC0 /* Assets.xcassets in Resources */,
A5E69D512BA304D400411932 /* DIN Alternate Bold.ttf in Resources */,
047619ED2BA9B9C900F45358 /* area.plist in Resources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
......@@ -2445,6 +2448,7 @@
045EEEA02B9F171A0022A143 /* YHWorkItemListModel.swift in Sources */,
045EEEAD2B9F171A0022A143 /* YHWorkExperienceListTableViewCell.swift in Sources */,
049A48A82B49417300D0C641 /* YHAboutUsViewController.swift in Sources */,
047619E92BA9867100F45358 /* YHCountryHotView.swift in Sources */,
045EEEF82B9F171A0022A143 /* YHFormItemOnlyDoubleChoiceCell.swift in Sources */,
0480976D2BA158A1000B9DCA /* YHCertificateResourceUploadVC.swift in Sources */,
045EEE8B2B9F171A0022A143 /* YHPreviewMainApplicantInfoViewController.swift in Sources */,
......@@ -2663,7 +2667,7 @@
CODE_SIGN_IDENTITY = "Apple Development";
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
CODE_SIGN_STYLE = Manual;
CURRENT_PROJECT_VERSION = 3;
CURRENT_PROJECT_VERSION = 4;
DEVELOPMENT_TEAM = "";
"DEVELOPMENT_TEAM[sdk=iphoneos*]" = RXHYW88XR7;
ENABLE_USER_SCRIPT_SANDBOXING = NO;
......@@ -2705,7 +2709,7 @@
CODE_SIGN_IDENTITY = "Apple Development";
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
CODE_SIGN_STYLE = Manual;
CURRENT_PROJECT_VERSION = 3;
CURRENT_PROJECT_VERSION = 4;
DEVELOPMENT_TEAM = "";
"DEVELOPMENT_TEAM[sdk=iphoneos*]" = RXHYW88XR7;
ENABLE_USER_SCRIPT_SANDBOXING = NO;
......
......@@ -132,7 +132,7 @@ class YHBasicInfoFillView: UIView, UITextViewDelegate {
private var myTextView : UITextView!
private var arrCheckBtns : [UIButton] = []
private let kTipsString : String = "如选择“是”,请详细说明"
private let kTipsString : String = "如选择“是”,请详细说明时间、地点"
private lazy var noChoiceTipsLable: UILabel = {
let label = UILabel()
......
......@@ -13,11 +13,11 @@ class YHSelectCountryViewController: YHBaseViewController {
var searchView: UITextField!
var flagLabel: UILabel!
var tableView: UITableView!
var collectionView: UICollectionView!
var hotDataSource = ["中国-China","中国香港-Hong Kong","中国澳门-Macau","中国台湾-Taiwan","新加坡-Singapore","澳大利亚-Australia","美国-United States"]
var searchDataSource: [YHCountryMessage]?
var viewModel: YHSelectCountryViewModel?
var typeView: YHCountryHotView!
override func viewDidLoad() {
super.viewDidLoad()
gk_navTitle = "国家/地区"
......@@ -86,25 +86,24 @@ class YHSelectCountryViewController: YHBaseViewController {
make.height.equalTo(20)
}
collectionView = {
let layout = UICollectionViewFlowLayout()
layout.minimumInteritemSpacing = 12 // 设置水平间距
layout.minimumLineSpacing = 16 // 设置垂直间距
layout.scrollDirection = .vertical
// 初始化UICollectionView对象
let collection = UICollectionView(frame: CGRect.zero, collectionViewLayout: layout)
collection.dataSource = self
collection.delegate = self
// 注册自定义单元格类型
collection.register(cellWithClass: YHCountryCollectionViewCell.self)
return collection
typeView = {
let view = YHCountryHotView()
view.dataSource = self.hotDataSource
view.isHidden = false
view.hotBlock = {[weak self] string in
guard let self = self else { return }
view.isHidden = true
if let backLocationStringController = backLocationStringController {
backLocationStringController(string)
self.navigationController?.popViewController()
}
}
return view
}()
view.addSubview(collectionView)
collectionView.snp.makeConstraints { make in
view.addSubview(typeView)
typeView.snp.makeConstraints { make in
make.top.equalTo(k_Height_NavigationtBarAndStatuBar + 114)
make.left.equalTo(21)
make.right.equalTo(-21)
make.left.right.equalToSuperview()
make.bottom.equalToSuperview()
}
}
......@@ -115,14 +114,14 @@ extension YHSelectCountryViewController: UITextFieldDelegate {
if textField.text == "" {
tableView.isHidden = true
flagLabel.isHidden = false
collectionView.isHidden = false
typeView.isHidden = false
} else {
viewModel?.requestCountry(textField.text ?? "") { [weak self] success, error in
guard let self = self else { return }
self.searchDataSource = success as? [YHCountryMessage]
self.tableView.isHidden = false
self.flagLabel.isHidden = true
self.collectionView.isHidden = true
self.typeView.isHidden = true
self.tableView.reloadData()
}
}
......@@ -157,62 +156,6 @@ extension YHSelectCountryViewController: UITableViewDelegate, UITableViewDataSou
}
}
extension YHSelectCountryViewController: UICollectionViewDelegate, UICollectionViewDataSource, UICollectionViewDelegateFlowLayout {
func collectionView(_ collectionView: UICollectionView, numberOfItemsInSection section: Int) -> Int {
return hotDataSource.count
}
func collectionView(_ collectionView: UICollectionView, cellForItemAt indexPath: IndexPath) -> UICollectionViewCell {
let collectionCell = collectionView.dequeueReusableCell(withClass: YHCountryCollectionViewCell.self, for: indexPath)
collectionCell.label.text = hotDataSource[indexPath.row]
return collectionCell
}
func collectionView(_ collectionView: UICollectionView, layout collectionViewLayout: UICollectionViewLayout, sizeForItemAt indexPath: IndexPath) -> CGSize {
let string = hotDataSource[indexPath.row]
let size = (string as NSString).size(withAttributes: [NSAttributedString.Key.font : UIFont.PFSC_R(ofSize: 13)])
return CGSize(width: size.width + 25, height: 32) // 这里可以根据需求设置不同的尺寸
}
func collectionView(_ collectionView: UICollectionView, didSelectItemAt indexPath: IndexPath) {
let string = hotDataSource[indexPath.row]
if let backLocationStringController = backLocationStringController {
backLocationStringController(string)
self.navigationController?.popViewController()
}
}
}
class YHCountryCollectionViewCell: UICollectionViewCell {
var label: UILabel!
override init(frame: CGRect) {
super.init(frame: frame)
setUpView()
}
required init?(coder: NSCoder) {
fatalError("init(coder:) has not been implemented")
}
func setUpView() {
label = {
let view = UILabel()
view.textAlignment = .center
view.font = UIFont.PFSC_R(ofSize: 13)
view.textColor = UIColor.mainTextColor
view.backgroundColor = UIColor.contentBkgColor
view.layer.masksToBounds = true
view.layer.cornerRadius = 16
return view
}()
contentView.addSubview(label)
label.snp.makeConstraints { make in
make.top.bottom.right.left.equalToSuperview()
}
}
}
class YHCountryTableViewCell: UITableViewCell {
var titleLabel: UILabel!
......
......@@ -11,11 +11,19 @@ import Foundation
struct YHCountryModel {
var provincesArray: [YHProvincesModel] = []
init(dic: [String:[String]]) {
var provices:[YHProvincesModel] = []
for (key,value) in dic {
let model = YHProvincesModel(name: key, dic: value)
provincesArray.append(model)
provincesArray.sort { a, b in
a.provincesName < b.provincesName
provices.append(model)
}
let strings = ["北京", "上海", "广东", "天津", "重庆", "河北", "山西", "内蒙古", "辽宁", "吉林", "黑龙江", "江苏", "浙江", "安徽", "福建", "江西", "山东", "河南", "湖北", "湖南","海南", "四川", "贵州", "云南","西藏", "陕西", "甘肃", "青海","宁夏", "新疆", "台湾", "澳门", "香港"]
for item in strings {
for provice in provices {
if provice.provincesName.contains(item) {
provincesArray.append(provice)
}
}
}
}
......
......@@ -49,7 +49,7 @@ class YHAddressPickView: UIView {
// self.underLine.center = CGPoint(x: self.buttonArr[1].center.x, y: self.underLine.center.y)
self.dataArray = locationModel?.provincesArray.map({ model in
model.provincesName
})
}) ?? []
self.tableView.reloadData()
case .city:
/// 选择城市时没有热门城市view,并将titleSV显示出来
......@@ -77,7 +77,7 @@ class YHAddressPickView: UIView {
})
self.dataArray = provincesModel?.cityArray.map({ model in
model.cityName
})
}) ?? []
self.tableView.reloadData()
}
}
......@@ -110,7 +110,7 @@ class YHAddressPickView: UIView {
/// 城市数据
private var cityModel: YHCityModel?
/// 当前tableView使用的数据源
private var dataArray: [String]?
private var dataArray: [String] = []
private let titleLabel: UILabel = {
let label = UILabel(frame: CGRect(x: (UIScreen.main.bounds.width - 150) / 2, y: 16, width: 150, height: 24))
label.textColor = UIColor.mainTextColor
......@@ -287,13 +287,19 @@ class YHAddressPickView: UIView {
backLocationString!(selectLocation,selectedProvince,selectedCity,selectedArea)
}
}
/// 从area.plist获取全部地区数据
private func initLocationData() {
guard let dic = NSDictionary(contentsOfFile: Bundle.main.path(forResource: "area", ofType: "plist") ?? "") as? [String:[String]] else {
locationModel = nil
dataArray = []
return
}
locationModel = YHCountryModel(dic: dic)
dataArray = locationModel?.provincesArray.map({$0.provincesName})
if let model = locationModel {
dataArray = model.provincesArray.map({$0.provincesName})
}
}
}
// MARK: - tableViewDelegate
......@@ -302,7 +308,7 @@ extension YHAddressPickView: UITableViewDelegate,UITableViewDataSource {
return 40
}
func tableView(_ tableView: UITableView, numberOfRowsInSection section: Int) -> Int {
return (self.dataArray?.count)! + 1
return self.dataArray.count + 1
}
func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell {
if indexPath.row == 0 {
......@@ -315,7 +321,7 @@ extension YHAddressPickView: UITableViewDelegate,UITableViewDataSource {
guard let cell = tableView.dequeueReusableCell(withIdentifier: YHAddressPickViewTableViewCell.identifier) as? YHAddressPickViewTableViewCell else {
return YHAddressPickViewTableViewCell()
}
cell.label.text = self.dataArray?[indexPath.row - 1]
cell.label.text = self.dataArray[indexPath.row - 1]
return cell
}
func tableView(_ tableView: UITableView, didSelectRowAt indexPath: IndexPath) {
......
......@@ -485,11 +485,37 @@
</array>
<key>香港特别行政区</key>
<array>
<string>市辖区</string>
<string>中西区</string>
<string>湾仔区</string>
<string>东区</string>
<string>南区</string>
<string>深水埗区</string>
<string>油尖旺区</string>
<string>九龙城区</string>
<string>黄大仙区</string>
<string>观塘区</string>
<string>北区</string>
<string>大埔区</string>
<string>沙田区</string>
<string>西贡区</string>
<string>元朗区</string>
<string>屯门区</string>
<string>荃湾区</string>
<string>葵青区</string>
<string>离岛区</string>
<string>其他</string>
</array>
<key>澳门特别行政区</key>
<array>
<string>市辖区</string>
<string>花地玛堂区</string>
<string>圣安多尼堂区</string>
<string>大堂区</string>
<string>望德堂区</string>
<string>风顺堂区</string>
<string>嘉模堂区</string>
<string>圣方济各堂区</string>
<string>路凼</string>
<string>其他</string>
</array>
</dict>
</plist>
......@@ -74,7 +74,7 @@ class YHCompanySelectViewController: YHBaseViewController {
button.backgroundColor = UIColor(hex:0x2274ee)
button.titleLabel?.font = UIFont.PFSC_M(ofSize: 16)
button.contentHorizontalAlignment = .center
button.setTitle("保存", for: .normal)
button.setTitle("确认", for: .normal)
button.titleLabel?.font = UIFont.PFSC_M(ofSize: 12)
button.setTitleColor( UIColor(hex:0xffffff), for: .normal)
button.layer.cornerRadius = 16.5
......
......@@ -286,16 +286,28 @@ class YHWorkIntroductionViewController: YHBaseViewController {
@objc func startClick() {
view.endEditing(true)
YHDatePickView.show(type: .yyyymmdd, title: "请选择开始时间") { date in
self.startTextField.text = date
self.dataSource.project_start_time = date
if date > self.dataSource.project_end_time ?? "" {
self.startTextField.text = ""
self.dataSource.project_start_time = ""
YHHUD.flash(message: "开始时间不能晚于结束时间")
} else {
self.startTextField.text = date
self.dataSource.project_start_time = date
}
}
}
@objc func endClick() {
view.endEditing(true)
YHDatePickView.show(type: .yyyymmdd, title: "请选择结束时间") { date in
self.endTextField.text = date
self.dataSource.project_end_time = date
if date < self.dataSource.project_start_time ?? "" {
self.endTextField.text = ""
self.dataSource.project_end_time = ""
YHHUD.flash(message: "结束时间不能早于开始时间")
} else {
self.endTextField.text = date
self.dataSource.project_end_time = date
}
}
}
......
//
// YHCountryHotView.swift
// galaxy
//
// Created by EDY on 2024/3/19.
// Copyright © 2024 https://www.galaxy-immi.com. All rights reserved.
//
import UIKit
class YHCountryHotView: UIView {
typealias HotBlock = (_ index: String) -> ()
var hotBlock: HotBlock?
var dataSource: [String]?{
didSet {
updateView()
}
}
override init(frame: CGRect) {
super.init(frame: frame)
backgroundColor = .white
setUpView()
}
required init?(coder: NSCoder) {
fatalError("init(coder:) has not been implemented")
}
func setUpView() {
}
func updateView() {
guard let dataSource = dataSource else { return }
var x = 0
var y = 0
for i in 0..<dataSource.count {
let string = dataSource[i]
let font = UIFont.systemFont(ofSize: 13) // 设置字体样式及大小
let maxWidth = KScreenWidth - 42 // label最大宽度限制
// 创建NSAttributedString对象并指定字体属性
let attributedText = NSMutableAttributedString(string: string)
attributedText.addAttribute(.font, value: font, range: NSRange(location: 0, length: string.count))
// 获取文本所需的高度和宽度
var boundingBox = CGRect()
boundingBox = NSString(string: string).boundingRect(with: CGSize(width: maxWidth, height: .greatestFiniteMagnitude), options: [.usesLineFragmentOrigin], attributes: [.font : font], context: nil)
let width = boundingBox.size.width
if CGFloat(x) + width + 24 > maxWidth {
x = 0
y = y + 1
}
let button = UIButton(type: .custom)
button.setTitle(dataSource[i], for: .normal)
button.setTitleColor(UIColor.mainTextColor, for: .normal)
button.setBackgroundColor(color: UIColor.contentBkgColor, forState: .normal)
button.titleLabel?.font = UIFont.PFSC_R(ofSize: 13)
button.layer.cornerRadius = 16
button.tag = 3000 + i
button.addTarget(self, action: #selector(exampleClick(sender:)), for: .touchUpInside)
addSubview(button)
button.snp.makeConstraints { make in
make.left.equalTo(21 + x)
make.top.equalTo(y * 44)
make.height.equalTo(32)
make.width.equalTo(width + 24)
}
x = x + Int(width) + 36
}
}
@objc func exampleClick(sender: UIButton) {
let tag = sender.tag - 3000
if let block = hotBlock {
block(dataSource?[tag] ?? "")
}
}
}
......@@ -84,9 +84,23 @@ class YHWorkExperienceViewModel: YHBaseViewModel {
case .id8: // 职位
mainModel.position = item.message ?? ""
case .id9: // 入职年月
mainModel.entry_time = item.message ?? ""
if item.message ?? "" > mainModel.departure_time {
mainModel.entry_time = ""
if item.message != "" {
YHHUD.flash(message: "入职日期不能晚于离职日期")
}
} else {
mainModel.entry_time = item.message ?? ""
}
case .id10: // 离职年月
mainModel.departure_time = item.message ?? ""
if item.message ?? "" < mainModel.entry_time {
mainModel.departure_time = ""
if item.message != "" {
YHHUD.flash(message: "离职日期不能早于入职日期")
}
} else {
mainModel.departure_time = item.message ?? ""
}
case .id11: // 工作证明文件
mainModel.work_certificate = item.message ?? ""
case .id12: // 职责性质
......
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