From 0c38ffcc3a153239c7010d8b470a5c6e9ba60588 Mon Sep 17 00:00:00 2001 From: songguoqiang Date: Tue, 11 Feb 2025 16:11:39 +0800 Subject: [PATCH] =?UTF-8?q?YT-1928=EF=BC=9A=E8=A1=A5=E7=BB=99=E5=93=81?= =?UTF-8?q?=E5=8F=91=E6=96=99=E6=89=93=E5=8D=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../labelManage/supplyLabel/index.vue | 42 +++++++++++-------- 1 file changed, 24 insertions(+), 18 deletions(-) diff --git a/src/views/wms/basicDataManage/labelManage/supplyLabel/index.vue b/src/views/wms/basicDataManage/labelManage/supplyLabel/index.vue index 4f0932950..dd38328f1 100644 --- a/src/views/wms/basicDataManage/labelManage/supplyLabel/index.vue +++ b/src/views/wms/basicDataManage/labelManage/supplyLabel/index.vue @@ -177,8 +177,7 @@ const butttondata = (row) => { ] } const BASE_URL = getJmreportBaseUrl() -const src = ref(BASE_URL + '/jmreport/view/924811818898698240?token=' + getAccessToken()) -const srcPoint = ref(BASE_URL + '/jmreport/view/940818992169918464?token=' + getAccessToken()) +const srcPoint = ref(BASE_URL + '/jmreport/view/1049193724513161216?token=' + getAccessToken()) // 列表-操作按钮事件 const buttonTableClick = async (val, row) => { if (val == 'edit') { // 编辑 @@ -225,10 +224,10 @@ const openForm = async(type: string, row?: any) => { 'pageNo': 1, 'by': 'ASC', } - const data = await LocationApi.getLocationPage(param) - let locationCode = data[0]?.code; + const data = await LocationApi.getLocationPage(param) + let locationCode = data.list[0].code; console.log('row',row); - row.locationCode = locationCode; + // row.locationCode = locationCode; basicFormRef.value.open(type, row) } @@ -334,13 +333,18 @@ const handleDisable = async (id: number) => { } catch {} } const handlePoint = async (row) => { + // let rows = [row.id]; // 将单个 row.id 转换成数组 + // await PackageApi.batchPrintingLable(rows.join(',')).then(res => { + // window.open(srcPoint.value + '&relateNumber=' + res); + // message.success('创建标签成功'); + // }).catch(err => { + // message.error('创建标签失败'); + // }); + let rows = [row.id]; // 将单个 row.id 转换成数组 - await PackageApi.batchPrintingLable(rows.join(',')).then(res => { - window.open(srcPoint.value + '&relateNumber=' + res); + window.open(srcPoint.value + '&relateNumber=' + rows.join(',')); message.success('创建标签成功'); - }).catch(err => { - message.error('创建标签失败'); - }); + } // 批量打印 @@ -350,14 +354,16 @@ const handleSelectionPoint = async ()=>{ rows = [...rows,...item.selectionRows.map(item1=>item1.id)] }) console.log('批量打印',rows.join(',')) - await PackageApi.batchPrintingLable(rows.join(',')).then(res => { - console.log(res) - window.open(srcPoint.value+'&relateNumber='+res) - message.success('创建标签成功') - }).catch(err => { - console.log(err) - message.error('创建标签失败') - }) + window.open(srcPoint.value + '&relateNumber=' + rows.join(',')); + message.success('创建标签成功'); + // await PackageApi.batchPrintingLable(rows.join(',')).then(res => { + // console.log(res) + // window.open(srcPoint.value+'&relateNumber='+res) + // message.success('创建标签成功') + // }).catch(err => { + // console.log(err) + // message.error('创建标签失败') + // }) } const selectionRows = ref([])