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
d34af22c
Commit
d34af22c
authored
Oct 15, 2024
by
Steven杜宇
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
// 信息确认
parent
8809d6f8
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
224 additions
and
15 deletions
+224
-15
project.pbxproj
galaxy/galaxy.xcodeproj/project.pbxproj
+4
-0
YHResignInfoConfirmInfoListModel.swift
...oConfirm(续签信息确认)/M/YHResignInfoConfirmInfoListModel.swift
+25
-3
YHResignFamilyInfoListCell.swift
...ignInfoConfirm(续签信息确认)/V/YHResignFamilyInfoListCell.swift
+7
-3
YHResignInfoItemView.swift
...签)/ResignInfoConfirm(续签信息确认)/V/YHResignInfoItemView.swift
+25
-1
YHResignInfoValidTimeItemView.swift
...InfoConfirm(续签信息确认)/V/YHResignInfoValidTimeItemView.swift
+155
-0
YHResignInfoConfirmIViewModel.swift
...nfoConfirm(续签信息确认)/VM/YHResignInfoConfirmIViewModel.swift
+8
-8
No files found.
galaxy/galaxy.xcodeproj/project.pbxproj
View file @
d34af22c
...
...
@@ -200,6 +200,7 @@
044E31CB2CBD336800500F8E
/* YHResignInfoConfirmModifyViewController.swift in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
044E31CA2CBD336800500F8E
/* YHResignInfoConfirmModifyViewController.swift */
;
};
044E31CD2CBE3A7100500F8E
/* YHResignFamilyInfoListCell.swift in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
044E31CC2CBE3A7100500F8E
/* YHResignFamilyInfoListCell.swift */
;
};
044E31CF2CBE3BCC00500F8E
/* YHResignInfoItemView.swift in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
044E31CE2CBE3BCC00500F8E
/* YHResignInfoItemView.swift */
;
};
044E31D12CBE65BA00500F8E
/* YHResignInfoValidTimeItemView.swift in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
044E31D02CBE65BA00500F8E
/* YHResignInfoValidTimeItemView.swift */
;
};
044EE2232C8FE1D000A2FE3A
/* YHServiceCenterViewController.swift in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
044EE2222C8FE1D000A2FE3A
/* YHServiceCenterViewController.swift */
;
};
044EE2252C90138000A2FE3A
/* YHServerCenterHoldViewController.swift in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
044EE2242C90138000A2FE3A
/* YHServerCenterHoldViewController.swift */
;
};
044EE2272C91367800A2FE3A
/* YHServiceStepThreeSectionView.swift in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
044EE2262C91367800A2FE3A
/* YHServiceStepThreeSectionView.swift */
;
};
...
...
@@ -1151,6 +1152,7 @@
044E31CA2CBD336800500F8E
/* YHResignInfoConfirmModifyViewController.swift */
=
{
isa
=
PBXFileReference
;
lastKnownFileType
=
sourcecode.swift
;
path
=
YHResignInfoConfirmModifyViewController.swift
;
sourceTree
=
"<group>"
;
};
044E31CC2CBE3A7100500F8E
/* YHResignFamilyInfoListCell.swift */
=
{
isa
=
PBXFileReference
;
lastKnownFileType
=
sourcecode.swift
;
path
=
YHResignFamilyInfoListCell.swift
;
sourceTree
=
"<group>"
;
};
044E31CE2CBE3BCC00500F8E
/* YHResignInfoItemView.swift */
=
{
isa
=
PBXFileReference
;
lastKnownFileType
=
sourcecode.swift
;
path
=
YHResignInfoItemView.swift
;
sourceTree
=
"<group>"
;
};
044E31D02CBE65BA00500F8E
/* YHResignInfoValidTimeItemView.swift */
=
{
isa
=
PBXFileReference
;
lastKnownFileType
=
sourcecode.swift
;
path
=
YHResignInfoValidTimeItemView.swift
;
sourceTree
=
"<group>"
;
};
044EE2222C8FE1D000A2FE3A
/* YHServiceCenterViewController.swift */
=
{
isa
=
PBXFileReference
;
lastKnownFileType
=
sourcecode.swift
;
path
=
YHServiceCenterViewController.swift
;
sourceTree
=
"<group>"
;
};
044EE2242C90138000A2FE3A
/* YHServerCenterHoldViewController.swift */
=
{
isa
=
PBXFileReference
;
lastKnownFileType
=
sourcecode.swift
;
path
=
YHServerCenterHoldViewController.swift
;
sourceTree
=
"<group>"
;
};
044EE2262C91367800A2FE3A
/* YHServiceStepThreeSectionView.swift */
=
{
isa
=
PBXFileReference
;
lastKnownFileType
=
sourcecode.swift
;
path
=
YHServiceStepThreeSectionView.swift
;
sourceTree
=
"<group>"
;
};
...
...
@@ -3561,6 +3563,7 @@
04912F632CB6885D00CC3105
/* YHResignFamilyMemberInfoCell.swift */
,
044E31CC2CBE3A7100500F8E
/* YHResignFamilyInfoListCell.swift */
,
044E31CE2CBE3BCC00500F8E
/* YHResignInfoItemView.swift */
,
044E31D02CBE65BA00500F8E
/* YHResignInfoValidTimeItemView.swift */
,
);
path
=
V
;
sourceTree
=
"<group>"
;
...
...
@@ -5364,6 +5367,7 @@
A58AC09D2BABD59600A30FA9
/* YHFileListModel.swift in Sources */
,
045EEEFF2B9F171A0022A143
/* YHSaveAndSubmitView.swift in Sources */
,
045EEF0E2B9F171A0022A143
/* YHBasicInfoFillView.swift in Sources */
,
044E31D12CBE65BA00500F8E
/* YHResignInfoValidTimeItemView.swift in Sources */
,
04B4B8D72C8AE77C00ED82BC
/* YHButlerServiceMessageHandler.swift in Sources */
,
04AF514E2BEB585C00009E3A
/* YHVideoPlayerVC.swift in Sources */
,
04CE1ADA2C2AD91F001CB80A
/* YHActivityTravelitemView.swift in Sources */
,
...
...
galaxy/galaxy/Classes/Modules/IntelligentService(服务中心)/Resign(续签)/ResignInfoConfirm(续签信息确认)/M/YHResignInfoConfirmInfoListModel.swift
View file @
d34af22c
...
...
@@ -59,31 +59,53 @@ class YHResignInfoConfirmFamilyInfoModel: SmartCodable {
class
YHResignConfirmIdentityModel
:
SmartCodable
{
var
id
:
Int
=
0
var
type
:
Int
=
-
1
var
name
:
String
=
""
var
number
:
String
=
""
var
begin
:
String
=
""
var
end
:
String
=
""
var
deadline
:
String
=
""
required
init
()
{
}
func
isValidDateEnough
()
->
Bool
{
if
self
.
end
.
isEmpty
||
self
.
deadline
.
isEmpty
{
return
true
}
let
format
=
DateFormatter
()
format
.
dateFormat
=
"yyyy-MM-dd"
guard
let
endDate
=
format
.
date
(
from
:
self
.
end
)
else
{
return
true
}
guard
let
deadDate
=
format
.
date
(
from
:
self
.
deadline
)
else
{
return
true
}
return
endDate
.
timeIntervalSince1970
>=
deadDate
.
timeIntervalSince1970
}
enum
CodingKeys
:
String
,
CodingKey
{
case
id
=
"id"
case
type
=
"type"
case
name
=
"name"
case
number
=
"number"
case
begin
=
"begin"
case
end
=
"end"
case
deadline
=
"deadline"
}
init
(
type
:
Int
,
name
:
String
,
number
:
String
,
begin
:
String
,
end
:
String
)
{
init
(
id
:
Int
,
type
:
Int
,
name
:
String
,
number
:
String
,
begin
:
String
,
end
:
String
,
deadline
:
String
)
{
self
.
id
=
id
self
.
type
=
type
self
.
name
=
name
self
.
number
=
number
self
.
begin
=
begin
self
.
end
=
end
self
.
deadline
=
deadline
}
}
...
...
galaxy/galaxy/Classes/Modules/IntelligentService(服务中心)/Resign(续签)/ResignInfoConfirm(续签信息确认)/V/YHResignFamilyInfoListCell.swift
View file @
d34af22c
...
...
@@ -31,6 +31,7 @@ enum YHResignFamilyInfoActionType: Int {
case
none
=
0
case
edit
=
1
// 输入框编辑
case
select
=
2
// 弹出弹窗选择
case
changeValidTime
// 有效期不足去处理
}
class
YHResignFamilyInfoOption
{
...
...
@@ -230,9 +231,9 @@ class YHResignFamilyInfoListCell: UITableViewCell {
var
lastItemView
:
UIView
?
=
nil
for
(
index
,
item
)
in
items
.
enumerated
()
{
var
itemView
:
UIView
?
=
YHResignInfoItemView
(
frame
:
.
zero
)
// if item.action == .choic
e {
// itemView = YHInfoOption
View(frame: .zero)
//
}
if
item
.
id
==
.
certificateValidTim
e
{
itemView
=
YHResignInfoValidTimeItem
View
(
frame
:
.
zero
)
}
if
let
itemView
=
itemView
as?
YHResignInfoItemView
{
itemsContentView
.
addSubview
(
itemView
)
itemView
.
updateItem
(
item
,
familyInfo
:
familyInfo
)
...
...
@@ -254,6 +255,9 @@ class YHResignFamilyInfoListCell: UITableViewCell {
}
}
}
}
else
if
let
itemView
=
itemView
as?
YHResignInfoValidTimeItemView
{
itemsContentView
.
addSubview
(
itemView
)
itemView
.
updateItem
(
item
,
familyInfo
:
familyInfo
)
}
if
let
itemView
=
itemView
{
...
...
galaxy/galaxy/Classes/Modules/IntelligentService(服务中心)/Resign(续签)/ResignInfoConfirm(续签信息确认)/V/YHResignInfoItemView.swift
View file @
d34af22c
...
...
@@ -299,16 +299,40 @@ extension YHResignInfoItemView: UITextFieldDelegate {
func
textField
(
_
textField
:
UITextField
,
shouldChangeCharactersIn
range
:
NSRange
,
replacementString
string
:
String
)
->
Bool
{
let
newText
=
(
textField
.
text
!
as
NSString
)
.
replacingCharacters
(
in
:
range
,
with
:
string
)
var
newText
=
(
textField
.
text
!
as
NSString
)
.
replacingCharacters
(
in
:
range
,
with
:
string
)
printLog
(
"
\(
newText
)
"
)
if
self
.
item
.
id
==
.
mainApplicantName
||
self
.
item
.
id
==
.
spouseName
||
self
.
item
.
id
==
.
childName
{
if
newText
.
count
>
30
{
// 上限30个字符
newText
=
String
(
newText
.
prefix
(
30
))
textField
.
text
=
newText
textFieldChanged
(
textField
:
textField
)
return
false
}
// 名称编辑时需防抖请求拼音
debounceTimer
?
.
invalidate
()
debounceTimer
=
Timer
.
scheduledTimer
(
withTimeInterval
:
1.0
,
repeats
:
false
)
{
[
weak
self
]
_
in
self
?
.
updateNamePinYin
()
}
}
if
self
.
item
.
id
==
.
occupation
{
// 职业
if
newText
.
count
>
30
{
// 上限30个字符
newText
=
String
(
newText
.
prefix
(
30
))
textField
.
text
=
newText
textFieldChanged
(
textField
:
textField
)
return
false
}
}
if
self
.
item
.
id
==
.
hongkongAddress
{
// 职业
if
newText
.
count
>
30
{
// 上限30个字符
newText
=
String
(
newText
.
prefix
(
30
))
textField
.
text
=
newText
textFieldChanged
(
textField
:
textField
)
return
false
}
}
return
true
}
...
...
galaxy/galaxy/Classes/Modules/IntelligentService(服务中心)/Resign(续签)/ResignInfoConfirm(续签信息确认)/V/YHResignInfoValidTimeItemView.swift
0 → 100644
View file @
d34af22c
//
// YHResignInfoValidTimeItemView.swift
// galaxy
//
// Created by edy on 2024/10/15.
// Copyright © 2024 https://www.galaxy-immi.com. All rights reserved.
//
import
UIKit
import
AttributedString
// 文字编辑和选择弹窗时使用
class
YHResignInfoValidTimeItemView
:
UIView
{
private
var
debounceTimer
:
Timer
?
var
item
:
YHResignFamilyInfoItem
=
YHResignFamilyInfoItem
()
var
faimilyInfo
=
YHResignInfoConfirmFamilyModel
()
let
viewModel
=
YHResignInfoConfirmViewModel
()
lazy
var
lineView
:
UIView
=
{
let
view
=
UIView
()
view
.
backgroundColor
=
.
separatorColor
return
view
}()
lazy
var
titleLabel
:
UILabel
=
{
let
label
=
UILabel
()
label
.
font
=
UIFont
.
PFSC_R
(
ofSize
:
14
)
return
label
}()
lazy
var
detailLabel
:
UILabel
=
{
let
label
=
UILabel
()
label
.
numberOfLines
=
0
label
.
font
=
UIFont
.
PFSC_M
(
ofSize
:
14
)
label
.
textColor
=
UIColor
.
mainTextColor
return
label
}()
lazy
var
grayContentView
:
UIView
=
{
let
view
=
UIView
()
view
.
layer
.
cornerRadius
=
kCornerRadius6
view
.
backgroundColor
=
UIColor
(
hex
:
0xF8F9FB
)
view
.
clipsToBounds
=
true
let
errorTipsLabel
=
UILabel
()
errorTipsLabel
.
font
=
UIFont
.
PFSC_R
(
ofSize
:
12
)
errorTipsLabel
.
textColor
=
UIColor
.
failColor
errorTipsLabel
.
text
=
"证件有效期不足"
view
.
addSubview
(
errorTipsLabel
)
let
arrowImgV
=
UIImageView
(
image
:
UIImage
(
named
:
"file_list_right_arrow_blue"
))
view
.
addSubview
(
arrowImgV
)
let
handleLabel
=
UILabel
()
handleLabel
.
font
=
UIFont
.
PFSC_R
(
ofSize
:
12
)
handleLabel
.
textColor
=
UIColor
.
brandMainColor
handleLabel
.
textAlignment
=
.
right
handleLabel
.
text
=
"去处理"
view
.
addSubview
(
handleLabel
)
errorTipsLabel
.
snp
.
makeConstraints
{
make
in
make
.
left
.
equalTo
(
16
)
make
.
centerY
.
equalToSuperview
()
make
.
height
.
equalTo
(
18
)
}
arrowImgV
.
snp
.
makeConstraints
{
make
in
make
.
centerY
.
equalToSuperview
()
make
.
width
.
height
.
equalTo
(
20
)
make
.
right
.
equalTo
(
-
16
)
}
handleLabel
.
snp
.
makeConstraints
{
make
in
make
.
right
.
equalTo
(
arrowImgV
.
snp
.
left
)
.
offset
(
0
)
make
.
centerY
.
equalToSuperview
()
make
.
height
.
equalTo
(
18
)
}
return
view
}()
override
init
(
frame
:
CGRect
)
{
super
.
init
(
frame
:
frame
)
createUI
()
}
required
init
?(
coder
:
NSCoder
)
{
fatalError
(
"init(coder:) has not been implemented"
)
}
func
createUI
()
{
self
.
addSubview
(
lineView
)
self
.
addSubview
(
titleLabel
)
self
.
addSubview
(
detailLabel
)
self
.
addSubview
(
grayContentView
)
lineView
.
snp
.
makeConstraints
{
make
in
make
.
left
.
right
.
top
.
equalToSuperview
()
make
.
height
.
equalTo
(
0.5
)
}
titleLabel
.
snp
.
makeConstraints
{
make
in
make
.
top
.
equalTo
(
16
)
make
.
left
.
equalTo
(
0
)
make
.
height
.
equalTo
(
20
)
make
.
width
.
equalTo
(
122
)
}
detailLabel
.
snp
.
makeConstraints
{
make
in
make
.
top
.
equalTo
(
16
)
make
.
left
.
equalTo
(
titleLabel
.
snp
.
right
)
make
.
right
.
equalTo
(
-
18
)
}
grayContentView
.
snp
.
makeConstraints
{
make
in
make
.
left
.
right
.
equalToSuperview
()
make
.
top
.
equalTo
(
detailLabel
.
snp
.
bottom
)
.
offset
(
16
)
make
.
bottom
.
equalTo
(
-
16
)
make
.
height
.
equalTo
(
42
)
}
}
func
updateItem
(
_
item
:
YHResignFamilyInfoItem
,
familyInfo
:
YHResignInfoConfirmFamilyModel
)
{
self
.
item
=
item
self
.
faimilyInfo
=
familyInfo
// 标题
var
title
:
ASAttributedString
=
.
init
(
"
\(
item
.
title
)
"
,
.
font
(
UIFont
.
PFSC_R
(
ofSize
:
14
)),
.
foreground
(
UIColor
.
mainTextColor
))
// 是否必填
if
item
.
isMust
{
let
mustTag
:
ASAttributedString
=
.
init
(
"*"
,
.
font
(
UIFont
.
PFSC_R
(
ofSize
:
14
)),
.
foreground
(
UIColor
.
failColor
))
title
=
mustTag
+
title
}
titleLabel
.
attributed
.
text
=
title
detailLabel
.
text
=
item
.
value
// 是否隐藏有效期不足灰色视图
var
isNeedHiddenGrayView
=
true
if
let
identity
=
familyInfo
.
identity
{
isNeedHiddenGrayView
=
identity
.
isValidDateEnough
()
}
grayContentView
.
isHidden
=
isNeedHiddenGrayView
grayContentView
.
snp
.
updateConstraints
{
make
in
make
.
top
.
equalTo
(
detailLabel
.
snp
.
bottom
)
.
offset
(
isNeedHiddenGrayView
?
0
:
16
)
make
.
height
.
equalTo
(
isNeedHiddenGrayView
?
0
:
42
)
}
self
.
setNeedsLayout
()
self
.
layoutIfNeeded
()
}
}
galaxy/galaxy/Classes/Modules/IntelligentService(服务中心)/Resign(续签)/ResignInfoConfirm(续签信息确认)/VM/YHResignInfoConfirmIViewModel.swift
View file @
d34af22c
...
...
@@ -270,14 +270,16 @@ extension YHResignInfoConfirmViewModel {
var
resultArr
=
[
YHResignFamilyInfoItem
]()
guard
let
identity
=
model
.
identity
else
{
return
[]
}
// 申报旅行证件
let
travelCerInfo
=
YHResignFamilyInfoItem
(
id
:
.
travelCertificateType
,
action
:
.
select
,
isMust
:
false
,
title
:
"申报旅行证件"
,
value
:
model
.
identity
?
.
name
??
""
,
value
:
identity
.
name
,
previousTitle
:
"原申报旅行证件"
,
previousValue
:
model
.
identity
?
.
name
??
""
,
previousValue
:
identity
.
name
,
isEditMode
:
false
,
isShowPreviousInfo
:
false
)
resultArr
.
append
(
travelCerInfo
)
...
...
@@ -287,17 +289,15 @@ extension YHResignInfoConfirmViewModel {
action
:
.
edit
,
isMust
:
false
,
title
:
"证件号"
,
value
:
model
.
identity
?
.
number
??
""
,
value
:
identity
.
number
,
previousTitle
:
"原证件号"
,
previousValue
:
model
.
identity
?
.
number
??
""
,
previousValue
:
identity
.
number
,
isEditMode
:
false
,
isShowPreviousInfo
:
false
)
resultArr
.
append
(
cerIdInfo
)
// 有效期
let
validStartTime
=
model
.
identity
?
.
begin
??
""
let
validEndTime
=
model
.
identity
?
.
end
??
""
let
validTime
=
"
\(
validStartTime
)
~
\(
validEndTime
)
"
let
validTime
=
"
\(
identity
.
begin
)
~
\(
identity
.
end
)
"
let
validTimeInfo
=
YHResignFamilyInfoItem
(
id
:
.
certificateValidTime
,
action
:
.
edit
,
isMust
:
false
,
...
...
@@ -308,7 +308,7 @@ extension YHResignInfoConfirmViewModel {
isEditMode
:
false
,
isShowPreviousInfo
:
false
)
resultArr
.
append
(
validTimeInfo
)
return
resultArr
}
}
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