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
黄庭坚
jinfa-platform
Commits
54391593
Commit
54391593
authored
Dec 07, 2021
by
前端-黄佳鑫
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix: 修改营销活动BUG
parent
4fef721e
Hide whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
126 additions
and
69 deletions
+126
-69
index.tsx
...mponents/detailLayout/components/progressLayout/index.tsx
+1
-1
addForm.tsx
...ion/dealAbility/productInquiry/waitAddInquiry/addForm.tsx
+4
-2
tradeTerms.tsx
...y/productInquiry/waitAddInquiry/components/tradeTerms.tsx
+8
-4
two.tsx
...saction/dealAbility/productInquiry/waitAddInquiry/two.tsx
+1
-0
constants.tsx
src/pages/transaction/marketingAbility/common/constants.tsx
+2
-1
index.tsx
.../marketingAbility/components/activityUserLayout/index.tsx
+1
-1
index.tsx
...nsaction/marketingAbility/selfManagement/detail/index.tsx
+8
-8
add.tsx
...arketingAbility/selfManagement/readySubmitExamine/add.tsx
+0
-1
index.tsx
...ement/readySubmitExamine/components/rulesLayout/index.tsx
+30
-6
index.ts
...lity/selfManagement/readySubmitExamine/constants/index.ts
+71
-45
No files found.
src/pages/transaction/components/detailLayout/components/progressLayout/index.tsx
View file @
54391593
...
...
@@ -28,7 +28,7 @@ const ProgressLayout: React.FC<ProgressProps> = (props: any) => {
useEffect
(()
=>
{
if
(
!
isEmpty
(
context
))
{
console
.
log
(
context
)
console
.
log
(
context
,
10086
)
setLogStatesStatus
(
context
.
externalLogStates
?
LOGSTATESTYPE
.
EXTERNALSTATES
:
LOGSTATESTYPE
.
INTERIORSTATES
)
setData
(
context
)
}
...
...
src/pages/transaction/dealAbility/productInquiry/waitAddInquiry/addForm.tsx
View file @
54391593
...
...
@@ -33,10 +33,12 @@ interface AddedFormLayoutProps {
title
?:
string
,
/** 二次询价 */
two
?:
boolean
,
/** 二次询价地址显示 */
isDefault
?:
boolean
}
const
AddedFormLayout
:
React
.
FC
<
AddedFormLayoutProps
>
=
(
props
:
any
)
=>
{
const
{
isEdit
,
id
,
fetchRequest
,
spam
,
title
,
two
,
shopId
}
=
props
;
const
{
isEdit
,
id
,
fetchRequest
,
spam
,
title
,
two
,
shopId
,
isDefault
}
=
props
;
const
[
form
]
=
Form
.
useForm
();
const
[
loading
,
setLoading
]
=
useState
<
boolean
>
(
false
)
const
[
unsaved
,
setUnsaved
]
=
useState
<
boolean
>
(
false
);
...
...
@@ -314,7 +316,7 @@ const AddedFormLayout: React.FC<AddedFormLayoutProps> = (props: any) => {
>
<
BasicInfoLatyout
getMemberInfo=
{
getMemberInfo
}
memb=
{
memberInfo
}
isEdit=
{
spam
||
two
}
/>
<
InquiryProductLayout
isEdit=
{
two
}
form=
{
form
}
getInquiryProduct=
{
getInquiryProduct
}
member=
{
memberInfo
}
setInquiryProduct=
{
inquiryProduct
}
/>
<
TradeTermsLayout
isEdit
getFullAddress=
{
getFullAddress
}
getContacts=
{
getContacts
}
fullAddress=
{
fullAddress
}
/>
<
TradeTermsLayout
isEdit
=
{
isEdit
}
isDefault=
{
isDefault
}
getFullAddress=
{
getFullAddress
}
getContacts=
{
getContacts
}
fullAddress=
{
fullAddress
}
/>
<
AttachLayout
enclosureUrls=
{
enclosureUrls
}
getEnclosureUrls=
{
getEnclosureUrls
}
removeEnclosureUrls=
{
removeEnclosureUrls
}
/>
</
Form
>
}
...
...
src/pages/transaction/dealAbility/productInquiry/waitAddInquiry/components/tradeTerms.tsx
View file @
54391593
...
...
@@ -25,10 +25,12 @@ interface TradeTermsLayoutProps {
fullAddress
?:
any
,
/** 二次询价 */
isEdit
?:
boolean
,
/** 二次询价地址显示 */
isDefault
?:
boolean
}
const
TradeTermsLayout
:
React
.
FC
<
TradeTermsLayoutProps
>
=
(
props
:
any
)
=>
{
const
{
getFullAddress
,
getContacts
,
fullAddress
,
isEdit
}
=
props
;
const
{
getFullAddress
,
getContacts
,
fullAddress
,
isEdit
,
isDefault
}
=
props
;
const
[
visible
,
setVisible
]
=
useState
<
boolean
>
(
false
)
const
[
address
,
setaddress
]
=
useState
<
any
>
({});
const
[
telCode
,
setTelCode
]
=
useState
<
any
>
([]);
...
...
@@ -105,9 +107,12 @@ const TradeTermsLayout: React.FC<TradeTermsLayoutProps> = (props: any) => {
setaddress
({
id
:
fullAddress
.
fullAddressId
,
})
console
.
log
(
fullAddress
)
}
},
[
fullAddress
])
console
.
log
(
isEdit
,
10086
)
return
(
<
Card
id=
"tradeTermsLayout"
...
...
@@ -124,9 +129,8 @@ const TradeTermsLayout: React.FC<TradeTermsLayoutProps> = (props: any) => {
</
Form
.
Item
>
<
Form
.
Item
label=
'交付地址'
className=
{
style
.
address_style
}
>
<
AddressSelect
echo=
{
isEdit
}
extra=
{
fullAddress
.
fullAddress
}
value=
{
address
}
echo=
{
isDefault
}
value=
{
isDefault
?
fullAddress
.
fullAddress
:
address
}
isDefaultAddress
addressType=
{
1
}
disabled=
{
false
}
...
...
src/pages/transaction/dealAbility/productInquiry/waitAddInquiry/two.tsx
View file @
54391593
...
...
@@ -10,6 +10,7 @@ const RfqEnquiryOrder = (props: any) => {
<
AddForm
id=
{
id
}
isEdit
isDefault
title=
{
props
.
route
.
name
}
fetchRequest=
{
postTransactionInquiryListAdd
}
two
...
...
src/pages/transaction/marketingAbility/common/constants.tsx
View file @
54391593
...
...
@@ -3,6 +3,7 @@ import { Space, Tooltip, Typography } from 'antd';
import
StatusTag
from
'@/components/StatusTag'
;
import
{
format
}
from
'@/pages/transaction/common/dateFormat'
;
import
{
QuestionCircleOutlined
}
from
'@ant-design/icons'
;
import
{
isEmpty
}
from
'lodash'
;
/** * 活动类型 */
export
enum
ACTIVITYTYPE
{
/** 特价促销 */
...
...
@@ -191,7 +192,7 @@ export const GeneralEffect = (int, data) => {
col
:
[
{
label
:
'优惠规则'
,
extra
:
<
Space
direction=
'vertical'
>
{
data
.
ladderList
.
map
(
item
=>
(<
div
>
{
`满 ${item.discount} 件, 打 ${item.num
/ 10} 折`
}
</
div
>))
}
{
!
isEmpty
(
data
.
ladderList
)
&&
data
.
ladderList
.
map
(
item
=>
(<
div
>
{
`满 ${item.num} 件, 打 ${item.discount
/ 10} 折`
}
</
div
>))
}
</
Space
>
},
{
...
...
src/pages/transaction/marketingAbility/components/activityUserLayout/index.tsx
View file @
54391593
...
...
@@ -96,7 +96,7 @@ const ActivityUserLayout: React.FC<ActivityUserLayoutProps> = (props: any) => {
<
Col
span=
{
6
}
>
<
div
className=
{
style
.
cell
}
>
<
h5
className=
{
style
.
label
}
>
会员角色:
</
h5
>
<
h5
className=
{
style
.
content
}
>
{
item
.
role
Type
Name
}
</
h5
>
<
h5
className=
{
style
.
content
}
>
{
item
.
roleName
}
</
h5
>
</
div
>
</
Col
>
<
Col
span=
{
6
}
>
...
...
src/pages/transaction/marketingAbility/selfManagement/detail/index.tsx
View file @
54391593
...
...
@@ -84,7 +84,7 @@ const DetialLayout = () => {
let
interiorLogStates
:
any
=
[];
let
externalLogs
:
any
=
[];
let
interiorLogs
:
any
=
[];
data
.
outerTaskList
.
forEach
((
item
:
any
)
=>
{
(
data
.
outerTaskList
||
[])
.
forEach
((
item
:
any
)
=>
{
externalLogStates
.
push
({
state
:
item
.
step
,
stateName
:
null
,
...
...
@@ -92,9 +92,9 @@ const DetialLayout = () => {
operationalProcess
:
item
.
taskName
,
roleName
:
item
.
roleName
,
})
data
.
externalLogStates
=
externalLogStates
;
})
data
.
innerTaskList
.
forEach
((
item
:
any
)
=>
{
data
.
externalLogStates
=
externalLogStates
;
(
data
.
innerTaskList
||
[]).
forEach
((
item
:
any
)
=>
{
interiorLogStates
.
push
({
state
:
item
.
step
,
stateName
:
null
,
...
...
@@ -102,9 +102,9 @@ const DetialLayout = () => {
operationalProcess
:
item
.
taskName
,
roleName
:
item
.
roleName
,
})
data
.
interiorLogStates
=
interiorLogStates
;
})
data
.
outerRecordDOList
.
forEach
((
item
:
any
,
index
:
number
)
=>
{
data
.
interiorLogStates
=
interiorLogStates
;
(
data
.
outerRecordDOList
||
[]).
forEach
((
item
:
any
,
index
:
number
)
=>
{
externalLogs
.
push
({
operation
:
item
.
operate
,
createTime
:
item
.
operateTime
,
...
...
@@ -115,9 +115,9 @@ const DetialLayout = () => {
state
:
item
.
status
,
step
:
index
,
})
data
.
externalLogs
=
externalLogs
;
})
data
.
innerRecordDOList
.
forEach
((
item
:
any
,
index
:
number
)
=>
{
data
.
externalLogs
=
externalLogs
;
(
data
.
innerRecordDOList
||
[]).
forEach
((
item
:
any
,
index
:
number
)
=>
{
interiorLogs
.
push
({
auditOpinion
:
item
.
opinion
,
createMemberId
:
item
.
memberId
,
...
...
@@ -135,8 +135,8 @@ const DetialLayout = () => {
state
:
item
.
step
,
step
:
item
.
step
,
})
data
.
interiorLogs
=
interiorLogs
;
})
data
.
interiorLogs
=
interiorLogs
;
setAllusers
([
{
title
:
'适用用户'
,
...
...
src/pages/transaction/marketingAbility/selfManagement/readySubmitExamine/add.tsx
View file @
54391593
...
...
@@ -241,7 +241,6 @@ const AddedMarketing = () => {
})
},
[])
return
(
<
Fragment
>
<
PeripheralLayout
...
...
src/pages/transaction/marketingAbility/selfManagement/readySubmitExamine/components/rulesLayout/index.tsx
View file @
54391593
...
...
@@ -7,7 +7,7 @@ import { MinusOutlined, PlusOutlined } from '@ant-design/icons';
import
moment
from
'moment'
;
import
style
from
'./index.less'
;
import
CardLayout
from
'../card'
;
import
{
OVERLAYACTIVITYTYPE
,
OVERRUNRULETYPE
,
PROMOTIONTYPE
,
LADDERBOLIST
}
from
'../../constants'
;
import
{
OVERLAYACTIVITYTYPE
,
PROMOTIONTYPE
,
LADDERBOLIST
}
from
'../../constants'
;
interface
RulesLayoutProps
{
/** umi-hooks */
...
...
@@ -29,6 +29,7 @@ const RulesLayout: React.FC<RulesLayoutProps> = (props: any) => {
const
{
focus$
,
form
}
=
props
;
const
[
option
,
setOption
]
=
useState
<
optionProps
>
();
const
[
ladderType
,
setLadderType
]
=
useState
<
number
>
(
1
);
const
[
rejec
,
setRejec
]
=
useState
<
any
>
({});
const
handleActivityDefinedBO
=
(
e
)
=>
{
const
{
value
}
=
e
.
target
...
...
@@ -40,6 +41,17 @@ const RulesLayout: React.FC<RulesLayoutProps> = (props: any) => {
form
.
resetFields
([
'activityDefined'
]);
});
const
rejection
=
(
key
:
string
,
num
:
number
)
=>
{
console
.
log
(
num
,
10086
)
const
data
=
{...
rejec
};
if
(
data
[
key
]
===
num
)
{
data
[
key
]
=
null
}
else
{
data
[
key
]
=
num
}
setRejec
({...
data
})
}
/** 叠加活动类型 */
const
allowActivity
=
(
int
=
1
)
=>
{
switch
(
int
)
{
...
...
@@ -61,9 +73,21 @@ const RulesLayout: React.FC<RulesLayoutProps> = (props: any) => {
className=
{
style
.
rulesLayout
}
>
<
Checkbox
.
Group
>
{
OVERLAYACTIVITYTYPE
(
int
)?.
map
(
item
=>
(
<
Checkbox
key=
{
item
.
value
}
value=
{
item
.
value
}
>
{
item
.
label
}
</
Checkbox
>
))
}
{
!
isEmpty
(
OVERLAYACTIVITYTYPE
(
int
).
A
)
&&
(
OVERLAYACTIVITYTYPE
(
int
).
A
.
map
(
item
=>
(
<
Checkbox
key=
{
item
.
value
}
value=
{
item
.
value
}
disabled=
{
rejec
?.
A
&&
item
.
value
!==
rejec
?.
A
}
onChange=
{
(
value
)
=>
rejection
(
'A'
,
item
.
value
)
}
>
{
item
.
label
}
</
Checkbox
>
))
)
}
{
!
isEmpty
(
OVERLAYACTIVITYTYPE
(
int
).
B
)
&&
(
OVERLAYACTIVITYTYPE
(
int
).
B
.
map
(
item
=>
(
<
Checkbox
key=
{
item
.
value
}
value=
{
item
.
value
}
disabled=
{
rejec
?.
B
&&
item
.
value
!==
rejec
?.
B
}
onChange=
{
(
value
)
=>
rejection
(
'B'
,
item
.
value
)
}
>
{
item
.
label
}
</
Checkbox
>
))
)
}
{
!
isEmpty
(
OVERLAYACTIVITYTYPE
(
int
).
C
)
&&
(
OVERLAYACTIVITYTYPE
(
int
).
C
.
map
(
item
=>
(
<
Checkbox
key=
{
item
.
value
}
value=
{
item
.
value
}
>
{
item
.
label
}
</
Checkbox
>
))
)
}
</
Checkbox
.
Group
>
</
Form
.
Item
>
)
...
...
@@ -501,7 +525,7 @@ const RulesLayout: React.FC<RulesLayoutProps> = (props: any) => {
name=
{
[
'activityDefined'
,
'assembleNum'
]
}
rules=
{
[{
required
:
true
,
validator
:
(
_rule
,
value
)
=>
{
const
pattern
=
/^
-
?[
0-2
]
[
1-9
]\d
*$/
;
const
pattern
=
/^
\+?
[
1-9
]\d
*$/
;
if
(
!
value
)
{
return
Promise
.
reject
(
new
Error
(
'请输入成团人数'
));
}
...
...
@@ -542,7 +566,7 @@ const RulesLayout: React.FC<RulesLayoutProps> = (props: any) => {
initialValue=
{
24
}
rules=
{
[{
required
:
true
,
validator
:
(
_rule
,
value
)
=>
{
const
pattern
=
/^
(
0
?\.[
1-9
]
|1
\d
|2
[
0-
3
])(\.\d
{1,1}
)?
$/
;
const
pattern
=
/^
(
0
?\.[
1-9
]
|1
\d
|2
[
0-
4
])(\.\d
{1,1}
)?
$/
;
if
(
!
value
)
{
return
Promise
.
reject
(
new
Error
(
'请输入成团时间'
));
}
...
...
src/pages/transaction/marketingAbility/selfManagement/readySubmitExamine/constants/index.ts
View file @
54391593
/**
* 活动类型
*/
type
activityType
=
{
type
activityType
=
{
lable
:
string
,
value
:
number
,
}[]
...
...
@@ -29,49 +29,75 @@ export const OVERLAYACTIVITYTYPE = (int) => {
case
1
:
case
2
:
case
3
:
return
[
{
label
:
'满量促销'
,
value
:
4
},
{
label
:
'满额促销'
,
value
:
5
},
{
label
:
'赠送促销'
,
value
:
6
},
{
label
:
'换购'
,
value
:
13
},
]
return
{
B
:
[
{
label
:
'满量促销'
,
value
:
4
},
{
label
:
'满额促销'
,
value
:
5
},
],
C
:
[
{
label
:
'赠送促销'
,
value
:
6
},
{
label
:
'换购'
,
value
:
13
},
]
}
case
4
:
case
5
:
return
[
{
label
:
'特价促销'
,
value
:
1
},
{
label
:
'直降促销'
,
value
:
2
},
{
label
:
'折扣促销'
,
value
:
3
},
{
label
:
'赠送促销'
,
value
:
6
},
{
label
:
'换购'
,
value
:
13
},
]
return
{
A
:
[
{
label
:
'特价促销'
,
value
:
1
},
{
label
:
'直降促销'
,
value
:
2
},
{
label
:
'折扣促销'
,
value
:
3
},
],
B
:
[
{
label
:
'赠送促销'
,
value
:
6
},
],
C
:
[
{
label
:
'换购'
,
value
:
13
},
],
}
case
6
:
return
[
{
label
:
'特价促销'
,
value
:
1
},
{
label
:
'直降促销'
,
value
:
2
},
{
label
:
'折扣促销'
,
value
:
3
},
{
label
:
'满量促销'
,
value
:
4
},
{
label
:
'满额促销'
,
value
:
5
},
{
label
:
'多件促销'
,
value
:
7
},
{
label
:
'组合促销'
,
value
:
8
},
{
label
:
'换购'
,
value
:
13
},
]
return
{
A
:
[
{
label
:
'特价促销'
,
value
:
1
},
{
label
:
'直降促销'
,
value
:
2
},
{
label
:
'折扣促销'
,
value
:
3
},
],
B
:
[
{
label
:
'满量促销'
,
value
:
4
},
{
label
:
'满额促销'
,
value
:
5
},
],
C
:
[
{
label
:
'多件促销'
,
value
:
7
},
{
label
:
'组合促销'
,
value
:
8
},
{
label
:
'换购'
,
value
:
13
},
],
}
case
7
:
case
8
:
return
[
{
label
:
'赠送促销'
,
value
:
6
},
{
label
:
'换购'
,
value
:
13
},
]
return
{
B
:
[
{
label
:
'赠送促销'
,
value
:
6
},
],
C
:
[
{
label
:
'换购'
,
value
:
13
},
]
}
case
13
:
return
[
{
label
:
'特价促销'
,
value
:
1
},
{
label
:
'直降促销'
,
value
:
2
},
{
label
:
'折扣促销'
,
value
:
3
},
{
label
:
'满量促销'
,
value
:
4
},
{
label
:
'满额促销'
,
value
:
5
},
{
label
:
'多件促销'
,
value
:
6
},
{
label
:
'组合促销'
,
value
:
7
},
{
label
:
'换购'
,
value
:
8
},
]
return
{
A
:
[
{
label
:
'特价促销'
,
value
:
1
},
{
label
:
'直降促销'
,
value
:
2
},
{
label
:
'折扣促销'
,
value
:
3
},
],
B
:
[
{
label
:
'满量促销'
,
value
:
4
},
{
label
:
'满额促销'
,
value
:
5
},
],
C
:
[
{
label
:
'多件促销'
,
value
:
6
},
{
label
:
'组合促销'
,
value
:
7
},
{
label
:
'换购'
,
value
:
8
},
],
}
}
}
/** 超限规则 */
...
...
@@ -136,23 +162,23 @@ export const PROMOTIONTYPE = (int) => {
}
}
/** 满量/额减 */
export
const
LADDERBOLIST
=
(
int
,
type
=
1
)
=>
{
export
const
LADDERBOLIST
=
(
int
,
type
=
1
)
=>
{
switch
(
Number
(
int
))
{
case
4
:
return
{
tooltip
:
type
===
1
?
'优惠金额为最后订单总额减去的优惠金额'
:
'折扣为最后订单总额的折扣,输入数字,如85折,输入85,9折输入90'
,
label
:
`满量
${
type
===
1
?
'减'
:
'折'
}
`
,
message
:
`请新增满量
${
type
===
1
?
'减'
:
'折'
}
`
,
addon
:
'数量'
,
label
:
`满量
${
type
===
1
?
'减'
:
'折'
}
`
,
message
:
`请新增满量
${
type
===
1
?
'减'
:
'折'
}
`
,
addon
:
'数量'
,
addonAfter
:
type
===
1
?
'减'
:
'打'
,
addonBefore
:
type
===
1
?
'元'
:
'折'
,
}
case
5
:
return
{
tooltip
:
type
===
1
?
'优惠金额为最后订单总额减去的优惠金额'
:
'折扣为最后订单总额的折扣,输入数字,如85折,输入85,9折输入90'
,
label
:
`满额
${
type
===
1
?
'减'
:
'折'
}
`
,
message
:
`请新增满额
${
type
===
1
?
'减'
:
'折'
}
`
,
addon
:
'元'
,
label
:
`满额
${
type
===
1
?
'减'
:
'折'
}
`
,
message
:
`请新增满额
${
type
===
1
?
'减'
:
'折'
}
`
,
addon
:
'元'
,
addonAfter
:
type
===
1
?
'减'
:
'打'
,
addonBefore
:
type
===
1
?
'元'
:
'折'
,
}
...
...
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