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
56a922fd
Commit
56a922fd
authored
Apr 03, 2024
by
pete谢兆麟
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
我的签字bug修复
parent
0a877c4b
Changes
6
Show whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
130 additions
and
20 deletions
+130
-20
YHMyDocumentsDetailViewController.swift
...Documents(我的文书)/C/YHMyDocumentsDetailViewController.swift
+32
-6
YHDocumentFileItemView.swift
...ce(服务中心)/MyDocuments(我的文书)/V/YHDocumentFileItemView.swift
+1
-1
YHDocumentToActionTableViewCell.swift
...MyDocuments(我的文书)/V/YHDocumentToActionTableViewCell.swift
+33
-2
YHDocumentUploadView.swift
...vice(服务中心)/MyDocuments(我的文书)/V/YHDocumentUploadView.swift
+1
-5
YHMySignatureDetailViewController.swift
...Signature(我的签字)/C/YHMySignatureDetailViewController.swift
+30
-5
YHMyFileMethodTableViewCell.swift
...中心)/MySignature(我的签字)/V/YHMyFileMethodTableViewCell.swift
+33
-1
No files found.
galaxy/galaxy/Classes/Modules/IntelligentService(服务中心)/MyDocuments(我的文书)/C/YHMyDocumentsDetailViewController.swift
View file @
56a922fd
...
...
@@ -82,19 +82,27 @@ class YHMyDocumentsDetailViewController: YHBaseViewController {
self
.
promptView
.
isHidden
=
true
self
.
bottomButton
.
isEnabled
=
true
self
.
bottomView
.
isHidden
=
false
self
.
bottomButton
.
alpha
=
1
self
.
bottomButton
.
setTitle
(
"确定已签章,提交"
,
for
:
.
normal
)
}
else
if
state
==
4
{
self
.
promptView
.
isHidden
=
true
self
.
bottomButton
.
isEnabled
=
false
self
.
bottomButton
.
alpha
=
0.4
self
.
bottomView
.
isHidden
=
false
self
.
bottomButton
.
setTitle
(
"提交成功"
,
for
:
.
normal
)
}
else
if
state
==
5
{
self
.
promptView
.
isHidden
=
true
self
.
bottomView
.
isHidden
=
true
self
.
bottomButton
.
isEnabled
=
true
self
.
bottomButton
.
alpha
=
1
self
.
bottomButton
.
setTitle
(
"确定已签章,提交"
,
for
:
.
normal
)
}
else
{
self
.
promptView
.
isHidden
=
false
self
.
promptView
.
setPrompt
(
self
.
viewModel
.
mainModel
?
.
writing_document
.
doc_sign
.
audit_opinion
??
""
)
self
.
bottomButton
.
isEnabled
=
true
self
.
bottomView
.
isHidden
=
false
self
.
bottomButton
.
alpha
=
1
self
.
bottomButton
.
setTitle
(
"确定已签章,提交"
,
for
:
.
normal
)
}
self
.
stepView
.
currentIndex
=
1
}
...
...
@@ -107,6 +115,7 @@ class YHMyDocumentsDetailViewController: YHBaseViewController {
viewModel
?
.
requestSignCallBack
(
"
\(
self
.
viewModel
.
mainModel
?
.
writing_document
.
doc_sign
.
id
??
0
)
"
,
callBackBlock
:
{[
weak
self
]
success
,
error
in
guard
let
self
=
self
else
{
return
}
self
.
isSign
=
success
self
.
tableView
.
reloadData
()
})
}
...
...
@@ -242,6 +251,7 @@ class YHMyDocumentsDetailViewController: YHBaseViewController {
guard
let
self
=
self
else
{
return
}
if
success
{
self
.
getData
()
YHHUD
.
flash
(
message
:
"提交成功"
)
}
else
{
if
let
errorMsg
=
error
?
.
errorMsg
,
!
errorMsg
.
isEmpty
{
YHHUD
.
flash
(
message
:
errorMsg
)
...
...
@@ -256,6 +266,7 @@ class YHMyDocumentsDetailViewController: YHBaseViewController {
self
.
viewModel
.
requestDocumentSubmit
(
"
\(
self
.
id
)
"
)
{[
weak
self
]
success
,
error
in
guard
let
self
=
self
else
{
return
}
if
success
{
YHHUD
.
flash
(
message
:
"提交成功"
)
self
.
navigationController
?
.
popViewController
()
}
}
...
...
@@ -429,6 +440,7 @@ extension YHMyDocumentsDetailViewController: UITableViewDelegate, UITableViewDat
}
else
if
indexPath
.
row
==
1
{
let
cell
=
tableView
.
dequeueReusableCell
(
withClass
:
YHDocumentToActionTableViewCell
.
self
)
cell
.
dataSource
=
self
.
viewModel
.
mainModel
cell
.
isSign
=
self
.
isSign
cell
.
backgroundColor
=
.
clear
cell
.
contentView
.
backgroundColor
=
.
clear
cell
.
block
=
{
[
weak
self
]
type
in
...
...
@@ -438,7 +450,7 @@ extension YHMyDocumentsDetailViewController: UITableViewDelegate, UITableViewDat
self
.
viewModel
.
requestSignatureLook
(
"
\(
self
.
viewModel
.
mainModel
?
.
writing_document
.
doc_sign
.
id
??
0
)
"
)
{[
weak
self
]
success
,
error
in
guard
let
self
=
self
else
{
return
}
if
success
{
let
url
=
URL
(
string
:
self
.
viewModel
.
pageUrl
)
!
let
url
=
URL
(
string
:
self
.
viewModel
.
pageUrl
)
??
URL
(
fileURLWithPath
:
""
)
let
safariViewController
=
SFSafariViewController
(
url
:
url
)
safariViewController
.
dismissButtonStyle
=
.
close
safariViewController
.
delegate
=
self
...
...
@@ -454,7 +466,7 @@ extension YHMyDocumentsDetailViewController: UITableViewDelegate, UITableViewDat
YHCommonAlertView
.
show
(
"实名认证"
,
"为保证签署有效,请先实名认证"
,
"取消"
,
"去认证"
)
{
self
.
viewModel
.
requestSignaturePersonalURL
(
callBackBlock
:
{[
weak
self
]
success
,
error
in
guard
let
self
=
self
else
{
return
}
let
url
=
URL
(
string
:
self
.
viewModel
.
personalUrl
)
!
let
url
=
URL
(
string
:
self
.
viewModel
.
personalUrl
)
??
URL
(
fileURLWithPath
:
""
)
let
safariViewController
=
SFSafariViewController
(
url
:
url
)
safariViewController
.
dismissButtonStyle
=
.
close
safariViewController
.
delegate
=
self
...
...
@@ -463,7 +475,7 @@ extension YHMyDocumentsDetailViewController: UITableViewDelegate, UITableViewDat
}
}
else
{
if
success
??
false
{
let
url
=
URL
(
string
:
self
.
viewModel
.
pageUrl
)
!
let
url
=
URL
(
string
:
self
.
viewModel
.
pageUrl
)
??
URL
(
fileURLWithPath
:
""
)
let
safariViewController
=
SFSafariViewController
(
url
:
url
)
safariViewController
.
dismissButtonStyle
=
.
close
safariViewController
.
delegate
=
self
...
...
@@ -482,7 +494,7 @@ extension YHMyDocumentsDetailViewController: UITableViewDelegate, UITableViewDat
YHHUD
.
hide
()
guard
let
self
=
self
else
{
return
}
if
success
{
let
url
=
URL
(
string
:
self
.
viewModel
.
pageUrl
)
!
let
url
=
URL
(
string
:
self
.
viewModel
.
pageUrl
)
??
URL
(
fileURLWithPath
:
""
)
let
safariViewController
=
SFSafariViewController
(
url
:
url
)
safariViewController
.
dismissButtonStyle
=
.
close
safariViewController
.
delegate
=
self
...
...
@@ -520,8 +532,17 @@ extension YHMyDocumentsDetailViewController: UITableViewDelegate, UITableViewDat
guard
let
self
=
self
else
{
return
}
if
type
==
.
upload
{
self
.
oldUrl
=
""
let
count
=
self
.
viewModel
.
mainModel
?
.
writing_document
.
doc_sign
.
doc_return_manual
.
count
??
0
if
count
>=
10
{
YHHUD
.
flash
(
message
:
"最多上传10个文件"
)
return
}
var
maxCount
=
10
-
count
if
maxCount
>
9
{
maxCount
=
9
}
let
sheetView
=
YHDocumentUploadView
.
sheetView
()
sheetView
.
maxSelectCount
=
9
sheetView
.
maxSelectCount
=
maxCount
sheetView
.
uploadFilesBlock
=
{
[
weak
self
]
fileUrl
in
guard
let
self
=
self
else
{
return
}
...
...
@@ -569,8 +590,13 @@ extension YHMyDocumentsDetailViewController: UITableViewDelegate, UITableViewDat
if
type
==
.
reUpload
{
self
.
oldUrl
=
self
.
viewModel
.
mainModel
?
.
writing_document
.
doc_sign
.
doc_return_manual
[
index
]
let
count
=
self
.
viewModel
.
mainModel
?
.
writing_document
.
doc_sign
.
doc_return_manual
.
count
??
0
var
maxCount
=
10
-
count
if
maxCount
>
9
{
maxCount
=
9
}
let
sheetView
=
YHDocumentUploadView
.
sheetView
()
sheetView
.
maxSelectCount
=
9
sheetView
.
maxSelectCount
=
maxCount
sheetView
.
uploadFilesBlock
=
{
[
weak
self
]
fileUrl
in
guard
let
self
=
self
else
{
return
}
...
...
galaxy/galaxy/Classes/Modules/IntelligentService(服务中心)/MyDocuments(我的文书)/V/YHDocumentFileItemView.swift
View file @
56a922fd
...
...
@@ -132,7 +132,7 @@ class YHDocumentFileItemView: UIView {
iconImgName
=
"my_cer_type_ppt"
}
fileImageView
.
image
=
UIImage
(
named
:
iconImgName
)
fileNameLabel
.
text
=
name
+
"
."
+
suffix
+
"
(已签章)"
fileNameLabel
.
text
=
name
+
"(已签章)"
}
@objc
func
centerClick
()
{
...
...
galaxy/galaxy/Classes/Modules/IntelligentService(服务中心)/MyDocuments(我的文书)/V/YHDocumentToActionTableViewCell.swift
View file @
56a922fd
...
...
@@ -27,7 +27,11 @@ class YHDocumentToActionTableViewCell: UITableViewCell {
updateAllViews
()
}
}
var
isSign
:
Bool
=
false
{
didSet
{
updataButton
()
}
}
override
func
awakeFromNib
()
{
super
.
awakeFromNib
()
// Initialization code
...
...
@@ -209,7 +213,7 @@ class YHDocumentToActionTableViewCell: UITableViewCell {
func
updateAllViews
()
{
guard
let
dataSource
=
dataSource
else
{
return
}
let
suffix
=
dataSource
.
writing_document
.
name
.
pathExtension
.
lowercased
()
var
iconImgName
=
""
var
iconImgName
=
"
my_cer_type_pdf
"
if
suffix
==
"jpeg"
{
iconImgName
=
"my_cer_type_jpg"
}
else
if
suffix
==
"jpg"
{
...
...
@@ -244,5 +248,32 @@ class YHDocumentToActionTableViewCell: UITableViewCell {
block
(
.
look
)
}
}
func
updataButton
()
{
if
isSign
{
bottomLeftLineView
.
isHidden
=
true
editButton
.
isHidden
=
true
bottomRightLineView
.
snp
.
remakeConstraints
{
make
in
make
.
centerX
.
equalToSuperview
()
make
.
width
.
equalTo
(
1
)
make
.
bottom
.
equalTo
(
-
17.5
)
make
.
height
.
equalTo
(
16
)
}
submitButton
.
snp
.
remakeConstraints
{
make
in
make
.
bottom
.
equalToSuperview
()
make
.
top
.
equalTo
(
bottomView
.
snp
.
bottom
)
make
.
left
.
equalToSuperview
()
make
.
right
.
equalTo
(
bottomRightLineView
.
snp
.
left
)
}
lookButton
.
snp
.
remakeConstraints
{
make
in
make
.
bottom
.
equalToSuperview
()
make
.
top
.
equalTo
(
bottomView
.
snp
.
bottom
)
make
.
right
.
equalToSuperview
()
make
.
left
.
equalTo
(
bottomRightLineView
.
snp
.
left
)
}
}
}
}
galaxy/galaxy/Classes/Modules/IntelligentService(服务中心)/MyDocuments(我的文书)/V/YHDocumentUploadView.swift
View file @
56a922fd
...
...
@@ -114,11 +114,7 @@ class YHDocumentUploadView: UIView {
lazy
var
documentPickerVC
:
UIDocumentPickerViewController
=
{
let
docTypes
=
[
"public.image"
,
"com.adobe.pdf"
,
"com.microsoft.word.doc"
,
"org.openxmlformats.wordprocessingml.document"
,
"com.microsoft.powerpoint.ppt"
,
"org.openxmlformats.presentationml.presentation"
,]
"com.adobe.pdf"
]
if
#available(iOS 14.0, *)
{
var
arr
:[
UTType
]
=
[]
...
...
galaxy/galaxy/Classes/Modules/IntelligentService(服务中心)/MySignature(我的签字)/C/YHMySignatureDetailViewController.swift
View file @
56a922fd
...
...
@@ -67,19 +67,27 @@ class YHMySignatureDetailViewController: YHBaseViewController {
self
.
promptView
.
isHidden
=
true
self
.
bottomButton
.
isEnabled
=
true
self
.
bottomView
.
isHidden
=
false
self
.
bottomButton
.
alpha
=
1
self
.
bottomButton
.
setTitle
(
"确定已签章,提交"
,
for
:
.
normal
)
}
else
if
state
==
4
{
self
.
promptView
.
isHidden
=
true
self
.
bottomButton
.
isEnabled
=
false
self
.
bottomView
.
isHidden
=
false
self
.
bottomButton
.
alpha
=
0.4
self
.
bottomButton
.
setTitle
(
"提交成功"
,
for
:
.
normal
)
}
else
if
state
==
5
{
self
.
promptView
.
isHidden
=
true
self
.
bottomView
.
isHidden
=
true
self
.
bottomButton
.
isEnabled
=
true
self
.
bottomButton
.
alpha
=
1
self
.
bottomButton
.
setTitle
(
"确定已签章,提交"
,
for
:
.
normal
)
}
else
{
self
.
promptView
.
isHidden
=
false
self
.
promptView
.
setPrompt
(
self
.
viewModel
.
mainModel
?
.
audit_opinion
??
""
)
self
.
bottomButton
.
isEnabled
=
true
self
.
bottomView
.
isHidden
=
false
self
.
bottomButton
.
alpha
=
1
self
.
bottomButton
.
setTitle
(
"确定已签章,提交"
,
for
:
.
normal
)
}
self
.
tableView
.
reloadData
()
}
else
{
...
...
@@ -90,6 +98,7 @@ class YHMySignatureDetailViewController: YHBaseViewController {
viewModel
?
.
requestSignCallBack
(
"
\(
self
.
id
)
"
,
callBackBlock
:
{[
weak
self
]
success
,
error
in
guard
let
self
=
self
else
{
return
}
self
.
isSign
=
success
self
.
tableView
.
reloadData
()
})
}
...
...
@@ -210,6 +219,7 @@ class YHMySignatureDetailViewController: YHBaseViewController {
guard
let
self
=
self
else
{
return
}
if
success
{
self
.
getData
()
YHHUD
.
flash
(
message
:
"提交成功"
)
}
else
{
if
let
errorMsg
=
error
?
.
errorMsg
,
!
errorMsg
.
isEmpty
{
YHHUD
.
flash
(
message
:
errorMsg
)
...
...
@@ -326,6 +336,7 @@ extension YHMySignatureDetailViewController: UITableViewDelegate, UITableViewDat
}
else
if
indexPath
.
row
==
1
{
let
cell
=
tableView
.
dequeueReusableCell
(
withClass
:
YHSignatureToActionTableViewCell
.
self
)
cell
.
dataSource
=
self
.
viewModel
.
mainModel
cell
.
isSign
=
self
.
isSign
cell
.
backgroundColor
=
.
clear
cell
.
contentView
.
backgroundColor
=
.
clear
cell
.
block
=
{
[
weak
self
]
type
in
...
...
@@ -337,7 +348,7 @@ extension YHMySignatureDetailViewController: UITableViewDelegate, UITableViewDat
YHHUD
.
hide
()
guard
let
self
=
self
else
{
return
}
if
success
{
let
url
=
URL
(
string
:
self
.
viewModel
.
pageUrl
)
!
let
url
=
URL
(
string
:
self
.
viewModel
.
pageUrl
)
??
URL
(
fileURLWithPath
:
""
)
let
safariViewController
=
SFSafariViewController
(
url
:
url
)
safariViewController
.
dismissButtonStyle
=
.
close
safariViewController
.
delegate
=
self
...
...
@@ -355,7 +366,7 @@ extension YHMySignatureDetailViewController: UITableViewDelegate, UITableViewDat
YHCommonAlertView
.
show
(
"实名认证"
,
"为保证签署有效,请先实名认证"
,
"取消"
,
"去认证"
)
{
self
.
viewModel
.
requestSignaturePersonalURL
(
callBackBlock
:
{[
weak
self
]
success
,
error
in
guard
let
self
=
self
else
{
return
}
let
url
=
URL
(
string
:
self
.
viewModel
.
personalUrl
)
!
let
url
=
URL
(
string
:
self
.
viewModel
.
personalUrl
)
??
URL
(
fileURLWithPath
:
""
)
let
safariViewController
=
SFSafariViewController
(
url
:
url
)
safariViewController
.
dismissButtonStyle
=
.
close
safariViewController
.
delegate
=
self
...
...
@@ -364,7 +375,7 @@ extension YHMySignatureDetailViewController: UITableViewDelegate, UITableViewDat
}
}
else
{
if
success
??
false
{
let
url
=
URL
(
string
:
self
.
viewModel
.
pageUrl
)
!
let
url
=
URL
(
string
:
self
.
viewModel
.
pageUrl
)
??
URL
(
fileURLWithPath
:
""
)
let
safariViewController
=
SFSafariViewController
(
url
:
url
)
safariViewController
.
dismissButtonStyle
=
.
close
safariViewController
.
delegate
=
self
...
...
@@ -383,7 +394,7 @@ extension YHMySignatureDetailViewController: UITableViewDelegate, UITableViewDat
YHHUD
.
hide
()
guard
let
self
=
self
else
{
return
}
if
success
{
let
url
=
URL
(
string
:
self
.
viewModel
.
pageUrl
)
!
let
url
=
URL
(
string
:
self
.
viewModel
.
pageUrl
)
??
URL
(
fileURLWithPath
:
""
)
let
safariViewController
=
SFSafariViewController
(
url
:
url
)
safariViewController
.
dismissButtonStyle
=
.
close
safariViewController
.
delegate
=
self
...
...
@@ -421,8 +432,17 @@ extension YHMySignatureDetailViewController: UITableViewDelegate, UITableViewDat
guard
let
self
=
self
else
{
return
}
if
type
==
.
upload
{
self
.
oldUrl
=
""
let
count
=
self
.
viewModel
.
mainModel
?
.
doc_return_manual
.
count
??
0
if
count
>=
10
{
YHHUD
.
flash
(
message
:
"最多上传10个文件"
)
return
}
var
maxCount
=
10
-
count
if
maxCount
>
9
{
maxCount
=
9
}
let
sheetView
=
YHDocumentUploadView
.
sheetView
()
sheetView
.
maxSelectCount
=
9
sheetView
.
maxSelectCount
=
maxCount
sheetView
.
uploadFilesBlock
=
{
[
weak
self
]
fileUrl
in
guard
let
self
=
self
else
{
return
}
...
...
@@ -470,6 +490,11 @@ extension YHMySignatureDetailViewController: UITableViewDelegate, UITableViewDat
if
type
==
.
reUpload
{
self
.
oldUrl
=
self
.
viewModel
.
mainModel
?
.
doc_return_manual
[
index
]
let
count
=
self
.
viewModel
.
mainModel
?
.
doc_return_manual
.
count
??
0
var
maxCount
=
10
-
count
if
maxCount
>
9
{
maxCount
=
9
}
let
sheetView
=
YHDocumentUploadView
.
sheetView
()
sheetView
.
maxSelectCount
=
9
sheetView
.
uploadFilesBlock
=
{
...
...
galaxy/galaxy/Classes/Modules/IntelligentService(服务中心)/MySignature(我的签字)/V/YHMyFileMethodTableViewCell.swift
View file @
56a922fd
...
...
@@ -39,6 +39,11 @@ class YHSignatureToActionTableViewCell: UITableViewCell {
}
}
var
isSign
:
Bool
=
false
{
didSet
{
updataButton
()
}
}
override
func
awakeFromNib
()
{
super
.
awakeFromNib
()
// Initialization code
...
...
@@ -220,7 +225,7 @@ class YHSignatureToActionTableViewCell: UITableViewCell {
func
updateAllViews
()
{
guard
let
dataSource
=
dataSource
else
{
return
}
let
suffix
=
dataSource
.
doc_type_name
.
pathExtension
.
lowercased
()
var
iconImgName
=
"my_cer_type_
word
"
var
iconImgName
=
"my_cer_type_
pdf
"
if
suffix
==
"jpeg"
{
iconImgName
=
"my_cer_type_jpg"
}
else
if
suffix
==
"jpg"
{
...
...
@@ -255,5 +260,32 @@ class YHSignatureToActionTableViewCell: UITableViewCell {
block
(
.
look
)
}
}
func
updataButton
()
{
if
isSign
{
bottomLeftLineView
.
isHidden
=
true
editButton
.
isHidden
=
true
bottomRightLineView
.
snp
.
remakeConstraints
{
make
in
make
.
centerX
.
equalToSuperview
()
make
.
width
.
equalTo
(
1
)
make
.
bottom
.
equalTo
(
-
17.5
)
make
.
height
.
equalTo
(
16
)
}
submitButton
.
snp
.
remakeConstraints
{
make
in
make
.
bottom
.
equalToSuperview
()
make
.
top
.
equalTo
(
bottomView
.
snp
.
bottom
)
make
.
left
.
equalToSuperview
()
make
.
right
.
equalTo
(
bottomRightLineView
.
snp
.
left
)
}
lookButton
.
snp
.
remakeConstraints
{
make
in
make
.
bottom
.
equalToSuperview
()
make
.
top
.
equalTo
(
bottomView
.
snp
.
bottom
)
make
.
right
.
equalToSuperview
()
make
.
left
.
equalTo
(
bottomRightLineView
.
snp
.
left
)
}
}
}
}
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