feat: 打印机添加字段

This commit is contained in:
duan 2025-02-25 18:04:29 +08:00
parent 2e94b34a0e
commit 36cca7aa34
2 changed files with 14 additions and 31 deletions

View File

@ -4,11 +4,7 @@
<!-- <el-button type="primary" icon="el-icon-plus" @click="$refs.addCoupon.show()"> <!-- <el-button type="primary" icon="el-icon-plus" @click="$refs.addCoupon.show()">
添加优惠券 添加优惠券
</el-button> --> </el-button> -->
<el-button <el-button type="primary" icon="plus" @click="$router.push({ name: 'add_coupon', query: { type: 1 } })">
type="primary"
icon="plus"
@click="$router.push({ name: 'add_coupon', query: { type: 1 } })"
>
添加优惠券 添加优惠券
</el-button> </el-button>
</div> </div>
@ -19,8 +15,7 @@
<el-table-column label="使用门槛"> <el-table-column label="使用门槛">
<template v-slot="scope"> <template v-slot="scope">
{{ {{
`${scope.row.fullAmount}${ `${scope.row.fullAmount}${scope.row.discountAmount ? "减" + scope.row.discountAmount + "元" : ""
scope.row.discountAmount ? "减" + scope.row.discountAmount + "元" : ""
}` }`
}} }}
</template> </template>
@ -42,10 +37,7 @@
<div style="display: flex; align-items: center; justify-content: center"> <div style="display: flex; align-items: center; justify-content: center">
<div style="width: 30px">{{ scope.row.number - scope.row.leftNumber }}</div> <div style="width: 30px">{{ scope.row.number - scope.row.leftNumber }}</div>
<div style="margin: 0 10px">|</div> <div style="margin: 0 10px">|</div>
<div <div style="color: #3f9eff; cursor: pointer; flex-shrink: 0" @click="couponDetailsOpen(scope.row)">
style="color: #3f9eff; cursor: pointer; flex-shrink: 0"
@click="couponDetailsOpen(scope.row)"
>
详情 详情
</div> </div>
</div> </div>
@ -55,38 +47,28 @@
<el-table-column label="剩余" prop="leftNumber" /> <el-table-column label="剩余" prop="leftNumber" />
<el-table-column label="操作" width="150"> <el-table-column label="操作" width="150">
<template v-slot="scope"> <template v-slot="scope">
<el-button <el-button type="text" icon="el-icon-edit" @click="
type="text" $router.push({
icon="el-icon-edit" name: 'add_coupon',
@click=" query: { type: scope.row.type, id: scope.row.id },
$router.push({ })
name: 'add_coupon', ">
query: { type: scope.row.type, id: scope.row.id },
})
"
>
编辑 编辑
</el-button> </el-button>
<el-popconfirm title="确定删除吗?" @confirm="delTableHandle([scope.row.id])"> <!-- <el-popconfirm title="确定删除吗?" @confirm="delTableHandle([scope.row.id])">
<template #reference> <template #reference>
<el-button type="text" icon="el-icon-delete" style="margin-left: 20px !important"> <el-button type="text" icon="el-icon-delete" style="margin-left: 20px !important">
删除 删除
</el-button> </el-button>
</template> </template>
</el-popconfirm> </el-popconfirm> -->
</template> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>
</div> </div>
<div class="head-container"> <div class="head-container">
<el-pagination <el-pagination :total="tableData.total" :current-page="tableData.page" :page-size="tableData.size"
:total="tableData.total" layout="total, sizes, prev, pager, next, jumper" @current-change="paginationChange" @size-change="sizeChange" />
:current-page="tableData.page"
:page-size="tableData.size"
layout="total, sizes, prev, pager, next, jumper"
@current-change="paginationChange"
@size-change="sizeChange"
/>
</div> </div>
<couponDetails ref="couponDetails" @success="resetHandle" /> <couponDetails ref="couponDetails" @success="resetHandle" />
</div> </div>

View File

@ -32,6 +32,7 @@ export const options: optionObject = {
{ value: "all", label: '全部打印' }, { value: "all", label: '全部打印' },
{ value: "normal", label: '仅打印结账单「前台」' }, { value: "normal", label: '仅打印结账单「前台」' },
{ value: "one", label: '仅打印制作单「厨房」' }, { value: "one", label: '仅打印制作单「厨房」' },
{ value: "queue", label: '仅打印排队取号' },
], ],
printType: [ printType: [
{ label: "确认退款单", value: 'refund' }, { label: "确认退款单", value: 'refund' },