feat:商品卡片添加配送方式,支付添加货到付款
This commit is contained in:
+20
-12
@@ -1,11 +1,15 @@
|
||||
<template>
|
||||
<s-layout title="确认订单">
|
||||
<view class="bg-white address-box ss-m-b-14 ss-r-b-20" @tap="onSelectAddress">
|
||||
<view
|
||||
class="bg-white address-box ss-m-b-14 ss-r-b-10"
|
||||
@tap="onSelectAddress"
|
||||
v-if="state.orderInfo.need_address === 1"
|
||||
>
|
||||
<s-address-item :item="state.addressInfo" :hasBorderBottom="false">
|
||||
<view class="ss-rest-button"><text class="_icon-forward"></text></view>
|
||||
</s-address-item>
|
||||
</view>
|
||||
<view class="bg-white order-card-box ss-m-b-14">
|
||||
<view class="order-card-box ss-m-b-14">
|
||||
<s-goods-item
|
||||
v-for="item in state.orderInfo.goods_list"
|
||||
:key="item.goods_id"
|
||||
@@ -14,15 +18,19 @@
|
||||
:skuText="item.current_sku_price?.goods_sku_text"
|
||||
:price="item.current_sku_price.price"
|
||||
:num="item.goods_num"
|
||||
></s-goods-item>
|
||||
marginBottom="10"
|
||||
>
|
||||
<template #top>
|
||||
<view class="order-item ss-flex ss-col-center ss-row-between ss-p-x-20 bg-white">
|
||||
<view class="item-title">配送方式</view>
|
||||
<view class="ss-flex ss-col-center">
|
||||
<text class="item-value">{{ item.dispatch_type_text }}</text>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
</s-goods-item>
|
||||
|
||||
<view class="order-item ss-flex ss-col-center ss-row-between ss-p-x-20">
|
||||
<view class="item-title">配送方式</view>
|
||||
<view class="ss-flex ss-col-center">
|
||||
<text class="item-value">物流快递</text>
|
||||
</view>
|
||||
</view>
|
||||
<view class="order-item ss-flex ss-col-center ss-row-between ss-p-x-20">
|
||||
<view class="order-item ss-flex ss-col-center ss-row-between ss-p-x-20 bg-white ss-r-10">
|
||||
<view class="item-title">订单备注</view>
|
||||
<view class="ss-flex ss-col-center">
|
||||
<uni-easyinput
|
||||
@@ -36,7 +44,7 @@
|
||||
</view>
|
||||
</view>
|
||||
<!-- 合计 -->
|
||||
<view class="bg-white total-card-box ss-p-20 ss-m-b-14">
|
||||
<view class="bg-white total-card-box ss-p-20 ss-m-b-14 ss-r-10">
|
||||
<view class="total-box-content border-bottom">
|
||||
<view class="order-item ss-flex ss-col-center ss-row-between">
|
||||
<view class="item-title">商品金额</view>
|
||||
@@ -225,7 +233,7 @@
|
||||
|
||||
// 提交订单/立即兑换
|
||||
function onConfirm() {
|
||||
if (!state.orderPayload.address_id) {
|
||||
if (!state.orderPayload.address_id && state.orderInfo.need_address === 1) {
|
||||
sheep.$helper.toast('请选择收货地址');
|
||||
return;
|
||||
}
|
||||
|
||||
+26
-8
@@ -49,17 +49,17 @@
|
||||
</view>
|
||||
|
||||
<!-- 收货地址 -->
|
||||
<view class="order-address-box">
|
||||
<view class="order-address-box" v-if="state.orderInfo.address">
|
||||
<view class="ss-flex ss-col-center">
|
||||
<text class="address-username">
|
||||
{{ state.orderInfo.address?.consignee }}
|
||||
{{ state.orderInfo.address.consignee }}
|
||||
</text>
|
||||
<text class="address-phone">{{ state.orderInfo.address?.mobile }}</text>
|
||||
<text class="address-phone">{{ state.orderInfo.address.mobile }}</text>
|
||||
</view>
|
||||
<view class="address-detail">{{ addressText }}</view>
|
||||
</view>
|
||||
|
||||
<view class="detail-goods">
|
||||
<view class="detail-goods" :style="[{ marginTop: state.orderInfo.address ? '0' : '-40rpx' }]">
|
||||
<!-- 订单信息 -->
|
||||
<view class="order-list" v-for="item in state.orderInfo.items" :key="item.goods_id">
|
||||
<view class="order-card">
|
||||
@@ -72,6 +72,14 @@
|
||||
:score="state.orderInfo.score_amount"
|
||||
:num="item.goods_num"
|
||||
>
|
||||
<template #top>
|
||||
<view class="order-item ss-flex ss-col-center ss-row-between ss-p-x-20 bg-white">
|
||||
<view class="item-title">配送方式</view>
|
||||
<view class="ss-flex ss-col-center">
|
||||
<text class="item-value">{{ item.dispatch_type_text }}</text>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
<template #priceSuffix>
|
||||
<button class="ss-reset-button tag-btn" v-if="item.status_text">
|
||||
{{ item.status_text }}
|
||||
@@ -95,7 +103,7 @@
|
||||
<text class="title">下单时间:</text>
|
||||
<text class="detail">{{ state.orderInfo.create_time }}</text>
|
||||
</view>
|
||||
<view class="notice-item">
|
||||
<view class="notice-item" v-if="state.orderInfo.paid_time">
|
||||
<text class="title">支付时间:</text>
|
||||
<text class="detail">{{ state.orderInfo.paid_time || '-' }}</text>
|
||||
</view>
|
||||
@@ -140,17 +148,27 @@
|
||||
</view>
|
||||
<view class="notice-item all-rpice-item ss-flex ss-m-t-20">
|
||||
<text class="title">{{
|
||||
['unpaid', 'cancel', 'closed'].includes(state.orderInfo.status) ? '需付款' : '已付款'
|
||||
['unpaid', 'cancel', 'closed','pending'].includes(state.orderInfo.status) ? '需付款' : '已付款'
|
||||
}}</text>
|
||||
<text class="detail all-price" v-if="Number(state.orderInfo.pay_fee) > 0"
|
||||
>¥{{ state.orderInfo.pay_fee }}</text
|
||||
>
|
||||
<view
|
||||
v-if="state.orderInfo.score_amount && Number(state.orderInfo.pay_fee) > 0 && !['unpaid', 'cancel', 'closed'].includes(state.orderInfo.status)"
|
||||
v-if="
|
||||
state.orderInfo.score_amount &&
|
||||
Number(state.orderInfo.pay_fee) > 0 &&
|
||||
!['unpaid', 'cancel', 'closed'].includes(state.orderInfo.status)
|
||||
"
|
||||
class="detail all-price"
|
||||
>+</view
|
||||
>
|
||||
<view class="price-text ss-flex ss-col-center" v-if="state.orderInfo.score_amount && !['unpaid', 'cancel', 'closed'].includes(state.orderInfo.status)">
|
||||
<view
|
||||
class="price-text ss-flex ss-col-center"
|
||||
v-if="
|
||||
state.orderInfo.score_amount &&
|
||||
!['unpaid', 'cancel', 'closed'].includes(state.orderInfo.status)
|
||||
"
|
||||
>
|
||||
<image
|
||||
:src="sheep.$url.static('/static/img/shop/goods/score1.svg')"
|
||||
class="score-img"
|
||||
|
||||
Reference in New Issue
Block a user