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
linweijiong
jinfa-platform
Commits
cde65ea8
Commit
cde65ea8
authored
Sep 07, 2021
by
前端-钟卫鹏
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix: 处理statusColor大小写
parent
abb201b4
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
101 additions
and
3 deletions
+101
-3
index.tsx
...tion/purchaseOrder/components/circulationRecord/index.tsx
+1
-1
index.less
...nsaction/purchaseOrder/components/statusColors/index.less
+0
-0
index.tsx
...ansaction/purchaseOrder/components/statusColors/index.tsx
+98
-0
index.tsx
src/pages/transaction/purchaseOrder/constant/index.tsx
+1
-1
useSelfTable.tsx
...action/purchaseOrder/readyPayOrder/model/useSelfTable.tsx
+1
-1
No files found.
src/pages/transaction/purchaseOrder/components/circulationRecord/index.tsx
View file @
cde65ea8
...
...
@@ -5,7 +5,7 @@ import { formatTimeString } from '@/utils'
import
'./index.less'
import
cx
from
'classnames'
import
{
ReadyAddOrderDetailContext
}
from
'../../context'
import
StatusColors
from
'../
StatusColors'
import
StatusColors
from
'../
statusColors'
export
interface
CirculationRecordProps
{}
...
...
src/pages/transaction/purchaseOrder/components/statusColors/index.less
0 → 100644
View file @
cde65ea8
src/pages/transaction/purchaseOrder/components/statusColors/index.tsx
0 → 100644
View file @
cde65ea8
import
React
from
'react'
import
{
Tag
}
from
'antd'
export
interface
IStatusColor
{
[
key
:
string
]:
{
value
:
string
|
number
,
color
:
string
}
}
// 用于标签状态控制
export
interface
StatusColorsProps
{
status
:
number
,
text
?:
string
,
type
:
'out'
|
'inside'
|
'saleInside'
}
export
enum
ORDER_EXAMINE_ENUM
{
/**
* 新增订单
*/
ADD_ORDER
=
1
,
/**
* 一级审核
*/
ONE_LEVEL_VALIDATE
,
/**
* 二级审核
*/
TWO_LEVEL_VALIDATE
,
/**
* 提交订单中
*/
SUBMIT_ORDER_PROCESS
,
/**
* 提交订单成功
*/
SUBMIT_ORDER_SUCCESS
,
/**
* 一级审核失败
*/
ONE_LEVEL_VALIDATE_ERROR
,
/**
* 二级审核失败
*/
TWO_LEVEL_VALIDATE_ERROR
}
export
const
ORDER_EXAMINE_LIST
=
[
''
,
'新增订单'
,
'一级审核中'
,
'二级审核中'
,
'提交订单'
,
'提交成功'
,
'一级审核不通过'
,
'二级审核不通过'
]
// 状态颜色映射
export
const
StatusColorsMaps
=
{
ready
:
'#C0C4CC'
,
process
:
'#FFC400'
,
submit
:
'#6C9CEB'
,
success
:
'#41CC9E'
,
error
:
'#EF6260'
}
const
matchStatusColor
=
(
status
:
number
):
string
=>
{
const
maps
=
{
[
ORDER_EXAMINE_ENUM
.
ADD_ORDER
]:
StatusColorsMaps
.
ready
,
[
ORDER_EXAMINE_ENUM
.
ONE_LEVEL_VALIDATE
]:
StatusColorsMaps
.
process
,
[
ORDER_EXAMINE_ENUM
.
TWO_LEVEL_VALIDATE
]:
StatusColorsMaps
.
process
,
[
ORDER_EXAMINE_ENUM
.
SUBMIT_ORDER_PROCESS
]:
StatusColorsMaps
.
submit
,
[
ORDER_EXAMINE_ENUM
.
SUBMIT_ORDER_SUCCESS
]:
StatusColorsMaps
.
success
}
// 默认返回错误的状态颜色
return
maps
[
status
]
||
StatusColorsMaps
.
error
}
// 订单内部状态显示
const
StatusColors
:
React
.
FC
<
StatusColorsProps
>
=
(
props
)
=>
{
const
{
status
,
type
,
text
=
null
}
=
props
const
statusShowColor
=
matchStatusColor
(
status
)
// 优先显示 后端返回的状态文本
return
(<
Tag
color=
{
statusShowColor
}
>
{
text
}
</
Tag
>)
}
StatusColors
.
defaultProps
=
{}
export
default
StatusColors
src/pages/transaction/purchaseOrder/constant/index.tsx
View file @
cde65ea8
import
React
from
'react'
import
{
history
}
from
'umi'
import
{
formatTimeString
}
from
'@/utils'
import
StatusColors
from
'../components/
S
tatusColors'
import
StatusColors
from
'../components/
s
tatusColors'
import
EyePreview
from
'@/components/EyePreview'
export
const
baseOrderListColumns
:
any
=
()
=>
{
...
...
src/pages/transaction/purchaseOrder/readyPayOrder/model/useSelfTable.tsx
View file @
cde65ea8
...
...
@@ -4,7 +4,7 @@ import { Row, Col, Progress } from 'antd'
import
{
PublicApi
}
from
'@/services/api'
import
EyePreview
from
'@/components/EyePreview'
import
{
formatTimeString
}
from
'@/utils'
import
StatusColors
from
'../../components/
S
tatusColors'
import
StatusColors
from
'../../components/
s
tatusColors'
import
{
FieldTimeOutlined
}
from
'@ant-design/icons'
import
{
Chart
,
...
...
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