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
XieZhiXiong
jinfa-platform
Commits
31bc3eb5
Commit
31bc3eb5
authored
Feb 17, 2022
by
前端-钟卫鹏
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix: 采购销售订单详情货币符号翻译,处理订单内外部状态tag不同语言显示异常问题
parent
09b22555
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
56 additions
and
22 deletions
+56
-22
index.tsx
src/pages/transaction/components/orderProductTable/index.tsx
+5
-5
index.tsx
...es/transaction/components/saleOrderProductTable/index.tsx
+5
-5
index.tsx
src/pages/transaction/components/statusColors/index.tsx
+23
-6
index.tsx
...ansaction/purchaseOrder/components/statusColors/index.tsx
+23
-6
No files found.
src/pages/transaction/components/orderProductTable/index.tsx
View file @
31bc3eb5
...
...
@@ -55,29 +55,29 @@ export const MoneyTotalBox = ({ dataSource, preview }) => {
return
<
RowStyle
>
<
Col
span=
{
2
}
>
<
div
>
{
creditsCommodity
?
intl
.
formatMessage
({
id
:
'transaction_components.hejisuoxujifen'
})
:
intl
.
formatMessage
({
id
:
'transaction_components.hejijine'
})
}
</
div
>
<
div
>
{
creditsCommodity
?
sum
:
`
¥
${sum}`
}
</
div
>
<
div
>
{
creditsCommodity
?
sum
:
`
${intl.formatMessage({ id: 'common.money' })}
${sum}`
}
</
div
>
</
Col
>
{
!
creditsCommodity
&&
!
contractOrder
&&
<
Col
span=
{
2
}
>
<
div
>
{
intl
.
formatMessage
({
id
:
'transaction_components.cuxiaolijian'
})
}
</
div
>
<
div
>
{
`-
¥
${promotionAmount}`
}
</
div
>
<
div
>
{
`-
${intl.formatMessage({ id: 'common.money' })}
${promotionAmount}`
}
</
div
>
</
Col
>
}
{
!
creditsCommodity
&&
!
contractOrder
&&
<
Col
span=
{
2
}
>
<
div
>
{
intl
.
formatMessage
({
id
:
'transaction_components.youhuidikou'
})
}
</
div
>
<
div
>
{
`-
¥
${couponAmount}`
}
</
div
>
<
div
>
{
`-
${intl.formatMessage({ id: 'common.money' })}
${couponAmount}`
}
</
div
>
</
Col
>
}
{
contractOrder
?
null
:
<>
<
Col
span=
{
2
}
>
<
div
>
{
intl
.
formatMessage
({
id
:
'transaction_components.yunfei'
})
}
</
div
>
<
div
>
{
`
¥
${freight}`
}
</
div
>
<
div
>
{
`
${intl.formatMessage({ id: 'common.money' })}
${freight}`
}
</
div
>
</
Col
>
<
Col
span=
{
2
}
>
<
div
>
{
creditsCommodity
?
intl
.
formatMessage
({
id
:
'transaction_components.zongjisuoxujifen'
})
:
intl
.
formatMessage
({
id
:
'transaction_components.zongjijine'
})
}
</
div
>
<
div
>
{
creditsCommodity
?
amountMoney
:
`
¥
${amountMoney}`
}
</
div
>
<
div
>
{
creditsCommodity
?
amountMoney
:
`
${intl.formatMessage({ id: 'common.money' })}
${amountMoney}`
}
</
div
>
</
Col
>
</>
}
...
...
src/pages/transaction/components/saleOrderProductTable/index.tsx
View file @
31bc3eb5
...
...
@@ -249,18 +249,18 @@ export const MoneyTotalBox = ({ dataSource, isEditData }) => {
return
<
RowStyle
>
<
Col
span=
{
2
}
>
<
div
>
{
creditsCommodity
?
intl
.
formatMessage
({
id
:
'transaction_components.hejisuoxujifen'
})
:
intl
.
formatMessage
({
id
:
'transaction_components.hejijine'
})
}
</
div
>
<
div
>
{
creditsCommodity
?
sum
:
`
¥
${sum}`
}
</
div
>
<
div
>
{
creditsCommodity
?
sum
:
`
${intl.formatMessage({ id: 'common.money' })}
${sum}`
}
</
div
>
</
Col
>
{
!
creditsCommodity
&&
!
contractOrder
&&
<
Col
span=
{
2
}
>
<
div
>
{
intl
.
formatMessage
({
id
:
'transaction_components.cuxiaolijian'
})
}
</
div
>
<
div
>
{
`-
¥
${promotionAmount}`
}
</
div
>
<
div
>
{
`-
${intl.formatMessage({ id: 'common.money' })}
${promotionAmount}`
}
</
div
>
</
Col
>
}
{
!
creditsCommodity
&&
!
contractOrder
&&
<
Col
span=
{
2
}
>
<
div
>
{
intl
.
formatMessage
({
id
:
'transaction_components.youhuidikou'
})
}
</
div
>
<
div
><
Button
type=
"link"
style=
{
{
padding
:
0
,
height
:
'18px'
,
lineHeight
:
'18px'
}
}
>
{
`-
¥
${couponAmount}`
}
</
Button
></
div
>
<
div
><
Button
type=
"link"
style=
{
{
padding
:
0
,
height
:
'18px'
,
lineHeight
:
'18px'
}
}
>
{
`-
${intl.formatMessage({ id: 'common.money' })}
${couponAmount}`
}
</
Button
></
div
>
</
Col
>
}
{
...
...
@@ -272,11 +272,11 @@ export const MoneyTotalBox = ({ dataSource, isEditData }) => {
{
/* 查询列表跳转的修改 */
}
{
modifyPrice
&&
<
SettingOutlined
style=
{
{
marginLeft
:
8
}
}
onClick=
{
handleModify
}
/>
}
</
div
>
<
div
>
{
`
¥
${freight}`
}
</
div
>
<
div
>
{
`
${intl.formatMessage({ id: 'common.money' })}
${freight}`
}
</
div
>
</
Col
>
<
Col
span=
{
2
}
>
<
div
>
{
creditsCommodity
?
intl
.
formatMessage
({
id
:
'transaction_components.zongjisuoxujifen'
})
:
intl
.
formatMessage
({
id
:
'transaction_components.zongjijine'
})
}
</
div
>
<
div
>
{
creditsCommodity
?
amountMoney
:
`
¥
${amountMoney}`
}
</
div
>
<
div
>
{
creditsCommodity
?
amountMoney
:
`
${intl.formatMessage({ id: 'common.money' })}
${amountMoney}`
}
</
div
>
</
Col
>
</>
}
...
...
src/pages/transaction/components/statusColors/index.tsx
View file @
31bc3eb5
import
React
from
'react'
import
React
,
{
CSSProperties
}
from
'react'
import
{
Tag
}
from
'antd'
import
{
getIntl
}
from
'umi'
;
...
...
@@ -90,16 +90,33 @@ const StatusColors: React.FC<StatusColorsProps> = (props) => {
const
{
status
,
type
,
text
=
null
}
=
props
const
statusShowColor
=
matchStatusColor
(
status
)
// return (<Tag color={statusShowColor}>{text}</Tag>)
return
(<
p
style=
{
{
// 计算中韩字符长度
let
chart
=
window
.
localStorage
.
getItem
(
'umi_locale'
),
_text
;
if
(
chart
===
'ko-KR'
||
chart
===
'zh-CN'
)
{
_text
=
text
.
replace
(
/
[\u
ac00-
\u
d7ff
]
|
[\u
4e00-
\u
9fa5
]
/g
,
'OO'
)
}
else
{
_text
=
text
}
console
.
log
(
_text
)
const
css
:
CSSProperties
=
_text
.
length
>=
16
?
{
width
:
100
,
whiteSpace
:
'nowrap'
,
overflow
:
'hidden'
,
textOverflow
:
'ellipsis'
,
// backgroundColor: '#ef6260',
backgroundColor
:
statusShowColor
,
padding
:
'0 7px'
,
borderRadius
:
'2px'
,
color
:
'white'
}
:
{
width
:
'fit-content'
,
backgroundColor
:
statusShowColor
,
padding
:
'0 7px'
,
// borderRadius: '2px',
// color: 'white'
}
}
title=
{
text
}
>
{
text
}
</
p
>)
borderRadius
:
'2px'
,
color
:
'white'
}
return
(<
p
style=
{
css
}
title=
{
text
}
>
{
text
}
</
p
>)
}
StatusColors
.
defaultProps
=
{}
...
...
src/pages/transaction/purchaseOrder/components/statusColors/index.tsx
View file @
31bc3eb5
import
React
from
'react'
import
React
,
{
CSSProperties
}
from
'react'
import
{
Tag
}
from
'antd'
export
interface
IStatusColor
{
...
...
@@ -81,16 +81,33 @@ const StatusColors: React.FC<StatusColorsProps> = (props) => {
const
statusShowColor
=
matchStatusColor
(
status
)
// 优先显示 后端返回的状态文本
// return (<Tag color={statusShowColor}>{text}</Tag>)
return
(<
p
style=
{
{
// 计算中韩字符长度
let
chart
=
window
.
localStorage
.
getItem
(
'umi_locale'
),
_text
;
if
(
chart
===
'ko-KR'
||
chart
===
'zh-CN'
)
{
_text
=
text
.
replace
(
/
[\u
ac00-
\u
d7ff
]
|
[\u
4e00-
\u
9fa5
]
/g
,
'OO'
)
}
else
{
_text
=
text
}
const
css
:
CSSProperties
=
_text
.
length
>
16
?
{
width
:
100
,
whiteSpace
:
'nowrap'
,
overflow
:
'hidden'
,
textOverflow
:
'ellipsis'
,
// backgroundColor: '#ef6260'
,
backgroundColor
:
statusShowColor
,
padding
:
'0 7px'
,
// borderRadius: '2px',
// color: 'white'
}
}
title=
{
text
}
>
{
text
}
</
p
>)
borderRadius
:
'2px'
,
color
:
'white'
}
:
{
width
:
'fit-content'
,
backgroundColor
:
statusShowColor
,
padding
:
'0 7px'
,
borderRadius
:
'2px'
,
color
:
'white'
}
return
(<
p
style=
{
css
}
title=
{
text
}
>
{
text
}
</
p
>)
}
StatusColors
.
defaultProps
=
{}
...
...
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