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
黄庭坚
jinfa-platform
Commits
8c6185f6
Commit
8c6185f6
authored
Jul 20, 2021
by
GuanHua
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix: 询价商品处理商城跳转过来的数据
parent
9e8988e6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
455 additions
and
51 deletions
+455
-51
index.tsx
src/pages/systemSetting/collection/index.tsx
+60
-49
logistics.tsx
src/pages/systemSetting/collection/logistics.tsx
+127
-0
process.tsx
src/pages/systemSetting/collection/process.tsx
+127
-0
purchase.tsx
src/pages/systemSetting/collection/purchase.tsx
+127
-0
addForm.tsx
...ion/dealAbility/productInquiry/waitAddInquiry/addForm.tsx
+11
-0
basicInfo.tsx
...ty/productInquiry/waitAddInquiry/components/basicInfo.tsx
+3
-2
No files found.
src/pages/systemSetting/collection/index.tsx
View file @
8c6185f6
import
React
,
{
useEffect
,
useState
}
from
'react'
import
{
PageHeaderWrapper
}
from
'@ant-design/pro-layout'
import
Commodity
from
'./commodity'
import
Infomation
from
'./information'
import
Shops
from
'./shops'
import
{
Tabs
}
from
'antd'
import
styles
from
'./index.less'
const
{
TabPane
}
=
Tabs
interface
CollectionPropsType
{
location
:
any
}
const
Collection
:
React
.
FC
<
CollectionPropsType
>
=
(
props
)
=>
{
const
{
query
:
{
type
}
}
=
props
.
location
const
[
tabKey
,
setTabKey
]
=
useState
<
string
>
(
"commodity"
)
useEffect
(()
=>
{
if
(
type
)
{
setTabKey
(
type
)
}
},
[
type
])
const
handleChange
=
(
key
)
=>
{
setTabKey
(
key
)
}
return
(
<
PageHeaderWrapper
>
<
div
className=
{
styles
.
collection_wrap
}
>
<
Tabs
activeKey=
{
tabKey
}
className=
{
styles
.
collection_tabs
}
onChange=
{
handleChange
}
>
<
TabPane
tab=
"商品收藏"
key=
"commodity"
>
<
Commodity
/>
</
TabPane
>
<
TabPane
tab=
"店铺收藏"
key=
"shops"
>
<
Shops
/>
</
TabPane
>
<
TabPane
tab=
"资讯收藏"
key=
"information"
>
<
Infomation
/>
</
TabPane
>
</
Tabs
>
</
div
>
</
PageHeaderWrapper
>
)
}
export
default
Collection
\ No newline at end of file
import
React
,
{
useEffect
,
useState
}
from
'react'
import
{
PageHeaderWrapper
}
from
'@ant-design/pro-layout'
import
Commodity
from
'./commodity'
import
Infomation
from
'./information'
import
Shops
from
'./shops'
import
Purchase
from
'./purchase'
import
Logistics
from
'./logistics'
import
Process
from
'./process'
import
{
Tabs
}
from
'antd'
import
styles
from
'./index.less'
const
{
TabPane
}
=
Tabs
interface
CollectionPropsType
{
location
:
any
}
const
Collection
:
React
.
FC
<
CollectionPropsType
>
=
(
props
)
=>
{
const
{
query
:
{
type
}
}
=
props
.
location
const
[
tabKey
,
setTabKey
]
=
useState
<
string
>
(
"commodity"
)
useEffect
(()
=>
{
if
(
type
)
{
setTabKey
(
type
)
}
},
[
type
])
const
handleChange
=
(
key
)
=>
{
setTabKey
(
key
)
}
return
(
<
PageHeaderWrapper
>
<
div
className=
{
styles
.
collection_wrap
}
>
<
Tabs
activeKey=
{
tabKey
}
className=
{
styles
.
collection_tabs
}
onChange=
{
handleChange
}
>
<
TabPane
tab=
"商品收藏"
key=
"commodity"
>
<
Commodity
/>
</
TabPane
>
<
TabPane
tab=
"店铺收藏"
key=
"shops"
>
<
Shops
/>
</
TabPane
>
<
TabPane
tab=
"资讯收藏"
key=
"information"
>
<
Infomation
/>
</
TabPane
>
<
TabPane
tab=
"门户收藏"
key=
"srm"
>
<
Purchase
/>
</
TabPane
>
<
TabPane
tab=
"物流商收藏"
key=
"logistics"
>
<
Logistics
/>
</
TabPane
>
<
TabPane
tab=
"加工商收藏"
key=
"manufacture"
>
<
Process
/>
</
TabPane
>
</
Tabs
>
</
div
>
</
PageHeaderWrapper
>
)
}
export
default
Collection
src/pages/systemSetting/collection/logistics.tsx
0 → 100644
View file @
8c6185f6
import
React
,
{
useEffect
,
useState
}
from
'react'
import
cx
from
'classnames'
import
{
Pagination
,
message
,
Modal
}
from
'antd'
import
{
StarFilled
}
from
'@ant-design/icons'
import
{
PublicApi
}
from
'@/services/api'
import
{
LOGISTICS_CENTER_URL
}
from
'@/constants'
import
moment
from
'moment'
import
styles
from
'./index.less'
const
Logistics
:
React
.
FC
=
()
=>
{
const
[
list
,
setList
]
=
useState
([])
const
[
current
,
setCurrent
]
=
useState
<
number
>
(
1
)
const
[
pageSize
,
setPageSize
]
=
useState
<
number
>
(
10
)
const
[
totalCount
,
setTotalCount
]
=
useState
<
number
>
(
0
)
useEffect
(()
=>
{
fetchCollectList
()
},
[
current
])
/**
* 获取收藏的资讯列表
*/
const
fetchCollectList
=
()
=>
{
const
param
:
any
=
{
current
,
pageSize
}
PublicApi
.
getTemplateWebMemberLogisticsWebCollectList
(
param
).
then
(
res
=>
{
if
(
res
.
code
===
1000
)
{
setList
(
res
.
data
.
data
)
setTotalCount
(
res
.
data
.
totalCount
)
}
})
}
const
handleChange
=
(
page
)
=>
{
setCurrent
(
page
)
}
const
linkToDetail
=
(
detail
)
=>
{
if
(
detail
.
status
!==
0
)
{
const
el
=
document
.
createElement
(
'a'
)
el
.
href
=
`
${
LOGISTICS_CENTER_URL
}
/aboutUs/
${
detail
.
id
}
`
;
el
.
target
=
'_blank'
;
el
.
id
=
detail
.
id
if
(
!
document
.
getElementById
(
detail
.
id
))
{
document
.
body
.
appendChild
(
el
);
}
el
.
click
()
}
else
{
message
.
destroy
()
message
.
info
(
"物流商已被冻结"
)
}
}
const
handleCancelCollect
=
(
detail
)
=>
{
Modal
.
confirm
({
centered
:
true
,
className
:
styles
.
mallComfirm
,
content
:
`是否要取消收藏?`
,
onOk
:
()
=>
{
return
new
Promise
((
resolve
,
reject
)
=>
{
const
param
=
{
id
:
detail
.
id
,
status
:
false
}
PublicApi
.
postTemplateWebMemberLogisticsWebCollect
(
param
).
then
(
res
=>
{
if
(
res
.
code
===
1000
)
{
// fetchPurchaseList()
fetchCollectList
()
resolve
(
true
)
}
else
{
reject
()
}
}).
catch
(()
=>
{
reject
()
})
})
}
})
}
return
(
<>
<
div
className=
{
styles
.
information_list
}
>
{
list
&&
list
.
map
((
item
,
index
)
=>
(
<
div
className=
{
styles
.
information_list_item
}
key=
{
`information_list_item_${index}`
}
>
<
div
className=
{
cx
(
styles
.
information_list_item_item
,
styles
.
morehalf
)
}
>
<
div
className=
{
styles
.
information_header_info
}
>
<
div
className=
{
styles
.
information_header_info_logo
}
>
<
img
src=
{
item
.
logo
}
/>
</
div
>
<
div
className=
{
styles
.
information_header_info_content
}
>
<
div
className=
{
styles
.
information_header_info_content_name
}
onClick=
{
()
=>
linkToDetail
(
item
)
}
>
<
span
>
{
item
.
memberName
}
</
span
>
</
div
>
</
div
>
</
div
>
</
div
>
<
div
className=
{
cx
(
styles
.
information_list_item_item
)
}
>
<
span
className=
{
styles
.
date
}
>
{
moment
(
item
.
createTime
).
format
(
"YYYY-MM-DD HH:mm"
)
}
</
span
>
</
div
>
<
div
className=
{
cx
(
styles
.
information_list_item_item
)
}
onClick=
{
()
=>
handleCancelCollect
(
item
)
}
>
<
div
className=
{
cx
(
styles
.
collection_state
)
}
>
<
StarFilled
/>
<
label
>
收藏
</
label
>
</
div
>
</
div
>
</
div
>
))
}
</
div
>
{
totalCount
>
0
&&
(
<
div
className=
{
styles
.
pagination_wrap
}
>
<
Pagination
showSizeChanger=
{
false
}
current=
{
current
}
total=
{
totalCount
}
pageSize=
{
pageSize
}
onChange=
{
handleChange
}
/>
</
div
>
)
}
</>
)
}
export
default
Logistics
src/pages/systemSetting/collection/process.tsx
0 → 100644
View file @
8c6185f6
import
React
,
{
useEffect
,
useState
}
from
'react'
import
cx
from
'classnames'
import
{
Pagination
,
message
,
Modal
}
from
'antd'
import
{
StarFilled
}
from
'@ant-design/icons'
import
{
PublicApi
}
from
'@/services/api'
import
{
MANUFACTURE_CENTER_URL
}
from
'@/constants'
import
moment
from
'moment'
import
styles
from
'./index.less'
const
Process
:
React
.
FC
=
()
=>
{
const
[
list
,
setList
]
=
useState
([])
const
[
current
,
setCurrent
]
=
useState
<
number
>
(
1
)
const
[
pageSize
,
setPageSize
]
=
useState
<
number
>
(
10
)
const
[
totalCount
,
setTotalCount
]
=
useState
<
number
>
(
0
)
useEffect
(()
=>
{
fetchCollectList
()
},
[
current
])
/**
* 获取收藏的资讯列表
*/
const
fetchCollectList
=
()
=>
{
const
param
:
any
=
{
current
,
pageSize
}
PublicApi
.
getTemplateWebMemberProcessWebCollectList
(
param
).
then
(
res
=>
{
if
(
res
.
code
===
1000
)
{
setList
(
res
.
data
.
data
)
setTotalCount
(
res
.
data
.
totalCount
)
}
})
}
const
handleChange
=
(
page
)
=>
{
setCurrent
(
page
)
}
const
linkToDetail
=
(
detail
)
=>
{
if
(
detail
.
status
!==
0
)
{
const
el
=
document
.
createElement
(
'a'
)
el
.
href
=
`
${
MANUFACTURE_CENTER_URL
}
/aboutUs/
${
detail
.
id
}
`
;
el
.
target
=
'_blank'
;
el
.
id
=
detail
.
id
if
(
!
document
.
getElementById
(
detail
.
id
))
{
document
.
body
.
appendChild
(
el
);
}
el
.
click
()
}
else
{
message
.
destroy
()
message
.
info
(
"加工商已被冻结"
)
}
}
const
handleCancelCollect
=
(
detail
)
=>
{
Modal
.
confirm
({
centered
:
true
,
className
:
styles
.
mallComfirm
,
content
:
`是否要取消收藏?`
,
onOk
:
()
=>
{
return
new
Promise
((
resolve
,
reject
)
=>
{
const
param
=
{
id
:
detail
.
id
,
status
:
false
}
PublicApi
.
postTemplateWebMemberProcessWebCollect
(
param
).
then
(
res
=>
{
if
(
res
.
code
===
1000
)
{
// fetchPurchaseList()
fetchCollectList
()
resolve
(
true
)
}
else
{
reject
()
}
}).
catch
(()
=>
{
reject
()
})
})
}
})
}
return
(
<>
<
div
className=
{
styles
.
information_list
}
>
{
list
&&
list
.
map
((
item
,
index
)
=>
(
<
div
className=
{
styles
.
information_list_item
}
key=
{
`information_list_item_${index}`
}
>
<
div
className=
{
cx
(
styles
.
information_list_item_item
,
styles
.
morehalf
)
}
>
<
div
className=
{
styles
.
information_header_info
}
>
<
div
className=
{
styles
.
information_header_info_logo
}
>
<
img
src=
{
item
.
logo
}
/>
</
div
>
<
div
className=
{
styles
.
information_header_info_content
}
>
<
div
className=
{
styles
.
information_header_info_content_name
}
onClick=
{
()
=>
linkToDetail
(
item
)
}
>
<
span
>
{
item
.
memberName
}
</
span
>
</
div
>
</
div
>
</
div
>
</
div
>
<
div
className=
{
cx
(
styles
.
information_list_item_item
)
}
>
<
span
className=
{
styles
.
date
}
>
{
moment
(
item
.
createTime
).
format
(
"YYYY-MM-DD HH:mm"
)
}
</
span
>
</
div
>
<
div
className=
{
cx
(
styles
.
information_list_item_item
)
}
onClick=
{
()
=>
handleCancelCollect
(
item
)
}
>
<
div
className=
{
cx
(
styles
.
collection_state
)
}
>
<
StarFilled
/>
<
label
>
收藏
</
label
>
</
div
>
</
div
>
</
div
>
))
}
</
div
>
{
totalCount
>
0
&&
(
<
div
className=
{
styles
.
pagination_wrap
}
>
<
Pagination
showSizeChanger=
{
false
}
current=
{
current
}
total=
{
totalCount
}
pageSize=
{
pageSize
}
onChange=
{
handleChange
}
/>
</
div
>
)
}
</>
)
}
export
default
Process
src/pages/systemSetting/collection/purchase.tsx
0 → 100644
View file @
8c6185f6
import
React
,
{
useEffect
,
useState
}
from
'react'
import
cx
from
'classnames'
import
{
Pagination
,
message
,
Modal
}
from
'antd'
import
{
StarFilled
}
from
'@ant-design/icons'
import
{
PublicApi
}
from
'@/services/api'
import
{
SRM_CENTER_URL
}
from
'@/constants'
import
moment
from
'moment'
import
styles
from
'./index.less'
const
Purchase
:
React
.
FC
=
()
=>
{
const
[
list
,
setList
]
=
useState
([])
const
[
current
,
setCurrent
]
=
useState
<
number
>
(
1
)
const
[
pageSize
,
setPageSize
]
=
useState
<
number
>
(
10
)
const
[
totalCount
,
setTotalCount
]
=
useState
<
number
>
(
0
)
useEffect
(()
=>
{
fetchCollectPurchaseList
()
},
[
current
])
/**
* 获取收藏的资讯列表
*/
const
fetchCollectPurchaseList
=
()
=>
{
const
param
:
any
=
{
current
,
pageSize
}
PublicApi
.
getTemplateWebMemberPurchaseWebCollectList
(
param
).
then
(
res
=>
{
if
(
res
.
code
===
1000
)
{
setList
(
res
.
data
.
data
)
setTotalCount
(
res
.
data
.
totalCount
)
}
})
}
const
handleChange
=
(
page
)
=>
{
setCurrent
(
page
)
}
const
linkToDetail
=
(
detail
)
=>
{
if
(
detail
.
status
!==
0
)
{
const
el
=
document
.
createElement
(
'a'
)
el
.
href
=
`
${
SRM_CENTER_URL
}
/shopIndex/
${
detail
.
id
}
`
;
el
.
target
=
'_blank'
;
el
.
id
=
detail
.
id
if
(
!
document
.
getElementById
(
detail
.
id
))
{
document
.
body
.
appendChild
(
el
);
}
el
.
click
()
}
else
{
message
.
destroy
()
message
.
info
(
"该门户已被冻结"
)
}
}
const
handleCancelCollect
=
(
detail
)
=>
{
Modal
.
confirm
({
centered
:
true
,
className
:
styles
.
mallComfirm
,
content
:
`是否要取消收藏?`
,
onOk
:
()
=>
{
return
new
Promise
((
resolve
,
reject
)
=>
{
const
param
=
{
id
:
detail
.
id
,
status
:
false
}
PublicApi
.
postTemplateWebMemberPurchaseWebCollect
(
param
).
then
(
res
=>
{
if
(
res
.
code
===
1000
)
{
// fetchPurchaseList()
fetchCollectPurchaseList
()
resolve
(
true
)
}
else
{
reject
()
}
}).
catch
(()
=>
{
reject
()
})
})
}
})
}
return
(
<>
<
div
className=
{
styles
.
information_list
}
>
{
list
&&
list
.
map
((
item
,
index
)
=>
(
<
div
className=
{
styles
.
information_list_item
}
key=
{
`information_list_item_${index}`
}
>
<
div
className=
{
cx
(
styles
.
information_list_item_item
,
styles
.
morehalf
)
}
>
<
div
className=
{
styles
.
information_header_info
}
>
<
div
className=
{
styles
.
information_header_info_logo
}
>
<
img
src=
{
item
.
logo
}
/>
</
div
>
<
div
className=
{
styles
.
information_header_info_content
}
>
<
div
className=
{
styles
.
information_header_info_content_name
}
onClick=
{
()
=>
linkToDetail
(
item
)
}
>
<
span
>
{
item
.
memberName
}
</
span
>
</
div
>
</
div
>
</
div
>
</
div
>
<
div
className=
{
cx
(
styles
.
information_list_item_item
)
}
>
<
span
className=
{
styles
.
date
}
>
{
moment
(
item
.
createTime
).
format
(
"YYYY-MM-DD HH:mm"
)
}
</
span
>
</
div
>
<
div
className=
{
cx
(
styles
.
information_list_item_item
)
}
onClick=
{
()
=>
handleCancelCollect
(
item
)
}
>
<
div
className=
{
cx
(
styles
.
collection_state
)
}
>
<
StarFilled
/>
<
label
>
收藏
</
label
>
</
div
>
</
div
>
</
div
>
))
}
</
div
>
{
totalCount
>
0
&&
(
<
div
className=
{
styles
.
pagination_wrap
}
>
<
Pagination
showSizeChanger=
{
false
}
current=
{
current
}
total=
{
totalCount
}
pageSize=
{
pageSize
}
onChange=
{
handleChange
}
/>
</
div
>
)
}
</>
)
}
export
default
Purchase
src/pages/transaction/dealAbility/productInquiry/waitAddInquiry/addForm.tsx
View file @
8c6185f6
...
...
@@ -96,10 +96,12 @@ const AddedFormLayout: React.FC<AddedFormLayoutProps> = (props: any) => {
if
(
isEdit
&&
spam
)
{
// const data: any = JSON.parse(sessionStorage.getItem(spam));
const
data
:
any
=
getCookie
(
spam
)
if
(
!
data
)
return
const
inquiryListProductRequests
:
any
[]
=
[];
inquiryListProductRequests
.
push
({
commodityId
:
id
,
productId
:
data
.
id
,
imgUrl
:
data
.
imgUrl
,
productName
:
data
.
name
,
category
:
data
.
category
,
brand
:
data
.
brand
.
name
,
...
...
@@ -109,7 +111,16 @@ const AddedFormLayout: React.FC<AddedFormLayoutProps> = (props: any) => {
memberId
:
data
.
memberId
,
memberRoleId
:
data
.
memberRoleId
})
setMenberInfo
({
memberId
:
data
.
memberId
,
roleId
:
data
.
memberRoleId
,
roleName
:
data
.
memberName
,
})
setInquiryProduct
(
inquiryListProductRequests
)
form
.
setFieldsValue
({
memberName
:
data
.
memberName
,
"inquiryListProductRequests"
:
inquiryListProductRequests
})
}
else
if
(
isEdit
)
{
PublicApi
.
getTransactionInquiryListDetails
({
id
}).
then
(
res
=>
{
if
(
res
.
code
!==
1000
)
{
...
...
src/pages/transaction/dealAbility/productInquiry/waitAddInquiry/components/basicInfo.tsx
View file @
8c6185f6
...
...
@@ -6,6 +6,7 @@ import TableModal from '@/pages/transaction/components/TableModal';
import
{
PublicApi
}
from
'@/services/api'
;
import
style
from
'./index.less'
;
import
{
isEmpty
}
from
'@formily/shared'
;
import
{
ENTERPRISE_CENTER_URL
}
from
'@/constants'
import
{
useStateFilterSearchLinkageEffect
}
from
'@/formSchema/effects/useFilterSearch'
;
import
{
FORM_FILTER_PATH
}
from
'@/formSchema/const'
;
...
...
@@ -72,14 +73,14 @@ const BasicInfoLayout: React.FC<BasicInfoLayoutProps> = (props: any) => {
}
const
hanleGoMall
=
()
=>
{
console
.
log
(
member
)
if
(
member
.
memberId
)
{
window
.
open
(
`
/shop?shopId=
${
btoa
(
JSON
.
stringify
({
memberId
:
member
.
memberId
,
roleId
:
member
.
roleId
}))
}
`
)
window
.
open
(
`
${
ENTERPRISE_CENTER_URL
}
/shop/
${
member
.
memberId
}
_
${
member
.
roleId
}
`
)
}
}
useEffect
(()
=>
{
if
(
!
isEmpty
(
memb
))
{
console
.
log
(
memb
,
'memb'
)
setMember
(
memb
)
}
},
[
memb
])
...
...
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