/*
 *@description:调度查看
 *@author: hudw
 *@date: 2022-08-10 17:09:48
*/
<template>
  <a-spin :spinning="false">
    <p-grid-form ref="grid" class="p-grid-view" :items="itemsObj[approvalType] || []" :span="6"> </p-grid-form>

    <p-card title="运单信息" :bodyStyle="{ padding: 0 }">
      <p-table
        style="margin: -1px"
        :id="$route.meta.menuId + '-schedulingView'"
        dragle
        :rowSelectType="false"
        :pagination="false"
        bordered
        :scroll="{ x: true }"
        rowKey="_row_count"
        :columns="columns"
        :dataSource="record ? record.shipbillInfoDTOList : []"
      >
      </p-table>
    </p-card>
  </a-spin>
</template>
<script>
import { setFormItems, setCarrierFormItems, setColumns, setPickUpFormItems } from './config.js'
export default {
  props: {
    approvalType: {
      type: Number,
      //4调度审批	 ,5承运商调度审批
    },
    record: {
      type: Object,
    },
  },
  data() {
    let itemsObj = {
      4: setFormItems(this), //4调度审批
      5: setCarrierFormItems(this), //5承运商调度审批
      9: setPickUpFormItems(this), //9自提登记审批
    }
    return {
      itemsObj,
      columns: setColumns(this),
    }
  },
  mounted() {
    this.form().setFieldsValue(this.record)
  },
  methods: {
    form() {
      return this.$refs.grid.form
    },
  },
}
</script>
<style lang='less'>
</style>