修复库存回显问题,修复多次加菜弹窗问题

This commit is contained in:
2026-04-13 18:12:46 +08:00
parent 2db9f6811a
commit dbe74f6486
8 changed files with 92 additions and 81 deletions

View File

@@ -12,7 +12,8 @@
</view>
<view class="u-flex">
<view>
<text :class="[data.status]">{{$dict.getDiceName(data.status,'orderStatus')}}{{data.refundType?'['+$dict.getDiceName(data.refundType,'refundType')+']':''}}</text>
<text
:class="[data.status]">{{$dict.getDiceName(data.status,'orderStatus')}}{{data.refundType?'['+$dict.getDiceName(data.refundType,'refundType')+']':''}}</text>
</view>
<view class="line"></view>
<view class=" color-main">
@@ -33,13 +34,18 @@
<view class="" v-for="(item,index) in data.goods" :key="index">
<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="">
<text>{{item.productName}}</text>
</view>
<view class="color-999 u-font-24 u-m-t-8">
{{item.skuName}}
</view>
</view>
<view class="u-flex u-flex-1 u-row-right" style="align-items: center;">
<view style="margin-right: 10rpx;">×{{item.num}}</view>
<view style="margin-right: 10rpx;">
<text>×{{item.num}}</text>
<text class="color-red u-m-l-10 font-bold" v-if="item.returnNum">(退{{item.returnNum}})</text>
</view>
<view class="u-text-right u-relative" :style="computedPriceStyle()">
<text>{{item.unitPrice}}</text>
</view>
@@ -56,7 +62,7 @@
<view class="no-wrap u-m-r-32">打包费</view>
<view>{{data.packFee||0}}</view>
</view>
<view style="height: 32rpx;" ></view>
<view style="height: 32rpx;"></view>
<view class="u-flex u-row-between 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>
@@ -98,8 +104,13 @@
</template>
<script setup>
import { computed, reactive, ref, watch } from 'vue';
import {
computed,
reactive,
ref,
watch
} from 'vue';
import dayjs from 'dayjs';
import go from '@/commons/utils/go.js'
@@ -126,8 +137,8 @@
let $goodsMap = {}
let goosZhonglei = ref(0)
let goodsNumber = ref(0)
let originAmount = computed(()=>{
let total=0;
let originAmount = computed(() => {
let total = 0;
for (let i in props.data.goods) {
const goods = props.data.goods[i]
if ($goodsMap.hasOwnProperty(goods.productId)) {
@@ -142,17 +153,17 @@
return total
})
const priceSize = 9
let minWidth=ref(36)
let minWidth = ref(36)
function computedPriceStyle() {
return {
'min-width':minWidth.value + 'px'
'min-width': minWidth.value + 'px'
}
}
function goodsMapInit() {
}
goodsMapInit()
watch(() => props.data.goods.length, (newval) => {