diff --git a/src/api/oa/complaintDetailApi.js b/src/api/oa/complaintDetailApi.js new file mode 100644 index 0000000..1adc590 --- /dev/null +++ b/src/api/oa/complaintDetailApi.js @@ -0,0 +1,97 @@ +import request from '@/utils/request' +import { getCommunityId } from '@/api/community/communityApi' + +// 获取投诉详情 +export function getComplaintDetail(params) { + return new Promise((resolve, reject) => { + request({ + url: '/complaint.listComplaints', + method: 'get', + params: { + ...params, + communityId: getCommunityId() + } + }).then(response => { + const res = response.data + resolve(res) + }).catch(error => { + reject(error) + }) + }) +} + +// 获取工单流转记录 +export function listComplaintEvent(params) { + return new Promise((resolve, reject) => { + request({ + url: '/complaint.listComplaintEvent', + method: 'get', + params: { + ...params, + communityId: getCommunityId() + } + }).then(response => { + const res = response.data + resolve(res) + }).catch(error => { + reject(error) + }) + }) +} + +// 获取工单评价列表 +export function listComplaintAppraise(params) { + return new Promise((resolve, reject) => { + request({ + url: '/complaintAppraise.listComplaintAppraise', + method: 'get', + params: { + ...params, + communityId: getCommunityId() + } + }).then(response => { + const res = response.data + resolve(res) + }).catch(error => { + reject(error) + }) + }) +} + +// 回复工单评价 +export function replyComplaintAppraise(data) { + return new Promise((resolve, reject) => { + request({ + url: '/complaintAppraise.replyComplaintAppraise', + method: 'post', + data: { + ...data, + communityId: getCommunityId() + } + }).then(response => { + const res = response.data + resolve(res) + }).catch(error => { + reject(error) + }) + }) +} + +// 获取工单类型列表 +export function listComplaintType(params) { + return new Promise((resolve, reject) => { + request({ + url: '/complaintType.listComplaintType', + method: 'get', + params: { + ...params, + communityId: getCommunityId() + } + }).then(response => { + const res = response.data + resolve(res) + }).catch(error => { + reject(error) + }) + }) +} \ No newline at end of file diff --git a/src/api/oa/uodoComplaintsApi.js b/src/api/oa/uodoComplaintsApi.js new file mode 100644 index 0000000..d86950d --- /dev/null +++ b/src/api/oa/uodoComplaintsApi.js @@ -0,0 +1,56 @@ +import request from '@/utils/request' +import { getCommunityId } from '@/api/community/communityApi' + +// 获取待办投诉单列表 +export function listAuditComplaints(params) { + return new Promise((resolve, reject) => { + request({ + url: '/auditUser.listAuditComplaints', + method: 'get', + params: { + ...params, + communityId: getCommunityId() + } + }).then(response => { + const res = response.data + resolve(res) + }).catch(error => { + reject(error) + }) + }) +} + +// 办理投诉单 +export function auditComplaint(data) { + return new Promise((resolve, reject) => { + request({ + url: '/complaint.auditComplaint', + method: 'post', + data: { + ...data, + communityId: getCommunityId() + } + }).then(response => { + const res = response.data + resolve(res) + }).catch(error => { + reject(error) + }) + }) +} + +// 获取投诉单详情 +export function getComplaintDetail(params) { + return new Promise((resolve, reject) => { + request({ + url: '/complaint.getComplaint', + method: 'get', + params + }).then(response => { + const res = response.data + resolve(res) + }).catch(error => { + reject(error) + }) + }) +} \ No newline at end of file diff --git a/src/components/oa/ComplaintDetailAppraise.vue b/src/components/oa/ComplaintDetailAppraise.vue new file mode 100644 index 0000000..ec8b0c3 --- /dev/null +++ b/src/components/oa/ComplaintDetailAppraise.vue @@ -0,0 +1,127 @@ + + + + + + + + + {{ scope.row.state === 'W' ? $t('complaintDetailAppraise.waitReply') : $t('complaintDetailAppraise.replied') }} + + + + + + + + + {{ $t('complaintDetailAppraise.reply') }} + + + + + + + + + + + + \ No newline at end of file diff --git a/src/components/oa/ComplaintDetailEvent.vue b/src/components/oa/ComplaintDetailEvent.vue new file mode 100644 index 0000000..0f05851 --- /dev/null +++ b/src/components/oa/ComplaintDetailEvent.vue @@ -0,0 +1,64 @@ + + + + + + {{ $t('complaintDetailEvent.submit') }} + {{ $t('complaintDetailEvent.process') }} + {{ $t('complaintDetailEvent.evaluate') }} + {{ $t('complaintDetailEvent.reply') }} + + + + + + + + + + + + \ No newline at end of file diff --git a/src/components/oa/ComplaintDetailType.vue b/src/components/oa/ComplaintDetailType.vue new file mode 100644 index 0000000..a6a2979 --- /dev/null +++ b/src/components/oa/ComplaintDetailType.vue @@ -0,0 +1,96 @@ + + + + + + + {{ scope.row.notifyWay === 'SMS' ? $t('complaintDetailType.sms') : $t('complaintDetailType.wechat') }} + + + + + {{ scope.row.appraiseReply === 'Y' ? $t('complaintDetailType.autoReply') : $t('complaintDetailType.manualReply') }} + + + + + + {{ item.staffName }} + + + + + + + + + + + \ No newline at end of file diff --git a/src/components/oa/ReplyComplaintAppraise.vue b/src/components/oa/ReplyComplaintAppraise.vue new file mode 100644 index 0000000..32dbc25 --- /dev/null +++ b/src/components/oa/ReplyComplaintAppraise.vue @@ -0,0 +1,82 @@ + + + + + + + + + + {{ $t('common.cancel') }} + + {{ $t('common.submit') }} + + + + + + \ No newline at end of file diff --git a/src/components/oa/doingComplaint.vue b/src/components/oa/doingComplaint.vue new file mode 100644 index 0000000..6293891 --- /dev/null +++ b/src/components/oa/doingComplaint.vue @@ -0,0 +1,83 @@ + + + + + + + + + + {{ $t('doingComplaint.cancel') }} + {{ $t('doingComplaint.submit') }} + + + + + + + \ No newline at end of file diff --git a/src/i18n/oaI18n.js b/src/i18n/oaI18n.js index 00a5c57..a75dfb9 100644 --- a/src/i18n/oaI18n.js +++ b/src/i18n/oaI18n.js @@ -50,6 +50,8 @@ import { messages as newOaWorkflowMessages } from '../views/oa/newOaWorkflowLang import { messages as newOaWorkflowDetailMessages } from '../views/oa/newOaWorkflowDetailLang' import { messages as newOaWorkflowFormEditMessages } from '../views/oa/newOaWorkflowFormEditLang' import { messages as simplifyNotepadManageMessages } from '../views/oa/simplifyNotepadManageLang' +import { messages as uodoComplaintsMessages } from '../views/oa/uodoComplaintsLang' +import { messages as complaintDetailMessages } from '../views/oa/complaintDetailLang' export const messages ={ @@ -105,6 +107,8 @@ export const messages ={ ...newOaWorkflowDetailMessages.en, ...newOaWorkflowFormEditMessages.en, ...simplifyNotepadManageMessages.en, + ...uodoComplaintsMessages.en, + ...complaintDetailMessages.en, }, zh:{ ...activitiesTypeManageMessages.zh, @@ -158,5 +162,7 @@ export const messages ={ ...newOaWorkflowDetailMessages.zh, ...newOaWorkflowFormEditMessages.zh, ...simplifyNotepadManageMessages.zh, + ...uodoComplaintsMessages.zh, + ...complaintDetailMessages.zh, } } \ No newline at end of file diff --git a/src/router/oaRouter.js b/src/router/oaRouter.js index 3467a90..b9837c2 100644 --- a/src/router/oaRouter.js +++ b/src/router/oaRouter.js @@ -239,4 +239,14 @@ export default [ name: '/pages/property/simplifyNotepadManage', component: () => import('@/views/oa/simplifyNotepadManageList.vue') }, + { + path: '/pages/complaint/uodoComplaints', + name: '/pages/complaint/uodoComplaints', + component: () => import('@/views/oa/uodoComplaintsList.vue') + }, + { + path: '/pages/complaint/complaintDetail', + name: '/pages/complaint/complaintDetail', + component: () => import('@/views/oa/complaintDetailList.vue') + }, ] \ No newline at end of file diff --git a/src/views/oa/complaintDetailLang.js b/src/views/oa/complaintDetailLang.js new file mode 100644 index 0000000..4710431 --- /dev/null +++ b/src/views/oa/complaintDetailLang.js @@ -0,0 +1,122 @@ +export const messages = { + en: { + complaintDetail: { + title: 'Complaint Details', + workflow: 'Workflow', + evaluation: 'Evaluation', + type: 'Type' + }, + complaintDetailInfo: { + orderNo: 'Order No:', + type: 'Type:', + house: 'House:', + contact: 'Contact:', + phone: 'Phone:', + status: 'Status:', + createTime: 'Create Time:', + content: 'Content:' + }, + complaintDetailEvent: { + type: 'Type', + operator: 'Operator', + remark: 'Remark', + time: 'Time', + submit: 'Submit', + process: 'Process', + evaluate: 'Evaluate', + reply: 'Reply' + }, + complaintDetailAppraise: { + userName: 'User Name', + content: 'Content', + score: 'Score', + status: 'Status', + time: 'Time', + replyUser: 'Reply User', + replyContent: 'Reply Content', + operation: 'Operation', + reply: 'Reply', + waitReply: 'Wait Reply', + replied: 'Replied' + }, + replyComplaintAppraise: { + title: 'Reply Evaluation', + content: 'Content', + placeholder: 'Required, please enter reply content', + required: 'Reply content is required', + maxLength: 'Reply content exceeds 500 characters', + success: 'Reply successfully' + }, + complaintDetailType: { + typeName: 'Type Name', + notifyWay: 'Notify Way', + appraiseReply: 'Appraise Reply', + handler: 'Handler', + createTime: 'Create Time', + sms: 'SMS', + wechat: 'WeChat', + autoReply: 'Auto Reply', + manualReply: 'Manual Reply' + } + }, + zh: { + complaintDetail: { + title: '投诉详情', + workflow: '工单流转', + evaluation: '工单评价', + type: '工单类型' + }, + complaintDetailInfo: { + orderNo: '订单编号:', + type: '类型:', + house: '房屋:', + contact: '联系人:', + phone: '联系电话:', + status: '状态:', + createTime: '创建时间:', + content: '投诉内容:' + }, + complaintDetailEvent: { + type: '类型', + operator: '操作人', + remark: '说明', + time: '时间', + submit: '提交', + process: '投诉处理', + evaluate: '评价', + reply: '评价回复' + }, + complaintDetailAppraise: { + userName: '用户名称', + content: '评价内容', + score: '评价得分', + status: '评价状态', + time: '评价时间', + replyUser: '回复人', + replyContent: '回复内容', + operation: '操作', + reply: '回复', + waitReply: '待回复', + replied: '已回复' + }, + replyComplaintAppraise: { + title: '回复评价', + content: '内容', + placeholder: '必填,请填写回复内容', + required: '回复内容不能为空', + maxLength: '回复内容超过500个字', + success: '回复成功' + }, + complaintDetailType: { + typeName: '类型名称', + notifyWay: '通知方式', + appraiseReply: '评价回复', + handler: '处理人', + createTime: '创建时间', + sms: '短信', + wechat: '微信', + autoReply: '自动回复', + manualReply: '人工回复' + } + } +} \ No newline at end of file diff --git a/src/views/oa/complaintDetailList.vue b/src/views/oa/complaintDetailList.vue new file mode 100644 index 0000000..89f7861 --- /dev/null +++ b/src/views/oa/complaintDetailList.vue @@ -0,0 +1,226 @@ + + + + + {{ $t('complaintDetail.title') }} + + + {{ $t('common.back') }} + + + + + + + + + + + + + {{ $t('complaintDetailInfo.orderNo') }} + + {{complaintDetailInfo.complaintId}} + + + + + + {{ $t('complaintDetailInfo.type') }} + + {{complaintDetailInfo.typeName}} + + + + + + {{ $t('complaintDetailInfo.house') }} + + + {{complaintDetailInfo.roomName}} + + + + + + + {{ $t('complaintDetailInfo.contact') }} + + {{complaintDetailInfo.complaintName}} + + + + + + + + {{ $t('complaintDetailInfo.phone') }} + + {{complaintDetailInfo.tel}} + + + + + + {{ $t('complaintDetailInfo.status') }} + + {{complaintDetailInfo.stateName}} + + + + + + {{ $t('complaintDetailInfo.createTime') }} + + {{complaintDetailInfo.createTime}} + + + + + + {{ $t('complaintDetailInfo.content') }} + + {{complaintDetailInfo.context}} + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/src/views/oa/complaintList.vue b/src/views/oa/complaintList.vue index 6bcfab4..43a2b8a 100644 --- a/src/views/oa/complaintList.vue +++ b/src/views/oa/complaintList.vue @@ -204,7 +204,7 @@ export default { this.$refs.deleteComplaint.open(row) }, _openComplaintDetailModel(row) { - this.$refs.complaintDetail.open(row) + this.$router.push(`/pages/complaint/complaintDetail?complaintId=${row.complaintId}`) }, _queryComplaintMethod() { this.page.current = 1 diff --git a/src/views/oa/uodoComplaintsLang.js b/src/views/oa/uodoComplaintsLang.js new file mode 100644 index 0000000..08316fd --- /dev/null +++ b/src/views/oa/uodoComplaintsLang.js @@ -0,0 +1,60 @@ +export const messages = { + en: { + uodoComplaints: { + title: 'Pending Complaints', + back: 'Back', + refresh: 'Refresh', + orderNumber: 'Order Number', + complaintType: 'Complaint Type', + house: 'House', + complainant: 'Complainant', + complaintPhone: 'Complaint Phone', + complaintStatus: 'Complaint Status', + createTime: 'Create Time', + operation: 'Operation', + process: 'Process', + detail: 'Detail', + fetchError: 'Failed to fetch complaints data' + }, + doingComplaint: { + title: 'Process Complaint', + description: 'Description', + required: 'Required, please fill in the reply content', + maxLength: 'Reply content exceeds 500 characters', + placeholder: 'Required, please fill in the reply content', + cancel: 'Cancel', + submit: 'Submit', + success: 'Processed successfully', + error: 'Failed to process complaint' + } + }, + zh: { + uodoComplaints: { + title: '待办投诉单', + back: '返回', + refresh: '刷新', + orderNumber: '订单编号', + complaintType: '投诉类型', + house: '房屋', + complainant: '投诉人', + complaintPhone: '投诉电话', + complaintStatus: '投诉状态', + createTime: '创建时间', + operation: '操作', + process: '办理', + detail: '详情', + fetchError: '获取投诉数据失败' + }, + doingComplaint: { + title: '办理投诉', + description: '说明', + required: '必填,请填写回复内容', + maxLength: '回复内容超过500个字', + placeholder: '必填,请填写回复内容', + cancel: '取消', + submit: '提交', + success: '办理成功', + error: '办理投诉失败' + } + } +} \ No newline at end of file diff --git a/src/views/oa/uodoComplaintsList.vue b/src/views/oa/uodoComplaintsList.vue new file mode 100644 index 0000000..8d049ed --- /dev/null +++ b/src/views/oa/uodoComplaintsList.vue @@ -0,0 +1,133 @@ + + + + + {{ $t('uodoComplaints.title') }} + + {{ $t('uodoComplaints.back') }} + {{ $t('uodoComplaints.refresh') }} + + + + + + + + + + + + + + + {{ $t('uodoComplaints.process') }} + {{ $t('uodoComplaints.detail') }} + + + + + + + + + + + + + + + \ No newline at end of file