代客下单去除不选择人数下单
This commit is contained in:
@@ -84,7 +84,7 @@
|
|||||||
<picker @change="userNumberChange" :value="userNumbers.defaultCateIndex"
|
<picker @change="userNumberChange" :value="userNumbers.defaultCateIndex"
|
||||||
:range="userNumbers.list">
|
:range="userNumbers.list">
|
||||||
<view class="u-m-t-24 u-flex u-row-between ">
|
<view class="u-m-t-24 u-flex u-row-between ">
|
||||||
<view class="color-333">{{userNumbers.defaultCateIndex||''}}</view>
|
<view class="color-333">{{userNumbers.defaultCateIndex*1+1+'人'}}</view>
|
||||||
<uni-icons type="right" color="#999" size="16"></uni-icons>
|
<uni-icons type="right" color="#999" size="16"></uni-icons>
|
||||||
</view>
|
</view>
|
||||||
</picker>
|
</picker>
|
||||||
@@ -289,9 +289,10 @@
|
|||||||
//用餐人数
|
//用餐人数
|
||||||
const userNumbers = reactive({
|
const userNumbers = reactive({
|
||||||
list: new Array(100).fill(1).map((v, index) => {
|
list: new Array(100).fill(1).map((v, index) => {
|
||||||
return index === 0 ? '无' : index + '人'
|
// return index === 0 ? '无' : index + '人'
|
||||||
|
return (index+1)+ '人'
|
||||||
}),
|
}),
|
||||||
defaultCateIndex: 1,
|
defaultCateIndex: 0,
|
||||||
})
|
})
|
||||||
watch(() => userNumbers.defaultCateIndex, (newval) => {
|
watch(() => userNumbers.defaultCateIndex, (newval) => {
|
||||||
console.log(newval);
|
console.log(newval);
|
||||||
@@ -306,15 +307,16 @@
|
|||||||
const res = await Api.$choseCount({
|
const res = await Api.$choseCount({
|
||||||
masterId: option.masterId,
|
masterId: option.masterId,
|
||||||
tableId: table.value.tableId,
|
tableId: table.value.tableId,
|
||||||
num: userNumbers.defaultCateIndex,
|
num: userNumbers.defaultCateIndex+1,
|
||||||
})
|
})
|
||||||
Object.assign($seatFee, res)
|
Object.assign($seatFee, res)
|
||||||
userNumbers.defaultCateIndex = res.totalNumber
|
userNumbers.defaultCateIndex = res.totalNumber-1
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
function userNumberChange(e) {
|
function userNumberChange(e) {
|
||||||
|
console.log(e);
|
||||||
userNumbers.defaultCateIndex = e.detail.value
|
userNumbers.defaultCateIndex = e.detail.value
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -465,7 +467,7 @@
|
|||||||
}
|
}
|
||||||
goods.list = getNowCart(records)
|
goods.list = getNowCart(records)
|
||||||
if (seatFee && seatFee.totalNumber) {
|
if (seatFee && seatFee.totalNumber) {
|
||||||
userNumbers.defaultCateIndex = seatFee.totalNumber || 1
|
userNumbers.defaultCateIndex = seatFee.totalNumber-1 || 0
|
||||||
Object.assign($seatFee, seatFee)
|
Object.assign($seatFee, seatFee)
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -497,7 +499,7 @@
|
|||||||
await Api.$choseCount({
|
await Api.$choseCount({
|
||||||
masterId: option.masterId,
|
masterId: option.masterId,
|
||||||
tableId: table.value.tableId,
|
tableId: table.value.tableId,
|
||||||
num: userNumbers.defaultCateIndex,
|
num: userNumbers.defaultCateIndex+1,
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
// updateChoseCount()
|
// updateChoseCount()
|
||||||
|
|||||||
@@ -650,6 +650,7 @@
|
|||||||
productId,
|
productId,
|
||||||
skuId
|
skuId
|
||||||
})
|
})
|
||||||
|
infoBox.showToast('添加成功')
|
||||||
cars.push({
|
cars.push({
|
||||||
...cartGoods,
|
...cartGoods,
|
||||||
specSnap: sku.specSnap
|
specSnap: sku.specSnap
|
||||||
@@ -754,6 +755,7 @@
|
|||||||
productId,
|
productId,
|
||||||
skuId
|
skuId
|
||||||
})
|
})
|
||||||
|
infoBox.showToast('添加成功')
|
||||||
$goods.chooseNumber = num
|
$goods.chooseNumber = num
|
||||||
cars.push(cartGoods)
|
cars.push(cartGoods)
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user