Browse Source

附件补充页面开发

ljb 9 months ago
parent
commit
58a87f5c07

+ 19 - 0
src/api/achiveManage/fileSupplement.js

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

+ 45 - 0
src/option/achiveManage/fileSupplement.js

@@ -0,0 +1,45 @@
+export default {
+  calcHeight: 30,
+  tip: false,
+  searchShow: true,
+  searchMenuSpan: 6,
+  border: true,
+  addBtn: false,
+  index: true,
+  searchLabelWidth: 160,
+  labelWidth: 120,
+  menuWidth: 140,
+  delBtn: false,
+  editBtnText: '上传',
+  dialogClickModal: false,
+  dialogType: "drawer",
+  dialogWidth: 520,
+  column: [
+    {
+      label: '附件资料',
+      prop: 'fileName',
+      width: 400,
+      span: 24,
+      editDisabled: true,
+    },
+    {
+      label: '附件',
+      prop: 'fileList',
+      type: "upload",
+      multiple: true,
+      span: 24,
+      minWidth: 300,
+      action: '/api/kd-resource/oss/endpoint/put-file',
+      dataType: "object",
+      propsHttp: {
+        url: "link",
+        name: "originalName",
+        res: "data",
+      },
+      uploadPreview: (file, column, done) => {
+        window.open(file.url, "_blank");
+        return;
+      },
+    },
+  ],
+};

+ 170 - 0
src/views/archive-manage/file-supplement.vue

@@ -0,0 +1,170 @@
+<template>
+  <basic-container>
+    <avue-crud
+      v-bind="bindVal"
+      v-on="onEvent"
+      v-model="form"
+      :before-open="handleBeforeOpen"
+    >
+      <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.year" :showMonth="false"></year-month-select>
+        </div>
+      </template>
+
+      <template slot="fileList" slot-scope="{row}">
+        <el-link
+          v-for="(item, index) of row.fileList"
+          :key="index"
+          type="primary"
+          @click="handleDownFile(item)"
+          :style="{marginRight: index === row.fileList.length - 1 ? 0 : '16px'}"
+        >
+          {{ item.label }}
+        </el-link>
+      </template>
+      
+    </avue-crud>
+
+    <div class="file-temp-list">
+      <div class="row"><el-link>模板:当年和前两个会计年度研发费用总额及占同期销售收入比例的说明.doc.doc</el-link></div>
+      <div class="row"><el-link>模板:年度职工和科技人员情况说明.doc</el-link></div>
+      <div class="row"><el-link>模板:年度主要产品(服务)发挥核心支持作用的技术属于《国家重点支持的高新技术领域》规定范围的说明.doc</el-link></div>
+      <div class="row"><el-link>模版:研发费用结构明细表.doc</el-link></div>
+    </div>
+  </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: {
+        year: moment(new Date()).format('YYYY'),
+      },
+      isSelAnnual: false,
+
+      wideTableColumns: [],
+      printTitle: "",
+
+      currIndex: 0
+    };
+  },
+  watch: {
+    'params.year'() {
+      this.getList();
+    },
+  },
+  methods: {
+    loadData() {
+      this.loading = true;
+      this.api.getList(this.getSearchParams()).then(({ data }) => {
+        
+        if (data.code == 200) {
+          let list = [{
+            id: data.data.id,
+            fileName: '高新项目技术鉴定资料',
+            fileList: JSON.parse(data.data.d1 || '[]')
+          }, {
+            id: data.data.id,
+            fileName: '加计扣除项目技术鉴定资料',
+            fileList: JSON.parse(data.data.d2 || '[]')
+          }, {
+            id: data.data.id,
+            fileName: '高新技术企业认定资料',
+            fileList: JSON.parse(data.data.d3 || '[]')
+          }, {
+            id: data.data.id,
+            fileName: '年度主要产品(服务)发挥核心支持作用的技术属于《国家重点支持的高新技术领域》规定范围的说明',
+            fileList: JSON.parse(data.data.d4 || '[]')
+          }, {
+            id: data.data.id,
+            fileName: '高新技术产品(服务)及对应收入资料',
+            fileList: JSON.parse(data.data.d5 || '[]')
+          }, {
+            id: data.data.id,
+            fileName: '年度职工和科技人员情况说明',
+            fileList: JSON.parse(data.data.d6 || '[]')
+          }, {
+            id: data.data.id,
+            fileName: '当年和前两个会计年度研发费用总额及占同期销售收入比例的说明',
+            fileList: JSON.parse(data.data.d7 || '[]')
+          }, {
+            id: data.data.id,
+            fileName: '研发管理制度',
+            fileList: JSON.parse(data.data.d8 || '[]')
+          }, {
+            id: data.data.id,
+            fileName: '研发费用结构明细表',
+            fileList: JSON.parse(data.data.d9 || '[]')
+          }, {
+            id: data.data.id,
+            fileName: '加计扣除情况说明',
+            fileList: JSON.parse(data.data.d10 || '[]')
+          }, {
+            id: data.data.id,
+            fileName: '其他高新备查资料',
+            fileList: JSON.parse(data.data.d11 || '[]')
+          }, {
+            id: data.data.id,
+            fileName: '其他加计扣除备查资料',
+            fileList: JSON.parse(data.data.d12 || '[]')
+          }];
+          this.data = list;
+        }
+
+
+        this.loading = false;
+      })
+    },
+    handleBeforeOpen(done) {
+      this.currIndex = this.form.$index + 1;
+      done();
+    },
+    handleExport() {
+      exportBlob(`/api/kd-scientific/fjbczl/export?${this.website.tokenHeader}=${getToken()}`, this.params).then(res => {
+        downloadXls(res.data, `${this.params.year}附件补充.xlsx`);
+      });
+    },
+    handleDownFile(file) {
+      window.open(file.value);
+    },
+    getFormData() {
+      return { id: this.form.id, yearAndMonth: this.params.year, [`d${this.currIndex}`]: JSON.stringify(this.form.fileList) }
+    },
+  },
+}, {
+  // 模块路径
+  name: 'achiveManage/fileSupplement',
+});
+</script>
+
+<style lang="scss" scoped>
+.file-temp-list {
+  margin-top: 20px;
+  .row {
+    line-height: 24px;
+  }
+}
+</style>

+ 1 - 1
src/views/yf-cost-manage/basic-data-setting/yf-cost-bill.vue

@@ -126,7 +126,7 @@ export default window.$crudCommon({
   },
   },
   methods: {
   methods: {
     getSubjectList() {
     getSubjectList() {
-      getCompSubjectList().then(res => {
+      getCompSubjectList(1, 99999).then(res => {
         this.loading = false;
         this.loading = false;
         if (res.data.code == 200) {
         if (res.data.code == 200) {