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
XieZhiXiong
jinfa-platform
Commits
8240db9c
Commit
8240db9c
authored
May 20, 2021
by
前端-黄佳鑫
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
✨
feat: 完成采购需求计划模块
parent
f45aad40
Hide whitespace changes
Inline
Side-by-side
Showing
16 changed files
with
319 additions
and
92 deletions
+319
-92
demamdPlan.ts
config/routes/procurementRoute/demamdPlan.ts
+1
-1
index.tsx
src/components/EyePreview/index.tsx
+3
-2
index.tsx
...ents/detail/components/demandPlanMaterialLayout/index.tsx
+104
-0
index.tsx
...ity/components/detail/components/materialLayout/index.tsx
+6
-4
index.tsx
...ity/components/detail/components/progressLayout/index.tsx
+10
-3
index.tsx
...bility/components/detail/components/recordLyout/index.tsx
+9
-2
index.tsx
...saction/purchaseAbility/components/modalOperate/index.tsx
+42
-4
add.tsx
...action/purchaseAbility/demandPlan/demandPlanAdded/add.tsx
+33
-9
basicInfo.tsx
...ility/demandPlan/demandPlanAdded/components/basicInfo.tsx
+16
-5
material.tsx
...bility/demandPlan/demandPlanAdded/components/material.tsx
+7
-9
index.tsx
...tion/purchaseAbility/demandPlan/demandPlanAdded/index.tsx
+5
-2
index.tsx
...action/purchaseAbility/demandPlan/demandPlanOne/index.tsx
+6
-6
index.tsx
...ion/purchaseAbility/demandPlan/demandPlanSearch/index.tsx
+5
-5
index.tsx
...ion/purchaseAbility/demandPlan/demandPlanSubmit/index.tsx
+23
-15
index.tsx
...action/purchaseAbility/demandPlan/demandPlanTwo/index.tsx
+6
-6
index.tsx
...s/transaction/purchaseAbility/demandPlan/detail/index.tsx
+43
-19
No files found.
config/routes/procurementRoute/demamdPlan.ts
View file @
8240db9c
...
...
@@ -18,7 +18,7 @@ export const demandPlanRoute = [
},
{
/** 需求计划查询 - 详情 */
path
:
'/memberCenter/procurementAbility/demandPlan/preview'
,
path
:
'/memberCenter/procurementAbility/demandPlan/
demandPlanSearch/
preview'
,
name
:
'需求计划查询'
,
component
:
'@/pages/transaction/purchaseAbility/demandPlan/detail'
,
hideInMenu
:
true
,
...
...
src/components/EyePreview/index.tsx
View file @
8240db9c
...
...
@@ -5,6 +5,7 @@ import { Button } from 'antd'
export
interface
EyePreviewProps
{
url
?:
string
,
class
?:
boolean
,
type
?:
'button'
|
'link'
,
handleClick
?()
}
...
...
@@ -16,8 +17,8 @@ const EyePreview:React.FC<EyePreviewProps> = (props) => {
{
props
.
children
}
<
EyeOutlined
/>
</
Link
>
:
<
Button
onClick=
{
props
.
handleClick
}
type=
'link'
>
{
props
.
children
}
<
EyeOutlined
/>
<
Button
onClick=
{
props
.
handleClick
}
type=
'link'
style=
{
{
padding
:
props
.
class
&&
0
}
}
>
{
props
.
children
}
{
!
props
.
class
&&
<
EyeOutlined
/>
}
</
Button
>
)
...
...
src/pages/transaction/purchaseAbility/components/detail/components/demandPlanMaterialLayout/index.tsx
0 → 100644
View file @
8240db9c
import
React
,
{
useRef
}
from
'react'
;
import
{
StandardTable
}
from
'god'
;
import
{
Space
,
Typography
}
from
'antd'
;
import
Card
from
'../../../card'
;
import
EyePreview
from
'@/components/EyePreview'
;
import
{
ColumnType
}
from
'antd/lib/table/interface'
;
import
moment
from
'moment'
;
export
interface
IPROPS
{
id
?:
number
,
fetch
?:
()
=>
Promise
<
unknown
>
,
layoutTitle
?:
string
}
const
DemandPlanMaterialLayout
:
React
.
FC
<
IPROPS
>
=
(
props
:
any
)
=>
{
const
format
=
(
text
)
=>
{
return
<>
{
moment
(
text
).
format
(
"YYYY-MM-DD HH:mm:ss"
)
}
</>
}
const
{
id
,
fetch
,
layoutTitle
}
=
props
;
const
currentRef
=
useRef
({});
const
columns
:
ColumnType
<
any
>
[]
=
[
{
title
:
'物料编号/名称'
,
key
:
'number'
,
dataIndex
:
'number'
,
render
:
(
text
:
any
,
record
:
any
)
=>
(
<
Space
direction=
'vertical'
size=
{
0
}
>
<
EyePreview
class
type=
'button'
>
{
text
}
</
EyePreview
>
<
Typography
.
Text
>
{
record
.
name
}
</
Typography
.
Text
>
</
Space
>
)
},
{
title
:
'规格型号'
,
key
:
'model'
,
dataIndex
:
'model'
,
},
{
title
:
'品类'
,
key
:
'category'
,
dataIndex
:
'category'
,
},
{
title
:
'品牌'
,
key
:
'brand'
,
dataIndex
:
'brand'
,
},
{
title
:
'单位'
,
key
:
'unit'
,
dataIndex
:
'unit'
,
},
{
title
:
'需求数量'
,
key
:
'needCount'
,
dataIndex
:
'needCount'
,
},
{
title
:
'成本价'
,
key
:
'costPrice'
,
dataIndex
:
'costPrice'
,
},
{
title
:
'需求金额'
,
key
:
'needPrice'
,
dataIndex
:
'needPrice'
,
},
{
title
:
'到货日期'
,
key
:
'arriveTime'
,
dataIndex
:
'arriveTime'
,
render
:
(
text
:
any
)
=>
<
Typography
.
Text
>
{
format
(
text
)
}
</
Typography
.
Text
>
}
];
const
productlist
=
(
params
:
any
)
=>
{
return
new
Promise
(
resolve
=>
{
fetch
({
id
,
...
params
}).
then
((
res
:
any
)
=>
{
resolve
(
res
.
data
)
})
})
}
return
(
<
Card
id=
'materialLayout'
title=
{
layoutTitle
}
>
<
StandardTable
currentRef=
{
currentRef
}
columns=
{
columns
}
tableProps=
{
{
rowKey
:
'id'
}
}
fetchTableData=
{
(
params
:
any
)
=>
productlist
(
params
)
}
/>
</
Card
>
)
}
DemandPlanMaterialLayout
.
defaultProps
=
{
layoutTitle
:
'采购材料'
}
export
default
DemandPlanMaterialLayout
;
src/pages/transaction/purchaseAbility/components/detail/components/materialLayout/index.tsx
View file @
8240db9c
...
...
@@ -3,16 +3,18 @@ import { StandardTable } from 'god';
import
Card
from
'../../../card'
;
import
EyePreview
from
'@/components/EyePreview'
;
import
DetailDrawer
from
'../../../detailDrawer'
;
import
{
ColumnType
}
from
'antd/lib/table/interface'
;
export
interface
IPROPS
{
id
?:
number
,
number
?:
number
,
column
?:
ColumnType
<
any
>
[],
fetch
?:
()
=>
Promise
<
unknown
>
,
layoutTitle
?:
string
}
const
MaterialLayout
:
React
.
FC
<
IPROPS
>
=
(
props
:
any
)
=>
{
const
{
id
,
number
,
fetch
,
layoutTitle
}
=
props
;
const
{
id
,
number
,
fetch
,
layoutTitle
,
column
}
=
props
;
const
[
visible
,
setVisible
]
=
useState
<
boolean
>
(
false
)
const
currentRef
=
useRef
({});
const
[
dataSource
,
setDataSource
]
=
useState
<
any
>
([])
...
...
@@ -71,7 +73,7 @@ const MaterialLayout: React.FC<IPROPS> = (props: any) => {
setVisible
(
true
);
}
const
columns
=
[
const
columns
:
ColumnType
<
any
>
[]
=
[
{
title
:
'物料编号'
,
key
:
'number'
,
...
...
@@ -125,8 +127,8 @@ const MaterialLayout: React.FC<IPROPS> = (props: any) => {
>
<
StandardTable
currentRef=
{
currentRef
}
columns=
{
columns
}
tableProps=
{
{
rowKe
w
:
'id'
}
}
columns=
{
column
?
column
:
column
s
}
tableProps=
{
{
rowKe
y
:
'id'
}
}
fetchTableData=
{
(
params
:
any
)
=>
productlist
(
params
)
}
/>
<
DetailDrawer
...
...
src/pages/transaction/purchaseAbility/components/detail/components/progressLayout/index.tsx
View file @
8240db9c
/** 详情通用 - 流转进度 */
import
React
,
{
useContext
,
useState
}
from
'react'
;
import
React
,
{
useContext
,
use
Effect
,
use
State
}
from
'react'
;
import
{
Radio
,
Steps
}
from
'antd'
;
import
{
Context
}
from
'../context'
;
import
Card
from
'../../../card'
;
...
...
@@ -19,6 +19,13 @@ export interface ProgressProps { }
const
ProgressLayout
:
React
.
FC
<
ProgressProps
>
=
()
=>
{
const
context
=
useContext
(
Context
);
const
[
logStatesStatus
,
setLogStatesStatus
]
=
useState
<
number
>
(
LOGSTATESTYPE
.
EXTERNALSTATES
);
useEffect
(()
=>
{
if
(
!
context
.
externalLogStates
)
{
setLogStatesStatus
(
LOGSTATESTYPE
.
INTERIORSTATES
)
}
},
[
context
])
return
(
<
Card
id=
'progressLayout'
...
...
@@ -26,7 +33,7 @@ const ProgressLayout: React.FC<ProgressProps> = () => {
extra=
{
<
Radio
.
Group
onChange=
{
(
e
)
=>
setLogStatesStatus
(
e
.
target
.
value
)
}
defaultValue=
{
LOGSTATESTYPE
.
EXTERNAL
STATES
}
defaultValue=
{
context
.
externalLogStates
?
LOGSTATESTYPE
.
EXTERNALSTATES
:
LOGSTATESTYPE
.
INTERIOR
STATES
}
>
{
context
.
externalLogStates
&&
<
Radio
.
Button
value=
{
LOGSTATESTYPE
.
EXTERNALSTATES
}
>
外部流转
</
Radio
.
Button
>
}
{
context
.
interiorLogStates
&&
<
Radio
.
Button
value=
{
LOGSTATESTYPE
.
INTERIORSTATES
}
>
内部流转
</
Radio
.
Button
>
}
...
...
@@ -53,7 +60,7 @@ const ProgressLayout: React.FC<ProgressProps> = () => {
description=
{
item
.
operationalProcess
}
status=
{
item
.
isExecute
?
'finish'
:
'wait'
}
/>
))
:
))
:
context
.
examineInteriorLogStates
&&
context
.
examineInteriorLogStates
.
map
(
item
=>
(
<
Steps
.
Step
key=
{
item
.
state
}
...
...
src/pages/transaction/purchaseAbility/components/detail/components/recordLyout/index.tsx
View file @
8240db9c
/** 详情通用 - 流转进度 */
import
React
,
{
useContext
,
useState
}
from
'react'
;
import
React
,
{
useContext
,
use
Effect
,
use
State
}
from
'react'
;
import
{
Radio
,
Table
}
from
'antd'
;
import
{
Context
}
from
'../context'
;
import
Card
from
'../../../card'
;
...
...
@@ -20,6 +20,13 @@ export interface ProgressProps {}
const
RecordLayout
:
React
.
FC
<
ProgressProps
>
=
()
=>
{
const
context
=
useContext
(
Context
);
const
[
logStatus
,
setLogStatus
]
=
useState
<
number
>
(
LOGSTATESTYPE
.
EXTERNALSTATES
);
useEffect
(()
=>
{
if
(
!
context
.
externalLogs
)
{
setLogStatus
(
LOGSTATESTYPE
.
INTERIORSTATES
)
}
},
[
context
])
return
(
<
Card
id=
'recordLyout'
...
...
@@ -27,7 +34,7 @@ const RecordLayout: React.FC<ProgressProps> = () => {
extra=
{
<
Radio
.
Group
onChange=
{
(
e
)
=>
setLogStatus
(
e
.
target
.
value
)
}
defaultValue=
{
LOGSTATESTYPE
.
EXTERNAL
STATES
}
defaultValue=
{
context
.
externalLogs
?
LOGSTATESTYPE
.
EXTERNALSTATES
:
LOGSTATESTYPE
.
INTERIOR
STATES
}
>
{
context
.
externalLogs
&&
<
Radio
.
Button
value=
{
LOGSTATESTYPE
.
EXTERNALSTATES
}
>
外部流转
</
Radio
.
Button
>
}
{
context
.
interiorLogs
&&
<
Radio
.
Button
value=
{
LOGSTATESTYPE
.
INTERIORSTATES
}
>
内部流转
</
Radio
.
Button
>
}
...
...
src/pages/transaction/purchaseAbility/components/modalOperate/index.tsx
View file @
8240db9c
...
...
@@ -14,7 +14,7 @@ export interface IProps {
title
:
string
,
visible
:
boolean
,
id
:
number
,
modalType
:
'audit'
|
'abandon'
|
'date'
|
'next'
|
'key'
|
'discard'
,
modalType
:
'audit'
|
'abandon'
|
'date'
|
'next'
|
'key'
|
'discard'
|
'planAudit'
,
onCancel
?:
()
=>
void
,
onOk
?:
()
=>
void
,
fetch
?:
()
=>
Promise
<
unknown
>
,
...
...
@@ -46,6 +46,17 @@ const ModalOperate: React.FC<IProps> = (props: any) => {
})
})
}
if
(
modalType
===
'planAudit'
)
{
onFieldChange$
(
'status'
).
subscribe
(({
value
})
=>
{
setFieldState
(
'cause'
,
state
=>
{
if
(
value
==
1
)
{
state
.
visible
=
false
}
else
{
state
.
visible
=
true
}
})
})
}
if
(
modalType
===
'date'
)
{
onFieldChange$
(
'checkbox'
).
subscribe
(({
value
})
=>
{
if
(
value
&&
value
.
length
>
0
)
{
...
...
@@ -150,6 +161,18 @@ const ModalOperate: React.FC<IProps> = (props: any) => {
required
x
-
component
-
props=
{
{}
}
/>
case
'planAudit'
:
return
<
Field
enum=
{
[
{
label
:
'审核通过'
,
value
:
1
},
{
label
:
'审核不通过'
,
value
:
0
}
]
}
name=
'status'
required
x
-
component=
"Radio"
x
-
component
-
props=
{
{}
}
/>
}
}
...
...
@@ -178,6 +201,9 @@ const ModalOperate: React.FC<IProps> = (props: any) => {
params
.
quotedPriceTime
=
new
Date
(
value
.
quotedPriceTime
).
getTime
();
}
else
if
(
modalType
===
'next'
)
{
params
.
quotedPriceTime
=
new
Date
(
value
.
quotedPriceTime
).
getTime
();
}
else
if
(
modalType
===
'planAudit'
)
{
params
.
status
=
value
.
status
;
value
.
status
!==
1
&&
(
params
.
cause
=
value
.
cause
);
}
else
{
params
.
password
=
value
.
password
;
}
...
...
@@ -193,6 +219,17 @@ const ModalOperate: React.FC<IProps> = (props: any) => {
actions
.
reset
();
}
const
causeName
=
(
name
:
string
)
=>
{
switch
(
name
)
{
case
'audit'
:
return
'auditOpinion'
;
case
'planAudit'
:
return
'cause'
default
:
return
'reason'
}
}
return
(
<
Modal
width=
{
600
}
...
...
@@ -217,14 +254,15 @@ const ModalOperate: React.FC<IProps> = (props: any) => {
effects=
{
()
=>
useFormEffects
()
}
onSubmit=
{
(
values
)
=>
handleSubmit
(
values
)
}
initialValues=
{
{
state
:
1
state
:
1
,
status
:
1
}
}
>
{
modalNode
()
}
{
(
modalType
===
'audit'
||
modalType
===
'abandon'
||
modalType
===
'discard'
)
{
(
modalType
===
'audit'
||
modalType
===
'abandon'
||
modalType
===
'discard'
||
modalType
===
'planAudit'
)
&&
(<
Field
title=
{
modalText
}
name=
{
modalType
===
'audit'
?
'auditOpinion'
:
'reason'
}
name=
{
causeName
(
modalType
)
}
x
-
component=
"TextArea"
required
x
-
component
-
props=
{
{
...
...
src/pages/transaction/purchaseAbility/demandPlan/demandPlanAdded/add.tsx
View file @
8240db9c
import
React
,
{
useRef
,
useState
}
from
'react'
;
import
React
,
{
useRef
,
useState
,
useEffect
}
from
'react'
;
import
{
Card
,
Tabs
,
Button
,
Badge
,
message
}
from
'antd'
;
import
{
history
}
from
'umi'
;
import
BasicInfo
from
'./components/basicInfo'
;
...
...
@@ -12,6 +12,7 @@ import { isEmpty } from 'lodash';
const
{
TabPane
}
=
Tabs
;
const
DemandPlanAddedForm
=
()
=>
{
const
{
id
}
=
history
.
location
.
query
;
/** 基本信息 */
const
[
basic
,
setBasic
]
=
useState
<
any
>
({});
const
[
material
,
setMaterial
]
=
useState
<
any
>
([]);
...
...
@@ -56,20 +57,43 @@ const DemandPlanAddedForm = () => {
setLoading
(
false
);
return
}
await
PublicApi
.
postPurchaseNeedPlanAdd
({
...
params
}).
then
(
res
=>
{
if
(
res
.
code
!==
1000
)
{
if
(
id
)
{
await
PublicApi
.
postPurchaseNeedPlanUpdate
({
id
,
...
params
}).
then
(
res
=>
{
if
(
res
.
code
!==
1000
)
{
setLoading
(
false
);
return
}
history
.
goBack
();
setLoading
(
false
);
return
}
history
.
goBack
();
setLoading
(
false
);
})
console
.
log
(
params
)
})
}
else
{
await
PublicApi
.
postPurchaseNeedPlanAdd
({
...
params
}).
then
(
res
=>
{
if
(
res
.
code
!==
1000
)
{
setLoading
(
false
);
return
}
history
.
goBack
();
setLoading
(
false
);
})
}
}
else
{
setLoading
(
false
);
}
}
/** 修改获取信息 */
useEffect
(()
=>
{
if
(
id
)
{
PublicApi
.
getPurchaseNeedPlanDetails
({
id
}).
then
((
res
:
any
)
=>
{
if
(
res
.
code
===
1000
)
{
setBasic
(
res
.
data
);
setMaterial
(
res
.
data
);
}
})
}
},
[
id
])
return
(
<
PageHeaderWrapper
onBack=
{
()
=>
history
.
goBack
()
}
...
...
src/pages/transaction/purchaseAbility/demandPlan/demandPlanAdded/components/basicInfo.tsx
View file @
8240db9c
...
...
@@ -2,6 +2,7 @@ import React, { useEffect } from 'react';
import
{
Form
,
Input
,
Typography
}
from
'antd'
;
import
DatePicker
from
'@/components/DatePicker'
;
import
moment
from
'moment'
;
import
{
isEmpty
}
from
'lodash'
;
const
layout
:
any
=
{
colon
:
false
,
...
...
@@ -44,6 +45,16 @@ const BasicInfo: React.FC<BasicInfoprops> = (props: any) => {
}
})
useEffect
(()
=>
{
if
(
!
isEmpty
(
fetchdata
))
{
form
.
setFieldsValue
({
summary
:
fetchdata
.
summary
,
startTime
:
moment
(
fetchdata
.
startTime
),
endTime
:
moment
(
fetchdata
.
endTime
)
})
}
},
[
fetchdata
])
return
(
<
Form
{
...
layout
}
form=
{
form
}
>
<
Form
.
Item
label=
"需求计划摘要"
rules=
{
[{
required
:
true
,
message
:
'请输入需求计划摘要'
}]
}
name=
"summary"
>
...
...
@@ -56,19 +67,19 @@ const BasicInfo: React.FC<BasicInfoprops> = (props: any) => {
/>
</
Form
.
Item
>
<
Form
.
Item
label=
"需求计划编号"
name=
"needPlanNo"
>
<
Typography
.
Text
>
X2020025008
</
Typography
.
Text
>
<
Typography
.
Text
>
{
fetchdata
.
needPlanNo
}
</
Typography
.
Text
>
</
Form
.
Item
>
<
Form
.
Item
label=
"编制部门"
name=
"department"
>
<
Typography
.
Text
>
业务部
</
Typography
.
Text
>
<
Typography
.
Text
>
{
fetchdata
.
department
}
</
Typography
.
Text
>
</
Form
.
Item
>
<
Form
.
Item
label=
"编制人"
name=
"userName"
>
<
Typography
.
Text
>
蒯美政
</
Typography
.
Text
>
<
Typography
.
Text
>
{
fetchdata
.
userName
}
</
Typography
.
Text
>
</
Form
.
Item
>
<
Form
.
Item
label=
"编制时间"
name=
"createTime"
>
<
Typography
.
Text
>
2020-08-25 09:00:00
</
Typography
.
Text
>
<
Typography
.
Text
>
{
format
(
fetchdata
.
createTime
)
}
</
Typography
.
Text
>
</
Form
.
Item
>
<
Form
.
Item
label=
"内部状态"
name=
"innerStatus"
>
<
Typography
.
Text
>
待提交审核
</
Typography
.
Text
>
<
Typography
.
Text
>
{
fetchdata
.
innerStatusName
}
</
Typography
.
Text
>
</
Form
.
Item
>
</
Form
>
)
...
...
src/pages/transaction/purchaseAbility/demandPlan/demandPlanAdded/components/material.tsx
View file @
8240db9c
...
...
@@ -62,6 +62,7 @@ const Material: React.FC<Materialprops> = (props: any) => {
<
Form
.
Item
style=
{
{
marginBottom
:
0
}
}
name=
{
`needCount${index}`
}
initialValue=
{
text
}
rules=
{
[
{
required
:
true
,
...
...
@@ -82,7 +83,7 @@ const Material: React.FC<Materialprops> = (props: any) => {
key
:
'costPrice'
,
dataIndex
:
'costPrice'
,
render
:
(
text
:
any
)
=>
(
<
Typography
.
Text
>
{
`¥${text.toFixed(2)}
`
}
</
Typography
.
Text
>
<
Typography
.
Text
>
{
text
?
`¥${text.toFixed(2)}`
:
`¥0
`
}
</
Typography
.
Text
>
)
},
{
...
...
@@ -101,6 +102,7 @@ const Material: React.FC<Materialprops> = (props: any) => {
<
Form
.
Item
style=
{
{
marginBottom
:
0
}
}
name=
{
`arriveTime${index}`
}
initialValue=
{
moment
(
text
)
}
>
<
DatePicker
style=
{
{
width
:
'100%'
}
}
...
...
@@ -203,15 +205,11 @@ const Material: React.FC<Materialprops> = (props: any) => {
useEffect
(()
=>
{
/**编辑回显数据 */
if
(
!
isEmpty
(
fetchdata
))
{
const
data
=
[...
fetchdata
];
setDataSource
(
data
.
map
(
item
=>
{
return
{
arriveTime
:
moment
(
item
.
arriveTime
)
}
}))
if
(
!
isEmpty
(
fetchdata
.
details
))
{
const
data
=
[...
fetchdata
.
details
];
setDataSource
([...
data
])
}
},
[
fetchdata
])
},
[
fetchdata
.
details
])
return
(
<
Form
{
...
layout
}
form=
{
form
}
>
...
...
src/pages/transaction/purchaseAbility/demandPlan/demandPlanAdded/index.tsx
View file @
8240db9c
...
...
@@ -61,9 +61,12 @@ const DemandPlanAdded = () => {
dataIndex
:
'operate'
,
render
:
(
text
:
any
,
record
:
any
)
=>
(
<>
<
Button
type=
'link'
onClick=
{
()
=>
handleSubmit
(
record
.
id
)
}
>
提交
</
Button
>
<
Popconfirm
title=
"确定要提交吗?"
okText=
"是"
cancelText=
"否"
onConfirm=
{
()
=>
handleSubmit
(
record
.
id
)
}
>
<
Button
type=
'link'
>
提交
</
Button
>
</
Popconfirm
>
<
Button
type=
'link'
onClick=
{
()
=>
history
.
push
(
`/memberCenter/procurementAbility/demandPlan/demandPlanAdded/edit?id=${record.id}`
)
}
>
修改
</
Button
>
<
Popconfirm
title=
"确定要删除吗?"
okText=
"是"
cancelText=
"否"
onConfirm=
{
()
=>
handleDelect
(
record
.
id
)
}
>
<
Button
type=
'link'
>
删除
...
...
src/pages/transaction/purchaseAbility/demandPlan/demandPlanOne/index.tsx
View file @
8240db9c
...
...
@@ -23,8 +23,8 @@ const DemandPlanOne = () => {
dataIndex
:
'needPlanNo'
,
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
>
<
Text
type=
'secondary'
>
{
record
.
summary
}
</
Text
>
<
EyePreview
url=
{
`/memberCenter/procurementAbility/
demandPlan/demandPlanOne/preview?id=${record.id
}`
}
>
{
text
}
</
EyePreview
>
<
Text
>
{
record
.
summary
}
</
Text
>
</
Space
>
)
},
{
...
...
@@ -33,8 +33,8 @@ const DemandPlanOne = () => {
dataIndex
:
'startTime'
,
render
:
(
text
:
any
,
record
:
any
)
=>
(
<
Space
direction=
'vertical'
>
<
Text
type=
'secondary'
><
PlayCircleOutlined
/>
{
format
(
text
)
}
</
Text
>
<
Text
type=
'secondary'
><
PoweroffOutlined
/>
{
format
(
record
.
endTime
)
}
</
Text
>
<
Text
><
PlayCircleOutlined
/>
{
format
(
text
)
}
</
Text
>
<
Text
><
PoweroffOutlined
/>
{
format
(
record
.
endTime
)
}
</
Text
>
</
Space
>
)
},
{
...
...
@@ -49,7 +49,7 @@ const DemandPlanOne = () => {
title
:
'编制时间'
,
key
:
'createTime'
,
dataIndex
:
'createTime'
,
render
:
(
text
:
any
,
record
:
any
)
=>
<
Text
type=
'secondary'
>
{
format
(
text
)
}
</
Text
>
render
:
(
text
:
any
,
record
:
any
)
=>
<
Text
>
{
format
(
text
)
}
</
Text
>
},
{
title
:
'内部状态'
,
key
:
'innerStatus'
,
...
...
@@ -63,7 +63,7 @@ const DemandPlanOne = () => {
<>
<
Button
type=
'link'
onClick=
{
()
=>
history
.
push
(
`/memberCenter/procurementAbility/
offter/auditOffterOne/detail?id=${record.id}&number=${record.quotedPriceNo
}`
)
}
onClick=
{
()
=>
history
.
push
(
`/memberCenter/procurementAbility/
demandPlan/demandPlanOne/detail?id=${record.id
}`
)
}
>
审核
</
Button
>
...
...
src/pages/transaction/purchaseAbility/demandPlan/demandPlanSearch/index.tsx
View file @
8240db9c
...
...
@@ -23,8 +23,8 @@ const DemandPlanSearch = () => {
dataIndex
:
'needPlanNo'
,
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
>
<
Text
type=
'secondary'
>
{
record
.
summary
}
</
Text
>
<
EyePreview
url=
{
`/memberCenter/procurementAbility/
demandPlan/demandPlanSearch/preview?id=${record.id
}`
}
>
{
text
}
</
EyePreview
>
<
Text
>
{
record
.
summary
}
</
Text
>
</
Space
>
)
},
{
...
...
@@ -33,8 +33,8 @@ const DemandPlanSearch = () => {
dataIndex
:
'startTime'
,
render
:
(
text
:
any
,
record
:
any
)
=>
(
<
Space
direction=
'vertical'
>
<
Text
type=
'secondary'
><
PlayCircleOutlined
/>
{
format
(
text
)
}
</
Text
>
<
Text
type=
'secondary'
><
PoweroffOutlined
/>
{
format
(
record
.
endTime
)
}
</
Text
>
<
Text
><
PlayCircleOutlined
/>
{
format
(
text
)
}
</
Text
>
<
Text
><
PoweroffOutlined
/>
{
format
(
record
.
endTime
)
}
</
Text
>
</
Space
>
)
},
{
...
...
@@ -49,7 +49,7 @@ const DemandPlanSearch = () => {
title
:
'编制时间'
,
key
:
'createTime'
,
dataIndex
:
'createTime'
,
render
:
(
text
:
any
,
record
:
any
)
=>
<
Text
type=
'secondary'
>
{
format
(
text
)
}
</
Text
>
render
:
(
text
:
any
,
record
:
any
)
=>
<
Text
>
{
format
(
text
)
}
</
Text
>
},
{
title
:
'内部状态'
,
key
:
'innerStatus'
,
...
...
src/pages/transaction/purchaseAbility/demandPlan/demandPlanSubmit/index.tsx
View file @
8240db9c
import
React
from
'react'
;
import
{
history
}
from
'umi'
;
import
React
,
{
useRef
}
from
'react'
;
import
Table
from
'../../components/table'
import
{
ColumnType
}
from
'antd/lib/table/interface'
;
import
EyePreview
from
'@/components/EyePreview'
;
import
moment
from
'moment'
;
import
{
PublicApi
}
from
'@/services/api'
;
import
{
Button
,
Badge
,
Space
,
Typography
}
from
'antd'
;
import
{
Button
,
Badge
,
Space
,
Typography
,
Popconfirm
}
from
'antd'
;
import
{
OFFTER_INTERNALSTATE_COLOR
,
}
from
'../../constants'
;
...
...
@@ -13,7 +12,7 @@ import { PlayCircleOutlined, PoweroffOutlined } from '@ant-design/icons';
const
{
Text
}
=
Typography
;
const
DemandPlanSubmit
=
()
=>
{
cons
ole
.
log
(
'待新增采购需求单'
);
cons
t
ref
=
useRef
<
any
>
({}
);
const
format
=
(
text
)
=>
{
return
<>
{
moment
(
text
).
format
(
"YYYY-MM-DD HH:mm:ss"
)
}
</>
}
...
...
@@ -23,8 +22,8 @@ const DemandPlanSubmit = () => {
dataIndex
:
'needPlanNo'
,
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
>
<
Text
type=
'secondary'
>
{
record
.
summary
}
</
Text
>
<
EyePreview
url=
{
`/memberCenter/procurementAbility/
demandPlan/demandPlanSubmit/preview?id=${record.id
}`
}
>
{
text
}
</
EyePreview
>
<
Text
>
{
record
.
summary
}
</
Text
>
</
Space
>
)
},
{
...
...
@@ -33,8 +32,8 @@ const DemandPlanSubmit = () => {
dataIndex
:
'startTime'
,
render
:
(
text
:
any
,
record
:
any
)
=>
(
<
Space
direction=
'vertical'
>
<
Text
type=
'secondary'
><
PlayCircleOutlined
/>
{
format
(
text
)
}
</
Text
>
<
Text
type=
'secondary'
><
PoweroffOutlined
/>
{
format
(
record
.
endTime
)
}
</
Text
>
<
Text
><
PlayCircleOutlined
/>
{
format
(
text
)
}
</
Text
>
<
Text
><
PoweroffOutlined
/>
{
format
(
record
.
endTime
)
}
</
Text
>
</
Space
>
)
},
{
...
...
@@ -49,7 +48,7 @@ const DemandPlanSubmit = () => {
title
:
'编制时间'
,
key
:
'createTime'
,
dataIndex
:
'createTime'
,
render
:
(
text
:
any
,
record
:
any
)
=>
<
Text
type=
'secondary'
>
{
format
(
text
)
}
</
Text
>
render
:
(
text
:
any
,
record
:
any
)
=>
<
Text
>
{
format
(
text
)
}
</
Text
>
},
{
title
:
'内部状态'
,
key
:
'innerStatus'
,
...
...
@@ -61,18 +60,27 @@ const DemandPlanSubmit = () => {
dataIndex
:
'operate'
,
render
:
(
text
:
any
,
record
:
any
)
=>
(
<>
<
Button
type=
'link'
onClick=
{
()
=>
history
.
push
(
`/memberCenter/procurementAbility/offter/auditOffterOne/detail?id=${record.id}&number=${record.quotedPriceNo}`
)
}
>
审核
</
Button
>
<
Popconfirm
title=
"确定要提交吗?"
okText=
"是"
cancelText=
"否"
onConfirm=
{
()
=>
handleSubmit
(
record
.
id
)
}
>
<
Button
type=
'link'
>
提交
</
Button
>
</
Popconfirm
>
</>
)
}];
const
handleSubmit
=
async
(
id
:
number
)
=>
{
await
PublicApi
.
postPurchaseNeedPlanSubmit
({
id
}).
then
(
res
=>
{
if
(
res
.
code
!==
1000
)
{
return
}
ref
.
current
.
reload
();
})
}
return
(
<
Table
reload=
{
ref
}
schemaType=
"DEMANDPLAN_SECHEMA"
columns=
{
columns
}
effects=
"needPlanNo"
...
...
src/pages/transaction/purchaseAbility/demandPlan/demandPlanTwo/index.tsx
View file @
8240db9c
...
...
@@ -23,8 +23,8 @@ const DemanPlanTwo = () => {
dataIndex
:
'needPlanNo'
,
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
>
<
Text
type=
'secondary'
>
{
record
.
summary
}
</
Text
>
<
EyePreview
url=
{
`/memberCenter/procurementAbility/
demandPlan/demandPlanTwo/preview?id=${record.id
}`
}
>
{
text
}
</
EyePreview
>
<
Text
>
{
record
.
summary
}
</
Text
>
</
Space
>
)
},
{
...
...
@@ -33,8 +33,8 @@ const DemanPlanTwo = () => {
dataIndex
:
'startTime'
,
render
:
(
text
:
any
,
record
:
any
)
=>
(
<
Space
direction=
'vertical'
>
<
Text
type=
'secondary'
><
PlayCircleOutlined
/>
{
format
(
text
)
}
</
Text
>
<
Text
type=
'secondary'
><
PoweroffOutlined
/>
{
format
(
record
.
endTime
)
}
</
Text
>
<
Text
><
PlayCircleOutlined
/>
{
format
(
text
)
}
</
Text
>
<
Text
><
PoweroffOutlined
/>
{
format
(
record
.
endTime
)
}
</
Text
>
</
Space
>
)
},
{
...
...
@@ -49,7 +49,7 @@ const DemanPlanTwo = () => {
title
:
'编制时间'
,
key
:
'createTime'
,
dataIndex
:
'createTime'
,
render
:
(
text
:
any
,
record
:
any
)
=>
<
Text
type=
'secondary'
>
{
format
(
text
)
}
</
Text
>
render
:
(
text
:
any
,
record
:
any
)
=>
<
Text
>
{
format
(
text
)
}
</
Text
>
},
{
title
:
'内部状态'
,
key
:
'innerStatus'
,
...
...
@@ -63,7 +63,7 @@ const DemanPlanTwo = () => {
<>
<
Button
type=
'link'
onClick=
{
()
=>
history
.
push
(
`/memberCenter/procurementAbility/
offter/auditOffterOne/detail?id=${record.id}&number=${record.quotedPriceNo
}`
)
}
onClick=
{
()
=>
history
.
push
(
`/memberCenter/procurementAbility/
demandPlan/demandPlanTwo/detail?id=${record.id
}`
)
}
>
审核
</
Button
>
...
...
src/pages/transaction/purchaseAbility/demandPlan/detail/index.tsx
View file @
8240db9c
...
...
@@ -13,14 +13,8 @@ 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'
}
import
DemandPlanMaterialLayout
from
'../../components/detail/components/demandPlanMaterialLayout'
;
const
TABLINK
=
[
{
id
:
'progressLayout'
,
title
:
'流转进度'
},
...
...
@@ -35,8 +29,7 @@ const DemandDetailed = () => {
}
const
{
query
:
{
id
,
number
id
},
pathname
,
}
=
history
.
location
;
...
...
@@ -79,7 +72,38 @@ const DemandDetailed = () => {
history
.
goBack
();
return
;
}
const
{
data
}
=
res
;
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
);
})
...
...
@@ -92,11 +116,11 @@ const DemandDetailed = () => {
const
fetchLink
=
()
=>
{
let
fetchSoure
:
any
=
null
;
switch
(
pathPci
)
{
case
'
auditInquiry
One'
:
fetchSoure
=
PublicApi
.
postPurchase
PurchaseInquiryExamine1
case
'
demandPlan
One'
:
fetchSoure
=
PublicApi
.
postPurchase
NeedPlanFirstExam
break
;
case
'
auditInquiry
Two'
:
fetchSoure
=
PublicApi
.
postPurchase
PurchaseInquiryExamine2
case
'
demandPlan
Two'
:
fetchSoure
=
PublicApi
.
postPurchase
NeedPlanSecondExam
break
;
}
return
fetchSoure
...
...
@@ -105,7 +129,8 @@ const DemandDetailed = () => {
return
(
<
Context
.
Provider
value=
{
dataSource
}
>
<
PeripheralLayout
no=
{
dataSource
.
purchaseInquiryNo
}
no=
{
dataSource
.
needPlanNo
}
detail=
{
dataSource
.
summary
}
tabLink=
{
TABLINK
}
effect=
{
<>
...
...
@@ -125,10 +150,9 @@ const DemandDetailed = () => {
<
Fragment
>
<
ProgressLayout
/>
<
BasicLayout
effect=
{
basicEffect
}
/>
<
MaterialLayout
<
DemandPlan
MaterialLayout
id=
{
id
}
number=
{
number
}
fetch=
{
PublicApi
.
getPurchasePurchaseInquiryProductlistList
}
fetch=
{
PublicApi
.
getPurchaseNeedPlanNeedPlanDetail
}
/>
<
RecordLyout
/>
</
Fragment
>
...
...
@@ -137,7 +161,7 @@ const DemandDetailed = () => {
<
ModalOperate
id=
{
id
}
title=
"单据审核"
modalType=
"
a
udit"
modalType=
"
planA
udit"
visible=
{
visible
}
fetch=
{
fetchLink
()
}
onCancel=
{
()
=>
setVisible
(
false
)
}
...
...
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