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
shenshaokai
jinfa-platform
Commits
d0b1a0dc
Commit
d0b1a0dc
authored
Oct 21, 2020
by
GuanHua
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat:在线求购接口对接
parent
ea3c15ff
Hide whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
130 additions
and
34 deletions
+130
-34
global.less
src/global/styles/global.less
+6
-4
index.tsx
src/pages/lxMall/commodityDetail/index.tsx
+5
-1
index.less
src/pages/lxMall/components/TopBar/index.less
+7
-0
index.less
src/pages/lxMall/pointsMall/index.less
+6
-0
list.tsx
src/pages/lxMall/pointsMall/list.tsx
+3
-3
index.less
src/pages/lxMall/purchaseOnline/index.less
+6
-0
index.tsx
src/pages/lxMall/purchaseOnline/index.tsx
+64
-9
list.less
src/pages/lxMall/purchaseOnline/list.less
+5
-0
list.tsx
src/pages/lxMall/purchaseOnline/list.tsx
+28
-17
No files found.
src/global/styles/global.less
View file @
d0b1a0dc
...
@@ -41,8 +41,8 @@ h6 {
...
@@ -41,8 +41,8 @@ h6 {
a {
a {
&:hover {
&:hover {
color: var(--mall_main_color)
!important
;
color: var(--mall_main_color);
}
}
}
}
.tb_bg {
.tb_bg {
...
@@ -319,8 +319,10 @@ a {
...
@@ -319,8 +319,10 @@ a {
// 重置Card样式
// 重置Card样式
.ant-card {
.ant-card {
border-radius: 8px !important;
border-radius: 8px !important;
.ant-card-head {
.ant-card-head {
border-bottom: none;
border-bottom: none;
.ant-card-head-title {
.ant-card-head-title {
// line-height: 24px;
// line-height: 24px;
// padding-bottom: 0;
// padding-bottom: 0;
...
@@ -329,5 +331,4 @@ a {
...
@@ -329,5 +331,4 @@ a {
color: #343031;
color: #343031;
}
}
}
}
}
}
\ No newline at end of file
src/pages/lxMall/commodityDetail/index.tsx
View file @
d0b1a0dc
...
@@ -478,6 +478,10 @@ const CommodityDetail = (props) => {
...
@@ -478,6 +478,10 @@ const CommodityDetail = (props) => {
}
}
const
handleInquiry
=
()
=>
{
window
.
location
.
href
=
`/memberCenter/tranactionAbility/goodsOffer/addEnquiryOrder/add?id=
${
id
}
&memberId=
${
memberId
}
`
}
/**
/**
* 根据条件渲染页面按钮
* 根据条件渲染页面按钮
*/
*/
...
@@ -496,7 +500,7 @@ const CommodityDetail = (props) => {
...
@@ -496,7 +500,7 @@ const CommodityDetail = (props) => {
<
Button
className=
{
cx
(
styles
.
product_info_btn_item
,
styles
.
buy
)
}
>
暂无库存
</
Button
>
<
Button
className=
{
cx
(
styles
.
product_info_btn_item
,
styles
.
buy
)
}
>
暂无库存
</
Button
>
)
)
case
COMMODITY_TYPE
.
inquiry
:
case
COMMODITY_TYPE
.
inquiry
:
return
<
div
className=
{
cx
(
styles
.
product_info_btn_item
,
styles
.
buy
)
}
>
立即询价
</
div
>
return
<
div
className=
{
cx
(
styles
.
product_info_btn_item
,
styles
.
buy
)
}
onClick=
{
()
=>
handleInquiry
()
}
>
立即询价
</
div
>
case
COMMODITY_TYPE
.
integral
:
case
COMMODITY_TYPE
.
integral
:
return
stockCount
>
0
?
<
div
className=
{
cx
(
styles
.
product_info_btn_item
,
styles
.
buy
)
}
onClick=
{
()
=>
handleToBuy
(
COMMODITY_TYPE
.
integral
)
}
>
立即兑换
</
div
>
:
<
Button
className=
{
cx
(
styles
.
product_info_btn_item
,
styles
.
buy
)
}
>
暂无库存
</
Button
>
return
stockCount
>
0
?
<
div
className=
{
cx
(
styles
.
product_info_btn_item
,
styles
.
buy
)
}
onClick=
{
()
=>
handleToBuy
(
COMMODITY_TYPE
.
integral
)
}
>
立即兑换
</
div
>
:
<
Button
className=
{
cx
(
styles
.
product_info_btn_item
,
styles
.
buy
)
}
>
暂无库存
</
Button
>
}
}
...
...
src/pages/lxMall/components/TopBar/index.less
View file @
d0b1a0dc
...
@@ -30,12 +30,19 @@
...
@@ -30,12 +30,19 @@
padding: 0 16px;
padding: 0 16px;
color: #303133;
color: #303133;
a {
&:hover {
color: var(--mall_main_color);
}
}
&.username {
&.username {
position: relative;
position: relative;
cursor: pointer;
cursor: pointer;
border-left: 1px solid #ffffff;
border-left: 1px solid #ffffff;
border-right: 1px solid #ffffff;
border-right: 1px solid #ffffff;
&:hover {
&:hover {
border-left: 1px solid #EEF0F3;
border-left: 1px solid #EEF0F3;
...
...
src/pages/lxMall/pointsMall/index.less
View file @
d0b1a0dc
...
@@ -179,6 +179,12 @@
...
@@ -179,6 +179,12 @@
background-color: var(--mall_main_color);
background-color: var(--mall_main_color);
border-color: var(--mall_main_color);
border-color: var(--mall_main_color);
&:hover {
&>a {
color: #ffffff !important;
}
}
&>a {
&>a {
color: #ffffff;
color: #ffffff;
}
}
...
...
src/pages/lxMall/pointsMall/list.tsx
View file @
d0b1a0dc
...
@@ -2,17 +2,17 @@ import React from 'react'
...
@@ -2,17 +2,17 @@ import React from 'react'
import
cx
from
'classnames'
import
cx
from
'classnames'
import
{
Skeleton
}
from
'antd'
import
{
Skeleton
}
from
'antd'
import
{
LAYOUT_TYPE
}
from
'@/constants'
import
{
LAYOUT_TYPE
}
from
'@/constants'
import
{
Ge
tSearchShopEnterpriseGetCommodityListResponseDetail
}
from
'@/services/SearchApi'
import
{
Pos
tSearchShopEnterpriseGetCommodityListResponseDetail
}
from
'@/services/SearchApi'
import
styles
from
'./list.less'
import
styles
from
'./list.less'
interface
CommodityListPropsType
{
interface
CommodityListPropsType
{
showType
:
number
;
showType
:
number
;
commodityList
:
Ge
tSearchShopEnterpriseGetCommodityListResponseDetail
[]
commodityList
:
Pos
tSearchShopEnterpriseGetCommodityListResponseDetail
[]
layoutType
:
LAYOUT_TYPE
layoutType
:
LAYOUT_TYPE
}
}
const
CommodityList
:
React
.
FC
<
CommodityListPropsType
>
=
(
props
)
=>
{
const
CommodityList
:
React
.
FC
<
CommodityListPropsType
>
=
(
props
)
=>
{
const
{
showType
,
commodityList
=
[],
layoutType
=
LAYOUT_TYPE
.
mall
}
=
props
const
{
commodityList
=
[],
layoutType
=
LAYOUT_TYPE
.
mall
}
=
props
const
getCommodityDetailUrl
=
(
item
)
=>
{
const
getCommodityDetailUrl
=
(
item
)
=>
{
switch
(
layoutType
)
{
switch
(
layoutType
)
{
...
...
src/pages/lxMall/purchaseOnline/index.less
View file @
d0b1a0dc
...
@@ -178,6 +178,12 @@
...
@@ -178,6 +178,12 @@
background-color: var(--mall_main_color);
background-color: var(--mall_main_color);
border-color: var(--mall_main_color);
border-color: var(--mall_main_color);
&:hover {
&>a {
color: #ffffff !important;
}
}
&>a {
&>a {
color: #ffffff;
color: #ffffff;
}
}
...
...
src/pages/lxMall/purchaseOnline/index.tsx
View file @
d0b1a0dc
import
React
,
{
useState
}
from
'react'
import
React
,
{
useState
,
useEffect
}
from
'react'
import
{
CaretUpOutlined
,
CaretDownOutlined
,
UnorderedListOutlined
,
AppstoreOutlined
,
CloseOutlined
}
from
'@ant-design/icons'
import
{
CaretUpOutlined
,
CaretDownOutlined
,
UnorderedListOutlined
,
AppstoreOutlined
,
CloseOutlined
}
from
'@ant-design/icons'
import
Filter
from
'../components/Filter'
import
Filter
from
'../components/Filter'
import
{
FILTER_TYPE
}
from
'@/constants'
import
{
FILTER_TYPE
}
from
'@/constants'
import
cx
from
'classnames'
import
cx
from
'classnames'
import
{
Pagination
}
from
'antd'
import
SearchNoResult
from
'../components/SearchNoResult'
import
{
Pagination
,
message
}
from
'antd'
import
CommodityList
from
'./list'
import
CommodityList
from
'./list'
import
NoResult
from
'./noResult'
import
{
useLocalStore
,
observer
}
from
'mobx-react'
import
{
useLocalStore
,
observer
}
from
'mobx-react'
import
{
store
}
from
'@/store'
import
{
store
}
from
'@/store'
import
isEmpty
from
'lodash/isEmpty'
import
{
PublicApi
}
from
'@/services/api'
import
{
LAYOUT_TYPE
}
from
'@/constants'
import
{
GetOrderRequisitionFormOnlineShoppingListResponseDetail
}
from
'@/services/OrderApi'
import
styles
from
'./index.less'
import
styles
from
'./index.less'
interface
PurchaseOnlinePropsType
{
interface
PurchaseOnlinePropsType
{
location
:
any
location
:
any
,
layoutType
:
LAYOUT_TYPE
,
memberId
:
number
;
shopId
:
number
;
}
}
const
PurchaseOnline
:
React
.
FC
<
PurchaseOnlinePropsType
>
=
(
props
)
=>
{
const
PurchaseOnline
:
React
.
FC
<
PurchaseOnlinePropsType
>
=
(
props
)
=>
{
const
FilterStore
=
useLocalStore
(()
=>
store
.
FilterStore
)
const
FilterStore
=
useLocalStore
(()
=>
store
.
FilterStore
)
const
{
filterList
,
filterUpdate
,
filterParam
,
onDeleteFilterItem
,
onResetFilter
,
onFilter
,
onFilterParamChange
}
=
FilterStore
const
{
filterList
,
filterUpdate
,
filterParam
,
onDeleteFilterItem
,
onResetFilter
,
onFilter
,
onFilterParamChange
}
=
FilterStore
const
{
query
:
{
search
=
""
}
}
=
props
.
location
const
{
layoutType
,
shopId
}
=
props
const
[
showType
,
setShowType
]
=
useState
<
number
>
(
1
)
// 展示方式:1:矩阵排列; 2:列表排列
const
[
showType
,
setShowType
]
=
useState
<
number
>
(
1
)
// 展示方式:1:矩阵排列; 2:列表排列
// const [filterList, setFilterList] = useState([])
// const [filterList, setFilterList] = useState([])
const
[
loading
,
setLoading
]
=
useState
<
boolean
>
(
true
)
const
[
commodityList
,
setCommodityList
]
=
useState
<
GetOrderRequisitionFormOnlineShoppingListResponseDetail
[]
>
([])
const
[
current
,
setCurrent
]
=
useState
<
number
>
(
1
)
const
[
pageSize
]
=
useState
<
number
>
(
20
)
const
[
totalCount
,
setTotalCount
]
=
useState
<
number
>
(
0
)
const
filterConfig
=
[
FILTER_TYPE
.
category
,
FILTER_TYPE
.
useArea
]
const
filterConfig
=
[
FILTER_TYPE
.
category
,
FILTER_TYPE
.
useArea
]
useEffect
(()
=>
{
setCurrent
(
1
)
fetchCommodityList
(
1
)
},
[
filterParam
])
useEffect
(()
=>
{
if
(
!
isEmpty
(
filterList
)
||
filterUpdate
)
{
handleFilterChange
(
filterList
)
}
},
[
filterList
])
useEffect
(()
=>
{
return
(()
=>
{
onResetFilter
()
})
},
[])
const
fetchCommodityList
=
(
currentParam
?:
number
)
=>
{
let
param
:
any
=
{
current
:
currentParam
?
currentParam
:
current
,
pageSize
}
if
(
!
isEmpty
(
filterParam
))
{
param
=
Object
.
assign
(
param
,
filterParam
)
}
setLoading
(
true
)
//@ts-ignore
PublicApi
.
getOrderRequisitionFormOnlineShoppingList
(
param
).
then
(
res
=>
{
setLoading
(
false
)
if
(
res
.
code
===
1000
)
{
message
.
destroy
()
setCommodityList
(
res
.
data
.
data
)
setTotalCount
(
res
.
data
.
totalCount
)
}
})
}
const
handleFilterChange
=
(
newFilterList
:
any
)
=>
{
onFilterParamChange
(
newFilterList
)
}
/**
/**
* 重置筛选
* 重置筛选
*/
*/
...
@@ -141,7 +196,7 @@ const PurchaseOnline: React.FC<PurchaseOnlinePropsType> = (props) => {
...
@@ -141,7 +196,7 @@ const PurchaseOnline: React.FC<PurchaseOnlinePropsType> = (props) => {
<
div
className=
{
styles
.
tool_bar_right
}
>
<
div
className=
{
styles
.
tool_bar_right
}
>
<
div
className=
{
styles
.
count
}
>
<
div
className=
{
styles
.
count
}
>
<
span
>
共
</
span
>
<
span
>
共
</
span
>
<
label
>
43
</
label
>
<
label
>
{
totalCount
}
</
label
>
<
span
>
条求购信息
</
span
>
<
span
>
条求购信息
</
span
>
</
div
>
</
div
>
</
div
>
</
div
>
...
@@ -166,11 +221,11 @@ const PurchaseOnline: React.FC<PurchaseOnlinePropsType> = (props) => {
...
@@ -166,11 +221,11 @@ const PurchaseOnline: React.FC<PurchaseOnlinePropsType> = (props) => {
)
)
}
}
{
{
!!
search
?
<
NoResult
search=
{
search
}
/>
:
(
(
commodityList
.
length
===
0
||
!
commodityList
)
?
!
loading
&&
<
SearchNoResult
search=
""
/>
:
(
<>
<>
<
CommodityList
showType=
{
showType
}
/>
<
CommodityList
showType=
{
showType
}
commodityList=
{
commodityList
}
layoutType=
{
layoutType
}
/>
<
div
className=
{
styles
.
pagination_wrap
}
>
<
div
className=
{
styles
.
pagination_wrap
}
>
<
Pagination
showQuickJumper
showSizeChanger=
{
false
}
defaultCurrent=
{
1
}
total=
{
100
}
/>
<
Pagination
showQuickJumper
showSizeChanger=
{
false
}
current=
{
current
}
total=
{
totalCount
}
pageSize=
{
pageSize
}
/>
</
div
>
</
div
>
</>
</>
)
)
...
...
src/pages/lxMall/purchaseOnline/list.less
View file @
d0b1a0dc
...
@@ -29,6 +29,10 @@
...
@@ -29,6 +29,10 @@
font-weight: 500;
font-weight: 500;
padding-left: 15px;
padding-left: 15px;
background-color: #FAFAFA;
background-color: #FAFAFA;
a {
color: #303133;
}
}
}
&_info_box {
&_info_box {
...
@@ -68,6 +72,7 @@
...
@@ -68,6 +72,7 @@
margin-top: 20px;
margin-top: 20px;
&>a {
&>a {
display: block;
color: #fff;
color: #fff;
}
}
...
...
src/pages/lxMall/purchaseOnline/list.tsx
View file @
d0b1a0dc
import
React
from
'react'
import
React
from
'react'
import
cx
from
'classnames'
import
cx
from
'classnames'
import
{
Link
}
from
'umi'
import
{
LAYOUT_TYPE
}
from
'@/constants'
import
{
GetOrderRequisitionFormOnlineShoppingListResponseDetail
}
from
'@/services/OrderApi'
import
creditIcon
from
'@/assets/imgs/credit_icon.png'
import
creditIcon
from
'@/assets/imgs/credit_icon.png'
import
moment
from
'moment'
import
'./list.less'
import
'./list.less'
interface
CommodityListPropsType
{
interface
CommodityListPropsType
{
showType
:
number
showType
:
number
;
commodityList
:
GetOrderRequisitionFormOnlineShoppingListResponseDetail
[]
layoutType
:
LAYOUT_TYPE
}
}
const
CommodityList
:
React
.
FC
<
CommodityListPropsType
>
=
(
props
)
=>
{
const
CommodityList
:
React
.
FC
<
CommodityListPropsType
>
=
(
props
)
=>
{
const
{
showType
}
=
props
const
{
commodityList
=
[],
layoutType
=
LAYOUT_TYPE
.
mall
}
=
props
let
dataList
=
[]
for
(
let
i
=
0
;
i
<
20
;
i
++
)
{
const
showRequisitionFormAddress
=
(
list
:
any
)
=>
{
dataList
.
push
(
i
)
if
(
list
)
{
let
result
=
list
.
map
(
item
=>
`
${
item
.
province
}
/
${
item
.
city
}
`
).
join
(
'、'
)
return
result
}
return
""
}
}
return
(
return
(
<
div
className=
{
cx
(
"purchase_list"
)
}
>
<
div
className=
{
cx
(
"purchase_list"
)
}
>
{
{
dataList
.
map
((
item
,
index
)
=>
(
commodityList
.
map
((
item
,
index
)
=>
(
<
div
key=
{
item
}
className=
"purchase_list_item row"
>
<
div
key=
{
item
.
id
}
className=
"purchase_list_item row"
>
<
div
className=
"purchase_list_item_title"
>
<
div
className=
"purchase_list_item_title"
>
头层自然摔牛皮,箱包鞋面料
</
div
>
<
Link
to=
{
`/memberCenter/tranactionAbility/inquiryQuote/quoteOrder/details?id=${item.id}&page_type=5&view=2`
}
>
{
item
.
details
}
</
Link
>
</
div
>
<
div
className=
"purchase_list_item_info_box"
>
<
div
className=
"purchase_list_item_info_box"
>
<
div
className=
"purchase_list_item_info_line"
>
<
div
className=
"purchase_list_item_info_line"
>
<
label
>
品类:
</
label
>
<
label
>
品类:
</
label
>
<
span
>
硬度适中偏软
</
span
>
<
span
>
{
item
.
categoryName
}
</
span
>
</
div
>
</
div
>
<
div
className=
"purchase_list_item_info_line"
>
<
div
className=
"purchase_list_item_info_line"
>
<
label
>
发货地:
</
label
>
<
label
>
发货地:
</
label
>
<
span
>
广东省/广州市、广东省/深圳市、广东省/东莞市
</
span
>
<
span
>
{
showRequisitionFormAddress
(
item
.
requisitionFormAddress
)
}
</
span
>
</
div
>
</
div
>
<
div
className=
"purchase_list_item_info_line"
>
<
div
className=
"purchase_list_item_info_line"
>
<
label
>
交付地址:
</
label
>
<
label
>
交付地址:
</
label
>
<
span
>
广东省广州市海珠区新港东路1068号
</
span
>
<
span
>
{
item
.
addres
}
</
span
>
</
div
>
</
div
>
<
div
className=
"purchase_list_item_info_line"
>
<
div
className=
"purchase_list_item_info_line"
>
<
label
>
交付日期:
</
label
>
<
label
>
交付日期:
</
label
>
<
span
>
2020-08-12
</
span
>
<
span
>
{
moment
(
item
.
deliveryTime
).
format
(
"YYYY-MM-DD"
)
}
</
span
>
</
div
>
</
div
>
<
div
className=
"purchase_list_item_info_line"
>
<
div
className=
"purchase_list_item_info_line"
>
<
label
>
截止时间:
</
label
>
<
label
>
截止时间:
</
label
>
<
span
>
2020-08-12 11:58:26
</
span
>
<
span
>
{
moment
(
item
.
quotationAsTime
).
format
(
"YYYY-MM-DD HH:mm:ss"
)
}
</
span
>
</
div
>
</
div
>
<
div
className=
"purchase_list_item_info_line_split"
></
div
>
<
div
className=
"purchase_list_item_info_line_split"
></
div
>
<
div
className=
"purchase_list_item_info_name"
>
温州市龙昌皮业有限公司
</
div
>
<
div
className=
"purchase_list_item_info_name"
>
{
item
.
memberName
}
</
div
>
<
div
className=
"purchase_list_item_info_line"
>
<
div
className=
"purchase_list_item_info_line"
>
<
img
className=
"credit_icon"
src=
{
creditIcon
}
/>
<
img
className=
"credit_icon"
src=
{
creditIcon
}
/>
<
span
className=
"credit_text"
>
1288
</
span
>
<
span
className=
"credit_text"
>
{
item
.
memberCreditDcore
||
0
}
</
span
>
</
div
>
</
div
>
<
div
className=
"quoted_price_btn"
>
<
div
className=
"quoted_price_btn"
>
<
a
href=
{
`/memberCenter/tranactionAbility/enquiryOffer/toAddSubmitList/add`
}
>
立即报价
</
a
>
<
Link
to=
{
`/memberCenter/tranactionAbility/inquiryQuote/addInquiryOrder/add?id=${item.id}`
}
>
立即报价
</
Link
>
</
div
>
</
div
>
</
div
>
</
div
>
</
div
>
</
div
>
...
...
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