Browse Source

对外报表静态页面提交

ljb 10 months ago
parent
commit
c91f814b32

+ 13 - 0
src/api/externalReports/gxAuxiliaryDetails.js

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

+ 13 - 0
src/api/externalReports/gxAuxiliarySumList.js

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

+ 149 - 0
src/option/externalReports/gxAuxiliaryDetails.js

@@ -0,0 +1,149 @@
+export default {
+  height: 'auto',
+  calcHeight: 30,
+  tip: false,
+  searchShow: true,
+  searchMenuSpan: 6,
+  border: true,
+  index: true,
+  addBtn: false,
+  selection: true,
+  searchLabelWidth: 140,
+  labelWidth: 100,
+  menuWidth: 180,
+  menu: false,
+  dialogClickModal: false,
+  dialogWidth: 500,
+  dialogType: "drawer",
+  column: [
+    {
+      label: '研发项目名称',
+      prop: 'xmmc',
+      search: true,
+      hide: true,
+    },
+    {
+      label: '凭证日期',
+      prop: 'pzrq',
+      type: 'date',
+      valueFormat: 'yyyy-MM-dd',
+      span: 24,
+      width: 90,
+      align: 'center',
+      search: true,
+      showOverflowTooltip: true,
+    },
+    {
+      label: '凭证字号',
+      prop: 'pzzh',
+      span: 24,
+      width: 120,
+      align: 'center',
+      showOverflowTooltip: true,
+    },
+    {
+      label: '摘要',
+      prop: 'zy',
+      span: 24,
+      width: 160,
+      align: 'center',
+      showOverflowTooltip: true,
+    },
+    {
+      label: '1、人员人工',
+      prop: 'ryrg',
+      span: 24,
+      minWidth: 90,
+      align: 'center',
+      showOverflowTooltip: true,
+    },
+    {
+      label: '2、直接投入',
+      prop: 'zjtl',
+      span: 24,
+      minWidth: 90,
+      align: 'center',
+      showOverflowTooltip: true,
+    },
+    {
+      label: '3、折旧费用与长期摊销费用',
+      prop: 'cqdt',
+      span: 24,
+      minWidth: 110,
+      align: 'center',
+      showOverflowTooltip: true,
+    },
+    {
+      label: '4、设计费',
+      prop: 'cqdt',
+      span: 24,
+      minWidth: 90,
+      align: 'center',
+      showOverflowTooltip: true,
+    },
+    {
+      label: '5、无形资产摊销',
+      prop: 'cqdt',
+      span: 24,
+      minWidth: 90,
+      align: 'center',
+      showOverflowTooltip: true,
+    },
+    {
+      label: '6、装备调试费用与试验费用',
+      prop: 'cqdt',
+      span: 24,
+      minWidth: 110,
+      align: 'center',
+      showOverflowTooltip: true,
+    },
+    {
+      label: '7-1、其他费用',
+      prop: 'cqdt',
+      span: 24,
+      minWidth: 90,
+      align: 'center',
+      showOverflowTooltip: true,
+    },
+    {
+      label: '7-2、其他费用限额',
+      prop: 'cqdt',
+      span: 24,
+      minWidth: 90,
+      align: 'center',
+      showOverflowTooltip: true,
+    },
+    {
+      label: '7-3、调整后其他费用',
+      prop: 'cqdt',
+      span: 24,
+      minWidth: 90,
+      align: 'center',
+      showOverflowTooltip: true,
+    },
+    {
+      label: '8、委外研发',
+      prop: 'cqdt',
+      span: 24,
+      minWidth: 90,
+      align: 'center',
+      showOverflowTooltip: true,
+    },
+    {
+      label: '合计',
+      prop: 'cqdt',
+      span: 24,
+      minWidth: 90,
+      align: 'center',
+      showOverflowTooltip: true,
+    },
+    {
+      label: '账簿名称',
+      prop: 'cqdt',
+      span: 24,
+      minWidth: 90,
+      align: 'center',
+      showOverflowTooltip: true,
+    },
+  ],
+};

+ 117 - 0
src/option/externalReports/gxAuxiliarySumList.js

@@ -0,0 +1,117 @@
+export default {
+  height: 'auto',
+  calcHeight: 30,
+  tip: false,
+  searchShow: true,
+  searchMenuSpan: 6,
+  border: true,
+  index: true,
+  addBtn: false,
+  selection: true,
+  searchLabelWidth: 140,
+  labelWidth: 100,
+  menuWidth: 180,
+  menu: false,
+  dialogClickModal: false,
+  dialogWidth: 500,
+  dialogType: "drawer",
+  column: [
+    {
+      label: '研发项目编号',
+      prop: 'xmbh',
+      span: 24,
+      width: 100,
+      align: 'center',
+      showOverflowTooltip: true,
+    },
+    {
+      label: '研发项目名称(RD)',
+      prop: 'xmmc',
+      span: 24,
+      minWidth: 160,
+      align: 'center',
+      search: true,
+      showOverflowTooltip: true,
+    },
+    {
+      label: '1、人员人工',
+      prop: 'ryrg',
+      span: 24,
+      minWidth: 90,
+      align: 'center',
+      showOverflowTooltip: true,
+    },
+    {
+      label: '2、直接投入',
+      prop: 'zjtl',
+      span: 24,
+      minWidth: 90,
+      align: 'center',
+      showOverflowTooltip: true,
+    },
+    {
+      label: '3、折旧费用与长期摊销费用',
+      prop: 'cqdt',
+      span: 24,
+      minWidth: 110,
+      align: 'center',
+      showOverflowTooltip: true,
+    },
+    {
+      label: '4、设计费',
+      prop: 'cqdt',
+      span: 24,
+      minWidth: 90,
+      align: 'center',
+      showOverflowTooltip: true,
+    },
+    {
+      label: '5、无形资产摊销',
+      prop: 'cqdt',
+      span: 24,
+      minWidth: 90,
+      align: 'center',
+      showOverflowTooltip: true,
+    },
+    {
+      label: '6、装备调试费用与试验费用',
+      prop: 'cqdt',
+      span: 24,
+      minWidth: 110,
+      align: 'center',
+      showOverflowTooltip: true,
+    },
+    {
+      label: '7、其他费用',
+      prop: 'cqdt',
+      span: 24,
+      minWidth: 90,
+      align: 'center',
+      showOverflowTooltip: true,
+    },
+    {
+      label: '8、委外研发',
+      prop: 'cqdt',
+      span: 24,
+      minWidth: 90,
+      align: 'center',
+      showOverflowTooltip: true,
+    },
+    {
+      label: '合计',
+      prop: 'cqdt',
+      span: 24,
+      minWidth: 90,
+      align: 'center',
+      showOverflowTooltip: true,
+    },
+    {
+      label: '账簿名称',
+      prop: 'cqdt',
+      span: 24,
+      minWidth: 90,
+      align: 'center',
+      showOverflowTooltip: true,
+    },
+  ],
+};

+ 109 - 0
src/views/external-reports/high-tech/gx-auxiliary-details.vue

@@ -0,0 +1,109 @@
+<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>
+        <print-table-btn @click="printTable" />
+        
+        <div style="display: flex; align-items: center;">
+          <year-month-select v-model="params.yearAndMonth"></year-month-select>
+        </div>
+      </template>
+
+       <!-- 开始时间 -->
+      <template slot="pzrqSearch">
+        <span>凭证日期:</span>
+        <el-date-picker
+          v-model="params.pzrqRange"
+          type="daterange"
+          range-separator="至"
+          start-placeholder="开始日期"
+          end-placeholder="结束日期"
+          value-format="yyyy-MM-dd"
+          style="width: 240px !important;"
+        >
+        </el-date-picker>
+      </template>
+    </avue-crud>
+
+   
+
+    <WideTablePrinter
+      ref="printWideTable"
+      :columns="wideTableColumns"
+      :data="data"
+      :print-title="printTitle"
+      :rows-per-page="30"
+      :default-landscape="true"
+    />
+  </basic-container>
+</template>
+
+<script>
+import YearMonthSelect from "@/components/year-month-select";
+import {exportBlob} from "@/api/common";
+import {getToken} from "@/util/auth";
+import {downloadXls} from "@/util/util";
+import moment from "moment";
+
+
+export default window.$crudCommon({
+  components: {
+    YearMonthSelect,
+  },
+  data() {
+    return {
+      params: {
+        yearAndMonth: moment(new Date()).format('YYYYMM'),
+      },
+
+      wideTableColumns: [],
+      printTitle: "",
+    };
+  },
+  watch: {
+    'params.yearAndMonth'(newVal) {
+      this.page.currentPage = 1;
+      this.getList(this.page);
+    }
+  },
+  methods: {
+    loadData() {},
+    handleExport() {
+      exportBlob(`/api/kd-scientific/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}高新研发费用明细表.xlsx`;
+      this.$nextTick(() => {
+        this.$refs.printWideTable.printTable(isLandscape);
+      })
+    },
+  },
+}, {
+  // 模块路径
+  name: 'externalReports/gxAuxiliaryDetails',
+  res: ({ data }) => {
+    return data;
+  },
+});
+</script>

+ 92 - 0
src/views/external-reports/high-tech/gx-auxiliary-sum-list.vue

@@ -0,0 +1,92 @@
+<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>
+        <print-table-btn @click="printTable" />
+        
+        <div style="display: flex; align-items: center;">
+          <year-month-select v-model="params.yearAndMonth"></year-month-select>
+        </div>
+      </template>
+    </avue-crud>
+
+    <WideTablePrinter
+      ref="printWideTable"
+      :columns="wideTableColumns"
+      :data="data"
+      :print-title="printTitle"
+      :rows-per-page="30"
+      :default-landscape="true"
+    />
+  </basic-container>
+</template>
+
+<script>
+import YearMonthSelect from "@/components/year-month-select";
+import {exportBlob} from "@/api/common";
+import {getToken} from "@/util/auth";
+import {downloadXls} from "@/util/util";
+import moment from "moment";
+
+
+export default window.$crudCommon({
+  components: {
+    YearMonthSelect,
+  },
+  data() {
+    return {
+      params: {
+        yearAndMonth: moment(new Date()).format('YYYYMM'),
+      },
+
+      wideTableColumns: [],
+      printTitle: "",
+    };
+  },
+  watch: {
+    'params.yearAndMonth'(newVal) {
+      this.page.currentPage = 1;
+      this.getList(this.page);
+    }
+  },
+  methods: {
+    loadData() {},
+    handleExport() {
+      exportBlob(`/api/kd-scientific/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}高新研发费用汇总表.xlsx`;
+      this.$nextTick(() => {
+        this.$refs.printWideTable.printTable(isLandscape);
+      })
+    },
+  },
+}, {
+  // 模块路径
+  name: 'externalReports/gxAuxiliarySumList',
+  res: ({ data }) => {
+    return data;
+  },
+});
+</script>

+ 0 - 6
src/views/external-reports/jjkc-standards/jjkc-auxiliary-sum-list.vue

@@ -96,12 +96,6 @@ export default window.$crudCommon({
         this.$refs.printWideTable.printTable(isLandscape);
         this.$refs.printWideTable.printTable(isLandscape);
       })
       })
     },
     },
-    headerCellStyle ({ column }) {
-      let color = column.labelClassName ? 'red' : 'rgba(0,0,0,.85)';
-      return {
-        color
-      }
-    }
   },
   },
 }, {
 }, {
   // 模块路径
   // 模块路径

+ 0 - 6
src/views/external-reports/kj-standards/kj-auxiliary-details.vue

@@ -96,12 +96,6 @@ export default window.$crudCommon({
         this.$refs.printWideTable.printTable(isLandscape);
         this.$refs.printWideTable.printTable(isLandscape);
       })
       })
     },
     },
-    headerCellStyle ({ column }) {
-      let color = column.labelClassName ? 'red' : 'rgba(0,0,0,.85)';
-      return {
-        color
-      }
-    }
   },
   },
 }, {
 }, {
   // 模块路径
   // 模块路径

+ 0 - 6
src/views/external-reports/kj-standards/kj-auxiliary-sum-list.vue

@@ -96,12 +96,6 @@ export default window.$crudCommon({
         this.$refs.printWideTable.printTable(isLandscape);
         this.$refs.printWideTable.printTable(isLandscape);
       })
       })
     },
     },
-    headerCellStyle ({ column }) {
-      let color = column.labelClassName ? 'red' : 'rgba(0,0,0,.85)';
-      return {
-        color
-      }
-    }
   },
   },
 }, {
 }, {
   // 模块路径
   // 模块路径