|
@@ -122,7 +122,9 @@ export default {
|
|
|
complaintId: '',
|
|
|
replyType: REPLY_TYPE.SYSTEM,
|
|
|
replyContent: '',
|
|
|
- replyAttachUrl: ''
|
|
|
+ replyAttachUrl: '',
|
|
|
+ replierId: '',
|
|
|
+ replierName: ''
|
|
|
},
|
|
|
replyRules: {
|
|
|
replyType: [{ required: true, message: '请选择回复类型', trigger: 'change' }],
|
|
@@ -229,7 +231,7 @@ export default {
|
|
|
}
|
|
|
},
|
|
|
computed: {
|
|
|
- ...mapGetters(['permission']),
|
|
|
+ ...mapGetters(['permission', 'userInfo']),
|
|
|
permissionList() {
|
|
|
return {
|
|
|
// addBtn: this.vaildData(this.permission.complaint_add, false),
|
|
@@ -507,7 +509,7 @@ export default {
|
|
|
*/
|
|
|
async loadReplyList() {
|
|
|
if (!this.currentComplaintId) return
|
|
|
-
|
|
|
+
|
|
|
this.replyListLoading = true
|
|
|
try {
|
|
|
const params = {
|
|
@@ -515,10 +517,10 @@ export default {
|
|
|
size: this.replyPage.size,
|
|
|
complaintId: this.currentComplaintId
|
|
|
}
|
|
|
-
|
|
|
+
|
|
|
const response = await getReplyList(params)
|
|
|
const { records, total } = response.data.data
|
|
|
-
|
|
|
+
|
|
|
this.replyList = records || []
|
|
|
this.replyTotal = total || 0
|
|
|
} catch (error) {
|
|
@@ -557,7 +559,9 @@ export default {
|
|
|
complaintNo: this.currentComplaintNo,
|
|
|
replyType: REPLY_TYPE.SYSTEM,
|
|
|
replyContent: '',
|
|
|
- replyAttachUrl: ''
|
|
|
+ replyAttachUrl: '',
|
|
|
+ replierId: this.userInfo.user_id || '',
|
|
|
+ replierName: this.userInfo.user_name || '',
|
|
|
}
|
|
|
this.addReplyVisible = true
|
|
|
this.$nextTick(() => {
|
|
@@ -572,19 +576,19 @@ export default {
|
|
|
try {
|
|
|
const valid = await this.$refs.replyForm.validate()
|
|
|
if (!valid) return
|
|
|
-
|
|
|
+
|
|
|
this.addReplyLoading = true
|
|
|
-
|
|
|
+
|
|
|
const formData = {
|
|
|
...this.replyForm
|
|
|
}
|
|
|
-
|
|
|
+
|
|
|
const response = await addReply(formData)
|
|
|
-
|
|
|
+
|
|
|
if (response.data.success) {
|
|
|
this.$message.success('新增回复成功')
|
|
|
this.addReplyVisible = false
|
|
|
-
|
|
|
+
|
|
|
// 如果当前投诉的回复状态是未回复,则更新为已回复
|
|
|
if (this.currentComplaintReplyStatus === REPLY_STATUS.NOT_REPLIED) {
|
|
|
try {
|
|
@@ -598,10 +602,10 @@ export default {
|
|
|
console.error('更新投诉回复状态失败:', error)
|
|
|
}
|
|
|
}
|
|
|
-
|
|
|
+
|
|
|
// 重新加载回复列表
|
|
|
await this.loadReplyList()
|
|
|
-
|
|
|
+
|
|
|
// 重新加载投诉列表以更新回复状态
|
|
|
this.onLoad(this.page)
|
|
|
} else {
|