From 09390a924954bb653b94f0cb537bbce55081eff2 Mon Sep 17 00:00:00 2001 From: wx-jincw Date: Tue, 24 Mar 2026 21:46:40 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E5=8F=8D=E9=A6=88=E3=80=81=E6=8A=A5?= =?UTF-8?q?=E4=BF=AE=E9=99=84=E4=BB=B6=E6=98=BE=E7=A4=BA=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/pages/supply_chain/complaint/index.vue | 92 ++++++++++----- app/pages/supply_chain/notice/index.vue | 110 +++++++++++------- .../supply_chain/notice_detail/index.vue | 2 +- app/pages/supply_chain/repair/index.vue | 88 +++++++++----- 4 files changed, 189 insertions(+), 103 deletions(-) diff --git a/app/pages/supply_chain/complaint/index.vue b/app/pages/supply_chain/complaint/index.vue index ef9c8e2..a5ddf15 100644 --- a/app/pages/supply_chain/complaint/index.vue +++ b/app/pages/supply_chain/complaint/index.vue @@ -175,19 +175,41 @@ - - + 反馈图片 + + + + + + + + 处理图片 + + + + @@ -365,7 +387,7 @@ export default { csContent: this.form.csContent.trim(), remark: this.form.remark.trim(), phone: this.form.phone.trim(), - files: imageFiles + beforeProcessFiles: imageFiles }; try { @@ -783,24 +805,34 @@ export default { } } - .image-grid { + .image-section { margin-top: 12rpx; - margin-left: 0; - display: flex; - flex-wrap: wrap; - gap: 12rpx; - - .image-item { - width: calc((100% - 24rpx) / 3); - aspect-ratio: 1 / 1; - border-radius: 8rpx; - overflow: hidden; - background-color: #f5f5f5; - - image { - width: 100%; - height: 100%; - display: block; + + .image-title { + display: block; + font-size: 22rpx; + color: #666; + margin-bottom: 10rpx; + } + + .image-grid { + margin-left: 0; + display: flex; + flex-wrap: wrap; + gap: 12rpx; + + .image-item { + width: calc((100% - 24rpx) / 3); + aspect-ratio: 1 / 1; + border-radius: 8rpx; + overflow: hidden; + background-color: #f5f5f5; + + image { + width: 100%; + height: 100%; + display: block; + } } } } diff --git a/app/pages/supply_chain/notice/index.vue b/app/pages/supply_chain/notice/index.vue index 8abf459..e0141ea 100644 --- a/app/pages/supply_chain/notice/index.vue +++ b/app/pages/supply_chain/notice/index.vue @@ -10,17 +10,21 @@ - - 全部 - 内部 - 外部 + + 通知类型 + + + {{ selectedNoticeTypeLabel }} + + + - - @@ -50,7 +54,7 @@ 通知类型: - {{ item.noticeType || '—' }} + {{ dict.getLabel('sys_notice_type', item.noticeType) || item.noticeType || '—' }} 通知范围: @@ -87,9 +91,8 @@ export default { return { query: { noticeTitle: '', + noticeType: '', }, - typeTab: 'all', // all | 1 | 2 - statusTab: '1', // all | 0 | 1 records: [], page: 1, limit: 10, @@ -104,13 +107,29 @@ export default { onPullDownRefresh() { this.refreshList(); }, - methods: { - switchType(type) { - this.typeTab = type; - this.refreshList(); + computed: { + noticeTypeOptions() { + const dictList = this.dict.get('sys_notice_type') || []; + const options = dictList.map(item => ({ + label: item.dictLabel, + value: item.dictValue, + })); + return [{ label: '全部', value: '' }].concat(options); + }, + selectedNoticeTypeIndex() { + const index = this.noticeTypeOptions.findIndex(item => item.value === this.query.noticeType); + return index >= 0 ? index : 0; + }, + selectedNoticeTypeLabel() { + const current = this.noticeTypeOptions[this.selectedNoticeTypeIndex]; + return current ? current.label : '全部'; }, - switchStatus(status) { - this.statusTab = status; + }, + methods: { + onNoticeTypeChange(e) { + const index = Number(e?.detail?.value); + const current = this.noticeTypeOptions[index]; + this.query.noticeType = current ? current.value : ''; this.refreshList(); }, async refreshList() { @@ -133,8 +152,11 @@ export default { }; const noticeTitle = (this.query.noticeTitle || '').trim(); if (noticeTitle) params.noticeTitle = noticeTitle; - if (this.typeTab !== 'all') params.type = this.typeTab; - if (this.statusTab !== 'all') params.status = this.statusTab; + if (this.query.noticeType) { + params.noticeType = this.query.noticeType; + // 兼容后端仍使用 type 字段筛选的场景 + params.type = this.query.noticeType; + } return params; }, async fetchList() { @@ -225,37 +247,39 @@ export default { } } - .tab-row { + .filter-row { display: flex; + align-items: center; + justify-content: space-between; background-color: #fff; border-radius: 12rpx; box-shadow: 0 2rpx 10rpx rgba(0, 0, 0, 0.06); + padding: 0 20rpx; + height: 72rpx; - .tab { - flex: 1; - height: 72rpx; - display: flex; - align-items: center; - justify-content: center; + .filter-label { font-size: 26rpx; color: #666; - position: relative; + } - &.active { + .filter-picker { + display: flex; + align-items: center; + max-width: 420rpx; + + .picker-text { + font-size: 26rpx; color: #409eff; - font-weight: 600; - - &::after { - content: ''; - position: absolute; - bottom: 0; - left: 50%; - transform: translateX(-50%); - width: 60rpx; - height: 4rpx; - background-color: #409eff; - border-radius: 2rpx; - } + max-width: 360rpx; + white-space: nowrap; + overflow: hidden; + text-overflow: ellipsis; + } + + .picker-arrow { + margin-left: 10rpx; + font-size: 18rpx; + color: #999; } } } diff --git a/app/pages/supply_chain/notice_detail/index.vue b/app/pages/supply_chain/notice_detail/index.vue index a774ae5..9b58dbd 100644 --- a/app/pages/supply_chain/notice_detail/index.vue +++ b/app/pages/supply_chain/notice_detail/index.vue @@ -10,7 +10,7 @@ 通知类型: - {{ notice.noticeType }} + {{ dict.getLabel('sys_notice_type', notice.noticeType) || notice.noticeType }} 通知单位: diff --git a/app/pages/supply_chain/repair/index.vue b/app/pages/supply_chain/repair/index.vue index 6aae84a..caa0359 100644 --- a/app/pages/supply_chain/repair/index.vue +++ b/app/pages/supply_chain/repair/index.vue @@ -149,20 +149,40 @@ + + 故障图片 + + + + + + + - - + 处理结果图片 + + + + @@ -850,24 +870,34 @@ export default { } } - .image-grid { + .image-section { margin-top: 12rpx; - margin-left: 0; - display: flex; - flex-wrap: wrap; - gap: 12rpx; - - .image-item { - width: calc((100% - 24rpx) / 3); - aspect-ratio: 1 / 1; - border-radius: 8rpx; - overflow: hidden; - background-color: #f5f5f5; - - image { - width: 100%; - height: 100%; - display: block; + + .image-title { + display: block; + font-size: 22rpx; + color: #666; + margin-bottom: 10rpx; + } + + .image-grid { + margin-left: 0; + display: flex; + flex-wrap: wrap; + gap: 12rpx; + + .image-item { + width: calc((100% - 24rpx) / 3); + aspect-ratio: 1 / 1; + border-radius: 8rpx; + overflow: hidden; + background-color: #f5f5f5; + + image { + width: 100%; + height: 100%; + display: block; + } } } }