|
@@ -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>
|