<script setup lang="ts">
import router from '@/router'

defineProps<{
  orderList: Api.xsbOrderList[]
  subPackOrder: any
}>()
</script>

<template>
  <view class="">
    <view v-for="item in orderList" :key="item.orderNumber" class="mt-20rpx mt20rpx rounded-16rpx bg-#FFF p-24rpx" @click="router.push({ name: 'charge-order-detail' })">
      <view class="flex items-center justify-between">
        <view>
          <view class="text-28rpx font-bold">
            {{ item.shopName }}
          </view>
          <view class="mt-20rpx text-24rpx text-#AAA">
            订单时间：{{ item.createTime || '未知' }}
          </view>
          <view class="mt-20rpx text-24rpx text-#AAA">
            终端名称：{{ item.orderItemList?.[0]?.goodsName || '未知' }}
          </view>
        </view>
        <view class="text-28rpx text-#4EDC86">
          {{ subPackOrder?.handleCommonOrderStatusText(item) }}
        </view>
      </view>
      <view class="my-20rpx h-2rpx w-full bg-#F0F0F0" />
      <view class="flex items-center justify-between">
        <view class="text-28rpx">
          充电费用：
        </view>
        <view class="text-32rpx text-#FF6464 font-800">
          <text class="text-18rpx">
            ￥
          </text>
          {{ item.actualTotal }}
        </view>
      </view>
    </view>
  </view>
</template>

<style lang="scss" scoped></style>
