333
schangxiang@126.com
2025-09-19 18966e02fb573c7e2bb0c6426ed792b38b910940
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
 
<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>