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
3c7b10bf
Commit
3c7b10bf
authored
Nov 18, 2021
by
卢均锐
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
chore: 修改pages/transaction/effect里接口引入方式
parent
9d1513ed
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
16 additions
and
15 deletions
+16
-15
index.tsx
src/pages/transaction/effect/index.tsx
+16
-15
No files found.
src/pages/transaction/effect/index.tsx
View file @
3c7b10bf
import
React
,
{
useEffect
,
useState
}
from
'react'
import
{
PublicApi
}
from
'@/services/api'
;
import
{
GetOrderBuyerPageItemsResponse
}
from
'@/services/OrderV2Api'
;
import
{
getProductSelectGetSelectCategory
}
from
'@/services/ProductV2Api'
;
import
{
getPurchaseRequisitionFindInnerStatusEnum
}
from
'@/services/PurchaseV2Api'
;
import
{
GetOrderBuyerPageItemsResponse
,
getOrderBuyerPageItems
,
getOrderVendorPageItems
,
getOrderBuyerValidatePageItems
,
getOrderVendorValidatePageItems
,
getOrderBuyerCreatePageItems
}
from
'@/services/OrderNewV2Api'
;
// 高级筛选schema中用于输入搜索需求发布品类的Effect
export
const
searchSelectGetSelectCategoryOptionEffect
=
(
context
:
any
,
fieldName
:
string
)
=>
{
context
.
getFieldState
(
fieldName
,
state
=>
{
PublicApi
.
getProductSelectGetSelectCategory
({
name
:
state
.
props
[
'x-component-props'
].
searchValue
}).
then
(
res
=>
{
getProductSelectGetSelectCategory
({
name
:
state
.
props
[
'x-component-props'
].
searchValue
}).
then
(
res
=>
{
context
.
setFieldState
(
fieldName
,
state
=>
{
state
.
props
[
'x-component-props'
].
dataoption
=
res
.
data
})
...
...
@@ -27,9 +28,9 @@ export const getPurchaseOrderSelectOption = () => {
const
[
state
,
setstate
]
=
useState
<
GetOrderBuyerPageItemsResponse
>
()
useEffect
(()
=>
{
PublicApi
.
getOrderBuyerPageItems
({}).
then
(
res
=>
{
getOrderBuyerPageItems
({}).
then
(
res
=>
{
const
{
code
,
data
}
=
res
if
(
code
===
1000
)
{
if
(
code
===
1000
)
{
setstate
(
data
)
}
})
...
...
@@ -43,9 +44,9 @@ export const getSaleOrderSelectOption = () => {
const
[
state
,
setstate
]
=
useState
<
any
>
()
useEffect
(()
=>
{
PublicApi
.
getOrderVendorPageItems
({}).
then
(
res
=>
{
getOrderVendorPageItems
({}).
then
(
res
=>
{
const
{
code
,
data
}
=
res
if
(
code
===
1000
)
{
if
(
code
===
1000
)
{
setstate
(
data
)
}
})
...
...
@@ -59,9 +60,9 @@ export const getPurchaseOrderAuditPageSelectOption = () => {
const
[
state
,
setstate
]
=
useState
<
any
>
()
useEffect
(()
=>
{
PublicApi
.
getOrderBuyerValidatePageItems
({}).
then
(
res
=>
{
getOrderBuyerValidatePageItems
({}).
then
(
res
=>
{
const
{
code
,
data
}
=
res
if
(
code
===
1000
)
{
if
(
code
===
1000
)
{
setstate
(
data
)
}
})
...
...
@@ -76,9 +77,9 @@ export const getSaleOrderAuditPageSelectOption = () => {
const
[
state
,
setstate
]
=
useState
<
any
>
()
useEffect
(()
=>
{
PublicApi
.
getOrderVendorValidatePageItems
({}).
then
(
res
=>
{
getOrderVendorValidatePageItems
({}).
then
(
res
=>
{
const
{
code
,
data
}
=
res
if
(
code
===
1000
)
{
if
(
code
===
1000
)
{
setstate
(
data
)
}
})
...
...
@@ -92,9 +93,9 @@ export const getPurchaseOrderReadyAddPageSelectOption = () => {
const
[
state
,
setstate
]
=
useState
<
any
>
()
useEffect
(()
=>
{
PublicApi
.
getOrderBuyerCreatePageItems
({}).
then
(
res
=>
{
getOrderBuyerCreatePageItems
({}).
then
(
res
=>
{
const
{
code
,
data
}
=
res
if
(
code
===
1000
)
{
if
(
code
===
1000
)
{
setstate
(
data
)
}
})
...
...
@@ -108,9 +109,9 @@ export const getPurchaseRequisitionOrderPageSelectOption = () => {
const
[
state
,
setstate
]
=
useState
<
any
>
()
useEffect
(()
=>
{
PublicApi
.
getPurchaseRequisitionFindInnerStatusEnum
({}).
then
(
res
=>
{
getPurchaseRequisitionFindInnerStatusEnum
({}).
then
(
res
=>
{
const
{
code
,
data
}
=
res
if
(
code
===
1000
)
{
if
(
code
===
1000
)
{
setstate
(
data
)
}
})
...
...
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