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
05440b86
Commit
05440b86
authored
Dec 01, 2021
by
前端-黄佳鑫
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'v2' of
http://10.0.0.22:3000/lingxi/lingxi-business-paltform
into v2
parents
e0431a40
e3c22c44
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
14 changed files
with
222 additions
and
60 deletions
+222
-60
activityProductDrawer.tsx
...ts/drawer/activityProductDrawer/activityProductDrawer.tsx
+2
-0
returnSaveParams.ts
src/pages/editor/components/toolBar/returnSaveParams.ts
+0
-0
index.tsx
...anel/propsSettings/components/marketingCardGood/index.tsx
+132
-6
index.tsx
...el/propsSettings/components/marketingCardHeader/index.tsx
+1
-1
index.tsx
...ropsSettings/components/suggestProductCommodity/index.tsx
+1
-1
index.tsx
src/pages/mobileTemplate/shopTemplateEdit/index.tsx
+24
-14
marketing_config.ts
...pages/mobileTemplate/shopTemplateEdit/marketing_config.ts
+12
-1
index.tsx
src/pages/mobileTemplate/shopTemplatePreview/index.tsx
+23
-13
index.tsx
...Ability/merchantCoupon/components/DeliverCoupon/index.tsx
+2
-2
index.tsx
...ngAbility/merchantCoupon/components/RunningInfo/index.tsx
+10
-7
schema.tsx
...Coupon/merchantCouponQuery/components/EditForm/schema.tsx
+1
-1
useBusinessEffects.ts
...itted/components/CouponForm/effects/useBusinessEffects.ts
+9
-9
schema.tsx
...erchantCouponUnsubmitted/components/CouponForm/schema.tsx
+3
-3
schema.tsx
...rchantCouponUnsubmitted/components/GoodsDrawer/schema.tsx
+2
-2
No files found.
src/pages/editor/components/drawer/activityProductDrawer/activityProductDrawer.tsx
View file @
05440b86
...
...
@@ -137,6 +137,7 @@ const ActivityProductDrawer: React.FC<Iprops> = (props: Iprops) => {
// useEffect(() => {})
const
handleCancel
=
()
=>
{
setSelectedActivityProductList
([])
onCancel
?.();
};
...
...
@@ -240,6 +241,7 @@ const ActivityProductDrawer: React.FC<Iprops> = (props: Iprops) => {
rowSelection=
{
rowSelection
as
any
}
rowKey=
{
(
_record
)
=>
`${_record.activityId!}-${_record.id!}`
}
loading=
{
loading
}
pagination=
{
false
}
columns=
{
columns
}
dataSource=
{
selectedActivityProductList
}
></
Table
>
</
div
>
<
div
className=
{
styles
.
pagination
}
>
...
...
src/pages/editor/components/toolBar/returnSaveParams.ts
View file @
05440b86
This diff is collapsed.
Click to expand it.
src/pages/editor/mobileSettingPanel/propsSettings/components/marketingCardGood/index.tsx
View file @
05440b86
import
React
,
{
useState
,
useEffect
}
from
'react'
;
import
React
,
{
useState
,
useEffect
,
useRef
}
from
'react'
;
import
{
history
}
from
'umi'
;
import
{
Button
,
Tooltip
}
from
'antd'
;
import
{
Button
,
Tooltip
,
Input
,
Tag
}
from
'antd'
;
import
{
PlusOutlined
}
from
'@ant-design/icons'
;
import
{
cloneDeep
}
from
'lodash'
;
import
{
changeProps
,
updatePageConfig
,
PageConfigType
}
from
'@lingxi-design/core'
;
import
{
getMarketingAdornActivityGoodsAdorn
,
getMarketingAdornMerchantActivityListAdorn
,
GetMarketingAdornPlatformActivityListAdornRequest
}
from
'@/services/MarketingV2Api'
;
...
...
@@ -9,22 +10,31 @@ import ActivityProductDrawer from '@/pages/editor/components/drawer/activityProd
import
ActivityImage
from
'@/assets/couponIcons/ActivityImage.svg'
;
import
{
priceFormat
}
from
'@/utils/numberFomat'
;
import
styles
from
'./index.less'
;
import
{
LAYOUT_TYPE
}
from
'@/constants'
;
interface
MarketingCardGoodProps
{
id
?:
any
,
actType
?:
any
,
exType
?:
any
exType
?:
any
,
tags
?:
any
,
// 当前选中组件的key
selectedKey
?:
any
,
pageConfig
?:
PageConfigType
pageConfig
?:
PageConfigType
,
layoutType
:
LAYOUT_TYPE
}
const
MarketingCardGood
:
React
.
FC
<
MarketingCardGoodProps
>
=
(
props
:
MarketingCardGoodProps
)
=>
{
const
{
id
,
actType
,
exType
,
pageConfig
}
=
props
;
const
{
id
,
actType
,
exType
,
tags
=
[],
layoutType
,
pageConfig
}
=
props
;
const
{
query
:
{
shopId
}
}:
any
=
history
.
location
;
const
[
record
,
setRecord
]
=
useState
<
any
>
([]);
const
[
actVisible
,
setActVisible
]
=
useState
(
false
);
const
saveEditInputRef
=
useRef
<
any
>
({});
const
saveInputRef
=
useRef
<
any
>
({});
const
[
editInputIndex
,
setEditInputIndex
]
=
useState
(
-
1
);
const
[
editInputValue
,
setEditInputValue
]
=
useState
<
any
>
(
''
);
const
[
inputValue
,
setInputValue
]
=
useState
<
any
>
(
''
);
const
[
inputVisible
,
setInputVisible
]
=
useState
(
false
);
useEffect
(()
=>
{
if
(
id
&&
id
!=
record
[
0
]?.
id
)
{
...
...
@@ -210,6 +220,47 @@ const MarketingCardGood: React.FC<MarketingCardGoodProps> = (props: MarketingCar
setActVisible
(
false
);
};
const
_handleEditInputChange
=
(
e
:
any
)
=>
{
setEditInputValue
(
e
.
target
.
value
);
}
const
_handleEditInputConfirm
=
()
=>
{
const
newTags
=
[...
tags
];
newTags
[
editInputIndex
]
=
editInputValue
;
setEditInputIndex
(
-
1
);
setEditInputValue
(
''
);
changeProps
({
props
:
Object
.
assign
({
...
props
},
{
tags
:
newTags
})
});
}
const
_handleInputChange
=
(
e
:
any
)
=>
{
setInputValue
(
e
.
target
.
value
);
}
const
_handleClose
=
(
removedTag
:
any
)
=>
{
const
_tags
=
tags
?.
filter
(
tag
=>
tag
!==
removedTag
);
changeProps
({
props
:
Object
.
assign
({
...
props
},
{
tags
:
_tags
})
});
};
const
_handleInputConfirm
=
()
=>
{
let
_tags
=
tags
?
[...
tags
]
:
[];
if
(
inputValue
&&
_tags
.
indexOf
(
inputValue
)
===
-
1
)
{
_tags
=
[...
_tags
,
inputValue
];
}
setInputVisible
(
false
);
setInputValue
(
''
);
changeProps
({
props
:
Object
.
assign
({
...
props
},
{
tags
:
_tags
})
});
};
const
_showInput
=
()
=>
{
setInputVisible
(
true
)
}
const
_record
=
record
[
0
];
return
(
...
...
@@ -234,7 +285,7 @@ const MarketingCardGood: React.FC<MarketingCardGoodProps> = (props: MarketingCar
<
div
className=
{
styles
[
'suggestProductCommodity-box-label'
]
}
>
商品活动
</
div
>
{
_record
?.
activityList
?.
map
((
item
,
index
)
=>
{
return
(
<
div
className=
{
styles
[
'suggestProductCommodity-activityList'
]
}
key=
{
index
}
onClick=
{
()
=>
{
window
.
open
(
`/m
arketing/marketingS
earch/preview?id=${item.id}`
);
}
}
>
<
div
className=
{
styles
[
'suggestProductCommodity-activityList'
]
}
key=
{
index
}
onClick=
{
()
=>
{
window
.
open
(
`/m
emberCenter/marketingAbility/selfManagement/s
earch/preview?id=${item.id}`
);
}
}
>
<
img
src=
{
ActivityImage
}
/>
<
div
className=
{
styles
[
'suggestProductCommodity-activityList-name'
]
}
>
{
item
.
name
}
</
div
>
<
StatusTag
title=
{
item
.
type
}
type=
'danger'
/>
...
...
@@ -242,6 +293,81 @@ const MarketingCardGood: React.FC<MarketingCardGoodProps> = (props: MarketingCar
);
})
}
</
div
>
{
layoutType
===
LAYOUT_TYPE
.
shop
&&
(
<
div
className=
{
styles
[
'suggestProductCommodity-box'
]
}
>
<
div
className=
{
styles
[
'suggestProductCommodity-box-label'
]
}
>
活动标签
</
div
>
<>
{
tags
?.
map
((
tag
,
index
)
=>
{
if
(
editInputIndex
===
index
)
{
return
(
<
Input
ref=
{
saveEditInputRef
}
key=
{
index
}
size=
"small"
maxLength=
{
16
}
className=
{
styles
[
'tag-input'
]
}
defaultValue=
{
editInputValue
}
onChange=
{
_handleEditInputChange
}
onBlur=
{
_handleEditInputConfirm
}
onPressEnter=
{
_handleEditInputConfirm
}
/>
);
}
const
isLongTag
=
tag
.
length
>
20
;
const
tagElem
=
(
<
Tag
className=
{
styles
[
'edit-tag'
]
}
key=
{
tag
}
closable
onClose=
{
()
=>
_handleClose
(
tag
)
}
color=
'red'
>
<
span
onDoubleClick=
{
e
=>
{
if
(
index
!==
0
)
{
setEditInputIndex
(
index
);
setEditInputValue
(
tag
);
e
.
preventDefault
();
}
}
}
>
{
isLongTag
?
`${tag.slice(0, 20)}
...
`
:
tag
}
</
span
>
</
Tag
>
);
return
isLongTag
?
(
<
Tooltip
title=
{
tag
}
key=
{
tag
}
>
{
tagElem
}
</
Tooltip
>
)
:
(
tagElem
);
})
}
{
inputVisible
&&
(
<
Input
ref=
{
saveInputRef
}
type=
"text"
size=
"small"
maxLength=
{
16
}
className=
{
styles
[
'tag-input'
]
}
defaultValue=
{
inputValue
}
onChange=
{
_handleInputChange
}
onBlur=
{
_handleInputConfirm
}
onPressEnter=
{
_handleInputConfirm
}
/>
)
}
{
(
!
inputVisible
&&
tags
.
length
<
3
)
&&
(
<
Tag
className=
{
styles
[
'site-tag-plus'
]
}
onClick=
{
_showInput
}
>
<
PlusOutlined
/>
新增标签
</
Tag
>
)
}
</>
</
div
>
)
}
</>
)
:
(<
Button
onClick=
{
()
=>
{
setActVisible
(
true
);
}
}
>
选择活动商品
</
Button
>)
}
<
ActivityProductDrawer
...
...
src/pages/editor/mobileSettingPanel/propsSettings/components/marketingCardHeader/index.tsx
View file @
05440b86
...
...
@@ -51,7 +51,7 @@ const MarketingCardHeader: React.FC<MarketingCardHeaderProps> = (props: Marketin
<
div
className=
{
styles
[
'marketingCardHeader'
]
}
>
<
div
className=
{
styles
[
'marketingCardHeader-box'
]
}
>
<
div
className=
{
styles
[
'marketingCardHeader-box-label'
]
}
>
标题
</
div
>
<
Input
key=
{
`${selectedKey}-title`
}
defaultValue=
{
title
||
_defaultInfo
?.
title
}
onBlur=
{
_onChangeTitle
}
/>
<
Input
key=
{
`${selectedKey}-title`
}
maxLength=
{
16
}
defaultValue=
{
title
||
_defaultInfo
?.
title
}
onBlur=
{
_onChangeTitle
}
/>
</
div
>
{
layoutType
!==
LAYOUT_TYPE
.
shop
&&
(
...
...
src/pages/editor/mobileSettingPanel/propsSettings/components/suggestProductCommodity/index.tsx
View file @
05440b86
...
...
@@ -141,7 +141,7 @@ const SuggestProductCommodity: React.FC<SuggestProductCommodityProps> = (props:
const
_handleToDetailPage
=
(
id
,
belongType
)
=>
{
if
(
belongType
===
1
)
{
window
.
open
(
`/m
arketing/marketingS
earch/preview?id=
${
id
}
`
);
window
.
open
(
`/m
emberCenter/marketingAbility/selfManagement/s
earch/preview?id=
${
id
}
`
);
}
else
{
window
.
open
(
`/marketingManage/merchantMarketing/merchantMarketingSearch/preview?id=
${
id
}
`
);
}
...
...
src/pages/mobileTemplate/shopTemplateEdit/index.tsx
View file @
05440b86
...
...
@@ -194,6 +194,16 @@ const mobileShopTempleteEdit: React.FC<ShopPreviewPropsType> = (props) => {
return
result
}
const
showTagsById
=
(
id
:
number
,
tags
:
any
[])
=>
{
if
(
tags
)
{
const
currentTag
=
tags
.
filter
((
item
)
=>
item
.
id
===
id
)[
0
]
if
(
currentTag
)
{
return
currentTag
?.
tags
||
[]
}
}
return
[]
}
const
_getCommodityList
=
async
(
list
:
any
[])
=>
{
let
listRes
:
any
=
[]
if
(
list
&&
Array
.
isArray
(
list
)
&&
list
.
length
>
0
)
{
...
...
@@ -318,6 +328,7 @@ const mobileShopTempleteEdit: React.FC<ShopPreviewPropsType> = (props) => {
direction
:
'row'
,
name
:
item
.
productName
,
img
:
item
.
productImgUrl
,
tags
:
showTagsById
(
item
.
id
,
_details
?.
tags
),
mode
:
'horizontal'
,
originalPrice
:
item
.
activityPrice
?
priceFormat
(
item
.
price
)
:
undefined
,
discountPrice
:
priceFormat
(
item
.
activityPrice
?
item
.
activityPrice
:
item
.
price
),
...
...
@@ -355,7 +366,7 @@ const mobileShopTempleteEdit: React.FC<ShopPreviewPropsType> = (props) => {
name
:
item
.
productName
,
img
:
item
.
productImgUrl
,
mode
:
'horizontal'
,
info
:
intl
.
formatMessage
({
id
:
'editor.marketing.label.plummet'
}
),
tags
:
showTagsById
(
item
.
id
,
_details
?.
tags
),
originalPrice
:
item
.
activityPrice
?
priceFormat
(
item
.
price
)
:
undefined
,
discountPrice
:
priceFormat
(
item
.
activityPrice
?
item
.
activityPrice
:
item
.
price
),
isnull
:
false
...
...
@@ -392,7 +403,7 @@ const mobileShopTempleteEdit: React.FC<ShopPreviewPropsType> = (props) => {
name
:
item
.
productName
,
img
:
item
.
productImgUrl
,
mode
:
'horizontal'
,
info
:
intl
.
formatMessage
({
id
:
'editor.marketing.label.fullQuantitySub'
}
),
tags
:
showTagsById
(
item
.
id
,
_details
?.
tags
),
originalPrice
:
item
.
activityPrice
?
priceFormat
(
item
.
price
)
:
undefined
,
discountPrice
:
priceFormat
(
item
.
activityPrice
?
item
.
activityPrice
:
item
.
price
),
isnull
:
false
...
...
@@ -429,7 +440,7 @@ const mobileShopTempleteEdit: React.FC<ShopPreviewPropsType> = (props) => {
mode
:
'horizontal'
,
name
:
item
.
productName
,
img
:
item
.
productImgUrl
,
info
:
intl
.
formatMessage
({
id
:
'editor.marketing.label.discount'
}
),
tags
:
showTagsById
(
item
.
id
,
_details
?.
tags
),
originalPrice
:
item
.
activityPrice
?
priceFormat
(
item
.
price
)
:
undefined
,
discountPrice
:
priceFormat
(
item
.
activityPrice
?
item
.
activityPrice
:
item
.
price
),
isnull
:
false
...
...
@@ -466,7 +477,7 @@ const mobileShopTempleteEdit: React.FC<ShopPreviewPropsType> = (props) => {
direction
:
'row'
,
mode
:
'horizontal'
,
img
:
item
.
productImgUrl
,
info
:
intl
.
formatMessage
({
id
:
'editor.marketing.label.fullQuantityDiscount'
}
),
tags
:
showTagsById
(
item
.
id
,
_details
?.
tags
),
discountPrice
:
priceFormat
(
item
.
activityPrice
?
item
.
activityPrice
:
item
.
price
),
isnull
:
false
}
...
...
@@ -502,7 +513,7 @@ const mobileShopTempleteEdit: React.FC<ShopPreviewPropsType> = (props) => {
mode
:
'horizontal'
,
name
:
item
.
productName
,
img
:
item
.
productImgUrl
,
info
:
intl
.
formatMessage
({
id
:
'editor.marketing.label.fullMoneySub'
}
),
tags
:
showTagsById
(
item
.
id
,
_details
?.
tags
),
originalPrice
:
item
.
activityPrice
?
priceFormat
(
item
.
price
)
:
undefined
,
discountPrice
:
priceFormat
(
item
.
activityPrice
?
item
.
activityPrice
:
item
.
price
),
isnull
:
false
...
...
@@ -539,7 +550,7 @@ const mobileShopTempleteEdit: React.FC<ShopPreviewPropsType> = (props) => {
mode
:
'horizontal'
,
name
:
item
.
productName
,
img
:
item
.
productImgUrl
,
info
:
intl
.
formatMessage
({
id
:
'editor.marketing.label.fullMoneyDiscount'
}
),
tags
:
showTagsById
(
item
.
id
,
_details
?.
tags
),
originalPrice
:
item
.
activityPrice
?
priceFormat
(
item
.
price
)
:
undefined
,
discountPrice
:
priceFormat
(
item
.
activityPrice
?
item
.
activityPrice
:
item
.
price
),
isnull
:
false
...
...
@@ -652,7 +663,7 @@ const mobileShopTempleteEdit: React.FC<ShopPreviewPropsType> = (props) => {
mode
:
'horizontal'
,
name
:
item
.
productName
,
img
:
item
.
productImgUrl
,
info
:
intl
.
formatMessage
({
id
:
'editor.marketing.label.morePiece'
}
),
tags
:
showTagsById
(
item
.
id
,
_details
?.
tags
),
originalPrice
:
item
.
activityPrice
?
priceFormat
(
item
.
price
)
:
undefined
,
discountPrice
:
priceFormat
(
item
.
activityPrice
?
item
.
activityPrice
:
item
.
price
),
isnull
:
false
...
...
@@ -689,7 +700,7 @@ const mobileShopTempleteEdit: React.FC<ShopPreviewPropsType> = (props) => {
mode
:
'horizontal'
,
name
:
item
.
productName
,
img
:
item
.
productImgUrl
,
info
:
intl
.
formatMessage
({
id
:
'editor.marketing.label.combination'
}
),
tags
:
showTagsById
(
item
.
id
,
_details
?.
tags
),
discountPrice
:
priceFormat
(
item
.
activityPrice
?
item
.
activityPrice
:
item
.
price
),
isnull
:
false
}
...
...
@@ -800,7 +811,7 @@ const mobileShopTempleteEdit: React.FC<ShopPreviewPropsType> = (props) => {
mode
:
'horizontal'
,
name
:
item
.
productName
,
img
:
item
.
productImgUrl
,
info
:
intl
.
formatMessage
({
id
:
'editor.marketing.label.fullSwap'
}
),
tags
:
showTagsById
(
item
.
id
,
_details
?.
tags
),
isnull
:
false
}
};
...
...
@@ -835,7 +846,7 @@ const mobileShopTempleteEdit: React.FC<ShopPreviewPropsType> = (props) => {
mode
:
'horizontal'
,
name
:
item
.
productName
,
img
:
item
.
productImgUrl
,
info
:
intl
.
formatMessage
({
id
:
'editor.marketing.label.fullSwap'
}
),
tags
:
showTagsById
(
item
.
id
,
_details
?.
tags
),
isnull
:
false
}
};
...
...
@@ -870,7 +881,7 @@ const mobileShopTempleteEdit: React.FC<ShopPreviewPropsType> = (props) => {
mode
:
'horizontal'
,
name
:
item
.
productName
,
img
:
item
.
productImgUrl
,
info
:
intl
.
formatMessage
({
id
:
'editor.marketing.label.preSale'
}
),
tags
:
showTagsById
(
item
.
id
,
_details
?.
tags
),
originalPrice
:
item
.
activityPrice
?
priceFormat
(
item
.
price
)
:
undefined
,
discountPrice
:
priceFormat
(
item
.
activityPrice
?
item
.
activityPrice
:
item
.
price
),
isnull
:
false
...
...
@@ -907,7 +918,7 @@ const mobileShopTempleteEdit: React.FC<ShopPreviewPropsType> = (props) => {
mode
:
'horizontal'
,
name
:
item
.
productName
,
img
:
item
.
productImgUrl
,
info
:
intl
.
formatMessage
({
id
:
'editor.marketing.label.attempt'
}
),
tags
:
showTagsById
(
item
.
id
,
_details
?.
tags
),
originalPrice
:
item
.
activityPrice
?
priceFormat
(
item
.
price
)
:
undefined
,
discountPrice
:
priceFormat
(
item
.
activityPrice
?
item
.
activityPrice
:
item
.
price
),
isnull
:
false
...
...
@@ -1013,7 +1024,7 @@ const mobileShopTempleteEdit: React.FC<ShopPreviewPropsType> = (props) => {
mode
:
'horizontal'
,
name
:
item
.
productName
,
img
:
item
.
productImgUrl
,
info
:
intl
.
formatMessage
({
id
:
'editor.marketing.label.attempt'
}
),
tags
:
showTagsById
(
item
.
id
,
_details
?.
tags
),
discountPrice
:
priceFormat
(
item
.
activityPrice
),
isnull
:
false
}
...
...
@@ -1070,7 +1081,6 @@ const mobileShopTempleteEdit: React.FC<ShopPreviewPropsType> = (props) => {
...
defaultConfig
}
const
finalConfig
=
resolveMappingPageConfig
(
config
,
allState
)
console
.
log
(
finalConfig
,
'finalConfig'
)
setComponentConfigs
(
finalConfig
)
setLoading
(
false
)
updatePageConfig
(
finalConfig
)
...
...
src/pages/mobileTemplate/shopTemplateEdit/marketing_config.ts
View file @
05440b86
...
...
@@ -280,6 +280,7 @@ export const marketingConfig_8 = {
style
:
{
margin
:
'8px'
,
},
shopColorType
:
8
},
childNodes
:
[
'11-8-1'
,
'11-8-2'
],
},
...
...
@@ -323,6 +324,7 @@ export const marketingConfig_9 = {
style
:
{
margin
:
'8px'
,
},
shopColorType
:
6
},
childNodes
:
[
'11-9-1'
,
'11-9-2'
],
},
...
...
@@ -363,6 +365,7 @@ export const marketingConfig_10 = {
style
:
{
margin
:
'8px'
,
},
shopColorType
:
7
},
childNodes
:
[
'11-10-1'
,
'11-10-2'
],
},
...
...
@@ -398,6 +401,7 @@ export const marketingConfig_11 = {
style
:
{
margin
:
'8px'
,
},
shopColorType
:
8
},
childNodes
:
[
'11-11-1'
,
'11-11-2'
],
},
...
...
@@ -432,6 +436,7 @@ export const marketingConfig_12 = {
style
:
{
margin
:
'8px'
,
},
shopColorType
:
12
},
childNodes
:
[
'11-12-1'
,
'11-12-2'
],
},
...
...
@@ -467,6 +472,7 @@ export const marketingConfig_13 = {
style
:
{
margin
:
'8px'
,
},
shopColorType
:
9
},
childNodes
:
[
'11-13-1'
,
'11-13-2'
],
},
...
...
@@ -500,6 +506,7 @@ export const marketingConfig_14 = {
style
:
{
margin
:
'8px'
,
},
shopColorType
:
13
},
childNodes
:
[
'11-14-1'
,
'11-14-2'
],
},
...
...
@@ -535,6 +542,7 @@ export const marketingConfig_15 = {
style
:
{
margin
:
'8px'
,
},
shopColorType
:
13
},
childNodes
:
[
'11-15-1'
,
'11-15-2'
],
},
...
...
@@ -570,6 +578,7 @@ export const marketingConfig_16 = {
style
:
{
margin
:
'8px'
,
},
shopColorType
:
14
},
childNodes
:
[
'11-16-1'
,
'11-16-2'
],
},
...
...
@@ -604,6 +613,7 @@ export const marketingConfig_17 = {
style
:
{
margin
:
'8px'
,
},
shopColorType
:
16
},
childNodes
:
[
'11-17-1'
,
'11-17-2'
],
},
...
...
@@ -679,7 +689,8 @@ export const marketingConfig_18 = {
props
:
{
style
:{
margin
:
'0 12px'
}
},
shopColorType
:
15
},
childComponentName
:
'MarketingCard.PackageContainerTabsTabPane'
,
// addBtnText: '添加子套餐',
...
...
src/pages/mobileTemplate/shopTemplatePreview/index.tsx
View file @
05440b86
...
...
@@ -235,6 +235,15 @@ const mobileShopTempleteEdit: React.FC<ShopPreviewPropsType> = (props) => {
return
listRes
}
const
showTagsById
=
(
id
:
number
,
tags
:
any
[])
=>
{
if
(
tags
)
{
const
currentTag
=
tags
.
filter
((
item
)
=>
item
.
id
===
id
)[
0
]
if
(
currentTag
)
{
return
currentTag
?.
tags
||
[]
}
}
return
[]
}
const
getComponentsConfig
=
async
()
=>
{
try
{
...
...
@@ -314,6 +323,7 @@ const mobileShopTempleteEdit: React.FC<ShopPreviewPropsType> = (props) => {
direction
:
'row'
,
name
:
item
.
productName
,
img
:
item
.
productImgUrl
,
tags
:
showTagsById
(
item
.
id
,
_details
?.
tags
),
mode
:
'horizontal'
,
originalPrice
:
item
.
activityPrice
?
priceFormat
(
item
.
price
)
:
undefined
,
discountPrice
:
priceFormat
(
item
.
activityPrice
?
item
.
activityPrice
:
item
.
price
),
...
...
@@ -351,7 +361,7 @@ const mobileShopTempleteEdit: React.FC<ShopPreviewPropsType> = (props) => {
name
:
item
.
productName
,
img
:
item
.
productImgUrl
,
mode
:
'horizontal'
,
info
:
intl
.
formatMessage
({
id
:
'editor.marketing.label.plummet'
}
),
tags
:
showTagsById
(
item
.
id
,
_details
?.
tags
),
originalPrice
:
item
.
activityPrice
?
priceFormat
(
item
.
price
)
:
undefined
,
discountPrice
:
priceFormat
(
item
.
activityPrice
?
item
.
activityPrice
:
item
.
price
),
isnull
:
false
...
...
@@ -388,7 +398,7 @@ const mobileShopTempleteEdit: React.FC<ShopPreviewPropsType> = (props) => {
name
:
item
.
productName
,
img
:
item
.
productImgUrl
,
mode
:
'horizontal'
,
info
:
intl
.
formatMessage
({
id
:
'editor.marketing.label.fullQuantitySub'
}
),
tags
:
showTagsById
(
item
.
id
,
_details
?.
tags
),
originalPrice
:
item
.
activityPrice
?
priceFormat
(
item
.
price
)
:
undefined
,
discountPrice
:
priceFormat
(
item
.
activityPrice
?
item
.
activityPrice
:
item
.
price
),
isnull
:
false
...
...
@@ -425,7 +435,7 @@ const mobileShopTempleteEdit: React.FC<ShopPreviewPropsType> = (props) => {
mode
:
'horizontal'
,
name
:
item
.
productName
,
img
:
item
.
productImgUrl
,
info
:
intl
.
formatMessage
({
id
:
'editor.marketing.label.discount'
}
),
tags
:
showTagsById
(
item
.
id
,
_details
?.
tags
),
originalPrice
:
item
.
activityPrice
?
priceFormat
(
item
.
price
)
:
undefined
,
discountPrice
:
priceFormat
(
item
.
activityPrice
?
item
.
activityPrice
:
item
.
price
),
isnull
:
false
...
...
@@ -462,7 +472,7 @@ const mobileShopTempleteEdit: React.FC<ShopPreviewPropsType> = (props) => {
direction
:
'row'
,
mode
:
'horizontal'
,
img
:
item
.
productImgUrl
,
info
:
intl
.
formatMessage
({
id
:
'editor.marketing.label.fullQuantityDiscount'
}
),
tags
:
showTagsById
(
item
.
id
,
_details
?.
tags
),
discountPrice
:
priceFormat
(
item
.
activityPrice
?
item
.
activityPrice
:
item
.
price
),
isnull
:
false
}
...
...
@@ -498,7 +508,7 @@ const mobileShopTempleteEdit: React.FC<ShopPreviewPropsType> = (props) => {
mode
:
'horizontal'
,
name
:
item
.
productName
,
img
:
item
.
productImgUrl
,
info
:
intl
.
formatMessage
({
id
:
'editor.marketing.label.fullMoneySub'
}
),
tags
:
showTagsById
(
item
.
id
,
_details
?.
tags
),
originalPrice
:
item
.
activityPrice
?
priceFormat
(
item
.
price
)
:
undefined
,
discountPrice
:
priceFormat
(
item
.
activityPrice
?
item
.
activityPrice
:
item
.
price
),
isnull
:
false
...
...
@@ -535,7 +545,7 @@ const mobileShopTempleteEdit: React.FC<ShopPreviewPropsType> = (props) => {
mode
:
'horizontal'
,
name
:
item
.
productName
,
img
:
item
.
productImgUrl
,
info
:
intl
.
formatMessage
({
id
:
'editor.marketing.label.fullMoneyDiscount'
}
),
tags
:
showTagsById
(
item
.
id
,
_details
?.
tags
),
originalPrice
:
item
.
activityPrice
?
priceFormat
(
item
.
price
)
:
undefined
,
discountPrice
:
priceFormat
(
item
.
activityPrice
?
item
.
activityPrice
:
item
.
price
),
isnull
:
false
...
...
@@ -648,7 +658,7 @@ const mobileShopTempleteEdit: React.FC<ShopPreviewPropsType> = (props) => {
mode
:
'horizontal'
,
name
:
item
.
productName
,
img
:
item
.
productImgUrl
,
info
:
intl
.
formatMessage
({
id
:
'editor.marketing.label.morePiece'
}
),
tags
:
showTagsById
(
item
.
id
,
_details
?.
tags
),
originalPrice
:
item
.
activityPrice
?
priceFormat
(
item
.
price
)
:
undefined
,
discountPrice
:
priceFormat
(
item
.
activityPrice
?
item
.
activityPrice
:
item
.
price
),
isnull
:
false
...
...
@@ -685,7 +695,7 @@ const mobileShopTempleteEdit: React.FC<ShopPreviewPropsType> = (props) => {
mode
:
'horizontal'
,
name
:
item
.
productName
,
img
:
item
.
productImgUrl
,
info
:
intl
.
formatMessage
({
id
:
'editor.marketing.label.combination'
}
),
tags
:
showTagsById
(
item
.
id
,
_details
?.
tags
),
discountPrice
:
priceFormat
(
item
.
activityPrice
?
item
.
activityPrice
:
item
.
price
),
isnull
:
false
}
...
...
@@ -796,7 +806,7 @@ const mobileShopTempleteEdit: React.FC<ShopPreviewPropsType> = (props) => {
mode
:
'horizontal'
,
name
:
item
.
productName
,
img
:
item
.
productImgUrl
,
info
:
intl
.
formatMessage
({
id
:
'editor.marketing.label.fullSwap'
}
),
tags
:
showTagsById
(
item
.
id
,
_details
?.
tags
),
isnull
:
false
}
};
...
...
@@ -831,7 +841,7 @@ const mobileShopTempleteEdit: React.FC<ShopPreviewPropsType> = (props) => {
mode
:
'horizontal'
,
name
:
item
.
productName
,
img
:
item
.
productImgUrl
,
info
:
intl
.
formatMessage
({
id
:
'editor.marketing.label.fullSwap'
}
),
tags
:
showTagsById
(
item
.
id
,
_details
?.
tags
),
isnull
:
false
}
};
...
...
@@ -866,7 +876,7 @@ const mobileShopTempleteEdit: React.FC<ShopPreviewPropsType> = (props) => {
mode
:
'horizontal'
,
name
:
item
.
productName
,
img
:
item
.
productImgUrl
,
info
:
intl
.
formatMessage
({
id
:
'editor.marketing.label.preSale'
}
),
tags
:
showTagsById
(
item
.
id
,
_details
?.
tags
),
originalPrice
:
item
.
activityPrice
?
priceFormat
(
item
.
price
)
:
undefined
,
discountPrice
:
priceFormat
(
item
.
activityPrice
?
item
.
activityPrice
:
item
.
price
),
isnull
:
false
...
...
@@ -903,7 +913,7 @@ const mobileShopTempleteEdit: React.FC<ShopPreviewPropsType> = (props) => {
mode
:
'horizontal'
,
name
:
item
.
productName
,
img
:
item
.
productImgUrl
,
info
:
intl
.
formatMessage
({
id
:
'editor.marketing.label.attempt'
}
),
tags
:
showTagsById
(
item
.
id
,
_details
?.
tags
),
originalPrice
:
item
.
activityPrice
?
priceFormat
(
item
.
price
)
:
undefined
,
discountPrice
:
priceFormat
(
item
.
activityPrice
?
item
.
activityPrice
:
item
.
price
),
isnull
:
false
...
...
@@ -1009,7 +1019,7 @@ const mobileShopTempleteEdit: React.FC<ShopPreviewPropsType> = (props) => {
mode
:
'horizontal'
,
name
:
item
.
productName
,
img
:
item
.
productImgUrl
,
info
:
intl
.
formatMessage
({
id
:
'editor.marketing.label.attempt'
}
),
tags
:
showTagsById
(
item
.
id
,
_details
?.
tags
),
discountPrice
:
priceFormat
(
item
.
activityPrice
),
isnull
:
false
}
...
...
src/pages/transaction/marketingAbility/merchantCoupon/components/DeliverCoupon/index.tsx
View file @
05440b86
...
...
@@ -2,7 +2,7 @@
* @Author: XieZhiXiong
* @Date: 2021-06-29 09:36:25
* @LastEditors: XieZhiXiong
* @LastEditTime: 2021-1
1-15 17:11:36
* @LastEditTime: 2021-1
2-01 09:57:37
* @Description: 发券明细
*/
import
React
,
{
useState
,
useMemo
}
from
'react'
;
...
...
@@ -204,7 +204,7 @@ const DeliverCoupon: React.FC<IProps> = (props) => {
},
{
title
:
'适用用户'
,
dataIndex
:
'
memberAge
TypeName'
,
dataIndex
:
'
suitableMember
TypeName'
,
},
{
title
:
'会员类型'
,
...
...
src/pages/transaction/marketingAbility/merchantCoupon/components/RunningInfo/index.tsx
View file @
05440b86
...
...
@@ -2,7 +2,7 @@
* @Author: XieZhiXiong
* @Date: 2021-06-28 18:06:53
* @LastEditors: XieZhiXiong
* @LastEditTime: 2021-
08-02 11:16:1
5
* @LastEditTime: 2021-
11-30 19:43:4
5
* @Description: 执行明细
*/
import
React
,
{
useRef
,
}
from
'react'
;
...
...
@@ -10,13 +10,13 @@ import { createFormActions } from '@formily/antd';
import
{
DatePicker
}
from
'@formily/antd-components'
;
import
{
StandardTable
}
from
'god'
;
import
{
ColumnType
}
from
'antd/lib/table/interface'
;
import
moment
from
'moment'
;
import
{
useStateFilterSearchLinkageEffect
}
from
'@/formSchema/effects/useFilterSearch'
;
import
{
useAsyncInitSelect
}
from
'@/formSchema/effects/useAsyncInitSelect'
;
import
{
FORM_FILTER_PATH
}
from
'@/formSchema/const'
;
import
NiceForm
from
'@/components/NiceForm'
;
import
MellowCard
,
{
MellowCardProps
}
from
'@/components/MellowCard'
;
import
{
querySchema
}
from
'./schema'
;
import
moment
from
'moment'
;
import
{
getMarketingCouponWaiteExecuteDetailPage
,
getMarketingCouponWaiteExecuteDetailPageCondition
}
from
'@/services/MarketingV2Api'
;
const
formActions
=
createFormActions
();
...
...
@@ -175,19 +175,22 @@ const RunningInfo: React.FC<IProps> = (props) => {
},
{
title
:
'适用用户'
,
dataIndex
:
'
bransuitableMemberTypeNamed
'
,
dataIndex
:
'
suitableMemberTypeName
'
,
},
{
title
:
'领(发)放劵时间'
,
dataIndex
:
'createTimeStart'
,
dataIndex
:
'createTime'
,
render
:
(
text
)
=>
text
?
moment
(
text
).
format
(
'YYYY-MM-DD HH:mm:ss'
)
:
''
,
},
{
title
:
'劵有效期起始时间'
,
dataIndex
:
'effectiveTimeStart'
,
dataIndex
:
'validTimeStart'
,
render
:
(
text
)
=>
text
?
moment
(
text
).
format
(
'YYYY-MM-DD HH:mm:ss'
)
:
''
,
},
{
title
:
'券有效期截止时间'
,
dataIndex
:
'effectiveTimeEnd'
,
dataIndex
:
'validTimeEnd'
,
render
:
(
text
)
=>
text
?
moment
(
text
).
format
(
'YYYY-MM-DD HH:mm:ss'
)
:
''
,
},
{
title
:
'关联订单'
,
...
...
@@ -204,7 +207,7 @@ const RunningInfo: React.FC<IProps> = (props) => {
{
title
:
'订单金额'
,
dataIndex
:
'amount'
,
render
:
(
text
)
=>
`¥
${
text
||
''
}
`
,
render
:
(
text
)
=>
`¥
${
text
||
'
0
'
}
`
,
},
{
title
:
'订单状态'
,
...
...
src/pages/transaction/marketingAbility/merchantCoupon/merchantCouponQuery/components/EditForm/schema.tsx
View file @
05440b86
...
...
@@ -40,7 +40,7 @@ const schema: ISchema = {
},
disabledDate
:
(
current
)
=>
current
&&
current
<
moment
().
startOf
(
'day'
),
disabledTime
:
(
current
,
type
)
=>
{
if
(
type
===
'start'
&&
moment
().
isSame
(
current
,
'day'
))
{
if
(
(
type
===
'start'
||
type
===
'end'
)
&&
moment
().
isSame
(
current
,
'day'
))
{
return
{
disabledHours
:
()
=>
range
(
0
,
24
).
splice
(
0
,
moment
().
get
(
'hour'
)),
disabledMinutes
:
()
=>
range
(
0
,
60
).
splice
(
0
,
moment
().
get
(
'minute'
)),
...
...
src/pages/transaction/marketingAbility/merchantCoupon/merchantCouponUnsubmitted/components/CouponForm/effects/useBusinessEffects.ts
View file @
05440b86
...
...
@@ -2,7 +2,7 @@
* @Author: XieZhiXiong
* @Date: 2021-06-24 14:04:16
* @LastEditors: XieZhiXiong
* @LastEditTime: 2021-
09-30 16:38:36
* @LastEditTime: 2021-
11-30 20:07:59
* @Description:
*/
import
{
FormEffectHooks
,
FormPath
,
IFormActions
}
from
'@formily/antd'
;
...
...
@@ -298,17 +298,17 @@ export const useBusinessEffects = (context, actions: IFormActions) => {
// 领(发)券起始时间
onFieldValueChange$
(
'[releaseTimeStart, releaseTimeEnd]'
).
subscribe
(
state
=>
{
const
{
value
}
=
state
;
const
releaseTime
StartValue
=
value
?.[
0
];
const
releaseTime
EndValue
=
value
?.[
1
];
const
effectiveTime
=
getFieldValue
(
'[effectiveTimeStart, effectiveTimeEnd]'
);
// 券有效期
const
effectiveTimeStartValue
=
effectiveTime
?.[
0
];
if
(
releaseTime
Start
Value
releaseTime
End
Value
&&
effectiveTimeStartValue
&&
moment
(
releaseTime
Start
Value
)
>
moment
(
effectiveTimeStartValue
)
&&
moment
(
releaseTime
End
Value
)
>
moment
(
effectiveTimeStartValue
)
)
{
setFieldState
(
'[releaseTimeStart, releaseTimeEnd]'
,
fieldState
=>
{
FormPath
.
setIn
(
fieldState
,
'errors'
,
'领(发)券
起始
时间应该小于券有效期起始时间'
);
FormPath
.
setIn
(
fieldState
,
'errors'
,
'领(发)券
截止
时间应该小于券有效期起始时间'
);
});
}
else
{
actions
.
clearErrors
(
'[releaseTimeStart, releaseTimeEnd]'
);
...
...
@@ -320,15 +320,15 @@ export const useBusinessEffects = (context, actions: IFormActions) => {
const
{
value
}
=
state
;
const
effectiveTimeStartValue
=
value
?.[
0
];
const
releaseTime
=
getFieldValue
(
'[releaseTimeStart, releaseTimeEnd]'
);
// 券有效期
const
releaseTime
StartValue
=
releaseTime
?.[
0
];
const
releaseTime
EndValue
=
releaseTime
?.[
1
];
if
(
effectiveTimeStartValue
&&
releaseTime
Start
Value
&&
moment
(
effectiveTimeStartValue
)
<
moment
(
releaseTime
Start
Value
)
&&
releaseTime
End
Value
&&
moment
(
effectiveTimeStartValue
)
<
moment
(
releaseTime
End
Value
)
)
{
setFieldState
(
'[effectiveTimeStart, effectiveTimeEnd]'
,
fieldState
=>
{
FormPath
.
setIn
(
fieldState
,
'errors'
,
'券有效期起始时间应该大于等于领(发)券
起始
时间'
);
FormPath
.
setIn
(
fieldState
,
'errors'
,
'券有效期起始时间应该大于等于领(发)券
截止
时间'
);
});
}
else
{
actions
.
clearErrors
(
'[effectiveTimeStart, effectiveTimeEnd]'
);
...
...
src/pages/transaction/marketingAbility/merchantCoupon/merchantCouponUnsubmitted/components/CouponForm/schema.tsx
View file @
05440b86
...
...
@@ -2,7 +2,7 @@
* @Author: XieZhiXiong
* @Date: 2021-06-24 14:05:57
* @LastEditors: XieZhiXiong
* @LastEditTime: 2021-11-
15 14:20:08
* @LastEditTime: 2021-11-
30 20:16:53
* @Description:
*/
import
{
ISchema
}
from
'@formily/antd'
;
...
...
@@ -106,7 +106,7 @@ const schema: ISchema = {
showTime
:
true
,
disabledDate
:
(
current
)
=>
current
&&
current
<
moment
().
startOf
(
'day'
),
disabledTime
:
(
current
,
type
)
=>
{
if
(
type
===
'start'
&&
moment
().
isSame
(
current
,
'day'
))
{
if
(
(
type
===
'start'
||
type
===
'end'
)
&&
moment
().
isSame
(
current
,
'day'
))
{
return
{
disabledHours
:
()
=>
range
(
0
,
24
).
splice
(
0
,
moment
().
get
(
'hour'
)),
disabledMinutes
:
()
=>
range
(
0
,
60
).
splice
(
0
,
moment
().
get
(
'minute'
)),
...
...
@@ -303,7 +303,7 @@ const schema: ISchema = {
showTime
:
true
,
disabledDate
:
(
current
)
=>
current
&&
current
<
moment
().
startOf
(
'day'
),
disabledTime
:
(
current
,
type
)
=>
{
if
(
type
===
'start'
&&
moment
().
isSame
(
current
,
'day'
))
{
if
(
(
type
===
'start'
||
type
===
'end'
)
&&
moment
().
isSame
(
current
,
'day'
))
{
return
{
disabledHours
:
()
=>
range
(
0
,
24
).
splice
(
0
,
moment
().
get
(
'hour'
)),
disabledMinutes
:
()
=>
range
(
0
,
60
).
splice
(
0
,
moment
().
get
(
'minute'
)),
...
...
src/pages/transaction/marketingAbility/merchantCoupon/merchantCouponUnsubmitted/components/GoodsDrawer/schema.tsx
View file @
05440b86
...
...
@@ -2,7 +2,7 @@
* @Author: XieZhiXiong
* @Date: 2021-06-24 16:19:18
* @LastEditors: XieZhiXiong
* @LastEditTime: 2021-
07-30 10:06:3
2
* @LastEditTime: 2021-
11-30 19:49:0
2
* @Description:
*/
import
{
ISchema
}
from
'@formily/antd'
;
...
...
@@ -15,7 +15,7 @@ export const querySchema: ISchema = {
type
:
'object'
,
'x-component'
:
'mega-layout'
,
properties
:
{
n
ame
:
{
commodityN
ame
:
{
type
:
'string'
,
'x-component'
:
'Search'
,
'x-component-props'
:
{
...
...
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