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
af49596b
Commit
af49596b
authored
Jul 21, 2021
by
前端-黄佳鑫
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
🐞
fix(询价报价): 修复bug
parent
2bceb283
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
50 additions
and
19 deletions
+50
-19
index.tsx
...ges/transaction/dealAbility/inquiryOffer/detail/index.tsx
+2
-2
index.tsx
...nsaction/dealAbility/inquiryOffer/inquirySearch/index.tsx
+1
-1
addForm.tsx
...saction/dealAbility/inquiryOffer/waitAddOffer/addForm.tsx
+22
-1
basicInfo.tsx
...bility/inquiryOffer/waitAddOffer/components/basicInfo.tsx
+7
-4
productQuote.tsx
...ity/inquiryOffer/waitAddOffer/components/productQuote.tsx
+13
-8
addForm.tsx
...ion/dealAbility/productInquiry/waitAddInquiry/addForm.tsx
+1
-1
basicInfo.tsx
...ty/productInquiry/waitAddInquiry/components/basicInfo.tsx
+4
-2
No files found.
src/pages/transaction/dealAbility/inquiryOffer/detail/index.tsx
View file @
af49596b
...
...
@@ -173,8 +173,8 @@ const InquiryOfferDetail = () => {
},
{
title
:
'含税/税率'
,
key
:
'
purchaseCount
'
,
dataIndex
:
'
purchaseCount
'
,
key
:
'
isTax
'
,
dataIndex
:
'
isTax
'
,
},
{
title
:
'报价单价'
,
...
...
src/pages/transaction/dealAbility/inquiryOffer/inquirySearch/index.tsx
View file @
af49596b
...
...
@@ -63,7 +63,7 @@ const InquirySearch = () => {
title
:
'操作'
,
key
:
'options'
,
dataIndex
:
'options'
,
render
:
(
text
:
any
,
record
:
any
)
=>
<
Button
disabled=
{
record
.
isQuoted
===
1
}
onClick=
{
()
=>
history
.
push
(
`/memberCenter/tranactionAbility/inquiryOffer/waitAddOffer/offer?id=${record.id}`
)
}
type=
'link'
>
报价
</
Button
>
render
:
(
text
:
any
,
record
:
any
)
=>
<
Button
disabled=
{
record
.
isQuoted
===
1
||
record
.
externalState
===
2
}
onClick=
{
()
=>
history
.
push
(
`/memberCenter/tranactionAbility/inquiryOffer/waitAddOffer/offer?id=${record.id}`
)
}
type=
'link'
>
报价
</
Button
>
}
];
...
...
src/pages/transaction/dealAbility/inquiryOffer/waitAddOffer/addForm.tsx
View file @
af49596b
...
...
@@ -117,6 +117,27 @@ const AddedFormLayout: React.FC<AddedFormLayoutProps> = (props: any) => {
})
}
const
getInquiryInfo
=
(
value
)
=>
{
form
.
setFieldsValue
({
"inquiryListNo"
:
value
.
orderNo
});
setInquiry
({
inquiryListId
:
value
.
orderId
,
inquiryListNo
:
value
.
orderNo
,
})
PublicApi
.
getTransactionProductInquiryDetails
({
id
:
value
.
orderId
.
toString
()
}).
then
(
resolve
=>
{
if
(
resolve
.
code
!==
1000
)
{
return
}
const
{
inquiryListProductRequests
}
=
resolve
.
data
;
inquiryListProductRequests
.
forEach
((
item
:
any
)
=>
{
item
.
money
=
count
(
item
.
purchaseCount
,
item
.
price
)
})
setProductQuote
(
inquiryListProductRequests
);
form
.
setFieldsValue
({
"inquiryListProductRequests"
:
inquiryListProductRequests
,
})
})
}
const
getEnclosureUrls
=
(
data
)
=>
{
setEnclosureUrls
(
data
);
form
.
setFieldsValue
({
...
...
@@ -165,7 +186,7 @@ const AddedFormLayout: React.FC<AddedFormLayoutProps> = (props: any) => {
}
}
}
>
<
BasicInfoLayout
inq=
{
inquiry
}
isEdit=
{
spam
}
/>
<
BasicInfoLayout
getInquiryInfo=
{
getInquiryInfo
}
inq=
{
inquiry
}
isEdit=
{
spam
}
/>
<
ProductQuoteLayout
setProductQuote=
{
productQuote
}
/>
<
OtherExplainLayout
/>
<
AttachLayout
enclosureUrls=
{
enclosureUrls
}
getEnclosureUrls=
{
getEnclosureUrls
}
removeEnclosureUrls=
{
removeEnclosureUrls
}
/>
...
...
src/pages/transaction/dealAbility/inquiryOffer/waitAddOffer/components/basicInfo.tsx
View file @
af49596b
...
...
@@ -11,6 +11,8 @@ import { FORM_FILTER_PATH } from '@/formSchema/const';
import
{
useStateFilterSearchLinkageEffect
}
from
'@/formSchema/effects/useFilterSearch'
;
import
{
isEmpty
}
from
'lodash'
;
interface
BasicInfoLayoutProps
{
/** 获取询价单 */
getInquiryInfo
:
(
e
)
=>
void
,
/** 是否可修改 */
isEdit
?:
boolean
,
/** 询价单信息 */
...
...
@@ -18,7 +20,7 @@ interface BasicInfoLayoutProps {
}
const
BasicInfoLayout
:
React
.
FC
<
BasicInfoLayoutProps
>
=
(
props
:
any
)
=>
{
const
{
isEdit
,
inq
}
=
props
;
const
{
getInquiryInfo
,
isEdit
,
inq
}
=
props
;
const
context
=
useContext
(
Context
);
const
format
=
(
text
,
fmt
?:
string
)
=>
{
return
<>
{
moment
(
text
).
format
(
fmt
||
"YYYY-MM-DD HH:mm:ss"
)
}
</>
...
...
@@ -67,8 +69,8 @@ const BasicInfoLayout: React.FC<BasicInfoLayoutProps> = (props: any) => {
const
handleSubmit
=
(
selectRowKeys
:
string
[]
|
number
[],
selectRowRecord
:
any
)
=>
{
const
target
=
selectRowRecord
[
0
];
getInquiryInfo
(
target
)
setInquiry
(
target
)
console
.
log
(
target
)
toggle
(
false
)
}
...
...
@@ -113,11 +115,12 @@ const BasicInfoLayout: React.FC<BasicInfoLayoutProps> = (props: any) => {
<
TableModal
modalType=
"Drawer"
visible=
{
visible
}
title=
"选择
会员
"
title=
"选择
询价单
"
mode=
"radio"
tableProps=
{
{
rowKey
:
'
i
d'
,
rowKey
:
'
orderI
d'
,
}
}
customKey=
"orderId"
fetchData=
{
handleFetchData
}
onClose=
{
()
=>
toggle
(
false
)
}
onOk=
{
handleSubmit
}
...
...
src/pages/transaction/dealAbility/inquiryOffer/waitAddOffer/components/productQuote.tsx
View file @
af49596b
...
...
@@ -55,6 +55,11 @@ const ProductQuoteLayout: React.FC<ProductQuoteLayoutProps> = (props: any) => {
dataIndex
:
"brand"
,
},
{
title
:
"含税/税率"
,
key
:
"isTax"
,
dataIndex
:
"isTax"
,
},
{
title
:
"采购数量/单位"
,
key
:
"purchaseCount"
,
dataIndex
:
"purchaseCount"
,
...
...
@@ -82,14 +87,14 @@ const ProductQuoteLayout: React.FC<ProductQuoteLayoutProps> = (props: any) => {
key
:
"money"
,
dataIndex
:
"money"
},
//
{
//
title: "操作",
//
key: "operate",
//
dataIndex: "operate",
//
render: (_text, _data, index) => (
//
<Button type="link">历史报价</Button>
//
)
//
},
{
title
:
"操作"
,
key
:
"operate"
,
dataIndex
:
"operate"
,
render
:
(
_text
,
_data
,
index
)
=>
(
<
Button
type=
"link"
>
历史报价
</
Button
>
)
},
]
useEffect
(()
=>
{
...
...
src/pages/transaction/dealAbility/productInquiry/waitAddInquiry/addForm.tsx
View file @
af49596b
...
...
@@ -196,7 +196,7 @@ const AddedFormLayout: React.FC<AddedFormLayoutProps> = (props: any) => {
}
}
}
>
<
BasicInfoLatyout
getMemberInfo=
{
getMemberInfo
}
memb=
{
memberInfo
}
/>
<
BasicInfoLatyout
getMemberInfo=
{
getMemberInfo
}
memb=
{
memberInfo
}
isEdit=
{
spam
}
/>
<
InquiryProductLayout
getInquiryProduct=
{
getInquiryProduct
}
member=
{
memberInfo
}
setInquiryProduct=
{
inquiryProduct
}
/>
<
TradeTermsLayout
getFullAddress=
{
getFullAddress
}
/>
<
AttachLayout
enclosureUrls=
{
enclosureUrls
}
getEnclosureUrls=
{
getEnclosureUrls
}
removeEnclosureUrls=
{
removeEnclosureUrls
}
/>
...
...
src/pages/transaction/dealAbility/productInquiry/waitAddInquiry/components/basicInfo.tsx
View file @
af49596b
...
...
@@ -14,10 +14,12 @@ interface BasicInfoLayoutProps {
getMemberInfo
:
(
e
)
=>
void
,
/** 会员信息 */
memb
?:
number
,
/** 是否可修改 */
isEdit
?:
boolean
,
}
const
BasicInfoLayout
:
React
.
FC
<
BasicInfoLayoutProps
>
=
(
props
:
any
)
=>
{
const
{
getMemberInfo
,
memb
}
=
props
;
const
{
getMemberInfo
,
memb
,
isEdit
}
=
props
;
const
[
visible
,
setVisible
]
=
useState
<
boolean
>
(
false
);
const
[
member
,
setMember
]
=
useState
<
any
>
({})
...
...
@@ -97,7 +99,7 @@ const BasicInfoLayout: React.FC<BasicInfoLayoutProps> = (props: any) => {
</
Col
>
<
Col
span=
{
12
}
className=
{
style
.
searchColor
}
>
<
Form
.
Item
label=
"被询价会员"
name=
'memberName'
rules=
{
[{
required
:
true
,
message
:
'请选择被询价会员'
}]
}
>
<
Input
.
Search
onClick=
{
hanleGoMall
}
onSearch=
{
()
=>
toggle
(
true
)
}
readOnly
enterButton=
{
<
Button
style=
{
{
height
:
'31.19px'
}
}
icon=
{
<
LinkOutlined
/>
}
>
选择
</
Button
>
}
/>
<
Input
.
Search
onClick=
{
hanleGoMall
}
onSearch=
{
()
=>
toggle
(
true
)
}
readOnly
enterButton=
{
<
Button
disabled=
{
isEdit
}
style=
{
{
height
:
'31.19px'
}
}
icon=
{
<
LinkOutlined
/>
}
>
选择
</
Button
>
}
/>
</
Form
.
Item
>
</
Col
>
</
Row
>
...
...
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