Browse Source

增加发票打印功能

master_hella_20240701
zhaoxuebing 6 months ago
parent
commit
a1c42a1491
  1. 19
      src/views/wms/supplierManage/supplierinvoice/supplierinvoiceRequestMain/index.vue

19
src/views/wms/supplierManage/supplierinvoice/supplierinvoiceRequestMain/index.vue

@ -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()

Loading…
Cancel
Save