<style lang="scss" scoped>

</style>
<template>
<div>
        <div
          class="text-h5 text-weight-bold text-left q-mt-xl"
          ref="assemblypoint"
          :class="{
            'q-px-md': $q.screen.width < 1220 && $q.platform.is.mobile,
          }"
        >
          接送點範圍
        </div>
        <div
          class="q-mt-lg trip-text rounded-borders q-mb-xl"
          style="border: 1px dashed var(--q-color-warning)"
          :class="{
            'q-mx-md': $q.screen.width < 1220 && $q.platform.is.mobile,
          }"
          v-for="(x,index) in dataList.PlaceList">
          <div class="q-pa-md" style="border-bottom: 1px dashed var(--q-color-warning)">
            <div class="text-weight-bold text-h6">地點名稱：{{x.Name}}</div>
            <div class="text-grey-9">地址：{{x.Address}}</div>
          </div>
          <div class="q-pa-md" :class="{
            'q-mx-md': $q.screen.width < 1220 && $q.platform.is.mobile,
          }">
            <componentsMap :AddressObj="x"/>
          </div>
        </div>
        <div
          class="text-h5 text-weight-bold text-left q-mt-xl"
          ref="experiencelocation"
          :class="{
            'q-px-md': $q.screen.width < 1220 && $q.platform.is.mobile,
          }"
        >
          機場地點
        </div>
        <div
          class="q-mt-lg trip-text rounded-borders q-mb-xl"
          style="border: 1px dashed var(--q-color-warning)"
          :class="{
            'q-mx-md': $q.screen.width < 1220 && $q.platform.is.mobile,
          }"
          v-for="(x,index) in dataList.AirportList">
          <div class="q-pa-md" style="border-bottom: 1px dashed var(--q-color-warning)">
            <div class="text-weight-bold text-h6">地点名称：{{x.Name}}</div>
            <div class="text-grey-9">地址：{{x.Address}}</div>
          </div>
          <div class="q-pa-md" :class="{
            'q-mx-md': $q.screen.width < 1220 && $q.platform.is.mobile,
          }">
            <componentsMap :AddressObj="x"/>
          </div>
        </div>
</div>
</template>
<script>
import componentsMap from "../../../components/car/Map.vue";
export default {
    props: {
        orderInfo: {
            type: Object,
            default: () => ({})
        }
    },
    components: {componentsMap},
    data() {
      return {
        dataList: [],
        details: null,
      sumPrice: 0,//总金额
      DiscountsMoney: 0,//优惠金额
      Money: 0, // 支付金額
      }
    },
    mounted() {
        this.getCarData()
        // this.getCarOrder()
    },
    methods: {
    //  获取车的详情
    getCarData() {
      // this.$q.loading.show();
      this.apipost(
        "b2c_get_GetCarSingleProductDetail",
        { ProductId: this.orderInfo.GoodsId },
        (r) => {
          if (r.data.resultCode == 1) {
            this.dataList = r.data.data;
            this.details = r.data.data;
          } else {
            this.$q.notify({
              type: "negative",
              message: r.data.message,
              position: "top",
              timeout: 2000, // 以毫秒为单位; 0意味着没有超时
            });
          }
          // this.$q.loading.hide();
        },
        null
      );
    },
    getCarOrder() {
        
        this.$q.loading.show();
      this.apipost(
        "CarSingle_post_GetTYMyCarOrderInfo",
        { OrderId: this.orderInfo.ErpOrderId },
        (r) => {
          if (r.data.resultCode == 1) {
            this.dataList = r.data.data;
            this.Money = r.data.data.Money;
            const {DiscountsMoney,Money} = r.data.data;
            this.Money = Money;
            this.DiscountsMoney = DiscountsMoney
            this.sumPrice = Money + DiscountsMoney
          } else {
            this.$q.notify({
              type: "negative",
              message: r.data.message,
              position: "top",
              timeout: 2000, // 以毫秒为单位; 0意味着没有超时
            });
          }
          this.$q.loading.hide();
        },
        null
      );
    
    },
    }
}
</script>