<template>
  <p-card>
    <div slot="title" style="display: flex; align-items: center; cursor: pointer" @click="backPage('back')">
      <a-icon type="arrow-left" style="color: #1990ff" class="mr-10" />
      {{ title }}
    </div>
    <div class="extend-title">
      <span class="title">信息</span>
      <div style="margin:16px 0">
        <a-descriptions>
          <a-descriptions-item label="波次编号">
            {{ params.id }}
          </a-descriptions-item>
          <a-descriptions-item label="波次编号">
            {{ params.code }}
          </a-descriptions-item>
          <a-descriptions-item label="优先级">
            1
          </a-descriptions-item>
          <a-descriptions-item label="仓库">
            {{ params.wareHouseId }}
          </a-descriptions-item>
        </a-descriptions>
      </div>
    </div>
    <div class="extend-title">
      <span class="title">商品信息</span>
      <div style="margin:26px 0">
        <p-table
          dragging
          :rowSelectType="false"
          ref="cardTable"
          :bordered="true"
          rowKey="id"
          auto-width
          :data-source="params.items"
          :columns="itemsColumnsConfig"
        >
        </p-table>
      </div>
    </div>
  </p-card>
</template>
<script>
import { itemsColumnsConfig } from '../js/config'
export default {
  components: {},
  props: {
    params: {
      type: Object,
      default() {
        return {}
      }
    },
    columns: {
      type: Array,
      default() {
        return []
      }
    },
    title: {
      type: String,
      default: ''
    }
  },
  data() {
    return {
      // remoteUrl: {
      //   url: '',
      //   params: '',
      //   headers: {
      //     'Content-Type': 'application/JSON'
      //   },
      //   method: 'post',
      //   timeout: 30000,
      // },
      isUpload: false,
      lookats: false,
      uploadId: '',
      list: [],
      itemsColumnsConfig,
      dataSource: [
        {
          customername: 1,
          id: '90',
          branchname: '121'
        }
      ]
    }
  },
  created() {},
  watch: {
    // params: {
    //   handler(newVal, oldVal) {
    //   },
    //   deep: true,
    //   immediate: true
    // },
  },
  computed: {},
  methods: {
    // upLoadChange(text, record) {
    //   this.uploadId = record.id
    //   this.isUpload = true
    //   this.lookats = false
    // },
    // grid2Main03Table_checkClick(text, record) {
    //   this.uploadId = record.id
    //   this.isUpload = true
    //   this.lookats = true
    // },
    backPage() {
      this.$emit('back')
    }
  }
}
</script>
<style lang="less">
.ant-upload-list-text {
  display: none;
}
.extend-title {
  .title {
    font-weight: bold;
    font-size: 14px;
  }
  padding: 12px 0;
  border-bottom: 1px solid #e8e8e8;
  margin-bottom: 12px;
}
</style>
