|
|
@ -85,7 +85,7 @@ |
|
|
|
}]" |
|
|
|
:otherHeadButttonData="[{ |
|
|
|
label: '打印', |
|
|
|
name: 'kuozhan', |
|
|
|
name: 'printing', |
|
|
|
hide: false, |
|
|
|
type: 'primary', |
|
|
|
// icon: 'ep:operation', |
|
|
@ -131,6 +131,7 @@ |
|
|
|
import * as defaultButtons from '@/utils/disposition/defaultButtons' |
|
|
|
import * as SupplierApi from '@/api/wms/supplier' |
|
|
|
import { Supplier } from '../../../basicDataManage/supplierManage/supplier/supplier.data' |
|
|
|
import { getAccessToken } from '@/utils/auth' |
|
|
|
|
|
|
|
defineOptions({ name: 'SupplierinvoiceRequestMain' }) |
|
|
|
|
|
|
@ -349,9 +350,11 @@ const handleImport = () => { |
|
|
|
const { wsCache } = useCache() |
|
|
|
/** 详情操作 */ |
|
|
|
const detailRef = ref() |
|
|
|
const clicKRowId = ref(); |
|
|
|
const openDetail = (row : any, titleName : any, titleValue : any) => { |
|
|
|
const departmentCode = wsCache.get(CACHE_KEY.DEPT).find((account) => account.id == row.departmentCode)?.name |
|
|
|
if (departmentCode) row.departmentCode = JSON.parse(JSON.stringify(departmentCode)) |
|
|
|
clicKRowId.value = row.id |
|
|
|
detailRef.value.openDetail(row, titleName, titleValue) |
|
|
|
} |
|
|
|
|
|
|
@ -584,8 +587,20 @@ const importSuccess = () => { |
|
|
|
|
|
|
|
// 详情--头部按钮事件 |
|
|
|
const detailButtonBaseClick = (val, item) => { |
|
|
|
console.log(1111) |
|
|
|
console.log("点击的按钮",val) |
|
|
|
if(val == 'printing'){ |
|
|
|
// 单据打印 |
|
|
|
handleDocumentPrint(clicKRowId.value) |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
// 单据打印 |
|
|
|
const BASE_URL = import.meta.env.VITE_JMREPORT_BASE_URL |
|
|
|
const documentSrc = ref(BASE_URL + '/jmreport/view/936875675614240768?token=' + getAccessToken()) |
|
|
|
const handleDocumentPrint = async (id) => { |
|
|
|
window.open(documentSrc.value + '&id=' + id) |
|
|
|
} |
|
|
|
|
|
|
|
/** 初始化 **/ |
|
|
|
onMounted(async () => { |
|
|
|
getList() |
|
|
|