<template>
  <!-- 装箱单超发报表 -->
  <div id="packingList-overissue-table">
    <!-- 查询 -->
    <a-card :bordered="false">
      <div class="table-page-search-wrapper">
        <a-form layout="inline" @keyup.enter.native="searchQuery">
          <a-row :gutter="24">
            <a-col :md="6" :sm="8">
              <a-form-item label="订单号">
                <a-input placeholder="请输入订单号" v-model="queryParam.orderNum"></a-input>
              </a-form-item>
            </a-col>

            <a-col :md="6" :sm="8">
              <a-form-item label="小po">
                <a-input placeholder="请输入小po" v-model="queryParam.smallPo"></a-input>
              </a-form-item>
            </a-col>

            <a-col :md="6" :sm="8">
              <a-form-item label="存货名称">
                <a-input placeholder="请输入存货名称" v-model="queryParam.inventoryName"></a-input>
              </a-form-item>
            </a-col>

            <a-col :md="6" :sm="8">
              <span style="float: left;overflow: hidden;" class="table-page-search-submitButtons">
                <a-button type="primary" @click="searchQuery" icon="search">查询</a-button>
                <a-button type="primary" @click="searchReset" icon="reload" style="margin-left: 8px">重置</a-button>
                <a @click="handleToggleSearch" style="margin-left: 8px">
                  {{ toggleSearchStatus ? '收起' : '展开' }}
                  <a-icon :type="toggleSearchStatus ? 'up' : 'down'" />
                </a>
              </span>
            </a-col>
          </a-row>
        </a-form>
      </div>
    </a-card>

    <!-- 子表 -->
    <a-card :bordered="false" style=" marginTop:10px;">
      <a-table
        bordered
        :row-key="record => record.id"
        :columns="PackingListOverissueColumns"
        :data-source="PackingListOverissueData"
        :loading="loading"
        :pagination="ipagination"
        @change="handleTableChange"
      >
      </a-table>
    </a-card>
  </div>
</template>

<script>
import { JeecgListMixin } from '@/mixins/JeecgListMixin'
import JEllipsis from '@/components/jeecg/JEllipsis'
// import moment from 'moment'

export default {
  name: 'PackingListOverissueTable', // 装箱单超发报表
  mixins: [JeecgListMixin],
  components: { JEllipsis },

  data() {
    // let ellipsis = (v, l = 20) => <j-ellipsis value={v} length={l} />
    return {
      loading: false,
      id: '',
      // 表头
      PackingListOverissueColumns: [
        {
          title: '订单号',
          dataIndex: 'orderNum',
          width: 120,
          className: 'replacecolor'
        },
        {
          title: '小po',
          dataIndex: 'smallPo',
          width: 130,
          className: 'replacecolor'
        },

        {
          title: '存货名称',
          dataIndex: 'inventoryName',
          width: 100,
          className: 'replacecolor'
        },
        {
          title: '数量',
          dataIndex: 'quantity',
          width: 160,
          className: 'replacecolor'
        },

        {
          title: '超出数量',
          dataIndex: 'styleNum',
          width: 120,
          className: 'replacecolor'
        }
      ],
      PackingListOverissueData: [{}],

      // 查询条件
      queryParam: {
        orderNum: '',
        smallPo: '',
        inventoryName: '' // 存货名称
      }
      // dateFormat: 'YYYY-MM-DD'
    }
  },
  created() {
    // this.getShipmentList() // 装箱单超发
  },
  methods: {
    // 查询按钮
    searchQuery() {
      // this.getAnnList() //装箱单超发
    },
    // 重置
    searchReset() {
      console.log('>>>>重置')
      this.queryParam = {}
      // this.getAnnList()
    },
    getBookTotalDetailsTable() {}

    // 分页、排序、筛选变化时触发
    // handleTableChange(pagination, filters, sorter) {
    //   // console.log('当前页信息>>>>',pagination)
    //   this.queryParam.pageNo = pagination.current
    //   // this.getAnnList()
    // }
  },
  computed: {},
  mounted() {}
}
</script>
<style lang="less" scoped>
@import '~@assets/less/common.less';
@import '~@assets/less/overwriter.less';
/deep/ .ant-table-thead > tr > th {
  text-align: center;
  // font-weight: 700;
}

/deep/ .ant-table-tbody {
  text-align: center;
}

// /deep/ th.replacecolor {
//   background-color: #ccc;
// }
</style>
