Browse Source

提交107-1报表

ljb 9 months ago
parent
commit
4b2fa3a70a

+ 11 - 0
src/api/externalReports/107-1.js

@@ -0,0 +1,11 @@
+import request from '@/router/axios';
+
+export const getList = (params) => {
+  return request({
+    url: '/api/kd-scientific/',
+    method: 'get',
+    params: {
+      ...params,
+    }
+  })
+}

+ 250 - 0
src/option/externalReports/107-1.js

@@ -0,0 +1,250 @@
+export default {
+  height: 'auto',
+  calcHeight: 30,
+  tip: false,
+  searchShow: true,
+  searchMenuSpan: 6,
+  border: true,
+  index: false,
+  addBtn: false,
+  delBtn: false,
+  selection: false,
+  searchLabelWidth: 140,
+  labelWidth: 200,
+  menuWidth: 90,
+  dialogClickModal: false,
+  dialogWidth: 500,
+  dialogType: "drawer",
+  column: [
+    {
+      label: '序号',
+      align: 'center',
+      children: [{
+        label: '甲',
+        prop: 'xuhao',
+        width: 60,
+        align: 'center',
+        display: false,
+        showOverflowTooltip: true,
+      }]
+    },
+    {
+      label: '研发项目名称',
+      align: 'center',
+      children: [{
+        label: '乙',
+        prop: 'xmmc',
+        width: 120,
+        align: 'center',
+        display: false,
+        showOverflowTooltip: true,
+      }]
+    },
+    {
+      label: '研发项目来源',
+      align: 'center',
+      children: [{
+        label: '1',
+        prop: 'xmly',
+        width: 100,
+        align: 'center',
+        display: false,
+        showOverflowTooltip: true,
+      }]
+    },
+    {
+      label: '项目开展形式',
+      align: 'center',
+      children: [{
+        label: '2',
+        prop: 'xmkzxs',
+        width: 100,
+        align: 'center',
+        display: false,
+        showOverflowTooltip: true,
+      }]
+    },
+    {
+      label: '项目当年成果形式',
+      align: 'center',
+      children: [{
+        label: '3',
+        prop: 'xmcgxs',
+        width: 100,
+        align: 'center',
+        display: false,
+        showOverflowTooltip: true,
+      }]
+    },
+    {
+      label: '项目技术经济目标',
+      align: 'center',
+      children: [{
+        label: '4',
+        prop: 'xmjsjjmb',
+        width: 100,
+        align: 'center',
+        display: false,
+        showOverflowTooltip: true,
+      }]
+    },
+    {
+      label: '项目起始日期',
+      align: 'center',
+      children: [{
+        label: '5',
+        prop: 'xmkssj',
+        width: 95,
+        align: 'center',
+        display: false,
+        showOverflowTooltip: true,
+      }]
+    },
+    {
+      label: '项目结束时间',
+      align: 'center',
+      children: [{
+        label: '6',
+        prop: 'xmjssj',
+        width: 95,
+        align: 'center',
+        display: false,
+        showOverflowTooltip: true,
+      }]
+    },
+    {
+      label: '跨年项目当年所处主要进阶段',
+      align: 'center',
+      children: [{
+        label: '7',
+        prop: 'xmjd',
+        width: 110,
+        align: 'center',
+        type: 'select',
+        span: 24,
+        display: false,
+        showOverflowTooltip: true,
+      }, {
+        label: '跨年项目当年所处主要进阶段',
+        prop: 'xmjdField',
+        width: 110,
+        align: 'center',
+        type: 'select',
+        span: 24,
+        hide: true,
+        showOverflowTooltip: true,
+      }]
+    },
+    {
+      label: '项目研究开发人员(人)',
+      align: 'center',
+      children: [{
+        label: '8',
+        prop: 'xmyjkfry',
+        width: 100,
+        align: 'center',
+        display: false,
+        showOverflowTooltip: true,
+      }]
+    },
+    {
+      label: '项目人员实际工作时间(人月)',
+      align: 'center',
+      children: [{
+        label: '9',
+        prop: 'gzsj',
+        width: 110,
+        align: 'center',
+        display: false,
+        showOverflowTooltip: true,
+      }]
+    },
+    {
+      label: '项目经费支出(千元)',
+      align: 'center',
+      children: [{
+        label: '10',
+        prop: 'jfzc',
+        width: 90,
+        align: 'center',
+        display: false,
+        showOverflowTooltip: true,
+      }]
+    },
+    {
+      label: '其中:政府奖金',
+      align: 'center',
+      children: [{
+        label: '11',
+        prop: '11',
+        width: 80,
+        align: 'center',
+        type: 'number',
+        min: 0,
+        precision: 2,
+        span: 24,
+        display: false,
+        showOverflowTooltip: true,
+      }, {
+        label: '其中:政府奖金',
+        prop: '11Field',
+        width: 80,
+        align: 'center',
+        type: 'number',
+        min: 0,
+        precision: 2,
+        span: 24,
+        hide: true,
+        showOverflowTooltip: true,
+      }]
+    },
+    {
+      label: '用于科学原理的探索发现的经费总额',
+      align: 'center',
+      children: [{
+        label: '12',
+        prop: '12',
+        width: 120,
+        align: 'center',
+        display: false,
+        showOverflowTooltip: true,
+      }]
+    },
+    {
+      label: '其中:企业自主开展',
+      align: 'center',
+      children: [{
+        label: '13',
+        prop: '13',
+        width: 110,
+        align: 'center',
+        display: false,
+        showOverflowTooltip: true,
+      }]
+    },
+    {
+      label: '委托外单位开展',
+      align: 'center',
+      children: [{
+        label: '14',
+        prop: '14',
+        width: 90,
+        align: 'center',
+        display: false,
+        showOverflowTooltip: true,
+      }]
+    },
+    {
+      label: '研究类型',
+      align: 'center',
+      children: [{
+        label: '15',
+        prop: '15',
+        width: 80,
+        align: 'center',
+        display: false,
+        showOverflowTooltip: true,
+      }]
+    },
+  ],
+};

+ 26 - 25
src/views/device-manage/yf-cost-share-list.vue

@@ -114,31 +114,32 @@ export default window.$crudCommon(
           this.getList(this.page);
           this.getList(this.page);
         }
         }
       },
       },
-      methods: {
-        handleExport() {
-          exportBloByPost(
-            `/api/kd-scientific/technician/export?${
-              this.website.tokenHeader
-            }=${getToken()}`,
-            this.params
-          ).then((res) => {
-            downloadXls(
-              res.data,
-              `研发资产费用分摊表${this.params.yearAndMonth}.xlsx`
-            );
-          });
-        },
-        /**
-         * 打印表格
-         * @param isLandscape 是否横向打印
-         */
-        printTable(isLandscape) {
-          this.wideTableColumns = this.$refs.crud.columnOption;
-          this.printTitle = `研发资产费用分摊表${this.params.yearAndMonth}`;
-          this.$nextTick(() => {
-            this.$refs.printWideTable.printTable(isLandscape);
-          });
-        },
+      
+    },
+    methods: {
+      handleExport() {
+        exportBloByPost(
+          `/api/kd-scientific/technician/export?${
+            this.website.tokenHeader
+          }=${getToken()}`,
+          this.params
+        ).then((res) => {
+          downloadXls(
+            res.data,
+            `研发资产费用分摊表${this.params.yearAndMonth}.xlsx`
+          );
+        });
+      },
+      /**
+       * 打印表格
+       * @param isLandscape 是否横向打印
+       */
+      printTable(isLandscape) {
+        this.wideTableColumns = this.$refs.crud.columnOption;
+        this.printTitle = `研发资产费用分摊表${this.params.yearAndMonth}`;
+        this.$nextTick(() => {
+          this.$refs.printWideTable.printTable(isLandscape);
+        });
       },
       },
     },
     },
   },
   },

+ 84 - 0
src/views/external-reports/external-manage/107-1.vue

@@ -0,0 +1,84 @@
+<template>
+  <basic-container>
+    <avue-crud
+      v-bind="bindVal"
+      v-on="onEvent"
+      v-model="form"
+      :page.sync="page"
+    >
+      <template slot="menuLeft">
+        <el-button
+          type="warning"
+          size="small"
+          plain
+          icon="el-icon-download"
+          @click="handleExport"
+        >
+          导出
+        </el-button>
+
+        <div style="display: flex; align-items: center">
+          <year-month-select
+            v-model="params.yearAndMonth"
+            :showMonth="false"
+          ></year-month-select>
+        </div>
+      </template>
+    </avue-crud>
+
+  </basic-container>
+</template>
+
+<script>
+import { exportBlob } from "@/api/common";
+import YearMonthSelect from "@/components/year-month-select";
+import moment from "moment";
+import { getToken } from "@/util/auth";
+import { downloadXls } from "@/util/util";
+
+export default window.$crudCommon({
+  components: {
+    YearMonthSelect,
+  },
+  data() {
+    return {
+      params: {
+        yearAndMonth: moment(new Date()).format("YYYY"),
+      },
+    };
+  },
+  watch: {
+    "params.yearAndMonth"(newVal) {
+      if (newVal.length > 4) {
+        this.page.currentPage = 1;
+        this.getList(this.page);
+      }
+    },
+  },
+  methods: {
+    loadData() {
+      console.log(1234)
+    },
+    handleExport() {
+      exportBlob(
+        `/api/kd-scientific/technician/export?${
+          this.website.tokenHeader
+        }=${getToken()}`,
+        this.params
+      ).then((res) => {
+        downloadXls(
+          res.data,
+          `研发资产费用分摊表${this.params.yearAndMonth}.xlsx`
+        );
+      });
+    },
+  },
+},
+{
+  // 模块路径
+  name: "externalReports/107-1",
+  res: ({ data }) => {
+    return data;
+  },
+});
+</script>