优化小票打印
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
<!-- 合并/转桌 -->
|
||||
<template>
|
||||
<el-dialog title="转桌/并桌" width="700px" v-model="visible" @closed="onClose" top="10vh">
|
||||
<el-dialog title="转桌/并桌" width="700px" v-model="visible" @closed="onClose" top="3vh">
|
||||
<div class="scroll_y">
|
||||
<el-form :model="form" ref="formRef" :rules="rules" label-position="top">
|
||||
<el-form-item label="转入台桌" prop="targetTableId">
|
||||
@@ -15,15 +15,24 @@
|
||||
<el-radio :value="true" border>并桌(并台会将全部购物车商品转入)</el-radio>
|
||||
</el-radio-group>
|
||||
</el-form-item>
|
||||
<el-form-item label="转入商品" prop="cartIds" v-if="!form.isFull">
|
||||
<div v-for="item in props.data" style="width: 100%;">
|
||||
<div>{{ `第${item.placeNum}次下单` }}</div>
|
||||
<el-table ref="tableRefs" :data="item.info" border>
|
||||
<el-form-item label="购物车商品" v-if="!form.isFull">
|
||||
<el-table ref="cartTableRefs" :data="goodsStore.cartList" border stripe>
|
||||
<el-table-column type="selection" align="center" width="50px"></el-table-column>
|
||||
<el-table-column label="名称" prop="product_name"></el-table-column>
|
||||
<el-table-column label="数量" prop="number"></el-table-column>
|
||||
<el-table-column label="规格" prop="sku_name"></el-table-column>
|
||||
<el-table-column label="价格" prop="lowPrice"></el-table-column>
|
||||
</el-table>
|
||||
</el-form-item>
|
||||
<el-form-item label="已下单商品" prop="cartIds" v-if="!form.isFull">
|
||||
<div v-for="item in goodsStore.orderList" style="width: 100%;">
|
||||
<div>{{ `第${item.orderNum}次下单` }}</div>
|
||||
<el-table ref="orderTableRefs" :data="item.goods" border stripe>
|
||||
<el-table-column type="selection" align="center" width="50px"></el-table-column>
|
||||
<el-table-column label="名称" prop="name"></el-table-column>
|
||||
<el-table-column label="名称" prop="product_name"></el-table-column>
|
||||
<el-table-column label="数量" prop="number"></el-table-column>
|
||||
<el-table-column label="规格" prop="skuName"></el-table-column>
|
||||
<el-table-column label="价格" prop="salePrice"></el-table-column>
|
||||
<el-table-column label="规格" prop="sku_name"></el-table-column>
|
||||
<el-table-column label="价格" prop="lowPrice"></el-table-column>
|
||||
</el-table>
|
||||
</div>
|
||||
</el-form-item>
|
||||
@@ -41,29 +50,20 @@
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import { onMounted, reactive, ref } from 'vue'
|
||||
import { shopTable } from '@/api/account.js'
|
||||
import { queryShopTable } from '@/api/table.js'
|
||||
import { onMounted, ref } from 'vue'
|
||||
import { orderSwitcht } from '@/api/product.js'
|
||||
import { useGoods } from '@/store/goods.js'
|
||||
import { useUser } from "@/store/user.js"
|
||||
import { useGlobal } from '@/store/global.js'
|
||||
import { ElMessage } from 'element-plus'
|
||||
|
||||
const store = useUser()
|
||||
const global = useGlobal()
|
||||
|
||||
const visible = ref(false)
|
||||
|
||||
const props = reactive({
|
||||
data: []
|
||||
})
|
||||
import { shopTable } from "@/api/account.js";
|
||||
|
||||
const emits = defineEmits(['success'])
|
||||
|
||||
const tableRefs = ref([])
|
||||
|
||||
const list = ref([])
|
||||
|
||||
const store = useUser()
|
||||
const goodsStore = useGoods()
|
||||
const visible = ref(false)
|
||||
const cartTableRefs = ref(null)
|
||||
const orderTableRefs = ref(null)
|
||||
const loading = ref(false)
|
||||
const formRef = ref(null)
|
||||
const resetForm = ref({})
|
||||
@@ -111,10 +111,8 @@ const tableList = ref([])
|
||||
async function queryShopTableAjax() {
|
||||
try {
|
||||
const res = await shopTable({
|
||||
areaId: store.userInfo.shopId,
|
||||
tableCode: '',
|
||||
status: 'using',
|
||||
name: ''
|
||||
isBind: true
|
||||
})
|
||||
tableList.value = res.records
|
||||
} catch (error) {
|
||||
@@ -144,7 +142,7 @@ function confirmHandle() {
|
||||
loading.value = false
|
||||
|
||||
// 更新台桌信息
|
||||
global.setOrderTable(tableList.value.find(item => item.qrcode == form.value.targetTableId))
|
||||
// 在这里做点什么
|
||||
|
||||
visible.value = false
|
||||
|
||||
@@ -162,8 +160,7 @@ function onClose() {
|
||||
formRef.value.resetFields()
|
||||
}
|
||||
|
||||
function show(data) {
|
||||
props.data = data
|
||||
function show() {
|
||||
visible.value = true
|
||||
queryShopTableAjax()
|
||||
}
|
||||
@@ -181,7 +178,7 @@ onMounted(() => {
|
||||
$btmH: 50px;
|
||||
|
||||
.scroll_y {
|
||||
height: 50vh;
|
||||
height: 68vh;
|
||||
overflow-y: auto;
|
||||
padding-bottom: $btmH;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user