Commit 5fac66f3 authored by David黄金龙's avatar David黄金龙

Merge commit '70009ba4' into davidhuang

* commit '70009ba4':
  字段校验
  家庭信息
  省市区改成省市
parents 4fbdcb28 70009ba4
...@@ -10,6 +10,7 @@ ...@@ -10,6 +10,7 @@
04010B952B6A1DE90093F3BB /* YHSaveAndSubmitView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 04010B942B6A1DE90093F3BB /* YHSaveAndSubmitView.swift */; }; 04010B952B6A1DE90093F3BB /* YHSaveAndSubmitView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 04010B942B6A1DE90093F3BB /* YHSaveAndSubmitView.swift */; };
040ED45F2B91711A005CA3F8 /* YHCNIDCardModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = 040ED45E2B91711A005CA3F8 /* YHCNIDCardModel.swift */; }; 040ED45F2B91711A005CA3F8 /* YHCNIDCardModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = 040ED45E2B91711A005CA3F8 /* YHCNIDCardModel.swift */; };
040ED4612B9173DE005CA3F8 /* YHHKIDCardModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = 040ED4602B9173DE005CA3F8 /* YHHKIDCardModel.swift */; }; 040ED4612B9173DE005CA3F8 /* YHHKIDCardModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = 040ED4602B9173DE005CA3F8 /* YHHKIDCardModel.swift */; };
040ED4632B91BC33005CA3F8 /* area.plist in Resources */ = {isa = PBXBuildFile; fileRef = 040ED4622B91BC33005CA3F8 /* area.plist */; };
0413A6D82B8C76290006D154 /* YHCertificateUploadVC.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0413A6D72B8C76290006D154 /* YHCertificateUploadVC.swift */; }; 0413A6D82B8C76290006D154 /* YHCertificateUploadVC.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0413A6D72B8C76290006D154 /* YHCertificateUploadVC.swift */; };
041B52872B5657B3007EBCEB /* IMAppKey.swift in Sources */ = {isa = PBXBuildFile; fileRef = 041B52862B5657B3007EBCEB /* IMAppKey.swift */; }; 041B52872B5657B3007EBCEB /* IMAppKey.swift in Sources */ = {isa = PBXBuildFile; fileRef = 041B52862B5657B3007EBCEB /* IMAppKey.swift */; };
041B528D2B5E58FA007EBCEB /* YHFormItemDoubleChoiceCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = 041B528C2B5E58FA007EBCEB /* YHFormItemDoubleChoiceCell.swift */; }; 041B528D2B5E58FA007EBCEB /* YHFormItemDoubleChoiceCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = 041B528C2B5E58FA007EBCEB /* YHFormItemDoubleChoiceCell.swift */; };
...@@ -65,7 +66,6 @@ ...@@ -65,7 +66,6 @@
0468D4512B67721700CFB916 /* YHMainInformationCardTableViewCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0468D4502B67721700CFB916 /* YHMainInformationCardTableViewCell.swift */; }; 0468D4512B67721700CFB916 /* YHMainInformationCardTableViewCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0468D4502B67721700CFB916 /* YHMainInformationCardTableViewCell.swift */; };
0468D4532B6782BE00CFB916 /* YHCardExampleView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0468D4522B6782BE00CFB916 /* YHCardExampleView.swift */; }; 0468D4532B6782BE00CFB916 /* YHCardExampleView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0468D4522B6782BE00CFB916 /* YHCardExampleView.swift */; };
0468D4552B6889A500CFB916 /* YHDatePickView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0468D4542B6889A500CFB916 /* YHDatePickView.swift */; }; 0468D4552B6889A500CFB916 /* YHDatePickView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0468D4542B6889A500CFB916 /* YHDatePickView.swift */; };
0468D4772B68A08600CFB916 /* area.plist in Resources */ = {isa = PBXBuildFile; fileRef = 0468D4712B68A08600CFB916 /* area.plist */; };
0468D4782B68A08600CFB916 /* YHAddressModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0468D4722B68A08600CFB916 /* YHAddressModel.swift */; }; 0468D4782B68A08600CFB916 /* YHAddressModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0468D4722B68A08600CFB916 /* YHAddressModel.swift */; };
0468D4792B68A08600CFB916 /* YHAddressViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0468D4732B68A08600CFB916 /* YHAddressViewController.swift */; }; 0468D4792B68A08600CFB916 /* YHAddressViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0468D4732B68A08600CFB916 /* YHAddressViewController.swift */; };
0468D47A2B68A08600CFB916 /* YHAddressPickViewTableViewCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0468D4742B68A08600CFB916 /* YHAddressPickViewTableViewCell.swift */; }; 0468D47A2B68A08600CFB916 /* YHAddressPickViewTableViewCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0468D4742B68A08600CFB916 /* YHAddressPickViewTableViewCell.swift */; };
...@@ -309,6 +309,7 @@ ...@@ -309,6 +309,7 @@
04010B942B6A1DE90093F3BB /* YHSaveAndSubmitView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHSaveAndSubmitView.swift; sourceTree = "<group>"; }; 04010B942B6A1DE90093F3BB /* YHSaveAndSubmitView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHSaveAndSubmitView.swift; sourceTree = "<group>"; };
040ED45E2B91711A005CA3F8 /* YHCNIDCardModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHCNIDCardModel.swift; sourceTree = "<group>"; }; 040ED45E2B91711A005CA3F8 /* YHCNIDCardModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHCNIDCardModel.swift; sourceTree = "<group>"; };
040ED4602B9173DE005CA3F8 /* YHHKIDCardModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHHKIDCardModel.swift; sourceTree = "<group>"; }; 040ED4602B9173DE005CA3F8 /* YHHKIDCardModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHHKIDCardModel.swift; sourceTree = "<group>"; };
040ED4622B91BC33005CA3F8 /* area.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; path = area.plist; sourceTree = "<group>"; };
0413A6D72B8C76290006D154 /* YHCertificateUploadVC.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHCertificateUploadVC.swift; sourceTree = "<group>"; }; 0413A6D72B8C76290006D154 /* YHCertificateUploadVC.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHCertificateUploadVC.swift; sourceTree = "<group>"; };
041B52862B5657B3007EBCEB /* IMAppKey.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = IMAppKey.swift; sourceTree = "<group>"; }; 041B52862B5657B3007EBCEB /* IMAppKey.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = IMAppKey.swift; sourceTree = "<group>"; };
041B528C2B5E58FA007EBCEB /* YHFormItemDoubleChoiceCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHFormItemDoubleChoiceCell.swift; sourceTree = "<group>"; }; 041B528C2B5E58FA007EBCEB /* YHFormItemDoubleChoiceCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHFormItemDoubleChoiceCell.swift; sourceTree = "<group>"; };
...@@ -364,7 +365,6 @@ ...@@ -364,7 +365,6 @@
0468D4502B67721700CFB916 /* YHMainInformationCardTableViewCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHMainInformationCardTableViewCell.swift; sourceTree = "<group>"; }; 0468D4502B67721700CFB916 /* YHMainInformationCardTableViewCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHMainInformationCardTableViewCell.swift; sourceTree = "<group>"; };
0468D4522B6782BE00CFB916 /* YHCardExampleView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHCardExampleView.swift; sourceTree = "<group>"; }; 0468D4522B6782BE00CFB916 /* YHCardExampleView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHCardExampleView.swift; sourceTree = "<group>"; };
0468D4542B6889A500CFB916 /* YHDatePickView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHDatePickView.swift; sourceTree = "<group>"; }; 0468D4542B6889A500CFB916 /* YHDatePickView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHDatePickView.swift; sourceTree = "<group>"; };
0468D4712B68A08600CFB916 /* area.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; path = area.plist; sourceTree = "<group>"; };
0468D4722B68A08600CFB916 /* YHAddressModel.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = YHAddressModel.swift; sourceTree = "<group>"; }; 0468D4722B68A08600CFB916 /* YHAddressModel.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = YHAddressModel.swift; sourceTree = "<group>"; };
0468D4732B68A08600CFB916 /* YHAddressViewController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = YHAddressViewController.swift; sourceTree = "<group>"; }; 0468D4732B68A08600CFB916 /* YHAddressViewController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = YHAddressViewController.swift; sourceTree = "<group>"; };
0468D4742B68A08600CFB916 /* YHAddressPickViewTableViewCell.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = YHAddressPickViewTableViewCell.swift; sourceTree = "<group>"; }; 0468D4742B68A08600CFB916 /* YHAddressPickViewTableViewCell.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = YHAddressPickViewTableViewCell.swift; sourceTree = "<group>"; };
...@@ -771,7 +771,7 @@ ...@@ -771,7 +771,7 @@
0468D4702B68A08600CFB916 /* YHAddressPicker */ = { 0468D4702B68A08600CFB916 /* YHAddressPicker */ = {
isa = PBXGroup; isa = PBXGroup;
children = ( children = (
0468D4712B68A08600CFB916 /* area.plist */, 040ED4622B91BC33005CA3F8 /* area.plist */,
0468D4722B68A08600CFB916 /* YHAddressModel.swift */, 0468D4722B68A08600CFB916 /* YHAddressModel.swift */,
0468D4732B68A08600CFB916 /* YHAddressViewController.swift */, 0468D4732B68A08600CFB916 /* YHAddressViewController.swift */,
0468D4742B68A08600CFB916 /* YHAddressPickViewTableViewCell.swift */, 0468D4742B68A08600CFB916 /* YHAddressPickViewTableViewCell.swift */,
...@@ -1681,7 +1681,7 @@ ...@@ -1681,7 +1681,7 @@
A5C5B2EE2B4F9B8800A7C5D1 /* Localizable.xcstrings in Resources */, A5C5B2EE2B4F9B8800A7C5D1 /* Localizable.xcstrings in Resources */,
042F88952B84AFC7008B60BD /* YHQuestionList.plist in Resources */, 042F88952B84AFC7008B60BD /* YHQuestionList.plist in Resources */,
A58951C52B398D1000225C19 /* Launch Screen.storyboard in Resources */, A58951C52B398D1000225C19 /* Launch Screen.storyboard in Resources */,
0468D4772B68A08600CFB916 /* area.plist in Resources */, 040ED4632B91BC33005CA3F8 /* area.plist in Resources */,
A51044182B493675006B60BB /* README.md in Resources */, A51044182B493675006B60BB /* README.md in Resources */,
A5573EDB2B317C0000D98EC0 /* Assets.xcassets in Resources */, A5573EDB2B317C0000D98EC0 /* Assets.xcassets in Resources */,
); );
......
...@@ -137,6 +137,7 @@ class YHChildInfoContainerVC: YHBaseViewController, YHSpouseInfoVCProtocol { ...@@ -137,6 +137,7 @@ class YHChildInfoContainerVC: YHBaseViewController, YHSpouseInfoVCProtocol {
guard let self = self else { return } guard let self = self else { return }
if let targetStep = getStepForArrayIndex(index) { if let targetStep = getStepForArrayIndex(index) {
currentStep = targetStep currentStep = targetStep
child.step = targetStep
} }
print("index:\(index)") print("index:\(index)")
} }
......
...@@ -66,7 +66,9 @@ class YHSpouseInfoContainerVC: YHBaseViewController, YHSpouseInfoVCProtocol { ...@@ -66,7 +66,9 @@ class YHSpouseInfoContainerVC: YHBaseViewController, YHSpouseInfoVCProtocol {
}() }()
var bottomView: YHSaveAndSubmitView = { var bottomView: YHSaveAndSubmitView = {
return YHSaveAndSubmitView.createView() let view = YHSaveAndSubmitView.createView()
view.changeRightBtnTitle("下一步")
return view
}() }()
let primaryInfoVC = YHSpousePrimaryInfoVC() let primaryInfoVC = YHSpousePrimaryInfoVC()
......
...@@ -249,7 +249,7 @@ extension YHFamilyMemberInfoVC { ...@@ -249,7 +249,7 @@ extension YHFamilyMemberInfoVC {
// 添加兄弟姐妹子女 // 添加兄弟姐妹子女
func addFamilyMember(_ type:YHFamilyMemberType) { func addFamilyMember(_ type:YHFamilyMemberType) {
let dict:[String: Any] = ["orderId":self.orderId, let dict:[String: Any] = ["order_id":self.orderId,
"relation":String(type.rawValue), "relation":String(type.rawValue),
"step":0, "step":0,
"next":false, "next":false,
...@@ -543,6 +543,7 @@ extension YHFamilyMemberInfoVC : UITableViewDelegate, UITableViewDataSource { ...@@ -543,6 +543,7 @@ extension YHFamilyMemberInfoVC : UITableViewDelegate, UITableViewDataSource {
if detailItem.relationType == .father || detailItem.relationType == .mother { if detailItem.relationType == .father || detailItem.relationType == .mother {
let vc = YHParentInfoVC() let vc = YHParentInfoVC()
vc.parentInfo = detailItem vc.parentInfo = detailItem
vc.orderId = orderId
self.navigationController?.pushViewController(vc) self.navigationController?.pushViewController(vc)
return return
} }
......
...@@ -11,6 +11,7 @@ import UIKit ...@@ -11,6 +11,7 @@ import UIKit
class YHParentInfoVC: YHBaseViewController { class YHParentInfoVC: YHBaseViewController {
var parentInfo: YHFamilyMember? var parentInfo: YHFamilyMember?
var orderId: Int = 0
var items:[[YHFormItemProtocol]] = [[YHFormItemProtocol]]() var items:[[YHFormItemProtocol]] = [[YHFormItemProtocol]]()
let familyRequest:YHFamilyRequestViewModel = YHFamilyRequestViewModel() let familyRequest:YHFamilyRequestViewModel = YHFamilyRequestViewModel()
// 是否显示未填写错误提示 // 是否显示未填写错误提示
...@@ -581,29 +582,27 @@ extension YHParentInfoVC { ...@@ -581,29 +582,27 @@ extension YHParentInfoVC {
func submitInfo() { func submitInfo() {
let isChecked = checkIntegrity() // let isChecked = checkIntegrity()
isNeedShowError = !isChecked // isNeedShowError = !isChecked
//
self.tableView .reloadData() // self.tableView .reloadData()
//
if !isChecked { // if !isChecked {
YHHUD.flash(message: "资料还未填完") // YHHUD.flash(message: "资料还未填完")
return // return
} // }
guard let parentInfo = parentInfo else { return } guard let parentInfo = parentInfo else { return }
guard let info = parentInfo.toDictionary() else { return } guard let info = parentInfo.toDictionary() else { return }
let dict:[String: Any] = ["orderId":parentInfo.orderId, let dict:[String: Any] = ["order_id":orderId,
"relation":parentInfo.relationType.rawValue, "relation":parentInfo.relation,
"step":parentInfo.step, "step":parentInfo.step,
"next":false, "next":false,
"info":info] "info":info]
self.familyRequest.addOrSaveFamilyMember(params:dict) { success, error in self.familyRequest.addOrSaveFamilyMember(params:dict) { success, error in
if success { YHHUD.flash(message: success ? "保存成功" : "保存失败")
}
} }
} }
......
...@@ -157,7 +157,7 @@ class YHFormItemSelectSheetCell: UITableViewCell { ...@@ -157,7 +157,7 @@ class YHFormItemSelectSheetCell: UITableViewCell {
arrowImgView.snp.makeConstraints { make in arrowImgView.snp.makeConstraints { make in
make.size.equalTo(CGSizeMake(20, 20)) make.size.equalTo(CGSizeMake(20, 20))
make.right.equalToSuperview().offset(-horizonalGap) make.right.equalToSuperview().offset(-horizonalGap)
make.centerY.equalTo(detailLabel) make.top.equalTo(titleLabel)
} }
topLine.snp.makeConstraints { make in topLine.snp.makeConstraints { make in
......
...@@ -140,6 +140,10 @@ class YHSaveAndSubmitView: UIView { ...@@ -140,6 +140,10 @@ class YHSaveAndSubmitView: UIView {
} }
} }
func changeRightBtnTitle(_ title:String?) {
submitBtn.setTitle(title, for: .normal)
}
@objc func didClickSubmitBtn() { @objc func didClickSubmitBtn() {
if let submitBlock = submitBlock { if let submitBlock = submitBlock {
submitBlock() submitBlock()
......
...@@ -29,7 +29,8 @@ class YHMainApplicantInformationViewController: YHBaseViewController { ...@@ -29,7 +29,8 @@ class YHMainApplicantInformationViewController: YHBaseViewController {
func getData() { func getData() {
viewModel.requestMainInformation("\(orderId)") {[weak self] success, error in viewModel.requestMainInformation("\(orderId)") {[weak self] success, error in
guard let self = self else { return } guard let self = self else { return }
self.stepView.currentIndex = self.viewModel.mainModel.step ?? 0 self.stepView.maxIndex = self.viewModel.mainModel.step
self.stepView.currentIndex = self.viewModel.mainModel.step
self.updateDataSource() self.updateDataSource()
} }
} }
...@@ -92,8 +93,11 @@ class YHMainApplicantInformationViewController: YHBaseViewController { ...@@ -92,8 +93,11 @@ class YHMainApplicantInformationViewController: YHBaseViewController {
guard let self = self else { return } guard let self = self else { return }
if self.viewModel.isCanNext(self.stepView.currentIndex) { if self.viewModel.isCanNext(self.stepView.currentIndex) {
self.stepView.currentIndex = self.stepView.currentIndex + 1 self.stepView.currentIndex = self.stepView.currentIndex + 1
self.viewModel.updateMainInformation(.submit, self.orderId) {[weak self] success in self.viewModel.updateMainInformation(.submit, self.orderId) {[weak self] success, error in
guard let self = self else { return } guard let self = self else { return }
if let error = error {
YHHUD.flash(message: error.errorMsg )
} else {
self.isShowPrompt = false self.isShowPrompt = false
self.stepView.currentIndex = self.stepView.currentIndex self.stepView.currentIndex = self.stepView.currentIndex
if self.stepView.currentIndex == self.stepView.dataSource?.count { if self.stepView.currentIndex == self.stepView.dataSource?.count {
...@@ -103,6 +107,7 @@ class YHMainApplicantInformationViewController: YHBaseViewController { ...@@ -103,6 +107,7 @@ class YHMainApplicantInformationViewController: YHBaseViewController {
self.updateDataSource() self.updateDataSource()
} }
} }
}
} else { } else {
self.isShowPrompt = true self.isShowPrompt = true
self.updateDataSource() self.updateDataSource()
...@@ -111,8 +116,13 @@ class YHMainApplicantInformationViewController: YHBaseViewController { ...@@ -111,8 +116,13 @@ class YHMainApplicantInformationViewController: YHBaseViewController {
} }
bottom.saveBlock = { [weak self] in bottom.saveBlock = { [weak self] in
guard let self = self else { return } guard let self = self else { return }
self.viewModel.updateMainInformation(.save, self.orderId) {[weak self] success in self.viewModel.updateMainInformation(.save, self.orderId) {[weak self] success, error in
guard let self = self else { return } guard let _ = self else { return }
if let error = error {
YHHUD.flash(message: error.errorMsg )
} else {
YHHUD.flash(message: "保存成功")
}
} }
} }
return bottom return bottom
...@@ -148,7 +158,7 @@ extension YHMainApplicantInformationViewController: UITableViewDelegate, UITable ...@@ -148,7 +158,7 @@ extension YHMainApplicantInformationViewController: UITableViewDelegate, UITable
guard let self = self else { return } guard let self = self else { return }
self.viewModel.updateModel(model) self.viewModel.updateModel(model)
let id = model.id let id = model.id
if id != .id32 && id != .id4 && id != .id8 && id != .id9 && id != .id12 && id != .id13 && id != .id21 && id != .id22 && id != .id23 && id != .id34 && id != .id29 && id != .id30 && id != .id35 { if id != .id32 && id != .id4 && id != .id8 && id != .id9 && id != .id12 && id != .id13 && id != .id17 && id != .id18 && id != .id21 && id != .id22 && id != .id23 && id != .id34 && id != .id29 && id != .id30 && id != .id35 {
self.updateDataSource() self.updateDataSource()
} }
} }
......
...@@ -70,8 +70,9 @@ struct YHItemModel { ...@@ -70,8 +70,9 @@ struct YHItemModel {
var type: YHItemSelectType? var type: YHItemSelectType?
var value: [String]? var value: [String]?
var isShowPrompts: Bool? var isShowPrompts: Bool?
var alertMessage: String?
init(id: YHItemID? = nil, isNeed: Bool? = nil, title: String? = nil, isUserKeyBoard: Bool? = nil, prompts: String? = nil, message: String? = nil, leftButtonString: String? = nil, rightButtonString: String? = nil, type: YHItemSelectType? = nil, value: [String]? = nil, isShowPrompts: Bool? = nil) { init(id: YHItemID? = nil, isNeed: Bool? = nil, title: String? = nil, isUserKeyBoard: Bool? = nil, prompts: String? = nil, message: String? = nil, leftButtonString: String? = nil, rightButtonString: String? = nil, type: YHItemSelectType? = nil, value: [String]? = nil, isShowPrompts: Bool? = nil, alertMessage: String? = nil) {
self.id = id self.id = id
self.isNeed = isNeed self.isNeed = isNeed
self.title = title self.title = title
...@@ -83,6 +84,7 @@ struct YHItemModel { ...@@ -83,6 +84,7 @@ struct YHItemModel {
self.type = type self.type = type
self.value = value self.value = value
self.isShowPrompts = isShowPrompts self.isShowPrompts = isShowPrompts
self.alertMessage = alertMessage
} }
} }
......
...@@ -10,7 +10,7 @@ import Foundation ...@@ -10,7 +10,7 @@ import Foundation
struct YHCountryModel { struct YHCountryModel {
var provincesArray: [YHProvincesModel] = [] var provincesArray: [YHProvincesModel] = []
init(dic: [String:[String:[String]]]) { init(dic: [String:[String]]) {
for (key,value) in dic { for (key,value) in dic {
let model = YHProvincesModel(name: key, dic: value) let model = YHProvincesModel(name: key, dic: value)
provincesArray.append(model) provincesArray.append(model)
...@@ -24,26 +24,18 @@ struct YHCountryModel { ...@@ -24,26 +24,18 @@ struct YHCountryModel {
struct YHProvincesModel { struct YHProvincesModel {
var provincesName: String = "" var provincesName: String = ""
var cityArray: [YHCityModel] = [] var cityArray: [YHCityModel] = []
init(name : String ,dic:[String: [String]]) { init(name : String ,dic:[String]) {
provincesName = name provincesName = name
for (key,value) in dic { for value in dic {
let model = YHCityModel(name: key, Arr: value) let model = YHCityModel(name: value)
cityArray.append(model) cityArray.append(model)
cityArray.sort { a, b in
a.cityName < b.cityName
}
} }
} }
} }
struct YHCityModel { struct YHCityModel {
var cityName: String = "" var cityName: String = ""
var areaArray: [String] = [] init(name: String) {
init(name: String,Arr: [String]) {
cityName = name cityName = name
for str in Arr {
areaArray.append(str)
}
areaArray.sort(by: <)
} }
} }
...@@ -12,7 +12,6 @@ import UIKit ...@@ -12,7 +12,6 @@ import UIKit
enum YHLocationPickViewTableViewType { enum YHLocationPickViewTableViewType {
case provinces //省份 case provinces //省份
case city //城市 case city //城市
case area //地区
} }
class YHAddressPickView: UIView { class YHAddressPickView: UIView {
...@@ -80,25 +79,6 @@ class YHAddressPickView: UIView { ...@@ -80,25 +79,6 @@ class YHAddressPickView: UIView {
model.cityName model.cityName
}) })
self.tableView.reloadData() self.tableView.reloadData()
case .area:
/// 选择地区时没有上方热门城市View,有titleSV
self.tableView.tableHeaderView = UIView()
self.tableView.frame = CGRect(x: 0, y: 136, width: UIScreen.main.bounds.width, height: 367)
self.titleSV.isHidden = false
self.leftLabel.isHidden = false
/// 通过修改titleSV中button的选中状态来修改它的颜色
for button in buttonArr {
button.isSelected = false
if button.tag == 2 {
button.isSelected = true
}
}
/// 滚动titleSV中button下滚动的Line
UIView.animate(withDuration: 0.3, animations: {() -> Void in
self.underLine.center = CGPoint(x: self.buttonArr[2].center.x, y: self.underLine.center.y)
})
self.dataArray = cityModel?.areaArray
self.tableView.reloadData()
} }
} }
} }
...@@ -206,8 +186,8 @@ class YHAddressPickView: UIView { ...@@ -206,8 +186,8 @@ class YHAddressPickView: UIView {
titleSV = UIScrollView(frame: CGRect(x: 0, y: 72, width: UIScreen.main.bounds.width, height: 44)) titleSV = UIScrollView(frame: CGRect(x: 0, y: 72, width: UIScreen.main.bounds.width, height: 44))
self.underLine = UIView(frame: CGRect(x: 0, y: 40, width: 30, height: 2)) self.underLine = UIView(frame: CGRect(x: 0, y: 40, width: 30, height: 2))
self.underLine.backgroundColor = selectColor self.underLine.backgroundColor = selectColor
for i in 0..<3 { for i in 0..<2 {
let button = UIButton(frame: CGRect(x: 24 + CGFloat(i) * (UIScreen.main.bounds.width - 47) / 3, y: 0, width: UIScreen.main.bounds.width / 3, height: 44)) let button = UIButton(frame: CGRect(x: 24 + CGFloat(i) * (UIScreen.main.bounds.width - 47) / 2, y: 0, width: UIScreen.main.bounds.width / 3, height: 44))
button.tag = Int(i) button.tag = Int(i)
if i == 1 { if i == 1 {
button.isSelected = true button.isSelected = true
...@@ -250,8 +230,6 @@ class YHAddressPickView: UIView { ...@@ -250,8 +230,6 @@ class YHAddressPickView: UIView {
let hotCity = ["北京市","上海市","广州市","深圳市","杭州市","南京市","苏州市","天津市","武汉市","长沙市","重庆市","成都市"] let hotCity = ["北京市","上海市","广州市","深圳市","杭州市","南京市","苏州市","天津市","武汉市","长沙市","重庆市","成都市"]
let tag = sender.tag let tag = sender.tag
setHotCityData(province: hotProvince[tag], city: hotCity[tag]) setHotCityData(province: hotProvince[tag], city: hotCity[tag])
self.tableViewType = .area
} }
/// 选择view.type /// 选择view.type
@objc private func onClickTitlebutton(sender: UIButton) { @objc private func onClickTitlebutton(sender: UIButton) {
...@@ -280,16 +258,19 @@ class YHAddressPickView: UIView { ...@@ -280,16 +258,19 @@ class YHAddressPickView: UIView {
}) { }) {
self.cityModel = cityModel self.cityModel = cityModel
self.selectedCity = city self.selectedCity = city
self.tableViewType = .area
} }
} }
} }
} }
let selectLocation = selectedProvince + " " + selectedCity + " " + selectedArea
if backLocationString != nil {
backLocationString!(selectLocation,selectedProvince,selectedCity,selectedArea)
}
} }
/// 从area.plist获取全部地区数据 /// 从area.plist获取全部地区数据
private func initLocationData() { private func initLocationData() {
guard let dic = NSDictionary(contentsOfFile: Bundle.main.path(forResource: "area", ofType: "plist") ?? "") as? [String:[String:[String]]] else { guard let dic = NSDictionary(contentsOfFile: Bundle.main.path(forResource: "area", ofType: "plist") ?? "") as? [String:[String]] else {
return return
} }
locationModel = YHCountryModel(dic: dic) locationModel = YHCountryModel(dic: dic)
...@@ -330,10 +311,6 @@ extension YHAddressPickView: UITableViewDelegate,UITableViewDataSource { ...@@ -330,10 +311,6 @@ extension YHAddressPickView: UITableViewDelegate,UITableViewDataSource {
/// 当前为选择城市状态时,保存选中城市,刷新状态为选择地区 /// 当前为选择城市状态时,保存选中城市,刷新状态为选择地区
selectedCity = (self.provincesModel?.cityArray[indexPath.row - 1])?.cityName ?? "" selectedCity = (self.provincesModel?.cityArray[indexPath.row - 1])?.cityName ?? ""
self.cityModel = self.provincesModel?.cityArray.first(where: {$0.cityName == selectedCity}) self.cityModel = self.provincesModel?.cityArray.first(where: {$0.cityName == selectedCity})
self.tableViewType = .area
case .area:
/// 当前为选择地区状态时,保存选中地区,执行回调block.将选中数据回调
selectedArea = self.dataArray![indexPath.row - 1]
let selectLocation = selectedProvince + " " + selectedCity + " " + selectedArea let selectLocation = selectedProvince + " " + selectedCity + " " + selectedArea
if backLocationString != nil { if backLocationString != nil {
backLocationString!(selectLocation,selectedProvince,selectedCity,selectedArea) backLocationString!(selectLocation,selectedProvince,selectedCity,selectedArea)
......
...@@ -155,7 +155,7 @@ class YHItemView: UIView { ...@@ -155,7 +155,7 @@ class YHItemView: UIView {
} }
messageTextField.placeholder = dataSource.prompts messageTextField.placeholder = dataSource.prompts
messageTextField.text = dataSource.message messageTextField.text = dataSource.message
showPromptLabel.text = "\(dataSource.prompts ?? "")" + "\(dataSource.title ?? "")" showPromptLabel.text = dataSource.alertMessage
if dataSource.isUserKeyBoard ?? false { if dataSource.isUserKeyBoard ?? false {
nextStepImageView.isHidden = true nextStepImageView.isHidden = true
centerButton.isHidden = true centerButton.isHidden = true
...@@ -167,12 +167,27 @@ class YHItemView: UIView { ...@@ -167,12 +167,27 @@ class YHItemView: UIView {
case .time: break case .time: break
case .image: break case .image: break
case .id: case .id:
messageTextField.text = YHFormPickerViewSubType.certificate(YHPickerViewCertificateType(rawValue: dataSource.message?.int ?? 0) ?? .chineseStatelessTravelPassport).title let arr = YHOtherInfoFillViewModel.arrIdType
arr.forEach { item in
if item["id"] == dataSource.message {
messageTextField.text = item["title"]
}
}
case .country: break case .country: break
case .sex: case .sex:
messageTextField.text = YHFormPickerViewSubType.gender(YHPickerViewGenderType(rawValue: dataSource.message?.int ?? 0) ?? .female).title let arr = YHOtherInfoFillViewModel.arrSex
arr.forEach { item in
if item["id"] == dataSource.message {
messageTextField.text = item["title"]
}
}
case .marry: case .marry:
messageTextField.text = YHFormPickerViewSubType.marriage(YHPickerViewMarriageType(rawValue: dataSource.message?.int ?? 0) ?? .unmarriage).title let arr = YHOtherInfoFillViewModel.arrMarry
arr.forEach { item in
if item["id"] == dataSource.message {
messageTextField.text = item["title"]
}
}
} }
} }
nextStepImageView.isHidden = false nextStepImageView.isHidden = false
...@@ -278,15 +293,16 @@ class YHItemView: UIView { ...@@ -278,15 +293,16 @@ class YHItemView: UIView {
} }
@objc func centerClick() { @objc func centerClick() {
UIViewController.current?.view.endEditing(true) // 收起键盘
guard let type = dataSource?.type else { return } guard let type = dataSource?.type else { return }
switch type { switch type {
case .normal: case .normal:
printLog("不需要跳转") printLog("不需要跳转")
case .address: case .address:
let addressPicker = YHAddressViewController( selectProvince: "上海市", selectCity: "" ) let addressPicker = YHAddressViewController()
addressPicker.backLocationStringController = { (address,province,city,area) in addressPicker.backLocationStringController = { (address,province,city,area) in
self.dataSource?.message = address self.dataSource?.message = address
self.dataSource?.value = [province, city, area] self.dataSource?.value = [province, city]
self.updateAllViews() self.updateAllViews()
if let block = self.block { if let block = self.block {
block(self.dataSource ?? YHItemModel()) block(self.dataSource ?? YHItemModel())
...@@ -315,10 +331,10 @@ class YHItemView: UIView { ...@@ -315,10 +331,10 @@ class YHItemView: UIView {
let window = UIApplication.shared.yhKeyWindow() let window = UIApplication.shared.yhKeyWindow()
window?.addSubview(view) window?.addSubview(view)
case .id: case .id:
YHFormPickerView.show(type: .certificate, selectTitle: "公务通行证") { selectType in YHOtherPickerView.show(type: .idType) {[weak self] data in
// 选择类型的标题 guard let self = self else { return }
self.dataSource?.message = selectType.title self.dataSource?.message = data.title
self.dataSource?.value = ["\(selectType.index)"] self.dataSource?.value = [data.index]
self.updateAllViews() self.updateAllViews()
if let block = self.block { if let block = self.block {
block(self.dataSource ?? YHItemModel()) block(self.dataSource ?? YHItemModel())
...@@ -335,20 +351,20 @@ class YHItemView: UIView { ...@@ -335,20 +351,20 @@ class YHItemView: UIView {
} }
UIViewController.current?.navigationController?.pushViewController(vc) UIViewController.current?.navigationController?.pushViewController(vc)
case .sex: case .sex:
YHFormPickerView.show(type: .gender, selectType: .gender(.female)) { selectType in YHOtherPickerView.show(type: .sex) {[weak self] data in
// 选择类型的标题 guard let self = self else { return }
self.dataSource?.message = selectType.title self.dataSource?.message = data.title
self.dataSource?.value = ["\(selectType.index)"] self.dataSource?.value = [data.index]
self.updateAllViews() self.updateAllViews()
if let block = self.block { if let block = self.block {
block(self.dataSource ?? YHItemModel()) block(self.dataSource ?? YHItemModel())
} }
} }
case .marry: case .marry:
YHFormPickerView.show(type: .marriage, selectType: .marriage(.divorced)) { selectType in YHOtherPickerView.show(type: .marry) {[weak self] data in
// 选择类型的标题 guard let self = self else { return }
self.dataSource?.message = selectType.title self.dataSource?.message = data.title
self.dataSource?.value = ["\(selectType.index)"] self.dataSource?.value = [data.index]
self.updateAllViews() self.updateAllViews()
if let block = self.block { if let block = self.block {
block(self.dataSource ?? YHItemModel()) block(self.dataSource ?? YHItemModel())
...@@ -365,6 +381,26 @@ extension YHItemView: UITextFieldDelegate { ...@@ -365,6 +381,26 @@ extension YHItemView: UITextFieldDelegate {
func textField(_ textField: UITextField, shouldChangeCharactersIn range: NSRange, replacementString string: String) -> Bool { func textField(_ textField: UITextField, shouldChangeCharactersIn range: NSRange, replacementString string: String) -> Bool {
let newText = (textField.text! as NSString).replacingCharacters(in: range, with: string) let newText = (textField.text! as NSString).replacingCharacters(in: range, with: string)
if (dataSource?.id == .id9 || dataSource?.id == .id21 || dataSource?.id == .id22 || dataSource?.id == .id23) && newText.count > 30 {
return false
}
if (dataSource?.id == .id4 || dataSource?.id == .id32 || dataSource?.id == .id13 || dataSource?.id == .id18 || dataSource?.id == .id32 ) && newText.count > 100 {
return false
}
if (dataSource?.id == .id12 || dataSource?.id == .id17 || dataSource?.id == .id30) && newText.count > 50 {
return false
}
if (dataSource?.id == .id8) && newText.count > 20 {
return false
}
if (dataSource?.id == .id29 || dataSource?.id == .id35) && newText.count > 18 {
return false
}
var data = dataSource ?? YHItemModel() var data = dataSource ?? YHItemModel()
data.message = newText data.message = newText
if let block = block { if let block = block {
......
...@@ -23,6 +23,7 @@ class YHStepView: UIScrollView { ...@@ -23,6 +23,7 @@ class YHStepView: UIScrollView {
updateView(dataSource ?? []) updateView(dataSource ?? [])
} }
} }
var maxIndex: Int = 0
var stepSpace: CGFloat = 6 var stepSpace: CGFloat = 6
var lineWidth: CGFloat { var lineWidth: CGFloat {
guard let dataSource = dataSource else { return 0 } guard let dataSource = dataSource else { return 0 }
...@@ -141,7 +142,7 @@ class YHStepView: UIScrollView { ...@@ -141,7 +142,7 @@ class YHStepView: UIScrollView {
@objc func buttonClick(_ button: UIButton) { @objc func buttonClick(_ button: UIButton) {
let tag = button.tag let tag = button.tag
if tag - 1000 < currentIndex { if tag - 1000 <= maxIndex {
currentIndex = tag - 1000 currentIndex = tag - 1000
if let block = block { if let block = block {
block(currentIndex) block(currentIndex)
......
...@@ -23,23 +23,22 @@ class YHMainApplicantInformationViewModel: YHBaseViewModel { ...@@ -23,23 +23,22 @@ class YHMainApplicantInformationViewModel: YHBaseViewModel {
} }
func getBaseDataSource(_ isShowPrompt: Bool) -> [YHSectionItemModel] { func getBaseDataSource(_ isShowPrompt: Bool) -> [YHSectionItemModel] {
let item = YHItemModel(id: .id1, isNeed: true, title: "国家/地区", isUserKeyBoard: false, prompts: "请选择", message: mainModel.nationality, type: .country, isShowPrompts: isShowPrompt) let item = YHItemModel(id: .id1, isNeed: true, title: "国家/地区", isUserKeyBoard: false, prompts: "请选择", message: mainModel.nationality, type: .country, isShowPrompts: isShowPrompt, alertMessage:"请选择国家/地区")
let section = YHSectionItemModel(title: "国籍", models: [item]) let section = YHSectionItemModel(title: "国籍", models: [item])
let item4 = YHItemModel(id: .id2, isNeed: true, title: "国家/地区", isUserKeyBoard: false, prompts: "请选择", message: mainModel.address.country, type: .country, isShowPrompts: isShowPrompt) let item4 = YHItemModel(id: .id2, isNeed: true, title: "国家/地区", isUserKeyBoard: false, prompts: "请选择", message: mainModel.address.country, type: .country, isShowPrompts: isShowPrompt, alertMessage:"请选择国家/地区")
var string = "" var string = ""
let array = mainModel.address.area let array = mainModel.address.area
for item in array { for item in array {
string = string + item string = string + item
} }
let item1 = YHItemModel(id: .id3, isNeed: true, title: "省市地区", isUserKeyBoard: false, prompts: "请选择", message: string, type: .address, isShowPrompts: isShowPrompt) let item1 = YHItemModel(id: .id3, isNeed: true, title: "省市地区", isUserKeyBoard: false, prompts: "请选择", message: string, type: .address, isShowPrompts: isShowPrompt, alertMessage:"请选择省市地区")
let item2 = YHItemModel(id: .id4, isNeed: true, title: "详细地址", isUserKeyBoard: true, prompts: "请填写小区、楼栋、单元室等", message: mainModel.address.details, isShowPrompts: isShowPrompt, alertMessage:"请填写小区、楼栋、单元室等")
let item2 = YHItemModel(id: .id4, isNeed: true, title: "详细地址", isUserKeyBoard: true, prompts: "请填写小区、楼栋、单元室等", message: mainModel.address.details, isShowPrompts: isShowPrompt) let item11 = YHItemModel(id: .id32, isNeed: true, title: "详细地址", isUserKeyBoard: true, prompts: "请填写国外居住地", message: mainModel.address.foreign, isShowPrompts: isShowPrompt, alertMessage:"请填写国外居住地")
let item11 = YHItemModel(id: .id32, isNeed: true, title: "详细地址", isUserKeyBoard: true, prompts: "请输入", message: mainModel.address.foreign, isShowPrompts: isShowPrompt) let item22 = YHItemModel(id: .id33, isNeed: true, title: "是否在海外居住一年及以上", isUserKeyBoard: false, prompts: "", message: "\(mainModel.is_live_oversea_year)", leftButtonString: "是", rightButtonString: "否", isShowPrompts: isShowPrompt, alertMessage:"请选择是否在海外居住满1年及以上")
let item22 = YHItemModel(id: .id33, isNeed: true, title: "是否在海外居住一年及以上", isUserKeyBoard: false, prompts: "", message: "\(mainModel.is_live_oversea_year)", leftButtonString: "是", rightButtonString: "否", isShowPrompts: isShowPrompt)
let section1 = YHSectionItemModel(title: "现居住地址", models: [item4, item1, item2]) let section1 = YHSectionItemModel(title: "现居住地址", models: [item4, item1, item2])
let section11 = YHSectionItemModel(title: "现居住地址", models: [item4, item11, item22]) let section11 = YHSectionItemModel(title: "现居住地址", models: [item4, item11, item22])
let item3 = YHItemModel(id: .id5, isNeed: true, title: "是否办理", isUserKeyBoard: false, prompts: "", message: "\(mainModel.has_hk_id)", leftButtonString: "是", rightButtonString: "否", isShowPrompts: isShowPrompt) let item3 = YHItemModel(id: .id5, isNeed: true, title: "是否办理", isUserKeyBoard: false, prompts: "", message: "\(mainModel.is_handled)", leftButtonString: "是", rightButtonString: "否", isShowPrompts: isShowPrompt, alertMessage:"请选择是否办理过港澳通行证")
let section2 = YHSectionItemModel(title: "港澳通行证", models: [item3]) let section2 = YHSectionItemModel(title: "港澳通行证", models: [item3])
let addressCountry = mainModel.address.country let addressCountry = mainModel.address.country
if addressCountry.contains("中国") { if addressCountry.contains("中国") {
...@@ -55,24 +54,31 @@ class YHMainApplicantInformationViewModel: YHBaseViewModel { ...@@ -55,24 +54,31 @@ class YHMainApplicantInformationViewModel: YHBaseViewModel {
if nationality.contains("中国") { if nationality.contains("中国") {
flag = true flag = true
} }
let item = YHItemModel(id: .id8, isNeed: flag, title: "身份证号码", isUserKeyBoard: true, prompts: "请输入", message: mainModel.certificates.cn_identity_card.number, isShowPrompts: isShowPrompt)
let item1 = YHItemModel(id: .id9, isNeed: flag, title: "签发地", isUserKeyBoard: true, prompts: "请输入", message: mainModel.certificates.cn_identity_card.issue_at, isShowPrompts: isShowPrompt) let item = YHItemModel(id: .id8, isNeed: flag, title: "身份证号码", isUserKeyBoard: true, prompts: "请输入", message: mainModel.certificates.cn_identity_card.number, isShowPrompts: isShowPrompt, alertMessage:"请输入正确的身份证号码")
let item2 = YHItemModel(id: .id10, isNeed: flag, title: "签发日期", isUserKeyBoard: false, prompts: "请选择", message: mainModel.certificates.cn_identity_card.issue_date_start_at, type: .time, isShowPrompts: isShowPrompt) let item1 = YHItemModel(id: .id9, isNeed: flag, title: "签发地", isUserKeyBoard: true, prompts: "请输入", message: mainModel.certificates.cn_identity_card.issue_at, isShowPrompts: isShowPrompt, alertMessage:"请输入签发地")
let item3 = YHItemModel(id: .id11, isNeed: flag, title: "届满日期", isUserKeyBoard: false, prompts: "请选择", message: mainModel.certificates.cn_identity_card.issue_date_end_at, type: .time, isShowPrompts: isShowPrompt) let item2 = YHItemModel(id: .id10, isNeed: flag, title: "签发日期", isUserKeyBoard: false, prompts: "请选择", message: mainModel.certificates.cn_identity_card.issue_date_start_at, type: .time, isShowPrompts: isShowPrompt, alertMessage:"请选择签发日期")
let item3 = YHItemModel(id: .id11, isNeed: flag, title: "届满日期", isUserKeyBoard: false, prompts: "请选择", message: mainModel.certificates.cn_identity_card.issue_date_end_at, type: .time, isShowPrompts: isShowPrompt, alertMessage:"请选择届满日期")
let section = YHSectionItemModel(title: "中国身份证", models: [item, item1, item2, item3]) let section = YHSectionItemModel(title: "中国身份证", models: [item, item1, item2, item3])
let item10 = YHItemModel(id: .id12, isNeed: true, title: "身份证号码", isUserKeyBoard: true, prompts: "请输入", message: mainModel.certificates.hk_macao_pass.number, isShowPrompts: isShowPrompt) let item10 = YHItemModel(id: .id12, isNeed: true, title: "旅行证件号码", isUserKeyBoard: true, prompts: "请输入", message: mainModel.certificates.hk_macao_pass.number, isShowPrompts: isShowPrompt, alertMessage:"请输入旅行证件号码")
let item11 = YHItemModel(id: .id13, isNeed: true, title: "签发地", isUserKeyBoard: true, prompts: "请输入", message: mainModel.certificates.hk_macao_pass.issue_at, isShowPrompts: isShowPrompt) let item11 = YHItemModel(id: .id13, isNeed: true, title: "签发地", isUserKeyBoard: true, prompts: "请输入", message: mainModel.certificates.hk_macao_pass.issue_at, isShowPrompts: isShowPrompt, alertMessage:"请输入签发地")
let item12 = YHItemModel(id: .id14, isNeed: true, title: "签发日期", isUserKeyBoard: false, prompts: "请选择", message: mainModel.certificates.hk_macao_pass.issue_date_start_at, type: .time, isShowPrompts: isShowPrompt) let item12 = YHItemModel(id: .id14, isNeed: true, title: "签发日期", isUserKeyBoard: false, prompts: "请选择", message: mainModel.certificates.hk_macao_pass.issue_date_start_at, type: .time, isShowPrompts: isShowPrompt, alertMessage:"请选择签发日期")
let item13 = YHItemModel(id: .id15, isNeed: true, title: "届满日期", isUserKeyBoard: false, prompts: "请选择", message: mainModel.certificates.hk_macao_pass.issue_date_end_at, type: .time, isShowPrompts: isShowPrompt) let item13 = YHItemModel(id: .id15, isNeed: true, title: "届满日期", isUserKeyBoard: false, prompts: "请选择", message: mainModel.certificates.hk_macao_pass.issue_date_end_at, type: .time, isShowPrompts: isShowPrompt, alertMessage:"请选择届满日期")
let section1 = YHSectionItemModel(title: "港澳通行证", models: [item10, item11, item12, item13]) let section1 = YHSectionItemModel(title: "港澳通行证", models: [item10, item11, item12, item13])
let item4 = YHItemModel(id: .id16, isNeed: false, title: "证件类别", isUserKeyBoard: false, prompts: "请选择", message: mainModel.certificates.passport.passport_type, type: .id, isShowPrompts: isShowPrompt) let item4 = YHItemModel(id: .id16, isNeed: !flag, title: "证件类别", isUserKeyBoard: false, prompts: "请选择", message: mainModel.certificates.passport.passport_type, type: .id, isShowPrompts: isShowPrompt, alertMessage:"请选择件类别")
let item5 = YHItemModel(id: .id17, isNeed: false, title: "证件号码", isUserKeyBoard: true, prompts: "请输入", message: mainModel.certificates.passport.number, isShowPrompts: isShowPrompt) let item5 = YHItemModel(id: .id17, isNeed: !flag, title: "证件号码", isUserKeyBoard: true, prompts: "请输入", message: mainModel.certificates.passport.number, isShowPrompts: isShowPrompt, alertMessage:"请输入证件号码")
let item6 = YHItemModel(id: .id18, isNeed: false, title: "签发地", isUserKeyBoard: true, prompts: "请输入", message: mainModel.certificates.passport.issue_at, isShowPrompts: isShowPrompt) let item6 = YHItemModel(id: .id18, isNeed: !flag, title: "签发地", isUserKeyBoard: true, prompts: "请输入", message: mainModel.certificates.passport.issue_at, isShowPrompts: isShowPrompt, alertMessage:"请输入签发地")
let item7 = YHItemModel(id: .id19, isNeed: false, title: "签发日期", isUserKeyBoard: false, prompts: "请选择", message: mainModel.certificates.passport.issue_date_start_at, type: .time, isShowPrompts: isShowPrompt) let item7 = YHItemModel(id: .id19, isNeed: !flag, title: "签发日期", isUserKeyBoard: false, prompts: "请选择", message: mainModel.certificates.passport.issue_date_start_at, type: .time, isShowPrompts: isShowPrompt, alertMessage:"请选择签发日期")
let item8 = YHItemModel(id: .id20, isNeed: false, title: "届满日期", isUserKeyBoard: false, prompts: "请选择", message: mainModel.certificates.passport.issue_date_end_at, type: .time, isShowPrompts: isShowPrompt) let item8 = YHItemModel(id: .id20, isNeed: !flag, title: "届满日期", isUserKeyBoard: false, prompts: "请选择", message: mainModel.certificates.passport.issue_date_end_at, type: .time, isShowPrompts: isShowPrompt, alertMessage:"请选择届满日期")
let section2 = YHSectionItemModel(title: "护照及其他旅行证件(选填)", models: [item4, item5, item6, item7, item8]) var section2String = ""
if flag {
section2String = "护照及其他旅行证件(选填)"
} else {
section2String = "护照及其他旅行证件"
}
let section2 = YHSectionItemModel(title: section2String, models: [item4, item5, item6, item7, item8])
if mainModel.has_hk_id == 1 { if mainModel.has_hk_id == 1 {
return [section, section1, section2] return [section, section1, section2]
} else { } else {
...@@ -81,33 +87,33 @@ class YHMainApplicantInformationViewModel: YHBaseViewModel { ...@@ -81,33 +87,33 @@ class YHMainApplicantInformationViewModel: YHBaseViewModel {
} }
func getDetailDataSource(_ isShowPrompt: Bool) -> [YHSectionItemModel] { func getDetailDataSource(_ isShowPrompt: Bool) -> [YHSectionItemModel] {
let item = YHItemModel(id: .id21, isNeed: true, title: "主申请人姓名", isUserKeyBoard: true, prompts: "请输入", message: mainModel.username, isShowPrompts: isShowPrompt) let item = YHItemModel(id: .id21, isNeed: true, title: "主申请人姓名", isUserKeyBoard: true, prompts: "请输入", message: mainModel.username, isShowPrompts: isShowPrompt, alertMessage:"请输入主申请人姓名")
let item1 = YHItemModel(id: .id22, isNeed: false, title: "曾用名", isUserKeyBoard: true, prompts: "请与户口本一致,若无则不填", message: mainModel.used_name, isShowPrompts: isShowPrompt) let item1 = YHItemModel(id: .id22, isNeed: false, title: "曾用名", isUserKeyBoard: true, prompts: "请与户口本一致,若无则不填", message: mainModel.used_name, isShowPrompts: isShowPrompt)
let item2 = YHItemModel(id: .id23, isNeed: false, title: "婚前姓氏", isUserKeyBoard: true, prompts: "如有则填写,仅支持输入字母", message: mainModel.surname, isShowPrompts: isShowPrompt) let item2 = YHItemModel(id: .id23, isNeed: false, title: "婚前姓氏", isUserKeyBoard: true, prompts: "如有则填写,仅支持输入字母", message: mainModel.surname, isShowPrompts: isShowPrompt)
let item3 = YHItemModel(id: .id24, isNeed: true, title: "出生日期", isUserKeyBoard: false, prompts: "请选择", message: mainModel.birthday, type: .time, isShowPrompts: isShowPrompt) let item3 = YHItemModel(id: .id24, isNeed: true, title: "出生日期", isUserKeyBoard: false, prompts: "请选择", message: mainModel.birthday, type: .time, isShowPrompts: isShowPrompt, alertMessage:"请选择出生日期")
let item4 = YHItemModel(id: .id25, isNeed: true, title: "出生国家/地区", isUserKeyBoard: false, prompts: nil, message: "\(mainModel.birth_place_aboard )", leftButtonString: "国外", rightButtonString: "国内", isShowPrompts: isShowPrompt) let item4 = YHItemModel(id: .id25, isNeed: true, title: "出生国家/地区", isUserKeyBoard: false, prompts: nil, message: "\(mainModel.birth_place_aboard )", leftButtonString: "国外", rightButtonString: "国内", isShowPrompts: isShowPrompt, alertMessage:"请选择出生国家/地区")
var string = "" var string = ""
let array = mainModel.birth_place.area let array = mainModel.birth_place.area
for item in array { for item in array {
string = string + item string = string + item
} }
let item5 = YHItemModel(id: .id26, isNeed: true, title: "出生城市", isUserKeyBoard: false, prompts: "请选择", message: string, type: .address, isShowPrompts: isShowPrompt) let item5 = YHItemModel(id: .id26, isNeed: true, title: "出生城市", isUserKeyBoard: false, prompts: "请选择", message: string, type: .address, isShowPrompts: isShowPrompt, alertMessage:"请选择出生城市;")
let item55 = YHItemModel(id: .id34, isNeed: true, title: "出生城市", isUserKeyBoard: true, prompts: "请输入", message: mainModel.birth_place.foreign, isShowPrompts: isShowPrompt) let item55 = YHItemModel(id: .id34, isNeed: true, title: "出生城市", isUserKeyBoard: true, prompts: "请输入", message: mainModel.birth_place.foreign, isShowPrompts: isShowPrompt, alertMessage:"请输入出生城市")
let item6 = YHItemModel(id: .id27, isNeed: true, title: "性别", isUserKeyBoard: false, prompts: "请选择", message: "\(mainModel.sex )", type: .sex) let item6 = YHItemModel(id: .id27, isNeed: true, title: "性别", isUserKeyBoard: false, prompts: "请选择", message: "\(mainModel.sex )", type: .sex, alertMessage:"请选择性别")
let item7 = YHItemModel(id: .id28, isNeed: true, title: "婚姻状况", isUserKeyBoard: false, prompts: "请选择", message: "\(mainModel.married )", type: .marry, isShowPrompts: isShowPrompt) let item7 = YHItemModel(id: .id28, isNeed: true, title: "婚姻状况", isUserKeyBoard: false, prompts: "请选择", message: "\(mainModel.married )", type: .marry, isShowPrompts: isShowPrompt, alertMessage:"请选择婚姻状况")
var item555 = item5 var item555 = item5
if mainModel.birth_place_aboard == 1 { if mainModel.birth_place_aboard == 1 {
item555 = item55 item555 = item55
} }
let section = YHSectionItemModel(title: "主申请人信息", models: [item, item1, item2, item3, item4, item555, item6, item7]) let section = YHSectionItemModel(title: "主申请人信息", models: [item, item1, item2, item3, item4, item555, item6, item7])
let item8 = YHItemModel(id: .id29, isNeed: true, title: "手机号码", isUserKeyBoard: true, prompts: "请输入", message: mainModel.mobile, isShowPrompts: isShowPrompt) let item8 = YHItemModel(id: .id29, isNeed: true, title: "手机号码", isUserKeyBoard: true, prompts: "请输入", message: mainModel.mobile, isShowPrompts: isShowPrompt, alertMessage:"请输入手机号码")
let item9 = YHItemModel(id: .id30, isNeed: true, title: "电子邮箱", isUserKeyBoard: true, prompts: "请输入", message: mainModel.email, isShowPrompts: isShowPrompt) let item9 = YHItemModel(id: .id30, isNeed: true, title: "电子邮箱", isUserKeyBoard: true, prompts: "请输入", message: mainModel.email, isShowPrompts: isShowPrompt, alertMessage:"请输入电子邮箱")
let section1 = YHSectionItemModel(title: "联系方式", models: [item8, item9]) let section1 = YHSectionItemModel(title: "联系方式", models: [item8, item9])
let item10 = YHItemModel(id: .id31, isNeed: true, title: "是否办理过", isUserKeyBoard: false, prompts: nil, message: "\(mainModel.has_hk_id )", leftButtonString: "是", rightButtonString: "否", isShowPrompts: isShowPrompt) let item10 = YHItemModel(id: .id31, isNeed: true, title: "是否办理过", isUserKeyBoard: false, prompts: nil, message: "\(mainModel.has_hk_id )", leftButtonString: "是", rightButtonString: "否", isShowPrompts: isShowPrompt, alertMessage:"请选择")
let item11 = YHItemModel(id: .id35, isNeed: true, title: "香港身份证号码", isUserKeyBoard: true, prompts: "请输入", message: mainModel.hk_id_number, isShowPrompts: isShowPrompt) let item11 = YHItemModel(id: .id35, isNeed: true, title: "香港身份证号码", isUserKeyBoard: true, prompts: "请输入", message: mainModel.hk_id_number, isShowPrompts: isShowPrompt, alertMessage:"请输入香港身份证号码")
let section2 = YHSectionItemModel(title: "香港身份证", models: [item10]) let section2 = YHSectionItemModel(title: "香港身份证", models: [item10])
let section22 = YHSectionItemModel(title: "香港身份证", models: [item10, item11]) let section22 = YHSectionItemModel(title: "香港身份证", models: [item10, item11])
var section222 = section2 var section222 = section2
...@@ -142,7 +148,7 @@ class YHMainApplicantInformationViewModel: YHBaseViewModel { ...@@ -142,7 +148,7 @@ class YHMainApplicantInformationViewModel: YHBaseViewModel {
case .id4: case .id4:
mainModel.address.details = item.message ?? "" mainModel.address.details = item.message ?? ""
case .id5: case .id5:
mainModel.has_hk_id = item.value?.first?.int ?? 0 mainModel.is_handled = item.value?.first?.int ?? 0
case .id6: case .id6:
printLog("1") printLog("1")
case .id7: case .id7:
...@@ -286,7 +292,7 @@ class YHMainApplicantInformationViewModel: YHBaseViewModel { ...@@ -286,7 +292,7 @@ class YHMainApplicantInformationViewModel: YHBaseViewModel {
let _ = YHNetRequest.getRequest(url: strUrl) { [weak self] json, code in let _ = YHNetRequest.getRequest(url: strUrl) { [weak self] json, code in
//1. json字符串 转 对象 //1. json字符串 转 对象
guard let self = self else { return } guard let self = self else { return }
if json.code == 200 {
let dic = json.data let dic = json.data
guard let result = YHMainInformationModel.deserialize(from: dic as? Dictionary) else { guard let result = YHMainInformationModel.deserialize(from: dic as? Dictionary) else {
callBackBlock(nil,nil) callBackBlock(nil,nil)
...@@ -294,12 +300,16 @@ class YHMainApplicantInformationViewModel: YHBaseViewModel { ...@@ -294,12 +300,16 @@ class YHMainApplicantInformationViewModel: YHBaseViewModel {
} }
self.mainModel = result self.mainModel = result
callBackBlock(result, nil) callBackBlock(result, nil)
} else {
let error : YHErrorModel = YHErrorModel(errorCode:Int32(json.code), errorMsg: json.msg)
callBackBlock(nil, error)
}
} failBlock: { err in } failBlock: { err in
callBackBlock(nil,err) callBackBlock(nil,err)
} }
} }
func updateMainInformation(_ saveType: YHSaveType,_ orderID: Int, callBackBlock:@escaping (_ success: Bool)->()) { func updateMainInformation(_ saveType: YHSaveType,_ orderID: Int, callBackBlock:@escaping (_ success: Bool, _ error:YHErrorModel?)->()) {
var type = "" var type = ""
if saveType == .save { if saveType == .save {
type = "save" type = "save"
...@@ -366,10 +376,15 @@ class YHMainApplicantInformationViewModel: YHBaseViewModel { ...@@ -366,10 +376,15 @@ class YHMainApplicantInformationViewModel: YHBaseViewModel {
// let strUrl = "http://192.168.25.48:18088/" + YHAllApiName.OrderInformation.updateInformation // let strUrl = "http://192.168.25.48:18088/" + YHAllApiName.OrderInformation.updateInformation
let strUrl = YHBaseUrlManager.shared.curURL() + YHAllApiName.OrderInformation.updateInformation let strUrl = YHBaseUrlManager.shared.curURL() + YHAllApiName.OrderInformation.updateInformation
let _ = YHNetRequest.postRequest(url: strUrl, params: params) { [weak self] json, code in let _ = YHNetRequest.postRequest(url: strUrl, params: params) { [weak self] json, code in
guard let self = self else { return } guard let _ = self else { return }
callBackBlock(true) if json.code == 200 {
callBackBlock(true, nil)
} else {
let error : YHErrorModel = YHErrorModel(errorCode:Int32(json.code), errorMsg: json.msg)
callBackBlock(false, error)
}
} failBlock: { err in } failBlock: { err in
callBackBlock(false) callBackBlock(false, err)
} }
} }
...@@ -382,7 +397,7 @@ class YHMainApplicantInformationViewModel: YHBaseViewModel { ...@@ -382,7 +397,7 @@ class YHMainApplicantInformationViewModel: YHBaseViewModel {
"businessCode": "4001001" "businessCode": "4001001"
] ]
let _ = YHNetRequest.uplaodRequest(url: strUrl, headers: headers, image: image) { [weak self] json, code in let _ = YHNetRequest.uplaodRequest(url: strUrl, headers: headers, image: image) { [weak self] json, code in
guard let self = self else { return } guard let _ = self else { return }
if json.code == 200 { if json.code == 200 {
callBackBlock(json.data as? String, nil) callBackBlock(json.data as? String, nil)
} else { } else {
...@@ -399,7 +414,7 @@ class YHMainApplicantInformationViewModel: YHBaseViewModel { ...@@ -399,7 +414,7 @@ class YHMainApplicantInformationViewModel: YHBaseViewModel {
let strUrl = "https://test-comserver.galaxy-immi.com/oss/storage/convertToPublicURL" + "?fileUrl=\(url)" let strUrl = "https://test-comserver.galaxy-immi.com/oss/storage/convertToPublicURL" + "?fileUrl=\(url)"
let _ = YHNetRequest.getRequest(url: strUrl) { [weak self] json, code in let _ = YHNetRequest.getRequest(url: strUrl) { [weak self] json, code in
//1. json字符串 转 对象 //1. json字符串 转 对象
guard let self = self else { return } guard let _ = self else { return }
if json.code == 200 { if json.code == 200 {
callBackBlock(json.data as? String, nil) callBackBlock(json.data as? String, nil)
} else { } else {
...@@ -490,6 +505,13 @@ class YHMainApplicantInformationViewModel: YHBaseViewModel { ...@@ -490,6 +505,13 @@ class YHMainApplicantInformationViewModel: YHBaseViewModel {
let hk_macao_pass_issue_at = mainModel.certificates.hk_macao_pass.issue_at let hk_macao_pass_issue_at = mainModel.certificates.hk_macao_pass.issue_at
let hk_macao_pass_issue_date_start_at = mainModel.certificates.hk_macao_pass.issue_date_start_at let hk_macao_pass_issue_date_start_at = mainModel.certificates.hk_macao_pass.issue_date_start_at
let hk_macao_pass_issue_date_end_at = mainModel.certificates.hk_macao_pass.issue_date_end_at let hk_macao_pass_issue_date_end_at = mainModel.certificates.hk_macao_pass.issue_date_end_at
let passport_type = mainModel.certificates.passport.passport_type
let passport_number = mainModel.certificates.passport.number
let passport_issue_at = mainModel.certificates.passport.issue_at
let passport_issue_date_start_at = mainModel.certificates.passport.issue_date_start_at
let passport_issue_date_end_at = mainModel.certificates.passport.issue_date_end_at
let nationality = mainModel.nationality
if nationality.contains("中国") {
if mainModel.has_hk_id == 1 { if mainModel.has_hk_id == 1 {
if cn_identity_card_number.count != 0 && cn_identity_card_issue_at.count != 0 && cn_identity_card_issue_date_start_at.count != 0 && cn_identity_card_issue_date_end_at.count != 0 && hk_macao_pass_number.count != 0 && hk_macao_pass_issue_at.count != 0 && hk_macao_pass_issue_date_start_at.count != 0 && hk_macao_pass_issue_date_end_at.count != 0 { if cn_identity_card_number.count != 0 && cn_identity_card_issue_at.count != 0 && cn_identity_card_issue_date_start_at.count != 0 && cn_identity_card_issue_date_end_at.count != 0 && hk_macao_pass_number.count != 0 && hk_macao_pass_issue_at.count != 0 && hk_macao_pass_issue_date_start_at.count != 0 && hk_macao_pass_issue_date_end_at.count != 0 {
return true return true
...@@ -503,6 +525,13 @@ class YHMainApplicantInformationViewModel: YHBaseViewModel { ...@@ -503,6 +525,13 @@ class YHMainApplicantInformationViewModel: YHBaseViewModel {
return false return false
} }
} }
} else {
if passport_type.count != 0 && passport_number.count != 0 && passport_issue_at.count != 0 && passport_issue_date_start_at.count != 0 && passport_issue_date_end_at.count != 0 {
return true
} else {
return false
}
}
} else { } else {
let username = mainModel.username let username = mainModel.username
let birthday = mainModel.birthday let birthday = mainModel.birthday
...@@ -518,7 +547,7 @@ class YHMainApplicantInformationViewModel: YHBaseViewModel { ...@@ -518,7 +547,7 @@ class YHMainApplicantInformationViewModel: YHBaseViewModel {
if birth_place_aboard == 1 { if birth_place_aboard == 1 {
if username.count != 0 && birthday.count != 0 && birth_place_foreign.count != 0 && mobile.count != 0 && email.count != 0 { if username.count != 0 && birthday.count != 0 && birth_place_foreign.count != 0 && mobile.count != 0 && email.count != 0 {
if has_hk_id == 1 { if has_hk_id == 1 {
if hk_id_numbe.count != 0 { if hk_id_numbe.isHKIdentityCardNumber() {
return true return true
} else { } else {
return false return false
...@@ -532,7 +561,7 @@ class YHMainApplicantInformationViewModel: YHBaseViewModel { ...@@ -532,7 +561,7 @@ class YHMainApplicantInformationViewModel: YHBaseViewModel {
} else { } else {
if username.count != 0 && birthday.count != 0 && birth_place_area.count != 0 && mobile.count != 0 && email.count != 0 { if username.count != 0 && birthday.count != 0 && birth_place_area.count != 0 && mobile.count != 0 && email.count != 0 {
if has_hk_id == 1 { if has_hk_id == 1 {
if hk_id_numbe.count != 0 { if hk_id_numbe.isHKIdentityCardNumber() {
return true return true
} else { } else {
return false return false
......
...@@ -26,6 +26,12 @@ enum YHOtherPickerViewType: Int { ...@@ -26,6 +26,12 @@ enum YHOtherPickerViewType: Int {
case level case level
// 高管证明文件 // 高管证明文件
case prove case prove
// 证件类别
case idType
// 性别
case sex
// 婚姻状况
case marry
} }
...@@ -248,6 +254,12 @@ class YHOtherPickerView: UIView { ...@@ -248,6 +254,12 @@ class YHOtherPickerView: UIView {
return "职位水平类别" return "职位水平类别"
case .prove: case .prove:
return "高管证明文件" return "高管证明文件"
case .idType:
return "选择证件类别"
case .sex:
return "选择性别"
case .marry:
return "选择婚姻状况"
default: default:
return "请选择" return "请选择"
} }
...@@ -283,7 +295,7 @@ extension YHOtherPickerView: UIPickerViewDelegate, UIPickerViewDataSource { ...@@ -283,7 +295,7 @@ extension YHOtherPickerView: UIPickerViewDelegate, UIPickerViewDataSource {
func pickerView(_ pickerView: UIPickerView, rowHeightForComponent component: Int) -> CGFloat { func pickerView(_ pickerView: UIPickerView, rowHeightForComponent component: Int) -> CGFloat {
switch type { switch type {
case .nature,.certificate,.structure,.level,.prove: case .nature,.certificate,.structure,.level,.prove,.idType,.sex,.marry:
return 50 return 50
default: default:
return 70 return 70
...@@ -293,7 +305,7 @@ extension YHOtherPickerView: UIPickerViewDelegate, UIPickerViewDataSource { ...@@ -293,7 +305,7 @@ extension YHOtherPickerView: UIPickerViewDelegate, UIPickerViewDataSource {
func pickerView(_ pickerView: UIPickerView, viewForRow row: Int, forComponent component: Int, reusing view: UIView?) -> UIView { func pickerView(_ pickerView: UIPickerView, viewForRow row: Int, forComponent component: Int, reusing view: UIView?) -> UIView {
switch type { switch type {
case .nature,.certificate,.structure,.level,.prove: case .nature,.certificate,.structure,.level,.prove,.idType,.sex,.marry:
let label = UILabel() let label = UILabel()
label.textColor = UIColor.mainTextColor label.textColor = UIColor.mainTextColor
label.font = UIFont.PFSC_M(ofSize: 14) label.font = UIFont.PFSC_M(ofSize: 14)
...@@ -403,6 +415,30 @@ extension YHOtherPickerView { ...@@ -403,6 +415,30 @@ extension YHOtherPickerView {
arrData.append(model) arrData.append(model)
} }
title = getTitle(type: type) title = getTitle(type: type)
case .idType:
let arr = YHOtherInfoFillViewModel.arrIdType
arrData.removeAll()
arr.forEach { item in
let model = YHOtherPickerViewItemData(title: item["title"] ?? "-", subTitle: "", index: item["id"] ?? "-")
arrData.append(model)
}
title = getTitle(type: type)
case .sex:
let arr = YHOtherInfoFillViewModel.arrSex
arrData.removeAll()
arr.forEach { item in
let model = YHOtherPickerViewItemData(title: item["title"] ?? "-", subTitle: "", index: item["id"] ?? "-")
arrData.append(model)
}
title = getTitle(type: type)
case .marry:
let arr = YHOtherInfoFillViewModel.arrMarry
arrData.removeAll()
arr.forEach { item in
let model = YHOtherPickerViewItemData(title: item["title"] ?? "-", subTitle: "", index: item["id"] ?? "-")
arrData.append(model)
}
title = getTitle(type: type)
default: default:
return return
} }
......
...@@ -246,6 +246,60 @@ class YHOtherInfoFillViewModel: YHBaseViewModel { ...@@ -246,6 +246,60 @@ class YHOtherInfoFillViewModel: YHBaseViewModel {
"id": "盖章且签字的组织架构图和审计报告" "id": "盖章且签字的组织架构图和审计报告"
] ]
] ]
static let arrIdType : [[String : String]] = [
["title": "护照",
"id": "3"
],
["title": "外交护照",
"id": "4"
],
["title": "公务护照",
"id": "5"
],
["title": "中国发无国籍旅游证件",
"id": "6"
],
["title": "旅游通行证",
"id": "7"
],
["title": "联合国通行证",
"id": "8"
],
["title": "其他无国籍旅行证件",
"id": "9"
],
["title": "其他",
"id": "10"
]
]
static let arrSex : [[String : String]] = [
["title": "男",
"id": "1"
],
["title": "女",
"id": "2"
]
]
static let arrMarry : [[String : String]] = [
["title": "已婚",
"id": "0"
],
["title": "未婚",
"id": "1"
],
["title": "离婚",
"id": "2"
],
["title": "分居",
"id": "3"
],
["title": "丧偶",
"id": "4"
]
]
} }
extension YHOtherInfoFillViewModel { extension YHOtherInfoFillViewModel {
......
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