|
@@ -20,6 +20,7 @@ import {
|
|
|
REPLY_TYPE_OPTIONS,
|
|
|
COMPLAINT_STATUS,
|
|
|
REPLY_TYPE,
|
|
|
+ REPLY_STATUS,
|
|
|
getComplainantTypeLabel,
|
|
|
getComplaintTypeLabel,
|
|
|
getComplainantTypeType,
|
|
@@ -111,6 +112,8 @@ export default {
|
|
|
replyTotal: 0,
|
|
|
currentComplaintId: '',
|
|
|
currentComplaintNo: '',
|
|
|
+ /** @type {number} */
|
|
|
+ currentComplaintReplyStatus: 0,
|
|
|
// 新增回复相关数据
|
|
|
addReplyVisible: false,
|
|
|
replyForm: {
|
|
@@ -490,6 +493,7 @@ export default {
|
|
|
async handleReplyList(row) {
|
|
|
this.currentComplaintId = row.id
|
|
|
this.currentComplaintNo = row.complaintNo
|
|
|
+ this.currentComplaintReplyStatus = row.replyStatus
|
|
|
this.replyListVisible = true
|
|
|
this.replyPage.current = 1
|
|
|
await this.loadReplyList()
|
|
@@ -578,6 +582,20 @@ export default {
|
|
|
this.$message.success('新增回复成功')
|
|
|
this.addReplyVisible = false
|
|
|
|
|
|
+ // 如果当前投诉的回复状态是未回复,则更新为已回复
|
|
|
+ if (this.currentComplaintReplyStatus === REPLY_STATUS.NOT_REPLIED) {
|
|
|
+ try {
|
|
|
+ const updateData = {
|
|
|
+ id: this.currentComplaintId,
|
|
|
+ replyStatus: REPLY_STATUS.REPLIED
|
|
|
+ }
|
|
|
+ await update(updateData)
|
|
|
+ this.currentComplaintReplyStatus = REPLY_STATUS.REPLIED
|
|
|
+ } catch (error) {
|
|
|
+ console.error('更新投诉回复状态失败:', error)
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
// 重新加载回复列表
|
|
|
await this.loadReplyList()
|
|
|
|