<template>
  <view class="card-info-wrapper" :style="{ 'border-radius': borderRadius }">
    <view class="card-info-top">
      <view class="card-top">
        <view class="card-title">原物流信息</view>
      </view>
      <view class="card-content">
        <popupSelectItemVue
          defaultLabel="物流单号"
          name="物流单号"
          title="物流单号"
          :styles="{ color: '#999999' }"
          :style="{ 'border-bottom': '2rpx solid #e5e5e5' }"
        >
          <view class="upop" slot="right">
            <view class="select-item_txt">YT125678765432345678</view>
          </view>
        </popupSelectItemVue>
        <popupSelectItemVue
          defaultLabel="请选择物流公司"
          name="物流公司"
          title="物流公司"
          :styles="{ color: '#999999' }"
        >
          <view class="upop" slot="right">
            <view class="select-item_txt">圆通快递</view>
          </view>
        </popupSelectItemVue>
      </view>
    </view>
    <view class="card-info-bottom">
      <view class="card-top">
        <view class="card-title">变更物流信息</view>
      </view>
      <view class="card-content">
        <fillLogisticsInfoVue
          :isShowTitle="false"
          class="custom_padding"
        ></fillLogisticsInfoVue>
      </view>
    </view>
  </view>
</template>

<script>
import { toQueryString } from "@/utils/index.js";
import popupSelectItemVue from "../popupSelectItem/popupSelectItem.vue";
import fillLogisticsInfoVue from "../fillLogisticsInfo.vue";
//待收货---【送货】----变更物流信息
export default {
  components: {
    popupSelectItemVue,
    fillLogisticsInfoVue
  },
  props: {
    borderRadius: {
      type: String,
      default: "16rpx"
    }
  },
  data() {
    return {
      deliveryMan: "请选择送货人信息",
      indexs: "",
      status: "",
      order_id: "", //订单ID
      goodsCustomType: "sendGoods"
    };
  },
  onLoad(e) {
    this.order_id = e.order_id;
    this.indexs = e.indexs;
    this.status = e.status;
    this.goodsCustomType = e.goodsCustomType;
  },
  methods: {
    selectUserInfo() {
      console.log("选择用户信息");
      const urlParams = {
        status: this.status,
        index: this.indexs,
        goodsCustomType: this.goodsCustomType,
        order_id: this.order_id
      };
      const url = toQueryString(urlParams);
      console.log(url);
      uni.redirectTo({
        url: `./deliveryman?${url}`
      });
    }
  }
};
</script>

<style lang="scss" scoped>
.custom_padding {
  padding: 0 !important;
}
.card-info-wrapper {
  //   min-height: 345rpx;
  background: #ffffff;
  padding: 32rpx 32rpx 5rpx;
  .card-info-top {
    color: #e5e5e5;
    border-bottom: 2rpx solid #e5e5e5;
    .card-top {
      font-family: PingFangSC, PingFang SC;
      font-weight: 500;
      font-size: 30rpx;
      color: #999999;
    }
  }
  .upop {
    display: flex;
    width: 100%;
    align-items: center;
    justify-content: flex-end;
    image {
      width: 30rpx;
      height: 30rpx;
      margin-left: 5rpx;
    }
    .image-box {
      width: 40rpx;
      height: 38rpx;
    }
    .select-item_txt,
    .deliveryMan {
      flex: 1;
      font-family: PingFangSC, PingFang SC;
      font-weight: 400;
      font-size: 28rpx;
      color: #999999;
    }
  }
  .card-info-bottom {
    margin-top: 36rpx;
    .card-title {
      font-weight: 600;
      font-size: 30rpx;
      color: #333333;
    }
  }
}
</style>
