<!--
 * @Author: zwq
 * @Date: 2021-11-17 15:49:18
 * @LastEditors: zwq
 * @LastEditTime: 2021-11-17 15:58:31
 * @Description:
-->
<template>
  <el-dialog
    title="库位信息"
    :visible.sync="visible">
    <el-table
      :data="dataList"
      border
      style="width: 100%;">
      <el-table-column
        type="index"
        header-align="center"
        align="center"
        label="序号"
        width="50">
      </el-table-column>
      <el-table-column
        prop="id"
        header-align="center"
        align="center"
        label="标识卡">
      </el-table-column>
      <el-table-column
        prop="id1"
        header-align="center"
        align="center"
        label="客户信息">
      </el-table-column>
      <el-table-column
        prop="number"
        header-align="center"
        align="center"
        label="数量">
      </el-table-column>
      <el-table-column
        prop="unit"
        header-align="center"
        align="center"
        label="单位">
      </el-table-column>
    </el-table>
    <span slot="footer" class="dialog-footer">
      <el-button @click="visible = false">取消</el-button>
    </span>
  </el-dialog>
</template>

<script>
  export default {
    data () {
      return {
        visible: false,
        dataList: []
      }
    },
    methods: {
      init (id) {
        this.visible = true
        this.$nextTick(() => {
          if (id) {
            this.$http({
              url: this.$http.adornUrl(`/sys/config/info/${this.dataForm.id}`),
              method: 'get',
              params: this.$http.adornParams()
            }).then(({data}) => {
              if (data && data.code === 0) {
                this.dataForm.paramKey = data.config.paramKey
                this.dataForm.paramValue = data.config.paramValue
                this.dataForm.remark = data.config.remark
              }
            })
          }
        })
      }
    }
  }
</script>
