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
74e9ec7b
Commit
74e9ec7b
authored
Oct 20, 2020
by
GuanHua
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat:搜索商品列表接口修改
parent
115fcb15
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
80 additions
and
28 deletions
+80
-28
index.tsx
src/pages/afterService/components/InfoList/index.tsx
+3
-3
index.tsx
...eGoods/waitSubmitOrderList/components/basicInfo/index.tsx
+4
-3
index.tsx
...eGoods/waitSubmitOrderList/components/proofFile/index.tsx
+1
-1
index.less
.../waitSubmitOrderList/components/replaceAddress/index.less
+0
-0
index.tsx
...s/waitSubmitOrderList/components/replaceAddress/index.tsx
+28
-0
index.tsx
...ds/waitSubmitOrderList/components/returnAddress/index.tsx
+3
-3
detail.tsx
...afterService/exchangeGoods/waitSubmitOrderList/detail.tsx
+33
-11
search.tsx
src/pages/lxMall/commodity/search.tsx
+8
-7
No files found.
src/pages/afterService/components/InfoList/index.tsx
View file @
74e9ec7b
...
...
@@ -10,16 +10,16 @@ interface dataListType {
}
interface
InfoListProps
{
data
:
dataListType
[]
options
:
dataListType
[]
}
const
InfoList
:
React
.
FC
<
InfoListProps
>
=
(
props
)
=>
{
const
{
data
=
[]
}
=
props
const
{
options
=
[]
}
=
props
return
(
<
div
className=
{
styles
.
info_list
}
>
{
data
&&
data
.
map
((
item
,
index
)
=>
(
options
&&
options
.
map
((
item
,
index
)
=>
(
<
div
className=
{
styles
.
info_list_line
}
key=
{
`info_list_line_${index}`
}
>
<
div
className=
{
cx
(
styles
.
info_list_line_label
,
item
.
labelClassName
?
item
.
labelClassName
:
""
)
}
>
{
item
.
label
}{
item
.
required
&&
<
i
className=
{
styles
.
required
}
>
*
</
i
>
}
</
div
>
<
div
className=
{
styles
.
info_list_line_value
}
>
{
item
.
value
}
</
div
>
...
...
src/pages/afterService/exchangeGoods/waitSubmitOrderList/components/basicInfo/index.tsx
View file @
74e9ec7b
import
React
from
'react'
import
{
Input
}
from
'antd'
import
{
FormInstance
}
from
'antd/lib/form'
import
InfoList
from
'../../../../components/InfoList'
interface
BasicInfoProps
{
form
:
FormInstance
}
const
BasicInfo
:
React
.
FC
<
BasicInfoProps
>
=
(
props
)
=>
{
const
{
form
}
=
props
let
detailList
=
[
{
label
:
'申请单摘要'
,
...
...
@@ -38,7 +39,7 @@ const BasicInfo: React.FC<BasicInfoProps> = (props) => {
return
(
<
div
>
<
InfoList
data
=
{
detailList
}
/>
<
InfoList
options
=
{
detailList
}
/>
</
div
>
)
}
...
...
src/pages/afterService/exchangeGoods/waitSubmitOrderList/components/proofFile/index.tsx
View file @
74e9ec7b
...
...
@@ -128,7 +128,7 @@ const ProofFile: React.FC<ProofFilePropsType> = (props) => {
return
(
<
div
>
<
InfoList
data
=
{
detailList
}
/>
<
InfoList
options
=
{
detailList
}
/>
</
div
>
)
}
...
...
src/pages/afterService/exchangeGoods/waitSubmitOrderList/components/replaceAddress/index.less
0 → 100644
View file @
74e9ec7b
src/pages/afterService/exchangeGoods/waitSubmitOrderList/components/replaceAddress/index.tsx
0 → 100644
View file @
74e9ec7b
import
React
from
'react'
import
InfoList
from
'../../../../components/InfoList'
import
styles
from
'./index.less'
interface
ReplaceAddressPropsType
{
}
const
ReplaceAddress
:
React
.
FC
<
ReplaceAddressPropsType
>
=
(
props
)
=>
{
let
detailList
=
[
{
label
:
'换货收货地址'
,
labelClassName
:
styles
.
flexStart
,
value
:
<>
133
</>,
},
]
return
(
<
div
>
<
InfoList
options=
{
detailList
}
/>
</
div
>
)
}
export
default
ReplaceAddress
src/pages/afterService/exchangeGoods/waitSubmitOrderList/components/
a
ddress/index.tsx
→
src/pages/afterService/exchangeGoods/waitSubmitOrderList/components/
returnA
ddress/index.tsx
View file @
74e9ec7b
import
React
from
'react'
interface
AddressPropsType
{
interface
Return
AddressPropsType
{
}
const
Address
:
React
.
FC
<
AddressPropsType
>
=
(
props
)
=>
{
const
ReturnAddress
:
React
.
FC
<
Return
AddressPropsType
>
=
(
props
)
=>
{
return
(
<
div
>
...
...
@@ -13,4 +13,4 @@ const Address: React.FC<AddressPropsType> = (props) => {
)
}
export
default
Address
export
default
Return
Address
src/pages/afterService/exchangeGoods/waitSubmitOrderList/detail.tsx
View file @
74e9ec7b
import
React
,
{
useState
}
from
'react'
import
React
,
{
useState
,
useEffect
}
from
'react'
import
{
SaveOutlined
}
from
'@ant-design/icons'
import
{
PageHeaderWrapper
}
from
'@ant-design/pro-layout'
import
{
history
,
Helmet
}
from
'umi'
import
{
Button
,
Tabs
}
from
'antd'
import
{
Button
,
Tabs
,
Form
}
from
'antd'
import
ReutrnEle
from
'@/components/ReturnEle'
import
BasicInfo
from
'./components/basicInfo'
import
ExchangeGoods
from
'./components/exchangeGoods'
import
ProofFile
from
'./components/proofFile'
import
Log
from
'./components/log'
import
Address
from
'./components/address'
import
ReplaceAddress
from
'./components/replaceAddress'
import
ReturnAddress
from
'./components/returnAddress'
import
styles
from
'./detail.less'
interface
OrderDetailProps
{
...
...
@@ -19,8 +20,21 @@ interface OrderDetailProps {
const
{
TabPane
}
=
Tabs
const
OrderDetail
:
React
.
FC
<
OrderDetailProps
>
=
(
props
)
=>
{
const
{
type
}
=
props
.
match
.
params
const
{
location
}
=
props
const
[
form
]
=
Form
.
useForm
()
const
[
type
,
setType
]
=
useState
<
'add'
|
'edit'
|
'detail'
>
()
const
[
btnLoading
,
setBtnLoading
]
=
useState
<
boolean
>
(
false
)
const
[
tabActiveKey
,
setTabActiveKey
]
=
useState
<
string
>
(
'replaceAddress'
)
useEffect
(()
=>
{
getPathNameType
(
location
.
pathname
)
},
[])
const
getPathNameType
=
(
pathname
)
=>
{
let
typeArr
=
pathname
.
split
(
'/'
)
let
result
=
typeArr
[
typeArr
.
length
-
1
]
setType
(
result
)
}
const
getPageTitle
=
()
=>
{
switch
(
type
)
{
...
...
@@ -35,6 +49,11 @@ const OrderDetail: React.FC<OrderDetailProps> = (props) => {
}
}
const
handleSave
=
()
=>
{
}
return
(
<>
<
Helmet
>
...
...
@@ -44,16 +63,16 @@ const OrderDetail: React.FC<OrderDetailProps> = (props) => {
onBack=
{
()
=>
history
.
goBack
()
}
backIcon=
{
<
ReutrnEle
description=
"返回"
/>
}
title=
{
getPageTitle
()
}
extra=
{
[
<
Button
key=
"1"
onClick=
{
()
=>
{
}
}
loading=
{
btnLoading
}
type=
"primary"
icon=
{
<
SaveOutlined
/>
}
>
extra=
{
type
!==
'detail'
?
[
<
Button
key=
"1"
onClick=
{
()
=>
handleSave
()
}
loading=
{
btnLoading
}
type=
"primary"
icon=
{
<
SaveOutlined
/>
}
>
保存
</
Button
>,
]
}
]
:
[]
}
>
<
div
className=
{
styles
.
detail_wrap
}
>
<
Tabs
type=
"card"
defaultActiveKey=
"proofFile"
className=
{
styles
.
detail_tabs
}
>
<
Tabs
type=
"card"
activeKey=
{
tabActiveKey
}
onChange=
{
(
key
)
=>
setTabActiveKey
(
key
)
}
className=
{
styles
.
detail_tabs
}
>
<
TabPane
tab=
"基本信息"
key=
"basicInfo"
>
<
BasicInfo
/>
<
BasicInfo
form=
{
form
}
/>
</
TabPane
>
<
TabPane
tab=
"换货商品"
key=
"exchangeGoods"
>
<
ExchangeGoods
/>
...
...
@@ -61,8 +80,11 @@ const OrderDetail: React.FC<OrderDetailProps> = (props) => {
<
TabPane
tab=
"举证附件"
key=
"proofFile"
>
<
ProofFile
/>
</
TabPane
>
<
TabPane
tab=
"换货收货地址"
key=
"address"
>
<
Address
/>
<
TabPane
tab=
"退货收货地址"
key=
"returnAddress"
>
<
ReturnAddress
/>
</
TabPane
>
<
TabPane
tab=
"换货收货地址"
key=
"replaceAddress"
>
<
ReplaceAddress
/>
</
TabPane
>
<
TabPane
tab=
"流转记录"
key=
"log"
>
<
Log
/>
...
...
src/pages/lxMall/commodity/search.tsx
View file @
74e9ec7b
...
...
@@ -4,7 +4,7 @@ import Filter from '../components/Filter'
import
{
FILTER_TYPE
}
from
'@/constants'
import
cx
from
'classnames'
import
{
history
}
from
'umi'
import
{
Pagination
}
from
'antd'
import
{
Pagination
,
message
}
from
'antd'
import
CommodityList
from
'./list'
import
SearchNoResult
from
'../components/SearchNoResult'
import
isEmpty
from
'lodash/isEmpty'
...
...
@@ -13,7 +13,7 @@ import { store } from '@/store'
import
{
PublicApi
}
from
'@/services/api'
import
{
LAYOUT_TYPE
}
from
'@/constants'
import
{
useLocalStore
,
observer
}
from
'mobx-react'
import
{
Ge
tSearchShopEnterpriseGetCommodityListResponseDetail
}
from
'@/services/SearchApi'
import
{
Pos
tSearchShopEnterpriseGetCommodityListResponseDetail
}
from
'@/services/SearchApi'
import
arrowDownIcon
from
'@/assets/imgs/arrow_down.png'
import
arrowDownActiveIcon
from
'@/assets/imgs/arrow_down_active.png'
import
styles
from
'./index.less'
...
...
@@ -52,7 +52,7 @@ const CommoditySearch: React.FC<CommodityPropsType> = (props) => {
const
{
query
:
{
search
=
""
}
}
=
props
.
location
const
[
loading
,
setLoading
]
=
useState
<
boolean
>
(
true
)
const
[
showType
,
setShowType
]
=
useState
<
number
>
(
1
)
// 展示方式:1:矩阵排列; 2:列表排列
const
[
commodityList
,
setCommodityList
]
=
useState
<
Ge
tSearchShopEnterpriseGetCommodityListResponseDetail
[]
>
([])
const
[
commodityList
,
setCommodityList
]
=
useState
<
Pos
tSearchShopEnterpriseGetCommodityListResponseDetail
[]
>
([])
const
[
current
,
setCurrent
]
=
useState
<
number
>
(
1
)
const
[
pageSize
,
setPageSize
]
=
useState
<
number
>
(
20
)
const
[
totalCount
,
setTotalCount
]
=
useState
<
number
>
(
0
)
...
...
@@ -98,19 +98,19 @@ const CommoditySearch: React.FC<CommodityPropsType> = (props) => {
let
getFn
;
switch
(
layoutType
)
{
case
LAYOUT_TYPE
.
mall
:
getFn
=
PublicApi
.
ge
tSearchShopEnterpriseGetCommodityList
getFn
=
PublicApi
.
pos
tSearchShopEnterpriseGetCommodityList
break
case
LAYOUT_TYPE
.
shop
:
param
.
storeId
=
shopId
getFn
=
PublicApi
.
ge
tSearchShopStoreGetCommodityList
getFn
=
PublicApi
.
pos
tSearchShopStoreGetCommodityList
break
case
LAYOUT_TYPE
.
channel
:
param
.
channelMemberId
=
memberId
getFn
=
PublicApi
.
ge
tSearchShopChannelGetCommodityList
getFn
=
PublicApi
.
pos
tSearchShopChannelGetCommodityList
break
case
LAYOUT_TYPE
.
ichannel
:
param
.
channelMemberId
=
memberId
getFn
=
PublicApi
.
ge
tSearchShopChannelGetCommodityList
getFn
=
PublicApi
.
pos
tSearchShopChannelGetCommodityList
break
}
...
...
@@ -118,6 +118,7 @@ const CommoditySearch: React.FC<CommodityPropsType> = (props) => {
getFn
&&
getFn
(
param
).
then
(
res
=>
{
setLoading
(
false
)
if
(
res
.
code
===
1000
)
{
message
.
destroy
()
setCommodityList
(
res
.
data
.
data
)
setTotalCount
(
res
.
data
.
totalCount
)
}
...
...
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