diff --git a/src/views/wms/basicDataManage/labelManage/callmaterials/index.vue b/src/views/wms/basicDataManage/labelManage/callmaterials/index.vue index f3a4a5498..2d2bf5222 100644 --- a/src/views/wms/basicDataManage/labelManage/callmaterials/index.vue +++ b/src/views/wms/basicDataManage/labelManage/callmaterials/index.vue @@ -68,6 +68,7 @@ import ImportForm from '@/components/ImportForm/src/ImportForm.vue' import Detail from '@/components/Detail/src/Detail.vue' import { formatTime } from '@/utils/index' import { getAccessToken } from '@/utils/auth' +import * as PackageApi from '@/api/wms/package' defineOptions({ name: 'Callmaterials' }) @@ -233,7 +234,7 @@ const handleExport = async () => { } finally { exportLoading.value = false } - + } const BASE_URL = import.meta.env.VITE_JMREPORT_BASE_URL @@ -243,12 +244,19 @@ const handlePoint = async (row) => { window.open(src.value+'&relateNumber='+row.id) } // 批量打印 -const handleSelectionPoint = ()=>{ +const handleSelectionPoint = async ()=>{ let rows:any = [] selectionRows.value.forEach(item=>{ rows = [...rows,...item.selectionRows.map(item1=>item1.id)] }) - console.log('批量打印',rows) + console.log('批量打印',rows.join(',')) + await PackageApi.batchPrintingLable(rows.join(',')).then(res => { + console.log(res) + message.success('创建标签成功') + }).catch(err => { + console.log(err) + message.error('创建标签失败') + }) } /** 导入 */ const importFormRef = ref()