|
|
@ -32,6 +32,9 @@ |
|
|
|
<span>{{ row.number }}</span> |
|
|
|
</el-button> |
|
|
|
</template> |
|
|
|
<template #action="{ row }"> |
|
|
|
<ButtonBase :Butttondata="[defaultButtons.mainListPointBtn(null)]" @button-base-click="buttonTableClick($event,row)" /> |
|
|
|
</template> |
|
|
|
</Table> |
|
|
|
</ContentWrap> |
|
|
|
|
|
|
@ -42,9 +45,11 @@ |
|
|
|
|
|
|
|
<script setup lang="ts"> |
|
|
|
import download from '@/utils/download' |
|
|
|
import { getAccessToken } from '@/utils/auth' |
|
|
|
import { PackageoverRetrospect } from './packageoverRetrospect.data' |
|
|
|
import * as PackageoverRetrospectApi from '@/api/wms/packageoverRetrospect' |
|
|
|
import * as defaultButtons from '@/utils/disposition/defaultButtons' |
|
|
|
import * as PackageApi from '@/api/wms/package' |
|
|
|
|
|
|
|
defineOptions({ name: 'PackageoverRetrospect' }) |
|
|
|
|
|
|
@ -77,7 +82,39 @@ const HeadButttondata = [ |
|
|
|
defaultButtons.defaultFilterBtn(null), // 筛选 |
|
|
|
defaultButtons.defaultSetBtn(null), // 设置 |
|
|
|
] |
|
|
|
|
|
|
|
// 列表-操作按钮事件 |
|
|
|
const buttonTableClick = async (val, row) => { |
|
|
|
if (val == 'point') { // 标签打印 |
|
|
|
handlePoint(row) |
|
|
|
} |
|
|
|
} |
|
|
|
// 标签打印 |
|
|
|
const handlePoint = async (row) => { |
|
|
|
// 查询是否已创建过标签 |
|
|
|
let labelType = '' |
|
|
|
await PackageApi.getPackagePage({ |
|
|
|
requestNumber: row.number |
|
|
|
}).then((res) => { |
|
|
|
if(res.list.length > 0) { |
|
|
|
if (res.list[0].productionLineCode != null) { |
|
|
|
labelType = 'zz' |
|
|
|
} else { |
|
|
|
labelType = 'cg' |
|
|
|
} |
|
|
|
} |
|
|
|
}).catch(err => { |
|
|
|
console.log(err) |
|
|
|
}) |
|
|
|
const BASE_URL = import.meta.env.VITE_JMREPORT_BASE_URL |
|
|
|
// 判断是采购还是制造 |
|
|
|
if (labelType == '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) |
|
|
|
} |
|
|
|
} |
|
|
|
// 头部按钮事件 |
|
|
|
const buttonBaseClick = (val, item) => { |
|
|
|
if (val == 'export') { // 导出 |
|
|
|