| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199 |
- <template>
- <view class="item">
- <view @click="goOrderDetails(order.orderId)">
- <view class="title acea-row row-between-wrapper">
- <view class="acea-row row-middle">
- <text
- class="sign cart-color acea-row row-center-wrapper"
- v-if="
- order.activityType !== '普通' && order.activityType !== '核销'
- "
- >{{ order.activityType }}</text
- >
- <view>{{ order.createTime }}</view>
- </view>
- <view class="font-color">{{ order.orderStatus }}</view>
- </view>
- <view
- class="item-info acea-row row-between row-top"
- v-for="(items, idx) in order.orderInfoList"
- :key="idx"
- >
- <view class="pictrue">
- <image :src="items.image"></image>
- </view>
- <view class="text">
- <view class="name line2">{{ items.storeName }}</view>
- <view class="money">
- <view v-if="mallType === 0">¥{{ items.storePrice || 0 }}</view>
- <view>x{{ items.cartNum }}</view>
- </view>
- </view>
- </view>
- <view class="totalPrice"
- >共{{ order.totalNum }}件商品,总金额
- <text class="money font-color" v-if="mallType === 0">¥{{ order.payPrice }}</text>
- <text class="money font-color" v-else>{{ order.useIntegral }}贝币</text>
- </view>
- </view>
- <view class="bottom acea-row row-right row-middle" v-if="mallType === '0'">
- <view class="bnt cancelBnt" v-if="!order.paid" @click.stop="cancelOrder"
- >取消订单</view
- >
- <view class="bnt bg-color" v-if="!order.paid" @click.stop="goPay"
- >立即付款</view
- >
- <view
- class="bnt bg-color"
- v-else-if="order.status == 0 || order.status == 1 || order.status == 3"
- @click.stop="goOrderDetails(order.orderId)"
- >查看详情</view
- >
- <view
- class="bnt bg-color"
- v-else-if="order.status == 2"
- @click.stop="goOrderDetails(order.orderId)"
- >去评价</view
- >
- <view
- class="bnt cancelBnt"
- v-if="order.status == 3"
- @click.stop="delOrder"
- >删除订单</view
- >
- </view>
- </view>
- </template>
- <script setup>
- const props = defineProps({
- order: Object,
- index: Number,
- mallType: {
- type: Number,
- default: 0,
- }, // 0: 水贝商城 1: 贝币商城
- });
- const emit = defineEmits([
- "cancelOrder",
- "goPay",
- "goOrderDetails",
- "delOrder",
- ]);
- function cancelOrder() {
- emit("cancelOrder", props.index, props.order.id);
- }
- function goPay() {
- emit("goPay", props.order.payPrice, props.order.orderId);
- }
- function goOrderDetails(orderId) {
- emit("goOrderDetails", orderId);
- }
- function delOrder() {
- emit("delOrder", props.order.id, props.index);
- }
- </script>
- <style scoped lang="scss">
- .item {
- background-color: #fff;
- border-radius: 14rpx;
- margin-bottom: 14rpx;
- .title {
- height: 84rpx;
- padding: 0 24rpx;
- border-bottom: 1rpx solid #eee;
- font-size: 28rpx;
- color: #282828;
- .sign {
- font-size: 24rpx;
- padding: 0 13rpx;
- height: 36rpx;
- margin-right: 15rpx;
- border-radius: 18rpx;
- }
- }
- .item-info {
- padding: 0 24rpx;
- margin-top: 22rpx;
- .pictrue {
- width: 120rpx;
- height: 120rpx;
- image {
- width: 100%;
- height: 100%;
- border-radius: 14rpx;
- }
- }
- .text {
- flex: 1;
- // width: 500rpx;
- font-size: 28rpx;
- color: #999;
- display: flex;
- justify-content: space-between;
- flex-wrap: nowrap;
- padding: 0 0 0 20rpx;
- .name {
- width: 350rpx;
- color: #282828;
- }
- .money {
- text-align: right;
- white-space: nowrap;
- text {
- white-space: nowrap;
- }
- }
- }
- }
- .totalPrice {
- font-size: 26rpx;
- color: #282828;
- text-align: right;
- margin: 27rpx 0 0 30rpx;
- padding: 0 30rpx 30rpx 0;
- border-bottom: 1rpx solid #eee;
- .money {
- font-size: 28rpx;
- font-weight: bold;
- }
- }
- .bottom {
- height: 107rpx;
- padding: 0 30rpx;
- .bnt {
- width: 176rpx;
- height: 60rpx;
- text-align: center;
- line-height: 60rpx;
- color: #fff;
- border-radius: 50rpx;
- font-size: 27rpx;
- &.cancelBnt {
- border: 1rpx solid #ddd;
- color: #aaa;
- }
- & ~ .bnt {
- margin-left: 17rpx;
- }
- }
- }
- }
- </style>
|