<template>
  <el-dialog
    title="点位详情"
    append-to-body
    fullscreen
    :visible.sync="dialogVisible"
    @open="open"
    @close="close"
  >
    <el-card class="box-card" shadow="never">
      <div slot="header" class="clearfix">
        <span style="font-weight: bold;font-size: 15px;">点位信息:</span>
        <!--        <el-button style="float: right; padding: 3px 10px;" type="text">操作按钮</el-button>-->
      </div>

      <el-form ref="form" disabled :inline="true" :model="form" :rules="rules" size="mini" label-width="100px">
        <el-form-item label="区域编码">
          <el-input v-model="form.region_code" style="width: 200px;"/>
        </el-form-item>
        <el-form-item label="区域名称">
          <el-input v-model="form.region_name" style="width: 200px;"/>
        </el-form-item>

        <el-form-item label="点位编码">
          <el-input v-model="form.point_code" style="width: 200px;"/>
        </el-form-item>
        <el-form-item label="点位名称">
          <el-input v-model="form.point_name" style="width: 200px;"/>
        </el-form-item>
        <el-form-item label="点位类型">
          <el-input v-model="form.point_type_name" style="width: 200px;"/>
        </el-form-item>
        <el-form-item label="点位状态">
          <el-input v-model="form.point_status_name" style="width: 200px;"/>
        </el-form-item>
        <el-form-item label="锁定类型">
          <el-input v-model="form.lock_type_name" style="width: 200px;"/>
        </el-form-item>
        <el-form-item label="载具类型">
          <el-input v-model="form.lock_type_name" style="width: 200px;"/>
        </el-form-item>
        <el-form-item label="载具编码">
          <el-input v-model="form.vehicle_code" style="width: 200px;"/>
        </el-form-item>
        <el-form-item label="载具数量">
          <el-input v-model="form.vehicle_qty" style="width: 200px;"/>
        </el-form-item>

      </el-form>
    </el-card>

    <el-card class="box-card" shadow="always">
      <div slot="header" class="clearfix">
        <span style="font-weight: bold;font-size: 15px;">库存信息:</span>
        <!--        <el-button style="float: right; padding: 3px 10px;" type="text">操作按钮</el-button>-->
      </div>

      <el-form ref="form" disabled :inline="true" :model="form" :rules="rules" size="mini" label-width="100px">
        <el-form-item label="物料柜号">
          <el-input v-model="form.material_code" style="width: 200px;"/>
        </el-form-item>
        <el-form-item label="物料名称">
          <el-input v-model="form.material_name" style="width: 200px;"/>
        </el-form-item>

        <el-form-item label="物料规格">
          <el-input v-model="form.material_spec" style="width: 200px;"/>
        </el-form-item>
        <el-form-item label="物料批次">
          <el-input v-model="form.pcsn" style="width: 200px;"/>
        </el-form-item>
        <el-form-item label="库存量">
          <el-input v-model="form.ivt_qty" style="width: 200px;"/>
        </el-form-item>
        <el-form-item label="计量单位">
          <el-input v-model="form.point_status_name" style="width: 200px;"/>
        </el-form-item>
        <el-form-item label="入库时间">
          <el-input v-model="form.instorage_time" style="width: 200px;"/>
        </el-form-item>
        <el-form-item label="静置时间(分)">
          <el-input v-model="form.standing_time" style="width: 200px;"/>
        </el-form-item>
      </el-form>
    </el-card>



    <!--表格渲染-->
    <!--<el-card class="box-card" shadow="always">
      <div slot="header" class="clearfix">
        <span style="font-weight: bold;font-size: 15px;">更新记录:</span>
        &lt;!&ndash;        <el-button style="float: right; padding: 3px 10px;" type="text">操作按钮</el-button>&ndash;&gt;
      </div>
      <el-table
        ref="table"
        :data="tableData"
        style="width: 100%;"
        max-height="300"
        border
        :highlight-current-row="true"
        :header-cell-style="{background:'#f5f7fa',color:'#606266'}"
      >
        <el-table-column prop="device_code" label="设备编码" align="center"/>
        <el-table-column prop="device_name" label="设备名称" align="center" min-width="200" show-overflow-tooltip/>
        <el-table-column prop="produce_qty" label="生产数量" align="center"/>
        <el-table-column prop="init_qty" label="期初数量" align="center"/>
        <el-table-column prop="finish_qty" label="期末数量" align="center"/>
        <el-table-column prop="finishproduct_qty" label="完成数量" align="center"/>
        <el-table-column prop="operatetime_start" label="开始时间" align="center" min-width="130" show-overflow-tooltip/>
        <el-table-column prop="operatetime_end" label="结束时间" align="center" min-width="130" show-overflow-tooltip/>
        <el-table-column prop="nick_name" label="操作人" align="center"/>
      </el-table>
    </el-card>-->
    <!--<span slot="footer" class="dialog-footer">
      <el-button @click="dialogVisible = false">取 消</el-button>
      <el-button type="primary" @click="dialogVisible = false">确定</el-button>
    </span>-->
  </el-dialog>
</template>

<script>
import { crud } from '@crud/crud'

export default {
  name: 'ViewDialog',
  components: {},
  dicts: [],
  mixins: [crud()],
  props: {
    dialogShow: {
      type: Boolean,
      default: false
    }
  },
  data() {
    return {
      dialogVisible: false,
      classes3: [],
      parentData: {},
      form: {
        sale_id: null,
        workorder_id: null,
        produceorder_code: null,
        producedeviceorder_code: null,
        shift_type_scode: null,
        workprocedure_id: null,
        produce_date: null,
        plan_qty: null,
        real_qty: null,
        material_id: null,
        material_code: null,
        material_weight: null,
        planproducestart_date: null,
        planproduceend_date: null,
        realproducestart_date: null,
        realproduceend_date: null,
        order_status: null,
        is_needmove: null,
        order_type_scode: null,
        create_id: null,
        create_name: null,
        create_time: null,
        update_optid: null,
        update_optname: null,
        update_time: null,
        sysdeptid: null,
        syscompanyid: null,
        is_delete: null,
        material_name: null,
        device_id: null,
        is_canupdate_update: null,
        material_spec: null
      },
      workprocedureList: [],
      tableData: [],
      rules: {}
    }
  },
  watch: {
    dialogShow: {
      handler(newValue) {
        this.dialogVisible = newValue
      }
    }
  },
  methods: {
    open() {

    },
    close() {
      this.$emit('AddChanged')
    },
    setParentData(parentData) {
      if (parentData) {
        this.dialogVisible = true
        this.form = parentData
      }
    }
  }
}
</script>

<style scoped>
::v-deep .el-card__header {
  padding: 5px 0 5px 10px;
  background-color: #f8f8f9;
}
::v-deep .el-card__body {
  padding: 10px 0 10px 0;
}
</style>
