<template>
  <view class="c-card">
    <view class="top">
      <view class="left">
        <view>上海奉贤两网融合（大磅）</view>
        <view>重一</view>
      </view>
      <view>
        <text class="btn" @click="handleScenePhoto()">现场照片</text>
      </view>
    </view>
    <view class="content">
      <view class="baseinfo">
        <view class="time"> 过磅时间：2023-09-01 13:23:33 </view>
        <view class="person">
          <view>定价人：谭兵</view>
          <view>审核人：谭兵</view>
        </view>
      </view>
      <view style="padding: 30rpx 0rpx">
        <view> <text>收货单号：</text><text> SHD20230901132333 </text></view>
        <view class="box">
          <view v-for="(item, index) in gridList1" :key="index">
            <text v-if="item.name">{{ item.name }}：</text
            ><text
              >{{ item.isBefore ? item.unit : "" }}
              {{ item.num }}
              {{ item.isBefore ? "" : item.unit }}
            </text>
          </view>
        </view>
      </view>
    </view>
  </view>
</template>
<script setup lang="ts">
const gridList1 = reactive([
  {
    name: "毛重",
    num: "4080.00",
    unit: "KG",
    isBefore: false,
  },
  {
    name: "皮重",
    num: "3450.00",
    unit: "KG",
    isBefore: false,
  },
  {
    name: "扣杂",
    num: "0.00",
    unit: "KG",
    isBefore: false,
  },
  {
    name: "",
    num: "",
    unit: "",
  },
  {
    name: "净重",
    num: "640.00",
    unit: "KG",
    isBefore: false,
  },
  {
    name: "单价",
    num: "2.48",
    unit: "元/kg",
    isBefore: false,
  },
  {
    name: "预估总价",
    num: "1587.00",
    unit: "元",
    isBefore: false,
  },
  {
    name: "货款金额",
    num: "1587.00",
    unit: "元",
    isBefore: false,
  },
  {
    name: "付款状态",
    num: "未支付",
    isBefore: false,
  },
  {
    name: "应付金额",
    num: "1587.00",
    unit: "元",
    isBefore: false,
  },
]);
const handleScenePhoto = () => {
  uni.navigateTo({
    url: "/pages/scenePhoto/index", // 要跳转到的页面路径
  });
};
</script>
<style lang="scss" scoped>
.c-card {
  margin: 30rpx 25rpx;
  background: #ffffff;
  box-shadow: 0rpx 0rpx 10rpx 0rpx rgba(5, 68, 37, 0.12);
  border-radius: 13rpx;
  font-family: Source Han Sans CN;
  font-weight: 400;
  font-size: 24rpx;
  color: #000000;
  .top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 30rpx;
    border-bottom: 18rpx solid #f8f8f8;
    .left {
      view {
        line-height: 40rpx;
        &:nth-child(2) {
          color: rgba(236, 15, 62, 1);
          font-weight: 400;
          font-size: 27rpx;
        }
      }
    }
    .btn {
      border-radius: 24rpx;
      border: 1px solid #00dcee;
      padding: 10rpx 30rpx;
      font-weight: 500;
      font-size: 24rpx;
      color: #00dcee;
      line-height: 41rpx;
    }
  }

  .content {
    margin: 30rpx;
    .baseinfo {
      .time {
        font-family: Source Han Sans CN;
        font-weight: 400;
        font-size: 21rpx;
        color: #999999;
        line-height: 40rpx;
      }
      .person {
        display: flex;
        justify-content: space-between;
        font-weight: 400;
        font-size: 24rpx;
        color: #999999;
        line-height: 40rpx;
      }
    }
    .box {
      display: grid;
      grid-template-columns: repeat(2, 1fr);
      flex: 1;
      > view {
        line-height: 50rpx;
      }
    }
  }
}
</style>
