Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
M
merchant-manage-ui
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
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
ui
merchant-manage-ui
Commits
f150fa89
Commit
f150fa89
authored
Oct 14, 2021
by
王苓芝
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
添加订单id格式校验&提示文本修改
parent
3818b593
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
14 additions
and
21 deletions
+14
-21
PassAudit.jsx
src/pages/cancelBillManage/PassAudit.jsx
+7
-1
Pending.jsx
src/pages/cancelBillManage/Pending.jsx
+7
-20
No files found.
src/pages/cancelBillManage/PassAudit.jsx
View file @
f150fa89
...
...
@@ -26,6 +26,12 @@ export default () => {
const
query
=
async
(
params
,
type
)
=>
{
if
(
params
.
orderId
)
{
params
.
orderId
=
`
${
params
.
orderId
}
`
.
replace
(
/
\s
/g
,
''
);
if
(
Number
.
isNaN
(
+
params
.
orderId
))
{
notification
.
warning
({
message
:
'
输入的订单Id只能为数字格式
'
,
});
return
false
;
}
}
if
(
params
.
receiverPhone
)
{
const
reg
=
/^1
[
3456789
]\d{9}
$/
;
...
...
@@ -51,7 +57,7 @@ export default () => {
const
endTime
=
params
.
applyTime
[
1
];
if
(
dateDiff
(
startTime
,
endTime
))
{
notification
.
warning
({
message
:
'
您输入的订单提交时间超过3个月啦!
'
,
message
:
'
您输入的订单
取消
提交时间超过3个月啦!
'
,
});
return
false
;
}
...
...
src/pages/cancelBillManage/Pending.jsx
View file @
f150fa89
...
...
@@ -14,29 +14,16 @@ export default () => {
const
[
detailVisible
,
setDetailVisible
]
=
useState
(
false
);
const
[
detailInfo
,
setDetailInfo
]
=
useState
([]);
const
[
auditInfo
,
setAuditInfo
]
=
useState
({});
// const dateDiff = (startTime, endTime) => {
// const startY = startTime.substr(0, 4);
// const startM = startTime.substr(5, 2);
// const startD = startTime.substr(8, 2);
// const endY = endTime.substr(0, 4);
// const endM = endTime.substr(5, 2);
// const endD = endTime.substr(8, 2);
// if (endY - startY > 0) {
// if (
// (endY - startY) * (12 - startM) + endM > 3 ||
// ((endY - startY) * (12 - startM) + endM === 3 && endD > startD)
// ) {
// return true;
// }
// } else if (endM - startM > 3 || (endM - startM === 3 && endD > startD)) {
// return true;
// }
// return false;
// };
const
query
=
async
(
params
,
type
)
=>
{
if
(
params
.
orderId
)
{
params
.
orderId
=
`
${
params
.
orderId
}
`
.
replace
(
/
\s
/g
,
''
);
if
(
Number
.
isNaN
(
+
params
.
orderId
))
{
notification
.
warning
({
message
:
'
输入的订单Id只能为数字格式
'
,
});
return
false
;
}
}
if
(
params
.
receiverPhone
)
{
const
reg
=
/^1
[
3456789
]\d{9}
$/
;
...
...
@@ -62,7 +49,7 @@ export default () => {
const
endTime
=
params
.
applyTime
[
1
];
if
(
dateDiff
(
startTime
,
endTime
))
{
notification
.
warning
({
message
:
'
您输入的订单提交时间超过3个月啦!
'
,
message
:
'
您输入的订单
取消
提交时间超过3个月啦!
'
,
});
return
false
;
}
...
...
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