新增查看功能

main
mo 1 year ago
parent 688bfa1f93
commit b0e239d96d

@ -137,6 +137,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"
@ -343,7 +350,7 @@
/>
</el-form-item>
</el-form>
<el-table :data="tableData" style="width: 100%" v-if="optType == 'edit'">
<el-table :data="tableData" style="width: 100%" v-if="optType != 'add'">
<el-table-column prop="digest" label="摘要" width="180">
</el-table-column>
<el-table-column prop="subjectCode" label="科目代码" width="180">
@ -355,7 +362,7 @@
</el-table>
<el-tabs
style="margin-top: 20px"
v-if="optType == 'edit'"
v-if="optType != 'add'"
v-model="activeName"
type="card"
@tab-click="handleClick"
@ -448,7 +455,9 @@
</el-tab-pane>
</el-tabs>
<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>
@ -824,6 +833,22 @@ export default {
this.title = "添加会计凭证";
this.optType = "add";
},
/** 查看按钮操作 */
handleView(row) {
this.reset();
const id = row.id;
getVoucher(id).then((response) => {
this.form = response.data;
this.open = true;
this.title = "查看会计凭证";
this.optType = "view";
});
this.getLineList(row.voucherNum);
this.getFJ(row.voucherNum);
this.getSPLC(row.id);
this.getDZFP(row.id);
this.getYHHD(row.id);
},
/** 修改按钮操作 */
handleUpdate(row) {
this.reset();

Loading…
Cancel
Save