feat:打印消息缓存

This commit is contained in:
houjunxiang
2025-11-25 14:36:18 +08:00
parent 44398c6004
commit 96cc747150
3 changed files with 48 additions and 13 deletions

View File

@@ -48,6 +48,7 @@
<up-button
v-if="sampleData.id"
:disabled="sampleData.returnStatus !== 'completed'"
:loading="btnLoading"
type="primary"
style="width: 90%"
text="打印归库标签"
@@ -110,8 +111,13 @@ async function getSampleDetail() {
sampleData.value = list[0]
}
}
let btnLoading = ref(false)
function handlePrint() {
nx.$print.print(sampleData.value)
btnLoading.value = true
nx.$print.getPrintTemplateAndPrint(sampleData.value.id, () => {
uni.showToast({ title: '已打印', icon: 'success' })
btnLoading.value = false
})
}
</script>