新增查看已经查看附件,表格隐藏地址

main
mo 1 year ago
parent ff72a2b607
commit a50dd7c3df

@ -66,25 +66,17 @@
<!-- 列表 -->
<el-table v-loading="loading" :data="list">
<!-- <el-table-column label="主键" align="center" prop="id" /> -->
<!-- <el-table-column
label="凭证id 一个凭证对应多个附件"
align="center"
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="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="OA/ERP流程编号" align="center" prop="flowCode" />
<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"
@ -104,6 +96,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"
@ -149,6 +156,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>
@ -198,7 +206,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>
@ -222,6 +232,7 @@ export default {
components: {},
data() {
return {
optType: undefined,
//
loading: true,
//
@ -307,12 +318,15 @@ export default {
*/
openLink(fileUrl) {
console.log(process.env.VUE_APP_ONLINE_API);
// const url = `http://139.224.253.31:48012/onlinePreview?url=${encodeURIComponent(this.base64Encode(fileUrl))}`;
const url =
process.env.VUE_APP_ONLINE_API +
`/onlinePreview?url=${encodeURIComponent(this.base64Encode(fileUrl))}`;
window.open(url);
},
/** 查看附件按钮操作 */
handleViewFJ(row) {
this.openLink(row.fileUrl);
},
/** 取消按钮 */
cancel() {
this.open = false;
@ -355,10 +369,23 @@ export default {
this.fileList = [];
this.open = true;
this.title = "添加会计附件";
this.optType = "add";
},
/** 查看按钮操作 */
handleView(row) {
this.reset();
this.optType = "view";
const id = row.id;
getAttachment(id).then((response) => {
this.form = response.data;
this.open = true;
this.title = "查看会计附件";
});
},
/** 修改按钮操作 */
handleUpdate(row) {
this.reset();
this.optType = "edit";
const id = row.id;
getAttachment(id).then((response) => {
this.form = response.data;

@ -243,6 +243,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"
@ -312,7 +327,7 @@
<div class="el-upload__text">将文件拖到此处<em>点击上传</em></div>
</el-upload> -->
<el-form ref="form" :model="form" :rules="rules" label-width="130px">
<el-row>
<el-row v-if="optType != 'view'">
<el-col :span="8">
<UploadBankSlip
:files="fileList"
@ -549,7 +564,9 @@
</el-row>
</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>
@ -689,6 +706,7 @@ export default {
},
data() {
return {
optType: undefined,
//
loading: true,
//
@ -793,6 +811,20 @@ export default {
this.form.receiptNum = form.receiptNum.slice(9, -2);
this.form.serialNum = form.serialNum.slice(9, -2);
},
/**
* 文件预览
* @param fileUrl
*/
openLink(fileUrl) {
const url =
process.env.VUE_APP_ONLINE_API +
`/onlinePreview?url=${encodeURIComponent(this.base64Encode(fileUrl))}`;
window.open(url);
},
/** 查看附件按钮操作 */
handleViewFJ(row) {
this.openLink(row.fileUrl);
},
/** 查询列表 */
getList() {
this.loading = true;
@ -916,14 +948,27 @@ export default {
this.open = true;
this.title = "添加银行回单";
this.fileList = [];
this.optType = "add";
},
//
handleSuccess(res) {
console.log(res);
},
/** 查看按钮操作 */
handleView(row) {
this.reset();
this.optType = "view";
const id = row.id;
getBankSlip(id).then((response) => {
this.form = response.data;
this.open = true;
this.title = "查看银行回单";
});
},
/** 修改按钮操作 */
handleUpdate(row) {
this.reset();
this.optType = "edit";
const id = row.id;
getBankSlip(id).then((response) => {
this.form = response.data;

@ -79,13 +79,13 @@
<el-table v-loading="loading" :data="list">
<el-table-column label="OA/ERP流程编号" align="center" prop="flowCode" />
<el-table-column label="凭证号" align="center" prop="voucherNum" />
<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="note" />
<el-table-column
label="创建时间"
@ -105,6 +105,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"
@ -151,6 +166,7 @@
name="multipartFile"
:multiple="false"
:accept="imgType"
v-if="optType != 'view'"
>
<i class="el-icon-upload"></i>
<div class="el-upload__text">将文件拖到此处<em>点击上传</em></div>
@ -200,7 +216,9 @@
</el-row>
</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>
@ -254,6 +272,7 @@ export default {
components: {},
data() {
return {
optType: undefined,
//
loading: true,
//
@ -332,6 +351,10 @@ export default {
openLink(fileUrl) {
window.open(fileUrl);
},
/** 查看附件按钮操作 */
handleViewFJ(row) {
this.openLink(row.fileUrl);
},
/** 取消按钮 */
cancel() {
this.open = false;
@ -381,11 +404,24 @@ export default {
this.reset();
this.fileList = [];
this.open = true;
this.optType = "add";
this.title = "添加审批流程";
},
/** 查看按钮操作 */
handleView(row) {
this.reset();
this.optType = "view";
const id = row.id;
getFlow(id).then((response) => {
this.form = response.data;
this.open = true;
this.title = "查看审批流程";
});
},
/** 修改按钮操作 */
handleUpdate(row) {
this.reset();
this.optType = "edit";
const id = row.id;
getFlow(id).then((response) => {
this.form = response.data;

@ -162,13 +162,13 @@
@selection-change="handleSelectionChange"
>
<el-table-column type="selection" width="55" align="center" />
<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="invoiceCode" />
<el-table-column label="发票号码" align="center" prop="invoiceNum" />
<el-table-column label="大写金额" align="center" prop="amountinWords" />
@ -307,6 +307,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"
@ -359,7 +374,7 @@
</div>
</el-upload> -->
<el-form ref="form" :model="form" :rules="rules" label-width="140px">
<el-row>
<el-row v-if="optType != 'view'">
<el-col :span="8">
<UploadInvoice
:files="fileList"
@ -640,7 +655,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>
@ -783,6 +800,7 @@ export default {
},
data() {
return {
optType: undefined,
//
loading: true,
//
@ -948,6 +966,10 @@ export default {
`/onlinePreview?url=${encodeURIComponent(this.base64Encode(fileUrl))}`;
window.open(url);
},
/** 查看附件按钮操作 */
handleViewFJ(row) {
this.openLink(row.fileUrl);
},
handleClick(tab) {
console.log(tab.name);
if (tab.name == "in") {
@ -977,7 +999,6 @@ export default {
this.loading = false;
});
},
handleOneMonth() {
this.time = 1;
this.getList2();
@ -1158,11 +1179,40 @@ export default {
this.open = true;
this.title = "添加发票";
this.fileList = [];
this.optType = "add";
},
/** 查看按钮操作 */
handleView(row) {
this.reset();
this.optType = "view";
const id = row.id;
getInvoices(id).then((response) => {
this.form = response.data;
if (response.data.invoiceState != null) {
const num1 = response.data.invoiceState.toString();
this.form.invoiceState = num1;
}
if (response.data.inoutMark != null) {
const num2 = response.data.inoutMark.toString();
this.form.inoutMark = num2;
}
if (response.data.duplicateMark != null) {
const num3 = response.data.duplicateMark.toString();
this.form.duplicateMark = num3;
}
if (response.data.qrCheckCode != null) {
const num4 = response.data.qrCheckCode.toString();
this.form.qrCheckCode = num4;
}
this.open = true;
this.title = "查看发票";
});
},
/** 修改按钮操作 */
handleUpdate(row) {
this.reset();
const id = row.id;
this.optType = "edit";
getInvoices(id).then((response) => {
this.form = response.data;
if (response.data.invoiceState != null) {

@ -93,6 +93,13 @@
width="180px"
>
<template v-slot="scope">
<el-button
size="mini"
type="text"
icon="el-icon-view"
@click="handleView(scope.row)"
>查看
</el-button>
<el-button
size="mini"
type="text"
@ -212,7 +219,9 @@
</el-row>
</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>
@ -235,6 +244,7 @@ export default {
components: { VoucherSelect },
data() {
return {
optType: undefined,
//
loading: true,
//
@ -341,6 +351,18 @@ export default {
this.reset();
this.open = true;
this.title = "添加凭证详情";
this.optType = "add";
},
/** 修改按钮操作 */
handleView(row) {
this.reset();
const id = row.id;
getVoucherDetails(id).then((response) => {
this.form = response.data;
this.open = true;
this.title = "查看凭证详情";
this.optType = "view";
});
},
/** 修改按钮操作 */
handleUpdate(row) {
@ -350,6 +372,7 @@ export default {
this.form = response.data;
this.open = true;
this.title = "修改凭证详情";
this.optType = "edit";
});
},
/** 提交按钮 */

Loading…
Cancel
Save