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
f6a8337c
Commit
f6a8337c
authored
Mar 29, 2024
by
David黄金龙
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
我的 文件列表 逻辑
parent
7f53647e
Changes
7
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
174 additions
and
67 deletions
+174
-67
YHMyDocumentsListViewController.swift
...MyDocuments(我的文书)/C/YHMyDocumentsListViewController.swift
+86
-19
YHMyDocumentsModel.swift
...ce(服务中心)/MyDocuments(我的文书)/Model/YHMyDocumentsModel.swift
+4
-0
YHDocListBottomView.swift
...rvice(服务中心)/MyDocuments(我的文书)/V/YHDocListBottomView.swift
+15
-0
YHDocListCell.swift
...gentService(服务中心)/MyDocuments(我的文书)/V/YHDocListCell.swift
+47
-44
YHMyDocumentsListViewModel.swift
...ocuments(我的文书)/ViewModel/YHMyDocumentsListViewModel.swift
+21
-0
YHSchemeHeadTotalScoreView.swift
...务中心)/MyScheme(我的方案)/View/YHSchemeHeadTotalScoreView.swift
+1
-1
YHAllApiName.swift
galaxy/galaxy/Classes/Tools/NetWork/YHAllApiName.swift
+0
-3
No files found.
galaxy/galaxy/Classes/Modules/IntelligentService(服务中心)/MyDocuments(我的文书)/C/YHMyDocumentsListViewController.swift
View file @
f6a8337c
...
@@ -12,19 +12,15 @@ import UIKit
...
@@ -12,19 +12,15 @@ import UIKit
*/
*/
class
YHMyDocumentsListViewController
:
YHBaseViewController
{
class
YHMyDocumentsListViewController
:
YHBaseViewController
{
var
bottomButton
:
UIButton
!
var
tableView
:
UITableView
!
var
tableView
:
UITableView
!
var
dataSource
:
[
YHMyDocumentsListModel
]?
var
dataSource
:
[
YHMyDocumentsListModel
]?
var
viewModel
:
YHMyDocumentsListViewModel
?
var
viewModel
:
YHMyDocumentsListViewModel
?
var
orderId
:
Int
=
0
var
orderId
:
Int
=
0
var
mobile
:
String
=
""
var
mobile
:
String
=
""
var
arrIDs
:
[
Int
]
=
[]
//保存所有下载的id
private
var
isEditFlag
:
Bool
=
false
{
private
var
isEditFlag
:
Bool
=
false
didSet
{
updateUIForEditStatus
()
}
}
lazy
var
headSessionView
:
YHMyDocListHeaderView
=
{
lazy
var
headSessionView
:
YHMyDocListHeaderView
=
{
let
view
=
YHMyDocListHeaderView
()
let
view
=
YHMyDocListHeaderView
()
...
@@ -93,6 +89,17 @@ extension YHMyDocumentsListViewController {
...
@@ -93,6 +89,17 @@ extension YHMyDocumentsListViewController {
headSessionView
.
block
=
{
type
in
headSessionView
.
block
=
{
type
in
self
.
updateUIForClickButton
(
type
:
type
)
self
.
updateUIForClickButton
(
type
:
type
)
self
.
isEditFlag
=
type
==
.
downAll
?
true
:
false
self
.
isEditFlag
=
type
==
.
downAll
?
true
:
false
guard
let
model
=
self
.
viewModel
?
.
mainModel
else
{
return
}
for
item
in
model
.
docs
{
item
.
isEditFlag
=
self
.
isEditFlag
if
self
.
isEditFlag
{
item
.
isSelectedFlag
=
true
}
}
self
.
updateBottomViewNumbers
()
self
.
tableView
.
reloadData
()
}
}
view
.
addSubview
(
bottomView
)
view
.
addSubview
(
bottomView
)
...
@@ -104,14 +111,24 @@ extension YHMyDocumentsListViewController {
...
@@ -104,14 +111,24 @@ extension YHMyDocumentsListViewController {
bottomView
.
block
=
{
(
type
,
flag
)
in
bottomView
.
block
=
{
(
type
,
flag
)
in
if
type
==
.
downAllCheck
{
if
type
==
.
downAllCheck
{
//todo
self
.
readyToDownLoad
()
}
else
if
type
==
.
allChoice
{
}
else
if
type
==
.
allChoice
{
guard
let
model
=
self
.
viewModel
?
.
mainModel
else
{
return
}
var
tag
=
false
if
flag
{
if
flag
{
//全选
//全选
tag
=
true
}
else
{
}
else
{
//全选 的 反选
//全选 的 反选
tag
=
false
}
}
for
item
in
model
.
docs
{
item
.
isSelectedFlag
=
tag
}
self
.
updateBottomViewNumbers
()
}
}
self
.
tableView
.
reloadData
()
}
}
tableView
=
{
tableView
=
{
...
@@ -131,18 +148,10 @@ extension YHMyDocumentsListViewController {
...
@@ -131,18 +148,10 @@ extension YHMyDocumentsListViewController {
make
.
left
.
right
.
equalToSuperview
()
make
.
left
.
right
.
equalToSuperview
()
make
.
bottom
.
equalToSuperview
()
make
.
bottom
.
equalToSuperview
()
}
}
bottomView
.
layoutIfNeeded
()
bottomView
.
layoutIfNeeded
()
bottomView
.
bottomButton
.
addYinHeGradualLayer
()
bottomView
.
bottomButton
.
addYinHeGradualLayer
()
}
}
private
func
updateUIForEditStatus
()
{
//
}
private
func
updateUIForClickButton
(
type
:
ClickButtonType
)
{
private
func
updateUIForClickButton
(
type
:
ClickButtonType
)
{
bottomView
.
snp
.
removeConstraints
()
bottomView
.
snp
.
removeConstraints
()
tableView
.
snp
.
removeConstraints
()
tableView
.
snp
.
removeConstraints
()
...
@@ -167,6 +176,53 @@ extension YHMyDocumentsListViewController {
...
@@ -167,6 +176,53 @@ extension YHMyDocumentsListViewController {
}
}
}
}
}
}
private
func
updateBottomViewNumbers
()
{
guard
let
dataSource
=
viewModel
?
.
mainModel
else
{
return
}
let
count
=
dataSource
.
docs
.
count
var
selectedCount
:
Int
=
0
for
item
in
dataSource
.
docs
{
if
item
.
isSelectedFlag
{
selectedCount
+=
1
}
}
bottomView
.
updateNumber
(
allNumber
:
count
,
selectedNumber
:
selectedCount
)
}
private
func
readyToDownLoad
()
{
guard
let
dataSource
=
viewModel
?
.
mainModel
else
{
YHHUD
.
flash
(
message
:
"暂无数据"
)
return
}
arrIDs
.
removeAll
()
for
item
in
dataSource
.
docs
{
if
item
.
isSelectedFlag
{
arrIDs
.
append
(
item
.
id
)
}
}
if
arrIDs
.
isEmpty
{
YHHUD
.
flash
(
message
:
"至少选择一个下载项"
)
return
}
//弹窗 选择发送邮箱
if
let
orderID
=
UserDefaults
.
standard
.
value
(
forKey
:
"orderIdForPreview"
)
{
let
params
=
[
"order_id"
:
orderID
,
"ids"
:
arrIDs
,
"email"
:
"383913637@qq.com"
]
viewModel
?
.
sendEmailForDocs
(
params
,
callBackBlock
:
{
success
,
error
in
if
success
{
YHHUD
.
flash
(
message
:
"发送成功"
)
}
else
{
let
msg
=
error
?
.
errorMsg
??
"发送失败"
YHHUD
.
flash
(
message
:
msg
)
}
})
}
else
{
YHHUD
.
flash
(
message
:
"订单ID 为空"
)
}
}
}
}
extension
YHMyDocumentsListViewController
:
UITableViewDelegate
,
UITableViewDataSource
{
extension
YHMyDocumentsListViewController
:
UITableViewDelegate
,
UITableViewDataSource
{
...
@@ -185,10 +241,21 @@ extension YHMyDocumentsListViewController: UITableViewDelegate, UITableViewDataS
...
@@ -185,10 +241,21 @@ extension YHMyDocumentsListViewController: UITableViewDelegate, UITableViewDataS
}
}
func
tableView
(
_
tableView
:
UITableView
,
didSelectRowAt
indexPath
:
IndexPath
)
{
func
tableView
(
_
tableView
:
UITableView
,
didSelectRowAt
indexPath
:
IndexPath
)
{
let
model
=
viewModel
?
.
mainModel
?
.
docs
[
indexPath
.
row
]
let
vc
=
YHMyDocumentsDetailViewController
()
guard
let
dataSource
=
viewModel
?
.
mainModel
else
{
return
}
vc
.
id
=
model
?
.
id
??
0
if
self
.
isEditFlag
{
self
.
navigationController
?
.
pushViewController
(
vc
)
//编辑状态下的点击
let
model
=
dataSource
.
docs
[
indexPath
.
row
]
model
.
isSelectedFlag
=
!
model
.
isSelectedFlag
tableView
.
reloadRows
(
at
:
[
indexPath
],
with
:
UITableView
.
RowAnimation
.
none
)
updateBottomViewNumbers
()
}
else
{
let
model
=
dataSource
.
docs
[
indexPath
.
row
]
let
vc
=
YHMyDocumentsDetailViewController
()
vc
.
id
=
model
.
id
self
.
navigationController
?
.
pushViewController
(
vc
)
}
}
}
}
}
galaxy/galaxy/Classes/Modules/IntelligentService(服务中心)/MyDocuments(我的文书)/Model/YHMyDocumentsModel.swift
View file @
f6a8337c
...
@@ -27,6 +27,10 @@ class YHMyDocumentsListModel: YHBaseModel {
...
@@ -27,6 +27,10 @@ class YHMyDocumentsListModel: YHBaseModel {
var
contract_lock
:
Int
=
0
var
contract_lock
:
Int
=
0
var
is_second_page
:
Bool
=
false
var
is_second_page
:
Bool
=
false
var
audi_opinion
:
String
=
""
var
audi_opinion
:
String
=
""
var
isEditFlag
:
Bool
=
false
//是否为编辑状态
var
isSelectedFlag
:
Bool
=
true
//是否被选择 默认全部全部选择
}
}
class
YHMyDocumentsNameExtraModel
:
YHBaseModel
{
class
YHMyDocumentsNameExtraModel
:
YHBaseModel
{
...
...
galaxy/galaxy/Classes/Modules/IntelligentService(服务中心)/MyDocuments(我的文书)/V/YHDocListBottomView.swift
View file @
f6a8337c
...
@@ -61,6 +61,17 @@ class YHDocListBottomView: UIView {
...
@@ -61,6 +61,17 @@ class YHDocListBottomView: UIView {
view
.
backgroundColor
=
.
separatorColor
view
.
backgroundColor
=
.
separatorColor
return
view
return
view
}()
}()
func
updateNumber
(
allNumber
:
Int
,
selectedNumber
:
Int
)
{
titleLable
.
text
=
"已选"
+
selectedNumber
.
string
+
"条"
if
allNumber
==
selectedNumber
,
selectedNumber
>
0
{
checkButton
.
isSelected
=
true
}
else
{
checkButton
.
isSelected
=
false
}
}
}
}
private
extension
YHDocListBottomView
{
private
extension
YHDocListBottomView
{
...
@@ -101,6 +112,10 @@ private extension YHDocListBottomView {
...
@@ -101,6 +112,10 @@ private extension YHDocListBottomView {
@objc
func
clickCheckBtn
()
{
@objc
func
clickCheckBtn
()
{
checkButton
.
isSelected
=
!
checkButton
.
isSelected
checkButton
.
isSelected
=
!
checkButton
.
isSelected
block
?(
.
allChoice
,
checkButton
.
isSelected
)
block
?(
.
allChoice
,
checkButton
.
isSelected
)
if
checkButton
.
isSelected
==
false
{
titleLable
.
text
=
"已选"
+
0
.
string
+
"条"
}
}
}
@objc
func
clickDownloadBtn
()
{
@objc
func
clickDownloadBtn
()
{
...
...
galaxy/galaxy/Classes/Modules/IntelligentService(服务中心)/MyDocuments(我的文书)/V/YHDocListCell.swift
View file @
f6a8337c
...
@@ -41,6 +41,7 @@ class YHDocListCell: UITableViewCell {
...
@@ -41,6 +41,7 @@ class YHDocListCell: UITableViewCell {
button
.
setImage
(
UIImage
(
named
:
"my_doc_check_btn_0"
),
for
:
.
normal
)
button
.
setImage
(
UIImage
(
named
:
"my_doc_check_btn_0"
),
for
:
.
normal
)
button
.
setImage
(
UIImage
(
named
:
"my_doc_check_btn_1"
),
for
:
.
selected
)
button
.
setImage
(
UIImage
(
named
:
"my_doc_check_btn_1"
),
for
:
.
selected
)
button
.
addTarget
(
self
,
action
:
#selector(
clickCheckBtn
)
,
for
:
.
touchUpInside
)
button
.
addTarget
(
self
,
action
:
#selector(
clickCheckBtn
)
,
for
:
.
touchUpInside
)
button
.
isUserInteractionEnabled
=
false
return
button
return
button
}()
}()
...
@@ -115,10 +116,6 @@ class YHDocListCell: UITableViewCell {
...
@@ -115,10 +116,6 @@ class YHDocListCell: UITableViewCell {
make
.
width
.
equalTo
(
42
)
make
.
width
.
equalTo
(
42
)
make
.
height
.
equalTo
(
20
)
make
.
height
.
equalTo
(
20
)
}
}
centerView
.
addSubview
(
titleLabel
)
centerView
.
addSubview
(
titleLabel
)
titleLabel
.
snp
.
makeConstraints
{
make
in
titleLabel
.
snp
.
makeConstraints
{
make
in
make
.
top
.
equalTo
(
22
)
make
.
top
.
equalTo
(
22
)
...
@@ -139,53 +136,59 @@ class YHDocListCell: UITableViewCell {
...
@@ -139,53 +136,59 @@ class YHDocListCell: UITableViewCell {
func
updateAllViewsForDocs
()
{
func
updateAllViewsForDocs
()
{
guard
let
dataSource
=
dataSourceForDocs
else
{
return
}
guard
let
dataSource
=
dataSourceForDocs
else
{
return
}
titleLabel
.
text
=
dataSource
.
doc_type_name
titleLabel
.
text
=
dataSource
.
doc_type_name
if
dataSource
.
isEditFlag
{
/*
checkButton
.
isHidden
=
false
1: '待确认',
statusHoldView
.
isHidden
=
true
* 2: '待签章',
checkButton
.
isSelected
=
dataSource
.
isSelectedFlag
* 3: '已驳回',
* 4: '待核对',
* 5: '已签章',
* 6: '已定稿',
* 7: '已完成'
*/
var
statusTxt
=
""
var
color
:
UIColor
=
.
brandMainColor
let
status
=
dataSource
.
document_check_status
if
status
==
1
{
statusTxt
=
"待确认"
color
=
UIColor
.
brandMainColor
}
else
if
status
==
2
{
statusTxt
=
"待签章"
color
=
UIColor
.
brandMainColor
}
else
if
status
==
3
{
statusTxt
=
"已驳回"
color
=
UIColor
.
failColor
}
else
if
status
==
4
{
statusTxt
=
"待审核"
color
=
UIColor
.
warnColor
}
else
if
status
==
5
{
statusTxt
=
"已签章"
color
=
UIColor
.
successColor
}
else
if
status
==
6
{
statusTxt
=
"已定稿"
color
=
UIColor
.
labelTextColor2
}
else
if
status
==
7
{
statusTxt
=
"已完成"
color
=
UIColor
.
labelTextColor2
}
else
{
}
else
{
statusTxt
=
"--"
checkButton
.
isHidden
=
true
color
=
UIColor
.
brandMainColor
statusHoldView
.
isHidden
=
false
/*
* 1: '待确认',
* 2: '待签章',
* 3: '已驳回',
* 4: '待核对',
* 5: '已签章',
* 6: '已定稿',
* 7: '已完成'
*/
var
statusTxt
=
""
var
color
:
UIColor
=
.
brandMainColor
let
status
=
dataSource
.
document_check_status
if
status
==
1
{
statusTxt
=
"待确认"
color
=
UIColor
.
brandMainColor
}
else
if
status
==
2
{
statusTxt
=
"待签章"
color
=
UIColor
.
brandMainColor
}
else
if
status
==
3
{
statusTxt
=
"已驳回"
color
=
UIColor
.
failColor
}
else
if
status
==
4
{
statusTxt
=
"待审核"
color
=
UIColor
.
warnColor
}
else
if
status
==
5
{
statusTxt
=
"已签章"
color
=
UIColor
.
successColor
}
else
if
status
==
6
{
statusTxt
=
"已定稿"
color
=
UIColor
.
labelTextColor2
}
else
if
status
==
7
{
statusTxt
=
"已完成"
color
=
UIColor
.
labelTextColor2
}
else
{
statusTxt
=
"--"
color
=
UIColor
.
brandMainColor
}
statusLabel
.
text
=
statusTxt
statusLabel
.
textColor
=
color
}
}
statusLabel
.
text
=
statusTxt
statusLabel
.
textColor
=
color
}
}
func
updateAllViewsForSign
()
{
func
updateAllViewsForSign
()
{
guard
let
dataSource
=
dataSourceForSign
else
{
return
}
guard
let
dataSource
=
dataSourceForSign
else
{
return
}
}
}
}
}
...
...
galaxy/galaxy/Classes/Modules/IntelligentService(服务中心)/MyDocuments(我的文书)/ViewModel/YHMyDocumentsListViewModel.swift
View file @
f6a8337c
...
@@ -11,6 +11,7 @@ import UIKit
...
@@ -11,6 +11,7 @@ import UIKit
class
YHMyDocumentsListViewModel
:
YHBaseViewModel
{
class
YHMyDocumentsListViewModel
:
YHBaseViewModel
{
var
mainModel
:
YHMyDocumentsModel
?
var
mainModel
:
YHMyDocumentsModel
?
// 请求文书列表
func
requestDocumentsList
(
_
orderId
:
String
,
_
mobile
:
String
,
callBackBlock
:
@escaping
(
_
success
:
Bool
?,
_
error
:
YHErrorModel
?)
->
())
{
func
requestDocumentsList
(
_
orderId
:
String
,
_
mobile
:
String
,
callBackBlock
:
@escaping
(
_
success
:
Bool
?,
_
error
:
YHErrorModel
?)
->
())
{
let
params
:
[
String
:
Any
]
=
[
"order_id"
:
orderId
,
let
params
:
[
String
:
Any
]
=
[
"order_id"
:
orderId
,
"mobile"
:
mobile
]
"mobile"
:
mobile
]
...
@@ -34,4 +35,24 @@ class YHMyDocumentsListViewModel: YHBaseViewModel {
...
@@ -34,4 +35,24 @@ class YHMyDocumentsListViewModel: YHBaseViewModel {
callBackBlock
(
false
,
err
)
callBackBlock
(
false
,
err
)
}
}
}
}
//发送邮箱
func
sendEmailForDocs
(
_
params
:
[
String
:
Any
],
callBackBlock
:
@escaping
(
_
success
:
Bool
,
_
error
:
YHErrorModel
?)
->
())
{
let
strUrl
=
YHBaseUrlManager
.
shared
.
curURL
()
+
YHAllApiName
.
Signature
.
sendMail
let
_
=
YHNetRequest
.
getRequest
(
url
:
strUrl
,
params
:
params
)
{
[
weak
self
]
json
,
code
in
//1. json字符串 转 对象
guard
let
self
=
self
else
{
callBackBlock
(
false
,
nil
)
return
}
if
json
.
code
==
200
{
callBackBlock
(
true
,
nil
)
}
else
{
let
error
:
YHErrorModel
=
YHErrorModel
(
errorCode
:
Int32
(
json
.
code
),
errorMsg
:
json
.
msg
)
callBackBlock
(
false
,
error
)
}
}
failBlock
:
{
err
in
callBackBlock
(
false
,
err
)
}
}
}
}
galaxy/galaxy/Classes/Modules/IntelligentService(服务中心)/MyScheme(我的方案)/View/YHSchemeHeadTotalScoreView.swift
View file @
f6a8337c
...
@@ -54,7 +54,7 @@ class YHSchemeHeadTotalScoreView: UIView {
...
@@ -54,7 +54,7 @@ class YHSchemeHeadTotalScoreView: UIView {
scoreLabel
=
{
scoreLabel
=
{
let
label
=
UILabel
()
let
label
=
UILabel
()
label
.
font
=
UIFont
(
name
:
"AlibabaPuHuiTi-Bold"
,
size
:
24
)
label
.
font
=
UIFont
.
PFSC_B
(
ofSize
:
24
)
//UIFont
(name: "AlibabaPuHuiTi-Bold", size: 24)
label
.
textColor
=
UIColor
(
hex
:
0xd48638
)
label
.
textColor
=
UIColor
(
hex
:
0xd48638
)
label
.
textAlignment
=
.
right
label
.
textAlignment
=
.
right
label
.
text
=
"-"
label
.
text
=
"-"
...
...
galaxy/galaxy/Classes/Tools/NetWork/YHAllApiName.swift
View file @
f6a8337c
...
@@ -208,7 +208,6 @@ class YHAllApiName {
...
@@ -208,7 +208,6 @@ class YHAllApiName {
static
let
submit
=
"infoflow/my-doc/doc-submit"
static
let
submit
=
"infoflow/my-doc/doc-submit"
// 文书操作记录
// 文书操作记录
static
let
record
=
"infoflow/my-doc/document-operation-record"
static
let
record
=
"infoflow/my-doc/document-operation-record"
}
}
//我的证件
//我的证件
...
@@ -219,8 +218,6 @@ class YHAllApiName {
...
@@ -219,8 +218,6 @@ class YHAllApiName {
// 清单列表
// 清单列表
static
let
documentListApi
=
"infoflow/certificate/certificate_document_list"
static
let
documentListApi
=
"infoflow/certificate/certificate_document_list"
// 证件列表
// 证件列表
static
let
certificateListApi
=
"infoflow/needUploadItems"
static
let
certificateListApi
=
"infoflow/needUploadItems"
...
...
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