<template>
    <div class="page-box" v-loading="Loading.appMainLoading">
      <tablePagination
        :currenButtonData="currenButtonData"
        :tableData="tableData"
        :tableLoading="Loading.tableLoading"
        :tableColumns="tableColumns"
        @rowDrop="rowDrop"
        :totalCount="totalCount"
        :multipleSelection="multipleSelection"
        :MaxResultCount="PageListParams.MaxResultCount"
        @topbutton="topbutton"
        @inlineDialog="inlineDialog"
        @sortChange="sortChange"
        @alertoldSkipCount="alertoldSkipCount"
        @alterResultCount="alterResultCount"
        @handleSelectionChange="handleSelectionChange"
        :currentPageProps="oldSkipCount"
        :quicklySearchOption="quicklySearchOption"
        @quicklySearchClick="quicklySearchClick"
        @quicklySearchClear="quicklySearchClear"
        :primarySearchOption="primarySearchOption"
        @overallSearchFormClick="overallSearchFormClick"
        :httpOverallSearchData="httpOverallSearchData"
      >
      </tablePagination>
    </div>
  </template>
  <script>
  import { tableMixins } from "@/mixins/TableMixins";
  import { LoadingMixins } from "@/mixins/LoadingMixins";
  import { TableHeaderMixins } from "@/mixins/TableHeaderMixins";
  import { mixins } from "@/mixins/mixins";
  import { dataExchangeFromOut } from "@/api/wms-interface"
  
  export default {
    name: "dataExchangeFromOut",
    mixins: [
      tableMixins,
      LoadingMixins,
      TableHeaderMixins,
      mixins,
    ],
    data() {
      return {
        //常用按钮数据
        currenButtonData: [
          this.defaultFieldSettingBtn(),//字段设置
          this.defaultFreshBtn(),//刷新
        //   this.defaultFilterBtn(),//筛选
        ],
      };
    },
    mounted() {
      this.paging();
    },
    methods: {
        //渲染数据
        paging(callback) {
            this.Loading.tableLoading = true;
            this.PageListParams.SkipCount = (this.oldSkipCount - 1) * this.PageListParams.MaxResultCount
            dataExchangeFromOut(this.PageListParams)
                .then(result => {
                  let res = result.data
                  this.tableData = res.items
                  this.totalCount = res.totalCount
                  this.pagingCallback(callback)
                })
                .catch(err => {
                    this.Loading.tableLoading = false
                })
        },
    }
  }
  </script>
<style lang="scss" scoped>
@import "@/styles/basicData.scss";
</style>