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
fd1b0d52
Commit
fd1b0d52
authored
Oct 13, 2021
by
王苓芝
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
已审核问题修改
parent
f8eba718
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
73 additions
and
20 deletions
+73
-20
PassAudit.jsx
src/pages/cancelBillManage/PassAudit.jsx
+34
-1
Pending.jsx
src/pages/cancelBillManage/Pending.jsx
+20
-19
common.js
src/pages/cancelBillManage/common.js
+19
-0
No files found.
src/pages/cancelBillManage/PassAudit.jsx
View file @
fd1b0d52
import
React
,
{
useState
,
useRef
,
useEffect
}
from
'
react
'
;
import
React
,
{
useState
,
useRef
,
useEffect
}
from
'
react
'
;
import
{
Button
}
from
'
antd
'
;
import
{
Button
,
notification
}
from
'
antd
'
;
import
ProTable
from
'
@ant-design/pro-table
'
;
import
ProTable
from
'
@ant-design/pro-table
'
;
import
{
searchList
,
orderDetail
}
from
'
./service
'
;
import
{
searchList
,
orderDetail
}
from
'
./service
'
;
import
{
column
}
from
'
./data
'
;
import
{
column
}
from
'
./data
'
;
import
DetailTable
from
'
./components/detailTable
'
;
import
DetailTable
from
'
./components/detailTable
'
;
import
{
dateDiff
}
from
'
./common
'
;
export
default
()
=>
{
export
default
()
=>
{
const
table
=
useRef
();
const
table
=
useRef
();
...
@@ -23,6 +24,38 @@ export default () => {
...
@@ -23,6 +24,38 @@ export default () => {
};
};
const
query
=
async
(
params
,
type
)
=>
{
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
=
{
const
tempParams
=
{
...
params
,
...
params
,
applyTimeStartAt
:
params
.
applyTime
?.[
0
],
applyTimeStartAt
:
params
.
applyTime
?.[
0
],
...
...
src/pages/cancelBillManage/Pending.jsx
View file @
fd1b0d52
...
@@ -6,6 +6,7 @@ import { searchList, orderDetail } from './service';
...
@@ -6,6 +6,7 @@ import { searchList, orderDetail } from './service';
import
{
column
}
from
'
./data
'
;
import
{
column
}
from
'
./data
'
;
import
AuditModal
from
'
./components/auditModal
'
;
import
AuditModal
from
'
./components/auditModal
'
;
import
DetailTable
from
'
./components/detailTable
'
;
import
DetailTable
from
'
./components/detailTable
'
;
import
{
dateDiff
}
from
'
./common
'
;
export
default
()
=>
{
export
default
()
=>
{
const
table
=
useRef
();
const
table
=
useRef
();
...
@@ -13,25 +14,25 @@ export default () => {
...
@@ -13,25 +14,25 @@ export default () => {
const
[
detailVisible
,
setDetailVisible
]
=
useState
(
false
);
const
[
detailVisible
,
setDetailVisible
]
=
useState
(
false
);
const
[
detailInfo
,
setDetailInfo
]
=
useState
([]);
const
[
detailInfo
,
setDetailInfo
]
=
useState
([]);
const
[
auditInfo
,
setAuditInfo
]
=
useState
({});
const
[
auditInfo
,
setAuditInfo
]
=
useState
({});
const
dateDiff
=
(
startTime
,
endTime
)
=>
{
//
const dateDiff = (startTime, endTime) => {
const
startY
=
startTime
.
substr
(
0
,
4
);
//
const startY = startTime.substr(0, 4);
const
startM
=
startTime
.
substr
(
5
,
2
);
//
const startM = startTime.substr(5, 2);
const
startD
=
startTime
.
substr
(
8
,
2
);
//
const startD = startTime.substr(8, 2);
const
endY
=
endTime
.
substr
(
0
,
4
);
//
const endY = endTime.substr(0, 4);
const
endM
=
endTime
.
substr
(
5
,
2
);
//
const endM = endTime.substr(5, 2);
const
endD
=
endTime
.
substr
(
8
,
2
);
//
const endD = endTime.substr(8, 2);
if
(
endY
-
startY
>
0
)
{
//
if (endY - startY > 0) {
if
(
//
if (
(
endY
-
startY
)
*
(
12
-
startM
)
+
endM
>
3
||
//
(endY - startY) * (12 - startM) + endM > 3 ||
((
endY
-
startY
)
*
(
12
-
startM
)
+
endM
===
3
&&
endD
>
startD
)
//
((endY - startY) * (12 - startM) + endM === 3 && endD > startD)
)
{
//
) {
return
true
;
//
return true;
}
//
}
}
else
if
(
endM
-
startM
>
3
||
(
endM
-
startM
===
3
&&
endD
>
startD
))
{
//
} else if (endM - startM > 3 || (endM - startM === 3 && endD > startD)) {
return
true
;
//
return true;
}
//
}
return
false
;
//
return false;
};
//
};
const
query
=
async
(
params
,
type
)
=>
{
const
query
=
async
(
params
,
type
)
=>
{
if
(
params
.
orderId
)
{
if
(
params
.
orderId
)
{
...
...
src/pages/cancelBillManage/common.js
0 → 100644
View file @
fd1b0d52
export
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
;
};
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