Initial commit

This commit is contained in:
sjk
2025-11-17 13:32:54 +08:00
commit e788eab6eb
1659 changed files with 171560 additions and 0 deletions

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,17 @@
{
"navigationBarTitleText": "订单详情",
"usingComponents": {
"t-pull-down-refresh": "tdesign-miniprogram/pull-down-refresh/pull-down-refresh",
"t-button": "tdesign-miniprogram/button/button",
"t-cell": "tdesign-miniprogram/cell/cell",
"t-icon": "tdesign-miniprogram/icon/icon",
"t-image": "/components/webp-image/index",
"t-count-down": "tdesign-miniprogram/count-down/count-down",
"t-toast": "tdesign-miniprogram/toast/toast",
"t-dialog": "tdesign-miniprogram/dialog/dialog",
"price": "/components/price/index",
"order-card": "../components/order-card/index",
"order-goods-card": "../components/order-goods-card/index",
"order-button-bar": "../components/order-button-bar/index"
}
}

View File

@@ -0,0 +1,171 @@
<t-pull-down-refresh id="t-pull-down-refresh" bindrefresh="onPullDownRefresh_" t-class-indicator="t-class-indicator">
<!-- 页面内容 -->
<view class="order-detail">
<view class="header">
<view class="order-detail__header">
<view class="title">{{_order.statusDesc}}</view>
<view class="desc">
<block wx:if="{{ order.holdStatus === 1 }}">
<block wx:if="{{ order.groupInfoVo.residueTime > 0 }}">
拼团剩余
<t-count-down
time="{{order.groupInfoVo.residueTime}}"
format="HH小时mm分ss秒"
t-class="count-down"
bindfinish="onCountDownFinish"
/>
<view>过时自动取消</view>
</block>
</block>
<block wx:elif="{{countDownTime === null}}">{{order.orderStatusRemark || ''}}</block>
<block wx:elif="{{countDownTime > 0}}">
<t-count-down
time="{{countDownTime}}"
format="HH小时mm分ss秒"
t-class="count-down"
bindfinish="onCountDownFinish"
/>
支付,过时订单将会取消
</block>
<block wx:else>超时未支付</block>
</view>
</view>
<!-- 物流 -->
<view class="order-logistics" wx:if="{{logisticsNodes && logisticsNodes.length > 0}}" bindtap="onDeliveryClick">
<t-icon name="deliver" size="40rpx" class="logistics-icon" prefix="wr" />
<view class="logistics-content">
<view>{{logisticsNodes[0] && logisticsNodes[0].desc || ''}}</view>
<view class="logistics-time">{{logisticsNodes[0] && logisticsNodes[0].date || ''}}</view>
</view>
<t-icon class="logistics-back" name="arrow_forward" size="36rpx" prefix="wr" />
</view>
<view class="border-bottom" wx:if="{{logisticsNodes && logisticsNodes.length > 0}}" />
<!-- 收货地址 -->
<view class="order-logistics">
<t-icon name="location" size="40rpx" class="logistics-icon" prefix="wr" />
<view class="logistics-content">
<view>{{(order.logisticsVO && order.logisticsVO.receiverName) || '收货人'}} {{(order.logisticsVO && order.logisticsVO.receiverPhone) || ''}}</view>
<view class="logistics-time">{{_order.receiverAddress || '收货地址'}}</view>
</view>
<view wx:if="{{addressEditable}}" class="edit-text" bindtap="onEditAddressTap"> 修改 </view>
</view>
</view>
<!-- 店铺及商品 -->
<order-card order="{{_order}}" use-top-right-slot>
<order-goods-card
wx:for="{{_order.goodsList}}"
wx:key="id"
wx:for-item="goods"
wx:for-index="gIndex"
goods="{{goods}}"
no-top-line="{{gIndex === 0}}"
bindtap="onGoodsCardTap"
data-index="{{gIndex}}"
>
<order-button-bar
slot="append-card"
class="goods-button-bar"
order="{{_order}}"
bindrefresh="onRefresh"
goodsIndex="{{gIndex}}"
/>
</order-goods-card>
<view class="pay-detail">
<view class="pay-item">
<text>商品总额</text>
<price fill decimalSmaller priceUnit="yuan" wr-class="pay-item__right font-bold" price="{{order.totalAmount || '0'}}" />
</view>
<view class="pay-item">
<text>运费</text>
<view class="pay-item__right font-bold">
<block wx:if="{{order.freightFee}}">
+
<price fill decimalSmaller priceUnit="yuan" price="{{order.freightFee}}" />
</block>
<text wx:else>免运费</text>
</view>
</view>
<view class="pay-item">
<text>活动优惠</text>
<view class="pay-item__right primary font-bold">
-
<price fill priceUnit="yuan" price="{{order.discountAmount || 0}}" />
</view>
</view>
<view class="pay-item">
<text>优惠券</text>
<view class="pay-item__right" catchtap="onOpenCoupons">
<block wx:if="{{order.couponAmount && order.couponAmount != '0.00' && order.couponAmount > 0}}">
-
<price fill decimalSmaller priceUnit="yuan" price="{{order.couponAmount}}" />
</block>
<text wx:else>无可用</text>
<!-- <t-icon name="chevron-right" size="32rpx" color="#BBBBBB" /> -->
</view>
</view>
<view class="pay-item">
<text>{{isPaid ? '实付' : '应付'}}</text>
<price
fill
decimalSmaller
priceUnit="yuan"
wr-class="pay-item__right font-bold primary max-size"
price="{{order.paymentAmount || '0'}}"
/>
</view>
</view>
</order-card>
<view class="pay-detail padding-inline">
<view class="pay-item">
<text>订单编号</text>
<view class="pay-item__right" bindtap="onOrderNumCopy">
<text class="order-no">{{order.orderNo}}</text>
<view class="pay-item__right__copy">复制</view>
</view>
</view>
<view class="pay-item">
<text>下单时间</text>
<view class="pay-item__right">
<text class="order-no normal-color">{{formatCreateTime}}</text>
</view>
</view>
<view class="border-bottom border-bottom-margin" />
<view class="pay-item">
<text>发票</text>
<view class="pay-item__right" bindtap="onOrderInvoiceView">
<text class="order-no normal-color">{{invoiceType}}</text>
<view class="pay-item__right__copy">查看</view>
</view>
</view>
<view class="pay-item">
<text>备注</text>
<view class="pay-item__right">
<text class="order-no normal-color">{{order.remark || '-'}}</text>
</view>
</view>
<view class="border-bottom border-bottom-margin" />
<view class="pay-service" wx:if="{{storeDetail && storeDetail.storeTel}}" catch:tap="clickService">
<t-icon name="service" size="40rpx" />
<text decode="{{true}}">&nbsp;联系客服</text>
</view>
</view>
</view>
<!-- 底部操作栏 -->
<view class="order-detail__bottom-bar" wx:if="{{order.buttonVOs && order.buttonVOs.length > 0}}">
<view class="order-detail__bottom-bar-content">
<view
wx:for="{{order.buttonVOs}}"
wx:key="type"
class="order-detail__bottom-bar-btn {{item.primary ? 'primary' : 'secondary'}}"
data-type="{{item.type}}"
bindtap="onOrderButtonTap"
>
{{item.name}}
</view>
</view>
</view>
</t-pull-down-refresh>
<t-toast id="t-toast" />
<t-dialog id="t-dialog" />

View File

@@ -0,0 +1,250 @@
:host {
background-color: #f8f8f8;
}
.order-detail {
width: 100%;
box-sizing: border-box;
padding: 0rpx 0rpx calc(env(safe-area-inset-bottom) + 144rpx);
}
.order-detail .count-down {
color: #ffffff;
}
.order-detail .header {
width: 100%;
background-color: #ffffff;
}
.order-detail .order-detail__header {
width: 700rpx;
height: 200rpx;
border-radius: 24rpx;
margin: 0 auto;
overflow: hidden;
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
background-image: url('https://tdesign.gtimg.com/miniprogram/template/retail/template/order-bg.png');
background-repeat: no-repeat;
background-size: contain;
}
.order-detail .order-detail__header .title,
.order-detail .order-detail__header .desc {
color: #ffffff;
overflow: hidden;
display: -webkit-box;
-webkit-box-orient: vertical;
}
.order-detail .order-detail__header .title {
-webkit-line-clamp: 1;
font-size: 44rpx;
line-height: 64rpx;
margin-bottom: 8rpx;
font-weight: bold;
}
.order-detail .order-detail__header .desc {
-webkit-line-clamp: 2;
font-size: 24rpx;
line-height: 32rpx;
}
.order-detail .order-detail__header .desc .count-down {
display: inline;
}
.order-detail .order-logistics {
box-sizing: border-box;
padding: 32rpx;
width: 100%;
background-color: #ffffff;
overflow: hidden;
color: #333333;
font-size: 32rpx;
line-height: 48rpx;
display: flex;
position: relative;
}
.order-logistics .logistics-icon {
width: 40rpx;
height: 40rpx;
margin-right: 16rpx;
margin-top: 4rpx;
}
.order-logistics .logistics-content {
flex: 1;
}
.order-logistics .logistics-content .logistics-time {
font-size: 28rpx;
line-height: 40rpx;
color: #999999;
margin-top: 12rpx;
}
.order-logistics .logistics-back {
color: #999999;
align-self: center;
}
.order-logistics .edit-text {
color: #fa4126;
font-size: 26rpx;
line-height: 36rpx;
}
.order-detail .border-bottom {
margin: 0 auto;
width: 686rpx;
transform: scaleY(0.5);
height: 2rpx;
background-color: #e5e5e5;
}
.order-detail .border-bottom-margin {
margin: 16rpx auto;
}
.order-detail .pay-detail {
background-color: #ffffff;
width: 100%;
box-sizing: border-box;
}
.order-detail .padding-inline {
padding: 16rpx 32rpx;
}
.order-detail .pay-detail .pay-item {
width: 100%;
height: 72rpx;
display: flex;
align-items: center;
justify-content: space-between;
font-size: 26rpx;
line-height: 36rpx;
color: #666666;
background-color: #ffffff;
}
.order-detail .pay-detail .pay-item .pay-item__right {
color: #333333;
font-size: 24rpx;
display: flex;
align-items: center;
justify-content: flex-end;
max-width: 400rpx;
}
.order-detail .pay-detail .pay-item .pay-item__right .pay-remark {
display: -webkit-box;
-webkit-box-orient: vertical;
-webkit-line-clamp: 2;
max-width: 400rpx;
text-overflow: ellipsis;
overflow: hidden;
}
.order-detail .pay-detail .pay-item .font-bold {
font-weight: bold;
}
.order-detail .pay-detail .pay-item .primary {
color: #fa4126;
}
.order-detail .pay-detail .pay-item .max-size {
font-size: 36rpx;
line-height: 48rpx;
}
.pay-item .pay-item__right .pay-item__right__copy {
width: 80rpx;
height: 40rpx;
text-align: center;
font-size: 24rpx;
line-height: 40rpx;
color: #333333;
position: relative;
}
.pay-item .pay-item__right .pay-item__right__copy::before {
position: absolute;
content: '';
width: 200%;
height: 200%;
border-radius: 40rpx;
border: 2rpx solid #dddddd;
transform: scale(0.5);
left: 0;
top: 0;
transform-origin: left top;
}
.pay-item .pay-item__right .order-no {
color: #333333;
font-size: 26rpx;
line-height: 40rpx;
padding-right: 16rpx;
}
.pay-item .pay-item__right .normal-color {
color: #333333;
}
.order-detail .pay-detail .pay-service {
width: 100%;
height: 72rpx;
display: flex;
align-items: center;
justify-content: center;
font-size: 32rpx;
line-height: 36rpx;
color: #333333;
background-color: #ffffff;
}
/* 底部操作栏样式 */
.order-detail__bottom-bar {
position: fixed;
bottom: 0;
left: 0;
right: 0;
background-color: #ffffff;
border-top: 1rpx solid #e5e5e5;
padding: 24rpx 32rpx;
padding-bottom: calc(24rpx + env(safe-area-inset-bottom));
z-index: 100;
}
.order-detail__bottom-bar-content {
display: flex;
justify-content: flex-end;
gap: 24rpx;
}
.order-detail__bottom-bar-btn {
padding: 16rpx 32rpx;
border-radius: 8rpx;
font-size: 28rpx;
line-height: 40rpx;
text-align: center;
min-width: 120rpx;
box-sizing: border-box;
transition: all 0.3s ease;
}
.order-detail__bottom-bar-btn.secondary {
background-color: #f8f8f8;
color: #666666;
border: 1rpx solid #e5e5e5;
}
.order-detail__bottom-bar-btn.secondary:active {
background-color: #e5e5e5;
}
.order-detail__bottom-bar-btn.primary {
background-color: #fa4126;
color: #ffffff;
border: 1rpx solid #fa4126;
}
.order-detail__bottom-bar-btn.primary:active {
background-color: #e63a22;
}