<template>
  <div class="supplementOrder">
    <el-card>
      <!-- 内容区 -->
      <el-row class="content-area">

        <!-- 左侧 -->
        <el-col :span="6" class="left-area">
          <el-row>
            <el-button type="primary">新增</el-button>
            <el-button type="primary">删除</el-button>
          </el-row>
          <el-row v-for="item in testData" :key="item.key" class="title-info">
            <div>
              <p>{{item.title}}</p>
            </div>
            <div>
              <p>111</p>
              <p>111</p>
              <p>111</p>
              <div>
                <i class="el-icon-delete"></i>
              </div>
            </div>
          </el-row>
        </el-col>

        <!-- 右侧 -->
        <el-col :span="18" class="right-area">

          <el-row class="right-title">
            <div>货物筛选</div>
            <div>当前装柜：第一部分</div>
            <div>可预装方数：111m³，重量：22KG</div>
          </el-row>

          <!-- 搜索工作栏 -->
          <el-row>
            <el-form :model="queryParams" ref="queryForm" size="small" :inline="true" label-width="68px">
              <el-form-item label="始发地">111</el-form-item>
              <el-form-item label="目的地" prop="destination">
                <el-select v-model="queryParams.destination" placeholder="请选择目的地">
                </el-select>
              </el-form-item>
              <el-form-item label="订单号" prop="orderNo">
                <el-input v-model="queryParams.orderNo" placeholder="请输入订单号" clearable />
              </el-form-item>

              <el-form-item>
                <el-button type="primary" icon="el-icon-search">搜索</el-button>
              </el-form-item>
            </el-form>
          </el-row>

          <!-- 表格 -->
          <el-row>
            <el-row class="table-title">
              <div>EC1111111</div>
              <div>发往：xxxxxxxxxx</div>
              <div>我司全代</div>
              <div>入仓时间：1111111</div>
              <div>
                <div>[全部预装]</div>
                <div>[收起]</div>
              </div>
            </el-row>
            <el-table v-loading="loading" :data="listData">
              <el-table-column label="序号" type="index" width="50" />
              <el-table-column label="订单号" align="center" prop="selfNo" />
              <el-table-column label="货物信息" align="center" prop="cubNo" />
              <el-table-column label="计划箱数" align="center" prop="cabinetId" />
              <el-table-column label="实装箱数" align="center" prop="transportType" />
              <el-table-column label="体积" align="center" prop="squareNumber" />
              <el-table-column label="重量" align="center" prop="weight" />
              <el-table-column label="操作" align="center" class-name="small-padding fixed-width">
                <template slot-scope="scope">
                  <el-button type="primary" size="small">预装</el-button>
                </template>
              </el-table-column>
            </el-table>
          </el-row>

          <!-- 分页 -->
          <el-pagination background layout="prev, pager, next" :total="1000"></el-pagination>
        </el-col>

      </el-row>
    </el-card>
    <el-row>
      <el-col :span="6" class="totle-info">
        <div>
          <p>总计：</p>
          <p>111</p>
        </div>
        <div>
          <p>容量：</p>
          <p>111</p>
        </div>
      </el-col>
    </el-row>
    <el-row class="button-area">
      <el-button type="primary">完成</el-button>
    </el-row>
  </div>
</template>

<script>
/**
 * 补单
 */
export default {
  name: "supplementOrder",
  data() {
    return {
      // loading
      loading: false,
      // 二维码/条码编号
      cabinetNo: "",
      // 表格数据
      listData: [
        {
          selfNo: "111aaa",
          cubNo: "11111111111111111111111111",
        },
        {
          selfNo: "111aaa",
          cubNo: "11111111111111111111111111",
        },
      ],
      // 左侧数据
      testData: [
        {
          key: 1,
          title: "第一部分",
        },
        {
          key: 2,
          title: "第二部分",
        },
      ],
      // 查询参数
      queryParams: {},
    };
  },
  methods: {},
};
</script>

<style lang="scss" scoped>
.supplementOrder {
  p {
    margin: 0;
  }
  .content-area {
    display: flex;
    .left-area {
      border-right: 3px solid #e6ebf5;
      padding-right: 10px;
      .title-info {
        margin-top: 10px;
        height: auto;
        > div:first-child {
          font-size: 16px;
          background-color: #f2f2f2;
          line-height: 30px;
          text-align: center;
        }
        > :last-child {
          display: flex;
          align-items: center;
          > p {
            margin-right: 10px;
            color: #4f9cdd;
          }
          > div {
            flex: 1;
            text-align: right;
            > i {
              cursor: pointer;
              color: red;
            }
          }
        }
      }
    }
    .right-area {
      padding-left: 10px;
      .right-title {
        display: flex;
        align-items: center;
        margin-bottom: 10px;
        font-size: 16px;
        > div:first-child {
          font-size: 18px;
        }
        > div:first-child + div {
          margin-left: 20px;
        }
        > div:last-child {
          flex: 1;
          text-align: right;
          font-size: 18px;
          color: red;
        }
      }
      .table-title {
        display: flex;
        line-height: 30px;
        background-color: #4f9cdd;
        color: #fff;
        > div {
          margin-left: 10px;
        }
        > div:last-child {
          flex: 1;
          display: flex;
          justify-content: flex-end;
          > div {
            margin-right: 10px;
          }
        }
      }
      .el-pagination {
        margin-top: 10px;
        padding: 0;
        text-align: right;
      }
    }
  }
  .totle-info {
    font-size: 20px;
    margin-top: 15px;
    > div {
      display: flex;
      margin-bottom: 5px;
    }
  }
  .button-area {
    text-align: center;
  }
}
</style>
