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
shenshaokai
jinfa-platform
Commits
8963abcc
Commit
8963abcc
authored
Apr 20, 2022
by
前端-李俊鑫
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix: 新增编辑通知单时离开提示
parent
0db89d17
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
18 additions
and
5 deletions
+18
-5
global.less
src/global/styles/global.less
+4
-0
harver-material.tsx
src/pages/order/assets/context/harver-material.tsx
+3
-1
index.tsx
...eliveryNoticeAwaitB2B/components/AddEditContent/index.tsx
+5
-2
index.tsx
...eliveryNoticeAwaitSRM/components/AddEditContent/index.tsx
+6
-2
No files found.
src/global/styles/global.less
View file @
8963abcc
...
...
@@ -393,3 +393,7 @@ a {
}
}
}
.ant-btn {
border-radius: 4px;
}
src/pages/order/assets/context/harver-material.tsx
View file @
8963abcc
...
...
@@ -23,10 +23,11 @@ export function HarvestMaterialInput(props: {
keyup
:
string
// dataSource 对应的row key
min
?:
number
disabled
?:
boolean
onValuesChange
?:
()
=>
void
})
{
const
context
=
useContext
(
HarvestMaterialContext
);
const
{
value
,
index
,
keyup
}
=
props
;
const
{
value
,
index
,
keyup
,
onValuesChange
}
=
props
;
const
[
inputVal
,
setInputVal
]
=
useState
<
any
>
(
value
)
const
handleChange
=
(
e
)
=>
{
...
...
@@ -60,6 +61,7 @@ export function HarvestMaterialInput(props: {
dataSource
[
index
][
keyup
]
=
val
context
.
dataSource
=
dataSource
;
setInputVal
(
val
)
onValuesChange
?.()
}
...
...
src/pages/order/deliveryNoticeManagement/deliveryNoticeAwaitB2B/components/AddEditContent/index.tsx
View file @
8963abcc
...
...
@@ -14,12 +14,12 @@ import { RoleSelect } from '@/components/RoleSelect'
import
StandardTable
from
'@/components/StandardTable'
import
DeliveryGoodTableSelect
from
'../../../../components/DeliveryGoodTableSelect/DeliveryGoodTableSelect'
;
import
{
HarvestMaterialContextProvider
,
HarvestMaterialInput
}
from
'../../../../assets/context'
;
import
{
getLogisticsSelectListReceiverAddress
}
from
'@/services/LogisticsV2Api'
import
{
postOrderDeliveryNoticeOrderB2bCreate
,
getOrderDeliveryNoticeOrderDetail
,
getOrderDeliveryNoticeOrderDeliveryHistory
,
getOrderDeliveryNoticeOrderDetailPage
,
postOrderDeliveryNoticeOrderUpdate
}
from
'@/services/OrderNewV2Api'
import
{
BaseInfo
as
base_info
,
DeliveryGood
,
Remarks
,
ExternalRoamRecord
,
Circulation
,
Purchaser
,
SubmitDeliveryNotice
,
Supplier
,
ConfirmDeliveryNotice
,
NoticeSummary
,
BuyerLabel
,
DeliveryDate
,
DeliveryTime
,
ReceivingAddress
,
ShippingInfo
}
from
'../../../../constants'
import
{
BrandColumn
,
ClassColumn
,
FlowOptionsColumn
,
MaterialModelColumn
,
CommodityNoColumn
,
TradeNameColumn
,
OrderCreatedAtColumn
,
OrderNoColumn
,
OrderNumColumn
,
UntilColumn
}
from
'../../../../constants/table-column'
import
{
ExternalRoamRecordTableColumn
}
from
'../../../../constants/page-table-column'
import
moment
from
'moment'
import
usePrompt
from
'@/hooks/usePrompt'
;
type
PropsType
=
{
type
:
'add'
|
'edit'
;
...
...
@@ -54,6 +54,7 @@ const getConst = (len = 0) => {
const
DeliveryNoticeManagementAwaitB2BDetails
:
React
.
FC
<
PropsType
>
=
({
type
,
id
,
planData
,
btnCode
})
=>
{
const
[
form
]
=
Form
.
useForm
()
const
{
renderPrompt
,
handleLeave
}
=
usePrompt
()
const
[
historyData
,
setHistoryData
]
=
useState
<
any
>
([])
const
[
tableDataSource
,
setTableDataSource
]
=
useState
<
any
[]
>
()
const
[
loading
,
setLoading
]
=
useState
<
boolean
>
(
false
)
...
...
@@ -203,6 +204,7 @@ const DeliveryNoticeManagementAwaitB2BDetails: React.FC<PropsType> = ({ type, id
value=
{
rcode
[
'planCount'
]
}
index=
{
index
}
keyup=
"planCount"
onValuesChange=
{
()
=>
{
handleLeave
()
}
}
/>
)
}
...
...
@@ -228,7 +230,7 @@ const DeliveryNoticeManagementAwaitB2BDetails: React.FC<PropsType> = ({ type, id
</
AuthButton
>
}
>
<
Form
labelAlign=
'left'
form=
{
form
}
>
<
Form
labelAlign=
'left'
form=
{
form
}
onValuesChange=
{
()
=>
{
handleLeave
()
}
}
>
<
BaseInfo
className=
'mt-0'
title=
{
base_info
.
name
}
id=
{
base_info
.
key
}
>
<
Form
.
Item
hidden
name=
'planNo'
><
Input
/></
Form
.
Item
>
<
Form
.
Item
...
...
@@ -357,6 +359,7 @@ const DeliveryNoticeManagementAwaitB2BDetails: React.FC<PropsType> = ({ type, id
)
}
</
Form
>
{
renderPrompt
()
}
</
AnchorPage
>
)
}
...
...
src/pages/order/deliveryNoticeManagement/deliveryNoticeAwaitSRM/components/AddEditContent/index.tsx
View file @
8963abcc
...
...
@@ -15,12 +15,12 @@ import { RoleSelect } from '@/components/RoleSelect'
import
StandardTable
from
'@/components/StandardTable'
import
DeliveryGoodTableSelect
from
'../../../../components/DeliveryGoodTableSelect/DeliveryGoodTableSelect'
;
import
{
HarvestMaterialContextProvider
,
HarvestMaterialInput
}
from
'../../../../assets/context'
;
import
{
getLogisticsSelectListReceiverAddress
}
from
'@/services/LogisticsV2Api'
import
{
postOrderDeliveryNoticeOrderSrmCreate
,
getOrderDeliveryNoticeOrderDetail
,
getOrderDeliveryNoticeOrderDeliveryHistory
,
getOrderDeliveryNoticeOrderDetailPage
,
postOrderDeliveryNoticeOrderUpdate
}
from
'@/services/OrderNewV2Api'
import
{
BaseInfo
as
base_info
,
Material
,
Remarks
,
ExternalRoamRecord
,
Circulation
,
Purchaser
,
SubmitDeliveryNotice
,
Supplier
,
ConfirmDeliveryNotice
,
NoticeSummary
,
BuyerLabel
,
DeliveryDate
,
DeliveryTime
,
ReceivingAddress
,
ShippingInfo
}
from
'../../../../constants'
import
{
BrandColumn
,
ClassColumn
,
FlowOptionsColumn
,
MaterialModelColumn
,
MaterialNameColumn
,
MaterialNoColumn
,
OrderCreatedAtColumn
,
OrderNoColumn
,
OrderNumColumn
,
UntilColumn
}
from
'../../../../constants/table-column'
import
{
ExternalRoamRecordTableColumn
}
from
'../../../../constants/page-table-column'
import
moment
from
'moment'
import
usePrompt
from
'@/hooks/usePrompt'
;
type
PropsType
=
{
type
:
'add'
|
'edit'
;
...
...
@@ -55,6 +55,7 @@ const getConst = (len = 0) => {
const
DeliveryNoticeManagementAwaitSRMDetails
:
React
.
FC
<
PropsType
>
=
({
type
,
id
,
planData
,
btnCode
})
=>
{
const
[
form
]
=
Form
.
useForm
()
const
{
renderPrompt
,
handleLeave
}
=
usePrompt
()
const
[
historyData
,
setHistoryData
]
=
useState
<
any
>
([])
const
[
tableDataSource
,
setTableDataSource
]
=
useState
<
any
[]
>
()
const
[
loading
,
setLoading
]
=
useState
<
boolean
>
(
false
)
...
...
@@ -201,6 +202,7 @@ const DeliveryNoticeManagementAwaitSRMDetails: React.FC<PropsType> = ({ type, id
value=
{
rcode
[
'planCount'
]
}
index=
{
index
}
keyup=
"planCount"
onValuesChange=
{
()
=>
{
handleLeave
()
}
}
/>
)
}
...
...
@@ -226,7 +228,7 @@ const DeliveryNoticeManagementAwaitSRMDetails: React.FC<PropsType> = ({ type, id
</
AuthButton
>
}
>
<
Form
labelAlign=
'left'
form=
{
form
}
>
<
Form
labelAlign=
'left'
form=
{
form
}
onValuesChange=
{
()
=>
{
handleLeave
()
}
}
>
<
BaseInfo
className=
'mt-0'
title=
{
base_info
.
name
}
id=
{
base_info
.
key
}
>
<
Form
.
Item
{
...
formItemLayout
}
...
...
@@ -248,6 +250,7 @@ const DeliveryNoticeManagementAwaitSRMDetails: React.FC<PropsType> = ({ type, id
]
}
>
<
RoleSelect
isDefault=
{
!
planData
}
disabled=
{
!!
planData
}
formatFeils=
{
(
e
)
=>
{
return
{
...
...
@@ -356,6 +359,7 @@ const DeliveryNoticeManagementAwaitSRMDetails: React.FC<PropsType> = ({ type, id
)
}
</
Form
>
{
renderPrompt
()
}
</
AnchorPage
>
)
}
...
...
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