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
4b7225bd
Commit
4b7225bd
authored
Mar 20, 2024
by
pete谢兆麟
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
产品走查问题 删除按钮弹窗添加
parent
a8214da1
Changes
8
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
82 additions
and
40 deletions
+82
-40
YHCommonAlertView.swift
...Service(服务中心)/MySignature(我的签字)/V/YHCommonAlertView.swift
+15
-0
YHMainApplicantInformationViewModel.swift
...tion(主申请人信息)/VM/YHMainApplicantInformationViewModel.swift
+10
-2
YHWorkExperienceListViewController.swift
...perience(工作经验)/C/YHWorkExperienceListViewController.swift
+10
-4
YHWorkExperienceViewController.swift
...rkExperience(工作经验)/C/YHWorkExperienceViewController.swift
+27
-22
YHWorkIntroductionViewController.swift
...Experience(工作经验)/C/YHWorkIntroductionViewController.swift
+12
-8
YHWorkIntroductionItemView.swift
...)/WorkExperience(工作经验)/V/YHWorkIntroductionItemView.swift
+1
-1
YHWorkExperienceViewModel.swift
...xperience(工作经验)/ViewModel/YHWorkExperienceViewModel.swift
+6
-2
YHWorkIntroductionViewModel.swift
...erience(工作经验)/ViewModel/YHWorkIntroductionViewModel.swift
+1
-1
No files found.
galaxy/galaxy/Classes/Modules/IntelligentService(服务中心)/MySignature(我的签字)/V/YHCommonAlertView.swift
View file @
4b7225bd
...
...
@@ -39,6 +39,21 @@ class YHCommonAlertView: UIView {
self
.
messageLabel
.
text
=
message
self
.
disAgressButton
.
setTitle
(
leftButtonString
,
for
:
.
normal
)
self
.
agreeButton
.
setTitle
(
rightButtonString
,
for
:
.
normal
)
if
title
?
.
count
==
0
||
title
==
nil
{
centerView
.
snp
.
remakeConstraints
{
make
in
make
.
center
.
equalToSuperview
()
make
.
width
.
equalTo
(
299
)
make
.
height
.
equalTo
(
164
)
}
messageLabel
.
snp
.
remakeConstraints
{
make
in
make
.
left
.
equalTo
(
22
)
make
.
right
.
equalTo
(
-
22
)
make
.
height
.
equalTo
(
42
)
make
.
top
.
equalTo
(
40
)
}
}
}
required
init
?(
coder
:
NSCoder
)
{
...
...
galaxy/galaxy/Classes/Modules/IntelligentService(服务中心)/ServiceProcess(我的信息流程)/MainApplicantInformation(主申请人信息)/VM/YHMainApplicantInformationViewModel.swift
View file @
4b7225bd
...
...
@@ -30,7 +30,11 @@ class YHMainApplicantInformationViewModel: YHBaseViewModel {
var
string
=
""
let
array
=
mainModel
.
address
.
area
for
item
in
array
{
string
=
string
+
item
if
string
.
count
!=
0
{
string
=
string
+
"/"
+
item
}
else
{
string
=
string
+
item
}
}
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
:
"请填写小区、楼栋、单元室等"
)
...
...
@@ -95,7 +99,11 @@ class YHMainApplicantInformationViewModel: YHBaseViewModel {
var
string
=
""
let
array
=
mainModel
.
birth_place
.
area
for
item
in
array
{
string
=
string
+
item
if
string
.
count
!=
0
{
string
=
string
+
"/"
+
item
}
else
{
string
=
string
+
item
}
}
let
item5
=
YHItemModel
(
id
:
.
id26
,
isNeed
:
true
,
title
:
"出生城市"
,
isUserKeyBoard
:
false
,
prompts
:
"请选择"
,
message
:
string
,
type
:
.
address
,
isShowPrompts
:
isShowPrompt
,
alertMessage
:
"请选择出生城市;"
)
...
...
galaxy/galaxy/Classes/Modules/IntelligentService(服务中心)/ServiceProcess(我的信息流程)/WorkExperience(工作经验)/C/YHWorkExperienceListViewController.swift
View file @
4b7225bd
...
...
@@ -118,6 +118,15 @@ class YHWorkExperienceListViewController: YHBaseViewController {
}
})
}
func
showDeleteAlert
(
_
model
:
YHWorkItemListModel
)
{
YHCommonAlertView
.
show
(
""
,
"您确定要删除这份工作经验吗?"
,
"取消"
,
"确认"
)
{
self
.
viewModel
?
.
requestDeleteWorkExperience
(
"
\(
model
.
id
??
0
)
"
,
callBackBlock
:
{[
weak
self
]
success
,
error
in
guard
let
self
=
self
else
{
return
}
self
.
getData
()
})
}
}
}
extension
YHWorkExperienceListViewController
:
UITableViewDelegate
,
UITableViewDataSource
{
...
...
@@ -148,10 +157,7 @@ extension YHWorkExperienceListViewController: UITableViewDelegate, UITableViewDa
}
cell
.
deleteBlock
=
{[
weak
self
]
model
in
guard
let
self
=
self
else
{
return
}
self
.
viewModel
?
.
requestDeleteWorkExperience
(
"
\(
model
.
id
??
0
)
"
,
callBackBlock
:
{[
weak
self
]
success
,
error
in
guard
let
self
=
self
else
{
return
}
self
.
getData
()
})
self
.
showDeleteAlert
(
model
)
}
cell
.
isMoreBlock
=
{[
weak
self
]
isMore
in
guard
let
self
=
self
else
{
return
}
...
...
galaxy/galaxy/Classes/Modules/IntelligentService(服务中心)/ServiceProcess(我的信息流程)/WorkExperience(工作经验)/C/YHWorkExperienceViewController.swift
View file @
4b7225bd
...
...
@@ -198,6 +198,30 @@ class YHWorkExperienceViewController: YHBaseViewController {
}
}
func
showDeleteAlert
(
_
model
:
YHWorkExperienceProjectModel
)
{
YHCommonAlertView
.
show
(
""
,
"确定要删除该项目介绍吗?"
,
"取消"
,
"确认"
)
{[
weak
self
]
in
guard
let
self
=
self
else
{
return
}
self
.
viewModel
?
.
requestDeleteWorkExperienceProject
(
"
\(
model
.
id
??
0
)
"
,
callBackBlock
:
{[
weak
self
]
success
,
error
in
guard
let
self
=
self
else
{
return
}
self
.
getData
()
})
}
}
func
showDeleteAlert
(
_
model
:
YHWorkExperienceFileModel
)
{
YHCommonAlertView
.
show
(
""
,
"确定要删除吗?"
,
"取消"
,
"确认"
)
{[
weak
self
]
in
guard
let
self
=
self
else
{
return
}
for
i
in
0
..<
(
self
.
fileDataSource
?
.
count
??
0
)
{
let
data
=
self
.
fileDataSource
?[
i
]
if
data
?
.
fileName
==
model
.
fileName
{
self
.
fileDataSource
?
.
remove
(
at
:
i
)
self
.
tableView
.
reloadData
()
self
.
viewModel
.
mainModel
.
file
=
self
.
fileDataSource
??
[]
}
}
}
}
deinit
{
NotificationCenter
.
default
.
removeObserver
(
self
)
}
...
...
@@ -323,10 +347,7 @@ extension YHWorkExperienceViewController: UITableViewDelegate, UITableViewDataSo
}
cell
.
deleteBlock
=
{[
weak
self
]
model
in
guard
let
self
=
self
else
{
return
}
self
.
viewModel
?
.
requestDeleteWorkExperienceProject
(
"
\(
model
.
id
??
0
)
"
,
callBackBlock
:
{[
weak
self
]
success
,
error
in
guard
let
self
=
self
else
{
return
}
self
.
getData
()
})
self
.
showDeleteAlert
(
model
)
}
cell
.
isMoreBlock
=
{[
weak
self
]
isMore
in
guard
let
self
=
self
else
{
return
}
...
...
@@ -380,15 +401,7 @@ extension YHWorkExperienceViewController: UITableViewDelegate, UITableViewDataSo
cell
.
experienceListBlock
=
{[
weak
self
]
model
,
type
in
guard
let
self
=
self
else
{
return
}
if
type
==
.
delete
{
for
i
in
0
..<
(
self
.
fileDataSource
?
.
count
??
0
)
{
let
data
=
self
.
fileDataSource
?[
i
]
if
data
?
.
fileName
==
model
.
fileName
{
self
.
fileDataSource
?
.
remove
(
at
:
i
)
self
.
tableView
.
reloadData
()
self
.
viewModel
.
mainModel
.
file
=
self
.
fileDataSource
??
[]
return
}
}
self
.
showDeleteAlert
(
model
)
}
else
{
let
vc
=
YHImageViewController
()
vc
.
imgString
=
model
.
fileUrl
...
...
@@ -435,15 +448,7 @@ extension YHWorkExperienceViewController: UITableViewDelegate, UITableViewDataSo
cell
.
experienceListBlock
=
{[
weak
self
]
model
,
type
in
guard
let
self
=
self
else
{
return
}
if
type
==
.
delete
{
for
i
in
0
..<
(
self
.
fileDataSource
?
.
count
??
0
)
{
let
data
=
self
.
fileDataSource
?[
i
]
if
data
?
.
fileName
==
model
.
fileName
{
self
.
fileDataSource
?
.
remove
(
at
:
i
)
self
.
tableView
.
reloadData
()
self
.
viewModel
.
mainModel
.
file
=
self
.
fileDataSource
??
[]
return
}
}
self
.
showDeleteAlert
(
model
)
}
else
{
let
vc
=
YHImageViewController
()
vc
.
imgString
=
model
.
fileUrl
...
...
galaxy/galaxy/Classes/Modules/IntelligentService(服务中心)/ServiceProcess(我的信息流程)/WorkExperience(工作经验)/C/YHWorkIntroductionViewController.swift
View file @
4b7225bd
...
...
@@ -100,7 +100,7 @@ class YHWorkIntroductionViewController: YHBaseViewController {
make
.
top
.
equalTo
(
k_Height_NavigationtBarAndStatuBar
+
52
)
make
.
left
.
equalTo
(
117
)
make
.
height
.
equalTo
(
51
)
make
.
width
.
equalTo
(
8
0
)
make
.
width
.
equalTo
(
9
0
)
}
let
startButton
=
{
...
...
@@ -113,7 +113,7 @@ class YHWorkIntroductionViewController: YHBaseViewController {
make
.
top
.
equalTo
(
k_Height_NavigationtBarAndStatuBar
+
52
)
make
.
left
.
equalTo
(
117
)
make
.
height
.
equalTo
(
51
)
make
.
width
.
equalTo
(
8
0
)
make
.
width
.
equalTo
(
9
0
)
}
endTextField
=
{
...
...
@@ -130,7 +130,7 @@ class YHWorkIntroductionViewController: YHBaseViewController {
make
.
top
.
equalTo
(
k_Height_NavigationtBarAndStatuBar
+
52
)
make
.
right
.
equalTo
(
-
18
)
make
.
height
.
equalTo
(
51
)
make
.
width
.
equalTo
(
8
0
)
make
.
width
.
equalTo
(
9
0
)
}
let
endButton
=
{
...
...
@@ -143,7 +143,7 @@ class YHWorkIntroductionViewController: YHBaseViewController {
make
.
top
.
equalTo
(
k_Height_NavigationtBarAndStatuBar
+
52
)
make
.
right
.
equalTo
(
-
18
)
make
.
height
.
equalTo
(
51
)
make
.
width
.
equalTo
(
8
0
)
make
.
width
.
equalTo
(
9
0
)
}
let
lineView
=
UIView
()
...
...
@@ -276,17 +276,21 @@ class YHWorkIntroductionViewController: YHBaseViewController {
}
viewModel
?
.
saveWorkProjectDetail
(
workModel
??
YHWorkExperienceDetailModel
(),
projectModel
:
dataSource
,
callBackBlock
:
{[
weak
self
]
success
,
error
in
guard
let
self
=
self
else
{
return
}
if
let
block
=
self
.
saveBlock
{
block
()
if
success
{
if
let
block
=
self
.
saveBlock
{
block
()
}
self
.
navigationController
?
.
popViewController
(
animated
:
true
)
}
else
{
YHHUD
.
flash
(
message
:
error
?
.
errorMsg
??
""
)
}
self
.
navigationController
?
.
popViewController
(
animated
:
true
)
})
}
@objc
func
startClick
()
{
view
.
endEditing
(
true
)
YHDatePickView
.
show
(
type
:
.
yyyymmdd
,
title
:
"请选择开始时间"
)
{
date
in
if
date
>
self
.
dataSource
.
project_end_time
??
""
{
if
date
>
self
.
dataSource
.
project_end_time
??
""
&&
self
.
dataSource
.
project_end_time
?
.
count
??
0
>
0
{
self
.
startTextField
.
text
=
""
self
.
dataSource
.
project_start_time
=
""
YHHUD
.
flash
(
message
:
"开始时间不能晚于结束时间"
)
...
...
galaxy/galaxy/Classes/Modules/IntelligentService(服务中心)/ServiceProcess(我的信息流程)/WorkExperience(工作经验)/V/YHWorkIntroductionItemView.swift
View file @
4b7225bd
...
...
@@ -45,7 +45,7 @@ class YHWorkIntroductionItemView: UIView {
titleLabel
.
snp
.
makeConstraints
{
make
in
make
.
left
.
equalToSuperview
()
make
.
top
.
equalTo
(
16
)
make
.
width
.
equalTo
(
20
0
)
make
.
right
.
equalTo
(
-
3
0
)
make
.
height
.
equalTo
(
20
)
}
...
...
galaxy/galaxy/Classes/Modules/IntelligentService(服务中心)/ServiceProcess(我的信息流程)/WorkExperience(工作经验)/ViewModel/YHWorkExperienceViewModel.swift
View file @
4b7225bd
...
...
@@ -26,7 +26,11 @@ class YHWorkExperienceViewModel: YHBaseViewModel {
var
string
=
""
let
array
=
mainModel
.
location
.
area
for
item
in
array
{
string
=
string
+
item
if
string
.
count
!=
0
{
string
=
string
+
"/"
+
item
}
else
{
string
=
string
+
item
}
}
let
item5
=
YHWorkExperienceModel
(
id
:
.
id6
,
isNeed
:
true
,
title
:
"工作城市"
,
isUserKeyBoard
:
false
,
prompts
:
"请选择"
,
message
:
string
,
type
:
.
address
,
isShowPrompts
:
isShowPrompt
,
alertMessage
:
"请选择工作国家/地区"
)
let
item55
=
YHWorkExperienceModel
(
id
:
.
id7
,
isNeed
:
true
,
title
:
"工作城市"
,
isUserKeyBoard
:
true
,
prompts
:
"请输入"
,
message
:
mainModel
.
location
.
foreign
,
isShowPrompts
:
isShowPrompt
,
alertMessage
:
"请输入工作国家/地区"
)
...
...
@@ -84,7 +88,7 @@ class YHWorkExperienceViewModel: YHBaseViewModel {
case
.
id8
:
// 职位
mainModel
.
position
=
item
.
message
??
""
case
.
id9
:
// 入职年月
if
item
.
message
??
""
>
mainModel
.
departure_time
{
if
item
.
message
??
""
>
mainModel
.
departure_time
&&
mainModel
.
departure_time
.
count
!=
0
{
mainModel
.
entry_time
=
""
if
item
.
message
!=
""
{
YHHUD
.
flash
(
message
:
"入职日期不能晚于离职日期"
)
...
...
galaxy/galaxy/Classes/Modules/IntelligentService(服务中心)/ServiceProcess(我的信息流程)/WorkExperience(工作经验)/ViewModel/YHWorkIntroductionViewModel.swift
View file @
4b7225bd
...
...
@@ -39,7 +39,7 @@ class YHWorkIntroductionViewModel: YHBaseViewModel {
}
// 0保存 1下一步
func
saveWorkProjectDetail
(
_
workModel
:
YHWorkExperienceDetailModel
,
projectModel
:
YHWorkExperienceProjectModel
,
callBackBlock
:
@escaping
(
_
success
:
Bool
?
,
_
error
:
YHErrorModel
?)
->
())
{
func
saveWorkProjectDetail
(
_
workModel
:
YHWorkExperienceDetailModel
,
projectModel
:
YHWorkExperienceProjectModel
,
callBackBlock
:
@escaping
(
_
success
:
Bool
,
_
error
:
YHErrorModel
?)
->
())
{
let
params
:
[
String
:
Any
]
=
[
"id"
:
projectModel
.
id
??
0
,
"order_id"
:
workModel
.
order_id
,
"work_id"
:
workModel
.
id
,
...
...
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