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
0347cbe3
Commit
0347cbe3
authored
Apr 13, 2022
by
许佳敏
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'fix-0418-bug' into 'v2-220418'
fix: 修复商品详情活动价格问题和商品详情优惠券展示 See merge request linkseeks-design/pro-platform!252
parents
dca911a8
b5d0272b
Hide whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
101 additions
and
24 deletions
+101
-24
index.tsx
...readySubmitExamine/components/partakeUserLayout/index.tsx
+1
-1
index.less
...rchaseOrder/commodityDetail/components/Coupons/index.less
+16
-0
index.tsx
...urchaseOrder/commodityDetail/components/Coupons/index.tsx
+17
-15
index.less
...haseOrder/commodityDetail/components/Promotion/index.less
+16
-0
index.tsx
...chaseOrder/commodityDetail/components/Promotion/index.tsx
+12
-1
index.tsx
...urchaseOrder/commodityDetail/components/SkuInfo/index.tsx
+13
-1
index.less
...n/saleOrder/agentPurchaseOrder/commodityDetail/index.less
+19
-0
index.tsx
...on/saleOrder/agentPurchaseOrder/commodityDetail/index.tsx
+5
-6
commodityItem.tsx
...eOrder/agentPurchaseOrder/purchaseOrder/commodityItem.tsx
+1
-0
index.tsx
...tion/saleOrder/agentPurchaseOrder/purchaseOrder/index.tsx
+1
-0
No files found.
src/pages/transaction/marketingAbility/selfManagement/readySubmitExamine/components/partakeUserLayout/index.tsx
View file @
0347cbe3
...
...
@@ -128,7 +128,7 @@ const PartakeUserLayout: React.FC<PartakeUserLayoutProps> = (props: any) => {
<
Col
span=
{
6
}
>
<
div
className=
{
style
.
cell
}
>
<
h5
className=
{
style
.
label
}
>
{
intl
.
formatMessage
({
id
:
'selfManagement.LevelLabel'
})
}
:
</
h5
>
<
h5
className=
{
style
.
content
}
>
<
Image
width=
{
56
}
height=
{
16
}
preview=
{
false
}
src=
{
PIC_MAP
[
item
.
level
]
}
/>
</
h5
>
<
h5
className=
{
style
.
content
}
>
{
item
.
levelTag
}
</
h5
>
</
div
>
</
Col
>
</
Row
>
...
...
src/pages/transaction/saleOrder/agentPurchaseOrder/commodityDetail/components/Coupons/index.less
View file @
0347cbe3
@import '../../../common.less';
.product_info_coupons_line {
display: flex;
...
...
@@ -39,6 +40,21 @@
cursor: pointer;
}
}
.product_promotion_expand {
font-size: 12px;
color: #91959B;
display: flex;
align-items: center;
cursor: pointer;
& > span {
margin-right: 4px;
}
&_icon {
font-size: 10px;
}
}
}
}
}
...
...
src/pages/transaction/saleOrder/agentPurchaseOrder/commodityDetail/components/Coupons/index.tsx
View file @
0347cbe3
import
React
,
{
useEffect
,
useState
}
from
'react'
import
{
Modal
,
message
}
from
'antd'
import
{
CheckCircleFilled
}
from
'@ant-design/icons'
import
{
TagItem
}
from
'@/components/ActivityTags'
import
{
UserInfoType
}
from
'@/store/userStore/modal'
import
{
LOGIN_DOMAIN
}
from
'@/constants'
import
{
LinkTo
}
from
'@/utils'
import
{
useMessageIntl
}
from
'@linkseeks/lingxi-utils'
import
{
CaretDownOutlined
,
CaretUpOutlined
,
CheckCircleFilled
}
from
'@ant-design/icons'
import
{
TagList
}
from
'@linkseeks/lingxi-mall-components'
import
{
LinkTo
}
from
'../../../utils'
import
moment
from
'moment'
import
{
postMarketingWebCouponReceive
}
from
'@/services/MarketingV2Api'
import
{
CouponDataType
}
from
'../../types'
import
{
getMessage
}
from
'../../../utils'
import
styles
from
'./index.less'
interface
CouponsProps
{
data
:
CouponDataType
[]
|
undefined
,
userInfo
:
UserInfoType
,
mallId
:
number
,
}
const
Coupons
:
React
.
FC
<
CouponsProps
>
=
(
props
)
=>
{
const
{
data
,
userInfo
,
mallId
}
=
props
const
{
data
,
mallId
}
=
props
const
[
couponsList
,
setCouponsList
]
=
useState
<
CouponDataType
[]
>
()
const
{
getMessage
}
=
useMessageIntl
()
const
[
expand
,
setExpand
]
=
useState
<
boolean
>
(
false
)
const
SHOW_COUNT
=
2
// 默认显示数量
useEffect
(()
=>
{
if
(
data
)
{
...
...
@@ -37,10 +35,6 @@ const Coupons: React.FC<CouponsProps> = (props) => {
}
const
receiveCoupon
=
async
(
couponInfo
:
CouponDataType
)
=>
{
if
(
!
userInfo
)
{
LinkTo
(
LOGIN_DOMAIN
)
return
}
try
{
const
param
:
any
=
{
...
...
@@ -120,9 +114,9 @@ const Coupons: React.FC<CouponsProps> = (props) => {
<div className={styles.product_info_coupons_line_brief}>
<div className={styles.product_coupon_list} >
{
couponsList.map((item
) =>
(
couponsList.map((item
, index) => (index < SHOW_COUNT || expand ) &&
(
<div className={styles.product_coupon_list_item} key={item.couponId}>
<TagItem isCoupon />
<Tag
List.
Item isCoupon />
<span>{item.name},{getMessage('mall.activity.coupon.condition', '满{money}元可用', { money: item.useConditionMoney })}</span>
{
showReceiveBtnByType(item)
...
...
@@ -130,6 +124,14 @@ const Coupons: React.FC<CouponsProps> = (props) => {
</div>
))
}
{
couponsList.length > SHOW_COUNT && (
<div className={styles.product_promotion_expand} onClick={() => setExpand(!expand)}>
<span>{expand ? getMessage('order.index.payway.PutAway', '收起') : getMessage('order.index.payway.open', '展开')}</span>
{expand ? <CaretUpOutlined className={styles.product_promotion_expand_icon} /> : <CaretDownOutlined className={styles.product_promotion_expand_icon} />}
</div>
)
}
</div>
</div>
</div>
...
...
src/pages/transaction/saleOrder/agentPurchaseOrder/commodityDetail/components/Promotion/index.less
View file @
0347cbe3
...
...
@@ -39,6 +39,22 @@
}
}
.product_promotion_expand {
font-size: 12px;
color: #91959B;
display: flex;
align-items: center;
cursor: pointer;
& > span {
margin-right: 4px;
}
&_icon {
font-size: 10px;
}
}
}
}
...
...
src/pages/transaction/saleOrder/agentPurchaseOrder/commodityDetail/components/Promotion/index.tsx
View file @
0347cbe3
...
...
@@ -4,6 +4,7 @@ import { MarketingTypeEnum } from '../../../constants/marketing'
import
{
PromotionItem
}
from
'../../types'
import
{
getMessage
}
from
'../../../utils'
import
styles
from
'./index.less'
import
{
CaretDownOutlined
,
CaretUpOutlined
}
from
'@ant-design/icons'
interface
PromotionProps
{
data
:
PromotionItem
[]
|
undefined
,
...
...
@@ -13,6 +14,8 @@ interface PromotionProps {
const
Promotion
:
React
.
FC
<
PromotionProps
>
=
(
props
)
=>
{
const
{
data
,
skuId
}
=
props
const
[
list
,
setList
]
=
useState
<
PromotionItem
[]
>
()
const
[
expand
,
setExpand
]
=
useState
<
boolean
>
(
false
)
const
SHOW_COUNT
=
2
// 默认显示数量
const
doNotShowList
=
[
MarketingTypeEnum
.
activity_type_6
,
MarketingTypeEnum
.
activity_type_13
]
...
...
@@ -35,7 +38,7 @@ const Promotion: React.FC<PromotionProps> = (props) => {
<
div
className=
{
styles
.
product_info_promotion_line_brief
}
>
<
div
className=
{
styles
.
product_promotion_list
}
>
{
list
.
map
((
item
)
=>
(
list
.
map
((
item
,
index
)
=>
(
index
<
SHOW_COUNT
||
expand
)
&&
(
<
div
className=
{
styles
.
product_promotion_list_item
}
key=
{
`product_promotion_list_item_${item.activityId}`
}
>
<
TagList
.
Item
tag=
{
item
.
preferentialTag
}
/>
<
span
>
{
item
.
preferentialTagDesc
}
</
span
>
...
...
@@ -51,6 +54,14 @@ const Promotion: React.FC<PromotionProps> = (props) => {
</
div
>
))
}
{
list
.
length
>
SHOW_COUNT
&&
(
<
div
className=
{
styles
.
product_promotion_expand
}
onClick=
{
()
=>
setExpand
(
!
expand
)
}
>
<
span
>
{
expand
?
getMessage
(
'order.index.payway.PutAway'
,
'收起'
)
:
getMessage
(
'order.index.payway.open'
,
'展开'
)
}
</
span
>
{
expand
?
<
CaretUpOutlined
className=
{
styles
.
product_promotion_expand_icon
}
/>
:
<
CaretDownOutlined
className=
{
styles
.
product_promotion_expand_icon
}
/>
}
</
div
>
)
}
</
div
>
</
div
>
</
div
>
...
...
src/pages/transaction/saleOrder/agentPurchaseOrder/commodityDetail/components/SkuInfo/index.tsx
View file @
0347cbe3
...
...
@@ -2,7 +2,9 @@ import React, { useEffect, useState } from 'react'
import
cx
from
'classnames'
import
{
ProductInfoType
,
CurrentSkuItemType
}
from
'../../types'
import
styles
from
'../../index.less'
import
{
getMessage
}
from
'../../../utils'
import
{
COMMODITY_TYPE
}
from
'@/constants'
import
{
CaretDownOutlined
,
CaretUpOutlined
}
from
'@ant-design/icons'
export
interface
SelectAttrValType
{
attrId
:
number
;
...
...
@@ -22,6 +24,8 @@ const SkuInfo: React.FC<SkuInfoProps> = (props) => {
const
{
type
,
skuId
,
productInfo
,
currentSku
,
onSelect
}
=
props
const
[
skuList
,
setSkuList
]
=
useState
<
any
[]
>
([])
const
[
selectAttrVal
,
setSelectAttrVal
]
=
useState
<
SelectAttrValType
[]
>
([])
const
[
expand
,
setExpand
]
=
useState
<
boolean
>
(
false
)
const
SHOW_COUNT
=
3
// 默认显示数量
const
judgeSelectAttrInList
=
(
list
:
any
[],
attrValId
:
number
,
attrId
:
number
)
=>
{
return
list
.
some
(
item
=>
item
[
"attrId"
]
===
attrId
&&
item
[
"attrValId"
]
===
attrValId
)
...
...
@@ -261,7 +265,7 @@ const SkuInfo: React.FC<SkuInfoProps> = (props) => {
return
(
skuList
&&
skuList
.
length
>
0
)
?
(
<>
{
skuList
.
map
((
skuItem
)
=>
(
skuList
.
map
((
skuItem
,
index
)
=>
(
index
<
SHOW_COUNT
||
expand
)
&&
(
<
div
className=
{
styles
.
product_info_line
}
key=
{
`product_info_line_${skuItem.id}`
}
...
...
@@ -308,6 +312,14 @@ const SkuInfo: React.FC<SkuInfoProps> = (props) => {
</
div
>
))
}
{
skuList
.
length
>
SHOW_COUNT
&&
(
<
div
className=
{
styles
.
product_promotion_expand
}
onClick=
{
()
=>
setExpand
(
!
expand
)
}
>
<
span
>
{
expand
?
getMessage
(
'order.index.payway.PutAway'
,
'收起'
)
:
getMessage
(
'order.index.payway.open'
,
'展开'
)
}
</
span
>
{
expand
?
<
CaretUpOutlined
className=
{
styles
.
product_promotion_expand_icon
}
/>
:
<
CaretDownOutlined
className=
{
styles
.
product_promotion_expand_icon
}
/>
}
</
div
>
)
}
</>
)
:
null
}
...
...
src/pages/transaction/saleOrder/agentPurchaseOrder/commodityDetail/index.less
View file @
0347cbe3
...
...
@@ -296,6 +296,7 @@
}
}
}
}
.shopping_cart {
...
...
@@ -452,3 +453,21 @@
}
}
}
.product_promotion_expand {
font-size: 12px;
color: #91959B;
display: flex;
align-items: center;
cursor: pointer;
padding-left: 124px;
margin-top: 8px;
& > span {
margin-right: 4px;
}
&_icon {
font-size: 10px;
}
}
src/pages/transaction/saleOrder/agentPurchaseOrder/commodityDetail/index.tsx
View file @
0347cbe3
...
...
@@ -14,7 +14,7 @@ import ProductDescription from './components/ProductDescription'
// import Interested from './components/Interested'
import
CommodityPrice
,
{
getMaxCountRange
}
from
'./components/Price'
import
Promotion
from
'./components/Promotion'
//
import Coupons from './components/Coupons'
import
Coupons
from
'./components/Coupons'
// import GroupBuy from './components/GroupBuy'
// import Combination from './components/Combination'
import
SkuInfo
from
'./components/SkuInfo'
...
...
@@ -380,8 +380,8 @@ const CommodityDetail: React.FC = (props: any) => {
unitPrice
=
getLadderPrice
()
}
// 会员折扣价格
if
(
parameter
&&
useParameter
&&
!
isGroupBuy
)
{
// 会员折扣价格
(如果含有活动,则不需要在乘会员折扣,后台已计算进去)
if
(
parameter
&&
useParameter
&&
!
isGroupBuy
&&
!
hasActivity
)
{
unitPrice
=
unitPrice
*
parameter
}
return
unitPrice
...
...
@@ -575,15 +575,14 @@ const CommodityDetail: React.FC = (props: any) => {
{
/* 促销 */
}
<
Promotion
data=
{
marketingData
?.
tagDetailList
}
skuId=
{
currentSku
?.
skuId
}
/>
{
/* 优惠券 */
}
{
/* {
{
marketingData
?.
canUseCoupon
===
1
&&
(
<
Coupons
data=
{
marketingData
?.
couponList
}
userInfo={userInfo}
mallId=
{
mallId
}
/>
)
}
*/
}
}
{
/* 配送 */
}
<
Delivery
productInfo=
{
commodityDetail
}
...
...
src/pages/transaction/saleOrder/agentPurchaseOrder/purchaseOrder/commodityItem.tsx
View file @
0347cbe3
...
...
@@ -25,6 +25,7 @@ const CommodityItem: React.FC<any> = (props) => {
deleteListItems
,
saveOrUpdatePurchase
,
deletePurchase
,
buyerInfo
,
}
=
props
;
const
[
initShop
,
setInitShop
]
=
useState
<
any
>
({})
const
[
showIsLoading
,
setShowIsLoading
]
=
useState
(
true
);
...
...
src/pages/transaction/saleOrder/agentPurchaseOrder/purchaseOrder/index.tsx
View file @
0347cbe3
...
...
@@ -376,6 +376,7 @@ const PurchaseOrder: React.FC= (props: any) => {
<
CommodityItem
key=
{
`${item.id}_${index}`
}
newShop=
{
item
}
buyerInfo=
{
agentPurchaseOrderInfo
}
orderList=
{
orderList
}
setOrderList=
{
setOrderList
}
checkedList=
{
checkedList
}
...
...
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