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
68a7b01c
Commit
68a7b01c
authored
Nov 28, 2020
by
前端-黄佳鑫
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
新增需求发布新需求完成接口接入
parent
c76f2f18
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
163 additions
and
54 deletions
+163
-54
demandPosts.ts
config/routes/tranactionRoute/demandPosts.ts
+7
-0
addGoods.tsx
...tion/enquirySubmit/addDemandOrder/components/addGoods.tsx
+17
-1
basicInfo.tsx
...ion/enquirySubmit/addDemandOrder/components/basicInfo.tsx
+33
-9
demandDbutted.tsx
...enquirySubmit/addDemandOrder/components/demandDbutted.tsx
+4
-2
flowRecord.tsx
...on/enquirySubmit/addDemandOrder/components/flowRecord.tsx
+8
-3
tradingConditions.tsx
...irySubmit/addDemandOrder/components/tradingConditions.tsx
+17
-3
index.tsx
src/pages/transaction/enquirySubmit/addDemandOrder/index.tsx
+53
-12
index.tsx
src/pages/transaction/enquirySubmit/toAddSubmit/index.tsx
+24
-24
No files found.
config/routes/tranactionRoute/demandPosts.ts
View file @
68a7b01c
...
@@ -43,6 +43,13 @@ export default [
...
@@ -43,6 +43,13 @@ export default [
},
},
// 待新增需求单-编辑
// 待新增需求单-编辑
{
{
path
:
'/memberCenter/tranactionAbility/enquirySubmit/addDemandOrder/edit'
,
name
:
'editEnquiry'
,
component
:
'@/pages/transaction/enquirySubmit/addDemandOrder'
,
hideInMenu
:
true
,
},
// 待新增需求单-编辑
{
path
:
'/memberCenter/tranactionAbility/enquirySubmit/toAddSubmitList/edit'
,
path
:
'/memberCenter/tranactionAbility/enquirySubmit/toAddSubmitList/edit'
,
name
:
'editEnquiry'
,
name
:
'editEnquiry'
,
component
:
'@/pages/transaction/enquirySubmit/toAddSubmit/detail'
,
component
:
'@/pages/transaction/enquirySubmit/toAddSubmit/detail'
,
...
...
src/pages/transaction/enquirySubmit/addDemandOrder/components/addGoods.tsx
View file @
68a7b01c
...
@@ -4,6 +4,7 @@ import { ColumnType } from 'antd/lib/table/interface';
...
@@ -4,6 +4,7 @@ import { ColumnType } from 'antd/lib/table/interface';
import
ModalAnchor
from
'./Modal/modalAnchor'
;
import
ModalAnchor
from
'./Modal/modalAnchor'
;
import
ModalGoods
from
'./Modal/modalGoods'
;
import
ModalGoods
from
'./Modal/modalGoods'
;
import
{
PlusOutlined
}
from
'@ant-design/icons'
;
import
{
PlusOutlined
}
from
'@ant-design/icons'
;
import
{
PublicApi
}
from
'@/services/api'
;
const
layout
:
any
=
{
const
layout
:
any
=
{
...
@@ -134,12 +135,27 @@ const AddGoods: React.FC<faceSetData> = (props) => {
...
@@ -134,12 +135,27 @@ const AddGoods: React.FC<faceSetData> = (props) => {
}
}
},
[
tabledata
])
},
[
tabledata
])
useEffect
(()
=>
{
/**编辑回显数据 */
if
(
Object
.
keys
(
set
).
length
>
0
)
{
form
.
setFieldsValue
({
type
:
set
.
type
})
PublicApi
.
getOrderRequisitionFormProductDetails
({
id
:
set
.
id
}).
then
(
res
=>
{
if
(
res
.
code
===
1000
)
{
setType
(
set
.
type
)
settabledata
([
res
])
}
})
}
},
[
set
])
return
(
return
(
<
Form
<
Form
{
...
layout
}
{
...
layout
}
form=
{
form
}
form=
{
form
}
>
>
<
Form
.
Item
label=
'添加方式'
rules=
{
[{
required
:
true
,
message
:
'请选择添加方式'
}]
}
>
<
Form
.
Item
label=
'添加方式'
name=
'type'
rules=
{
[{
required
:
true
,
message
:
'请选择添加方式'
}]
}
>
<
Radio
.
Group
onChange=
{
changeRadio
}
>
<
Radio
.
Group
onChange=
{
changeRadio
}
>
<
Radio
value=
{
1
}
>
通过平台属性添加
</
Radio
>
<
Radio
value=
{
1
}
>
通过平台属性添加
</
Radio
>
<
Radio
value=
{
2
}
>
选择货品添加
</
Radio
>
<
Radio
value=
{
2
}
>
选择货品添加
</
Radio
>
...
...
src/pages/transaction/enquirySubmit/addDemandOrder/components/basicInfo.tsx
View file @
68a7b01c
...
@@ -41,7 +41,7 @@ const BasicInfo: React.FC<faceSetData> = (props) => {
...
@@ -41,7 +41,7 @@ const BasicInfo: React.FC<faceSetData> = (props) => {
})
})
}
}
// 选择下拉得内容
// 选择下拉得内容
const
handProvince
=
(
val
:
any
,
idx
:
number
,
num
:
number
)
=>
{
const
handProvince
=
async
(
val
:
any
,
idx
:
number
,
num
:
number
)
=>
{
const
result
=
[...
requisitionFormAddress
];
const
result
=
[...
requisitionFormAddress
];
const
cityCode
:
Array
<
any
>
=
[]
const
cityCode
:
Array
<
any
>
=
[]
result
.
forEach
((
item
:
any
)
=>
{
result
.
forEach
((
item
:
any
)
=>
{
...
@@ -51,7 +51,7 @@ const BasicInfo: React.FC<faceSetData> = (props) => {
...
@@ -51,7 +51,7 @@ const BasicInfo: React.FC<faceSetData> = (props) => {
})
})
setcode
([...
cityCode
]);
setcode
([...
cityCode
]);
if
(
num
===
1
)
{
if
(
num
===
1
)
{
province
.
forEach
(
item
=>
{
await
province
.
forEach
(
item
=>
{
if
(
item
.
code
===
val
)
{
if
(
item
.
code
===
val
)
{
PublicApi
.
getManageAreaByPcodeAll
({
pcode
:
val
}).
then
((
res
:
any
)
=>
{
PublicApi
.
getManageAreaByPcodeAll
({
pcode
:
val
}).
then
((
res
:
any
)
=>
{
if
(
res
.
code
===
1000
)
{
if
(
res
.
code
===
1000
)
{
...
@@ -63,7 +63,7 @@ const BasicInfo: React.FC<faceSetData> = (props) => {
...
@@ -63,7 +63,7 @@ const BasicInfo: React.FC<faceSetData> = (props) => {
})
})
}
}
})
})
}
else
{
}
else
{
city
.
forEach
(
item
=>
{
city
.
forEach
(
item
=>
{
item
.
citydata
.
forEach
(
items
=>
{
item
.
citydata
.
forEach
(
items
=>
{
...
@@ -139,6 +139,30 @@ const BasicInfo: React.FC<faceSetData> = (props) => {
...
@@ -139,6 +139,30 @@ const BasicInfo: React.FC<faceSetData> = (props) => {
},
[])
},
[])
useEffect
(()
=>
{
useEffect
(()
=>
{
/**编辑回显数据 */
if
(
Object
.
keys
(
set
).
length
>
0
)
{
setrequisitionFormAddress
([...
set
.
requisitionFormAddress
])
set
.
requisitionFormAddress
.
forEach
((
item
:
any
,
index
:
number
)
=>
{
PublicApi
.
getManageAreaByPcodeAll
({
pcode
:
item
.
provinceCode
}).
then
((
res
:
any
)
=>
{
if
(
res
.
code
===
1000
)
{
city
[
index
]
=
{
citydata
:
res
.
data
}
Promise
.
resolve
().
then
(()
=>
{
setTimeout
(()
=>
{
setcity
([...
city
])
form
.
setFieldsValue
({
details
:
set
.
details
,
[
'province_'
+
index
]:
item
.
provinceCode
,
[
'city_'
+
index
]:
item
.
cityCode
,
});
},
350
);
});
}
})
})
}
},
[
set
])
useEffect
(()
=>
{
currentRef
.
current
=
{
currentRef
.
current
=
{
get
:
()
=>
new
Promise
((
resolve
:
any
)
=>
{
get
:
()
=>
new
Promise
((
resolve
:
any
)
=>
{
form
.
validateFields
().
then
(
res
=>
{
form
.
validateFields
().
then
(
res
=>
{
...
@@ -231,27 +255,27 @@ const BasicInfo: React.FC<faceSetData> = (props) => {
...
@@ -231,27 +255,27 @@ const BasicInfo: React.FC<faceSetData> = (props) => {
<
Form
.
Item
<
Form
.
Item
label=
'需求单号'
label=
'需求单号'
>
>
<
span
>
SPTY12
</
span
>
<
span
>
{
set
.
requisitionFormNo
&&
set
.
requisitionFormNo
}
</
span
>
</
Form
.
Item
>
</
Form
.
Item
>
<
Form
.
Item
<
Form
.
Item
label=
'会员名称'
label=
'会员名称'
>
>
<
span
>
温州龙昌手袋有限公司
</
span
>
<
span
>
{
set
.
memberName
&&
set
.
memberName
}
</
span
>
</
Form
.
Item
>
</
Form
.
Item
>
<
Form
.
Item
<
Form
.
Item
label=
'单据时间'
label=
'单据时间'
>
>
<
span
>
2020-08-20 12:56:25
</
span
>
<
span
>
{
set
.
voucherTime
&&
set
.
voucherTime
}
</
span
>
</
Form
.
Item
>
</
Form
.
Item
>
<
Form
.
Item
<
Form
.
Item
label=
'外部状态'
label=
'外部状态'
>
>
<
span
>
待提交需求单
</
span
>
<
span
>
{
set
.
externalState
&&
set
.
externalState
}
</
span
>
</
Form
.
Item
>
</
Form
.
Item
>
<
Form
.
Item
<
Form
.
Item
label=
'
外
部状态'
label=
'
内
部状态'
>
>
<
span
>
待提交审核
</
span
>
<
span
>
{
set
.
interiorState
&&
set
.
interiorState
}
</
span
>
</
Form
.
Item
>
</
Form
.
Item
>
</
Form
>
</
Form
>
)
)
...
...
src/pages/transaction/enquirySubmit/addDemandOrder/components/demandDbutted.tsx
View file @
68a7b01c
...
@@ -148,9 +148,11 @@ const DemandDbutted: React.FC<faceSetData> = (props) => {
...
@@ -148,9 +148,11 @@ const DemandDbutted: React.FC<faceSetData> = (props) => {
shopId
===
3
&&
shopId
===
3
&&
// 指定会员
// 指定会员
<
Form
.
Item
noStyle
>
<
Form
.
Item
noStyle
>
<
Button
type=
'dashed'
block
style=
{
{
marginBottom
:
'24px'
}
}
><
PlusOutlined
/>
选择会员
</
Button
>
{
/* <Button type='dashed' block style={{ marginBottom: '24px' }}><PlusOutlined />选择会员</Button> */
}
<
Table
<
StandardTable
rowSelection=
{
rowSelection
}
columns=
{
memberColumns
}
columns=
{
memberColumns
}
// fetchTableData=
{(
params
)
=
>
fetchSystemMateData(params)}
/
>
/
>
</
Form
.
Item
>
</
Form
.
Item
>
}
}
...
...
src/pages/transaction/enquirySubmit/addDemandOrder/components/flowRecord.tsx
View file @
68a7b01c
import
React
,
{
useState
}
from
'react'
;
import
React
,
{
useState
,
useEffect
}
from
'react'
;
import
styles
from
'./index.less'
;
import
styles
from
'./index.less'
;
import
{
Radio
}
from
'antd'
;
import
{
Radio
}
from
'antd'
;
import
PolymericTable
from
'@/components/PolymericTable'
;
import
PolymericTable
from
'@/components/PolymericTable'
;
...
@@ -18,6 +18,7 @@ const FlowRecord: React.FC<faceSetData> = (props) => {
...
@@ -18,6 +18,7 @@ const FlowRecord: React.FC<faceSetData> = (props) => {
const
outerColumns
:
EditableColumns
[]
=
[{
const
outerColumns
:
EditableColumns
[]
=
[{
title
:
'序号'
,
title
:
'序号'
,
dataIndex
:
'inquiryListId'
,
dataIndex
:
'inquiryListId'
,
render
:
(
texr
:
any
,
record
:
any
,
index
:
number
)
=>
<
span
>
{
index
+
1
}
</
span
>
},
{
},
{
title
:
'操作角色'
,
title
:
'操作角色'
,
dataIndex
:
'roleName'
,
dataIndex
:
'roleName'
,
...
@@ -26,7 +27,7 @@ const FlowRecord: React.FC<faceSetData> = (props) => {
...
@@ -26,7 +27,7 @@ const FlowRecord: React.FC<faceSetData> = (props) => {
dataIndex
:
'state'
,
dataIndex
:
'state'
,
},
{
},
{
title
:
'操作'
,
title
:
'操作'
,
dataIndex
:
'operation'
,
dataIndex
:
'operation
alProcess
'
,
},
{
},
{
title
:
'操作时间'
,
title
:
'操作时间'
,
dataIndex
:
'operationTime'
,
dataIndex
:
'operationTime'
,
...
@@ -38,6 +39,7 @@ const FlowRecord: React.FC<faceSetData> = (props) => {
...
@@ -38,6 +39,7 @@ const FlowRecord: React.FC<faceSetData> = (props) => {
const
insideColumns
:
EditableColumns
[]
=
[{
const
insideColumns
:
EditableColumns
[]
=
[{
title
:
'序号'
,
title
:
'序号'
,
dataIndex
:
'inquiryListId'
,
dataIndex
:
'inquiryListId'
,
render
:
(
texr
:
any
,
record
:
any
,
index
:
number
)
=>
<
span
>
{
index
+
1
}
</
span
>
},
{
},
{
title
:
'操作人'
,
title
:
'操作人'
,
dataIndex
:
'roleName'
,
dataIndex
:
'roleName'
,
...
@@ -52,7 +54,7 @@ const FlowRecord: React.FC<faceSetData> = (props) => {
...
@@ -52,7 +54,7 @@ const FlowRecord: React.FC<faceSetData> = (props) => {
dataIndex
:
'state'
,
dataIndex
:
'state'
,
},
{
},
{
title
:
'操作'
,
title
:
'操作'
,
dataIndex
:
'operation'
,
dataIndex
:
'operation
alProcess
'
,
},
{
},
{
title
:
'操作时间'
,
title
:
'操作时间'
,
dataIndex
:
'operationTime'
,
dataIndex
:
'operationTime'
,
...
@@ -64,6 +66,7 @@ const FlowRecord: React.FC<faceSetData> = (props) => {
...
@@ -64,6 +66,7 @@ const FlowRecord: React.FC<faceSetData> = (props) => {
const
onChange
=
(
e
:
any
)
=>
{
const
onChange
=
(
e
:
any
)
=>
{
setRadio
(
e
.
target
.
value
)
setRadio
(
e
.
target
.
value
)
}
}
return
(
return
(
<
div
>
<
div
>
<
Radio
.
Group
defaultValue=
"outer"
buttonStyle=
"solid"
onChange=
{
onChange
}
>
<
Radio
.
Group
defaultValue=
"outer"
buttonStyle=
"solid"
onChange=
{
onChange
}
>
...
@@ -75,12 +78,14 @@ const FlowRecord: React.FC<faceSetData> = (props) => {
...
@@ -75,12 +78,14 @@ const FlowRecord: React.FC<faceSetData> = (props) => {
columns=
{
outerColumns
}
columns=
{
outerColumns
}
loading=
{
false
}
loading=
{
false
}
pagination=
{
null
}
pagination=
{
null
}
dataSource=
{
Object
.
keys
(
set
).
length
>
0
&&
set
.
externalRequisitionFormStateResponses
}
/>
/>
:
:
<
PolymericTable
<
PolymericTable
columns=
{
insideColumns
}
columns=
{
insideColumns
}
loading=
{
false
}
loading=
{
false
}
pagination=
{
null
}
pagination=
{
null
}
dataSource=
{
Object
.
keys
(
set
).
length
>
0
&&
set
.
interiorRequisitionFormStateResponses
}
/>
/>
}
}
</
div
>
</
div
>
...
...
src/pages/transaction/enquirySubmit/addDemandOrder/components/tradingConditions.tsx
View file @
68a7b01c
...
@@ -64,6 +64,23 @@ const TradingConditions: React.FC<faceSetData> = (props) => {
...
@@ -64,6 +64,23 @@ const TradingConditions: React.FC<faceSetData> = (props) => {
setselectAddress
(
option
)
setselectAddress
(
option
)
}
}
useEffect
(()
=>
{
if
(
Object
.
keys
(
set
).
length
>
0
)
{
TradingConditionsForm
.
setFieldsValue
({
deliveryTime
:
moment
(
set
.
deliveryTime
),
addresId
:
set
.
addresId
,
quotationAsTime
:
moment
(
set
.
quotationAsTime
),
offer
:
set
.
offer
,
paymentType
:
set
.
paymentType
,
taxes
:
set
.
taxes
,
logistics
:
set
.
logistics
,
packRequire
:
set
.
packRequire
,
otherRequire
:
set
.
otherRequire
})
setselectAddress
({
children
:
set
.
addres
});
}
},
[
set
])
return
(
return
(
<
Form
<
Form
{
...
layout
}
{
...
layout
}
...
@@ -85,9 +102,6 @@ const TradingConditions: React.FC<faceSetData> = (props) => {
...
@@ -85,9 +102,6 @@ const TradingConditions: React.FC<faceSetData> = (props) => {
))
}
))
}
</
Select
>
</
Select
>
</
Form
.
Item
>
</
Form
.
Item
>
<
Form
.
Item
hidden
label=
'交付地址'
name=
'addres'
>
<
Input
value=
{
selectAddress
.
children
}
/>
</
Form
.
Item
>
<
Form
.
Item
label=
'报价截止时间'
name=
'quotationAsTime'
rules=
{
[{
required
:
true
,
message
:
'请选择报价截止时间'
}]
}
>
<
Form
.
Item
label=
'报价截止时间'
name=
'quotationAsTime'
rules=
{
[{
required
:
true
,
message
:
'请选择报价截止时间'
}]
}
>
<
DatePicker
<
DatePicker
style=
{
{
width
:
'100%'
}
}
style=
{
{
width
:
'100%'
}
}
...
...
src/pages/transaction/enquirySubmit/addDemandOrder/index.tsx
View file @
68a7b01c
import
React
,
{
useState
,
useRef
}
from
'react'
;
import
React
,
{
useState
,
useRef
,
useEffect
}
from
'react'
;
import
{
history
}
from
'umi'
;
import
{
history
}
from
'umi'
;
import
ReutrnEle
from
'@/components/ReturnEle'
import
ReutrnEle
from
'@/components/ReturnEle'
import
{
PageHeaderWrapper
}
from
'@ant-design/pro-layout'
;
import
{
PageHeaderWrapper
}
from
'@ant-design/pro-layout'
;
...
@@ -8,11 +8,12 @@ import TradingConditions from './components/tradingConditions'
...
@@ -8,11 +8,12 @@ import TradingConditions from './components/tradingConditions'
import
FlowRecord
from
'./components/flowRecord'
;
import
FlowRecord
from
'./components/flowRecord'
;
import
AddGoods
from
'./components/addGoods'
;
import
AddGoods
from
'./components/addGoods'
;
import
DemandDbutted
from
'./components/demandDbutted'
;
import
DemandDbutted
from
'./components/demandDbutted'
;
import
{
setUpdata
}
from
'./data'
;
/**set数据给子组件 */
import
{
PublicApi
}
from
'@/services/api'
;
const
{
TabPane
}
=
Tabs
;
const
{
TabPane
}
=
Tabs
;
const
AddDemandOrder
:
React
.
FC
<
{}
>
=
()
=>
{
const
AddDemandOrder
:
React
.
FC
<
{}
>
=
()
=>
{
const
[
fetchdata
,
setfetchdata
]
=
useState
<
any
>
(
setUpdata
);
const
{
id
}
=
history
.
location
.
query
;
const
[
fetchdata
,
setfetchdata
]
=
useState
<
any
>
({});
const
basic
=
useRef
<
any
>
();
const
basic
=
useRef
<
any
>
();
const
goods
=
useRef
<
any
>
();
const
goods
=
useRef
<
any
>
();
const
trading
=
useRef
<
any
>
();
const
trading
=
useRef
<
any
>
();
...
@@ -27,17 +28,58 @@ const AddDemandOrder: React.FC<{}> = () => {
...
@@ -27,17 +28,58 @@ const AddDemandOrder: React.FC<{}> = () => {
const
data
=
{
const
data
=
{
...
basicRef
.
data
,
...
basicRef
.
data
,
...
tradingRef
.
data
,
...
tradingRef
.
data
,
...
goodsRef
.
data
...
goodsRef
.
data
,
type
:
1
,
shopIds
:
[
1
]
}
}
console
.
log
(
data
)
if
(
basicRef
.
data
.
requisitionFormAddress
.
length
>
0
)
{
}
else
{
data
.
defaultAddres
=
0
}
else
{
data
.
defaultAddres
=
1
}
if
(
id
)
{
data
.
id
=
fetchdata
.
id
;
PublicApi
.
postOrderRequisitionFormUpdate
(
data
).
then
(
res
=>
{
if
(
res
.
code
===
1000
)
{
history
.
goBack
()
}
})
}
else
{
PublicApi
.
postOrderRequisitionFormAdd
(
data
).
then
(
res
=>
{
if
(
res
.
code
===
1000
)
{
history
.
goBack
()
}
})
}
}
}
useEffect
(()
=>
{
if
(
id
)
{
new
Promise
(
resolve
=>
{
PublicApi
.
getOrderRequisitionFormDetails
({
id
,
current
:
'1'
,
pageSize
:
'10'
}).
then
(
res
=>
{
if
(
res
.
code
===
1000
)
{
resolve
(
res
.
data
)
}
})
}).
then
((
res
:
any
)
=>
{
// let obj: any = {}
// for (let key in fetchdata) {
// for (let keys in res) {
// if (key === keys) {
// obj = {
// ...obj, ...{
// [keys]: res[keys]
// }
// }
// }
// }
// }
setfetchdata
(
res
)
})
}
}
}
},
[
id
])
/**获取商品的属性 */
const
getAttribute
=
(
data
:
any
)
=>
{
console
.
log
(
data
,
10086
)
}
return
(
return
(
<
PageHeaderWrapper
<
PageHeaderWrapper
onBack=
{
()
=>
history
.
goBack
()
}
onBack=
{
()
=>
history
.
goBack
()
}
...
@@ -57,7 +99,6 @@ const AddDemandOrder: React.FC<{}> = () => {
...
@@ -57,7 +99,6 @@ const AddDemandOrder: React.FC<{}> = () => {
<
TabPane
forceRender
tab=
'添加商品'
key=
'2'
>
<
TabPane
forceRender
tab=
'添加商品'
key=
'2'
>
<
AddGoods
<
AddGoods
set=
{
fetchdata
}
set=
{
fetchdata
}
get=
{
getAttribute
}
currentRef=
{
goods
}
currentRef=
{
goods
}
/>
/>
</
TabPane
>
</
TabPane
>
...
...
src/pages/transaction/enquirySubmit/toAddSubmit/index.tsx
View file @
68a7b01c
...
@@ -158,7 +158,7 @@ const List: React.FC<{}> = () => {
...
@@ -158,7 +158,7 @@ const List: React.FC<{}> = () => {
},
[])
},
[])
const
toEdit
=
(
id
:
number
|
string
)
=>
{
const
toEdit
=
(
id
:
number
|
string
)
=>
{
history
.
push
(
`/memberCenter/tranactionAbility/enquirySubmit/
toAddSubmitList
/edit?id=
${
id
}
`
)
history
.
push
(
`/memberCenter/tranactionAbility/enquirySubmit/
addDemandOrder
/edit?id=
${
id
}
`
)
}
}
/**
/**
* @description: 删除
* @description: 删除
...
@@ -223,7 +223,7 @@ const List: React.FC<{}> = () => {
...
@@ -223,7 +223,7 @@ const List: React.FC<{}> = () => {
const
controllerBtns
=
<
Row
>
const
controllerBtns
=
<
Row
>
<
Col
span=
{
24
}
>
<
Col
span=
{
24
}
>
<
Space
direction=
"horizontal"
size=
{
16
}
>
<
Space
direction=
"horizontal"
size=
{
16
}
>
<
Button
type=
"primary"
onClick=
{
()
=>
history
.
push
(
'/memberCenter/tranactionAbility/enquirySubmit/
toAddSubmitList
/add'
)
}
icon=
{
<
PlusOutlined
/>
}
>
新建
</
Button
>
<
Button
type=
"primary"
onClick=
{
()
=>
history
.
push
(
'/memberCenter/tranactionAbility/enquirySubmit/
addDemandOrder
/add'
)
}
icon=
{
<
PlusOutlined
/>
}
>
新建
</
Button
>
<
Button
onClick=
{
()
=>
handleSubmitAll
(
selectedRowKeys
)
}
>
批量提交审核
</
Button
>
<
Button
onClick=
{
()
=>
handleSubmitAll
(
selectedRowKeys
)
}
>
批量提交审核
</
Button
>
<
Dropdown
.
Button
<
Dropdown
.
Button
overlay=
{
menu
}
overlay=
{
menu
}
...
@@ -238,28 +238,28 @@ const List: React.FC<{}> = () => {
...
@@ -238,28 +238,28 @@ const List: React.FC<{}> = () => {
const
[
externalState
,
setExternalState
]
=
useState
<
any
>
([]);
const
[
externalState
,
setExternalState
]
=
useState
<
any
>
([]);
const
[
interiorState
,
setInteriorState
]
=
useState
<
any
>
([]);
const
[
interiorState
,
setInteriorState
]
=
useState
<
any
>
([]);
useEffect
(()
=>
{
//
useEffect(() => {
const
external
=
new
Promise
(
resolve
=>
{
//
const external = new Promise(resolve => {
//查询需求单外部状态枚举列表
//
//查询需求单外部状态枚举列表
PublicApi
.
getOrderRequisitionFormExternalStateEnum
().
then
((
res
:
any
)
=>
{
//
PublicApi.getOrderRequisitionFormExternalStateEnum().then((res: any) => {
if
(
res
.
code
===
1000
)
{
//
if (res.code === 1000) {
resolve
(
res
.
data
)
//
resolve(res.data)
}
//
}
})
//
})
})
//
})
const
interior
=
new
Promise
(
resolve
=>
{
//
const interior = new Promise(resolve => {
// 查询需求单内部状态枚举列表
//
// 查询需求单内部状态枚举列表
PublicApi
.
getOrderRequisitionFormInteriorStateEnum
().
then
((
res
:
any
)
=>
{
//
PublicApi.getOrderRequisitionFormInteriorStateEnum().then((res: any) => {
if
(
res
.
code
===
1000
)
{
//
if (res.code === 1000) {
resolve
(
res
.
data
)
//
resolve(res.data)
}
//
}
})
//
})
})
//
})
Promise
.
all
([
external
,
interior
]).
then
(
res
=>
{
//
Promise.all([external, interior]).then(res => {
setExternalState
(
res
[
0
])
//
setExternalState(res[0])
setInteriorState
(
res
[
1
])
//
setInteriorState(res[1])
})
//
})
},
[])
//
}, [])
return
(
return
(
<
PageHeaderWrapper
>
<
PageHeaderWrapper
>
...
...
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