Browse Source

提交研发费用汇总表页面

ljb 10 months ago
parent
commit
d0bb09eab1

+ 41 - 0
src/api/yfCostManage/yfCostStatistics/yfCostSummaryList.js

@@ -0,0 +1,41 @@
+import request from '@/router/axios';
+
+export const getList = (current, size, params) => {
+  return request({
+    url: '/api/kd-scientific/lease/page',
+    method: 'get',
+    params: {
+      ...params,
+      current,
+      size,
+    }
+  })
+}
+
+export const add = (row) => {
+  return request({
+    url: '/api/kd-scientific/lease/submit',
+    method: 'post',
+    data: row
+  })
+}
+
+
+export const update = (row) => {
+  return request({
+    url: '/api/kd-scientific/lease/submit',
+    method: 'post',
+    data: row
+  })
+}
+
+
+export const remove = (ids) => {
+  return request({
+    url: '/api/kd-scientific/lease/remove',
+    method: 'post',
+    params: {
+      ids
+    }
+  })
+}

+ 162 - 0
src/option/yfCostManage/yfCostStatistics/yfCostSummaryList.js

@@ -0,0 +1,162 @@
+export default {
+  height: 'auto',
+  calcHeight: 30,
+  tip: false,
+  searchShow: true,
+  searchMenuSpan: 6,
+  border: true,
+  index: true,
+  selection: true,
+  addBtn: false,
+  menu: false,
+  searchLabelWidth: 140,
+  labelWidth: 130,
+  menuWidth: 140,
+  dialogClickModal: false,
+  dialogWidth: 500,
+  dialogType: "drawer",
+  showSummary: true,
+  sumColumnList: [
+    {
+      name: 'price',
+      type: 'sum',
+    },
+  ],
+  column: [
+    {
+      label: '月份',
+      prop: 'yearAndMonth',
+      width: 80,
+      align: 'center',
+      showOverflowTooltip: true,
+    },
+    {
+      label: '人员人工费用',
+      prop: 'ryrg',
+      type: 'number',
+      span: 24,
+      minWidth: 120,
+      align: 'center',
+      min: 0,
+      precision: 2,
+      showOverflowTooltip: true,
+    },
+    {
+      label: '直接投入费用',
+      prop: 'zjtr',
+      type: 'number',
+      span: 24,
+      minWidth: 120,
+      align: 'center',
+      min: 0,
+      precision: 2,
+      showOverflowTooltip: true,
+    },
+    {
+      label: '折旧费用和长期待摊费用',
+      prop: 'zjfy',
+      type: 'number',
+      span: 24,
+      minWidth: 120,
+      align: 'center',
+      min: 0,
+      precision: 2,
+      showOverflowTooltip: true,
+    },
+    {
+      label: '设计费用',
+      prop: 'sjfy',
+      type: 'number',
+      span: 24,
+      minWidth: 120,
+      align: 'center',
+      min: 0,
+      precision: 2,
+      showOverflowTooltip: true,
+    },
+    {
+      label: '无形资产摊销费用',
+      prop: 'wxzcfy',
+      type: 'number',
+      span: 24,
+      minWidth: 120,
+      align: 'center',
+      min: 0,
+      precision: 2,
+      showOverflowTooltip: true,
+    },
+    {
+      label: '装备调试费用与试验费用',
+      prop: 'zbtsfy',
+      type: 'number',
+      span: 24,
+      minWidth: 120,
+      align: 'center',
+      min: 0,
+      precision: 2,
+      showOverflowTooltip: true,
+    },
+    {
+      label: '其他费用',
+      prop: 'qtfy',
+      type: 'number',
+      span: 24,
+      minWidth: 120,
+      align: 'center',
+      min: 0,
+      precision: 2,
+      showOverflowTooltip: true,
+    },
+    {
+      label: '委托研发费用及限额',
+      align: 'center',
+      children: [
+        {
+          label: '委外研发',
+          prop: 'wwfy',
+          type: 'number',
+          span: 24,
+          minWidth: 120,
+          align: 'center',
+          min: 0,
+          precision: 2,
+          showOverflowTooltip: true,
+        },
+        {
+          label: '经调整后的委外研发费用',
+          prop: 'tzhwwfy',
+          type: 'number',
+          span: 24,
+          minWidth: 120,
+          align: 'center',
+          min: 0,
+          precision: 2,
+          showOverflowTooltip: true,
+        },
+      ]
+    },
+    {
+      label: '合计',
+      prop: 'amount',
+      type: 'number',
+      span: 24,
+      minWidth: 120,
+      align: 'center',
+      min: 0,
+      precision: 2,
+      showOverflowTooltip: true,
+    },
+    {
+      label: '费用区间(元)',
+      prop: 'costRange',
+      type: 'number',
+      span: 24,
+      width: 100,
+      align: 'center',
+      min: 0,
+      precision: 2,
+      hide: true,
+      search: true,
+    },
+  ],
+};

+ 118 - 0
src/views/yf-cost-manage/yf-cost-statistics/wxzc-cost-statistics/yf-cost-summary-list.vue

@@ -0,0 +1,118 @@
+<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="rqSearch">
+        <el-date-picker
+          v-model="params.rq"
+          type="daterange"
+          range-separator="至"
+          start-placeholder="开始日期"
+          end-placeholder="结束日期"
+          value-format="yyyy-MM-dd"
+          style="width: 220px !important;"
+        >
+        </el-date-picker>
+      </template>
+
+      <template slot="costRangeSearch">
+        <div style="display: flex; align-items: center;">
+          <span>费用区间(元):</span>
+          <avue-input-number v-model="params.startSysm" :min="0" style="width: 100px !important;"></avue-input-number>
+          <span style="width: 20px; text-align: center;">至</span>
+          <avue-input-number v-model="params.endSysm" :min="0" style="width: 100px !important;"></avue-input-number>
+        </div>
+      </template>
+      
+    </avue-crud>
+
+    <upload-excel-dialog ref="uploadExcelDialog" :uploadAfter="uploadAfter"/>
+
+    <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";
+import Decimal from "decimal.js";
+
+
+export default window.$crudCommon({
+  components: {
+    YearMonthSelect,
+  },
+  data() {
+    return {
+      params: {
+        yearAndMonth: moment(new Date()).format('YYYYMM'),
+      },
+      defaultColumns: [],
+
+      wideTableColumns: [],
+      printTitle: "",
+    };
+  },
+  watch: {
+    'params.yearAndMonth'(newVal) {
+      this.page.currentPage = 1;
+      this.getList(this.page);
+    }
+  },
+  methods: {
+    handleExport() {
+      exportBlob(`/api/kd-scientific/lease/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);
+      })
+    },
+  },
+}, {
+  // 模块路径
+  name: 'yfCostManage/yfCostStatistics/yfCostSummaryList',
+  res: ({ data }) => {
+    return data;
+  },
+});
+</script>