Преглед изворни кода

fix: 报送资料动态表在线填报修复

shiyanyu пре 1 месец
родитељ
комит
34e36c681b

+ 1 - 3
src/views/EntDeclaration/auditTaskManagement/components/DataRequirementsTab.vue

@@ -74,9 +74,7 @@
       "
       :catalog-id="catalogId"
       :survey-template-id="
-        currentSurveyRow && currentSurveyRow.surveyTemplateId
-          ? currentSurveyRow.surveyTemplateId
-          : surveyTemplateId
+        getSurveyTemplateId(currentSurveyRow) || surveyTemplateId
       "
       @save="handleDynamicTableSave"
       @refresh="handleRefresh"

+ 10 - 1
src/views/EntDeclaration/auditTaskManagement/components/DynamicTableDialog.vue

@@ -819,6 +819,7 @@
       },
       // 新增保存
       handleAddSave() {
+        console.log(this.surveyTemplateId, 'shuju1')
         this.$refs.addFormRef.validate(async (valid) => {
           if (!valid) return
           try {
@@ -828,7 +829,10 @@
             const auditedUnitId = this.auditedUnitId || sd.auditedUnitId || ''
             const catalogId = this.catalogId || sd.catalogId || ''
             const surveyTemplateId =
-              this.surveyTemplateId || sd.surveyTemplateId || ''
+              this.surveyTemplateId ||
+              (this.currentRow && this.currentRow.surveyTemplateId) ||
+              sd.surveyTemplateId ||
+              ''
             const taskId = this.taskId || sd.taskId || ''
             const projectId = this.projectId || sd.projectId || ''
             // if (!uploadId || !auditedUnitId) {
@@ -836,6 +840,11 @@
             //   this.adding = false
             //   return
             // }
+            // if (!surveyTemplateId) {
+            //   Message.error('缺少必要参数:surveyTemplateId')
+            //   this.adding = false
+            //   return
+            // }
             const now = this.formatDateTime(new Date())
             const payload = {
               uploadId,