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
3a334f51
Commit
3a334f51
authored
Oct 21, 2020
by
GuanHua
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat:进货单商品添加链接
parent
d0b1a0dc
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
28 additions
and
6 deletions
+28
-6
index.tsx
src/pages/lxMall/commodityDetail/index.tsx
+3
-3
index.tsx
src/pages/lxMall/components/Recommand/index.tsx
+1
-1
index.less
src/pages/lxMall/purchaseOrder/index.less
+4
-0
index.tsx
src/pages/lxMall/purchaseOrder/index.tsx
+20
-2
No files found.
src/pages/lxMall/commodityDetail/index.tsx
View file @
3a334f51
...
...
@@ -96,7 +96,7 @@ const CommodityDetail = (props) => {
case
LAYOUT_TYPE
.
shop
:
switch
(
priceType
)
{
case
COMMODITY_TYPE
.
prompt
:
getListFn
=
PublicApi
.
postSearchShop
Enterpris
eGetCommodityList
getListFn
=
PublicApi
.
postSearchShop
Stor
eGetCommodityList
break
case
COMMODITY_TYPE
.
inquiry
:
getListFn
=
PublicApi
.
postSearchShopScoreGetCommodityList
...
...
@@ -184,8 +184,8 @@ const CommodityDetail = (props) => {
initAttributeAndValueList
(
res
.
data
)
getPayWayListByMemberId
(
res
.
data
?.
memberId
)
if
(
res
.
data
.
customerCategory
.
category
)
{
fetchCommonCategoryCommodityList
(
res
.
data
.
customerCategory
.
category
.
id
,
res
.
data
.
priceType
)
if
(
res
.
data
.
customerCategory
)
{
fetchCommonCategoryCommodityList
(
res
.
data
.
customerCategory
.
id
,
res
.
data
.
priceType
)
}
if
(
getAuth
()
&&
res
.
data
?.
isMemberPrice
)
{
...
...
src/pages/lxMall/components/Recommand/index.tsx
View file @
3a334f51
...
...
@@ -82,7 +82,7 @@ const Recommand: React.FC<RecommandPropsType> = (props) => {
getListFn
=
PublicApi
.
postSearchShopChannelGetCommodityList
break
default
:
getListFn
=
PublicApi
.
postSearchShop
Enterpris
eGetCommodityList
getListFn
=
PublicApi
.
postSearchShop
Stor
eGetCommodityList
break
}
getListFn
&&
getListFn
(
param
,
{
headers
}).
then
(
res
=>
{
...
...
src/pages/lxMall/purchaseOrder/index.less
View file @
3a334f51
...
...
@@ -98,6 +98,10 @@
&_name {
color: #303133;
margin-bottom: 12px;
a {
color: #303133;
}
}
&_category {
...
...
src/pages/lxMall/purchaseOrder/index.tsx
View file @
3a334f51
...
...
@@ -5,7 +5,7 @@ import Recommand from '../components/Recommand'
import
cx
from
'classnames'
import
{
Checkbox
,
Affix
,
message
,
Modal
,
Button
}
from
'antd'
import
styles
from
'./index.less'
import
{
history
}
from
'umi'
import
{
history
,
Link
}
from
'umi'
import
{
PublicApi
}
from
'@/services/api'
import
{
priceFormat
,
numFormat
}
from
"@/utils/numberFomat"
import
{
useLocalStore
,
observer
}
from
'mobx-react'
...
...
@@ -597,6 +597,22 @@ const PurchaseOrder: React.FC<PurchaseOrderPropsType> = (props) => {
return
maxItem
}
const
getDetailLink
=
(
info
)
=>
{
let
linkUrl
=
""
switch
(
layoutType
)
{
case
LAYOUT_TYPE
.
channel
:
linkUrl
=
`/channelmall/commodity/detail?id=
${
info
.
commodityUnitPrice
.
commodity
.
id
}
&channelId=
${
btoa
(
JSON
.
stringify
({
shopId
:
info
.
commodityUnitPrice
.
commodity
.
storeId
,
memberId
:
info
.
commodityUnitPrice
.
commodity
.
memberId
}))}
`
break
case
LAYOUT_TYPE
.
ichannel
:
linkUrl
=
`/ichannelmall/commodity/detail?id=
${
info
.
commodityUnitPrice
.
commodity
.
id
}
&channelId=
${
btoa
(
JSON
.
stringify
({
shopId
:
info
.
commodityUnitPrice
.
commodity
.
storeId
,
memberId
:
info
.
commodityUnitPrice
.
commodity
.
memberId
}))}
`
break
default
:
linkUrl
=
`/shop/commodity/detail?id=
${
info
.
commodityUnitPrice
.
commodity
.
id
}
&shopId=
${
btoa
(
JSON
.
stringify
({
shopId
:
info
.
commodityUnitPrice
.
commodity
.
storeId
,
memberId
:
info
.
commodityUnitPrice
.
commodity
.
memberId
}))}
`
break
}
return
linkUrl
}
return
(
<
div
className=
{
styles
.
purchase_order
}
>
<
div
className=
{
styles
.
purchase_order_container
}
>
...
...
@@ -650,7 +666,9 @@ const PurchaseOrder: React.FC<PurchaseOrderPropsType> = (props) => {
<
ImageBox
width=
{
80
}
height=
{
80
}
imgUrl=
{
childItem
.
commodityUnitPrice
.
commodityPic
[
0
]
}
direction=
"column"
/>
</
div
>
<
div
>
<
div
className=
{
styles
.
order_list_item_item_name
}
>
{
childItem
.
commodityUnitPrice
.
commodity
.
name
}
</
div
>
<
div
className=
{
styles
.
order_list_item_item_name
}
>
<
Link
to=
{
getDetailLink
(
childItem
)
}
>
{
childItem
.
commodityUnitPrice
.
commodity
.
name
}
</
Link
>
</
div
>
<
div
className=
{
styles
.
order_list_item_item_category
}
>
{
childItem
.
commodityUnitPrice
.
attributeAndValueList
.
map
(
attrItem
=>
(
...
...
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