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
e0eb579b
Commit
e0eb579b
authored
Apr 20, 2022
by
lxd
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat: 订单审核时效
parent
e828e210
Changes
7
Show whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
122 additions
and
96 deletions
+122
-96
env.config.js
config/env.config.js
+5
-5
Admin.jsx
src/pages/Admin/Admin.jsx
+78
-66
service.js
src/pages/Admin/service.js
+13
-0
styles.less
src/pages/Admin/styles.less
+1
-2
Pending.jsx
src/pages/cancelBillManage/Pending.jsx
+15
-10
service.js
src/pages/cancelBillManage/service.js
+7
-10
index.jsx
src/pages/orderManage/pendingDeliveryOrder/index.jsx
+3
-3
No files found.
config/env.config.js
View file @
e0eb579b
...
@@ -2,12 +2,12 @@ const isProduction = process.env.NODE_ENV === 'production';
...
@@ -2,12 +2,12 @@ const isProduction = process.env.NODE_ENV === 'production';
const
isPre
=
process
.
env
.
PRE_ENV
===
'
pre
'
;
const
isPre
=
process
.
env
.
PRE_ENV
===
'
pre
'
;
const
envAPi
=
{
const
envAPi
=
{
api
:
'
//backstms-
test2
.liangkebang.net
'
,
api
:
'
//backstms-
gyl
.liangkebang.net
'
,
kdspOpApi
:
'
https://kdsp-operation-
test2
.liangkebang.net
'
,
kdspOpApi
:
'
https://kdsp-operation-
gyl
.liangkebang.net
'
,
kdspApi
:
'
https://sc-op-api-
test2
.liangkebang.net
'
,
kdspApi
:
'
https://sc-op-api-
gyl
.liangkebang.net
'
,
goodsApi
:
'
https://sc-op-api-
test2
.liangkebang.net
'
,
goodsApi
:
'
https://sc-op-api-
gyl
.liangkebang.net
'
,
// goodsApi: '//192.168.28.107:7000',
// goodsApi: '//192.168.28.107:7000',
prologueDomain
:
'
https://mall-
test
2.liangkebang.net
'
,
prologueDomain
:
'
https://mall-
gyl
2.liangkebang.net
'
,
qiniuHost
:
'
https://appsync.lkbang.net
'
,
qiniuHost
:
'
https://appsync.lkbang.net
'
,
opapiHost
:
'
https://opapi-gyl2.liangkebang.net
'
,
opapiHost
:
'
https://opapi-gyl2.liangkebang.net
'
,
};
};
...
...
src/pages/Admin/Admin.jsx
View file @
e0eb579b
import
React
from
'
react
'
;
import
React
,
{
useState
,
useEffect
}
from
'
react
'
;
import
{
Row
,
Col
}
from
'
antd
'
;
import
{
Row
,
Col
}
from
'
antd
'
;
import
Link
from
'
umi/link
'
;
import
Link
from
'
umi/link
'
;
// import { PageHeaderWrapper } from '@ant-design/pro-layout';
// import { PageHeaderWrapper } from '@ant-design/pro-layout';
// eslint-disable-next-line import/no-extraneous-dependencies
// eslint-disable-next-line import/no-extraneous-dependencies
import
{
FileTextOutlined
}
from
'
@ant-design/icons
'
;
import
{
FileTextOutlined
}
from
'
@ant-design/icons
'
;
import
style
from
'
./styles.less
'
;
import
style
from
'
./styles.less
'
;
import
{
getPendingNum
}
from
'
./service
'
;
const
Admin
=
()
=>
(
const
Admin
=
props
=>
{
const
[
pendingNum
,
setpendingNum
]
=
useState
({});
useEffect
(()
=>
{
const
qurey
=
async
()
=>
{
const
{
data
}
=
await
getPendingNum
();
setpendingNum
(
data
);
};
qurey
();
},
[]);
return
(
<
div
>
<
div
>
<
h2
>
欢迎使用商户管理后台系统
</
h2
>
<
h2
>
欢迎使用商户管理后台系统
</
h2
>
<
div
>
<
div
>
...
@@ -26,10 +38,9 @@ const Admin = () => (
...
@@ -26,10 +38,9 @@ const Admin = () => (
<
Link
<
Link
to=
{
{
to=
{
{
pathname
:
'
/orderManage/pendingDeliveryOrder
'
,
pathname
:
'
/orderManage/pendingDeliveryOrder
'
,
state
:
{
status
:
2
},
}
}
}
}
>
>
<
strong
>
9
</
strong
>
<
strong
>
{
pendingNum
?.
pendingShipNum
}
</
strong
>
<
p
>
待发货
</
p
>
<
p
>
待发货
</
p
>
</
Link
>
</
Link
>
</
Col
>
</
Col
>
...
@@ -40,7 +51,7 @@ const Admin = () => (
...
@@ -40,7 +51,7 @@ const Admin = () => (
state
:
{
status
:
1
},
state
:
{
status
:
1
},
}
}
}
}
>
>
<
strong
>
9
</
strong
>
<
strong
>
{
pendingNum
?.
timeOutShipNum
}
</
strong
>
<
p
>
待发货
{
'
>
'
}
48小时
</
p
>
<
p
>
待发货
{
'
>
'
}
48小时
</
p
>
</
Link
>
</
Link
>
</
Col
>
</
Col
>
...
@@ -50,7 +61,7 @@ const Admin = () => (
...
@@ -50,7 +61,7 @@ const Admin = () => (
pathname
:
'
cancelBillManage
'
,
pathname
:
'
cancelBillManage
'
,
}
}
}
}
>
>
<
strong
>
9
</
strong
>
<
strong
>
{
pendingNum
?.
cancelOrderPendingAuditNum
}
</
strong
>
<
p
>
取消订单审核
{
'
<
'
}
24小时
</
p
>
<
p
>
取消订单审核
{
'
<
'
}
24小时
</
p
>
</
Link
>
</
Link
>
</
Col
>
</
Col
>
...
@@ -66,7 +77,7 @@ const Admin = () => (
...
@@ -66,7 +77,7 @@ const Admin = () => (
pathname
:
'
afterSaleManage
'
,
pathname
:
'
afterSaleManage
'
,
}
}
}
}
>
>
<
strong
>
9
</
strong
>
<
strong
>
{
pendingNum
?.
afterOrderPendingAuditNum
}
</
strong
>
<
p
>
退款待审核
</
p
>
<
p
>
退款待审核
</
p
>
</
Link
>
</
Link
>
</
Col
>
</
Col
>
...
@@ -74,5 +85,6 @@ const Admin = () => (
...
@@ -74,5 +85,6 @@ const Admin = () => (
</
div
>
</
div
>
</
div
>
</
div
>
</
div
>
</
div
>
);
);
};
export
default
Admin
;
export
default
Admin
;
src/pages/Admin/service.js
0 → 100644
View file @
e0eb579b
import
{
stringify
}
from
'
querystring
'
;
import
_
from
'
lodash
'
;
import
request
from
'
@/utils/request
'
;
import
{
saveAs
}
from
'
file-saver
'
;
import
{
format
}
from
'
date-fns
'
;
import
config
from
'
../../../config/env.config
'
;
// 查询待办页订单数量
export
async
function
getPendingNum
()
{
const
data
=
await
request
.
get
(
'
/api/kdsp/admin/merchants/getPendingNum
'
,
{
prefix
:
config
.
kdspApi
,
});
return
data
;
}
src/pages/Admin/styles.less
View file @
e0eb579b
...
@@ -27,8 +27,7 @@
...
@@ -27,8 +27,7 @@
}
}
}
}
a:hover {
a:hover {
color: #fff;
background-color: #e6f7ff;
background-color: #5468ff;
}
}
}
}
.titleOne {
.titleOne {
...
...
src/pages/cancelBillManage/Pending.jsx
View file @
e0eb579b
/* eslint-disable no-mixed-operators */
/* eslint-disable no-mixed-operators */
/* eslint-disable radix */
/* eslint-disable radix */
import
React
,
{
useState
,
useRef
}
from
'
react
'
;
import
React
,
{
useState
,
useRef
,
useEffect
}
from
'
react
'
;
import
{
Button
,
notification
}
from
'
antd
'
;
import
{
Button
,
notification
}
from
'
antd
'
;
import
ProTable
from
'
@ant-design/pro-table
'
;
import
ProTable
from
'
@ant-design/pro-table
'
;
import
_
from
'
lodash
'
;
import
_
from
'
lodash
'
;
...
@@ -78,10 +78,11 @@ export default () => {
...
@@ -78,10 +78,11 @@ export default () => {
setDetailVisible
(
true
);
setDetailVisible
(
true
);
};
};
const
renderContent
=
(
record
,
index
,
action
)
=>
{
const
renderContent
=
(
record
,
index
,
action
)
=>
{
if
(
!
time
[
index
])
{
if
(
!
time
[
record
.
orderId
])
{
const
timestart
=
new
Date
().
getTime
();
const
applyTime
=
new
Date
(
record
.
applyTime
).
getTime
()
+
24
*
3600
*
1000
;
let
timeNumber
=
(
record
.
startTime
-
timestart
)
/
1000
;
const
nowTime
=
new
Date
(
record
.
nowTime
).
getTime
();
time
[
index
]
=
setInterval
(()
=>
{
let
timeNumber
=
(
applyTime
-
nowTime
)
/
1000
;
time
[
record
.
orderId
]
=
setInterval
(()
=>
{
if
(
timeNumber
>
0
)
{
if
(
timeNumber
>
0
)
{
timeNumber
-=
1
;
timeNumber
-=
1
;
const
hours
=
parseInt
((
timeNumber
/
3600
)
%
24
)
const
hours
=
parseInt
((
timeNumber
/
3600
)
%
24
)
...
@@ -94,16 +95,19 @@ export default () => {
...
@@ -94,16 +95,19 @@ export default () => {
.
toString
()
.
toString
()
.
padStart
(
2
,
'
0
'
);
.
padStart
(
2
,
'
0
'
);
const
str
=
`
${
hours
}
时
${
minutes
}
分
${
seconds
}
秒`
;
const
str
=
`
${
hours
}
时
${
minutes
}
分
${
seconds
}
秒`
;
timeString
[
index
]
=
str
;
timeString
[
record
.
orderId
]
=
str
;
const
strings
=
_
.
cloneDeep
(
timeString
);
const
strings
=
_
.
cloneDeep
(
timeString
);
settimeString
(
strings
);
settimeString
(
strings
);
}
else
{
}
else
{
clearInterval
(
time
[
index
]);
clearInterval
(
time
[
record
.
orderId
]);
action
.
reload
();
timeString
[
record
.
orderId
]
=
'
处理中
'
;
const
strings
=
_
.
cloneDeep
(
timeString
);
settimeString
(
strings
);
}
}
},
1000
);
},
1000
);
}
}
};
};
const
closeModal
=
isReload
=>
{
const
closeModal
=
isReload
=>
{
if
(
isReload
===
true
)
{
if
(
isReload
===
true
)
{
// eslint-disable-next-line no-unused-expressions
// eslint-disable-next-line no-unused-expressions
...
@@ -117,6 +121,7 @@ export default () => {
...
@@ -117,6 +121,7 @@ export default () => {
setAuditInfo
({
serviceNo
});
setAuditInfo
({
serviceNo
});
setVisible
(
true
);
setVisible
(
true
);
};
};
const
columns
=
[
const
columns
=
[
{
{
title
:
'
审核倒计时
'
,
title
:
'
审核倒计时
'
,
...
@@ -128,7 +133,7 @@ export default () => {
...
@@ -128,7 +133,7 @@ export default () => {
render
:
(
_
,
record
,
index
,
action
)
=>
[
render
:
(
_
,
record
,
index
,
action
)
=>
[
<
span
style=
{
{
color
:
'
red
'
}
}
>
<
span
style=
{
{
color
:
'
red
'
}
}
>
{
renderContent
(
record
,
index
,
action
)
}
{
renderContent
(
record
,
index
,
action
)
}
{
timeString
[
index
]
}
{
timeString
[
record
.
orderId
]
}
</
span
>,
</
span
>,
],
],
},
},
...
@@ -155,7 +160,7 @@ export default () => {
...
@@ -155,7 +160,7 @@ export default () => {
<
ProTable
<
ProTable
columns=
{
columns
}
columns=
{
columns
}
request=
{
params
=>
query
(
params
,
1
)
}
request=
{
params
=>
query
(
params
,
1
)
}
rowKey=
"serviceNo"
rowKey=
{
r
=>
r
.
orderId
}
pagination=
{
{
pagination=
{
{
pagesSize
:
20
,
pagesSize
:
20
,
}
}
}
}
...
...
src/pages/cancelBillManage/service.js
View file @
e0eb579b
...
@@ -22,18 +22,15 @@ export async function searchList(params, auditStatus) {
...
@@ -22,18 +22,15 @@ export async function searchList(params, auditStatus) {
// 'Content-Type': 'application/x-www-form-urlencoded',
// 'Content-Type': 'application/x-www-form-urlencoded',
// },
// },
});
});
//
if (data && data.data) {
if
(
data
&&
data
.
data
)
{
//
return {
return
{
//
total: data.data.total,
total
:
data
.
data
.
total
,
//
data: data.data.records,
data
:
data
.
data
.
records
,
//
};
};
//
}
}
return
{
return
{
total
:
10
,
total
:
10
,
data
:
[
data
:
[],
{
serviceNo
:
1
,
receiverName
:
1
,
startTime
:
1649924464730
},
{
serviceNo
:
2
,
receiverName
:
2
,
startTime
:
1649920460730
},
],
};
};
}
}
...
...
src/pages/orderManage/pendingDeliveryOrder/index.jsx
View file @
e0eb579b
...
@@ -121,9 +121,9 @@ const TableList = props => {
...
@@ -121,9 +121,9 @@ const TableList = props => {
hideInTable
:
true
,
hideInTable
:
true
,
formItemProps
:
{
formItemProps
:
{
// eslint-disable-next-line no-nested-ternary
// eslint-disable-next-line no-nested-ternary
value
:
orderStatus
?
(
orderStatus
===
'
1
'
?
'
是
'
:
'
否
'
)
:
''
,
value
:
orderStatus
?
(
orderStatus
===
1
?
'
是
'
:
'
否
'
)
:
''
,
onChange
(
status
)
{
onChange
(
status
)
{
setorderStatus
(
status
);
setorderStatus
(
Number
(
status
)
);
},
},
},
},
valueEnum
:
{
valueEnum
:
{
...
@@ -326,7 +326,7 @@ const TableList = props => {
...
@@ -326,7 +326,7 @@ const TableList = props => {
logisticsStatus
:
props
.
type
||
1
,
logisticsStatus
:
props
.
type
||
1
,
pageNo
:
params
.
current
,
pageNo
:
params
.
current
,
pageSize
:
params
.
pageSize
||
20
,
pageSize
:
params
.
pageSize
||
20
,
status
:
orderStatus
||
''
,
timeOutType
:
orderStatus
||
''
,
};
};
return
queryToSend
(
transformedParam
);
return
queryToSend
(
transformedParam
);
};
};
...
...
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