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
df3949cc
Commit
df3949cc
authored
Mar 01, 2024
by
pete谢兆麟
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
字段校验
parent
8d3e8913
Changes
4
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
43 additions
and
12 deletions
+43
-12
YHMainApplicantInformationViewController.swift
...(主申请人信息)/C/YHMainApplicantInformationViewController.swift
+19
-10
YHItemModel.swift
...(流程)/MainApplicantInformation(主申请人信息)/M/YHItemModel.swift
+3
-1
YHItemView.swift
...s(流程)/MainApplicantInformation(主申请人信息)/V/YHItemView.swift
+21
-1
YHMainApplicantInformationViewModel.swift
...tion(主申请人信息)/VM/YHMainApplicantInformationViewModel.swift
+0
-0
No files found.
galaxy/galaxy/Classes/Modules/IntelligentService(服务中心)/ServiceProcess(流程)/MainApplicantInformation(主申请人信息)/C/YHMainApplicantInformationViewController.swift
View file @
df3949cc
...
...
@@ -93,27 +93,36 @@ class YHMainApplicantInformationViewController: YHBaseViewController {
guard
let
self
=
self
else
{
return
}
if
self
.
viewModel
.
isCanNext
(
self
.
stepView
.
currentIndex
)
{
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
}
self
.
isShowPrompt
=
false
self
.
stepView
.
currentIndex
=
self
.
stepView
.
currentIndex
if
self
.
stepView
.
currentIndex
==
self
.
stepView
.
dataSource
?
.
count
{
YHHUD
.
flash
(
message
:
"提交成功"
)
self
.
navigationController
?
.
popViewController
()
if
let
error
=
error
{
YHHUD
.
flash
(
message
:
error
.
errorMsg
)
}
else
{
self
.
updateDataSource
()
self
.
isShowPrompt
=
false
self
.
stepView
.
currentIndex
=
self
.
stepView
.
currentIndex
if
self
.
stepView
.
currentIndex
==
self
.
stepView
.
dataSource
?
.
count
{
YHHUD
.
flash
(
message
:
"提交成功"
)
self
.
navigationController
?
.
popViewController
()
}
else
{
self
.
updateDataSource
()
}
}
}
}
else
{
self
.
isShowPrompt
=
true
self
.
updateDataSource
()
YHHUD
.
flash
(
message
:
"
请完善信息
"
)
YHHUD
.
flash
(
message
:
"
您还有信息未填写
"
)
}
}
bottom
.
saveBlock
=
{
[
weak
self
]
in
guard
let
self
=
self
else
{
return
}
self
.
viewModel
.
updateMainInformation
(
.
save
,
self
.
orderId
)
{[
weak
self
]
success
in
guard
let
self
=
self
else
{
return
}
self
.
viewModel
.
updateMainInformation
(
.
save
,
self
.
orderId
)
{[
weak
self
]
success
,
error
in
guard
let
_
=
self
else
{
return
}
if
let
error
=
error
{
YHHUD
.
flash
(
message
:
error
.
errorMsg
)
}
else
{
YHHUD
.
flash
(
message
:
"保存成功"
)
}
}
}
return
bottom
...
...
galaxy/galaxy/Classes/Modules/IntelligentService(服务中心)/ServiceProcess(流程)/MainApplicantInformation(主申请人信息)/M/YHItemModel.swift
View file @
df3949cc
...
...
@@ -70,8 +70,9 @@ struct YHItemModel {
var
type
:
YHItemSelectType
?
var
value
:
[
String
]?
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
.
isNeed
=
isNeed
self
.
title
=
title
...
...
@@ -83,6 +84,7 @@ struct YHItemModel {
self
.
type
=
type
self
.
value
=
value
self
.
isShowPrompts
=
isShowPrompts
self
.
alertMessage
=
alertMessage
}
}
...
...
galaxy/galaxy/Classes/Modules/IntelligentService(服务中心)/ServiceProcess(流程)/MainApplicantInformation(主申请人信息)/V/YHItemView.swift
View file @
df3949cc
...
...
@@ -155,7 +155,7 @@ class YHItemView: UIView {
}
messageTextField
.
placeholder
=
dataSource
.
prompts
messageTextField
.
text
=
dataSource
.
message
showPromptLabel
.
text
=
"
\(
dataSource
.
prompts
??
""
)
"
+
"
\(
dataSource
.
title
??
""
)
"
showPromptLabel
.
text
=
dataSource
.
alertMessage
if
dataSource
.
isUserKeyBoard
??
false
{
nextStepImageView
.
isHidden
=
true
centerButton
.
isHidden
=
true
...
...
@@ -381,6 +381,26 @@ extension YHItemView: UITextFieldDelegate {
func
textField
(
_
textField
:
UITextField
,
shouldChangeCharactersIn
range
:
NSRange
,
replacementString
string
:
String
)
->
Bool
{
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
()
data
.
message
=
newText
if
let
block
=
block
{
...
...
galaxy/galaxy/Classes/Modules/IntelligentService(服务中心)/ServiceProcess(流程)/MainApplicantInformation(主申请人信息)/VM/YHMainApplicantInformationViewModel.swift
View file @
df3949cc
This diff is collapsed.
Click to expand it.
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