Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
J
jinfa-platform
Project
Project
Details
Activity
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
shenshaokai
jinfa-platform
Commits
6515b7eb
Commit
6515b7eb
authored
Mar 28, 2022
by
Gavin Peng
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat: 送货计划协同详情补充,工具类细分
parent
a4b4f6e7
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
0 additions
and
105 deletions
+0
-105
status.ts
src/pages/order/constants/status.ts
+0
-105
No files found.
src/pages/order/constants/status.ts
deleted
100644 → 0
View file @
a4b4f6e7
interface
StatusStyle
{
bgColor
:
string
,
fontColor
:
string
}
interface
StatusStyleItem
{
[
key
:
string
]:
StatusStyle
}
/**
* 状态描述
* - default: 默认
* - toSbumit: 待提交
* - toBeConfirmed: 待确认
* - toBeModified: 待修改
* - confirmed: 已确认
* - generated: 已确认
* - voided: 已确认
*/
enum
StatusEnum
{
Default
=
1
,
ToSbumit
=
2
,
ToBeConfirmed
=
3
,
ToBeModified
=
4
,
Confirmed
=
5
,
Generated
=
6
,
Voided
=
7
,
}
class
TagStatus
{
/**
* 默认的Sytle集合 具体情况,看StatusEnum
*/
#
tagStatusColor
:
StatusStyleItem
=
{
[
StatusEnum
.
Default
]:
this
.
defaultStatusStyle
(),
[
StatusEnum
.
ToSbumit
]:
this
.
toSbumitStatusStyle
(),
[
StatusEnum
.
ToBeConfirmed
]:
this
.
toBeConfirmedStyle
(),
[
StatusEnum
.
ToBeModified
]:
this
.
toBeConfirmedStyle
(),
[
StatusEnum
.
Confirmed
]:
this
.
confirmedStyle
(),
[
StatusEnum
.
Generated
]:
this
.
generatedStyle
(),
[
StatusEnum
.
Voided
]:
this
.
voidedStyle
(),
}
defaultStatusStyle
()
{
return
{
bgColor
:
'#f2f4f5'
,
fontColor
:
'#000'
}
}
toSbumitStatusStyle
()
{
return
{
bgColor
:
'#f4f5f7'
,
fontColor
:
'#5c626a'
};
}
toBeConfirmedStyle
()
{
return
{
bgColor
:
'#ecf2fe'
,
fontColor
:
'#4787f0'
};
}
toBeModifiedStyle
()
{
return
{
bgColor
:
'#eae6ff'
,
fontColor
:
'#9963d8'
}
}
confirmedStyle
()
{
return
{
bgColor
:
'#ebf9f6'
,
fontColor
:
'#00a98f'
}
}
generatedStyle
()
{
return
{
bgColor
:
'#f0f5ff'
,
fontColor
:
'#f0f5ff'
}
}
voidedStyle
()
{
return
{
bgColor
:
'#fff2f0'
,
fontColor
:
'#ff4d4f'
}
}
/**
* 设置Style的属性,相同的key会覆盖
* @param status
* @param value
*/
setStyleToCollection
(
status
:
string
|
number
,
value
:
StatusStyle
)
{
this
.
#
tagStatusColor
=
{
...
this
.
#
tagStatusColor
,
[
status
]:
value
}
}
/**
* 获取Tag Style属性
* @param status 后台的状态值
* @param value
*/
getTagStyle
(
status
:
string
|
number
)
{
return
this
.
#
tagStatusColor
[
status
]
?
this
.
#
tagStatusColor
[
status
]
:
this
.
defaultStatusStyle
();
}
}
class
TagStatusFactory
{
static
getInstance
(){
return
new
TagStatus
();
}
}
export
{
TagStatus
,
TagStatusFactory
}
\ No newline at end of file
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