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
f6a3c017
Commit
f6a3c017
authored
Jun 15, 2022
by
张子雨
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat: 接口联调
parent
5b345e42
Changes
7
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
138 additions
and
14 deletions
+138
-14
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
+46
-5
AfterLog.jsx
src/pages/AfterSaleManage/components/AfterLog.jsx
+38
-0
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 @
f6a3c017
...
@@ -2,16 +2,16 @@ const isProduction = process.env.NODE_ENV === 'production';
...
@@ -2,16 +2,16 @@ 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-
vcc3
.liangkebang.net
'
,
api
:
'
//backstms-
test4
.liangkebang.net
'
,
kdspOpApi
:
'
https://kdsp-operation-
vcc3
.liangkebang.net
'
,
kdspOpApi
:
'
https://kdsp-operation-
test4
.liangkebang.net
'
,
kdspApi
:
'
https://sc-op-api-
vcc3
.liangkebang.net
'
,
kdspApi
:
'
https://sc-op-api-
test4
.liangkebang.net
'
,
goodsApi
:
'
https://sc-op-api-
vcc3
.liangkebang.net
'
,
goodsApi
:
'
https://sc-op-api-
test4
.liangkebang.net
'
,
querysApi
:
'
https://sc-settlement-api-
vcc3
.liangkebang.net
'
,
querysApi
:
'
https://sc-settlement-api-
test4
.liangkebang.net
'
,
// goodsApi: '//192.168.188.111:7000',
// goodsApi: '//192.168.188.111:7000',
prologueDomain
:
'
https://mall-
vcc3
.liangkebang.net
'
,
prologueDomain
:
'
https://mall-
test4
.liangkebang.net
'
,
// qiniuHost: 'https://appsync.lkbang.net',
// qiniuHost: 'https://appsync.lkbang.net',
qiniuHost
:
'
https://kdspstatic.q-gp.com/
'
,
qiniuHost
:
'
https://kdspstatic.q-gp.com/
'
,
opapiHost
:
'
https://opapi-
vcc3
.liangkebang.net
'
,
opapiHost
:
'
https://opapi-
test4
.liangkebang.net
'
,
};
};
const
prodApi
=
{
const
prodApi
=
{
...
...
src/pages/AfterSaleManage/PassAudit/index.jsx
View file @
f6a3c017
import
React
,
{
useState
,
useRef
}
from
'
react
'
;
import
React
,
{
useState
,
useRef
}
from
'
react
'
;
import
{
Button
,
notification
,
Popconfirm
}
from
'
antd
'
;
import
{
Button
,
notification
,
Popconfirm
}
from
'
antd
'
;
import
ProTable
from
'
@ant-design/pro-table
'
;
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
{
getDetail
}
from
'
../../afterSale/appeal/services
'
;
import
{
columnPassAudit
}
from
'
../data
'
;
import
{
columnPassAudit
}
from
'
../data
'
;
import
RejectModal
from
'
../components/rejectModal
'
;
import
RejectModal
from
'
../components/rejectModal
'
;
...
@@ -9,6 +9,7 @@ import DetailTable from '../components/detailTable';
...
@@ -9,6 +9,7 @@ import DetailTable from '../components/detailTable';
import
ProofsModal
from
'
../components/proofsModal
'
;
import
ProofsModal
from
'
../components/proofsModal
'
;
import
LogisticsCom
from
'
../../orderManage/pendingDeliveryOrder/components/LogisticsCom
'
;
import
LogisticsCom
from
'
../../orderManage/pendingDeliveryOrder/components/LogisticsCom
'
;
import
AppealDetail
from
'
../../afterSale/components/detail
'
;
import
AppealDetail
from
'
../../afterSale/components/detail
'
;
import
AfterLog
from
'
../components/AfterLog
'
;
export
default
()
=>
{
export
default
()
=>
{
const
table
=
useRef
();
const
table
=
useRef
();
...
@@ -22,6 +23,8 @@ export default () => {
...
@@ -22,6 +23,8 @@ export default () => {
const
[
LogisticsComModalVisible
,
handleComModalVisible
]
=
useState
(
false
);
const
[
LogisticsComModalVisible
,
handleComModalVisible
]
=
useState
(
false
);
const
[
appealDetailModal
,
setAppealDetailModal
]
=
useState
(
false
);
const
[
appealDetailModal
,
setAppealDetailModal
]
=
useState
(
false
);
const
[
selectedRow
,
setSelectedRow
]
=
useState
({});
const
[
selectedRow
,
setSelectedRow
]
=
useState
({});
const
[
afterVisible
,
setAfterVisible
]
=
useState
(
false
);
const
[
afterList
,
setAfterList
]
=
useState
([]);
const
viewDetail
=
async
({
serviceNo
})
=>
{
const
viewDetail
=
async
({
serviceNo
})
=>
{
const
data
=
await
orderDetail
({
serviceNo
});
const
data
=
await
orderDetail
({
serviceNo
});
setDetailInfo
(
data
||
[]);
setDetailInfo
(
data
||
[]);
...
@@ -60,6 +63,14 @@ export default () => {
...
@@ -60,6 +63,14 @@ export default () => {
closeModal
(
true
);
closeModal
(
true
);
}
}
};
};
const
viewLog
=
async
r
=>
{
const
[
data
]
=
await
getOpLog
(
r
.
serviceNo
);
console
.
log
(
data
);
if
(
data
)
{
setAfterList
(
data
);
setAfterVisible
(
true
);
}
};
const
handleCom
=
async
({
expressCompanyCode
,
deliveryNo
})
=>
{
const
handleCom
=
async
({
expressCompanyCode
,
deliveryNo
})
=>
{
const
tempObj
=
{
const
tempObj
=
{
detailList
:
[],
detailList
:
[],
...
@@ -147,6 +158,9 @@ export default () => {
...
@@ -147,6 +158,9 @@ export default () => {
>
>
查看物流
查看物流
</
Button
>,
</
Button
>,
<
Button
className=
"mr10 mt10"
type=
"primary"
onClick=
{
()
=>
viewLog
(
r
)
}
>
查看记录
</
Button
>,
],
],
},
},
];
];
...
@@ -183,6 +197,7 @@ export default () => {
...
@@ -183,6 +197,7 @@ export default () => {
modalVisible=
{
appealDetailModal
}
modalVisible=
{
appealDetailModal
}
onCancel=
{
closeModal
}
onCancel=
{
closeModal
}
></
AppealDetail
>
></
AppealDetail
>
<
AfterLog
visible=
{
afterVisible
}
onCancel=
{
closeModal
}
data=
{
afterList
}
/>
,
</
div
>
</
div
>
);
);
};
};
src/pages/AfterSaleManage/Pending/index.jsx
View file @
f6a3c017
import
React
,
{
useState
,
useRef
}
from
'
react
'
;
import
React
,
{
useState
,
useRef
}
from
'
react
'
;
import
{
notification
,
Button
,
Popconfirm
}
from
'
antd
'
;
import
{
notification
,
Button
,
Popconfirm
,
Modal
}
from
'
antd
'
;
import
ProTable
from
'
@ant-design/pro-table
'
;
import
ProTable
from
'
@ant-design/pro-table
'
;
import
moment
from
'
moment
'
;
import
moment
from
'
moment
'
;
import
_
from
'
lodash
'
;
import
_
from
'
lodash
'
;
import
{
searchList
,
auditInfoApi
,
orderDetail
}
from
'
../services
'
;
import
{
da
}
from
'
date-fns/locale
'
;
import
{
searchList
,
auditInfoApi
,
orderDetail
,
logisticsIntercept
,
getOpLog
}
from
'
../services
'
;
import
{
columnSticData
,
appealType
}
from
'
../data
'
;
import
{
columnSticData
,
appealType
}
from
'
../data
'
;
import
AuditModal
from
'
../components/auditModal
'
;
import
AuditModal
from
'
../components/auditModal
'
;
import
DetailTable
from
'
../components/detailTable
'
;
import
DetailTable
from
'
../components/detailTable
'
;
import
ProofsModal
from
'
../components/proofsModal
'
;
import
ProofsModal
from
'
../components/proofsModal
'
;
import
{
getDetail
}
from
'
../../afterSale/appeal/services
'
;
import
{
getDetail
}
from
'
../../afterSale/appeal/services
'
;
import
AppealDetail
from
'
../../afterSale/components/detail
'
;
import
AppealDetail
from
'
../../afterSale/components/detail
'
;
import
AfterLog
from
'
../components/AfterLog
'
;
const
{
confirm
}
=
Modal
;
export
default
()
=>
{
export
default
()
=>
{
const
table
=
useRef
();
const
table
=
useRef
();
const
[
visible
,
setVisible
]
=
useState
(
false
);
const
[
visible
,
setVisible
]
=
useState
(
false
);
...
@@ -23,6 +26,8 @@ export default () => {
...
@@ -23,6 +26,8 @@ export default () => {
const
[
selectedRow
,
setSelectedRow
]
=
useState
({});
const
[
selectedRow
,
setSelectedRow
]
=
useState
({});
const
[
timeString
,
setTimeString
]
=
useState
({});
const
[
timeString
,
setTimeString
]
=
useState
({});
const
[
time
,
setTime
]
=
useState
({});
const
[
time
,
setTime
]
=
useState
({});
const
[
afterVisible
,
setAfterVisible
]
=
useState
(
false
);
const
[
afterList
,
setAfterList
]
=
useState
([]);
const
viewDetail
=
async
({
serviceNo
})
=>
{
const
viewDetail
=
async
({
serviceNo
})
=>
{
const
data
=
await
orderDetail
({
serviceNo
});
const
data
=
await
orderDetail
({
serviceNo
});
setDetailInfo
(
data
||
[]);
setDetailInfo
(
data
||
[]);
...
@@ -37,6 +42,7 @@ export default () => {
...
@@ -37,6 +42,7 @@ export default () => {
setDetailVisible
(
false
);
setDetailVisible
(
false
);
setProofsVisible
(
false
);
setProofsVisible
(
false
);
setAppealDetailModal
(
false
);
setAppealDetailModal
(
false
);
setAfterVisible
(
false
);
};
};
const
openAudit
=
async
({
serviceNo
})
=>
{
const
openAudit
=
async
({
serviceNo
})
=>
{
const
data
=
await
auditInfoApi
({
serviceNo
});
const
data
=
await
auditInfoApi
({
serviceNo
});
...
@@ -56,9 +62,32 @@ export default () => {
...
@@ -56,9 +62,32 @@ export default () => {
setAppealDetailModal
(
true
);
setAppealDetailModal
(
true
);
setSelectedRow
(
detailData
);
setSelectedRow
(
detailData
);
};
};
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小时内完成物流包裹l拦截,确认是否需要进行物流拦截?
'
,
async
onOk
()
{
const
data
=
await
logisticsIntercept
({
serviceNo
:
r
.
serviceNo
});
if
(
data
.
businessCode
===
'
0000
'
)
{
notification
.
success
({
message
:
'
拦截成功
'
});
}
else
{
notification
.
error
({
message
:
data
.
msg
||
'
拦截失败
'
});
}
},
onCancel
()
{
console
.
log
(
'
Cancel
'
);
},
});
};
const
renderContent
=
(
record
,
index
,
action
)
=>
{
const
renderContent
=
(
record
,
index
,
action
)
=>
{
if
(
!
time
[
record
.
serviceNo
])
{
if
(
!
time
[
record
.
serviceNo
])
{
const
serviceTime
=
moment
(
record
.
serviceTime
).
valueOf
()
+
24
*
3600
*
1000
;
const
serviceTime
=
moment
(
record
.
overtime
).
valueOf
()
;
const
nowTime
=
moment
(
record
.
nowTime
).
valueOf
();
const
nowTime
=
moment
(
record
.
nowTime
).
valueOf
();
let
timeNumber
=
(
serviceTime
-
nowTime
)
/
1000
;
let
timeNumber
=
(
serviceTime
-
nowTime
)
/
1000
;
time
[
record
.
serviceNo
]
=
setInterval
(()
=>
{
time
[
record
.
serviceNo
]
=
setInterval
(()
=>
{
...
@@ -135,14 +164,25 @@ export default () => {
...
@@ -135,14 +164,25 @@ export default () => {
hideInSearch
:
true
,
hideInSearch
:
true
,
dataIndex
:
'
action
'
,
dataIndex
:
'
action
'
,
width
:
250
,
width
:
250
,
fixed
:
'
right
'
,
//
fixed: 'right',
render
:
(
val
,
r
)
=>
[
render
:
(
val
,
r
)
=>
[
<
Button
key=
"link1"
onClick=
{
()
=>
openAudit
(
r
)
}
className=
"mr10"
type=
"primary"
>
<
Button
key=
"link1"
onClick=
{
()
=>
openAudit
(
r
)
}
className=
"mr10"
type=
"primary"
>
审核
审核
</
Button
>,
</
Button
>,
<
Button
key=
"link"
onClick=
{
()
=>
viewDetail
(
r
)
}
type=
"primary"
>
<
Button
disabled=
{
r
.
serviceType
!==
1
}
onClick=
{
()
=>
openLogistics
(
r
)
}
className=
"mr10"
type=
"primary"
>
物流拦截
</
Button
>,
<
Button
className=
"mr10 mt10"
key=
"link"
onClick=
{
()
=>
viewDetail
(
r
)
}
type=
"primary"
>
订单详情
订单详情
</
Button
>,
</
Button
>,
<
Button
type=
"primary"
onClick=
{
()
=>
viewLog
(
r
)
}
>
查看记录
</
Button
>,
],
],
},
},
];
];
...
@@ -172,6 +212,7 @@ export default () => {
...
@@ -172,6 +212,7 @@ export default () => {
modalVisible=
{
appealDetailModal
}
modalVisible=
{
appealDetailModal
}
onCancel=
{
closeModal
}
onCancel=
{
closeModal
}
></
AppealDetail
>
></
AppealDetail
>
<
AfterLog
visible=
{
afterVisible
}
onCancel=
{
closeModal
}
data=
{
afterList
}
/>
</
div
>
</
div
>
);
);
};
};
src/pages/AfterSaleManage/components/AfterLog.jsx
0 → 100644
View file @
f6a3c017
/* 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/data.js
View file @
f6a3c017
...
@@ -54,6 +54,17 @@ export const columnSticData = [
...
@@ -54,6 +54,17 @@ export const columnSticData = [
},
},
width
:
100
,
width
:
100
,
},
},
{
title
:
'
售后类型
'
,
dataIndex
:
'
type
'
,
hideInTable
:
true
,
width
:
120
,
valueEnum
:
{
1
:
'
仅退款
'
,
2
:
'
退货退款
'
,
},
},
{
{
title
:
'
收货人姓名
'
,
title
:
'
收货人姓名
'
,
dataIndex
:
'
receiverName
'
,
dataIndex
:
'
receiverName
'
,
...
@@ -92,7 +103,7 @@ export const columnSticData = [
...
@@ -92,7 +103,7 @@ export const columnSticData = [
hideInSearch
:
true
,
hideInSearch
:
true
,
width
:
120
,
width
:
120
,
valueEnum
:
{
valueEnum
:
{
1
:
'
退款不退货
'
,
1
:
'
仅退款
'
,
2
:
'
退货退款
'
,
2
:
'
退货退款
'
,
},
},
},
},
...
...
src/pages/AfterSaleManage/services.js
View file @
f6a3c017
...
@@ -79,3 +79,17 @@ export async function trackInfo(params) {
...
@@ -79,3 +79,17 @@ export async function trackInfo(params) {
}
}
return
{};
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 @
f6a3c017
...
@@ -16,3 +16,8 @@
...
@@ -16,3 +16,8 @@
max-height: 600px;
max-height: 600px;
overflow: auto;
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