Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
J
jinfa-admin
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-admin
Commits
e0a48d94
Commit
e0a48d94
authored
Mar 19, 2022
by
XieZhiXiong
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat: 处理积分订单价格展示问题
parent
114148df
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
61 additions
and
1 deletion
+61
-1
order.ts
src/constants/const/order.ts
+58
-0
index.tsx
...mment/manage/detailed/components/EvaluationList/index.tsx
+2
-1
utils.ts
src/pages/orderManage/comment/utils.ts
+1
-0
No files found.
src/constants/const/order.ts
0 → 100644
View file @
e0a48d94
/** 订单类型 */
/**
* 询价采购
*/
export
const
ORDER_TYPE_INQUIRYT_PURCHASE
=
1
;
/**
* 需求采购
*/
export
const
ORDER_TYPE_DEMAND_PURCHASE
=
2
;
/**
* 现货采购
*/
export
const
ORDER_TYPE_STORE_PURCHASE
=
3
;
/**
* 集采
*/
export
const
ORDER_TYPE_CENTRAL_PURCHASE
=
4
;
/**
* 渠道直采
*/
export
const
ORDER_TYPE_CHANNEL_DIRECT_MINING
=
5
;
/**
* 渠道现货
*/
export
const
ORDER_TYPE_CHANNEL_STORE
=
6
;
/**
* 积分兑换
*/
export
const
ORDER_TYPE_POINTS
=
7
;
/**
* 渠道积分兑换
*/
export
const
ORDER_TYPE_CHANNEL_POINTS
=
8
;
/**
* 采购询价合同
*/
export
const
ORDER_TYPE_INQUIRY_CONTRACT
=
9
;
/**
* 采购竞价合同
*/
export
const
ORDER_TYPE_BIDDING_CONTRACT
=
10
;
/**
* 采购招标合同
*/
export
const
ORDER_TYPE_TENDER_CONTRACT
=
11
;
/**
* 请购单下单
*/
export
const
ORDER_TYPE_REQUISITION
=
12
;
/**
* 判断订单类型是否是积分订单
* @param orderType 订单类型 number
* @returns
*/
export
const
checkIsPointsOrder
=
(
orderType
:
number
)
=>
orderType
===
ORDER_TYPE_POINTS
||
orderType
===
ORDER_TYPE_CHANNEL_POINTS
;
\ No newline at end of file
src/pages/orderManage/comment/manage/detailed/components/EvaluationList/index.tsx
View file @
e0a48d94
...
...
@@ -12,6 +12,7 @@ import {
}
from
'@formily/antd'
;
import
{
ArrayList
}
from
'@formily/react-shared-components'
;
import
{
toArr
,
isFn
,
FormPath
}
from
'@formily/shared'
;
import
{
checkIsPointsOrder
}
from
'@/constants/const/order'
;
import
SmilingFace
from
'@/components/NiceForm/components/SmilingFace'
;
const
ArrayComponents
=
{
...
...
@@ -146,7 +147,7 @@ const EvaluationList = props => {
X
{
item
.
good
.
purchaseCount
||
''
}
{
item
.
good
.
unit
||
''
}
</
div
>
<
div
className=
"goodInfo-price"
>
{
`
¥ ${item.good.price
}`
}
</
div
>
<
div
className=
"goodInfo-price"
>
{
`
${!checkIsPointsOrder(item.orderType) ? '¥' : ''} ${item.good.price}${checkIsPointsOrder(item.orderType) ? '积分' : ''
}`
}
</
div
>
</
div
>
</
div
>
</
Col
>
...
...
src/pages/orderManage/comment/utils.ts
View file @
e0a48d94
...
...
@@ -39,6 +39,7 @@ export function normalizeUnevaluatedList(arr: any): Unevaluated[] {
comment
:
item
.
comment
,
// 评价
picture
:
Array
.
isArray
(
item
.
pics
)
?
item
.
pics
.
map
(
item
=>
normalizeFiledata
(
item
))
:
[],
smile
:
item
.
star
,
// 笑脸
orderType
:
item
.
orderType
,
// 笑脸
};
ret
.
push
(
atom
);
});
...
...
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