会计报表

main
mo 1 year ago
parent 6347c4e2d0
commit ce01eec2df

@ -9,16 +9,6 @@
v-show="showSearch" v-show="showSearch"
label-width="68px" label-width="68px"
> >
<el-form-item label="会计年度" prop="year">
<el-date-picker
format="yyyy年"
v-model="queryParams.year"
value-format="yyyy"
type="year"
placeholder="请选择会计年度"
>
</el-date-picker>
</el-form-item>
<el-form-item label="会计期间" prop="period"> <el-form-item label="会计期间" prop="period">
<el-date-picker <el-date-picker
popper-class="due_month" popper-class="due_month"
@ -30,6 +20,15 @@
> >
</el-date-picker> </el-date-picker>
</el-form-item> </el-form-item>
<el-form-item label="业务组织" prop="company">
<el-input
v-model="queryParams.company"
placeholder="请输入业务组织"
clearable
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item> <el-form-item>
<el-button type="primary" icon="el-icon-search" @click="handleQuery" <el-button type="primary" icon="el-icon-search" @click="handleQuery"
>搜索</el-button >搜索</el-button
@ -295,20 +294,9 @@ export default {
{ required: true, message: "请输入会计期间", trigger: "blur" }, { required: true, message: "请输入会计期间", trigger: "blur" },
], ],
}, },
tableData: [
{
type: "总账",
},
{
type: "明细账",
},
{
type: "日记账",
},
],
uploadUrl: uploadUrl:
process.env.VUE_APP_BASE_API + process.env.VUE_APP_BASE_API +
"/admin-api//archives/accounting-book/upload", // "/admin-api/archives/accounting-book/upload", //
headers: { Authorization: "Bearer " + getAccessToken() }, // headers: { Authorization: "Bearer " + getAccessToken() }, //
type0: 0, type0: 0,
type1: 1, type1: 1,

@ -9,24 +9,6 @@
v-show="showSearch" v-show="showSearch"
label-width="98px" label-width="98px"
> >
<el-form-item label="报表文件名称" prop="name">
<el-input
v-model="queryParams.name"
placeholder="请输入报表文件名称"
clearable
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item label="会计年度" prop="year">
<el-date-picker
format="yyyy年"
v-model="queryParams.year"
value-format="yyyy"
type="year"
placeholder="请选择会计年度"
>
</el-date-picker>
</el-form-item>
<el-form-item label="会计期间" prop="period"> <el-form-item label="会计期间" prop="period">
<el-date-picker <el-date-picker
popper-class="due_month" popper-class="due_month"
@ -38,6 +20,22 @@
> >
</el-date-picker> </el-date-picker>
</el-form-item> </el-form-item>
<el-form-item label="业务组织" prop="company">
<el-input
v-model="queryParams.company"
placeholder="请输入业务组织"
clearable
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item label="报表类型" prop="type">
<el-input
v-model="queryParams.type"
placeholder="请输入报表类型"
clearable
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item> <el-form-item>
<el-button type="primary" icon="el-icon-search" @click="handleQuery" <el-button type="primary" icon="el-icon-search" @click="handleQuery"
>搜索</el-button >搜索</el-button
@ -178,6 +176,65 @@
</el-date-picker> </el-date-picker>
</el-form-item> </el-form-item>
</el-form> </el-form>
<table id="table_order">
<thead>
<tr>
<th>类型</th>
<th>文件</th>
</tr>
</thead>
<tbody>
<tr>
<td>资产负债表</td>
<td>
<el-upload
ref="upload"
:multiple="false"
:action="uploadUrl + '?type=' + type0"
:headers="headers"
:file-list="fileList"
:auto-upload="false"
:on-success="test"
>
<div class="el-upload__text">点击上传或将文件拖拽到此处</div>
</el-upload>
</td>
</tr>
<tr>
<td>现金流量表</td>
<td>
<el-upload
ref="upload1"
:multiple="false"
:action="uploadUrl + '?type=' + type1"
:headers="headers"
:file-list="fileList1"
:auto-upload="false"
:on-success="test1"
>
<div class="el-upload__text">点击上传或将文件拖拽到此处</div>
</el-upload>
</td>
</tr>
<tr>
<td>利润表</td>
<td>
<el-upload
ref="upload2"
:multiple="false"
:action="uploadUrl + '?type=' + type2"
:headers="headers"
:file-list="fileList2"
:auto-upload="false"
:on-success="test2"
>
<div class="el-upload__text">点击上传或将文件拖拽到此处</div>
</el-upload>
</td>
</tr>
</tbody>
</table>
<div slot="footer" class="dialog-footer"> <div slot="footer" class="dialog-footer">
<el-button type="primary" @click="submitForm"> </el-button> <el-button type="primary" @click="submitForm"> </el-button>
@ -190,12 +247,13 @@
<script> <script>
import { import {
createAccountingReport, createAccountingReport,
updateAccountingReport,
deleteAccountingReport, deleteAccountingReport,
getAccountingReport, getAccountingReport,
getAccountingReportPage, getAccountingReportPage,
exportAccountingReportExcel, exportAccountingReportExcel,
} from "@/api/accounting/report"; } from "@/api/accounting/report";
import { getAccessToken } from "@/utils/auth";
import { getOrganizationPage } from "@/api/setting/organization";
export default { export default {
name: "AccountingReport", name: "AccountingReport",
@ -214,6 +272,9 @@ export default {
list: [], list: [],
// //
title: "", title: "",
fileList: [],
fileList1: [],
fileList2: [],
// //
open: false, open: false,
// //
@ -238,11 +299,28 @@ export default {
// //
form: {}, form: {},
// //
rules: {}, rules: {
// company: [
// { required: true, message: "", trigger: "blur" },
// ],
year: [{ required: true, message: "请输入会计年度", trigger: "blur" }],
period: [
{ required: true, message: "请输入会计期间", trigger: "blur" },
],
},
uploadUrl:
process.env.VUE_APP_BASE_API +
"/admin-api//archives/accounting-report/upload", //
headers: { Authorization: "Bearer " + getAccessToken() }, //
type0: 0,
type1: 1,
type2: 2,
organizationList: [],
}; };
}, },
created() { created() {
this.getList(); this.getList();
this.getOrganizationList();
}, },
methods: { methods: {
/** 查询列表 */ /** 查询列表 */
@ -279,6 +357,9 @@ export default {
deptName: undefined, deptName: undefined,
}; };
this.resetForm("form"); this.resetForm("form");
this.fileList = [];
this.fileList1 = [];
this.fileList2 = [];
}, },
/** 搜索按钮操作 */ /** 搜索按钮操作 */
handleQuery() { handleQuery() {
@ -306,6 +387,12 @@ export default {
this.title = "修改会计报表"; this.title = "修改会计报表";
}); });
}, },
//
getOrganizationList() {
getOrganizationPage().then((response) => {
this.organizationList = response.data.list;
});
},
// //
handleCompanyChange(val) { handleCompanyChange(val) {
var data = this.organizationList.find((item) => item.id == val); var data = this.organizationList.find((item) => item.id == val);
@ -316,24 +403,34 @@ export default {
/** 提交按钮 */ /** 提交按钮 */
submitForm() { submitForm() {
this.$refs["form"].validate((valid) => { this.$refs["form"].validate((valid) => {
if (!valid) { if (valid) {
return; //
this.$refs.upload.submit();
this.$refs.upload1.submit();
this.$refs.upload2.submit();
} }
// });
if (this.form.id != null) { },
updateAccountingReport(this.form).then((response) => { test(response, file, fileList) {
this.$modal.msgSuccess("修改成功"); console.log(response, file, fileList);
createAccountingReport(this.form).then((response) => {
this.$modal.msgSuccess("新增成功");
this.open = false; this.open = false;
this.getList(); this.getList();
}); });
return; },
} test1(response, file, fileList) {
// console.log(response, file, fileList);
createAccountingReport(this.form).then((response) => { createAccountingReport(this.form).then((response) => {
this.$modal.msgSuccess("新增成功");
this.open = false; this.open = false;
this.getList(); this.getList();
}); });
},
test2(response, file, fileList) {
console.log(response, file, fileList);
createAccountingReport(this.form).then((response) => {
this.open = false;
this.getList();
}); });
}, },
/** 删除按钮操作 */ /** 删除按钮操作 */
@ -371,3 +468,21 @@ export default {
}, },
}; };
</script> </script>
<style scoped>
table {
border: 1px solid #000;
border-collapse: collapse;
text-align: center;
margin: auto;
width: 500px;
}
table tr td {
border: 1px solid #000;
padding: 10px;
}
table tr th {
border: 1px solid #000;
background-color: #cccccc;
}
</style>

Loading…
Cancel
Save