|
@@ -72,24 +72,46 @@
|
|
|
</template>
|
|
</template>
|
|
|
</el-table-column>
|
|
</el-table-column>
|
|
|
<el-table-column label="投诉时间" align="center" prop="createTime" />
|
|
<el-table-column label="投诉时间" align="center" prop="createTime" />
|
|
|
- <el-table-column
|
|
|
|
|
- label="店铺是否处理"
|
|
|
|
|
|
|
+ <el-table-column
|
|
|
|
|
+ label="店铺消息是否处理"
|
|
|
align="center"
|
|
align="center"
|
|
|
prop="isHandlePlatform"
|
|
prop="isHandlePlatform"
|
|
|
:render-header="renderHandleHeader"
|
|
:render-header="renderHandleHeader"
|
|
|
>
|
|
>
|
|
|
<template slot-scope="scope">
|
|
<template slot-scope="scope">
|
|
|
<el-tag
|
|
<el-tag
|
|
|
- :type="(scope.row.isHandleStore == 1)? 'success' : 'warning'"
|
|
|
|
|
|
|
+ :type="(scope.row.isHandleStore === 1)? 'success' : 'warning'"
|
|
|
disable-transitions
|
|
disable-transitions
|
|
|
>
|
|
>
|
|
|
- {{ formatHandleStatus(scope.row.isHandle) }}
|
|
|
|
|
|
|
+ {{ formatHandleStatus(scope.row.isHandleStore) }}
|
|
|
|
|
+ </el-tag>
|
|
|
|
|
+ </template>
|
|
|
|
|
+ </el-table-column>
|
|
|
|
|
+ <el-table-column
|
|
|
|
|
+ label="处理状态"
|
|
|
|
|
+ align="center"
|
|
|
|
|
+ prop="isHandlePlatform"
|
|
|
|
|
+ :render-header="renderHandleHeader"
|
|
|
|
|
+ >
|
|
|
|
|
+ <template slot-scope="scope">
|
|
|
|
|
+ <el-tag
|
|
|
|
|
+ :type="(scope.row.isProcessCompleted === 1)? 'success' : 'danger'"
|
|
|
|
|
+ disable-transitions
|
|
|
|
|
+ >
|
|
|
|
|
+ {{ formatHandleProcessCompleted(scope.row.isProcessCompleted) }}
|
|
|
</el-tag>
|
|
</el-tag>
|
|
|
</template>
|
|
</template>
|
|
|
</el-table-column>
|
|
</el-table-column>
|
|
|
<el-table-column label="备注" align="center" prop="remarks" />
|
|
<el-table-column label="备注" align="center" prop="remarks" />
|
|
|
<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
|
|
<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
|
|
|
<template slot-scope="scope">
|
|
<template slot-scope="scope">
|
|
|
|
|
+ <el-button
|
|
|
|
|
+ size="mini"
|
|
|
|
|
+ type="text"
|
|
|
|
|
+ icon="el-icon-check"
|
|
|
|
|
+ @click="handlecompleteComplaint(scope.row)"
|
|
|
|
|
+ v-if="scope.row.isProcessCompleted !== 1"
|
|
|
|
|
+ >完成投诉</el-button>
|
|
|
<el-button
|
|
<el-button
|
|
|
size="mini"
|
|
size="mini"
|
|
|
type="text"
|
|
type="text"
|
|
@@ -113,7 +135,7 @@
|
|
|
<!-- 修改tab-click事件处理器名称 -->
|
|
<!-- 修改tab-click事件处理器名称 -->
|
|
|
<el-tabs v-model="activeTab" type="card" @tab-click="handleClick">
|
|
<el-tabs v-model="activeTab" type="card" @tab-click="handleClick">
|
|
|
<!-- 投诉详情标签页 -->
|
|
<!-- 投诉详情标签页 -->
|
|
|
- <el-tab-pane label="投诉详情" name="complaint">
|
|
|
|
|
|
|
+ <el-tab-pane :label="complaintType === 1?'咨询详情':'投诉详情'" name="complaint">
|
|
|
<el-form ref="form" :model="form" :rules="rules" label-width="80px">
|
|
<el-form ref="form" :model="form" :rules="rules" label-width="80px">
|
|
|
<el-form-item label="投诉内容" prop="name">
|
|
<el-form-item label="投诉内容" prop="name">
|
|
|
<el-input v-model="form.name" :disabled="true" />
|
|
<el-input v-model="form.name" :disabled="true" />
|
|
@@ -158,7 +180,7 @@
|
|
|
<span>添加回复</span>
|
|
<span>添加回复</span>
|
|
|
</div>
|
|
</div>
|
|
|
<el-form :model="replyForm" ref="replyForm" label-width="80px">
|
|
<el-form :model="replyForm" ref="replyForm" label-width="80px">
|
|
|
- <el-form-item label="回复内容" prop="content" :rules="[{ required: true, message: '请输入回复内容', trigger: 'blur' }]">
|
|
|
|
|
|
|
+ <el-form-item label="回复内容" prop="content" :rules="[{ required: true, message: '请输入回复内容', trigger: 'blur' }]" >
|
|
|
<el-input
|
|
<el-input
|
|
|
type="textarea"
|
|
type="textarea"
|
|
|
v-model="replyForm.content"
|
|
v-model="replyForm.content"
|
|
@@ -166,9 +188,10 @@
|
|
|
:rows="3"
|
|
:rows="3"
|
|
|
maxlength="500"
|
|
maxlength="500"
|
|
|
show-word-limit
|
|
show-word-limit
|
|
|
|
|
+ :disabled="isProcessCompleted === 1"
|
|
|
/>
|
|
/>
|
|
|
</el-form-item>
|
|
</el-form-item>
|
|
|
-
|
|
|
|
|
|
|
+
|
|
|
<!-- 添加图片上传功能 -->
|
|
<!-- 添加图片上传功能 -->
|
|
|
<el-form-item label="上传图片" prop="images">
|
|
<el-form-item label="上传图片" prop="images">
|
|
|
<!-- <div class="image-upload-container">
|
|
<!-- <div class="image-upload-container">
|
|
@@ -189,12 +212,26 @@
|
|
|
</div>
|
|
</div>
|
|
|
</el-upload>
|
|
</el-upload>
|
|
|
</div> -->
|
|
</div> -->
|
|
|
- <ImageUpload v-model="replyForm.images" type="image" :num="4" :width="150" :height="150"/>
|
|
|
|
|
-
|
|
|
|
|
|
|
+ <ImageUpload v-model="replyForm.images" type="image" :num="4" :width="150" :height="150" v-if="isProcessCompleted !== 1"/>
|
|
|
|
|
+ <el-upload
|
|
|
|
|
+ ref="imageUpload"
|
|
|
|
|
+ :action="uploadUrl"
|
|
|
|
|
+ :show-file-list="false"
|
|
|
|
|
+ :file-list="replyImageList"
|
|
|
|
|
+ :on-success="handleSuccess"
|
|
|
|
|
+ :before-upload="beforeUpload"
|
|
|
|
|
+ :limit="4"
|
|
|
|
|
+ list-type="picture-card"
|
|
|
|
|
+ accept="image/*"
|
|
|
|
|
+ :disabled="isProcessCompleted === 1"
|
|
|
|
|
+ v-else
|
|
|
|
|
+ >
|
|
|
|
|
+ <i class="el-icon-plus"></i>
|
|
|
|
|
+ </el-upload>
|
|
|
</el-form-item>
|
|
</el-form-item>
|
|
|
|
|
|
|
|
<el-form-item>
|
|
<el-form-item>
|
|
|
- <el-button type="primary" size="small" @click="submitReply" :loading="replyLoading">
|
|
|
|
|
|
|
+ <el-button type="primary" size="small" @click="submitReply" :loading="replyLoading" :disabled="isProcessCompleted === 1">
|
|
|
<i class="el-icon-s-promotion"></i> 发送回复
|
|
<i class="el-icon-s-promotion"></i> 发送回复
|
|
|
</el-button>
|
|
</el-button>
|
|
|
</el-form-item>
|
|
</el-form-item>
|
|
@@ -206,12 +243,12 @@
|
|
|
<div slot="header">
|
|
<div slot="header">
|
|
|
<span>回复记录 ({{ replyTotal }}条)</span>
|
|
<span>回复记录 ({{ replyTotal }}条)</span>
|
|
|
</div>
|
|
</div>
|
|
|
-
|
|
|
|
|
|
|
+
|
|
|
<div v-loading="replyLoading" class="reply-list">
|
|
<div v-loading="replyLoading" class="reply-list">
|
|
|
<div v-if="replyList.length === 0" class="empty-replies">
|
|
<div v-if="replyList.length === 0" class="empty-replies">
|
|
|
<el-empty description="暂无回复记录" :image-size="100"></el-empty>
|
|
<el-empty description="暂无回复记录" :image-size="100"></el-empty>
|
|
|
</div>
|
|
</div>
|
|
|
-
|
|
|
|
|
|
|
+
|
|
|
<div v-else>
|
|
<div v-else>
|
|
|
<div v-for="reply in replyList" :key="reply.id" class="reply-item">
|
|
<div v-for="reply in replyList" :key="reply.id" class="reply-item">
|
|
|
<div class="reply-header">
|
|
<div class="reply-header">
|
|
@@ -231,13 +268,13 @@
|
|
|
<div class="reply-content">
|
|
<div class="reply-content">
|
|
|
{{ reply.content }}
|
|
{{ reply.content }}
|
|
|
</div>
|
|
</div>
|
|
|
-
|
|
|
|
|
|
|
+
|
|
|
<!-- 显示回复中的图片 -->
|
|
<!-- 显示回复中的图片 -->
|
|
|
<div class="reply-images" v-if="reply.images && reply.images !== ''">
|
|
<div class="reply-images" v-if="reply.images && reply.images !== ''">
|
|
|
<div v-for="(url, index) in imageUrls(reply.images)" :key="index" class="reply-image-container">
|
|
<div v-for="(url, index) in imageUrls(reply.images)" :key="index" class="reply-image-container">
|
|
|
- <el-image
|
|
|
|
|
- :src="url"
|
|
|
|
|
- :preview-src-list="imageUrls(reply.images)"
|
|
|
|
|
|
|
+ <el-image
|
|
|
|
|
+ :src="url"
|
|
|
|
|
+ :preview-src-list="imageUrls(reply.images)"
|
|
|
style="width: 80px; height: 80px;"
|
|
style="width: 80px; height: 80px;"
|
|
|
fit="cover"
|
|
fit="cover"
|
|
|
></el-image>
|
|
></el-image>
|
|
@@ -304,7 +341,17 @@
|
|
|
</template>
|
|
</template>
|
|
|
|
|
|
|
|
<script>
|
|
<script>
|
|
|
-import { listComplaint, getComplaint, delComplaint, addComplaint, updateComplaint, exportComplaint,listMsg,addMsg } from "@/api/store/complaint";
|
|
|
|
|
|
|
+import {
|
|
|
|
|
+ listComplaint,
|
|
|
|
|
+ getComplaint,
|
|
|
|
|
+ delComplaint,
|
|
|
|
|
+ addComplaint,
|
|
|
|
|
+ updateComplaint,
|
|
|
|
|
+ exportComplaint,
|
|
|
|
|
+ listMsg,
|
|
|
|
|
+ addMsg,
|
|
|
|
|
+ completeComplaint
|
|
|
|
|
+} from '@/api/store/complaint'
|
|
|
import ImageUpload from '@/components/ImageUpload/index';
|
|
import ImageUpload from '@/components/ImageUpload/index';
|
|
|
export default {
|
|
export default {
|
|
|
name: "Complaint",
|
|
name: "Complaint",
|
|
@@ -313,6 +360,8 @@ export default {
|
|
|
},
|
|
},
|
|
|
data() {
|
|
data() {
|
|
|
return {
|
|
return {
|
|
|
|
|
+ complaintType:0,
|
|
|
|
|
+ isProcessCompleted:0,
|
|
|
replyImageList: [],
|
|
replyImageList: [],
|
|
|
uploadUrl:process.env.VUE_APP_BASE_API+"/common/uploadOSS",
|
|
uploadUrl:process.env.VUE_APP_BASE_API+"/common/uploadOSS",
|
|
|
complaintId:null,
|
|
complaintId:null,
|
|
@@ -456,7 +505,10 @@ export default {
|
|
|
return String(urls).split(",");
|
|
return String(urls).split(",");
|
|
|
},
|
|
},
|
|
|
formatHandleStatus(status) {
|
|
formatHandleStatus(status) {
|
|
|
- return status == 1 ? '已处理' : '未处理';
|
|
|
|
|
|
|
+ return status === 1 ? '已回复' : '未回复';
|
|
|
|
|
+ },
|
|
|
|
|
+ formatHandleProcessCompleted(processCompleted) {
|
|
|
|
|
+ return processCompleted === 1 ? '已完成' : '处理中';
|
|
|
},
|
|
},
|
|
|
/** 查询用户投诉列表 */
|
|
/** 查询用户投诉列表 */
|
|
|
getList() {
|
|
getList() {
|
|
@@ -534,6 +586,8 @@ export default {
|
|
|
},
|
|
},
|
|
|
/** 修改按钮操作 */
|
|
/** 修改按钮操作 */
|
|
|
handleUpdate(row) {
|
|
handleUpdate(row) {
|
|
|
|
|
+ this.complaintType = row.complaintType;
|
|
|
|
|
+ this.isProcessCompleted = row.isProcessCompleted;
|
|
|
this.reset();
|
|
this.reset();
|
|
|
this.resetReplyData();
|
|
this.resetReplyData();
|
|
|
// const id = row.id || this.ids
|
|
// const id = row.id || this.ids
|
|
@@ -643,7 +697,7 @@ export default {
|
|
|
this.replyImageList = []; // 重置图片列表
|
|
this.replyImageList = []; // 重置图片列表
|
|
|
this.getReplyList()
|
|
this.getReplyList()
|
|
|
});
|
|
});
|
|
|
-
|
|
|
|
|
|
|
+
|
|
|
}, 500);
|
|
}, 500);
|
|
|
}
|
|
}
|
|
|
});
|
|
});
|
|
@@ -655,7 +709,7 @@ export default {
|
|
|
content: reply.content,
|
|
content: reply.content,
|
|
|
images: reply.images || '' // 包含图片数据
|
|
images: reply.images || '' // 包含图片数据
|
|
|
};
|
|
};
|
|
|
- this.editReplyImageList = reply.images ?
|
|
|
|
|
|
|
+ this.editReplyImageList = reply.images ?
|
|
|
reply.images.split(',').map((url, index) => ({
|
|
reply.images.split(',').map((url, index) => ({
|
|
|
uid: index,
|
|
uid: index,
|
|
|
name: `image-${index}`,
|
|
name: `image-${index}`,
|
|
@@ -663,7 +717,7 @@ export default {
|
|
|
})) : [];
|
|
})) : [];
|
|
|
this.editReplyVisible = true;
|
|
this.editReplyVisible = true;
|
|
|
},
|
|
},
|
|
|
-
|
|
|
|
|
|
|
+
|
|
|
// 更新回复
|
|
// 更新回复
|
|
|
updateReply() {
|
|
updateReply() {
|
|
|
this.$refs.editReplyForm.validate(valid => {
|
|
this.$refs.editReplyForm.validate(valid => {
|
|
@@ -671,7 +725,7 @@ export default {
|
|
|
this.replyLoading = true;
|
|
this.replyLoading = true;
|
|
|
// const imageUrls = this.editReplyImageList.map(file => file.url || file.response?.url).filter(url => url);
|
|
// const imageUrls = this.editReplyImageList.map(file => file.url || file.response?.url).filter(url => url);
|
|
|
// this.editReplyForm.images = imageUrls.join(',');
|
|
// this.editReplyForm.images = imageUrls.join(',');
|
|
|
-
|
|
|
|
|
|
|
+
|
|
|
// 模拟API调用
|
|
// 模拟API调用
|
|
|
setTimeout(() => {
|
|
setTimeout(() => {
|
|
|
const index = this.replyList.findIndex(item => item.id === this.editReplyForm.id);
|
|
const index = this.replyList.findIndex(item => item.id === this.editReplyForm.id);
|
|
@@ -720,7 +774,7 @@ export default {
|
|
|
this.msgError(res.msg);
|
|
this.msgError(res.msg);
|
|
|
}
|
|
}
|
|
|
},
|
|
},
|
|
|
-
|
|
|
|
|
|
|
+
|
|
|
beforeUpload(file) {
|
|
beforeUpload(file) {
|
|
|
const isLt1M = file.size / 1024 / 1024 < 1;
|
|
const isLt1M = file.size / 1024 / 1024 < 1;
|
|
|
if (!isLt1M) {
|
|
if (!isLt1M) {
|
|
@@ -728,6 +782,22 @@ export default {
|
|
|
}
|
|
}
|
|
|
return isLt1M;
|
|
return isLt1M;
|
|
|
},
|
|
},
|
|
|
|
|
+ handlecompleteComplaint(row) {
|
|
|
|
|
+ this.$confirm('是否完成当前投诉处理, 是否继续?', '提示', {
|
|
|
|
|
+ confirmButtonText: '确定',
|
|
|
|
|
+ cancelButtonText: '取消',
|
|
|
|
|
+ type: 'warning'
|
|
|
|
|
+ }).then(() => {
|
|
|
|
|
+ completeComplaint({id:row.id}).then(response => {
|
|
|
|
|
+ this.getList();
|
|
|
|
|
+ })
|
|
|
|
|
+ }).catch(() => {
|
|
|
|
|
+ this.$message({
|
|
|
|
|
+ type: 'info',
|
|
|
|
|
+ message: '已取消删除'
|
|
|
|
|
+ });
|
|
|
|
|
+ });
|
|
|
|
|
+ }
|
|
|
}
|
|
}
|
|
|
};
|
|
};
|
|
|
</script>
|
|
</script>
|
|
@@ -811,4 +881,4 @@ export default {
|
|
|
margin-right: 10px;
|
|
margin-right: 10px;
|
|
|
margin-bottom: 10px;
|
|
margin-bottom: 10px;
|
|
|
}
|
|
}
|
|
|
-</style>
|
|
|
|
|
|
|
+</style>
|