Commit 09410be96806275ab2762af577a065c21d5bf29c
1 parent
b9f08866
添加证书页面-发证时间和 有效期至 改为选择时间
Showing
4 changed files
with
54 additions
and
26 deletions
metaCode/Classes/Main/HomePage/Controller/DigitalAuth/证书相关页面/CNLiveVitaeAddCertificateController.swift
| @@ -144,7 +144,7 @@ class CNLiveVitaeAddCertificateController:CNLiveBaseViewController,UITableViewDa | @@ -144,7 +144,7 @@ class CNLiveVitaeAddCertificateController:CNLiveBaseViewController,UITableViewDa | ||
| 144 | if isAddCerPhoto == true{ | 144 | if isAddCerPhoto == true{ |
| 145 | return 351 | 145 | return 351 |
| 146 | }else{ | 146 | }else{ |
| 147 | - return 620 | 147 | + return 640 |
| 148 | } | 148 | } |
| 149 | } | 149 | } |
| 150 | 150 |
metaCode/Classes/Main/HomePage/View/DigitalAuthViews/Vitae/Certificate/CNLiveVitaeCertificateAddInfoCell.swift
| @@ -143,15 +143,14 @@ class CNLiveVitaeCertificateAddInfoCell: UITableViewCell, UITextFieldDelegate{ | @@ -143,15 +143,14 @@ class CNLiveVitaeCertificateAddInfoCell: UITableViewCell, UITextFieldDelegate{ | ||
| 143 | titleLabel.font = BoldFont_15 | 143 | titleLabel.font = BoldFont_15 |
| 144 | return titleLabel | 144 | return titleLabel |
| 145 | }() | 145 | }() |
| 146 | - lazy var cerTimeTF :UITextField = { | ||
| 147 | - let searchTF = UITextField() | 146 | + lazy var cerTimeTF :UILabel = { |
| 147 | + let searchTF = UILabel() | ||
| 148 | searchTF.textAlignment = .right | 148 | searchTF.textAlignment = .right |
| 149 | - searchTF.clearButtonMode = .always | ||
| 150 | - searchTF.textColor = HexColor("#333333") | 149 | + searchTF.textColor = HexColor("#B3B3B3")//HexColor("#333333") |
| 151 | searchTF.font = Font_15 | 150 | searchTF.font = Font_15 |
| 152 | - searchTF.placeholder = "有发证时间,填写发证时间" | ||
| 153 | - searchTF.delegate = self | ||
| 154 | - searchTF.returnKeyType = .done | 151 | + searchTF.text = "有发证时间,填写发证时间" |
| 152 | + searchTF.isUserInteractionEnabled = true | ||
| 153 | + searchTF.addGestureRecognizer(UITapGestureRecognizer(target: self, action: #selector(cerTFAction))) | ||
| 155 | return searchTF | 154 | return searchTF |
| 156 | }() | 155 | }() |
| 157 | 156 | ||
| @@ -168,15 +167,14 @@ class CNLiveVitaeCertificateAddInfoCell: UITableViewCell, UITextFieldDelegate{ | @@ -168,15 +167,14 @@ class CNLiveVitaeCertificateAddInfoCell: UITableViewCell, UITextFieldDelegate{ | ||
| 168 | titleLabel.font = BoldFont_15 | 167 | titleLabel.font = BoldFont_15 |
| 169 | return titleLabel | 168 | return titleLabel |
| 170 | }() | 169 | }() |
| 171 | - lazy var cerYouXiaoTF :UITextField = { | ||
| 172 | - let searchTF = UITextField() | 170 | + lazy var cerYouXiaoTF :UILabel = { |
| 171 | + let searchTF = UILabel() | ||
| 173 | searchTF.textAlignment = .right | 172 | searchTF.textAlignment = .right |
| 174 | - searchTF.clearButtonMode = .always | ||
| 175 | - searchTF.textColor = HexColor("#333333") | 173 | + searchTF.textColor = HexColor("#B3B3B3")//HexColor("#333333") |
| 176 | searchTF.font = Font_15 | 174 | searchTF.font = Font_15 |
| 177 | - searchTF.placeholder = "有效期至,填写有效期至" | ||
| 178 | - searchTF.delegate = self | ||
| 179 | - searchTF.returnKeyType = .done | 175 | + searchTF.text = "有效期至,填写有效期至" |
| 176 | + searchTF.isUserInteractionEnabled = true | ||
| 177 | + searchTF.addGestureRecognizer(UITapGestureRecognizer(target: self, action: #selector(cerYouXiaoTFAction))) | ||
| 180 | return searchTF | 178 | return searchTF |
| 181 | }() | 179 | }() |
| 182 | 180 | ||
| @@ -219,7 +217,7 @@ class CNLiveVitaeCertificateAddInfoCell: UITableViewCell, UITextFieldDelegate{ | @@ -219,7 +217,7 @@ class CNLiveVitaeCertificateAddInfoCell: UITableViewCell, UITextFieldDelegate{ | ||
| 219 | self.contentView.addSubview(self.whiteBgView) | 217 | self.contentView.addSubview(self.whiteBgView) |
| 220 | self.whiteBgView.snp.makeConstraints { make in | 218 | self.whiteBgView.snp.makeConstraints { make in |
| 221 | make.top.equalTo(15) | 219 | make.top.equalTo(15) |
| 222 | - make.height.equalTo(700) | 220 | + make.bottom.equalToSuperview() |
| 223 | make.left.equalTo(15) | 221 | make.left.equalTo(15) |
| 224 | make.right.equalToSuperview().offset(-15) | 222 | make.right.equalToSuperview().offset(-15) |
| 225 | } | 223 | } |
| @@ -260,7 +258,7 @@ class CNLiveVitaeCertificateAddInfoCell: UITableViewCell, UITextFieldDelegate{ | @@ -260,7 +258,7 @@ class CNLiveVitaeCertificateAddInfoCell: UITableViewCell, UITextFieldDelegate{ | ||
| 260 | self.cerNameTF.snp.makeConstraints { make in | 258 | self.cerNameTF.snp.makeConstraints { make in |
| 261 | make.centerY.equalTo(self.cerNameTitleLabel.snp.centerY) | 259 | make.centerY.equalTo(self.cerNameTitleLabel.snp.centerY) |
| 262 | make.left.greaterThanOrEqualTo(self.cerNameTitleLabel.snp.right).offset(10) | 260 | make.left.greaterThanOrEqualTo(self.cerNameTitleLabel.snp.right).offset(10) |
| 263 | - make.right.equalToSuperview().offset(-15) | 261 | + make.right.equalToSuperview() |
| 264 | make.height.equalTo(21) | 262 | make.height.equalTo(21) |
| 265 | } | 263 | } |
| 266 | 264 | ||
| @@ -288,7 +286,7 @@ class CNLiveVitaeCertificateAddInfoCell: UITableViewCell, UITextFieldDelegate{ | @@ -288,7 +286,7 @@ class CNLiveVitaeCertificateAddInfoCell: UITableViewCell, UITextFieldDelegate{ | ||
| 288 | self.cerNumberTF.snp.makeConstraints { make in | 286 | self.cerNumberTF.snp.makeConstraints { make in |
| 289 | make.centerY.equalTo(self.cerNumberTitleLabel.snp.centerY) | 287 | make.centerY.equalTo(self.cerNumberTitleLabel.snp.centerY) |
| 290 | make.left.greaterThanOrEqualTo(self.cerNumberTitleLabel.snp.right).offset(10) | 288 | make.left.greaterThanOrEqualTo(self.cerNumberTitleLabel.snp.right).offset(10) |
| 291 | - make.right.equalToSuperview().offset(-15) | 289 | + make.right.equalToSuperview() |
| 292 | make.height.equalTo(21) | 290 | make.height.equalTo(21) |
| 293 | } | 291 | } |
| 294 | 292 | ||
| @@ -310,7 +308,7 @@ class CNLiveVitaeCertificateAddInfoCell: UITableViewCell, UITextFieldDelegate{ | @@ -310,7 +308,7 @@ class CNLiveVitaeCertificateAddInfoCell: UITableViewCell, UITextFieldDelegate{ | ||
| 310 | self.cerLevelTF.snp.makeConstraints { make in | 308 | self.cerLevelTF.snp.makeConstraints { make in |
| 311 | make.centerY.equalTo(self.cerLevelTitleLabel.snp.centerY) | 309 | make.centerY.equalTo(self.cerLevelTitleLabel.snp.centerY) |
| 312 | make.left.greaterThanOrEqualTo(self.cerLevelTitleLabel.snp.right).offset(10) | 310 | make.left.greaterThanOrEqualTo(self.cerLevelTitleLabel.snp.right).offset(10) |
| 313 | - make.right.equalToSuperview().offset(-15) | 311 | + make.right.equalToSuperview() |
| 314 | make.height.equalTo(21) | 312 | make.height.equalTo(21) |
| 315 | } | 313 | } |
| 316 | 314 | ||
| @@ -332,7 +330,7 @@ class CNLiveVitaeCertificateAddInfoCell: UITableViewCell, UITextFieldDelegate{ | @@ -332,7 +330,7 @@ class CNLiveVitaeCertificateAddInfoCell: UITableViewCell, UITextFieldDelegate{ | ||
| 332 | self.cerTimeTF.snp.makeConstraints { make in | 330 | self.cerTimeTF.snp.makeConstraints { make in |
| 333 | make.centerY.equalTo(self.cerTimeTitleLabel.snp.centerY) | 331 | make.centerY.equalTo(self.cerTimeTitleLabel.snp.centerY) |
| 334 | make.left.greaterThanOrEqualTo(self.cerTimeTitleLabel.snp.right).offset(10) | 332 | make.left.greaterThanOrEqualTo(self.cerTimeTitleLabel.snp.right).offset(10) |
| 335 | - make.right.equalToSuperview().offset(-15) | 333 | + make.right.equalToSuperview().offset(-25) |
| 336 | make.height.equalTo(21) | 334 | make.height.equalTo(21) |
| 337 | } | 335 | } |
| 338 | 336 | ||
| @@ -354,7 +352,7 @@ class CNLiveVitaeCertificateAddInfoCell: UITableViewCell, UITextFieldDelegate{ | @@ -354,7 +352,7 @@ class CNLiveVitaeCertificateAddInfoCell: UITableViewCell, UITextFieldDelegate{ | ||
| 354 | self.cerYouXiaoTF.snp.makeConstraints { make in | 352 | self.cerYouXiaoTF.snp.makeConstraints { make in |
| 355 | make.centerY.equalTo(self.cerYouXiaoTitleLabel.snp.centerY) | 353 | make.centerY.equalTo(self.cerYouXiaoTitleLabel.snp.centerY) |
| 356 | make.left.greaterThanOrEqualTo(self.cerYouXiaoTitleLabel.snp.right).offset(10) | 354 | make.left.greaterThanOrEqualTo(self.cerYouXiaoTitleLabel.snp.right).offset(10) |
| 357 | - make.right.equalToSuperview().offset(-15) | 355 | + make.right.equalToSuperview().offset(-25) |
| 358 | make.height.equalTo(21) | 356 | make.height.equalTo(21) |
| 359 | } | 357 | } |
| 360 | 358 | ||
| @@ -382,7 +380,7 @@ class CNLiveVitaeCertificateAddInfoCell: UITableViewCell, UITextFieldDelegate{ | @@ -382,7 +380,7 @@ class CNLiveVitaeCertificateAddInfoCell: UITableViewCell, UITextFieldDelegate{ | ||
| 382 | self.cerJiGouTF.snp.makeConstraints { make in | 380 | self.cerJiGouTF.snp.makeConstraints { make in |
| 383 | make.centerY.equalTo(self.cerJiGouTitleLabel.snp.centerY) | 381 | make.centerY.equalTo(self.cerJiGouTitleLabel.snp.centerY) |
| 384 | make.left.greaterThanOrEqualTo(self.cerJiGouTitleLabel.snp.right).offset(10) | 382 | make.left.greaterThanOrEqualTo(self.cerJiGouTitleLabel.snp.right).offset(10) |
| 385 | - make.right.equalToSuperview().offset(-15) | 383 | + make.right.equalToSuperview() |
| 386 | make.height.equalTo(21) | 384 | make.height.equalTo(21) |
| 387 | } | 385 | } |
| 388 | } | 386 | } |
| @@ -391,8 +389,37 @@ class CNLiveVitaeCertificateAddInfoCell: UITableViewCell, UITextFieldDelegate{ | @@ -391,8 +389,37 @@ class CNLiveVitaeCertificateAddInfoCell: UITableViewCell, UITextFieldDelegate{ | ||
| 391 | fatalError("init(coder:) has not been implemented") | 389 | fatalError("init(coder:) has not been implemented") |
| 392 | } | 390 | } |
| 393 | 391 | ||
| 392 | + @objc func cerTFAction(){ | ||
| 393 | + self.tfReturnBlock?() | ||
| 394 | + MineInfoAlertView.showSelectView(showType: .selectDay) { [weak self] text in | ||
| 395 | + print("刷新之后的数据是=>\(text)")//"2024.06.18" | ||
| 396 | + if (text as! String).count > 0{ | ||
| 397 | + let textStr = text as! String | ||
| 398 | + self?.cerTimeTF.text = textStr | ||
| 399 | + self?.cerTimeTF.textColor = HexColor("#333333") | ||
| 400 | + }else{ | ||
| 401 | + self?.cerTimeTF.text = "有发证时间,填写发证时间" | ||
| 402 | + self?.cerTimeTF.textColor = HexColor("#B3B3B3") | ||
| 403 | + } | ||
| 404 | + } | ||
| 405 | + } | ||
| 406 | + @objc func cerYouXiaoTFAction(){ | ||
| 407 | + self.tfReturnBlock?() | ||
| 408 | + MineInfoAlertView.showSelectView(showType: .selectDay) { [weak self] text in | ||
| 409 | + print("刷新之后的数据是=>\(text)")//"2024.06.18" | ||
| 410 | + if (text as! String).count > 0{ | ||
| 411 | + let textStr = text as! String | ||
| 412 | + self?.cerYouXiaoTF.text = textStr | ||
| 413 | + self?.cerYouXiaoTF.textColor = HexColor("#333333") | ||
| 414 | + }else{ | ||
| 415 | + self?.cerYouXiaoTF.text = "有效期至,填写有效期至" | ||
| 416 | + self?.cerYouXiaoTF.textColor = HexColor("#B3B3B3") | ||
| 417 | + } | ||
| 418 | + } | ||
| 419 | + } | ||
| 394 | func textFieldShouldReturn(_ textField: UITextField) -> Bool { | 420 | func textFieldShouldReturn(_ textField: UITextField) -> Bool { |
| 395 | self.tfReturnBlock?() | 421 | self.tfReturnBlock?() |
| 396 | return true | 422 | return true |
| 397 | } | 423 | } |
| 424 | + | ||
| 398 | } | 425 | } |
metaCode/Classes/Main/HomePage/View/DigitalAuthViews/Vitae/Certificate/CNLiveVocationalCertificateFirCell.swift
| @@ -250,13 +250,13 @@ class CNLiveVocationalCertificateFirCell: UITableViewCell, UICollectionViewDataS | @@ -250,13 +250,13 @@ class CNLiveVocationalCertificateFirCell: UITableViewCell, UICollectionViewDataS | ||
| 250 | 250 | ||
| 251 | make.top.equalTo(self.cerLevelTitleLabel.snp.top) | 251 | make.top.equalTo(self.cerLevelTitleLabel.snp.top) |
| 252 | make.right.equalToSuperview().offset(adapt_length(length: -117)) | 252 | make.right.equalToSuperview().offset(adapt_length(length: -117)) |
| 253 | -// make.left.greaterThanOrEqualTo(self.cerLevelTitleLabel.snp.right).offset(5) | 253 | + make.left.greaterThanOrEqualTo(self.cerLevelTitleLabel.snp.right).offset(5) |
| 254 | } | 254 | } |
| 255 | self.whiteBgView.addSubview(self.cerNumberDetailTitleLabel) | 255 | self.whiteBgView.addSubview(self.cerNumberDetailTitleLabel) |
| 256 | self.cerNumberDetailTitleLabel.snp.makeConstraints { make in | 256 | self.cerNumberDetailTitleLabel.snp.makeConstraints { make in |
| 257 | make.top.equalTo(self.cerNumberTitleLabel.snp.bottom).offset(3) | 257 | make.top.equalTo(self.cerNumberTitleLabel.snp.bottom).offset(3) |
| 258 | make.left.equalTo(self.cerNumberTitleLabel.snp.left) | 258 | make.left.equalTo(self.cerNumberTitleLabel.snp.left) |
| 259 | - make.left.greaterThanOrEqualTo(self.cerLevelDetailTitleLabel.snp.right).offset(5) | 259 | +// make.left.greaterThanOrEqualTo(self.cerLevelDetailTitleLabel.snp.right).offset(5) |
| 260 | make.right.equalToSuperview().offset(-5) | 260 | make.right.equalToSuperview().offset(-5) |
| 261 | } | 261 | } |
| 262 | self.whiteBgView.addSubview(self.cerJiGouTitleLabel) | 262 | self.whiteBgView.addSubview(self.cerJiGouTitleLabel) |
metaCode/Classes/Main/MinePage/View/CNLiveMineInfoAlertView.swift
| @@ -118,7 +118,8 @@ class MineInfoAlertView: UIView { | @@ -118,7 +118,8 @@ class MineInfoAlertView: UIView { | ||
| 118 | datePicker.setDate(date!, animated: true) | 118 | datePicker.setDate(date!, animated: true) |
| 119 | } | 119 | } |
| 120 | datePicker.minimumDate = Date.init(timeIntervalSince1970: -60*60*24*365*60) | 120 | datePicker.minimumDate = Date.init(timeIntervalSince1970: -60*60*24*365*60) |
| 121 | - datePicker.maximumDate = Date.init(timeInterval: 0, since: Date.init()) | 121 | + datePicker.maximumDate = nil |
| 122 | +// datePicker.maximumDate = Date.init(timeInterval: 0, since: Date.init()) | ||
| 122 | datePicker.addTarget(self, action: #selector(dateChangeAction), for: .valueChanged) | 123 | datePicker.addTarget(self, action: #selector(dateChangeAction), for: .valueChanged) |
| 123 | return datePicker | 124 | return datePicker |
| 124 | }() | 125 | }() |
| @@ -638,7 +639,7 @@ class MineStandListAlertView: UIView, UIPickerViewDelegate, UIPickerViewDataSour | @@ -638,7 +639,7 @@ class MineStandListAlertView: UIView, UIPickerViewDelegate, UIPickerViewDataSour | ||
| 638 | datePicker.setDate(date!, animated: true) | 639 | datePicker.setDate(date!, animated: true) |
| 639 | } | 640 | } |
| 640 | datePicker.minimumDate = Date.init(timeIntervalSince1970: -60*60*24*365*60) | 641 | datePicker.minimumDate = Date.init(timeIntervalSince1970: -60*60*24*365*60) |
| 641 | - datePicker.maximumDate = Date.init(timeInterval: 60*60*24*365*10, since: Date.init()) | 642 | +// datePicker.maximumDate = Date.init(timeInterval: 60*60*24*365*10, since: Date.init()) |
| 642 | datePicker.addTarget(self, action: #selector(dateChangeAction), for: .valueChanged) | 643 | datePicker.addTarget(self, action: #selector(dateChangeAction), for: .valueChanged) |
| 643 | return datePicker | 644 | return datePicker |
| 644 | }() | 645 | }() |