张田田 2 tygodni temu
rodzic
commit
24b2dc6fe8

+ 13 - 14
miniprogram/module/health/pages/scheme/scheme.scss

@@ -209,31 +209,30 @@
   left: 0;
   right: 0;
   width: 100%;
-  min-height: 98rpx;
-  // background: linear-gradient(90deg, #1d6ff6 0%, #4a90ff 100%);
-  background: white;
+  background: #fff;
   display: flex;
   align-items: center;
-  justify-content: flex-end;
+  justify-content: center;
   z-index: 100;
-  box-shadow: 0 -4rpx 20rpx rgba(29, 111, 246, 0.2);
+  box-shadow: 0 -2rpx 12rpx rgba(0, 0, 0, 0.06);
   box-sizing: border-box;
-  padding-top: 24rpx;
-  padding-right: 32rpx;
-  
+  padding: 20rpx 32rpx 32rpx;
+
   .buy-btn-text {
-    color: #ffffff;
+    width: 100%;
+    height: 88rpx;
+    line-height: 88rpx;
+    color: #fff;
     font-size: 30rpx;
+    font-weight: 600;
     letter-spacing: 2rpx;
-    line-height: 1.2;
     text-align: center;
-    background: #1d6ff6;
-    padding: 10px 30px;
-    border-radius: 5px;
+    background: linear-gradient(135deg, #2f6df6 0%, #1f5de8 100%);
+    border-radius: 44rpx;
   }
 }
 
-// 底部占位,避免内容被按钮遮盖(98rpx按钮高度 + 安全区域)
+// 底部占位,避免内容被按钮遮盖
 .scheme-bottom-placeholder {
   height: 150rpx;
   width: 100%;

+ 1 - 1
miniprogram/module/health/pages/scheme/scheme.wxml

@@ -47,7 +47,7 @@
   </scroll-view>
   
   <!-- 底部固定去购买按钮 -->
-  <view class="scheme-bottom-buy-btn" style="padding-bottom: {{container.safeBottomOffset-10}}px;" bindtap="goToProductPage" wx:if="{{true}}">
+  <view class="scheme-bottom-buy-btn" bindtap="goToProductPage" wx:if="{{true}}">
     <view class="buy-btn-text">{{i18n.orderText.goPay}}</view>
   </view>
 </view>

+ 7 - 6
miniprogram/module/order/components/after-sale-type-popup/after-sale-type-popup.scss

@@ -178,10 +178,10 @@
 }
 
 .after-sale-popup__footer {
-  padding: 6rpx 16rpx calc(-40rpx + env(safe-area-inset-bottom));
+  flex-shrink: 0;
+  padding: 20rpx 32rpx 32rpx;
   background: #fff;
-  border-top: none;
-  box-shadow: none;
+  box-shadow: 0 -2rpx 12rpx rgba(0, 0, 0, 0.06);
 }
 
 .after-sale-popup__next-btn {
@@ -193,13 +193,14 @@
   color: #fff;
   text-align: center;
   font-size: 30rpx;
-  font-weight: 500;
+  font-weight: 600;
+  letter-spacing: 2rpx;
   transition: transform 0.16s ease, opacity 0.16s ease;
 }
 
 .after-sale-popup__next-btn:active {
-  opacity: 0.92;
-  transform: scale(0.985);
+  opacity: 0.9;
+  transform: scale(0.98);
 }
 
 .title {

+ 3 - 1
miniprogram/module/order/components/refund-confirm-popup/refund-confirm-popup.scss

@@ -185,8 +185,10 @@
 }
 
 .refund-confirm-popup__footer {
+  flex-shrink: 0;
   background: #fff;
-  padding: 12rpx 18rpx calc(-60rpx + env(safe-area-inset-bottom));
+  padding: 20rpx 32rpx 32rpx;
+  box-shadow: 0 -2rpx 12rpx rgba(0, 0, 0, 0.06);
 }
 
 .refund-amount-line {

+ 3 - 1
miniprogram/module/order/components/refund-proof-popup/refund-proof-popup.scss

@@ -155,8 +155,10 @@
 }
 
 .proof-popup__footer {
-  padding: 6rpx 16rpx calc(-40rpx + env(safe-area-inset-bottom));
+  flex-shrink: 0;
+  padding: 20rpx 32rpx 32rpx;
   background: #fff;
+  box-shadow: 0 -2rpx 12rpx rgba(0, 0, 0, 0.06);
 }
 
 .done-btn {

+ 4 - 0
miniprogram/module/order/components/refund-proof-popup/refund-proof-popup.ts

@@ -86,6 +86,10 @@ Component({
     },
     onConfirm() {
       if (this.data.uploading) return;
+      if (!this.data.inputDesc.trim() && this.data.inputImages.length === 0) {
+        wx.showToast({ title: "请填写描述或上传凭证", icon: "none" });
+        return;
+      }
       this.triggerEvent("confirm", {
         desc: this.data.inputDesc,
         images: this.data.inputImages,

+ 1 - 1
miniprogram/module/order/components/refund-proof-popup/refund-proof-popup.wxml

@@ -9,7 +9,7 @@
 >
   <view class="proof-popup">
     <view class="proof-popup__header">
-      <view class="title">上传描述凭证</view>
+      <view class="title">上传描述凭证</view>
       <text class="proof-popup__close" catchtap="onClose">×</text>
       <view class="proof-popup__header-spacer" />
     </view>

+ 3 - 1
miniprogram/module/order/components/refund-reason-popup/refund-reason-popup.scss

@@ -53,8 +53,10 @@
 }
 
 .refund-reason-popup__footer {
-  padding: 6rpx 16rpx calc(-60rpx + env(safe-area-inset-bottom));
+  flex-shrink: 0;
+  padding: 20rpx 32rpx 32rpx;
   background: #fff;
+  box-shadow: 0 -2rpx 12rpx rgba(0, 0, 0, 0.06);
 }
 
 .refund-reason-popup__next-btn {

+ 4 - 0
miniprogram/module/order/pages/negotiation-history/negotiation-history.ts

@@ -22,6 +22,10 @@ Page({
           const content = item.aftersaleContent || {};
           const details: Array<{ label: string; value: string }> = [];
           if (content.receiptStatusStr) details.push({ label: '商品状态', value: content.receiptStatusStr });
+          const receiptMap: Record<string, string> = { '0': '待发货', '1': '已发货', '2': '已收货' };
+          if (content.receiptStatus !== undefined && content.receiptStatus !== null) {
+            details.push({ label: '收货状态', value: receiptMap[String(content.receiptStatus)] || '未知' });
+          }
           if (content.applyAmount) details.push({ label: '退款金额', value: `¥${content.applyAmount}` });
           if (content.reason) details.push({ label: '退款原因', value: content.reason });
           if (content.remark) details.push({ label: '退款说明', value: content.remark });

+ 10 - 4
miniprogram/module/order/pages/other-detail/other-detail.ts

@@ -187,6 +187,7 @@ Page({
               progress: item?.progress || '', //进度 0-进行中 1-已完成 2-未开始 3-已取消 这个字段用于线下服务商品以及线上权益商品的进度状态
               image: item.conditioningProgramPhoto || '',
               price: item?.unitPrice || 0,
+              totalPrice: item?.totalPrice || 0,
               quantity: item?.totalMeasure || 0,
               statusClass: this.getStatusClass(item?.sellType, item?.progress, item?.receiptStatus, item.expressStatus),
               statusText: this.getGoodsStatusText(item?.sellType, item?.progress, item?.receiptStatus, item.expressStatus),
@@ -306,14 +307,19 @@ Page({
         image: goods.image || '',
         name: goods.name,
         price: goods.price,
+        totalPrice: goods.totalPrice,
         meta1: goods.description || '',
         meta2: `x${goods.quantity}`,
         patientConditioningProgramId: goods.id || '',
         patientConditioningRecordId: goods.patientConditioningRecordId || '',
         sellType: goods.sellType || '',
       },
-      refundMaxAmount: goods.price || 0,
-      refundAmount: goods.price || 0,
+      refundMaxAmount: goods.totalPrice || 0,
+      refundAmount: goods.totalPrice || 0,
+      selectedAfterSaleType: "",
+      selectedRefundReason: "",
+      refundDesc: "",
+      refundProofImages: [],
       afterSalePopupVisible: true,
     });
   },
@@ -399,8 +405,8 @@ Page({
       wx.showToast({ title: "请选择退款原因", icon: "none" });
       return;
     }
-    if (!this.data.refundProofImages.length) {
-      wx.showToast({ title: "请上传凭证图片", icon: "none" });
+    if (!this.data.refundProofImages.length && !this.data.refundDesc.trim()) {
+      wx.showToast({ title: "请上传凭证或填写描述", icon: "none" });
       return;
     }
     wx.showLoading({ title: "提交中" });

+ 2 - 4
miniprogram/module/order/pages/refund-processing/refund-processing.scss

@@ -247,13 +247,11 @@ page {
   left: 0;
   right: 0;
   background-color: #fff;
-  padding: 20rpx 40rpx;
-  padding-bottom: env(safe-area-inset-bottom);
+  padding: 20rpx 32rpx 32rpx;
   box-shadow: 0 -2rpx 10rpx rgba(0, 0, 0, 0.05);
 
   &.bottom-bar-rejected {
-    padding: 30rpx 32rpx;
-    /* Matches screenshot side spacing */
+    padding: 20rpx 32rpx 32rpx;
     background-color: transparent;
     box-shadow: none;
   }

+ 17 - 9
miniprogram/module/order/pages/refund-processing/refund-processing.ts

@@ -29,10 +29,11 @@ Page({
     refundDetail: {
       reason: "",
       amount: "",
+      refundAmount: "",
       finishTime: "",
       applyTime: "",
       refundNo: "",
-      updateTime:""
+      updateTime: ""
     },
     // 协商历史标题和内容
     negotiateTitle: "",
@@ -79,7 +80,7 @@ Page({
       if (!detail) return;
 
       const refundState = progressToState[String(detail.progress)] || 'processing';
-
+      console.log(detail, "888")
       this.setData({
         rawDetail: detail,
         aftersaleId: detail.id || '',
@@ -87,16 +88,17 @@ Page({
         goods: {
           name: detail.conditioningProgramName || '',
           meta1: detail.convertDose ? `${detail.convertDose}${detail.convertUnit || '次'}` : '',
-          price: String(detail.applyAmount || 0),
+          price: String(detail.unitPrice || 0),
           image: detail.conditioningProgramPhoto || '',
         },
         refundDetail: {
           reason: detail.reason || '',
-          amount: String(detail.applyAmount || 0),
+          amount: String(detail.totalPrice || 0),
+          refundAmount: String(detail.refundAmount || 0),
           finishTime: detail.finishTime || '',
           applyTime: detail.applyTime || '',
           refundNo: detail.ref || '',
-          updateTime:detail.updateTime || ''
+          updateTime: detail.updateTime || ''
         },
         negotiateTitle: detail.title || '',
         negotiateContent: (() => {
@@ -105,7 +107,7 @@ Page({
           return c;
         })(),
         handleEndTime: detail.handleEndTime || '',
-        refundMaxAmount: String(detail.applyAmount || 0),
+        refundMaxAmount: String(detail.totalPrice || 0),
         refundProofImages: detail.voucherImgs || [],
         refundDesc: detail.remark || '',
       });
@@ -213,8 +215,8 @@ Page({
   },
 
   async onSubmitRefundApply() {
-    if (!this.data.refundProofImages.length) {
-      wx.showToast({ title: '请上传凭证图片', icon: 'none' });
+    if (!this.data.refundProofImages.length && !this.data.refundDesc.trim()) {
+      wx.showToast({ title: '请上传凭证或填写描述', icon: 'none' });
       return;
     }
     wx.showLoading({ title: '正在提交' });
@@ -293,7 +295,13 @@ Page({
   },
 
   onReApply() {
-    this.setData({ refundAction: 'reApply', refundConfirmPopupVisible: true });
+    const originalPrice = String(this.data.rawDetail.totalPrice || 0);
+    this.setData({
+      refundAction: 'reApply',
+      refundDetail: { ...this.data.refundDetail, amount: originalPrice },
+      refundMaxAmount: originalPrice,
+      refundConfirmPopupVisible: true,
+    });
   },
 
   onRevoke() {

+ 1 - 1
miniprogram/module/order/pages/refund-processing/refund-processing.wxml

@@ -89,7 +89,7 @@
       </view>
       <view class="info-item">
         <text class="info-label">申请金额</text>
-        <text class="info-value">共{{refundDetail.amount}}元</text>
+        <text class="info-value">共{{refundDetail.refundAmount}}元</text>
       </view>
       
       <!-- 根据状态不同展示不同的时间标签 -->