财务凭证管理

This commit is contained in:
砂糖
2025-08-13 17:48:09 +08:00
parent c0a2461d13
commit 9a660b910b
5 changed files with 187 additions and 76 deletions

View File

@@ -106,7 +106,7 @@
</el-table>
<pagination
v-show="total>0"
v-show="total > 0"
:total="total"
:page.sync="queryParams.pageNum"
:limit.sync="queryParams.pageSize"
@@ -115,15 +115,13 @@
<!-- 添加或修改财务单据对话框 -->
<el-dialog :title="title" :visible.sync="open" width="90%" append-to-body>
<create-document ref="createDocument" />
<create-document ref="createDocument" :initData="currentRow" @success="handleSuccess" @error="handleError" />
</el-dialog>
</div>
</template>
<script>
import { listFinancialDocument, getFinancialDocument, delFinancialDocument, addFinancialDocument, updateFinancialDocument } from "@/api/finance/financialDocument";
import { listFinancialDocumentWithDetail, getFinancialDocument, delFinancialDocument, addFinancialDocument, updateFinancialDocument } from "@/api/finance/financialDocument";
import CreateDocument from "./components/Voucher.vue";
export default {
@@ -168,7 +166,8 @@ export default {
form: {},
// 表单校验
rules: {
}
},
currentRow: {},
};
},
created() {
@@ -178,7 +177,7 @@ export default {
/** 查询财务单据列表 */
getList() {
this.loading = true;
listFinancialDocument(this.queryParams).then(response => {
listFinancialDocumentWithDetail(this.queryParams).then(response => {
this.financialDocumentList = response.rows;
this.total = response.total;
this.loading = false;
@@ -234,6 +233,7 @@ export default {
handleUpdate(row) {
this.loading = true;
this.reset();
this.currentRow = row;
const documentId = row.documentId || this.ids
getFinancialDocument(documentId).then(response => {
this.loading = false;
@@ -287,6 +287,13 @@ export default {
this.download('klp/financialDocument/export', {
...this.queryParams
}, `financialDocument_${new Date().getTime()}.xlsx`)
},
handleSuccess() {
this.open = false;
this.getList();
},
handleError(error) {
this.$message.error(error);
}
}
};