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
5a2b2050
Commit
5a2b2050
authored
May 21, 2021
by
前端-黄佳鑫
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
✨
feat: 采购计划管理接口接入
parent
207b3338
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
219 additions
and
38 deletions
+219
-38
purchasePlan.ts
config/routes/procurementRoute/purchasePlan.ts
+8
-0
index.tsx
...ity/components/detail/components/progressLayout/index.tsx
+9
-11
index.tsx
...bility/components/detail/components/recordLyout/index.tsx
+9
-11
index.tsx
...s/transaction/purchaseAbility/demandPlan/detail/index.tsx
+2
-2
index.tsx
...pages/transaction/purchaseAbility/offter/detail/index.tsx
+20
-10
index.tsx
...transaction/purchaseAbility/purchasePlan/detail/index.tsx
+159
-0
index.tsx
...purchaseAbility/purchasePlan/purchasePlanSearch/index.tsx
+1
-1
index.tsx
...purchaseAbility/purchasePlan/purchasePlanSubmit/index.tsx
+11
-3
No files found.
config/routes/procurementRoute/purchasePlan.ts
View file @
5a2b2050
...
...
@@ -39,6 +39,14 @@ export const purchasePlanRoute = [
component
:
'@/pages/transaction/purchaseAbility/purchasePlan/purchasePlanSearch'
},
{
/** 采购计划查询 - 详情 */
path
:
'/memberCenter/procurementAbility/purchasePlan/purchasePlanSearch/preview'
,
name
:
'采购计划查询'
,
component
:
'@/pages/transaction/purchaseAbility/purchasePlan/detail'
,
hideInMenu
:
true
,
noMargin
:
true
,
},
{
/** 待提交审核采购计划 */
path
:
'/memberCenter/procurementAbility/purchasePlan/purchasePlanSubmit'
,
name
:
'待提交审核采购计划'
,
...
...
src/pages/transaction/purchaseAbility/components/detail/components/progressLayout/index.tsx
View file @
5a2b2050
/** 详情通用 - 流转进度 */
import
React
,
{
useContext
,
use
Effect
,
use
State
}
from
'react'
;
import
React
,
{
useContext
,
useState
}
from
'react'
;
import
{
Radio
,
Steps
}
from
'antd'
;
import
{
Context
}
from
'../context'
;
import
Card
from
'../../../card'
;
...
...
@@ -14,17 +14,15 @@ const LOGSTATESTYPE = {
EXMAINEINERIORSTATES
:
3
}
export
interface
ProgressProps
{
}
export
interface
ProgressProps
{
/** 选中哪个radio */
logstate
?:
number
,
}
const
ProgressLayout
:
React
.
FC
<
ProgressProps
>
=
()
=>
{
const
ProgressLayout
:
React
.
FC
<
ProgressProps
>
=
(
props
:
any
)
=>
{
const
{
logstate
}
=
props
;
const
context
=
useContext
(
Context
);
const
[
logStatesStatus
,
setLogStatesStatus
]
=
useState
<
number
>
(
LOGSTATESTYPE
.
EXTERNALSTATES
);
useEffect
(()
=>
{
if
(
!
context
.
externalLogStates
)
{
setLogStatesStatus
(
LOGSTATESTYPE
.
INTERIORSTATES
)
}
},
[
context
])
const
[
logStatesStatus
,
setLogStatesStatus
]
=
useState
<
number
>
(
logstate
||
LOGSTATESTYPE
.
EXTERNALSTATES
);
return
(
<
Card
...
...
@@ -33,7 +31,7 @@ const ProgressLayout: React.FC<ProgressProps> = () => {
extra=
{
<
Radio
.
Group
onChange=
{
(
e
)
=>
setLogStatesStatus
(
e
.
target
.
value
)
}
defaultValue=
{
context
.
externalLogStates
?
LOGSTATESTYPE
.
EXTERNALSTATES
:
LOGSTATESTYPE
.
INTERIORSTATES
}
defaultValue=
{
logStatesStatus
}
>
{
context
.
externalLogStates
&&
<
Radio
.
Button
value=
{
LOGSTATESTYPE
.
EXTERNALSTATES
}
>
外部流转
</
Radio
.
Button
>
}
{
context
.
interiorLogStates
&&
<
Radio
.
Button
value=
{
LOGSTATESTYPE
.
INTERIORSTATES
}
>
内部流转
</
Radio
.
Button
>
}
...
...
src/pages/transaction/purchaseAbility/components/detail/components/recordLyout/index.tsx
View file @
5a2b2050
/** 详情通用 - 流转进度 */
import
React
,
{
useContext
,
use
Effect
,
use
State
}
from
'react'
;
import
React
,
{
useContext
,
useState
}
from
'react'
;
import
{
Radio
,
Table
}
from
'antd'
;
import
{
Context
}
from
'../context'
;
import
Card
from
'../../../card'
;
...
...
@@ -15,17 +15,15 @@ const LOGSTATESTYPE = {
INTERIORSTATES
:
2
}
export
interface
ProgressProps
{}
export
interface
ProgressProps
{
/** 选中哪个radio */
logstate
?:
number
,
}
const
RecordLayout
:
React
.
FC
<
ProgressProps
>
=
()
=>
{
const
RecordLayout
:
React
.
FC
<
ProgressProps
>
=
(
props
:
any
)
=>
{
const
{
logstate
}
=
props
;
const
context
=
useContext
(
Context
);
const
[
logStatus
,
setLogStatus
]
=
useState
<
number
>
(
LOGSTATESTYPE
.
EXTERNALSTATES
);
useEffect
(()
=>
{
if
(
!
context
.
externalLogs
)
{
setLogStatus
(
LOGSTATESTYPE
.
INTERIORSTATES
)
}
},
[
context
])
const
[
logStatus
,
setLogStatus
]
=
useState
<
number
>
(
logstate
||
LOGSTATESTYPE
.
EXTERNALSTATES
);
return
(
<
Card
...
...
@@ -34,7 +32,7 @@ const RecordLayout: React.FC<ProgressProps> = () => {
extra=
{
<
Radio
.
Group
onChange=
{
(
e
)
=>
setLogStatus
(
e
.
target
.
value
)
}
defaultValue=
{
context
.
externalLogs
?
LOGSTATESTYPE
.
EXTERNALSTATES
:
LOGSTATESTYPE
.
INTERIORSTATES
}
defaultValue=
{
logStatus
}
>
{
context
.
externalLogs
&&
<
Radio
.
Button
value=
{
LOGSTATESTYPE
.
EXTERNALSTATES
}
>
外部流转
</
Radio
.
Button
>
}
{
context
.
interiorLogs
&&
<
Radio
.
Button
value=
{
LOGSTATESTYPE
.
INTERIORSTATES
}
>
内部流转
</
Radio
.
Button
>
}
...
...
src/pages/transaction/purchaseAbility/demandPlan/detail/index.tsx
View file @
5a2b2050
...
...
@@ -148,13 +148,13 @@ const DemandDetailed = () => {
}
components=
{
<
Fragment
>
<
ProgressLayout
/>
<
ProgressLayout
logstate=
{
2
}
/>
<
BasicLayout
effect=
{
basicEffect
}
/>
<
DemandPlanMaterialLayout
id=
{
id
}
fetch=
{
PublicApi
.
getPurchaseNeedPlanNeedPlanDetail
}
/>
<
RecordLyout
/>
<
RecordLyout
logstate=
{
2
}
/>
</
Fragment
>
}
/>
...
...
src/pages/transaction/purchaseAbility/offter/detail/index.tsx
View file @
5a2b2050
...
...
@@ -30,15 +30,25 @@ const TABLINK1 = [
{
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
TABLINK2
=
{
0
:
[
{
id
:
'progressLayout'
,
title
:
'流转进度'
},
{
id
:
'basicLayout'
,
title
:
'基本信息'
},
{
id
:
'bidLayout'
,
title
:
'授标结果'
},
{
id
:
'bidInfoLayout'
,
title
:
'报价信息'
},
{
id
:
'otherLyout'
,
title
:
'其他说明'
},
{
id
:
'recordLyout'
,
title
:
'流转记录'
},
],
1
:
[
{
id
:
'progressLayout'
,
title
:
'流转进度'
},
{
id
:
'basicLayout'
,
title
:
'基本信息'
},
{
id
:
'bidLayout'
,
title
:
'中标通知'
},
{
id
:
'bidResultLayout'
,
title
:
'授标结果'
},
{
id
:
'bidInfoLayout'
,
title
:
'报价信息'
},
{
id
:
'otherLyout'
,
title
:
'其他说明'
},
{
id
:
'recordLyout'
,
title
:
'流转记录'
},
]
}
const
QuoteDetails
=
()
=>
{
const
format
=
(
text
)
=>
{
...
...
@@ -151,7 +161,7 @@ const QuoteDetails = () => {
<
PeripheralLayout
no=
{
dataSource
.
quotedPriceNo
}
detail=
{
dataSource
.
quotedDetails
}
tabLink=
{
(
pathPci
===
'offter'
&&
dataSource
.
externalState
===
99
)
?
TABLINK2
:
TABLINK1
}
tabLink=
{
(
pathPci
===
'offter'
&&
dataSource
.
externalState
===
99
)
?
TABLINK2
[
dataSource
.
isPrize
]
:
TABLINK1
}
effect=
{
<>
{
path
===
'detail'
...
...
src/pages/transaction/purchaseAbility/purchasePlan/detail/index.tsx
0 → 100644
View file @
5a2b2050
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
{
MinusCircleOutlined
}
from
'@ant-design/icons'
;
import
ModalOperate
from
'../../components/modalOperate'
;
import
DemandPlanMaterialLayout
from
'../../components/detail/components/demandPlanMaterialLayout'
;
const
TABLINK
=
[
{
id
:
'progressLayout'
,
title
:
'流转进度'
},
{
id
:
'basicLayout'
,
title
:
'基本信息'
},
{
id
:
'materialLayout'
,
title
:
'采购物料'
},
{
id
:
'recordLyout'
,
title
:
'流转记录'
},
]
const
PurchasePlanDetailed
=
()
=>
{
const
format
=
(
text
)
=>
{
return
<>
{
moment
(
text
).
format
(
"YYYY-MM-DD HH:mm:ss"
)
}
</>
}
const
{
query
:
{
id
},
pathname
,
}
=
history
.
location
;
const
[
path
]
=
useState
(
pathname
.
split
(
'/'
)[
pathname
.
split
(
'/'
).
length
-
1
]);
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
.
getPurchasePurchasePlanDetails
({
...
params
}).
then
(
res
=>
{
if
(
res
.
code
!==
1000
)
{
history
.
goBack
();
return
;
}
let
{
data
}
=
res
;
let
interiorLogs
:
any
=
[]
let
interiorLogStates
:
any
=
[]
data
.
innerTaskList
.
forEach
((
item
:
any
)
=>
{
interiorLogStates
.
push
({
state
:
item
.
step
,
stateName
:
null
,
isExecute
:
item
.
isExecute
,
operationalProcess
:
item
.
taskName
,
roleName
:
item
.
roleName
,
})
})
data
.
innerRecords
.
forEach
((
item
:
any
)
=>
{
interiorLogs
.
push
({
auditOpinion
:
item
.
opinion
,
createMemberId
:
item
.
memberId
,
createRoleId
:
item
.
needPlanId
,
createTime
:
item
.
operateTime
,
department
:
item
.
department
,
id
:
item
.
id
,
memberId
:
null
,
memberRoleId
:
null
,
operation
:
item
.
operate
,
position
:
''
,
purchaseInquiryId
:
null
,
roleName
:
item
.
operator
,
state
:
item
.
step
+
1
,
step
:
item
.
step
,
})
})
data
.
interiorLogs
=
interiorLogs
;
data
.
interiorLogStates
=
interiorLogStates
;
setDataSource
(
data
);
handleBasicEffect
(
data
);
})
}
useEffect
(()
=>
{
fetchDataSource
();
},
[])
return
(
<
Context
.
Provider
value=
{
dataSource
}
>
<
PeripheralLayout
no=
{
dataSource
.
purchasePlanNo
}
detail=
{
dataSource
.
summary
}
tabLink=
{
TABLINK
}
effect=
{
<>
{
path
===
'detail'
&&
(
<
Button
onClick=
{
()
=>
setVisible
(
true
)
}
type=
'primary'
>
<
MinusCircleOutlined
/>
单据退回
</
Button
>
)
}
</>
}
components=
{
<
Fragment
>
<
ProgressLayout
/>
<
BasicLayout
effect=
{
basicEffect
}
/>
<
DemandPlanMaterialLayout
id=
{
id
}
fetch=
{
PublicApi
.
getPurchaseNeedPlanNeedPlanDetail
}
/>
<
RecordLyout
/>
</
Fragment
>
}
/>
<
ModalOperate
id=
{
id
}
title=
"单据退回"
modalType=
"billBack"
visible=
{
visible
}
fetch=
{
PublicApi
.
postPurchaseNeedPlanSendBack
}
onCancel=
{
()
=>
setVisible
(
false
)
}
onOk=
{
()
=>
history
.
goBack
()
}
/>
</
Context
.
Provider
>
)
}
export
default
PurchasePlanDetailed
;
src/pages/transaction/purchaseAbility/purchasePlan/purchasePlanSearch/index.tsx
View file @
5a2b2050
...
...
@@ -22,7 +22,7 @@ const PurchasePlanSearch = () => {
dataIndex
:
'purchasePlanNo'
,
render
:
(
text
:
any
,
record
:
any
)
=>
(
<
Space
direction=
'vertical'
>
<
EyePreview
url=
{
`/memberCenter/procurementAbility/
offter/auditOffterOne/view?id=${record.id}&number=${record.quotedPriceNo}&turn=${record.turn
}`
}
>
{
text
}
</
EyePreview
>
<
EyePreview
url=
{
`/memberCenter/procurementAbility/
purchasePlan/purchasePlanSearch/preview?id=${record.id
}`
}
>
{
text
}
</
EyePreview
>
<
Text
>
{
record
.
summary
}
</
Text
>
</
Space
>
)
...
...
src/pages/transaction/purchaseAbility/purchasePlan/purchasePlanSubmit/index.tsx
View file @
5a2b2050
import
React
from
'react'
;
import
React
,
{
useRef
}
from
'react'
;
import
Table
from
'../../components/table'
import
{
ColumnType
}
from
'antd/lib/table/interface'
;
import
EyePreview
from
'@/components/EyePreview'
;
...
...
@@ -13,6 +13,7 @@ import { PlayCircleOutlined, PoweroffOutlined } from '@ant-design/icons';
const
{
Text
}
=
Typography
;
const
PurchasePlanSubmit
=
()
=>
{
const
ref
=
useRef
<
any
>
({});
const
format
=
(
text
)
=>
{
return
<>
{
moment
(
text
).
format
(
"YYYY-MM-DD"
)
}
</>
}
...
...
@@ -67,7 +68,7 @@ const PurchasePlanSubmit = () => {
</
Button
>
</
Popconfirm
>
)
}
<
Popconfirm
title=
"确定要删除吗?"
okText=
"是"
cancelText=
"否"
>
<
Popconfirm
title=
"确定要删除吗?"
okText=
"是"
cancelText=
"否"
onConfirm=
{
()
=>
handleDelect
(
record
.
id
)
}
>
<
Button
type=
'link'
>
删除
</
Button
>
...
...
@@ -75,7 +76,14 @@ const PurchasePlanSubmit = () => {
</>
)
}];
const
handleDelect
=
async
(
id
:
number
)
=>
{
await
PublicApi
.
postPurchasePurchasePlanDelete
({
id
}).
then
(
res
=>
{
if
(
res
.
code
!==
1000
)
{
return
}
ref
.
current
.
reload
();
})
}
return
(
<
Table
schemaType=
"PURCHASEPLAN_SECHEMA"
...
...
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