增加订单列表详情的客座费打包费

This commit is contained in:
2024-10-28 09:22:31 +08:00
parent 291b495c10
commit 96a9dfb5b5
6 changed files with 192 additions and 82 deletions

View File

@@ -30,22 +30,42 @@
<view class="u-m-t-32">
<view class="u-font-32">{{goosZhonglei}}种商品{{goodsNumber}}</view>
<view class="border-bottom u-p-b-32">
<view class="u-flex u-row-between u-col-top u-m-t-32" v-for="(item,index) in data.detailList"
<view class="" v-for="(item,index) in data.detailList"
:key="index">
<view>
<view class=""> {{item.productName}}</view>
<view class="color-999 u-font-24 u-m-t-8">
{{item.productSkuName}}
<view class="u-flex u-row-between u-col-top u-m-t-32" v-if="item.productId!=-999">
<view>
<view class=""> {{item.productName}}</view>
<view class="color-999 u-font-24 u-m-t-8">
{{item.productSkuName}}
</view>
</view>
<view class="u-flex u-flex-1 u-row-right">
<view>×{{item.num}}</view>
<view class="u-text-right u-relative" :style="computedPriceStyle()">
<text :class="{'line-th':item.gift}">{{goodsPriceAmount(item)}}</text>
<view class="u-absolute" style="bottom: 100%;right: 0;" v-if="item.gift">
0
</view>
</view>
</view>
</view>
<view class="u-flex u-flex-1 u-row-right">
<view>×{{item.num}}</view>
<view class="u-text-right" :style="computedPriceStyle()">{{item.priceAmount}}</view>
</view>
</view>
</view>
</view>
<view class="border-bottom">
<view class="u-flex u-row-between u-m-t-32 u-col-top" v-if="data.packFee>0">
<view class="no-wrap u-m-r-32">打包费</view>
<view>{{data.packFee||0}}</view>
</view>
<view class="u-flex u-row-between u-m-t-32 u-p-b-32 u-col-top" v-if="data.seatInfo&&data.seatInfo.priceAmount>0">
<view class="no-wrap u-m-r-32">{{data.seatInfo.productName}}</view>
<view>{{data.seatInfo.priceAmount}}</view>
</view>
</view>
<view class="u-flex u-row-between border-bottom u-m-t-32 u-p-b-32 u-col-top">
<view class="no-wrap u-m-r-32">订单备注</view>
<view>{{data.remark||'无'}}</view>
@@ -78,7 +98,14 @@
data: {
type: Object,
default: () => {
detailList: []
return{
packFee:0,
seatInfo:{
productName:'客座费',
priceAmount:0
},
detailList: []
}
}
},
index: {
@@ -89,9 +116,16 @@
let $goodsMap = {}
let goosZhonglei = ref(0)
let goodsNumber = ref(0)
const priceSize = 9
function goodsPriceAmount(item){
return item.price*item.num
}
// const packeFee=computed(()=>{
// return props.data.detailList.reduce((prve,cur)=>{
// return prve+cur.packAmount
// },0).toFixed(2)
// })
function computedPriceStyle() {
const item = props.data.detailList.reduce((prev, current) => (`${prev.price}`.length > `${current.price}`
.length) ? prev : current)