Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
S
sass-admin
Overview
Overview
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
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
hqzhdj_app
sass-admin
Commits
9fde9c77
Commit
9fde9c77
authored
Oct 22, 2025
by
chengming
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改ip配置
parent
01dbcb9b
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
19 changed files
with
152 additions
and
1785 deletions
+152
-1785
build/Ip.js
+1
-1
src/pages/SystemManagement/MessageManagement/index.js
+0
-9
src/pages/SystemManagement/Point/ActiveOption.jsx
+30
-116
src/pages/SystemManagement/Point/CurrencyOption.jsx
+0
-0
src/pages/SystemManagement/Point/Detailed.jsx
+0
-229
src/pages/SystemManagement/Point/EditPointPool.jsx
+0
-86
src/pages/SystemManagement/Point/ModalForm.jsx
+52
-48
src/pages/SystemManagement/Point/PointPool.jsx
+0
-224
src/pages/SystemManagement/Point/exchangeForOption/index.jsx
+0
-151
src/pages/SystemManagement/Point/exchangeForOption/integralExchangeSetting.jsx
+0
-283
src/pages/SystemManagement/Point/exchangeForOption/style.less
+0
-108
src/pages/SystemManagement/Point/exchangeForOption/tradingLogs.jsx
+0
-351
src/pages/SystemManagement/Point/exchangeForOption/tradingLogsFilter.jsx
+0
-125
src/pages/SystemManagement/Point/redux/action.js
+39
-6
src/pages/SystemManagement/Point/redux/api.js
+21
-5
src/pages/SystemManagement/Point/redux/reducer.js
+6
-0
src/pages/SystemManagement/index.js
+0
-31
src/pages/TrainingTools/Question/Create/Base.jsx
+2
-2
src/services/serve.js
+1
-10
No files found.
build/Ip.js
View file @
9fde9c77
var
os
=
require
(
'os'
),
IP
=
'http://47.116.126.39:8080'
,
ifaces
=
os
.
networkInterfaces
()
// 获取本机IP
var
os
=
require
(
'os'
),
IP
=
"http://10.10.12.94:8090"
,
ifaces
=
os
.
networkInterfaces
()
// 获取本机IP
out
:
out
:
for
(
var
i
in
ifaces
)
{
for
(
var
i
in
ifaces
)
{
for
(
var
j
in
ifaces
[
i
])
{
for
(
var
j
in
ifaces
[
i
])
{
...
...
src/pages/SystemManagement/MessageManagement/index.js
View file @
9fde9c77
...
@@ -424,20 +424,11 @@ class News extends React.Component {
...
@@ -424,20 +424,11 @@ class News extends React.Component {
};
};
render
()
{
render
()
{
const
{
const
{
table
,
postNewsTable
,
systemtable
,
postSystemTable
,
customsee
,
customsee
,
postHandleMessage
,
postHandleMessage
,
handlemessagetable
,
handlemessagetable
,
handlemessagetableget
,
}
=
this
.
props
;
}
=
this
.
props
;
const
{
const
{
customcurrent
,
custompageSize
,
systemcurrent
,
systempageSize
,
handleMessagepageSize
,
handleMessagepageSize
,
handleMessagecurrent
,
handleMessagecurrent
,
lookState
,
lookState
,
...
...
src/pages/SystemManagement/Point/ActiveOption.jsx
View file @
9fde9c77
...
@@ -25,12 +25,6 @@ import {
...
@@ -25,12 +25,6 @@ import {
}
from
"./redux/action"
;
}
from
"./redux/action"
;
import
Styles
from
"./index.less"
;
import
Styles
from
"./index.less"
;
import
ModalForm
from
"./ModalForm"
;
import
ModalForm
from
"./ModalForm"
;
const
Search
=
Input
.
Search
;
const
FormItem
=
Form
.
Item
;
var
companyCode
=
location
.
pathname
.
split
(
"/"
)[
1
];
var
siteCode
=
location
.
pathname
.
split
(
"/"
)[
2
];
class
ActiveOption
extends
React
.
Component
{
class
ActiveOption
extends
React
.
Component
{
state
=
{
state
=
{
visible
:
false
,
visible
:
false
,
...
@@ -38,25 +32,12 @@ class ActiveOption extends React.Component {
...
@@ -38,25 +32,12 @@ class ActiveOption extends React.Component {
current
:
"1"
,
current
:
"1"
,
pageSize
:
"10"
,
pageSize
:
"10"
,
type
:
""
,
type
:
""
,
values
:
""
,
};
};
componentDidMount
()
{
componentDidMount
()
{
this
.
props
.
getPointTable
({
pageNo
:
1
,
pageSize
:
20
});
this
.
props
.
getPointTable
({
pageNo
:
1
,
pageSize
:
20
});
this
.
props
.
getCodeList
({
code
:
"point_activity"
});
this
.
props
.
getCodeList
({
code
:
"point_activity"
});
}
}
//获取头部查询的值
onSearch
=
value
=>
{
this
.
setState
({
values
:
value
});
let
reg
=
/
[
@#
\$
%
\^
&
\*
{}|
\\]
+/g
.
test
(
value
);
if
(
!
reg
)
{
this
.
setState
({
activityName
:
value
},
()
=>
{
this
.
props
.
getPointTable
({
activityName
:
value
});
});
}
else
{
return
message
.
warning
(
"不能输入特殊字符!"
);
}
};
//上架
//上架
onShelf
=
record
=>
{
onShelf
=
record
=>
{
const
{
current
,
pageSize
}
=
this
.
state
;
const
{
current
,
pageSize
}
=
this
.
state
;
...
@@ -67,7 +48,6 @@ class ActiveOption extends React.Component {
...
@@ -67,7 +48,6 @@ class ActiveOption extends React.Component {
this
.
props
.
getPointTable
({
this
.
props
.
getPointTable
({
pageNo
:
current
,
pageNo
:
current
,
pageSize
:
pageSize
,
pageSize
:
pageSize
,
activityName
:
this
.
state
.
values
,
});
//bug-11053-liyuan 管理端-积分管理 -积分活动策略 分页控件问题
});
//bug-11053-liyuan 管理端-积分管理 -积分活动策略 分页控件问题
}
}
);
);
...
@@ -82,7 +62,6 @@ class ActiveOption extends React.Component {
...
@@ -82,7 +62,6 @@ class ActiveOption extends React.Component {
this
.
props
.
getPointTable
({
this
.
props
.
getPointTable
({
pageNo
:
current
,
pageNo
:
current
,
pageSize
:
pageSize
,
pageSize
:
pageSize
,
activityName
:
this
.
state
.
values
,
});
//bug-11053-liyuan 管理端-积分管理 -积分活动策略 分页控件问题
});
//bug-11053-liyuan 管理端-积分管理 -积分活动策略 分页控件问题
}
}
);
);
...
@@ -101,6 +80,7 @@ class ActiveOption extends React.Component {
...
@@ -101,6 +80,7 @@ class ActiveOption extends React.Component {
const
{
current
,
pageSize
,
record
,
type
,
activityName
}
=
this
.
state
;
const
{
current
,
pageSize
,
record
,
type
,
activityName
}
=
this
.
state
;
const
form
=
this
.
formRef
.
props
.
form
;
const
form
=
this
.
formRef
.
props
.
form
;
form
.
validateFields
((
err
,
values
)
=>
{
form
.
validateFields
((
err
,
values
)
=>
{
console
.
log
(
values
,
record
,
'values'
);
if
(
err
)
{
if
(
err
)
{
return
;
return
;
}
}
...
@@ -109,17 +89,13 @@ class ActiveOption extends React.Component {
...
@@ -109,17 +89,13 @@ class ActiveOption extends React.Component {
this
.
props
.
postPointModify
(
this
.
props
.
postPointModify
(
{
{
id
:
record
.
id
,
id
:
record
.
id
,
activityName
:
values
.
activityName
,
productImg
:
values
.
productImg
,
code
:
values
.
code
,
productName
:
values
.
productName
,
activityType
:
values
.
activityType
,
point
:
values
.
point
,
multiple
:
values
.
multiple
,
startTime
:
values
.
time
[
0
],
endTime
:
values
.
time
[
1
],
},
},
{
pageNo
:
current
,
pageSize
:
pageSize
}
,
''
,
()
=>
{
()
=>
{
this
.
props
.
getPointTable
({
this
.
props
.
getPointTable
({
activityName
:
this
.
state
.
values
,
pageNo
:
current
,
pageNo
:
current
,
pageSize
:
pageSize
,
pageSize
:
pageSize
,
});
});
...
@@ -128,17 +104,13 @@ class ActiveOption extends React.Component {
...
@@ -128,17 +104,13 @@ class ActiveOption extends React.Component {
}
else
{
}
else
{
this
.
props
.
postPointAdd
(
this
.
props
.
postPointAdd
(
{
{
activityName
:
values
.
activityName
,
productImg
:
values
.
productImg
,
code
:
values
.
code
,
productName
:
values
.
productName
,
activityType
:
values
.
activityType
,
point
:
values
.
point
,
multiple
:
values
.
multiple
,
startTime
:
values
.
time
[
0
],
endTime
:
values
.
time
[
1
],
},
},
{
pageNo
:
current
,
pageSize
:
pageSize
},
{
pageNo
:
current
,
pageSize
:
pageSize
},
()
=>
{
()
=>
{
this
.
props
.
getPointTable
({
this
.
props
.
getPointTable
({
activityName
:
this
.
state
.
values
,
pageNo
:
current
,
pageNo
:
current
,
pageSize
:
pageSize
,
pageSize
:
pageSize
,
});
});
...
@@ -162,78 +134,41 @@ class ActiveOption extends React.Component {
...
@@ -162,78 +134,41 @@ class ActiveOption extends React.Component {
render
()
{
render
()
{
const
that
=
this
;
const
that
=
this
;
const
{
current
,
pageSize
,
activityName
}
=
this
.
state
;
const
{
table
,
getPointTable
,
codeList
}
=
this
.
props
;
const
{
table
,
getPointTable
,
codeList
}
=
this
.
props
;
const
columns
=
[
const
columns
=
[
{
{
title
:
"活动策略名称"
,
title
:
"商品图片"
,
dataIndex
:
"activityName"
,
dataIndex
:
"productImg"
,
key
:
"activityName"
,
key
:
"productImg"
,
//width: 300, //bug-11246-liyuan 管理端-积分管理 -积分活动策略 UI bug
render
:
src
=>
{
render
:
text
=>
{
//bug-11246-liyuan 管理端-积分管理 -积分活动策略 UI bug
return
(
return
(
<
span
<
img
src=
{
src
}
style=
{
{
width
:
65
,
height
:
60
}
}
/>
title=
{
text
}
style=
{
{
display
:
"block"
,
width
:
"200px"
,
overflow
:
"hidden"
,
textOverflow
:
"ellipsis"
,
whiteSpace
:
"nowrap"
,
cursor
:
"default"
,
}
}
>
{
text
}
</
span
>
);
);
},
},
},
},
{
{
title
:
"积分编号"
,
title
:
"商品名称"
,
dataIndex
:
"code"
,
dataIndex
:
"productName"
,
key
:
"code"
,
key
:
"productName"
,
// width: 200, //bug-11246-liyuan 管理端-积分管理 -积分活动策略 UI bug
render
:
text
=>
{
return
codeList
?.
data
?.
find
(
item
=>
item
.
code
==
text
).
cnName
;
},
},
},
{
{
title
:
"积分类型"
,
title
:
"所需积分"
,
dataIndex
:
"activityType"
,
dataIndex
:
"point"
,
key
:
"activityType"
,
key
:
"point"
,
// width: 200, //bug-11246-liyuan 管理端-积分管理 -积分活动策略 UI bug
render
:
text
=>
{
return
<
span
>
{
text
==
"1"
?
"否"
:
text
}
</
span
>;
},
},
},
{
{
title
:
"积分倍数"
,
title
:
"创建时间"
,
dataIndex
:
"multiple"
,
dataIndex
:
"createTime"
,
key
:
"multiple"
,
key
:
"createTime"
,
// width: 200, //bug-11246-liyuan 管理端-积分管理 -积分活动策略 UI bug
render
:
text
=>
{
return
<
span
>
{
text
==
"1"
?
"否"
:
text
}
</
span
>;
},
},
{
title
:
"发放有效期"
,
dataIndex
:
"time"
,
key
:
"time"
,
// width: 400, //bug-11246-liyuan 管理端-积分管理 -积分活动策略 UI bug
render
:
(
text
,
record
)
=>
{
render
:
(
text
,
record
)
=>
{
return
(
return
(
<
span
>
<
span
>
{
moment
(
record
.
createTime
).
format
(
"YYYY-MM-DD HH:mm:ss"
)
}
</
span
>
{
moment
(
record
.
startTime
).
format
(
"YYYY-MM-DD HH:mm:ss"
)
}
~
{
" "
}
{
moment
(
record
.
endTime
).
format
(
"YYYY-MM-DD HH:mm:ss"
)
}
</
span
>
);
);
},
},
},
},
{
{
title
:
"操作"
,
title
:
"操作"
,
key
:
"action"
,
key
:
"action"
,
width
:
300
,
//bug-11246-liyuan 管理端-积分管理 -积分活动策略 UI bug
render
:
(
text
,
record
,
index
)
=>
(
render
:
(
text
,
record
,
index
)
=>
(
<
span
>
<
span
>
{
record
.
state
==
"2"
?
(
{
record
.
state
==
"2"
?
(
...
@@ -270,20 +205,6 @@ class ActiveOption extends React.Component {
...
@@ -270,20 +205,6 @@ class ActiveOption extends React.Component {
""
""
)
}
)
}
<
Divider
type=
"vertical"
/>
<
Divider
type=
"vertical"
/>
<
Link
to=
{
{
pathname
:
"/"
+
companyCode
+
"/"
+
siteCode
+
"/index/manager/point/Detailed-option"
,
state
:
{
record
},
}
}
>
积分明细
</
Link
>
<
Divider
type=
"vertical"
/>
<
Popconfirm
<
Popconfirm
title=
"确定要删除吗?"
title=
"确定要删除吗?"
okText=
"确定"
okText=
"确定"
...
@@ -293,7 +214,6 @@ class ActiveOption extends React.Component {
...
@@ -293,7 +214,6 @@ class ActiveOption extends React.Component {
if
(
res
.
code
===
"1000"
)
{
if
(
res
.
code
===
"1000"
)
{
message
.
success
(
"删除成功"
);
message
.
success
(
"删除成功"
);
this
.
props
.
getPointTable
({
this
.
props
.
getPointTable
({
activityName
:
this
.
state
.
values
,
pageNo
:
this
.
state
.
current
,
pageNo
:
this
.
state
.
current
,
pageSize
:
this
.
state
.
pageSize
,
pageSize
:
this
.
state
.
pageSize
,
});
});
...
@@ -312,9 +232,9 @@ class ActiveOption extends React.Component {
...
@@ -312,9 +232,9 @@ class ActiveOption extends React.Component {
const
pagination
=
{
const
pagination
=
{
showQuickJumper
:
true
,
showQuickJumper
:
true
,
showSizeChanger
:
true
,
showSizeChanger
:
true
,
total
:
table
&&
table
.
page
.
pageT
otal
,
total
:
table
&&
table
.
t
otal
,
showTotal
:
total
=>
`共
${
table
.
page
.
pageT
otal
}
条`
,
showTotal
:
total
=>
`共
${
table
.
t
otal
}
条`
,
pageSize
:
table
&&
table
.
page
.
pageS
ize
,
pageSize
:
table
&&
table
.
s
ize
,
onShowSizeChange
(
current
,
pageSize
)
{
onShowSizeChange
(
current
,
pageSize
)
{
getPointTable
({
pageNo
:
current
,
pageSize
:
pageSize
});
getPointTable
({
pageNo
:
current
,
pageSize
:
pageSize
});
that
.
setState
({
current
:
current
,
pageSize
:
pageSize
});
that
.
setState
({
current
:
current
,
pageSize
:
pageSize
});
...
@@ -326,25 +246,19 @@ class ActiveOption extends React.Component {
...
@@ -326,25 +246,19 @@ class ActiveOption extends React.Component {
};
};
return
(
return
(
<
div
className=
{
Styles
.
list
}
>
<
div
className=
{
Styles
.
list
}
>
<
Breadcrumb
title=
"
活动策略
设置"
/>
<
Breadcrumb
title=
"
商品
设置"
/>
<
div
className=
{
Styles
.
listBtn
}
>
<
div
className=
{
Styles
.
listBtn
}
>
<
div
style=
{
{
float
:
"left"
}
}
>
<
div
style=
{
{
float
:
"left"
}
}
>
<
Button
type=
"primary"
onClick=
{
this
.
showModal
}
>
<
Button
type=
"primary"
onClick=
{
this
.
showModal
}
>
创建活动策略
新增商品
</
Button
>
</
Button
>
</
div
>
</
div
>
<
div
style=
{
{
float
:
"right"
}
}
>
<
Search
placeholder=
"请输入活动策略名称"
enterButton
onSearch=
{
this
.
onSearch
}
/>
</
div
>
</
div
>
</
div
>
{
table
?
(
{
table
?
(
<
Table
<
Table
columns=
{
columns
}
columns=
{
columns
}
dataSource=
{
table
.
data
}
dataSource=
{
table
&&
table
.
records
}
pagination=
{
pagination
}
pagination=
{
pagination
}
rowKey=
{
record
=>
record
.
id
}
rowKey=
{
record
=>
record
.
id
}
/>
/>
...
...
src/pages/SystemManagement/Point/CurrencyOption.jsx
View file @
9fde9c77
This diff is collapsed.
Click to expand it.
src/pages/SystemManagement/Point/Detailed.jsx
deleted
100644 → 0
View file @
01dbcb9b
import
React
from
"react"
;
import
{
Form
,
DatePicker
,
Input
,
Button
,
Table
,
Spin
}
from
"antd"
;
import
moment
from
"moment"
;
import
"moment/locale/zh-cn"
;
import
{
connect
}
from
"react-redux"
;
import
{
getPointDetailed
}
from
"./redux/action"
;
import
Breadcrumb
from
"@/common/Breadcrumb"
;
const
{
RangePicker
}
=
DatePicker
;
const
FormItem
=
Form
.
Item
;
//时间格式化
const
dateFormats
=
"YYYY-MM-DD HH:mm:ss"
;
class
Detailed
extends
React
.
Component
{
state
=
{
current
:
"1"
,
pageSize
:
"10"
,
};
componentDidMount
()
{
if
(
history
.
state
.
state
)
{
this
.
props
.
getPointDetailed
({
activityId
:
history
.
state
.
state
.
record
.
id
,
});
}
else
{
this
.
props
.
getPointDetailed
();
}
}
//查询
handleSubmit
=
e
=>
{
// debugger
e
.
preventDefault
();
const
{
// location,
getPointDetailed
}
=
this
.
props
;
this
.
props
.
form
.
validateFields
((
err
,
values
)
=>
{
if
(
err
)
console
.
log
(
'11111111111'
,
err
)
//
if
(
!
err
)
{
// if (location.state) {
if
(
history
.
state
.
state
)
{
getPointDetailed
({
// activityId: location.state.record.id,
activityId
:
history
.
state
.
state
.
record
.
id
,
accountName
:
values
.
accountName
,
startTime
:
values
.
time
?
new
Date
(
moment
(
values
.
time
[
0
].
_d
).
format
(
dateFormats
)
).
getTime
()
:
""
,
endTime
:
values
.
time
?
new
Date
(
moment
(
values
.
time
[
1
].
_d
).
format
(
dateFormats
)
).
getTime
()
:
""
,
});
}
else
{
getPointDetailed
({
accountName
:
values
.
accountName
,
startTime
:
values
.
time
?
new
Date
(
moment
(
values
.
time
[
0
].
_d
).
format
(
dateFormats
)
).
getTime
()
:
""
,
endTime
:
values
.
time
?
new
Date
(
moment
(
values
.
time
[
1
].
_d
).
format
(
dateFormats
)
).
getTime
()
:
""
,
});
}
}
});
};
render
()
{
const
that
=
this
;
const
{
form
,
detailed
,
getPointDetailed
,
// location
}
=
this
.
props
;
const
{
getFieldDecorator
}
=
form
;
const
columns
=
[
{
title
:
"时间"
,
dataIndex
:
"time"
,
key
:
"time"
,
render
:
text
=>
{
return
<
span
>
{
moment
(
text
).
format
(
"YYYY-MM-DD HH:mm:ss"
)
}
</
span
>;
},
},
{
title
:
"积分"
,
dataIndex
:
"point"
,
key
:
"point"
,
render
:
(
text
,
record
)
=>
{
return
(
<
span
>
{
record
.
flag
==
"1"
?
"+"
:
""
}
{
text
}
</
span
>
);
},
},
{
title
:
"用户名"
,
dataIndex
:
"accountName"
,
key
:
"accountName"
,
render
:
text
=>
{
return
(
<
span
title=
{
text
}
>
{
text
.
length
>
10
?
text
.
substring
(
9
,
0
)
+
"..."
:
text
}
</
span
>
);
},
},
{
title
:
"学习活动类型"
,
dataIndex
:
"learnType"
,
key
:
"learnType"
,
},
{
title
:
"学习活动名称"
,
dataIndex
:
"learnName"
,
key
:
"learnName"
,
render
:
text
=>
{
return
(
<
span
title=
{
text
}
>
{
text
.
length
>
10
?
text
.
substring
(
9
,
0
)
+
"..."
:
text
}
</
span
>
);
},
},
{
title
:
"学习活动来源"
,
dataIndex
:
"learnSource"
,
key
:
"learnSource"
,
},
];
const
pagination
=
{
showQuickJumper
:
true
,
showSizeChanger
:
true
,
total
:
detailed
&&
detailed
.
page
.
pageTotal
,
pageSize
:
detailed
&&
detailed
.
page
.
pageSize
,
showTotal
:
function
()
{
//设置显示一共几条数据
return
detailed
&&
"共计 "
+
detailed
.
page
.
pageTotal
+
" 条"
;
},
// 分页
onShowSizeChange
(
current
,
pageSize
)
{
// if (location.state) {
if
(
history
.
state
.
state
)
{
getPointDetailed
({
// activityId: location.state.record.id,
activityId
:
history
.
state
.
state
.
record
.
id
,
pageNo
:
current
,
pageSize
:
pageSize
,
});
}
else
{
getPointDetailed
({
pageNo
:
current
,
pageSize
:
pageSize
});
}
that
.
setState
({
current
:
current
,
pageSize
:
pageSize
});
},
onChange
(
current
,
pageSize
)
{
// if (location.state) {
if
(
history
.
state
.
state
)
{
getPointDetailed
({
activityId
:
history
.
state
.
state
.
record
.
id
,
pageNo
:
current
,
pageSize
:
pageSize
,
});
}
else
{
getPointDetailed
({
pageNo
:
current
,
pageSize
:
pageSize
});
}
that
.
setState
({
current
:
current
,
pageSize
:
pageSize
});
},
};
return
(
<
div
style=
{
{
padding
:
"0 20px"
}
}
>
<
Breadcrumb
title=
"积分流水明细"
/>
<
Form
layout=
"inline"
onSubmit=
{
this
.
handleSubmit
}
>
<
FormItem
>
{
getFieldDecorator
(
"accountName"
)(
<
Input
placeholder=
"请输入用户名"
/>
)
}
</
FormItem
>
<
FormItem
>
{
getFieldDecorator
(
"time"
)(
<
RangePicker
placeholder=
{
[
"开始时间"
,
"结束时间"
]
}
ranges=
{
{
// Today: [moment(), moment()],
"今天"
:
[
moment
().
startOf
(
'day'
),
moment
().
endOf
(
'day'
)],
//当天零时到当天23时59分59秒 bug-12231-liyuan
// "This Month": [moment(), moment().endOf("month")],
"这个月"
:
[
moment
().
startOf
(
"month"
),
moment
().
endOf
(
"month"
)],
}
}
showTime
format=
"YYYY-MM-DD"
onOk=
{
this
.
onRangePicker
}
/>
)
}
</
FormItem
>
<
FormItem
>
<
Button
type=
"primary"
htmlType=
"submit"
>
查询
</
Button
>
</
FormItem
>
</
Form
>
{
detailed
?
(
<
Table
dataSource=
{
detailed
.
data
}
columns=
{
columns
}
pagination=
{
pagination
}
rowKey=
{
record
=>
record
.
id
}
/>
)
:
(
<
Spin
className=
"cred-spin"
/>
)
}
</
div
>
);
}
}
const
DetailedForm
=
Form
.
create
()(
Detailed
);
function
mapStateToProps
(
state
,
ownProps
)
{
return
{
detailed
:
state
.
point
.
detailed
,
};
}
function
mapDispatchToProps
(
dispatch
)
{
return
{
getPointDetailed
:
obj
=>
dispatch
(
getPointDetailed
(
obj
)),
};
}
export
default
connect
(
mapStateToProps
,
mapDispatchToProps
)(
DetailedForm
);
src/pages/SystemManagement/Point/EditPointPool.jsx
deleted
100644 → 0
View file @
01dbcb9b
import
React
from
"react"
;
import
{
Button
,
Form
,
Input
,
Radio
,
Switch
,
InputNumber
,
Select
}
from
"antd"
;
import
"./index.less"
;
const
FormItem
=
Form
.
Item
;
const
{
TextArea
}
=
Input
;
const
Option
=
Select
.
Option
;
const
CollectionCreateForm
=
Form
.
create
()(
props
=>
{
const
{
visible
,
onCancel
,
onCreate
,
form
,
editeData
}
=
props
;
const
{
getFieldDecorator
}
=
form
;
const
formItemLayout
=
{
labelCol
:
{
span
:
6
},
wrapperCol
:
{
span
:
14
},
};
function
handleChange
(
value
)
{
console
.
log
(
value
);
// { key: "lucy", label: "Lucy (101)" }
}
return
(
<
Form
layout=
"horizontal"
>
<
FormItem
{
...
formItemLayout
}
label=
"积分池名称"
>
{
getFieldDecorator
(
"title"
,
{
initialValue
:
props
.
editeData
.
name
,
rules
:
[
{
required
:
true
,
message
:
"Please input the title of collection!"
,
},
],
})(<
Input
/>)
}
</
FormItem
>
<
FormItem
{
...
formItemLayout
}
label=
"积分池描述"
>
{
getFieldDecorator
(
"description"
)(<
TextArea
rows=
{
4
}
/>)
}
</
FormItem
>
<
FormItem
{
...
formItemLayout
}
label=
"商城模块开关"
>
{
getFieldDecorator
(
"switch"
,
{
valuePropName
:
"checked"
,
initialValue
:
props
.
editeData
.
flag
===
"启用"
?
true
:
false
,
})(<
Switch
checkedChildren=
"开"
unCheckedChildren=
"关"
/>)
}
</
FormItem
>
<
FormItem
{
...
formItemLayout
}
label=
"积分单位"
>
{
getFieldDecorator
(
"input-number"
,
{
initialValue
:
3
})(
<
InputNumber
min=
{
1
}
max=
{
10
}
/>
)
}
<
span
className=
"ant-form-text"
>
积分
</
span
>
</
FormItem
>
</
Form
>
);
});
class
RegistrationForm
extends
React
.
Component
{
constructor
(
props
)
{
super
(
props
);
this
.
state
=
{
searchname
:
""
,
};
// 搜索事件
this
.
onSearch
=
this
.
handleSearch
.
bind
(
this
);
}
//componentWillUnmount(){
// this.props.form.setFieldsValue({
// title:'2'
// })
// }
// 搜索事件
handleSearch
=
event
=>
{
data
.
splice
(
1
,
1
);
this
.
setState
({
data
:
data
,
});
};
render
()
{
const
{
editeData
}
=
this
.
props
;
return
(
<
div
>
<
CollectionCreateForm
editeData=
{
editeData
}
/>
</
div
>
);
}
}
const
EditPointPool
=
Form
.
create
()(
RegistrationForm
);
export
default
EditPointPool
;
src/pages/SystemManagement/Point/ModalForm.jsx
View file @
9fde9c77
...
@@ -5,7 +5,29 @@ import moment from "moment";
...
@@ -5,7 +5,29 @@ import moment from "moment";
const
{
RangePicker
}
=
DatePicker
;
const
{
RangePicker
}
=
DatePicker
;
const
Option
=
Select
.
Option
;
const
Option
=
Select
.
Option
;
const
FormItem
=
Form
.
Item
;
const
FormItem
=
Form
.
Item
;
// 引入图片裁剪上传组件
import
UploadImageCover
from
"@/common/UploadImageCover"
;
class
activModalForm
extends
React
.
Component
{
class
activModalForm
extends
React
.
Component
{
constructor
(
props
)
{
super
(
props
);
this
.
state
=
{
productImg
:
props
.
record
&&
props
.
record
.
productImg
?
props
.
record
.
productImg
:
""
};
}
// 获取图片URL的回调函数
getImgUrl
=
(
imgUrl
)
=>
{
this
.
setState
({
productImg
:
imgUrl
});
// 同时设置表单字段值
this
.
props
.
form
.
setFieldsValue
({
productImg
:
imgUrl
});
}
render
()
{
render
()
{
const
{
const
{
visible
,
visible
,
...
@@ -38,79 +60,61 @@ class activModalForm extends React.Component {
...
@@ -38,79 +60,61 @@ class activModalForm extends React.Component {
return
(
return
(
<
Modal
<
Modal
visible=
{
visible
}
visible=
{
visible
}
title=
"创建活动策略"
title=
{
type
==
"look"
?
"查看商品"
:
type
==
"edit"
?
"修改商品"
:
"新增商品"
}
okText=
"确定"
okText=
"确定"
onCancel=
{
onCancel
}
onCancel=
{
onCancel
}
onOk=
{
onCreate
}
onOk=
{
onCreate
}
destroyOnClose
destroyOnClose
>
>
<
Form
>
<
Form
>
<
FormItem
{
...
formItemLayout
}
label=
"活动名称"
>
{
/* 修改图片字段为支持裁剪的图片上传组件 */
}
{
getFieldDecorator
(
"activityName"
,
{
<
FormItem
{
...
formItemLayout
}
label=
"图片"
>
initialValue
:
record
&&
record
.
activityName
,
{
getFieldDecorator
(
"productImg"
,
{
initialValue
:
record
&&
record
.
productImg
,
rules
:
[
rules
:
[
{
required
:
true
,
message
:
"请输入活动名称"
},
{
required
:
true
,
message
:
"请上传商品图片"
},
{
max
:
200
,
message
:
"活动名称不能超过200个字符!"
},
],
],
})(
})(
<
Input
<
div
>
placeholder=
"请输入活动名称"
<
UploadImageCover
details=
{
record
&&
record
.
productImg
}
getImgUrl=
{
this
.
getImgUrl
}
disabled=
{
type
==
"look"
?
true
:
false
}
disabled=
{
type
==
"look"
?
true
:
false
}
preRatio=
{
[
"5/4"
]
}
// 设置图片比例为1:1,适合商品展示
/>
/>
<
div
style=
{
{
marginTop
:
8
,
fontSize
:
12
,
color
:
'#999'
}
}
>
支持jpg、jpeg、png格式,建议尺寸1:1,大小不超过30MB
</
div
>
</
div
>
)
}
)
}
</
FormItem
>
</
FormItem
>
<
FormItem
{
...
formItemLayout
}
label=
"活动code"
>
<
FormItem
{
...
formItemLayout
}
label=
"商品名称"
>
{
getFieldDecorator
(
"code"
,
{
{
getFieldDecorator
(
"productName"
,
{
initialValue
:
record
&&
record
.
code
,
initialValue
:
record
&&
record
.
productName
,
rules
:
[{
required
:
true
,
message
:
"请选择活动code"
}],
})(
<
Select
style=
{
{
width
:
"200px"
}
}
placeholder=
"请选择活动code"
>
{
list
}
</
Select
>
)
}
</
FormItem
>
<
FormItem
{
...
formItemLayout
}
label=
"活动类型"
>
{
getFieldDecorator
(
"activityType"
,
{
initialValue
:
record
&&
record
.
activityType
,
rules
:
[
rules
:
[
{
required
:
true
,
message
:
"请输入
活动类型
"
},
{
required
:
true
,
message
:
"请输入
商品名称
"
},
{
max
:
200
,
message
:
"活动类型不能超过20
0个字符!"
},
{
max
:
50
,
message
:
"商品名称不能超过5
0个字符!"
},
],
],
})(
})(
<
Input
<
Input
placeholder=
"请输入
活动类型
"
placeholder=
"请输入
商品名称
"
disabled=
{
type
==
"look"
?
true
:
false
}
disabled=
{
type
==
"look"
?
true
:
false
}
/>
/>
)
}
)
}
</
FormItem
>
</
FormItem
>
<
FormItem
{
...
formItemLayout
}
label=
"积分翻倍"
>
<
FormItem
{
...
formItemLayout
}
label=
"所需积分"
>
{
getFieldDecorator
(
"multiple"
,
{
{
getFieldDecorator
(
"point"
,
{
initialValue
:
record
&&
record
.
multiple
,
initialValue
:
record
&&
record
.
point
,
rules
:
[{
required
:
true
,
message
:
"请输入翻倍数"
}],
})(
<
InputNumber
min=
{
2
}
disabled=
{
type
==
"look"
?
true
:
false
}
/>
)
}
</
FormItem
>
<
FormItem
{
...
formItemLayout
}
label=
"活动时间"
>
{
getFieldDecorator
(
"time"
,
{
initialValue
:
record
&&
[
moment
(
record
.
startTime
),
moment
(
record
.
endTime
),
],
rules
:
[
rules
:
[
{
type
:
"array"
,
required
:
true
,
message
:
"请输入活动时间!"
},
{
required
:
true
,
message
:
"请输入所需积分"
},
{
type
:
'number'
,
min
:
1
,
message
:
'积分必须大于0'
},
],
],
})(
})(
<
RangePicker
<
InputNumber
placeholder=
{
[
"开始时间"
,
"结束时间"
]
}
placeholder=
"请输入所需积分"
ranges=
{
{
今天
:
[
moment
(),
moment
().
endOf
(
"month"
)],
这个月
:
[
moment
().
startOf
(
"month"
),
moment
().
endOf
(
"month"
)],
}
}
//bug-11250-liyuan 积分管理 -积分活动策略 时间控件的问题
showTime
format=
"YYYY-MM-DD HH:mm:ss"
onOk=
{
this
.
onRangePicker
}
disabled=
{
type
==
"look"
?
true
:
false
}
disabled=
{
type
==
"look"
?
true
:
false
}
min=
{
1
}
style=
{
{
width
:
'100%'
}
}
/>
/>
)
}
)
}
</
FormItem
>
</
FormItem
>
...
...
src/pages/SystemManagement/Point/PointPool.jsx
deleted
100644 → 0
View file @
01dbcb9b
import
React
from
"react"
;
import
{
Button
,
Table
,
Icon
,
Select
,
Input
,
Divider
,
Popconfirm
,
Modal
,
}
from
"antd"
;
import
Styles
from
"./index.less"
;
import
EditPointPool
from
"./EditPointPool.jsx"
;
const
Option
=
Select
.
Option
;
const
data
=
[
{
key
:
"1"
,
name
:
"太保总公司积分商城"
,
start
:
"是"
,
flag
:
"启用"
,
},
{
key
:
"2"
,
name
:
"太保总公司积分商城"
,
start
:
"否"
,
flag
:
"停用"
,
},
{
key
:
"3"
,
name
:
"平安总公司积分商城"
,
start
:
"否"
,
flag
:
"启用"
,
},
];
for
(
var
value
of
data
)
{
console
.
log
(
value
.
flag
);
}
class
PointPool
extends
React
.
Component
{
constructor
(
props
)
{
super
(
props
);
this
.
state
=
{
searchName
:
""
,
editeData
:
[],
data
:
data
,
};
this
.
columns
=
[
{
title
:
"积分池名称"
,
dataIndex
:
"name"
,
key
:
"name"
,
render
:
text
=>
{
return
(
<
span
title=
{
text
}
>
{
text
.
length
>
10
?
text
.
substring
(
9
,
0
)
+
"..."
:
text
}
</
span
>
);
},
},
{
title
:
"是否独立商城"
,
dataIndex
:
"start"
,
key
:
"start"
,
},
{
title
:
"是否独立商城"
,
dataIndex
:
"flag"
,
key
:
"flag"
,
},
{
title
:
"操作"
,
key
:
"action"
,
render
:
(
text
,
record
,
index
)
=>
(
<
span
>
<
a
href=
"#"
data
-
index=
{
index
}
onClick=
{
()
=>
this
.
handleEdit
(
record
)
}
>
编辑
</
a
>
<
Divider
type=
"vertical"
/>
{
record
.
flag
===
"启用"
?
(
<
Popconfirm
title=
"确定要停用吗?"
okText=
"确定"
cancelText=
"取消"
onConfirm=
{
()
=>
this
.
handleStart
(
record
.
key
)
}
>
<
a
href=
"#"
>
停用
</
a
>
</
Popconfirm
>
)
:
(
<
Popconfirm
title=
"确定要启用吗?"
okText=
"确定"
cancelText=
"取消"
onConfirm=
{
()
=>
this
.
handleStop
(
record
.
key
)
}
>
<
a
href=
"#"
>
启用
</
a
>
</
Popconfirm
>
)
}
<
Divider
type=
"vertical"
/>
<
a
href=
"#"
data
-
index=
{
index
}
>
活动策略
</
a
>
<
Divider
type=
"vertical"
/>
<
a
href=
"#"
data
-
index=
{
index
}
>
发放积分配置
</
a
>
<
Divider
type=
"vertical"
/>
<
a
href=
"#"
data
-
index=
{
index
}
>
积分明细
</
a
>
</
span
>
),
},
];
// 搜索事件
this
.
onSearch
=
this
.
handleSearch
.
bind
(
this
);
// 搜索框输入
this
.
onChange
=
this
.
handleChange
.
bind
(
this
);
// 弹出对话框
this
.
onShowModal
=
this
.
showModal
.
bind
(
this
);
// 关闭对话框
this
.
onHideModal
=
this
.
hideModal
.
bind
(
this
);
// 编辑对话框
this
.
onEditModal
=
this
.
editModal
.
bind
(
this
);
}
// 搜索事件
handleSearch
=
event
=>
{
data
.
splice
(
1
,
1
);
this
.
setState
({
data
:
data
,
});
};
// 搜索框输入
handleChange
=
event
=>
{
this
.
setState
({
searchName
:
event
.
target
.
value
});
};
// 搜索框输入
handleStop
=
key
=>
{
console
.
log
(
key
);
};
// 停用规则
handleStart
=
key
=>
{
console
.
log
(
key
);
};
// 编辑积分池
handleEdit
=
record
=>
{
this
.
setState
({
editeData
:
record
});
this
.
onShowModal
();
};
showModal
=
e
=>
{
this
.
setState
({
visible
:
true
,
type
:
"edit"
,
title
:
"编辑积分池"
,
width
:
"30rem"
,
footer
:
"打*号必须填"
,
clear
:
"false"
,
key
:
"2222"
,
});
};
hideModal
=
e
=>
{
this
.
setState
({
visible
:
false
,
});
};
editModal
=
e
=>
{};
render
()
{
const
columns
=
this
.
columns
;
return
(
<
div
className=
{
Styles
.
list
}
>
<
div
className=
{
Styles
.
listBtn
}
>
<
div
>
<
Input
placeholder=
"请输入项目名称"
value=
{
this
.
state
.
searchName
}
onChange=
{
this
.
onChange
}
style=
{
{
width
:
200
,
marginRight
:
10
}
}
/>
<
Button
type=
"primary"
onClick=
{
this
.
onSearch
}
>
搜索
</
Button
>
</
div
>
</
div
>
<
Table
columns=
{
columns
}
dataSource=
{
this
.
state
.
data
}
/>
<
Modal
key=
{
this
.
state
.
key
}
title=
{
this
.
state
.
title
}
visible=
{
this
.
state
.
visible
}
onOk=
{
this
.
onHideModal
}
onCancel=
{
this
.
onHideModal
}
footer=
{
[
<
p
className=
"comond"
key=
"comond"
>
{
this
.
state
.
footer
}
</
p
>,
<
Button
key=
"back"
size=
"large"
onClick=
{
this
.
onHideModal
}
>
取消
</
Button
>,
<
Button
key=
"submit"
type=
"primary"
size=
"large"
onClick=
{
this
.
onEditModal
}
>
保存
</
Button
>,
]
}
>
<
div
>
<
EditPointPool
editeData=
{
this
.
state
.
editeData
}
/>
</
div
>
</
Modal
>
</
div
>
);
}
}
export
default
PointPool
;
src/pages/SystemManagement/Point/exchangeForOption/index.jsx
deleted
100644 → 0
View file @
01dbcb9b
import
React
,
{
Component
}
from
'react'
;
import
{
Icon
,
Switch
,
Tabs
}
from
"antd"
;
import
Styles
from
"./style.less"
;
import
IntegralExchangeSetting
from
"./integralExchangeSetting"
;
import
TradingLogs
from
"./tradingLogs"
;
import
intl
from
"react-intl-universal"
;
import
{
connect
}
from
"react-redux"
;
import
{
getExchangeSwitch
,
turnOnOrOffSwitch
}
from
"../redux/action"
;
import
Breadcrumb
from
"@/common/Breadcrumb"
;
const
{
TabPane
}
=
Tabs
;
class
PointExchangeOption
extends
Component
{
constructor
(
props
)
{
super
(
props
)
this
.
state
=
{
integralChecked
:
false
,
activeKey
:
"2"
,
refreshConfigCard
:
""
}
}
componentDidMount
()
{
let
_this
=
this
;
this
.
props
.
getExchangeSwitch
({
type
:
10
},
()
=>
{
const
{
switchList
}
=
_this
.
props
;
let
result
=
false
;
if
(
switchList
.
length
&&
switchList
.
length
>
0
)
{
let
resultArr
=
switchList
.
filter
(
item
=>
{
return
parseInt
(
item
.
type
)
==
10
;
});
if
(
resultArr
.
length
>
0
)
{
result
=
resultArr
[
0
].
tokenSwitch
||
false
;
}
}
_this
.
setState
({
integralChecked
:
result
,
activeKey
:
result
?
"1"
:
"2"
,
refreshConfigCard
:
new
Date
().
getTime
()
});
});
}
getExchangeConfig
=
(
type
,
checked
)
=>
{
switch
(
type
)
{
case
"integral"
:
this
.
props
.
turnOnOrOffSwitch
({
type
:
10
,
tokenSwitchBol
:
checked
});
this
.
setState
({
integralChecked
:
checked
,
activeKey
:
checked
?
"1"
:
"2"
,
});
break
;
}
}
tabChange
=
(
activeKey
)
=>
{
this
.
setState
({
activeKey
});
}
render
()
{
const
{
integralChecked
,
activeKey
,
refreshConfigCard
}
=
this
.
state
;
return
<
div
className=
{
Styles
.
exchangeContainer
}
>
<
Breadcrumb
title=
{
intl
.
get
(
"exchangeConfigText23"
)
}
/>
<
div
className=
{
Styles
.
exchangeConfigContainer
}
>
<
div
className=
{
Styles
.
exchangeConfigArea
}
>
<
ExchangeConfigItem
key=
{
refreshConfigCard
}
icon=
{
<
Icon
type=
"pay-circle"
/>
}
data=
{
{
type
:
"integral"
,
name
:
intl
.
get
(
"exchangeConfigText1"
),
desc
:
intl
.
get
(
"exchangeConfigText2"
)
}
}
defaultChecked=
{
integralChecked
}
onChange=
{
this
.
getExchangeConfig
}
/>
</
div
>
</
div
>
<
div
className=
{
Styles
.
exchangeTabsContainer
}
>
<
Tabs
activeKey=
{
activeKey
}
onChange=
{
this
.
tabChange
}
tabBarStyle=
{
{
marginBottom
:
0
}
}
>
{
integralChecked
?
<
TabPane
tab=
{
intl
.
get
(
"exchangeConfigText3"
)
}
key=
"1"
>
<
div
style=
{
{
width
:
"100%"
,
height
:
15
,
backgroundColor
:
"#F0F2F5"
}
}
></
div
>
<
IntegralExchangeSetting
/>
</
TabPane
>
:
""
}
<
TabPane
tab=
{
intl
.
get
(
"exchangeConfigText4"
)
}
key=
"2"
>
<
div
style=
{
{
width
:
"100%"
,
height
:
15
,
backgroundColor
:
"#F0F2F5"
}
}
></
div
>
<
TradingLogs
tabKey=
{
activeKey
}
/>
</
TabPane
>
</
Tabs
>
</
div
>
</
div
>;
}
}
function
mapStateToProps
(
state
,
ownProps
)
{
return
{
switchList
:
state
.
point
.
exchangeSwitchStatusList
,
};
}
function
mapDispatchToProps
(
dispatch
)
{
return
{
getExchangeSwitch
:
(
obj
,
callback
)
=>
dispatch
(
getExchangeSwitch
(
obj
,
callback
)),
turnOnOrOffSwitch
:
(
obj
,
callback
)
=>
dispatch
(
turnOnOrOffSwitch
(
obj
,
callback
)),
};
}
export
default
connect
(
mapStateToProps
,
mapDispatchToProps
)(
PointExchangeOption
);
const
ExchangeConfigItem
=
({
icon
,
data
,
defaultChecked
,
onChange
})
=>
{
return
<
div
className=
{
Styles
.
exchangeConfigItem
}
>
<
div
className=
{
Styles
.
exchangeConfigIcon
}
>
{
icon
}
</
div
>
<
div
className=
{
Styles
.
exchangeConfigInfo
}
>
<
div
className=
{
Styles
.
exchangeConfigName
}
>
{
data
.
name
}
</
div
>
<
div
className=
{
Styles
.
exchangeConfigDesc
}
>
{
data
.
desc
}
</
div
>
</
div
>
<
div
className=
{
Styles
.
exchangeConfigSwitch
}
>
<
Switch
checkedChildren=
"ON"
unCheckedChildren=
"OFF"
checked=
{
defaultChecked
}
onChange=
{
(
checked
)
=>
onChange
(
data
.
type
,
checked
)
}
/>
</
div
>
</
div
>;
}
\ No newline at end of file
src/pages/SystemManagement/Point/exchangeForOption/integralExchangeSetting.jsx
deleted
100644 → 0
View file @
01dbcb9b
This diff is collapsed.
Click to expand it.
src/pages/SystemManagement/Point/exchangeForOption/style.less
deleted
100644 → 0
View file @
01dbcb9b
.exchangeContainer {
width: 100%;
.exchangeConfigContainer {
width: 100%;
height: 258px;
border-bottom: 1px solid #F0F0F0;
padding: 24px 16px 0 16px;
.exchangeConfigArea {
width: 100%;
height: 218px;
.exchangeConfigItem {
width: 32%;
height: 218px;
background-color: rgba(66, 133, 244, 0.05);
padding-top: 24px;
padding-right: 16px;
padding-left: 96px;
position: relative;
.exchangeConfigIcon {
width: 96px;
height: 218px;
position: absolute;
left: 0;
top: 0;
text-align: center;
font-size: 56px;
padding-top: 52px;
}
.exchangeConfigSwitch {
position: absolute;
right: 18px;
bottom: 26px;
}
.exchangeConfigInfo {
width: 100%;
.exchangeConfigName {
width: 100%;
height: 28px;
line-height: 28px;
color: rgba(0, 0, 0, 0.85);
font-weight: 500;
font-size: 20px;
}
.exchangeConfigDesc {
width: 100%;
line-height: 20px;
color: rgba(0, 0, 0, 0.45);
font-weight: 500;
font-size: 14px;
margin-top: 16px;
text-align: justify;
}
}
}
}
}
.exchangeTabsContainer {
width: 100%;
.exchangeTabsContentContainer {
width: 100%;
.payByIntegralTitle {
width: 100%;
padding-left: 32px;
padding-top: 33px;
line-height: 24px;
font-size: 16px;
color: #000;
font-weight: 400;
}
}
}
.tradingLogsContainer {
width: 100%;
padding: 16px;
background-color: white;
.list_btn {
margin-bottom: 16px;
}
}
}
.tradingLogsFilter {
width: 470px;
height: 208px;
background-color: #fff;
box-shadow: 0px 4px 12px 0px rgba(0, 0, 0, 0.2);
border-radius: 2px;
padding-top: 15px;
.tradingLogsFilterBtns {
width: 100%;
text-align: center;
}
}
src/pages/SystemManagement/Point/exchangeForOption/tradingLogs.jsx
deleted
100644 → 0
View file @
01dbcb9b
This diff is collapsed.
Click to expand it.
src/pages/SystemManagement/Point/exchangeForOption/tradingLogsFilter.jsx
deleted
100644 → 0
View file @
01dbcb9b
import
React
,
{
Component
}
from
'react'
;
import
styles
from
"./style.less"
;
import
{
Form
,
Select
,
DatePicker
,
Button
}
from
"antd"
;
const
Option
=
Select
.
Option
;
const
RangePicker
=
DatePicker
.
RangePicker
;
import
intl
from
"react-intl-universal"
;
class
TradingLogsFilter
extends
Component
{
constructor
(
props
)
{
super
(
props
)
this
.
state
=
{
tradingType
:
"1"
,
startTime
:
""
,
endTime
:
""
,
refreshFilter
:
""
}
}
//获取交易类型
handleTradingType
=
(
value
)
=>
{
this
.
setState
({
tradingType
:
value
,
});
}
handleGetDateRange
=
(
dates
,
dateStrings
)
=>
{
if
(
dates
.
length
==
0
)
{
this
.
setState
({
startTime
:
""
,
endTime
:
""
});
}
}
handleDateRangeOk
=
(
dates
)
=>
{
if
(
dates
.
length
>=
2
)
{
let
startTime
=
dates
[
0
].
valueOf
();
let
endTime
=
dates
[
1
].
valueOf
();
this
.
setState
({
startTime
,
endTime
});
}
}
searchByData
=
()
=>
{
this
.
props
.
advancedSearch
(
this
.
state
);
this
.
props
.
dropDownClose
();
}
resetSearch
=
()
=>
{
this
.
setState
({
tradingType
:
"1"
,
startTime
:
""
,
endTime
:
""
,
siteProtectStatus
:
"0"
,
refreshFilter
:
new
Date
().
getTime
()
});
this
.
props
.
advancedSearch
({
tradingType
:
"1"
,
startTime
:
""
,
endTime
:
""
,
siteProtectStatus
:
"0"
,
});
this
.
props
.
dropDownClose
();
}
render
()
{
const
formItemLayout
=
{
labelCol
:
{
xs
:
{
span
:
24
},
sm
:
{
span
:
5
},
},
wrapperCol
:
{
xs
:
{
span
:
24
},
sm
:
{
span
:
19
},
},
};
return
(
<
div
className=
{
styles
.
tradingLogsFilter
}
>
<
Form
{
...
formItemLayout
}
>
<
Form
.
Item
label=
{
intl
.
get
(
"exchangeConfigText28"
)
}
>
<
Select
style=
{
{
width
:
350
}
}
onChange=
{
this
.
handleTradingType
}
value=
{
this
.
state
.
tradingType
}
>
<
Option
value=
"1"
>
{
intl
.
get
(
"all"
)
}
</
Option
>
<
Option
value=
"100"
>
{
intl
.
get
(
"exchangeConfigText30"
)
}
</
Option
>
<
Option
value=
"200"
>
{
intl
.
get
(
"exchangeConfigText31"
)
}
</
Option
>
</
Select
>
</
Form
.
Item
>
<
Form
.
Item
label=
{
intl
.
get
(
"Time"
)
}
>
<
RangePicker
key=
{
this
.
state
.
refreshFilter
}
style=
{
{}
}
showTime=
{
{
format
:
'HH:mm'
}
}
format=
"YYYY-MM-DD HH:mm"
placeholder=
{
[
intl
.
get
(
"StartTime"
),
intl
.
get
(
"EndTime"
)]
}
onChange=
{
this
.
handleGetDateRange
}
onOk=
{
this
.
handleDateRangeOk
}
/>
</
Form
.
Item
>
</
Form
>
<
div
className=
{
styles
.
tradingLogsFilterBtns
}
>
<
Button
style=
{
{
marginRight
:
8
}
}
onClick=
{
this
.
resetSearch
}
>
{
intl
.
get
(
"SystemAdmin16"
)
}
</
Button
>
<
Button
type=
{
"primary"
}
onClick=
{
this
.
searchByData
}
>
{
intl
.
get
(
"Search"
)
}
</
Button
>
</
div
>
</
div
>
)
}
}
export
default
TradingLogsFilter
;
\ No newline at end of file
src/pages/SystemManagement/Point/redux/action.js
View file @
9fde9c77
...
@@ -3,6 +3,7 @@ import { message } from "antd";
...
@@ -3,6 +3,7 @@ import { message } from "antd";
//积分
//积分
export
const
POINT_SET
=
"POINT_SET"
;
export
const
POINT_SET
=
"POINT_SET"
;
export
const
POINT_TABLE
=
"POINT_TABLE"
;
export
const
POINT_TABLE
=
"POINT_TABLE"
;
export
const
POINT_EXCHANGE
=
"POINT_EXCHANGE"
;
export
const
POINT_DETAILED
=
"POINT_DETAILED"
;
export
const
POINT_DETAILED
=
"POINT_DETAILED"
;
// 兑换
// 兑换
...
@@ -17,13 +18,14 @@ const {
...
@@ -17,13 +18,14 @@ const {
postPointSetApi
,
postPointSetApi
,
exclApi
,
exclApi
,
postPointEditApi
,
postPointEditApi
,
getPointTableApi
,
//商品列表
postPointTableApi
,
postPointShelfApi
,
postPointShelfApi
,
postPointShelvesApi
,
postPointShelvesApi
,
postPointAddApi
,
postPointAddApi
,
postPointModifyApi
,
postPointModifyApi
,
getPointDetailedApi
,
getPointDetailedApi
,
point
Activity
DelApi
,
point
Product
DelApi
,
getExchangeSwitchApi
,
getExchangeSwitchApi
,
getExchangeRuleApi
,
getExchangeRuleApi
,
...
@@ -32,6 +34,9 @@ const {
...
@@ -32,6 +34,9 @@ const {
exportTradingLogsApi
,
exportTradingLogsApi
,
turnOnOrOffSwitchApi
,
turnOnOrOffSwitchApi
,
getCodeListApi
,
getCodeListApi
,
//兑换列表
postUserListApi
,
postPointExchangeApi
,
}
=
api
;
}
=
api
;
//积分通用设置
//积分通用设置
...
@@ -87,16 +92,15 @@ export function postPointEdit(data) {
...
@@ -87,16 +92,15 @@ export function postPointEdit(data) {
// Table
// Table
export
function
getPointTable
(
data
)
{
export
function
getPointTable
(
data
)
{
console
.
log
(
data
);
return
dispatch
=>
{
return
dispatch
=>
{
// return fetch(pointUrl+`/manage/activity/list`,{type:'GET',data:data})
// return fetch(pointUrl+`/manage/activity/list`,{type:'GET',data:data})
return
request
({
return
request
({
url
:
ge
tPointTableApi
,
url
:
pos
tPointTableApi
,
data
:
data
,
data
:
data
,
}).
then
(
res
=>
{
}).
then
(
res
=>
{
dispatch
({
dispatch
({
type
:
POINT_TABLE
,
type
:
POINT_TABLE
,
data
:
res
,
data
:
res
.
data
,
});
});
});
});
};
};
...
@@ -208,7 +212,7 @@ export function pointActivityDel(data, callback) {
...
@@ -208,7 +212,7 @@ export function pointActivityDel(data, callback) {
return
dispatch
=>
{
return
dispatch
=>
{
// return fetch(pointUrl+`/manage/point/details/list`,{type:'GET',data:data})
// return fetch(pointUrl+`/manage/point/details/list`,{type:'GET',data:data})
return
request
({
return
request
({
url
:
point
Activity
DelApi
,
url
:
point
Product
DelApi
,
data
:
data
,
data
:
data
,
}).
then
(
res
=>
{
}).
then
(
res
=>
{
callback
(
res
);
callback
(
res
);
...
@@ -363,3 +367,31 @@ export function getCodeList(data, callback) {
...
@@ -363,3 +367,31 @@ export function getCodeList(data, callback) {
});
});
};
};
}
}
// 获取积分列表
export
function
postUserList
(
data
,
callback
)
{
return
dispatch
=>
{
return
request
({
url
:
postUserListApi
,
data
:
data
,
}).
then
(
res
=>
{
dispatch
({
type
:
POINT_EXCHANGE
,
data
:
res
.
data
,
});
});
};
}
// 积分兑换
export
function
postPointExchange
(
data
,
callback
)
{
return
dispatch
=>
{
return
request
({
url
:
postPointExchangeApi
,
data
:
data
,
}).
then
(
res
=>
{
if
(
res
.
code
==
"1000"
)
{
message
.
success
(
"兑换成功"
);
}
});
};
}
\ No newline at end of file
src/pages/SystemManagement/Point/redux/api.js
View file @
9fde9c77
...
@@ -3,15 +3,31 @@ export default {
...
@@ -3,15 +3,31 @@ export default {
postPointSetApi
:
`GET
${
services
.
webManage
}
/point/strategy/view`
,
postPointSetApi
:
`GET
${
services
.
webManage
}
/point/strategy/view`
,
exclApi
:
`POST
${
services
.
webManage
}
/point/import`
,
exclApi
:
`POST
${
services
.
webManage
}
/point/import`
,
postPointEditApi
:
`POST
${
services
.
webManage
}
/point/strategy/update`
,
postPointEditApi
:
`POST
${
services
.
webManage
}
/point/strategy/update`
,
getPointTableApi
:
`GET
${
services
.
webManage
}
/activity/list`
,
postPointShelfApi
:
`POST
${
services
.
webManage
}
/activity/enabled`
,
postPointShelfApi
:
`POST
${
services
.
webManage
}
/activity/enabled`
,
postPointShelvesApi
:
`POST
${
services
.
webManage
}
/activity/disabled`
,
postPointShelvesApi
:
`POST
${
services
.
webManage
}
/activity/disabled`
,
postPointAddApi
:
`POST
${
services
.
webManage
}
/activity/insert`
,
// 商品列表
postPointModifyApi
:
`POST
${
services
.
webManage
}
/activity/update`
,
postPointTableApi
:
`POST
${
services
.
webManage
}
/point/product/list`
,
getPointDetailedApi
:
`GET
${
services
.
webManage
}
/point/details/list`
,
//新增商品
pointActivityDelApi
:
`POST
${
services
.
webManage
}
/activity/delete`
,
postPointAddApi
:
`POST
${
services
.
webManage
}
/point/product/insert`
,
//修改商品
postPointModifyApi
:
`POST
${
services
.
webManage
}
/point/product/update`
,
//删除商品
pointProductDelApi
:
`POST
${
services
.
webManage
}
/point/product/delete`
,
//上架
getPointDetailedApi
:
`POST
${
services
.
webManage
}
/point/product/enabled`
,
//下架
pointProductShelvesApi
:
`POST
${
services
.
webManage
}
/point/product/disabled`
,
//兑换管理
//兑换管理
//--积分列表
// /manage/point/user/list
// 入参:{"name":"xx", "pageNo":"1", "pageSize":10}
// --积分兑换
// /manage/point/user/exchange
// {"userId":1314, "point": 2}
postUserListApi
:
`POST
${
services
.
webManage
}
/point/user/list`
,
postPointExchangeApi
:
`POST
${
services
.
webManage
}
/point/user/exchange`
,
getExchangeSwitchApi
:
`GET
${
services
.
webMall
}
/student/token/config/switch`
,
getExchangeSwitchApi
:
`GET
${
services
.
webMall
}
/student/token/config/switch`
,
getExchangeRuleApi
:
`GET
${
services
.
webMall
}
/manage/tokenExchangeRule/get`
,
getExchangeRuleApi
:
`GET
${
services
.
webMall
}
/manage/tokenExchangeRule/get`
,
saveExchangeRuleApi
:
`POST
${
services
.
webMall
}
/manage/tokenExchangeRule/save`
,
saveExchangeRuleApi
:
`POST
${
services
.
webMall
}
/manage/tokenExchangeRule/save`
,
...
...
src/pages/SystemManagement/Point/redux/reducer.js
View file @
9fde9c77
...
@@ -9,6 +9,7 @@ const initialState = {
...
@@ -9,6 +9,7 @@ const initialState = {
set
:
null
,
set
:
null
,
table
:
null
,
table
:
null
,
detailed
:
null
,
detailed
:
null
,
exchangeList
:
null
,
codeList
:
[],
codeList
:
[],
exchangeSwitchStatusList
:
[],
exchangeSwitchStatusList
:
[],
exchangeRule
:
{},
exchangeRule
:
{},
...
@@ -33,6 +34,11 @@ function point(state = initialState, action) {
...
@@ -33,6 +34,11 @@ function point(state = initialState, action) {
return
Object
.
assign
({},
state
,
{
return
Object
.
assign
({},
state
,
{
table
:
action
.
data
,
table
:
action
.
data
,
});
});
//兑换列表
case
"POINT_EXCHANGE"
:
return
Object
.
assign
({},
state
,
{
exchangeList
:
action
.
data
,
});
//积分流水明细
//积分流水明细
case
"POINT_DETAILED"
:
case
"POINT_DETAILED"
:
return
Object
.
assign
({},
state
,
{
return
Object
.
assign
({},
state
,
{
...
...
src/pages/SystemManagement/index.js
View file @
9fde9c77
...
@@ -172,22 +172,6 @@ const ActiveOption = Loadable({
...
@@ -172,22 +172,6 @@ const ActiveOption = Loadable({
),
),
loading
:
SpinLoading
,
loading
:
SpinLoading
,
});
});
//积分兑换设置
const
ExchangeForOption
=
Loadable
({
loader
:
()
=>
import
(
/* webpackChunkName: "ExchangeForOption" */
"@/pages/SystemManagement/Point/exchangeForOption/index"
),
loading
:
SpinLoading
,
});
//积分流水明细
const
Detailed
=
Loadable
({
loader
:
()
=>
import
(
/* webpackChunkName: "Detailed" */
"@/pages/SystemManagement/Point/Detailed"
),
loading
:
SpinLoading
,
});
// RulesEngine 规则引擎(推荐管理)
// RulesEngine 规则引擎(推荐管理)
const
RulesEngine
=
Loadable
({
const
RulesEngine
=
Loadable
({
loader
:
()
=>
loader
:
()
=>
...
@@ -358,11 +342,6 @@ class Online extends React.Component {
...
@@ -358,11 +342,6 @@ class Online extends React.Component {
path
=
{
`
${
this
.
props
.
match
.
url
}
/message-management`
}
path
=
{
`
${
this
.
props
.
match
.
url
}
/message-management`
}
component
=
{()
=>
<
Message
/>
}
component
=
{()
=>
<
Message
/>
}
/
>
/
>
<
Route
path
=
{
`
${
this
.
props
.
match
.
url
}
/underline/underlineclass`
}
component
=
{()
=>
<
div
>
积分管理
<
/div>
}
/>
<
Route
<
Route
path
=
{
`
${
this
.
props
.
match
.
url
}
/system/sensitiveWords`
}
path
=
{
`
${
this
.
props
.
match
.
url
}
/system/sensitiveWords`
}
component
=
{()
=>
<
SensitiveWords
/>
}
component
=
{()
=>
<
SensitiveWords
/>
}
...
@@ -410,16 +389,6 @@ class Online extends React.Component {
...
@@ -410,16 +389,6 @@ class Online extends React.Component {
path
=
{
`
${
this
.
props
.
match
.
url
}
/point/active-option`
}
path
=
{
`
${
this
.
props
.
match
.
url
}
/point/active-option`
}
component
=
{()
=>
<
ActiveOption
/>
}
component
=
{()
=>
<
ActiveOption
/>
}
/
>
/
>
{
/*积分兑换设置*/
}
<
Route
path
=
{
`
${
this
.
props
.
match
.
url
}
/point/exchange-for-option`
}
component
=
{()
=>
<
ExchangeForOption
/>
}
/
>
{
/*积分流水明细*/
}
<
Route
path
=
{
`
${
this
.
props
.
match
.
url
}
/point/Detailed-option`
}
component
=
{()
=>
<
Detailed
props
=
{
this
.
props
}
/>
}
/>
{
/*规则引擎(推荐管理)*/
}
{
/*规则引擎(推荐管理)*/
}
<
Route
<
Route
path
=
{
`
${
this
.
props
.
match
.
url
}
/rules-engine-management`
}
path
=
{
`
${
this
.
props
.
match
.
url
}
/rules-engine-management`
}
...
...
src/pages/TrainingTools/Question/Create/Base.jsx
View file @
9fde9c77
...
@@ -377,7 +377,7 @@ class Base extends Component {
...
@@ -377,7 +377,7 @@ class Base extends Component {
style=
{
{
display
:
"inline-block"
}
}
style=
{
{
display
:
"inline-block"
}
}
/>
/>
)
}
)
}
{
this
.
props
.
iscopy
==
true
?
null
:
(
{
/* {
this.props.iscopy == true ? null : (
<Button
<Button
type="primary"
type="primary"
onClick={this.showModal}
onClick={this.showModal}
...
@@ -386,7 +386,7 @@ class Base extends Component {
...
@@ -386,7 +386,7 @@ class Base extends Component {
>
>
复制问卷
复制问卷
</Button>
</Button>
)
}
)}
*/
}
</
FormItem
>
</
FormItem
>
<
FormItem
{
...
formItemLayout
}
label=
"业务类型:"
>
<
FormItem
{
...
formItemLayout
}
label=
"业务类型:"
>
{
getFieldDecorator
(
"bizType"
,
{
{
getFieldDecorator
(
"bizType"
,
{
...
...
src/services/serve.js
View file @
9fde9c77
// let baseUrl = API_CONFIG.BASE_URL;
// let baseUrl = API_CONFIG.BASE_URL;
const
{
IP
}
=
require
(
"../../build/Ip"
);
const
{
IP
}
=
require
(
"../../build/Ip"
);
let
baseUrl
=
"http://10.10.12.94:8090"
;
let
baseUrl
=
IP
;
// let baseUrl = "";
if
(
location
.
host
.
includes
(
"localhost"
))
{
// baseUrl = IP + '/admin';
baseUrl
=
"https://hqjddj.shanghaiairport.com"
;
// baseUrl = "http://192.168.1.107:8090"; //lang
// baseUrl = "https://192.168.1.106:8090";
}
const
service
=
{
const
service
=
{
webManage
:
`
${
baseUrl
}
/web-manage/manage`
,
webManage
:
`
${
baseUrl
}
/web-manage/manage`
,
webMall
:
`
${
baseUrl
}
/mall`
,
webMall
:
`
${
baseUrl
}
/mall`
,
...
...
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