浏览代码

Merge branch 'dev1.0' of http://222.90.211.174:3000/suf/front-end-BI into dev1.0

sufan 4 月之前
父节点
当前提交
e91a75bf16
共有 1 个文件被更改,包括 6 次插入5 次删除
  1. 6 5
      src/views/dataSource/financialStatement/components/AddContent.vue

+ 6 - 5
src/views/dataSource/financialStatement/components/AddContent.vue

@@ -39,11 +39,7 @@
           />
         </el-select>
       </el-form-item>
-      <el-form-item
-        label="报表年份"
-        prop="reportYear"
-        v-if="ruleForm.reportType === 'approvalTable'"
-      >
+      <el-form-item label="报表年份" prop="reportYear">
         <el-date-picker
           v-model="ruleForm.reportYear"
           type="year"
@@ -362,6 +358,9 @@
       if (editRowId.value) {
         params.id = editRowId.value
       }
+      if (ruleForm.value.reportType === 'approvalTable') {
+        delete params.reportMonth
+      }
       // 校验资产负债表的必填项
       if (ruleForm.value.reportName == 0) {
         if (!validateAssetsTable()) {
@@ -539,6 +538,8 @@
           if (el == 'reportMonth') {
             ruleForm.value[el] =
               res.data[el] < 10 ? `0${res.data[el]}` : res.data[el]
+          } else if (el == 'reportYear') {
+            ruleForm.value[el] = `${res.data[el]}`
           } else {
             ruleForm.value[el] = res.data[el]
           }