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
4ee3e994
Commit
4ee3e994
authored
Jul 04, 2022
by
张子雨
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'feat/aging2.1' into 'master'
Feat/aging2.1 See merge request
!41
parents
f8b83422
25038678
Changes
8
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
189 additions
and
52 deletions
+189
-52
env.config.js
config/env.config.js
+7
-7
index.jsx
src/pages/AfterSaleManage/PassAudit/index.jsx
+16
-1
index.jsx
src/pages/AfterSaleManage/Pending/index.jsx
+94
-41
AfterLog.jsx
src/pages/AfterSaleManage/components/AfterLog.jsx
+38
-0
auditModal.jsx
src/pages/AfterSaleManage/components/auditModal.jsx
+3
-2
data.js
src/pages/AfterSaleManage/data.js
+12
-1
services.js
src/pages/AfterSaleManage/services.js
+14
-0
styles.less
src/pages/AfterSaleManage/styles.less
+5
-0
No files found.
config/env.config.js
View file @
4ee3e994
...
...
@@ -2,16 +2,16 @@ const isProduction = process.env.NODE_ENV === 'production';
const
isPre
=
process
.
env
.
PRE_ENV
===
'
pre
'
;
const
envAPi
=
{
api
:
'
//backstms-
vcc3
.liangkebang.net
'
,
kdspOpApi
:
'
https://kdsp-operation-
vcc3
.liangkebang.net
'
,
kdspApi
:
'
https://sc-op-api-
vcc3
.liangkebang.net
'
,
goodsApi
:
'
https://sc-op-api-
vcc3
.liangkebang.net
'
,
querysApi
:
'
https://sc-settlement-api-
vcc3
.liangkebang.net
'
,
api
:
'
//backstms-
yxm
.liangkebang.net
'
,
kdspOpApi
:
'
https://kdsp-operation-
yxm
.liangkebang.net
'
,
kdspApi
:
'
https://sc-op-api-
yxm
.liangkebang.net
'
,
goodsApi
:
'
https://sc-op-api-
yxm
.liangkebang.net
'
,
querysApi
:
'
https://sc-settlement-api-
yxm
.liangkebang.net
'
,
// goodsApi: '//192.168.188.111:7000',
prologueDomain
:
'
https://mall-
vcc3
.liangkebang.net
'
,
prologueDomain
:
'
https://mall-
yxm
.liangkebang.net
'
,
// qiniuHost: 'https://appsync.lkbang.net',
qiniuHost
:
'
https://kdspstatic.q-gp.com/
'
,
opapiHost
:
'
https://opapi-
vcc3
.liangkebang.net
'
,
opapiHost
:
'
https://opapi-
yxm
.liangkebang.net
'
,
};
const
prodApi
=
{
...
...
src/pages/AfterSaleManage/PassAudit/index.jsx
View file @
4ee3e994
import
React
,
{
useState
,
useRef
}
from
'
react
'
;
import
{
Button
,
notification
,
Popconfirm
}
from
'
antd
'
;
import
ProTable
from
'
@ant-design/pro-table
'
;
import
{
searchList
,
shopCheck
,
orderDetail
,
trackInfo
}
from
'
../services
'
;
import
{
searchList
,
shopCheck
,
orderDetail
,
trackInfo
,
getOpLog
}
from
'
../services
'
;
import
{
getDetail
}
from
'
../../afterSale/appeal/services
'
;
import
{
columnPassAudit
}
from
'
../data
'
;
import
RejectModal
from
'
../components/rejectModal
'
;
...
...
@@ -9,6 +9,7 @@ import DetailTable from '../components/detailTable';
import
ProofsModal
from
'
../components/proofsModal
'
;
import
LogisticsCom
from
'
../../orderManage/pendingDeliveryOrder/components/LogisticsCom
'
;
import
AppealDetail
from
'
../../afterSale/components/detail
'
;
import
AfterLog
from
'
../components/AfterLog
'
;
export
default
()
=>
{
const
table
=
useRef
();
...
...
@@ -22,6 +23,8 @@ export default () => {
const
[
LogisticsComModalVisible
,
handleComModalVisible
]
=
useState
(
false
);
const
[
appealDetailModal
,
setAppealDetailModal
]
=
useState
(
false
);
const
[
selectedRow
,
setSelectedRow
]
=
useState
({});
const
[
afterVisible
,
setAfterVisible
]
=
useState
(
false
);
const
[
afterList
,
setAfterList
]
=
useState
([]);
const
viewDetail
=
async
({
serviceNo
})
=>
{
const
data
=
await
orderDetail
({
serviceNo
});
setDetailInfo
(
data
||
[]);
...
...
@@ -37,6 +40,7 @@ export default () => {
setProofsVisible
(
false
);
handleComModalVisible
(
false
);
setAppealDetailModal
(
false
);
setAfterVisible
(
false
);
};
const
reject
=
async
({
serviceNo
})
=>
{
setServiceNoInfo
(
serviceNo
);
...
...
@@ -60,6 +64,13 @@ export default () => {
closeModal
(
true
);
}
};
const
viewLog
=
async
r
=>
{
const
data
=
await
getOpLog
(
r
.
serviceNo
);
if
(
data
?.
data
?.
length
)
{
setAfterList
(
data
.
data
);
setAfterVisible
(
true
);
}
};
const
handleCom
=
async
({
expressCompanyCode
,
deliveryNo
})
=>
{
const
tempObj
=
{
detailList
:
[],
...
...
@@ -147,6 +158,9 @@ export default () => {
>
查看物流
</
Button
>,
<
Button
className=
"mr10 mt10"
type=
"primary"
onClick=
{
()
=>
viewLog
(
r
)
}
>
查看记录
</
Button
>,
],
},
];
...
...
@@ -183,6 +197,7 @@ export default () => {
modalVisible=
{
appealDetailModal
}
onCancel=
{
closeModal
}
></
AppealDetail
>
<
AfterLog
visible=
{
afterVisible
}
onCancel=
{
closeModal
}
data=
{
afterList
}
/>
,
</
div
>
);
};
src/pages/AfterSaleManage/Pending/index.jsx
View file @
4ee3e994
import
React
,
{
useState
,
useRef
}
from
'
react
'
;
import
{
notification
,
Button
,
Popconfirm
}
from
'
antd
'
;
import
{
notification
,
Button
,
Popconfirm
,
Modal
,
Statistic
}
from
'
antd
'
;
import
ProTable
from
'
@ant-design/pro-table
'
;
import
moment
from
'
moment
'
;
import
_
from
'
lodash
'
;
import
{
searchList
,
auditInfoApi
,
orderDetail
}
from
'
../services
'
;
import
{
searchList
,
auditInfoApi
,
orderDetail
,
logisticsIntercept
,
getOpLog
}
from
'
../services
'
;
import
{
columnSticData
,
appealType
}
from
'
../data
'
;
import
AuditModal
from
'
../components/auditModal
'
;
import
DetailTable
from
'
../components/detailTable
'
;
import
ProofsModal
from
'
../components/proofsModal
'
;
import
{
getDetail
}
from
'
../../afterSale/appeal/services
'
;
import
AppealDetail
from
'
../../afterSale/components/detail
'
;
import
AfterLog
from
'
../components/AfterLog
'
;
const
{
Countdown
}
=
Statistic
;
const
{
confirm
}
=
Modal
;
export
default
()
=>
{
const
table
=
useRef
();
const
[
visible
,
setVisible
]
=
useState
(
false
);
...
...
@@ -23,6 +27,8 @@ export default () => {
const
[
selectedRow
,
setSelectedRow
]
=
useState
({});
const
[
timeString
,
setTimeString
]
=
useState
({});
const
[
time
,
setTime
]
=
useState
({});
const
[
afterVisible
,
setAfterVisible
]
=
useState
(
false
);
const
[
afterList
,
setAfterList
]
=
useState
([]);
const
viewDetail
=
async
({
serviceNo
})
=>
{
const
data
=
await
orderDetail
({
serviceNo
});
setDetailInfo
(
data
||
[]);
...
...
@@ -37,10 +43,11 @@ export default () => {
setDetailVisible
(
false
);
setProofsVisible
(
false
);
setAppealDetailModal
(
false
);
setAfterVisible
(
false
);
};
const
openAudit
=
async
({
serviceNo
})
=>
{
const
openAudit
=
async
({
serviceNo
,
serviceType
})
=>
{
const
data
=
await
auditInfoApi
({
serviceNo
});
setAuditInfo
({
...
data
?.
data
,
serviceNo
});
setAuditInfo
({
...
data
?.
data
,
serviceNo
,
serviceType
});
setVisible
(
true
);
};
const
viewProofs
=
proofs
=>
{
...
...
@@ -56,39 +63,63 @@ export default () => {
setAppealDetailModal
(
true
);
setSelectedRow
(
detailData
);
};
const
renderContent
=
(
record
,
index
,
action
)
=>
{
if
(
!
time
[
record
.
serviceNo
])
{
const
serviceTime
=
moment
(
record
.
serviceTime
).
valueOf
()
+
24
*
3600
*
1000
;
const
nowTime
=
moment
(
record
.
nowTime
).
valueOf
();
let
timeNumber
=
(
serviceTime
-
nowTime
)
/
1000
;
time
[
record
.
serviceNo
]
=
setInterval
(()
=>
{
if
(
timeNumber
>
0
)
{
timeNumber
-=
1
;
// eslint-disable-next-line radix
const
hours
=
parseInt
((
timeNumber
/
3600
)
%
24
)
.
toString
()
.
padStart
(
2
,
'
0
'
);
// eslint-disable-next-line radix
const
minutes
=
parseInt
((
timeNumber
/
60
)
%
60
)
.
toString
()
.
padStart
(
2
,
'
0
'
);
// eslint-disable-next-line radix
const
seconds
=
parseInt
(
timeNumber
%
60
)
.
toString
()
.
padStart
(
2
,
'
0
'
);
const
str
=
`
${
hours
}
时
${
minutes
}
分
${
seconds
}
秒`
;
timeString
[
record
.
serviceNo
]
=
str
;
const
strings
=
_
.
cloneDeep
(
timeString
);
setTimeString
(
strings
);
const
viewLog
=
async
r
=>
{
const
data
=
await
getOpLog
(
r
.
serviceNo
);
if
(
data
?.
data
?.
length
)
{
setAfterList
(
data
.
data
);
setAfterVisible
(
true
);
}
};
const
openLogistics
=
r
=>
{
confirm
({
content
:
'
请在48小时内完成物流包裹拦截,确认是否需要进行物流拦截?
'
,
async
onOk
()
{
const
data
=
await
logisticsIntercept
({
serviceNo
:
r
.
serviceNo
});
if
(
data
.
businessCode
===
'
0000
'
)
{
notification
.
success
({
message
:
'
拦截成功
'
});
table
.
current
.
reload
();
}
else
{
clearInterval
(
time
[
record
.
serviceNo
]);
timeString
[
record
.
serviceNo
]
=
'
0时0分0秒
'
;
const
strings
=
_
.
cloneDeep
(
timeString
);
setTimeString
(
strings
);
notification
.
error
({
message
:
data
.
msg
||
'
拦截失败
'
});
}
},
1000
);
}
},
onCancel
()
{
console
.
log
(
'
Cancel
'
);
},
});
};
// const renderContent = (record, index, action) => {
// if (!time[record.serviceNo]) {
// const serviceTime = moment(record.approvalEndTime).valueOf();
// const nowTime = moment(record.nowTime).valueOf();
// let timeNumber = (serviceTime - nowTime) / 1000;
// time[record.serviceNo] = setInterval(() => {
// if (timeNumber > 0) {
// timeNumber -= 1;
// // eslint-disable-next-line radix
// const hours = parseInt(timeNumber / 3600)
// .toString()
// .padStart(2, '0');
// // eslint-disable-next-line radix
// const minutes = parseInt((timeNumber / 60) % 60)
// .toString()
// .padStart(2, '0');
// // eslint-disable-next-line radix
// const seconds = parseInt(timeNumber % 60)
// .toString()
// .padStart(2, '0');
// const str = `${hours}时${minutes}分${seconds}秒`;
// timeString[record.serviceNo] = str;
// const strings = _.cloneDeep(timeString);
// setTimeString(strings);
// } else {
// clearInterval(time[record.serviceNo]);
// timeString[record.serviceNo] = '0时0分0秒';
// const strings = _.cloneDeep(timeString);
// setTimeString(strings);
// }
// }, 1000);
// }
// };
const
columns
=
[
{
title
:
'
审核倒计时
'
,
...
...
@@ -96,12 +127,22 @@ export default () => {
key
:
'
serviceTime
'
,
hideInSearch
:
true
,
width
:
150
,
render
:
(
val
,
record
,
index
,
action
)
=>
[
<
span
style=
{
{
color
:
'
red
'
}
}
>
{
renderContent
(
record
,
index
,
action
)
}
{
timeString
[
record
.
serviceNo
]
}
</
span
>,
],
// render: (val, record, index, action) => [
// <span style={{ color: 'red' }}>
// {renderContent(record, index, action)}
// {timeString[record.serviceNo]}
// </span>,
// ],
render
:
(
val
,
record
)
=>
{
const
serviceTime
=
moment
(
record
.
approvalEndTime
).
valueOf
();
return
(
<
Countdown
format=
"HH时mm分ss秒"
value=
{
serviceTime
}
valueStyle=
{
{
color
:
'
red
'
,
fontSize
:
'
14px
'
}
}
/>
);
},
},
{
title
:
'
售后状态
'
,
...
...
@@ -140,9 +181,20 @@ export default () => {
<
Button
key=
"link1"
onClick=
{
()
=>
openAudit
(
r
)
}
className=
"mr10"
type=
"primary"
>
审核
</
Button
>,
<
Button
key=
"link"
onClick=
{
()
=>
viewDetail
(
r
)
}
type=
"primary"
>
<
Button
disabled=
{
r
.
serviceType
!==
1
||
(
r
.
serviceType
===
1
&&
r
.
intercept
)
}
onClick=
{
()
=>
openLogistics
(
r
)
}
className=
"mr10"
type=
"primary"
>
物流拦截
</
Button
>,
<
Button
className=
"mr10 mt10"
key=
"link"
onClick=
{
()
=>
viewDetail
(
r
)
}
type=
"primary"
>
订单详情
</
Button
>,
<
Button
type=
"primary"
onClick=
{
()
=>
viewLog
(
r
)
}
>
查看记录
</
Button
>,
],
},
];
...
...
@@ -172,6 +224,7 @@ export default () => {
modalVisible=
{
appealDetailModal
}
onCancel=
{
closeModal
}
></
AppealDetail
>
<
AfterLog
visible=
{
afterVisible
}
onCancel=
{
closeModal
}
data=
{
afterList
}
/>
</
div
>
);
};
src/pages/AfterSaleManage/components/AfterLog.jsx
0 → 100644
View file @
4ee3e994
/* eslint-disable no-restricted-syntax */
/* eslint-disable guard-for-in */
import
React
,
{
useState
,
useEffect
}
from
'
react
'
;
import
{
Modal
,
Timeline
,
Button
}
from
'
antd
'
;
import
styles
from
'
../styles.less
'
;
const
LogisticsCom
=
props
=>
{
const
{
visible
,
onCancel
,
data
}
=
props
;
return
(
<
Modal
destroyOnClose
title=
"查看记录"
visible=
{
visible
}
onCancel=
{
()
=>
onCancel
()
}
onOk=
{
()
=>
onCancel
()
}
footer=
{
false
}
>
{
data
?.
length
?
(
<
Timeline
>
{
data
?.
map
((
item
,
index
)
=>
(
// eslint-disable-next-line react/no-array-index-key
<
Timeline
.
Item
color=
{
index
>
0
?
'
gray
'
:
'
blue
'
}
key=
{
index
}
>
<
p
>
{
item
.
optDesc
}
</
p
>
<
p
>
{
item
.
optTime
}
</
p
>
</
Timeline
.
Item
>
))
}
</
Timeline
>
)
:
(
'
暂无查看记录
'
)
}
<
Button
type=
"primary"
onClick=
{
props
.
onCancel
}
className=
{
styles
.
logBtn
}
>
关闭
</
Button
>
</
Modal
>
);
};
export
default
LogisticsCom
;
src/pages/AfterSaleManage/components/auditModal.jsx
View file @
4ee3e994
...
...
@@ -13,7 +13,6 @@ const AuditModal = props => {
form
:
{
getFieldDecorator
,
getFieldValue
,
validateFields
,
resetFields
},
formData
=
{},
}
=
props
;
const
handleCancel
=
isSuccess
=>
{
resetFields
();
onCancel
(
isSuccess
);
...
...
@@ -103,7 +102,7 @@ const AuditModal = props => {
/>,
)
}
</
FormItem
>
{
isAgree
()
&&
(
{
isAgree
()
&&
+
formData
.
serviceType
===
2
&&
(
<
div
>
<
FormItem
label=
"退货地址"
>
{
getFieldDecorator
(
'
receiveAddress
'
,
{
...
...
@@ -189,6 +188,8 @@ const AuditModal = props => {
placeholder=
"请填写补充说明"
allowClear
autoSize=
{
{
minRows
:
3
,
maxRows
:
6
}
}
maxLength=
{
120
}
showCount
/>,
)
}
</
FormItem
>
...
...
src/pages/AfterSaleManage/data.js
View file @
4ee3e994
...
...
@@ -54,6 +54,17 @@ export const columnSticData = [
},
width
:
100
,
},
{
title
:
'
售后类型
'
,
dataIndex
:
'
type
'
,
hideInTable
:
true
,
width
:
120
,
valueEnum
:
{
1
:
'
仅退款
'
,
2
:
'
退货退款
'
,
},
},
{
title
:
'
收货人姓名
'
,
dataIndex
:
'
receiverName
'
,
...
...
@@ -92,7 +103,7 @@ export const columnSticData = [
hideInSearch
:
true
,
width
:
120
,
valueEnum
:
{
1
:
'
退款不退货
'
,
1
:
'
仅退款
'
,
2
:
'
退货退款
'
,
},
},
...
...
src/pages/AfterSaleManage/services.js
View file @
4ee3e994
...
...
@@ -79,3 +79,17 @@ export async function trackInfo(params) {
}
return
{};
}
// 物流拦截
export
async
function
logisticsIntercept
(
params
)
{
return
request
.
get
(
'
/api/kdsp/op/afs/shop/logisticsIntercept
'
,
{
params
,
prefix
:
kdspApi
,
});
}
// 售后操作日志
export
async
function
getOpLog
(
params
)
{
return
request
.
get
(
`/afterSaleAdmin/getOpLog/
${
params
}
`
,
{
prefix
:
kdspApi
,
});
}
src/pages/AfterSaleManage/styles.less
View file @
4ee3e994
...
...
@@ -16,3 +16,8 @@
max-height: 600px;
overflow: auto;
}
.logBtn {
display: inherit;
margin: 20px auto;
}
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