sunshibo 4 тижнів тому
батько
коміт
bcc20401d9
1 змінених файлів з 7 додано та 4 видалено
  1. 7 4
      pages/orderInfo/orderDetail.vue

+ 7 - 4
pages/orderInfo/orderDetail.vue

@@ -104,8 +104,8 @@
       </view>
     </view>
 
-    <!-- 底部按钮 -->
-    <view class="bottom-button">
+    <!-- 底部按钮:已完成(3)不显示 -->
+    <view v-if="orderDetail.orderStatus !== 3" class="bottom-button">
       <view class="bottom-button-text1 " hover-class="hover-active" @click="handleConfirmOrder">去加餐</view>
       <view class="bottom-button-text" hover-class="hover-active" @click="handleConfirmPay">去结算</view>
     </view>
@@ -124,6 +124,7 @@ const payType = ref('confirmOrder'); // confirmOrder 确认下单 confirmPay 确
 const detailOrderId = ref('');
 
 // 订单详情(店铺、订单信息)
+// orderStatus:0 待支付,1 已支付,2 已取消,3 已完成
 const orderDetail = ref({
   storeName: '',
   storeAddress: '',
@@ -134,7 +135,8 @@ const orderDetail = ref({
   dinerCount: '',
   createTime: '',
   contactPhone: '',
-  remark: ''
+  remark: '',
+  orderStatus: null
 });
 
 // 价格明细(两位小数)
@@ -235,7 +237,8 @@ function applyOrderData(data) {
     dinerCount: raw?.dinerCount ?? '',
     createTime: raw?.createdTime ?? raw?.createTime ?? raw?.orderTime ?? '',
     contactPhone: raw?.contactPhone ?? raw?.phone ?? '',
-    remark: raw?.remark ?? ''
+    remark: raw?.remark ?? '',
+    orderStatus: raw?.orderStatus ?? raw?.status ?? null
   };
   const dishTotal = raw?.totalAmount ?? raw?.dishTotal ?? raw?.orderAmount ?? raw?.foodAmount ?? 0;
   const tablewareFee = raw?.tablewareFee ?? raw?.tablewareAmount ?? 0;