对接完毕下单
This commit is contained in:
@@ -1,8 +1,9 @@
|
||||
<!-- 结算订单 -->
|
||||
|
||||
<template>
|
||||
<el-drawer size="100%" :with-header="false" direction="btt" v-model="dialogVisible">
|
||||
<div class="drawer_wrap">
|
||||
<div class="cart_list" style="width: 500px;">
|
||||
<div class="cart_list">
|
||||
<div class="nav_wrap card">
|
||||
<div class="return" @click="dialogVisible = false">
|
||||
<el-icon class="icon">
|
||||
@@ -10,7 +11,7 @@
|
||||
</el-icon>
|
||||
</div>
|
||||
<div class="info">
|
||||
<div class="master_id">#16</div>
|
||||
<div class="master_id">{{ props.masterId }}</div>
|
||||
<div class="btm">
|
||||
<span class="p">服务员:溜溜</span>
|
||||
<span class="t">03-01 09:05</span>
|
||||
@@ -41,17 +42,17 @@
|
||||
</div>
|
||||
</div>
|
||||
<div class="footer">
|
||||
<el-button icon="Edit"></el-button>
|
||||
<!-- <el-button icon="Edit"></el-button> -->
|
||||
<div class="button">
|
||||
<el-checkbox v-model="isPrint" border label="打印结算小票" style="width: 100%;" />
|
||||
</div>
|
||||
<div class="print">
|
||||
<el-button type="primary">打印预结单</el-button>
|
||||
<el-button type="primary" @click="printHandle">打印预结单</el-button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="pay_wrap">
|
||||
<payCard />
|
||||
<payCard :amount="props.amount" :orderId="props.orderId" @paySuccess="paySuccess" />
|
||||
</div>
|
||||
</div>
|
||||
</el-drawer>
|
||||
@@ -59,7 +60,11 @@
|
||||
|
||||
<script setup>
|
||||
import { ref } from 'vue'
|
||||
import payCard from '@/components/payCard.vue'
|
||||
import payCard from '@/components/payCard/payCard.vue'
|
||||
|
||||
import { ipcRenderer } from 'electron'
|
||||
|
||||
const emit = defineEmits('paySuccess')
|
||||
|
||||
const dialogVisible = ref(false)
|
||||
const props = defineProps({
|
||||
@@ -73,12 +78,38 @@ const props = defineProps({
|
||||
},
|
||||
remark: {
|
||||
type: String,
|
||||
default: 0
|
||||
default: ''
|
||||
},
|
||||
orderId: {
|
||||
type: [String, Number],
|
||||
default: ''
|
||||
},
|
||||
masterId: {
|
||||
type: String,
|
||||
default: ''
|
||||
}
|
||||
})
|
||||
|
||||
const isPrint = ref(true)
|
||||
|
||||
function printHandle() {
|
||||
if (!isPrint.value) return
|
||||
// const data = {
|
||||
// shop_name: '测试打印',
|
||||
// carts: props.cart,
|
||||
// amount: props.amount,
|
||||
// remark: props.remark
|
||||
// }
|
||||
ipcRenderer.sendSync('printerInfoSync', '测试打印')
|
||||
}
|
||||
|
||||
// 订单已支付
|
||||
function paySuccess() {
|
||||
dialogVisible.value = false
|
||||
printHandle()
|
||||
emit('paySuccess')
|
||||
}
|
||||
|
||||
function show() {
|
||||
dialogVisible.value = true
|
||||
}
|
||||
@@ -93,6 +124,7 @@ defineExpose({
|
||||
background-color: #efefef !important;
|
||||
}
|
||||
</style>
|
||||
|
||||
<style scoped lang="scss">
|
||||
.drawer_wrap {
|
||||
width: 100%;
|
||||
@@ -101,6 +133,8 @@ defineExpose({
|
||||
padding: 20px 0;
|
||||
|
||||
.cart_list {
|
||||
flex: 1;
|
||||
|
||||
.nav_wrap {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
@@ -251,7 +285,7 @@ defineExpose({
|
||||
}
|
||||
|
||||
.pay_wrap {
|
||||
flex: 1;
|
||||
flex: 1.5;
|
||||
padding-left: 20px;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user