Browse Source

供应商发票记录

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

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

@ -61,3 +61,7 @@ export const exportSupplierinvoiceRecordMain = async (data) => {
export const importTemplate = () => { export const importTemplate = () => {
return request.download({ url: '/wms/supplierinvoice-record-main/get-import-template' }) 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, showDownload:true,
hiddenDelete: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" :isBasic="false"
direction="horizontal" direction="horizontal"
:column="3" :column="3"
@ -112,6 +131,7 @@
:detailAllSchemas="SupplierinvoiceRecordDetail.allSchemas" :detailAllSchemas="SupplierinvoiceRecordDetail.allSchemas"
:detailAllSchemasRules="SupplierinvoiceRecordDetailRules" :detailAllSchemasRules="SupplierinvoiceRecordDetailRules"
:apiPage="SupplierinvoiceRecordDetailApi.getSupplierinvoiceRecordDeatilPage" :apiPage="SupplierinvoiceRecordDetailApi.getSupplierinvoiceRecordDeatilPage"
@buttonBaseClick="detailButtonBaseClick"
> >
<template #differencePrice="{row}"> <template #differencePrice="{row}">
<span :class="{'red-text':row.differencePrice!=0}">{{ row.differencePrice }}</span> <span :class="{'red-text':row.differencePrice!=0}">{{ row.differencePrice }}</span>
@ -205,6 +225,8 @@ const handleSelectionPoint = async ()=>{
window.open(srcPoint.value+'&ids='+rows.join(',')) window.open(srcPoint.value+'&ids='+rows.join(','))
} }
// - // -
const butttondata = (row,$index) => { const butttondata = (row,$index) => {
return [ return [
@ -230,8 +252,10 @@ const buttonTableClick = async (val, row) => {
const { wsCache } = useCache() const { wsCache } = useCache()
/** 详情操作 */ /** 详情操作 */
const detailRef = ref() const detailRef = ref()
const clicKRowId = ref();
const openDetail = async (row: any, titleName: any, titleValue: any) => { const openDetail = async (row: any, titleName: any, titleValue: any) => {
console.log('openDetail',row) console.log('openDetail',row)
clicKRowId.value = row.id
const departmentCode = wsCache.get(CACHE_KEY.DEPT).find((account) => account.id == row.departmentCode)?.name const departmentCode = wsCache.get(CACHE_KEY.DEPT).find((account) => account.id == row.departmentCode)?.name
//masterId //masterId
const { tableObject: requestTableObject, tableMethods:requestTableMethods } = useTable({ 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) => { const searchFormClick = (searchData) => {
tableObject.params = { tableObject.params = {

Loading…
Cancel
Save