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
ac8638a6
Commit
ac8638a6
authored
Oct 12, 2024
by
Alex朱枝文
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
续签文书优化基本逻辑以及接口调整
parent
7e80a1f8
Changes
10
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
549 additions
and
3 deletions
+549
-3
project.pbxproj
galaxy/galaxy.xcodeproj/project.pbxproj
+20
-0
YHResignDocumentDetailViewController.swift
...ment(续签文书管理)/C/YHResignDocumentDetailViewController.swift
+0
-0
YHResignDocumentUploadSignedDocument.swift
...ment(续签文书管理)/M/YHResignDocumentUploadSignedDocument.swift
+19
-0
YHResignDocumentUploadStatus.swift
...ntManagement(续签文书管理)/M/YHResignDocumentUploadStatus.swift
+38
-0
YHResignDocumentStatusCell.swift
...mentManagement(续签文书管理)/V/YHResignDocumentStatusCell.swift
+126
-3
YHResignDocumentUploadActionCell.swift
...nagement(续签文书管理)/V/YHResignDocumentUploadActionCell.swift
+119
-0
YHResignDocumentUploadFileCell.swift
...Management(续签文书管理)/V/YHResignDocumentUploadFileCell.swift
+115
-0
YHResignDocumentUploadHeaderCell.swift
...nagement(续签文书管理)/V/YHResignDocumentUploadHeaderCell.swift
+65
-0
YHResignDocumentViewModel.swift
...mentManagement(续签文书管理)/VM/YHResignDocumentViewModel.swift
+43
-0
YHAllApiName.swift
galaxy/galaxy/Classes/Tools/NetWork/YHAllApiName.swift
+4
-0
No files found.
galaxy/galaxy.xcodeproj/project.pbxproj
View file @
ac8638a6
This diff is collapsed.
Click to expand it.
galaxy/galaxy/Classes/Modules/IntelligentService(服务中心)/Resign(续签)/ResignDocumentManagement(续签文书管理)/C/YHResignDocumentDetailViewController.swift
View file @
ac8638a6
This diff is collapsed.
Click to expand it.
galaxy/galaxy/Classes/Modules/IntelligentService(服务中心)/Resign(续签)/ResignDocumentManagement(续签文书管理)/M/YHResignDocumentUploadSignedDocument.swift
0 → 100644
View file @
ac8638a6
//
// YHResignDocumentUploadSignedDocument.swift
// galaxy
//
// Created by alexzzw on 2024/10/12.
// Copyright © 2024 https://www.galaxy-immi.com. All rights reserved.
//
import
Foundation
class
YHResignDocumentUploadSignedDocument
{
var
name
:
String
=
""
var
url
:
String
=
""
func
getUploadDict
()
->
[
String
:
Any
]
{
return
[
"name"
:
name
,
"url"
:
url
]
}
}
galaxy/galaxy/Classes/Modules/IntelligentService(服务中心)/Resign(续签)/ResignDocumentManagement(续签文书管理)/M/YHResignDocumentUploadStatus.swift
0 → 100644
View file @
ac8638a6
//
// YHResignDocumentUploadStatus.swift
// galaxy
//
// Created by alexzzw on 2024/10/8.
// Copyright © 2024 https://www.galaxy-immi.com. All rights reserved.
//
import
Foundation
enum
YHResignDocumentUploadStatus
:
Int
,
CaseIterable
{
case
pendingUpload
=
0
case
notSent
=
1
case
sending
=
2
case
sent
=
3
case
received
=
4
case
approved
=
5
case
rejected
=
6
var
description
:
String
{
switch
self
{
case
.
pendingUpload
:
return
"待上传"
case
.
notSent
:
return
"未发送"
case
.
sending
:
return
"发送中"
case
.
sent
:
return
"已发送"
case
.
received
:
return
"已签收"
case
.
approved
:
return
"审核通过"
case
.
rejected
:
return
"驳回"
}
}
}
galaxy/galaxy/Classes/Modules/IntelligentService(服务中心)/Resign(续签)/ResignDocumentManagement(续签文书管理)/V/YHResignDocumentStatusCell.swift
View file @
ac8638a6
...
@@ -10,7 +10,7 @@ import UIKit
...
@@ -10,7 +10,7 @@ import UIKit
class
YHResignDocumentStatusCell
:
YHResignDocumentCell
{
class
YHResignDocumentStatusCell
:
YHResignDocumentCell
{
enum
ButtonsLayoutStyle
:
Int
{
enum
ButtonsLayoutStyle
:
Int
{
case
one
=
0
,
two
,
three
case
one
=
0
,
two
,
three
,
four
}
}
struct
ButtonsConfig
{
struct
ButtonsConfig
{
...
@@ -23,6 +23,7 @@ class YHResignDocumentStatusCell: YHResignDocumentCell {
...
@@ -23,6 +23,7 @@ class YHResignDocumentStatusCell: YHResignDocumentCell {
private
var
leftButtonClickEvent
:
(()
->
Void
)?
private
var
leftButtonClickEvent
:
(()
->
Void
)?
private
var
midButtonClickEvent
:
(()
->
Void
)?
private
var
midButtonClickEvent
:
(()
->
Void
)?
private
var
rightButtonClickEvent
:
(()
->
Void
)?
private
var
rightButtonClickEvent
:
(()
->
Void
)?
private
var
farRightButtonClickEvent
:
(()
->
Void
)?
private
lazy
var
infoTitleLabel
:
UILabel
=
{
private
lazy
var
infoTitleLabel
:
UILabel
=
{
let
label
=
UILabel
()
let
label
=
UILabel
()
...
@@ -53,7 +54,7 @@ class YHResignDocumentStatusCell: YHResignDocumentCell {
...
@@ -53,7 +54,7 @@ class YHResignDocumentStatusCell: YHResignDocumentCell {
private
lazy
var
fileIconView
:
UIImageView
=
{
private
lazy
var
fileIconView
:
UIImageView
=
{
let
view
=
UIImageView
()
let
view
=
UIImageView
()
view
.
image
=
UIImage
(
named
:
"
resign_doc_file_icon
"
)
view
.
image
=
UIImage
(
named
:
"
my_cer_type_word
"
)
return
view
return
view
}()
}()
...
@@ -103,6 +104,15 @@ class YHResignDocumentStatusCell: YHResignDocumentCell {
...
@@ -103,6 +104,15 @@ class YHResignDocumentStatusCell: YHResignDocumentCell {
return
button
return
button
}()
}()
private
lazy
var
farRightButton
:
UIButton
=
{
let
button
=
UIButton
(
type
:
.
custom
)
button
.
isHidden
=
true
button
.
setTitleColor
(
UIColor
.
brandMainColor
,
for
:
.
normal
)
button
.
titleLabel
?
.
font
=
.
PFSC_R
(
ofSize
:
14
)
button
.
addTarget
(
self
,
action
:
#selector(
farRightButtonDidClick(_:)
)
,
for
:
.
touchUpInside
)
return
button
}()
private
lazy
var
leftLineView
:
UIView
=
{
private
lazy
var
leftLineView
:
UIView
=
{
let
view
=
UIView
()
let
view
=
UIView
()
view
.
isHidden
=
true
view
.
isHidden
=
true
...
@@ -116,6 +126,13 @@ class YHResignDocumentStatusCell: YHResignDocumentCell {
...
@@ -116,6 +126,13 @@ class YHResignDocumentStatusCell: YHResignDocumentCell {
view
.
backgroundColor
=
.
separatorColor
view
.
backgroundColor
=
.
separatorColor
return
view
return
view
}()
}()
private
lazy
var
farRightLineView
:
UIView
=
{
let
view
=
UIView
()
view
.
isHidden
=
true
view
.
backgroundColor
=
.
separatorColor
return
view
}()
override
init
(
style
:
UITableViewCell
.
CellStyle
,
reuseIdentifier
:
String
?)
{
override
init
(
style
:
UITableViewCell
.
CellStyle
,
reuseIdentifier
:
String
?)
{
super
.
init
(
style
:
style
,
reuseIdentifier
:
reuseIdentifier
)
super
.
init
(
style
:
style
,
reuseIdentifier
:
reuseIdentifier
)
...
@@ -149,6 +166,10 @@ extension YHResignDocumentStatusCell {
...
@@ -149,6 +166,10 @@ extension YHResignDocumentStatusCell {
@objc
private
func
rightButtonDidClick
(
_
sender
:
UIButton
)
{
@objc
private
func
rightButtonDidClick
(
_
sender
:
UIButton
)
{
rightButtonClickEvent
?()
rightButtonClickEvent
?()
}
}
@objc
private
func
farRightButtonDidClick
(
_
sender
:
UIButton
)
{
farRightButtonClickEvent
?()
}
}
}
extension
YHResignDocumentStatusCell
{
extension
YHResignDocumentStatusCell
{
...
@@ -190,6 +211,8 @@ extension YHResignDocumentStatusCell {
...
@@ -190,6 +211,8 @@ extension YHResignDocumentStatusCell {
rightButton
.
isHidden
=
true
rightButton
.
isHidden
=
true
leftLineView
.
isHidden
=
true
leftLineView
.
isHidden
=
true
rightLineView
.
isHidden
=
true
rightLineView
.
isHidden
=
true
farRightButton
.
isHidden
=
true
farRightLineView
.
isHidden
=
true
if
let
first
=
buttonsConfig
.
names
.
first
{
if
let
first
=
buttonsConfig
.
names
.
first
{
leftButton
.
setTitle
(
first
,
for
:
.
normal
)
leftButton
.
setTitle
(
first
,
for
:
.
normal
)
...
@@ -209,12 +232,19 @@ extension YHResignDocumentStatusCell {
...
@@ -209,12 +232,19 @@ extension YHResignDocumentStatusCell {
make
.
left
.
top
.
equalToSuperview
()
make
.
left
.
top
.
equalToSuperview
()
make
.
width
.
height
.
equalTo
(
0
)
make
.
width
.
height
.
equalTo
(
0
)
}
}
farRightButton
.
snp
.
remakeConstraints
{
make
in
make
.
left
.
top
.
equalToSuperview
()
make
.
width
.
height
.
equalTo
(
0
)
}
case
.
two
:
case
.
two
:
leftButton
.
isHidden
=
false
leftButton
.
isHidden
=
false
midButton
.
isHidden
=
false
midButton
.
isHidden
=
false
rightButton
.
isHidden
=
true
rightButton
.
isHidden
=
true
leftLineView
.
isHidden
=
false
leftLineView
.
isHidden
=
false
rightLineView
.
isHidden
=
true
rightLineView
.
isHidden
=
true
farRightButton
.
isHidden
=
true
farRightLineView
.
isHidden
=
true
if
buttonsConfig
.
names
.
count
>
1
{
if
buttonsConfig
.
names
.
count
>
1
{
leftButton
.
setTitle
(
buttonsConfig
.
names
[
0
],
for
:
.
normal
)
leftButton
.
setTitle
(
buttonsConfig
.
names
[
0
],
for
:
.
normal
)
midButton
.
setTitle
(
buttonsConfig
.
names
[
1
],
for
:
.
normal
)
midButton
.
setTitle
(
buttonsConfig
.
names
[
1
],
for
:
.
normal
)
...
@@ -244,6 +274,10 @@ extension YHResignDocumentStatusCell {
...
@@ -244,6 +274,10 @@ extension YHResignDocumentStatusCell {
make
.
left
.
top
.
equalToSuperview
()
make
.
left
.
top
.
equalToSuperview
()
make
.
width
.
height
.
equalTo
(
0
)
make
.
width
.
height
.
equalTo
(
0
)
}
}
farRightButton
.
snp
.
remakeConstraints
{
make
in
make
.
left
.
top
.
equalToSuperview
()
make
.
width
.
height
.
equalTo
(
0
)
}
case
.
three
:
case
.
three
:
leftButton
.
isHidden
=
false
leftButton
.
isHidden
=
false
...
@@ -251,6 +285,9 @@ extension YHResignDocumentStatusCell {
...
@@ -251,6 +285,9 @@ extension YHResignDocumentStatusCell {
rightButton
.
isHidden
=
false
rightButton
.
isHidden
=
false
leftLineView
.
isHidden
=
false
leftLineView
.
isHidden
=
false
rightLineView
.
isHidden
=
false
rightLineView
.
isHidden
=
false
farRightButton
.
isHidden
=
true
farRightLineView
.
isHidden
=
true
if
buttonsConfig
.
names
.
count
>
2
{
if
buttonsConfig
.
names
.
count
>
2
{
leftButton
.
setTitle
(
buttonsConfig
.
names
[
0
],
for
:
.
normal
)
leftButton
.
setTitle
(
buttonsConfig
.
names
[
0
],
for
:
.
normal
)
midButton
.
setTitle
(
buttonsConfig
.
names
[
1
],
for
:
.
normal
)
midButton
.
setTitle
(
buttonsConfig
.
names
[
1
],
for
:
.
normal
)
...
@@ -294,6 +331,79 @@ extension YHResignDocumentStatusCell {
...
@@ -294,6 +331,79 @@ extension YHResignDocumentStatusCell {
make
.
top
.
right
.
bottom
.
equalToSuperview
()
make
.
top
.
right
.
bottom
.
equalToSuperview
()
make
.
width
.
equalTo
(
leftButton
)
make
.
width
.
equalTo
(
leftButton
)
}
}
farRightButton
.
snp
.
remakeConstraints
{
make
in
make
.
left
.
top
.
equalToSuperview
()
make
.
width
.
height
.
equalTo
(
0
)
}
case
.
four
:
leftButton
.
isHidden
=
false
midButton
.
isHidden
=
false
rightButton
.
isHidden
=
false
leftLineView
.
isHidden
=
false
rightLineView
.
isHidden
=
false
farRightButton
.
isHidden
=
false
farRightLineView
.
isHidden
=
false
if
buttonsConfig
.
names
.
count
>
3
{
leftButton
.
setTitle
(
buttonsConfig
.
names
[
0
],
for
:
.
normal
)
midButton
.
setTitle
(
buttonsConfig
.
names
[
1
],
for
:
.
normal
)
rightButton
.
setTitle
(
buttonsConfig
.
names
[
2
],
for
:
.
normal
)
farRightButton
.
setTitle
(
buttonsConfig
.
names
[
3
],
for
:
.
normal
)
}
if
buttonsConfig
.
actions
.
count
>
3
{
leftButtonClickEvent
=
buttonsConfig
.
actions
[
0
]
leftButton
.
addTarget
(
self
,
action
:
#selector(
leftButtonDidClick(_:)
)
,
for
:
.
touchUpInside
)
midButtonClickEvent
=
buttonsConfig
.
actions
[
1
]
midButton
.
addTarget
(
self
,
action
:
#selector(
midButtonDidClick(_:)
)
,
for
:
.
touchUpInside
)
rightButtonClickEvent
=
buttonsConfig
.
actions
[
2
]
rightButton
.
addTarget
(
self
,
action
:
#selector(
rightButtonDidClick(_:)
)
,
for
:
.
touchUpInside
)
farRightButtonClickEvent
=
buttonsConfig
.
actions
[
3
]
farRightButton
.
addTarget
(
self
,
action
:
#selector(
farRightButtonDidClick(_:)
)
,
for
:
.
touchUpInside
)
}
leftButton
.
snp
.
remakeConstraints
{
make
in
make
.
left
.
top
.
bottom
.
equalToSuperview
()
}
leftLineView
.
snp
.
remakeConstraints
{
make
in
make
.
left
.
equalTo
(
leftButton
.
snp
.
right
)
make
.
height
.
equalTo
(
16
)
make
.
width
.
equalTo
(
0.5
)
make
.
centerY
.
equalToSuperview
()
}
midButton
.
snp
.
remakeConstraints
{
make
in
make
.
left
.
equalTo
(
leftLineView
.
snp
.
right
)
make
.
top
.
bottom
.
equalToSuperview
()
make
.
width
.
equalTo
(
leftButton
)
}
rightLineView
.
snp
.
remakeConstraints
{
make
in
make
.
left
.
equalTo
(
midButton
.
snp
.
right
)
make
.
height
.
equalTo
(
16
)
make
.
width
.
equalTo
(
0.5
)
make
.
centerY
.
equalToSuperview
()
}
rightButton
.
snp
.
remakeConstraints
{
make
in
make
.
left
.
equalTo
(
rightLineView
.
snp
.
right
)
make
.
top
.
bottom
.
equalToSuperview
()
make
.
width
.
equalTo
(
leftButton
)
}
farRightLineView
.
snp
.
remakeConstraints
{
make
in
make
.
left
.
equalTo
(
rightButton
.
snp
.
right
)
make
.
height
.
equalTo
(
16
)
make
.
width
.
equalTo
(
0.5
)
make
.
centerY
.
equalToSuperview
()
}
farRightButton
.
snp
.
remakeConstraints
{
make
in
make
.
left
.
equalTo
(
farRightLineView
.
snp
.
right
)
make
.
top
.
right
.
bottom
.
equalToSuperview
()
make
.
width
.
equalTo
(
leftButton
)
}
}
}
}
}
...
@@ -307,7 +417,7 @@ extension YHResignDocumentStatusCell {
...
@@ -307,7 +417,7 @@ extension YHResignDocumentStatusCell {
fileCoverView
.
addSubview
(
fileNameLabel
)
fileCoverView
.
addSubview
(
fileNameLabel
)
subContainerView
.
addSubview
(
bottomLineView
)
subContainerView
.
addSubview
(
bottomLineView
)
subContainerView
.
addSubview
(
buttonsCoverView
)
subContainerView
.
addSubview
(
buttonsCoverView
)
buttonsCoverView
.
addSubviews
([
leftButton
,
leftLineView
,
midButton
,
rightLineView
,
rightButton
])
buttonsCoverView
.
addSubviews
([
leftButton
,
leftLineView
,
midButton
,
rightLineView
,
rightButton
,
farRightLineView
,
farRightButton
])
infoTitleLabel
.
snp
.
makeConstraints
{
make
in
infoTitleLabel
.
snp
.
makeConstraints
{
make
in
make
.
left
.
equalToSuperview
()
.
offset
(
18
)
make
.
left
.
equalToSuperview
()
.
offset
(
18
)
...
@@ -387,6 +497,19 @@ extension YHResignDocumentStatusCell {
...
@@ -387,6 +497,19 @@ extension YHResignDocumentStatusCell {
rightButton
.
snp
.
makeConstraints
{
make
in
rightButton
.
snp
.
makeConstraints
{
make
in
make
.
left
.
equalTo
(
rightLineView
.
snp
.
right
)
make
.
left
.
equalTo
(
rightLineView
.
snp
.
right
)
make
.
top
.
bottom
.
equalToSuperview
()
make
.
width
.
equalTo
(
leftButton
)
}
farRightLineView
.
snp
.
makeConstraints
{
make
in
make
.
left
.
equalTo
(
rightButton
.
snp
.
right
)
make
.
height
.
equalTo
(
16
)
make
.
width
.
equalTo
(
0.5
)
make
.
centerY
.
equalToSuperview
()
}
farRightButton
.
snp
.
makeConstraints
{
make
in
make
.
left
.
equalTo
(
farRightLineView
.
snp
.
right
)
make
.
top
.
right
.
bottom
.
equalToSuperview
()
make
.
top
.
right
.
bottom
.
equalToSuperview
()
make
.
width
.
equalTo
(
leftButton
)
make
.
width
.
equalTo
(
leftButton
)
}
}
...
...
galaxy/galaxy/Classes/Modules/IntelligentService(服务中心)/Resign(续签)/ResignDocumentManagement(续签文书管理)/V/YHResignDocumentUploadActionCell.swift
0 → 100644
View file @
ac8638a6
//
// YHResignDocumentUploadActionCell.swift
// galaxy
//
// Created by alexzzw on 2024/10/8.
// Copyright © 2024 https://www.galaxy-immi.com. All rights reserved.
//
import
UIKit
class
YHResignDocumentUploadActionCell
:
YHResignDocumentCell
{
static
let
cellReuseIdentifier
=
"YHResignDocumentUploadActionCell"
var
uploadButtonClickEvent
:
(()
->
Void
)?
var
sureButtonClickEvent
:
(()
->
Void
)?
private
lazy
var
uploadView
:
YHWorkItemAddView
=
{
let
view
=
YHWorkItemAddView
()
view
.
addBtn
.
setTitle
(
"上传已签署件"
.
local
,
for
:
.
normal
)
view
.
addBtn
.
setImage
(
UIImage
(
named
:
"document_upload"
),
for
:
.
normal
)
view
.
clickBlock
=
{[
weak
self
]
in
guard
let
self
=
self
else
{
return
}
self
.
uploadButtonClickEvent
?()
}
return
view
}()
private
lazy
var
promptLabel
:
UILabel
=
{
let
label
=
UILabel
()
label
.
font
=
UIFont
.
PFSC_R
(
ofSize
:
12
)
label
.
textColor
=
UIColor
.
labelTextColor2
label
.
numberOfLines
=
0
label
.
lineBreakMode
=
.
byCharWrapping
let
paragraphStyle
=
NSMutableParagraphStyle
()
paragraphStyle
.
lineHeightMultiple
=
1.19
let
attributedText
=
NSAttributedString
(
string
:
"注意:1.支持PDF、JPEG、JPG、PNG、BMP、TIFF文件格式,文件大小不限制;2.上传成功后会自动更新文件名;3.最多上传10张图片或文件,若有问题联系文案老师"
,
attributes
:
[
NSAttributedString
.
Key
.
paragraphStyle
:
paragraphStyle
]
)
label
.
attributedText
=
attributedText
return
label
}()
private
lazy
var
sureButton
:
UIButton
=
{
let
button
=
UIButton
(
type
:
.
custom
)
button
.
titleLabel
?
.
font
=
UIFont
.
PFSC_M
(
ofSize
:
16
)
let
buttonName
=
"确定已上传,提交"
button
.
setTitle
(
buttonName
,
for
:
.
normal
)
button
.
setTitle
(
buttonName
,
for
:
.
highlighted
)
button
.
setTitleColor
(
UIColor
(
hex
:
0xffffff
),
for
:
.
normal
)
button
.
setTitleColor
(
UIColor
(
hex
:
0xffffff
),
for
:
.
highlighted
)
button
.
addTarget
(
self
,
action
:
#selector(
sureButtonClicked
)
,
for
:
.
touchUpInside
)
button
.
layer
.
cornerRadius
=
kCornerRadius3
button
.
clipsToBounds
=
true
button
.
backgroundColor
=
.
brandMainColor
return
button
}()
override
init
(
style
:
UITableViewCell
.
CellStyle
,
reuseIdentifier
:
String
?)
{
super
.
init
(
style
:
style
,
reuseIdentifier
:
reuseIdentifier
)
setupUI
()
}
required
init
?(
coder
:
NSCoder
)
{
fatalError
(
"init(coder:) has not been implemented"
)
}
func
setupCellInfo
(
uploadName
:
String
,
isUploadButtonEnable
:
Bool
=
false
,
isSureButtonEnable
:
Bool
=
false
,
topMargin
:
CGFloat
=
16
)
{
uploadView
.
addBtn
.
setTitle
(
uploadName
.
local
,
for
:
.
normal
)
uploadView
.
alpha
=
isUploadButtonEnable
?
1
:
0.4
uploadView
.
addBtn
.
isEnabled
=
isUploadButtonEnable
sureButton
.
alpha
=
isSureButtonEnable
?
1
:
0.4
sureButton
.
isEnabled
=
isSureButtonEnable
uploadView
.
snp
.
remakeConstraints
{
make
in
make
.
top
.
equalToSuperview
()
.
offset
(
topMargin
)
make
.
left
.
equalToSuperview
()
.
offset
(
18
)
make
.
right
.
equalToSuperview
()
.
offset
(
-
18
)
make
.
height
.
equalTo
(
45
)
}
}
}
extension
YHResignDocumentUploadActionCell
{
@objc
private
func
sureButtonClicked
()
{
sureButtonClickEvent
?()
}
private
func
setupUI
()
{
updateCellCorner
(
.
bottom
)
subContainerView
.
addSubview
(
uploadView
)
subContainerView
.
addSubview
(
promptLabel
)
subContainerView
.
addSubview
(
sureButton
)
uploadView
.
snp
.
makeConstraints
{
make
in
make
.
top
.
equalToSuperview
()
.
offset
(
16
)
make
.
left
.
equalToSuperview
()
.
offset
(
18
)
make
.
right
.
equalToSuperview
()
.
offset
(
-
18
)
make
.
height
.
equalTo
(
45
)
}
promptLabel
.
snp
.
makeConstraints
{
make
in
make
.
top
.
equalTo
(
uploadView
.
snp
.
bottom
)
.
offset
(
16
)
make
.
left
.
equalTo
(
uploadView
.
snp
.
left
)
make
.
right
.
lessThanOrEqualToSuperview
()
.
offset
(
-
18
)
}
sureButton
.
snp
.
makeConstraints
{
make
in
make
.
top
.
equalTo
(
promptLabel
.
snp
.
bottom
)
.
offset
(
16
)
make
.
left
.
equalTo
(
uploadView
.
snp
.
left
)
make
.
right
.
equalTo
(
uploadView
.
snp
.
right
)
make
.
bottom
.
equalToSuperview
()
.
offset
(
-
16
)
make
.
height
.
equalTo
(
46
)
}
}
}
galaxy/galaxy/Classes/Modules/IntelligentService(服务中心)/Resign(续签)/ResignDocumentManagement(续签文书管理)/V/YHResignDocumentUploadFileCell.swift
0 → 100644
View file @
ac8638a6
//
// YHResignDocumentUploadFileCell.swift
// galaxy
//
// Created by alexzzw on 2024/10/8.
// Copyright © 2024 https://www.galaxy-immi.com. All rights reserved.
//
import
UIKit
class
YHResignDocumentUploadFileCell
:
YHResignDocumentCell
{
static
let
cellReuseIdentifier
=
"YHResignDocumentUploadFileCell"
var
editButtonClickEvent
:
(()
->
Void
)?
private
lazy
var
fileIconView
:
UIImageView
=
{
let
view
=
UIImageView
()
view
.
image
=
UIImage
(
named
:
"my_cer_type_word"
)
return
view
}()
private
lazy
var
fileNameLabel
:
UILabel
=
{
let
label
=
UILabel
()
label
.
textColor
=
UIColor
(
hexString
:
"#222222"
)
label
.
font
=
.
PFSC_M
(
ofSize
:
14
)
label
.
numberOfLines
=
0
label
.
lineBreakMode
=
.
byCharWrapping
return
label
}()
private
lazy
var
editButton
:
UIButton
=
{
let
button
=
UIButton
(
type
:
.
custom
)
button
.
setBackgroundImage
(
UIImage
(
named
:
"my_cer_btn_edit"
),
for
:
.
normal
)
button
.
addTarget
(
self
,
action
:
#selector(
editButtonClicked
)
,
for
:
.
touchUpInside
)
return
button
}()
override
init
(
style
:
UITableViewCell
.
CellStyle
,
reuseIdentifier
:
String
?)
{
super
.
init
(
style
:
style
,
reuseIdentifier
:
reuseIdentifier
)
setupUI
()
}
required
init
?(
coder
:
NSCoder
)
{
fatalError
(
"init(coder:) has not been implemented"
)
}
func
setupCellInfo
(
_
fileName
:
String
,
cellType
:
YHResignRoundCellType
=
.
mid
)
{
fileNameLabel
.
text
=
fileName
updateFileIcon
(
fileName
)
updateCellCorner
(
cellType
)
}
}
extension
YHResignDocumentUploadFileCell
{
@objc
private
func
editButtonClicked
()
{
editButtonClickEvent
?()
}
private
func
setupUI
()
{
updateCellCorner
(
.
mid
)
subContainerView
.
addSubview
(
fileIconView
)
subContainerView
.
addSubview
(
fileNameLabel
)
subContainerView
.
addSubview
(
editButton
)
editButton
.
snp
.
makeConstraints
{
make
in
make
.
right
.
equalToSuperview
()
.
offset
(
-
18
)
make
.
centerY
.
equalToSuperview
()
make
.
width
.
height
.
equalTo
(
16
)
}
fileIconView
.
snp
.
makeConstraints
{
make
in
make
.
left
.
equalToSuperview
()
.
offset
(
24
)
make
.
centerY
.
equalToSuperview
()
make
.
width
.
height
.
equalTo
(
31
)
}
fileNameLabel
.
snp
.
makeConstraints
{
make
in
make
.
top
.
greaterThanOrEqualToSuperview
()
.
offset
(
16
)
make
.
left
.
equalTo
(
fileIconView
.
snp
.
right
)
.
offset
(
12
)
make
.
right
.
lessThanOrEqualTo
(
editButton
.
snp
.
left
)
.
offset
(
-
10
)
make
.
centerY
.
equalToSuperview
()
make
.
bottom
.
lessThanOrEqualToSuperview
()
.
offset
(
-
16
)
}
editButton
.
YH_clickEdgeInsets
=
UIEdgeInsets
(
top
:
10
,
left
:
10
,
bottom
:
10
,
right
:
10
)
}
private
func
updateFileIcon
(
_
fileName
:
String
)
{
let
suffix
=
fileName
.
pathExtension
.
lowercased
()
var
iconImgName
=
""
if
suffix
==
"jpeg"
{
iconImgName
=
"my_cer_type_jpg"
}
else
if
suffix
==
"jpg"
{
iconImgName
=
"my_cer_type_jpg"
}
else
if
suffix
==
"png"
{
iconImgName
=
"my_cer_type_png"
}
else
if
suffix
==
"pdf"
{
iconImgName
=
"my_cer_type_pdf"
}
else
if
suffix
==
"doc"
||
suffix
==
"docx"
{
iconImgName
=
"my_cer_type_word"
}
else
if
suffix
==
"ppt"
||
suffix
==
"pptx"
{
iconImgName
=
"my_cer_type_ppt"
}
else
if
suffix
==
"bmp"
{
iconImgName
=
"my_cer_type_bmp"
}
else
if
suffix
==
"tiff"
{
iconImgName
=
"my_cer_type_tiff"
}
else
if
suffix
==
"xls"
||
suffix
==
"xlsx"
{
iconImgName
=
"my_cer_type_excel"
}
fileIconView
.
image
=
UIImage
(
named
:
iconImgName
)
}
}
galaxy/galaxy/Classes/Modules/IntelligentService(服务中心)/Resign(续签)/ResignDocumentManagement(续签文书管理)/V/YHResignDocumentUploadHeaderCell.swift
0 → 100644
View file @
ac8638a6
//
// YHResignDocumentUploadHeaderCell.swift
// galaxy
//
// Created by alexzzw on 2024/10/8.
// Copyright © 2024 https://www.galaxy-immi.com. All rights reserved.
//
import
UIKit
class
YHResignDocumentUploadHeaderCell
:
YHResignDocumentCell
{
static
let
cellReuseIdentifier
=
"YHResignDocumentUploadHeaderCell"
private
lazy
var
infoTitleLabel
:
UILabel
=
{
let
label
=
UILabel
()
label
.
font
=
.
PFSC_M
(
ofSize
:
17
)
label
.
textColor
=
.
mainTextColor
return
label
}()
private
lazy
var
bottomLineView
:
UIView
=
{
let
view
=
UIView
()
view
.
backgroundColor
=
.
separatorColor
return
view
}()
override
init
(
style
:
UITableViewCell
.
CellStyle
,
reuseIdentifier
:
String
?)
{
super
.
init
(
style
:
style
,
reuseIdentifier
:
reuseIdentifier
)
setupUI
()
}
required
init
?(
coder
:
NSCoder
)
{
fatalError
(
"init(coder:) has not been implemented"
)
}
func
setupCellInfo
(
_
title
:
String
?)
{
infoTitleLabel
.
text
=
title
}
}
extension
YHResignDocumentUploadHeaderCell
{
private
func
setupUI
()
{
updateCellCorner
(
.
top
)
subContainerView
.
addSubview
(
infoTitleLabel
)
subContainerView
.
addSubview
(
bottomLineView
)
bottomLineView
.
snp
.
makeConstraints
{
make
in
make
.
bottom
.
equalToSuperview
()
make
.
height
.
equalTo
(
0.5
)
make
.
left
.
equalToSuperview
()
.
offset
(
18
)
make
.
right
.
equalToSuperview
()
.
offset
(
-
18
)
}
infoTitleLabel
.
snp
.
makeConstraints
{
make
in
make
.
left
.
equalToSuperview
()
.
offset
(
18
)
make
.
right
.
lessThanOrEqualToSuperview
()
.
offset
(
-
18
)
make
.
top
.
equalToSuperview
()
.
offset
(
16
)
make
.
bottom
.
equalToSuperview
()
.
offset
(
-
12
)
}
}
}
galaxy/galaxy/Classes/Modules/IntelligentService(服务中心)/Resign(续签)/ResignDocumentManagement(续签文书管理)/VM/YHResignDocumentViewModel.swift
View file @
ac8638a6
...
@@ -8,6 +8,11 @@
...
@@ -8,6 +8,11 @@
import
UIKit
import
UIKit
enum
YHResignDocumentUploadSignedDocType
:
Int
{
case
upload
=
1
case
submit
=
2
}
class
YHResignDocumentViewModel
:
YHBaseViewModel
{
class
YHResignDocumentViewModel
:
YHBaseViewModel
{
var
documentList
:
YHResignDocumentListModel
=
YHResignDocumentListModel
()
var
documentList
:
YHResignDocumentListModel
=
YHResignDocumentListModel
()
...
@@ -156,4 +161,42 @@ class YHResignDocumentViewModel: YHBaseViewModel {
...
@@ -156,4 +161,42 @@ class YHResignDocumentViewModel: YHBaseViewModel {
}
}
}
}
func
sendOriginalDoc
(
_
docId
:
Int
,
_
email
:
String
,
callBackBlock
:
@escaping
(
_
success
:
Bool
,
_
error
:
YHErrorModel
?)
->
()
)
{
let
params
:
[
String
:
Any
]
=
[
"docId"
:
docId
,
"email"
:
email
]
let
strUrl
=
YHBaseUrlManager
.
shared
.
curURL
()
+
YHAllApiName
.
ResignDocument
.
sendOriginalDoc
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
uploadSignedDoc
(
_
docId
:
Int
,
type
:
YHResignDocumentUploadSignedDocType
,
_
signedDocument
:
[
YHResignDocumentUploadSignedDocument
],
callBackBlock
:
@escaping
(
_
success
:
Bool
,
_
error
:
YHErrorModel
?)
->
()
)
{
let
docDics
=
signedDocument
.
map
{
$0
.
getUploadDict
()
}
let
params
:
[
String
:
Any
]
=
[
"docId"
:
docId
,
"type"
:
type
.
rawValue
,
"signedDocument"
:
docDics
]
let
strUrl
=
YHBaseUrlManager
.
shared
.
curURL
()
+
YHAllApiName
.
ResignDocument
.
uploadSignedDoc
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
)
}
}
}
}
galaxy/galaxy/Classes/Tools/NetWork/YHAllApiName.swift
View file @
ac8638a6
...
@@ -546,6 +546,10 @@ class YHAllApiName {
...
@@ -546,6 +546,10 @@ class YHAllApiName {
static
let
previewResginDocument
=
"super-app/renewal/views"
static
let
previewResginDocument
=
"super-app/renewal/views"
// 获取临时链接
// 获取临时链接
static
let
getResginDocumentUrl
=
"super-app/renewal/doc/url"
static
let
getResginDocumentUrl
=
"super-app/renewal/doc/url"
// 发送原始文件
static
let
sendOriginalDoc
=
"super-app/renewal/send-original-doc"
// 上传签署文件
static
let
uploadSignedDoc
=
"super-app/renewal/upload-signed-doc"
}
}
// 续签预约
// 续签预约
...
...
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