<template>
  <!-- #ifdef H5 -->
  <view class="all-container">
    <view class="bg"></view>
    <zj-page-layout
      :hasFooter="true"
      :isScroll="true"
      :refresherTriggered="refresherTriggered"
      @refresherrefresh="refresherrefresh">
      <view class="content-container">
        <view class="status-container">待支付</view>
        <view class="product-container card">
          <view class="title">
            <view class="left">产品信息</view>
            <view class="right">配件</view>
          </view>
          <view class="product">
            <view class="it">
              <view class="name">铜管铜管<text>×2</text></view>
              <view class="price">¥30.00</view>
            </view>
            <view class="it">
              <view class="name">铜管铜管铜管铜管铜管铜管铜管铜管铜管铜管铜管铜管铜管<text>×2</text></view>
              <view class="price">¥30.00</view>
            </view>
            <view class="total">
              <view class="text">合计：</view>
              <view class="price">¥60.00</view>
            </view>
          </view>
        </view>
        <view class="info-container card">
          <view class="title">申领信息</view>
          <view class="row">
            <view class="label">申请单号</view>
            <view class="value">JD123456789</view>
            <view class="tag">复制</view>
          </view>
          <view class="row">
            <view class="label">购买网点</view>
            <view class="value">JD123456789</view>
          </view>
          <view class="row">
            <view class="label">出库类型</view>
            <view class="value">JD123456789</view>
          </view>
          <view class="row">
            <view class="label">出库图片</view>
            <view class="value">JD123456789</view>
          </view>
          <view class="row">
            <view class="label">出库总价</view>
            <view class="value price">¥88.00</view>
          </view>
          <view class="row">
            <view class="label">备注信息</view>
            <view class="value">JD123456789</view>
          </view>
          <view class="row">
            <view class="label">申领人员</view>
            <view class="value">JD123456789</view>
          </view>
          <view class="row">
            <view class="label">制单时间</view>
            <view class="value">JD123456789</view>
          </view>
        </view>
      </view>
      <template slot="footer">
        <view class="bottom-container">
          <view class="left">
            <u-button text="重查"></u-button>
          </view>
          <view class="right">
            <u-button text="取消订单"></u-button>
            <u-button type="primary" text="立即支付"></u-button>
          </view>
        </view>
      </template>
    </zj-page-layout>
  </view>
  <!-- #endif -->

  <!-- #ifndef H5 -->
  <web-view :src="webViewHref(`/packageMaterial/pages/stock/orderDetail`, pam, crossPagePam)" @message="crossPage.$listener"></web-view>
  <!-- #endif -->
</template>

<script>
  // #ifdef H5
  export default {
    data() {
      return {
        refresherTriggered: false,
      }
    },

    onLoad() {
      // this.getDetail();
    },

    methods: {
      getDetail() {
        this.$api.get('xxxxx', {
          a: 1
        }).then(res => {

        })
      },

      // 下拉刷新
      refresherrefresh() {

      },
    },
  }

  // #endif
  // #ifndef H5
  export default {
    data() {
      return {
        pam: {},
      }
    },
    onLoad(pam) {
      this.pam = pam;
    }
  }
  // #endif
</script>

<style lang="scss" scoped>
.all-container {
  position: relative;
}
.bg {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 300rpx;
  background: linear-gradient(179.48deg, rgba(200,224,251,1) 0.45%,rgba(247,247,247,1) 98.96%);
}
.card {
  @include zj-card;
  margin-top: 30rpx;
  padding: 30rpx;
  .title {
    font-size: 32rpx;
    font-weight: 600;
  }
}
.content-container {
  padding: 20rpx;
}
.status-container {
  font-size: 36rpx;
  font-weight: 500;
  margin-left: 30rpx;
  text {
    margin-left: 12rpx;
  }
}
.product-container {
  .title {
    display: flex;
    align-items: center;
    justify-content: space-between;
    .left {
      font-size: 32rpx;
      font-weight: 600;
    }
    .right {
      font-size: 28rpx;
      color: $theme-color;
    }
  }
  .product {
    background: #f5f5f5;
    border-radius: 12rpx;
    padding: 20rpx;
    margin-top: 20rpx;
    .it {
      display: flex;
      align-items: flex-end;
      margin-bottom: 20rpx;
      .name {
        flex: 1;
        font-size: 28rpx;
        font-weight: 500;
        text {
          color: $sec-font;
          margin-left: 12rpx;
          font-weight: normal;
        }
      }
      .price {
        margin-left: 30rpx;
        font-size: 28rpx;
        font-weight: 500;
      }
    }
    .total {
      display: flex;
      align-items: center;
      justify-content: flex-end;
      margin-top: 30rpx;
      .text {
        font-size: 28rpx;
        color: $sec-font;
      }
      .price {
        font-size: 28rpx;
        color: $minor-color;
        font-weight: 500;
      }
    }
  }
}
.info-container {
  .row {
    display: flex;
    align-items: center;
    margin-top: 20rpx;
    .label {
      font-size: 28rpx;
      color: $sec-font;
      margin-right: 20rpx;
    }
    .value {
      flex: 1;
      font-size: 28rpx;
      text {
        color: $minor-color;
      }
      &.price {
        color: $theme-color;
      }
    }
    .tag {
      font-size: 28rpx;
      color: $theme-color;
    }
  }
}
.bottom-container {
  padding: 20rpx;
  display: flex;
  justify-content: space-between;
  .right {
    display: flex;
    ::v-deep .u-button {
      margin-left: 20rpx;
    }
  }
}
</style>
