Commit 09410be96806275ab2762af577a065c21d5bf29c
1 parent
b9f08866
添加证书页面-发证时间和 有效期至 改为选择时间
Showing
4 changed files
with
54 additions
and
26 deletions
metaCode/Classes/Main/HomePage/Controller/DigitalAuth/证书相关页面/CNLiveVitaeAddCertificateController.swift
metaCode/Classes/Main/HomePage/View/DigitalAuthViews/Vitae/Certificate/CNLiveVitaeCertificateAddInfoCell.swift
| ... | ... | @@ -143,15 +143,14 @@ class CNLiveVitaeCertificateAddInfoCell: UITableViewCell, UITextFieldDelegate{ |
| 143 | 143 | titleLabel.font = BoldFont_15 |
| 144 | 144 | return titleLabel |
| 145 | 145 | }() |
| 146 | - lazy var cerTimeTF :UITextField = { | |
| 147 | - let searchTF = UITextField() | |
| 146 | + lazy var cerTimeTF :UILabel = { | |
| 147 | + let searchTF = UILabel() | |
| 148 | 148 | searchTF.textAlignment = .right |
| 149 | - searchTF.clearButtonMode = .always | |
| 150 | - searchTF.textColor = HexColor("#333333") | |
| 149 | + searchTF.textColor = HexColor("#B3B3B3")//HexColor("#333333") | |
| 151 | 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 | 154 | return searchTF |
| 156 | 155 | }() |
| 157 | 156 | |
| ... | ... | @@ -168,15 +167,14 @@ class CNLiveVitaeCertificateAddInfoCell: UITableViewCell, UITextFieldDelegate{ |
| 168 | 167 | titleLabel.font = BoldFont_15 |
| 169 | 168 | return titleLabel |
| 170 | 169 | }() |
| 171 | - lazy var cerYouXiaoTF :UITextField = { | |
| 172 | - let searchTF = UITextField() | |
| 170 | + lazy var cerYouXiaoTF :UILabel = { | |
| 171 | + let searchTF = UILabel() | |
| 173 | 172 | searchTF.textAlignment = .right |
| 174 | - searchTF.clearButtonMode = .always | |
| 175 | - searchTF.textColor = HexColor("#333333") | |
| 173 | + searchTF.textColor = HexColor("#B3B3B3")//HexColor("#333333") | |
| 176 | 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 | 178 | return searchTF |
| 181 | 179 | }() |
| 182 | 180 | |
| ... | ... | @@ -219,7 +217,7 @@ class CNLiveVitaeCertificateAddInfoCell: UITableViewCell, UITextFieldDelegate{ |
| 219 | 217 | self.contentView.addSubview(self.whiteBgView) |
| 220 | 218 | self.whiteBgView.snp.makeConstraints { make in |
| 221 | 219 | make.top.equalTo(15) |
| 222 | - make.height.equalTo(700) | |
| 220 | + make.bottom.equalToSuperview() | |
| 223 | 221 | make.left.equalTo(15) |
| 224 | 222 | make.right.equalToSuperview().offset(-15) |
| 225 | 223 | } |
| ... | ... | @@ -260,7 +258,7 @@ class CNLiveVitaeCertificateAddInfoCell: UITableViewCell, UITextFieldDelegate{ |
| 260 | 258 | self.cerNameTF.snp.makeConstraints { make in |
| 261 | 259 | make.centerY.equalTo(self.cerNameTitleLabel.snp.centerY) |
| 262 | 260 | make.left.greaterThanOrEqualTo(self.cerNameTitleLabel.snp.right).offset(10) |
| 263 | - make.right.equalToSuperview().offset(-15) | |
| 261 | + make.right.equalToSuperview() | |
| 264 | 262 | make.height.equalTo(21) |
| 265 | 263 | } |
| 266 | 264 | |
| ... | ... | @@ -288,7 +286,7 @@ class CNLiveVitaeCertificateAddInfoCell: UITableViewCell, UITextFieldDelegate{ |
| 288 | 286 | self.cerNumberTF.snp.makeConstraints { make in |
| 289 | 287 | make.centerY.equalTo(self.cerNumberTitleLabel.snp.centerY) |
| 290 | 288 | make.left.greaterThanOrEqualTo(self.cerNumberTitleLabel.snp.right).offset(10) |
| 291 | - make.right.equalToSuperview().offset(-15) | |
| 289 | + make.right.equalToSuperview() | |
| 292 | 290 | make.height.equalTo(21) |
| 293 | 291 | } |
| 294 | 292 | |
| ... | ... | @@ -310,7 +308,7 @@ class CNLiveVitaeCertificateAddInfoCell: UITableViewCell, UITextFieldDelegate{ |
| 310 | 308 | self.cerLevelTF.snp.makeConstraints { make in |
| 311 | 309 | make.centerY.equalTo(self.cerLevelTitleLabel.snp.centerY) |
| 312 | 310 | make.left.greaterThanOrEqualTo(self.cerLevelTitleLabel.snp.right).offset(10) |
| 313 | - make.right.equalToSuperview().offset(-15) | |
| 311 | + make.right.equalToSuperview() | |
| 314 | 312 | make.height.equalTo(21) |
| 315 | 313 | } |
| 316 | 314 | |
| ... | ... | @@ -332,7 +330,7 @@ class CNLiveVitaeCertificateAddInfoCell: UITableViewCell, UITextFieldDelegate{ |
| 332 | 330 | self.cerTimeTF.snp.makeConstraints { make in |
| 333 | 331 | make.centerY.equalTo(self.cerTimeTitleLabel.snp.centerY) |
| 334 | 332 | make.left.greaterThanOrEqualTo(self.cerTimeTitleLabel.snp.right).offset(10) |
| 335 | - make.right.equalToSuperview().offset(-15) | |
| 333 | + make.right.equalToSuperview().offset(-25) | |
| 336 | 334 | make.height.equalTo(21) |
| 337 | 335 | } |
| 338 | 336 | |
| ... | ... | @@ -354,7 +352,7 @@ class CNLiveVitaeCertificateAddInfoCell: UITableViewCell, UITextFieldDelegate{ |
| 354 | 352 | self.cerYouXiaoTF.snp.makeConstraints { make in |
| 355 | 353 | make.centerY.equalTo(self.cerYouXiaoTitleLabel.snp.centerY) |
| 356 | 354 | make.left.greaterThanOrEqualTo(self.cerYouXiaoTitleLabel.snp.right).offset(10) |
| 357 | - make.right.equalToSuperview().offset(-15) | |
| 355 | + make.right.equalToSuperview().offset(-25) | |
| 358 | 356 | make.height.equalTo(21) |
| 359 | 357 | } |
| 360 | 358 | |
| ... | ... | @@ -382,7 +380,7 @@ class CNLiveVitaeCertificateAddInfoCell: UITableViewCell, UITextFieldDelegate{ |
| 382 | 380 | self.cerJiGouTF.snp.makeConstraints { make in |
| 383 | 381 | make.centerY.equalTo(self.cerJiGouTitleLabel.snp.centerY) |
| 384 | 382 | make.left.greaterThanOrEqualTo(self.cerJiGouTitleLabel.snp.right).offset(10) |
| 385 | - make.right.equalToSuperview().offset(-15) | |
| 383 | + make.right.equalToSuperview() | |
| 386 | 384 | make.height.equalTo(21) |
| 387 | 385 | } |
| 388 | 386 | } |
| ... | ... | @@ -391,8 +389,37 @@ class CNLiveVitaeCertificateAddInfoCell: UITableViewCell, UITextFieldDelegate{ |
| 391 | 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 | 420 | func textFieldShouldReturn(_ textField: UITextField) -> Bool { |
| 395 | 421 | self.tfReturnBlock?() |
| 396 | 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 | 250 | |
| 251 | 251 | make.top.equalTo(self.cerLevelTitleLabel.snp.top) |
| 252 | 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 | 255 | self.whiteBgView.addSubview(self.cerNumberDetailTitleLabel) |
| 256 | 256 | self.cerNumberDetailTitleLabel.snp.makeConstraints { make in |
| 257 | 257 | make.top.equalTo(self.cerNumberTitleLabel.snp.bottom).offset(3) |
| 258 | 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 | 260 | make.right.equalToSuperview().offset(-5) |
| 261 | 261 | } |
| 262 | 262 | self.whiteBgView.addSubview(self.cerJiGouTitleLabel) | ... | ... |
metaCode/Classes/Main/MinePage/View/CNLiveMineInfoAlertView.swift
| ... | ... | @@ -118,7 +118,8 @@ class MineInfoAlertView: UIView { |
| 118 | 118 | datePicker.setDate(date!, animated: true) |
| 119 | 119 | } |
| 120 | 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 | 123 | datePicker.addTarget(self, action: #selector(dateChangeAction), for: .valueChanged) |
| 123 | 124 | return datePicker |
| 124 | 125 | }() |
| ... | ... | @@ -638,7 +639,7 @@ class MineStandListAlertView: UIView, UIPickerViewDelegate, UIPickerViewDataSour |
| 638 | 639 | datePicker.setDate(date!, animated: true) |
| 639 | 640 | } |
| 640 | 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 | 643 | datePicker.addTarget(self, action: #selector(dateChangeAction), for: .valueChanged) |
| 643 | 644 | return datePicker |
| 644 | 645 | }() | ... | ... |