<template>
<div class="container">
  <my-nav></my-nav>
  <div class="content">
    <div class="title">请选择出库单</div>
    <div class="list-wrap">
      <div class="item" @click="handle(item)" v-for="(item, index) in data" :key="index">
        <div class="row">
          <div class="col">物料编码：{{ item.materialCode }}</div>
          <div class="col">物料名称：{{ item.materialName }}</div>
        </div>
        <div class="row">
          <div class="col">物料规格：{{ item.spec }}</div>
          <div class="col"></div>
        </div>
        <div class="row">
          <div class="col">领料数量：{{ item.quantity }}</div>
          <div class="col">物料单位：米</div>
        </div>
      </div>
    </div>
  </div>
</div>
</template>

<script>
import { GetOutStorageBillList } from '@/api/integrated'
import MyNav from '@/components/my-nav'
export default {
  name: "store-in",
  data() {
    return {
      data: []
    }
  },
  components: {
    MyNav
  },
  methods: {
    handle(data) {
      this.$router.push({
        name: 'store-out',
        query: {
          data: JSON.stringify(data)
        }
      })
    },
    getList() {
      GetOutStorageBillList({
        pageIndex: 1,
        pageSize: 99
      }).then(res => {
        if (res.code === 0) {
          this.data = res.result.list
        }
      })
    }
  },
  mounted() {
    this.getList()
  },
  destroyed() {
  }
}
</script>

<style lang="scss" scoped>
  .container {
    width: 100vw;
    height: 100vh;
    overflow: auto;
    //background: rgba(2, 125, 180, 1);
    background-image: linear-gradient(270deg,
        #2c3034 0%,
        #50575e 49%,
        #2c3034 100%);
    .content {
      padding: 10px 40px;
      margin: 10px;
      height: calc(100% - 142px);
      //background: rgba(1, 84, 120, 1);
      border-radius: 10px;
      .reading {
        height: 100%;
        display: flex;
        align-items: center;
        justify-content: center;
        font-size: 36px;
        font-weight: bold;
        color: #00FFFF;
      }
      .title {
        padding: 10px 0;
        text-align: center;
        font-size: 36px;
        font-weight: bold;
        color: #2dc57c;
      }
      .list-wrap {
        width: 100%;
        height: calc(100% - 74px);
        //background: rgba(2, 125, 180, 0.486274509803922);
        background: #2c3034;
        border-radius: 10px;
        border: solid 1px #3879e7;
        overflow: auto;
        .item {
          padding: 20px 40px;
          //background: rgba(215, 215, 215, 1);
          //border-radius: 10px;
          cursor: pointer;
          color: #ffffff;
          border-bottom: solid 1px #2655ad;;
          .row {
            margin-bottom: 10px;
            display: flex;
            justify-content: space-between;
            align-items: center;
            border-radius: 10px;
            &:last-child {
              margin-bottom: 0;
            }
            .col {
              flex: 1;
              font-size: 18px;
              text-align: left;
            }
          }
        }
      }
    }
  }
</style>
