<!--
  @description: 收货&发货-订单处理-编辑&详情-发货信息列表公共
  @author: 王俊楠
  @date： 2020-10-30 14:56:12
-->
<template>
  <div>
    <div class="clearfix offerInfo">
      <p class="fl page-title">
        3.发货信息
        <slot name="addHandleBtn" />
      </p>
    </div>
    <el-table
      :data="deliveryInfoList"
      border
      class="mb16 tableLimit"
    >
      <el-table-column type="index" label="序号" width="55" align="center" />
      <el-table-column
        prop="goodsNumber"
        header-align="center"
        align="center"
        min-width="150"
        label="发货单号"
      />
      <el-table-column
        prop="logisticsCompany"
        header-align="center"
        align="center"
        min-width="120"
        label="物流公司"
      />
      <el-table-column
        prop="goodsName"
        header-align="center"
        align="right"
        min-width="200"
        label="货物名称"
      />
      <el-table-column
        header-align="center"
        align="right"
        min-width="100"
        label="状态"
      >
        <template slot-scope="scope">
          {{ filterDictText(send_goods_detail_statusList,scope.row.status) }}
        </template>
      </el-table-column>
      <el-table-column
        prop="logisticsSingleNumber"
        header-align="center"
        align="center"
        min-width="150"
        label="物流单号"
      />
      <el-table-column
        header-align="center"
        label="操作"
        align="center"
        width="230"
      >
        <template slot-scope="scope">
          <!-- 操作按钮父组件传入，table组件通过绑定scope.row传参到父组件 -->
          <slot :row="scope.row" :index="scope.$index" />
        </template>
      </el-table-column>
    </el-table>
    <!--分页组件-->
    <!-- <pagination :pagination-data="paginationData" @change="getDeliveryData" /> -->
  </div>
</template>

<script>
/* 公共方法 */
import { filterDictText } from '@/assets/js/utils' // 深拷贝
import { procurementOrderGroupMixins } from '@/views/procurement/procurementOrder/mixins/procurementOrderGroupMixins.js'
// 组件
import pagination from '@comp/common/pagination/pagination' // 分页组件

export default {
  name: 'ProcurementOrderDeliverCompDetail',
  components: {
    pagination // 分页组件
  },
  mixins: [procurementOrderGroupMixins],
  props: {
    // 删除发货信息更新数据
    deliveryInfoData: {
      type: Array,
      default: () => {
        return []
      }
    } // 删除发货更新返回数据
  },
  data() {
    return {
      // 发货页面数据
      deliveryInfoList: [],
      // 发货其他数据
      deliveryInfoOther: {
      },
      // paginationData: {
      //   pageNo: 1,
      //   pageSize: 10,
      //   total: 10
      // }, // 翻页组件数据
      confirmLoading: false // 页面加载
    }
  },
  watch: {
    // 删除发货信息返回数据
    deliveryInfoData: {
      handler(val, old) {
        // 如果新值和旧值相同，则不触发方法。
        if (val !== old) {
          this.deliveryInfoList = val // 赋值props给本页
        }
      },
      deep: true
    }
  },
  created() {
  },
  mounted() {
  },
  methods: {
    filterDictText
    // 获取发货信息
    // getDeliveryData(paginationData) {
    //   this.$emit('getDeliveryData', paginationData)
    // }
  }
}
</script>

<style lang="less" scoped>
</style>
