代客下单增加无台桌下单

This commit is contained in:
2024-10-25 18:09:30 +08:00
parent 1de0a53abe
commit 5fa402dca2
5 changed files with 185 additions and 91 deletions

View File

@@ -63,8 +63,9 @@
</view>
<up-modal title="提示" content="是否清空全部已添加的商品?" :show="modal.clear" showCancelButton closeOnClickOverlay @confirm="confirmModelConfirm"
@cancel="setModalShow('clear',false)" @close="setModalShow('clear',false)" width="300px"></up-modal>
<up-modal title="提示" content="是否清空全部已添加的商品?" :show="modal.clear" showCancelButton closeOnClickOverlay
@confirm="confirmModelConfirm" @cancel="setModalShow('clear',false)" @close="setModalShow('clear',false)"
width="300px"></up-modal>
</view>
</template>
@@ -114,7 +115,7 @@
})
const modal = reactive({
key: '',
clear:false
clear: false
})
function confirmModelConfirm() {
@@ -124,7 +125,7 @@
}
function setModalShow(key = 'show', show = true) {
if (key == 'clear'&&show&&props.data.length<=0) {
if (key == 'clear' && show && props.data.length <= 0) {
return infoBox.showToast('购物车是空的!')
}
modal.key = key
@@ -132,7 +133,7 @@
console.log(modal);
}
const edmits = defineEmits(['clear', 'updateNumber'])
@@ -163,6 +164,13 @@
status,
type
} = props.table
if (props.table.tableId == '') {
go.to('PAGES_CONFIRM_ORDER', {
masterId: props.masterId,
isCreateOrderToDetail: props.isCreateOrderToDetail ? 1 : 0
})
return
}
go.to('PAGES_CONFIRM_ORDER', {
masterId: props.masterId,
type,
@@ -200,7 +208,7 @@
}
function clear() {
setModalShow('clear',false)
setModalShow('clear', false)
edmits('clear')
hideGoods()
}

View File

@@ -53,6 +53,7 @@
toRefs,
watch
} from 'vue';
import util from '../util.js';
const props = defineProps({
img:{
type:Object,
@@ -99,7 +100,7 @@
}
return (
item.isPauseSale ||
(item.typeEnum !== "sku" && item.specList[0].stockNumber <= 0)
(item.typeEnum !== "sku" && item.isStock==1&& item.stockNumber <= 0)
);
})