Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
J
jinfa-admin
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-admin
Commits
aa18fd06
Commit
aa18fd06
authored
Jul 14, 2021
by
前端-黄佳鑫
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
🐞
fix(需求报价管理): 修改报价详情展示
parent
27bd58d7
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
75 additions
and
24 deletions
+75
-24
global.d.ts
src/global/config/global.d.ts
+2
-2
index.tsx
...lity/components/detail/components/bidInfoLayout/index.tsx
+18
-3
index.tsx
...ents/detail/components/contrastLyout1/rowLayout/index.tsx
+1
-1
index.tsx
src/pages/purchaseAbility/demandBidMgt/quote/index.tsx
+54
-18
No files found.
src/global/config/global.d.ts
View file @
aa18fd06
...
...
@@ -41,7 +41,7 @@ export interface ShopInfo {
describe
:
string
;
state
:
number
;
url
:
string
;
isDefault
:
number
;
isDefault
?:
any
;
}
export
interface
OrderMode
{
...
...
@@ -60,7 +60,7 @@ export interface SiteInfo {
name
:
string
;
logo
:
string
;
siteUrl
:
string
;
symbol
:
string
;
symbol
?:
any
;
}
export
interface
Site
{
...
...
src/pages/purchaseAbility/components/detail/components/bidInfoLayout/index.tsx
View file @
aa18fd06
...
...
@@ -9,6 +9,8 @@ import { CaretDownOutlined, CaretRightOutlined } from '@ant-design/icons';
export
interface
BidInfoProps
{
fetch
?:
()
=>
Promise
<
unknown
>
,
effect
?:
any
,
/** 获取报价轮次 */
getKey
?:
(
e
)
=>
void
,
}
const
chNum
:
{
[
key
:
number
]:
string
}
=
{
...
...
@@ -24,7 +26,7 @@ const chNum: { [key: number]: string } = {
}
const
BidInfoLayout
:
React
.
FC
<
BidInfoProps
>
=
(
props
:
any
)
=>
{
const
{
effect
,
fetch
}
=
props
const
{
effect
,
fetch
,
getKey
}
=
props
const
context
=
useContext
(
Context
);
const
[
dataSource
,
setDataSource
]
=
useState
<
any
>
([]);
const
[
turn
,
setTurn
]
=
useState
<
Array
<
number
>>
([]);
...
...
@@ -110,6 +112,18 @@ const BidInfoLayout: React.FC<BidInfoProps> = (props: any) => {
})
}
const
handleOnChange
=
async
(
key
:
any
)
=>
{
fetchDataSource
({
id
:
effect
.
id
,
turn
:
key
,
current
:
'1'
,
pageSize
:
'10'
,
})
/** 返回给兄弟 */
getKey
(
key
)
}
/** 物料信息 */
useEffect
(()
=>
{
if
(
effect
.
turn
)
{
...
...
@@ -128,9 +142,9 @@ const BidInfoLayout: React.FC<BidInfoProps> = (props: any) => {
id=
'bidInfoLayout'
title=
'报价信息'
>
<
Tabs
defaultActiveKey=
"1"
>
<
Tabs
defaultActiveKey=
"1"
onChange=
{
handleOnChange
}
>
{
turn
.
map
((
item
)
=>
(
<
Tabs
.
TabPane
key=
{
`trun${item}`
}
tab=
{
`第${chNum[item]}轮`
}
>
<
Tabs
.
TabPane
key=
{
item
}
tab=
{
`第${chNum[item]}轮`
}
>
<
Table
className=
{
style
.
tableStyle
}
columns=
{
columns
}
...
...
@@ -172,6 +186,7 @@ const BidInfoLayout: React.FC<BidInfoProps> = (props: any) => {
</
Row
>
</
div
>
),
rowExpandable
:
record
=>
!!
record
.
productId
,
expandIcon
:
({
expanded
,
onExpand
,
record
})
=>
expanded
?
(
<
CaretDownOutlined
onClick=
{
e
=>
onExpand
(
record
,
e
)
}
/>
...
...
src/pages/purchaseAbility/components/detail/components/contrastLyout1/rowLayout/index.tsx
View file @
aa18fd06
...
...
@@ -78,7 +78,7 @@ const RowLayout: React.FC<IProps> = (props: any) => {
<
div
className=
{
style
[
'card-badge'
]
}
>
{
item
.
isDecrypt
===
PRICECONTRAST_TYPE
.
UNENCRYPTED
?
(
priceContrast
===
1
?
'已解密'
:
'未加密'
)
:
'未解密'
}
</
div
>
{
item
.
isDecrypt
===
PRICECONTRAST_TYPE
.
UNENCRYPTED
&&
<
Typography
.
Link
href=
{
`/
memberCenter/procurementAbility/confirmO
ffer/quote/detail?id=${item.id}&number=${item.quotedPriceNo}&turn=${item.turn}`
}
className=
{
style
[
'card-link'
]
}
>
查看报价详情
</
Typography
.
Link
>
}
{
item
.
isDecrypt
===
PRICECONTRAST_TYPE
.
UNENCRYPTED
&&
<
Typography
.
Link
href=
{
`/
purchase/demandBidMgt/o
ffer/quote/detail?id=${item.id}&number=${item.quotedPriceNo}&turn=${item.turn}`
}
className=
{
style
[
'card-link'
]
}
>
查看报价详情
</
Typography
.
Link
>
}
{
item
.
isDecrypt
===
PRICECONTRAST_TYPE
.
UNDECRYPTED
&&
<
Tooltip
placement=
"topLeft"
title=
'当前报价为密封报价,请先解密报价单'
><
Typography
.
Text
className=
{
style
[
'card-link'
]
}
type=
'success'
>
查看报价详情
</
Typography
.
Text
></
Tooltip
>
}
</
div
>
</
Col
>
...
...
src/pages/purchaseAbility/demandBidMgt/quote/index.tsx
View file @
aa18fd06
...
...
@@ -2,7 +2,7 @@ import React, { useState, useEffect, Fragment, useCallback } from 'react';
import
{
PublicApi
}
from
'@/services/api'
;
import
{
history
}
from
'umi'
;
import
moment
from
'moment'
;
import
{
Tag
}
from
'antd'
;
import
{
Tag
,
Typography
}
from
'antd'
;
import
{
Context
}
from
'../../components/detail/components/context'
;
import
PeripheralLayout
from
'../../components/detail'
;
import
BasicLayout
from
'../../components/detail/components/basicLayout'
;
...
...
@@ -13,6 +13,7 @@ import {
OFFTER_EXTERNALSTATE
,
OFFTER_EXTERNALSTATE_COLOR
,
}
from
'../../constants'
;
import
{
LinkOutlined
}
from
'@ant-design/icons'
;
const
TABLINK
=
[
...
...
@@ -25,11 +26,21 @@ const QuoteDetails = () => {
const
format
=
(
text
)
=>
{
return
<>
{
moment
(
text
).
format
(
"YYYY-MM-DD HH:mm:ss"
)
}
</>
}
const
{
query
:
{
id
,
number
},
pathname
}:
any
=
history
.
location
;
const
{
query
:
{
id
,
number
,
turn
},
pathname
}:
any
=
history
.
location
;
const
[
dataSource
,
setDataSource
]
=
useState
<
any
>
({});
const
[
basicEffect
,
setBasicEffect
]
=
useState
<
any
>
([]);
const
[
otherEffect
,
setOtherEffect
]
=
useState
<
any
>
([]);
const
forEachQuotedPriceTurnList
=
(
data
:
any
,
key
:
number
)
=>
{
let
params
:
any
=
{}
data
.
forEach
(
item
=>
{
if
(
Number
(
item
.
turn
)
===
Number
(
key
))
{
params
=
{
...
item
}
}
})
return
params
}
const
handleBasicEffect
=
(
data
:
any
)
=>
{
setBasicEffect
([
{
...
...
@@ -60,7 +71,7 @@ const QuoteDetails = () => {
setOtherEffect
([
{
col
:
[
{
label
:
'交付说明'
,
extra
:
'缺少字段'
},
{
label
:
'交付说明'
,
extra
:
data
.
deliveryDetails
},
{
label
:
'付款说明'
,
extra
:
data
.
payDetails
},
{
label
:
'税费说明'
,
extra
:
data
.
taxes
},
]
...
...
@@ -74,21 +85,40 @@ const QuoteDetails = () => {
},
{
col
:
[
{
label
:
'附件'
,
extra
:
'缺少字段'
},
{
label
:
'附件'
,
extra
:
<>
{
data
.
enclosureUrls
&&
data
.
enclosureUrls
.
map
((
item
:
any
,
index
:
number
)
=>
(
<
Typography
.
Link
style=
{
{
display
:
'block'
,
paddingBottom
:
'8px'
}
}
key=
{
`link_${index + 1}`
}
href=
{
`/api/contract/contractTemplate/downloadContract?contractName=${item.name}&contractUrl=${item.url}`
}
target=
"_blank"
>
<
LinkOutlined
style=
{
{
marginRight
:
'5px'
}
}
/>
{
item
.
name
}
</
Typography
.
Link
>
))
}
</>
},
]
},
])
}
const
fetchDataSource
=
useCallback
(
async
()
=>
{
await
PublicApi
.
getPurchaseQuotedPricePlatformDetails
({
id
,
number
,
current
:
'1'
,
pageSize
:
'1'
}).
then
(
res
=>
{
const
handleOtherCallBack
=
useCallback
((
data
:
any
,
key
:
number
)
=>
{
handleOtherEffect
(
forEachQuotedPriceTurnList
(
data
,
key
))
},
[])
const
fetchDataSource
=
useCallback
(
async
()
=>
{
await
PublicApi
.
getPurchaseQuotedPricePlatformDetails
({
id
,
number
,
current
:
'1'
,
pageSize
:
'1'
}).
then
((
res
:
any
)
=>
{
if
(
res
.
code
!==
1000
)
{
return
;
}
const
{
data
}
=
res
;
setDataSource
(
data
);
handleBasicEffect
(
data
);
handleOther
Effect
(
data
)
handleOther
CallBack
(
data
.
quotedPriceTurnList
||
[],
turn
)
})
},
[])
...
...
@@ -96,22 +126,28 @@ const QuoteDetails = () => {
fetchDataSource
()
},
[])
/** 获取报价信息当前点击的轮次 */
const
handleGetKey
=
(
count
:
number
)
=>
{
handleOtherCallBack
(
dataSource
.
quotedPriceTurnList
||
[],
count
)
}
return
(
<
Context
.
Provider
value=
{
dataSource
}
>
<
PeripheralLayout
no=
{
dataSource
.
quotedPriceNo
}
detail=
{
dataSource
.
quotedDetails
}
tabLink=
{
TABLINK
}
components=
{
<
Fragment
>
<
BasicLayout
effect=
{
basicEffect
}
/>
<
BidInfoLayout
no=
{
dataSource
.
quotedPriceNo
}
detail=
{
dataSource
.
quotedDetails
}
tabLink=
{
TABLINK
}
components=
{
<
Fragment
>
<
BasicLayout
effect=
{
basicEffect
}
/>
<
BidInfoLayout
getKey=
{
handleGetKey
}
fetch=
{
PublicApi
.
getPurchaseConfirmQuotedPriceMaterielDetailed
}
effect=
{
{
turn
:
dataSource
.
count
,
id
}
}
effect=
{
{
turn
,
id
}
}
/>
<
OtherLayout
effect=
{
otherEffect
}
/>
</
Fragment
>
}
<
OtherLayout
effect=
{
otherEffect
}
/>
</
Fragment
>
}
/>
</
Context
.
Provider
>
)
...
...
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