Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
J
jinfa-admin
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
shenshaokai
jinfa-admin
Commits
8a2ca2a8
Commit
8a2ca2a8
authored
Dec 01, 2020
by
前端-钟卫鹏
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'dev' of
http://10.0.0.22:3000/lingxi/lingxi-business-system
into dev
parents
817dc831
25ddf9c3
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
48 additions
and
59 deletions
+48
-59
index.tsx
src/pages/home/index.tsx
+1
-1
index.tsx
src/pages/message/index.tsx
+3
-1
index.tsx
...ingsPanel/propsSettings/components/BrandSetting/index.tsx
+10
-14
index.tsx
...ingsPanel/propsSettings/components/GoodsSetting/index.tsx
+23
-26
index.tsx
...tingsPanel/propsSettings/components/ShopSetting/index.tsx
+10
-14
detail.tsx
src/pages/ruleSettingManage/payStrategy/detail.tsx
+1
-3
No files found.
src/pages/home/index.tsx
View file @
8a2ca2a8
...
...
@@ -14,7 +14,7 @@ import sideIcon from '../../asserts/home-icon-28.png'
import
{
ImemberData
,
IorderData
,
ItodayAdd
}
from
'./common/interface'
;
import
{
useInViewport
}
from
'@umijs/hooks'
;
const
PROCESS_STATUS
=
[
"default"
,
"warning"
,
"warning"
,
"processing"
]
const
PROCESS_STATUS
=
[
"default"
,
"warning"
,
"warning"
,
"processing"
]
;
const
Home
:
React
.
FC
<
{}
>
=
()
=>
{
const
[
memberData
,
setMemberData
]
=
useState
<
ImemberData
|
{}
>
({});
...
...
src/pages/message/index.tsx
View file @
8a2ca2a8
...
...
@@ -37,7 +37,9 @@ const Message: React.FC<{}> = () => {
}
}
const
handlePaginationChange
=
(
page
,
pageSize
)
=>
{
const
handlePaginationChange
=
(
page
:
number
,
pageSize
:
number
|
undefined
)
=>
{
//@ts-ignore
setPagation
((
state
)
=>
({...
state
,
current
:
page
,
pageSize
:
pageSize
}))
getList
({
page
,
pageSize
})
.
then
((
data
)
=>
{
setDataSource
(
data
);
...
...
src/pages/pageCustomized/settingsPanel/propsSettings/components/BrandSetting/index.tsx
View file @
8a2ca2a8
...
...
@@ -42,10 +42,10 @@ const BrandSetting: React.FC<ShopSettingPropsType> = (props) => {
useEffect
(()
=>
{
fetchBrandsList
()
},
[
filterParam
])
},
[
filterParam
,
current
,
pageSize
])
const
fetchBrandsList
=
()
=>
{
let
param
=
{
let
param
:
any
=
{
type
:
0
,
templateId
:
templateid
,
categoryId
:
categoryid
,
...
...
@@ -55,7 +55,7 @@ const BrandSetting: React.FC<ShopSettingPropsType> = (props) => {
if
(
filterParam
)
{
param
=
Object
.
assign
(
param
,
filterParam
)
}
//@ts-ignore
PublicApi
.
getTemplatePlatformFindBrandList
(
param
).
then
((
res
:
any
)
=>
{
if
(
res
.
code
===
1000
)
{
const
dataInfo
=
res
.
data
...
...
@@ -86,13 +86,9 @@ const BrandSetting: React.FC<ShopSettingPropsType> = (props) => {
setPageSize
(
pageSize
||
10
)
}
useEffect
(()
=>
{
fetchBrandsList
()
},
[
current
,
pageSize
])
const
handleSearch
=
()
=>
{
setCurrent
(
1
)
le
t
param
=
filterProps
(
form
.
getFieldsValue
())
cons
t
param
=
filterProps
(
form
.
getFieldsValue
())
setFilterParam
(
param
)
}
...
...
@@ -115,7 +111,7 @@ const BrandSetting: React.FC<ShopSettingPropsType> = (props) => {
// if (selectBrandList.length <= 0) {
// message.error("请选择要推荐的品牌")
// return
// } else
// } else
if
(
selectBrandList
.
length
>
6
)
{
message
.
error
(
"最多推荐6个品牌"
)
return
...
...
@@ -138,13 +134,13 @@ const BrandSetting: React.FC<ShopSettingPropsType> = (props) => {
const
saveBrand
=
()
=>
{
return
new
Promise
((
resolve
,
reject
)
=>
{
le
t
param
:
any
=
{
cons
t
param
:
any
=
{
templateId
:
templateid
,
categoryId
:
categoryid
,
}
le
t
ids
:
number
[]
=
[]
cons
t
ids
:
number
[]
=
[]
for
(
le
t
item
of
selectBrandList
)
{
for
(
cons
t
item
of
selectBrandList
)
{
ids
.
push
(
item
.
brandId
)
}
param
.
brandIds
=
ids
...
...
@@ -160,8 +156,8 @@ const BrandSetting: React.FC<ShopSettingPropsType> = (props) => {
const
handleChangeOprationType
=
(
type
:
string
)
=>
{
setOprationType
(
type
)
le
t
keys
:
number
[]
=
[]
for
(
le
t
item
of
selectBrandList
)
{
cons
t
keys
:
number
[]
=
[]
for
(
cons
t
item
of
selectBrandList
)
{
keys
.
push
(
item
.
brandId
)
}
setBrandIds
(
keys
)
...
...
src/pages/pageCustomized/settingsPanel/propsSettings/components/GoodsSetting/index.tsx
View file @
8a2ca2a8
...
...
@@ -32,7 +32,7 @@ const GoodsSetting: React.FC<GoodsSettingPropsType> = (props) => {
const
[
form
]
=
Form
.
useForm
()
const
[
confirmLoading
,
setConfirmLoading
]
=
useState
<
boolean
>
(
false
)
const
[
operationType
,
setOprationType
]
=
useState
<
string
>
(
OPERATION_TYPE
.
list
)
// 操作类型:list:显示已选列表;select:选择列表
le
t
[
isHighSearch
,
setIsHighSearch
]
=
useState
(
false
)
cons
t
[
isHighSearch
,
setIsHighSearch
]
=
useState
(
false
)
const
{
templateid
,
categoryid
,
goodsList
=
[]
}
=
props
const
[
current
,
setCurrent
]
=
useState
<
number
>
(
1
)
const
[
pageSize
,
setPageSize
]
=
useState
<
number
>
(
10
)
...
...
@@ -60,24 +60,24 @@ const GoodsSetting: React.FC<GoodsSettingPropsType> = (props) => {
useEffect
(()
=>
{
fetchGoodsList
()
},
[
filterParam
])
},
[
filterParam
,
current
,
pageSize
])
const
fetchCategoryList
=
()
=>
{
let
param
=
{
const
param
:
any
=
{
categoryId
:
categoryid
,
templateId
:
templateid
}
setSpinLoading
(
true
)
//@ts-ignore
PublicApi
.
getTemplatePlatformFindCategoryList
(
param
).
then
(
res
=>
{
const
data
=
res
.
data
setCategoryResponseList
(
data
.
categoryBOList
||
[])
setSpinLoading
(
false
)
if
(
res
.
code
===
1000
)
{
const
data
=
res
.
data
setCategoryResponseList
(
data
.
categoryBOList
||
[])
}
})
}
const
fetchBrandsList
=
()
=>
{
let
param
=
{
const
param
:
any
=
{
type
:
0
,
templateId
:
templateid
,
categoryId
:
categoryid
,
...
...
@@ -85,7 +85,6 @@ const GoodsSetting: React.FC<GoodsSettingPropsType> = (props) => {
pageSize
:
100
}
//@ts-ignore
PublicApi
.
getTemplatePlatformFindBrandList
(
param
).
then
((
res
:
any
)
=>
{
if
(
res
.
code
===
1000
)
{
const
dataInfo
=
res
.
data
...
...
@@ -95,7 +94,7 @@ const GoodsSetting: React.FC<GoodsSettingPropsType> = (props) => {
}
const
fetchGoodsList
=
()
=>
{
let
param
=
{
let
param
:
any
=
{
type
:
0
,
templateId
:
templateid
,
categoryId
:
categoryid
,
...
...
@@ -103,17 +102,18 @@ const GoodsSetting: React.FC<GoodsSettingPropsType> = (props) => {
pageSize
}
if
(
filterParam
)
{
param
=
Object
.
assign
(
param
,
filterParam
)
console
.
log
(
filterParam
,
param
)
}
//@ts-ignore
setSpinLoading
(
true
)
PublicApi
.
getTemplatePlatformFindGoodsList
(
param
).
then
((
res
:
any
)
=>
{
if
(
res
.
code
===
1000
)
{
const
dataInfo
=
res
.
data
setTotalCount
(
dataInfo
.
totalCount
)
setNoSelectGoods
(
dataInfo
.
data
||
[])
}
setSpinLoading
(
false
)
})
}
...
...
@@ -145,14 +145,11 @@ const GoodsSetting: React.FC<GoodsSettingPropsType> = (props) => {
}
useEffect
(()
=>
{
fetchGoodsList
()
},
[
current
,
pageSize
])
const
handleSearch
=
()
=>
{
setCurrent
(
1
)
console
.
log
(
form
.
getFieldsValue
())
le
t
param
=
filterProps
(
form
.
getFieldsValue
())
cons
t
param
=
filterProps
(
form
.
getFieldsValue
())
setFilterParam
(
param
)
}
...
...
@@ -175,7 +172,7 @@ const GoodsSetting: React.FC<GoodsSettingPropsType> = (props) => {
// if (selectGoodsList.length <= 0) {
// message.error("请选择要推荐的商品")
// return
// } else
// } else
if
(
selectGoodsList
.
length
>
10
)
{
message
.
error
(
"最多推荐10件商品"
)
return
...
...
@@ -223,13 +220,13 @@ const GoodsSetting: React.FC<GoodsSettingPropsType> = (props) => {
const
saveGoods
=
()
=>
{
return
new
Promise
((
resolve
,
reject
)
=>
{
le
t
param
:
any
=
{
cons
t
param
:
any
=
{
templateId
:
templateid
,
categoryId
:
categoryid
,
}
le
t
ids
:
number
[]
=
[]
cons
t
ids
:
number
[]
=
[]
for
(
le
t
item
of
selectGoodsList
)
{
for
(
cons
t
item
of
selectGoodsList
)
{
ids
.
push
(
item
.
goodsId
)
}
param
.
goodsIds
=
ids
...
...
@@ -245,8 +242,8 @@ const GoodsSetting: React.FC<GoodsSettingPropsType> = (props) => {
const
handleChangeOprationType
=
(
type
:
string
)
=>
{
setOprationType
(
type
)
le
t
keys
:
number
[]
=
[]
for
(
le
t
item
of
selectGoodsList
)
{
cons
t
keys
:
number
[]
=
[]
for
(
cons
t
item
of
selectGoodsList
)
{
keys
.
push
(
item
.
goodsId
)
}
setGoodsIds
(
keys
)
...
...
@@ -301,7 +298,7 @@ const GoodsSetting: React.FC<GoodsSettingPropsType> = (props) => {
</
Col
>
<
Col
>
<
Button
onClick=
{
()
=>
setIsHighSearch
(
isHighSearch
=
!
isHighSearch
)
}
>
高级筛选
{
isHighSearch
?
<
CaretUpOutlined
/>
:
<
CaretDownOutlined
/>
}
</
Button
>
<
Button
onClick=
{
()
=>
setIsHighSearch
(
!
isHighSearch
)
}
>
高级筛选
{
isHighSearch
?
<
CaretUpOutlined
/>
:
<
CaretDownOutlined
/>
}
</
Button
>
</
Col
>
<
Col
>
<
Button
onClick=
{
()
=>
handleReset
()
}
>
重置
</
Button
>
...
...
@@ -331,7 +328,7 @@ const GoodsSetting: React.FC<GoodsSettingPropsType> = (props) => {
>
<
Select
placeholder=
"品类"
style=
{
{
width
:
180
}
}
onChange=
{
handleSearch
}
>
{
categoryResponseList
.
map
((
item
,
index
)
=>
<
Select
.
Option
k
ye
=
{
`select_category_item_${index}`
}
value=
{
item
.
categoryId
}
>
{
item
.
categoryName
}
</
Select
.
Option
>)
categoryResponseList
.
map
((
item
,
index
)
=>
<
Select
.
Option
k
ey
=
{
`select_category_item_${index}`
}
value=
{
item
.
categoryId
}
>
{
item
.
categoryName
}
</
Select
.
Option
>)
}
</
Select
>
</
Form
.
Item
>
...
...
@@ -343,7 +340,7 @@ const GoodsSetting: React.FC<GoodsSettingPropsType> = (props) => {
>
<
Select
placeholder=
"品牌"
style=
{
{
width
:
180
}
}
onChange=
{
handleSearch
}
>
{
noSelectBrands
.
map
((
item
,
index
)
=>
(<
Select
.
Option
k
ye
=
{
`select_brand_item_${index}`
}
value=
{
item
.
brandId
}
>
{
item
.
brandName
}
</
Select
.
Option
>))
noSelectBrands
.
map
((
item
,
index
)
=>
(<
Select
.
Option
k
ey
=
{
`select_brand_item_${index}`
}
value=
{
item
.
brandId
}
>
{
item
.
brandName
}
</
Select
.
Option
>))
}
</
Select
>
...
...
src/pages/pageCustomized/settingsPanel/propsSettings/components/ShopSetting/index.tsx
View file @
8a2ca2a8
...
...
@@ -42,10 +42,10 @@ const ShopSetting: React.FC<ShopSettingPropsType> = (props) => {
useEffect
(()
=>
{
fetchShopsList
()
},
[
filterParam
])
},
[
filterParam
,
current
,
pageSize
])
const
fetchShopsList
=
()
=>
{
let
param
=
{
let
param
:
any
=
{
type
:
0
,
templateId
:
templateid
,
categoryId
:
categoryid
,
...
...
@@ -55,7 +55,7 @@ const ShopSetting: React.FC<ShopSettingPropsType> = (props) => {
if
(
filterParam
)
{
param
=
Object
.
assign
(
param
,
filterParam
)
}
//@ts-ignore
PublicApi
.
getTemplatePlatformFindShopList
(
param
).
then
((
res
:
any
)
=>
{
if
(
res
.
code
===
1000
)
{
const
dataInfo
=
res
.
data
...
...
@@ -86,13 +86,9 @@ const ShopSetting: React.FC<ShopSettingPropsType> = (props) => {
setPageSize
(
pageSize
||
10
)
}
useEffect
(()
=>
{
fetchShopsList
()
},
[
current
,
pageSize
])
const
handleSearch
=
()
=>
{
setCurrent
(
1
)
le
t
param
=
filterProps
(
form
.
getFieldsValue
())
cons
t
param
=
filterProps
(
form
.
getFieldsValue
())
setFilterParam
(
param
)
}
...
...
@@ -116,7 +112,7 @@ const ShopSetting: React.FC<ShopSettingPropsType> = (props) => {
// if (selectShopsList.length <= 0) {
// message.error("请选择要推荐的店铺")
// return
// } else
// } else
if
(
selectShopsList
.
length
>
5
)
{
message
.
error
(
"最多推荐5个店铺"
)
return
...
...
@@ -154,13 +150,13 @@ const ShopSetting: React.FC<ShopSettingPropsType> = (props) => {
const
saveShop
=
()
=>
{
return
new
Promise
((
resolve
,
reject
)
=>
{
le
t
param
:
any
=
{
cons
t
param
:
any
=
{
templateId
:
templateid
,
categoryId
:
categoryid
,
}
le
t
ids
:
number
[]
=
[]
cons
t
ids
:
number
[]
=
[]
for
(
le
t
item
of
selectShopsList
)
{
for
(
cons
t
item
of
selectShopsList
)
{
ids
.
push
(
item
.
shopId
)
}
param
.
shopIds
=
ids
...
...
@@ -176,8 +172,8 @@ const ShopSetting: React.FC<ShopSettingPropsType> = (props) => {
const
handleChangeOprationType
=
(
type
:
string
)
=>
{
setOprationType
(
type
)
le
t
keys
:
number
[]
=
[]
for
(
le
t
item
of
selectShopsList
)
{
cons
t
keys
:
number
[]
=
[]
for
(
cons
t
item
of
selectShopsList
)
{
keys
.
push
(
item
.
shopId
)
}
setShopsIds
(
keys
)
...
...
src/pages/ruleSettingManage/payStrategy/detail.tsx
View file @
8a2ca2a8
...
...
@@ -428,9 +428,7 @@ const PaySetting: React.FC<{}> = () => {
if
(
params
.
memberIdRoleIds
.
length
===
0
&&
values
.
isSelected
===
0
)
{
message
.
error
(
'请选择指定的会员'
);
return
}
else
{
delete
params
.
memberIdRoleIds
}
}
if
(
!
usePageStatus
().
id
)
{
console
.
log
(
'params'
,
params
)
PublicApi
.
postPayPayMemberTacticsAdd
({
...
params
}).
then
(
res
=>
{
...
...
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