<template>
  <div class="app-container">
    <div v-if="isShow">
      <!-- 筛选条件 -->
      <div>
        <el-form label-width="70px" size="small" label-position="left">
          <el-row :gutter="20">
            <el-col :xs="24" :sm="12" :lg="6">
              <el-form-item label="企业名称" prop="account">
                <el-input placeholder="请输入企业名称"></el-input>
              </el-form-item>
            </el-col>
            <el-col :xs="24" :sm="12" :lg="6">
              <el-form-item label="联系人" prop="nickname">
                <el-input placeholder="请输入联系人"></el-input>
              </el-form-item>
            </el-col>
            <el-col :xs="24" :sm="12" :lg="6">
              <el-form-item label="联系电话" prop="phone">
                <el-input placeholder="请输入联系电话"></el-input>
              </el-form-item>
            </el-col>
            <el-col :xs="24" :sm="12" :lg="6">
              <el-form-item label="联系电话" prop="email">
                <el-input placeholder="请输入联系电话"></el-input>
              </el-form-item>
            </el-col>
            <el-col :xs="24" :sm="12" :lg="6">
              <el-form-item label="电子邮箱" prop="email">
                <el-input placeholder="请输入电子邮箱"></el-input>
              </el-form-item>
            </el-col>

            <el-col :xs="24" :sm="12" :lg="18" class="tr">
              <el-form-item label="">
                <el-button size="small" @click="resetScreenForm"
                  >清空</el-button
                >
                <el-button size="small" type="primary" @click="submitScreenForm"
                  >搜索</el-button
                >
              </el-form-item>
            </el-col>
          </el-row>
        </el-form>
      </div>
      <!-- 按钮 -->
      <div class="btn-group clearfix">
        <div class="fl">
          <el-button type="primary">删除</el-button>
        </div>
        <div class="fr">
          <el-button type="primary">导出</el-button>
        </div>
      </div>
      <div class="mymain-container">
        <!-- 列表 -->
        <div class="table">
          <el-table
            v-loading="listLoading"
            :data="dataList"
            element-loading-text="Loading"
            border
            fit
            highlight-current-row
            stripe
          >
            <el-table-column type="selection" min-width="100"></el-table-column>
            <el-table-column
              align="center"
              label="企业名称"
              prop="enterprise"
              min-width="160"
              show-overflow-tooltip
            ></el-table-column>
            <el-table-column
              align="center"
              label="联系人"
              prop="friend"
              min-width="160"
              show-overflow-tooltip
            ></el-table-column>
            <el-table-column
              align="center"
              label="联系电话"
              prop="telephone"
              min-width="160"
              show-overflow-tooltip
            ></el-table-column>
            <el-table-column
              align="center"
              label="邮箱"
              prop="email"
              min-width="160"
              show-overflow-tooltip
            ></el-table-column>
            <el-table-column
              align="center"
              label="联系地址"
              prop="address"
              min-width="160"
              show-overflow-tooltip
            ></el-table-column>
            <el-table-column
              align="center"
              label="申请时间"
              prop="reqDate"
              min-width="160"
              show-overflow-tooltip
            ></el-table-column>
            <el-table-column
              align="center"
              label="跟进人"
              prop="person"
              min-width="160"
              show-overflow-tooltip
            ></el-table-column>
            <el-table-column
              align="center"
              label="跟进时间"
              prop="personDate"
              min-width="160"
              show-overflow-tooltip
            ></el-table-column>
            <el-table-column
              align="center"
              label="跟进状态"
              prop="state"
              min-width="160"
              show-overflow-tooltip
            ></el-table-column>
            <el-table-column
              align="center"
              label="操作"
              min-width="160"
              show-overflow-tooltip
            >
              <el-button type="text" class="textColor" @click="editFn"
                >跟进</el-button
              >
              <el-button type="text" class="textColor">删除</el-button>
            </el-table-column>
          </el-table>
        </div>
        <!-- 分页 -->
        <div class="fr">
          <el-pagination
            :current-page="currentPage"
            :page-sizes="[10, 20, 30, 50]"
            :page-size="10"
            layout="total, sizes, prev, pager, next, jumper"
            :total="listTotal"
          >
          </el-pagination>
        </div>
      </div>
    </div>

    <DealerApplyDetail v-else />
  </div>
</template>

<script>
import DealerApplyDetail from "./components/dealer-apply-detail.vue";
export default {
  data() {
    return {
      currentPage: 1, // 当前页码
      pageSize: 10, // 每页数量
      listTotal: 0, // 列表总数
      isShow: true,
      showDialog: false,
      dataList: [
        {
          enterprise: "佛山市禅城区梁云冷气经营部",
          friend: "张三",
          telephone: "17839906442",
          email: "@163.com",
          address: "广东深圳市",
          reqDate: "2022-5-34  12:08",
          person: "张三",
          personDate: "2022-5-24   12:09",
          state: "跟进中",
        },
        {
          enterprise: "佛山市禅城区梁云冷气经营部",
          friend: "张三",
          telephone: "17839906442",
          email: "@163.com",
          address: "广东深圳市",
          reqDate: "2022-5-34  12:08",
          person: "张三",
          personDate: "2022-5-24   12:09",
          state: "跟进中",
        },
        {
          enterprise: "佛山市禅城区梁云冷气经营部",
          friend: "张三",
          telephone: "17839906442",
          email: "@163.com",
          address: "广东深圳市",
          reqDate: "2022-5-34  12:08",
          person: "张三",
          personDate: "2022-5-24   12:09",
          state: "跟进中",
        },
      ],
      enterprise: {
        name: "",
        friend: "",
        telephone: "",
        address: "",
        email: "",
      },
    };
  },
  components: {
    DealerApplyDetail,
  },
  methods: {
    editFn() {
      this.isShow = false;
    },
  },
};
</script>
<style lang="scss" scoped>
</style>