<template>
  <div>
    <!-- 筛选条件 -->
    <div class="base">
      <el-row :gutter="30">
        <el-col :span="4">
          <el-input
            v-model="searchForm.name"
            placeholder="经销商名称"
            width="20%"
          />
        </el-col>
        <el-col :span="4">
          <el-input
            v-model="searchForm.username"
            placeholder="提货人姓名"
            width="20%"
          />
        </el-col>

        <el-col :span="14">
          <div class="right">
            <el-button type="info">查询</el-button>
            <el-button type="info">重置</el-button>
          </div>
        </el-col>
      </el-row>
    </div>
    <!-- 按钮 -->
    <div class="table base">
      <el-row>
        <el-button type="info">新增</el-button>
        <el-button type="info">编辑</el-button>
        <el-button type="info">删除</el-button>
        <el-button type="info">导入</el-button>
        <el-button type="info">导出</el-button>
        <el-button type="info">打印</el-button>
      </el-row>
    </div>
    <!-- 列表 -->
    <div class="table base">
      <el-table
        :data="dataList"
        element-loading-text="Loading"
        :header-cell-style="{
          'background-color': '#e8e8e8',
          color: 'black',
        }"
        border=""
      >
        <el-table-column type="selection" min-width="100"></el-table-column>
        <el-table-column
          align="center"
          label="经销商名称"
          prop="name"
          min-width="160"
          show-overflow-tooltip
        ></el-table-column>
        <el-table-column
          align="center"
          label="车辆车牌号"
          prop="carNumber"
          min-width="160"
          show-overflow-tooltip
        ></el-table-column>
        <el-table-column
          align="center"
          label="创建者"
          prop="createUser"
          min-width="160"
          show-overflow-tooltip
        ></el-table-column>
        <el-table-column
          align="center"
          label="创建时间"
          prop="createDate"
          min-width="160"
          show-overflow-tooltip
        ></el-table-column>
        <el-table-column
          align="center"
          label="更新者"
          prop="updateUser"
          min-width="160"
          show-overflow-tooltip
        ></el-table-column>
        <el-table-column
          align="center"
          label="更新时间"
          prop="updateDate"
          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>
      <el-pagination
        class="right base"
        layout="prev, pager, next"
        :total="1000"
      >
      </el-pagination>
    </div>

    <!-- 弹窗 -->
    <el-dialog
      title="提货车辆档案"
      :visible.sync="dialogForm"
      width="40%"
      :show-close="false"
      :close-on-click-modal="false"
    >
      <el-form ref="form" :model="addForm" label-width="120px">
        <el-form-item label="经销商名称">
          <el-select v-model="addForm.name" placeholder="选择名称">
            <el-option> dsdsds</el-option>
          </el-select>
        </el-form-item>
        <el-row>
          <el-col :span="12">
            <el-form-item label="车牌号">
              <el-input v-model="addForm.username"></el-input> </el-form-item
          ></el-col>
          <el-col :span="12">
            <el-form-item label="联系电话">
              <el-input v-model="addForm.userID"></el-input> </el-form-item
          ></el-col>
        </el-row>
        <el-row>
          <el-col :span="12">
            <el-form-item label="车型">
              <el-input v-model="addForm.telephone"></el-input> </el-form-item
          ></el-col>
          <el-col :span="12">
            <el-form-item label="体积">
              <el-input v-model="addForm.sparePhone"></el-input> </el-form-item
          ></el-col>
        </el-row>
      </el-form>
      <div slot="footer" class="dialog-footer">
        <el-button @click="dialogForm = false">取 消</el-button>
        <el-button type="primary" @click="dialogForm = false">确 定</el-button>
      </div>
    </el-dialog>
  </div>
</template>

<script>
export default {
  data() {
    return {
      addForm: {
        name: "",
        username: "",
        userID: "",
        telephone: "",
        sparePhone: "",
        valid: "",
        Verification: "",
      },
      dialogForm: false,
      dataList: [
        {
          name: "佛山市禅城区梁云冷气经营部",
          carNumber: "粤Axxxxx",
          createUser: "张三",
          createDate: "2022-01-02 12:12",
          updateUser: "张三",
          updateDate: "2022-01-02 12:21",
        },
        {
          name: "佛山市禅城区梁云冷气经营部",
          carNumber: "粤Axxxxx",
          createUser: "张三",
          createDate: "2022-01-02 12:12",
          updateUser: "张三",
          updateDate: "2022-01-02 12:21",
        },
        {
          name: "佛山市禅城区梁云冷气经营部",
          carNumber: "粤Axxxxx",
          createUser: "张三",
          createDate: "2022-01-02 12:12",
          updateUser: "张三",
          updateDate: "2022-01-02 12:21",
        },
      ],
      searchForm: {
        name: "",
        username: "",
        telephone: "",
      },
    };
  },
  methods: {
    editFn() {
      this.dialogForm = true;
    },
  },
};
</script>

<style lang="scss" scoped>
::v-deep .el-pagination {
  .active {
    border: 1px solid #64adfd;
    margin-left: 6px;
    color: #64adfd;
    height: 32px;
    width: 32px;
    border-radius: 2px;
  }
}
.textColor {
  color: black;
}
::v-deep .el-date-editor {
  width: 100%;
}
::v-deep .el-select {
  width: 100%;
}
::v-deep .el-col-9 .el-button {
  padding: 5px;
}
::v-deep .el-dialog__header {
  background-color: #dddddd;
}
.base {
  padding: 20px 20px 0;
}
.table {
  margin-top: 12px;
}
.right {
  float: right;
}
</style>