<template>
  <div class="app-container">
    <!-- 筛选条件 -->
    <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="12" 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" size="small">新增</el-button>
        <el-button type="primary" size="small">编辑</el-button>
        <el-button type="primary" size="small">删除</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"></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="code"
            min-width="160"
            show-overflow-tooltip
          ></el-table-column>
          <el-table-column
            align="center"
            label="提货人"
            prop="consignee"
            min-width="160"
            show-overflow-tooltip
          ></el-table-column>
          <el-table-column
            align="center"
            label="提货人电话"
            prop="consigneePhone"
            min-width="160"
            show-overflow-tooltip
          ></el-table-column>
          <el-table-column
            align="center"
            label="客服电话"
            prop="customerService"
            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 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="showDialogForm"
      width="30%"
      :show-close="false"
      :close-on-click-modal="false"
    >
      <el-form ref="form" :model="diaLogForm" label-width="100px">
        <el-form-item label="物流公司名称">
          <el-input v-model="diaLogForm.name"></el-input>
        </el-form-item>
        <el-form-item label="物流公司代码">
          <el-input v-model="diaLogForm.code"></el-input>
        </el-form-item>
        <el-form-item label="提货人">
          <el-input v-model="diaLogForm.consignee"></el-input>
        </el-form-item>
        <el-form-item label="提货人电话">
          <el-input v-model="diaLogForm.consigneePhone"></el-input>
        </el-form-item>
        <el-form-item label="客服电话">
          <el-input v-model="diaLogForm.sparePhone"></el-input>
        </el-form-item>
      </el-form>
      <div slot="footer" class="dialog-footer">
        <el-button @click="showDialogForm = false">取 消</el-button>
        <el-button type="primary" @click="showDialogForm = false"
          >确 定</el-button
        >
      </div>
    </el-dialog>
  </div>
</template>

<script>
export default {
  data() {
    return {
      currentPage: 1, // 当前页码
      pageSize: 10, // 每页数量
      listTotal: 0, // 列表总数
      diaLogForm: {
        name: "",
        code: "",
        consignee: "",
        consigneePhone: "",
        customerService: "",
      },
      showDialogForm: false,
      dataList: [
        {
          num: "1",
          name: "嘉贤",
          code: "1212",
          consignee: "",
          consigneePhone: "",
          customerService: "12345678901",
          createUser: "",
          createDate: "",
          updateUser: "",
          updateDate: "",
        },
        {
          num: "1",
          name: "嘉贤",
          code: "1212",
          consignee: "",
          consigneePhone: "",
          customerService: "12345678901",
          createUser: "",
          createDate: "",
          updateUser: "",
          updateDate: "",
        },
        {
          num: "1",
          name: "嘉贤",
          code: "1212",
          consignee: "",
          consigneePhone: "",
          customerService: "12345678901",
          createUser: "",
          createDate: "",
          updateUser: "",
          updateDate: "",
        },
        {
          num: "1",
          name: "嘉贤",
          code: "1212",
          consignee: "",
          consigneePhone: "",
          customerService: "12345678901",
          createUser: "",
          createDate: "",
          updateUser: "",
          updateDate: "",
        },
      ],
      searchForm: {
        name: "",
        username: "",
        telephone: "",
      },
    };
  },
  methods: {
    editFn() {
      this.showDialogForm = true;
    },
  },
};
</script>

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