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
a6378d6c
Commit
a6378d6c
authored
Aug 29, 2024
by
Steven杜宇
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
// 旅行
parent
b852b82d
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
78 additions
and
19 deletions
+78
-19
YHTravelDocsPreparationDetailVC.swift
...aration(6 旅行证件准备)/C/YHTravelDocsPreparationDetailVC.swift
+20
-5
YHTravelCertificateTipsCell.swift
...Preparation(6 旅行证件准备)/V/YHTravelCertificateTipsCell.swift
+6
-0
YHTravelCertificateUploadCell.swift
...eparation(6 旅行证件准备)/V/YHTravelCertificateUploadCell.swift
+52
-14
No files found.
galaxy/galaxy/Classes/Modules/IntelligentService(服务中心)/CustomerService/Certificate(办证段)/TravelDocumentsPreparation(6 旅行证件准备)/C/YHTravelDocsPreparationDetailVC.swift
View file @
a6378d6c
...
@@ -147,14 +147,20 @@ class YHTravelDocsPreparationDetailVC: YHBaseViewController {
...
@@ -147,14 +147,20 @@ class YHTravelDocsPreparationDetailVC: YHBaseViewController {
}
else
{
// 没有上传过证件
}
else
{
// 没有上传过证件
let
item
=
YHTravelCerSectionItem
(
type
:
.
certificate
,
tipsArr
:
[])
let
item
=
YHTravelCerSectionItem
(
type
:
.
certificate
,
tipsArr
:
[])
if
self
.
type
==
.
HK
{
if
self
.
type
==
.
HK
||
self
.
type
==
.
chinesePassPort
{
var
userId
=
0
var
userId
=
0
if
let
uid
=
YHLoginManager
.
shared
.
userModel
?
.
id
{
if
let
uid
=
YHLoginManager
.
shared
.
userModel
?
.
id
{
userId
=
Int
(
uid
)
??
0
userId
=
Int
(
uid
)
??
0
}
}
let
cerModel1
=
YHTravelDocsPreparationDetailItemModel
(
type
:
3
,
order_id
:
self
.
orderId
,
order_sn
:
""
,
img_back
:
""
,
img_front
:
""
,
status
:
0
,
issue_start
:
""
,
issue_end
:
""
,
user_id
:
userId
,
user_type
:
dataModel
.
type
,
remark
:
""
,
nationality
:
"
\(
dataModel
.
nationality
)
"
)
// 证件类型 1-护照 2-中国旅行证 3-港澳通行证 4-存款证明 5-其他
var
type
=
-
1
if
self
.
type
==
.
chinesePassPort
{
type
=
1
}
else
if
self
.
type
==
.
HK
{
type
=
3
}
let
cerModel1
=
YHTravelDocsPreparationDetailItemModel
(
type
:
type
,
order_id
:
self
.
orderId
,
order_sn
:
""
,
img_back
:
""
,
img_front
:
""
,
status
:
0
,
issue_start
:
""
,
issue_end
:
""
,
user_id
:
userId
,
user_type
:
dataModel
.
type
,
remark
:
""
,
nationality
:
"
\(
dataModel
.
nationality
)
"
)
cerModel1
.
latest_validaty_date
=
self
.
viewModel
.
travelDetailModel
?
.
latest_validaty_date
??
""
cerModel1
.
latest_validaty_date
=
self
.
viewModel
.
travelDetailModel
?
.
latest_validaty_date
??
""
item
.
cerDetailModel
=
cerModel1
item
.
cerDetailModel
=
cerModel1
sectionItems
.
append
(
item
)
sectionItems
.
append
(
item
)
}
}
...
@@ -173,15 +179,23 @@ class YHTravelDocsPreparationDetailVC: YHBaseViewController {
...
@@ -173,15 +179,23 @@ class YHTravelDocsPreparationDetailVC: YHBaseViewController {
var
hasError
=
false
var
hasError
=
false
for
item
in
sectionItems
{
for
item
in
sectionItems
{
if
item
.
type
==
.
certificate
{
if
item
.
type
==
.
certificate
{
item
.
cerDetailModel
.
isNeedCheckCer
=
false
if
item
.
cerDetailModel
.
img_front
.
isEmpty
||
item
.
cerDetailModel
.
img_back
.
isEmpty
{
if
item
.
cerDetailModel
.
img_front
.
isEmpty
||
item
.
cerDetailModel
.
img_back
.
isEmpty
{
hasError
=
true
hasError
=
true
item
.
cerDetailModel
.
isNeedCheckCer
=
true
item
.
cerDetailModel
.
isNeedCheckCer
=
true
if
item
.
cerDetailModel
.
type
==
3
{
if
item
.
cerDetailModel
.
type
==
3
{
// 港澳通行证
item
.
cerDetailModel
.
checkTips
=
item
.
cerDetailModel
.
img_front
.
isEmpty
?
"请上传港澳通行证正面"
:
"请上传港澳通行证反面"
item
.
cerDetailModel
.
checkTips
=
item
.
cerDetailModel
.
img_front
.
isEmpty
?
"请上传港澳通行证正面"
:
"请上传港澳通行证反面"
}
else
if
item
.
cerDetailModel
.
type
==
1
{
// 中国护照
item
.
cerDetailModel
.
checkTips
=
"请上传护照"
}
else
if
item
.
cerDetailModel
.
type
==
2
{
// 中国居留许可签证
item
.
cerDetailModel
.
checkTips
=
"请上传中国居留许可签证"
}
}
}
else
{
}
else
{
item
.
cerDetailModel
.
isNeedCheckDate
=
false
if
item
.
cerDetailModel
.
issue_start
.
isEmpty
||
item
.
cerDetailModel
.
issue_end
.
isEmpty
{
if
item
.
cerDetailModel
.
issue_start
.
isEmpty
||
item
.
cerDetailModel
.
issue_end
.
isEmpty
{
hasError
=
true
hasError
=
true
item
.
cerDetailModel
.
isNeedCheckDate
=
true
item
.
cerDetailModel
.
isNeedCheckDate
=
true
...
@@ -305,6 +319,7 @@ extension YHTravelDocsPreparationDetailVC: UITableViewDelegate, UITableViewDataS
...
@@ -305,6 +319,7 @@ extension YHTravelDocsPreparationDetailVC: UITableViewDelegate, UITableViewDataS
if
item
.
type
==
.
tips
{
if
item
.
type
==
.
tips
{
if
indexPath
.
section
==
0
{
if
indexPath
.
section
==
0
{
let
cell
=
tableView
.
dequeueReusableCell
(
withIdentifier
:
YHTravelCertificateTipsCell
.
cellReuseIdentifier
,
for
:
indexPath
)
as!
YHTravelCertificateTipsCell
let
cell
=
tableView
.
dequeueReusableCell
(
withIdentifier
:
YHTravelCertificateTipsCell
.
cellReuseIdentifier
,
for
:
indexPath
)
as!
YHTravelCertificateTipsCell
cell
.
userName
=
self
.
dataModel
.
name
cell
.
tipsArr
=
item
.
tipsArr
cell
.
tipsArr
=
item
.
tipsArr
return
cell
return
cell
}
}
...
...
galaxy/galaxy/Classes/Modules/IntelligentService(服务中心)/CustomerService/Certificate(办证段)/TravelDocumentsPreparation(6 旅行证件准备)/V/YHTravelCertificateTipsCell.swift
View file @
a6378d6c
...
@@ -13,6 +13,12 @@ class YHTravelCertificateTipsCell: UITableViewCell {
...
@@ -13,6 +13,12 @@ class YHTravelCertificateTipsCell: UITableViewCell {
static
let
cellReuseIdentifier
=
"YHTravelCertificateTipsCell"
static
let
cellReuseIdentifier
=
"YHTravelCertificateTipsCell"
var
userName
:
String
=
""
{
didSet
{
titleLabel
.
text
=
"
\(
userName
)
需准备证件清单"
}
}
var
tipsArr
:
[
ASAttributedString
]
=
[]
{
var
tipsArr
:
[
ASAttributedString
]
=
[]
{
didSet
{
didSet
{
grayView
.
removeSubviews
()
grayView
.
removeSubviews
()
...
...
galaxy/galaxy/Classes/Modules/IntelligentService(服务中心)/CustomerService/Certificate(办证段)/TravelDocumentsPreparation(6 旅行证件准备)/V/YHTravelCertificateUploadCell.swift
View file @
a6378d6c
...
@@ -108,13 +108,25 @@ class YHTravelCertificateUploadCell: UITableViewCell {
...
@@ -108,13 +108,25 @@ class YHTravelCertificateUploadCell: UITableViewCell {
view
.
urlBlock
=
{
view
.
urlBlock
=
{
[
weak
self
]
url
,
index
in
[
weak
self
]
url
,
index
in
guard
let
self
=
self
else
{
return
}
guard
let
self
=
self
else
{
return
}
self
.
dataModel
.
img_front
=
url
if
self
.
dataModel
.
type
==
3
{
// 港澳通行证
self
.
getOCR
(
url
:
url
,
isBack
:
0
)
self
.
dataModel
.
img_front
=
url
self
.
getOCR
(
url
:
url
,
isBack
:
0
)
}
else
{
self
.
dataModel
.
img_front
=
url
self
.
dataModel
.
img_back
=
url
self
.
updateBlock
?()
}
}
}
view
.
deleteBlock
=
{
view
.
deleteBlock
=
{
[
weak
self
]
url
,
index
in
[
weak
self
]
url
,
index
in
guard
let
self
=
self
else
{
return
}
guard
let
self
=
self
else
{
return
}
self
.
dataModel
.
img_front
=
""
if
self
.
dataModel
.
type
==
3
{
// 港澳通行证
self
.
dataModel
.
img_front
=
""
}
else
{
self
.
dataModel
.
img_front
=
""
self
.
dataModel
.
img_back
=
""
}
self
.
updateBlock
?()
self
.
updateBlock
?()
}
}
return
view
return
view
...
@@ -206,12 +218,29 @@ class YHTravelCertificateUploadCell: UITableViewCell {
...
@@ -206,12 +218,29 @@ class YHTravelCertificateUploadCell: UITableViewCell {
var
frontTitle
=
""
var
frontTitle
=
""
var
backTitle
=
""
var
backTitle
=
""
if
model
.
type
==
3
{
if
model
.
nationality
==
"1"
{
// 国籍为中国
title
=
"港澳通行证 (逗留D签注)"
if
model
.
type
==
1
{
// 护照
frontTitle
=
"港澳通行证正面"
title
=
"护照信息"
backTitle
=
"港澳通行证反面"
frontTitle
=
"护照资料页"
}
else
if
model
.
type
==
3
{
// 港澳通行证
title
=
"港澳通行证 (逗留D签注)"
frontTitle
=
"港澳通行证正面"
backTitle
=
"港澳通行证反面"
}
}
else
{
// 国籍为外国
if
model
.
type
==
1
{
// 护照
title
=
"护照信息"
frontTitle
=
"护照资料页"
}
else
if
model
.
type
==
3
{
// 中国居留许可签证
title
=
"中国居留许可签证"
frontTitle
=
"中国居留许可签证"
}
}
}
// 标题设置
// 标题设置
var
titleStr
:
ASAttributedString
=
.
init
(
string
:
title
,
.
font
(
UIFont
.
PFSC_M
(
ofSize
:
16
)),
.
foreground
(
UIColor
.
mainTextColor
))
var
titleStr
:
ASAttributedString
=
.
init
(
string
:
title
,
.
font
(
UIFont
.
PFSC_M
(
ofSize
:
16
)),
.
foreground
(
UIColor
.
mainTextColor
))
let
mustTag
:
ASAttributedString
=
.
init
(
"*"
,
.
font
(
UIFont
.
PFSC_M
(
ofSize
:
16
)),
.
foreground
(
UIColor
.
failColor
))
let
mustTag
:
ASAttributedString
=
.
init
(
"*"
,
.
font
(
UIFont
.
PFSC_M
(
ofSize
:
16
)),
.
foreground
(
UIColor
.
failColor
))
...
@@ -230,9 +259,13 @@ class YHTravelCertificateUploadCell: UITableViewCell {
...
@@ -230,9 +259,13 @@ class YHTravelCertificateUploadCell: UITableViewCell {
// 证件正反面标题
// 证件正反面标题
certificateFrontView
.
frontLabel
.
text
=
frontTitle
certificateFrontView
.
frontLabel
.
text
=
frontTitle
certificateBackView
.
frontLabel
.
text
=
backTitle
certificateBackView
.
frontLabel
.
text
=
backTitle
// 证件正反面图片
certificateFrontView
.
url
=
model
.
img_front
certificateFrontView
.
url
=
model
.
img_front
certificateBackView
.
url
=
model
.
img_back
certificateBackView
.
url
=
model
.
img_back
// 除了港澳通行证需要上传正反面 其他都是上传正面
certificateBackView
.
isHidden
=
model
.
type
!=
3
// 是否有证件
// 是否有证件
let
hasNoCertiInfo
=
model
.
img_front
.
isEmpty
&&
model
.
img_back
.
isEmpty
let
hasNoCertiInfo
=
model
.
img_front
.
isEmpty
&&
model
.
img_back
.
isEmpty
// 需要显示被拒原因
// 需要显示被拒原因
...
@@ -378,12 +411,17 @@ class YHTravelCertificateUploadCell: UITableViewCell {
...
@@ -378,12 +411,17 @@ class YHTravelCertificateUploadCell: UITableViewCell {
extension
YHTravelCertificateUploadCell
{
extension
YHTravelCertificateUploadCell
{
func
getOCR
(
url
:
String
,
isBack
:
Int
)
{
func
getOCR
(
url
:
String
,
isBack
:
Int
)
{
if
self
.
dataModel
.
type
!=
3
{
// 非港澳通行证 不用进行OCR识别
return
}
self
.
viewModel
.
getPublicImageUrl
(
url
)
{
self
.
viewModel
.
getPublicImageUrl
(
url
)
{
[
weak
self
]
success
,
error
in
[
weak
self
]
success
,
error
in
guard
let
self
=
self
else
{
return
}
guard
let
self
=
self
else
{
return
}
guard
let
url
=
success
else
{
return
}
guard
let
url
=
success
else
{
return
}
//进行ocr识别
//进行ocr识别
YHHUD
.
show
(
.
progress
(
message
:
"识别中..."
))
YHHUD
.
show
(
.
progress
(
message
:
"识别中..."
))
...
@@ -391,9 +429,9 @@ extension YHTravelCertificateUploadCell {
...
@@ -391,9 +429,9 @@ extension YHTravelCertificateUploadCell {
self
.
viewModel
.
getHKCardBackInfoByOcr
(
url
,
isBack
:
isBack
)
{
success
,
result
in
self
.
viewModel
.
getHKCardBackInfoByOcr
(
url
,
isBack
:
isBack
)
{
success
,
result
in
YHHUD
.
hide
()
YHHUD
.
hide
()
if
success
,
let
result
=
result
{
if
success
,
let
result
=
result
{
self
.
dataModel
.
issue_start
=
result
.
term_begins
self
.
dataModel
.
issue_start
=
result
.
term_begins
self
.
dataModel
.
issue_end
=
result
.
end_of_term
self
.
dataModel
.
issue_end
=
result
.
end_of_term
self
.
updateBlock
?()
self
.
updateBlock
?()
}
else
{
}
else
{
self
.
updateBlock
?()
self
.
updateBlock
?()
}
}
...
@@ -404,9 +442,9 @@ extension YHTravelCertificateUploadCell {
...
@@ -404,9 +442,9 @@ extension YHTravelCertificateUploadCell {
self
.
viewModel
.
getHKCardInfoByOcr
(
url
,
isBack
:
isBack
)
{
success
,
result
in
self
.
viewModel
.
getHKCardInfoByOcr
(
url
,
isBack
:
isBack
)
{
success
,
result
in
YHHUD
.
hide
()
YHHUD
.
hide
()
if
success
,
let
result
=
result
{
if
success
,
let
result
=
result
{
self
.
dataModel
.
issue_start
=
result
.
term_begins
self
.
dataModel
.
issue_start
=
result
.
term_begins
self
.
dataModel
.
issue_end
=
result
.
end_of_term
self
.
dataModel
.
issue_end
=
result
.
end_of_term
self
.
updateBlock
?()
self
.
updateBlock
?()
}
else
{
}
else
{
self
.
updateBlock
?()
self
.
updateBlock
?()
}
}
...
...
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