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
3d3011b2
Commit
3d3011b2
authored
Sep 24, 2024
by
Alex朱枝文
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
在港记录完结
parent
cf6ddc78
Changes
12
Hide whitespace changes
Inline
Side-by-side
Showing
12 changed files
with
398 additions
and
51 deletions
+398
-51
project.pbxproj
galaxy/galaxy.xcodeproj/project.pbxproj
+8
-4
YHHKImmigrationRecordsVC.swift
...migrationRecords(在港记录管理)/C/YHHKImmigrationRecordsVC.swift
+2
-5
YHHKRecordsContentVC.swift
...ngImmigrationRecords(在港记录管理)/C/YHHKRecordsContentVC.swift
+14
-7
YHHKRecordsEditContentVC.swift
...migrationRecords(在港记录管理)/C/YHHKRecordsEditContentVC.swift
+188
-13
YHHKRecordsSummaryVC.swift
...ngImmigrationRecords(在港记录管理)/C/YHHKRecordsSummaryVC.swift
+1
-2
YHHKImmigrationEditRecordModel.swift
...ionRecords(在港记录管理)/M/YHHKImmigrationEditRecordModel.swift
+60
-0
YHHKImmigrationRecordsSingleModel.swift
...Records(在港记录管理)/M/YHHKImmigrationRecordsSingleModel.swift
+1
-0
YHHKRecordsFamilyMembers.swift
...migrationRecords(在港记录管理)/M/YHHKRecordsFamilyMembers.swift
+9
-5
YHHKRecordsPersonnelSelectCell.swift
...ionRecords(在港记录管理)/V/YHHKRecordsPersonnelSelectCell.swift
+2
-2
YHHKRecordsRemarkCell.swift
...gImmigrationRecords(在港记录管理)/V/YHHKRecordsRemarkCell.swift
+23
-0
YHHKRecordsStayingPersonnelCell.swift
...onRecords(在港记录管理)/V/YHHKRecordsStayingPersonnelCell.swift
+34
-13
YHHKImmigrationRecordsViewModel.swift
...nRecords(在港记录管理)/VM/YHHKImmigrationRecordsViewModel.swift
+56
-0
No files found.
galaxy/galaxy.xcodeproj/project.pbxproj
View file @
3d3011b2
...
...
@@ -523,6 +523,8 @@
04CCEDF92CA0FD5F0026EA70
/* YHHKImmigrationRecordsSummaryModel.swift in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
04CCEDF82CA0FD5F0026EA70
/* YHHKImmigrationRecordsSummaryModel.swift */
;
};
04CCEDFB2CA142010026EA70
/* YHHKImmigrationRecordsStatisticsModel.swift in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
04CCEDFA2CA142010026EA70
/* YHHKImmigrationRecordsStatisticsModel.swift */
;
};
04CCEDFD2CA150ED0026EA70
/* YHHKImmigrationRecordsSingleModel.swift in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
04CCEDFC2CA150ED0026EA70
/* YHHKImmigrationRecordsSingleModel.swift */
;
};
04CCEDFF2CA161910026EA70
/* YHHKRecordsFamilyMembers.swift in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
04CCEDFE2CA161910026EA70
/* YHHKRecordsFamilyMembers.swift */
;
};
04CCEE012CA165070026EA70
/* YHHKImmigrationEditRecordModel.swift in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
04CCEE002CA165070026EA70
/* YHHKImmigrationEditRecordModel.swift */
;
};
04CE1ACF2C2AD91F001CB80A
/* YHActivityViewModel.swift in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
04CE1AB72C2AD91F001CB80A
/* YHActivityViewModel.swift */
;
};
04CE1AD02C2AD91F001CB80A
/* YHActivityListModel.swift in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
04CE1AB92C2AD91F001CB80A
/* YHActivityListModel.swift */
;
};
04CE1AD12C2AD91F001CB80A
/* YHActivityTravelModel.swift in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
04CE1ABA2C2AD91F001CB80A
/* YHActivityTravelModel.swift */
;
};
...
...
@@ -598,7 +600,6 @@
04F2436C2C9D9A3A00DF2C74
/* YHResignDocumentCompleteModel.swift in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
04F2436B2C9D9A3A00DF2C74
/* YHResignDocumentCompleteModel.swift */
;
};
04F2436E2C9E5D8D00DF2C74
/* YHResignDocumentSignatureModel.swift in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
04F2436D2C9E5D8D00DF2C74
/* YHResignDocumentSignatureModel.swift */
;
};
04F243702C9E788200DF2C74
/* YHResignDocumentPreviewModel.swift in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
04F2436F2C9E788200DF2C74
/* YHResignDocumentPreviewModel.swift */
;
};
04F243722C9EC90C00DF2C74
/* YHHKRecordsEditPersonnelModel.swift in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
04F243712C9EC90C00DF2C74
/* YHHKRecordsEditPersonnelModel.swift */
;
};
04F243742CA07C6C00DF2C74
/* YHCollectionViewLeftAlignedFlowLayout.swift in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
04F243732CA07C6C00DF2C74
/* YHCollectionViewLeftAlignedFlowLayout.swift */
;
};
04F316442C3568F000024164
/* YHAboutGalaxyViewController.swift in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
04F316432C3568F000024164
/* YHAboutGalaxyViewController.swift */
;
};
04F4B76B2BAA7E1E00D13284
/* YHCertificateTemplateSheetView.swift in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
04F4B76A2BAA7E1E00D13284
/* YHCertificateTemplateSheetView.swift */
;
};
...
...
@@ -1376,6 +1377,8 @@
04CCEDF82CA0FD5F0026EA70
/* YHHKImmigrationRecordsSummaryModel.swift */
=
{
isa
=
PBXFileReference
;
lastKnownFileType
=
sourcecode.swift
;
path
=
YHHKImmigrationRecordsSummaryModel.swift
;
sourceTree
=
"<group>"
;
};
04CCEDFA2CA142010026EA70
/* YHHKImmigrationRecordsStatisticsModel.swift */
=
{
isa
=
PBXFileReference
;
lastKnownFileType
=
sourcecode.swift
;
path
=
YHHKImmigrationRecordsStatisticsModel.swift
;
sourceTree
=
"<group>"
;
};
04CCEDFC2CA150ED0026EA70
/* YHHKImmigrationRecordsSingleModel.swift */
=
{
isa
=
PBXFileReference
;
lastKnownFileType
=
sourcecode.swift
;
path
=
YHHKImmigrationRecordsSingleModel.swift
;
sourceTree
=
"<group>"
;
};
04CCEDFE2CA161910026EA70
/* YHHKRecordsFamilyMembers.swift */
=
{
isa
=
PBXFileReference
;
lastKnownFileType
=
sourcecode.swift
;
path
=
YHHKRecordsFamilyMembers.swift
;
sourceTree
=
"<group>"
;
};
04CCEE002CA165070026EA70
/* YHHKImmigrationEditRecordModel.swift */
=
{
isa
=
PBXFileReference
;
lastKnownFileType
=
sourcecode.swift
;
path
=
YHHKImmigrationEditRecordModel.swift
;
sourceTree
=
"<group>"
;
};
04CE1AB72C2AD91F001CB80A
/* YHActivityViewModel.swift */
=
{
isa
=
PBXFileReference
;
fileEncoding
=
4
;
lastKnownFileType
=
sourcecode.swift
;
path
=
YHActivityViewModel.swift
;
sourceTree
=
"<group>"
;
};
04CE1AB92C2AD91F001CB80A
/* YHActivityListModel.swift */
=
{
isa
=
PBXFileReference
;
fileEncoding
=
4
;
lastKnownFileType
=
sourcecode.swift
;
path
=
YHActivityListModel.swift
;
sourceTree
=
"<group>"
;
};
04CE1ABA2C2AD91F001CB80A
/* YHActivityTravelModel.swift */
=
{
isa
=
PBXFileReference
;
fileEncoding
=
4
;
lastKnownFileType
=
sourcecode.swift
;
path
=
YHActivityTravelModel.swift
;
sourceTree
=
"<group>"
;
};
...
...
@@ -1451,7 +1454,6 @@
04F2436B2C9D9A3A00DF2C74
/* YHResignDocumentCompleteModel.swift */
=
{
isa
=
PBXFileReference
;
lastKnownFileType
=
sourcecode.swift
;
path
=
YHResignDocumentCompleteModel.swift
;
sourceTree
=
"<group>"
;
};
04F2436D2C9E5D8D00DF2C74
/* YHResignDocumentSignatureModel.swift */
=
{
isa
=
PBXFileReference
;
lastKnownFileType
=
sourcecode.swift
;
path
=
YHResignDocumentSignatureModel.swift
;
sourceTree
=
"<group>"
;
};
04F2436F2C9E788200DF2C74
/* YHResignDocumentPreviewModel.swift */
=
{
isa
=
PBXFileReference
;
lastKnownFileType
=
sourcecode.swift
;
path
=
YHResignDocumentPreviewModel.swift
;
sourceTree
=
"<group>"
;
};
04F243712C9EC90C00DF2C74
/* YHHKRecordsEditPersonnelModel.swift */
=
{
isa
=
PBXFileReference
;
lastKnownFileType
=
sourcecode.swift
;
path
=
YHHKRecordsEditPersonnelModel.swift
;
sourceTree
=
"<group>"
;
};
04F243732CA07C6C00DF2C74
/* YHCollectionViewLeftAlignedFlowLayout.swift */
=
{
isa
=
PBXFileReference
;
fileEncoding
=
4
;
lastKnownFileType
=
sourcecode.swift
;
path
=
YHCollectionViewLeftAlignedFlowLayout.swift
;
sourceTree
=
"<group>"
;
};
04F316432C3568F000024164
/* YHAboutGalaxyViewController.swift */
=
{
isa
=
PBXFileReference
;
lastKnownFileType
=
sourcecode.swift
;
path
=
YHAboutGalaxyViewController.swift
;
sourceTree
=
"<group>"
;
};
04F4B76A2BAA7E1E00D13284
/* YHCertificateTemplateSheetView.swift */
=
{
isa
=
PBXFileReference
;
lastKnownFileType
=
sourcecode.swift
;
path
=
YHCertificateTemplateSheetView.swift
;
sourceTree
=
"<group>"
;
};
...
...
@@ -3573,7 +3575,8 @@
04CCEDF82CA0FD5F0026EA70
/* YHHKImmigrationRecordsSummaryModel.swift */
,
04CCEDFA2CA142010026EA70
/* YHHKImmigrationRecordsStatisticsModel.swift */
,
04CCEDFC2CA150ED0026EA70
/* YHHKImmigrationRecordsSingleModel.swift */
,
04F243712C9EC90C00DF2C74
/* YHHKRecordsEditPersonnelModel.swift */
,
04CCEDFE2CA161910026EA70
/* YHHKRecordsFamilyMembers.swift */
,
04CCEE002CA165070026EA70
/* YHHKImmigrationEditRecordModel.swift */
,
);
path
=
M
;
sourceTree
=
"<group>"
;
...
...
@@ -5166,6 +5169,7 @@
A567E5AD2BD7643D00D5D5A0
/* YHSearchInfoHistoryCell.swift in Sources */
,
04CE1ADC2C2AD91F001CB80A
/* YHActivityTipsItemView.swift in Sources */
,
048058312C7DBDC900502CAA
/* YHTravelCertificateTipsView.swift in Sources */
,
04CCEE012CA165070026EA70
/* YHHKImmigrationEditRecordModel.swift in Sources */
,
A5EF21332BA6E030005027E6
/* YHFileListViewController.swift in Sources */
,
045EEF1E2B9F171A0022A143
/* YHBottomNextView.swift in Sources */
,
A567E59E2BD7643D00D5D5A0
/* YHHomePageViewController.swift in Sources */
,
...
...
@@ -5417,6 +5421,7 @@
045EEEF82B9F171A0022A143
/* YHFormItemOnlyDoubleChoiceCell.swift in Sources */
,
A598E9DF2C7CB2C400F84739
/* YHTravelDocsPreparationViewModel.swift in Sources */
,
0480976D2BA158A1000B9DCA
/* YHCertificateListVC.swift in Sources */
,
04CCEDFF2CA161910026EA70
/* YHHKRecordsFamilyMembers.swift in Sources */
,
0430E6522C733D82000511E2
/* YHAdopterIncomeFileTableViewCell.swift in Sources */
,
045EEE8B2B9F171A0022A143
/* YHPreviewMainApplicantInfoViewController.swift in Sources */
,
04256E162C75BD2700A37BA4
/* YHPayMemberSectionItem.swift in Sources */
,
...
...
@@ -5467,7 +5472,6 @@
A5ACE9562B4564F7002C94D2
/* YHBouncesContentView.swift in Sources */
,
A554A5122B99715000EA5973
/* YHConstantArrayData.swift in Sources */
,
045EEE962B9F171A0022A143
/* YHPreviewInfoCertificatePictureItemsView.swift in Sources */
,
04F243722C9EC90C00DF2C74
/* YHHKRecordsEditPersonnelModel.swift in Sources */
,
044EE2362C92916600A2FE3A
/* YHResignCertificateListViewController.swift in Sources */
,
04F243412C9AFBAB00DF2C74
/* YHHKRecordItemDetailType.swift in Sources */
,
04256DDE2C72DA3B00A37BA4
/* YHCertificateAppointViewController.swift in Sources */
,
...
...
galaxy/galaxy/Classes/Modules/IntelligentService(服务中心)/Resign(续签)/HongKongImmigrationRecords(在港记录管理)/C/YHHKImmigrationRecordsVC.swift
View file @
3d3011b2
...
...
@@ -81,8 +81,6 @@ class YHHKImmigrationRecordsVC: YHBaseViewController {
private
let
orderId
:
Int
init
(
orderId
:
Int
)
{
self
.
orderId
=
orderId
// TODO: - 先写死id alex,后续有可以调试账号再改
//self.orderId = 136013
super
.
init
(
nibName
:
nil
,
bundle
:
nil
)
}
...
...
@@ -147,8 +145,7 @@ extension YHHKImmigrationRecordsVC {
}
else
{
printLog
(
"YHHKImmigrationRecordsVC: 请求失败"
)
if
let
errorMsg
=
error
?
.
errorMsg
,
errorMsg
.
count
>
0
{
YHHUD
.
show
(
.
error
(
message
:
errorMsg
))
YHHUD
.
hide
(
afterDelay
:
1
)
YHHUD
.
flash
(
message
:
errorMsg
)
}
}
}
...
...
@@ -161,7 +158,7 @@ extension YHHKImmigrationRecordsVC {
}
@objc
private
func
clickAddNewButton
()
{
let
vc
=
YHHKRecordsEditContentVC
(
pageType
:
.
add
)
let
vc
=
YHHKRecordsEditContentVC
(
orderId
:
orderId
,
pageType
:
.
add
)
navigationController
?
.
pushViewController
(
vc
)
}
}
...
...
galaxy/galaxy/Classes/Modules/IntelligentService(服务中心)/Resign(续签)/HongKongImmigrationRecords(在港记录管理)/C/YHHKRecordsContentVC.swift
View file @
3d3011b2
...
...
@@ -21,7 +21,7 @@ class YHHKRecordsContentVC: YHBaseViewController {
case
customer
(
_
title
:
String
,
_
detail
:
String
)
case
info
(
_
title
:
String
,
_
detail
:
String
,
_
topMargin
:
CGFloat
=
18
,
_
bottomMargin
:
CGFloat
=
18
)
case
remark
(
_
title
:
String
,
_
detail
:
String
)
case
edit
(
_
title
:
String
)
case
edit
(
_
title
:
String
,
_
editModel
:
YHHKImmigrationEditRecordModel
)
}
private
lazy
var
viewModel
=
YHHKImmigrationRecordsViewModel
()
...
...
@@ -111,8 +111,7 @@ extension YHHKRecordsContentVC {
}
else
{
printLog
(
"YHHKRecordsContentVC: 请求失败"
)
if
let
errorMsg
=
error
?
.
errorMsg
,
errorMsg
.
count
>
0
{
YHHUD
.
show
(
.
error
(
message
:
errorMsg
))
YHHUD
.
hide
(
afterDelay
:
1
)
YHHUD
.
flash
(
message
:
errorMsg
)
}
}
}
...
...
@@ -134,7 +133,15 @@ extension YHHKRecordsContentVC {
if
record
.
remark
.
count
>
0
{
section
.
append
(
.
remark
(
"备注:"
,
record
.
remark
))
}
section
.
append
(
.
edit
(
"编辑"
))
let
editModel
=
YHHKImmigrationEditRecordModel
()
editModel
.
id
=
record
.
id
editModel
.
order_id
=
orderId
editModel
.
users
=
record
.
users
editModel
.
start_date
=
record
.
start_date
editModel
.
end_date
=
record
.
end_date
editModel
.
remark
=
record
.
remark
section
.
append
(
.
edit
(
"编辑"
,
editModel
))
sections
.
append
(
section
)
}
guard
sections
.
count
>
0
else
{
...
...
@@ -191,7 +198,7 @@ extension YHHKRecordsContentVC: UITableViewDelegate, UITableViewDataSource {
cell
.
setupCellInfo
(
title
:
title
,
detail
:
detail
)
return
cell
}
case
let
.
edit
(
title
):
case
let
.
edit
(
title
,
_
):
if
let
cell
=
tableView
.
dequeueReusableCell
(
withIdentifier
:
YHHKRecordsEditButtonCell
.
cellReuseIdentifier
)
as?
YHHKRecordsEditButtonCell
{
cell
.
setupCellInfo
(
title
:
title
)
return
cell
...
...
@@ -209,8 +216,8 @@ extension YHHKRecordsContentVC: UITableViewDelegate, UITableViewDataSource {
return
}
let
row
=
sectionArr
[
indexPath
.
row
]
if
case
.
edit
=
row
{
let
vc
=
YHHKRecordsEditContentVC
(
pageType
:
.
edit
)
if
case
let
.
edit
(
_
,
editModel
)
=
row
{
let
vc
=
YHHKRecordsEditContentVC
(
orderId
:
orderId
,
pageType
:
.
edit
,
editModel
:
editModel
)
navigationController
?
.
pushViewController
(
vc
)
}
}
...
...
galaxy/galaxy/Classes/Modules/IntelligentService(服务中心)/Resign(续签)/HongKongImmigrationRecords(在港记录管理)/C/YHHKRecordsEditContentVC.swift
View file @
3d3011b2
...
...
@@ -25,11 +25,15 @@ class YHHKRecordsEditContentVC: YHBaseViewController {
}
}
enum
SelectTimeType
{
case
fromTime
,
endTime
}
enum
RowType
{
case
tips
(
_
title
:
String
,
_
detail
:
NSAttributedString
)
case
header
(
_
title
:
String
)
case
personnelStaying
(
_
title
:
String
,
_
detail
:
[
YHHKRecords
EditPersonnelModel
])
case
selectTime
(
_
title
:
String
,
_
detail
:
String
?,
_
placeholder
:
String
)
case
personnelStaying
(
_
title
:
String
,
_
detail
:
[
YHHKRecords
UserItem
])
case
selectTime
(
_
title
:
String
,
_
detail
:
String
?,
_
placeholder
:
String
,
_
timeType
:
SelectTimeType
)
case
remark
(
_
title
:
String
,
_
detail
:
String
)
}
...
...
@@ -66,7 +70,11 @@ class YHHKRecordsEditContentVC: YHBaseViewController {
private
lazy
var
saveButton
:
UIButton
=
{
let
button
=
UIButton
(
type
:
.
custom
)
button
.
titleLabel
?
.
font
=
UIFont
.
PFSC_M
(
ofSize
:
16
)
let
buttonName
=
"保存逗留记录"
var
buttonName
=
"保存在港记录"
if
pageType
==
.
add
{
buttonName
=
"新增在港记录"
}
button
.
setTitle
(
buttonName
,
for
:
.
normal
)
button
.
setTitle
(
buttonName
,
for
:
.
highlighted
)
button
.
setTitleColor
(
UIColor
(
hex
:
0xffffff
),
for
:
.
normal
)
...
...
@@ -80,10 +88,21 @@ class YHHKRecordsEditContentVC: YHBaseViewController {
private
var
personnelStayingHeight
:
CGFloat
?
private
lazy
var
viewModel
=
YHHKImmigrationRecordsViewModel
()
private
lazy
var
editModel
=
YHHKImmigrationEditRecordModel
()
private
var
familyMembers
:
YHHKRecordsFamilyMembers
?
private
let
pageType
:
YHHKRecordsEditPageType
init
(
pageType
:
YHHKRecordsEditPageType
)
{
private
let
orderId
:
Int
init
(
orderId
:
Int
,
pageType
:
YHHKRecordsEditPageType
,
editModel
:
YHHKImmigrationEditRecordModel
?
=
nil
)
{
self
.
pageType
=
pageType
self
.
orderId
=
orderId
super
.
init
(
nibName
:
nil
,
bundle
:
nil
)
if
let
editModel
=
editModel
{
self
.
editModel
=
editModel
}
self
.
editModel
.
order_id
=
orderId
}
required
init
?(
coder
:
NSCoder
)
{
...
...
@@ -93,12 +112,13 @@ class YHHKRecordsEditContentVC: YHBaseViewController {
override
func
viewDidLoad
()
{
super
.
viewDidLoad
()
setupUI
()
requestData
()
}
override
func
viewWillAppear
(
_
animated
:
Bool
)
{
super
.
viewWillAppear
(
animated
)
IQKeyboardManager
.
shared
.
enable
=
true
setup
Data
()
//request
Data()
}
override
func
viewWillDisappear
(
_
animated
:
Bool
)
{
...
...
@@ -108,6 +128,7 @@ class YHHKRecordsEditContentVC: YHBaseViewController {
}
extension
YHHKRecordsEditContentVC
{
private
func
setupUI
()
{
gk_navBarAlpha
=
1
gk_navTitle
=
pageType
.
title
...
...
@@ -138,20 +159,100 @@ extension YHHKRecordsEditContentVC {
make
.
bottom
.
equalTo
(
bottomView
.
snp
.
top
)
}
tableView
.
tableFooterView
=
UIView
(
frame
:
CGRect
.
init
(
x
:
0
,
y
:
0
,
width
:
KScreenWidth
,
height
:
kMargin
))
editModel
.
valueChanged
=
{
[
weak
self
]
isSubmittable
in
self
?
.
updateSaveButton
(
isSubmittable
)
}
updateSaveButton
(
editModel
.
isSubmittable
)
}
private
func
updateSaveButton
(
_
isSubmittable
:
Bool
)
{
saveButton
.
isEnabled
=
editModel
.
isSubmittable
saveButton
.
backgroundColor
=
editModel
.
isSubmittable
?
.
brandMainColor
:
.
brandMainColor30
}
private
func
requestData
()
{
viewModel
.
getHKImmigrationRecordsFamilyMembers
(
orderId
:
orderId
)
{
[
weak
self
]
familyMembers
,
error
in
guard
let
self
=
self
else
{
return
}
self
.
familyMembers
=
familyMembers
if
let
familyMembers
=
familyMembers
{
self
.
updateVC
(
familyMembers
:
familyMembers
)
}
else
{
printLog
(
"YHHKRecordsEditContentVC: 请求失败"
)
if
let
errorMsg
=
error
?
.
errorMsg
,
errorMsg
.
count
>
0
{
YHHUD
.
flash
(
message
:
errorMsg
)
}
}
}
}
private
func
setupData
()
{
let
names
:
[
String
]
=
[
"钻石王老五·钻石王老五·名字很长·长到放不哈哈哈哈哈哈"
,
"玛尔扎哈"
,
"李白"
,
"王晓霞"
,
"巴斯"
]
let
personnels
=
names
.
map
{
name
in
YHHKRecordsEditPersonnelModel
(
name
:
name
)
private
func
updateVC
(
familyMembers
:
YHHKRecordsFamilyMembers
)
{
if
pageType
==
.
add
{
var
sections
:
[[
RowType
]]
=
[[
.
tips
(
"温馨提示:"
,
getTips
())]]
var
section
:
[
RowType
]
=
[
.
header
(
"在港逗留记录"
)]
section
.
append
(
.
personnelStaying
(
"逗留人员"
,
familyMembers
.
list
))
section
.
append
(
.
selectTime
(
"入境时间"
,
nil
,
"请选择"
,
.
fromTime
))
section
.
append
(
.
selectTime
(
"离境时间"
,
nil
,
"请选择"
,
.
endTime
))
section
.
append
(
.
remark
(
"备注"
,
""
))
sections
.
append
(
section
)
datas
=
sections
}
else
{
var
sections
:
[[
RowType
]]
=
[[
.
tips
(
"温馨提示:"
,
getTips
())]]
var
section
:
[
RowType
]
=
[
.
header
(
"在港逗留记录"
)]
familyMembers
.
list
.
forEach
{
item
in
if
editModel
.
users
.
contains
(
where
:
{
oldItem
in
oldItem
.
user_id
==
item
.
user_id
})
{
item
.
isSelected
=
true
}
}
section
.
append
(
.
personnelStaying
(
"逗留人员"
,
familyMembers
.
list
))
section
.
append
(
.
selectTime
(
"入境时间"
,
editModel
.
start_date
,
"请选择"
,
.
fromTime
))
section
.
append
(
.
selectTime
(
"离境时间"
,
editModel
.
end_date
,
"请选择"
,
.
endTime
))
section
.
append
(
.
remark
(
"备注"
,
editModel
.
remark
))
sections
.
append
(
section
)
datas
=
sections
}
datas
=
[[
.
tips
(
"温馨提示:"
,
getTips
())],
[
.
header
(
"在港逗留记录"
),
.
personnelStaying
(
"逗留人员"
,
personnels
),
.
selectTime
(
"入境时间"
,
nil
,
"请选择"
),
.
selectTime
(
"离境时间"
,
"2018-07-31"
,
"请选择"
),
.
remark
(
"备注"
,
"这里是备注信息这里是备注信息这里是备注信息这里是备注信息这里是备注信息这里是备注信息这里是备注信息这里是备注信息这里是备注信息"
)]]
tableView
.
reloadData
()
}
@objc
private
func
clickSaveButton
()
{
//
guard
editModel
.
isSubmittable
else
{
YHHUD
.
flash
(
message
:
"请填写完整所需材料"
)
return
}
if
pageType
==
.
add
{
submitAdd
()
}
else
{
submitEdit
()
}
}
private
func
submitEdit
()
{
viewModel
.
editHKImmigrationRecord
(
editModel
.
getParameters
())
{
[
weak
self
]
success
,
error
in
if
success
{
YHHUD
.
flash
(
message
:
"保存成功"
)
self
?
.
navigationController
?
.
popViewController
(
animated
:
true
)
}
else
{
if
let
errorMsg
=
error
?
.
errorMsg
,
errorMsg
.
count
>
0
{
YHHUD
.
flash
(
message
:
errorMsg
)
}
}
}
}
private
func
submitAdd
()
{
viewModel
.
addHKImmigrationRecord
(
editModel
.
getParameters
())
{
[
weak
self
]
success
,
error
in
if
success
{
YHHUD
.
flash
(
message
:
"新增成功"
)
self
?
.
navigationController
?
.
popViewController
(
animated
:
true
)
}
else
{
if
let
errorMsg
=
error
?
.
errorMsg
,
errorMsg
.
count
>
0
{
YHHUD
.
flash
(
message
:
errorMsg
)
}
}
}
}
}
...
...
@@ -187,6 +288,19 @@ extension YHHKRecordsEditContentVC: UITableViewDelegate, UITableViewDataSource {
case
let
.
remark
(
title
,
detail
):
if
let
cell
=
tableView
.
dequeueReusableCell
(
withIdentifier
:
YHHKRecordsRemarkCell
.
cellReuseIdentifier
)
as?
YHHKRecordsRemarkCell
{
cell
.
setupCellInfo
(
title
:
title
,
titleColor
:
.
mainTextColor
,
detail
:
detail
,
isEditable
:
true
,
cellType
:
.
bottom
)
cell
.
textDidExceedsMaxLimit
=
{
maxCount
in
YHHUD
.
flash
(
message
:
"不可超过
\(
maxCount
)
字"
)
}
cell
.
textViewDidChanged
=
{
[
weak
self
]
textView
in
guard
let
self
=
self
else
{
return
}
var
sections
=
self
.
datas
[
indexPath
.
section
]
sections
[
indexPath
.
row
]
=
.
remark
(
title
,
textView
.
text
)
self
.
datas
[
indexPath
.
section
]
=
sections
self
.
editModel
.
remark
=
textView
.
text
}
return
cell
}
case
let
.
tips
(
title
,
detail
):
...
...
@@ -212,9 +326,56 @@ extension YHHKRecordsEditContentVC: UITableViewDelegate, UITableViewDataSource {
tableView
.
reloadRows
(
at
:
[
indexPath
],
with
:
.
none
)
}
}
cell
.
didFinishLoading
=
{
[
weak
cell
]
in
cell
?
.
defaultSelectItems
(
rows
:
personnels
.
enumerated
()
.
filter
{
index
,
person
in
person
.
isSelected
}
.
map
{
$0
.
0
})
}
cell
.
selectItemAction
=
{
[
weak
self
]
item
in
guard
let
self
=
self
else
{
return
}
var
users
=
self
.
editModel
.
users
users
.
append
(
item
)
self
.
editModel
.
users
=
users
self
.
familyMembers
?
.
list
.
forEach
({
oldItem
in
if
oldItem
.
user_id
==
item
.
user_id
{
item
.
isSelected
=
true
return
}
})
var
sections
=
self
.
datas
[
indexPath
.
section
]
if
let
list
=
self
.
familyMembers
?
.
list
{
sections
[
indexPath
.
row
]
=
.
personnelStaying
(
title
,
list
)
self
.
datas
[
indexPath
.
section
]
=
sections
}
}
cell
.
deselectItemAction
=
{
[
weak
self
]
item
in
guard
let
self
=
self
else
{
return
}
if
let
index
=
self
.
editModel
.
users
.
firstIndex
(
where
:
{
oldItem
in
oldItem
.
user_id
==
item
.
user_id
})
{
var
users
=
self
.
editModel
.
users
users
.
remove
(
at
:
index
)
self
.
editModel
.
users
=
users
}
self
.
familyMembers
?
.
list
.
forEach
({
oldItem
in
if
oldItem
.
user_id
==
item
.
user_id
{
item
.
isSelected
=
false
return
}
})
var
sections
=
self
.
datas
[
indexPath
.
section
]
if
let
list
=
self
.
familyMembers
?
.
list
{
sections
[
indexPath
.
row
]
=
.
personnelStaying
(
title
,
list
)
self
.
datas
[
indexPath
.
section
]
=
sections
}
}
return
cell
}
case
let
.
selectTime
(
title
,
detail
,
placeholder
):
case
let
.
selectTime
(
title
,
detail
,
placeholder
,
_
):
if
let
cell
=
tableView
.
dequeueReusableCell
(
withIdentifier
:
YHHKRecordsTimeSelectCell
.
cellReuseIdentifier
)
as?
YHHKRecordsTimeSelectCell
{
cell
.
setupCellInfo
(
title
:
title
,
detail
:
detail
,
placeholder
:
placeholder
)
return
cell
...
...
@@ -232,6 +393,20 @@ extension YHHKRecordsEditContentVC: UITableViewDelegate, UITableViewDataSource {
return
}
let
row
=
sectionArr
[
indexPath
.
row
]
if
case
let
.
selectTime
(
title
,
detail
,
placeholder
,
timeType
)
=
row
{
YHDatePickView
.
show
(
type
:
.
yyyymmdd
,
title
:
title
,
lastIsTaday
:
false
,
currentDay
:
detail
??
""
)
{
[
weak
self
]
dateStr
in
guard
let
self
=
self
else
{
return
}
var
sections
=
self
.
datas
[
indexPath
.
section
]
sections
[
indexPath
.
row
]
=
.
selectTime
(
title
,
dateStr
,
placeholder
,
timeType
)
self
.
datas
[
indexPath
.
section
]
=
sections
if
timeType
==
.
fromTime
{
self
.
editModel
.
start_date
=
dateStr
}
else
{
self
.
editModel
.
end_date
=
dateStr
}
tableView
.
reloadRows
(
at
:
[
indexPath
],
with
:
.
automatic
)
}
}
}
...
...
galaxy/galaxy/Classes/Modules/IntelligentService(服务中心)/Resign(续签)/HongKongImmigrationRecords(在港记录管理)/C/YHHKRecordsSummaryVC.swift
View file @
3d3011b2
...
...
@@ -97,8 +97,7 @@ extension YHHKRecordsSummaryVC {
}
else
{
printLog
(
"YHHKRecordsSummaryVC: 请求失败"
)
if
let
errorMsg
=
error
?
.
errorMsg
,
errorMsg
.
count
>
0
{
YHHUD
.
show
(
.
error
(
message
:
errorMsg
))
YHHUD
.
hide
(
afterDelay
:
1
)
YHHUD
.
flash
(
message
:
errorMsg
)
}
}
}
...
...
galaxy/galaxy/Classes/Modules/IntelligentService(服务中心)/Resign(续签)/HongKongImmigrationRecords(在港记录管理)/M/YHHKImmigrationEditRecordModel.swift
0 → 100644
View file @
3d3011b2
//
// YHHKImmigrationEditRecordModel.swift
// galaxy
//
// Created by alexzzw on 2024/9/23.
// Copyright © 2024 https://www.galaxy-immi.com. All rights reserved.
//
import
Foundation
class
YHHKImmigrationEditRecordModel
{
var
valueChanged
:
((
Bool
)
->
Void
)?
var
id
:
Int
?
=
nil
var
order_id
:
Int
=
0
var
users
:
[
YHHKRecordsUserItem
]
=
[]
{
didSet
{
valueChanged
?(
isSubmittable
)
}
}
var
start_date
:
String
=
""
{
didSet
{
valueChanged
?(
isSubmittable
)
}
}
var
end_date
:
String
=
""
{
didSet
{
valueChanged
?(
isSubmittable
)
}
}
var
remark
:
String
=
""
var
isSubmittable
:
Bool
{
let
basicInfoOk
=
order_id
>
0
&&
users
.
count
>
0
&&
start_date
.
count
>
0
&&
end_date
.
count
>
0
var
ret
:
Bool
=
basicInfoOk
if
let
id
=
id
{
ret
=
ret
&&
id
>
0
}
return
ret
}
func
getParameters
()
->
[
String
:
Any
]
{
var
parameters
:
[
String
:
Any
]
=
[:]
if
let
id
=
id
{
parameters
[
"id"
]
=
id
}
parameters
[
"order_id"
]
=
order_id
parameters
[
"start_date"
]
=
start_date
parameters
[
"end_date"
]
=
end_date
parameters
[
"remark"
]
=
remark
var
userDicArr
:
[[
String
:
Any
]]
=
[]
users
.
forEach
{
item
in
var
dict
=
[
String
:
Any
]()
dict
[
"user_type"
]
=
item
.
user_type
dict
[
"user_id"
]
=
item
.
user_id
userDicArr
.
append
(
dict
)
}
parameters
[
"users"
]
=
userDicArr
return
parameters
}
}
galaxy/galaxy/Classes/Modules/IntelligentService(服务中心)/Resign(续签)/HongKongImmigrationRecords(在港记录管理)/M/YHHKImmigrationRecordsSingleModel.swift
View file @
3d3011b2
...
...
@@ -35,6 +35,7 @@ class YHHKRecordsUserItem: SmartCodable {
var
user_type
:
Int
=
0
var
user_id
:
Int
=
0
var
user_name
:
String
=
""
var
isSelected
:
Bool
=
false
required
init
()
{
...
...
galaxy/galaxy/Classes/Modules/IntelligentService(服务中心)/Resign(续签)/HongKongImmigrationRecords(在港记录管理)/M/YHHKRecords
EditPersonnelModel
.swift
→
galaxy/galaxy/Classes/Modules/IntelligentService(服务中心)/Resign(续签)/HongKongImmigrationRecords(在港记录管理)/M/YHHKRecords
FamilyMembers
.swift
View file @
3d3011b2
//
// YHHKRecords
EditPersonnelModel
.swift
// YHHKRecords
FamilyMembers
.swift
// galaxy
//
// Created by alexzzw on 2024/9/2
1
.
// Created by alexzzw on 2024/9/2
3
.
// Copyright © 2024 https://www.galaxy-immi.com. All rights reserved.
//
import
Foundation
import
SmartCodable
struct
YHHKRecordsEditPersonnelModel
{
var
name
:
String
=
""
var
isSelected
:
Bool
=
false
class
YHHKRecordsFamilyMembers
:
SmartCodable
{
var
list
:
[
YHHKRecordsUserItem
]
=
[]
required
init
()
{
}
}
galaxy/galaxy/Classes/Modules/IntelligentService(服务中心)/Resign(续签)/HongKongImmigrationRecords(在港记录管理)/V/YHHKRecordsPersonnelSelectCell.swift
View file @
3d3011b2
...
...
@@ -90,9 +90,9 @@ class YHHKRecordsPersonnelSelectCell: UICollectionViewCell {
}
}
func
setupCellInfo
(
_
text
:
String
?
,
isSelected
:
Bool
)
{
func
setupCellInfo
(
_
text
:
String
?)
{
tagLabel
.
text
=
text
self
.
isSelected
=
isSelected
//
self.isSelected = isSelected
}
}
galaxy/galaxy/Classes/Modules/IntelligentService(服务中心)/Resign(续签)/HongKongImmigrationRecords(在港记录管理)/V/YHHKRecordsRemarkCell.swift
View file @
3d3011b2
...
...
@@ -11,8 +11,10 @@ import UIKit
class
YHHKRecordsRemarkCell
:
YHResignDocumentCell
{
static
let
cellReuseIdentifier
=
"YHHKRecordsRemarkCell"
private
let
maxCount
=
200
var
textViewDidChanged
:
((
UITextView
)
->
Void
)?
var
textDidExceedsMaxLimit
:
((
Int
)
->
Void
)?
private
lazy
var
infoTitleLabel
:
UILabel
=
{
let
label
=
UILabel
()
...
...
@@ -93,4 +95,25 @@ extension YHHKRecordsRemarkCell: UITextViewDelegate {
editTipsLabel
.
isHidden
=
textView
.
text
.
count
>
0
textViewDidChanged
?(
textView
)
}
func
textView
(
_
textView
:
UITextView
,
shouldChangeTextIn
range
:
NSRange
,
replacementText
text
:
String
)
->
Bool
{
if
textView
==
remarkTextView
{
/// 正在输入拼音
if
let
textRange
=
textView
.
markedTextRange
,
range
.
length
==
0
{
/// 刚输入拼音的时候总字数
let
start
=
textView
.
offset
(
from
:
textView
.
beginningOfDocument
,
to
:
textRange
.
start
)
return
start
<=
maxCount
}
let
count
=
(
textView
.
text
?
.
utf16
.
count
??
0
)
-
range
.
length
+
text
.
utf16
.
count
if
count
>
maxCount
&&
text
==
""
{
return
true
}
guard
count
>
maxCount
else
{
return
true
}
textDidExceedsMaxLimit
?(
maxCount
)
return
false
}
return
true
}
}
galaxy/galaxy/Classes/Modules/IntelligentService(服务中心)/Resign(续签)/HongKongImmigrationRecords(在港记录管理)/V/YHHKRecordsStayingPersonnelCell.swift
View file @
3d3011b2
...
...
@@ -18,16 +18,22 @@ class YHHKRecordsStayingPersonnelCell: YHResignDocumentCell {
private
static
let
labelToTop
:
CGFloat
=
16
private
static
let
labelHeight
:
CGFloat
=
20
var
selectItemAction
:
((
YHHKRecordsEditPersonnelModel
?)
->
Void
)?
var
selectItemAction
:
((
YHHKRecordsUserItem
)
->
Void
)?
var
deselectItemAction
:
((
YHHKRecordsUserItem
)
->
Void
)?
var
didHeightChanged
:
((
CGFloat
)
->
Void
)?
var
didFinishLoading
:
(()
->
Void
)?
var
collectionData
:
[
YHHKRecords
EditPersonnelModel
]
=
[]
{
var
collectionData
:
[
YHHKRecords
UserItem
]
=
[]
{
didSet
{
hasFinishedLoading
=
false
infoCollectionView
.
reloadData
()
}
}
private
var
hasFinishedLoading
=
false
private
var
minWidth
:
CGFloat
{
return
(
KScreenWidth
-
YHHKRecordsStayingPersonnelCell
.
offsetX
*
2
-
YHHKRecordsStayingPersonnelCell
.
minimumInteritemSpacing
*
3
-
2
*
kMargin
)
/
4.0
}
...
...
@@ -115,6 +121,14 @@ class YHHKRecordsStayingPersonnelCell: YHResignDocumentCell {
func
setupCellInfo
(
title
:
String
?)
{
infoTitleLabel
.
text
=
title
}
func
defaultSelectItems
(
rows
:
[
Int
])
{
rows
.
forEach
{
row
in
if
collectionData
.
count
>
row
{
infoCollectionView
.
selectItem
(
at
:
IndexPath
(
item
:
row
,
section
:
0
),
animated
:
false
,
scrollPosition
:
.
left
)
}
}
}
}
extension
YHHKRecordsStayingPersonnelCell
{
...
...
@@ -172,7 +186,7 @@ extension YHHKRecordsStayingPersonnelCell: UICollectionViewDelegate, UICollectio
func
collectionView
(
_
collectionView
:
UICollectionView
,
cellForItemAt
indexPath
:
IndexPath
)
->
UICollectionViewCell
{
if
collectionData
.
count
>
indexPath
.
item
,
let
cell
=
collectionView
.
dequeueReusableCell
(
withReuseIdentifier
:
YHHKRecordsPersonnelSelectCell
.
cellReuseIdentifier
,
for
:
indexPath
)
as?
YHHKRecordsPersonnelSelectCell
{
let
data
=
collectionData
[
indexPath
.
item
]
cell
.
setupCellInfo
(
data
.
name
,
isSelected
:
data
.
isSelected
)
cell
.
setupCellInfo
(
data
.
user_name
)
return
cell
}
return
UICollectionViewCell
()
...
...
@@ -181,7 +195,7 @@ extension YHHKRecordsStayingPersonnelCell: UICollectionViewDelegate, UICollectio
func
collectionView
(
_
collectionView
:
UICollectionView
,
layout
collectionViewLayout
:
UICollectionViewLayout
,
sizeForItemAt
indexPath
:
IndexPath
)
->
CGSize
{
if
collectionData
.
count
>
indexPath
.
item
{
let
data
=
collectionData
[
indexPath
.
item
]
let
attrString
=
NSAttributedString
(
string
:
data
.
name
,
attributes
:
[
.
font
:
YHHKRecordsPersonnelSelectCell
.
labelFont
])
let
attrString
=
NSAttributedString
(
string
:
data
.
user_
name
,
attributes
:
[
.
font
:
YHHKRecordsPersonnelSelectCell
.
labelFont
])
var
width
=
attrString
.
yh_width
(
containerHeight
:
YHHKRecordsPersonnelSelectCell
.
cellHeight
)
+
2
*
YHHKRecordsPersonnelSelectCell
.
offsetX
if
width
<
minWidth
{
width
=
minWidth
...
...
@@ -195,22 +209,29 @@ extension YHHKRecordsStayingPersonnelCell: UICollectionViewDelegate, UICollectio
return
CGSize
.
zero
}
func
collectionView
(
_
collectionView
:
UICollectionView
,
shouldSelectItemAt
indexPath
:
IndexPath
)
->
Bool
{
if
collectionData
.
count
>
indexPath
.
item
,
let
cell
=
collectionView
.
cellForItem
(
at
:
indexPath
)
as?
YHHKRecordsPersonnelSelectCell
{
if
cell
.
isSelected
{
collectionView
.
deselectItem
(
at
:
indexPath
,
animated
:
true
)
selectItemAction
?(
nil
)
return
false
func
collectionView
(
_
collectionView
:
UICollectionView
,
willDisplay
cell
:
UICollectionViewCell
,
forItemAt
indexPath
:
IndexPath
)
{
if
indexPath
.
item
==
collectionView
.
numberOfItems
(
inSection
:
0
)
-
1
,
!
hasFinishedLoading
{
// CollectionView 中的最后一个 cell 即将显示
hasFinishedLoading
=
true
DispatchQueue
.
main
.
async
{
self
.
didFinishLoading
?()
}
return
true
}
return
true
}
func
collectionView
(
_
collectionView
:
UICollectionView
,
didSelectItemAt
indexPath
:
IndexPath
)
{
if
collectionData
.
count
>
indexPath
.
item
,
let
cell
=
collectionView
.
cellForItem
(
at
:
indexPath
)
as?
YHHKRecordsPersonnelSelectCell
{
let
data
=
collectionData
[
indexPath
.
item
]
selectItemAction
?(
cell
.
isSelected
?
data
:
nil
)
data
.
isSelected
=
true
selectItemAction
?(
data
)
}
}
func
collectionView
(
_
collectionView
:
UICollectionView
,
didDeselectItemAt
indexPath
:
IndexPath
)
{
if
collectionData
.
count
>
indexPath
.
item
,
let
cell
=
collectionView
.
cellForItem
(
at
:
indexPath
)
as?
YHHKRecordsPersonnelSelectCell
{
let
data
=
collectionData
[
indexPath
.
item
]
data
.
isSelected
=
false
deselectItemAction
?(
data
)
}
}
}
galaxy/galaxy/Classes/Modules/IntelligentService(服务中心)/Resign(续签)/HongKongImmigrationRecords(在港记录管理)/VM/YHHKImmigrationRecordsViewModel.swift
View file @
3d3011b2
...
...
@@ -81,5 +81,61 @@ class YHHKImmigrationRecordsViewModel: YHBaseViewModel {
callback
(
nil
,
err
)
}
}
func
getHKImmigrationRecordsFamilyMembers
(
orderId
:
Int
,
callback
:
@escaping
(
_
familyMembers
:
YHHKRecordsFamilyMembers
?,
_
error
:
YHErrorModel
?)
->
())
{
let
params
=
[
"order_id"
:
orderId
]
let
strUrl
=
YHBaseUrlManager
.
shared
.
curURL
()
+
YHAllApiName
.
HKImmigrationRecords
.
stayInHKRecordFamilyMembers
let
_
=
YHNetRequest
.
getRequest
(
url
:
strUrl
,
params
:
params
)
{
json
,
code
in
//1. json字符串 转 对象
printLog
(
"model 是 ==>
\(
json
)
"
)
if
json
.
code
==
200
{
guard
let
dic
=
json
.
data
?
.
peel
as?
[
String
:
Any
],
let
resultModel
=
YHHKRecordsFamilyMembers
.
deserialize
(
from
:
dic
)
else
{
let
err
=
YHErrorModel
(
errorCode
:
YHErrorCode
.
dictParseError
.
rawValue
,
errorMsg
:
YHErrorCode
.
dictParseError
.
description
())
callback
(
nil
,
err
)
return
}
callback
(
resultModel
,
nil
)
}
else
{
let
err
=
YHErrorModel
(
errorCode
:
Int32
(
json
.
code
),
errorMsg
:
json
.
msg
.
isEmpty
?
""
:
json
.
msg
)
callback
(
nil
,
err
)
}
}
failBlock
:
{
err
in
callback
(
nil
,
err
)
}
}
func
addHKImmigrationRecord
(
_
params
:
[
String
:
Any
],
callBackBlock
:
@escaping
(
_
success
:
Bool
,
_
error
:
YHErrorModel
?)
->
())
{
let
strUrl
=
YHBaseUrlManager
.
shared
.
curURL
()
+
YHAllApiName
.
HKImmigrationRecords
.
addStayInHKRecord
let
_
=
YHNetRequest
.
postRequest
(
url
:
strUrl
,
params
:
params
)
{
json
,
code
in
//1. json字符串 转 对象
printLog
(
"model 是 ==>
\(
json
)
"
)
if
json
.
code
==
200
{
callBackBlock
(
true
,
nil
)
}
else
{
let
err
=
YHErrorModel
(
errorCode
:
Int32
(
json
.
code
),
errorMsg
:
json
.
msg
.
isEmpty
?
""
:
json
.
msg
)
callBackBlock
(
false
,
err
)
}
}
failBlock
:
{
err
in
callBackBlock
(
false
,
err
)
}
}
func
editHKImmigrationRecord
(
_
params
:
[
String
:
Any
],
callBackBlock
:
@escaping
(
_
success
:
Bool
,
_
error
:
YHErrorModel
?)
->
())
{
let
strUrl
=
YHBaseUrlManager
.
shared
.
curURL
()
+
YHAllApiName
.
HKImmigrationRecords
.
editStayInHKRecord
let
_
=
YHNetRequest
.
postRequest
(
url
:
strUrl
,
params
:
params
)
{
json
,
code
in
//1. json字符串 转 对象
printLog
(
"model 是 ==>
\(
json
)
"
)
if
json
.
code
==
200
{
callBackBlock
(
true
,
nil
)
}
else
{
let
err
=
YHErrorModel
(
errorCode
:
Int32
(
json
.
code
),
errorMsg
:
json
.
msg
.
isEmpty
?
""
:
json
.
msg
)
callBackBlock
(
false
,
err
)
}
}
failBlock
:
{
err
in
callBackBlock
(
false
,
err
)
}
}
}
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