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
e238ed4c
Commit
e238ed4c
authored
Jul 01, 2021
by
前端-黄佳鑫
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
🐞
fix: 修改被询价会员跳转商城
parent
65f13e18
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
53 additions
and
15 deletions
+53
-15
addForm.tsx
...ion/dealAbility/productInquiry/waitAddInquiry/addForm.tsx
+19
-8
basicInfo.tsx
...ty/productInquiry/waitAddInquiry/components/basicInfo.tsx
+22
-5
index.less
...ility/productInquiry/waitAddInquiry/components/index.less
+7
-0
inquiryProduct.tsx
...oductInquiry/waitAddInquiry/components/inquiryProduct.tsx
+5
-2
No files found.
src/pages/transaction/dealAbility/productInquiry/waitAddInquiry/addForm.tsx
View file @
e238ed4c
...
...
@@ -41,14 +41,25 @@ const AddedFormLayout: React.FC<AddedFormLayoutProps> = (props: any) => {
const
handleSubmit
=
()
=>
{
setLoading
(
true
)
form
.
validateFields
().
then
(
res
=>
{
const
params
=
{
...
re
s
,
const
params
:
any
=
{
details
:
res
.
detail
s
,
deliveryTime
:
res
.
deliveryTime
&&
moment
(
res
.
deliveryTime
).
format
(
'x'
),
quotationAsTime
:
res
.
quotationAsTime
&&
moment
(
res
.
quotationAsTime
).
format
(
'x'
),
memberName
:
res
.
memberName
,
memberId
:
memberInfo
.
memberId
,
memberRoleId
:
memberInfo
.
memberR
oleId
,
memberRoleName
:
memberInfo
.
memberR
oleName
,
memberRoleId
:
memberInfo
.
r
oleId
,
memberRoleName
:
memberInfo
.
r
oleName
,
fullAddress
:
fullAddress
.
children
,
fullAddressId
:
res
.
fullAddressId
,
offer
:
res
.
offer
,
paymentType
:
res
.
paymentType
,
taxes
:
res
.
taxes
,
logistics
:
res
.
logistics
,
packRequire
:
res
.
packRequire
,
otherRequire
:
res
.
otherRequire
,
enclosureUrls
:
res
.
enclosureUrls
,
inquiryListProductRequests
:
res
.
inquiryListProductRequests
,
}
id
&&
(
params
.
id
=
id
);
fetchRequest
({
...
params
}).
then
(
res
=>
{
...
...
@@ -67,10 +78,10 @@ const AddedFormLayout: React.FC<AddedFormLayoutProps> = (props: any) => {
const
getMemberInfo
=
(
value
)
=>
{
form
.
setFieldsValue
({
"memberName"
:
value
.
name
});
setMenberInfo
(
value
)
console
.
log
(
value
)
}
const
getInquiryProduct
=
(
data
)
=>
{
setInquiryProduct
(
data
)
form
.
setFieldsValue
({
"inquiryListProductRequests"
:
data
})
...
...
@@ -96,8 +107,8 @@ const AddedFormLayout: React.FC<AddedFormLayoutProps> = (props: any) => {
})
setMenberInfo
({
memberId
:
data
.
memberId
,
memberR
oleId
:
data
.
memberRoleId
,
memberRoleName
:
data
.
memberRole
Name
,
r
oleId
:
data
.
memberRoleId
,
roleName
:
data
.
member
Name
,
})
setFullAddress
({
children
:
data
.
fullAddress
,
...
...
@@ -143,7 +154,7 @@ const AddedFormLayout: React.FC<AddedFormLayoutProps> = (props: any) => {
}
}
}
>
<
BasicInfoLatyout
getMemberInfo=
{
getMemberInfo
}
/>
<
BasicInfoLatyout
getMemberInfo=
{
getMemberInfo
}
memb=
{
memberInfo
}
/>
<
InquiryProductLayout
getInquiryProduct=
{
getInquiryProduct
}
member=
{
memberInfo
}
setInquiryProduct=
{
inquiryProduct
}
/>
<
TradeTermsLayout
getFullAddress=
{
getFullAddress
}
/>
<
AttachLayout
/>
...
...
src/pages/transaction/dealAbility/productInquiry/waitAddInquiry/components/basicInfo.tsx
View file @
e238ed4c
import
React
,
{
useCallback
,
useState
}
from
'react'
;
import
React
,
{
useCallback
,
use
Effect
,
use
State
}
from
'react'
;
import
{
Row
,
Col
,
Form
,
Input
,
Button
}
from
'antd'
;
import
{
LinkOutlined
}
from
'@ant-design/icons'
;
import
Card
from
'@/pages/transaction/components/card'
;
import
TableModal
from
'@/pages/transaction/components/TableModal'
;
import
{
PublicApi
}
from
'@/services/api'
;
import
style
from
'./index.less'
;
import
{
isEmpty
}
from
'@formily/shared'
;
interface
BasicInfoLayoutProps
{
/** 获取询价会员 */
getMemberInfo
:
(
e
)
=>
void
getMemberInfo
:
(
e
)
=>
void
,
/** 会员信息 */
memb
?:
number
,
}
const
BasicInfoLayout
:
React
.
FC
<
BasicInfoLayoutProps
>
=
(
props
:
any
)
=>
{
const
{
getMemberInfo
}
=
props
;
const
{
getMemberInfo
,
memb
}
=
props
;
const
[
visible
,
setVisible
]
=
useState
<
boolean
>
(
false
);
const
[
member
,
setMember
]
=
useState
<
any
>
({})
...
...
@@ -65,6 +69,19 @@ const BasicInfoLayout: React.FC<BasicInfoLayoutProps> = (props: any) => {
toggle
(
false
)
}
const
hanleGoMall
=
()
=>
{
console
.
log
(
member
)
if
(
member
.
memberId
)
{
window
.
open
(
`/shop?shopId=
${
btoa
(
JSON
.
stringify
({
memberId
:
member
.
memberId
,
roleId
:
member
.
roleId
}))}
`
)
}
}
useEffect
(()
=>
{
if
(
!
isEmpty
(
memb
))
{
setMember
(
memb
)
}
},
[
memb
])
return
(
<
Card
id=
"basicInfoLayout"
...
...
@@ -76,9 +93,9 @@ const BasicInfoLayout: React.FC<BasicInfoLayoutProps> = (props: any) => {
<
Input
/>
</
Form
.
Item
>
</
Col
>
<
Col
span=
{
12
}
>
<
Col
span=
{
12
}
className=
{
style
.
searchColor
}
>
<
Form
.
Item
label=
"被询价会员"
name=
'memberName'
rules=
{
[{
required
:
true
,
message
:
'请选择被询价会员'
}]
}
>
<
Input
.
Search
onSearch=
{
()
=>
toggle
(
true
)
}
readOnly
enterButton=
{
<
Button
style=
{
{
height
:
'31.19px'
}
}
icon=
{
<
LinkOutlined
/>
}
>
选择
</
Button
>
}
/>
<
Input
.
Search
on
Click=
{
hanleGoMall
}
on
Search=
{
()
=>
toggle
(
true
)
}
readOnly
enterButton=
{
<
Button
style=
{
{
height
:
'31.19px'
}
}
icon=
{
<
LinkOutlined
/>
}
>
选择
</
Button
>
}
/>
</
Form
.
Item
>
</
Col
>
</
Row
>
...
...
src/pages/transaction/dealAbility/productInquiry/waitAddInquiry/components/index.less
0 → 100644
View file @
e238ed4c
.searchColor {
:global {
.ant-input-group > .ant-input:first-child, .ant-input-group-addon:first-child {
color: @main-color,
}
}
}
src/pages/transaction/dealAbility/productInquiry/waitAddInquiry/components/inquiryProduct.tsx
View file @
e238ed4c
...
...
@@ -75,7 +75,10 @@ const InquiryProductLayout: React.FC<InquiryProductLayoutProps> = (props: any) =
key
:
"purchaseCount"
,
dataIndex
:
"purchaseCount"
,
render
:
(
text
,
_data
,
index
)
=>
(
<
InputNumber
min=
{
1
}
defaultValue=
{
text
}
onChange=
{
(
val
)
=>
setInputNumber
(
val
,
index
)
}
/>
<
Form
.
Item
initialValue=
{
text
}
name=
{
`purchaseCount${index}`
}
rules=
{
[{
required
:
true
,
message
:
'请输入采购数量'
}]
}
style=
{
{
marginBottom
:
'0px'
}
}
>
<
InputNumber
min=
{
1
}
onChange=
{
(
val
)
=>
setInputNumber
(
val
,
index
)
}
/>
</
Form
.
Item
>
)
},
{
...
...
@@ -130,7 +133,7 @@ const InquiryProductLayout: React.FC<InquiryProductLayoutProps> = (props: any) =
purchaseCount
:
1
,
logistics
:
v
.
logistics
,
memberId
:
v
.
memberId
,
memberRoleId
:
v
.
memberR
oleId
,
memberRoleId
:
v
.
r
oleId
,
imgUrl
:
v
.
mainPic
})
})
...
...
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