|
|
@ -59,18 +59,30 @@ |
|
|
|
tableName:'contract', |
|
|
|
showDownload:true, |
|
|
|
hiddenDelete:true, |
|
|
|
queryParams:[{ |
|
|
|
queryField:'tableId', |
|
|
|
rowField:'annexMasterId', |
|
|
|
}], |
|
|
|
},{ |
|
|
|
label: t('ts.发票附件'), |
|
|
|
prop: 'Annex', |
|
|
|
tableName:'invoice', |
|
|
|
showDownload:true, |
|
|
|
hiddenDelete:true, |
|
|
|
queryParams:[{ |
|
|
|
queryField:'tableId', |
|
|
|
rowField:'annexMasterId', |
|
|
|
}], |
|
|
|
},{ |
|
|
|
label: t('ts.货运单附件'), |
|
|
|
prop: 'Annex', |
|
|
|
tableName:'waybill', |
|
|
|
showDownload:true, |
|
|
|
hiddenDelete:true, |
|
|
|
queryParams:[{ |
|
|
|
queryField:'tableId', |
|
|
|
rowField:'annexMasterId', |
|
|
|
}], |
|
|
|
}]" |
|
|
|
:annexAlias="{ |
|
|
|
label:t('ts.其他附件'), |
|
|
@ -92,6 +104,8 @@ import * as SupplierinvoiceRecordMainApi from '@/api/wms/supplierinvoiceRecordMa |
|
|
|
import * as SupplierinvoiceRecordDetailApi from '@/api/wms/supplierinvoiceRecordDeatil' |
|
|
|
import * as defaultButtons from '@/utils/disposition/defaultButtons' |
|
|
|
import { CACHE_KEY, useCache } from '@/hooks/web/useCache' |
|
|
|
import * as SupplierinvoiceRequestDetailApi from '@/api/wms/supplierinvoiceRequestDetail' |
|
|
|
|
|
|
|
// 供应商发票记录主 |
|
|
|
defineOptions({ name: 'SupplierinvoiceRecordMain' }) |
|
|
|
|
|
|
@ -164,8 +178,20 @@ const buttonTableClick = async (val, row) => { |
|
|
|
const { wsCache } = useCache() |
|
|
|
/** 详情操作 */ |
|
|
|
const detailRef = ref() |
|
|
|
const openDetail = (row: any, titleName: any, titleValue: any) => { |
|
|
|
const openDetail = async (row: any, titleName: any, titleValue: any) => { |
|
|
|
console.log('openDetail',row) |
|
|
|
const departmentCode = wsCache.get(CACHE_KEY.DEPT).find((account) => account.id == row.departmentCode)?.name |
|
|
|
//获取申请中的masterId |
|
|
|
const { tableObject: requestTableObject, tableMethods:requestTableMethods } = useTable({ |
|
|
|
getListApi: SupplierinvoiceRequestDetailApi.getSupplierinvoiceRequestDetailPage // 分页接口 |
|
|
|
}) |
|
|
|
const { getList:requestGetList } = requestTableMethods |
|
|
|
requestTableObject.params.number = row.requestNumber |
|
|
|
await requestGetList() |
|
|
|
if(requestTableObject.tableList.length>0){ |
|
|
|
row.annexMasterId = requestTableObject.tableList[0].masterId |
|
|
|
} |
|
|
|
|
|
|
|
if (departmentCode) row.departmentCode = JSON.parse(JSON.stringify(departmentCode)) |
|
|
|
detailRef.value.openDetail(row, titleName, titleValue) |
|
|
|
} |
|
|
|