新增订单打印
This commit is contained in:
@@ -72,6 +72,7 @@
|
||||
</template>
|
||||
<template #operate="scope">
|
||||
<div>
|
||||
<el-button link @click="printOrderHandle(scope.row)">打印</el-button>
|
||||
<el-button link @click="showdetail(scope.row)">详情</el-button>
|
||||
<el-button v-if="scope.row.status == 'done'" link>开票</el-button>
|
||||
<el-button v-if="scope.row.status == 'unpaid'" type="primary" @click="toPayOrder(scope.row)">
|
||||
@@ -155,6 +156,19 @@ onMounted(() => {
|
||||
}
|
||||
});
|
||||
|
||||
// 打印订单
|
||||
async function printOrderHandle(order: getListResponse) {
|
||||
try {
|
||||
await orderApi.printOrder({
|
||||
id: order.id,
|
||||
type: 0
|
||||
});
|
||||
ElMessage.success("打印成功");
|
||||
} catch (error) {
|
||||
ElMessage.error("打印失败,请稍后重试");
|
||||
}
|
||||
}
|
||||
|
||||
// 新增
|
||||
async function handleAddClick() {
|
||||
addModalRef.value?.setModalVisible();
|
||||
|
||||
Reference in New Issue
Block a user