代客下单更新
This commit is contained in:
@@ -48,6 +48,7 @@
|
||||
function changeCauses(item) {
|
||||
let prve=form.remark?',':''
|
||||
form.remark +=prve+item.name
|
||||
console.log(form.remark);
|
||||
}
|
||||
|
||||
const causes = reactive([{
|
||||
|
||||
@@ -221,7 +221,7 @@
|
||||
|
||||
<model-discount title="菜品打折/减免" :ref="setModel" name="discount" :price="allPrice"></model-discount>
|
||||
<give-food title="赠菜" :ref="setModel" name="giveFood"></give-food>
|
||||
<my-remark @confirm="goodsOneRemarkConfirm" title="单品备注" :ref="setModel" name="remark"></my-remark>
|
||||
<one-remark @confirm="goodsOneRemarkConfirm" title="单品备注" :ref="setModel" name="remark"></one-remark>
|
||||
<edit-discount title="优惠金额" :ref="setModel" name="editMoney" :price="allPrice"></edit-discount>
|
||||
</view>
|
||||
|
||||
@@ -240,10 +240,9 @@
|
||||
computed,
|
||||
watch
|
||||
} from 'vue';
|
||||
import myButton from '@/components/my-components/my-button'
|
||||
import modelDiscount from './components/discount'
|
||||
import giveFood from './components/give-food'
|
||||
import myRemark from './components/remark'
|
||||
import oneRemark from './components/remark'
|
||||
import editDiscount from '@/pagesCreateOrder/components/edit-discount.vue'
|
||||
import go from '@/commons/utils/go.js';
|
||||
import {
|
||||
@@ -273,10 +272,12 @@
|
||||
}
|
||||
|
||||
function showModel(key, index) {
|
||||
modelData.data =goods.list[index]
|
||||
modelData.selIndex =index
|
||||
modelData.data = goods.list[index]
|
||||
modelData.selIndex = index
|
||||
const model = models.get(key)
|
||||
model && model.open({remark:modelData.data.note})
|
||||
model && model.open({
|
||||
remark: modelData.data.note||''
|
||||
})
|
||||
}
|
||||
|
||||
function formatPrice(n) {
|
||||
@@ -398,11 +399,11 @@
|
||||
//监听桌台改变
|
||||
watch(() => table.value, (newval, oldval) => {
|
||||
if (newval && oldval) {
|
||||
Api.$choseTable({
|
||||
orderId: 4462,
|
||||
oldTableId: oldval.tableId,
|
||||
newTableId: newval.tableId,
|
||||
})
|
||||
// Api.$choseTable({
|
||||
// orderId: 4462,
|
||||
// oldTableId: oldval.tableId,
|
||||
// newTableId: newval.tableId,
|
||||
// })
|
||||
}
|
||||
})
|
||||
|
||||
@@ -510,9 +511,16 @@
|
||||
})
|
||||
} else {
|
||||
//后付
|
||||
uni.navigateBack({
|
||||
delta: 2
|
||||
})
|
||||
if (option.isCreateOrderToDetail) {
|
||||
go.to('PAGES_ORDER_DETAIL', {
|
||||
id: res.id
|
||||
})
|
||||
} else {
|
||||
uni.navigateBack({
|
||||
delta: 2
|
||||
})
|
||||
}
|
||||
|
||||
// return go.to('PAGES_ORDER_DETAIL', {
|
||||
// id: res.id
|
||||
// })
|
||||
@@ -531,7 +539,7 @@
|
||||
|
||||
//单品备注确认
|
||||
async function goodsOneRemarkConfirm(e) {
|
||||
const cart=goods.list[modelData.selIndex]
|
||||
const cart = goods.list[modelData.selIndex]
|
||||
await Api.$updateCart({
|
||||
cartId: cart.id,
|
||||
productId: cart.productId,
|
||||
@@ -540,11 +548,16 @@
|
||||
note: e.remark,
|
||||
num: cart.number // 0会删除此商品
|
||||
})
|
||||
cart.note= e.remark
|
||||
cart.note = e.remark
|
||||
}
|
||||
|
||||
function init() {
|
||||
|
||||
async function init() {
|
||||
await getTbShopInfo()
|
||||
await getCart()
|
||||
console.log($seatFee);
|
||||
if (!$seatFee.totalNumber) {
|
||||
updateChoseCount()
|
||||
}
|
||||
}
|
||||
|
||||
onLoad((opt) => {
|
||||
@@ -558,8 +571,7 @@
|
||||
}
|
||||
}
|
||||
init()
|
||||
getCart()
|
||||
getTbShopInfo()
|
||||
|
||||
// updateChoseCount()
|
||||
})
|
||||
|
||||
|
||||
Reference in New Issue
Block a user