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
ad97a337
Commit
ad97a337
authored
Apr 20, 2022
by
rainbowmorel@163.com
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改页面问题
parent
e4470521
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
64 additions
and
23 deletions
+64
-23
usePrompt.tsx
src/hooks/usePrompt.tsx
+25
-0
add.tsx
src/pages/order/deliveryNotice/manageB2B/add.tsx
+6
-3
details.tsx
src/pages/order/deliveryNotice/manageB2B/details.tsx
+7
-7
edit.tsx
src/pages/order/deliveryNotice/manageB2B/edit.tsx
+9
-5
add.tsx
src/pages/order/deliveryNotice/manageSRM/add.tsx
+5
-1
details.tsx
src/pages/order/deliveryNotice/manageSRM/details.tsx
+7
-7
edit.tsx
src/pages/order/deliveryNotice/manageSRM/edit.tsx
+5
-0
No files found.
src/hooks/usePrompt.tsx
0 → 100644
View file @
ad97a337
import
{
useState
}
from
"react"
;
import
{
Prompt
,
useIntl
}
from
"umi"
;
export
default
function
usePrompt
()
{
const
[
isFormChange
,
setIsFormChange
]
=
useState
<
boolean
>
(
false
);
const
intl
=
useIntl
()
const
renderPrompt
=
()
=>
{
return
(
<
Prompt
when=
{
isFormChange
}
message=
{
intl
.
formatMessage
({
id
:
'common.tip.save.confirm'
})
}
/>
)
}
const
handleLeave
=
()
=>
{
setIsFormChange
(
true
)
}
return
{
handleLeave
,
renderPrompt
}
}
src/pages/order/deliveryNotice/manageB2B/add.tsx
View file @
ad97a337
...
...
@@ -24,10 +24,12 @@ import { addrFormatValue } from '../../assets/format/addrValue';
import
DeliveryGoodTableSelectB2B
from
'../../components/DeliveryGoodTableSelect/DeliveryGoodTableSelectB2B'
;
import
{
PATTERN_MAPS
}
from
'@/constants/regExp'
;
import
{
size
}
from
'lodash'
;
import
usePrompt
from
'@/hooks/usePrompt'
;
const
DeliveryNoticeManageSRMDetails
:
React
.
FC
=
()
=>
{
const
[
tableDataSource
,
setTableDataSource
]
=
useState
<
any
[]
>
();
const
{
renderPrompt
,
handleLeave
}
=
usePrompt
()
const
[
form
]
=
Form
.
useForm
()
const
service
=
new
ReceivingNoteB2BAddService
(
form
);
...
...
@@ -88,8 +90,9 @@ const DeliveryNoticeManageSRMDetails: React.FC = () => {
>
<
Form
form=
{
form
}
onValuesChange=
{
()
=>
{
handleLeave
()
}
}
>
<
FormItem
name=
"sourceType"
>
<
FormItem
hidden
name=
"sourceType"
>
<
Input
type=
"hidden"
/>
</
FormItem
>
...
...
@@ -285,7 +288,7 @@ const DeliveryNoticeManageSRMDetails: React.FC = () => {
]
}
dataSource=
{
tableDataSource
}
pagination=
{
{
size
:
"small"
size
:
"small"
}
}
/>
</
HarvestMaterialContextProvider
>
...
...
@@ -293,7 +296,7 @@ const DeliveryNoticeManageSRMDetails: React.FC = () => {
</
ContentBox
>
</
Form
>
{
renderPrompt
()
}
</
AnchorPage
>
)
}
...
...
src/pages/order/deliveryNotice/manageB2B/details.tsx
View file @
ad97a337
...
...
@@ -120,15 +120,15 @@ const DeliveryNoticeManageSRMDetails: React.FC = () => {
<
ContentBoxItem
label=
{
DeliverySlefAddrLabel
}
>
<
div
>
{
info
?.
receive
V
O
?.
provinceName
??
''
}
{
info
?.
receive
V
O
?.
cityName
??
''
}
{
info
?.
receive
V
O
?.
districtName
??
''
}
{
info
?.
receive
V
O
?.
streetName
??
''
}
{
info
?.
receive
V
O
?.
address
??
''
}
{
info
?.
receive
rB
O
?.
provinceName
??
''
}
{
info
?.
receive
rB
O
?.
cityName
??
''
}
{
info
?.
receive
rB
O
?.
districtName
??
''
}
{
info
?.
receive
rB
O
?.
streetName
??
''
}
{
info
?.
receive
rB
O
?.
address
??
''
}
</
div
>
<
div
>
{
info
?.
receive
VO
.
phone
}
{
info
?.
receive
VO
.
consignee
}
{
info
?.
receive
rBO
?
.
phone
}
{
info
?.
receive
rBO
?
.
consignee
}
</
div
>
</
ContentBoxItem
>
...
...
src/pages/order/deliveryNotice/manageB2B/edit.tsx
View file @
ad97a337
...
...
@@ -24,6 +24,7 @@ import { useLocation } from 'umi';
import
{
DeliveryNumColumn
}
from
'../../constants/table-column'
;
import
{
addrFormatValue
}
from
'../../assets/format/addrValue'
;
import
{
PATTERN_MAPS
}
from
'@/constants/regExp'
;
import
usePrompt
from
'@/hooks/usePrompt'
;
const
ContentBoxItem
=
ContentBox
.
BaseInfoItem
;
...
...
@@ -32,6 +33,7 @@ const DeliveryNoticeManageSRMEdit: React.FC = () => {
const
[
tableDataSource
,
setTableDataSource
]
=
useState
<
any
>
([]);
const
[
outerHistoryList
,
setOuterHistoryList
]
=
useState
<
any
>
([]);
const
{
renderPrompt
,
handleLeave
}
=
usePrompt
()
const
location
:
any
=
useLocation
()
const
{
id
}
=
location
.
query
...
...
@@ -90,8 +92,10 @@ const DeliveryNoticeManageSRMEdit: React.FC = () => {
</
Button
.
Group
>
}
>
{
renderPrompt
()
}
<
Form
form=
{
form
}
onValuesChange=
{
()
=>
handleLeave
()
}
>
<
FormItem
hidden
name=
"sourceType"
>
<
Input
type=
"hidden"
/>
...
...
@@ -156,11 +160,11 @@ const DeliveryNoticeManageSRMEdit: React.FC = () => {
</
FormItem
>
<
FormItem
rules=
{
[
required
(
'请出入正确的手机号'
),
{
pattern
:
PATTERN_MAPS
.
phone
,
message
:
"手机号是否正确"
}
]
}
label=
{
DeliveryPhoneLabel
}
name=
"executorVO.phone"
>
rules=
{
[
required
(
'请出入正确的手机号'
),
{
pattern
:
PATTERN_MAPS
.
phone
,
message
:
"手机号是否正确"
}
]
}
label=
{
DeliveryPhoneLabel
}
name=
"executorVO.phone"
>
<
Input
/>
</
FormItem
>
</
ContentBox
>
...
...
src/pages/order/deliveryNotice/manageSRM/add.tsx
View file @
ad97a337
...
...
@@ -26,6 +26,7 @@ import { DeliveryNumColumn, OrderNumColumn } from '../../constants/table-column'
import
{
addrFormatValue
}
from
'../../assets/format/addrValue'
;
import
DeliveryGoodTableSelectSRM
from
'../../components/DeliveryGoodTableSelect/DeliveryGoodTableSelectSRM'
;
import
{
PATTERN_MAPS
}
from
'@/constants/regExp'
;
import
usePrompt
from
'@/hooks/usePrompt'
;
const
ContentBoxItem
=
ContentBox
.
BaseInfoItem
;
...
...
@@ -33,6 +34,8 @@ const DeliveryNoticeManageSRMDetails: React.FC = () => {
const
[
tableDataSource
,
setTableDataSource
]
=
useState
();
const
{
renderPrompt
,
handleLeave
}
=
usePrompt
()
const
[
form
]
=
Form
.
useForm
()
const
service
=
new
DeliveryNoteAddService
(
form
);
...
...
@@ -86,6 +89,7 @@ const DeliveryNoticeManageSRMDetails: React.FC = () => {
>
<
Form
form=
{
form
}
onValuesChange=
{
()
=>
{
handleLeave
()}
}
>
<
FormItem
name=
"sourceType"
>
<
Input
type=
"hidden"
/>
...
...
@@ -275,7 +279,7 @@ const DeliveryNoticeManageSRMDetails: React.FC = () => {
</
ContentBox
>
</
Form
>
{
renderPrompt
()
}
</
AnchorPage
>
)
...
...
src/pages/order/deliveryNotice/manageSRM/details.tsx
View file @
ad97a337
...
...
@@ -122,15 +122,15 @@ const DeliveryNoticeManageSRMDetails: React.FC = () => {
<
ContentBoxItem
label=
{
DeliveryAddrLabel
}
>
<
div
>
{
info
?.
receive
V
O
?.
provinceName
??
''
}
{
info
?.
receive
V
O
?.
cityName
??
''
}
{
info
?.
receive
V
O
?.
districtName
??
''
}
{
info
?.
receive
V
O
?.
streetName
??
''
}
{
info
?.
receive
V
O
?.
address
??
''
}
{
info
?.
receive
rB
O
?.
provinceName
??
''
}
{
info
?.
receive
rB
O
?.
cityName
??
''
}
{
info
?.
receive
rB
O
?.
districtName
??
''
}
{
info
?.
receive
rB
O
?.
streetName
??
''
}
{
info
?.
receive
rB
O
?.
address
??
''
}
</
div
>
<
div
>
{
info
?.
receive
VO
.
phone
}
{
info
?.
receive
VO
.
consignee
}
{
info
?.
receive
rBO
?
.
phone
}
{
info
?.
receive
rBO
?
.
consignee
}
</
div
>
</
ContentBoxItem
>
...
...
src/pages/order/deliveryNotice/manageSRM/edit.tsx
View file @
ad97a337
...
...
@@ -25,6 +25,7 @@ import { useLocation } from 'umi';
import
{
DeliveryNumColumn
}
from
'../../constants/table-column'
;
import
{
addrFormatValue
}
from
'../../assets/format/addrValue'
;
import
{
PATTERN_MAPS
}
from
'@/constants/regExp'
;
import
usePrompt
from
'@/hooks/usePrompt'
;
const
ContentBoxItem
=
ContentBox
.
BaseInfoItem
;
...
...
@@ -36,6 +37,8 @@ const DeliveryNoticeManageSRMEdit: React.FC = () => {
const
location
:
any
=
useLocation
()
const
{
id
}
=
location
.
query
const
{
renderPrompt
,
handleLeave
}
=
usePrompt
()
const
[
form
]
=
Form
.
useForm
()
const
service
=
new
DeliveryNoteUploadService
(
form
);
...
...
@@ -91,8 +94,10 @@ const DeliveryNoticeManageSRMEdit: React.FC = () => {
</
Button
.
Group
>
}
>
{
renderPrompt
()
}
<
Form
form=
{
form
}
onValuesChange=
{
()
=>
handleLeave
()
}
>
<
FormItem
hidden
name=
"sourceType"
>
<
Input
type=
"hidden"
/>
...
...
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