|
|
@ -12,14 +12,20 @@
|
|
|
|
<div class="header">
|
|
|
|
<div class="header">
|
|
|
|
<h3 class="left red">当前服务单状态:{{ state.detail.refundStatusDesc }}</h3>
|
|
|
|
<h3 class="left red">当前服务单状态:{{ state.detail.refundStatusDesc }}</h3>
|
|
|
|
<div class="right">
|
|
|
|
<div class="right">
|
|
|
|
|
|
|
|
<!-- 待处理 -->
|
|
|
|
<template v-if="state.detail.refundStatus === 1">
|
|
|
|
<template v-if="state.detail.refundStatus === 1">
|
|
|
|
<el-button type="primary" @click="handleResolve">
|
|
|
|
<el-button type="primary" @click="handleResolveRefundOrReturn">
|
|
|
|
同意{{ state.detail.refundType === 1 ? '退款' : '退货' }}
|
|
|
|
同意{{ state.detail.refundType === 1 ? '退款' : '退货' }}
|
|
|
|
</el-button>
|
|
|
|
</el-button>
|
|
|
|
<el-button type="danger" @click="handleReject">
|
|
|
|
<el-button type="danger" @click="handleRejectRefundOrReturn">
|
|
|
|
拒绝{{ state.detail.refundType === 1 ? '退款' : '退货' }}
|
|
|
|
拒绝{{ state.detail.refundType === 1 ? '退款' : '退货' }}
|
|
|
|
</el-button>
|
|
|
|
</el-button>
|
|
|
|
</template>
|
|
|
|
</template>
|
|
|
|
|
|
|
|
<!-- 待收货 -->
|
|
|
|
|
|
|
|
<template v-if="state.detail.refundStatus === 4">
|
|
|
|
|
|
|
|
<el-button type="primary" @click="handleResolveReceive">确认收货</el-button>
|
|
|
|
|
|
|
|
<el-button type="danger" @click="handleRejectReceive">拒绝收货</el-button>
|
|
|
|
|
|
|
|
</template>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<el-scrollbar class="body">
|
|
|
|
<el-scrollbar class="body">
|
|
|
@ -66,7 +72,7 @@
|
|
|
|
{{ state.detail.userId }}
|
|
|
|
{{ state.detail.userId }}
|
|
|
|
</el-form-item>
|
|
|
|
</el-form-item>
|
|
|
|
<el-form-item label="联系人">
|
|
|
|
<el-form-item label="联系人">
|
|
|
|
{{ state.detail.userId }}
|
|
|
|
{{ state.detail.userNickName }}
|
|
|
|
</el-form-item>
|
|
|
|
</el-form-item>
|
|
|
|
<el-form-item label="联系电话">
|
|
|
|
<el-form-item label="联系电话">
|
|
|
|
{{ state.detail.userPhone }}
|
|
|
|
{{ state.detail.userPhone }}
|
|
|
@ -89,9 +95,30 @@
|
|
|
|
/>
|
|
|
|
/>
|
|
|
|
</el-form-item>
|
|
|
|
</el-form-item>
|
|
|
|
</el-form>
|
|
|
|
</el-form>
|
|
|
|
|
|
|
|
<!-- 仅退款 -->
|
|
|
|
<template v-if="state.detail.refundType === 1">
|
|
|
|
<template v-if="state.detail.refundType === 1">
|
|
|
|
<h3>退款处理</h3>
|
|
|
|
<h3>退款处理</h3>
|
|
|
|
<el-form v-if="[2, 6].includes(state.detail.refundStatus)" label-width="120px">
|
|
|
|
<!-- 待处理 -->
|
|
|
|
|
|
|
|
<el-form
|
|
|
|
|
|
|
|
v-if="state.detail.refundStatus === 1"
|
|
|
|
|
|
|
|
ref="refsForm"
|
|
|
|
|
|
|
|
label-width="120px"
|
|
|
|
|
|
|
|
:model="state.form"
|
|
|
|
|
|
|
|
:rules="state.rules"
|
|
|
|
|
|
|
|
>
|
|
|
|
|
|
|
|
<el-form-item label="订单金额">
|
|
|
|
|
|
|
|
{{ state.detail.refundAmount }}
|
|
|
|
|
|
|
|
</el-form-item>
|
|
|
|
|
|
|
|
<el-form-item label="确认退款金额" prop="refundAmount">
|
|
|
|
|
|
|
|
<el-input-number v-model="state.form.refundAmount" />
|
|
|
|
|
|
|
|
</el-form-item>
|
|
|
|
|
|
|
|
<el-form-item label="处理备注" prop="remark">
|
|
|
|
|
|
|
|
<el-input v-model="state.form.remark" />
|
|
|
|
|
|
|
|
<p class="tips">展示给用户的说明</p>
|
|
|
|
|
|
|
|
</el-form-item>
|
|
|
|
|
|
|
|
</el-form>
|
|
|
|
|
|
|
|
<!-- 已处理 -->
|
|
|
|
|
|
|
|
<el-form v-else label-width="120px">
|
|
|
|
<el-form-item label="订单金额">
|
|
|
|
<el-form-item label="订单金额">
|
|
|
|
{{ state.detail.productAmount }}
|
|
|
|
{{ state.detail.productAmount }}
|
|
|
|
</el-form-item>
|
|
|
|
</el-form-item>
|
|
|
@ -114,21 +141,11 @@
|
|
|
|
{{ state.detail.remark || state.detail.closeReason || '无' }}
|
|
|
|
{{ state.detail.remark || state.detail.closeReason || '无' }}
|
|
|
|
</el-form-item>
|
|
|
|
</el-form-item>
|
|
|
|
</el-form>
|
|
|
|
</el-form>
|
|
|
|
<el-form v-else ref="refsForm" label-width="120px" :model="state.form" :rules="state.rules">
|
|
|
|
|
|
|
|
<el-form-item label="订单金额">
|
|
|
|
|
|
|
|
{{ state.detail.refundAmount }}
|
|
|
|
|
|
|
|
</el-form-item>
|
|
|
|
|
|
|
|
<el-form-item label="确认退款金额" prop="refundAmount">
|
|
|
|
|
|
|
|
<el-input-number v-model="state.form.refundAmount" />
|
|
|
|
|
|
|
|
</el-form-item>
|
|
|
|
|
|
|
|
<el-form-item label="处理备注" prop="remark">
|
|
|
|
|
|
|
|
<el-input v-model="state.form.remark" />
|
|
|
|
|
|
|
|
<p class="tips">展示给用户的说明</p>
|
|
|
|
|
|
|
|
</el-form-item>
|
|
|
|
|
|
|
|
</el-form>
|
|
|
|
|
|
|
|
</template>
|
|
|
|
</template>
|
|
|
|
|
|
|
|
<!-- 退货退款 -->
|
|
|
|
<template v-else>
|
|
|
|
<template v-else>
|
|
|
|
<h3>退货处理</h3>
|
|
|
|
<h3>退货处理</h3>
|
|
|
|
|
|
|
|
<!-- 待处理 -->
|
|
|
|
<el-form
|
|
|
|
<el-form
|
|
|
|
v-if="state.detail.refundStatus === 1"
|
|
|
|
v-if="state.detail.refundStatus === 1"
|
|
|
|
ref="refsForm"
|
|
|
|
ref="refsForm"
|
|
|
@ -197,6 +214,39 @@
|
|
|
|
{{ state.detail.handleReturnLog?.createTime }}
|
|
|
|
{{ state.detail.handleReturnLog?.createTime }}
|
|
|
|
</el-form-item>
|
|
|
|
</el-form-item>
|
|
|
|
</el-form>
|
|
|
|
</el-form>
|
|
|
|
|
|
|
|
<template v-if="state.detail.refundLogistics">
|
|
|
|
|
|
|
|
<h3>退货物流</h3>
|
|
|
|
|
|
|
|
<el-form label-width="120px">
|
|
|
|
|
|
|
|
<el-form-item label="物流信息">
|
|
|
|
|
|
|
|
<span>
|
|
|
|
|
|
|
|
{{ state.detail.refundLogistics?.companyName }}
|
|
|
|
|
|
|
|
</span>
|
|
|
|
|
|
|
|
<span>
|
|
|
|
|
|
|
|
{{ state.detail.refundLogistics?.trackingNo }}
|
|
|
|
|
|
|
|
</span>
|
|
|
|
|
|
|
|
<el-button type="text">查看</el-button>
|
|
|
|
|
|
|
|
</el-form-item>
|
|
|
|
|
|
|
|
<el-form-item label="退款说明">
|
|
|
|
|
|
|
|
{{ state.detail.handleReturnLog?.problemDescribe }}
|
|
|
|
|
|
|
|
</el-form-item>
|
|
|
|
|
|
|
|
<el-form-item label="凭证照片">
|
|
|
|
|
|
|
|
<el-image
|
|
|
|
|
|
|
|
v-for="(item, index) in state.detail.logisticsEvidences"
|
|
|
|
|
|
|
|
:key="index"
|
|
|
|
|
|
|
|
alt="凭证照片"
|
|
|
|
|
|
|
|
:src="item.fileUrl"
|
|
|
|
|
|
|
|
/>
|
|
|
|
|
|
|
|
</el-form-item>
|
|
|
|
|
|
|
|
</el-form>
|
|
|
|
|
|
|
|
</template>
|
|
|
|
|
|
|
|
<template v-if="state.detail.refundStatus === 4">
|
|
|
|
|
|
|
|
<h3>收货处理</h3>
|
|
|
|
|
|
|
|
<el-form ref="refsForm" label-width="120px" :model="state.form" :rules="state.rules">
|
|
|
|
|
|
|
|
<el-form-item label="收货备注" prop="remark">
|
|
|
|
|
|
|
|
<el-input v-model="state.form.remark" />
|
|
|
|
|
|
|
|
</el-form-item>
|
|
|
|
|
|
|
|
</el-form>
|
|
|
|
|
|
|
|
</template>
|
|
|
|
</template>
|
|
|
|
</template>
|
|
|
|
</el-scrollbar>
|
|
|
|
</el-scrollbar>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
@ -226,7 +276,7 @@
|
|
|
|
{
|
|
|
|
{
|
|
|
|
title: '售后完毕',
|
|
|
|
title: '售后完毕',
|
|
|
|
desc: '未完毕',
|
|
|
|
desc: '未完毕',
|
|
|
|
status: [3, 4, 5, 6, 12],
|
|
|
|
status: [3, 4, 5, 6],
|
|
|
|
},
|
|
|
|
},
|
|
|
|
],
|
|
|
|
],
|
|
|
|
steps2: [
|
|
|
|
steps2: [
|
|
|
@ -253,7 +303,7 @@
|
|
|
|
{
|
|
|
|
{
|
|
|
|
title: '售后完毕',
|
|
|
|
title: '售后完毕',
|
|
|
|
desc: '未完毕',
|
|
|
|
desc: '未完毕',
|
|
|
|
status: [3, 4, 7, 10],
|
|
|
|
status: [3, 4, 7, 10, 12, 13, 14],
|
|
|
|
},
|
|
|
|
},
|
|
|
|
],
|
|
|
|
],
|
|
|
|
currentStep: 1,
|
|
|
|
currentStep: 1,
|
|
|
@ -290,7 +340,17 @@
|
|
|
|
{
|
|
|
|
{
|
|
|
|
validator: (rule, value, cb) => {
|
|
|
|
validator: (rule, value, cb) => {
|
|
|
|
if (state.form.reject && !value) {
|
|
|
|
if (state.form.reject && !value) {
|
|
|
|
cb('拒绝退货/退款时处理备注不能为空');
|
|
|
|
let msg = '不能为空';
|
|
|
|
|
|
|
|
if (state.detail.refundType === 1) {
|
|
|
|
|
|
|
|
msg = '拒绝退款时处理备注' + msg;
|
|
|
|
|
|
|
|
} else {
|
|
|
|
|
|
|
|
if (state.detail.refundStatus === 4) {
|
|
|
|
|
|
|
|
msg = '拒绝收货时收货备注' + msg;
|
|
|
|
|
|
|
|
} else {
|
|
|
|
|
|
|
|
msg = '拒绝退货时处理备注' + msg;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
cb(msg);
|
|
|
|
} else {
|
|
|
|
} else {
|
|
|
|
cb();
|
|
|
|
cb();
|
|
|
|
}
|
|
|
|
}
|
|
|
@ -302,7 +362,10 @@
|
|
|
|
});
|
|
|
|
});
|
|
|
|
const handleLoad = async () => {
|
|
|
|
const handleLoad = async () => {
|
|
|
|
state.loading = true;
|
|
|
|
state.loading = true;
|
|
|
|
let res = await store.dispatch('service/detail', route.params.id);
|
|
|
|
let res = await store.dispatch(
|
|
|
|
|
|
|
|
state.detail.refundType === 1 ? 'service/refundDetail' : 'service/returnDetail',
|
|
|
|
|
|
|
|
route.params.id
|
|
|
|
|
|
|
|
);
|
|
|
|
Object.assign(
|
|
|
|
Object.assign(
|
|
|
|
state.detail,
|
|
|
|
state.detail,
|
|
|
|
res || {
|
|
|
|
res || {
|
|
|
@ -315,7 +378,7 @@
|
|
|
|
let date = res.refundLogs.find((item) => step.status.includes(item.operationType));
|
|
|
|
let date = res.refundLogs.find((item) => step.status.includes(item.operationType));
|
|
|
|
step.desc = date?.createTime || step.desc;
|
|
|
|
step.desc = date?.createTime || step.desc;
|
|
|
|
if (date) {
|
|
|
|
if (date) {
|
|
|
|
if (index === 4) {
|
|
|
|
if (index >= 3) {
|
|
|
|
step.desc = date?.operationTypeDesc;
|
|
|
|
step.desc = date?.operationTypeDesc;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
state.currentStep = index + 1;
|
|
|
|
state.currentStep = index + 1;
|
|
|
@ -325,8 +388,8 @@
|
|
|
|
};
|
|
|
|
};
|
|
|
|
onActivated(handleLoad);
|
|
|
|
onActivated(handleLoad);
|
|
|
|
|
|
|
|
|
|
|
|
/* 同意退货 */
|
|
|
|
/* 同意退货/退款 */
|
|
|
|
const handleResolve = async () => {
|
|
|
|
const handleResolveRefundOrReturn = async () => {
|
|
|
|
state.loading = true;
|
|
|
|
state.loading = true;
|
|
|
|
state.form.reject = false;
|
|
|
|
state.form.reject = false;
|
|
|
|
try {
|
|
|
|
try {
|
|
|
@ -341,8 +404,8 @@
|
|
|
|
}
|
|
|
|
}
|
|
|
|
state.loading = false;
|
|
|
|
state.loading = false;
|
|
|
|
};
|
|
|
|
};
|
|
|
|
/* 拒绝退货 */
|
|
|
|
/* 拒绝退货/退款 */
|
|
|
|
const handleReject = async () => {
|
|
|
|
const handleRejectRefundOrReturn = async () => {
|
|
|
|
state.loading = true;
|
|
|
|
state.loading = true;
|
|
|
|
state.form.reject = true;
|
|
|
|
state.form.reject = true;
|
|
|
|
try {
|
|
|
|
try {
|
|
|
@ -357,6 +420,32 @@
|
|
|
|
}
|
|
|
|
}
|
|
|
|
state.loading = false;
|
|
|
|
state.loading = false;
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
/* 确认收货 */
|
|
|
|
|
|
|
|
const handleResolveReceive = async () => {
|
|
|
|
|
|
|
|
state.loading = true;
|
|
|
|
|
|
|
|
state.form.reject = false;
|
|
|
|
|
|
|
|
try {
|
|
|
|
|
|
|
|
await unref(refsForm).validate();
|
|
|
|
|
|
|
|
await store.dispatch('service/resolveReceive', state.form);
|
|
|
|
|
|
|
|
handleLoad();
|
|
|
|
|
|
|
|
} catch (e) {
|
|
|
|
|
|
|
|
console.info('取消确认收货', e);
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
state.loading = false;
|
|
|
|
|
|
|
|
};
|
|
|
|
|
|
|
|
/* 拒绝收货 */
|
|
|
|
|
|
|
|
const handleRejectReceive = async () => {
|
|
|
|
|
|
|
|
state.loading = true;
|
|
|
|
|
|
|
|
state.form.reject = true;
|
|
|
|
|
|
|
|
try {
|
|
|
|
|
|
|
|
await unref(refsForm).validate();
|
|
|
|
|
|
|
|
await store.dispatch('service/rejectReceive', state.form);
|
|
|
|
|
|
|
|
handleLoad();
|
|
|
|
|
|
|
|
} catch (e) {
|
|
|
|
|
|
|
|
console.info('取消拒绝收货', e);
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
state.loading = false;
|
|
|
|
|
|
|
|
};
|
|
|
|
</script>
|
|
|
|
</script>
|
|
|
|
|
|
|
|
|
|
|
|
<style lang="less" scoped>
|
|
|
|
<style lang="less" scoped>
|
|
|
|