Browse Source

对外报表模块静态页面开发

ljb 10 months ago
parent
commit
8f8226d09b

+ 13 - 0
src/api/externalReports/jjkcAuxiliarySumList.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/kjAuxiliaryDetails.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/kjAuxiliarySumList.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,
+    }
+  })
+}

+ 218 - 0
src/option/externalReports/jjkcAuxiliarySumList.js

@@ -0,0 +1,218 @@
+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: '研发项目名称',
+      prop: 'xmmc',
+      span: 24,
+      minWidth: 160,
+      align: 'center',
+      search: true,
+      showOverflowTooltip: true,
+    },
+    {
+      label: '完成情况',
+      prop: 'wcqk',
+      span: 24,
+      width: 80,
+      align: 'center',
+      showOverflowTooltip: true,
+    },
+    {
+      label: '支出类型',
+      prop: 'wcqk',
+      span: 24,
+      width: 80,
+      align: 'center',
+      showOverflowTooltip: true,
+    },
+    {
+      label: '允许加计扣除金额合计',
+      prop: 'jjkchj',
+      span: 24,
+      width: 100,
+      align: 'center',
+      showOverflowTooltip: true,
+    },
+    {
+      label: '人员人工费用',
+      align: 'center',
+      children: [{
+        label: '1',
+        prop: 'ryrg',
+        span: 24,
+        width: 105,
+        align: 'center',
+        showOverflowTooltip: true,
+      }]
+    },
+    {
+      label: '直接投入费用',
+      align: 'center',
+      children: [{
+        label: '2',
+        prop: 'zjtl',
+        span: 24,
+        width: 105,
+        align: 'center',
+        showOverflowTooltip: true,
+      }]
+    },
+    {
+      label: '折旧费用',
+      align: 'center',
+      children: [{
+        label: '3',
+        prop: 'zjfy',
+        span: 24,
+        width: 90,
+        align: 'center',
+        showOverflowTooltip: true,
+      }]
+    },
+    {
+      label: '无形资产摊销',
+      align: 'center',
+      children: [{
+        label: '4',
+        prop: 'wxzctx',
+        span: 24,
+        width: 105,
+        align: 'center',
+        showOverflowTooltip: true,
+      }]
+    },
+    {
+      label: '新产品设计费等',
+      align: 'center',
+      children: [{
+        label: '5',
+        prop: 'sjf',
+        span: 24,
+        width: 105,
+        align: 'center',
+        showOverflowTooltip: true,
+      }]
+    },
+    {
+      label: '前五项 小计',
+      align: 'center',
+      children: [{
+        label: '6',
+        prop: 'qwxsj',
+        span: 24,
+        width: 100,
+        align: 'center',
+        showOverflowTooltip: true,
+      }]
+    },
+    {
+      label: '其他相关费用',
+      align: 'center',
+      children: [{
+        label: '其他相关费用合计',
+        align: 'center',
+        children: [{
+          label: '7.1',
+          prop: 'qtfxhj',
+          span: 24,
+          width: 100,
+          align: 'center',
+          showOverflowTooltip: true,
+        }]
+      }, {
+        label: '经限额调整后的其他相关费用',
+        align: 'center',
+        children: [{
+          label: '7.2',
+          prop: 'tzhqtfy',
+          span: 24,
+          width: 110,
+          align: 'center',
+          showOverflowTooltip: true,
+        }]
+      }],
+    },
+    {
+      label: '委托研发费用及限额',
+      align: 'center',
+      children: [{
+        label: '委托境内机构或个人进行研发活动所发生的费用',
+        align: 'center',
+        children: [{
+          label: '8.1',
+          prop: '8.1',
+          span: 24,
+          width: 120,
+          align: 'center',
+          showOverflowTooltip: true,
+        }]
+      }, {
+        label: '允许加计扣除的委托境内机构或个人进行研发活动所发生的费用',
+        align: 'center',
+        children: [{
+          label: '8.2',
+          prop: '8.2',
+          span: 24,
+          width: 120,
+          align: 'center',
+          showOverflowTooltip: true,
+        }]
+      }, {
+        label: '委托境外机构进行研发活动所发生的费用',
+        align: 'center',
+        children: [{
+          label: '8.3',
+          prop: '8.3',
+          span: 24,
+          width: 120,
+          align: 'center',
+          showOverflowTooltip: true,
+        }]
+      }, {
+        label: '经限额调整后的委托境外机构进行研发活动所发生的费用',
+        align: 'center',
+        children: [{
+          label: '8.4',
+          prop: '8.4',
+          span: 24,
+          width: 120,
+          align: 'center',
+          showOverflowTooltip: true,
+        }]
+      }],
+    },
+    {
+      label: '开始时间',
+      prop: 'kssj',
+      type: 'date',
+      search: true,
+      align: 'center',
+      showOverflowTooltip: true,
+      hide: true,
+    },
+  ],
+};

+ 135 - 0
src/option/externalReports/kjAuxiliaryDetails.js

@@ -0,0 +1,135 @@
+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: 'pzrq',
+      span: 24,
+      width: 90,
+      align: 'center',
+      showOverflowTooltip: true,
+    },
+    {
+      label: '凭证字号',
+      prop: 'pzzh',
+      span: 24,
+      width: 120,
+      align: 'center',
+      search: true,
+      showOverflowTooltip: true,
+    },
+    {
+      label: '摘要',
+      prop: 'zy',
+      span: 24,
+      width: 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: 90,
+      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: 90,
+      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,
+    },
+    {
+      label: '开始时间',
+      prop: 'kssj',
+      type: 'date',
+      search: true,
+      align: 'center',
+      showOverflowTooltip: true,
+      hide: true,
+    },
+  ],
+};

+ 126 - 0
src/option/externalReports/kjAuxiliarySumList.js

@@ -0,0 +1,126 @@
+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: '研发项目名称',
+      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: 90,
+      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: 90,
+      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,
+    },
+    {
+      label: '开始时间',
+      prop: 'kssj',
+      type: 'date',
+      search: true,
+      align: 'center',
+      showOverflowTooltip: true,
+      hide: true,
+    },
+  ],
+};

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

@@ -0,0 +1,113 @@
+<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="kssjSearch">
+        <el-date-picker
+          v-model="params.kssjRange"
+          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/attendance/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);
+      })
+    },
+    headerCellStyle ({ column }) {
+      let color = column.labelClassName ? 'red' : 'rgba(0,0,0,.85)';
+      return {
+        color
+      }
+    }
+  },
+}, {
+  // 模块路径
+  name: 'externalReports/jjkcAuxiliarySumList',
+  res: ({ data }) => {
+    return data;
+  },
+});
+</script>

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

@@ -0,0 +1,113 @@
+<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="kssjSearch">
+        <el-date-picker
+          v-model="params.kssjRange"
+          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/attendance/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);
+      })
+    },
+    headerCellStyle ({ column }) {
+      let color = column.labelClassName ? 'red' : 'rgba(0,0,0,.85)';
+      return {
+        color
+      }
+    }
+  },
+}, {
+  // 模块路径
+  name: 'externalReports/kjAuxiliaryDetails',
+  res: ({ data }) => {
+    return data;
+  },
+});
+</script>

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

@@ -0,0 +1,113 @@
+<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="kssjSearch">
+        <el-date-picker
+          v-model="params.kssjRange"
+          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/attendance/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);
+      })
+    },
+    headerCellStyle ({ column }) {
+      let color = column.labelClassName ? 'red' : 'rgba(0,0,0,.85)';
+      return {
+        color
+      }
+    }
+  },
+}, {
+  // 模块路径
+  name: 'externalReports/kjAuxiliarySumList',
+  res: ({ data }) => {
+    return data;
+  },
+});
+</script>