新增附件查看

main
mo 1 year ago
parent a50dd7c3df
commit b8107029e1

@ -79,11 +79,6 @@
<!-- 列表 -->
<el-table v-loading="loading" :data="list">
<el-table-column label="账簿名称" align="center" prop="name">
<template slot-scope="scope">
<el-button type="text" @click="openLink(scope.row.uri)">
{{ scope.row.name }}
</el-button>
</template>
</el-table-column>
<el-table-column label="业务实体" align="center" prop="company" />
<el-table-column label="细分类型" align="center" prop="type" />
@ -108,6 +103,21 @@
width="180px"
>
<template v-slot="scope">
<el-button
size="mini"
type="text"
icon="el-icon-view"
v-if="scope.row.uri"
@click="handleViewFJ(scope.row)"
>查看附件
</el-button>
<el-button
size="mini"
type="text"
icon="el-icon-view"
@click="handleView(scope.row)"
>查看
</el-button>
<el-button
size="mini"
type="text"
@ -152,7 +162,6 @@
>
<el-form ref="form" :model="form" :rules="rules" label-width="90px">
<el-form-item label="业务实体" prop="company">
<!-- <el-input v-model="form.company" placeholder="请输入业务实体" /> -->
<el-select
v-model="form.company"
placeholder="请选择业务实体"
@ -191,7 +200,7 @@
</el-form-item>
</el-form>
<table id="table_order" v-if="optType != 'edit'">
<table id="table_order" v-if="optType == 'add'">
<thead>
<tr>
<th>类型</th>
@ -252,7 +261,9 @@
</table>
<div slot="footer" class="dialog-footer">
<el-button type="primary" @click="submitForm"> </el-button>
<el-button type="primary" @click="submitForm" v-if="optType != 'view'"
> </el-button
>
<el-button @click="cancel"> </el-button>
</div>
</el-dialog>
@ -307,7 +318,7 @@ export default {
components: {},
data() {
return {
optType: "",
optType: undefined,
//
loading: true,
//
@ -378,6 +389,10 @@ export default {
`/onlinePreview?url=${encodeURIComponent(this.base64Encode(fileUrl))}`;
window.open(url);
},
/** 查看附件按钮操作 */
handleViewFJ(row) {
this.openLink(row.uri);
},
/** 查询列表 */
getList() {
this.loading = true;
@ -438,6 +453,17 @@ export default {
this.optType = "add";
this.title = "添加会计账簿";
},
/** 查看按钮操作 */
handleView(row) {
this.reset();
const id = row.id;
this.optType = "view";
getAccountingBook(id).then((response) => {
this.form = response.data;
this.open = true;
this.title = "查看会计账簿";
});
},
/** 修改按钮操作 */
handleUpdate(row) {
this.reset();

@ -83,7 +83,6 @@
<!-- 列表 -->
<el-table v-loading="loading" :data="list">
<!-- <el-table-column label="主键" align="center" prop="id" /> -->
<el-table-column label="文件名" align="center" prop="name" />
<el-table-column label="OA/ERP流程编号" align="center" prop="flowCode" />
<el-table-column label="文件来源" align="center" prop="source" />
@ -98,13 +97,13 @@
</template>
</el-table-column>
<el-table-column label="业务实体" align="center" prop="company" />
<el-table-column label="文件地址" align="center" prop="fileUrl">
<!-- <el-table-column label="文件地址" align="center" prop="fileUrl">
<template slot-scope="scope">
<el-button type="text" @click="openLink(scope.row.fileUrl)">
{{ scope.row.fileUrl }}
</el-button>
</template>
</el-table-column>
</el-table-column> -->
<el-table-column label="归档状态" align="center" prop="fileStatus">
<template v-slot="scope">
<dict-tag
@ -137,6 +136,21 @@
width="180px"
>
<template v-slot="scope">
<el-button
size="mini"
type="text"
icon="el-icon-view"
v-if="scope.row.fileUrl"
@click="handleViewFJ(scope.row)"
>查看附件
</el-button>
<el-button
size="mini"
type="text"
icon="el-icon-view"
@click="handleView(scope.row)"
>查看
</el-button>
<el-button
size="mini"
type="text"
@ -182,6 +196,7 @@
:on-success="handleSuccess"
name="multipartFile"
:multiple="false"
v-if="optType != 'view'"
>
<i class="el-icon-upload"></i>
<div class="el-upload__text">将文件拖到此处<em>点击上传</em></div>
@ -287,7 +302,9 @@
</el-form-item>
</el-form>
<div slot="footer" class="dialog-footer">
<el-button type="primary" @click="submitForm"> </el-button>
<el-button type="primary" @click="submitForm" v-if="optType != 'view'"
> </el-button
>
<el-button @click="cancel"> </el-button>
</div>
</el-dialog>
@ -341,6 +358,7 @@ export default {
components: {},
data() {
return {
optType: undefined,
//
loading: true,
//
@ -446,6 +464,10 @@ export default {
`/onlinePreview?url=${encodeURIComponent(this.base64Encode(fileUrl))}`;
window.open(url);
},
/** 查看附件按钮操作 */
handleViewFJ(row) {
this.openLink(row.fileUrl);
},
/** 查询列表 */
getList() {
this.loading = true;
@ -502,6 +524,7 @@ export default {
this.fileList = [];
this.reset();
this.open = true;
this.optType = "add";
this.title = "添加其他资料";
},
//
@ -515,9 +538,21 @@ export default {
this.form.companyId = val.id;
this.form.company = val.organizationName;
},
/** 查看按钮操作 */
handleView(row) {
this.reset();
this.optType = "view";
const id = row.id;
getOther(id).then((response) => {
this.form = response.data;
this.open = true;
this.title = "查看其他资料";
});
},
/** 修改按钮操作 */
handleUpdate(row) {
this.reset();
this.optType = "edit";
const id = row.id;
getOther(id).then((response) => {
this.form = response.data;

@ -95,13 +95,13 @@
<!-- 列表 -->
<el-table v-loading="loading" :data="list">
<el-table-column label="报表文件名称" align="center" prop="name" />
<el-table-column label="报表文件" align="center" prop="url">
<!-- <el-table-column label="报表文件" align="center" prop="url">
<template slot-scope="scope">
<el-button type="text" @click="openLink(scope.row.url)">
{{ scope.row.name }}
</el-button>
</template>
</el-table-column>
</el-table-column> -->
<el-table-column label="业务实体" align="center" prop="company" />
<el-table-column label="细分类型" align="center" prop="type" />
<el-table-column label="会计年度" align="center" prop="year" />
@ -124,6 +124,21 @@
class-name="small-padding fixed-width"
>
<template v-slot="scope">
<el-button
size="mini"
type="text"
icon="el-icon-view"
v-if="scope.row.url"
@click="handleViewFJ(scope.row)"
>查看附件
</el-button>
<el-button
size="mini"
type="text"
icon="el-icon-view"
@click="handleView(scope.row)"
>查看
</el-button>
<el-button
size="mini"
type="text"
@ -199,7 +214,7 @@
</el-date-picker>
</el-form-item>
</el-form>
<table id="table_order">
<table id="table_order" v-if="optType == 'add'">
<thead>
<tr>
<th>类型</th>
@ -260,7 +275,9 @@
</table>
<div slot="footer" class="dialog-footer">
<el-button type="primary" @click="submitForm"> </el-button>
<el-button type="primary" @click="submitForm" v-if="optType != 'view'"
> </el-button
>
<el-button @click="cancel"> </el-button>
</div>
</el-dialog>
@ -314,6 +331,7 @@ export default {
components: {},
data() {
return {
optType: undefined,
//
loading: true,
//
@ -403,6 +421,10 @@ export default {
`/onlinePreview?url=${encodeURIComponent(this.base64Encode(fileUrl))}`;
window.open(url);
},
/** 查看附件按钮操作 */
handleViewFJ(row) {
this.openLink(row.url);
},
/** 查询列表 */
getList() {
this.loading = true;
@ -484,12 +506,25 @@ export default {
/** 新增按钮操作 */
handleAdd() {
this.reset();
this.optType = "add";
this.open = true;
this.title = "添加会计报表";
},
/** 查看按钮操作 */
handleView(row) {
this.reset();
this.optType = "view";
const id = row.id;
getAccountingReport(id).then((response) => {
this.form = response.data;
this.open = true;
this.title = "查看会计报表";
});
},
/** 修改按钮操作 */
handleUpdate(row) {
this.reset();
this.optType = "edit";
const id = row.id;
getAccountingReport(id).then((response) => {
this.form = response.data;

Loading…
Cancel
Save