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
cc60a740
Commit
cc60a740
authored
Aug 29, 2022
by
武广
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'feature/RefundTip' of git.quantgroup.cn:ui/merchant-manage-ui into feature/ue-upgrade
parents
76c9c61f
67c8baa4
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
83 additions
and
63 deletions
+83
-63
index.jsx
src/pages/AfterSaleManage/Pending/index.jsx
+10
-42
auditModal.jsx
src/pages/AfterSaleManage/components/auditModal.jsx
+52
-11
data.js
src/pages/AfterSaleManage/data.js
+12
-10
styles.less
src/pages/AfterSaleManage/styles.less
+9
-0
No files found.
src/pages/AfterSaleManage/Pending/index.jsx
View file @
cc60a740
...
...
@@ -11,6 +11,7 @@ import ProofsModal from '../components/proofsModal';
import
{
getDetail
}
from
'
../../afterSale/appeal/services
'
;
import
AppealDetail
from
'
../../afterSale/components/detail
'
;
import
AfterLog
from
'
../components/AfterLog
'
;
import
styles
from
'
../styles.less
'
;
const
{
Countdown
}
=
Statistic
;
...
...
@@ -25,8 +26,6 @@ export default () => {
const
[
auditInfo
,
setAuditInfo
]
=
useState
({});
const
[
appealDetailModal
,
setAppealDetailModal
]
=
useState
(
false
);
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
})
=>
{
...
...
@@ -73,7 +72,15 @@ export default () => {
};
const
openLogistics
=
r
=>
{
confirm
({
content
:
'
请在48小时内完成物流包裹拦截,确认是否需要进行物流拦截?
'
,
title
:
'
温馨提示
'
,
okText
:
'
确认拦截
'
,
cancelText
:
'
取消拦截
'
,
content
:
(
<
div
>
请48小时内自行联系物流公司进行物流拦截,系统监测拦截成功后
<
span
className=
{
styles
.
redTipBold
}
>
自动同意
</
span
>
退款
</
div
>
),
async
onOk
()
{
const
data
=
await
logisticsIntercept
({
serviceNo
:
r
.
serviceNo
});
if
(
data
.
businessCode
===
'
0000
'
)
{
...
...
@@ -88,39 +95,6 @@ export default () => {
},
});
};
// 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
:
'
审核倒计时
'
,
...
...
@@ -128,12 +102,6 @@ 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
)
=>
{
const
serviceTime
=
moment
(
record
.
approvalEndTime
).
valueOf
();
return
(
...
...
src/pages/AfterSaleManage/components/auditModal.jsx
View file @
cc60a740
...
...
@@ -3,9 +3,11 @@ import { Form } from '@ant-design/compatible';
import
'
@ant-design/compatible/assets/index.css
'
;
import
{
Modal
,
Input
,
Cascader
,
notification
,
InputNumber
}
from
'
antd
'
;
import
{
shopAudit
}
from
'
../services
'
;
import
styles
from
'
../styles.less
'
;
const
FormItem
=
Form
.
Item
;
const
{
TextArea
}
=
Input
;
const
{
confirm
}
=
Modal
;
const
AuditModal
=
props
=>
{
const
{
visible
,
...
...
@@ -13,6 +15,7 @@ const AuditModal = props => {
form
:
{
getFieldDecorator
,
getFieldValue
,
validateFields
,
resetFields
},
formData
=
{},
}
=
props
;
const
handleCancel
=
isSuccess
=>
{
resetFields
();
onCancel
(
isSuccess
);
...
...
@@ -57,19 +60,43 @@ const AuditModal = props => {
],
},
];
const
submitCheckResult
=
async
fieldsValue
=>
{
const
{
auditResult
}
=
fieldsValue
;
const
data
=
await
shopAudit
({
...
fieldsValue
,
refuseCode
:
auditResult
?.[
1
],
auditResult
:
auditResult
?.[
0
],
serviceNo
:
formData
?.
serviceNo
,
});
if
(
data
.
businessCode
===
'
0000
'
)
{
notification
.
success
({
message
:
'
审核成功
'
});
handleCancel
(
true
);
}
};
const
handleOk
=
()
=>
{
validateFields
(
async
(
error
,
fieldsValue
)
=>
{
validateFields
((
error
,
fieldsValue
)
=>
{
if
(
!
error
)
{
const
{
auditResult
}
=
fieldsValue
;
const
data
=
await
shopAudit
({
...
fieldsValue
,
refuseCode
:
auditResult
?.[
1
],
auditResult
:
auditResult
?.[
0
],
serviceNo
:
formData
?.
serviceNo
,
});
if
(
data
.
businessCode
===
'
0000
'
)
{
notification
.
success
({
message
:
'
审核成功
'
});
handleCancel
(
true
);
// 如果为仅退款 并且 审核同意 弹出二次确认提示
if
(
+
formData
.
serviceType
===
1
&&
auditResult
?.[
0
]
===
1
)
{
confirm
({
title
:
'
温馨提示
'
,
content
:
(
<
div
>
当前类型为【
<
span
className=
{
styles
.
redTipBold
}
>
仅退款
</
span
>
】,请核查该订单物流状态,如有在途物流,务必自行拦截后点击确认;
</
div
>
),
okText
:
'
确认退款
'
,
onOk
()
{
submitCheckResult
(
fieldsValue
);
},
onCancel
()
{
handleCancel
(
true
);
},
});
}
else
{
submitCheckResult
(
fieldsValue
);
}
}
});
...
...
@@ -89,9 +116,23 @@ const AuditModal = props => {
onOk=
{
()
=>
handleOk
()
}
onCancel=
{
()
=>
handleCancel
()
}
>
{
+
formData
.
serviceType
===
1
&&
(
<
div
className=
{
styles
.
redTip
}
>
温馨提示:当前售后类型为用户未收到产品,申请
<
span
className=
{
styles
.
redTipBold
}
>
仅退款
</
span
>
,请务必检查此单物流状态后审核。
</
div
>
)
}
<
Form
{
...
layout
}
name=
"formData"
>
<
FormItem
label=
"审核结果"
>
{
getFieldDecorator
(
'
auditResult
'
)(
{
getFieldDecorator
(
'
auditResult
'
,
{
rules
:
[
{
required
:
true
,
message
:
'
请选择审核结果!
'
,
},
],
})(
<
Cascader
allowClear
showSearch
...
...
src/pages/AfterSaleManage/data.js
View file @
cc60a740
...
...
@@ -6,6 +6,18 @@ export const appealType = {
0
:
'
未申诉
'
,
};
export
const
columnSticData
=
[
{
title
:
'
售后类型
'
,
dataIndex
:
'
serviceType
'
,
hideInSearch
:
true
,
width
:
120
,
render
:
serviceType
=>
{
if
(
+
serviceType
===
1
)
{
return
<
span
style
=
{{
color
:
'
#ff1616
'
}}
>
仅退款
<
/span>
;
}
return
<
span
>
退货退款
<
/span>
;
},
},
{
title
:
'
订单ID
'
,
dataIndex
:
'
orderNo
'
,
...
...
@@ -97,16 +109,6 @@ export const columnSticData = [
valueType
:
'
date
'
,
hideInTable
:
true
,
},
{
title
:
'
售后类型
'
,
dataIndex
:
'
serviceType
'
,
hideInSearch
:
true
,
width
:
120
,
valueEnum
:
{
1
:
'
仅退款
'
,
2
:
'
退货退款
'
,
},
},
{
title
:
'
售后原因
'
,
dataIndex
:
'
serviceReason
'
,
...
...
src/pages/AfterSaleManage/styles.less
View file @
cc60a740
...
...
@@ -21,3 +21,12 @@
display: inherit;
margin: 20px auto;
}
.redTip {
color: #ff4d4f;
font-size: 14px;
}
.redTipBold {
color: #ff1616;
font-weight: bold;
}
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