From ce6759d27a79936669a4935c8b9a73baa220cb01 Mon Sep 17 00:00:00 2001 From: wx-jincw Date: Tue, 17 Mar 2026 22:42:33 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E6=8A=A5=E4=BF=AE=20=E5=BB=BA=E8=AE=AE?= =?UTF-8?q?=E6=8F=90=E4=BA=A4=E3=80=81=E5=88=97=E8=A1=A8=E6=9F=A5=E8=AF=A2?= =?UTF-8?q?=EF=BC=9B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/api/property.js | 28 +- app/pages/index/index.vue | 4 +- app/pages/supply_chain/complaint/index.vue | 82 +++++- app/pages/supply_chain/repair/index.vue | 284 ++++++++++++++++++--- app/static/images/wg/wg_jy.png | Bin 0 -> 1093 bytes app/static/images/wg/wg_wx.png | Bin 0 -> 2309 bytes app/utils/request.js | 67 ++++- 7 files changed, 419 insertions(+), 46 deletions(-) create mode 100644 app/static/images/wg/wg_jy.png create mode 100644 app/static/images/wg/wg_wx.png diff --git a/app/api/property.js b/app/api/property.js index 5c85f57..d4d7dde 100644 --- a/app/api/property.js +++ b/app/api/property.js @@ -19,6 +19,32 @@ export function listComplaintSuggestion(params) { } // 报修记录 - 列表 +export function listMaintenanceOrder(params) { + return request.get( + 'autogencode/pmmaintenanceorder/list', + params, + { useAdminUrl: true } + ); +} + +// 报修记录 - 新增(用于业主发起报修,后端可据此生成工单) +export function createMaintenanceOrder(data) { + return request.post( + 'autogencode/pmmaintenanceorder/save', + data, + { useAdminUrl: true } + ); +} + +// 报修记录 - 详情 +export function listMaintenanceOrderDetail(id) { + return request.get( + 'autogencode/pmmaintenanceorder/info/' + id, + { useAdminUrl: true } + ); +} + +// 报修派单记录 - 列表 export function listMaintenanceDispatch(params) { return request.get( 'autogencode/pmmaintenancedispatch/list', @@ -27,7 +53,7 @@ export function listMaintenanceDispatch(params) { ); } -// 报修记录 - 新增(用于业主发起报修,后端可据此生成工单) +// 报修派单记录 - 新增 export function createMaintenanceDispatch(data) { return request.post( 'autogencode/pmmaintenancedispatch/save', diff --git a/app/pages/index/index.vue b/app/pages/index/index.vue index 3200668..28da406 100644 --- a/app/pages/index/index.vue +++ b/app/pages/index/index.vue @@ -95,13 +95,13 @@ - + 投诉与建议 - + 报修服务 diff --git a/app/pages/supply_chain/complaint/index.vue b/app/pages/supply_chain/complaint/index.vue index 4053360..ce470e6 100644 --- a/app/pages/supply_chain/complaint/index.vue +++ b/app/pages/supply_chain/complaint/index.vue @@ -35,21 +35,35 @@ 投诉 建议 + + 问题类型 + + + {{ selectedType || '请选择问题类型' }} + + + + 联系方式 - {{ item.csType || '—' }} + {{ item.submitChannel === '0' ? '投诉' : '建议' }} this.typeIndex) { + return types[this.typeIndex].dictLabel; + } + return ''; + } + }, onShow() { if (this.activeTab === 'list') { this.refreshList(); @@ -205,6 +231,14 @@ export default { this.refreshList(); } }, + handleTypeChange(e) { + const index = e.detail.value; + this.typeIndex = index; + const types = this.dict.get('cs_type'); + if (types && types.length > index) { + this.form.csType = types[index].dictValue; + } + }, async submitComplaint() { if (!this.form.csContent.trim()) { uni.showToast({ @@ -216,10 +250,10 @@ export default { const payload = { csType: this.form.csType, + submitChannel: this.form.submitChannel, csContent: this.form.csContent.trim(), remark: this.form.remark.trim(), phone: this.form.phone.trim(), - submitChannel: 'APP' }; try { @@ -264,10 +298,11 @@ export default { try { const params = { page: this.page, - limit: this.limit + limit: this.limit, }; const res = await listComplaintSuggestion(params); - const list = (res && (res.list || res.data || res.rows)) || []; + const data = res?.data; + const list = data?.list || []; if (this.page === 1) { this.records = list; } else { @@ -286,15 +321,18 @@ export default { } }, statusText(status) { - if (!status) return '待处理'; - if (status === '1' || status === '已处理') return '已处理'; - if (status === '0' || status === '待处理') return '待处理'; + if (!status || status === '0') return '待处理'; + if (status === '1') return '未处理'; + if (status === '2') return '处理中'; + if (status === '3') return '已处理'; return status; }, statusClass(status) { const text = this.statusText(status); if (text === '已处理') return 'status-done'; if (text === '待处理') return 'status-pending'; + if (text === '未处理') return 'status-pending'; + if (text === '处理中') return 'status-processing'; return ''; } } @@ -439,6 +477,19 @@ export default { } } } + + .picker { + width: 100%; + height: 72rpx; + border-radius: 10rpx; + border: 1rpx solid #e5e5e5; + padding: 0 20rpx; + display: flex; + align-items: center; + font-size: 24rpx; + color: #333; + box-sizing: border-box; + } } .remark-item { @@ -506,6 +557,11 @@ export default { background-color: #F6FFED; color: #52C41A; } + + .status-processing { + background-color: #FFF7E6; + color: #FA8C16; + } } .time { diff --git a/app/pages/supply_chain/repair/index.vue b/app/pages/supply_chain/repair/index.vue index f3db7c2..d864d99 100644 --- a/app/pages/supply_chain/repair/index.vue +++ b/app/pages/supply_chain/repair/index.vue @@ -41,6 +41,24 @@ + + 故障类型 + + + + {{ selectedFaultType }} + + 请选择故障类型 + + + + + 联系方式 - 期望上门时间(选填) - + 上传图片(选填) + + + + + × + + + + 添加图片 + + + 最多上传9张图片 + @@ -113,6 +141,12 @@ + + 故障类型 + + {{ getFaultTypeLabel(item.faultType) }} + + 报修内容 @@ -185,12 +219,10 @@ @click="chooseHouse(item)" > - {{ item.houseName || item.houseNo || '房屋' }} + {{ (item.unitNo ? item.unitNo + '单元' : '') + (item.floorNo ? ' ' + item.floorNo + '层' : '') + (item.houseNo ? ' ' + item.houseNo + '室' : '') || item.houseName || '房屋' }} {{ item.buildingId ? '楼栋 ' + item.buildingId : '' }} - {{ item.unitNo ? ' 单元 ' + item.unitNo : '' }} - {{ item.floorNo ? ' ' + item.floorNo + '层' : '' }}