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
c8bc2aa4
Commit
c8bc2aa4
authored
May 07, 2021
by
前端-黄佳鑫
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
✨
feat: 采购计划管理
parent
cb683124
Hide whitespace changes
Inline
Side-by-side
Showing
12 changed files
with
409 additions
and
559 deletions
+409
-559
purchasePlan.ts
config/routes/procurementRoute/purchasePlan.ts
+2
-2
index.tsx
...es/transaction/purchaseAbility/components/table/index.tsx
+6
-0
add.tsx
...action/purchaseAbility/demandPlan/demandPlanAdded/add.tsx
+23
-10
basicInfo.tsx
...ility/demandPlan/demandPlanAdded/components/basicInfo.tsx
+36
-22
material.tsx
...bility/demandPlan/demandPlanAdded/components/material.tsx
+97
-0
index.tsx
.../purchaseAbility/purchasePlan/demandPlanSummary/index.tsx
+31
-80
index.tsx
...on/purchaseAbility/purchasePlan/purchasePlanOne/index.tsx
+27
-89
index.tsx
...urchaseAbility/purchasePlan/purchasePlanPerform/index.tsx
+27
-89
index.tsx
...purchaseAbility/purchasePlan/purchasePlanSearch/index.tsx
+28
-89
index.tsx
...purchaseAbility/purchasePlan/purchasePlanSubmit/index.tsx
+28
-89
index.tsx
...on/purchaseAbility/purchasePlan/purchasePlanTwo/index.tsx
+29
-89
purchasePlan.ts
src/pages/transaction/purchaseAbility/schema/purchasePlan.ts
+75
-0
No files found.
config/routes/procurementRoute/purchasePlan.ts
View file @
c8bc2aa4
...
...
@@ -38,13 +38,13 @@ export const purchasePlanRoute = [
/** 待审核采购计划(二级) */
path
:
'/memberCenter/procurementAbility/purchasePlan/purchasePlanTwo'
,
name
:
'待审核采购计划(二级)'
,
comp
Two
nt
:
'@/pages/transaction/purchaseAbility/purchasePlan/purchasePlanTwo'
comp
one
nt
:
'@/pages/transaction/purchaseAbility/purchasePlan/purchasePlanTwo'
},
{
/** 待执行采购计划 */
path
:
'/memberCenter/procurementAbility/purchasePlan/purchasePlanPerform'
,
name
:
'待执行采购计划'
,
comp
Two
nt
:
'@/pages/transaction/purchaseAbility/purchasePlan/purchasePlanPerform'
comp
one
nt
:
'@/pages/transaction/purchaseAbility/purchasePlan/purchasePlanPerform'
},
]
...
...
src/pages/transaction/purchaseAbility/components/table/index.tsx
View file @
c8bc2aa4
...
...
@@ -29,6 +29,9 @@ import {
DEMANDPLAN_SECHEMA
}
from
'../../schema/demandPlan'
;
import
{
PURCHASEPLAN_SECHEMA
}
from
'../../schema/purchasePlan'
;
import
{
PURCHASEBIDORDER_SCHEMA
,
PURCHASEBIDREADYADD_SCHEMA
,
PURCHASEBIDOSIGNUP_SCHEMA
,
...
...
@@ -58,6 +61,7 @@ interface Iprops {
'DEMANDPLANSERCH_SECHEMA'
|
'DEMANDPLANADDED_SECHEMA'
|
'DEMANDPLAN_SECHEMA'
|
'PURCHASEPLAN_SECHEMA'
|
'PURCHASEBIDORDER_SCHEMA'
|
'PURCHASEBIDREADYADD_SCHEMA'
|
'PURCHASEBIDOSIGNUP_SCHEMA'
|
...
...
@@ -115,6 +119,8 @@ const Table: React.FC<Iprops> = (props: any) => {
return
DEMANDPLANADDED_SECHEMA
;
case
'DEMANDPLAN_SECHEMA'
:
return
DEMANDPLAN_SECHEMA
;
case
'PURCHASEPLAN_SECHEMA'
:
return
PURCHASEPLAN_SECHEMA
;
case
'PURCHASEBIDORDER_SCHEMA'
:
return
PURCHASEBIDORDER_SCHEMA
;
case
'PURCHASEBIDREADYADD_SCHEMA'
:
...
...
src/pages/transaction/purchaseAbility/demandPlan/demandPlanAdded/add.tsx
View file @
c8bc2aa4
import
React
from
'react'
;
import
{
Card
,
Tabs
}
from
'antd'
;
import
{
Card
,
Tabs
,
Button
}
from
'antd'
;
import
{
history
}
from
'umi'
;
import
BasicInfo
from
'./components/basicInfo'
;
import
{
PageHeaderWrapper
}
from
'@ant-design/pro-layout'
;
import
ReutrnEle
from
'@/components/ReturnEle'
;
import
Material
from
'./components/material'
;
const
{
TabPane
}
=
Tabs
;
const
DemandPlanAddedForm
=
()
=>
{
return
(
<
Card
>
<
Tabs
>
<
TabPane
tab=
"基本信息"
key=
"1"
>
<
BasicInfo
/>
</
TabPane
>
<
TabPane
tab=
"采购物料"
key=
"2"
>
<
PageHeaderWrapper
onBack=
{
()
=>
history
.
goBack
()
}
backIcon=
{
<
ReutrnEle
description=
"返回"
/>
}
extra=
{
<
Button
type=
"primary"
>
保存
</
Button
>
}
>
<
Card
>
<
Tabs
>
<
TabPane
tab=
"基本信息"
key=
"1"
>
<
BasicInfo
/>
</
TabPane
>
<
TabPane
tab=
"采购物料"
key=
"2"
>
<
Material
/>
</
TabPane
>
</
Tabs
>
</
Card
>
</
PageHeaderWrapper
>
</
TabPane
>
</
Tabs
>
</
Card
>
)
}
...
...
src/pages/transaction/purchaseAbility/demandPlan/demandPlanAdded/components/basicInfo.tsx
View file @
c8bc2aa4
import
React
from
'react'
;
import
{
Form
,
Input
,
DatePicker
}
from
'antd'
;
import
{
Form
,
Input
,
DatePicker
,
Row
,
Col
,
Typography
}
from
'antd'
;
const
layout
:
any
=
{
colon
:
false
,
...
...
@@ -15,38 +15,52 @@ const BasicInfo = () => {
<
Form
.
Item
label=
"需求计划摘要"
rules=
{
[{
required
:
true
,
message
:
'请输入需求计划摘要'
}]
}
name=
"summary"
>
<
Input
/>
</
Form
.
Item
>
<
Form
.
Item
label=
"需求计划周期"
rules=
{
[{
required
:
true
,
message
:
'请输入需求计划摘要'
}]
}
style=
{
{
marginBottom
:
0
}
}
>
<
Form
.
Item
name=
"startTime"
rules=
{
[{
required
:
true
}]
}
style=
{
{
display
:
'inline-block'
,
width
:
'calc(50% - 8px)'
}
}
>
<
DatePicker
/>
</
Form
.
Item
>
<
Form
.
Item
name=
"endTime"
rules=
{
[{
required
:
true
}]
}
style=
{
{
display
:
'inline-block'
,
width
:
'calc(50% - 8px)'
,
margin
:
'0 8px'
}
}
>
<
DatePicker
/>
</
Form
.
Item
>
<
Form
.
Item
required
label=
"需求计划周期"
rules=
{
[{
required
:
true
,
message
:
'请输入需求计划摘要'
}]
}
style=
{
{
marginBottom
:
0
}
}
>
<
Row
>
<
Col
span=
{
11
}
>
<
Form
.
Item
name=
"startTime"
rules=
{
[{
required
:
true
}]
}
>
<
DatePicker
style=
{
{
width
:
'100%'
}
}
placeholder=
'选择开始日期'
/>
</
Form
.
Item
>
</
Col
>
<
Col
span=
{
2
}
>
<
span
style=
{
{
display
:
'flex'
,
textAlign
:
'center'
,
height
:
'45%'
,
width
:
'100%'
,
alignItems
:
'center'
,
justifyContent
:
'space-evenly'
,
}
}
>
~
</
span
>
</
Col
>
<
Col
span=
{
11
}
>
<
Form
.
Item
name=
"endTime"
rules=
{
[{
required
:
true
}]
}
>
<
DatePicker
style=
{
{
width
:
'100%'
}
}
placeholder=
'选择结束日期'
/>
</
Form
.
Item
>
</
Col
>
</
Row
>
</
Form
.
Item
>
<
Form
.
Item
label=
"需求计划编号"
name=
"needPlanNo"
>
<
Input
/
>
<
Typography
.
Text
>
X2020025008
</
Typography
.
Text
>
</
Form
.
Item
>
<
Form
.
Item
label=
"编制部门"
name=
"department"
>
<
Input
/
>
<
Typography
.
Text
>
业务部
</
Typography
.
Text
>
</
Form
.
Item
>
<
Form
.
Item
label=
"编制人"
name=
"userName"
>
<
Input
/
>
<
Typography
.
Text
>
蒯美政
</
Typography
.
Text
>
</
Form
.
Item
>
<
Form
.
Item
label=
"编制时间"
name=
"createTime"
>
<
Input
/
>
<
Typography
.
Text
>
2020-08-25 09:00:00
</
Typography
.
Text
>
</
Form
.
Item
>
<
Form
.
Item
label=
"内部状态"
name=
"innerStatus"
>
<
Input
/
>
<
Typography
.
Text
>
待提交审核
</
Typography
.
Text
>
</
Form
.
Item
>
</
Form
>
</
Form
>
)
}
...
...
src/pages/transaction/purchaseAbility/demandPlan/demandPlanAdded/components/material.tsx
0 → 100644
View file @
c8bc2aa4
import
React
from
'react'
;
import
{
Form
,
Radio
,
Button
,
Table
}
from
'antd'
;
import
{
PlusOutlined
}
from
'@ant-design/icons'
;
import
{
ColumnType
}
from
'antd/lib/table/interface'
;
const
layout
:
any
=
{
colon
:
false
,
labelCol
:
{
style
:
{
width
:
'174px'
}
},
wrapperCol
:
{
span
:
24
},
labelAlign
:
"left"
}
const
Material
=
()
=>
{
const
[
form
]
=
Form
.
useForm
();
const
columns
:
ColumnType
<
Object
>
[]
=
[
{
title
:
'物料编号/名称'
,
key
:
'number'
,
dataIndex
:
'number'
},
{
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'
},
{
title
:
'操作'
,
key
:
'operate'
,
dataIndex
:
'operate'
}
]
return
(
<
Form
{
...
layout
}
form=
{
form
}
>
<
Form
.
Item
label=
'添加方式'
name=
'materielMode'
rules=
{
[{
required
:
true
,
message
:
'请选择添加方式'
}]
}
>
<
Radio
.
Group
>
<
Radio
value=
{
1
}
>
选择货品生成
</
Radio
>
<
Radio
value=
{
2
}
>
导入计划采购物料
</
Radio
>
</
Radio
.
Group
>
</
Form
.
Item
>
<
Button
type=
'dashed'
block
style=
{
{
marginBottom
:
'24px'
,
}
}
>
<
PlusOutlined
/>
添加
</
Button
>
<
Table
columns=
{
columns
}
dataSource=
{
[]
}
/>
</
Form
>
)
}
export
default
Material
;
src/pages/transaction/purchaseAbility/purchasePlan/demandPlanSummary/index.tsx
View file @
c8bc2aa4
import
React
,
{
useRef
,
useState
}
from
'react'
;
import
React
from
'react'
;
import
{
history
}
from
'umi'
;
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
{
Row
,
Col
,
Button
,
Badge
,
Tag
,
Space
,
Typography
,
Rate
}
from
'antd'
;
import
{
Row
,
Col
,
Button
,
Badge
,
Space
,
Typography
}
from
'antd'
;
import
{
OFFTER_EXTERNALSTATE
,
OFFTER_EXTERNALSTATE_COLOR
,
OFFTER_INTERNALSTATE
,
OFFTER_INTERNALSTATE_COLOR
,
CHNUM_TYPE
}
from
'../../constants'
;
import
{
PlayCircleOutlined
,
PlusOutlined
,
PoweroffOutlined
}
from
'@ant-design/icons'
;
const
{
Text
}
=
Typography
;
const
DemandPlanSummary
=
()
=>
{
...
...
@@ -21,68 +18,43 @@ const DemandPlanSummary = () => {
return
<>
{
moment
(
text
).
format
(
"YYYY-MM-DD HH:mm:ss"
)
}
</>
}
const
columns
:
ColumnType
<
any
>
[]
=
[{
title
:
'
报价单
号/摘要'
,
key
:
'
quotedPrice
No'
,
dataIndex
:
'
quotedPrice
No'
,
title
:
'
需求计划编
号/摘要'
,
key
:
'
needPlan
No'
,
dataIndex
:
'
needPlan
No'
,
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
.
details
}
</
Text
>
<
Text
type=
'secondary'
>
{
record
.
summary
}
</
Text
>
</
Space
>
)
},
{
title
:
'
需求单号/会员
'
,
key
:
'
purchaseInquiryNo
'
,
dataIndex
:
'
purchaseInquiryNo
'
,
title
:
'
计划开始/截止时间
'
,
key
:
'
startTime
'
,
dataIndex
:
'
startTime
'
,
render
:
(
text
:
any
,
record
:
any
)
=>
(
<
Space
direction=
'vertical'
>
<
EyePreview
url=
{
`/memberCenter/procurementAbility/offter/auditOffterOne/preview?id=${record.purchaseInquiryId}&number=${record.purchaseInquiryNo}`
}
>
{
text
}
</
EyePreview
>
<
Text
type=
'secondary'
>
{
record
.
memberName
}
</
Text
>
<
Text
type=
'secondary'
><
PlayCircleOutlined
/>
{
format
(
text
)
}
</
Text
>
<
Text
type=
'secondary'
><
PoweroffOutlined
/>
{
format
(
record
.
endTime
)
}
</
Text
>
</
Space
>
)
},
{
title
:
'报价截止时间'
,
key
:
'offerEndTime'
,
dataIndex
:
'offerEndTime'
,
render
:
(
text
:
any
,
record
:
any
)
=>
format
(
text
)
title
:
'编制部门'
,
key
:
'department'
,
dataIndex
:
'department'
,
},
{
title
:
'单据时间'
,
title
:
'编制人'
,
key
:
'userName'
,
dataIndex
:
'userName'
,
},
{
title
:
'编制时间'
,
key
:
'createTime'
,
dataIndex
:
'createTime'
,
render
:
(
text
:
any
,
record
:
any
)
=>
format
(
text
)
},
{
title
:
'报价轮次'
,
key
:
'turn'
,
dataIndex
:
'turn'
,
render
:
(
text
:
any
,
record
:
any
)
=>
(
<>
<
Rate
count=
{
3
}
character=
'▌'
disabled
className=
'rate_style'
style=
{
{
fontSize
:
'12px'
,
color
:
'#00B37A'
,
}
}
value=
{
text
}
allowHalf
/>
<
Text
>
第
{
CHNUM_TYPE
[
text
]
}
轮
</
Text
>
</>
)
},
{
title
:
'外部状态'
,
key
:
'externalState'
,
dataIndex
:
'externalState'
,
render
:
(
text
:
any
,
record
:
any
)
=>
<
Tag
color=
{
OFFTER_EXTERNALSTATE_COLOR
[
text
]
}
>
{
record
.
externalStateName
}
</
Tag
>
render
:
(
text
:
any
,
record
:
any
)
=>
<
Text
type=
'secondary'
>
{
format
(
text
)
}
</
Text
>
},
{
title
:
'内部状态'
,
key
:
'in
teriorState
'
,
dataIndex
:
'in
teriorState
'
,
render
:
(
text
:
any
,
record
:
any
)
=>
<
Badge
status=
{
OFFTER_INTERNALSTATE_COLOR
[
text
]
}
text=
{
record
.
in
teriorState
Name
}
/>
key
:
'in
nerStatus
'
,
dataIndex
:
'in
nerStatus
'
,
render
:
(
text
:
any
,
record
:
any
)
=>
<
Badge
status=
{
OFFTER_INTERNALSTATE_COLOR
[
text
]
}
text=
{
record
.
in
nerStatus
Name
}
/>
},
{
title
:
'操作'
,
key
:
'operate'
,
...
...
@@ -99,42 +71,21 @@ const DemandPlanSummary = () => {
)
}];
/** 多选操作 */
const
ref
=
useRef
<
any
>
({});
const
[
rowkeys
,
setRowKeys
]
=
useState
<
Array
<
number
>>
([]);
const
[
loading
,
setLoading
]
=
useState
<
boolean
>
(
false
)
/** 批量审核 */
const
fetchSubmitBatch
=
async
()
=>
{
setLoading
(
true
)
const
res
=
await
PublicApi
.
postPurchaseQuotedPriceExamine1Batch
({
ids
:
rowkeys
});
if
(
res
.
code
===
1000
)
{
ref
.
current
.
reload
();
setRowKeys
([])
setLoading
(
false
)
}
else
{
setLoading
(
false
)
}
}
return
(
<
Table
selectedRow
reload=
{
ref
}
fetchRowkeys=
{
(
e
)
=>
setRowKeys
(
e
)
}
schemaType=
"OFFERSERAHAUDIT_SCHEMA"
schemaType=
"DEMANDPLANADDED_SECHEMA"
columns=
{
columns
}
effects=
"
quotedPrice
No"
fetch=
{
PublicApi
.
getPurchase
QuotedPriceStayExamineList1
}
effects=
"
needPlan
No"
fetch=
{
PublicApi
.
getPurchase
NeedPlanList
}
controllerBtns=
{
<
Row
>
<
Col
span=
{
6
}
>
<
Button
loading=
{
loading
}
onClick=
{
fetchSubmitBatch
}
disabled=
{
rowkeys
.
length
===
0
}
onClick=
{
()
=>
history
.
push
(
'/memberCenter/procurementAbility/purchaseInquiry/add'
)
}
type=
"primary"
icon=
{
<
PlusOutlined
/>
}
>
批量提交审核
新建
</
Button
>
</
Col
>
</
Row
>
...
...
src/pages/transaction/purchaseAbility/purchasePlan/purchasePlanOne/index.tsx
View file @
c8bc2aa4
import
React
,
{
useRef
,
useState
}
from
'react'
;
import
React
from
'react'
;
import
{
history
}
from
'umi'
;
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
{
Row
,
Col
,
Button
,
Badge
,
Tag
,
Space
,
Typography
,
Rate
}
from
'antd'
;
import
{
Button
,
Badge
,
Space
,
Typography
}
from
'antd'
;
import
{
OFFTER_EXTERNALSTATE
,
OFFTER_EXTERNALSTATE_COLOR
,
OFFTER_INTERNALSTATE
,
OFFTER_INTERNALSTATE_COLOR
,
CHNUM_TYPE
}
from
'../../constants'
;
import
{
PlayCircleOutlined
,
PoweroffOutlined
}
from
'@ant-design/icons'
;
const
{
Text
}
=
Typography
;
const
PurchasePlanOne
=
()
=>
{
...
...
@@ -21,68 +18,43 @@ const PurchasePlanOne = () => {
return
<>
{
moment
(
text
).
format
(
"YYYY-MM-DD HH:mm:ss"
)
}
</>
}
const
columns
:
ColumnType
<
any
>
[]
=
[{
title
:
'
报价单
号/摘要'
,
key
:
'
quotedPrice
No'
,
dataIndex
:
'
quotedPrice
No'
,
title
:
'
采购计划编
号/摘要'
,
key
:
'
purchasePlan
No'
,
dataIndex
:
'
purchasePlan
No'
,
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
.
details
}
</
Text
>
<
Text
type=
'secondary'
>
{
record
.
summary
}
</
Text
>
</
Space
>
)
},
{
title
:
'
需求单号/会员
'
,
key
:
'
purchaseInquiryNo
'
,
dataIndex
:
'
purchaseInquiryNo
'
,
title
:
'
计划开始/截止时间
'
,
key
:
'
startTime
'
,
dataIndex
:
'
startTime
'
,
render
:
(
text
:
any
,
record
:
any
)
=>
(
<
Space
direction=
'vertical'
>
<
EyePreview
url=
{
`/memberCenter/procurementAbility/offter/auditOffterOne/preview?id=${record.purchaseInquiryId}&number=${record.purchaseInquiryNo}`
}
>
{
text
}
</
EyePreview
>
<
Text
type=
'secondary'
>
{
record
.
memberName
}
</
Text
>
<
Text
type=
'secondary'
><
PlayCircleOutlined
/>
{
format
(
text
)
}
</
Text
>
<
Text
type=
'secondary'
><
PoweroffOutlined
/>
{
format
(
record
.
endTime
)
}
</
Text
>
</
Space
>
)
},
{
title
:
'报价截止时间'
,
key
:
'offerEndTime'
,
dataIndex
:
'offerEndTime'
,
render
:
(
text
:
any
,
record
:
any
)
=>
format
(
text
)
title
:
'编制部门'
,
key
:
'department'
,
dataIndex
:
'department'
,
},
{
title
:
'单据时间'
,
title
:
'编制人'
,
key
:
'userName'
,
dataIndex
:
'userName'
,
},
{
title
:
'编制时间'
,
key
:
'createTime'
,
dataIndex
:
'createTime'
,
render
:
(
text
:
any
,
record
:
any
)
=>
format
(
text
)
},
{
title
:
'报价轮次'
,
key
:
'turn'
,
dataIndex
:
'turn'
,
render
:
(
text
:
any
,
record
:
any
)
=>
(
<>
<
Rate
count=
{
3
}
character=
'▌'
disabled
className=
'rate_style'
style=
{
{
fontSize
:
'12px'
,
color
:
'#00B37A'
,
}
}
value=
{
text
}
allowHalf
/>
<
Text
>
第
{
CHNUM_TYPE
[
text
]
}
轮
</
Text
>
</>
)
},
{
title
:
'外部状态'
,
key
:
'externalState'
,
dataIndex
:
'externalState'
,
render
:
(
text
:
any
,
record
:
any
)
=>
<
Tag
color=
{
OFFTER_EXTERNALSTATE_COLOR
[
text
]
}
>
{
record
.
externalStateName
}
</
Tag
>
render
:
(
text
:
any
,
record
:
any
)
=>
<
Text
type=
'secondary'
>
{
format
(
text
)
}
</
Text
>
},
{
title
:
'内部状态'
,
key
:
'in
teriorState
'
,
dataIndex
:
'in
teriorState
'
,
render
:
(
text
:
any
,
record
:
any
)
=>
<
Badge
status=
{
OFFTER_INTERNALSTATE_COLOR
[
text
]
}
text=
{
record
.
in
teriorState
Name
}
/>
key
:
'in
nerStatus
'
,
dataIndex
:
'in
nerStatus
'
,
render
:
(
text
:
any
,
record
:
any
)
=>
<
Badge
status=
{
OFFTER_INTERNALSTATE_COLOR
[
text
]
}
text=
{
record
.
in
nerStatus
Name
}
/>
},
{
title
:
'操作'
,
key
:
'operate'
,
...
...
@@ -99,46 +71,12 @@ const PurchasePlanOne = () => {
)
}];
/** 多选操作 */
const
ref
=
useRef
<
any
>
({});
const
[
rowkeys
,
setRowKeys
]
=
useState
<
Array
<
number
>>
([]);
const
[
loading
,
setLoading
]
=
useState
<
boolean
>
(
false
)
/** 批量审核 */
const
fetchSubmitBatch
=
async
()
=>
{
setLoading
(
true
)
const
res
=
await
PublicApi
.
postPurchaseQuotedPriceExamine1Batch
({
ids
:
rowkeys
});
if
(
res
.
code
===
1000
)
{
ref
.
current
.
reload
();
setRowKeys
([])
setLoading
(
false
)
}
else
{
setLoading
(
false
)
}
}
return
(
<
Table
selectedRow
reload=
{
ref
}
fetchRowkeys=
{
(
e
)
=>
setRowKeys
(
e
)
}
schemaType=
"OFFERSERAHAUDIT_SCHEMA"
schemaType=
"PURCHASEPLAN_SECHEMA"
columns=
{
columns
}
effects=
"quotedPriceNo"
fetch=
{
PublicApi
.
getPurchaseQuotedPriceStayExamineList1
}
controllerBtns=
{
<
Row
>
<
Col
span=
{
6
}
>
<
Button
loading=
{
loading
}
onClick=
{
fetchSubmitBatch
}
disabled=
{
rowkeys
.
length
===
0
}
>
批量提交审核
</
Button
>
</
Col
>
</
Row
>
}
effects=
"purchasePlanNo"
fetch=
{
PublicApi
.
getPurchasePurchasePlanList
}
/>
)
}
...
...
src/pages/transaction/purchaseAbility/purchasePlan/purchasePlanPerform/index.tsx
View file @
c8bc2aa4
import
React
,
{
useRef
,
useState
}
from
'react'
;
import
React
from
'react'
;
import
{
history
}
from
'umi'
;
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
{
Row
,
Col
,
Button
,
Badge
,
Tag
,
Space
,
Typography
,
Rate
}
from
'antd'
;
import
{
Button
,
Badge
,
Space
,
Typography
}
from
'antd'
;
import
{
OFFTER_EXTERNALSTATE
,
OFFTER_EXTERNALSTATE_COLOR
,
OFFTER_INTERNALSTATE
,
OFFTER_INTERNALSTATE_COLOR
,
CHNUM_TYPE
}
from
'../../constants'
;
import
{
PlayCircleOutlined
,
PoweroffOutlined
}
from
'@ant-design/icons'
;
const
{
Text
}
=
Typography
;
const
PurchasePlanPerform
=
()
=>
{
...
...
@@ -21,68 +18,43 @@ const PurchasePlanPerform = () => {
return
<>
{
moment
(
text
).
format
(
"YYYY-MM-DD HH:mm:ss"
)
}
</>
}
const
columns
:
ColumnType
<
any
>
[]
=
[{
title
:
'
报价单
号/摘要'
,
key
:
'
quotedPrice
No'
,
dataIndex
:
'
quotedPrice
No'
,
title
:
'
采购计划编
号/摘要'
,
key
:
'
purchasePlan
No'
,
dataIndex
:
'
purchasePlan
No'
,
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
.
details
}
</
Text
>
<
Text
type=
'secondary'
>
{
record
.
summary
}
</
Text
>
</
Space
>
)
},
{
title
:
'
需求单号/会员
'
,
key
:
'
purchaseInquiryNo
'
,
dataIndex
:
'
purchaseInquiryNo
'
,
title
:
'
计划开始/截止时间
'
,
key
:
'
startTime
'
,
dataIndex
:
'
startTime
'
,
render
:
(
text
:
any
,
record
:
any
)
=>
(
<
Space
direction=
'vertical'
>
<
EyePreview
url=
{
`/memberCenter/procurementAbility/offter/auditOffterOne/preview?id=${record.purchaseInquiryId}&number=${record.purchaseInquiryNo}`
}
>
{
text
}
</
EyePreview
>
<
Text
type=
'secondary'
>
{
record
.
memberName
}
</
Text
>
<
Text
type=
'secondary'
><
PlayCircleOutlined
/>
{
format
(
text
)
}
</
Text
>
<
Text
type=
'secondary'
><
PoweroffOutlined
/>
{
format
(
record
.
endTime
)
}
</
Text
>
</
Space
>
)
},
{
title
:
'报价截止时间'
,
key
:
'offerEndTime'
,
dataIndex
:
'offerEndTime'
,
render
:
(
text
:
any
,
record
:
any
)
=>
format
(
text
)
title
:
'编制部门'
,
key
:
'department'
,
dataIndex
:
'department'
,
},
{
title
:
'单据时间'
,
title
:
'编制人'
,
key
:
'userName'
,
dataIndex
:
'userName'
,
},
{
title
:
'编制时间'
,
key
:
'createTime'
,
dataIndex
:
'createTime'
,
render
:
(
text
:
any
,
record
:
any
)
=>
format
(
text
)
},
{
title
:
'报价轮次'
,
key
:
'turn'
,
dataIndex
:
'turn'
,
render
:
(
text
:
any
,
record
:
any
)
=>
(
<>
<
Rate
count=
{
3
}
character=
'▌'
disabled
className=
'rate_style'
style=
{
{
fontSize
:
'12px'
,
color
:
'#00B37A'
,
}
}
value=
{
text
}
allowHalf
/>
<
Text
>
第
{
CHNUM_TYPE
[
text
]
}
轮
</
Text
>
</>
)
},
{
title
:
'外部状态'
,
key
:
'externalState'
,
dataIndex
:
'externalState'
,
render
:
(
text
:
any
,
record
:
any
)
=>
<
Tag
color=
{
OFFTER_EXTERNALSTATE_COLOR
[
text
]
}
>
{
record
.
externalStateName
}
</
Tag
>
render
:
(
text
:
any
,
record
:
any
)
=>
<
Text
type=
'secondary'
>
{
format
(
text
)
}
</
Text
>
},
{
title
:
'内部状态'
,
key
:
'in
teriorState
'
,
dataIndex
:
'in
teriorState
'
,
render
:
(
text
:
any
,
record
:
any
)
=>
<
Badge
status=
{
OFFTER_INTERNALSTATE_COLOR
[
text
]
}
text=
{
record
.
in
teriorState
Name
}
/>
key
:
'in
nerStatus
'
,
dataIndex
:
'in
nerStatus
'
,
render
:
(
text
:
any
,
record
:
any
)
=>
<
Badge
status=
{
OFFTER_INTERNALSTATE_COLOR
[
text
]
}
text=
{
record
.
in
nerStatus
Name
}
/>
},
{
title
:
'操作'
,
key
:
'operate'
,
...
...
@@ -99,46 +71,12 @@ const PurchasePlanPerform = () => {
)
}];
/** 多选操作 */
const
ref
=
useRef
<
any
>
({});
const
[
rowkeys
,
setRowKeys
]
=
useState
<
Array
<
number
>>
([]);
const
[
loading
,
setLoading
]
=
useState
<
boolean
>
(
false
)
/** 批量审核 */
const
fetchSubmitBatch
=
async
()
=>
{
setLoading
(
true
)
const
res
=
await
PublicApi
.
postPurchaseQuotedPriceExamine1Batch
({
ids
:
rowkeys
});
if
(
res
.
code
===
1000
)
{
ref
.
current
.
reload
();
setRowKeys
([])
setLoading
(
false
)
}
else
{
setLoading
(
false
)
}
}
return
(
<
Table
selectedRow
reload=
{
ref
}
fetchRowkeys=
{
(
e
)
=>
setRowKeys
(
e
)
}
schemaType=
"OFFERSERAHAUDIT_SCHEMA"
schemaType=
"PURCHASEPLAN_SECHEMA"
columns=
{
columns
}
effects=
"quotedPriceNo"
fetch=
{
PublicApi
.
getPurchaseQuotedPriceStayExamineList1
}
controllerBtns=
{
<
Row
>
<
Col
span=
{
6
}
>
<
Button
loading=
{
loading
}
onClick=
{
fetchSubmitBatch
}
disabled=
{
rowkeys
.
length
===
0
}
>
批量提交审核
</
Button
>
</
Col
>
</
Row
>
}
effects=
"purchasePlanNo"
fetch=
{
PublicApi
.
getPurchasePurchasePlanList
}
/>
)
}
...
...
src/pages/transaction/purchaseAbility/purchasePlan/purchasePlanSearch/index.tsx
View file @
c8bc2aa4
import
React
,
{
useRef
,
useState
}
from
'react'
;
import
React
from
'react'
;
import
{
history
}
from
'umi'
;
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
{
Row
,
Col
,
Button
,
Badge
,
Tag
,
Space
,
Typography
,
Rate
}
from
'antd'
;
import
{
Button
,
Badge
,
Space
,
Typography
}
from
'antd'
;
import
{
OFFTER_EXTERNALSTATE
,
OFFTER_EXTERNALSTATE_COLOR
,
OFFTER_INTERNALSTATE
,
OFFTER_INTERNALSTATE_COLOR
,
CHNUM_TYPE
}
from
'../../constants'
;
import
{
PlayCircleOutlined
,
PoweroffOutlined
}
from
'@ant-design/icons'
;
const
{
Text
}
=
Typography
;
const
PurchasePlanSearch
=
()
=>
{
...
...
@@ -21,68 +18,43 @@ const PurchasePlanSearch = () => {
return
<>
{
moment
(
text
).
format
(
"YYYY-MM-DD HH:mm:ss"
)
}
</>
}
const
columns
:
ColumnType
<
any
>
[]
=
[{
title
:
'
报价单
号/摘要'
,
key
:
'
quotedPrice
No'
,
dataIndex
:
'
quotedPrice
No'
,
title
:
'
采购计划编
号/摘要'
,
key
:
'
purchasePlan
No'
,
dataIndex
:
'
purchasePlan
No'
,
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
.
details
}
</
Text
>
<
Text
type=
'secondary'
>
{
record
.
summary
}
</
Text
>
</
Space
>
)
},
{
title
:
'
需求单号/会员
'
,
key
:
'
purchaseInquiryNo
'
,
dataIndex
:
'
purchaseInquiryNo
'
,
title
:
'
计划开始/截止时间
'
,
key
:
'
startTime
'
,
dataIndex
:
'
startTime
'
,
render
:
(
text
:
any
,
record
:
any
)
=>
(
<
Space
direction=
'vertical'
>
<
EyePreview
url=
{
`/memberCenter/procurementAbility/offter/auditOffterOne/preview?id=${record.purchaseInquiryId}&number=${record.purchaseInquiryNo}`
}
>
{
text
}
</
EyePreview
>
<
Text
type=
'secondary'
>
{
record
.
memberName
}
</
Text
>
<
Text
type=
'secondary'
><
PlayCircleOutlined
/>
{
format
(
text
)
}
</
Text
>
<
Text
type=
'secondary'
><
PoweroffOutlined
/>
{
format
(
record
.
endTime
)
}
</
Text
>
</
Space
>
)
},
{
title
:
'报价截止时间'
,
key
:
'offerEndTime'
,
dataIndex
:
'offerEndTime'
,
render
:
(
text
:
any
,
record
:
any
)
=>
format
(
text
)
title
:
'编制部门'
,
key
:
'department'
,
dataIndex
:
'department'
,
},
{
title
:
'单据时间'
,
title
:
'编制人'
,
key
:
'userName'
,
dataIndex
:
'userName'
,
},
{
title
:
'编制时间'
,
key
:
'createTime'
,
dataIndex
:
'createTime'
,
render
:
(
text
:
any
,
record
:
any
)
=>
format
(
text
)
},
{
title
:
'报价轮次'
,
key
:
'turn'
,
dataIndex
:
'turn'
,
render
:
(
text
:
any
,
record
:
any
)
=>
(
<>
<
Rate
count=
{
3
}
character=
'▌'
disabled
className=
'rate_style'
style=
{
{
fontSize
:
'12px'
,
color
:
'#00B37A'
,
}
}
value=
{
text
}
allowHalf
/>
<
Text
>
第
{
CHNUM_TYPE
[
text
]
}
轮
</
Text
>
</>
)
},
{
title
:
'外部状态'
,
key
:
'externalState'
,
dataIndex
:
'externalState'
,
render
:
(
text
:
any
,
record
:
any
)
=>
<
Tag
color=
{
OFFTER_EXTERNALSTATE_COLOR
[
text
]
}
>
{
record
.
externalStateName
}
</
Tag
>
render
:
(
text
:
any
,
record
:
any
)
=>
<
Text
type=
'secondary'
>
{
format
(
text
)
}
</
Text
>
},
{
title
:
'内部状态'
,
key
:
'in
teriorState
'
,
dataIndex
:
'in
teriorState
'
,
render
:
(
text
:
any
,
record
:
any
)
=>
<
Badge
status=
{
OFFTER_INTERNALSTATE_COLOR
[
text
]
}
text=
{
record
.
in
teriorState
Name
}
/>
key
:
'in
nerStatus
'
,
dataIndex
:
'in
nerStatus
'
,
render
:
(
text
:
any
,
record
:
any
)
=>
<
Badge
status=
{
OFFTER_INTERNALSTATE_COLOR
[
text
]
}
text=
{
record
.
in
nerStatus
Name
}
/>
},
{
title
:
'操作'
,
key
:
'operate'
,
...
...
@@ -99,47 +71,14 @@ const PurchasePlanSearch = () => {
)
}];
/** 多选操作 */
const
ref
=
useRef
<
any
>
({});
const
[
rowkeys
,
setRowKeys
]
=
useState
<
Array
<
number
>>
([]);
const
[
loading
,
setLoading
]
=
useState
<
boolean
>
(
false
)
/** 批量审核 */
const
fetchSubmitBatch
=
async
()
=>
{
setLoading
(
true
)
const
res
=
await
PublicApi
.
postPurchaseQuotedPriceExamine1Batch
({
ids
:
rowkeys
});
if
(
res
.
code
===
1000
)
{
ref
.
current
.
reload
();
setRowKeys
([])
setLoading
(
false
)
}
else
{
setLoading
(
false
)
}
}
return
(
<
Table
selectedRow
reload=
{
ref
}
fetchRowkeys=
{
(
e
)
=>
setRowKeys
(
e
)
}
schemaType=
"OFFERSERAHAUDIT_SCHEMA"
schemaType=
"DEMANDPLAN_SECHEMA"
columns=
{
columns
}
effects=
"quotedPriceNo"
fetch=
{
PublicApi
.
getPurchaseQuotedPriceStayExamineList1
}
controllerBtns=
{
<
Row
>
<
Col
span=
{
6
}
>
<
Button
loading=
{
loading
}
onClick=
{
fetchSubmitBatch
}
disabled=
{
rowkeys
.
length
===
0
}
>
批量提交审核
</
Button
>
</
Col
>
</
Row
>
}
effects=
"needPlanNo"
fetch=
{
PublicApi
.
getPurchasePurchasePlanList
}
/>
)
}
export
default
PurchasePlanSearch
src/pages/transaction/purchaseAbility/purchasePlan/purchasePlanSubmit/index.tsx
View file @
c8bc2aa4
import
React
,
{
useRef
,
useState
}
from
'react'
;
import
React
from
'react'
;
import
{
history
}
from
'umi'
;
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
{
Row
,
Col
,
Button
,
Badge
,
Tag
,
Space
,
Typography
,
Rate
}
from
'antd'
;
import
{
Button
,
Badge
,
Space
,
Typography
}
from
'antd'
;
import
{
OFFTER_EXTERNALSTATE
,
OFFTER_EXTERNALSTATE_COLOR
,
OFFTER_INTERNALSTATE
,
OFFTER_INTERNALSTATE_COLOR
,
CHNUM_TYPE
}
from
'../../constants'
;
import
{
PlayCircleOutlined
,
PoweroffOutlined
}
from
'@ant-design/icons'
;
const
{
Text
}
=
Typography
;
const
PurchasePlanSubmit
=
()
=>
{
...
...
@@ -21,68 +18,43 @@ const PurchasePlanSubmit = () => {
return
<>
{
moment
(
text
).
format
(
"YYYY-MM-DD HH:mm:ss"
)
}
</>
}
const
columns
:
ColumnType
<
any
>
[]
=
[{
title
:
'
报价单
号/摘要'
,
key
:
'
quotedPrice
No'
,
dataIndex
:
'
quotedPrice
No'
,
title
:
'
采购计划编
号/摘要'
,
key
:
'
purchasePlan
No'
,
dataIndex
:
'
purchasePlan
No'
,
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
.
details
}
</
Text
>
<
Text
type=
'secondary'
>
{
record
.
summary
}
</
Text
>
</
Space
>
)
},
{
title
:
'
需求单号/会员
'
,
key
:
'
purchaseInquiryNo
'
,
dataIndex
:
'
purchaseInquiryNo
'
,
title
:
'
计划开始/截止时间
'
,
key
:
'
startTime
'
,
dataIndex
:
'
startTime
'
,
render
:
(
text
:
any
,
record
:
any
)
=>
(
<
Space
direction=
'vertical'
>
<
EyePreview
url=
{
`/memberCenter/procurementAbility/offter/auditOffterOne/preview?id=${record.purchaseInquiryId}&number=${record.purchaseInquiryNo}`
}
>
{
text
}
</
EyePreview
>
<
Text
type=
'secondary'
>
{
record
.
memberName
}
</
Text
>
<
Text
type=
'secondary'
><
PlayCircleOutlined
/>
{
format
(
text
)
}
</
Text
>
<
Text
type=
'secondary'
><
PoweroffOutlined
/>
{
format
(
record
.
endTime
)
}
</
Text
>
</
Space
>
)
},
{
title
:
'报价截止时间'
,
key
:
'offerEndTime'
,
dataIndex
:
'offerEndTime'
,
render
:
(
text
:
any
,
record
:
any
)
=>
format
(
text
)
title
:
'编制部门'
,
key
:
'department'
,
dataIndex
:
'department'
,
},
{
title
:
'单据时间'
,
title
:
'编制人'
,
key
:
'userName'
,
dataIndex
:
'userName'
,
},
{
title
:
'编制时间'
,
key
:
'createTime'
,
dataIndex
:
'createTime'
,
render
:
(
text
:
any
,
record
:
any
)
=>
format
(
text
)
},
{
title
:
'报价轮次'
,
key
:
'turn'
,
dataIndex
:
'turn'
,
render
:
(
text
:
any
,
record
:
any
)
=>
(
<>
<
Rate
count=
{
3
}
character=
'▌'
disabled
className=
'rate_style'
style=
{
{
fontSize
:
'12px'
,
color
:
'#00B37A'
,
}
}
value=
{
text
}
allowHalf
/>
<
Text
>
第
{
CHNUM_TYPE
[
text
]
}
轮
</
Text
>
</>
)
},
{
title
:
'外部状态'
,
key
:
'externalState'
,
dataIndex
:
'externalState'
,
render
:
(
text
:
any
,
record
:
any
)
=>
<
Tag
color=
{
OFFTER_EXTERNALSTATE_COLOR
[
text
]
}
>
{
record
.
externalStateName
}
</
Tag
>
render
:
(
text
:
any
,
record
:
any
)
=>
<
Text
type=
'secondary'
>
{
format
(
text
)
}
</
Text
>
},
{
title
:
'内部状态'
,
key
:
'in
teriorState
'
,
dataIndex
:
'in
teriorState
'
,
render
:
(
text
:
any
,
record
:
any
)
=>
<
Badge
status=
{
OFFTER_INTERNALSTATE_COLOR
[
text
]
}
text=
{
record
.
in
teriorState
Name
}
/>
key
:
'in
nerStatus
'
,
dataIndex
:
'in
nerStatus
'
,
render
:
(
text
:
any
,
record
:
any
)
=>
<
Badge
status=
{
OFFTER_INTERNALSTATE_COLOR
[
text
]
}
text=
{
record
.
in
nerStatus
Name
}
/>
},
{
title
:
'操作'
,
key
:
'operate'
,
...
...
@@ -99,47 +71,14 @@ const PurchasePlanSubmit = () => {
)
}];
/** 多选操作 */
const
ref
=
useRef
<
any
>
({});
const
[
rowkeys
,
setRowKeys
]
=
useState
<
Array
<
number
>>
([]);
const
[
loading
,
setLoading
]
=
useState
<
boolean
>
(
false
)
/** 批量审核 */
const
fetchSubmitBatch
=
async
()
=>
{
setLoading
(
true
)
const
res
=
await
PublicApi
.
postPurchaseQuotedPriceExamine1Batch
({
ids
:
rowkeys
});
if
(
res
.
code
===
1000
)
{
ref
.
current
.
reload
();
setRowKeys
([])
setLoading
(
false
)
}
else
{
setLoading
(
false
)
}
}
return
(
<
Table
selectedRow
reload=
{
ref
}
fetchRowkeys=
{
(
e
)
=>
setRowKeys
(
e
)
}
schemaType=
"OFFERSERAHAUDIT_SCHEMA"
schemaType=
"PURCHASEPLAN_SECHEMA"
columns=
{
columns
}
effects=
"quotedPriceNo"
fetch=
{
PublicApi
.
getPurchaseQuotedPriceStayExamineList1
}
controllerBtns=
{
<
Row
>
<
Col
span=
{
6
}
>
<
Button
loading=
{
loading
}
onClick=
{
fetchSubmitBatch
}
disabled=
{
rowkeys
.
length
===
0
}
>
批量提交审核
</
Button
>
</
Col
>
</
Row
>
}
effects=
"purchasePlanNo"
fetch=
{
PublicApi
.
getPurchasePurchasePlanList
}
/>
)
}
export
default
PurchasePlanSubmit
src/pages/transaction/purchaseAbility/purchasePlan/purchasePlanTwo/index.tsx
View file @
c8bc2aa4
import
React
,
{
useRef
,
useState
}
from
'react'
;
import
React
from
'react'
;
import
{
history
}
from
'umi'
;
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
{
Row
,
Col
,
Button
,
Badge
,
Tag
,
Space
,
Typography
,
Rate
}
from
'antd'
;
import
{
Button
,
Badge
,
Space
,
Typography
}
from
'antd'
;
import
{
OFFTER_EXTERNALSTATE
,
OFFTER_EXTERNALSTATE_COLOR
,
OFFTER_INTERNALSTATE
,
OFFTER_INTERNALSTATE_COLOR
,
CHNUM_TYPE
}
from
'../../constants'
;
import
{
PlayCircleOutlined
,
PoweroffOutlined
}
from
'@ant-design/icons'
;
const
{
Text
}
=
Typography
;
const
PurchasePlanTwo
=
()
=>
{
...
...
@@ -21,68 +18,43 @@ const PurchasePlanTwo = () => {
return
<>
{
moment
(
text
).
format
(
"YYYY-MM-DD HH:mm:ss"
)
}
</>
}
const
columns
:
ColumnType
<
any
>
[]
=
[{
title
:
'
报价单
号/摘要'
,
key
:
'
quotedPrice
No'
,
dataIndex
:
'
quotedPrice
No'
,
title
:
'
采购计划编
号/摘要'
,
key
:
'
purchasePlan
No'
,
dataIndex
:
'
purchasePlan
No'
,
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
.
details
}
</
Text
>
<
Text
type=
'secondary'
>
{
record
.
summary
}
</
Text
>
</
Space
>
)
},
{
title
:
'
需求单号/会员
'
,
key
:
'
purchaseInquiryNo
'
,
dataIndex
:
'
purchaseInquiryNo
'
,
title
:
'
计划开始/截止时间
'
,
key
:
'
startTime
'
,
dataIndex
:
'
startTime
'
,
render
:
(
text
:
any
,
record
:
any
)
=>
(
<
Space
direction=
'vertical'
>
<
EyePreview
url=
{
`/memberCenter/procurementAbility/offter/auditOffterOne/preview?id=${record.purchaseInquiryId}&number=${record.purchaseInquiryNo}`
}
>
{
text
}
</
EyePreview
>
<
Text
type=
'secondary'
>
{
record
.
memberName
}
</
Text
>
<
Text
type=
'secondary'
><
PlayCircleOutlined
/>
{
format
(
text
)
}
</
Text
>
<
Text
type=
'secondary'
><
PoweroffOutlined
/>
{
format
(
record
.
endTime
)
}
</
Text
>
</
Space
>
)
},
{
title
:
'报价截止时间'
,
key
:
'offerEndTime'
,
dataIndex
:
'offerEndTime'
,
render
:
(
text
:
any
,
record
:
any
)
=>
format
(
text
)
title
:
'编制部门'
,
key
:
'department'
,
dataIndex
:
'department'
,
},
{
title
:
'单据时间'
,
title
:
'编制人'
,
key
:
'userName'
,
dataIndex
:
'userName'
,
},
{
title
:
'编制时间'
,
key
:
'createTime'
,
dataIndex
:
'createTime'
,
render
:
(
text
:
any
,
record
:
any
)
=>
format
(
text
)
},
{
title
:
'报价轮次'
,
key
:
'turn'
,
dataIndex
:
'turn'
,
render
:
(
text
:
any
,
record
:
any
)
=>
(
<>
<
Rate
count=
{
3
}
character=
'▌'
disabled
className=
'rate_style'
style=
{
{
fontSize
:
'12px'
,
color
:
'#00B37A'
,
}
}
value=
{
text
}
allowHalf
/>
<
Text
>
第
{
CHNUM_TYPE
[
text
]
}
轮
</
Text
>
</>
)
},
{
title
:
'外部状态'
,
key
:
'externalState'
,
dataIndex
:
'externalState'
,
render
:
(
text
:
any
,
record
:
any
)
=>
<
Tag
color=
{
OFFTER_EXTERNALSTATE_COLOR
[
text
]
}
>
{
record
.
externalStateName
}
</
Tag
>
render
:
(
text
:
any
,
record
:
any
)
=>
<
Text
type=
'secondary'
>
{
format
(
text
)
}
</
Text
>
},
{
title
:
'内部状态'
,
key
:
'in
teriorState
'
,
dataIndex
:
'in
teriorState
'
,
render
:
(
text
:
any
,
record
:
any
)
=>
<
Badge
status=
{
OFFTER_INTERNALSTATE_COLOR
[
text
]
}
text=
{
record
.
in
teriorState
Name
}
/>
key
:
'in
nerStatus
'
,
dataIndex
:
'in
nerStatus
'
,
render
:
(
text
:
any
,
record
:
any
)
=>
<
Badge
status=
{
OFFTER_INTERNALSTATE_COLOR
[
text
]
}
text=
{
record
.
in
nerStatus
Name
}
/>
},
{
title
:
'操作'
,
key
:
'operate'
,
...
...
@@ -99,47 +71,15 @@ const PurchasePlanTwo = () => {
)
}];
/** 多选操作 */
const
ref
=
useRef
<
any
>
({});
const
[
rowkeys
,
setRowKeys
]
=
useState
<
Array
<
number
>>
([]);
const
[
loading
,
setLoading
]
=
useState
<
boolean
>
(
false
)
/** 批量审核 */
const
fetchSubmitBatch
=
async
()
=>
{
setLoading
(
true
)
const
res
=
await
PublicApi
.
postPurchaseQuotedPriceExamine1Batch
({
ids
:
rowkeys
});
if
(
res
.
code
===
1000
)
{
ref
.
current
.
reload
();
setRowKeys
([])
setLoading
(
false
)
}
else
{
setLoading
(
false
)
}
}
return
(
<
Table
selectedRow
reload=
{
ref
}
fetchRowkeys=
{
(
e
)
=>
setRowKeys
(
e
)
}
schemaType=
"OFFERSERAHAUDIT_SCHEMA"
schemaType=
"PURCHASEPLAN_SECHEMA"
columns=
{
columns
}
effects=
"quotedPriceNo"
fetch=
{
PublicApi
.
getPurchaseQuotedPriceStayExamineList1
}
controllerBtns=
{
<
Row
>
<
Col
span=
{
6
}
>
<
Button
loading=
{
loading
}
onClick=
{
fetchSubmitBatch
}
disabled=
{
rowkeys
.
length
===
0
}
>
批量提交审核
</
Button
>
</
Col
>
</
Row
>
}
effects=
"purchasePlanNo"
fetch=
{
PublicApi
.
getPurchasePurchasePlanList
}
/>
)
}
export
default
PurchasePlanTwo
src/pages/transaction/purchaseAbility/schema/purchasePlan.ts
0 → 100644
View file @
c8bc2aa4
import
{
ISchema
}
from
'@formily/antd'
;
import
{
FORM_FILTER_PATH
}
from
'@/formSchema/const'
;
/** 待提交审核采购计划(一级) & (二级) & 待提交审核采购计划 & 待执行采购计划 */
export
const
PURCHASEPLAN_SECHEMA
:
ISchema
=
{
type
:
'object'
,
properties
:
{
megalayout
:
{
type
:
'object'
,
"x-component"
:
'mega-layout'
,
properties
:
{
purchasePlanNo
:
{
type
:
'string'
,
"x-component"
:
"Search"
,
"x-mega-props"
:
{
},
"x-component-props"
:
{
placeholder
:
'采购计划编号'
,
align
:
'flex-left'
,
}
}
}
},
[
FORM_FILTER_PATH
]:
{
type
:
'object'
,
"x-component"
:
"flex-layout"
,
"x-component-props"
:
{
rowStyle
:
{
justifyContent
:
'flex-start'
,
flexWrap
:
'nowrap'
},
colStyle
:
{
//改变间隔
marginRight
:
20
}
},
properties
:
{
PRO_LAYOUT
:
{
type
:
'object'
,
"x-component"
:
'mega-layout'
,
"x-mega-props"
:
{
span
:
5
},
"x-component-props"
:
{
inline
:
true
},
properties
:
{
summary
:
{
type
:
'string'
,
"x-component-props"
:
{
placeholder
:
'采购计划摘要'
,
}
},
"[startTime,endTime]"
:
{
type
:
'string'
,
"x-component"
:
"dateSelect"
,
"x-component-props"
:
{
placeholder
:
'采购计划周期'
,
}
},
}
},
sumbit
:
{
"x-component"
:
'Submit'
,
"x-mega-props"
:
{
span
:
1
},
"x-component-props"
:
{
children
:
'查询'
}
}
}
}
}
}
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