称重,默认选择营业时间

This commit is contained in:
魏啾
2024-12-06 15:49:15 +08:00
parent 38b640e82b
commit 3616caac21
6 changed files with 60 additions and 43 deletions

View File

@@ -36,7 +36,7 @@
</image>
</view>
<view class="u-m-l-30 u-m-r-30 color-333">
{{item.number}}
{{(item.number).toFixed(2)}}
</view>
<view class="u-flex" @tap="updateNumber(true,index,item)">
<image src="/pagesCreateOrder/static/images/icon-add-black.svg" class="icon" mode="">

View File

@@ -28,7 +28,7 @@
</view>
<template v-if="data.chooseNumber">
<view class="u-font-32">
{{data.chooseNumber}}
{{(data.chooseNumber).toFixed(2)}}
</view>
<view class="u-flex" @tap.stop="emitEvent('reduce')">
<image src="/pagesCreateOrder/static/images/icon-reduce.svg" class="icon" mode="">

View File

@@ -91,11 +91,11 @@
if (currentInput.value === '') {
uni.showToast({
title: '请输入',
icon:'none'
icon: 'none'
})
return false;
}
emit('weighgoodsUpdate', form.foodsindex, form.index, true, '', currentInput.value)
emit('weighgoodsUpdate', form.foodsindex, form.index, true, undefined, currentInput.value)
overlayshow.value = false
}
//显示
@@ -108,7 +108,6 @@
index,
goods
})
console.log(form)
overlayshow.value = true
}
defineExpose({

View File

@@ -862,7 +862,6 @@
// 称重
const refweighitem = ref(null)
const tapweigh = (foodsindex, index) => {
console.log(foodsindex, index)
const goods = data.tabbar[index].foods[foodsindex]
refweighitem.value.open(foodsindex, index, goods)
}
@@ -990,7 +989,6 @@
}
function searchGoodsUpdate(goodsItem, goodsIndex, isAdd) {
console.log(goodsItem.goodsIndex, goodsItem.index, isAdd, goodsIndex, 111111)
goodsUpdate(goodsItem.goodsIndex, goodsItem.index, isAdd, goodsIndex)
}
@@ -1015,10 +1013,6 @@
const productId = $goods.id
const skuId = $goods.specList[0].id
let suit = $goods.specList[0].suit || 1
// 不影响之前的代码 称重suit单独处理
if ($goods.type == 'weigh' && showCurrentInput) {
suit = showCurrentInput
}
if (goodsInCarIndex !== -1) {
//更新
const carGoods = cars[goodsInCarIndex]
@@ -1050,6 +1044,10 @@
$goods.chooseNumber = number
setSearchGoods(searchGoodsIndex, number)
} else {
// 不影响之前的代码 称重suit单独处理
if ($goods.type == 'weigh' && showCurrentInput) {
suit = showCurrentInput
}
// 套餐和单规格
if ($goods.groupType != 1) {
//增加
@@ -1060,7 +1058,7 @@
skuId
})
infoBox.showToast('添加成功')
$goods.chooseNumber = num
$goods.chooseNumber = Number(num)
cars.push(cartGoods)
}
}