ChangeDetailDialog.vue 1.88 KB
<!-- 对账单管理 - 变更说明弹窗 -->
<template>
  <d2-dialog title="变更说明" :is-visible="detailVisible" class="privacyDailog" width="1080px" btnOkLabel="关闭" :noCancel="true" @closeDialog="handleClose" @confirmDialog="handleClose">
    <d2-table ref="tmplTable" :get-list-api="getListApi" :search-form="searchForm" :table-params="tableParams" :before-search-fn="beforeSearchFn">
    </d2-table>
  </d2-dialog>
</template>

<script>
import { getBillDetailList } from '@api/accountManage'
import { Util, deepClone } from '@/common/util'
export default {
  name: 'ChangeDetailDialog',
  data() {
    return {
      searchForm: {},
      getListApi: getBillDetailList,
      tableParams: {
        btnId: new Date().getTime() + parseInt(Math.random() * 1000),
        listName: 'list',
        tableOption: false,
        tableColumns: [{
          label: '变更类型',
          prop: 'changeType',
          formatter: (cellValue) => {
            return {1: '删除', 2: '新增'}[cellValue.changeType]
          }
        }, {
          label: '订单编码',
          prop: 'orderCode',
        }, {
          label: '变更人',
          prop: 'operator',
        }, {
          label: '变更时间',
          width: '150px',
          prop: 'createdDate',
          formatter: (cellValue) => {
            return Util.dateFormate(cellValue.createdDate, 'YYYY-MM-DD HH:mm:ss')
          }
        }]
      }
    }
  },

  props: {
    detailVisible: {
      type: Boolean,
      default: false
    },
    info: {
      type: Object,
      default: () => []
    }
  },

  mounted() {
  },

  methods: {
    beforeSearchFn() {
      return new Promise(resolve => {
        this.searchForm.reconciliationBillId = this.info.id
        resolve()
      })
    },
    handleClose() {
      this.$emit('dialogClose')
    }
  }
}
</script>
<style>
.privacyDailog .el-dialog {
  min-width: 700px;
}
</style>