Browse Source

'完善质检功能'

master
Lj 3 weeks ago
parent
commit
19db1c54ad
18 changed files with 562 additions and 546 deletions
  1. +5
    -0
      api/model/index.js
  2. +1
    -1
      config.js
  3. +5
    -5
      pages/component/home.vue
  4. +11
    -17
      pages/component/my.vue
  5. +2
    -2
      pages/component/recycle copy.vue
  6. +10
    -10
      pages/component/recycle.vue
  7. +280
    -263
      pages/manager/inspect-result.vue
  8. +166
    -206
      pages/manager/inspect.vue
  9. +6
    -6
      pages/manager/order-detail.vue
  10. +2
    -2
      pages/manager/order.vue
  11. +10
    -8
      pages/manager/user.vue
  12. +1
    -1
      pages/subcomponent/brand.vue
  13. +4
    -4
      pages/subcomponent/detail.vue
  14. +45
    -8
      pages/subcomponent/inspection-report.vue
  15. +3
    -2
      pages/subcomponent/order.vue
  16. +1
    -1
      pages/subcomponent/order_edit.vue
  17. +2
    -2
      pages/subcomponent/pickup.vue
  18. +8
    -8
      pages/subcomponent/wallet.vue

+ 5
- 0
api/model/index.js View File

@ -227,6 +227,11 @@ const api = {
method: 'POST', method: 'POST',
auth: true, auth: true,
}, },
getGoodsDetail: {
url: '/recycle-admin/applet/class/getGoodsDetail',
method: 'GET',
auth: true,
},
} }
export default api export default api

+ 1
- 1
config.js View File

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


+ 5
- 5
pages/component/home.vue View File

@ -38,12 +38,12 @@
@pause="onVideoPause(index)" @pause="onVideoPause(index)"
@ended="onVideoEnded(index)" @ended="onVideoEnded(index)"
></video> ></video>
<!-- 播放按钮覆盖层 -->
<view v-if="!videoPlayingStates[index]" class="video-overlay" @click="playVideoFullscreen(item, index)">
<view class="play-button-large">
<!-- 播放按钮覆盖层 -->
<view v-if="!videoPlayingStates[index]" class="video-overlay" @click="playVideoFullscreen(item, index)">
<view class="play-button-large">
<view class="play-triangle"></view> <view class="play-triangle"></view>
</view>
</view>
</view>
</view>
</view> </view>
<image v-else :src="item.image" mode="aspectFill" style="width: 100%; height: 100%;" @click="showServiceQrcode" /> <image v-else :src="item.image" mode="aspectFill" style="width: 100%; height: 100%;" @click="showServiceQrcode" />
</swiper-item> </swiper-item>


+ 11
- 17
pages/component/my.vue View File

@ -85,11 +85,14 @@
<image class="goods-image" :src="order.image || '/static/回收/衣物.png'" mode="aspectFill"></image> <image class="goods-image" :src="order.image || '/static/回收/衣物.png'" mode="aspectFill"></image>
<view class="order-info-opt"> <view class="order-info-opt">
<view class="order-info-top"> <view class="order-info-top">
<text class="order-info-count">{{ order.num || 1 }} </text>
<text class="order-info-price">{{ order.onePrice || 0 }} /</text>
<text class="order-info-count">{{ order.num || 1 }} {{ order.unit }}</text>
<!-- <text class="order-info-price">{{ order.onePrice || 0 }} /</text> -->
</view> </view>
<view class="order-info-estimate">
预估 ¥ {{ order.price }}
<view class="order-info-estimate" v-if="order.price">
结算 ¥ {{ order.price }}
</view>
<view class="order-info-estimate" v-else>
预估 ¥ {{ order.estimatedPrice }}
</view> </view>
</view> </view>
</view> </view>
@ -365,23 +368,14 @@ export default {
return item ? item.keyContent : '' return item ? item.keyContent : ''
}, },
userTypeText() { userTypeText() {
// isTuiType
// 0: 1广2广使
switch (this.userInfo.isTuiType) {
case 1:
return '推广达人'
case 2:
return '推广大使'
default:
return '用户'
}
return this.userInfo.isTuiTypeTitle || '用户'
}, },
userTypeBadgeClass() { userTypeBadgeClass() {
// //
switch (this.userInfo.isTuiType) {
case 1:
switch (this.userInfo.isTuiTypeTitle) {
case '推广达人':
return 'avatar-badge-expert' // 广 return 'avatar-badge-expert' // 广
case 2:
case '推广大使':
return 'avatar-badge-ambassador' // 广使 return 'avatar-badge-ambassador' // 广使
default: default:
return 'avatar-badge-user' // return 'avatar-badge-user' //


+ 2
- 2
pages/component/recycle copy.vue View File

@ -70,7 +70,7 @@
<view class="price-info"> <view class="price-info">
<text class="price-symbol">¥</text> <text class="price-symbol">¥</text>
<text class="price-value">{{item.price}}</text> <text class="price-value">{{item.price}}</text>
<text class="price-unit">/</text>
<text class="price-unit">/{{item.unit}}</text>
</view> </view>
<view class="quantity-control"> <view class="quantity-control">
<button class="btn-minus" @click="updateQuantity(index, -1)">-</button> <button class="btn-minus" @click="updateQuantity(index, -1)">-</button>
@ -138,7 +138,7 @@
<view class="panel-item-info"> <view class="panel-item-info">
<text class="panel-item-name">{{item.name}}</text> <text class="panel-item-name">{{item.name}}</text>
<text class="panel-item-desc">{{2222}}</text> <text class="panel-item-desc">{{2222}}</text>
<text class="panel-item-price">¥{{item.price}}/</text>
<text class="panel-item-price">¥{{item.price}}/{{item.unit}}</text>
</view> </view>
<view class="panel-quantity-control"> <view class="panel-quantity-control">
<button class="btn-minus" @click="updateQuantityByProduct(item, -1)">-</button> <button class="btn-minus" @click="updateQuantityByProduct(item, -1)">-</button>


+ 10
- 10
pages/component/recycle.vue View File

@ -22,28 +22,28 @@
@click="playVideoFullscreen(item, index)" @click="playVideoFullscreen(item, index)"
/> />
<!-- 播放状态显示视频 --> <!-- 播放状态显示视频 -->
<video
<video
v-else v-else
:id="`recycle-video-${index}`" :id="`recycle-video-${index}`"
:src="item.voUrl"
:src="item.voUrl"
:autoplay="true" :autoplay="true"
:muted="false" :muted="false"
:loop="false" :loop="false"
:controls="true" :controls="true"
:show-play-btn="true" :show-play-btn="true"
:show-center-play-btn="false"
:show-center-play-btn="false"
:show-fullscreen-btn="true" :show-fullscreen-btn="true"
:show-progress="true" :show-progress="true"
:show-mute-btn="true" :show-mute-btn="true"
:enable-progress-gesture="true" :enable-progress-gesture="true"
:enable-play-gesture="true" :enable-play-gesture="true"
object-fit="cover"
style="width: 100%; height: 100%;"
object-fit="cover"
style="width: 100%; height: 100%;"
@fullscreenchange="onFullscreenChange" @fullscreenchange="onFullscreenChange"
@play="onVideoPlay(index)" @play="onVideoPlay(index)"
@pause="onVideoPause(index)" @pause="onVideoPause(index)"
@ended="onVideoEnded(index)" @ended="onVideoEnded(index)"
></video>
></video>
<!-- 播放按钮覆盖层 --> <!-- 播放按钮覆盖层 -->
<view v-if="!videoPlayingStates[index]" class="video-overlay" @click="playVideoFullscreen(item, index)"> <view v-if="!videoPlayingStates[index]" class="video-overlay" @click="playVideoFullscreen(item, index)">
<view class="play-button-large"> <view class="play-button-large">
@ -99,12 +99,12 @@
</view> </view>
</view> </view>
<view class="goods-info"> <view class="goods-info">
<view class="price-info">
<text class="price-symbol">¥</text>
<view class="price-info">
<text class="price-symbol">¥</text>
<text class="price-value" v-if="!item.maxPrice || item.maxPrice == item.price">{{item.price}}</text> <text class="price-value" v-if="!item.maxPrice || item.maxPrice == item.price">{{item.price}}</text>
<text class="price-value" v-else>{{item.price}}-{{item.maxPrice}}</text> <text class="price-value" v-else>{{item.price}}-{{item.maxPrice}}</text>
<text class="price-unit">/{{ item.unit || '件' }}</text>
</view>
<text class="price-unit">/{{ item.unit || '件' }}</text>
</view>
<view class="quantity-control"> <view class="quantity-control">
<button class="btn-minus" @click="updateQuantity(index, -1)">-</button> <button class="btn-minus" @click="updateQuantity(index, -1)">-</button>
<text class="quantity">{{getItemTotalQuantity(item)}}</text> <text class="quantity">{{getItemTotalQuantity(item)}}</text>


+ 280
- 263
pages/manager/inspect-result.vue
File diff suppressed because it is too large
View File


+ 166
- 206
pages/manager/inspect.vue View File

@ -27,7 +27,7 @@
<view class="goods-info"> <view class="goods-info">
<view class="goods-title-row"> <view class="goods-title-row">
<text class="goods-name">{{ item.name }}</text> <text class="goods-name">{{ item.name }}</text>
<text class="goods-price">¥ {{ item.price }} <text class="goods-unit">/</text></text>
<text class="goods-price">¥ {{ item.price }} <text class="goods-unit">/{{item.unit}}</text></text>
</view> </view>
<text class="goods-desc">{{ item.desc }}</text> <text class="goods-desc">{{ item.desc }}</text>
</view> </view>
@ -37,13 +37,16 @@
<view class="num-ctrl"> <view class="num-ctrl">
<button class="num-btn" @tap="changeNum(item, 'qualified', -1)">-</button> <button class="num-btn" @tap="changeNum(item, 'qualified', -1)">-</button>
<text class="num">{{ item.qualified }}</text> <text class="num">{{ item.qualified }}</text>
<button class="num-btn" @tap="changeNum(item, 'qualified', 1)">+</button>
<button
class="num-btn"
@tap="changeNum(item, 'qualified', 1)"
>+</button>
</view> </view>
</view> </view>
<view class="goods-row"> <view class="goods-row">
<text class="row-label">总金额</text> <text class="row-label">总金额</text>
<input class="amount-input" :value="getInspectPrice(item)" @input="updateInspectPrice(item, $event)" placeholder="请输入金额" />
<input class="amount-input" :value="getInspectPrice(item)" @input="updateInspectPrice(item, $event)" placeholder="请输入金额" :disabled="!item.qualified || item.qualified === 0" />
</view> </view>
</view> </view>
<view v-if="loadingMore" class="loading-more">加载中...</view> <view v-if="loadingMore" class="loading-more">加载中...</view>
@ -123,7 +126,6 @@ export default {
searchTimer: null, searchTimer: null,
brandIndexList: ['A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J', 'K', 'L', 'M', 'N', 'O', 'P', 'Q', 'R', 'S', 'T', 'U', 'V', 'W', 'X', 'Y', 'Z'], brandIndexList: ['A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J', 'K', 'L', 'M', 'N', 'O', 'P', 'Q', 'R', 'S', 'T', 'U', 'V', 'W', 'X', 'Y', 'Z'],
isPresetDataSync: false, //
} }
}, },
computed: { computed: {
@ -157,39 +159,11 @@ export default {
}, },
methods: { methods: {
initInspectResult() { initInspectResult() {
//
// list
this.inspectResult = { this.inspectResult = {
id: this.order ? this.order.id : '', id: this.order ? this.order.id : '',
list: [] list: []
} }
//
if (this.order && this.order.commonOrderList) {
const groupedGoods = {}
this.order.commonOrderList.forEach(item => {
if (!groupedGoods[item.id]) {
groupedGoods[item.id] = {
id: item.id,
price: '',
qualifiedNum: item.num || 0, //
noQualifiedNum: 0,
unrecyclable: 0,
commonOrderList: []
}
}
//
groupedGoods[item.id].commonOrderList.push({
id: item.id,
testingInstructions: '',
testingImages: '',
testingStatus: 0 //
})
})
this.inspectResult.list = Object.values(groupedGoods)
console.log('初始化inspectResult:', JSON.stringify(this.inspectResult, null, 2))
}
}, },
// //
@ -197,43 +171,17 @@ export default {
if (categoryId === 'unrecyclable') { if (categoryId === 'unrecyclable') {
return this.getUnrecyclableCount() return this.getUnrecyclableCount()
} }
if (categoryId === 'quality_issue') { if (categoryId === 'quality_issue') {
return this.getQualityIssueCount() return this.getQualityIssueCount()
} }
// inspectResult
let totalCount = 0 let totalCount = 0
if (this.inspectResult.list && this.inspectResult.list.length > 0) { if (this.inspectResult.list && this.inspectResult.list.length > 0) {
// inspectResult
this.inspectResult.list.forEach(inspectItem => { this.inspectResult.list.forEach(inspectItem => {
//
if (inspectItem.id === 'unrecyclable' || inspectItem.id === 'quality_issue') {
return
}
// ID
const orderItem = this.order?.commonOrderList?.find(item => item.id == inspectItem.id)
// IDAPIID
if (!orderItem) {
// shopIdinspectItem.id
const matchingOrderItem = this.order?.commonOrderList?.find(item => item.shopId == inspectItem.id)
if (matchingOrderItem && matchingOrderItem.shopClass === categoryId) {
totalCount += inspectItem.qualifiedNum || 0
return
}
}
//
if (orderItem && orderItem.shopClass === categoryId) {
//
if (inspectItem.categoryId === categoryId) {
totalCount += inspectItem.qualifiedNum || 0 totalCount += inspectItem.qualifiedNum || 0
} }
}) })
} }
return totalCount return totalCount
}, },
@ -287,7 +235,6 @@ export default {
}, },
updateCurrentGoods() { updateCurrentGoods() {
const currentCategoryId = this.categories[this.currentCategory]?.id const currentCategoryId = this.categories[this.currentCategory]?.id
// //
if (currentCategoryId === 'unrecyclable') { if (currentCategoryId === 'unrecyclable') {
// inspectResult // inspectResult
@ -306,7 +253,6 @@ export default {
}] }]
return return
} }
// //
if (currentCategoryId === 'quality_issue') { if (currentCategoryId === 'quality_issue') {
// inspectResult // inspectResult
@ -325,47 +271,34 @@ export default {
}] }]
return return
} }
// API // API
const categoryGoods = this.allProducts[currentCategoryId] || [] const categoryGoods = this.allProducts[currentCategoryId] || []
// API
// APIinspectResult.listshopIdid
const goodsList = categoryGoods.map((item, index) => { const goodsList = categoryGoods.map((item, index) => {
//
//
const orderItem = this.getOrderItemByProductId(item.id) const orderItem = this.getOrderItemByProductId(item.id)
const presetQuantity = orderItem ? (orderItem.num || 0) : 0
// 使ID使APIID
let itemId = item.id let itemId = item.id
// ID
if (orderItem && orderItem.id) { if (orderItem && orderItem.id) {
itemId = orderItem.id // 使ID
itemId = orderItem.id
} }
// inspectResult
const inspectItem = this.inspectResult.list?.find(listItem => listItem.id == itemId)
const userModifiedQuantity = inspectItem ? inspectItem.qualifiedNum : 0
// 使使
const displayQuantity = userModifiedQuantity > 0 ? userModifiedQuantity : presetQuantity
const inspectItem = this.inspectResult.list?.find(listItem =>
listItem.shopId == item.id || listItem.shopId == itemId || listItem.id == item.id || listItem.id == itemId
)
return { return {
id: item.id, id: item.id,
image: item.image || '/static/回收/衣物.png', image: item.image || '/static/回收/衣物.png',
name: item.name, name: item.name,
price: item.price || 0, price: item.price || 0,
desc: item.service || '允许脏破烂,160码以上', desc: item.service || '允许脏破烂,160码以上',
qualified: displayQuantity, // 使
amount: inspectItem ? inspectItem.price : (orderItem ? orderItem.estimatedPrice : ''),
originalNum: presetQuantity, //
qualified: inspectItem ? inspectItem.qualifiedNum : 0,
amount: inspectItem ? inspectItem.price : '', // inspectResult
originalNum: 0,
estimatedPrice: orderItem ? orderItem.estimatedPrice : 0, estimatedPrice: orderItem ? orderItem.estimatedPrice : 0,
originalId: item.id, originalId: item.id,
isPin: item.isPin || 'N', //
orderItem: orderItem // 便使
isPin: item.isPin || 'N',
orderItem: orderItem
} }
}) })
this.currentGoods = goodsList this.currentGoods = goodsList
}, },
@ -374,20 +307,10 @@ export default {
if (!this.order || !this.order.commonOrderList) { if (!this.order || !this.order.commonOrderList) {
return null return null
} }
// ID
let orderItem = this.order.commonOrderList.find(item => item.id == productId)
// shopId
if (!orderItem) {
orderItem = this.order.commonOrderList.find(item => item.shopId == productId)
}
return orderItem
// idshopId
return this.order.commonOrderList.find(item => item.id == productId || item.shopId == productId)
}, },
goBack() { goBack() {
uni.navigateBack() uni.navigateBack()
}, },
@ -408,8 +331,9 @@ export default {
inspectResult: this.inspectResult, inspectResult: this.inspectResult,
order: this.order // order: this.order //
} }
console.log('resultDataStr:', resultData)
const resultDataStr = encodeURIComponent(JSON.stringify(resultData)) const resultDataStr = encodeURIComponent(JSON.stringify(resultData))
uni.navigateTo({ uni.navigateTo({
url: `/pages/manager/inspect-result?resultData=${resultDataStr}` url: `/pages/manager/inspect-result?resultData=${resultDataStr}`
}) })
@ -421,38 +345,36 @@ export default {
message: '没有质检数据' message: '没有质检数据'
} }
} }
for (const item of this.inspectResult.list) { for (const item of this.inspectResult.list) {
//
//
if (item.id === 'unrecyclable' || item.id === 'quality_issue') { if (item.id === 'unrecyclable' || item.id === 'quality_issue') {
continue continue
} }
//
const orderItem = this.order.commonOrderList.find(orderGoods => orderGoods.id == item.id)
const brandName = orderItem ? (orderItem.title+' '+orderItem.pinName || orderItem.title || '未知商品') : '未知商品'
// commonOrderList
if (!item.commonOrderList || item.commonOrderList.length === 0) {
return {
isValid: false,
message: '有商品未完成质检选择'
}
}
// testingStatus // testingStatus
const hasEmptyStatus = item.commonOrderList.some(commonItem => const hasEmptyStatus = item.commonOrderList.some(commonItem =>
commonItem.testingStatus === '' || commonItem.testingStatus === null || commonItem.testingStatus === undefined commonItem.testingStatus === '' || commonItem.testingStatus === null || commonItem.testingStatus === undefined
) )
if (hasEmptyStatus) { if (hasEmptyStatus) {
return { return {
isValid: false, isValid: false,
message: `${brandName} 还未完成质检选择`
message: '有商品未完成质检选择'
} }
} }
//
// price
if (!item.price || item.price === 0 || item.price === '') { if (!item.price || item.price === 0 || item.price === '') {
return { return {
isValid: false, isValid: false,
message: `${brandName} 还未填写总金额`
message: '有商品未填写总金额'
} }
} }
} }
return { return {
isValid: true, isValid: true,
message: '' message: ''
@ -466,7 +388,7 @@ export default {
if (categoryId === 'unrecyclable' || categoryId === 'quality_issue') { if (categoryId === 'unrecyclable' || categoryId === 'quality_issue') {
// //
this.updateCurrentGoods()
this.updateCurrentGoods()
return return
} }
@ -480,183 +402,219 @@ export default {
}, },
changeNum(item, key, delta) { changeNum(item, key, delta) {
if (key === 'qualified') { if (key === 'qualified') {
const currentCategoryId = this.categories[this.currentCategory]?.id
// //
if (delta > 0) { if (delta > 0) {
//
if (item.id === 'unrecyclable-1' || item.id === 'quality-issue-1') { if (item.id === 'unrecyclable-1' || item.id === 'quality-issue-1') {
const newQualified = Math.max(0, (item.qualified || 0) + delta) const newQualified = Math.max(0, (item.qualified || 0) + delta)
this.$set(item, 'qualified', newQualified) this.$set(item, 'qualified', newQualified)
this.updateInspectResult(item, 'qualified', delta)
this.updateInspectResult(item, 'qualified', delta, currentCategoryId)
this.$forceUpdate() this.$forceUpdate()
return return
} }
//
this.pendingBrandIndex = this.currentGoods.findIndex(goods => goods.id === item.id)
this.getGoodsBrandList(item.id)
this.showBrandPopup = true
return
} }
const newQualified = Math.max(0, (item.qualified || 0) + delta) const newQualified = Math.max(0, (item.qualified || 0) + delta)
this.$set(item, 'qualified', newQualified) this.$set(item, 'qualified', newQualified)
// inspectResult
this.updateInspectResult(item, 'qualified', delta)
// categories使
this.updateInspectResult(item, 'qualified', delta, currentCategoryId)
// 0
if (newQualified === 0) {
this.removeInspectItem(item)
}
this.$forceUpdate() this.$forceUpdate()
console.log('更新后的inspectResult:', JSON.stringify(this.inspectResult, null, 2)) console.log('更新后的inspectResult:', JSON.stringify(this.inspectResult, null, 2))
} }
}, },
updateInspectResult(item, type, delta) {
//
removeInspectItem(item) {
//
if (item.id === 'unrecyclable-1' || item.id === 'unrecyclable') {
const idx = this.inspectResult.list.findIndex(listItem => listItem.id === 'unrecyclable')
if (idx !== -1) {
this.inspectResult.list.splice(idx, 1)
}
return
}
if (item.id === 'quality-issue-1' || item.id === 'quality_issue') {
const idx = this.inspectResult.list.findIndex(listItem => listItem.id === 'quality_issue')
if (idx !== -1) {
this.inspectResult.list.splice(idx, 1)
}
return
}
let itemId = item.originalId || item.id
const orderItem = this.getOrderItemByProductId(itemId)
if (orderItem && orderItem.id) {
itemId = orderItem.id
}
// shopId
const idx = this.inspectResult.list.findIndex(listItem => listItem.shopId == (orderItem ? (orderItem.shopId || orderItem.id) : itemId))
if (idx !== -1) {
this.inspectResult.list.splice(idx, 1)
}
},
updateInspectResult(item, type, delta, currentCategoryId) {
// //
if (item.id === 'unrecyclable-1') { if (item.id === 'unrecyclable-1') {
// inspectResult
let inspectItem = this.inspectResult.list.find(listItem => listItem.id === 'unrecyclable') let inspectItem = this.inspectResult.list.find(listItem => listItem.id === 'unrecyclable')
if (!inspectItem) {
if (!inspectItem && delta > 0) {
inspectItem = { inspectItem = {
id: 'unrecyclable', id: 'unrecyclable',
price: '',
price: 0,
qualifiedNum: 0, qualifiedNum: 0,
noQualifiedNum: 0, noQualifiedNum: 0,
unrecyclable: 0, unrecyclable: 0,
commonOrderList: []
shopId: '',
pinId: '',
categoryId: '',
commonOrderList: [
{
testingInstructions: '',
testingImages: '',
testingStatus: 2
}
]
} }
this.inspectResult.list.push(inspectItem) this.inspectResult.list.push(inspectItem)
} }
if (!inspectItem) return
if (type === 'qualified' && delta > 0) { if (type === 'qualified' && delta > 0) {
inspectItem.unrecyclable++ inspectItem.unrecyclable++
} else if (type === 'qualified' && delta < 0) { } else if (type === 'qualified' && delta < 0) {
inspectItem.unrecyclable = Math.max(0, inspectItem.unrecyclable - 1) inspectItem.unrecyclable = Math.max(0, inspectItem.unrecyclable - 1)
// 0
if (inspectItem.unrecyclable === 0) {
const idx = this.inspectResult.list.findIndex(listItem => listItem === inspectItem)
if (idx !== -1) {
this.inspectResult.list.splice(idx, 1)
}
return
}
} }
console.log('不可回收数量更新:', inspectItem.unrecyclable)
console.log('不可回收对象:', inspectItem)
return return
} }
//
if (item.id === 'quality-issue-1') { if (item.id === 'quality-issue-1') {
// inspectResult
let inspectItem = this.inspectResult.list.find(listItem => listItem.id === 'quality_issue') let inspectItem = this.inspectResult.list.find(listItem => listItem.id === 'quality_issue')
if (!inspectItem) {
if (!inspectItem && delta > 0) {
inspectItem = { inspectItem = {
id: 'quality_issue', id: 'quality_issue',
price: '',
price: 0,
qualifiedNum: 0, qualifiedNum: 0,
noQualifiedNum: 0, noQualifiedNum: 0,
unrecyclable: 0, unrecyclable: 0,
commonOrderList: []
shopId: '',
pinId: '',
categoryId: '',
commonOrderList: [
{
testingInstructions: '',
testingImages: '',
testingStatus: 1
}
]
} }
this.inspectResult.list.push(inspectItem) this.inspectResult.list.push(inspectItem)
} }
if (!inspectItem) return
if (type === 'qualified' && delta > 0) { if (type === 'qualified' && delta > 0) {
inspectItem.noQualifiedNum++ inspectItem.noQualifiedNum++
} else if (type === 'qualified' && delta < 0) { } else if (type === 'qualified' && delta < 0) {
inspectItem.noQualifiedNum = Math.max(0, inspectItem.noQualifiedNum - 1) inspectItem.noQualifiedNum = Math.max(0, inspectItem.noQualifiedNum - 1)
// 0
if (inspectItem.noQualifiedNum === 0) {
const idx = this.inspectResult.list.findIndex(listItem => listItem === inspectItem)
if (idx !== -1) {
this.inspectResult.list.splice(idx, 1)
}
return
}
} }
console.log('质量问题数量更新:', inspectItem.noQualifiedNum)
console.log('质量问题对象:', inspectItem)
return return
} }
// inspectResult
// 使ID使APIID
let itemId = item.originalId || item.id let itemId = item.originalId || item.id
// ID
const orderItem = this.getOrderItemByProductId(itemId) const orderItem = this.getOrderItemByProductId(itemId)
if (orderItem && orderItem.id) { if (orderItem && orderItem.id) {
itemId = orderItem.id // 使ID
itemId = orderItem.id
} }
let inspectItem = this.inspectResult.list.find(listItem => listItem.id == itemId)
//
if (!inspectItem) {
let inspectItem = this.inspectResult.list.find(listItem => listItem.shopId == (orderItem ? (orderItem.shopId || orderItem.id) : itemId))
if (!inspectItem && delta > 0) {
inspectItem = { inspectItem = {
id: itemId,
price: '',
price: 0,
qualifiedNum: 0, qualifiedNum: 0,
noQualifiedNum: 0, noQualifiedNum: 0,
unrecyclable: 0, unrecyclable: 0,
commonOrderList: []
shopId: orderItem ? (orderItem.shopId || orderItem.id) : itemId,
pinId: '',
categoryId: currentCategoryId || '', // id
commonOrderList: [
{
testingInstructions: '',
testingImages: '',
testingStatus: 0
}
]
} }
this.inspectResult.list.push(inspectItem) this.inspectResult.list.push(inspectItem)
console.log('新增商品到inspectResult:', itemId)
}
//
if (type === 'qualified' && delta > 0 && this.isPresetDataSync) {
inspectItem.qualifiedNum = delta
return
} }
if (!inspectItem) return
if (type === 'qualified' && delta > 0) { if (type === 'qualified' && delta > 0) {
//
inspectItem.qualifiedNum++ inspectItem.qualifiedNum++
console.log(`为商品 ${itemId} 增加数量,当前合格数量: ${inspectItem.qualifiedNum}`)
} else if (type === 'qualified' && delta < 0) { } else if (type === 'qualified' && delta < 0) {
//
inspectItem.qualifiedNum = Math.max(0, inspectItem.qualifiedNum - 1) inspectItem.qualifiedNum = Math.max(0, inspectItem.qualifiedNum - 1)
console.log(`为商品 ${itemId} 减少数量,当前合格数量: ${inspectItem.qualifiedNum}`)
// 0
if (inspectItem.qualifiedNum === 0) {
const idx = this.inspectResult.list.findIndex(listItem => listItem === inspectItem)
if (idx !== -1) {
this.inspectResult.list.splice(idx, 1)
}
return
}
} }
console.log('更新后的inspectResult:', JSON.stringify(this.inspectResult, null, 2)) console.log('更新后的inspectResult:', JSON.stringify(this.inspectResult, null, 2))
}, },
getInspectPrice(item) { getInspectPrice(item) {
// inspectResultprice
if (item.id === 'unrecyclable-1' || item.id === 'quality-issue-1') {
return ''
// id
if (item.id === 'unrecyclable-1' || item.id === 'unrecyclable') {
const inspectItem = this.inspectResult.list?.find(listItem => listItem.id === 'unrecyclable')
return inspectItem ? inspectItem.price : ''
} }
// 使ID使APIID
let itemId = item.originalId || item.id
// ID
const orderItem = this.getOrderItemByProductId(itemId)
if (orderItem && orderItem.id) {
itemId = orderItem.id // 使ID
if (item.id === 'quality-issue-1' || item.id === 'quality_issue') {
const inspectItem = this.inspectResult.list?.find(listItem => listItem.id === 'quality_issue')
return inspectItem ? inspectItem.price : ''
} }
const inspectItem = this.inspectResult.list?.find(listItem => listItem.id == itemId)
//
const inspectItem = this.inspectResult.list?.find(listItem => listItem.shopId == item.id)
return inspectItem ? inspectItem.price : '' return inspectItem ? inspectItem.price : ''
}, },
updateInspectPrice(item, event) { updateInspectPrice(item, event) {
// inspectResultprice
if (item.id === 'unrecyclable-1' || item.id === 'quality-issue-1') {
// id
if (item.id === 'unrecyclable-1' || item.id === 'unrecyclable') {
const inspectItem = this.inspectResult.list?.find(listItem => listItem.id === 'unrecyclable')
if (!inspectItem) return
inspectItem.price = parseFloat(event.detail.value) || 0
return return
} }
// 使ID使APIID
if (item.id === 'quality-issue-1' || item.id === 'quality_issue') {
const inspectItem = this.inspectResult.list?.find(listItem => listItem.id === 'quality_issue')
if (!inspectItem) return
inspectItem.price = parseFloat(event.detail.value) || 0
return
}
//
let itemId = item.originalId || item.id let itemId = item.originalId || item.id
// ID
const orderItem = this.getOrderItemByProductId(itemId) const orderItem = this.getOrderItemByProductId(itemId)
if (orderItem && orderItem.id) { if (orderItem && orderItem.id) {
itemId = orderItem.id // 使ID itemId = orderItem.id // 使ID
} }
let inspectItem = this.inspectResult.list?.find(listItem => listItem.id == itemId)
//
if (!inspectItem) {
inspectItem = {
id: itemId,
price: '',
qualifiedNum: 0,
noQualifiedNum: 0,
unrecyclable: 0,
commonOrderList: []
}
this.inspectResult.list.push(inspectItem)
}
//
let inspectItem = this.inspectResult.list?.find(listItem => listItem.shopId == (orderItem ? (orderItem.shopId || orderItem.id) : itemId))
if (!inspectItem) return //
const newPrice = parseFloat(event.detail.value) || 0 const newPrice = parseFloat(event.detail.value) || 0
inspectItem.price = newPrice inspectItem.price = newPrice
console.log('更新价格:', itemId, newPrice) console.log('更新价格:', itemId, newPrice)
console.log('当前商品对象:', inspectItem)
}, },
loadMoreGoods() { loadMoreGoods() {
@ -767,7 +725,7 @@ export default {
if (item) { if (item) {
const newQualified = Math.max(0, (item.qualified || 0) + 1) const newQualified = Math.max(0, (item.qualified || 0) + 1)
this.$set(item, 'qualified', newQualified) this.$set(item, 'qualified', newQualified)
this.updateInspectResult(item, 'qualified', 1)
this.updateInspectResult(item, 'qualified', 1, this.categories[this.currentCategory]?.id)
// categories使 // categories使
this.$forceUpdate() this.$forceUpdate()
} }
@ -1379,3 +1337,5 @@ export default {
</style> </style>

+ 6
- 6
pages/manager/order-detail.vue View File

@ -83,8 +83,8 @@
<text class="custom-goods-desc">{{ item.pinName }}</text> <text class="custom-goods-desc">{{ item.pinName }}</text>
<text class="custom-goods-desc">{{ item.details }}</text> <text class="custom-goods-desc">{{ item.details }}</text>
<view class="custom-goods-meta"> <view class="custom-goods-meta">
<text class="custom-goods-price" v-if="shouldShowSinglePrice(item.estimatedPrice)">¥{{ item.onePrice }}<text class="custom-goods-unit"> /</text></text>
<text class="custom-goods-price" v-else>¥{{ getSinglePriceRange(item.estimatedPrice, item.num) }}<text class="custom-goods-unit"> /</text></text>
<text class="custom-goods-price" v-if="shouldShowSinglePrice(item.estimatedPrice)">¥{{ item.onePrice }}<text class="custom-goods-unit"> /{{item.unit}}</text></text>
<text class="custom-goods-price" v-else>¥{{ getSinglePriceRange(item.estimatedPrice, item.num) }}<text class="custom-goods-unit"> /{{item.unit}}</text></text>
<text class="custom-goods-count">x{{ item.num }}</text> <text class="custom-goods-count">x{{ item.num }}</text>
</view> </view>
</view> </view>
@ -125,8 +125,8 @@
<text class="custom-goods-desc">{{ item.pinName }}</text> <text class="custom-goods-desc">{{ item.pinName }}</text>
<text class="custom-goods-desc">{{ item.details }}</text> <text class="custom-goods-desc">{{ item.details }}</text>
<view class="custom-goods-meta"> <view class="custom-goods-meta">
<text class="custom-goods-price" v-if="shouldShowSinglePrice(item.estimatedPrice)">¥{{ item.onePrice }}<text class="custom-goods-unit"> /</text></text>
<text class="custom-goods-price" v-else>¥{{ getSinglePriceRange(item.estimatedPrice, item.num) }}<text class="custom-goods-unit"> /</text></text>
<text class="custom-goods-price" v-if="shouldShowSinglePrice(item.estimatedPrice)">¥{{ item.onePrice }}<text class="custom-goods-unit"> /{{item.unit}}</text></text>
<text class="custom-goods-price" v-else>¥{{ getSinglePriceRange(item.estimatedPrice, item.num) }}<text class="custom-goods-unit"> /{{item.unit}}</text></text>
<text class="custom-goods-count">x{{ item.num }}</text> <text class="custom-goods-count">x{{ item.num }}</text>
</view> </view>
</view> </view>
@ -170,8 +170,8 @@
<text class="custom-goods-desc">{{ item.pinName }}</text> <text class="custom-goods-desc">{{ item.pinName }}</text>
<text class="custom-goods-desc">{{ item.details }}</text> <text class="custom-goods-desc">{{ item.details }}</text>
<view class="custom-goods-meta"> <view class="custom-goods-meta">
<text class="custom-goods-price" v-if="shouldShowSinglePrice(item.estimatedPrice)">¥{{ item.onePrice }}<text class="custom-goods-unit"> /</text></text>
<text class="custom-goods-price" v-else>¥{{ getSinglePriceRange(item.estimatedPrice, item.num) }}<text class="custom-goods-unit"> /</text></text>
<text class="custom-goods-price" v-if="shouldShowSinglePrice(item.estimatedPrice)">¥{{ item.onePrice }}<text class="custom-goods-unit"> /{{item.unit}}</text></text>
<text class="custom-goods-price" v-else>¥{{ getSinglePriceRange(item.estimatedPrice, item.num) }}<text class="custom-goods-unit"> /{{item.unit}}</text></text>
<text class="custom-goods-count">x{{ item.num }}</text> <text class="custom-goods-count">x{{ item.num }}</text>
</view> </view>
</view> </view>


+ 2
- 2
pages/manager/order.vue View File

@ -350,13 +350,13 @@ export default {
// if (state === 3) { // if (state === 3) {
// return { label: '', class: 'gray' } // return { label: '', class: 'gray' }
// } // }
if ((status === 1||status === 0) && state != 3) {
if ((status === 1||status === 0) && state != 3 && state != 4) {
return { label: '已预约', class: 'green' } return { label: '已预约', class: 'green' }
} else if (state === 1) { } else if (state === 1) {
return { label: '待质检', class: 'orange' } return { label: '待质检', class: 'orange' }
} else if (status === 3) { } else if (status === 3) {
return { label: '已结款', class: 'blue' } return { label: '已结款', class: 'blue' }
} else if (state ===4) {
} else if (state === 4) {
return { label: '已驳回', class: 'red' } return { label: '已驳回', class: 'red' }
} }
return { label: '未知状态', class: 'gray' } return { label: '未知状态', class: 'gray' }


+ 10
- 8
pages/manager/user.vue View File

@ -21,7 +21,8 @@
<text v-if="searchText.length" class="cancel-btn" @tap="cancelSearch">取消</text> <text v-if="searchText.length" class="cancel-btn" @tap="cancelSearch">取消</text>
</view> </view>
<!-- 联想手机号列表 --> <!-- 联想手机号列表 -->
<view v-if="showSuggestList" class="suggest-list" :style="{paddingTop: (navBarRealHeight + searchBarHeight) + 'px'}">
<view v-if="showSuggestList" class="suggest-list"
:style="{paddingTop: (navBarRealHeight + searchBarHeight) + 'px'}">
<view v-for="(item, idx) in suggestList" :key="idx" class="suggest-item"> <view v-for="(item, idx) in suggestList" :key="idx" class="suggest-item">
<uni-icons type="search" size="22" color="#bfbfbf" style="margin-right: 12rpx;" /> <uni-icons type="search" size="22" color="#bfbfbf" style="margin-right: 12rpx;" />
<rich-text :nodes="highlightMatch(item, searchText)" /> <rich-text :nodes="highlightMatch(item, searchText)" />
@ -41,10 +42,10 @@
<view class="user-info-row"> <view class="user-info-row">
<text class="user-label">角色</text> <text class="user-label">角色</text>
<template v-if="user.role"> <template v-if="user.role">
<text class="role-tag" v-if="user.role == '推广官'">
{{ userTypeText(user) || '推广官' }}
</text>
<text v-else class="user-value">{{ user.role }}</text>
<text class="role-tag" v-if="user.isTuiTypeTitle">
{{ user.isTuiTypeTitle }}
</text>
<text v-else class="user-value">{{ user.isTuiTypeTitle }}</text>
</template> </template>
<template v-else> <template v-else>
<text class="user-value">-</text> <text class="user-value">-</text>
@ -80,7 +81,8 @@ export default {
return this.users.filter(u => return this.users.filter(u =>
u.name.includes(this.searchText) || u.name.includes(this.searchText) ||
u.phone.includes(this.searchText) || u.phone.includes(this.searchText) ||
(u.role && u.role.includes(this.searchText))
(u.role && u.role.includes(this.searchText))||
(u.isTuiTypeTitle && u.isTuiTypeTitle.includes(this.searchText))
); );
}, },
navbarStyle() { navbarStyle() {
@ -124,8 +126,7 @@ export default {
} }
}, },
userTypeText(userInfo) { userTypeText(userInfo) {
if (userInfo.isUser == 'Y') return userInfo.isTuiTypeTitle
return '普通用户'
return userInfo.isTuiTypeTitle || '用户'
}, },
clearInput() { clearInput() {
this.searchText = ''; this.searchText = '';
@ -173,6 +174,7 @@ export default {
role: user.isUser === 'Y' ? '推广官' : '', role: user.isUser === 'Y' ? '推广官' : '',
blocked: user.isBlack === 'Y', blocked: user.isBlack === 'Y',
avatar: user.headImage || user.avatar || user.avatarUrl || '', avatar: user.headImage || user.avatar || user.avatarUrl || '',
isTuiTypeTitle: user.isTuiTypeTitle,
})); }));
} }
} catch (error) { } catch (error) {


+ 1
- 1
pages/subcomponent/brand.vue View File

@ -24,7 +24,7 @@
> >
<image :src="item.image" mode="aspectFit"></image> <image :src="item.image" mode="aspectFit"></image>
<text class="name">{{ item.name }}</text> <text class="name">{{ item.name }}</text>
<text class="price">¥ {{ item.price }} /</text>
<text class="price">¥ {{ item.price }} /{{item.unit}}</text>
</view> </view>
</view> </view>


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

@ -115,8 +115,8 @@
<text class="desc">{{ item.pinName }}</text> <text class="desc">{{ item.pinName }}</text>
<text class="goods-desc">{{ item.details }}</text> <text class="goods-desc">{{ item.details }}</text>
<view class="goods-meta"> <view class="goods-meta">
<text class="goods-price" v-if="shouldShowSinglePrice(item.estimatedPrice)">¥ {{ item.onePrice }}<text class="goods-unit"> /</text></text>
<text class="goods-price" v-else>¥ {{ getSinglePriceRange(item.estimatedPrice, item.num) }}<text class="goods-unit"> /</text></text>
<text class="goods-price" v-if="shouldShowSinglePrice(item.estimatedPrice)">¥ {{ item.onePrice }}<text class="goods-unit"> /{{item.unit}}</text></text>
<text class="goods-price" v-else>¥ {{ getSinglePriceRange(item.estimatedPrice, item.num) }}<text class="goods-unit"> /{{item.unit}}</text></text>
<text class="goods-count">x{{ item.num }}</text> <text class="goods-count">x{{ item.num }}</text>
</view> </view>
</view> </view>
@ -153,9 +153,9 @@
</view> </view>
<!-- 底部按钮仅在线预约时显示 --> <!-- 底部按钮仅在线预约时显示 -->
<view class="bottom-btns" v-if="status === 0 && state !== 3">
<view class="bottom-btns" v-if="(status === 0||(status === 1 && state==0)) && state !== 3 && state !== 4">
<button class="btn cancel-btn" @tap="showCancelModal = true">取消订单</button> <button class="btn cancel-btn" @tap="showCancelModal = true">取消订单</button>
<button class="btn contact-btn" @tap="contactCourier">联系快递员</button>
<button class="btn contact-btn" @tap="contactCourier" v-if="status === 1">联系快递员</button>
</view> </view>
<!-- 取消订单弹窗 --> <!-- 取消订单弹窗 -->


+ 45
- 8
pages/subcomponent/inspection-report.vue View File

@ -45,11 +45,11 @@
<view class="goods-name">{{item.name}}</view> <view class="goods-name">{{item.name}}</view>
<view v-if="item.detail" class="detail-link">查看详情 <uni-icons type="right" size="16" color="#bbb" /></view> <view v-if="item.detail" class="detail-link">查看详情 <uni-icons type="right" size="16" color="#bbb" /></view>
</view> </view>
<view class="goods-desc">{{item.desc}}</view>
<!-- <view class="goods-desc">{{item.desc}}</view> -->
<view class="goods-bottom-row"> <view class="goods-bottom-row">
<view class="goods-price-row"> <view class="goods-price-row">
<text class="goods-price">{{item.price}}</text> <text class="goods-price">{{item.price}}</text>
<text class="goods-unit">/</text>
<text class="goods-unit">/{{item.unit}}</text>
<text class="goods-count">x{{item.count}}</text> <text class="goods-count">x{{item.count}}</text>
</view> </view>
<view class="goods-total">{{item.total}}</view> <view class="goods-total">{{item.total}}</view>
@ -72,7 +72,34 @@
<view class="goods-name">{{item.name}}</view> <view class="goods-name">{{item.name}}</view>
<view v-if="item.detail" class="detail-link">查看详情 <uni-icons type="right" size="16" color="#bbb" /></view> <view v-if="item.detail" class="detail-link">查看详情 <uni-icons type="right" size="16" color="#bbb" /></view>
</view> </view>
<view class="goods-desc">{{item.desc}}</view>
<!-- <view class="goods-desc">{{item.desc}}</view> -->
<view class="goods-bottom-row">
<view class="goods-price-row problem-price-row">
<!-- <text class="goods-price">{{item.price}}</text>
<text class="goods-unit">/</text> -->
<text class="goods-count">x{{item.count}}</text>
</view>
<!-- <view class="goods-total">{{item.total}}</view> -->
</view>
</view>
</view>
</view>
<view class="summary-row">
<text>件数<text class="highlight">{{problemCount}}</text> </text>
<text>结算金额<text class="highlight"> 0</text></text>
</view>
</view>
<view v-if="showUnrecyclable && unrecyclableList.length" class="inspection-card problem-card">
<view class="report-title">不可回收</view>
<view class="goods-list">
<view class="goods-item" v-for="(item, i) in problemList" :key="i" @tap="goToInspectionDetail('problem')">
<image class="goods-img" :src="item.img" mode="aspectFit" />
<view class="goods-info">
<view class="goods-row">
<view class="goods-name">{{item.name}}</view>
<view v-if="item.detail" class="detail-link">查看详情 <uni-icons type="right" size="16" color="#bbb" /></view>
</view>
<!-- <view class="goods-desc">{{item.desc}}</view> -->
<view class="goods-bottom-row"> <view class="goods-bottom-row">
<view class="goods-price-row problem-price-row"> <view class="goods-price-row problem-price-row">
<!-- <text class="goods-price">{{item.price}}</text> <!-- <text class="goods-price">{{item.price}}</text>
@ -107,10 +134,12 @@ export default {
featureTags: ['透明检', '专业验', '公正评', '逐件验'], featureTags: ['透明检', '专业验', '公正评', '逐件验'],
goodsList: [], // goodsList: [], //
problemList: [], // problemList: [], //
unrecyclableList: [], //
reportData: null, reportData: null,
showQualified: false, showQualified: false,
showProblem: false, showProblem: false,
orderId : 0,
showUnrecyclable: false,
orderId : 0,
fixedHeaderHeight: 0, // fixedHeaderHeight: 0, //
} }
}, },
@ -123,7 +152,8 @@ export default {
return this.goodsList.reduce((sum, item) => sum + item.count, 0) return this.goodsList.reduce((sum, item) => sum + item.count, 0)
}, },
totalAmount() { totalAmount() {
return this.goodsList.reduce((sum, item) => sum + item.total, 0).toFixed(1)
console.log('this.goodsList', this.goodsList)
return this.goodsList.reduce((sum, item) => sum + item.total, 0).toFixed(2)
}, },
problemCount() { problemCount() {
return this.problemList.reduce((sum, item) => sum + item.count, 0) return this.problemList.reduce((sum, item) => sum + item.count, 0)
@ -166,10 +196,11 @@ export default {
// //
this.goodsList = [] this.goodsList = []
this.problemList = [] this.problemList = []
this.unrecyclableList = []
// commonOrderList // commonOrderList
if (orderData.commonOrderList && orderData.commonOrderList.length > 0) {
orderData.commonOrderList.forEach(mainOrder => {
if (orderData.orderCheckList && orderData.orderCheckList.length > 0) {
orderData.orderCheckList.forEach(mainOrder => {
// //
if (mainOrder.commonOrderList && mainOrder.commonOrderList.length > 0) { if (mainOrder.commonOrderList && mainOrder.commonOrderList.length > 0) {
mainOrder.commonOrderList.forEach(subOrder => { mainOrder.commonOrderList.forEach(subOrder => {
@ -185,6 +216,7 @@ export default {
// //
this.showQualified = this.goodsList.length > 0 this.showQualified = this.goodsList.length > 0
this.showProblem = this.problemList.length > 0 this.showProblem = this.problemList.length > 0
this.showUnrecyclable = this.unrecyclableList.length > 0
}, },
categorizeOrderItem(orderItem, parentOrder = null) { categorizeOrderItem(orderItem, parentOrder = null) {
@ -199,6 +231,9 @@ export default {
// //
this.problemList.push(this.mapOrderToGoods(orderItem, parentData, true)) this.problemList.push(this.mapOrderToGoods(orderItem, parentData, true))
} }
else{
this.unrecyclableList.push(this.mapOrderToGoods(orderItem, parentData, true))
}
// testingStatus = 2 () // testingStatus = 2 ()
}, },
@ -207,7 +242,7 @@ export default {
img: parentData.image || '/static/default-goods.png', img: parentData.image || '/static/default-goods.png',
name: parentData.title || '未知品类', name: parentData.title || '未知品类',
desc: parentData.pinName ? `${parentData.pinName}` :'', desc: parentData.pinName ? `${parentData.pinName}` :'',
price: parentData.onePrice || 0,
price: parentData.price/ orderItem.num || 0,
count: orderItem.num || 1, count: orderItem.num || 1,
total: parentData.price, total: parentData.price,
detail: true, detail: true,
@ -233,6 +268,8 @@ export default {
itemData = this.goodsList[0] itemData = this.goodsList[0]
} else if (status === 'problem' && this.problemList.length > 0) { } else if (status === 'problem' && this.problemList.length > 0) {
itemData = this.problemList[0] itemData = this.problemList[0]
}else if (status === 'unrecyclable' && this.unrecyclableList.length > 0) {
itemData = this.unrecyclableList[0]
} }
if (itemData) { if (itemData) {


+ 3
- 2
pages/subcomponent/order.vue View File

@ -60,9 +60,10 @@
</view> </view>
<view class="order-info"> <view class="order-info">
<text class="order-count">{{ order.num || order.count || 1 }} </text> <text class="order-count">{{ order.num || order.count || 1 }} </text>
<text class="order-price">¥ {{ order.onePrice || order.priceRange || 0 }} /</text>
<!-- <text class="order-price">¥ {{ order.onePrice || order.priceRange || 0 }} /</text> -->
<view class="order-estimate"> <view class="order-estimate">
<text>预估 ¥{{ order.price || order.estimatePrice }}</text>
<text v-if="order.price ">结算 ¥{{ order.price || 0 }}</text>
<text v-else>预估 ¥{{ order.estimatedPrice || 0 }}</text>
</view> </view>
</view> </view>
</view> </view>


+ 1
- 1
pages/subcomponent/order_edit.vue View File

@ -82,7 +82,7 @@
<text class="rules" @tap="showRules">回收规则 ></text> <text class="rules" @tap="showRules">回收规则 ></text>
</view> </view>
<text class="desc">{{ item.desc }}</text> <text class="desc">{{ item.desc }}</text>
<text class="price">¥ {{ item.unitPrice }}/</text>
<text class="price">¥ {{ item.unitPrice }}/{{item.unit}}</text>
</view> </view>
<view class="quantity-control"> <view class="quantity-control">
<text class="btn minus" @tap="decreaseQuantity(index)">-</text> <text class="btn minus" @tap="decreaseQuantity(index)">-</text>


+ 2
- 2
pages/subcomponent/pickup.vue View File

@ -66,8 +66,8 @@
</view> </view>
<!-- <view class="desc">{{ item.desc }}</view> --> <!-- <view class="desc">{{ item.desc }}</view> -->
<view class="price-row"> <view class="price-row">
<text class="price" v-if="!item.maxPrice || item.maxPrice == (item.price || item.unitPrice)">{{ item.price || item.unitPrice }}/</text>
<text class="price" v-else>{{ item.price || item.unitPrice }}~{{ item.maxPrice }}/</text>
<text class="price" v-if="!item.maxPrice || item.maxPrice == (item.price || item.unitPrice)">{{ item.price || item.unitPrice }}/{{item.unit}}</text>
<text class="price" v-else>{{ item.price || item.unitPrice }}~{{ item.maxPrice }}/{{item.unit}}</text>
<text class="count">x{{ item.quantity }}</text> <text class="count">x{{ item.quantity }}</text>
<text class="amount" v-if="!item.maxPrice || item.maxPrice == (item.price || item.unitPrice)">{{ ((item.price || item.unitPrice) * item.quantity).toFixed(2) }}</text> <text class="amount" v-if="!item.maxPrice || item.maxPrice == (item.price || item.unitPrice)">{{ ((item.price || item.unitPrice) * item.quantity).toFixed(2) }}</text>
<text class="amount" v-else>{{ ((item.price || item.unitPrice) * item.quantity).toFixed(2) }}~{{ ((item.maxPrice) * item.quantity).toFixed(2) }}</text> <text class="amount" v-else>{{ ((item.price || item.unitPrice) * item.quantity).toFixed(2) }}~{{ ((item.maxPrice) * item.quantity).toFixed(2) }}</text>


+ 8
- 8
pages/subcomponent/wallet.vue View File

@ -496,9 +496,9 @@ export default {
margin-top: 0; margin-top: 0;
.video-container { .video-container {
position: relative;
position: relative;
width: 100%; width: 100%;
height: 100%;
height: 100%;
.video-poster { .video-poster {
cursor: pointer; cursor: pointer;
@ -518,10 +518,10 @@ export default {
background: rgba(0, 0, 0, 0.4); background: rgba(0, 0, 0, 0.4);
z-index: 10; z-index: 10;
cursor: pointer; cursor: pointer;
display: flex;
justify-content: center;
align-items: center;
display: flex;
justify-content: center;
align-items: center;
.play-button-large { .play-button-large {
width: 120rpx; width: 120rpx;
height: 120rpx; height: 120rpx;
@ -557,8 +557,8 @@ export default {
.play-triangle { .play-triangle {
border-left-color: #ff8917; border-left-color: #ff8917;
}
}
}
}
} }
} }
} }


Loading…
Cancel
Save