Explorar o código

'数据上传'

zsp hai 3 meses
pai
achega
2d6df3edad
Modificáronse 4 ficheiros con 506 adicións e 2 borrados
  1. 83 0
      cls
  2. 5 0
      src/router/router.js
  3. 400 0
      src/views/manage/dataUpload.vue
  4. 18 2
      src/views/manage/manageMain.vue

+ 83 - 0
cls

@@ -0,0 +1,83 @@
+commit 890261e26a4bfc9d554ec27af5fd9e05889f14ee (HEAD -> zsp, origin/zsp, origin/master, origin/HEAD, master)
+Author: plg <1728114110@qq.com>
+Date:   Thu Jul 18 10:33:12 2024 +0800
+
+    注释
+
+commit ab040874be7c627edc783fd4ef87c5775964ed02
+Author: plg <1728114110@qq.com>
+Date:   Fri Jun 28 16:06:48 2024 +0800
+
+    修改版本信息
+
+commit b865996202c2536255302c095f331383d4170bc3
+Author: plg <1728114110@qq.com>
+Date:   Wed Jun 26 18:22:45 2024 +0800
+
+    修改结算菜单
+
+commit 18c55e881bed69cf572dfe85122e55b05d02dff6
+Author: plg <1728114110@qq.com>
+Date:   Wed Jun 26 17:51:32 2024 +0800
+
+    编辑首页
+
+commit 42afc20104cc4fe0f3b64c308fec0c871a7b9d39
+Author: plg <1728114110@qq.com>
+Date:   Wed Jun 26 15:52:03 2024 +0800
+
+    修改用户管理
+
+commit 3076732d039a83256d34a8dca34a529cdfe4adf9
+Author: plg <1728114110@qq.com>
+Date:   Tue Jun 25 19:10:51 2024 +0800
+
+    提交签约详情-及用户管理中字段
+
+commit a6695bb0cc18a8d7d56776925e7a70242cb388af
+Author: plg <1728114110@qq.com>
+Date:   Tue Jun 25 17:07:21 2024 +0800
+
+    去除打印信息
+
+commit 4c54d8ad297bbbc33afd3d4e79b8dcfff587c51b
+Author: plg <1728114110@qq.com>
+Date:   Tue Jun 25 17:02:41 2024 +0800
+
+    修改多次点击问题
+
+commit 4be7257368b037ae1611e29e37103d0896013b76
+Author: plg <1728114110@qq.com>
+Date:   Mon Jun 24 19:10:16 2024 +0800
+
+    修改邀约订单--员工搜索
+
+commit 93474bf42e61b6228d99bb4b03958b38dc7a43f8
+Author: plg <1728114110@qq.com>
+Date:   Mon Jun 24 19:01:02 2024 +0800
+
+    财税报告--和订单管理
+
+commit c945ec8349d7d56848c4b33fa4e9e5422890b855
+Author: plg <1728114110@qq.com>
+Date:   Mon Jun 24 09:13:55 2024 +0800
+
+    修改已开发完的需求上传
+
+commit 15d96c250e714f1133c9b41221edaba62a98d200
+Author: plg <1728114110@qq.com>
+Date:   Thu Jun 20 10:03:46 2024 +0800
+
+    修改样式及菜单
+
+commit e712118db35362e805bfe3a6f67df0d73a4ceb24
+Author: plg <1728114110@qq.com>
+Date:   Wed Jun 12 18:05:58 2024 +0800
+
+    修改背景图片
+
+commit 321e3c961dd65015b525343275b495974ffcbb8a
+Author: plg <1728114110@qq.com>
+Date:   Wed Jun 12 17:42:33 2024 +0800
+
+    版本初始化

+ 5 - 0
src/router/router.js

@@ -167,6 +167,11 @@ export const routerList = [
         name: "gameRecordDetail",
         component: () => import("../views/manage/gameRecordDetail"),
       },
+      {
+        path: "dataUpload",
+        name: "dataUpload",
+        component: () => import("../views/manage/dataUpload"),
+      },
     ],
   },
 ];

+ 400 - 0
src/views/manage/dataUpload.vue

@@ -0,0 +1,400 @@
+<template>
+  <div class="record-warp">
+    <div style="display: flex; justify-content: flex-end; padding-right: 50px">
+      <el-button type="primary" round @click="handSubmit">确 定</el-button>
+    </div>
+
+    <el-form
+      :inline="true"
+      :model="ruleForm"
+      :rules="rules"
+      ref="ruleForm"
+      label-width="200px"
+      class="demo-ruleForm"
+    >
+      <el-col :xs="24" :sm="24" :md="14" :lg="12" :xl="12">
+        <el-form-item label="省份" prop="logo">
+          <el-select v-model="ruleForm.provinceCode" placeholder="请选择">
+            <el-option
+              v-for="item in province"
+              :key="item.provinceCode"
+              :label="item.provinceName"
+              :value="item.provinceCode"
+            >
+            </el-option>
+          </el-select>
+        </el-form-item>
+      </el-col>
+
+      <el-col :xs="24" :sm="24" :md="12" :lg="12" :xl="12">
+        <el-form-item label="副本基础信息" prop="logo">
+          <el-upload
+            accept=".xlsx"
+            class="avatar-uploader"
+            action="''"
+            name="file"
+            :http-request="handFileUpload"
+            :show-file-list="false"
+            :before-upload="beforeAvatarUpload"
+          >
+            <img
+              v-if="ruleForm.file"
+              src="../../assets/img/commons/logo.png"
+              class="avatar"
+            />
+            <i v-else class="el-icon-plus avatar-uploader-icon"></i>
+            <div class="el-upload__tip" slot="tip">
+              建议上传.xlsx文件,且不超过500kb
+            </div>
+          </el-upload>
+        </el-form-item>
+      </el-col>
+      <el-col :xs="24" :sm="24" :md="12" :lg="12" :xl="12">
+        <el-form-item label="销项发票" prop="logo">
+          <el-upload
+            accept=".xlsx"
+            class="avatar-uploader"
+            action="''"
+            name="file"
+            :http-request="handSellFileUpload"
+            :show-file-list="false"
+            :before-upload="beforeAvatarUpload"
+          >
+            <img
+              v-if="ruleForm.sellInvoiceFile"
+              src="../../assets/img/commons/logo.png"
+              class="avatar"
+            />
+            <i v-else class="el-icon-plus avatar-uploader-icon"></i>
+            <div class="el-upload__tip" slot="tip">
+              建议上传.xlsx文件,且不超过500kb
+            </div>
+          </el-upload>
+        </el-form-item>
+      </el-col>
+      <el-col :xs="24" :sm="24" :md="12" :lg="12" :xl="12">
+        <el-form-item label="进项发票" prop="logo">
+          <el-upload
+            accept=".xlsx"
+            class="avatar-uploader"
+            action="''"
+            name="file"
+            :http-request="handBuyFileUpload"
+            :show-file-list="false"
+            :before-upload="beforeAvatarUpload"
+          >
+            <img
+              v-if="ruleForm.buyInvoiceFile"
+              src="../../assets/img/commons/logo.png"
+              class="avatar"
+            />
+            <i v-else class="el-icon-plus avatar-uploader-icon"></i>
+            <div class="el-upload__tip" slot="tip">
+              建议上传.xlsx文件,且不超过500kb
+            </div>
+          </el-upload>
+        </el-form-item>
+      </el-col>
+
+      <el-col :xs="24" :sm="24" :md="12" :lg="12" :xl="12">
+        <el-form-item label="财务年报" prop="logo">
+          <el-upload
+            accept=".xlsx"
+            class="avatar-uploader"
+            action="''"
+            name="file"
+            :http-request="handAnnualFileUpload"
+            :show-file-list="false"
+            :before-upload="beforeAvatarUpload"
+          >
+            <img
+              v-if="ruleForm.annualReportFile"
+              src="../../assets/img/commons/logo.png"
+              class="avatar"
+            />
+            <i v-else class="el-icon-plus avatar-uploader-icon"></i>
+            <div class="el-upload__tip" slot="tip">
+              建议上传.xlsx文件,且不超过500kb
+            </div>
+          </el-upload>
+        </el-form-item>
+      </el-col>
+      <el-col :xs="24" :sm="24" :md="12" :lg="12" :xl="12">
+        <el-form-item label="企业所得税年报" prop="logo">
+          <el-upload
+            accept=".xlsx"
+            class="avatar-uploader"
+            action="''"
+            name="file"
+            :http-request="handIncomeYearFileUpload"
+            :show-file-list="false"
+            :before-upload="beforeAvatarUpload"
+          >
+            <img
+              v-if="ruleForm.incomeYearFile"
+              src="../../assets/img/commons/logo.png"
+              class="avatar"
+            />
+            <i v-else class="el-icon-plus avatar-uploader-icon"></i>
+            <div class="el-upload__tip" slot="tip">
+              建议上传.xlsx文件,且不超过500kb
+            </div>
+          </el-upload>
+        </el-form-item>
+      </el-col>
+      <el-col :xs="24" :sm="24" :md="12" :lg="12" :xl="12">
+        <el-form-item label="企业所得税季报" prop="logo">
+          <el-upload
+            accept=".xlsx"
+            class="avatar-uploader"
+            action="''"
+            name="file"
+            :http-request="handIncomeFileUpload"
+            :show-file-list="false"
+            :before-upload="beforeAvatarUpload"
+          >
+            <img
+              v-if="ruleForm.incomeQuarterFile"
+              src="../../assets/img/commons/logo.png"
+              class="avatar"
+            />
+            <i v-else class="el-icon-plus avatar-uploader-icon"></i>
+            <div class="el-upload__tip" slot="tip">
+              建议上传.xlsx文件,且不超过500kb
+            </div>
+          </el-upload>
+        </el-form-item>
+      </el-col>
+      <el-col :xs="24" :sm="24" :md="12" :lg="12" :xl="12">
+        <el-form-item label="2024财务季报" prop="logo">
+          <el-upload
+            accept=".xlsx"
+            class="avatar-uploader"
+            action="''"
+            name="file"
+            :http-request="handAnnualReportFileUpload"
+            :show-file-list="false"
+            :before-upload="beforeAvatarUpload"
+          >
+            <img
+              v-if="ruleForm.annualReportQuarterFile"
+              src="../../assets/img/commons/logo.png"
+              class="avatar"
+            />
+            <i v-else class="el-icon-plus avatar-uploader-icon"></i>
+            <div class="el-upload__tip" slot="tip">
+              建议上传.xlsx文件,且不超过500kb
+            </div>
+          </el-upload>
+        </el-form-item>
+      </el-col>
+      <el-col :xs="24" :sm="24" :md="12" :lg="12" :xl="12">
+        <el-form-item label="税务信息" prop="logo">
+          <el-upload
+            accept=".xlsx"
+            class="avatar-uploader"
+            action="''"
+            name="file"
+            :http-request="handTaxFileUpload"
+            :show-file-list="false"
+            :before-upload="beforeAvatarUpload"
+          >
+            <img
+              v-if="ruleForm.taxFile"
+              src="../../assets/img/commons/logo.png"
+              class="avatar"
+            />
+            <i v-else class="el-icon-plus avatar-uploader-icon"></i>
+            <div class="el-upload__tip" slot="tip">
+              建议上传.xlsx文件,且不超过500kb
+            </div>
+          </el-upload>
+        </el-form-item>
+      </el-col>
+      <el-col :xs="24" :sm="24" :md="12" :lg="12" :xl="12">
+        <el-form-item label="增值税申报" prop="logo">
+          <el-upload
+            accept=".xlsx"
+            class="avatar-uploader"
+            action="''"
+            name="file"
+            :http-request="handVatFileUpload"
+            :show-file-list="false"
+            :before-upload="beforeAvatarUpload"
+          >
+            <img
+              v-if="ruleForm.vatFile"
+              src="../../assets/img/commons/logo.png"
+              class="avatar"
+            />
+            <i v-else class="el-icon-plus avatar-uploader-icon"></i>
+            <div class="el-upload__tip" slot="tip">
+              建议上传.xlsx文件,且不超过500kb
+            </div>
+          </el-upload>
+        </el-form-item>
+      </el-col>
+    </el-form>
+  </div>
+</template>
+<script>
+import { basePath } from "../../utils/http";
+import axios from "axios";
+import { oSessionStorage } from "../../utils/utils";
+export default {
+  name: "dataUpload",
+  data() {
+    return {
+      ruleForm: {
+        file: "", // 副本基础信息
+        taskId: "",
+        sellInvoiceFile: "",
+        buyInvoiceFile: "",
+        provinceCode: "",
+        annualReportFile: "",
+        incomeYearFile: "",
+        incomeQuarterFile: "",
+        annualReportQuarterFile: "",
+        taxFile: "",
+        vatFile: "",
+      },
+      rules: {},
+      action: "",
+      province: [],
+    };
+  },
+  mounted() {
+    this.action = basePath + "/file/customUpload";
+    this.getProvince();
+    this.getTaskStatus();
+  },
+  methods: {
+    getProvince() {
+      this.$http.get(`province/findAll`, {}, (res) => {
+        if (res && res.code == 200) {
+          this.province = res.data;
+        } else {
+          this.$toast.fail(res.msg);
+        }
+      });
+    },
+    getTaskStatus(status) {
+      this.$http.get(`/task/find/0`, {}, (res) => {
+        if (res && res.code == 200) {
+          this.taskStatusId = res.data;
+        } else {
+          this.$toast.fail(res.msg);
+        }
+      });
+    },
+    beforeAvatarUpload(file) {
+      const fileName = file.name;
+      const fileType = fileName.substring(fileName.lastIndexOf("."));
+      if (fileType !== ".xlsx") {
+        this.$message.error("请上传xlsx!");
+        return false;
+      }
+      return true;
+    },
+
+    //上传成功后的回调
+    handFileUpload(param) {
+      this.ruleForm.file = param.file;
+    },
+    handSellFileUpload(param) {
+      this.ruleForm.sellInvoiceFile = param.file;
+    },
+    handBuyFileUpload(param) {
+      this.ruleForm.buyInvoiceFile = param.file;
+    },
+    handAnnualFileUpload(param) {
+      this.ruleForm.annualReportFile = param.file;
+    },
+    handIncomeYearFileUpload(param) {
+      this.ruleForm.incomeYearFile = param.file;
+    },
+    handAnnualReportFileUpload(param) {
+      this.ruleForm.annualReportQuarterFile = param.file;
+    },
+    handIncomeFileUpload(param) {
+      this.ruleForm.incomeQuarterFile = param.file;
+    },
+    handTaxFileUpload(param) {
+      this.ruleForm.taxFile = param.file;
+    },
+    handVatFileUpload(param) {
+      this.ruleForm.vatFile = param.file;
+    },
+    handSubmit() {
+      let formData = new FormData(); // FormData 对象
+      for (let i in this.ruleForm) {
+        formData.append(i, this.ruleForm[i]);
+      }
+      axios
+        .post("pdf/generate/report", formData, {
+          headers: {
+            Authorization: oSessionStorage.getItem("token")
+              ? `Bearer ${oSessionStorage.getItem("token")}`
+              : "",
+          },
+        })
+        .then((res) => {
+          if (res && res.code == 200) {
+            this.$message.success(res.msg);
+          } else {
+            this.$message.error(res.msg);
+          }
+        });
+    },
+  },
+};
+</script>
+
+
+<style lang="less">
+.record-warp {
+  width: 100%;
+  display: flex;
+  flex-direction: column;
+  .demo-ruleForm {
+    overflow-y: auto;
+    flex: 1;
+  }
+}
+.avatar-uploader {
+  display: flex;
+  justify-content: space-between;
+  flex-direction: column;
+}
+
+ .el-upload {
+  
+  border-radius: 6px;
+  cursor: pointer;
+}
+
+.avatar-uploader .el-upload:hover {
+  border-color: #409eff;
+}
+
+.avatar-uploader-icon {
+  font-size: 28px;
+  color: #8c939d;
+  width: 90px;
+  height: 90px;
+  line-height: 90px;
+  text-align: center;
+  border: 1px solid;
+}
+
+.avatar {
+  width: 88px;
+  height: 88px;
+  object-fit: contain;
+}
+.el-upload {
+  display: flex;
+  justify-content: center;
+  align-items: center;
+}
+</style>

+ 18 - 2
src/views/manage/manageMain.vue

@@ -161,12 +161,12 @@ import vueQr from "vue-qr";
 import { mapGetters, mapActions } from "vuex";
 import { oSessionStorage } from "@/utils/utils";
 import register from "@/components/Register";
-import Footer from "@/components/Footer";
+// import Footer from "@/components/Footer";
 export default {
   name: "manageMain",
   components: {
     vueQr,
-    Footer,
+    // Footer,
   },
   computed: {
     // ...mapGetters(['sacleListName']),
@@ -452,6 +452,22 @@ export default {
             },
           ],
         },
+        {
+          id: "6",
+          name: "数据管理",
+          icon: "el-icon-s-order",
+          path: "/manage/dataManage",
+          showItem: true,
+          child:[
+              {
+                id: '53',
+                name: "数据上传",
+                icon: "el-icon-user-solid",
+                path: "/manage/dataUpload",
+                showItem: true,
+              },
+            ]
+        },
         // {
         //   id: "6",
         //   name: "数据大屏",