<template>
  <div class="app-container">
    <!-- 筛选条件 -->
    <div>
      <el-form label-width="100px" 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" class="tr">
            <el-form-item label="">
              <el-button size="small">清空</el-button>
              <el-button size="small" type="primary">搜索</el-button>
            </el-form-item>
          </el-col>
        </el-row>
      </el-form>
    </div>
    <!-- 按钮 -->
    <div class="btn-group clearfix">
      <div class="fl">
        <el-button type="primary" size="small" @click="addFn">新增</el-button>
      </div>
      <div class="fr">
        <el-button type="primary" size="small">导入</el-button>
        <el-button type="primary" size="small">导出</el-button>
        <el-button type="primary" size="small">打印</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"
            align="center"
            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="username"
            min-width="160"
            show-overflow-tooltip
          ></el-table-column>
          <el-table-column
            align="center"
            label="身份证"
            prop="userID"
            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="sparePhone"
            min-width="160"
            show-overflow-tooltip
          ></el-table-column>
          <el-table-column
            align="center"
            label="附件"
            prop="enclosure"
            min-width="160"
            show-overflow-tooltip
          ></el-table-column>
          <el-table-column
            align="center"
            label="有效期"
            prop="valid"
            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="state"
            min-width="160"
            show-overflow-tooltip
          ></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>

    <!-- 弹窗 -->
    <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-row>
          <el-col :span="12">
            <el-form-item label="有效期">
              <el-date-picker
                v-model="addForm.valid"
                type="date"
                placeholder="选择日期"
              >
              </el-date-picker> </el-form-item
          ></el-col>
          <el-col :span="12">
            <el-form-item label="验证码">
              <el-row :gutter="6">
                <el-col :span="14">
                  <el-input v-model="addForm.Verification" />
                </el-col>
                <el-col :span="9">
                  <el-button type="info">获取验证码</el-button>
                </el-col>
              </el-row>
            </el-form-item></el-col
          >
        </el-row>
        <el-form-item label="上传提货人附件">
          <el-upload class="upload-demo">
            <el-button size="small" type="info">点击上传</el-button>
          </el-upload>
        </el-form-item>
      </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 {
      currentPage: 1, // 当前页码
      pageSize: 10, // 每页数量
      listTotal: 0, // 列表总数
      addForm: {
        name: "",
        username: "",
        userID: "",
        telephone: "",
        sparePhone: "",
        valid: "",
        Verification: "",
      },
      dialogForm: false,
      dataList: [
        {
          name: "佛山市禅城区梁云冷气经营部",
          username: "张三",
          userID: "01234567891234567689",
          telephone: "01234567891",
          sparePhone: "1234567890",
          enclosure: "",
          valid: "2022-04-30",
          createUser: "张三",
          createDate: "2022-01-02 12:21",
          state: "失效",
        },
        {
          name: "佛山市禅城区梁云冷气经营部",
          username: "张三",
          userID: "01234567891234567689",
          telephone: "01234567891",
          sparePhone: "1234567890",
          enclosure: "",
          valid: "2022-04-30",
          createUser: "张三",
          createDate: "2022-01-02 12:21",
          state: "失效",
        },
        {
          name: "佛山市禅城区梁云冷气经营部",
          username: "张三",
          userID: "01234567891234567689",
          telephone: "01234567891",
          sparePhone: "1234567890",
          enclosure: "",
          valid: "2022-04-30",
          createUser: "张三",
          createDate: "2022-01-02 12:21",
          state: "失效",
        },
      ],
      searchForm: {
        name: "",
        username: "",
        telephone: "",
      },
    };
  },
  methods: {
    addFn() {
      this.dialogForm = true;
    },
  },
};
</script>

<style lang="scss" scoped>
::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>