代客下单bug修改2
This commit is contained in:
@@ -369,21 +369,23 @@
|
|||||||
|
|
||||||
// 单品打折
|
// 单品打折
|
||||||
async function discountconfirm(form) {
|
async function discountconfirm(form) {
|
||||||
let str = ''
|
if (form.discountMoney != '.') {
|
||||||
if (form.notes) {
|
let str = ''
|
||||||
form.notes.forEach(ele => {
|
if (form.notes) {
|
||||||
if (ele.checked) {
|
form.notes.forEach(ele => {
|
||||||
str = str + ele.name + ','
|
if (ele.checked) {
|
||||||
}
|
str = str + ele.name + ','
|
||||||
})
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
let obj = {
|
||||||
|
saleAmount: form.discountMoney,
|
||||||
|
note: str + form.note,
|
||||||
|
cartId: modelData.data.id
|
||||||
|
}
|
||||||
|
const res = await Api.$updatePrice(obj)
|
||||||
|
getCart()
|
||||||
}
|
}
|
||||||
let obj = {
|
|
||||||
saleAmount: form.discountMoney,
|
|
||||||
note: str + form.note,
|
|
||||||
cartId: modelData.data.id
|
|
||||||
}
|
|
||||||
const res = await Api.$updatePrice(obj)
|
|
||||||
getCart()
|
|
||||||
}
|
}
|
||||||
|
|
||||||
//用餐人数
|
//用餐人数
|
||||||
@@ -449,9 +451,11 @@
|
|||||||
skuId
|
skuId
|
||||||
}
|
}
|
||||||
par[key] = !item[key]
|
par[key] = !item[key]
|
||||||
|
|
||||||
|
|
||||||
const res = await Api.$updateCart(par)
|
const res = await Api.$updateCart(par)
|
||||||
goods.list[index][key] = returnBoolean(res[key])
|
goods.list[index][key] = returnBoolean(res[key])
|
||||||
|
getCart()
|
||||||
}
|
}
|
||||||
//等叫
|
//等叫
|
||||||
async function toggleWait(item) {
|
async function toggleWait(item) {
|
||||||
@@ -597,7 +601,6 @@
|
|||||||
return ((goodsTotalPrice - discountSaleAmount.value) || 0).toFixed(2)
|
return ((goodsTotalPrice - discountSaleAmount.value) || 0).toFixed(2)
|
||||||
})
|
})
|
||||||
const allPrice = computed(() => {
|
const allPrice = computed(() => {
|
||||||
console.log(goodsPrice.value, '调试2121');
|
|
||||||
const n = goodsPrice.value * 1 + $seatFee.totalAmount
|
const n = goodsPrice.value * 1 + $seatFee.totalAmount
|
||||||
return n.toFixed(2)
|
return n.toFixed(2)
|
||||||
// const goodsTotalPrice = goods.list.reduce((prve, cur) => {
|
// const goodsTotalPrice = goods.list.reduce((prve, cur) => {
|
||||||
@@ -615,8 +618,10 @@
|
|||||||
}, 0)
|
}, 0)
|
||||||
return goodsTotalPrice - allPrice.value
|
return goodsTotalPrice - allPrice.value
|
||||||
} else {
|
} else {
|
||||||
|
console.log(discountSaleAmount.value,'优惠金额')
|
||||||
return (discountSaleAmount.value)
|
return (discountSaleAmount.value)
|
||||||
}
|
}
|
||||||
|
console.log(discountSaleAmount.value,'优惠金额1')
|
||||||
return (goodsTotalPrice + discountSaleAmount.value * 1).toFixed(2)
|
return (goodsTotalPrice + discountSaleAmount.value * 1).toFixed(2)
|
||||||
})
|
})
|
||||||
|
|
||||||
|
|||||||
@@ -6,7 +6,7 @@
|
|||||||
<view class="u-absolute goods bg-fff">
|
<view class="u-absolute goods bg-fff">
|
||||||
<view
|
<view
|
||||||
class="u-p-t-32 color-666 border-bottom bg-fff u-absolute total u-p-r-28 u-p-b-32 u-p-l-28 u-flex u-row-between">
|
class="u-p-t-32 color-666 border-bottom bg-fff u-absolute total u-p-r-28 u-p-b-32 u-p-l-28 u-flex u-row-between">
|
||||||
<view>已添加{{goodsNumber}}件商品</view>
|
<view>已添加{{goodsNumber.toFixed(0)}}件商品</view>
|
||||||
<view class="color-666">
|
<view class="color-666">
|
||||||
<uni-icons color="#666" type="trash"></uni-icons>
|
<uni-icons color="#666" type="trash"></uni-icons>
|
||||||
<text class="u-m-l-10" @tap="setModalShow('clear',true)">清空</text>
|
<text class="u-m-l-10" @tap="setModalShow('clear',true)">清空</text>
|
||||||
|
|||||||
Reference in New Issue
Block a user