|
|
@ -151,7 +151,28 @@
|
|
|
|
width="1000px"
|
|
|
|
width="1000px"
|
|
|
|
append-to-body
|
|
|
|
append-to-body
|
|
|
|
>
|
|
|
|
>
|
|
|
|
<el-form ref="form" :model="form" :rules="rules" label-width="130px">
|
|
|
|
<el-upload
|
|
|
|
|
|
|
|
class="upload-demo"
|
|
|
|
|
|
|
|
drag
|
|
|
|
|
|
|
|
:limit="1"
|
|
|
|
|
|
|
|
:action="uploadUrl"
|
|
|
|
|
|
|
|
:file-list="fileList"
|
|
|
|
|
|
|
|
:headers="headers"
|
|
|
|
|
|
|
|
:on-success="handleSuccess"
|
|
|
|
|
|
|
|
name="multipartFile"
|
|
|
|
|
|
|
|
:multiple="false"
|
|
|
|
|
|
|
|
>
|
|
|
|
|
|
|
|
<i class="el-icon-upload"></i>
|
|
|
|
|
|
|
|
<div class="el-upload__text">将文件拖到此处,或<em>点击上传</em></div>
|
|
|
|
|
|
|
|
</el-upload>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<el-form
|
|
|
|
|
|
|
|
ref="form"
|
|
|
|
|
|
|
|
:model="form"
|
|
|
|
|
|
|
|
:rules="rules"
|
|
|
|
|
|
|
|
label-width="130px"
|
|
|
|
|
|
|
|
style="margin-top: 20px"
|
|
|
|
|
|
|
|
>
|
|
|
|
<el-row>
|
|
|
|
<el-row>
|
|
|
|
<el-col :span="8">
|
|
|
|
<el-col :span="8">
|
|
|
|
<el-form-item label="表名" prop="name">
|
|
|
|
<el-form-item label="表名" prop="name">
|
|
|
@ -253,6 +274,7 @@ import {
|
|
|
|
getOtherPage,
|
|
|
|
getOtherPage,
|
|
|
|
exportOtherExcel,
|
|
|
|
exportOtherExcel,
|
|
|
|
} from "@/api/accounting/other";
|
|
|
|
} from "@/api/accounting/other";
|
|
|
|
|
|
|
|
import { getAccessToken } from "@/utils/auth";
|
|
|
|
// import {DICT_TYPE, getDictDatas} from "@/utils/dict";
|
|
|
|
// import {DICT_TYPE, getDictDatas} from "@/utils/dict";
|
|
|
|
export default {
|
|
|
|
export default {
|
|
|
|
name: "Other",
|
|
|
|
name: "Other",
|
|
|
@ -303,6 +325,10 @@ export default {
|
|
|
|
form: {},
|
|
|
|
form: {},
|
|
|
|
// 表单校验
|
|
|
|
// 表单校验
|
|
|
|
rules: {},
|
|
|
|
rules: {},
|
|
|
|
|
|
|
|
fileList: [], // 文件列表
|
|
|
|
|
|
|
|
uploadUrl:
|
|
|
|
|
|
|
|
process.env.VUE_APP_BASE_API + "/admin-api//accounting/other/upload", // 上传地址地址
|
|
|
|
|
|
|
|
headers: { Authorization: "Bearer " + getAccessToken() }, // 设置上传的请求头
|
|
|
|
};
|
|
|
|
};
|
|
|
|
},
|
|
|
|
},
|
|
|
|
created() {
|
|
|
|
created() {
|
|
|
@ -339,6 +365,7 @@ export default {
|
|
|
|
company: undefined,
|
|
|
|
company: undefined,
|
|
|
|
note: undefined,
|
|
|
|
note: undefined,
|
|
|
|
remark: undefined,
|
|
|
|
remark: undefined,
|
|
|
|
|
|
|
|
fileUrl: null,
|
|
|
|
};
|
|
|
|
};
|
|
|
|
this.resetForm("form");
|
|
|
|
this.resetForm("form");
|
|
|
|
},
|
|
|
|
},
|
|
|
@ -354,10 +381,16 @@ export default {
|
|
|
|
},
|
|
|
|
},
|
|
|
|
/** 新增按钮操作 */
|
|
|
|
/** 新增按钮操作 */
|
|
|
|
handleAdd() {
|
|
|
|
handleAdd() {
|
|
|
|
|
|
|
|
this.fileList = [];
|
|
|
|
this.reset();
|
|
|
|
this.reset();
|
|
|
|
this.open = true;
|
|
|
|
this.open = true;
|
|
|
|
this.title = "添加其他资料";
|
|
|
|
this.title = "添加其他资料";
|
|
|
|
},
|
|
|
|
},
|
|
|
|
|
|
|
|
// 上传成功的函数
|
|
|
|
|
|
|
|
handleSuccess(res) {
|
|
|
|
|
|
|
|
console.log(res);
|
|
|
|
|
|
|
|
this.form.fileUrl = res.data.url;
|
|
|
|
|
|
|
|
},
|
|
|
|
/** 修改按钮操作 */
|
|
|
|
/** 修改按钮操作 */
|
|
|
|
handleUpdate(row) {
|
|
|
|
handleUpdate(row) {
|
|
|
|
this.reset();
|
|
|
|
this.reset();
|
|
|
|