|
|
@ -105,6 +105,25 @@ |
|
|
|
showDownload:true, |
|
|
|
hiddenDelete:true |
|
|
|
}" |
|
|
|
:otherHeadButttonData="[{ |
|
|
|
label: t('ts.打印明细'), |
|
|
|
name: 'printing', |
|
|
|
hide: false, |
|
|
|
type: 'primary', |
|
|
|
// icon: 'ep:operation', |
|
|
|
color: '', |
|
|
|
float:'left', |
|
|
|
hasPermi: '' |
|
|
|
},{ |
|
|
|
label: t('ts.导出明细'), |
|
|
|
name: 'export-detail', |
|
|
|
hide: false, |
|
|
|
type: 'primary', |
|
|
|
// icon: 'ep:operation', |
|
|
|
color: '', |
|
|
|
float:'left', |
|
|
|
hasPermi: '' |
|
|
|
}]" |
|
|
|
:isBasic="false" |
|
|
|
direction="horizontal" |
|
|
|
:column="3" |
|
|
@ -112,6 +131,7 @@ |
|
|
|
:detailAllSchemas="SupplierinvoiceRecordDetail.allSchemas" |
|
|
|
:detailAllSchemasRules="SupplierinvoiceRecordDetailRules" |
|
|
|
:apiPage="SupplierinvoiceRecordDetailApi.getSupplierinvoiceRecordDeatilPage" |
|
|
|
@buttonBaseClick="detailButtonBaseClick" |
|
|
|
> |
|
|
|
<template #differencePrice="{row}"> |
|
|
|
<span :class="{'red-text':row.differencePrice!=0}">{{ row.differencePrice }}</span> |
|
|
@ -205,6 +225,8 @@ const handleSelectionPoint = async ()=>{ |
|
|
|
window.open(srcPoint.value+'&ids='+rows.join(',')) |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// 列表-操作按钮 |
|
|
|
const butttondata = (row,$index) => { |
|
|
|
return [ |
|
|
@ -230,8 +252,10 @@ const buttonTableClick = async (val, row) => { |
|
|
|
const { wsCache } = useCache() |
|
|
|
/** 详情操作 */ |
|
|
|
const detailRef = ref() |
|
|
|
const clicKRowId = ref(); |
|
|
|
const openDetail = async (row: any, titleName: any, titleValue: any) => { |
|
|
|
console.log('openDetail',row) |
|
|
|
clicKRowId.value = row.id |
|
|
|
const departmentCode = wsCache.get(CACHE_KEY.DEPT).find((account) => account.id == row.departmentCode)?.name |
|
|
|
//获取申请中的masterId |
|
|
|
const { tableObject: requestTableObject, tableMethods:requestTableMethods } = useTable({ |
|
|
@ -289,6 +313,44 @@ const handleExport = async () => { |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
const detailButtonBaseClick = (val, item) => { |
|
|
|
console.log("点击的按钮",val) |
|
|
|
if(val == 'printing'){ |
|
|
|
// 单据打印 |
|
|
|
handleDocumentPrint(clicKRowId.value) |
|
|
|
}else if(val === 'export-detail'){ |
|
|
|
console.log("导出明细:",clicKRowId.value) |
|
|
|
handleDetailExport(clicKRowId.value) |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
// 单据打印 |
|
|
|
const documentSrc = ref(BASE_URL + '/jmreport/view/972639553789239296?token=' + getAccessToken()) |
|
|
|
const handleDocumentPrint = async (id) => { |
|
|
|
window.open(documentSrc.value + '&id=' + id) |
|
|
|
} |
|
|
|
|
|
|
|
/** 导出明细按钮操作 */ |
|
|
|
const exportLoadingDetail = ref(false) // 导出的加载中 |
|
|
|
const handleDetailExport = async (masterId) => { |
|
|
|
try { |
|
|
|
// 导出的二次确认 |
|
|
|
await message.exportConfirm() |
|
|
|
// 发起导出导出明细 |
|
|
|
exportLoadingDetail.value = true |
|
|
|
let params = { |
|
|
|
masterId: masterId |
|
|
|
} |
|
|
|
const data = await SupplierinvoiceRecordMainApi.exportSupplierinvoiceRecordDetail(params) |
|
|
|
download.excel(data, `${t('ts.供应商发票记录明细')}.xlsx`) |
|
|
|
} catch { |
|
|
|
} finally { |
|
|
|
exportLoadingDetail.value = false |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
// 筛选提交 |
|
|
|
const searchFormClick = (searchData) => { |
|
|
|
tableObject.params = { |
|
|
|