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
linweijiong
jinfa-platform
Commits
f0524e6b
Commit
f0524e6b
authored
May 19, 2021
by
前端-黄佳鑫
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
🐞
fix: 修改采购确认报价bug
parent
e45be8ef
Hide whitespace changes
Inline
Side-by-side
Showing
14 changed files
with
523 additions
and
31 deletions
+523
-31
demamdPlan.ts
config/routes/procurementRoute/demamdPlan.ts
+66
-3
index.tsx
...ges/transaction/purchaseAbility/components/card/index.tsx
+6
-5
index.tsx
...lity/components/detail/components/bidInfoLayout/index.tsx
+0
-2
index.less
...Ability/components/detail/components/bidLayout/index.less
+0
-0
index.tsx
...eAbility/components/detail/components/bidLayout/index.tsx
+18
-0
index.less
...y/components/detail/components/bidResultLayout/index.less
+47
-0
index.tsx
...ty/components/detail/components/bidResultLayout/index.tsx
+159
-0
index.tsx
...bility/components/detail/components/recordLyout/index.tsx
+1
-1
index.tsx
...ansaction/purchaseAbility/confirmOffer/contrast/index.tsx
+15
-7
demandPlan.ts
...pages/transaction/purchaseAbility/constants/demandPlan.ts
+9
-0
index.tsx
...tion/purchaseAbility/demandPlan/demandPlanAdded/index.tsx
+31
-10
index.tsx
...s/transaction/purchaseAbility/demandPlan/detail/index.tsx
+149
-0
index.tsx
...pages/transaction/purchaseAbility/offter/detail/index.tsx
+22
-2
material.tsx
...bility/purchaseInquiry/addInquiry/components/material.tsx
+0
-1
No files found.
config/routes/procurementRoute/demamdPlan.ts
View file @
f0524e6b
...
@@ -17,15 +17,38 @@ export const demandPlanRoute = [
...
@@ -17,15 +17,38 @@ export const demandPlanRoute = [
component
:
'@/pages/transaction/purchaseAbility/demandPlan/demandPlanSearch'
component
:
'@/pages/transaction/purchaseAbility/demandPlan/demandPlanSearch'
},
},
{
{
/** 需求计划查询 - 详情 */
path
:
'/memberCenter/procurementAbility/demandPlan/preview'
,
name
:
'需求计划查询'
,
component
:
'@/pages/transaction/purchaseAbility/demandPlan/detail'
,
hideInMenu
:
true
,
noMargin
:
true
,
},
{
/** 待新增需求计划 */
/** 待新增需求计划 */
path
:
'/memberCenter/procurementAbility/demandPlan/demandPlanAdded'
,
path
:
'/memberCenter/procurementAbility/demandPlan/demandPlanAdded'
,
name
:
'待新增需求计划'
,
name
:
'待新增需求计划'
,
component
:
'@/pages/transaction/purchaseAbility/demandPlan/demandPlanAdded'
component
:
'@/pages/transaction/purchaseAbility/demandPlan/demandPlanAdded'
},
},
{
{
/** 待新增需求计划 */
/** 待新增需求计划
- 详情
*/
path
:
'/memberCenter/procurementAbility/demandPlan/demandPlanAdded/
add
'
,
path
:
'/memberCenter/procurementAbility/demandPlan/demandPlanAdded/
preview
'
,
name
:
'待新增需求计划'
,
name
:
'待新增需求计划'
,
component
:
'@/pages/transaction/purchaseAbility/demandPlan/detail'
,
hideInMenu
:
true
,
noMargin
:
true
,
},
{
/** 新增需求计划 */
path
:
'/memberCenter/procurementAbility/demandPlan/demandPlanAdded/add'
,
name
:
'新增需求计划'
,
component
:
'@/pages/transaction/purchaseAbility/demandPlan/demandPlanAdded/add'
,
hideInMenu
:
true
,
},
{
/** 修改需求计划 */
path
:
'/memberCenter/procurementAbility/demandPlan/demandPlanAdded/edit'
,
name
:
'修改需求计划'
,
component
:
'@/pages/transaction/purchaseAbility/demandPlan/demandPlanAdded/add'
,
component
:
'@/pages/transaction/purchaseAbility/demandPlan/demandPlanAdded/add'
,
hideInMenu
:
true
,
hideInMenu
:
true
,
},
},
...
@@ -36,17 +59,57 @@ export const demandPlanRoute = [
...
@@ -36,17 +59,57 @@ export const demandPlanRoute = [
component
:
'@/pages/transaction/purchaseAbility/demandPlan/demandPlanOne'
component
:
'@/pages/transaction/purchaseAbility/demandPlan/demandPlanOne'
},
},
{
{
/** 待审核需求计划(一级) - 详情 */
path
:
'/memberCenter/procurementAbility/demandPlan/demandPlanOne/preview'
,
name
:
'待新增需求计划'
,
component
:
'@/pages/transaction/purchaseAbility/demandPlan/detail'
,
hideInMenu
:
true
,
noMargin
:
true
,
},
{
/** 待审核需求计划(一级) - 详情 */
path
:
'/memberCenter/procurementAbility/demandPlan/demandPlanOne/detail'
,
name
:
'待新增需求计划'
,
component
:
'@/pages/transaction/purchaseAbility/demandPlan/detail'
,
hideInMenu
:
true
,
noMargin
:
true
,
},
{
/** 待审核需求计划(二级) */
/** 待审核需求计划(二级) */
path
:
'/memberCenter/procurementAbility/demandPlan/demandPlanTwo'
,
path
:
'/memberCenter/procurementAbility/demandPlan/demandPlanTwo'
,
name
:
'待审核需求计划(二级)'
,
name
:
'待审核需求计划(二级)'
,
component
:
'@/pages/transaction/purchaseAbility/demandPlan/demandPlanTwo'
component
:
'@/pages/transaction/purchaseAbility/demandPlan/demandPlanTwo'
},
},
{
{
/** 待审核需求计划(二级) - 详情 */
path
:
'/memberCenter/procurementAbility/demandPlan/demandPlanTwo/preview'
,
name
:
'待新增需求计划'
,
component
:
'@/pages/transaction/purchaseAbility/demandPlan/detail'
,
hideInMenu
:
true
,
noMargin
:
true
,
},
{
/** 待审核需求计划(二级) - 详情 */
path
:
'/memberCenter/procurementAbility/demandPlan/demandPlanTwo/detail'
,
name
:
'待新增需求计划'
,
component
:
'@/pages/transaction/purchaseAbility/demandPlan/detail'
,
hideInMenu
:
true
,
noMargin
:
true
,
},
{
/** 待提交需求计划 */
/** 待提交需求计划 */
path
:
'/memberCenter/procurementAbility/demandPlan/demandPlanSubmit'
,
path
:
'/memberCenter/procurementAbility/demandPlan/demandPlanSubmit'
,
name
:
'待提交需求计划'
,
name
:
'待提交需求计划'
,
component
:
'@/pages/transaction/purchaseAbility/demandPlan/demandPlanSubmit'
component
:
'@/pages/transaction/purchaseAbility/demandPlan/demandPlanSubmit'
}
},
{
/** 待提交需求计划 - 详情 */
path
:
'/memberCenter/procurementAbility/demandPlan/demandPlanSubmit/preview'
,
name
:
'待新增需求计划'
,
component
:
'@/pages/transaction/purchaseAbility/demandPlan/detail'
,
hideInMenu
:
true
,
noMargin
:
true
,
},
]
]
}
}
]
]
src/pages/transaction/purchaseAbility/components/card/index.tsx
View file @
f0524e6b
...
@@ -5,15 +5,16 @@ export interface CardType {
...
@@ -5,15 +5,16 @@ export interface CardType {
id
?:
string
,
id
?:
string
,
title
?:
string
,
title
?:
string
,
extra
?:
React
.
ReactNode
,
extra
?:
React
.
ReactNode
,
backgroundColor
?:
string
,
}
}
const
Card
:
React
.
FC
<
CardType
>
=
(
props
:
any
)
=>
{
const
Card
:
React
.
FC
<
CardType
>
=
(
props
:
any
)
=>
{
const
{
id
,
title
,
extra
,
children
}
=
props
;
const
{
id
,
title
,
extra
,
children
,
backgroundColor
}
=
props
;
return
(
return
(
<
div
id=
{
id
}
className=
'ant-card ant-card-bordered'
>
<
div
id=
{
id
}
className=
'ant-card ant-card-bordered'
style=
{
{
overflow
:
'hidden'
}
}
>
<
div
className=
'ant-card-head'
>
<
div
className=
'ant-card-head'
style=
{
{
padding
:
0
,
backgroundColor
:
backgroundColor
?
backgroundColor
:
'transparent'
}
}
>
<
div
className=
'ant-card-head-wrapper'
>
<
div
className=
'ant-card-head-wrapper'
style=
{
{
padding
:
'12px 16px'
}
}
>
<
div
className=
'ant-card-head-wrapper'
>
<
div
className=
'ant-card-head-wrapper'
style=
{
{
color
:
backgroundColor
?
'#FFF'
:
'#303133'
}
}
>
{
title
}
{
title
}
</
div
>
</
div
>
{
extra
&&
{
extra
&&
...
...
src/pages/transaction/purchaseAbility/components/detail/components/bidInfoLayout/index.tsx
View file @
f0524e6b
...
@@ -2,11 +2,9 @@ import React, { useContext, useEffect, useState } from 'react';
...
@@ -2,11 +2,9 @@ import React, { useContext, useEffect, useState } from 'react';
import
{
Tabs
,
Table
,
Row
,
Col
,
Space
,
Typography
,
Button
}
from
'antd'
;
import
{
Tabs
,
Table
,
Row
,
Col
,
Space
,
Typography
,
Button
}
from
'antd'
;
import
{
Context
}
from
'../context'
;
import
{
Context
}
from
'../context'
;
import
Card
from
'../../../card'
;
import
Card
from
'../../../card'
;
import
{
PublicApi
}
from
'@/services/api'
;
import
style
from
'./index.less'
;
import
style
from
'./index.less'
;
import
{
CaretDownOutlined
,
CaretRightOutlined
}
from
'@ant-design/icons'
;
import
{
CaretDownOutlined
,
CaretRightOutlined
}
from
'@ant-design/icons'
;
import
CrossSellProducts
from
'@/pages/transaction/purchaseAbility/offter/addOffter/modal/crossSellProducts'
;
import
CrossSellProducts
from
'@/pages/transaction/purchaseAbility/offter/addOffter/modal/crossSellProducts'
;
import
{
truncate
}
from
'lodash'
;
export
type
effectType
=
{
export
type
effectType
=
{
/** 报价轮次 */
/** 报价轮次 */
...
...
src/pages/transaction/purchaseAbility/components/detail/components/bidLayout/index.less
0 → 100644
View file @
f0524e6b
src/pages/transaction/purchaseAbility/components/detail/components/bidLayout/index.tsx
0 → 100644
View file @
f0524e6b
import
React
,
{
useContext
}
from
'react'
;
import
{
Context
}
from
'../context'
;
import
Card
from
'../../../card'
;
const
BidLayout
=
()
=>
{
const
context
=
useContext
(
Context
);
console
.
log
(
context
.
awardResults
)
return
(
<
Card
id=
'bidLayout'
title=
'中标通知'
backgroundColor=
'#00B37A'
>
<
div
style=
{
{
whiteSpace
:
'pre'
}
}
>
{
context
.
awardResults
}
</
div
>
</
Card
>
)
}
export
default
BidLayout
;
src/pages/transaction/purchaseAbility/components/detail/components/bidResultLayout/index.less
0 → 100644
View file @
f0524e6b
.tableStyle {
:global {
.ant-table-thead {
tr {
th {
padding: 10px;
.ant-space-item {
margin-bottom: 0;
}
}
}
}
.ant-table-expanded-row td {
padding: 0;
}
}
}
.childrenWrap {
background-color: #fff;
.childrenTitle {
height: 100%;
background: linear-gradient(to left, #FFFFFF, #DAF2E7);
color: #00B37A;
p {
padding-left: 16px;
margin: 0;
font-size: 12px;
height: 14px;
line-height: 14px;
}
padding: 12px 0;
}
.childrenContent {
margin-top: 8px;
p {
margin: 0;
span {
height: 12px;
font-size: 12px;
font-weight: 400;
color: #909399;
line-height: 12px;
padding-right: 10px;
}
}
}
}
src/pages/transaction/purchaseAbility/components/detail/components/bidResultLayout/index.tsx
0 → 100644
View file @
f0524e6b
import
React
,
{
useEffect
,
useState
,
useContext
}
from
'react'
;
import
{
Space
,
Typography
,
Table
,
Row
,
Col
}
from
'antd'
;
import
{
Context
}
from
'../context'
;
import
Card
from
'../../../card'
;
import
style
from
'./index.less'
;
import
{
CaretDownOutlined
,
CaretRightOutlined
}
from
'@ant-design/icons'
;
export
interface
BidResultProps
{
fetch
?:
()
=>
Promise
<
unknown
>
,
}
const
BidResultLayout
:
React
.
FC
<
BidResultProps
>
=
(
props
:
any
)
=>
{
const
{
fetch
}
=
props
;
const
[
dataSource
,
setDataSource
]
=
useState
<
any
>
([]);
const
[
totalAmount
,
setTotalAmount
]
=
useState
<
number
>
(
0
);
const
context
=
useContext
(
Context
);
const
columns
=
[
{
title
:
'物料编号/名称'
,
key
:
'number'
,
dataIndex
:
'number'
},
{
title
:
'规格'
,
key
:
'model'
,
dataIndex
:
'model'
},
{
title
:
'品类'
,
key
:
'category'
,
dataIndex
:
'category'
},
{
title
:
'品牌'
,
key
:
'brand'
,
dataIndex
:
'brand'
},
{
title
:
'采购数量/单位'
,
key
:
'purchaseCount'
,
dataIndex
:
'purchaseCount'
,
render
:
(
text
:
any
,
record
:
any
)
=>
(
<>
<
Typography
.
Text
>
{
text
}
</
Typography
.
Text
>
<
Typography
.
Text
type=
"secondary"
>
{
`(${record.unit})`
}
</
Typography
.
Text
>
</>
)
},
{
title
:
'含税/税率'
,
key
:
'isTax'
,
dataIndex
:
'isTax'
},
{
title
:
'单价(含税)'
,
key
:
'taxUnitPrice'
,
dataIndex
:
'taxUnitPrice'
},
{
title
:
(
<
Space
direction=
'vertical'
>
<
Typography
.
Text
>
金额(含税)
</
Typography
.
Text
>
<
Typography
.
Text
>
合计: ¥
{
totalAmount
.
toFixed
(
2
)
}
</
Typography
.
Text
>
</
Space
>
),
key
:
'taxPrice'
,
dataIndex
:
'taxPrice'
}
]
/** 物料信息 */
const
fetchDataSource
=
async
(
params
:
any
)
=>
{
await
fetch
({
...
params
}).
then
((
res
:
any
)
=>
{
if
(
res
.
code
!==
1000
)
{
return
}
const
{
data
}
=
res
.
data
setDataSource
(
data
)
let
total
:
number
=
0
;
data
.
forEach
((
item
)
=>
{
total
+=
item
.
taxPrice
})
setTotalAmount
(
total
)
})
}
const
splitProductAttributeJson
=
(
name
:
string
,
num
:
number
)
=>
{
const
arr
=
name
.
split
(
'-'
);
return
arr
[
num
]
}
/** 物料信息 */
useEffect
(()
=>
{
if
(
context
.
memberId
)
{
fetchDataSource
({
id
:
context
.
purchaseInquiryId
,
memberId
:
context
.
createMemberId
,
memberRoleId
:
context
.
createMemberRoleId
,
current
:
'1'
,
pageSize
:
'10'
,
})
}
},
[
context
])
return
(
<
Card
id=
'bidResultLayout'
title=
'授标结果'
>
<
Table
className=
{
style
.
tableStyle
}
columns=
{
columns
}
rowKey=
'id'
expandable=
{
{
expandedRowRender
:
record
=>
(
<
div
className=
{
style
.
childrenWrap
}
>
<
Row
>
<
Col
span=
{
3
}
>
<
div
className=
{
style
.
childrenTitle
}
>
<
p
>
对应
</
p
>
<
p
>
招标商品
</
p
>
</
div
>
</
Col
>
<
Col
span=
{
6
}
>
<
div
className=
{
style
.
childrenContent
}
>
<
p
><
span
>
商品ID:
</
span
>
{
record
.
productId
}
</
p
>
<
p
><
span
>
商品名称:
</
span
>
{
record
.
productName
}
</
p
>
</
div
>
</
Col
>
<
Col
span=
{
6
}
>
<
div
className=
{
style
.
childrenContent
}
>
<
p
><
span
>
规格:
</
span
>
{
splitProductAttributeJson
(
record
.
productAttributeJson
,
0
)
}
</
p
>
<
p
><
span
>
品类:
</
span
>
{
splitProductAttributeJson
(
record
.
productAttributeJson
,
1
)
}
</
p
>
</
div
>
</
Col
>
<
Col
span=
{
6
}
>
<
div
className=
{
style
.
childrenContent
}
>
<
p
><
span
>
品牌:
</
span
>
{
record
.
productBrand
}
</
p
>
</
div
>
</
Col
>
</
Row
>
</
div
>
),
expandIcon
:
({
expanded
,
onExpand
,
record
})
=>
expanded
?
(
<
CaretDownOutlined
onClick=
{
e
=>
onExpand
(
record
,
e
)
}
/>
)
:
(
<
CaretRightOutlined
onClick=
{
e
=>
onExpand
(
record
,
e
)
}
/>
)
}
}
dataSource=
{
dataSource
}
pagination=
{
{
size
:
"small"
}
}
/>
</
Card
>
)
}
export
default
BidResultLayout
;
src/pages/transaction/purchaseAbility/components/detail/components/recordLyout/index.tsx
View file @
f0524e6b
...
@@ -30,7 +30,7 @@ const RecordLayout: React.FC<ProgressProps> = () => {
...
@@ -30,7 +30,7 @@ const RecordLayout: React.FC<ProgressProps> = () => {
defaultValue=
{
LOGSTATESTYPE
.
EXTERNALSTATES
}
defaultValue=
{
LOGSTATESTYPE
.
EXTERNALSTATES
}
>
>
{
context
.
externalLogs
&&
<
Radio
.
Button
value=
{
LOGSTATESTYPE
.
EXTERNALSTATES
}
>
外部流转
</
Radio
.
Button
>
}
{
context
.
externalLogs
&&
<
Radio
.
Button
value=
{
LOGSTATESTYPE
.
EXTERNALSTATES
}
>
外部流转
</
Radio
.
Button
>
}
{
context
.
external
Logs
&&
<
Radio
.
Button
value=
{
LOGSTATESTYPE
.
INTERIORSTATES
}
>
内部流转
</
Radio
.
Button
>
}
{
context
.
interior
Logs
&&
<
Radio
.
Button
value=
{
LOGSTATESTYPE
.
INTERIORSTATES
}
>
内部流转
</
Radio
.
Button
>
}
</
Radio
.
Group
>
</
Radio
.
Group
>
}
}
>
>
...
...
src/pages/transaction/purchaseAbility/confirmOffer/contrast/index.tsx
View file @
f0524e6b
import
React
,
{
useState
,
useEffect
,
Fragment
}
from
'react'
;
import
React
,
{
useState
,
useEffect
,
Fragment
,
useCallback
}
from
'react'
;
import
{
PublicApi
}
from
'@/services/api'
;
import
{
PublicApi
}
from
'@/services/api'
;
import
{
Tag
,
Badge
,
Tooltip
,
Button
}
from
'antd'
;
import
{
Tag
,
Badge
,
Tooltip
,
Button
}
from
'antd'
;
import
{
Context
,
BidDetailContext
}
from
'../../components/detail/components/context'
;
import
{
Context
,
BidDetailContext
}
from
'../../components/detail/components/context'
;
...
@@ -47,6 +47,7 @@ const ContrastPrice = () => {
...
@@ -47,6 +47,7 @@ const ContrastPrice = () => {
const
[
auditDataSource
,
setAuditDataSource
]
=
useState
<
any
>
([]);
const
[
auditDataSource
,
setAuditDataSource
]
=
useState
<
any
>
([]);
const
[
link
]
=
useState
<
string
>
(
pathname
.
split
(
'/'
)[
pathname
.
split
(
'/'
).
length
-
1
]);
const
[
link
]
=
useState
<
string
>
(
pathname
.
split
(
'/'
)[
pathname
.
split
(
'/'
).
length
-
1
]);
const
[
path
]
=
useState
<
string
>
(
pathname
.
split
(
'/'
)[
pathname
.
split
(
'/'
).
length
-
2
]);
const
[
path
]
=
useState
<
string
>
(
pathname
.
split
(
'/'
)[
pathname
.
split
(
'/'
).
length
-
2
]);
const
[
companyJoinUs
,
setCompanyJoinUs
]
=
useState
<
any
>
([])
const
[
bid
,
setBid
]
=
useState
<
any
>
({});
const
[
bid
,
setBid
]
=
useState
<
any
>
({});
const
handleBasicEffect
=
(
data
:
any
)
=>
{
const
handleBasicEffect
=
(
data
:
any
)
=>
{
...
@@ -154,14 +155,10 @@ const ContrastPrice = () => {
...
@@ -154,14 +155,10 @@ const ContrastPrice = () => {
company
.
push
(
`
${
item
.
memberName
}
(中标总金额(含税):¥
${
item
.
sumPrice
}
)`
)
company
.
push
(
`
${
item
.
memberName
}
(中标总金额(含税):¥
${
item
.
sumPrice
}
)`
)
}
}
})
})
setBid
({
setCompanyJoinUs
(
company
)
id
,
awardResults
:
`
${
dataSource
.
memberName
}
《
${
dataSource
.
details
}
》评标工作已经结束,中标人已经确定。现将中标结果公布如下:\n中标供应商:
${
company
.
join
(
','
)}
\n中标理由:价格最低。`
,
content
:
`贵公司参与了我公司《
${
dataSource
.
details
}
》竞标。在我公司综合各投标单位的基本情况,并进行充分技术交流后,经评标委员会综合评定,贵公司未能中标。我公司对贵公司的积极参与和支持深表感谢!希望下次合作成功。`
,
})
setAuditDataSource
(
data
)
setAuditDataSource
(
data
)
}
}
Object
.
keys
(
dataSource
).
length
>
0
&&
console
.
log
(
dataSource
,
1008689
)
const
fetchLink
=
()
=>
{
const
fetchLink
=
()
=>
{
switch
(
path
)
{
switch
(
path
)
{
case
'auditResultsOne'
:
case
'auditResultsOne'
:
...
@@ -170,6 +167,17 @@ const ContrastPrice = () => {
...
@@ -170,6 +167,17 @@ const ContrastPrice = () => {
return
PublicApi
.
postPurchaseConfirmQuotedPriceStayExamineAward2
return
PublicApi
.
postPurchaseConfirmQuotedPriceStayExamineAward2
}
}
}
}
useEffect
(()
=>
{
if
(
link
!==
'preview'
&&
path
===
'confirmResults'
)
{
setBid
({
id
,
awardResults
:
`
${
dataSource
.
memberName
}
《
${
dataSource
.
details
}
》评标工作已经结束,中标人已经确定。现将中标结果公布如下:\n中标供应商:
${
companyJoinUs
.
join
(
','
)}
\n中标理由:价格最低。`
,
content
:
`贵公司参与了我公司《
${
dataSource
.
details
}
》竞标。在我公司综合各投标单位的基本情况,并进行充分技术交流后,经评标委员会综合评定,贵公司未能中标。我公司对贵公司的积极参与和支持深表感谢!希望下次合作成功。`
,
})
}
},
[
visible
,
dataSource
,
companyJoinUs
])
return
(
return
(
<
Context
.
Provider
value=
{
dataSource
}
>
<
Context
.
Provider
value=
{
dataSource
}
>
<
PeripheralLayout
<
PeripheralLayout
...
...
src/pages/transaction/purchaseAbility/constants/demandPlan.ts
0 → 100644
View file @
f0524e6b
export
const
DEMANDPLAN_INTERNALSTATE_TYPE
{
/** 待提交审核 */
/** 审核不通过(一级) */
/** 审核不通过(二级) */
/** 采购退回 */
}
src/pages/transaction/purchaseAbility/demandPlan/demandPlanAdded/index.tsx
View file @
f0524e6b
import
React
from
'react'
;
import
React
,
{
useRef
}
from
'react'
;
import
{
history
}
from
'umi'
;
import
{
history
}
from
'umi'
;
import
Table
from
'../../components/table'
import
Table
from
'../../components/table'
import
{
ColumnType
}
from
'antd/lib/table/interface'
;
import
{
ColumnType
}
from
'antd/lib/table/interface'
;
import
EyePreview
from
'@/components/EyePreview'
;
import
EyePreview
from
'@/components/EyePreview'
;
import
moment
from
'moment'
;
import
moment
from
'moment'
;
import
{
PublicApi
}
from
'@/services/api'
;
import
{
PublicApi
}
from
'@/services/api'
;
import
{
Row
,
Col
,
Button
,
Badge
,
Space
,
Typography
}
from
'antd'
;
import
{
Row
,
Col
,
Button
,
Badge
,
Space
,
Typography
,
Popconfirm
}
from
'antd'
;
import
{
import
{
OFFTER_INTERNALSTATE_COLOR
,
OFFTER_INTERNALSTATE_COLOR
,
}
from
'../../constants'
;
}
from
'../../constants'
;
...
@@ -13,7 +13,7 @@ import { PlayCircleOutlined, PlusOutlined, PoweroffOutlined } from '@ant-design/
...
@@ -13,7 +13,7 @@ import { PlayCircleOutlined, PlusOutlined, PoweroffOutlined } from '@ant-design/
const
{
Text
}
=
Typography
;
const
{
Text
}
=
Typography
;
const
DemandPlanAdded
=
()
=>
{
const
DemandPlanAdded
=
()
=>
{
cons
ole
.
log
(
'待新增采购需求单'
);
cons
t
ref
=
useRef
<
any
>
({}
);
const
format
=
(
text
)
=>
{
const
format
=
(
text
)
=>
{
return
<>
{
moment
(
text
).
format
(
"YYYY-MM-DD HH:mm:ss"
)
}
</>
return
<>
{
moment
(
text
).
format
(
"YYYY-MM-DD HH:mm:ss"
)
}
</>
}
}
...
@@ -23,7 +23,7 @@ const DemandPlanAdded = () => {
...
@@ -23,7 +23,7 @@ const DemandPlanAdded = () => {
dataIndex
:
'needPlanNo'
,
dataIndex
:
'needPlanNo'
,
render
:
(
text
:
any
,
record
:
any
)
=>
(
render
:
(
text
:
any
,
record
:
any
)
=>
(
<
Space
direction=
'vertical'
size=
{
0
}
>
<
Space
direction=
'vertical'
size=
{
0
}
>
<
EyePreview
url=
{
`/memberCenter/procurementAbility/
offter/auditOffterOne/view?id=${record.id}&number=${record.quotedPriceNo}&turn=${record.turn
}`
}
>
{
text
}
</
EyePreview
>
<
EyePreview
url=
{
`/memberCenter/procurementAbility/
demandPlan/demandPlanAdded/preview?id=${record.id
}`
}
>
{
text
}
</
EyePreview
>
<
Text
>
{
record
.
summary
}
</
Text
>
<
Text
>
{
record
.
summary
}
</
Text
>
</
Space
>
</
Space
>
)
)
...
@@ -61,18 +61,39 @@ const DemandPlanAdded = () => {
...
@@ -61,18 +61,39 @@ const DemandPlanAdded = () => {
dataIndex
:
'operate'
,
dataIndex
:
'operate'
,
render
:
(
text
:
any
,
record
:
any
)
=>
(
render
:
(
text
:
any
,
record
:
any
)
=>
(
<>
<>
<
Button
<
Button
type=
'link'
onClick=
{
()
=>
handleSubmit
(
record
.
id
)
}
>
提交
</
Button
>
type=
'link'
<
Button
type=
'link'
onClick=
{
()
=>
history
.
push
(
`/memberCenter/procurementAbility/demandPlan/demandPlanAdded/edit?id=${record.id}`
)
}
>
修改
</
Button
>
onClick=
{
()
=>
history
.
push
(
`/memberCenter/procurementAbility/offter/auditOffterOne/detail?id=${record.id}&number=${record.quotedPriceNo}`
)
}
>
<
Popconfirm
title=
"确定要删除吗?"
okText=
"是"
cancelText=
"否"
onConfirm=
{
()
=>
handleDelect
(
record
.
id
)
}
>
审核
<
Button
type=
'link'
>
</
Button
>
删除
</
Button
>
</
Popconfirm
>
</>
</>
)
)
}];
}];
const
handleSubmit
=
async
(
id
:
number
)
=>
{
await
PublicApi
.
postPurchaseNeedPlanSubmitExam
({
id
}).
then
(
res
=>
{
if
(
res
.
code
!==
1000
)
{
return
}
ref
.
current
.
reload
();
})
}
const
handleDelect
=
async
(
id
:
number
)
=>
{
await
PublicApi
.
postPurchaseNeedPlanDelete
({
id
}).
then
(
res
=>
{
if
(
res
.
code
!==
1000
)
{
return
}
ref
.
current
.
reload
();
})
}
return
(
return
(
<
Table
<
Table
reload=
{
ref
}
schemaType=
"DEMANDPLANADDED_SECHEMA"
schemaType=
"DEMANDPLANADDED_SECHEMA"
columns=
{
columns
}
columns=
{
columns
}
effects=
"needPlanNo"
effects=
"needPlanNo"
...
...
src/pages/transaction/purchaseAbility/demandPlan/detail/index.tsx
0 → 100644
View file @
f0524e6b
import
React
,
{
Fragment
,
useEffect
,
useState
}
from
'react'
;
import
{
Badge
,
Button
}
from
'antd'
;
import
{
history
}
from
'umi'
;
import
{
PublicApi
}
from
'@/services/api'
;
import
{
Context
}
from
'../../components/detail/components/context'
;
import
PeripheralLayout
from
'../../components/detail'
;
import
ProgressLayout
from
'../../components/detail/components/progressLayout'
;
import
BasicLayout
from
'../../components/detail/components/basicLayout'
;
import
RecordLyout
from
'../../components/detail/components/recordLyout'
;
import
moment
from
'moment'
;
import
{
OFFTER_INTERNALSTATE_COLOR
}
from
'../../constants'
;
import
{
CheckCircleOutlined
}
from
'@ant-design/icons'
;
import
MaterialLayout
from
'../../components/detail/components/materialLayout'
;
import
ModalOperate
from
'../../components/modalOperate'
;
const
ICON_STYLE
:
any
=
{
color
:
'#C0C4CC'
,
fontSize
:
'14px'
,
marginLeft
:
'5px'
}
const
TABLINK
=
[
{
id
:
'progressLayout'
,
title
:
'流转进度'
},
{
id
:
'basicLayout'
,
title
:
'基本信息'
},
{
id
:
'materialLayout'
,
title
:
'采购物料'
},
{
id
:
'recordLyout'
,
title
:
'流转记录'
},
]
const
DemandDetailed
=
()
=>
{
const
format
=
(
text
)
=>
{
return
<>
{
moment
(
text
).
format
(
"YYYY-MM-DD HH:mm:ss"
)
}
</>
}
const
{
query
:
{
id
,
number
},
pathname
,
}
=
history
.
location
;
const
[
path
]
=
useState
(
pathname
.
split
(
'/'
)[
pathname
.
split
(
'/'
).
length
-
1
]);
const
[
pathPci
]
=
useState
(
pathname
.
split
(
'/'
)[
pathname
.
split
(
'/'
).
length
-
2
]);
const
[
visible
,
setVisible
]
=
useState
<
boolean
>
(
false
);
const
[
dataSource
,
setDataSource
]
=
useState
<
any
>
({});
const
[
basicEffect
,
setBasicEffect
]
=
useState
<
any
>
([]);
const
handleBasicEffect
=
(
data
:
any
)
=>
{
setBasicEffect
([
{
col
:
[
{
label
:
'需求计划编号'
,
extra
:
data
.
needPlanNo
},
{
label
:
'需求计划摘要'
,
extra
:
data
.
summary
},
{
label
:
'内部状态'
,
extra
:
<
Badge
status=
{
OFFTER_INTERNALSTATE_COLOR
[
data
.
innerStatus
]
}
text=
{
data
.
innerStatusName
}
/>
},
]
},
{
col
:
[
{
label
:
'需求计划开始'
,
extra
:
format
(
data
.
startTime
)
},
{
label
:
'需求计划截止'
,
extra
:
format
(
data
.
endTime
)
},
]
},
{
col
:
[
{
label
:
'编制部门'
,
extra
:
data
.
department
},
{
label
:
'编制人'
,
extra
:
data
.
userName
},
{
label
:
'编制时间'
,
extra
:
format
(
data
.
createTime
)
},
]
},
])
}
const
fetchDataSource
=
async
()
=>
{
const
params
=
{
id
,
}
await
PublicApi
.
getPurchaseNeedPlanDetails
({
...
params
}).
then
(
res
=>
{
if
(
res
.
code
!==
1000
)
{
history
.
goBack
();
return
;
}
const
{
data
}
=
res
;
setDataSource
(
data
);
handleBasicEffect
(
data
);
})
}
useEffect
(()
=>
{
fetchDataSource
();
},
[])
const
fetchLink
=
()
=>
{
let
fetchSoure
:
any
=
null
;
switch
(
pathPci
)
{
case
'auditInquiryOne'
:
fetchSoure
=
PublicApi
.
postPurchasePurchaseInquiryExamine1
break
;
case
'auditInquiryTwo'
:
fetchSoure
=
PublicApi
.
postPurchasePurchaseInquiryExamine2
break
;
}
return
fetchSoure
}
return
(
<
Context
.
Provider
value=
{
dataSource
}
>
<
PeripheralLayout
no=
{
dataSource
.
purchaseInquiryNo
}
tabLink=
{
TABLINK
}
effect=
{
<>
{
path
===
'detail'
&&
(
<
Button
onClick=
{
()
=>
setVisible
(
true
)
}
type=
'primary'
>
<
CheckCircleOutlined
/>
单据审核
</
Button
>
)
}
</>
}
components=
{
<
Fragment
>
<
ProgressLayout
/>
<
BasicLayout
effect=
{
basicEffect
}
/>
<
MaterialLayout
id=
{
id
}
number=
{
number
}
fetch=
{
PublicApi
.
getPurchasePurchaseInquiryProductlistList
}
/>
<
RecordLyout
/>
</
Fragment
>
}
/>
<
ModalOperate
id=
{
id
}
title=
"单据审核"
modalType=
"audit"
visible=
{
visible
}
fetch=
{
fetchLink
()
}
onCancel=
{
()
=>
setVisible
(
false
)
}
onOk=
{
()
=>
history
.
goBack
()
}
/>
</
Context
.
Provider
>
)
}
export
default
DemandDetailed
;
src/pages/transaction/purchaseAbility/offter/detail/index.tsx
View file @
f0524e6b
...
@@ -19,8 +19,10 @@ import {
...
@@ -19,8 +19,10 @@ import {
OFFTER_INTERNALSTATE_COLOR
OFFTER_INTERNALSTATE_COLOR
}
from
'../../constants'
;
}
from
'../../constants'
;
import
{
CheckCircleOutlined
,
LinkOutlined
}
from
'@ant-design/icons'
;
import
{
CheckCircleOutlined
,
LinkOutlined
}
from
'@ant-design/icons'
;
import
BidLayout
from
'../../components/detail/components/bidLayout'
;
import
BidResultLayout
from
'../../components/detail/components/bidResultLayout'
;
const
TABLINK
=
[
const
TABLINK
1
=
[
{
id
:
'progressLayout'
,
title
:
'流转进度'
},
{
id
:
'progressLayout'
,
title
:
'流转进度'
},
{
id
:
'basicLayout'
,
title
:
'基本信息'
},
{
id
:
'basicLayout'
,
title
:
'基本信息'
},
{
id
:
'contrastLyout'
,
title
:
'报价信息'
},
{
id
:
'contrastLyout'
,
title
:
'报价信息'
},
...
@@ -28,6 +30,16 @@ const TABLINK = [
...
@@ -28,6 +30,16 @@ const TABLINK = [
{
id
:
'recordLyout'
,
title
:
'流转记录'
},
{
id
:
'recordLyout'
,
title
:
'流转记录'
},
]
]
const
TABLINK2
=
[
{
id
:
'progressLayout'
,
title
:
'流转进度'
},
{
id
:
'basicLayout'
,
title
:
'基本信息'
},
{
id
:
'bidLayout'
,
title
:
'中标通知'
},
{
id
:
'bidResultLayout'
,
title
:
'授标结果'
},
{
id
:
'contrastLyout'
,
title
:
'报价信息'
},
{
id
:
'otherLyout'
,
title
:
'其他说明'
},
{
id
:
'recordLyout'
,
title
:
'流转记录'
},
]
const
QuoteDetails
=
()
=>
{
const
QuoteDetails
=
()
=>
{
const
format
=
(
text
)
=>
{
const
format
=
(
text
)
=>
{
return
<>
{
moment
(
text
).
format
(
"YYYY-MM-DD HH:mm:ss"
)
}
</>
return
<>
{
moment
(
text
).
format
(
"YYYY-MM-DD HH:mm:ss"
)
}
</>
...
@@ -139,7 +151,7 @@ const QuoteDetails = () => {
...
@@ -139,7 +151,7 @@ const QuoteDetails = () => {
<
PeripheralLayout
<
PeripheralLayout
no=
{
dataSource
.
quotedPriceNo
}
no=
{
dataSource
.
quotedPriceNo
}
detail=
{
dataSource
.
quotedDetails
}
detail=
{
dataSource
.
quotedDetails
}
tabLink=
{
TABLINK
}
tabLink=
{
(
pathPci
===
'offter'
&&
dataSource
.
externalState
===
99
)
?
TABLINK2
:
TABLINK1
}
effect=
{
effect=
{
<>
<>
{
path
===
'detail'
{
path
===
'detail'
...
@@ -158,6 +170,14 @@ const QuoteDetails = () => {
...
@@ -158,6 +170,14 @@ const QuoteDetails = () => {
<
Fragment
>
<
Fragment
>
<
ProgressLayout
/>
<
ProgressLayout
/>
<
BasicLayout
effect=
{
basicEffect
}
/>
<
BasicLayout
effect=
{
basicEffect
}
/>
{
(
pathPci
===
'offter'
&&
dataSource
.
externalState
===
99
)
&&
(
<>
<
BidLayout
/>
<
BidResultLayout
fetch=
{
PublicApi
.
getPurchaseQuotedPriceProductlistListContract
}
/>
</>
)
}
<
BidInfoLayout
<
BidInfoLayout
fetch=
{
PublicApi
.
getPurchaseQuotedPriceMaterielDetailed
}
fetch=
{
PublicApi
.
getPurchaseQuotedPriceMaterielDetailed
}
effect=
{
{
turn
,
id
}
}
effect=
{
{
turn
,
id
}
}
...
...
src/pages/transaction/purchaseAbility/purchaseInquiry/addInquiry/components/material.tsx
View file @
f0524e6b
...
@@ -150,7 +150,6 @@ const Material: React.FC<Iprops> = (props: any) => {
...
@@ -150,7 +150,6 @@ const Material: React.FC<Iprops> = (props: any) => {
style=
{
{
margin
:
0
}
}
style=
{
{
margin
:
0
}
}
name=
{
`brand_${index + 1}`
}
name=
{
`brand_${index + 1}`
}
initialValue=
{
text
}
initialValue=
{
text
}
rules=
{
[{
required
:
true
,
message
:
'请输入'
}]
}
>
>
<
Input
onChange=
{
(
e
)
=>
handleEdit
(
e
,
'brand'
,
index
)
}
/>
<
Input
onChange=
{
(
e
)
=>
handleEdit
(
e
,
'brand'
,
index
)
}
/>
</
Form
.
Item
>
</
Form
.
Item
>
...
...
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