其他资料管理修改

main
mo 1 year ago
parent 3ee75dfc3e
commit 8b260491e1

@ -131,6 +131,8 @@ export const DICT_TYPE = {
ACCOUNTING_INVOICES_STATUS: 'accounting_invoices_status', ACCOUNTING_INVOICES_STATUS: 'accounting_invoices_status',
// 发票进销项 // 发票进销项
ACCOUNTING_INVOICES_TYPE: 'accounting_invoices_type', ACCOUNTING_INVOICES_TYPE: 'accounting_invoices_type',
// 会计其他资料
ACCOUNTING_OTHER_TYPE: 'accounting_other_type',
//合同类型 //合同类型
CONTRACT_TYPE: 'contract_type', CONTRACT_TYPE: 'contract_type',
//合同状态 //合同状态

@ -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();

Loading…
Cancel
Save