|
|
@ -66,6 +66,8 @@ import { PackageoverMain,PackageoverMainRules, PackageoverDetail, PackageoverDet |
|
|
|
import * as PackageoverRecordMainApi from '@/api/wms/packageoverRecordMain' |
|
|
|
import * as PackageoverRecordDetailApi from '@/api/wms/packageoverRecordDetail' |
|
|
|
import * as defaultButtons from '@/utils/disposition/defaultButtons' |
|
|
|
import * as PackageApi from '@/api/wms/package' |
|
|
|
import { getAccessToken } from '@/utils/auth' |
|
|
|
|
|
|
|
// 翻包记录 |
|
|
|
defineOptions({ name: 'PackageoverMain' }) |
|
|
@ -118,11 +120,42 @@ const buttonBaseClick = (val, item) => { |
|
|
|
|
|
|
|
// 列表-操作按钮 |
|
|
|
const butttondata = (row) => { |
|
|
|
return [] |
|
|
|
return [defaultButtons.mainListPointBtn(null)] // 标签打印 |
|
|
|
} |
|
|
|
|
|
|
|
// 列表-操作按钮事件 |
|
|
|
const buttonTableClick = async (val, row) => { |
|
|
|
if (val == 'point') { // 标签打印 |
|
|
|
handlePoint(row) |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
const BASE_URL = import.meta.env.VITE_JMREPORT_BASE_URL |
|
|
|
const labelType = ref('') // 标签类别 采购还是制造等 |
|
|
|
// 标签打印 |
|
|
|
const handlePoint = async (row) => { |
|
|
|
// 查询是否已创建过标签 |
|
|
|
await PackageApi.getPackagePage({ |
|
|
|
requestNumber: row.number |
|
|
|
}).then((res) => { |
|
|
|
if(res.list.length > 0) { |
|
|
|
if (res.list[0].productionLineCode != null) { |
|
|
|
labelType.value = 'zz' |
|
|
|
} else { |
|
|
|
labelType.value = 'cg' |
|
|
|
} |
|
|
|
} |
|
|
|
}).catch(err => { |
|
|
|
console.log(err) |
|
|
|
}) |
|
|
|
// 判断是采购还是制造 |
|
|
|
if (labelType.value == 'cg') { |
|
|
|
const src = ref(BASE_URL + '/jmreport/view/922729953438072832?token=' + getAccessToken()) |
|
|
|
window.open(src.value+'&request_number='+row.number) |
|
|
|
} else { |
|
|
|
const src = ref(BASE_URL + '/jmreport/view/922734157577715712?token=' + getAccessToken()) |
|
|
|
window.open(src.value+'&request_number='+row.number) |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
/** 详情操作 */ |
|
|
|