Browse Source

供应商发票记录

hella_online_20240829
zhaoyiran 4 months ago
parent
commit
9a8d9e9c51
  1. 6
      src/api/wms/supplierinvoiceRecordMain/index.ts
  2. 62
      src/views/wms/supplierManage/supplierinvoice/supplierinvoiceRecordMain/index.vue

6
src/api/wms/supplierinvoiceRecordMain/index.ts

@ -60,4 +60,8 @@ export const exportSupplierinvoiceRecordMain = async (data) => {
// 下载用户导入模板
export const importTemplate = () => {
return request.download({ url: '/wms/supplierinvoice-record-main/get-import-template' })
}
}
export const exportSupplierinvoiceRecordDetail = async (params) => {
return await request.download({ url: `/wms/supplierinvoice-record-deatil/export-excel`, params })
}

62
src/views/wms/supplierManage/supplierinvoice/supplierinvoiceRecordMain/index.vue

@ -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 = {

Loading…
Cancel
Save