|
|
|
@ -7,7 +7,7 @@
|
|
|
|
|
size="small"
|
|
|
|
|
:inline="true"
|
|
|
|
|
v-show="showSearch"
|
|
|
|
|
label-width="98px"
|
|
|
|
|
label-width="148px"
|
|
|
|
|
>
|
|
|
|
|
<el-form-item label="凭证号" prop="voucherNum">
|
|
|
|
|
<el-input
|
|
|
|
@ -17,14 +17,6 @@
|
|
|
|
|
@keyup.enter.native="handleQuery"
|
|
|
|
|
/>
|
|
|
|
|
</el-form-item>
|
|
|
|
|
<el-form-item label="文件地址" prop="fileUrl">
|
|
|
|
|
<el-input
|
|
|
|
|
v-model="queryParams.fileUrl"
|
|
|
|
|
placeholder="请输入文件地址"
|
|
|
|
|
clearable
|
|
|
|
|
@keyup.enter.native="handleQuery"
|
|
|
|
|
/>
|
|
|
|
|
</el-form-item>
|
|
|
|
|
<el-form-item label="OA/ERP流程编号" prop="flowCode">
|
|
|
|
|
<el-input
|
|
|
|
|
v-model="queryParams.flowCode"
|
|
|
|
@ -33,14 +25,6 @@
|
|
|
|
|
@keyup.enter.native="handleQuery"
|
|
|
|
|
/>
|
|
|
|
|
</el-form-item>
|
|
|
|
|
<el-form-item label="文件名" prop="fileName">
|
|
|
|
|
<el-input
|
|
|
|
|
v-model="queryParams.fileName"
|
|
|
|
|
placeholder="请输入文件名"
|
|
|
|
|
clearable
|
|
|
|
|
@keyup.enter.native="handleQuery"
|
|
|
|
|
/>
|
|
|
|
|
</el-form-item>
|
|
|
|
|
<el-form-item>
|
|
|
|
|
<el-button type="primary" icon="el-icon-search" @click="handleQuery"
|
|
|
|
|
>搜索</el-button
|
|
|
|
@ -89,7 +73,7 @@
|
|
|
|
|
prop="voucherId"
|
|
|
|
|
/> -->
|
|
|
|
|
<el-table-column label="凭证号" align="center" prop="voucherNum" />
|
|
|
|
|
<el-table-column label="业务实体" align="center" prop="company" />
|
|
|
|
|
<!-- <el-table-column label="业务实体" align="center" prop="company" /> -->
|
|
|
|
|
<el-table-column label="文件地址" align="center" prop="fileUrl">
|
|
|
|
|
<template slot-scope="scope">
|
|
|
|
|
<el-button type="text" @click="openLink(scope.row.fileUrl)">
|
|
|
|
@ -99,9 +83,9 @@
|
|
|
|
|
</el-table-column>
|
|
|
|
|
<el-table-column label="流程号" align="center" prop="flowId" />
|
|
|
|
|
<el-table-column label="OA/ERP流程编号" align="center" prop="flowCode" />
|
|
|
|
|
<el-table-column label="制单人" align="center" prop="createBy" />
|
|
|
|
|
<el-table-column label="文件名" align="center" prop="fileName" />
|
|
|
|
|
<el-table-column label="文件大小" align="center" prop="fileSize" />
|
|
|
|
|
<el-table-column label="制单人" align="center" prop="createBy" />
|
|
|
|
|
<el-table-column
|
|
|
|
|
label="创建时间"
|
|
|
|
|
align="center"
|
|
|
|
@ -154,28 +138,58 @@
|
|
|
|
|
width="1000px"
|
|
|
|
|
append-to-body
|
|
|
|
|
>
|
|
|
|
|
<el-form ref="form" :model="form" :rules="rules" label-width="100px">
|
|
|
|
|
<el-form-item label="凭证号" prop="voucherNum">
|
|
|
|
|
<el-input v-model="form.voucherNum" placeholder="请输入凭证号" />
|
|
|
|
|
</el-form-item>
|
|
|
|
|
<el-form-item label="业务实体" prop="company">
|
|
|
|
|
<el-input v-model="form.company" placeholder="请输入业务实体" />
|
|
|
|
|
</el-form-item>
|
|
|
|
|
<el-form-item label="文件地址" prop="fileUrl">
|
|
|
|
|
<el-input v-model="form.fileUrl" placeholder="请输入文件地址" />
|
|
|
|
|
</el-form-item>
|
|
|
|
|
<el-form-item label="流程号" prop="flowId">
|
|
|
|
|
<el-input v-model="form.flowId" placeholder="请输入流程号" />
|
|
|
|
|
</el-form-item>
|
|
|
|
|
<el-form-item label="OA/ERP流程编号" prop="flowCode">
|
|
|
|
|
<el-input
|
|
|
|
|
v-model="form.flowCode"
|
|
|
|
|
placeholder="请输入OA/ERP流程编号"
|
|
|
|
|
/>
|
|
|
|
|
</el-form-item>
|
|
|
|
|
<el-form-item label="文件名" prop="fileName">
|
|
|
|
|
<el-input v-model="form.fileName" placeholder="请输入文件名" />
|
|
|
|
|
</el-form-item>
|
|
|
|
|
<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="140px"
|
|
|
|
|
style="margin-top: 20px"
|
|
|
|
|
>
|
|
|
|
|
<el-row>
|
|
|
|
|
<el-col :span="8">
|
|
|
|
|
<!-- <el-form-item label="凭证号" prop="voucherNum">
|
|
|
|
|
<el-input v-model="form.voucherNum" placeholder="请输入凭证号" />
|
|
|
|
|
</el-form-item> -->
|
|
|
|
|
<el-form-item label="会计凭证" prop="voucherId">
|
|
|
|
|
<el-select v-model="form.voucherId" placeholder="请选择会计凭证">
|
|
|
|
|
<el-option
|
|
|
|
|
v-for="item in kjpzOptions"
|
|
|
|
|
:key="item.id"
|
|
|
|
|
:label="item.voucherNum"
|
|
|
|
|
:value="item.id"
|
|
|
|
|
>
|
|
|
|
|
</el-option>
|
|
|
|
|
</el-select>
|
|
|
|
|
</el-form-item>
|
|
|
|
|
</el-col>
|
|
|
|
|
<el-col :span="8">
|
|
|
|
|
<el-form-item label="OA/ERP流程编号" prop="flowCode">
|
|
|
|
|
<el-input
|
|
|
|
|
v-model="form.flowCode"
|
|
|
|
|
placeholder="请输入OA/ERP流程编号"
|
|
|
|
|
/>
|
|
|
|
|
</el-form-item>
|
|
|
|
|
</el-col>
|
|
|
|
|
<el-col :span="8">
|
|
|
|
|
<el-form-item label="流程号" prop="flowId">
|
|
|
|
|
<el-input v-model="form.flowId" placeholder="请输入流程号" />
|
|
|
|
|
</el-form-item>
|
|
|
|
|
</el-col>
|
|
|
|
|
</el-row>
|
|
|
|
|
<el-form-item label="备注" prop="remark">
|
|
|
|
|
<el-input
|
|
|
|
|
v-model="form.remark"
|
|
|
|
@ -201,6 +215,8 @@ import {
|
|
|
|
|
getAttachmentPage,
|
|
|
|
|
exportAttachmentExcel,
|
|
|
|
|
} from "@/api/accounting/attachment";
|
|
|
|
|
import { getAccessToken, getTenantId } from "@/utils/auth";
|
|
|
|
|
import { getVoucherPage } from "@/api/accounting/voucher";
|
|
|
|
|
|
|
|
|
|
export default {
|
|
|
|
|
name: "Attachment",
|
|
|
|
@ -221,6 +237,7 @@ export default {
|
|
|
|
|
title: "",
|
|
|
|
|
// 是否显示弹出层
|
|
|
|
|
open: false,
|
|
|
|
|
fileList: [],
|
|
|
|
|
// 查询参数
|
|
|
|
|
queryParams: {
|
|
|
|
|
pageNo: 1,
|
|
|
|
@ -253,10 +270,20 @@ export default {
|
|
|
|
|
},
|
|
|
|
|
],
|
|
|
|
|
},
|
|
|
|
|
fileList: [], // 文件列表
|
|
|
|
|
uploadUrl:
|
|
|
|
|
process.env.VUE_APP_BASE_API +
|
|
|
|
|
"/admin-api/accounting/attachment/upload", // 上传地址地址
|
|
|
|
|
headers: {
|
|
|
|
|
Authorization: "Bearer " + getAccessToken(),
|
|
|
|
|
"tenant-id": getTenantId(),
|
|
|
|
|
}, // 设置上传的请求头
|
|
|
|
|
kjpzOptions: [], //会计凭证
|
|
|
|
|
};
|
|
|
|
|
},
|
|
|
|
|
created() {
|
|
|
|
|
this.getList();
|
|
|
|
|
this.getKJPZ();
|
|
|
|
|
},
|
|
|
|
|
methods: {
|
|
|
|
|
/** 查询列表 */
|
|
|
|
@ -269,6 +296,12 @@ export default {
|
|
|
|
|
this.loading = false;
|
|
|
|
|
});
|
|
|
|
|
},
|
|
|
|
|
//获取会计凭证
|
|
|
|
|
getKJPZ() {
|
|
|
|
|
getVoucherPage().then((res) => {
|
|
|
|
|
this.kjpzOptions = res.data.list || [];
|
|
|
|
|
});
|
|
|
|
|
},
|
|
|
|
|
/**
|
|
|
|
|
* 文件预览
|
|
|
|
|
* @param fileUrl
|
|
|
|
@ -318,6 +351,7 @@ export default {
|
|
|
|
|
/** 新增按钮操作 */
|
|
|
|
|
handleAdd() {
|
|
|
|
|
this.reset();
|
|
|
|
|
this.fileList = [];
|
|
|
|
|
this.open = true;
|
|
|
|
|
this.title = "添加会计附件";
|
|
|
|
|
},
|
|
|
|
@ -331,6 +365,13 @@ export default {
|
|
|
|
|
this.title = "修改会计附件";
|
|
|
|
|
});
|
|
|
|
|
},
|
|
|
|
|
// 上传成功的函数
|
|
|
|
|
handleSuccess(res) {
|
|
|
|
|
console.log(res);
|
|
|
|
|
this.form.fileUrl = res.data.url;
|
|
|
|
|
this.form.fileName = res.data.name;
|
|
|
|
|
this.form.fileSize = res.data.size;
|
|
|
|
|
},
|
|
|
|
|
/** 提交按钮 */
|
|
|
|
|
submitForm() {
|
|
|
|
|
this.$refs["form"].validate((valid) => {
|
|
|
|
|