<template>
  <div>
    <detailDatatable
      style="margin: 0; padding: 0"
      v-if="sitem"
      :newTime="newTime"
      :sitem="sitem"
      :columns="columns"
      :border="true"
    >
      <template slot="member">
        <el-table :data="sitem.member" :size="'mini'" border style="width: 100%">
          <el-table-column prop="contactor" label="联系人" show-overflow-tooltip />
          <el-table-column prop="commobile" label="联系电话" show-overflow-tooltip />
          <el-table-column prop="position" label="职位" show-overflow-tooltip />
          <el-table-column prop="comdepart" label="所在部门" show-overflow-tooltip />
          <el-table-column prop="wxaccount" label="微信号" show-overflow-tooltip />
          <el-table-column prop="qqaccount" label="qq号" show-overflow-tooltip />
          <el-table-column prop="email" label="邮箱" show-overflow-tooltip />
        </el-table>
      </template>
    </detailDatatable>
  </div>
</template>

<script>
import { columns } from "./columns";
// import { cg_order_type_options } from "@/assets/js/statusList";
import { xs_order_type_options } from "@/assets/js/statusList";

//————————————————
import mixinPage from "@/mixins/elPaginationHandle";
import resToken from "@/mixins/resToken";
import asyncRequest from "@/apis/service/serviceParam/business";
import { mapGetters } from "vuex";
import detailDatatable from "../detail-data-table";

export default {
  mixins: [mixinPage, resToken],
  components: {
    detailDatatable,
  },
  computed: {
    ...mapGetters(["tablebtnSize", "searchSize", "size", "private_field"]),
    powers() {
      const tran =
        this.$store.getters.btnList.find(
          (item) => item.menu_route == "standingBookDetail"
        ) || {};
      const { action } = tran ?? {};
      return action ?? [];
    },
  },
  props: ["queryId"],
  data() {
    return {
      xs_order_type_options,

      // cost_detailArr: [],

      //——————————————————————
      columns,
      newTime: "",
      status: "",
      sitem: null,
      loading: false,
    };
  },
  mounted() {
    this.initData();
  },
  methods: {
    getNewTime() {
      this.newTime = new Date().valueOf();
    },
    async initData() {
      let res = await asyncRequest.qdetail({ companyNo: this.queryId });
      if (res.code === 0) {
        this.sitem = res.data;
        this.getNewTime();
      } else if (code >= 100 && code <= 104) {
        await this.logout();
      } else {
        this.$message.warning(message);
      }
    },
  },
};
</script>

<style></style>
