//查看运输订单
<template>
  <div class="transportOrder">
    <template>
      <div>
        <el-tabs v-model="activeName" @tab-click="handleClick">
          <el-tab-pane label="待接收" name="first">
            <dilTable v-bind.sync="first" ref="table"> </dilTable>
          </el-tab-pane>
          <el-tab-pane label="已接收" name="second">
            <dilTable v-bind.sync="second" ref="table"> </dilTable>
          </el-tab-pane>
          <el-tab-pane label="已完成" name="third">
            <dilTable v-bind.sync="third" ref="table"> </dilTable>
          </el-tab-pane>
        </el-tabs>
      </div>
    </template>
    <div class="sache">
      <el-button type="primary" class="btn" @click="cancel"> 返回 </el-button>
    </div>
  </div>
</template>
<script>
import { getCookie } from "@/utils/util.js";
export default {
  data() {
    return {
      inputText: "",
      truckInput: null,
      userCarrierId: "",
      first: {
        //
        requestUrl: "",
      },

      activeName: "first",
      second: {
        requestUrl: "",
      },
      third: {
        requestUrl: "",
      },
    };
  },
  created() {
    this.first.requestUrl =
      "/api/v1/oms/getTransportOrder?apiId=485&orderStatus=4" +
      "&orderId=" +
      this.$route.params.orderId;
    this.second.requestUrl =
      "/api/v1/oms/getTransportOrder?apiId=485&orderStatus=5" +
      "&orderId=" +
      this.$route.params.orderId;
    this.third.requestUrl =
      "/api/v1/oms/getTransportOrder?apiId=485&orderStatus=2" +
      "&orderId=" +
      this.$route.params.orderId;
  },
  methods: {
    getRequest() {
      this.first.requestUrl =
        "/api/v1/oms/getTransportOrder?apiId=485&orderStatus=4" +
        "&i=" +
        new Date() +
        "&orderId=" +
        this.$route.params.orderId;
      this.second.requestUrl =
        "/api/v1/oms/getTransportOrder?apiId=485&orderStatus=5" +
        "&i=" +
        new Date() +
        "&orderId=" +
        this.$route.params.orderId;
      this.third.requestUrl =
        "/api/v1/oms/getTransportOrder?apiId=485&orderStatus=2" +
        "&i=" +
        new Date() +
        "&orderId=" +
        this.$route.params.orderId;
    },
    cancel() {
      this.$router.go(-1);
    },
    handleClick() {
      this.getRequest();
    },
  },
};
</script>
<style lang="scss">
.transportOrder {
  margin-top: 20px;
  margin-left: 20px;
   .sache{
       margin-left: 650px;
   }
}
</style>
