From bf091befbeeb2509ec7e7da714ff3970b14b670a Mon Sep 17 00:00:00 2001 From: yufei0306 <13417315+yufei0306@user.noreply.gitee.com> Date: Wed, 3 Apr 2024 13:00:29 +0800 Subject: [PATCH] =?UTF-8?q?=E9=87=87=E8=B4=AD=E6=94=B6=E8=8E=B7=E7=AE=A1?= =?UTF-8?q?=E7=90=86--=E4=BE=9B=E5=BA=94=E5=95=86=E5=8F=91=E7=A5=A8?= =?UTF-8?q?=E7=94=B3=E8=AF=B7=EF=BC=9A1=E3=80=81=E6=96=B0=E5=A2=9E--?= =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E6=98=8E=E7=BB=86=E5=A4=9A=E9=80=89=E4=BB=A5?= =?UTF-8?q?=E5=8F=8A=E7=9B=B4=E6=8E=A5=E5=B1=95=E7=A4=BASearchTable=202?= =?UTF-8?q?=E3=80=81=E8=AF=A6=E6=83=85--=E6=B7=BB=E5=8A=A0=E5=90=88?= =?UTF-8?q?=E5=90=8C=E9=99=84=E4=BB=B6=20=E7=94=B5=E5=AD=90=E5=8F=91?= =?UTF-8?q?=E7=A5=A8=E9=99=84=E4=BB=B6=20=E8=B4=A7=E8=BF=90=E5=8D=95?= =?UTF-8?q?=E9=99=84=E4=BB=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/Detail/src/Detail.vue | 53 ++++++++++++++++--- .../supplierinvoiceRequestMain/index.vue | 50 +++++++++++------ .../supplierinvoiceRequestMain.data.ts | 1 + 3 files changed, 81 insertions(+), 23 deletions(-) diff --git a/src/components/Detail/src/Detail.vue b/src/components/Detail/src/Detail.vue index 4b0b7512f..5a865fca5 100644 --- a/src/components/Detail/src/Detail.vue +++ b/src/components/Detail/src/Detail.vue @@ -28,7 +28,7 @@
- + - + - + [] + }, // 是否是基础数据 展现详情顶部表单 isBasic: { type: Boolean, @@ -334,7 +346,7 @@ if (props.isBasic == true) { } } -const otherList = [{ +const otherList = [...props.annexTable,{ label:'附件', prop:'Annex' },{ @@ -373,6 +385,8 @@ const remarkHeight = computed(() => { const annexData = reactive({ annexList: [] }) +// 其他附件默认数据数组 +const annexTableData = ref>([]) // 备注数据 const remarksData = reactive({ @@ -394,6 +408,23 @@ const getFileList = async () => { detailLoading.value = false } } +// 获取其他附件列表篇 +const getAnnexFileList = async () => { + props.annexTable?.forEach(async (item) => { + let requstData = {...remarksData.data,tableName: item?.tableName} + const annexList = await FileApi.getFileList(requstData) + const annexData = annexTableData.value.find(annex=>annex.label === item.label) + if(annexData){ + annexData.annexList = annexList + }else{ + annexTableData.value.push({ + label: item.label, + tableName: item?.tableName || '', + annexList + }) + } + }) +} /** 添加附件 */ const handleAnnexSuccess = () => { getFileList() @@ -404,6 +435,11 @@ const deleteAnnexSuccess = async () => { getFileList() getChangeRecordList() } +/** 追加的附件 */ +const updateAnnexTableHandle = () => { + getAnnexFileList() + getChangeRecordList() +} // Tabs当前选择 const current = ref(0) @@ -481,6 +517,7 @@ const openDetail = async (row: any, titleName: any, titleValue: any, tableName: detailData.value = row getRemarkList() getFileList() + getAnnexFileList() getChangeRecordList() // 判断详情按钮是否显示 let detailButtonFilter: any = [] diff --git a/src/views/wms/supplierManage/supplierinvoice/supplierinvoiceRequestMain/index.vue b/src/views/wms/supplierManage/supplierinvoice/supplierinvoiceRequestMain/index.vue index ade3d6fdd..30e09f66a 100644 --- a/src/views/wms/supplierManage/supplierinvoice/supplierinvoiceRequestMain/index.vue +++ b/src/views/wms/supplierManage/supplierinvoice/supplierinvoiceRequestMain/index.vue @@ -35,6 +35,8 @@ - { if (type == 'tableForm') { // 明细查询页赋值 - row[formField] = val[0][searchField] - if (formField == 'poLine') { - row['poNumber'] = val[0]['poNumber'] - row['poLine'] = val[0]['poLine'] - row['tax'] = val[0]['tax'] - row['projectCode'] = val[0]['projectCode'] - row['billType'] = val[0]['billType'] - row['recvBillNum'] = val[0]['recvBillNum'] - row['asnBillNum'] = val[0]['asnBillNum'] - row['supplierCode'] = val[0]['supplierCode'] - row['purchasePrice'] = val[0]['purchasePrice'] - row['invoicableQuantity'] = val[0]['invoicableQuantity'] - row['itemCode'] = val[0]['itemCode'] - } + val.forEach(item=>{ + const newRow = {...row} + newRow[formField] = item[searchField] + if (formField == 'poLine') { + newRow['poNumber'] = item['poNumber'] + newRow['poLine'] = item['poLine'] + newRow['tax'] =item['tax'] + newRow['projectCode'] = item['projectCode'] + newRow['billType'] = item['billType'] + newRow['recvBillNum'] = item['recvBillNum'] + newRow['asnBillNum'] = item['asnBillNum'] + newRow['supplierCode'] = item['supplierCode'] + newRow['purchasePrice'] = item['purchasePrice'] + newRow['invoicableQuantity'] = item['invoicableQuantity'] + newRow['itemCode'] = item['itemCode'] + } + tableData.value.push(newRow) + }) + } else { const setV = {} setV[formField] = val[0][searchField] diff --git a/src/views/wms/supplierManage/supplierinvoice/supplierinvoiceRequestMain/supplierinvoiceRequestMain.data.ts b/src/views/wms/supplierManage/supplierinvoice/supplierinvoiceRequestMain/supplierinvoiceRequestMain.data.ts index 8116caf7a..a6f9f7e6d 100644 --- a/src/views/wms/supplierManage/supplierinvoice/supplierinvoiceRequestMain/supplierinvoiceRequestMain.data.ts +++ b/src/views/wms/supplierManage/supplierinvoice/supplierinvoiceRequestMain/supplierinvoiceRequestMain.data.ts @@ -591,6 +591,7 @@ export const SupplierinvoiceRequestDetail = useCrudSchemas(reactive