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
23cfdf03
Commit
23cfdf03
authored
Dec 26, 2024
by
DavidHuang
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'develop' of
http://gitlab.galaxy-immi.com/mobile-group/galaxy-iOS
into develop
parents
8c6f4c5c
36e7b262
Changes
13
Hide whitespace changes
Inline
Side-by-side
Showing
13 changed files
with
633 additions
and
117 deletions
+633
-117
project.pbxproj
galaxy/galaxy.xcodeproj/project.pbxproj
+16
-0
YHConfigModel.swift
galaxy/galaxy/Classes/Modules/Home(首页)/M/YHConfigModel.swift
+2
-0
YHIncomeRecordItemCell.swift
...我的信息流程)/IncomeRecord(收入记录)/V/YHIncomeRecordItemCell.swift
+3
-15
YHIncomeRecordSummaryCell.swift
...息流程)/IncomeRecord(收入记录)/V/YHIncomeRecordSummaryCell.swift
+17
-8
YHTotalIncomeCell.swift
...cess(我的信息流程)/IncomeRecord(收入记录)/V/YHTotalIncomeCell.swift
+3
-1
YHWorkingHoursStatementCell.swift
...程)/IncomeRecord(收入记录)/V/YHWorkingHoursStatementCell.swift
+3
-2
YHGCIncomeRecordViewController.swift
...IncomeRecord(收入记录)/C/YHGCIncomeRecordViewController.swift
+177
-89
YHGCIncomeRecordWorkExperienceViewController.swift
...入记录)/C/YHGCIncomeRecordWorkExperienceViewController.swift
+31
-1
YHGCIncomeRecordViewModel.swift
...流程)/IncomeRecord(收入记录)/VM/YHGCIncomeRecordViewModel.swift
+123
-0
YHGCIncomeRecordWorkExperienceViewModel.swift
...rd(收入记录)/VM/YHGCIncomeRecordWorkExperienceViewModel.swift
+72
-0
YHGCWorkExperienceModel.swift
...息流程)/WorkExperience(工作经验)/M/YHGCWorkExperienceModel.swift
+184
-0
YHGCWorkModel.swift
...rocess(我的信息流程)/WorkExperience(工作经验)/M/YHGCWorkModel.swift
+1
-0
YHLivePlayerViewController.swift
.../LivestreamSales(直播销售)/C/YHLivePlayerViewController.swift
+1
-1
No files found.
galaxy/galaxy.xcodeproj/project.pbxproj
View file @
23cfdf03
...
...
@@ -40,6 +40,8 @@
04307B902D1AB66100ED8E8D
/* YHGCPreviewMainApplicantInfoViewController.swift in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
04307B862D1AB66100ED8E8D
/* YHGCPreviewMainApplicantInfoViewController.swift */
;
};
04307B912D1AB66100ED8E8D
/* YHGCPreviewIncomeRecordViewController.swift in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
04307B852D1AB66100ED8E8D
/* YHGCPreviewIncomeRecordViewController.swift */
;
};
04307B932D1AB66100ED8E8D
/* YHGCPreviewWorkExpViewController.swift in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
04307B892D1AB66100ED8E8D
/* YHGCPreviewWorkExpViewController.swift */
;
};
04307B962D1BAFD400ED8E8D
/* YHGCIncomeRecordViewModel.swift in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
04307B952D1BAFD400ED8E8D
/* YHGCIncomeRecordViewModel.swift */
;
};
04307B982D1BB1AD00ED8E8D
/* YHGCIncomeRecordWorkExperienceViewModel.swift in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
04307B972D1BB1AD00ED8E8D
/* YHGCIncomeRecordWorkExperienceViewModel.swift */
;
};
045C0F7F2D12CA5F00BD2DC0
/* submit_page_scroll.gif in Resources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
045C0F4F2D12CA5E00BD2DC0
/* submit_page_scroll.gif */
;
};
045C0F802D12CA5F00BD2DC0
/* Localizable.xcstrings in Resources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
045C0F762D12CA5E00BD2DC0
/* Localizable.xcstrings */
;
};
045C0F812D12CA5F00BD2DC0
/* img_0.png in Resources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
045C0F5E2D12CA5E00BD2DC0
/* img_0.png */
;
};
...
...
@@ -1232,6 +1234,8 @@
04307B862D1AB66100ED8E8D
/* YHGCPreviewMainApplicantInfoViewController.swift */
=
{
isa
=
PBXFileReference
;
lastKnownFileType
=
sourcecode.swift
;
path
=
YHGCPreviewMainApplicantInfoViewController.swift
;
sourceTree
=
"<group>"
;
};
04307B882D1AB66100ED8E8D
/* YHGCPreviewOtherInformationViewController.swift */
=
{
isa
=
PBXFileReference
;
lastKnownFileType
=
sourcecode.swift
;
path
=
YHGCPreviewOtherInformationViewController.swift
;
sourceTree
=
"<group>"
;
};
04307B892D1AB66100ED8E8D
/* YHGCPreviewWorkExpViewController.swift */
=
{
isa
=
PBXFileReference
;
lastKnownFileType
=
sourcecode.swift
;
path
=
YHGCPreviewWorkExpViewController.swift
;
sourceTree
=
"<group>"
;
};
04307B952D1BAFD400ED8E8D
/* YHGCIncomeRecordViewModel.swift */
=
{
isa
=
PBXFileReference
;
lastKnownFileType
=
sourcecode.swift
;
path
=
YHGCIncomeRecordViewModel.swift
;
sourceTree
=
"<group>"
;
};
04307B972D1BB1AD00ED8E8D
/* YHGCIncomeRecordWorkExperienceViewModel.swift */
=
{
isa
=
PBXFileReference
;
lastKnownFileType
=
sourcecode.swift
;
path
=
YHGCIncomeRecordWorkExperienceViewModel.swift
;
sourceTree
=
"<group>"
;
};
045C09A12D12C2A800BD2DC0
/* YHGCMineSchemeViewController.swift */
=
{
isa
=
PBXFileReference
;
lastKnownFileType
=
sourcecode.swift
;
path
=
YHGCMineSchemeViewController.swift
;
sourceTree
=
"<group>"
;
};
045C0A142D12CA5E00BD2DC0
/* YHBaseViewController.swift */
=
{
isa
=
PBXFileReference
;
lastKnownFileType
=
sourcecode.swift
;
path
=
YHBaseViewController.swift
;
sourceTree
=
"<group>"
;
};
045C0A152D12CA5E00BD2DC0
/* YHBaseViewModel.swift */
=
{
isa
=
PBXFileReference
;
lastKnownFileType
=
sourcecode.swift
;
path
=
YHBaseViewModel.swift
;
sourceTree
=
"<group>"
;
};
...
...
@@ -2571,6 +2575,15 @@
path
=
C
;
sourceTree
=
"<group>"
;
};
04307B942D1BAE8800ED8E8D
/* VM */
=
{
isa
=
PBXGroup
;
children
=
(
04307B952D1BAFD400ED8E8D
/* YHGCIncomeRecordViewModel.swift */
,
04307B972D1BB1AD00ED8E8D
/* YHGCIncomeRecordWorkExperienceViewModel.swift */
,
);
path
=
VM
;
sourceTree
=
"<group>"
;
};
045C0A182D12CA5E00BD2DC0
/* C */
=
{
isa
=
PBXGroup
;
children
=
(
...
...
@@ -6090,6 +6103,7 @@
047A968E2D16AA410033BB4E
/* IncomeRecord(收入记录) */
=
{
isa
=
PBXGroup
;
children
=
(
04307B942D1BAE8800ED8E8D
/* VM */
,
047A96942D1900D00033BB4E
/* V */
,
047A968D2D16AA410033BB4E
/* C */
,
);
...
...
@@ -6755,6 +6769,7 @@
045C0FDE2D12CA5F00BD2DC0
/* YHMainInformationModel.swift in Sources */
,
045C0FDF2D12CA5F00BD2DC0
/* YHCertificateFilterButton.swift in Sources */
,
045C0FE02D12CA5F00BD2DC0
/* YHVODPlayerViewController.swift in Sources */
,
04307B962D1BAFD400ED8E8D
/* YHGCIncomeRecordViewModel.swift in Sources */
,
045C0FE12D12CA5F00BD2DC0
/* YHFormItemOnlyDoubleChoiceCell.swift in Sources */
,
045C0FE22D12CA5F00BD2DC0
/* YHEditInterestViewController.swift in Sources */
,
045C0FE32D12CA5F00BD2DC0
/* YHResignConfirmInfoListViewController.swift in Sources */
,
...
...
@@ -6765,6 +6780,7 @@
045C0FE82D12CA5F00BD2DC0
/* YHActivityApplyInfoItemView.swift in Sources */
,
045C0FE92D12CA5F00BD2DC0
/* YHVisaRenewalItemDetailType.swift in Sources */
,
045C0FEA2D12CA5F00BD2DC0
/* YHPrivacyAlertView.swift in Sources */
,
04307B982D1BB1AD00ED8E8D
/* YHGCIncomeRecordWorkExperienceViewModel.swift in Sources */
,
045C0FEB2D12CA5F00BD2DC0
/* YHAIListModel.swift in Sources */
,
045C0FEC2D12CA5F00BD2DC0
/* YHPreviewInfoHeaderCell.swift in Sources */
,
045C0FED2D12CA5F00BD2DC0
/* YHMainApplicantInformationViewController.swift in Sources */
,
...
...
galaxy/galaxy/Classes/Modules/Home(首页)/M/YHConfigModel.swift
View file @
23cfdf03
...
...
@@ -23,6 +23,8 @@ class YHConfigModel : SmartCodable {
var
is_integral_open
:
Bool
=
false
//条件控制哈 PingGuoShenHe true - 展示 false - hidden
// var is_recharge_order_open : Bool = false //双十一banner开关 //`is_recharge_order_open` int NOT NULL DEFAULT '0' COMMENT '1 开启 0关闭',
// 人民币-港币的汇率
var
rate
:
String
=
""
required
init
()
{
}
...
...
galaxy/galaxy/Classes/Modules/IntelligentService(服务中心)/QMAS(优才)/ServiceProcess(我的信息流程)/IncomeRecord(收入记录)/V/YHIncomeRecordItemCell.swift
View file @
23cfdf03
...
...
@@ -42,6 +42,8 @@ class YHIncomeRecordItemCell: YHResignDocumentCell {
private
lazy
var
deleteButton
:
UIButton
=
{
let
button
=
UIButton
(
type
:
.
custom
)
button
.
setTitle
(
"删除"
,
for
:
.
normal
)
button
.
setTitleColor
(
UIColor
.
failColor
,
for
:
.
normal
)
button
.
titleLabel
?
.
font
=
.
PFSC_R
(
ofSize
:
14
)
button
.
addTarget
(
self
,
action
:
#selector(
deleteButtonDidClick(_:)
)
,
for
:
.
touchUpInside
)
return
button
}()
...
...
@@ -68,25 +70,11 @@ class YHIncomeRecordItemCell: YHResignDocumentCell {
if
isEditing
{
rightLabel
.
isHidden
=
true
rightArrowIcon
.
isHidden
=
true
deleteButton
.
isHidden
=
true
bottomLineView
.
snp
.
remakeConstraints
{
make
in
make
.
bottom
.
equalToSuperview
()
make
.
left
.
equalToSuperview
()
.
offset
(
18
)
make
.
right
.
equalToSuperview
()
.
offset
(
-
18
)
make
.
height
.
equalTo
(
0.5
)
make
.
top
.
equalTo
(
infoDetailLabel
.
snp
.
bottom
)
.
offset
(
16
)
}
deleteButton
.
isHidden
=
false
}
else
{
rightLabel
.
isHidden
=
false
rightArrowIcon
.
isHidden
=
false
deleteButton
.
isHidden
=
true
bottomLineView
.
snp
.
remakeConstraints
{
make
in
make
.
bottom
.
equalToSuperview
()
make
.
left
.
equalToSuperview
()
.
offset
(
18
)
make
.
right
.
equalToSuperview
()
.
offset
(
-
18
)
make
.
height
.
equalTo
(
0.5
)
make
.
top
.
equalTo
(
infoDetailLabel
.
snp
.
bottom
)
.
offset
(
16
)
}
}
bottomLineView
.
isHidden
=
!
showBottomLine
...
...
galaxy/galaxy/Classes/Modules/IntelligentService(服务中心)/QMAS(优才)/ServiceProcess(我的信息流程)/IncomeRecord(收入记录)/V/YHIncomeRecordSummaryCell.swift
View file @
23cfdf03
...
...
@@ -24,13 +24,16 @@ class YHIncomeRecordSummaryCell: YHResignDocumentCell {
let
label
=
UILabel
()
label
.
font
=
.
PFSC_R
(
ofSize
:
12
)
label
.
textColor
=
UIColor
(
hexString
:
"#8993A2"
)
label
.
text
=
"(仅申报近12个月应纳税收入总额
))
"
label
.
text
=
"(仅申报近12个月应纳税收入总额
)
"
return
label
}()
private
lazy
var
rightButton
:
UIButton
=
{
let
button
=
UIButton
(
type
:
.
custom
)
button
.
setImage
(
UIImage
(
named
:
"work_more"
),
for
:
.
normal
)
button
.
setTitle
(
"编辑"
,
for
:
.
normal
)
button
.
setTitle
(
"取消编辑"
,
for
:
.
selected
)
button
.
setTitleColor
(
.
brandMainColor
,
for
:
.
normal
)
button
.
titleLabel
?
.
font
=
.
PFSC_R
(
ofSize
:
14
)
button
.
addTarget
(
self
,
action
:
#selector(
rightButtonDidClick(_:)
)
,
for
:
.
touchUpInside
)
return
button
}()
...
...
@@ -64,14 +67,20 @@ extension YHIncomeRecordSummaryCell {
}
private
func
updateRightButtonState
(
_
isEditing
:
Bool
)
{
rightButton
.
isSelected
=
isEditing
if
isEditing
{
rightButton
.
setImage
(
nil
,
for
:
.
normal
)
rightButton
.
setTitle
(
"取消操作"
,
for
:
.
normal
)
rightButton
.
setTitleColor
(
.
brandMainColor
,
for
:
.
normal
)
rightButton
.
titleLabel
?
.
font
=
.
PFSC_R
(
ofSize
:
14
)
rightButton
.
snp
.
remakeConstraints
{
make
in
make
.
right
.
equalToSuperview
()
.
offset
(
-
18
)
make
.
top
.
equalToSuperview
()
.
offset
(
16
)
make
.
width
.
equalTo
(
56
)
make
.
height
.
equalTo
(
24
)
}
}
else
{
rightButton
.
setImage
(
UIImage
(
named
:
"work_more"
),
for
:
.
normal
)
rightButton
.
setTitle
(
nil
,
for
:
.
normal
)
rightButton
.
snp
.
remakeConstraints
{
make
in
make
.
right
.
equalToSuperview
()
.
offset
(
-
18
)
make
.
top
.
equalToSuperview
()
.
offset
(
16
)
make
.
width
.
height
.
equalTo
(
28
)
}
}
}
...
...
galaxy/galaxy/Classes/Modules/IntelligentService(服务中心)/QMAS(优才)/ServiceProcess(我的信息流程)/IncomeRecord(收入记录)/V/YHTotalIncomeCell.swift
View file @
23cfdf03
...
...
@@ -56,8 +56,10 @@ class YHTotalIncomeCell: YHResignDocumentCell {
fatalError
(
"init(coder:) has not been implemented"
)
}
func
setupCellInfo
(
detail
:
ASAttributedString
)
{
func
setupCellInfo
(
detail
:
ASAttributedString
,
cellType
:
YHResignRoundCellType
=
.
bottom
,
showTopLine
:
Bool
=
true
)
{
infoDetailLabel
.
attributed
.
text
=
detail
updateCellCorner
(
cellType
)
topLineView
.
isHidden
=
!
showTopLine
}
}
...
...
galaxy/galaxy/Classes/Modules/IntelligentService(服务中心)/QMAS(优才)/ServiceProcess(我的信息流程)/IncomeRecord(收入记录)/V/YHWorkingHoursStatementCell.swift
View file @
23cfdf03
...
...
@@ -11,7 +11,7 @@ import UIKit
class
YHWorkingHoursStatementCell
:
YHResignDocumentCell
{
static
let
cellReuseIdentifier
=
"YHWorkingHoursStatementCell"
private
let
maxCount
=
2
00
private
let
maxCount
=
10
00
var
textViewDidChanged
:
((
UITextView
)
->
Void
)?
var
textDidExceedsMaxLimit
:
((
Int
)
->
Void
)?
...
...
@@ -77,6 +77,7 @@ class YHWorkingHoursStatementCell: YHResignDocumentCell {
func
setupCellInfo
(
placeholder
:
String
,
remark
:
String
?,
detail
:
ASAttributedString
,
isShowBottomLine
:
Bool
)
{
editTipsLabel
.
text
=
placeholder
editTipsLabel
.
isHidden
=
remark
?
.
isEmpty
==
false
remarkTextView
.
text
=
remark
infoDetailLabel
.
attributed
.
text
=
detail
bottomLineView
.
isHidden
=
!
isShowBottomLine
...
...
@@ -85,7 +86,7 @@ class YHWorkingHoursStatementCell: YHResignDocumentCell {
extension
YHWorkingHoursStatementCell
{
private
func
setupUI
()
{
updateCellCorner
(
.
bottom
)
updateCellCorner
(
.
single
)
subContainerView
.
addSubview
(
infoDetailLabel
)
subContainerView
.
addSubview
(
remarkTextViewContainer
)
subContainerView
.
addSubview
(
bottomLineView
)
...
...
galaxy/galaxy/Classes/Modules/IntelligentService(服务中心)/TTPS(高才)/ServiceProcess(我的信息流程)/IncomeRecord(收入记录)/C/YHGCIncomeRecordViewController.swift
View file @
23cfdf03
...
...
@@ -8,30 +8,23 @@
import
IQKeyboardManagerSwift
import
AttributedString
import
SafariServices
import
UIKit
class
YHGCIncomeRecordViewController
:
YHBaseViewController
{
enum
TableRow
{
case
incomeSummary
(
_
isEditing
:
Bool
=
false
,
_
isEditEnable
:
Bool
=
false
)
case
incomeItem
(
_
isEditState
:
Bool
=
false
,
_
company
:
String
,
_
money
:
String
,
_
timeStr
:
String
,
_
incomeId
:
Int
,
_
showBottomLine
:
Bool
)
case
incomeSummary
case
incomeItem
(
_
company
:
String
,
_
money
:
String
,
_
timeStr
:
String
,
_
incomeId
:
Int
,
_
showBottomLine
:
Bool
)
case
addItem
case
totalIncome
(
_
money
:
ASAttributedString
)
case
consentForHKTravel
(
_
title
:
String
,
_
detail
:
ASAttributedString
,
_
question
:
String
)
case
questionSelect
(
_
question
:
String
)
case
employmentVerification
case
workingHoursStatement
(
_
placeholder
:
String
,
_
detail
:
ASAttributedString
)
case
employmentVerification
(
_
employments
:
[
YHWorkItemListModel
],
_
selectedId
:
Int
?)
case
workingHoursStatement
(
_
placeholder
:
String
,
_
detail
:
ASAttributedString
,
_
content
:
String
)
}
private
lazy
var
datas
:
[[
TableRow
]]
=
[]
/// 是否超过
private
var
isOver100OK
=
true
private
var
over100IndexPath
:
IndexPath
?
private
var
selectedEmployment
:
String
?
private
var
employments
:
[
String
]
=
[
"华为科技有限公司有限公司"
,
"阿里巴巴有限公司"
]
private
lazy
var
viewModel
=
YHIncomeRecordViewModel
()
private
var
incomeModel
=
YHIncomeRecordCompleteModel
()
private
lazy
var
viewModel
=
YHGCIncomeRecordViewModel
()
private
lazy
var
saveButton
:
UIButton
=
{
let
button
=
UIButton
(
type
:
.
custom
)
...
...
@@ -175,41 +168,69 @@ extension YHGCIncomeRecordViewController {
tableView
.
tableFooterView
=
UIView
(
frame
:
CGRect
(
x
:
0
,
y
:
0
,
width
:
KScreenWidth
,
height
:
44
))
}
private
func
getCurrentRate
()
->
Double
{
let
configRate
=
Double
(
YHConfigManager
.
shared
.
reqVM
.
configModel
?
.
rate
??
""
)
??
0
let
rate
=
configRate
>
0
?
configRate
:
0.92
return
rate
}
private
func
setupData
()
{
let
hkdFormatter
=
currencyFormat
(
""
)
var
money
:
Double
=
0
var
firstSection
:
[
TableRow
]
=
[
.
incomeSummary
(
false
,
false
)]
let
rate
=
self
.
incomeModel
.
rate
>
0
?
self
.
incomeModel
.
rate
:
0.92
let
listCount
=
incomeModel
.
list
.
count
incomeModel
.
list
.
enumerated
()
.
forEach
{
index
,
companyModel
in
money
+=
companyModel
.
income_money
let
moneyStr
=
companyModel
.
income_money
==
0
?
""
:
"约"
+
(
hkdFormatter
.
string
(
from
:
NSNumber
(
value
:
companyModel
.
income_money
/
rate
))
??
"0"
)
+
"港币"
let
timeStr
:
String
=
companyModel
.
fill_status
?
"已填写"
:
"有
\(
companyModel
.
unfilled_count
)
项未填写"
let
incomeItem
:
TableRow
=
.
incomeItem
(
false
,
companyModel
.
company_name
,
moneyStr
,
timeStr
,
companyModel
.
income_id
,
index
!=
listCount
-
1
)
var
firstSection
:
[
TableRow
]
=
[
.
incomeSummary
]
let
rate
=
getCurrentRate
()
let
listCount
=
viewModel
.
listModel
.
count
viewModel
.
listModel
.
enumerated
()
.
forEach
{
index
,
companyModel
in
let
income
=
Double
(
companyModel
.
income
??
""
)
??
0
money
+=
income
let
moneyStr
=
income
==
0
?
""
:
"约"
+
(
hkdFormatter
.
string
(
from
:
NSNumber
(
value
:
income
/
rate
))
??
"0"
)
+
"港币"
let
vacantNum
=
companyModel
.
vacant_num
??
0
let
timeStr
:
String
=
vacantNum
==
0
?
"已填写"
:
"有
\(
vacantNum
)
项未填写"
let
incomeItem
:
TableRow
=
.
incomeItem
(
companyModel
.
company_name
??
""
,
moneyStr
,
timeStr
,
companyModel
.
id
??
0
,
index
!=
listCount
-
1
)
firstSection
.
append
(
incomeItem
)
}
if
listCount
>
0
{
let
totalNum
=
hkdFormatter
.
string
(
from
:
NSNumber
(
value
:
money
/
rate
))
??
"0"
let
totalMoney
:
ASAttributedString
=
.
init
(
string
:
"约 "
,
.
font
(
.
PFSC_R
(
ofSize
:
14
)))
+
.
init
(
string
:
totalNum
,
.
font
(
UIFont
(
name
:
"DINAlternate-Bold"
,
size
:
20
)
??
UIFont
.
systemFont
(
ofSize
:
20
)))
+
.
init
(
string
:
" 港币"
,
.
font
(
.
PFSC_R
(
ofSize
:
14
)))
firstSection
.
append
(
.
totalIncome
(
totalMoney
))
}
else
{
let
incomeItem
:
TableRow
=
.
incomeItem
(
false
,
"收入信息1"
,
""
,
"待填写"
,
0
,
false
)
firstSection
.
append
(
incomeItem
)
}
firstSection
.
append
(
.
addItem
)
let
tipsIcon
=
ASAttributedString
.
init
(
.
image
(
UIImage
(
named
:
"red_dot_6"
)
??
UIImage
(),
.
custom
(
.
offset
(
CGPoint
(
x
:
0
,
y
:
1
)),
size
:
.
init
(
width
:
6
,
height
:
6
))))
let
tips
:
ASAttributedString
=
tipsIcon
+
.
init
(
string
:
" 检测到您的"
,
.
font
(
.
PFSC_R
(
ofSize
:
13
)),
.
foreground
(
UIColor
(
hexString
:
"#8993A2"
)
??
.
gray
))
+
.
init
(
string
:
"工作时间有重叠"
,
.
font
(
.
PFSC_R
(
ofSize
:
13
)),
.
foreground
(
UIColor
.
failColor
))
+
.
init
(
string
:
"。请确认是否正确填报,若填报无误请在此处说明工作时间重叠的原因~"
,
.
font
(
.
PFSC_R
(
ofSize
:
13
)),
.
foreground
(
UIColor
(
hexString
:
"#8993A2"
)
??
.
gray
))
let
secondSection
:
[
TableRow
]
=
[
.
workingHoursStatement
(
"如:工作时间灵活,可自由安排"
,
tips
)]
let
detail
:
ASAttributedString
=
.
init
(
string
:
"备注:赴港同意书为目前在职公司盖章提供,若目前未就职于任何公司,则由档案所在地人才中心盖章提供,"
,
.
font
(
UIFont
.
PFSC_R
(
ofSize
:
13
)),
.
foreground
(
UIColor
(
hexString
:
"#8993A2"
)
??
.
gray
))
let
actionStr
=
ASAttributedString
.
init
(
string
:
"查看示例模板"
,
.
font
(
UIFont
.
PFSC_R
(
ofSize
:
13
)),
.
foreground
(
UIColor
.
brandMainColor
),
.
underline
(
.
init
(
rawValue
:
1
)),
.
action
{
//
})
var
secondSection
:
[
TableRow
]
=
[]
if
viewModel
.
mainModel
.
has_work_time_overlap
==
1
{
let
tipsIcon
=
ASAttributedString
.
init
(
.
image
(
UIImage
(
named
:
"red_dot_6"
)
??
UIImage
(),
.
custom
(
.
offset
(
CGPoint
(
x
:
0
,
y
:
1
)),
size
:
.
init
(
width
:
6
,
height
:
6
))))
let
tips
:
ASAttributedString
=
tipsIcon
+
.
init
(
string
:
" 检测到您的"
,
.
font
(
.
PFSC_R
(
ofSize
:
13
)),
.
foreground
(
UIColor
(
hexString
:
"#8993A2"
)
??
.
gray
))
+
.
init
(
string
:
"工作时间有重叠"
,
.
font
(
.
PFSC_R
(
ofSize
:
13
)),
.
foreground
(
UIColor
.
failColor
))
+
.
init
(
string
:
"。请确认是否正确填报,若填报无误请在此处说明工作时间重叠的原因~"
,
.
font
(
.
PFSC_R
(
ofSize
:
13
)),
.
foreground
(
UIColor
(
hexString
:
"#8993A2"
)
??
.
gray
))
secondSection
.
append
(
.
workingHoursStatement
(
"如:工作时间灵活,可自由安排"
,
tips
,
viewModel
.
mainModel
.
why_work_time_overlap
))
}
var
thirdSection
:
[
TableRow
]
=
[
.
consentForHKTravel
(
"赴港同意书提供"
,
detail
+
actionStr
,
"在职公司是否可以提供赴港同意书"
)]
thirdSection
.
append
(
.
questionSelect
(
"人才中心是否可以提供赴港同意书"
))
thirdSection
.
append
(
.
employmentVerification
)
datas
=
[
firstSection
,
secondSection
,
thirdSection
]
var
thirdSection
:
[
TableRow
]
=
[]
if
viewModel
.
mainModel
.
is_consent_required
==
1
{
let
detail
:
ASAttributedString
=
.
init
(
string
:
"备注:赴港同意书为目前在职公司盖章提供,若目前未就职于任何公司,则由档案所在地人才中心盖章提供,"
,
.
font
(
UIFont
.
PFSC_R
(
ofSize
:
13
)),
.
foreground
(
UIColor
(
hexString
:
"#8993A2"
)
??
.
gray
))
let
actionStr
=
ASAttributedString
.
init
(
string
:
"查看示例模板"
,
.
font
(
UIFont
.
PFSC_R
(
ofSize
:
13
)),
.
foreground
(
UIColor
.
brandMainColor
),
.
underline
(
.
init
(
rawValue
:
1
)),
.
action
{
[
weak
self
]
in
guard
let
self
=
self
else
{
return
}
let
url
=
self
.
viewModel
.
mainModel
.
consent_template_url
guard
url
.
count
>
0
else
{
return
}
self
.
gotoPreview
(
url
)
})
thirdSection
.
append
(
.
consentForHKTravel
(
"赴港同意书提供"
,
detail
+
actionStr
,
"在职公司是否可以提供赴港同意书"
))
if
viewModel
.
mainModel
.
has_company_consent
==
1
{
let
id
=
viewModel
.
mainModel
.
consent_work_id
>
0
?
viewModel
.
mainModel
.
consent_work_id
:
nil
thirdSection
.
append
(
.
employmentVerification
(
viewModel
.
listModel
,
id
))
}
else
{
thirdSection
.
append
(
.
questionSelect
(
"人才中心是否可以提供赴港同意书"
))
}
}
datas
=
[
firstSection
]
if
secondSection
.
count
>
0
{
datas
.
append
(
secondSection
)
}
if
thirdSection
.
count
>
0
{
datas
.
append
(
thirdSection
)
}
tableView
.
reloadData
()
}
...
...
@@ -220,6 +241,18 @@ extension YHGCIncomeRecordViewController {
formatter
.
maximumFractionDigits
=
0
return
formatter
}
private
func
gotoPreview
(
_
urlString
:
String
)
{
YHHUD
.
show
(
.
progress
(
message
:
"加载中..."
))
viewModel
.
getRealUsefulUrl
(
urlString
)
{
[
weak
self
]
resultUrl
in
YHHUD
.
hide
()
guard
let
self
=
self
,
let
url
=
URL
(
string
:
resultUrl
)
else
{
return
}
let
safariViewController
=
SFSafariViewController
(
url
:
url
)
safariViewController
.
dismissButtonStyle
=
.
close
safariViewController
.
modalPresentationStyle
=
.
fullScreen
self
.
present
(
safariViewController
,
animated
:
true
,
completion
:
nil
)
}
}
}
extension
YHGCIncomeRecordViewController
:
UITableViewDelegate
,
UITableViewDataSource
{
...
...
@@ -245,20 +278,32 @@ extension YHGCIncomeRecordViewController: UITableViewDelegate, UITableViewDataSo
}
let
tableRow
=
sectionArr
[
indexPath
.
row
]
switch
tableRow
{
case
let
.
incomeSummary
(
isEditState
,
isEditEnable
):
case
.
incomeSummary
:
if
let
cell
=
tableView
.
dequeueReusableCell
(
withIdentifier
:
YHIncomeRecordSummaryCell
.
cellReuseIdentifier
)
as?
YHIncomeRecordSummaryCell
{
cell
.
setupCellInfo
(
isEditState
,
isEditEnable
,
showRightButton
:
false
)
cell
.
setupCellInfo
(
viewModel
.
formState
==
.
editing
,
true
,
showRightButton
:
true
)
cell
.
rightButtonClickEvent
=
{
[
weak
self
]
in
guard
let
self
=
self
else
{
return
}
self
.
viewModel
.
toggleEditingState
()
self
.
tableView
.
reloadSections
(
IndexSet
(
arrayLiteral
:
indexPath
.
section
),
with
:
.
automatic
)
}
return
cell
}
case
let
.
incomeItem
(
isEditState
,
company
,
money
,
timeStr
,
_
,
showBottomLine
):
case
let
.
incomeItem
(
company
,
money
,
timeStr
,
id
,
showBottomLine
):
if
let
cell
=
tableView
.
dequeueReusableCell
(
withIdentifier
:
YHIncomeRecordItemCell
.
cellReuseIdentifier
)
as?
YHIncomeRecordItemCell
{
cell
.
setupCellInfo
(
title
:
company
,
detail
:
money
,
rightText
:
timeStr
,
isEditing
:
isEditState
,
showBottomLine
:
showBottomLine
)
cell
.
setupCellInfo
(
title
:
company
,
detail
:
money
,
rightText
:
timeStr
,
isEditing
:
viewModel
.
formState
==
.
editing
,
showBottomLine
:
showBottomLine
)
cell
.
deleteButtonClickEvent
=
{
[
weak
self
]
in
guard
let
self
=
self
else
{
return
}
self
.
showAlertWhenDeleteItem
(
id
:
id
,
name
:
company
)
}
return
cell
}
case
let
.
totalIncome
(
money
):
if
let
cell
=
tableView
.
dequeueReusableCell
(
withIdentifier
:
YHTotalIncomeCell
.
cellReuseIdentifier
)
as?
YHTotalIncomeCell
{
cell
.
setupCellInfo
(
detail
:
money
)
cell
.
setupCellInfo
(
detail
:
money
,
cellType
:
.
mid
)
cell
.
didClickInfoButton
=
{
[
weak
self
,
weak
cell
]
in
guard
let
self
=
self
else
{
return
...
...
@@ -266,34 +311,34 @@ extension YHGCIncomeRecordViewController: UITableViewDelegate, UITableViewDataSo
guard
let
cell
=
cell
else
{
return
}
let
rate
=
self
.
incomeModel
.
rate
>
0
?
self
.
incomeModel
.
rate
:
0.92
let
rate
=
self
.
getCurrentRate
()
YHWholeScreenTipsView
.
show
(
type
:
.
hkdToRmbRateTips
(
"注:按1港币≈
\(
rate
)
人民币计算,实际金额按递交时入境处给出的汇率为准"
),
targetView
:
cell
.
infoButton
)
}
return
cell
}
case
let
.
consentForHKTravel
(
title
,
detail
,
question
):
if
let
cell
=
tableView
.
dequeueReusableCell
(
withIdentifier
:
YHInfoConsentForHKTravelCell
.
cellReuseIdentifier
)
as?
YHInfoConsentForHKTravelCell
{
over100IndexPath
=
indexPath
cell
.
setupCellInfo
(
title
:
title
,
detail
:
detail
,
question
:
question
,
needShowFailButton
:
!
isO
ver100O
K
)
let
isOK
=
viewModel
.
mainModel
.
has_company_consent
!=
0
cell
.
setupCellInfo
(
title
:
title
,
detail
:
detail
,
question
:
question
,
needShowFailButton
:
!
isOK
)
cell
.
didSelectSureButton
=
{
[
weak
self
]
selected
in
guard
let
self
=
self
else
{
return
}
switch
selected
{
case
.
true
:
self
.
incomeModel
.
income_over_100
=
YHIncomeOver100
.
true
.
rawValue
isOver100OK
=
true
self
.
viewModel
.
mainModel
.
has_company_consent
=
YHCheckboxSelectType
.
true
.
rawValue
break
case
.
false
:
self
.
incomeModel
.
income_over_100
=
YHIncomeOver100
.
false
.
rawValue
isOver100OK
=
true
self
.
viewModel
.
mainModel
.
has_company_consent
=
YHCheckboxSelectType
.
false
.
rawValue
break
case
.
unknown
:
self
.
incomeModel
.
income_over_100
=
YHIncomeOver100
.
unknown
.
rawValue
isOver100OK
=
false
self
.
viewModel
.
mainModel
.
has_company_consent
=
YHCheckboxSelectType
.
unknown
.
rawValue
break
}
self
.
setupData
()
}
let
over100Type
=
YHIncomeOver100
(
rawValue
:
incomeModel
.
income_over_100
)
??
.
unknown
switch
over100
Type
{
let
selectType
=
YHCheckboxSelectType
(
rawValue
:
viewModel
.
mainModel
.
has_company_consent
)
??
.
unknown
switch
select
Type
{
case
.
true
:
cell
.
selectedSureButton
=
.
true
case
.
false
:
...
...
@@ -301,39 +346,45 @@ extension YHGCIncomeRecordViewController: UITableViewDelegate, UITableViewDataSo
case
.
unknown
:
cell
.
selectedSureButton
=
.
unknown
}
return
cell
}
case
.
addItem
:
if
let
cell
=
tableView
.
dequeueReusableCell
(
withIdentifier
:
YHAddIncomeRecordCell
.
cellReuseIdentifier
)
as?
YHAddIncomeRecordCell
{
cell
.
addButtonClickEvent
=
{
//
cell
.
addButtonClickEvent
=
{
[
weak
self
]
in
guard
let
self
=
self
else
{
return
}
let
ctl
=
YHGCIncomeRecordWorkExperienceViewController
(
incomeId
:
0
)
ctl
.
submitSuccess
=
{
[
weak
self
]
in
guard
let
self
=
self
else
{
return
}
self
.
requestData
(
isNeedLoading
:
true
)
}
self
.
navigationController
?
.
pushViewController
(
ctl
,
animated
:
true
)
}
return
cell
}
case
let
.
questionSelect
(
question
):
if
let
cell
=
tableView
.
dequeueReusableCell
(
withIdentifier
:
YHInfoQuestionSelectionCell
.
cellReuseIdentifier
)
as?
YHInfoQuestionSelectionCell
{
over100IndexPath
=
indexPath
cell
.
setupCellInfo
(
question
:
question
,
needShowFailButton
:
!
isO
ver100O
K
)
let
isOK
=
viewModel
.
mainModel
.
has_center_consent
!=
0
cell
.
setupCellInfo
(
question
:
question
,
needShowFailButton
:
!
isOK
)
cell
.
didSelectSureButton
=
{
[
weak
self
]
selected
in
guard
let
self
=
self
else
{
return
}
switch
selected
{
case
.
true
:
self
.
incomeModel
.
income_over_100
=
YHIncomeOver100
.
true
.
rawValue
isOver100OK
=
true
self
.
viewModel
.
mainModel
.
has_center_consent
=
YHCheckboxSelectType
.
true
.
rawValue
case
.
false
:
self
.
incomeModel
.
income_over_100
=
YHIncomeOver100
.
false
.
rawValue
isOver100OK
=
true
self
.
viewModel
.
mainModel
.
has_center_consent
=
YHCheckboxSelectType
.
false
.
rawValue
case
.
unknown
:
self
.
incomeModel
.
income_over_100
=
YHIncomeOver100
.
unknown
.
rawValue
isOver100OK
=
false
self
.
viewModel
.
mainModel
.
has_center_consent
=
YHCheckboxSelectType
.
unknown
.
rawValue
}
self
.
setupData
()
}
let
over100Type
=
YHIncomeOver100
(
rawValue
:
incomeModel
.
income_over_100
)
??
.
unknown
switch
over100
Type
{
let
selectType
=
YHCheckboxSelectType
(
rawValue
:
viewModel
.
mainModel
.
has_center_consent
)
??
.
unknown
switch
select
Type
{
case
.
true
:
cell
.
selectedSureButton
=
.
true
case
.
false
:
...
...
@@ -345,14 +396,17 @@ extension YHGCIncomeRecordViewController: UITableViewDelegate, UITableViewDataSo
return
cell
}
case
.
employmentVerification
:
case
let
.
employmentVerification
(
employments
,
selectedId
)
:
if
let
cell
=
tableView
.
dequeueReusableCell
(
withIdentifier
:
YHEmploymentVerificationAvailableCell
.
cellReuseIdentifier
)
as?
YHEmploymentVerificationAvailableCell
{
cell
.
setupCellInfo
(
detail
:
selectedEmployment
)
let
selectedEmployment
=
employments
.
first
{
model
in
model
.
id
==
selectedId
}
cell
.
setupCellInfo
(
detail
:
selectedEmployment
?
.
company_name
)
return
cell
}
case
let
.
workingHoursStatement
(
placeholder
,
tips
):
case
let
.
workingHoursStatement
(
placeholder
,
tips
,
content
):
if
let
cell
=
tableView
.
dequeueReusableCell
(
withIdentifier
:
YHWorkingHoursStatementCell
.
cellReuseIdentifier
)
as?
YHWorkingHoursStatementCell
{
cell
.
setupCellInfo
(
placeholder
:
placeholder
,
remark
:
nil
,
detail
:
tips
,
isShowBottomLine
:
false
)
cell
.
setupCellInfo
(
placeholder
:
placeholder
,
remark
:
content
,
detail
:
tips
,
isShowBottomLine
:
false
)
return
cell
}
}
...
...
@@ -381,20 +435,26 @@ extension YHGCIncomeRecordViewController: UITableViewDelegate, UITableViewDataSo
return
}
let
tableRow
=
sectionArr
[
indexPath
.
row
]
if
case
let
.
incomeItem
(
_
,
_
,
_
,
_
,
incomeId
,
_
)
=
tableRow
{
if
case
let
.
incomeItem
(
_
,
_
,
_
,
incomeId
,
_
)
=
tableRow
{
let
ctl
=
YHGCIncomeRecordWorkExperienceViewController
(
incomeId
:
incomeId
)
ctl
.
submitSuccess
=
{
[
weak
self
]
in
guard
let
self
=
self
else
{
return
}
self
.
requestData
(
isNeedLoading
:
true
,
lastSelectedIncomeOver100
:
self
.
incomeModel
.
income_over_100
)
self
.
requestData
(
isNeedLoading
:
true
)
}
navigationController
?
.
pushViewController
(
ctl
,
animated
:
true
)
}
else
if
case
.
employmentVerification
=
tableRow
{
}
else
if
case
let
.
employmentVerification
(
employments
,
selectedId
)
=
tableRow
{
guard
employments
.
count
>
1
else
{
return
}
YHDynamicSheetPickerView
.
show
(
dataSource
:
[
"华为科技有限公司有限公司"
,
"阿里巴巴有限公司"
],
title
:
"选择可提供的在职公司"
,
selectIndex
:
0
)
{
index
in
let
companies
=
employments
.
compactMap
{
$0
.
company_name
}
let
firstIndex
=
employments
.
firstIndex
{
model
in
model
.
id
==
selectedId
}
YHDynamicSheetPickerView
.
show
(
dataSource
:
companies
,
title
:
"选择可提供的在职公司"
,
selectIndex
:
firstIndex
??
0
)
{
index
in
//
}
}
...
...
@@ -402,15 +462,28 @@ extension YHGCIncomeRecordViewController: UITableViewDelegate, UITableViewDataSo
}
extension
YHGCIncomeRecordViewController
{
private
func
checkInput
()
->
Bool
{
if
incomeModel
.
income_over_100
==
YHIncomeOver100
.
unknown
.
rawValue
{
isOver100OK
=
false
if
let
over100IndexPath
=
over100IndexPath
,
tableView
.
numberOfSections
>
over100IndexPath
.
section
,
tableView
.
numberOfRows
(
inSection
:
over100IndexPath
.
section
)
>
over100IndexPath
.
row
{
tableView
.
reloadRows
(
at
:
[
over100IndexPath
],
with
:
.
none
)
private
func
showAlertWhenDeleteItem
(
id
:
Int
,
name
:
String
)
{
let
message0
:
ASAttributedString
=
.
init
(
string
:
"您确认要删除收入信息"
,
.
font
(
UIFont
.
PFSC_R
(
ofSize
:
16
)),
.
foreground
(
UIColor
.
mainTextColor
))
let
message1
:
ASAttributedString
=
.
init
(
string
:
"【
\(
name
)
】"
,
.
font
(
UIFont
.
PFSC_M
(
ofSize
:
16
)),
.
foreground
(
UIColor
.
brandMainColor
))
let
message2
:
ASAttributedString
=
.
init
(
string
:
"吗?"
,
.
font
(
UIFont
.
PFSC_R
(
ofSize
:
16
)),
.
foreground
(
UIColor
.
mainTextColor
))
YHCommonAlertView
.
show
(
title
:
nil
,
attributedMessage
:
message0
+
message1
+
message2
,
"取消"
,
"确认"
,
fullGuestureEnable
:
false
)
{
}
callBack
:
{
[
weak
self
]
in
guard
let
self
=
self
else
{
return
}
return
false
self
.
deleteWorkItem
(
id
:
id
)
}
isOver100OK
=
true
}
private
func
checkInput
()
->
Bool
{
// if incomeModel.income_over_100 == YHIncomeOver100.unknown.rawValue {
// isOver100OK = false
// if let over100IndexPath = over100IndexPath, tableView.numberOfSections > over100IndexPath.section, tableView.numberOfRows(inSection: over100IndexPath.section) > over100IndexPath.row {
// tableView.reloadRows(at: [over100IndexPath], with: .none)
// }
// return false
// }
// isOver100OK = true
return
true
}
...
...
@@ -418,15 +491,14 @@ extension YHGCIncomeRecordViewController {
if
isNeedLoading
{
YHHUD
.
show
(
.
progress
(
message
:
"加载中..."
))
}
viewModel
.
getIncomeList
(
orderId
:
orderId
)
{
[
weak
self
]
income
Model
,
error
in
viewModel
.
requestWorkList
(
orderId
)
{
[
weak
self
]
work
Model
,
error
in
guard
let
self
=
self
else
{
return
}
if
isNeedLoading
{
YHHUD
.
hide
()
}
guard
let
incomeModel
=
incomeMode
l
else
{
guard
workModel
!=
ni
l
else
{
printLog
(
"YHGCIncomeRecordViewController: 请求失败"
)
if
let
errorMsg
=
error
?
.
errorMsg
,
errorMsg
.
count
>
0
{
YHHUD
.
flash
(
message
:
errorMsg
)
...
...
@@ -436,18 +508,16 @@ extension YHGCIncomeRecordViewController {
self
.
navigationController
?
.
popViewController
(
animated
:
true
)
return
}
self
.
incomeModel
=
incomeModel
if
let
lastSelectedIncomeOver100
=
lastSelectedIncomeOver100
{
self
.
incomeModel
.
income_over_100
=
lastSelectedIncomeOver100
}
self
.
setupData
()
}
}
private
func
updateIncome
(
_
type
:
YHIncomeRecordUpdateType
)
{
let
msg
=
type
==
.
save
?
"保存中..."
:
"提交中..."
YHHUD
.
show
(
.
progress
(
message
:
msg
))
viewModel
.
incomeUpdate
(
orderId
:
orderId
,
incomeOver100
:
incomeModel
.
income_over_100
,
type
:
type
)
{
[
weak
self
]
success
,
error
in
let
isSubmit
:
Bool
=
type
==
.
save
?
false
:
true
viewModel
.
requestWorkTimeRemarkWorkExperience
(
orderId
,
isSubmit
)
{
[
weak
self
]
success
,
error
in
guard
let
self
=
self
else
{
return
}
...
...
@@ -465,4 +535,22 @@ extension YHGCIncomeRecordViewController {
}
}
}
private
func
deleteWorkItem
(
id
:
Int
)
{
YHHUD
.
show
(
.
progress
(
message
:
"加载中..."
))
viewModel
.
requestDeleteWorkExperience
(
id
,
orderId
)
{
[
weak
self
]
success
,
error
in
guard
let
self
=
self
else
{
return
}
YHHUD
.
hide
()
if
success
{
self
.
requestData
(
isNeedLoading
:
true
)
}
else
{
printLog
(
"YHGCIncomeRecordViewController: 请求失败"
)
if
let
errorMsg
=
error
?
.
errorMsg
,
errorMsg
.
count
>
0
{
YHHUD
.
flash
(
message
:
errorMsg
)
}
}
}
}
}
galaxy/galaxy/Classes/Modules/IntelligentService(服务中心)/TTPS(高才)/ServiceProcess(我的信息流程)/IncomeRecord(收入记录)/C/YHGCIncomeRecordWorkExperienceViewController.swift
View file @
23cfdf03
...
...
@@ -235,7 +235,7 @@ extension YHGCIncomeRecordWorkExperienceViewController {
firstSection
.
append
(
.
inputMoney
(
"收入金额"
,
"约
\(
hkdFmt
.
string
(
from
:
NSNumber
(
value
:
companyModel
.
income_money
/
rate
))
??
"0"
)
港币"
,
rmbFmt
.
string
(
from
:
NSNumber
(
value
:
companyModel
.
income_money
))
??
"0"
,
false
,
true
,
true
))
firstSection
.
append
(
.
inputRemark
(
"注:按1港币≈
\(
rate
)
人民币计算,实际金额按递交时入境处给出的汇率为准"
))
let
secondSection
:
[
TableRow
]
=
[
.
header
(
"企业信息"
),
.
infoSelect
(
"派
遣
国家/地区"
,
nil
,
"请选择"
),
.
infoSelect
(
"派薪城市"
,
nil
,
"请选择"
),
.
infoEdit
(
"职位"
,
nil
,
"请输入"
),
.
infoSelect
(
"入职年月"
,
nil
,
"请选择"
),
.
infoTillNowSelect
(
"离职年月"
,
nil
,
"请选择"
,
true
),
.
infoCheckbox
(
"是否可以提供工作证明"
),
.
infoSelect
(
"职业界别"
,
nil
,
"请选择"
),
.
infoEdit
(
"具体职业界别"
,
nil
,
"请输入"
)]
let
secondSection
:
[
TableRow
]
=
[
.
header
(
"企业信息"
),
.
infoSelect
(
"派
薪
国家/地区"
,
nil
,
"请选择"
),
.
infoSelect
(
"派薪城市"
,
nil
,
"请选择"
),
.
infoEdit
(
"职位"
,
nil
,
"请输入"
),
.
infoSelect
(
"入职年月"
,
nil
,
"请选择"
),
.
infoTillNowSelect
(
"离职年月"
,
nil
,
"请选择"
,
true
),
.
infoCheckbox
(
"是否可以提供工作证明"
),
.
infoSelect
(
"职业界别"
,
nil
,
"请选择"
),
.
infoEdit
(
"具体职业界别"
,
nil
,
"请输入"
)]
let
tips
:
ASAttributedString
=
.
init
(
string
:
"备注:为了进一步确认您的具体信息,如有相关"
,
.
font
(
.
PFSC_R
(
ofSize
:
13
)),
.
foreground
(
UIColor
(
hexString
:
"#8993A2"
)
??
.
gray
))
+
.
init
(
string
:
"工作/收入证明文件"
,
.
font
(
.
PFSC_R
(
ofSize
:
13
)),
.
foreground
(
UIColor
.
brandMainColor
))
+
.
init
(
string
:
",请优先在列表上传。"
,
.
font
(
.
PFSC_R
(
ofSize
:
13
)),
.
foreground
(
UIColor
(
hexString
:
"#8993A2"
)
??
.
gray
))
let
thirdSection
:
[
TableRow
]
=
[
.
header
(
"工作证件(选填)"
),
.
incomeTips
(
tips
),
.
uploadWorkId
(
"上传工作证件"
,
"去上传"
)]
...
...
@@ -541,6 +541,36 @@ extension YHGCIncomeRecordWorkExperienceViewController: UITableViewDelegate, UIT
//
}
navigationController
?
.
pushViewController
(
vc
)
}
else
if
case
let
.
infoSelect
(
title
,
_
,
_
)
=
tableRow
{
if
title
==
"派薪国家/地区"
{
let
vc
=
YHSelectCountryViewController
()
vc
.
backLocationStringController
=
{
(
country
)
in
//self.dataSource?.message = country
//
}
navigationController
?
.
pushViewController
(
vc
)
}
else
if
title
==
"入职年月"
{
let
title
=
"选择入职年月"
let
lastIsTaday
=
true
YHDatePickView
.
show
(
type
:
.
yyyymm
,
title
:
title
,
lastIsTaday
:
lastIsTaday
,
currentDay
:
""
)
{
date
in
//
}
}
else
if
title
==
"职业界别"
{
YHOtherPickerView
.
show
(
type
:
.
position
,
selectTitle
:
""
)
{[
weak
self
]
data
in
guard
let
self
=
self
else
{
return
}
// data.title
//
}
}
}
else
if
case
let
.
infoTillNowSelect
(
title
,
_
,
_
,
_
)
=
tableRow
{
if
title
==
"离职年月"
{
let
title
=
"选择离职年月"
let
lastIsTaday
=
true
YHDatePickView
.
show
(
type
:
.
yyyymm
,
title
:
title
,
lastIsTaday
:
lastIsTaday
,
currentDay
:
""
)
{
date
in
//
}
}
}
}
}
...
...
galaxy/galaxy/Classes/Modules/IntelligentService(服务中心)/TTPS(高才)/ServiceProcess(我的信息流程)/IncomeRecord(收入记录)/VM/YHGCIncomeRecordViewModel.swift
0 → 100644
View file @
23cfdf03
//
// YHGCIncomeRecordViewModel.swift
// galaxy
//
// Created by alexzzw on 2024/12/25.
// Copyright © 2024 https://www.galaxy-immi.com. All rights reserved.
//
import
UIKit
class
YHGCIncomeRecordViewModel
:
YHBaseViewModel
{
// MARK: - 表单状态
enum
FormState
{
case
viewing
case
editing
}
var
mainModel
:
YHGCWorkModel
=
YHGCWorkModel
()
var
listModel
:
[
YHWorkItemListModel
]
=
[]
var
workId
:
Int
=
0
private(set)
var
formState
:
FormState
=
.
viewing
// 切换编辑状态
func
toggleEditingState
()
{
switch
formState
{
case
.
viewing
:
formState
=
.
editing
case
.
editing
:
formState
=
.
viewing
}
}
override
init
()
{
super
.
init
()
}
func
requestWorkList
(
_
orderId
:
Int
,
callBackBlock
:
@escaping
(
_
success
:
YHGCWorkModel
?,
_
error
:
YHErrorModel
?)
->
Void
)
{
let
strUrl
=
YHBaseUrlManager
.
shared
.
curURL
()
+
YHAllApiName
.
WorkExperience
.
gclist
let
params
:
[
String
:
Any
]
=
[
"order_id"
:
orderId
]
_
=
YHNetRequest
.
getRequest
(
url
:
strUrl
,
params
:
params
)
{
[
weak
self
]
json
,
_
in
// 1. json字符串 转 对象
guard
let
self
=
self
else
{
return
}
if
json
.
code
==
200
{
guard
let
dic
=
json
.
data
?
.
peel
as?
[
String
:
Any
],
let
result
=
YHGCWorkModel
.
deserialize
(
from
:
dic
)
else
{
callBackBlock
(
nil
,
nil
)
return
}
self
.
mainModel
=
result
self
.
listModel
=
result
.
list
??
[]
callBackBlock
(
self
.
mainModel
,
nil
)
}
else
{
let
error
:
YHErrorModel
=
YHErrorModel
(
errorCode
:
Int32
(
json
.
code
),
errorMsg
:
json
.
msg
)
callBackBlock
(
nil
,
error
)
}
}
failBlock
:
{
err
in
callBackBlock
(
nil
,
err
)
}
}
func
requestDeleteWorkExperience
(
_
id
:
Int
,
_
orderId
:
Int
,
callBackBlock
:
@escaping
(
_
success
:
Bool
,
_
error
:
YHErrorModel
?)
->
Void
)
{
let
params
:
[
String
:
Any
]
=
[
"id"
:
id
,
"order_id"
:
orderId
]
let
strUrl
=
YHBaseUrlManager
.
shared
.
curURL
()
+
YHAllApiName
.
WorkExperience
.
del
_
=
YHNetRequest
.
postRequest
(
url
:
strUrl
,
params
:
params
)
{
json
,
_
in
// 1. json字符串 转 对象
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
)
}
}
func
requestWorkTimeRemarkWorkExperience
(
_
orderId
:
Int
,
_
isSubmit
:
Bool
=
true
,
callBackBlock
:
@escaping
(
_
success
:
Bool
,
_
error
:
YHErrorModel
?)
->
Void
)
{
let
params
:
[
String
:
Any
]
=
[
"order_id"
:
orderId
,
"has_company_consent"
:
mainModel
.
has_company_consent
,
"consent_work_id"
:
mainModel
.
consent_work_id
,
"has_center_consent"
:
mainModel
.
has_center_consent
,
"why_work_time_overlap"
:
mainModel
.
why_work_time_overlap
,
"has_work_experience"
:
mainModel
.
has_work_experience
,
"is_submit"
:
isSubmit
]
let
strUrl
=
YHBaseUrlManager
.
shared
.
curURL
()
+
YHAllApiName
.
WorkExperience
.
saveAll
_
=
YHNetRequest
.
postRequest
(
url
:
strUrl
,
params
:
params
)
{
json
,
_
in
// 1. json字符串 转 对象
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
)
}
}
// 创建新的是否可用
// func requestCreateNewWork(_ orderId: Int, callBackBlock: @escaping (_ success: Int, _ error: YHErrorModel?) -> Void) {
// let strUrl = YHBaseUrlManager.shared.curURL() + YHAllApiName.WorkExperience.createNewWork
// let params: [String: Any] = ["order_id": orderId]
//
// _ = YHNetRequest.postRequest(url: strUrl, params: params) { [weak self] json, _ in
// // 1. json字符串 转 对象
// guard let self = self else { return }
// if json.code == 200 {
// guard let dic = json.data?.peel as? [String: Any], let result = YHWorkExperienceDetailModel.deserialize(from: dic) else {
// callBackBlock(0, nil)
// return
// }
// self.workId = result.work_id
// callBackBlock(result.work_id, nil)
// } else {
// let error: YHErrorModel = YHErrorModel(errorCode: Int32(json.code), errorMsg: json.msg)
// callBackBlock(0, error)
// }
// } failBlock: { err in
// callBackBlock(0, err)
// }
// }
}
galaxy/galaxy/Classes/Modules/IntelligentService(服务中心)/TTPS(高才)/ServiceProcess(我的信息流程)/IncomeRecord(收入记录)/VM/YHGCIncomeRecordWorkExperienceViewModel.swift
0 → 100644
View file @
23cfdf03
//
// YHGCIncomeRecordWorkExperienceViewModel.swift
// galaxy
//
// Created by alexzzw on 2024/12/25.
// Copyright © 2024 https://www.galaxy-immi.com. All rights reserved.
//
import
UIKit
class
YHGCIncomeRecordWorkExperienceViewModel
:
YHBaseViewModel
{
var
position
:
YHGCWorkExperienceModel
=
YHGCWorkExperienceModel
()
override
init
()
{
super
.
init
()
}
func
requestWorkPositionDetail
(
_
workId
:
Int
,
_
orderID
:
Int
,
callBackBlock
:
@escaping
(
_
success
:
Bool
?,
_
error
:
YHErrorModel
?)
->
Void
)
{
let
param
:
[
String
:
Any
]
=
[
"id"
:
workId
,
"order_id"
:
orderID
]
let
strUrl
=
YHBaseUrlManager
.
shared
.
curURL
()
+
YHAllApiName
.
WorkExperience
.
gcworkDetail
_
=
YHNetRequest
.
getRequest
(
url
:
strUrl
,
params
:
param
)
{
[
weak
self
]
json
,
_
in
// 1. json字符串 转 对象
guard
let
self
=
self
else
{
return
}
if
json
.
code
==
200
{
guard
let
dic
=
json
.
data
?
.
peel
as?
[
String
:
Any
],
let
result
=
YHGCWorkExperienceModel
.
deserialize
(
from
:
dic
)
else
{
callBackBlock
(
false
,
nil
)
return
}
self
.
position
=
result
callBackBlock
(
true
,
nil
)
}
else
{
let
error
:
YHErrorModel
=
YHErrorModel
(
errorCode
:
Int32
(
json
.
code
),
errorMsg
:
json
.
msg
)
callBackBlock
(
false
,
error
)
}
}
failBlock
:
{
err
in
callBackBlock
(
false
,
err
)
}
}
func
saveWorkPosition
(
callBackBlock
:
@escaping
(
_
success
:
Bool
?,
_
error
:
YHErrorModel
?)
->
Void
)
{
let
address
=
[
"area"
:
position
.
location
.
area
,
"country"
:
position
.
location
.
country
,
"details"
:
position
.
location
.
details
,
"foreign"
:
position
.
location
.
foreign
]
as
[
String
:
Any
]
let
params
:
[
String
:
Any
]
=
[
"id"
:
position
.
id
,
"order_id"
:
position
.
order_id
,
"company_name"
:
position
.
company_name
,
"entry_time"
:
position
.
entry_time
,
"departure_time"
:
position
.
departure_time
,
"position"
:
position
.
position
,
"has_work_certificate"
:
position
.
has_work_certificate
,
"company_type"
:
position
.
company_type
,
"company_type_other"
:
position
.
company_type_other
,
"location"
:
address
]
let
strUrl
=
YHBaseUrlManager
.
shared
.
curURL
()
+
YHAllApiName
.
WorkExperience
.
gcWorkSave
_
=
YHNetRequest
.
postRequest
(
url
:
strUrl
,
params
:
params
)
{
[
weak
self
]
json
,
_
in
guard
let
self
=
self
else
{
return
}
if
json
.
code
==
200
{
guard
let
dic
=
json
.
data
?
.
peel
as?
[
String
:
Any
],
let
result
=
YHWorkExperiencePositionModel
.
deserialize
(
from
:
dic
)
else
{
callBackBlock
(
false
,
nil
)
return
}
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(服务中心)/TTPS(高才)/ServiceProcess(我的信息流程)/WorkExperience(工作经验)/M/YHGCWorkExperienceModel.swift
View file @
23cfdf03
...
...
@@ -21,6 +21,190 @@ class YHGCWorkExperienceModel: SmartCodable {
var
company_type
:
String
=
""
var
company_type_other
:
String
=
""
var
location
:
YHAddress
=
YHAddress
()
/// 公司近一年的营业额 对于高A,仅当收入类型包含 6/7/8/10 时,该字段才有效
var
turnover
:
String
=
""
/// 高A使用 收入类型 1 工资薪金所得及全年一次性奖金; 2 上市公司股票期权或股权收入; 3 持股公司分红收入; 4 个体工商户/合伙企业/独资企业经营所得收入; 5
/// 股权转让收入; 6 内地公司收入(持股50%及以上); 7 香港公司收入(持股50%及以上); 8 其他境外公司收入(持股50%及以上); 10 澳门公司收入(持股50%及以上)
var
typeOfIncome
:
[
Int
]
=
[]
/// 高A使用 收入金额
var
income
:
String
=
""
required
init
()
{
}
}
/*
/// 工作经历-详情-具体数据
// MARK: - InfoflowWorkDetailData
struct InfoflowWorkDetailData {
/// 行政架构级别
var administrativeLevel: Int?
/// 公司业务性质/范畴/所属行业
var businessNature: String?
/// 工作经验备注
var businessRemark: String?
/// 用人单位介绍
var companyIntroduce: String?
/// 高管在企业管理人数规模
var companyManageTotal: String?
/// 企业人数规模
var companyMemberTotal: String?
/// 公司名称
var companyName: String?
/// 高才使用 职业界别
var companyType: String?
/// 高才使用 其他职业界别
var companyTypeOther: String?
/// 用人单位官网
var companyWebsite: String?
/// 创建来源(rpc.rpc_app.id)
var createFromAppid: Int?
/// 创建时间
var createdAt: String?
/// 用户中心对应模块的id
var customerCenterid: Int?
/// 删除时间
var deletedAt: String?
/// 离职时间
var departureTime: String?
/// 职责性质
var duty: String?
/// 入职时间
var entryTime: String?
/// 高管证明文件
var executivesCertificate: String?
/// 简历/工作总结附件
var file: [InfoflowWorkDetaiFile]?
/// 高才使用 是否能提供工作证明 0 未知 1 是 2 否
var hasWorkCertificate: Int?
/// 工作亮点
var highlights: String?
/// 工作经历id 只在返回工作经历详情时才必需,保存工作经历时非必需
var id: Int?
/// 高A使用 收入金额
var income: String?
/// 雇主所属机构性质
var industry: String?
/// 国际工作经验0没有1有
var internationalWorkExperience: Int?
/// 是否高管? 1是 2否
var isExecutives: Int?
/// 是否名企 0.否 1.是
var isFamousEnterprise: Int?
/// 是否项目详细介绍
var isProjectIntroduction: Int?
/// 是否展示 1是0否 保存工作经历时非必需,不传则默认1
var isShow: Int?
/// 是否合成 1合成 2不合成
var isSynthetic: Int?
var location: InfoflowWorkDetaiLocation?
/// 工作地点 0-国内 1-国外 2-未知
var locationAboard: Int?
/// 是否重要项目负责人 0-未知;1-是;2-否
var masterOfImportantProject: Int?
/// 是否符合清单 1-是;0-否
var matchListing: Int?
/// 是否不需要上传简历/工作总结附件
var notNeedUploadFile: Int?
/// 老CRM的order_child表id
var oldid: Int?
/// 操作人英文
var operatorEnglishName: String?
/// 操作人ID
var operatorid: Int?
/// 操作人中文
var operatorName: String?
/// 订单id
var orderid: Int?
/// 职位
var position: String?
/// 职位水平(1.高级经理人2.中级经理人3.初级经理人4.专业人士5.半专业人士6.其他)
var professionalLevel: Int?
/// 职业水平其他
var professionalOther: String?
/// 工作经历项目
var projects: [InfoflowWorkDetaiProject]?
/// 备注
var remark: String?
/// 工作信息填写进度:0:基本信息 1:工作职责 2:工作亮点 3:简历/总结
var step: Int?
/// 高管任职结束时间
var topManagerEndAt: String?
/// 高管任职开始时间
var topManagerStartAt: String?
/// 公司近一年的营业额 对于高A,仅当收入类型包含 6/7/8/10 时,该字段才有效
var turnover: String?
/// 高A使用 收入类型 1 工资薪金所得及全年一次性奖金; 2 上市公司股票期权或股权收入; 3 持股公司分红收入; 4 个体工商户/合伙企业/独资企业经营所得收入; 5
/// 股权转让收入; 6 内地公司收入(持股50%及以上); 7 香港公司收入(持股50%及以上); 8 其他境外公司收入(持股50%及以上); 10 澳门公司收入(持股50%及以上)
var typeOfIncome: [Int]?
/// 更新来源(rpc.rpc_app.id)
var updateFromAppid: Int?
/// 更新时间
var updatedAt: String?
/// 是否校验数据准确性 0-不检验;1-校验 (只在保存工作经历时才必需,返回工作经历详情数据时非必需)
var verify: Int?
/// 工作职责
var wduty: String?
/// 工作证明文件
var workCertificate: String?
}
/// 工作经历-详情-简历/工作总结附件
// MARK: - InfoflowWorkDetaiFile
struct InfoflowWorkDetaiFile {
/// 文件名
var fileName: String?
/// 文件地址
var fileUrl: String?
/// 上传时间
var uploadedAt: String?
}
/// 工作经历-详情-位置信息
// MARK: - InfoflowWorkDetaiLocation
struct InfoflowWorkDetaiLocation {
/// 省市
var area: [String]?
/// 国家
var country: String?
/// 详细
var details: String?
/// 国外具体地址
var foreign: String?
}
/// 工作经历-详情-项目信息
// MARK: - InfoflowWorkDetaiProject
struct InfoflowWorkDetaiProject {
/// 来源
var createFromAppid: Int?
/// 创建时间
var createdAt: String?
/// 用户中心对应模块的id
var customerCenterid: Int?
/// 删除时间
var deletedAt: String?
/// 项目ID
var id: Int?
/// 订单id
var orderid: Int?
/// 工作项目结束时间
var projectEndTime: String?
/// 工作项目亮点
var projectHighlights: String?
/// 项目名称
var projectName: String?
/// 工作项目开始时间
var projectStartTime: String?
/// 更新来源
var updateFromAppid: Int?
/// 更新时间
var updatedAt: String?
/// 工作经验ID
var workid: Int?
}
*/
galaxy/galaxy/Classes/Modules/IntelligentService(服务中心)/TTPS(高才)/ServiceProcess(我的信息流程)/WorkExperience(工作经验)/M/YHGCWorkModel.swift
View file @
23cfdf03
...
...
@@ -11,6 +11,7 @@ import SmartCodable
class
YHGCWorkModel
:
SmartCodable
{
var
count
:
Int
?
// 高才使用 是否有工作时间重叠期 0-否 1-是
var
has_work_time_overlap
:
Int
=
0
var
has_work_time_empty
:
Int
=
0
var
work_time_overlap_remark
:
String
=
""
//重叠期
...
...
galaxy/galaxy/Classes/Modules/LivestreamSales(直播销售)/C/YHLivePlayerViewController.swift
View file @
23cfdf03
...
...
@@ -354,7 +354,7 @@ class YHLivePlayerViewController: YHBasePlayerViewController {
guard
let
self
=
self
else
{
return
}
if
let
error
=
error
,
retryCount
<=
self
.
maxRetryCount
{
printLog
(
"joinChatRoom:
\(
error
)
"
)
DispatchQueue
.
main
.
asyncAfter
(
deadline
:
.
now
()
+
TimeInterval
(
5
*
(
retryCount
+
1
)
))
{
DispatchQueue
.
main
.
asyncAfter
(
deadline
:
.
now
()
+
TimeInterval
(
5
*
retryCount
))
{
YHIMHelper
.
shared
.
registerAndLoginCurrentUser
{
_
in
joinRoom
(
retryCount
:
retryCount
+
1
)
}
...
...
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