Browse Source

‘完善前端页面逻辑,’

master
Lj 1 week ago
parent
commit
081f1f7bfb
6 changed files with 60 additions and 38 deletions
  1. +1
    -1
      config.js
  2. +18
    -14
      pages/manager/inspect-result.vue
  3. +9
    -10
      pages/manager/order-detail.vue
  4. +20
    -7
      pages/manager/order.vue
  5. +4
    -4
      pages/subcomponent/edit_profile.vue
  6. +8
    -2
      pages/subcomponent/inspection-detail.vue

+ 1
- 1
config.js View File

@ -1,5 +1,5 @@
// config.js
const type = 'prod'
const type = 'dev'
const config = {
local: {


+ 18
- 14
pages/manager/inspect-result.vue View File

@ -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)


+ 9
- 10
pages/manager/order-detail.vue View File

@ -102,7 +102,7 @@
<view class="custom-detail-content">
<view class="custom-detail-row">
<text class="custom-detail-label" >订单编号</text>
<text class="custom-detail-value">{{ order.ordeNo }}</text>
<text class="custom-detail-value">{{ order.ordeNo || order.id }}</text>
</view>
<view class="custom-detail-row">
<text class="custom-detail-label">合格结算</text>
@ -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


+ 20
- 7
pages/manager/order.vue View File

@ -62,6 +62,7 @@
<view class="order-card-header">
<text class="order-id">{{ order.orderNo }}</text>
<view v-if="order.statusText === '不包邮'" class="order-status-tag red">{{ order.statusText }}</view>
<view v-if="!order.readFlag" class="unread-dot"></view>
</view>
<view class="order-info-wrapper">
<view class="order-info">
@ -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 {


+ 4
- 4
pages/subcomponent/edit_profile.vue View File

@ -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 }"
/>
<uni-icons :type="showPhone ? 'eye' : 'eye-slash'" size="20" color="#999" @tap="showPhone = !showPhone"></uni-icons>
</view>
@ -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,


+ 8
- 2
pages/subcomponent/inspection-detail.vue View File

@ -34,7 +34,7 @@
<view class="problem-divider"></view>
<view class="problem-label">质量问题实拍</view>
<view class="problem-images">
<view v-for="(img, i) in imagesArr" :key="i" class="img-lock-wrap">
<view v-for="(img, i) in imagesArr" :key="i" class="img-lock-wrap" @tap="isSelf && previewImage(img, i)">
<image :src="img" class="problem-img" mode="aspectFill" />
<view v-if="!isSelf" class="img-lock-mask">
<image src="/static/lock.png" class="lock-icon" />
@ -80,7 +80,7 @@
<view class="problem-title">质检图片</view>
<view class="problem-divider"></view>
<view class="problem-images">
<view v-for="(img, i) in imagesArr" :key="i" class="img-lock-wrap">
<view v-for="(img, i) in imagesArr" :key="i" class="img-lock-wrap" @tap="isSelf && previewImage(img, i)">
<image :src="img" class="problem-img" mode="aspectFill" />
<view v-if="!isSelf" class="img-lock-mask">
<image src="/static/lock.png" class="lock-icon" />
@ -156,6 +156,12 @@ export default {
methods: {
navigateBack() {
uni.navigateBack()
},
previewImage(img, i) {
uni.previewImage({
current: img,
urls: this.imagesArr
})
}
}
}


Loading…
Cancel
Save