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
f8eba718
Commit
f8eba718
authored
Oct 13, 2021
by
王苓芝
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
bug调整
parent
3916ef2f
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
52 additions
and
1 deletion
+52
-1
Pending.jsx
src/pages/cancelBillManage/Pending.jsx
+52
-1
No files found.
src/pages/cancelBillManage/Pending.jsx
View file @
f8eba718
import
React
,
{
useState
,
useRef
}
from
'
react
'
;
import
{
Button
}
from
'
antd
'
;
import
{
Button
,
notification
}
from
'
antd
'
;
import
ProTable
from
'
@ant-design/pro-table
'
;
// import { searchList, auditInfoApi, orderDetail } from './service';
import
{
searchList
,
orderDetail
}
from
'
./service
'
;
...
...
@@ -13,8 +13,59 @@ 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
(
params
.
receiverPhone
)
{
const
reg
=
/^1
[
3456789
]\d{9}
$/
;
if
(
!
reg
.
test
(
params
.
receiverPhone
))
{
notification
.
warning
({
message
:
'
您输入的手机号有误,请重新输入!
'
,
});
return
false
;
}
}
if
(
params
.
orderTime
&&
params
.
orderTime
.
length
)
{
const
startTime
=
params
.
orderTime
[
0
];
const
endTime
=
params
.
orderTime
[
1
];
if
(
dateDiff
(
startTime
,
endTime
))
{
notification
.
warning
({
message
:
'
您输入的订单创建时间超过3个月啦!
'
,
});
return
false
;
}
}
if
(
params
.
applyTime
&&
params
.
applyTime
.
length
)
{
const
startTime
=
params
.
applyTime
[
0
];
const
endTime
=
params
.
applyTime
[
1
];
if
(
dateDiff
(
startTime
,
endTime
))
{
notification
.
warning
({
message
:
'
您输入的订单提交时间超过3个月啦!
'
,
});
return
false
;
}
}
const
tempParams
=
{
...
params
,
applyTimeStartAt
:
params
.
applyTime
?.[
0
],
...
...
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