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
36c2744e
Commit
36c2744e
authored
Apr 23, 2021
by
前端-黄佳鑫
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
🐞
fix: 修改二轮报价列表显示的问题
parent
e1fa60b2
Hide whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
82 additions
and
40 deletions
+82
-40
index.tsx
...lity/components/detail/components/bidInfoLayout/index.tsx
+14
-3
add.tsx
...ages/transaction/purchaseAbility/offter/addOffter/add.tsx
+4
-3
offer.tsx
...ion/purchaseAbility/offter/addOffter/components/offer.tsx
+57
-30
index.tsx
...es/transaction/purchaseAbility/offter/addOffter/index.tsx
+2
-2
crossSellProducts.tsx
...chaseAbility/offter/addOffter/modal/crossSellProducts.tsx
+0
-2
index.tsx
...tion/purchaseAbility/purchaseInquiry/addInquiry/index.tsx
+2
-0
index.tsx
...purchaseAbility/purchaseInquiry/auditInquiryOne/index.tsx
+1
-0
index.tsx
...purchaseAbility/purchaseInquiry/auditInquiryTwo/index.tsx
+1
-0
index.tsx
...n/purchaseAbility/purchaseInquiry/submitInquiry/index.tsx
+1
-0
No files found.
src/pages/transaction/purchaseAbility/components/detail/components/bidInfoLayout/index.tsx
View file @
36c2744e
...
...
@@ -6,9 +6,15 @@ import { PublicApi } from '@/services/api';
import
style
from
'./index.less'
;
import
{
CaretDownOutlined
,
CaretRightOutlined
}
from
'@ant-design/icons'
;
export
type
effectType
=
{
/** 报价轮次 */
turn
?:
number
,
/** 订单Id */
id
:
number
,
}
export
interface
BidInfoProps
{
fetch
?:
()
=>
Promise
<
unknown
>
,
effect
?:
any
,
effect
?:
effectType
,
}
const
chNum
:
{
[
key
:
number
]:
string
}
=
{
...
...
@@ -132,6 +138,11 @@ const BidInfoLayout: React.FC<BidInfoProps> = (props: any) => {
})
}
const
splitProductAttributeJson
=
(
name
:
string
,
num
:
number
)
=>
{
const
arr
=
name
.
split
(
'-'
);
return
arr
[
num
]
}
return
(
<
Card
id=
'bidInfoLayout'
...
...
@@ -162,8 +173,8 @@ const BidInfoLayout: React.FC<BidInfoProps> = (props: any) => {
</
Col
>
<
Col
span=
{
6
}
>
<
div
className=
{
style
.
childrenContent
}
>
<
p
><
span
>
规格:
</
span
>
-
</
p
>
<
p
><
span
>
品类:
</
span
>
-
</
p
>
<
p
><
span
>
规格:
</
span
>
{
splitProductAttributeJson
(
record
.
productAttributeJson
,
0
)
}
</
p
>
<
p
><
span
>
品类:
</
span
>
{
splitProductAttributeJson
(
record
.
productAttributeJson
,
1
)
}
</
p
>
</
div
>
</
Col
>
<
Col
span=
{
6
}
>
...
...
src/pages/transaction/purchaseAbility/offter/addOffter/add.tsx
View file @
36c2744e
...
...
@@ -55,6 +55,7 @@ const AddForm = () => {
const
fileInfo
:
any
=
{
...
file
};
basicInfo
.
id
=
params
.
purchaseInquiryId
||
params
.
id
;
basicInfo
.
number
=
params
.
purchaseInquiryNo
;
basicInfo
.
contacts
=
params
.
contacts
;
basicInfo
.
purchaseInquiryNo
=
params
.
purchaseInquiryNo
;
basicInfo
.
quotedPriceNo
=
params
.
quotedPriceNo
;
basicInfo
.
memberName
=
params
.
memberName
;
...
...
@@ -62,12 +63,13 @@ const AddForm = () => {
basicInfo
.
createTime
=
params
.
createTime
;
basicInfo
.
externalState
=
params
.
externalState
;
basicInfo
.
interiorState
=
params
.
interiorState
;
offerInfo
.
count
=
params
.
count
||
0
;
offerInfo
.
id
=
params
.
id
;
if
(
pa
rams
.
count
)
{
if
(
pa
th
===
'edit'
)
{
offerInfo
.
materiels
=
params
.
quotedPriceProducts
;
offerInfo
.
count
=
params
.
count
;
}
else
{
offerInfo
.
materiels
=
params
.
materiels
;
offerInfo
.
turn
=
params
.
turn
;
}
/** 修改才有回显下面这些的 */
if
(
path
===
'edit'
)
{
...
...
@@ -85,7 +87,6 @@ const AddForm = () => {
setbasic
(
basicInfo
);
setoffer
(
offerInfo
);
setexplain
(
explainInfo
);
console
.
log
(
res
.
data
,
10086
)
}
})
},
[])
...
...
src/pages/transaction/purchaseAbility/offter/addOffter/components/offer.tsx
View file @
36c2744e
...
...
@@ -36,7 +36,6 @@ const OfferInfo: React.FC<IProps> = (props: any) => {
const
[
record
,
setRecord
]
=
useState
<
any
>
({});
const
[
index
,
setIndex
]
=
useState
<
number
>
();
const
[
data
,
setData
]
=
useState
<
any
>
({});
const
[
dataSource
,
setDataSource
]
=
useState
<
any
>
([]);
const
[
idx
,
setIdx
]
=
useState
<
number
>
(
0
);
/** 修改税率&单价 */
...
...
@@ -107,7 +106,6 @@ const OfferInfo: React.FC<IProps> = (props: any) => {
<
Form
.
Item
name=
{
`isTax${index}`
}
style=
{
{
margin
:
0
}
}
initialValue=
{
text
}
rules=
{
[{
required
:
true
,
message
:
'请选择'
}]
}
>
<
Select
...
...
@@ -129,7 +127,6 @@ const OfferInfo: React.FC<IProps> = (props: any) => {
<
Form
.
Item
style=
{
{
margin
:
0
}
}
name=
{
`taxProbability${index}`
}
initialValue=
{
text
}
rules=
{
[{
required
:
true
,
message
:
'请输入'
}]
}
>
<
Input
...
...
@@ -149,7 +146,6 @@ const OfferInfo: React.FC<IProps> = (props: any) => {
<
Form
.
Item
style=
{
{
margin
:
0
}
}
name=
{
`taxUnitPrice${index}`
}
initialValue=
{
text
}
rules=
{
[{
required
:
true
,
message
:
'请输入'
}]
}
>
<
Input
...
...
@@ -194,13 +190,23 @@ const OfferInfo: React.FC<IProps> = (props: any) => {
query
[
index
].
customerCategoryName
=
params
.
product
.
customerCategoryName
;
query
[
index
].
productName
=
params
.
product
.
name
;
query
[
index
].
productBrand
=
params
.
product
.
brandName
;
query
[
index
].
productAttributeJson
=
productAttributeJson
;
query
[
index
].
productAttributeJson
=
`
${
productAttributeJson
}
-
${
params
.
product
.
customerCategoryName
}
`
;
query
[
index
].
enclosureUrls
=
params
.
files
;
param
[
idx
]
=
[...
query
];
setData
(
param
)
setVisible
(
false
);
}
const
setFieldsValueFn
=
(
params
:
any
)
=>
{
params
.
forEach
((
it
:
any
,
i
:
number
)
=>
{
form
.
setFieldsValue
({
[
'isTax'
+
i
]:
it
.
isTax
,
[
'taxProbability'
+
i
]:
it
.
taxProbability
,
[
'taxUnitPrice'
+
i
]:
it
.
taxUnitPrice
})
})
}
const
fetchTableData
=
(
turn
:
any
,
index
:
number
)
=>
{
const
params
=
{
id
:
fetchdata
.
id
,
...
...
@@ -210,14 +216,31 @@ const OfferInfo: React.FC<IProps> = (props: any) => {
}
const
param
=
{
...
data
};
if
(
name
===
'quote'
)
{
param
[
index
]
=
fetchdata
.
materiels
;
setData
({
...
param
});
PublicApi
.
getPurchasePurchaseInquiryGetMaterielsByPurchaseInquiryId
({
...
params
}).
then
((
res
:
any
)
=>
{
if
(
res
.
code
!==
1000
)
{
return
}
if
(
res
.
data
.
data
.
length
>
0
)
{
console
.
log
(
1
)
param
[
index
]
=
[...
res
.
data
.
data
];
if
(
param
[
index
])
{
setFieldsValueFn
(
param
[
index
])
}
}
else
{
console
.
log
(
2
)
param
[
index
]
=
fetchdata
.
materiels
;
}
setData
({
...
param
});
})
}
else
{
PublicApi
.
getPurchaseQuotedPriceMaterielDetailed
({
...
params
}).
then
((
res
:
any
)
=>
{
if
(
res
.
code
!==
1000
)
{
return
}
param
[
index
]
=
[...
res
.
data
.
data
];
if
(
param
[
index
])
{
setFieldsValueFn
(
param
[
index
])
}
setData
({
...
param
});
})
}
...
...
@@ -226,25 +249,23 @@ const OfferInfo: React.FC<IProps> = (props: any) => {
useEffect
(()
=>
{
if
(
fetchdata
.
id
)
{
const
isTurn
=
fetchdata
.
count
?
fetchdata
.
count
:
1
;
const
isTurn
=
fetchdata
.
turn
?
fetchdata
.
turn
:
1
;
fetchTableData
(
isTurn
,
0
)
}
console
.
log
(
fetchdata
.
count
,
10086
)
if
(
fetchdata
.
count
||
fetchdata
.
count
===
0
)
{
let
aCount
=
0
;
if
(
name
===
'edit'
)
{
aCount
=
fetchdata
.
count
?
(
fetchdata
.
count
+
1
)
:
1
;
}
else
if
(
name
===
'quote'
)
{
aCount
=
fetchdata
.
count
?
(
fetchdata
.
count
+
1
)
:
1
;
}
form
.
setFieldsValue
({
count
:
aCount
})
setCount
(
aCount
);
handleTabs
(
aCount
);
let
aCount
=
0
;
if
(
fetchdata
.
turn
)
{
aCount
=
(
fetchdata
.
turn
+
1
)
}
else
{
aCount
=
1
}
if
(
name
===
'edit'
)
{
aCount
=
fetchdata
.
count
?
(
fetchdata
.
count
+
1
)
:
1
;
}
form
.
setFieldsValue
({
count
:
aCount
})
setCount
(
aCount
);
handleTabs
(
aCount
);
},
[
fetchdata
])
useEffect
(()
=>
{
...
...
@@ -253,7 +274,6 @@ const OfferInfo: React.FC<IProps> = (props: any) => {
form
.
validateFields
().
then
(
res
=>
{
const
detailss
:
any
=
[];
data
[
0
].
forEach
(
item
=>
{
console
.
log
(
item
,
10086
)
detailss
.
push
({
purchaseInquiryDetailsId
:
name
===
'quote'
?
item
.
id
:
item
.
purchaseInquiryDetailsId
,
taxUnitPrice
:
item
.
taxUnitPrice
,
...
...
@@ -263,7 +283,7 @@ const OfferInfo: React.FC<IProps> = (props: any) => {
productId
:
item
.
productId
,
goodsId
:
item
.
goodsId
,
productBrand
:
item
.
productBrand
,
productAttributeJson
:
`
${
item
.
productAttributeJson
}
-
${
item
.
customerCategoryName
}
`
,
productAttributeJson
:
item
.
productAttributeJson
,
})
})
resolve
({
...
...
@@ -283,21 +303,28 @@ const OfferInfo: React.FC<IProps> = (props: any) => {
const
handleRadioGroup
=
(
e
)
=>
{
const
params
=
{
...
data
};
const
{
value
}
=
e
.
target
;
const
index
=
e
.
target
[
'data-index'
]
setCount
(
value
);
const
index
=
e
.
target
[
'data-index'
];
setIdx
(
index
);
setCount
(
value
);
if
(
!
params
[
index
])
{
const
isTurn
=
value
===
1
?
1
:
value
-
1
fetchTableData
(
isTurn
,
index
)
}
else
{
setFieldsValueFn
(
params
[
index
])
}
}
const
splitProductAttributeJson
=
(
name
:
string
,
num
:
number
)
=>
{
const
arr
=
name
.
split
(
'-'
);
return
arr
[
num
]
}
return
(
<
Form
form=
{
form
}
className=
{
style
.
offerStyle
}
>
<
Form
.
Item
name=
'count'
>
<
Form
.
Item
name=
'count'
initialValue=
{
count
}
>
<
Radio
.
Group
onChange=
{
handleRadioGroup
}
>
{
tabs
.
length
>
0
&&
tabs
.
map
((
item
,
index
:
any
)
=>
{
return
(
...
...
@@ -330,8 +357,8 @@ const OfferInfo: React.FC<IProps> = (props: any) => {
</
Col
>
<
Col
span=
{
6
}
>
<
div
className=
{
style
.
childrenContent
}
>
<
p
><
span
>
规格:
</
span
>
{
record
.
productAttributeJson
}
</
p
>
<
p
><
span
>
品类:
</
span
>
{
record
.
customerCategoryName
}
</
p
>
<
p
><
span
>
规格:
</
span
>
{
splitProductAttributeJson
(
record
.
productAttributeJson
,
0
)
}
</
p
>
<
p
><
span
>
品类:
</
span
>
{
splitProductAttributeJson
(
record
.
productAttributeJson
,
1
)
}
</
p
>
</
div
>
</
Col
>
<
Col
span=
{
6
}
>
...
...
src/pages/transaction/purchaseAbility/offter/addOffter/index.tsx
View file @
36c2744e
...
...
@@ -28,7 +28,7 @@ const AddOffter = () => {
dataIndex
:
'quotedPriceNo'
,
render
:
(
text
:
any
,
record
:
any
)
=>
(
<
Space
direction=
'vertical'
>
<
EyePreview
url=
{
`/memberCenter/procurementAbility/offter/addOffter/view?id=${record.id}&number=${record.quotedPriceNo}`
}
>
{
text
}
</
EyePreview
>
<
EyePreview
url=
{
`/memberCenter/procurementAbility/offter/addOffter/view?id=${record.id}&number=${record.quotedPriceNo}
&turn=${record.turn}
`
}
>
{
text
}
</
EyePreview
>
<
Text
type=
'secondary'
>
{
record
.
details
}
</
Text
>
</
Space
>
)
...
...
@@ -39,7 +39,7 @@ const AddOffter = () => {
render
:
(
text
:
any
,
record
:
any
)
=>
(
<
Space
direction=
'vertical'
>
<
EyePreview
url=
{
`/memberCenter/procurementAbility/offter/addOffter/preview?id=${record.purchaseInquiryId}&number=${record.purchaseInquiryNo}
&turn=${record.turn}
`
}
url=
{
`/memberCenter/procurementAbility/offter/addOffter/preview?id=${record.purchaseInquiryId}&number=${record.purchaseInquiryNo}`
}
>
{
text
}
</
EyePreview
>
<
Text
type=
'secondary'
>
{
record
.
memberName
}
</
Text
>
</
Space
>
...
...
src/pages/transaction/purchaseAbility/offter/addOffter/modal/crossSellProducts.tsx
View file @
36c2744e
...
...
@@ -114,8 +114,6 @@ const CrossSellProducts: React.FC<IProps> = (props: any) => {
setFiles
(
arr
);
}
console
.
log
(
record
,
10086
)
return
(
<>
<
Drawer
...
...
src/pages/transaction/purchaseAbility/purchaseInquiry/addInquiry/index.tsx
View file @
36c2744e
...
...
@@ -86,6 +86,7 @@ const AddInquiry = () => {
const
res
=
await
PublicApi
.
postPurchasePurchaseInquirySubmitBatch
({
ids
:
rowkeys
});
if
(
res
.
code
===
1000
)
{
ref
.
current
.
reload
();
setRowKeys
([])
}
}
...
...
@@ -102,6 +103,7 @@ const AddInquiry = () => {
}
if
(
res
.
code
===
1000
)
{
ref
.
current
.
reload
();
setRowKeys
([])
}
}
...
...
src/pages/transaction/purchaseAbility/purchaseInquiry/auditInquiryOne/index.tsx
View file @
36c2744e
...
...
@@ -22,6 +22,7 @@ const AuditInquiryOne = () => {
const
res
=
await
PublicApi
.
postPurchasePurchaseInquiryExamine1Batch
({
ids
:
rowkeys
});
if
(
res
.
code
===
1000
)
{
ref
.
current
.
reload
();
setRowKeys
([])
}
}
const
columns
:
ColumnType
<
any
>
[]
=
[{
...
...
src/pages/transaction/purchaseAbility/purchaseInquiry/auditInquiryTwo/index.tsx
View file @
36c2744e
...
...
@@ -24,6 +24,7 @@ const AuditInquiryTwo = () => {
const
res
=
await
PublicApi
.
postPurchasePurchaseInquiryExamine2Batch
({
ids
:
rowkeys
});
if
(
res
.
code
===
1000
)
{
ref
.
current
.
reload
();
setRowKeys
([])
}
}
const
columns
:
ColumnType
<
any
>
[]
=
[{
...
...
src/pages/transaction/purchaseAbility/purchaseInquiry/submitInquiry/index.tsx
View file @
36c2744e
...
...
@@ -22,6 +22,7 @@ const SubmitInquiry = () => {
const
res
=
await
PublicApi
.
postPurchasePurchaseInquiryCommitBatch
({
ids
:
rowkeys
});
if
(
res
.
code
===
1000
)
{
ref
.
current
.
reload
();
setRowKeys
([])
}
}
const
columns
:
ColumnType
<
any
>
[]
=
[{
...
...
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