From 081f1f7bfb5c7313069283390d540df9d019d6ae Mon Sep 17 00:00:00 2001 From: Lj <1095098147@qq.com> Date: Wed, 16 Jul 2025 19:03:50 +0800 Subject: [PATCH] =?UTF-8?q?=E2=80=98=E5=AE=8C=E5=96=84=E5=89=8D=E7=AB=AF?= =?UTF-8?q?=E9=A1=B5=E9=9D=A2=E9=80=BB=E8=BE=91=EF=BC=8C=E2=80=99?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- config.js | 2 +- pages/manager/inspect-result.vue | 32 ++++++++++++++++++-------------- pages/manager/order-detail.vue | 19 +++++++++---------- pages/manager/order.vue | 27 ++++++++++++++++++++------- pages/subcomponent/edit_profile.vue | 8 ++++---- pages/subcomponent/inspection-detail.vue | 10 ++++++++-- 6 files changed, 60 insertions(+), 38 deletions(-) diff --git a/config.js b/config.js index d166eb8..3d994aa 100644 --- a/config.js +++ b/config.js @@ -1,5 +1,5 @@ // config.js -const type = 'prod' +const type = 'dev' const config = { local: { diff --git a/pages/manager/inspect-result.vue b/pages/manager/inspect-result.vue index ec83de7..5e53193 100644 --- a/pages/manager/inspect-result.vue +++ b/pages/manager/inspect-result.vue @@ -222,8 +222,10 @@ export default { this.qualifiedList.push({ shopId: item.shopId, count: item.qualifiedNum, - total: item.price + total: item.price, + classId: item.categoryId }) + console.log('qualifiedList', this.qualifiedList) } }) // 不合格商品(只展示质量问题) @@ -361,24 +363,26 @@ export default { } else { this.reasonImages = [] } - // 不在这里设置reasonChecked - this.selectReasonForUnqualified(item, 1) + // 使用从上一个页面传过来的categoryId + this.selectReasonForUnqualified(item, 0, item.classId) this.lockScroll() this.$refs.reasonPopup.open() }, - selectReasonForUnqualified(item, type) { + selectReasonForUnqualified(item, type, classId = '') { + console.log(item) // 根据类型确定classId - let classId = '' - if (type === 1) { - // 质量问题 - classId = 'quality_issue' - } else if (type === 2) { - // 不可回收 - classId = 'unrecyclable' - } else { - // 普通商品,使用shopClass - classId = item.shopClass || '' + if (!classId) { + if (type === 1) { + // 质量问题 + classId = '' + } else if (type === 2) { + // 不可回收 + classId = '' + } else { + // classId + classId = item.classId || '' + } } console.log('[selectReasonForUnqualified] classId:', classId, 'type:', type) diff --git a/pages/manager/order-detail.vue b/pages/manager/order-detail.vue index 56ac475..8abf030 100644 --- a/pages/manager/order-detail.vue +++ b/pages/manager/order-detail.vue @@ -102,7 +102,7 @@ 订单编号 - {{ order.ordeNo }} + {{ order.ordeNo || order.id }} 合格结算 @@ -230,19 +230,18 @@ export default { this.currentStep = this.getCurrentStep(data.status, data.state) // 基础信息 this.baseInfo = [ - { label: '订单编号', value: data.ordeNo, copy: true }, + { label: '订单编号', value: data.ordeNo || data.id, copy: true }, ...(data.wliuNo ? [{ label: '快递单号', value: data.wliuNo, copy: true }] : []), { label: '用户名', value: data.name, arrow: true }, - { label: '取件地址', value: data.address + (data.addressDetail || '') }, - { label: '预约时间', value: data.goTime } + { label: '取件地址', value: (data.address || '') + (data.addressDetail || '') }, + { label: '预约时间', value: data.goTime || data.createTime } ] // 质检信息(如有) this.qcInfo = [ - { label: '质检数量', value: data.qcNum ? data.qcNum + ' 件' : '' }, - { label: '质检合格', value: data.qcOkNum ? data.qcOkNum + ' 件' : '' }, - { label: '质量问题', value: data.qcBadNum ? data.qcBadNum + ' 件' : '' }, - { label: '不可回收', value: data.qcUnNum ? data.qcUnNum + ' 件' : '' }, - { label: '订单重量', value: data.weight ? data.weight + ' kg' : '' } + { label: '质检数量', value: data.num ? data.qualifiedNum + data.noQualifiedNum + data.unrecyclable + ' 件' : '' }, + { label: '质检合格', value: data.qualifiedNum ? data.qualifiedNum + ' 件' : '' }, + { label: '质量问题', value: data.noQualifiedNum ? data.noQualifiedNum + ' 件' : '' }, + { label: '不可回收', value: data.unrecyclable ? data.unrecyclable + ' 件' : '' } ] } }) @@ -329,7 +328,7 @@ export default { goToInspection() { if (!this.order.id) return; uni.navigateTo({ - url: `/pages/subcomponent/inspection-report?orderId=${this.order.orderId}` + url: `/pages/subcomponent/inspection-report?orderId=${this.order.id}` }) }, // 判断是否显示单价格(根据estimatedPrice格式判断) diff --git a/pages/manager/order.vue b/pages/manager/order.vue index eeb1636..a4c67c0 100644 --- a/pages/manager/order.vue +++ b/pages/manager/order.vue @@ -62,6 +62,7 @@ {{ order.orderNo }} {{ order.statusText }} + @@ -307,7 +308,8 @@ statusClass: statusInfo.class, statusLabel: statusInfo.label, actions: this.getOrderActions(order.status, order.state), - status: this.getOrderStatus(order.status, order.state) + status: this.getOrderStatus(order.status, order.state), + readFlag: order.readFlag } }) @@ -420,13 +422,13 @@ }, scanCode() { uni.scanCode({ - scanType: ['qrCode'], + scanType: ['qrCode', 'barCode'], // 支持二维码和一维码 success: (res) => { - console.log('扫码结果:', res); + console.log('扫描结果:', res.result); + console.log('扫描类型:', res.scanType); // 这里可以根据扫码结果进行相应处理 // 比如跳转到订单详情页 if (res.result) { - this.$api('getOrderIdBywliuNo', { wliuNo : res.result }).then(e => { @@ -436,12 +438,10 @@ }) } }) - - } }, fail: (err) => { - console.error('扫码失败:', err); + console.error('扫描失败:', err); uni.showToast({ title: '扫码失败', icon: 'none' @@ -654,6 +654,7 @@ justify-content: space-between; align-items: flex-start; margin-bottom: 12px; + position: relative; .order-id { font-size: 16px; @@ -698,6 +699,18 @@ /* 新增已取消 */ } + + .unread-dot { + position: absolute; + top: -4px; + left: -4px; + width: 12px; + height: 12px; + background: #ff4d4f; + border-radius: 50%; + border: 2px solid #fff; + box-shadow: 0 2px 4px rgba(255, 77, 79, 0.3); + } } .order-info-wrapper { diff --git a/pages/subcomponent/edit_profile.vue b/pages/subcomponent/edit_profile.vue index d3f47af..a87f113 100644 --- a/pages/subcomponent/edit_profile.vue +++ b/pages/subcomponent/edit_profile.vue @@ -29,7 +29,7 @@ :value="showPhone ? userInfo.phone : maskedPhone" :readonly="!showPhone" placeholder="请输入手机号" - @input="e => { if (showPhone) userInfo.phone = e.detail.value }" + @input="e => { userInfo.phone = e.detail.value }" /> @@ -90,10 +90,10 @@ export default { navBarHeight: 44, // px navBarHeightRpx: 88, // rpx userInfo: { - nickname: '吴彦谋', - phone: '15888977617', + nickname: '', + phone: '', avatar: '', - newAvatar: '/static/logo.png' + newAvatar: '' }, uploadStatus: { show: false, diff --git a/pages/subcomponent/inspection-detail.vue b/pages/subcomponent/inspection-detail.vue index c7b33bd..639f42a 100644 --- a/pages/subcomponent/inspection-detail.vue +++ b/pages/subcomponent/inspection-detail.vue @@ -34,7 +34,7 @@ 质量问题实拍 - + @@ -80,7 +80,7 @@ 质检图片 - + @@ -156,6 +156,12 @@ export default { methods: { navigateBack() { uni.navigateBack() + }, + previewImage(img, i) { + uni.previewImage({ + current: img, + urls: this.imagesArr + }) } } }