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
cc4b6479
Commit
cc4b6479
authored
Nov 14, 2024
by
pete谢兆麟
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
主申请人逻辑修改
parent
bd7f937e
Changes
5
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
4 additions
and
264 deletions
+4
-264
YHMainApplicantInformationViewModel.swift
...tion(主申请人信息)/VM/YHMainApplicantInformationViewModel.swift
+1
-11
YHWorkExperienceViewController.swift
...rkExperience(工作经验)/C/YHWorkExperienceViewController.swift
+3
-195
YHWorkExperienceDetailModel.swift
...kExperience(工作经验)/Model/YHWorkExperienceDetailModel.swift
+0
-1
YHWorkHighlightsTableViewCell.swift
...orkExperience(工作经验)/V/YHWorkHighlightsTableViewCell.swift
+0
-48
YHWorkExperienceViewModel.swift
...xperience(工作经验)/ViewModel/YHWorkExperienceViewModel.swift
+0
-9
No files found.
galaxy/galaxy/Classes/Modules/IntelligentService(服务中心)/QMAS(优才)/ServiceProcess(我的信息流程)/MainApplicantInformation(主申请人信息)/VM/YHMainApplicantInformationViewModel.swift
View file @
cc4b6479
...
...
@@ -127,17 +127,7 @@ class YHMainApplicantInformationViewModel: YHBaseViewModel {
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
,
alertMessage
:
"请选择出生日期"
)
let
item4
=
YHItemModel
(
id
:
.
id25
,
isNeed
:
true
,
title
:
"出生国家/地区"
,
isUserKeyBoard
:
false
,
prompts
:
nil
,
message
:
"
\(
mainModel
.
birth_place_aboard
)
"
,
leftButtonString
:
"国内"
,
rightButtonString
:
"国外"
,
isShowPrompts
:
isShowPrompt
,
alertMessage
:
"请选择出生国家/地区"
)
var
string
=
""
let
array
=
mainModel
.
birth_place
.
area
for
item
in
array
{
if
string
.
count
!=
0
{
string
=
string
+
"/"
+
item
}
else
{
string
=
string
+
item
}
}
let
item5
=
YHItemModel
(
id
:
.
id26
,
isNeed
:
true
,
title
:
"出生城市"
,
isUserKeyBoard
:
false
,
prompts
:
"请输入"
,
message
:
string
,
isShowPrompts
:
isShowPrompt
,
alertMessage
:
"请输入出生城市;"
)
let
item5
=
YHItemModel
(
id
:
.
id26
,
isNeed
:
true
,
title
:
"出生城市"
,
isUserKeyBoard
:
true
,
prompts
:
"请输入"
,
message
:
mainModel
.
birth_place
.
details
,
isShowPrompts
:
isShowPrompt
,
alertMessage
:
"请输入出生城市;"
)
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
,
alertMessage
:
"请选择性别"
)
let
item7
=
YHItemModel
(
id
:
.
id28
,
isNeed
:
true
,
title
:
"婚姻状况"
,
isUserKeyBoard
:
false
,
prompts
:
"请选择"
,
message
:
"
\(
mainModel
.
married
)
"
,
type
:
.
marry
,
isShowPrompts
:
isShowPrompt
,
alertMessage
:
"请选择婚姻状况"
)
...
...
galaxy/galaxy/Classes/Modules/IntelligentService(服务中心)/QMAS(优才)/ServiceProcess(我的信息流程)/WorkExperience(工作经验)/C/YHWorkExperienceViewController.swift
View file @
cc4b6479
...
...
@@ -107,11 +107,7 @@ class YHWorkExperienceViewController: YHBaseViewController {
self
.
stepView
.
currentIndex
=
self
.
viewModel
.
mainModel
.
step
self
.
stepView
.
maxIndex
=
self
.
viewModel
.
mainModel
.
step
self
.
updateDataSource
()
if
self
.
viewModel
.
mainModel
.
is_project_introduction
==
1
{
self
.
stepView
.
dataSource
=
[
"基本信息"
,
"工作职责"
,
"工作亮点"
,
"项目介绍"
,
"简历/工作总结"
]
}
else
{
self
.
stepView
.
dataSource
=
[
"基本信息"
,
"工作职责"
,
"工作亮点"
,
"简历/工作总结"
]
}
self
.
viewModel
.
requestWorkInfoProject
(
"
\(
self
.
viewModel
.
mainModel
.
id
)
"
)
{[
weak
self
]
success
,
error
in
guard
let
self
=
self
else
{
return
}
self
.
introductionDataSource
=
success
...
...
@@ -126,7 +122,7 @@ class YHWorkExperienceViewController: YHBaseViewController {
if
self
.
stepView
.
currentIndex
==
0
{
self
.
baseDataSource
=
self
.
viewModel
.
getBaseDataSource
(
isShowPrompt
)
}
if
(
self
.
viewModel
.
mainModel
.
is_project_introduction
==
1
&&
self
.
stepView
.
currentIndex
==
4
)
||
(
self
.
viewModel
.
mainModel
.
is_project_introduction
!=
1
&&
self
.
stepView
.
currentIndex
==
3
)
{
if
self
.
stepView
.
currentIndex
==
3
{
bottomView
.
nextButton
.
setTitle
(
"提交"
,
for
:
.
normal
)
}
else
{
bottomView
.
nextButton
.
setTitle
(
"下一步"
,
for
:
.
normal
)
...
...
@@ -192,7 +188,7 @@ class YHWorkExperienceViewController: YHBaseViewController {
YHHUD
.
flash
(
message
:
error
.
errorMsg
)
}
else
{
YHHUD
.
hideFlashMessage
()
if
self
.
stepView
.
currentIndex
==
4
||
(
self
.
stepView
.
currentIndex
==
3
&&
self
.
viewModel
.
mainModel
.
is_project_introduction
==
0
)
{
if
self
.
stepView
.
currentIndex
==
3
{
YHHUD
.
flash
(
message
:
"提交成功"
)
self
.
navigationController
?
.
popViewController
()
}
else
{
...
...
@@ -289,7 +285,7 @@ class YHWorkExperienceViewController: YHBaseViewController {
YHHUD
.
flash
(
message
:
error
.
errorMsg
)
}
else
{
YHHUD
.
hideFlashMessage
()
if
self
.
stepView
.
currentIndex
==
4
||
(
self
.
stepView
.
currentIndex
==
3
&&
self
.
viewModel
.
mainModel
.
is_project_introduction
==
0
)
{
if
self
.
stepView
.
currentIndex
==
3
{
YHHUD
.
flash
(
message
:
"提交成功"
)
self
.
navigationController
?
.
popViewController
()
}
else
{
...
...
@@ -476,7 +472,6 @@ extension YHWorkExperienceViewController: UITableViewDelegate, UITableViewDataSo
}
else
if
stepView
.
currentIndex
==
2
{
let
cell
=
tableView
.
dequeueReusableCell
(
withClass
:
YHWorkHighlightsTableViewCell
.
self
)
cell
.
dataSource
=
viewModel
.
mainModel
.
highlights
cell
.
detailSwitch
.
isOn
=
viewModel
.
mainModel
.
is_project_introduction
==
1
cell
.
exampleBlock
=
{[
weak
self
]
in
guard
let
self
=
self
else
{
return
}
let
mainVc
=
YHWorkExampleViewController
()
...
...
@@ -494,14 +489,6 @@ extension YHWorkExperienceViewController: UITableViewDelegate, UITableViewDataSo
cell
.
messageBlock
=
{[
weak
self
]
message
in
self
?
.
viewModel
.
updateHighlights
(
message
)
}
cell
.
switchBlock
=
{[
weak
self
]
isOn
in
self
?
.
viewModel
.
updateIsProjectIntroduction
(
isOn
:
isOn
)
if
isOn
{
self
?
.
stepView
.
dataSource
=
[
"基本信息"
,
"工作职责"
,
"工作亮点"
,
"项目介绍"
,
"简历/工作总结"
]
}
else
{
self
?
.
stepView
.
dataSource
=
[
"基本信息"
,
"工作职责"
,
"工作亮点"
,
"简历/工作总结"
]
}
}
cell
.
photoBlock
=
{[
weak
self
]
in
guard
let
self
=
self
else
{
return
}
YHImagePickerView
.
show
()
{[
weak
self
]
image
in
...
...
@@ -518,177 +505,6 @@ extension YHWorkExperienceViewController: UITableViewDelegate, UITableViewDataSo
}
return
cell
}
else
if
stepView
.
currentIndex
==
3
{
if
self
.
viewModel
.
mainModel
.
is_project_introduction
==
1
{
let
cell
=
tableView
.
dequeueReusableCell
(
withClass
:
YHWorkIntroductionTableViewCell
.
self
)
cell
.
dataSource
=
introductionDataSource
if
isMore
{
cell
.
more
()
}
else
{
cell
.
cannal
()
}
cell
.
clickBlock
=
{[
weak
self
]
model
in
guard
let
self
=
self
else
{
return
}
let
vc
=
YHWorkIntroductionViewController
()
vc
.
dataSource
=
model
vc
.
workModel
=
self
.
viewModel
.
mainModel
vc
.
saveBlock
=
{[
weak
self
]
in
guard
let
self
=
self
else
{
return
}
self
.
getData
()
}
self
.
navigationController
?
.
pushViewController
(
vc
,
animated
:
true
)
}
cell
.
deleteBlock
=
{[
weak
self
]
model
in
guard
let
self
=
self
else
{
return
}
self
.
showDeleteAlert
(
model
)
}
cell
.
isMoreBlock
=
{[
weak
self
]
isMore
in
guard
let
self
=
self
else
{
return
}
self
.
isMore
=
isMore
}
cell
.
addIntroductionBlock
=
{[
weak
self
]
in
guard
let
self
=
self
else
{
return
}
let
vc
=
YHWorkIntroductionViewController
()
vc
.
workModel
=
self
.
viewModel
.
mainModel
vc
.
saveBlock
=
{[
weak
self
]
in
guard
let
self
=
self
else
{
return
}
self
.
getData
()
}
self
.
navigationController
?
.
pushViewController
(
vc
,
animated
:
true
)
}
return
cell
}
else
{
let
cell
=
tableView
.
dequeueReusableCell
(
withClass
:
YHWorkFileSyncTableViewCell
.
self
)
cell
.
dataSource
=
fileDataSource
cell
.
addIntroductionBlock
=
{
[
weak
self
]
in
guard
let
self
=
self
else
{
return
}
let
count
=
self
.
viewModel
.
mainModel
.
file
.
count
if
count
>=
99
{
YHHUD
.
flash
(
message
:
"最多上传99个图片或文件"
)
return
}
var
maxCount
=
99
-
count
if
maxCount
>
9
{
maxCount
=
9
}
let
sheetView
=
YHCertificateUploadSheetView
.
sheetView
()
sheetView
.
maxSelectImageCount
=
maxCount
sheetView
.
uploadFilesBlock
=
{
[
weak
self
]
fileUrl
in
guard
let
self
=
self
else
{
return
}
print
(
fileUrl
)
uploadFile
(
fileUrl
)
}
sheetView
.
uploadImageBlock
=
{
[
weak
self
]
imgArr
in
guard
let
self
=
self
else
{
return
}
let
group
=
DispatchGroup
()
var
successArr
:[
String
]
=
[]
var
failArr
:[
YHSelectImageItem
]
=
[]
YHHUD
.
show
(
.
progress
(
message
:
"上传中..."
))
for
item
in
imgArr
{
if
let
image
=
item
.
data
{
group
.
enter
()
uploadImage
(
image
,
imageName
:
item
.
name
)
{
success
,
url
in
if
success
{
successArr
.
append
(
url
)
}
else
{
failArr
.
append
(
item
)
}
group
.
leave
()
}
}
}
// 等待所有任务完成
group
.
notify
(
queue
:
.
main
)
{
YHHUD
.
hide
()
// 所有任务完成,回到主线程继续执行
if
imgArr
.
count
==
successArr
.
count
{
YHHUD
.
flash
(
message
:
"上传成功"
)
for
item
in
successArr
{
let
timestamp
=
Date
()
.
timeIntervalSince1970
let
dateFormatter
=
DateFormatter
()
dateFormatter
.
dateFormat
=
"yyyy.MM.dd HH:mm:ss"
let
currentDate
=
Date
()
let
formattedDate
=
dateFormatter
.
string
(
from
:
currentDate
)
let
model
=
YHWorkExperienceFileModel
()
model
.
fileUrl
=
item
model
.
fileName
=
"
\(
UInt64
(
timestamp
)
)
"
+
".jpg"
model
.
uploadedAt
=
formattedDate
self
.
fileDataSource
?
.
append
(
model
)
self
.
viewModel
.
mainModel
.
file
=
self
.
fileDataSource
??
[]
}
self
.
tableView
.
reloadData
()
}
else
{
YHHUD
.
flash
(
message
:
"
\(
successArr
.
count
)
张照片上传成功
\n\(
failArr
.
count
)
张照片上传失败"
)
}
}
}
sheetView
.
show
()
}
cell
.
experienceListBlock
=
{[
weak
self
]
model
,
type
in
guard
let
self
=
self
else
{
return
}
if
type
==
.
delete
{
let
items
=
[
YHCertificateEditItem
(
type
:
.
rename
,
title
:
"重命名"
),
YHCertificateEditItem
(
type
:
.
preview
,
title
:
"预览"
),
YHCertificateEditItem
(
type
:
.
delete
,
title
:
"删除"
),
YHCertificateEditItem
(
type
:
.
cancel
,
title
:
"取消"
)]
YHCertificateEditSheetView
.
sheetView
(
items
:
items
)
{
[
weak
self
]
editType
in
guard
let
self
=
self
else
{
return
}
if
editType
==
.
rename
{
self
.
selectEditItem
=
model
var
name
=
getFileNameWithoutSuffix
(
model
.
fileName
)
if
name
.
count
>
30
{
name
=
name
[
safe
:
..<
30
]
!
}
renameInputView
.
textField
.
text
=
name
renameInputView
.
textField
.
becomeFirstResponder
()
}
if
editType
==
.
preview
{
if
model
.
fileUrl
.
isEmpty
==
false
{
self
.
viewModel
.
getPublicImageUrl
(
model
.
fileUrl
)
{
success
,
error
in
if
let
success
=
success
{
self
.
previewFileTool
.
openXLSXRemoteFile
(
urlString
:
success
,
fileName
:
model
.
fileName
)
}
}
}
}
if
editType
==
.
delete
{
self
.
showDeleteAlert
(
model
)
}
}
.
show
()
}
else
{
if
model
.
fileUrl
.
isEmpty
==
false
{
self
.
viewModel
.
getPublicImageUrl
(
model
.
fileUrl
)
{
success
,
error
in
if
let
success
=
success
{
self
.
previewFileTool
.
openXLSXRemoteFile
(
urlString
:
success
,
fileName
:
model
.
fileName
)
}
}
}
}
}
cell
.
selectIntroductionBlock
=
{
[
weak
self
]
in
guard
let
self
=
self
else
{
return
}
YHSelectFileSheetView
.
show
(
orderID
:
self
.
orderID
)
{
[
weak
self
]
models
in
guard
let
self
=
self
else
{
return
}
for
item
in
models
{
self
.
fileDataSource
?
.
append
(
item
)
self
.
viewModel
.
mainModel
.
file
=
self
.
fileDataSource
??
[]
}
self
.
tableView
.
reloadData
()
if
models
.
count
!=
0
{
YHHUD
.
flash
(
message
:
"同步成功"
)
}
}
}
return
cell
}
}
else
if
stepView
.
currentIndex
==
4
{
let
cell
=
tableView
.
dequeueReusableCell
(
withClass
:
YHWorkFileSyncTableViewCell
.
self
)
cell
.
dataSource
=
fileDataSource
cell
.
addIntroductionBlock
=
{
[
weak
self
]
in
...
...
@@ -845,14 +661,6 @@ extension YHWorkExperienceViewController: UITableViewDelegate, UITableViewDataSo
if
stepView
.
currentIndex
==
1
||
stepView
.
currentIndex
==
2
{
return
KScreenHeight
-
k_Height_NavigationtBarAndStatuBar
-
YHStepView
.
height
-
k_Height_safeAreaInsetsBottom
()
-
64
}
else
if
stepView
.
currentIndex
==
3
{
if
self
.
viewModel
.
mainModel
.
is_project_introduction
==
1
{
let
number
=
introductionDataSource
?
.
count
??
0
return
CGFloat
(
76
*
number
+
150
)
}
else
{
let
count
=
fileDataSource
?
.
count
??
0
return
CGFloat
(
69
*
count
+
171
)
}
}
else
if
stepView
.
currentIndex
==
4
{
let
count
=
fileDataSource
?
.
count
??
0
return
CGFloat
(
69
*
count
+
171
)
}
else
{
...
...
galaxy/galaxy/Classes/Modules/IntelligentService(服务中心)/QMAS(优才)/ServiceProcess(我的信息流程)/WorkExperience(工作经验)/Model/YHWorkExperienceDetailModel.swift
View file @
cc4b6479
...
...
@@ -56,7 +56,6 @@ class YHWorkExperienceDetailModel: SmartCodable {
var
company_website
:
String
=
""
var
company_introduce
:
String
=
""
var
business_remark
:
String
=
""
var
is_project_introduction
:
Int
=
0
var
customer_center_id
:
Int
=
0
var
projects
:
[
String
]
=
[]
...
...
galaxy/galaxy/Classes/Modules/IntelligentService(服务中心)/QMAS(优才)/ServiceProcess(我的信息流程)/WorkExperience(工作经验)/V/YHWorkHighlightsTableViewCell.swift
View file @
cc4b6479
...
...
@@ -11,19 +11,15 @@ import UIKit
class
YHWorkHighlightsTableViewCell
:
UITableViewCell
{
typealias
ExampleBlock
=
()
->
()
typealias
MessageBlock
=
(
_
message
:
String
)
->
()
typealias
SwitchBlock
=
(
_
isOn
:
Bool
)
->
()
var
exampleBlock
:
ExampleBlock
?
var
photoBlock
:
ExampleBlock
?
var
messageBlock
:
MessageBlock
?
var
switchBlock
:
SwitchBlock
?
var
centerView
:
UIView
!
var
titleLabel
:
UILabel
!
var
subTitleLabel
:
UILabel
!
var
lineView
:
UIView
!
var
messageTextField
:
UITextView
!
var
promptsLabel
:
UILabel
!
var
detailLabel
:
UILabel
!
var
detailSwitch
:
UISwitch
!
var
bottomView
:
YHWorkActionView
!
var
dataSource
:
String
?{
didSet
{
...
...
@@ -143,35 +139,6 @@ class YHWorkHighlightsTableViewCell: UITableViewCell {
make
.
top
.
equalTo
(
116
)
}
detailLabel
=
{
let
label
=
UILabel
()
label
.
text
=
"项目详细介绍"
label
.
textColor
=
UIColor
.
mainTextColor
label
.
font
=
UIFont
.
PFSC_R
(
ofSize
:
14
)
return
label
}()
centerView
.
addSubview
(
detailLabel
)
detailLabel
.
snp
.
makeConstraints
{
make
in
make
.
left
.
equalTo
(
18
)
make
.
bottom
.
equalTo
(
-
62
)
make
.
height
.
equalTo
(
20
)
make
.
width
.
equalTo
(
100
)
}
detailSwitch
=
{
let
switchView
=
UISwitch
()
switchView
.
onTintColor
=
UIColor
.
brandMainColor
switchView
.
addTarget
(
self
,
action
:
#selector(
switchViewChange
)
,
for
:
.
valueChanged
)
return
switchView
}()
centerView
.
addSubview
(
detailSwitch
)
detailSwitch
.
snp
.
makeConstraints
{
make
in
make
.
right
.
equalTo
(
-
18
)
make
.
centerY
.
equalTo
(
detailLabel
.
snp
.
centerY
)
make
.
height
.
equalTo
(
24
)
make
.
width
.
equalTo
(
45
)
}
bottomView
=
{
let
view
=
YHWorkActionView
()
view
.
exampleBlock
=
{[
weak
self
]
in
...
...
@@ -193,7 +160,6 @@ class YHWorkHighlightsTableViewCell: UITableViewCell {
make
.
left
.
right
.
bottom
.
equalToSuperview
()
make
.
height
.
equalTo
(
44
)
}
detailSwitch
.
transform
=
CGAffineTransform
(
scaleX
:
0.77
,
y
:
0.77
)
}
...
...
@@ -205,20 +171,6 @@ class YHWorkHighlightsTableViewCell: UITableViewCell {
promptsLabel
.
isHidden
=
false
}
}
@objc
func
switchViewChange
()
{
if
let
block
=
switchBlock
{
block
(
detailSwitch
.
isOn
)
}
}
func
setSwitchState
(
_
isOn
:
Int
)
{
if
isOn
==
1
{
detailSwitch
.
isOn
=
true
}
else
{
detailSwitch
.
isOn
=
false
}
}
}
extension
YHWorkHighlightsTableViewCell
:
UITextViewDelegate
{
...
...
galaxy/galaxy/Classes/Modules/IntelligentService(服务中心)/QMAS(优才)/ServiceProcess(我的信息流程)/WorkExperience(工作经验)/ViewModel/YHWorkExperienceViewModel.swift
View file @
cc4b6479
...
...
@@ -195,14 +195,6 @@ class YHWorkExperienceViewModel: YHBaseViewModel {
mainModel
.
highlights
=
value
}
func
updateIsProjectIntroduction
(
isOn
:
Bool
)
{
if
isOn
{
mainModel
.
is_project_introduction
=
1
}
else
{
mainModel
.
is_project_introduction
=
0
}
}
func
updateNotNeedUploadFile
(
value
:
Int
)
{
mainModel
.
not_need_upload_file
=
value
}
...
...
@@ -297,7 +289,6 @@ class YHWorkExperienceViewModel: YHBaseViewModel {
"international_work_experience"
:
mainModel
.
international_work_experience
,
"is_executives"
:
mainModel
.
is_executives
,
"is_famous_enterprise"
:
mainModel
.
is_famous_enterprise
,
"is_project_introduction"
:
mainModel
.
is_project_introduction
,
"is_show"
:
mainModel
.
is_show
,
"is_synthetic"
:
mainModel
.
is_synthetic
,
"location"
:
location
,
...
...
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