Browse Source

上传质检报告,添加和删除

master_hella_20240701
yufei0306 7 months ago
parent
commit
d6697ae788
  1. 27
      src/views/wms/purchasereceiptManage/supplierdeliver/supplierdeliverRequestMain/index.vue

27
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'))

Loading…
Cancel
Save