/*
 *@description:消息日志
 *@author: hudw
 *@date: 2022-11-14 15:06:58
*/
<template>
    <div class="pages">

      <p-card v-show="detailsState === 0" class="full-card-panel full-body-flex" :alt="$route.meta.title" :bordered="false">
        <searchBar slot="title" ref="searchBar" @submit="submit" :options="options" />
        <p-button slot="extra" :icon="mx_confirmLoading ? 'loading' : 'sync'" type="primary" @clickSync="btnretry" :disabled="selectedRowKeys.length === 0">重新发送</p-button>
        <mainTable
          ref="mainTable"
          :options="options"
          :selectedRowKeys.sync="selectedRowKeys"
          :activeID="mainId"
          :tableExtendedField="tableExtendedField"
          @view="handeRetry"

        />
      </p-card>
    </div>
</template>
<script>
import searchBar from './model/searchBar/index.searchBar.vue';
import mainTable from './model/mainTable/index.mainTable.vue'; /**主表 */
import { retry  } from './api';


//5仓库 6客户 7供应商"

export default {
  components: { searchBar, mainTable },
  data() {
    return {
      mx_confirmLoading: false,
      tableExtendedField: [],
      formExtendedField: [],
      open: false,
      options: {},
      selectedRowKeys: [],
      mainId: '',
      currentMainData: null,
      detailsState: 0 /**0=不显示,1=查看,2=新建,3=修改,4=复制 */,
    };
  },
  mounted() {
    let _this = this;

  },
  computed: {},
  methods: {



    submit() {
      return this.$refs.mainTable.reload();
    },


    btnretry() {
      return retry(this, { idList: this.selectedRowKeys })

    },
    handeRetry(data) {
      return retry(this, { idList:[data.id]})
    },

  },
};
</script>
