|
@@ -319,6 +319,25 @@
|
|
|
<p class="text-gray-600">正在支付中,请不要关闭或退出界面</p>
|
|
|
</div>
|
|
|
</el-dialog>
|
|
|
+ <el-dialog
|
|
|
+ v-model="takeNumberDialogVisible"
|
|
|
+ title="取餐号"
|
|
|
+ width="30%"
|
|
|
+ :close-on-click-modal="false"
|
|
|
+ >
|
|
|
+ <el-input
|
|
|
+ v-model="takeNumber"
|
|
|
+ placeholder="请输入取餐号"
|
|
|
+ maxlength="10"
|
|
|
+ show-word-limit
|
|
|
+ />
|
|
|
+ <template #footer>
|
|
|
+ <span class="dialog-footer">
|
|
|
+ <el-button @click="takeNumberDialogVisible = false">取消</el-button>
|
|
|
+ <el-button type="primary" @click="confirmSubmit">确认结算</el-button>
|
|
|
+ </span>
|
|
|
+ </template>
|
|
|
+ </el-dialog>
|
|
|
</template>
|
|
|
|
|
|
<script setup lang="ts">
|
|
@@ -384,6 +403,9 @@ const params = reactive({
|
|
|
couponAmount: '-',
|
|
|
diningMethods: 1 // 就餐方式:1店内就餐 2打包外带
|
|
|
})
|
|
|
+// 添加取餐号相关的变量
|
|
|
+const takeNumberDialogVisible = ref(false)
|
|
|
+const takeNumber = ref('')
|
|
|
const submit = () => {
|
|
|
//出单
|
|
|
if (data.selectGoods.length == 0) {
|
|
@@ -394,11 +416,22 @@ const submit = () => {
|
|
|
feedback.alert('支付金额需大于0!')
|
|
|
return false
|
|
|
}
|
|
|
+ // 显示取餐号输入弹框
|
|
|
+ takeNumber.value = ''
|
|
|
+ takeNumberDialogVisible.value = true
|
|
|
+}
|
|
|
+// 添加确认提交函数
|
|
|
+const confirmSubmit = () => {
|
|
|
+ if (!takeNumber.value) {
|
|
|
+ feedback.msgError('请输入取餐号')
|
|
|
+ return
|
|
|
+ }
|
|
|
feedback.loading('正在出单...')
|
|
|
orderSubmit({
|
|
|
...params,
|
|
|
userId: params.userId || null,
|
|
|
- couponId: params.couponId || null
|
|
|
+ couponId: params.couponId || null,
|
|
|
+ mealCode: takeNumber.value
|
|
|
}).then(() => {
|
|
|
// data.selectGoods.length = 0
|
|
|
// orderData.priceSum = 0
|