/*
 *@description:回单审核
 *@author: hudw
 *@date: 2023-01-10 10:44:22
*/
<template>
  <div>

    <viewFormContent v-if="record" :formExtendedField="formExtendedField" :record="record.shipbillInfoDTOList" :options="options">




    </viewFormContent>

    <a-divider orientation="left">
      节点信息
    </a-divider>
    <nodeTracking slot="table-2" v-if="record" :editId="record.shipbillId"></nodeTracking>






  </div>
</template>

<script>
import { initDictionary, resultExtendedField } from '@/blocks/utils';
import viewFormContent from '@/blocks/components/orderView/formDetails/viewFormContent.vue';
import nodeTracking from '@/blocks/components/orderView/modules/nodeTracking.vue';

export default {
  components:{viewFormContent,nodeTracking},
  props: {
    record: {
      type: Object,
    }
  },
  data() {
    return {
      dataView:null,
      options: {},
      formExtendedField: {
        form: [],
        formTable: [],
      },
    };
  },
  mounted() {
    //运单扩展
    resultExtendedField({ extendedObjectCode: '15' }).then((data) => {
      if (data) {
        this.tableExtendedField = data.table;
        this.formExtendedField.form = data.form;
      }
    });
    //运单商口明细扩展
    resultExtendedField({ extendedObjectCode: '17' }).then((data) => {
      if (data) {
        data.form.forEach((item, i) => {
          data.table[i].type = item.type;
          if (item.options) {
            data.table[i].options = item.options;
          }
        });
        this.formExtendedField.formTable = data.table;
      }
    });
    initDictionary([
      { objectcode: 'PICK_UP_SIGN_TIME' },
      { objectcode: 'DELIVERY_SIGN_TIME' },
      { objectcode: 'SIGN_TIME_UNIT' },
      { objectcode: 'ORDER_BUSINESS_TYPE' },
      { objectcode: 'ORDER_TYPE' },
      { objectcode: 'PACK_TYPE' },
      { objectcode: 'CARGO_THERMOSPHERE' },
      { objectcode: 'DELIVERY_METHOD_TYPE' },
      { objectcode: 'TEMPERATURE_REQUIREMENT' },
      { objectcode: 'SHIPPER_TYPE' },
      { objectcode: 'CONSIGNEE_TYPE' },
      { objectcode: 'LOCATION_FLAG' },
      { objectcode: 'TRANSPORT_TYPE' },
    ]).then((res) => {
      for (let key in res) {
        res[key].forEach((item) => {
          item.value = +item.value;
        });
      }
      this.options = { ...this.options, ...res };
    });
  },
  methods: {

  },
};
</script>
<style lang='less'>
</style>