|
<template>
|
<div ref="container" class="page-list-container">
|
<yrt-data-list :ref="dataListRef" :editor-ref="editorRef" :data-options="dataOptions" :fields.sync="dataListOptions.fields" :buttons="dataListOptions.buttons" :button-click="buttonClick" :data-list-selections.sync="dataListSelections" :auth-nodes="authNodes" :on-delete-before="onDeleteBefore" :on-stop-before="onStopBefore">
|
</yrt-data-list>
|
<!--数据编辑器Editor-->
|
<yrt-editor :ref="editorRef" :data-list-ref="dataListRef" v-bind="editorOptions" :data-options="dataOptions" :action.sync="editorOptions.action" :top.sync="editorOptions.top" :visible.sync="editorOptions.config.visible" :detail-button-click="detailButtonClick" :auth-nodes="authNodes">
|
</yrt-editor>
|
|
<!--明细选择器-->
|
<!-- <yrt-selector ref="selector-dialog" :config="selectorConfig" :visible.sync="selectorConfig.visible" @on-selected="onSelected"></yrt-selector> -->
|
</div>
|
</template>
|
<script>
|
import baseLayout from "@/components/common/base-layout.vue";
|
|
export default {
|
name: "finance-fee-statement",
|
components: {},
|
mixins: [baseLayout],
|
data() {
|
return {};
|
},
|
methods: {
|
// 明细按钮点击事件
|
detailButtonClick(authNode) {
|
switch (authNode) {
|
// 明细导出
|
case "exportList":
|
this.exportList();
|
return true;
|
}
|
},
|
// 明细导出
|
exportList() {
|
const ids = [];
|
var formData = this.editor.formData;
|
var detailRows = formData["Fee_StatementDetail"].rows;
|
detailRows.map((item, index, array) => {
|
ids.push(item.statementDetail_Id);
|
});
|
var url = "/api/finance/statement/exportList";
|
const params = {
|
ids: ids.join(",")
|
};
|
var callback = res => {
|
this.common.showMsg(res);
|
if (res.result) {
|
const url = this.common.domain + "/api/common/download?url=" + res.data.url;
|
window.open(url);
|
}
|
};
|
this.common.ajax(url, params, callback, true);
|
}
|
}
|
};
|
</script>
|