From d6697ae788cfb095fd917d5f8c2c13caa786e9de Mon Sep 17 00:00:00 2001 From: yufei0306 <13417315+yufei0306@user.noreply.gitee.com> Date: Sun, 28 Apr 2024 09:16:17 +0800 Subject: [PATCH] =?UTF-8?q?=E4=B8=8A=E4=BC=A0=E8=B4=A8=E6=A3=80=E6=8A=A5?= =?UTF-8?q?=E5=91=8A=EF=BC=8C=E6=B7=BB=E5=8A=A0=E5=92=8C=E5=88=A0=E9=99=A4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../supplierdeliverRequestMain/index.vue | 27 ++++++++++++++----- 1 file changed, 21 insertions(+), 6 deletions(-) diff --git a/src/views/wms/purchasereceiptManage/supplierdeliver/supplierdeliverRequestMain/index.vue b/src/views/wms/purchasereceiptManage/supplierdeliver/supplierdeliverRequestMain/index.vue index 1065befd7..64c7573dd 100644 --- a/src/views/wms/purchasereceiptManage/supplierdeliver/supplierdeliverRequestMain/index.vue +++ b/src/views/wms/purchasereceiptManage/supplierdeliver/supplierdeliverRequestMain/index.vue @@ -139,9 +139,9 @@ :formAllSchemas="SupplierdeliverInspectionDetail.allSchemas" :tableAllSchemas="SupplierdeliverInspectionDetail.allSchemas" :tableFormRules="SupplierdeliverInspectionDetailRules" - :tableData="ploadQualityReportTableData" - @handleAddTable="SupplierdeliverInspectionDetailApi.createSupplierdeliverInspectionDetail" - @handleDeleteTable="SupplierdeliverInspectionDetailApi.deleteSupplierdeliverInspectionDetail" + :tableData="uploadQualityReportTableData" + @handleAddTable="handleAddQualityReport" + @handleDeleteTable="handleDeleteQualityReport" @submitForm="submitFormUploadQualityReport" :isShowReduceButton="true" > @@ -617,7 +617,22 @@ const handleOpe = async (id: number) => { } } const ploadQualityReportRef = ref() -const ploadQualityReportTableData = ref([]) +const uploadQualityReportTableData = ref([]) + +const handleAddQualityReport = ()=>{ + const tableFormKeys = {} + SupplierdeliverInspectionDetail.allSchemas.tableFormColumns.forEach((item) => { + tableFormKeys[item.field] = item.default ? item.default : '' + }) + uploadQualityReportTableData.value.push(tableFormKeys) + console.log('handleAddQualityReport') +} +const handleDeleteQualityReport = (row,index)=>{ + uploadQualityReportTableData.value.splice(index,1) + console.log('handleDeleteQualityReport',row) + +} + /** 上传质量报告 */ const handleUploadQualityReport = async (row) => { console.log('SupplierdeliverInspectionDetail',SupplierdeliverInspectionDetail.allSchemas) @@ -630,12 +645,12 @@ const handleUploadQualityReport = async (row) => { SupplierdeliverInspectionDetail.allSchemas.tableFormColumns.forEach((item) => { tableFormKeys[item.field] = item.default ? item.default : '' }) - ploadQualityReportTableData.value = [tableFormKeys] + uploadQualityReportTableData.value = [tableFormKeys] } const submitFormUploadQualityReport = async (formType, data) => { delete data.number - data.subList = ploadQualityReportTableData.value // 拼接子表数据参数 + data.subList = uploadQualityReportTableData.value // 拼接子表数据参数 if (formType === 'create') { await SupplierdeliverInspectionDetailApi.createSupplierdeliverInspectionDetail(data) message.success(t('common.createSuccess'))