feat:打印和分析管理

This commit is contained in:
houjunxiang
2026-01-05 14:44:18 +08:00
parent 168026cc39
commit d246300f28
7 changed files with 32 additions and 17 deletions

View File

@@ -91,7 +91,7 @@ function handleReturnToStock() {
})
if (res.isPrint == 1) {
// 执行打印
nx.$print.getPrintTemplateAndPrint(res.id)
nx.$print.print({ ...res, printTemplate: 'returnLabel' })
}
})
}

View File

@@ -29,6 +29,7 @@
<script setup>
import { ref, computed } from 'vue'
import { useListData } from '@/nx/hooks/usePageListData'
import { onShow } from '@dcloudio/uni-app'
import nx from '@/nx'
const list = ref(['待处理', '已处理'])
@@ -53,10 +54,12 @@ const searchParams = computed(() => {
})
const { listData, scrollToLower, loadStatus, getInitData } = useListData({
searchParams,
api: nx.$api.sampleWarehouse.querySampleDispatchApply,
needInitListData: true
api: nx.$api.sampleWarehouse.querySampleDispatchApply
})
onShow(()=>{
getInitData()
})
function handleScrolltolower() {
scrollToLower()
}

View File

@@ -124,10 +124,8 @@ async function getSampleDetail() {
let btnLoading = ref(false)
function handlePrint() {
btnLoading.value = true
nx.$print.getPrintTemplateAndPrint(sampleData.value.id, () => {
uni.showToast({ title: '已打印', icon: 'success' })
btnLoading.value = false
})
nx.$print.print({ ...sampleData.value, printTemplate: 'returnLabel' })
btnLoading.value = false
}
</script>