Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
G
galaxy-iOS
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
mobile-group
galaxy-iOS
Commits
dc428ae0
Commit
dc428ae0
authored
Feb 21, 2024
by
Steven杜宇
1
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
// 学历信息
parent
cfbb8cdc
Changes
8
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
368 additions
and
54 deletions
+368
-54
YHInformationPerfectListVC.swift
...telligentService(服务中心)/C/YHInformationPerfectListVC.swift
+1
-1
YHFamilyRequestViewModel.swift
...程)/FamilyMember(家庭成员信息表)/M/YHFamilyRequestViewModel.swift
+3
-3
YHFormPickerView.swift
...FamilyMember(家庭成员信息表)/V/PickerView/YHFormPickerView.swift
+6
-2
YHEducationDetailVC.swift
...)/ServiceProcess(流程)/学历专业资格填写/C/YHEducationDetailVC.swift
+153
-26
YHEducationalQualificationVC.swift
...Process(流程)/学历专业资格填写/C/YHEducationalQualificationVC.swift
+39
-15
YHEducationInfo.swift
...服务中心)/ServiceProcess(流程)/学历专业资格填写/M/YHEducationInfo.swift
+93
-1
YHEducationRequestViewModel.swift
...eProcess(流程)/学历专业资格填写/M/YHEducationRequestViewModel.swift
+65
-2
YHAllApiName.swift
galaxy/galaxy/Classes/Tools/NetWork/YHAllApiName.swift
+8
-4
No files found.
galaxy/galaxy/Classes/Modules/IntelligentService(服务中心)/C/YHInformationPerfectListVC.swift
View file @
dc428ae0
...
@@ -335,7 +335,7 @@ extension YHInformationPerfectListVC : UITableViewDelegate,UITableViewDataSource
...
@@ -335,7 +335,7 @@ extension YHInformationPerfectListVC : UITableViewDelegate,UITableViewDataSource
}
else
if
indexPath
.
row
==
3
{
}
else
if
indexPath
.
row
==
3
{
//学历/专业资格
//学历/专业资格
let
vc
=
YHEducationalQualificationVC
()
let
vc
=
YHEducationalQualificationVC
()
vc
.
orderId
=
orderId
//
vc.orderId = orderId
vc
.
orderId
=
133971
vc
.
orderId
=
133971
navigationController
?
.
pushViewController
(
vc
)
navigationController
?
.
pushViewController
(
vc
)
...
...
galaxy/galaxy/Classes/Modules/IntelligentService(服务中心)/ServiceProcess(流程)/FamilyMember(家庭成员信息表)/M/YHFamilyRequestViewModel.swift
View file @
dc428ae0
...
@@ -14,7 +14,7 @@ class YHFamilyRequestViewModel {
...
@@ -14,7 +14,7 @@ class YHFamilyRequestViewModel {
//请求所有家庭成员信息
//请求所有家庭成员信息
func
getFamilyInfo
(
params
:[
String
:
Any
],
callBackBlock
:
@escaping
(
_
success
:
Bool
,
_
error
:
YHErrorModel
?)
->
())
{
func
getFamilyInfo
(
params
:[
String
:
Any
],
callBackBlock
:
@escaping
(
_
success
:
Bool
,
_
error
:
YHErrorModel
?)
->
())
{
let
strUrl
=
YHBaseUrlManager
.
shared
.
curURL
()
+
YHAllApiName
.
Order
.
familyInfoApi
let
strUrl
=
YHBaseUrlManager
.
shared
.
curURL
()
+
YHAllApiName
.
Family
.
familyInfoApi
YHHUD
.
show
(
.
progress
(
message
:
"数据加载中..."
))
YHHUD
.
show
(
.
progress
(
message
:
"数据加载中..."
))
...
@@ -82,7 +82,7 @@ if let brother = dic["brother"], brother is [[String: Any]] {
...
@@ -82,7 +82,7 @@ if let brother = dic["brother"], brother is [[String: Any]] {
YHHUD
.
show
(
.
progress
(
message
:
"数据加载中..."
))
YHHUD
.
show
(
.
progress
(
message
:
"数据加载中..."
))
let
strUrl
=
YHBaseUrlManager
.
shared
.
curURL
()
+
YHAllApiName
.
Order
.
familyInfoApi
let
strUrl
=
YHBaseUrlManager
.
shared
.
curURL
()
+
YHAllApiName
.
Family
.
familyInfoApi
let
_
=
YHNetRequest
.
postRequest
(
url
:
strUrl
,
params
:
params
)
{[
weak
self
]
json
,
code
in
let
_
=
YHNetRequest
.
postRequest
(
url
:
strUrl
,
params
:
params
)
{[
weak
self
]
json
,
code
in
...
@@ -109,7 +109,7 @@ if let brother = dic["brother"], brother is [[String: Any]] {
...
@@ -109,7 +109,7 @@ if let brother = dic["brother"], brother is [[String: Any]] {
YHHUD
.
show
(
.
progress
(
message
:
"数据加载中..."
))
YHHUD
.
show
(
.
progress
(
message
:
"数据加载中..."
))
let
strUrl
=
YHBaseUrlManager
.
shared
.
curURL
()
+
YHAllApiName
.
Order
.
familyMemberDeleteApi
let
strUrl
=
YHBaseUrlManager
.
shared
.
curURL
()
+
YHAllApiName
.
Family
.
familyMemberDeleteApi
let
_
=
YHNetRequest
.
postRequest
(
url
:
strUrl
,
params
:
params
)
{
json
,
code
in
let
_
=
YHNetRequest
.
postRequest
(
url
:
strUrl
,
params
:
params
)
{
json
,
code
in
YHHUD
.
hide
()
YHHUD
.
hide
()
...
...
galaxy/galaxy/Classes/Modules/IntelligentService(服务中心)/ServiceProcess(流程)/FamilyMember(家庭成员信息表)/V/PickerView/YHFormPickerView.swift
View file @
dc428ae0
...
@@ -21,7 +21,11 @@
...
@@ -21,7 +21,11 @@
print(selectType.title)
print(selectType.title)
}
}
// 【扩展新类型】
1)先增加一个YHFormPickerViewType类型
2)再扩展其关联类型 YHFormPickerViewSubType
3)补充新增类型后的方法 YHFormPickerView的getSubType方法 YHFormPickerViewSubType的title和index方法
4)填充数据源 详情见 属性 dataDict 懒加载方法
*/
*/
...
@@ -209,7 +213,7 @@ class YHFormPickerView: UIView {
...
@@ -209,7 +213,7 @@ class YHFormPickerView: UIView {
[
YHFormPickerViewItem
(
type
:
.
degreeLocation
(
.
domestic
)),
[
YHFormPickerViewItem
(
type
:
.
degreeLocation
(
.
domestic
)),
YHFormPickerViewItem
(
type
:
.
degreeLocation
(
.
forgin
))],
YHFormPickerViewItem
(
type
:
.
degreeLocation
(
.
forgin
))],
// 专业证书
.
professionCertificate
:
.
professionCertificate
:
[
YHFormPickerViewItem
(
type
:
.
professionCertificate
(
.
CFA
)),
[
YHFormPickerViewItem
(
type
:
.
professionCertificate
(
.
CFA
)),
YHFormPickerViewItem
(
type
:
.
professionCertificate
(
.
CFP
)),
YHFormPickerViewItem
(
type
:
.
professionCertificate
(
.
CFP
)),
...
...
galaxy/galaxy/Classes/Modules/IntelligentService(服务中心)/ServiceProcess(流程)/学历专业资格填写/C/YHEducationDetailVC.swift
View file @
dc428ae0
...
@@ -7,11 +7,15 @@
...
@@ -7,11 +7,15 @@
//
//
import
UIKit
import
UIKit
import
SwifterSwift
class
YHEducationDetailVC
:
YHBaseViewController
{
class
YHEducationDetailVC
:
YHBaseViewController
{
// 订单ID
let
familyRequest
:
YHFamilyRequestViewModel
=
YHFamilyRequestViewModel
()
var
orderId
:
Int
=
0
var
familyMemberInfo
:
YHFamilyMemberGroupInfo
?
// 学历ID
var
detailId
:
Int
=
0
let
educationRequest
:
YHEducationRequestViewModel
=
YHEducationRequestViewModel
()
var
detailInfo
:
YHEducationDetailInfo
=
YHEducationDetailInfo
()
var
isChildsEditMode
:
YHFormTitleItemEditType
=
.
none
var
isChildsEditMode
:
YHFormTitleItemEditType
=
.
none
var
isBrothersEditMode
:
YHFormTitleItemEditType
=
.
none
var
isBrothersEditMode
:
YHFormTitleItemEditType
=
.
none
...
@@ -44,7 +48,7 @@ class YHEducationDetailVC: YHBaseViewController {
...
@@ -44,7 +48,7 @@ class YHEducationDetailVC: YHBaseViewController {
override
func
viewDidLoad
()
{
override
func
viewDidLoad
()
{
super
.
viewDidLoad
()
super
.
viewDidLoad
()
self
.
gk_navTitle
=
"学历
X
"
.
local
self
.
gk_navTitle
=
"学历"
.
local
view
.
backgroundColor
=
UIColor
(
hexString
:
"#F8F8F8"
)
view
.
backgroundColor
=
UIColor
(
hexString
:
"#F8F8F8"
)
createUI
()
createUI
()
}
}
...
@@ -58,6 +62,12 @@ class YHEducationDetailVC: YHBaseViewController {
...
@@ -58,6 +62,12 @@ class YHEducationDetailVC: YHBaseViewController {
view
.
addSubview
(
tableView
);
view
.
addSubview
(
tableView
);
view
.
addSubview
(
bottomView
)
view
.
addSubview
(
bottomView
)
bottomView
.
saveBlock
=
{
[
weak
self
]
in
guard
let
self
=
self
else
{
return
}
saveDetailInfo
()
}
bottomView
.
snp
.
makeConstraints
{
make
in
bottomView
.
snp
.
makeConstraints
{
make
in
make
.
left
.
right
.
equalToSuperview
()
make
.
left
.
right
.
equalToSuperview
()
make
.
bottom
.
equalToSuperview
()
.
offset
(
-
k_Height_safeAreaInsetsBottom
())
make
.
bottom
.
equalToSuperview
()
.
offset
(
-
k_Height_safeAreaInsetsBottom
())
...
@@ -72,32 +82,65 @@ class YHEducationDetailVC: YHBaseViewController {
...
@@ -72,32 +82,65 @@ class YHEducationDetailVC: YHBaseViewController {
}
}
loadInfo
()
loadInfo
()
if
self
.
detailId
!=
0
{
// 有学历ID则有历史学历
getDetailInfo
()
}
else
{
detailInfo
.
orderId
=
orderId
}
}
}
func
loadInfo
()
{
func
loadInfo
()
{
items
.
removeAll
()
items
.
removeAll
()
let
title0
=
YHFormTitleItem
(
type
:
.
mainApplicantEducation
)
let
title0
=
YHFormTitleItem
(
type
:
.
mainApplicantEducation
)
let
item00
=
YHFormDetailItem
(
type
:
.
universityFullName
)
let
item00
=
YHFormDetailItem
(
type
:
.
universityFullName
)
item00
.
placeHolder
=
"请输入学校全称,例:清华,需填全称“清华大学"
.
local
item00
.
placeHolder
=
"请输入学校全称,例:清华,需填全称“清华大学"
.
local
item00
.
value
=
detailInfo
.
college
let
item01
=
YHFormDetailItem
(
type
:
.
educationStyle
)
let
item01
=
YHFormDetailItem
(
type
:
.
educationStyle
)
item01
.
placeHolder
=
"请选择授课形式"
.
local
item01
.
placeHolder
=
"请选择授课形式"
.
local
item01
.
value
=
detailInfo
.
type
let
item02
=
YHFormDetailItem
(
type
:
.
educationTime
)
let
item02
=
YHFormDetailItem
(
type
:
.
educationTime
)
item02
.
placeHolder
=
"请选择年月"
.
local
item02
.
placeHolder
=
"请选择年月"
.
local
item02
.
value
=
detailInfo
.
admissionTime
let
item03
=
YHFormDetailItem
(
type
:
.
graduateTime
)
let
item03
=
YHFormDetailItem
(
type
:
.
graduateTime
)
item03
.
placeHolder
=
"请选择年月"
.
local
item03
.
placeHolder
=
"请选择年月"
.
local
item03
.
value
=
detailInfo
.
graduateTime
let
item04
=
YHFormDetailItem
(
type
:
.
educationMajor
)
let
item04
=
YHFormDetailItem
(
type
:
.
educationMajor
)
item04
.
placeHolder
=
"请输入专业"
.
local
item04
.
placeHolder
=
"请输入专业"
.
local
item04
.
value
=
detailInfo
.
professional
let
item05
=
YHFormDetailItem
(
type
:
.
educationDegree
)
let
item05
=
YHFormDetailItem
(
type
:
.
educationDegree
)
item05
.
placeHolder
=
"请选择学位"
.
local
item05
.
placeHolder
=
"请选择学位"
.
local
item05
.
value
=
detailInfo
.
background
let
item06
=
YHFormDetailItem
(
type
:
.
degreeType
)
let
item06
=
YHFormDetailItem
(
type
:
.
degreeType
)
item06
.
placeHolder
=
"请输入学位类型,如管理学"
.
local
item06
.
placeHolder
=
"请输入学位类型,如管理学"
.
local
item06
.
value
=
detailInfo
.
degreeType
let
item07
=
YHFormDetailItem
(
type
:
.
educationCountry
)
let
item07
=
YHFormDetailItem
(
type
:
.
educationCountry
)
item07
.
placeHolder
=
"请输入国家及地区"
.
local
item07
.
placeHolder
=
"请输入国家及地区"
.
local
item07
.
value
=
detailInfo
.
schoolAddress
?
.
country
let
item08
=
YHFormDetailItem
(
type
:
.
educationCity
)
let
item08
=
YHFormDetailItem
(
type
:
.
educationCity
)
item08
.
placeHolder
=
"请选择城市"
.
local
item08
.
placeHolder
=
"请选择城市"
.
local
if
detailInfo
.
isSchoolInAboard
()
{
item08
.
value
=
detailInfo
.
schoolAddress
?
.
foreign
item08
.
placeHolder
=
"请输入城市"
.
local
item08
.
tips
=
"请输入城市"
.
local
}
else
{
item08
.
value
=
detailInfo
.
schoolAddress
?
.
area
?
.
joined
(
separator
:
","
)
item08
.
placeHolder
=
"请选择出生城市"
.
local
item08
.
tips
=
"请选择出生城市"
.
local
}
let
arr0
:[
YHFormItemProtocol
]
=
[
title0
,
item00
,
item01
,
item02
,
item03
,
item04
,
item05
,
item06
,
item07
,
item08
]
let
arr0
:[
YHFormItemProtocol
]
=
[
title0
,
item00
,
item01
,
item02
,
item03
,
item04
,
item05
,
item06
,
item07
,
item08
]
items
.
append
(
arr0
)
items
.
append
(
arr0
)
self
.
tableView
.
reloadData
()
self
.
tableView
.
reloadData
()
...
@@ -126,8 +169,6 @@ extension YHEducationDetailVC : UITableViewDelegate, UITableViewDataSource {
...
@@ -126,8 +169,6 @@ extension YHEducationDetailVC : UITableViewDelegate, UITableViewDataSource {
if
item
is
YHFormTitleItem
{
// 是标题
if
item
is
YHFormTitleItem
{
// 是标题
let
formItem
=
item
as!
YHFormTitleItem
let
formItem
=
item
as!
YHFormTitleItem
// 配偶父母子女兄妹title
let
cell
=
tableView
.
dequeueReusableCell
(
withIdentifier
:
YHFormItemTitleCell
.
cellReuseIdentifier
,
for
:
indexPath
)
as!
YHFormItemTitleCell
let
cell
=
tableView
.
dequeueReusableCell
(
withIdentifier
:
YHFormItemTitleCell
.
cellReuseIdentifier
,
for
:
indexPath
)
as!
YHFormItemTitleCell
cell
.
titleLabel
.
text
=
formItem
.
getTitle
()
cell
.
titleLabel
.
text
=
formItem
.
getTitle
()
cell
.
subTitleLabel
.
text
=
formItem
.
getSubTitle
()
cell
.
subTitleLabel
.
text
=
formItem
.
getSubTitle
()
...
@@ -143,6 +184,22 @@ extension YHEducationDetailVC : UITableViewDelegate, UITableViewDataSource {
...
@@ -143,6 +184,22 @@ extension YHEducationDetailVC : UITableViewDelegate, UITableViewDataSource {
cell
.
placeHolder
=
detailItem
.
placeHolder
cell
.
placeHolder
=
detailItem
.
placeHolder
cell
.
isMust
=
detailItem
.
isNeed
cell
.
isMust
=
detailItem
.
isNeed
cell
.
title
=
detailItem
.
getTitle
()
cell
.
title
=
detailItem
.
getTitle
()
cell
.
text
=
detailItem
.
value
cell
.
textChange
=
{
[
weak
self
]
(
text
,
isEditEnd
)
in
guard
let
self
=
self
else
{
return
}
// 只有国外城市才需输入,国内城市使用的是选择器
if
detailItem
.
type
==
.
educationCity
{
detailInfo
.
schoolAddress
?
.
foreign
=
text
}
else
if
detailItem
.
type
==
.
educationMajor
{
detailInfo
.
professional
=
text
}
if
isEditEnd
{
loadInfo
()
saveDetailInfo
()
}
}
return
cell
return
cell
}
else
if
cellType
==
.
selectSheet
{
}
else
if
cellType
==
.
selectSheet
{
...
@@ -150,7 +207,7 @@ extension YHEducationDetailVC : UITableViewDelegate, UITableViewDataSource {
...
@@ -150,7 +207,7 @@ extension YHEducationDetailVC : UITableViewDelegate, UITableViewDataSource {
cell
.
placeHolder
=
detailItem
.
placeHolder
cell
.
placeHolder
=
detailItem
.
placeHolder
cell
.
isMust
=
detailItem
.
isNeed
cell
.
isMust
=
detailItem
.
isNeed
cell
.
title
=
detailItem
.
getTitle
()
cell
.
title
=
detailItem
.
getTitle
()
cell
.
detail
=
""
cell
.
detail
=
detailItem
.
value
return
cell
return
cell
}
}
}
}
...
@@ -190,11 +247,6 @@ extension YHEducationDetailVC : UITableViewDelegate, UITableViewDataSource {
...
@@ -190,11 +247,6 @@ extension YHEducationDetailVC : UITableViewDelegate, UITableViewDataSource {
func
tableView
(
_
tableView
:
UITableView
,
didSelectRowAt
indexPath
:
IndexPath
)
{
func
tableView
(
_
tableView
:
UITableView
,
didSelectRowAt
indexPath
:
IndexPath
)
{
let
vc
=
YHProfessionalQualificationVC
()
self
.
navigationController
?
.
pushViewController
(
vc
)
return
/*
let
arr
=
items
[
indexPath
.
section
]
let
arr
=
items
[
indexPath
.
section
]
let
item
:
YHFormItemProtocol
=
arr
[
indexPath
.
row
]
let
item
:
YHFormItemProtocol
=
arr
[
indexPath
.
row
]
...
@@ -204,11 +256,16 @@ extension YHEducationDetailVC : UITableViewDelegate, UITableViewDataSource {
...
@@ -204,11 +256,16 @@ extension YHEducationDetailVC : UITableViewDelegate, UITableViewDataSource {
}
}
if
item
is
YHFormDetailItem
{
if
item
is
YHFormDetailItem
{
let
detailItem
=
item
as!
YHFormDetailItem
let
detailItem
=
item
as!
YHFormDetailItem
if detailItem.type == .educationStyle { // 授课形式
if
detailItem
.
type
==
.
universityFullName
{
// 选择大学名称
}
else
if
detailItem
.
type
==
.
educationStyle
{
// 授课形式
YHFormPickerView
.
show
(
type
:
.
edution
,
selectType
:
.
education
(
.
fullTime
))
{
YHFormPickerView
.
show
(
type
:
.
edution
,
selectType
:
.
education
(
.
fullTime
))
{
[
weak
self
]
selectType
in
[
weak
self
]
selectType
in
guard
let
self
=
self
else
{
return
}
guard
let
self
=
self
else
{
return
}
detailInfo
.
type
=
selectType
.
title
loadInfo
()
saveDetailInfo
()
}
}
}
else
if
detailItem
.
type
==
.
educationTime
||
detailItem
.
type
==
.
graduateTime
{
// 入学及毕业年月
}
else
if
detailItem
.
type
==
.
educationTime
||
detailItem
.
type
==
.
graduateTime
{
// 入学及毕业年月
...
@@ -216,36 +273,56 @@ extension YHEducationDetailVC : UITableViewDelegate, UITableViewDataSource {
...
@@ -216,36 +273,56 @@ extension YHEducationDetailVC : UITableViewDelegate, UITableViewDataSource {
YHDatePickView
.
show
(
type
:
.
yyyymm
)
{
YHDatePickView
.
show
(
type
:
.
yyyymm
)
{
[
weak
self
]
date
in
[
weak
self
]
date
in
guard
let
self
=
self
else
{
return
}
guard
let
self
=
self
else
{
return
}
if
detailItem
.
type
==
.
educationTime
{
detailInfo
.
admissionTime
=
date
}
else
if
detailItem
.
type
==
.
graduateTime
{
detailInfo
.
graduateTime
=
date
}
loadInfo
()
saveDetailInfo
()
}
}
}
else
if
detailItem
.
type
==
.
educationDegree
{
// 学位
}
else
if
detailItem
.
type
==
.
educationDegree
{
// 学位
YHFormPickerView
.
show
(
type
:
.
degree
,
selectType
:
.
degree
(
.
bachelor
))
{
YHFormPickerView
.
show
(
type
:
.
degree
,
selectType
:
.
degree
(
.
bachelor
))
{
[weak self] selectType in
[
weak
self
]
selectType
in
guard
let
self
=
self
else
{
return
}
guard
let
self
=
self
else
{
return
}
detailInfo
.
background
=
selectType
.
title
loadInfo
()
saveDetailInfo
()
}
}
}
else
if
detailItem
.
type
==
.
degreeType
{
// 学位类型
}
else
if
detailItem
.
type
==
.
educationCountry
{
// 上课国家/地区
}
else
if
detailItem
.
type
==
.
educationCountry
{
// 上课国家/地区
let
vc
=
YHSelectCountryViewController
()
let
vc
=
YHSelectCountryViewController
()
vc
.
backLocationStringController
=
{
vc
.
backLocationStringController
=
{
[
weak
self
]
country
in
[
weak
self
]
country
in
guard
let
self
=
self
else
{
return
}
guard
let
self
=
self
else
{
return
}
detailInfo
.
schoolAddress
?
.
country
=
country
loadInfo
()
saveDetailInfo
()
}
}
self
.
navigationController
?
.
pushViewController
(
vc
)
self
.
navigationController
?
.
pushViewController
(
vc
)
}
else
if
detailItem
.
type
==
.
educationCity
{
// 上课城市
}
else
if
detailItem
.
type
==
.
educationCity
{
// 上课城市
if
detailInfo
.
isSchoolInAboard
()
{
return
}
let
vc
=
YHAddressViewController
()
let
vc
=
YHAddressViewController
()
vc
.
backLocationStringController
=
{
vc
.
backLocationStringController
=
{
[
weak
self
]
(
string1
,
string2
,
string3
,
string4
)
in
[
weak
self
]
(
string1
,
string2
,
string3
,
string4
)
in
guard
let
self
=
self
else
{
return
}
guard
let
self
=
self
else
{
return
}
detailInfo
.
schoolAddress
?
.
area
=
[
string1
,
string2
,
string3
,
string4
]
loadInfo
()
saveDetailInfo
()
}
}
self
.
present
(
vc
,
animated
:
true
)
self
.
present
(
vc
,
animated
:
true
)
}
}
}
}
*/
}
}
func
createDefaultCell
(
_
indexPath
:
IndexPath
)
->
UITableViewCell
{
func
createDefaultCell
(
_
indexPath
:
IndexPath
)
->
UITableViewCell
{
...
@@ -275,23 +352,73 @@ extension YHEducationDetailVC : UITableViewDelegate, UITableViewDataSource {
...
@@ -275,23 +352,73 @@ extension YHEducationDetailVC : UITableViewDelegate, UITableViewDataSource {
if
item
is
YHFormDetailItem
{
if
item
is
YHFormDetailItem
{
let
detailItem
=
item
as!
YHFormDetailItem
let
detailItem
=
item
as!
YHFormDetailItem
if
detailItem
.
type
==
.
universityFullName
||
detailItem
.
type
==
.
degreeType
if
detailItem
.
type
==
.
educationCity
{
||
detailItem
.
type
==
.
educationMajor
{
if
detailInfo
.
isSchoolInAboard
()
{
return
.
inputText
}
return
.
selectSheet
}
if
detailItem
.
type
==
.
educationMajor
{
return
.
inputText
return
.
inputText
}
}
if
detailItem
.
type
==
.
educationStyle
if
detailItem
.
type
==
.
universityFullName
||
detailItem
.
type
==
.
educationStyle
||
detailItem
.
type
==
.
educationTime
||
detailItem
.
type
==
.
educationTime
||
detailItem
.
type
==
.
graduateTime
||
detailItem
.
type
==
.
graduateTime
||
detailItem
.
type
==
.
educationDegree
||
detailItem
.
type
==
.
educationDegree
||
detailItem
.
type
==
.
degreeType
||
detailItem
.
type
==
.
educationCountry
||
detailItem
.
type
==
.
educationCountry
||
detailItem
.
type
==
.
educationCity
{
{
return
.
selectSheet
return
.
selectSheet
}
}
}
}
return
.
defaultType
return
.
defaultType
}
}
}
extension
YHEducationDetailVC
{
func
getDetailInfo
()
{
self
.
educationRequest
.
getEducationDetailInfo
(
params
:
[
"id"
:
self
.
detailId
])
{
[
weak
self
]
success
,
error
in
guard
let
self
=
self
else
{
return
}
if
success
{
detailInfo
=
self
.
educationRequest
.
educationDetailInfo
!
loadInfo
()
}
}
}
func
saveDetailInfo
()
{
// detailInfo.toDictionary() 对于值为空的字段不会添加 而后台需要 所以如下处理
let
dict
:[
String
:
Any
]
=
[
"verify"
:
0
,
"id"
:
detailInfo
.
id
,
"order_id"
:
detailInfo
.
orderId
,
"admission_time"
:
detailInfo
.
admissionTime
??
""
,
"background"
:
detailInfo
.
background
??
""
,
"college"
:
detailInfo
.
college
??
""
,
"degree_type"
:
detailInfo
.
degreeType
??
""
,
"graduate_time"
:
detailInfo
.
graduateTime
??
""
,
"professional"
:
detailInfo
.
professional
??
""
,
"school_address_aboard"
:
""
,
"type"
:
""
,
"school_address"
:
[
"country"
:
detailInfo
.
schoolAddress
?
.
country
??
""
,
"area"
:
detailInfo
.
schoolAddress
?
.
area
??
""
,
"foreign"
:
detailInfo
.
schoolAddress
?
.
foreign
??
""
],
]
self
.
educationRequest
.
saveEducationInfo
(
params
:
dict
)
{
[
weak
self
]
success
,
error
in
guard
let
self
=
self
else
{
return
}
if
success
{
// YHHUD.show(.success(message: "保存成功"))
}
else
{
// YHHUD.show(.error(message: "保存失败"))
}
}
}
}
}
galaxy/galaxy/Classes/Modules/IntelligentService(服务中心)/ServiceProcess(流程)/学历专业资格填写/C/YHEducationalQualificationVC.swift
View file @
dc428ae0
...
@@ -11,7 +11,7 @@ import UIKit
...
@@ -11,7 +11,7 @@ import UIKit
class
YHEducationalQualificationVC
:
YHBaseViewController
{
class
YHEducationalQualificationVC
:
YHBaseViewController
{
var
orderId
:
Int
?
var
orderId
:
Int
=
0
let
educationRequest
:
YHEducationRequestViewModel
=
YHEducationRequestViewModel
()
let
educationRequest
:
YHEducationRequestViewModel
=
YHEducationRequestViewModel
()
var
familyMemberInfo
:
YHFamilyMemberGroupInfo
?
var
familyMemberInfo
:
YHFamilyMemberGroupInfo
?
var
isChildsEditMode
:
YHFormTitleItemEditType
=
.
none
var
isChildsEditMode
:
YHFormTitleItemEditType
=
.
none
...
@@ -55,6 +55,7 @@ class YHEducationalQualificationVC: YHBaseViewController {
...
@@ -55,6 +55,7 @@ class YHEducationalQualificationVC: YHBaseViewController {
override
func
viewWillAppear
(
_
animated
:
Bool
)
{
override
func
viewWillAppear
(
_
animated
:
Bool
)
{
super
.
viewWillAppear
(
animated
)
super
.
viewWillAppear
(
animated
)
requestEducationInfo
()
}
}
func
createUI
()
{
func
createUI
()
{
...
@@ -76,7 +77,6 @@ class YHEducationalQualificationVC: YHBaseViewController {
...
@@ -76,7 +77,6 @@ class YHEducationalQualificationVC: YHBaseViewController {
}
}
loadInfo
()
loadInfo
()
requestEducationInfo
()
}
}
func
loadInfo
()
{
func
loadInfo
()
{
...
@@ -186,6 +186,23 @@ extension YHEducationalQualificationVC : UITableViewDelegate, UITableViewDataSou
...
@@ -186,6 +186,23 @@ extension YHEducationalQualificationVC : UITableViewDelegate, UITableViewDataSou
}
else
{
}
else
{
cell
.
title
=
""
cell
.
title
=
""
}
}
cell
.
clickBlock
=
{
[
weak
self
]
in
guard
let
self
=
self
else
{
return
}
if
detailItem
.
type
==
.
addEducation
{
// 学历
let
vc
=
YHEducationDetailVC
()
vc
.
orderId
=
self
.
orderId
self
.
navigationController
?
.
pushViewController
(
vc
)
}
else
if
detailItem
.
type
==
.
addCertificateInfo
{
// 证书
let
vc
=
YHProfessionalQualificationVC
()
self
.
navigationController
?
.
pushViewController
(
vc
)
}
return
}
return
cell
return
cell
}
}
...
@@ -207,6 +224,21 @@ extension YHEducationalQualificationVC : UITableViewDelegate, UITableViewDataSou
...
@@ -207,6 +224,21 @@ extension YHEducationalQualificationVC : UITableViewDelegate, UITableViewDataSou
let
answers
=
[
YHFormChoiceItem
(
title
:
"是"
.
local
,
isSelect
:
select0
),
YHFormChoiceItem
(
title
:
"否"
.
local
,
isSelect
:
select1
)]
let
answers
=
[
YHFormChoiceItem
(
title
:
"是"
.
local
,
isSelect
:
select0
),
YHFormChoiceItem
(
title
:
"否"
.
local
,
isSelect
:
select1
)]
cell
.
answerArr
=
answers
cell
.
answerArr
=
answers
cell
.
answerBlock
=
{
[
weak
self
]
(
arr
,
selectIndex
)
in
guard
let
self
=
self
else
{
return
}
let
selectItem
:
YHFormChoiceItem
=
arr
[
selectIndex
]
let
option
=
(
selectItem
.
title
==
"是"
.
local
?
1
:
2
)
if
detailItem
.
key
==
"qualification"
{
self
.
educationInfo
?
.
qualification
=
option
}
else
if
detailItem
.
key
==
"graduate"
{
self
.
educationInfo
?
.
graduate
=
option
}
loadInfo
()
}
return
cell
return
cell
}
}
...
@@ -308,15 +340,6 @@ extension YHEducationalQualificationVC : UITableViewDelegate, UITableViewDataSou
...
@@ -308,15 +340,6 @@ extension YHEducationalQualificationVC : UITableViewDelegate, UITableViewDataSou
}
}
if
item
is
YHFormAddItem
{
if
item
is
YHFormAddItem
{
let
detailItem
=
item
as!
YHFormAddItem
if
detailItem
.
type
==
.
addEducation
{
let
vc
=
YHEducationDetailVC
()
self
.
navigationController
?
.
pushViewController
(
vc
)
}
else
if
detailItem
.
type
==
.
addCertificateInfo
{
let
vc
=
YHProfessionalQualificationVC
()
self
.
navigationController
?
.
pushViewController
(
vc
)
}
return
return
}
}
...
@@ -324,6 +347,10 @@ extension YHEducationalQualificationVC : UITableViewDelegate, UITableViewDataSou
...
@@ -324,6 +347,10 @@ extension YHEducationalQualificationVC : UITableViewDelegate, UITableViewDataSou
let
detailItem
=
item
as!
YHFormDetailItem
let
detailItem
=
item
as!
YHFormDetailItem
if
detailItem
.
type
==
.
educationInfo
{
// 学历
if
detailItem
.
type
==
.
educationInfo
{
// 学历
let
vc
=
YHEducationDetailVC
()
let
vc
=
YHEducationDetailVC
()
if
let
eduList
=
educationInfo
?
.
eduList
,
indexPath
.
row
-
1
<
eduList
.
count
{
let
eduInfo
=
eduList
[
indexPath
.
row
-
1
]
vc
.
detailId
=
eduInfo
.
id
}
self
.
navigationController
?
.
pushViewController
(
vc
)
self
.
navigationController
?
.
pushViewController
(
vc
)
return
return
}
}
...
@@ -333,9 +360,6 @@ extension YHEducationalQualificationVC : UITableViewDelegate, UITableViewDataSou
...
@@ -333,9 +360,6 @@ extension YHEducationalQualificationVC : UITableViewDelegate, UITableViewDataSou
return
return
}
}
}
}
let
vc
=
YHEducationDetailVC
()
self
.
navigationController
?
.
pushViewController
(
vc
)
}
}
func
createDefaultCell
(
_
indexPath
:
IndexPath
)
->
UITableViewCell
{
func
createDefaultCell
(
_
indexPath
:
IndexPath
)
->
UITableViewCell
{
...
@@ -364,7 +388,7 @@ extension YHEducationalQualificationVC {
...
@@ -364,7 +388,7 @@ extension YHEducationalQualificationVC {
// 请求家庭成员信息
// 请求家庭成员信息
func
requestEducationInfo
()
{
func
requestEducationInfo
()
{
self
.
educationRequest
.
requestEducationInfo
(
params
:
[
"order_id"
:
self
.
orderId
!
])
{
self
.
educationRequest
.
requestEducationInfo
(
params
:
[
"order_id"
:
self
.
orderId
])
{
[
weak
self
]
success
,
error
in
[
weak
self
]
success
,
error
in
guard
let
self
=
self
else
{
return
}
guard
let
self
=
self
else
{
return
}
if
success
{
if
success
{
...
...
galaxy/galaxy/Classes/Modules/IntelligentService(服务中心)/ServiceProcess(流程)/学历专业资格填写/M/YHEducationInfo.swift
View file @
dc428ae0
...
@@ -9,7 +9,7 @@
...
@@ -9,7 +9,7 @@
import
UIKit
import
UIKit
import
SmartCodable
import
SmartCodable
class
YHEducationListInfo
:
SmartCodable
{
class
YHEducationListInfo
:
SmartCodable
{
var
eduList
:
[
YHEducationInfo
]?
var
eduList
:
[
YHEducationInfo
]?
var
eduCount
:
Int
=
0
var
eduCount
:
Int
=
0
var
quaList
:
[
YHQualificationInfo
]?
var
quaList
:
[
YHQualificationInfo
]?
...
@@ -76,3 +76,95 @@ class YHQualificationInfo: SmartCodable {
...
@@ -76,3 +76,95 @@ class YHQualificationInfo: SmartCodable {
}
}
}
}
class
YHEducationDetailInfo
:
SmartCodable
{
var
id
:
Int
=
0
var
orderId
:
Int
=
0
var
college
:
String
?
var
isTop
:
Int
=
0
var
type
:
String
?
var
admissionTime
:
String
?
var
graduateTime
:
String
?
var
background
:
String
?
var
professional
:
String
?
var
degreeType
:
String
?
var
remark
:
String
?
var
average
:
String
?
var
schoolAddress
:
YHSchoolAddress
?
var
schoolAddressAboard
:
Int
=
0
var
oldId
:
Int
=
0
var
createdAt
:
String
?
var
updatedAt
:
String
?
var
deletedAt
:
SmartAny
?
var
isShow
:
Int
=
0
var
operatorName
:
SmartAny
?
var
operatorEnglishName
:
SmartAny
?
var
operatorId
:
Int
=
0
var
matchListing
:
Int
=
0
var
createFromAppid
:
Int
=
0
var
updateFromAppid
:
Int
=
0
var
customerCenterId
:
Int
=
0
enum
CodingKeys
:
String
,
CodingKey
{
case
id
=
"id"
case
orderId
=
"order_id"
case
college
=
"college"
case
isTop
=
"is_top"
case
type
=
"type"
case
admissionTime
=
"admission_time"
case
graduateTime
=
"graduate_time"
case
background
=
"background"
case
professional
=
"professional"
case
degreeType
=
"degree_type"
case
remark
=
"remark"
case
average
=
"average"
case
schoolAddress
=
"school_address"
case
schoolAddressAboard
=
"school_address_aboard"
case
oldId
=
"old_id"
case
createdAt
=
"created_at"
case
updatedAt
=
"updated_at"
case
deletedAt
=
"deleted_at"
case
isShow
=
"is_show"
case
operatorName
=
"operator_name"
case
operatorEnglishName
=
"operator_english_name"
case
operatorId
=
"operator_id"
case
matchListing
=
"match_listing"
case
createFromAppid
=
"create_from_appid"
case
updateFromAppid
=
"update_from_appid"
case
customerCenterId
=
"customer_center_id"
}
required
init
()
{
}
// 学校是否在国外 默认是在国内
func
isSchoolInAboard
()
->
Bool
{
guard
let
schoolAddress
=
schoolAddress
else
{
return
false
}
guard
let
country
=
schoolAddress
.
country
else
{
return
false
}
if
country
.
contains
(
"中国"
)
{
return
false
}
return
true
}
}
class
YHSchoolAddress
:
Codable
{
var
area
:
[
String
]?
var
country
:
String
?
var
foreign
:
String
?
enum
CodingKeys
:
String
,
CodingKey
{
case
area
=
"area"
case
country
=
"country"
case
foreign
=
"foreign"
}
required
init
(
area
:
[
String
]?,
country
:
String
?,
foreign
:
String
?)
{
self
.
area
=
area
self
.
country
=
country
self
.
foreign
=
foreign
}
}
galaxy/galaxy/Classes/Modules/IntelligentService(服务中心)/ServiceProcess(流程)/学历专业资格填写/M/YHEducationRequestViewModel.swift
View file @
dc428ae0
...
@@ -9,14 +9,17 @@
...
@@ -9,14 +9,17 @@
import
UIKit
import
UIKit
class
YHEducationRequestViewModel
{
class
YHEducationRequestViewModel
{
// 学历和专业信息
var
educationInfo
:
YHEducationListInfo
?
var
educationInfo
:
YHEducationListInfo
?
// 学历详情信息
var
educationDetailInfo
:
YHEducationDetailInfo
?
//
添加家庭成员
//
请求学历和专业证书信息
func
requestEducationInfo
(
params
:[
String
:
Any
],
callBackBlock
:
@escaping
(
_
success
:
Bool
,
_
error
:
YHErrorModel
?)
->
())
{
func
requestEducationInfo
(
params
:[
String
:
Any
],
callBackBlock
:
@escaping
(
_
success
:
Bool
,
_
error
:
YHErrorModel
?)
->
())
{
YHHUD
.
show
(
.
progress
(
message
:
"数据加载中..."
))
YHHUD
.
show
(
.
progress
(
message
:
"数据加载中..."
))
let
strUrl
=
YHBaseUrlManager
.
shared
.
curURL
()
+
YHAllApiName
.
Education
.
edu
cationInfoApi
let
strUrl
=
YHBaseUrlManager
.
shared
.
curURL
()
+
YHAllApiName
.
Education
.
getEducationAndQulifi
cationInfoApi
let
_
=
YHNetRequest
.
getRequest
(
url
:
strUrl
,
params
:
params
)
{[
weak
self
]
json
,
code
in
let
_
=
YHNetRequest
.
getRequest
(
url
:
strUrl
,
params
:
params
)
{[
weak
self
]
json
,
code
in
...
@@ -41,4 +44,64 @@ class YHEducationRequestViewModel {
...
@@ -41,4 +44,64 @@ class YHEducationRequestViewModel {
callBackBlock
(
false
,
err
)
callBackBlock
(
false
,
err
)
}
}
}
}
// 获取学历详情
func
getEducationDetailInfo
(
params
:[
String
:
Any
],
callBackBlock
:
@escaping
(
_
success
:
Bool
,
_
error
:
YHErrorModel
?)
->
())
{
YHHUD
.
show
(
.
progress
(
message
:
"数据加载中..."
))
let
strUrl
=
YHBaseUrlManager
.
shared
.
curURL
()
+
YHAllApiName
.
Education
.
getEducationDetailInfoApi
let
_
=
YHNetRequest
.
getRequest
(
url
:
strUrl
,
params
:
params
)
{[
weak
self
]
json
,
code
in
YHHUD
.
hide
()
guard
let
self
=
self
else
{
return
}
guard
let
model
=
NetBaseModel
.
deserialize
(
dict
:
json
)
else
{
let
error
:
YHErrorModel
=
YHErrorModel
(
errorCode
:
YHErrorCode
.
dictParseError
.
rawValue
,
errorMsg
:
YHErrorCode
.
dictParseError
.
description
())
callBackBlock
(
false
,
error
)
return
}
printLog
(
"model 是 ==>
\(
model
)
"
)
let
dic
=
model
.
data
?
.
peel
as?
[
AnyHashable
:
Any
]
guard
let
resultModel
=
YHEducationDetailInfo
.
deserialize
(
dict
:
dic
as?
[
AnyHashable
:
Any
])
else
{
callBackBlock
(
false
,
nil
)
return
}
educationDetailInfo
=
resultModel
callBackBlock
(
true
,
nil
)
}
failBlock
:
{
err
in
callBackBlock
(
false
,
err
)
}
}
// 保存学历
func
saveEducationInfo
(
params
:[
String
:
Any
],
callBackBlock
:
@escaping
(
_
success
:
Bool
,
_
error
:
YHErrorModel
?)
->
())
{
YHHUD
.
show
(
.
progress
(
message
:
"数据加载中..."
))
let
strUrl
=
YHBaseUrlManager
.
shared
.
curURL
()
+
YHAllApiName
.
Education
.
saveEducationInfoApi
let
_
=
YHNetRequest
.
postRequest
(
url
:
strUrl
,
params
:
params
)
{[
weak
self
]
json
,
code
in
YHHUD
.
hide
()
guard
let
self
=
self
else
{
return
}
guard
let
model
=
NetBaseModel
.
deserialize
(
dict
:
json
)
else
{
let
error
:
YHErrorModel
=
YHErrorModel
(
errorCode
:
YHErrorCode
.
dictParseError
.
rawValue
,
errorMsg
:
YHErrorCode
.
dictParseError
.
description
())
callBackBlock
(
false
,
error
)
return
}
printLog
(
"model 是 ==>
\(
model
)
"
)
if
model
.
code
==
NetWorkCode
.
success
.
rawValue
{
callBackBlock
(
true
,
nil
)
}
else
{
callBackBlock
(
false
,
nil
)
}
}
failBlock
:
{
err
in
callBackBlock
(
false
,
err
)
}
}
}
}
galaxy/galaxy/Classes/Tools/NetWork/YHAllApiName.swift
View file @
dc428ae0
...
@@ -32,19 +32,23 @@ class YHAllApiName {
...
@@ -32,19 +32,23 @@ class YHAllApiName {
//保存其他资料信息
//保存其他资料信息
static
let
updateOtherInfoApi
=
"frontend/order/updateOrderOtherInformation"
static
let
updateOtherInfoApi
=
"frontend/order/updateOrderOtherInformation"
}
struct
Family
{
// 获取家庭成员信息 添加家庭成员也用这个
// 获取家庭成员信息 添加家庭成员也用这个
static
let
familyInfoApi
=
"frontend/order/information/family"
static
let
familyInfoApi
=
"frontend/order/information/family"
// 删除家庭成员信息
// 删除家庭成员信息
static
let
familyMemberDeleteApi
=
"frontend/order/information/family/delete"
static
let
familyMemberDeleteApi
=
"frontend/order/information/family/delete"
}
}
struct
Education
{
struct
Education
{
// 获取学历及证书相关信息
// 获取学历及证书相关信息
static
let
educationInfoApi
=
"frontend/education/list"
static
let
getEducationAndQulificationInfoApi
=
"frontend/education/list"
// 获取学历详情信息
static
let
getEducationDetailInfoApi
=
"frontend/education/detail"
// 保存学历信息
static
let
saveEducationInfoApi
=
"frontend/education/save"
}
}
//Users
//Users
...
...
pete谢兆麟
@pete
mentioned in commit
f436230f
·
Feb 21, 2024
mentioned in commit
f436230f
mentioned in commit f436230fb25c0aa9434fce43284911ea326aabb8
Toggle commit list
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment