|
|
|
@ -106,14 +106,21 @@
|
|
|
|
|
class-name="small-padding fixed-width"
|
|
|
|
|
>
|
|
|
|
|
<template v-slot="scope">
|
|
|
|
|
<!-- <el-button
|
|
|
|
|
<el-button
|
|
|
|
|
size="mini"
|
|
|
|
|
type="text"
|
|
|
|
|
icon="el-icon-download"
|
|
|
|
|
@click="handleDownload(scope.row)"
|
|
|
|
|
>下载</el-button
|
|
|
|
|
>
|
|
|
|
|
<el-button
|
|
|
|
|
size="mini"
|
|
|
|
|
type="text"
|
|
|
|
|
icon="el-icon-edit"
|
|
|
|
|
@click="handleUpdate(scope.row)"
|
|
|
|
|
v-hasPermi="['archives:accounting-book:update']"
|
|
|
|
|
>修改</el-button
|
|
|
|
|
> -->
|
|
|
|
|
>
|
|
|
|
|
<el-button
|
|
|
|
|
size="mini"
|
|
|
|
|
type="text"
|
|
|
|
@ -182,7 +189,7 @@
|
|
|
|
|
</el-form-item>
|
|
|
|
|
</el-form>
|
|
|
|
|
|
|
|
|
|
<table id="table_order">
|
|
|
|
|
<table id="table_order" v-if="optType != 'edit'">
|
|
|
|
|
<thead>
|
|
|
|
|
<tr>
|
|
|
|
|
<th>类型</th>
|
|
|
|
@ -285,7 +292,9 @@ import {
|
|
|
|
|
createAccountingBook,
|
|
|
|
|
deleteAccountingBook,
|
|
|
|
|
getAccountingBookPage,
|
|
|
|
|
getAccountingBook,
|
|
|
|
|
exportAccountingBookExcel,
|
|
|
|
|
updateAccountingBook,
|
|
|
|
|
downloadXml,
|
|
|
|
|
} from "@/api/accounting/book";
|
|
|
|
|
import { getAccessToken } from "@/utils/auth";
|
|
|
|
@ -296,6 +305,7 @@ export default {
|
|
|
|
|
components: {},
|
|
|
|
|
data() {
|
|
|
|
|
return {
|
|
|
|
|
optType: "",
|
|
|
|
|
// 遮罩层
|
|
|
|
|
loading: true,
|
|
|
|
|
// 导出遮罩层
|
|
|
|
@ -423,16 +433,39 @@ export default {
|
|
|
|
|
handleAdd() {
|
|
|
|
|
this.reset();
|
|
|
|
|
this.open = true;
|
|
|
|
|
this.optType = "add";
|
|
|
|
|
this.title = "添加会计账簿";
|
|
|
|
|
},
|
|
|
|
|
/** 修改按钮操作 */
|
|
|
|
|
handleUpdate(row) {
|
|
|
|
|
this.reset();
|
|
|
|
|
const id = row.id;
|
|
|
|
|
this.optType = "edit";
|
|
|
|
|
getAccountingBook(id).then((response) => {
|
|
|
|
|
this.form = response.data;
|
|
|
|
|
this.open = true;
|
|
|
|
|
this.title = "修改会计账簿";
|
|
|
|
|
});
|
|
|
|
|
},
|
|
|
|
|
// 下载
|
|
|
|
|
handleDownload(row) {
|
|
|
|
|
window.open(row.uri);
|
|
|
|
|
},
|
|
|
|
|
/** 提交按钮 */
|
|
|
|
|
submitForm() {
|
|
|
|
|
this.$refs["form"].validate((valid) => {
|
|
|
|
|
if (valid) {
|
|
|
|
|
if (this.optType == "add") {
|
|
|
|
|
// 上传文件
|
|
|
|
|
this.$refs.upload.submit();
|
|
|
|
|
this.$refs.upload1.submit();
|
|
|
|
|
this.$refs.upload2.submit();
|
|
|
|
|
} else {
|
|
|
|
|
updateAccountingBook(this.form).then((response) => {
|
|
|
|
|
this.open = false;
|
|
|
|
|
this.getList();
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
},
|
|
|
|
|