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 BASE_URL = getJmreportBaseUrl()
const src = ref(BASE_URL + '/jmreport/view/924811818898698240?token=' + getAccessToken()) const srcPoint = ref(BASE_URL + '/jmreport/view/1049193724513161216?token=' + getAccessToken())
const srcPoint = ref(BASE_URL + '/jmreport/view/940818992169918464?token=' + getAccessToken())
// - // -
const buttonTableClick = async (val, row) => { const buttonTableClick = async (val, row) => {
if (val == 'edit') { // if (val == 'edit') { //
@ -226,9 +225,9 @@ const openForm = async(type: string, row?: any) => {
'by': 'ASC', 'by': 'ASC',
} }
const data = await LocationApi.getLocationPage(param) const data = await LocationApi.getLocationPage(param)
let locationCode = data[0]?.code; let locationCode = data.list[0].code;
console.log('row',row); console.log('row',row);
row.locationCode = locationCode; // row.locationCode = locationCode;
basicFormRef.value.open(type, row) basicFormRef.value.open(type, row)
} }
@ -334,13 +333,18 @@ const handleDisable = async (id: number) => {
} catch {} } catch {}
} }
const handlePoint = async (row) => { 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 let rows = [row.id]; // row.id
await PackageApi.batchPrintingLable(rows.join(',')).then(res => { window.open(srcPoint.value + '&relateNumber=' + rows.join(','));
window.open(srcPoint.value + '&relateNumber=' + res);
message.success('创建标签成功'); message.success('创建标签成功');
}).catch(err => {
message.error('创建标签失败');
});
} }
// //
@ -350,14 +354,16 @@ const handleSelectionPoint = async ()=>{
rows = [...rows,...item.selectionRows.map(item1=>item1.id)] rows = [...rows,...item.selectionRows.map(item1=>item1.id)]
}) })
console.log('批量打印',rows.join(',')) console.log('批量打印',rows.join(','))
await PackageApi.batchPrintingLable(rows.join(',')).then(res => { window.open(srcPoint.value + '&relateNumber=' + rows.join(','));
console.log(res) message.success('创建标签成功');
window.open(srcPoint.value+'&relateNumber='+res) // await PackageApi.batchPrintingLable(rows.join(',')).then(res => {
message.success('创建标签成功') // console.log(res)
}).catch(err => { // window.open(srcPoint.value+'&relateNumber='+res)
console.log(err) // message.success('')
message.error('创建标签失败') // }).catch(err => {
}) // console.log(err)
// message.error('')
// })
} }
const selectionRows = ref<any>([]) const selectionRows = ref<any>([])

Loading…
Cancel
Save