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
82e0a7e3
Commit
82e0a7e3
authored
Oct 20, 2020
by
前端-许佳敏
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat:确认归档
parent
4edf8320
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
84 additions
and
7 deletions
+84
-7
index.tsx
...action/saleOrder/readyConfirmReturnOrder/detail/index.tsx
+41
-2
index.tsx
...ransaction/saleOrder/readyReturnDocument/detail/index.tsx
+43
-5
No files found.
src/pages/transaction/saleOrder/readyConfirmReturnOrder/detail/index.tsx
View file @
82e0a7e3
import
React
from
'react'
;
import
React
,
{
useState
,
useCallback
,
useRef
}
from
'react'
;
import
{
OrderDetailContext
}
from
'../../../_public/order/context'
;
import
{
PublicApi
}
from
'@/services/api'
;
import
{
Button
}
from
'antd'
;
import
OrderDetailHeader
from
'@/pages/transaction/components/OrderDetailHeader'
;
import
OrderDetailWrapper
from
'@/pages/transaction/components/OrderDetailWrapper'
;
import
PreLoading
from
'@/components/PreLoading'
;
import
{
useOrderDetail
}
from
'../../../_public/order/effects/useOrderDetail'
;
import
ApprovedOrderModal
from
'../../../components/approvedOrderModal'
;
import
{
history
}
from
'umi'
import
{
useHttpRequest
}
from
'@/hooks/useHttpRequest'
;
import
OrderDetailSection
from
'../../../components/orderDetailSection'
;
const
ReadyConfirmReturnOrderDetail
:
React
.
FC
=
()
=>
{
const
{
formContext
,
id
,
detailList
}
=
useOrderDetail
({
type
:
'saleOrder'
})
const
{
run
,
loading
}
=
useHttpRequest
(
PublicApi
.
postOrderReceiptOrderConfirmedAll
)
// 提交表单
const
handleSubmit
=
useCallback
(
async
()
=>
{
const
params
=
{
id
:
Number
(
id
),
state
:
1
}
const
result
=
await
run
(
params
)
if
(
result
.
code
===
1000
)
{
history
.
goBack
()
}
},
[])
return
(
<
div
>
待确认回单详情
<
OrderDetailContext
.
Provider
value=
{
formContext
}
>
<
OrderDetailHeader
detailList=
{
detailList
}
detailData=
{
formContext
.
data
}
extraRight=
{
<
Button
type=
'primary'
onClick=
{
handleSubmit
}
loading=
{
loading
}
>
确认全部已回单
</
Button
>
}
/>
<
OrderDetailWrapper
>
<
PreLoading
loading=
{
!
formContext
.
data
}
active
paragraph=
{
{
rows
:
6
}
}
>
<
OrderDetailSection
formContext=
{
formContext
}
type=
'saleOrder'
/>
</
PreLoading
>
</
OrderDetailWrapper
>
</
OrderDetailContext
.
Provider
>
</
div
>
);
};
...
...
src/pages/transaction/saleOrder/readyReturnDocument/detail/index.tsx
View file @
82e0a7e3
import
React
from
'react'
;
import
React
,
{
useState
,
useCallback
,
useRef
}
from
'react'
;
import
{
OrderDetailContext
}
from
'../../../_public/order/context'
;
import
{
PublicApi
}
from
'@/services/api'
;
import
{
Button
}
from
'antd'
;
import
OrderDetailHeader
from
'@/pages/transaction/components/OrderDetailHeader'
;
import
OrderDetailWrapper
from
'@/pages/transaction/components/OrderDetailWrapper'
;
import
PreLoading
from
'@/components/PreLoading'
;
import
{
useOrderDetail
}
from
'../../../_public/order/effects/useOrderDetail'
;
import
ApprovedOrderModal
from
'../../../components/approvedOrderModal'
;
import
{
history
}
from
'umi'
import
{
useHttpRequest
}
from
'@/hooks/useHttpRequest'
;
import
OrderDetailSection
from
'../../../components/orderDetailSection'
;
const
ReadyConfirmReturnDocumentOrderDetail
:
React
.
FC
=
()
=>
{
const
{
formContext
,
id
,
detailList
}
=
useOrderDetail
({
type
:
'saleOrder'
})
const
{
run
,
loading
}
=
useHttpRequest
(
PublicApi
.
postOrderOfOrdersToBeFiled
)
// 提交表单
const
handleSubmit
=
useCallback
(
async
()
=>
{
const
params
=
{
id
:
Number
(
id
)
}
const
result
=
await
run
(
params
)
if
(
result
.
code
===
1000
)
{
history
.
goBack
()
}
},
[])
const
ReadyReturnDocumentDetail
:
React
.
FC
=
()
=>
{
return
(
<
div
>
待确认归档详情
<
OrderDetailContext
.
Provider
value=
{
formContext
}
>
<
OrderDetailHeader
detailList=
{
detailList
}
detailData=
{
formContext
.
data
}
extraRight=
{
<
Button
type=
'primary'
onClick=
{
handleSubmit
}
loading=
{
loading
}
>
确认归档
</
Button
>
}
/>
<
OrderDetailWrapper
>
<
PreLoading
loading=
{
!
formContext
.
data
}
active
paragraph=
{
{
rows
:
6
}
}
>
<
OrderDetailSection
formContext=
{
formContext
}
type=
'saleOrder'
/>
</
PreLoading
>
</
OrderDetailWrapper
>
</
OrderDetailContext
.
Provider
>
</
div
>
);
};
export
default
ReadyReturnDocumentDetail
;
\ No newline at end of file
export
default
ReadyConfirmReturnDocumentOrderDetail
;
\ No newline at end of file
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