diff --git a/src/views/stock/material/material-page.vue b/src/views/stock/material/material-page.vue
index e3a2141..d5831ce 100644
--- a/src/views/stock/material/material-page.vue
+++ b/src/views/stock/material/material-page.vue
@@ -80,10 +80,10 @@
title="条形码打印"
width="100%"
wrap-class-name="full-modal"
- @ok="openPrint = false"
- @cancel="openPrint = false"
+ @ok="closePrint"
+ @cancel="closePrint"
>
-
+
@@ -103,6 +103,7 @@
const materialPage = ref>()
const loading = ref(false)
const materialIdRef = ref()
+ const printcodeRef = ref()
// 加载数据的方法
const loadData = async (page = 1, size = 10) => {
@@ -233,10 +234,17 @@
})
}
+ // 打开打印弹窗
const showPrintModal = (applyId: number) => {
openPrint.value = true
materialIdRef.value = applyId
}
+
+ // 关闭打印弹窗
+ const closePrint = () => {
+ openPrint.value = false
+ printcodeRef.value.clearContent()
+ }