Browse Source

107-1表bug修复

ljb 9 months ago
parent
commit
e39b13a08a

+ 3 - 3
src/option/externalReports/107-1.js

@@ -153,13 +153,13 @@ export default {
         type: 'select',
         dicData: [{
           label: '1.研究',
-          value: 1
+          value: '1.研究'
         }, {
           label: '2.小试',
-          value: 2
+          value: '2.小试',
         }, {
           label: '3.中试',
-          value: 3
+          value: '3.中试',
         }],
         span: 24,
         hide: true,

+ 18 - 8
src/views/external-reports/external-manage/107-1.vue

@@ -19,7 +19,7 @@
 
         <div style="display: flex; align-items: center">
           <year-month-select
-            v-model="params.yearAndMonth"
+            v-model="params.year"
             :showMonth="false"
           ></year-month-select>
         </div>
@@ -43,19 +43,32 @@ export default window.$crudCommon({
   data() {
     return {
       params: {
-        yearAndMonth: moment(new Date()).format("YYYY"),
+        year: moment(new Date()).format("YYYY"),
       },
     };
   },
   watch: {
-    "params.yearAndMonth"() {
+    "params.year"() {
       this.page.currentPage = 1;
       this.getList(this.page);
     },
   },
   methods: {
+    loadData() {
+        this.loading = true;
+        this.api.getList(this.getSearchParams()).then(res => {
+          this.loading = false;
+          if (res.data.code == 200) {
+            this.data = res.data.data.map(item => {
+              item.xmStageField = item.xmStage;
+              item.govBonusField = item.govBonus;
+              return item;
+            });
+          }
+        })
+      },
     getFormData() {
-      return { ...this.form, xmStage: this.form.xmStageField, govBonus: this.form.govBonusField };
+      return { yearAndMonth: this.params.year, xmId: this.form.xmId, id: this.form.id, xmStage: this.form.xmStageField, govBonus: this.form.govBonusField };
     },
     handleExport() {
       exportBlob(
@@ -66,7 +79,7 @@ export default window.$crudCommon({
       ).then((res) => {
         downloadXls(
           res.data,
-          `${this.params.yearAndMonth}企业研究开发项目情况.xlsx`
+          `${this.params.year}企业研究开发项目情况.xlsx`
         );
       });
     },
@@ -75,8 +88,5 @@ export default window.$crudCommon({
 {
   // 模块路径
   name: "externalReports/107-1",
-  res: ({ data }) => {
-    return data;
-  },
 });
 </script>