Browse Source

YT-1928:补给品发料打印

intex_online20250220
songguoqiang 2 months ago
parent
commit
0c38ffcc3a
  1. 40
      src/views/wms/basicDataManage/labelManage/supplyLabel/index.vue

40
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') { //
@ -226,9 +225,9 @@ const openForm = async(type: string, row?: any) => {
'by': 'ASC',
}
const data = await LocationApi.getLocationPage(param)
let locationCode = data[0]?.code;
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<any>([])

Loading…
Cancel
Save