wenjie il y a 4 jours
Parent
commit
dc12d6a7f3

+ 42 - 516
pages/DetailsOfRefund/DetailsOfRefund.js

@@ -1,6 +1,7 @@
 // pages/DetailsOfRefund/DetailsOfRefund.js
 var http = require('../../utils/http.js');
 var util = require('../../utils/util.js');
+
 Page({
 
   /**
@@ -39,47 +40,51 @@ Page({
     combinedTextValue: '',
     sendInfo: {},
     currentSelectedIndex: -1, // 初始没有选中项,索引设为 -1
-    steps: [{
-        text: '步骤一',
-        desc: '描述信息',
-        inactiveIcon: 'location-o',
-        activeIcon: 'success',
-      },
-      {
-        text: '步骤二',
-        desc: '描述信息',
-        inactiveIcon: 'circle',
-        activeIcon: 'plus',
-      },
-      {
-        text: '步骤三',
-        desc: '描述信息',
-        inactiveIcon: 'circle',
-        activeIcon: 'cross',
-      },
-      {
-        text: '步骤四',
-        desc: '描述信息',
-        inactiveIcon: 'circle',
-        activeIcon: 'fail',
-      },
-    ],
     cancelPay: false,
     remainingTime: '',
     timeFormat: '',
     orderNumSend:'',
     countdown_hours:'',
-    countdown_minutes:''
+    countdown_minutes:'',
+    statusObj:{
+      10:{
+        title:'待审核',
+        desc:'申请通过后,将退回至原账户'
+      },
+      20:{
+        title:'处理中',
+        desc:'申请通过后,将退回至原账户'
+      },
+      30:{
+        title:'驳回退款',
+        desc:'您的申请已被商家拒绝'
+      },
+      40:{
+        title:'撤销退款',
+        desc:'您已主动取消退款申请,如有需要可再次申请。'
+      },
+      60:{
+        title:'待退货',
+        desc:''
+      },
+      65:{
+        title:'待确认收货',
+        desc:'待商家收到商品,并确认不影响二次销售后,将为您退款'
+      },
+      70:{
+        title:'退款完成',
+        desc:'申请已通过,已退回至原账户'
+      },
+    }
   },
 
   /**
    * 生命周期函数--监听页面加载
    */
-  onLoad: function (options) {
+  onLoad(options) {
     this.setData({
       orderNumSend:options.orderNumber
     })
-    this.getTime()
     this.setData({
       refundSn: options.refundSn,
     });
@@ -90,408 +95,9 @@ Page({
     }
     //获取退款申请详情
     this.getRefundDetail()
-  },
 
-  /**
-   * 更多说明&收起
-   */
-  onChangeShowState: function () {
-    var that = this;
-    that.setData({
-      showView: (!that.data.showView)
-    })
-  },
-  // 发起配送
-  sendDistribution: function () {
-    this.setData({
-      addCarshow: true
-    })
   },
-  onClose: function () {
-    this.setData({
-      addCarshow: false
-    })
-  },
-  timeOnClose: function () {
-    this.setData({
-      selectTimeshow: false
-    })
-  },
-  submitBtn:function(){
-    if (Object.keys(this.data.sendInfo).length === 0) {
-      wx.showToast({
-        title: '请先选择取件时间',
-        icon: 'none'
-      })
-      return
-    }
-    this.submitExpress()
-  },
-  submitExpress:function(){
-    var params = {
-      url: `/p/orderRefund/submitExpress/${this.data.refundSn}`,
-      method: "GET",
-      callBack: res => {
-        wx.showToast({
-          title: '提交成功',
-          icon: 'none',
-        })
-        this.setData({
-          addCarshow:false
-        })
-        this.getRefundDetail()
-      }
-    };
-    http.request(params);
-  },
-  // 辅助函数,将中文日期格式转换为YYYY-MM-DD格式
-  formatDate: function (dateStr) {
-    let parts = dateStr.match(/(\d+)月(\d+)日/);
-    if (parts) {
-      let month = parseInt(parts[1]);
-      let day = parseInt(parts[2]);
-      let year = new Date().getFullYear();
-      return `${year}-${month.toString().padStart(2, '0')}-${day.toString().padStart(2, '0')}`;
-    }
-    return dateStr;
-  },
-  selectUpTime: function () {
-    this.getDayTime()
-    this.getTime()
-    let day = []
-    day.push({
-      id: 1,
-      text: this.data.nomDay
-    }, {
-      id: 2,
-      text: this.data.tomorrowDay
-    })
-    let data = []
-    data.push({
-      values: day,
-      className: 'column1',
-    }, {
-      values: this.data.timeIntervals,
-      defaultIndex: 2,
-      className: 'column2',
-    })
-    this.setData({
-      selectTimeshow: true,
-      columns: data
-    })
-  },
-
-  // 获取今明天并转换
-  getDayTime: function () {
-    const today = new Date();
-    const month = (today.getMonth() + 1).toString().padStart(2, '0');
-    const day = today.getDate().toString().padStart(2, '0');
-    const todayFormat = `${month}月${day}日`;
-    const tomorrow = new Date(today.getTime() + 24 * 60 * 60 * 1000);
-    const tomorrowMonth = (tomorrow.getMonth() + 1).toString().padStart(2, '0');
-    const tomorrowDay = tomorrow.getDate().toString().padStart(2, '0');
-    const tomorrowFormat = `${tomorrowMonth}月${tomorrowDay}日`;
-    this.setData({
-      nomDay: todayFormat,
-      tomorrowDay: tomorrowFormat
-    })
-  },
-
-  // 时间段转换
-  getTime: function (selectedDate) {
-    const timeIntervals = [];
-    // 如果没有传入日期参数(首次加载等情况),则使用当前日期
-    const now = selectedDate ? new Date(selectedDate) : new Date();
-    if (isNaN(now.getTime())) {
-      console.error('传入的日期格式不正确,无法解析为有效日期');
-      return;
-    }
-    const currentTimeStamp = now.getTime();
-    for (let hour = 0; hour < 23; hour++) {
-      const start = hour.toString().padStart(2, '0') + ':00';
-      const end = (hour + 1).toString().padStart(2, '0') + ':00';
-      const interval = start + '~' + end;
-      // 创建对应时间段开始时间的日期对象
-      const startDate = new Date(now);
-      startDate.setHours(hour, 0, 0, 0);
-      const startTimestamp = startDate.getTime();
-      // 通过比较时间戳来判断时间段是否已过去
-      const hidden = startTimestamp < currentTimeStamp;
-      timeIntervals.push({
-        text: interval,
-        disabled: hidden
-      });
-    }
-    this.setData({
-      timeIntervals
-    });
-  },
-
-  // 日期转换方法
-  convertDateToNumber: function (dateStr) {
-    if (!dateStr) {
-      throw new Error('日期字符串不能为空');
-    }
-    dateStr = dateStr.trim();
-    let parts = dateStr.match(/(\d+)月(\d+)日/);
-    if (!parts) {
-      throw new Error('日期格式不正确,请按照XX月XX日的格式输入');
-    }
-    return new Date(2024, parseInt(parts[1]) - 1, parseInt(parts[2]));
-  },
-
-  // 选择器change事件
-  onChange(event) {
-    const {
-      picker,
-      value,
-      index
-    } = event.detail;
-    value.map((item, index) => {
-      if (index === 0) {
-        var date1 = this.convertDateToNumber(item.text);
-        var date2 = new Date();
-        if (date1 > date2) {
-          this.updateTimeIntervalsDisabled(item.id);
-        } else {
-          this.updateTimeIntervalsDisabled(item.id);
-        }
-      }
-    })
-  },
-  onConfirm(event) {
-    const {
-      picker,
-      value,
-      index
-    } = event.detail;
-    var currentDate = new Date();
-    var currentYear = currentDate.getFullYear();
-    if (value.length >= 2) {
-      const text1 = value[0].text; //text1为12月25日
-      const text2 = value[1].text.slice(0, 5); //text2为15:00
-      const month = ("0" + (parseInt(text1.split("月")[0]))).slice(-2); // 将中文月格式转换为数字(注意要减1,因为月份是从0开始计数),并补0
-      const day = text1.split("月")[1].split("日")[0];
-      const hour = text2.split(":")[0];
-      const minute = text2.split(":")[1];
-      const combinedText = `${currentYear}-${month}-${day} ${hour}:${minute}:00`;
-      let dateObj = new Date(combinedText);
-      let timestamp = Math.floor(dateObj.getTime() / 1000);
-      // 获取配送费
-      let that = this
-      var params = {
-        url: "/p/orderRefund/refundPrice",
-        method: "GET",
-        data: {
-          refundSn: this.data.refundSn, //退款编号
-          deliveryTime: timestamp
-        },
-        callBack: function (res) {
-          that.setData({
-            sendInfo: res
-          })
-        }
-      };
-      http.request(params);
-      this.setData({
-        combinedTextValue: combinedText,
-        selectTimeshow: false
-      });
-    }
-  },
-  onCancel: function () {
-    this.setData({
-      selectTimeshow: false
-    })
-  },
-  toPaySend: function () {
-    if (Object.keys(this.data.sendInfo).length === 0) {
-      wx.showToast({
-        title: '请先选择取件时间',
-        icon: 'none'
-      })
-      return
-    } else {
-      let that = this
-      wx.showLoading({
-        mask: true
-      });
-      var params = {
-        url: "/p/order/refundPay",
-        method: "POST",
-        data: {
-          payType: 1,
-          orderType: 1,
-          orderNumbers: this.data.refundSn
-        },
-        callBack: (res) => {
-          wx.hideLoading();
-          wx.requestPayment({
-            timeStamp: res.timeStamp,
-            nonceStr: res.nonceStr,
-            package: res.package,
-            signType: res.signType,
-            paySign: res.paySign,
-            success: e => {
-              wx.showModal({
-                title: '支付成功',
-                content: '',
-                showCancel: false,
-                success: () => {
-                  this.setData({
-                    addCarshow:false
-                  })
-                  this.submitExpress()
-                }
-              })
-            },
-            fail: err => {
-              // this.countdownTime()
-              // that.setData({
-              //   cancelPay: true,
-              //   addCarshow:false
-              // })
-            }
-          })
-        }
-      };
-      http.request(params);
-    }
-  },
-  atoncePaySend: function () {
-    wx.showLoading({
-      mask: true
-    });
-    var params = {
-      url: "/p/order/refundPay",
-      method: "POST",
-      data: {
-        payType: 1,
-        orderType: 1,
-        orderNumbers: this.data.refundSn
-      },
-      callBack: (res) => {
-        wx.hideLoading();
-        wx.requestPayment({
-          timeStamp: res.timeStamp,
-          nonceStr: res.nonceStr,
-          package: res.package,
-          signType: res.signType,
-          paySign: res.paySign,
-          success: e => {
-            wx.showModal({
-              title: '支付成功',
-              content: '',
-              showCancel: false,
-              success: () => {
-                // this.setData({
-                //   cancelPay: false
-                // })
-                this.getRefundDetail()
-              }
-            })
-          },
-          fail: err => {}
-        })
-      }
-    };
-    http.request(params);
-  },
-  // 倒计时
-  countdownTime: function () {
-    // 十五分钟对应的毫秒数
-    const fifteenMinutesInMs = 15 * 60 * 1000;
-    const targetTimeStamp = this.data.sendInfo.touchTime;
-    // 计算增加十五分钟后的时间戳
-    const newTimeStamp = targetTimeStamp + fifteenMinutesInMs;
-    const currentTimeStamp = newTimeStamp;
-    const diff = currentTimeStamp - targetTimeStamp;
-    if (diff > 0) {
-      this.setData({
-        remainingTime: diff,
-      });
-      this.countdown();
-    } else {
-    }
-  },
-  // 倒计时
-  countdown: function () {
-    const interval = setInterval(() => {
-      if (this.data.remainingTime <= 0) {
-        clearInterval(interval);
-        this.setData({
-          cancelPay: false
-        })
-        return;
-      }
-      this.setData({
-        remainingTime: this.data.remainingTime - 1000,
-      });
-      // 将剩余时间(毫秒)转换为时分秒格式
-      const hours = Math.floor(this.data.remainingTime / (1000 * 60 * 60));
-      const minutes = Math.floor((this.data.remainingTime % (1000 * 60 * 60)) / (1000 * 60));
-      const seconds = Math.floor((this.data.remainingTime % (1000 * 60)) / 1000);
-      const timeFormat = `${this.padZero(hours)}:${this.padZero(minutes)}:${this.padZero(seconds)}`;
-      this.setData({
-        timeFormat: timeFormat
-      });
-    }, 1000);
-  },
-  // 辅助函数,用于将数字转换为两位数格式(不足两位前面补0)
-  padZero(num) {
-    return num < 10 ? '0' + num : num.toString();
-  },
-  // 根据id判断是否开启disabled
-  updateTimeIntervalsDisabled(id) {
-    let datatime = this.data.timeIntervals.map(subItem => {
-      if (id === 2) {
-        subItem.disabled = false;
-      } else if (id === 1) {
-        // 选中当天重新调用getTime方法判断当前时间
-        this.getTime()
-      }
-      return subItem;
-    });
-    // copy上面的数据结构,待优化
-    let day = []
-    day.push({
-      id: 1,
-      text: this.data.nomDay
-    }, {
-      id: 2,
-      text: this.data.tomorrowDay
-    })
-    let data = []
-    data.push({
-      values: day,
-      className: 'column1',
-    }, {
-      values: this.data.timeIntervals,
-      defaultIndex: 2,
-      className: 'column2',
-    })
-    this.setData({
-      timeIntervals: datatime,
-      columns: data
-    });
-  },
-  flowBution: function () {
-    wx.navigateTo({
-      url: '/pages/MaterialFlowInfo/MaterialFlowInfo?refundSn=' + this.data.refundSn
-    })
-    // this.setData({
-    //   flowShow: true
-    // })
-    // wx.navigateTo({
-    //   url: '/pages/MaterialFlow/MaterialFlow',
-    // })
-  },
-  flowOnClose: function () {
-    this.setData({
-      flowShow: false
-    })
-  },
-  /**
+   /**
    * 获取退款申请详情
    */
   getRefundDetail: function (e) {
@@ -516,6 +122,7 @@ Page({
           handelTime: res.handelTime, //卖家处理时间
           orderAmount: res.orderAmount, //订单总金额
           orderItems: res.orderItems, //订单项 
+          orderNumber: res.orderNumber, //订单项 
           refundSn: res.refundSn, //退款编号
           refundAmount: res.refundAmount, //退款金额
           refundDelivery: res.refundDelivery, //收货地址对象
@@ -536,134 +143,53 @@ Page({
     };
     http.request(params);
   },
-/**
- * 同意后倒计时
- * @param {*} e 
- */
-get_countDown:function(){
-  const start = new Date(this.data.handelTime);
-    const end = new Date(start.getTime() + 48 * 60 * 60 * 1000);
-    const interval = setInterval(() => {
-      const now = new Date();
-      const diff = end - now;
-      if (diff <= 0) {
-        clearInterval(interval);
-        this.setData({
-          countdown_hours: '00天',
-          countdown_minutes:'00分钟'
-        });
-      } else {
-        const hours = Math.floor(diff / (1000 * 60 * 60));
-        const minutes = Math.floor((diff % (1000 * 60 * 60)) / (1000 * 60));
-        this.setData({
-          countdown_hours:String(hours).padStart(2, '0'),
-          countdown_minutes:String(minutes).padStart(2, '0')
-          // countdown_time:`${String(hours).padStart(2, '0')}小时${String(minutes).padStart(2, '0')}分钟`
-        });
-      }
-    }, 1000);
-},
-  /**
-   * 撤销退货退款申请
-   */
-  cancelApplication: function (e) {
-    wx.showModal({
-      title: '撤销',
-      content: '确定要撤销本次申请?',
-      success: (res) => {
-        if (res.confirm) {
-          wx.showLoading({})
-          var params = {
-            url: "/p/orderRefund/cancel",
-            method: "GET",
-            data: {refundSn:this.data.refundSn} , //退款订单编号
-            callBack: function (res) {
-              wx.hideLoading();
-              wx.navigateTo({
-                url: '/pages/afterSales/afterSales',
-              })
-            }
-          };
-          http.request(params);
-        } else {
-          console.log('取消')
-        }
-      }
-    })
-
-  },
-
-
-  /**
-   * 跳转修改退款申请
-   */
-  // toAlterRefundApply: function (e) {
-  //   var refundSn = e.currentTarget.dataset.refundsn;
-  //   console.log(e.currentTarget.dataset.refundsn)
-  //   wx.navigateTo({
-  //     url: '/pages/applyRefund/applyRefund?refundSn=' + refundSn,
-  //   })
-  // },
-
-
-  /**
-   * 填写物流信息
-   */
-  toLogisticsPage: function (e) {
-    var refundSn = e.currentTarget.dataset.refundsn;
-    console.log(e.currentTarget.dataset.refundsn)
-    wx.navigateTo({
-      url: '/pages/writeReturnLogistics/writeReturnLogistics?refundSn=' + refundSn,
-    })
-  },
-
 
   /**
    * 生命周期函数--监听页面初次渲染完成
    */
-  onReady: function () {
+  onReady() {
 
   },
 
   /**
    * 生命周期函数--监听页面显示
    */
-  onShow: function () {
+  onShow() {
 
   },
 
   /**
    * 生命周期函数--监听页面隐藏
    */
-  onHide: function () {
+  onHide() {
 
   },
 
   /**
    * 生命周期函数--监听页面卸载
    */
-  onUnload: function () {
+  onUnload() {
 
   },
 
   /**
    * 页面相关事件处理函数--监听用户下拉动作
    */
-  onPullDownRefresh: function () {
+  onPullDownRefresh() {
 
   },
 
   /**
    * 页面上拉触底事件的处理函数
    */
-  onReachBottom: function () {
+  onReachBottom() {
 
   },
 
   /**
    * 用户点击右上角分享
    */
-  onShareAppMessage: function () {
+  onShareAppMessage() {
 
   }
 })

+ 1 - 3
pages/DetailsOfRefund/DetailsOfRefund.json

@@ -1,5 +1,3 @@
 {
-  "usingComponents": {},
-  "backgroundTextStyle": "light",
-  "navigationBarTitleText": "退款详情"
+  "usingComponents": {}
 }

+ 115 - 246
pages/DetailsOfRefund/DetailsOfRefund.wxml

@@ -1,268 +1,137 @@
-<!-- 退款详情 -->
-<!--pages/DetailsOfRefund/DetailsOfRefund.wxml-->
-
-<view class="page">
-  <!-- 头部状态 -->
-  <view class="describe-box">
-    <!-- 申请行进流程 -->
-    <view class="process">
-      <!-- 提交申请 -->
-      <view class="current-process" wx:if="{{returnMoneySts == 1}}">退款申请待商家处理</view>
-      <view class="acount-for-process" wx:if="{{returnMoneySts == 1}}">
-        你已成功发起退款申请,等待商家处理
-      </view>
-      <view class="acount-for-process" wx:if="{{returnMoneySts == 1}}">
-        {{updateTime}}
-      </view>
-      <!-- 商家拒绝 -->
-      <view class="current-process" wx:if="{{returnMoneySts == 7}}">商家不同意退款申请</view>
-      <view class="acount-for-process" wx:if="{{returnMoneySts == 7}}">
-        你可以修改退款申请
-      </view>
-      <view class="acount-for-process" wx:if="{{returnMoneySts == 7}}">
-        {{updateTime}}
-      </view>
-      <!-- 商家同意退款 -->
-      <view class="current-process" wx:if="{{returnMoneySts == 2}}">商家同意退款</view>
-      <view class="acount-for-process" wx:if="{{returnMoneySts == 2 && applyType == 1}}">
-        商家已同意,等待系统退款
-      </view>
-      <view class="acount-for-process" wx:if="{{returnMoneySts == 2 && applyType == 2}}">
-        商家已同意,请按照商家给出的退货地址寄回商品
-      </view>
-      <view class="acount-for-process" wx:if="{{returnMoneySts == 2}}">
-        {{updateTime}}
-      </view>
-      <!-- 寄出商品(退货退款情况下) -->
-      <view class="current-process" wx:if="{{returnMoneySts == 3}}">等待商家确认收货并退款</view>
-      <view class="acount-for-process" wx:if="{{returnMoneySts == 3}}">
-        你已退货,商家将在收货后尽快处理
-      </view>
-      <view class="acount-for-process" wx:if="{{returnMoneySts == 3}}">
-        {{updateTime}}
-      </view>
-      <!-- 商家确认收货 -->
-      <view class="current-process" wx:if="{{returnMoneySts == 4}}">商家确认收货</view>
-      <view class="acount-for-process" wx:if="{{returnMoneySts == 4}}">
-        商家已确认收货,等待系统退款
-      </view>
-      <view class="acount-for-process" wx:if="{{returnMoneySts == 4}}">
-        {{updateTime}}
-      </view>
-      <!-- 退款成功 -->
-      <view class="current-process" wx:if="{{returnMoneySts == 5}}">退款成功</view>
-      <view class="acount-for-process" wx:if="{{returnMoneySts == 5}}">
-        {{refundTime}}
-      </view>
-      <!-- 退款申请关闭 -->
-      <view class="current-process" wx:if="{{returnMoneySts == -1}}">退款申请关闭</view>
-      <view class="acount-for-process" wx:if="{{returnMoneySts == -1}}">
-        <!-- 由于你超时未处理,系统已关闭本次退款申请 -->
-        {{rejectMessage?rejectMessage:''}}
-      </view>
-      <view class="acount-for-process" wx:if="{{returnMoneySts == -1}}">
-        {{updateTime}}
-      </view>
-      <!-- 买家撤回申请 -->
-      <view class="current-process" wx:if="{{returnMoneySts == 6}}">申请已撤回</view>
-      <view class="acount-for-process" wx:if="{{returnMoneySts == 6}}">
-        你已撤回本次退款申请
-      </view>
-      <view class="acount-for-process" wx:if="{{returnMoneySts == 6}}">
-        {{updateTime}}
-      </view>
-      <!-- 隐藏内容(仅退款) -->
-      <view class="{{showView?'display':'more-content'}}" wx:if="{{returnMoneySts == 1}}">
-        <view class="cont">如果商家同意,申请将达成并退款给你</view>
-        <view class="cont">如果商家拒绝,你可以修改退款申请重新尝试</view>
-        <!-- <view class="cont">如果商家逾期未处理,退款申请将自动达成并退款给你</view> -->
-      </view>
-      <!-- 隐藏内容(退货退款申请商品未寄出) -->
-      <view class="{{showView?'display':'more-content'}}" wx:if="{{returnMoneySts == 2}}">
-        <view class="cont">如果商家同意,请按照给出的退货地址退货</view>
-        <view class="cont">如果商家拒绝,你可以修改退款申请重新尝试</view>
-        <!-- <view class="cont">如果商家逾期未处理,请按照系统给出的退货地址退货</view> -->
-      </view>
-      <!-- 隐藏内容(退货退款并已寄出货物) -->
-      <view class="{{showView?'display':'more-content'}}" wx:if="{{returnMoneySts == 3}}">
-        <view class="cont">如果商家确认收货,申请将达成并退款给你</view>
-        <view class="cont">如果商家拒绝收货,你可以修改退货物流信息重新尝试</view>
-        <!-- <view class="cont">如果商家逾期未处理,系统将自动确认收货并退款给你</view> -->
-      </view>
+<view class="DetailsOfRefund">
+  <view class="result-box box">
+    <view class="result">
+      <view class="title">{{statusObj[returnMoneySts].title}}</view>
+      <view class="desc">{{statusObj[returnMoneySts].desc}}</view>
     </view>
-    <!-- 申请行进流程end -->
-
-    <!-- 更多说明 -->
-    <view class="{{showView?'more-instructions':'display'}}" bindtap="onChangeShowState" wx:if="{{returnMoneySts < 4 && returnMoneySts !== -1 && applyType == 2}}">
-      <text class="more-txt">更多说明</text>
-      <view class="down-arrow-icon">
-        <image src="../../images/icon/down-arrow.png"></image>
-      </view>
+    <view class="result">
+    <view class="title-box">
+      <view class="title small">退款金额</view>
+      <view class="price">¥21</view>
     </view>
-    <!-- 收起 -->
-    <view class="{{showView?'display':'more-instructions'}}" bindtap="onChangeShowState" wx:if="{{returnMoneySts < 4 && returnMoneySts !== -1 && applyType == 2}}">
-      <text class="more-txt">收起</text>
-      <view class="down-arrow-icon">
-        <image src="../../images/icon/up-arrow.png"></image>
-      </view>
+      <view class="desc">申请通过后,将退回至原账户</view>
     </view>
   </view>
-  <!-- 头部状态end -->
 
-  <!-- 【退款申请被拒绝时显示】拒绝理由 -->
-  <view class="refuse-reason" wx:if="{{returnMoneySts == 7}}">
-    拒绝理由:{{rejectMessage}}
-  </view>
-  <!-- 退货方式 -->
-  <!-- wx:if="{{returnMoneySts == 2 && applyType == 2}}" -->
-  <view class="return-address" wx:if="{{returnMoneySts == 3||returnMoneySts == 2 && applyType == 2}}">
-    <view class="addr-tit">退货方式</view>
-    <view class="address">
-      <view class="return-shop-box">
-        <view>
-          <view class="shop-title">{{payer==1?'商家':'用户'}}承担运费</view>
-          <view class="shop-text" wx:if="{{returnMoneySts==3}}">已发起配送</view>
-          <view class="shop-text" wx:else>请在{{countdown_hours}}小时{{countdown_minutes}}分钟内,发起配送,将货品退回给商家。</view>
+  <!-- <view class="oprate-box box">
+      <view class="item">
+        <image class="icon" src="../../images/icon/del-icon.png" mode=""/>
+        <view class="label">
+          删除订单
         </view>
-        <view class="shop-btn" bindtap="sendDistribution" wx:if="{{sendPay==null}}">发起配送</view>
-        <view class="shop-btn" bindtap="flowBution" wx:else>查看物流</view>
       </view>
-    </view>
-  </view>
-  <!-- <view wx:if="{{cancelPay}}">
-    <view class="pay-card">
-      <view class="loading-time">等待支付,剩余<text style="color: #FF4D3A;">{{timeFormat}}</text></view>
-      <view class="time-out">超过15分钟未支付,订单将自动取消。</view>
-      <view class="pay-btn" bindtap="atoncePaySend">立即支付¥{{sendInfo.price}}</view>
-    </view>
-  </view> -->
-  <van-popup show="{{ addCarshow }}" closeable round position="bottom" custom-style="height: 45%" bind:close="onClose">
-    <view class="popup-box">
-      <view class="popup-title">寄回商品</view>
-      <view class="info-card-box">
-        <view class="card-address">顾客地址</view>
-        <view class="card-info">{{userAddrDto.address}}{{userAddrDto.addressName}}{{userAddrDto.addrDetail}}</view>
-        <view class="card-user">{{userAddrDto.receiver}} {{userAddrDto.mobile}}</view>
-        <view class="card-line"></view>
-        <view class="card-time-box" bindtap="selectUpTime">
-          <view class="card-time">*取件时间</view>
-          <view class="up-time">{{combinedTextValue||'请选择上门时间'}}
-            <van-icon name="arrow" />
-          </view>
+      <button class='item' open-type="contact" >
+        <image class="icon" src="../../images/icon/chat-icon.png" mode=""/>
+        <view class="label">
+          联系商家
         </view>
-      </view>
-      <view class="costSide-card">
-        <view>配送费支付方</view>
-        <view>{{payer==1?'商家':'用户'}}</view>
-      </view>
-      <view class="bottom-button-box">
-        <!-- 支付方:payer=1店铺,2买家 -->
-        <view class="bottom-button" wx:if="{{payer==1}}" bindtap="submitBtn">提交</view>
-        <view class="send-pay-box" wx:else>
-          <view class="sendpay-text">配送费 <text style="color: #FF4D3A;">¥{{sendInfo.price||'0'}}</text></view>
-          <view class="sendpay-btn" bindtap="toPaySend">支付</view>
+     </button>
+      <view class="item" >
+        <image class="icon" src="../../images/icon/buy-icon.png" mode=""/>
+        <view class="label">
+          再次购买
         </view>
       </view>
-    </view>
-  </van-popup>
-  <van-popup show="{{ selectTimeshow }}" overlay="{{false}}" round position="bottom" custom-style="height: 45%" bind:close="timeOnClose">
-    <view class="popup-box">
-      <view class="popup-title">选择上门时间</view>
-      <van-picker columns="{{ columns }}" show-toolbar bind:cancel="onCancel" bind:confirm="onConfirm" bind:change="onChange" />
-      <!-- <view class="popup-select-day">
-        <view class="day-left">
-          <view class="{{sts==0?'now-day':'tomorrow-day'}}" data-sts="0" data-time="{{nomDay}}" bindtap="selectday">{{nomDay+'(今天)'}}</view>
-          <view style="margin-top: 28rpx;" class="{{sts==1?'now-day':'tomorrow-day'}}" data-sts="1" data-time="{{tomorrowDay}}" bindtap="selectday">{{tomorrowDay+'(明天)'}}</view>
-        </view>
-        <view class="time-right">
-          <view class="sel-time{{currentSelectedIndex === index? 'selected' : ''}}" wx:for="{{timeIntervals}}" bindtap="selectTime" data-time="{{item}}" data-index="{{index}}">
-          <text wx:if="{{!item.hidden}}">{{item.interval}}</text></view>
+    </view> -->
+
+    <!-- <view class="process-box box">
+      <view class="sub-title">退款流程</view>
+      
+      <view class="step-box">
+        <view class="step-item" wx:for="{{4}}">
+          <view class="point {{index == 0?'active':''}}"></view>
+          <view class="line"></view>
+          <view class="title">退款成功</view>
+          <view class="desc">已完成退款,具体到账时间请查询支付宝</view>
+          <view class="time">2024-12-13 11:12:30</view>
+          <view class="img-list" wx:if="{{index == 3}}">
+            <view class="img"></view>
+            <view class="img"></view>
+            <view class="img"></view>
+            <view class="img"></view>
+            <view class="img"></view>
+            <view class="img"></view>
+            <view class="img"></view>
+            <view class="img"></view>
+            <view class="img"></view>
+          </view>
         </view>
-      </view> -->
-    </view>
-  </van-popup>
-  <van-popup show="{{ flowShow }}" closeable round position="bottom" custom-style="height: 45%" bind:close="flowOnClose">
-    <van-steps custom-class="steps-style" steps="{{ steps }}" active="{{ active }}" direction="vertical" active-color="#FF941A" />
-  </van-popup>
-  <!-- 【退货退款状态下,买家同意后】退货地址 -->
-  <view class="return-address" wx:if="{{returnMoneySts == 2 && applyType == 2}}">
-    <view class="addr-tit">退货地址</view>
-    <view class="address">
-      <view class="recipient">
-        <text class="addr-cont">收件人:{{refundDelivery.receiverName}}</text>
-        <text class="mobile">{{refundDelivery.receiverMobile}}</text>
       </view>
-      <view class="addr">详细地址:{{refundDelivery.receiverAddr}}</view>
-    </view>
-  </view>
 
+    </view> -->
 
-  <!-- 退款信息 -->
-  <view class="refund-message">
-    <view class="refund-txt">退款信息</view>
-    <view class="goods-msg-box">
-      <!-- 店铺 -->
-      <!-- <view class="shop-box">
-        <view class="shop-img"><image src="../../images/icon/shop.png"></image></view>
-        <view class="shopname">店铺:{{shopName}}</view>
-      </view> -->
-      <!-- 图片 -->
-      <view class="img-box" wx:if="{{orderItems.length==1}}">
-        <image src="{{orderItems[0].pic}}"></image>
-      </view>
-      <!-- 信息 -->
-      <view class="goods-text" wx:if="{{orderItems.length==1}}">
-        <view class="goods-title">{{orderItems[0].prodName}}</view>
-        <view class="goods-quantity">数量:{{orderItems[0].prodCount}}件</view>
-      </view>
-
-      <block wx:if="{{orderItems.length>1}}">
-        <view class="refund-goods-item" wx:for="{{orderItems}}" wx:key="*this">
-          <!-- 图片 -->
-          <view class="img-box">
-            <image src="{{item.pic}}"></image>
+    <view class="refund-goods box">
+      <view class="title-box">
+        <view class="title">退款商品</view>
+        <view class="price">退款金额:¥21</view>
+      </view>
+      <view class="good-list">
+        <view class="good-item" wx:for="{{orderItems}}" wx:key="*this">
+          <image src="{{item.pic}}" mode="" class="img"/>
+          <view class="info">
+            <view class="good-name">{{item.prodName}}</view>
+            <!-- <view class="desc">规格:5kg,盒</view> -->
+            <view class="price">单价:¥{{item.price}}</view>
           </view>
-          <!-- 信息 -->
-          <view class="goods-text">
-            <view class="goods-title">{{item.prodName}}</view>
-            <view class="goods-quantity">数量:{{item.prodCount}}件</view>
+          <view class="price-box">
+            <view class="price">¥{{item.productTotalAmount}}</view>
+            <view class="num">x{{item.prodCount}}</view>
           </view>
         </view>
-      </block>
-    </view>
-    <!-- 具体信息 -->
-    <view class="refund-cont">退款方式:{{['','仅退款','退货退款'][applyType]}}</view>
-    <view class="refund-cont">退款原因:{{buyerReason}}</view>
-    <view class="refund-cont">退款金额:
-      <text class="red" wx:if="{{refundAmount && refundAmount > 0}}">¥{{wxs.toPrice(refundAmount?refundAmount:0)}}</text>
-      <text class="red" wx:if="{{(refundScore && refundScore > 0) && (refundAmount && refundAmount > 0)}}">+</text>
-      <text class="red" wx:if="{{refundScore && refundScore > 0}}">{{refundScore}}积分</text>
-    </view>
-    <view class="refund-cont">退款编号:{{refundSn}}</view>
-    <view class="refund-cont">申请时间:{{applyTime}}</view>
-    <!-- 【退货申请显示】 -->
-    <view class="refund-cont" wx:if="{{goodsNum>0}}">退货数量:{{goodsNum}}</view>
-    <!-- 联系商家 -->
-    <!-- <view class="contact-merchant">联系商家</view> -->
-    <button class='contact-merchant' open-type="contact">联系客服</button>
-  </view>
 
+      </view>
+        <!-- <view class="open-btn">
+          展开(共7件) <image class="arrow" src="../../images/icon/black-down-arrow.png" mode=""/>
+        </view> -->
+    </view>
 
-  <!-- 脚部撤销申请 -->
-  <!-- applyType: 1,  //申请类型:1,仅退款,2退款退货 -->
-  <!-- returnMoneySts: 处理退款状态:(1.买家申请 2.卖家接受 3.买家发货 4.卖家收货 5.退款成功 6.买家撤回申请 7.商家拒绝 -1.退款关闭) -->
-  <view class="foot-box">
-    <view class="footer">
-      <!-- 【申请后-申请完成前】 -->
-      <!-- <text class="undo-apply" bindtap="cancelApplication" wx:if="{{returnMoneySts ==1 || returnMoneySts == 7 || (returnMoneySts ==2 && applyType == 2)}}">撤销申请</text> -->
-      <text class="undo-apply" bindtap="cancelApplication" >撤销申请</text>
-      <!-- 【商家拒绝时显示】 -->
-      <!-- <text class="undo-apply apply-current" bindtap="toAlterRefundApply" wx:if="{{returnMoneySts ==1 || returnMoneySts == 7}}" data-refundsn="{{refundSn}}">修改申请</text> -->
-      <!-- 【商家同意后-货物寄出前】 -->
-      <!-- <text class="undo-apply apply-current" bindtap="toLogisticsPage" wx:if="{{returnMoneySts == 2 && applyType == 2}}" data-refundsn="{{refundSn}}">填写退货物流</text> -->
+    <view class="goods-info box">
+      <view class="item">
+        <view class="label">商品金额</view>
+        <view class="value">¥54.00</view>
+      </view>
+      <view class="item">
+        <view class="label">运费(快递)</view>
+        <view class="value">¥54.00</view>
+      </view>
+      <view class="item">
+        <view class="label">积分({{refundScore}})</view>
+        <view class="value">¥{{refundScore}}</view>
+      </view>
+      <view class="total">
+        <view class="label">总计:</view>
+        <view class="value">¥54.00</view>
+      </view>
     </view>
-  </view>
 
-</view>
+    <view class="order-info box">
+      <view class="title">订单信息</view>
+      <view class="item">
+        <view class="label">订单编号</view>
+        <view class="value-box">
+          <view class="value">{{orderNumber}}</view>
+          <image class="icon" src="../../images/icon/copy.png" mode=""/>
+        </view>
+      </view>
+      <view class="item">
+        <view class="label">售后编号</view>
+        <view class="value-box">
+          <view class="value">{{refundSn}}</view>
+          <image class="icon" src="../../images/icon/copy.png" mode=""/>
+        </view>
+      </view>
+      <view class="item">
+        <view class="label">申请时间</view>
+        <view class="value">{{applyTime}}</view>
+      </view>
+      <view class="item">
+        <view class="label">服务类型</view>
+        <view class="value">{{['','仅退款','退货退款'][applyType]}}</view>
+      </view>
+      <view class="item">
+        <view class="label">申请原因</view>
+        <view class="value">{{buyerReason}}</view>
+      </view>
+    </view>
 
-<wxs module="wxs" src="../../wxs/number.wxs" />
+</view>

+ 181 - 518
pages/DetailsOfRefund/DetailsOfRefund.wxss

@@ -1,633 +1,296 @@
 /* pages/DetailsOfRefund/DetailsOfRefund.wxss */
-.display {
-  display: none;
+.DetailsOfRefund{
+  padding: 20rpx 24rpx 120rpx;
+  background: #F6F6F6;
 }
 
-image {
-  width: 100%;
-  height: 100%;
+.DetailsOfRefund .result-box{
+  padding: 0 28rpx ;
 }
 
-.page {
-  position: fixed;
-  width: 100%;
-  height: 100%;
-  overflow: auto;
-  background: #f7f7f7;
-}
-
-/* 头部状态 */
-.describe-box {
-  background: #fff;
-  margin-bottom: 20rpx;
-}
-
-.process {
-  padding: 20rpx 25rpx;
-  border-bottom: 1rpx solid #f2f2f2;
+.DetailsOfRefund .result-box .result{
+  position: relative;
+  padding: 24rpx 0;
+  
 }
 
-.current-process {
-  font-size: 30rpx;
+.DetailsOfRefund .result-box .result .title{
   font-weight: bold;
-  padding: 10rpx 0;
+  font-size: 32rpx;
+  color: #222222;
 }
-
-.acount-for-process {
+.DetailsOfRefund .result-box .result .title.small{
   font-size: 28rpx;
-  color: #444;
-  line-height: 1.5em;
 }
 
-.red {
-  color: #e43130;
+.DetailsOfRefund .result-box .result .desc{
+  font-size: 24rpx;
+  color: #AAAAAA;
+  margin-top: 20rpx;
 }
-
-/* 隐藏内容 */
-.more-content {
-  border-top: 1rpx dashed #ebebeb;
-  margin-top: 15rpx;
-  padding-top: 10rpx;
+.DetailsOfRefund .result-box .result .title-box{
+  display: flex;
+  justify-content: space-between;
 }
 
-.cont {
+.DetailsOfRefund .result-box .result .price{
+  font-weight: bold;
   font-size: 28rpx;
-  color: #666666;
-  line-height: 1.8em
-}
-
-/* 更多说明 */
-.more-instructions {
-  padding: 18rpx 0;
-  padding-bottom: 22rpx;
-  text-align: center;
-  font-size: 27rpx;
-}
-
-.more-txt {
-  vertical-align: middle;
-}
-
-.down-arrow-icon {
-  display: inline-block;
-  width: 40rpx;
-  height: 25rpx;
-  vertical-align: middle;
+  color: #FF4D3A;
 }
 
-
-/* 退款流程 */
-.refund-schedule {
-  background: #fff;
+.box{
+  background: #FFFFFF;
+  border-radius: 16rpx 16rpx 16rpx 16rpx;
   margin-bottom: 20rpx;
-  padding: 0 25rpx;
-}
-
-.refund-sum {
-  font-size: 28rpx;
-  padding: 25rpx 0;
-  border-bottom: 1rpx solid #f2f2f2;
 }
 
-.progress-bar {
-  position: relative;
+.DetailsOfRefund .oprate-box{
   display: flex;
-  justify-content: space-around;
-  padding: 20rpx 0;
+  padding: 0 24rpx;
+  
 }
-
-.block {
-  display: inline-block;
+.DetailsOfRefund .oprate-box .item{
+  width: 25%;
   text-align: center;
+  margin: 0;
+  border: none;
+  background-color: #fff !important;
+  padding: 24rpx 0;
+  display: block!important;
+  -webkit-tap-highlight-color: transparent;
+  outline: none;
+  line-height: normal;
+}
+.DetailsOfRefund wx-button:after {
+  border: none;
+}
+.DetailsOfRefund .oprate-box .item .icon{
+  width: 40rpx;
+  height: 40rpx;
 }
 
-.round {
-  display: block;
-  width: 13rpx;
-  height: 13rpx;
-  border-radius: 50%;
-  background: #999999;
-  margin: 0 auto;
-  margin-top: 15rpx;
-}
-
-/* 激活状态圆点 */
-.round-current {
-  background: #3388ff;
-}
-
-.block-text {
-  margin-top: 15rpx;
-  text-align: center;
-}
-
-.block-text-tit {
-  font-size: 26rpx;
-  line-height: 2em;
-  color: #777;
-}
-
-.block-text-time {
-  font-size: 22rpx;
-  color: #aaa;
-}
-
-.line {
-  position: absolute;
-  top: 39rpx;
-  display: inline-block;
-  width: 215rpx;
-  height: 5rpx;
-  background: #bdbdbd;
-}
-
-/* 激活状态直线 */
-.line-current {
-  background: #3388ff;
-}
-
-.line01 {
-  left: 145rpx;
-}
-
-.line02 {
-  right: 115rpx;
-}
-
-/* 拒绝理由 */
-.refuse-reason {
+.DetailsOfRefund .oprate-box .item .label{
   font-size: 28rpx;
-  background: #fff;
-  padding: 20rpx;
-  margin-bottom: 20rpx;
+  color: #222222;
+  margin-top: 20rpx;
 }
-
-
-/* 退货地址 */
-.return-address {
-  background: #fff;
-  margin-bottom: 20rpx;
+.DetailsOfRefund .process-box{
+  padding: 24rpx;
 }
-
-.addr-tit {
-  padding: 10rpx 20rpx;
-  border-bottom: 1rpx solid #f2f2f2;
-  font-size: 30rpx;
+.DetailsOfRefund .process-box .sub-title{
   font-weight: bold;
+  font-size: 32rpx;
+  color: #222222;
+  padding-bottom: 20rpx;
 }
 
-.addr {
-  padding-right: .5em;
-}
-
-.address {
-  padding: 20rpx;
-  font-size: 28rpx;
-}
-
-.recipient {
-  padding-bottom: 10rpx;
-}
+.DetailsOfRefund .process-box .step-box{
 
-.mobile {
-  margin-left: 50rpx;
 }
 
-.pay-card {
-  background: #fff;
+.DetailsOfRefund .process-box .step-box .step-item{
+  position: relative;
   margin-bottom: 20rpx;
-  padding: 20rpx;
+  padding-left: 34rpx;
 }
 
-.loading-time {
-  font-family: PingFang SC, PingFang SC;
+.DetailsOfRefund .process-box .step-box .step-item .title{
   font-weight: bold;
   font-size: 28rpx;
   color: #181818;
 }
-
-.time-out {
-  margin-top: 20rpx;
-  font-family: PingFang SC, PingFang SC;
-  font-weight: normal;
+.DetailsOfRefund .process-box .step-box .step-item .desc{
   font-size: 24rpx;
   color: #AAAAAA;
-}
-
-.pay-btn {
   margin-top: 20rpx;
-  width: 220rpx;
-  height: 64rpx;
-  border-radius: 40rpx;
-  border: 2rpx solid #FF4D3A;
-  font-family: PingFang SC, PingFang SC;
-  font-weight: normal;
-  font-size: 28rpx;
-  color: #FF4D3A;
-  text-align: center;
-  line-height: 64rpx;
 }
 
-/* 退货方式 */
-.return-shop-box {
-  display: flex;
-  align-items: center;
-  justify-content: space-between;
-}
-.shop-title {
-  font-family: PingFang SC, PingFang SC;
-  font-weight: bold;
-  font-size: 28rpx;
-  color: #181818;
-}
-
-.shop-text {
-  margin-top: 20rpx;
-  font-family: PingFang SC, PingFang SC;
-  font-weight: normal;
+.DetailsOfRefund .process-box .step-box .step-item .time{
   font-size: 24rpx;
   color: #AAAAAA;
+  margin-top: 12rpx;
 }
 
-.shop-btn {
-  width: 136rpx;
-  height: 64rpx;
-  background: #FFFFFF;
-  border-radius: 40rpx;
-  border: 2rpx solid #FF4D3A;
-  font-family: PingFang SC, PingFang SC;
-  font-weight: normal;
-  font-size: 28rpx;
-  color: #FF4D3A;
-  line-height: 64rpx;
-  text-align: center;
+.DetailsOfRefund .process-box .step-box .step-item .point{
+  width: 14rpx;
+  height: 14rpx;
+  border-radius: 50%;
+  background: #CCCCCC;
+  position: absolute;
+  top: 0rpx;
+  left: -7rpx;
+  z-index: 9;
 }
-
-.popup-box {
-  padding: 20rpx;
+.DetailsOfRefund .process-box .step-box .step-item .point.active{
+  background: #FF941A;
 }
 
-.popup-title {
-  margin-top: 28rpx;
-  font-family: PingFang SC, PingFang SC;
-  font-weight: 800;
-  font-size: 32rpx;
-  text-align: center;
+.DetailsOfRefund .process-box .step-box .step-item .line{
+  width: 2rpx;
+  height: 115rpx;
+  background: #AAAAAA;
+  position: absolute;
+  top: 0;
+  left: 0;
+  z-index: 8;
 }
-
-.popup-select-day {
+.DetailsOfRefund .process-box .step-box .step-item .img-list{
   display: flex;
+  overflow: auto;
+  margin-top: 12rpx;
 }
-
-.day-left {
-  margin-top: 50rpx;
+.DetailsOfRefund .process-box .step-box .step-item .img-list .img{
+  width: 120rpx;
+  height: 120rpx;
+  background: #F6F6F6;
+  border-radius: 32rpx 32rpx 32rpx 32rpx;
+  margin-right: 16rpx;
+  flex-shrink: 0;
 }
 
-.now-day {
-  font-weight: normal;
-  font-size: 28rpx;
-  color: #222222;
+.DetailsOfRefund .refund-goods{
+  padding: 24rpx;
 }
 
-.tomorrow-day {
-  font-weight: normal;
+.DetailsOfRefund .refund-goods .title-box{
+  display: flex;
+  justify-content: space-between;
+  padding-bottom: 24rpx;
+  font-weight: bold;
   font-size: 28rpx;
-  color: #AAAAAA;
 }
-
-.time-right {
-  margin-top: 50rpx;
-  margin-left: 300rpx;
-  height: 500rpx;
-  overflow-y: auto; 
-  font-weight: normal;
-  font-size: 28rpx;
+.DetailsOfRefund .refund-goods .title-box .title{
   color: #222222;
 }
-.time-right::-webkit-scrollbar {
-  display: none;
+.DetailsOfRefund .refund-goods .title-box .price{
+  color: #FF4D3A;
 }
-.sel-time {
-  margin-bottom:28rpx;
-  font-weight: normal;
-  font-size: 28rpx;
-  color: #AAAAAA;
+
+.DetailsOfRefund .refund-goods .good-list{
 }
-.sel-timeselected{
-  margin-bottom:28rpx;
-  color: #222222;
+.DetailsOfRefund .refund-goods .good-list .good-item{
+  border-top:1rpx solid #F0F0F0;
+  padding: 20rpx 0;
+  display: flex;
+
 }
-.info-card-box {
-  margin-top: 20rpx;
-  background-color: #F9F9F9;
+.DetailsOfRefund .refund-goods .good-list .good-item .img{
+  width: 120rpx;
+  height: 120rpx;
   border-radius: 16rpx;
-  padding: 20rpx;
+  background: #F6F6F6;
 }
-
-.card-address {
-  font-family: PingFang SC, PingFang SC;
-  font-weight: normal;
-  font-size: 28rpx;
-  color: #222222;
+.DetailsOfRefund .refund-goods .good-list .good-item .info{
+  margin-left: 20rpx;
+  flex: 1;
 }
-
-.card-info {
-  margin-top: 20rpx;
-  font-family: PingFang SC, PingFang SC;
+.DetailsOfRefund .refund-goods .good-list .good-item .info .good-name{
   font-weight: bold;
   font-size: 28rpx;
   color: #222222;
 }
-
-.card-user {
-  margin-top: 20rpx;
-  font-family: PingFang SC, PingFang SC;
-  font-weight: normal;
+.DetailsOfRefund .refund-goods .good-list .good-item .info .desc{
   font-size: 24rpx;
   color: #AAAAAA;
+  margin-top: 10rpx;
 }
-
-.card-line {
-  margin-top: 20rpx;
-  border: 2rpx solid #F0F0F0;
-}
-
-.card-time-box {
-  margin-top: 20rpx;
-  display: flex;
-  align-items: center;
-  justify-content: space-between;
-}
-
-.card-time {
-  font-family: PingFang SC, PingFang SC;
-  font-weight: normal;
-  font-size: 28rpx;
-  color: #222222;
-}
-
-.up-time {
-  font-family: PingFang SC, PingFang SC;
-  font-weight: normal;
-  font-size: 28rpx;
+.DetailsOfRefund .refund-goods .good-list .good-item .info .price{
   color: #AAAAAA;
+  font-size: 24rpx;
 }
-
-.costSide-card {
-  margin-top: 20rpx;
-  background-color: #F9F9F9;
-  border-radius: 16rpx;
-  padding: 20rpx;
+.DetailsOfRefund .refund-goods .good-list .good-item .price-box{
   display: flex;
-  align-items: center;
+  flex-direction: column;
   justify-content: space-between;
+  align-items: flex-end;
 }
-
-.costSide-card>view:first-child {
-  font-family: PingFang SC, PingFang SC;
-  font-weight: normal;
-  font-size: 28rpx;
-  color: #222222;
+.DetailsOfRefund .refund-goods .good-list .good-item .price-box .price{
+  font-weight: bold;
+  font-size: 32rpx;
+  color: #FF4D3A;
 }
-
-.costSide-card>view:last-child {
-  font-family: PingFang SC, PingFang SC;
-  font-weight: normal;
-  font-size: 28rpx;
+.DetailsOfRefund .refund-goods .good-list .good-item .price-box .num{
+  font-size: 24rpx;
   color: #AAAAAA;
 }
-
-.bottom-button-box {
-  background: #FFFFFF;
-  box-shadow: 0rpx -6rpx 12rpx 2rpx rgba(0, 0, 0, 0.09);
-  border-radius: 32rpx 32rpx 0rpx 0rpx;
+.DetailsOfRefund .refund-goods .open-btn{
   display: flex;
+  align-items: center;
   justify-content: center;
+  font-size: 24rpx;
+  color: #222222;
+  margin-top: 20rpx;
 }
-
-.bottom-button {
-  width: 702rpx;
-  height: 80rpx;
-  background: #FF941A;
-  border-radius: 40rpx;
-  margin-top: 30rpx;
-  font-family: PingFang SC, PingFang SC;
-  font-weight: bold;
-  font-size: 28rpx;
-  color: #FFFFFF;
-  text-align: center;
-  line-height: 80rpx;
+.DetailsOfRefund .refund-goods .open-btn .arrow{
+  width: 20rpx;
+  height: 20rpx;
 }
 
-.picker-style {
-  font-size: 16rpx !important;
-  margin-left: -80rpx;
+.DetailsOfRefund .goods-info{
+  padding: 24rpx;
 }
-
-.send-pay-box {
+.DetailsOfRefund .goods-info .item{
   display: flex;
-  align-items: center;
-  margin-top: 30rpx;
-}
+  justify-content: space-between;
+  padding-bottom: 28rpx;
 
-.sendpay-text {
-  font-family: PingFang SC, PingFang SC;
-  font-weight: normal;
-  font-size: 28rpx;
-  width: 400rpx;
 }
-
-.sendpay-btn {
-  width: 220rpx;
-  height: 80rpx;
-  background: #FF941A;
-  border-radius: 40rpx;
-  font-family: PingFang SC, PingFang SC;
-  font-weight: bold;
+.DetailsOfRefund .goods-info .item .label{
   font-size: 28rpx;
-  color: #FFFFFF;
-  line-height: 80rpx;
-  text-align: center;
-}
-
-/* 查看协商记录 */
-/* .negotiate-record {
-  position: relative;
-  font-size: 25rpx;
-  text-align: left;
-  background: #fff;
-  padding: 20rpx 25rpx;
-  margin-bottom: 20rpx;
-}
-.more-arrow {
-  position: absolute;
-  right: 20rpx;
-  top: 50%;
-  transform: translateY(-50%);
-  width: 22rpx;
-  height: 22rpx;
-} */
-
-
-/* 退款信息 */
-.refund-message {
-  background: #fff;
-  padding: 20rpx 25rpx;
+  color: #222222;
 }
 
-.refund-txt {
-  font-size: 30rpx;
-  margin-bottom: 25rpx;
+.DetailsOfRefund .goods-info .item .value{
   font-weight: bold;
-}
-
-/* 店铺 */
-.shop-box {
-  display: block;
-  padding-bottom: 20rpx;
-  margin-bottom: 20rpx;
-  border-bottom: 1rpx solid #f0f0f0;
-}
-
-.shop-img {
-  display: inline-block;
-  width: 36rpx;
-  height: 36rpx;
-  vertical-align: middle;
-  margin-right: 10rpx;
-}
-
-.shop-img>iamge {
-  display: block;
-  width: 100%;
-  height: 100%;
-}
-
-.shopname {
-  display: inline-block;
-  font-size: 28rpx;
-  line-height: 1em;
-  vertical-align: middle;
-  color: #444444;
-}
-
-/* 商品信息 */
-.goods-msg-box {
-  background: #f9f9f9;
-  padding: 15rpx 20rpx;
-  margin: 15rpx 0;
-}
-
-.img-box {
-  display: inline-block;
-  width: 150rpx;
-  height: 150rpx;
-  margin-right: 20rpx;
-  background: #eee;
-  vertical-align: top;
-}
-
-.goods-text {
-  display: inline-block;
-  vertical-align: top;
-  width: 70%;
-}
-
-.goods-title {
   font-size: 28rpx;
-  display: -webkit-box;
-  -webkit-line-clamp: 2;
-  /*设定显示行数*/
-  -webkit-box-orient: vertical;
-  word-break: break-all;
-  overflow: hidden;
-  text-overflow: ellipsis;
+  color: #FF4D3A;
 }
-
-.goods-quantity {
-  font-size: 28rpx;
-  color: #888888;
-  margin-top: 20rpx;
+.DetailsOfRefund .goods-info .total{
+  display: flex;
+  justify-content: space-between;
+  padding-top: 28rpx ;
+  border-top: 2rpx solid #F0F0F0;
 }
-
-/* 具体信息 */
-.refund-cont {
+.DetailsOfRefund .goods-info .total .label{
+  font-weight: bold;
   font-size: 28rpx;
-  color: #666666;
-  line-height: 2em;
+  color: #222222;
 }
-
-/* 联系商家 */
-.contact-merchant {
+.DetailsOfRefund .goods-info .total .value{
+  font-weight: bold;
   font-size: 28rpx;
-  color: #FF941A;
-  text-align: center;
-  padding-top: 20rpx;
-  margin-top: 20rpx;
-  border-top: 1rpx solid #f2f2f2;
-}
-
-button.contact-merchant {
-  background: #fff;
-}
-
-button.contact-merchant::after {
-  border: 0;
+  color: #FF4D3A;
 }
 
-/* 整单退款商品列表 */
-.refund-goods-item {
-  padding: 20rpx 0;
-  border-bottom: 2rpx solid #ddd;
+.DetailsOfRefund .order-info{
+  padding: 28rpx 24rpx;
 }
-
-.refund-goods-item:last-child {
-  border-bottom: none;
+.DetailsOfRefund .order-info .title{
+  font-weight: bold;
+  font-size: 32rpx;
+  color: #222222;
 }
-
-/* 脚部撤销 */
-.foot-box {
-  display: block;
-  margin-top: 150rpx;
+.DetailsOfRefund .order-info .item{
+  padding-top: 28rpx;
+  display: flex;
+  justify-content: space-between;
 }
-
-.footer {
-  display: block;
-  box-sizing: border-box;
-  position: fixed;
-  width: 100%;
-  bottom: 0;
+.DetailsOfRefund .order-info .item .label{
   font-size: 28rpx;
-  background: #fff;
-  padding: 0 30rpx;
-  text-align: right;
-  box-shadow: 1rpx 10rpx 10rpx 10rpx rgb(236, 236, 236);
+  color: #AAAAAA;
 }
-
-.undo-apply {
-  display: inline-block;
-  box-sizing: border-box;
-  padding: 15rpx 20rpx;
-  font-size: 25rpx;
-  border-radius: 5rpx;
-  margin: 25rpx 0;
-  margin-left: 15rpx;
-  border-radius: 40rpx;
-  border: 1rpx solid #aaaaaa;
-  color: #555555;
+.DetailsOfRefund .order-info .item .value-box{
+  display: flex;
+  align-items: center;
 }
-
-.undo-apply-end {
-  display: inline-block;
-  box-sizing: border-box;
-  margin-left: 15rpx;
-  color: #777;
-  font-size: 30rpx;
-
+.DetailsOfRefund .order-info .item .value-box .icon{
+  width: 30rpx;
+  height: 30rpx;
+  margin-left: 20rpx;
 }
-
-.apply-current {
-  border: 1rpx solid rgb(0, 173, 0);
-  color: rgb(0, 173, 0);
-
+.DetailsOfRefund .order-info .item .value{
+  font-weight: bold;
+  font-size: 28rpx;
+  color: #222222;
 }

+ 0 - 66
pages/DetailsOfRefund1/DetailsOfRefund.js

@@ -1,66 +0,0 @@
-// pages/DetailsOfRefund/DetailsOfRefund.js
-Page({
-
-  /**
-   * 页面的初始数据
-   */
-  data: {
-    
-  },
-
-  /**
-   * 生命周期函数--监听页面加载
-   */
-  onLoad(options) {
-
-  },
-
-  /**
-   * 生命周期函数--监听页面初次渲染完成
-   */
-  onReady() {
-
-  },
-
-  /**
-   * 生命周期函数--监听页面显示
-   */
-  onShow() {
-
-  },
-
-  /**
-   * 生命周期函数--监听页面隐藏
-   */
-  onHide() {
-
-  },
-
-  /**
-   * 生命周期函数--监听页面卸载
-   */
-  onUnload() {
-
-  },
-
-  /**
-   * 页面相关事件处理函数--监听用户下拉动作
-   */
-  onPullDownRefresh() {
-
-  },
-
-  /**
-   * 页面上拉触底事件的处理函数
-   */
-  onReachBottom() {
-
-  },
-
-  /**
-   * 用户点击右上角分享
-   */
-  onShareAppMessage() {
-
-  }
-})

+ 0 - 3
pages/DetailsOfRefund1/DetailsOfRefund.json

@@ -1,3 +0,0 @@
-{
-  "usingComponents": {}
-}

+ 0 - 161
pages/DetailsOfRefund1/DetailsOfRefund.wxml

@@ -1,161 +0,0 @@
-<view class="DetailsOfRefund">
-  <view class="result-box box">
-    <view class="result">
-      <view class="title">退款成功1</view>
-      <view class="desc">已完成退款,具体到账时间请查询支付宝</view>
-    </view>
-    <view class="result">
-    <view class="title-box">
-      <view class="title small">退款成功</view>
-      <view class="price">¥21</view>
-    </view>
-      <view class="desc">已完成退款,具体到账时间请查询支付宝</view>
-    </view>
-  </view>
-
-  <view class="oprate-box box">
-      <view class="item">
-        <image class="icon" src="../../images/icon/del-icon.png" mode=""/>
-        <view class="label">
-          删除订单
-        </view>
-      </view>
-      <!-- <button class='item' open-type="contact" >
-        <image class="icon" src="../../images/icon/chat-icon.png" mode=""/>
-        <view class="label">
-          联系商家
-        </view>
-     </button>
-      <view class="item" >
-        <image class="icon" src="../../images/icon/buy-icon.png" mode=""/>
-        <view class="label">
-          再次购买
-        </view>
-      </view> -->
-    </view>
-
-    <view class="process-box box">
-      <view class="sub-title">退款流程</view>
-      
-      <view class="step-box">
-        <view class="step-item" wx:for="{{4}}">
-          <view class="point {{index == 0?'active':''}}"></view>
-          <view class="line"></view>
-          <view class="title">退款成功</view>
-          <view class="desc">已完成退款,具体到账时间请查询支付宝</view>
-          <view class="time">2024-12-13 11:12:30</view>
-          <view class="img-list" wx:if="{{index == 3}}">
-            <view class="img"></view>
-            <view class="img"></view>
-            <view class="img"></view>
-            <view class="img"></view>
-            <view class="img"></view>
-            <view class="img"></view>
-            <view class="img"></view>
-            <view class="img"></view>
-            <view class="img"></view>
-          </view>
-        </view>
-      </view>
-
-    </view>
-
-    <view class="refund-goods box">
-      <view class="title-box">
-        <view class="title">退款商品</view>
-        <view class="price">退款金额:¥21</view>
-      </view>
-      <view class="good-list">
-        <view class="good-item">
-          <view class="img"></view>
-          <view class="info">
-            <view class="good-name">赶海季生鲜大闸蟹</view>
-            <view class="desc">规格:5kg,盒</view>
-            <view class="price">单价:¥1.8</view>
-          </view>
-          <view class="price-box">
-            <view class="price">¥103.95</view>
-            <view class="num">x1</view>
-          </view>
-        </view>
-        <view class="good-item">
-          <view class="img"></view>
-          <view class="info">
-            <view class="good-name">赶海季生鲜大闸蟹</view>
-            <view class="desc">规格:5kg,盒</view>
-            <view class="price">单价:¥1.8</view>
-          </view>
-          <view class="price-box">
-            <view class="price">¥103.95</view>
-            <view class="num">x1</view>
-          </view>
-        </view>
-        <view class="good-item">
-          <view class="img"></view>
-          <view class="info">
-            <view class="good-name">赶海季生鲜大闸蟹</view>
-            <view class="desc">规格:5kg,盒</view>
-            <view class="price">单价:¥1.8</view>
-          </view>
-          <view class="price-box">
-            <view class="price">¥103.95</view>
-            <view class="num">x1</view>
-          </view>
-        </view>
-
-      </view>
-        <view class="open-btn">
-          展开(共7件) <image class="arrow" src="../../images/icon/black-down-arrow.png" mode=""/>
-        </view>
-    </view>
-
-    <view class="goods-info box">
-      <view class="item">
-        <view class="label">商品金额</view>
-        <view class="value">¥54.00</view>
-      </view>
-      <view class="item">
-        <view class="label">运费(快递)</view>
-        <view class="value">¥54.00</view>
-      </view>
-      <view class="item">
-        <view class="label">积分(1400)</view>
-        <view class="value">¥54.00</view>
-      </view>
-      <view class="total">
-        <view class="label">总计:</view>
-        <view class="value">¥54.00</view>
-      </view>
-    </view>
-
-    <view class="order-info box">
-      <view class="title">订单信息</view>
-      <view class="item">
-        <view class="label">订单编号</view>
-        <view class="value-box">
-          <view class="value">1867402054587256856</view>
-          <image class="icon" src="../../images/icon/copy.png" mode=""/>
-        </view>
-      </view>
-      <view class="item">
-        <view class="label">售后编号</view>
-        <view class="value-box">
-          <view class="value">1867402054587256856</view>
-          <image class="icon" src="../../images/icon/copy.png" mode=""/>
-        </view>
-      </view>
-      <view class="item">
-        <view class="label">申请时间</view>
-        <view class="value">1867402054587256856</view>
-      </view>
-      <view class="item">
-        <view class="label">服务类型</view>
-        <view class="value">仅退款</view>
-      </view>
-      <view class="item">
-        <view class="label">申请原因</view>
-        <view class="value">实物与图片不符合</view>
-      </view>
-    </view>
-
-</view>

+ 0 - 296
pages/DetailsOfRefund1/DetailsOfRefund.wxss

@@ -1,296 +0,0 @@
-/* pages/DetailsOfRefund/DetailsOfRefund.wxss */
-.DetailsOfRefund{
-  padding: 20rpx 24rpx 120rpx;
-  background: #F6F6F6;
-}
-
-.DetailsOfRefund .result-box{
-  padding: 0 28rpx ;
-}
-
-.DetailsOfRefund .result-box .result{
-  position: relative;
-  padding: 24rpx 0;
-  
-}
-
-.DetailsOfRefund .result-box .result .title{
-  font-weight: bold;
-  font-size: 32rpx;
-  color: #222222;
-}
-.DetailsOfRefund .result-box .result .title.small{
-  font-size: 28rpx;
-}
-
-.DetailsOfRefund .result-box .result .desc{
-  font-size: 24rpx;
-  color: #AAAAAA;
-  margin-top: 20rpx;
-}
-.DetailsOfRefund .result-box .result .title-box{
-  display: flex;
-  justify-content: space-between;
-}
-
-.DetailsOfRefund .result-box .result .price{
-  font-weight: bold;
-  font-size: 28rpx;
-  color: #FF4D3A;
-}
-
-.box{
-  background: #FFFFFF;
-  border-radius: 16rpx 16rpx 16rpx 16rpx;
-  margin-bottom: 20rpx;
-}
-
-.DetailsOfRefund .oprate-box{
-  display: flex;
-  padding: 0 24rpx;
-  
-}
-.DetailsOfRefund .oprate-box .item{
-  width: 25%;
-  text-align: center;
-  margin: 0;
-  border: none;
-  background-color: #fff !important;
-  padding: 24rpx 0;
-  display: block!important;
-  -webkit-tap-highlight-color: transparent;
-  outline: none;
-  line-height: normal;
-}
-.DetailsOfRefund wx-button:after {
-  border: none;
-}
-.DetailsOfRefund .oprate-box .item .icon{
-  width: 40rpx;
-  height: 40rpx;
-}
-
-.DetailsOfRefund .oprate-box .item .label{
-  font-size: 28rpx;
-  color: #222222;
-  margin-top: 20rpx;
-}
-.DetailsOfRefund .process-box{
-  padding: 24rpx;
-}
-.DetailsOfRefund .process-box .sub-title{
-  font-weight: bold;
-  font-size: 32rpx;
-  color: #222222;
-  padding-bottom: 20rpx;
-}
-
-.DetailsOfRefund .process-box .step-box{
-
-}
-
-.DetailsOfRefund .process-box .step-box .step-item{
-  position: relative;
-  margin-bottom: 20rpx;
-  padding-left: 34rpx;
-}
-
-.DetailsOfRefund .process-box .step-box .step-item .title{
-  font-weight: bold;
-  font-size: 28rpx;
-  color: #181818;
-}
-.DetailsOfRefund .process-box .step-box .step-item .desc{
-  font-size: 24rpx;
-  color: #AAAAAA;
-  margin-top: 20rpx;
-}
-
-.DetailsOfRefund .process-box .step-box .step-item .time{
-  font-size: 24rpx;
-  color: #AAAAAA;
-  margin-top: 12rpx;
-}
-
-.DetailsOfRefund .process-box .step-box .step-item .point{
-  width: 14rpx;
-  height: 14rpx;
-  border-radius: 50%;
-  background: #CCCCCC;
-  position: absolute;
-  top: 0rpx;
-  left: -7rpx;
-  z-index: 9;
-}
-.DetailsOfRefund .process-box .step-box .step-item .point.active{
-  background: #FF941A;
-}
-
-.DetailsOfRefund .process-box .step-box .step-item .line{
-  width: 2rpx;
-  height: 115rpx;
-  background: #AAAAAA;
-  position: absolute;
-  top: 0;
-  left: 0;
-  z-index: 8;
-}
-.DetailsOfRefund .process-box .step-box .step-item .img-list{
-  display: flex;
-  overflow: auto;
-  margin-top: 12rpx;
-}
-.DetailsOfRefund .process-box .step-box .step-item .img-list .img{
-  width: 120rpx;
-  height: 120rpx;
-  background: #F6F6F6;
-  border-radius: 32rpx 32rpx 32rpx 32rpx;
-  margin-right: 16rpx;
-  flex-shrink: 0;
-}
-
-.DetailsOfRefund .refund-goods{
-  padding: 24rpx;
-}
-
-.DetailsOfRefund .refund-goods .title-box{
-  display: flex;
-  justify-content: space-between;
-  padding-bottom: 24rpx;
-  font-weight: bold;
-  font-size: 28rpx;
-}
-.DetailsOfRefund .refund-goods .title-box .title{
-  color: #222222;
-}
-.DetailsOfRefund .refund-goods .title-box .price{
-  color: #FF4D3A;
-}
-
-.DetailsOfRefund .refund-goods .good-list{
-}
-.DetailsOfRefund .refund-goods .good-list .good-item{
-  border-top:1rpx solid #F0F0F0;
-  padding: 20rpx 0;
-  display: flex;
-
-}
-.DetailsOfRefund .refund-goods .good-list .good-item .img{
-  width: 120rpx;
-  height: 120rpx;
-  border-radius: 16rpx;
-  background: #F6F6F6;
-}
-.DetailsOfRefund .refund-goods .good-list .good-item .info{
-  margin-left: 20rpx;
-  flex: 1;
-}
-.DetailsOfRefund .refund-goods .good-list .good-item .info .good-name{
-  font-weight: bold;
-  font-size: 28rpx;
-  color: #222222;
-}
-.DetailsOfRefund .refund-goods .good-list .good-item .info .desc{
-  font-size: 24rpx;
-  color: #AAAAAA;
-  margin-top: 10rpx;
-}
-.DetailsOfRefund .refund-goods .good-list .good-item .info .price{
-  color: #AAAAAA;
-  font-size: 24rpx;
-}
-.DetailsOfRefund .refund-goods .good-list .good-item .price-box{
-  display: flex;
-  flex-direction: column;
-  justify-content: space-between;
-  align-items: flex-end;
-}
-.DetailsOfRefund .refund-goods .good-list .good-item .price-box .price{
-  font-weight: bold;
-  font-size: 32rpx;
-  color: #FF4D3A;
-}
-.DetailsOfRefund .refund-goods .good-list .good-item .price-box .num{
-  font-size: 24rpx;
-  color: #AAAAAA;
-}
-.DetailsOfRefund .refund-goods .open-btn{
-  display: flex;
-  align-items: center;
-  justify-content: center;
-  font-size: 24rpx;
-  color: #222222;
-  margin-top: 20rpx;
-}
-.DetailsOfRefund .refund-goods .open-btn .arrow{
-  width: 20rpx;
-  height: 20rpx;
-}
-
-.DetailsOfRefund .goods-info{
-  padding: 24rpx;
-}
-.DetailsOfRefund .goods-info .item{
-  display: flex;
-  justify-content: space-between;
-  padding-bottom: 28rpx;
-
-}
-.DetailsOfRefund .goods-info .item .label{
-  font-size: 28rpx;
-  color: #222222;
-}
-
-.DetailsOfRefund .goods-info .item .value{
-  font-weight: bold;
-  font-size: 28rpx;
-  color: #FF4D3A;
-}
-.DetailsOfRefund .goods-info .total{
-  display: flex;
-  justify-content: space-between;
-  padding-top: 28rpx ;
-  border-top: 2rpx solid #F0F0F0;
-}
-.DetailsOfRefund .goods-info .total .label{
-  font-weight: bold;
-  font-size: 28rpx;
-  color: #222222;
-}
-.DetailsOfRefund .goods-info .total .value{
-  font-weight: bold;
-  font-size: 28rpx;
-  color: #FF4D3A;
-}
-
-.DetailsOfRefund .order-info{
-  padding: 28rpx 24rpx;
-}
-.DetailsOfRefund .order-info .title{
-  font-weight: bold;
-  font-size: 32rpx;
-  color: #222222;
-}
-.DetailsOfRefund .order-info .item{
-  padding-top: 28rpx;
-  display: flex;
-  justify-content: space-between;
-}
-.DetailsOfRefund .order-info .item .label{
-  font-size: 28rpx;
-  color: #AAAAAA;
-}
-.DetailsOfRefund .order-info .item .value-box{
-  display: flex;
-  align-items: center;
-}
-.DetailsOfRefund .order-info .item .value-box .icon{
-  width: 30rpx;
-  height: 30rpx;
-  margin-left: 20rpx;
-}
-.DetailsOfRefund .order-info .item .value{
-  font-weight: bold;
-  font-size: 28rpx;
-  color: #222222;
-}

+ 669 - 0
pages/DetailsOfRefund2/DetailsOfRefund.js

@@ -0,0 +1,669 @@
+// pages/DetailsOfRefund/DetailsOfRefund.js
+var http = require('../../utils/http.js');
+var util = require('../../utils/util.js');
+Page({
+
+  /**
+   * 页面的初始数据
+   */
+  data: {
+    showView: true, //隐藏是展示
+    applyTime: '', //申请时间
+    applyType: 1, //申请类型:1,仅退款,2退款退货
+    goodsNum: '', //退货数量
+    handelTime: '', //卖家处理时间
+    orderAmount: '', //订单总金额
+    orderItems: {}, //订单项 
+    refundAmount: '', //退款金额
+    refundDelivery: [], //收货地址对象
+    refundId: '', //记录ID
+    refundTime: '', //退款时间
+    returnMoneySts: 1, //处理退款状态:(1.买家申请 2.卖家接受 3.买家发货 4.卖家收货 5.退款成功 6.买家撤回申请 7.商家拒绝 -1.退款关闭)
+    updateTime: '', //更新时间
+    refundSn: '', //退款编号
+    rejectMessage: '', //拒绝理由
+    buyerReason: '', //退款原因
+    shopName: '', //店铺名称
+    refundScore: 0, // 退款积分
+    addCarshow: false,
+    selectTimeshow: false,
+    flowShow: false,
+    userAddrDto: {},
+    payer: '',
+    sendPay:'',
+    sts: 0,
+    nomDay: '',
+    tomorrowDay: '',
+    timeIntervals: [],
+    columns: [],
+    combinedTextValue: '',
+    sendInfo: {},
+    currentSelectedIndex: -1, // 初始没有选中项,索引设为 -1
+    steps: [{
+        text: '步骤一',
+        desc: '描述信息',
+        inactiveIcon: 'location-o',
+        activeIcon: 'success',
+      },
+      {
+        text: '步骤二',
+        desc: '描述信息',
+        inactiveIcon: 'circle',
+        activeIcon: 'plus',
+      },
+      {
+        text: '步骤三',
+        desc: '描述信息',
+        inactiveIcon: 'circle',
+        activeIcon: 'cross',
+      },
+      {
+        text: '步骤四',
+        desc: '描述信息',
+        inactiveIcon: 'circle',
+        activeIcon: 'fail',
+      },
+    ],
+    cancelPay: false,
+    remainingTime: '',
+    timeFormat: '',
+    orderNumSend:'',
+    countdown_hours:'',
+    countdown_minutes:''
+  },
+
+  /**
+   * 生命周期函数--监听页面加载
+   */
+  onLoad: function (options) {
+    this.setData({
+      orderNumSend:options.orderNumber
+    })
+    this.getTime()
+    this.setData({
+      refundSn: options.refundSn,
+    });
+    if(options.userAddrDto){
+      this.setData({
+        userAddrDto: JSON.parse(options.userAddrDto)
+      })
+    }
+    //获取退款申请详情
+    this.getRefundDetail()
+  },
+
+  /**
+   * 更多说明&收起
+   */
+  onChangeShowState: function () {
+    var that = this;
+    that.setData({
+      showView: (!that.data.showView)
+    })
+  },
+  // 发起配送
+  sendDistribution: function () {
+    this.setData({
+      addCarshow: true
+    })
+  },
+  onClose: function () {
+    this.setData({
+      addCarshow: false
+    })
+  },
+  timeOnClose: function () {
+    this.setData({
+      selectTimeshow: false
+    })
+  },
+  submitBtn:function(){
+    if (Object.keys(this.data.sendInfo).length === 0) {
+      wx.showToast({
+        title: '请先选择取件时间',
+        icon: 'none'
+      })
+      return
+    }
+    this.submitExpress()
+  },
+  submitExpress:function(){
+    var params = {
+      url: `/p/orderRefund/submitExpress/${this.data.refundSn}`,
+      method: "GET",
+      callBack: res => {
+        wx.showToast({
+          title: '提交成功',
+          icon: 'none',
+        })
+        this.setData({
+          addCarshow:false
+        })
+        this.getRefundDetail()
+      }
+    };
+    http.request(params);
+  },
+  // 辅助函数,将中文日期格式转换为YYYY-MM-DD格式
+  formatDate: function (dateStr) {
+    let parts = dateStr.match(/(\d+)月(\d+)日/);
+    if (parts) {
+      let month = parseInt(parts[1]);
+      let day = parseInt(parts[2]);
+      let year = new Date().getFullYear();
+      return `${year}-${month.toString().padStart(2, '0')}-${day.toString().padStart(2, '0')}`;
+    }
+    return dateStr;
+  },
+  selectUpTime: function () {
+    this.getDayTime()
+    this.getTime()
+    let day = []
+    day.push({
+      id: 1,
+      text: this.data.nomDay
+    }, {
+      id: 2,
+      text: this.data.tomorrowDay
+    })
+    let data = []
+    data.push({
+      values: day,
+      className: 'column1',
+    }, {
+      values: this.data.timeIntervals,
+      defaultIndex: 2,
+      className: 'column2',
+    })
+    this.setData({
+      selectTimeshow: true,
+      columns: data
+    })
+  },
+
+  // 获取今明天并转换
+  getDayTime: function () {
+    const today = new Date();
+    const month = (today.getMonth() + 1).toString().padStart(2, '0');
+    const day = today.getDate().toString().padStart(2, '0');
+    const todayFormat = `${month}月${day}日`;
+    const tomorrow = new Date(today.getTime() + 24 * 60 * 60 * 1000);
+    const tomorrowMonth = (tomorrow.getMonth() + 1).toString().padStart(2, '0');
+    const tomorrowDay = tomorrow.getDate().toString().padStart(2, '0');
+    const tomorrowFormat = `${tomorrowMonth}月${tomorrowDay}日`;
+    this.setData({
+      nomDay: todayFormat,
+      tomorrowDay: tomorrowFormat
+    })
+  },
+
+  // 时间段转换
+  getTime: function (selectedDate) {
+    const timeIntervals = [];
+    // 如果没有传入日期参数(首次加载等情况),则使用当前日期
+    const now = selectedDate ? new Date(selectedDate) : new Date();
+    if (isNaN(now.getTime())) {
+      console.error('传入的日期格式不正确,无法解析为有效日期');
+      return;
+    }
+    const currentTimeStamp = now.getTime();
+    for (let hour = 0; hour < 23; hour++) {
+      const start = hour.toString().padStart(2, '0') + ':00';
+      const end = (hour + 1).toString().padStart(2, '0') + ':00';
+      const interval = start + '~' + end;
+      // 创建对应时间段开始时间的日期对象
+      const startDate = new Date(now);
+      startDate.setHours(hour, 0, 0, 0);
+      const startTimestamp = startDate.getTime();
+      // 通过比较时间戳来判断时间段是否已过去
+      const hidden = startTimestamp < currentTimeStamp;
+      timeIntervals.push({
+        text: interval,
+        disabled: hidden
+      });
+    }
+    this.setData({
+      timeIntervals
+    });
+  },
+
+  // 日期转换方法
+  convertDateToNumber: function (dateStr) {
+    if (!dateStr) {
+      throw new Error('日期字符串不能为空');
+    }
+    dateStr = dateStr.trim();
+    let parts = dateStr.match(/(\d+)月(\d+)日/);
+    if (!parts) {
+      throw new Error('日期格式不正确,请按照XX月XX日的格式输入');
+    }
+    return new Date(2024, parseInt(parts[1]) - 1, parseInt(parts[2]));
+  },
+
+  // 选择器change事件
+  onChange(event) {
+    const {
+      picker,
+      value,
+      index
+    } = event.detail;
+    value.map((item, index) => {
+      if (index === 0) {
+        var date1 = this.convertDateToNumber(item.text);
+        var date2 = new Date();
+        if (date1 > date2) {
+          this.updateTimeIntervalsDisabled(item.id);
+        } else {
+          this.updateTimeIntervalsDisabled(item.id);
+        }
+      }
+    })
+  },
+  onConfirm(event) {
+    const {
+      picker,
+      value,
+      index
+    } = event.detail;
+    var currentDate = new Date();
+    var currentYear = currentDate.getFullYear();
+    if (value.length >= 2) {
+      const text1 = value[0].text; //text1为12月25日
+      const text2 = value[1].text.slice(0, 5); //text2为15:00
+      const month = ("0" + (parseInt(text1.split("月")[0]))).slice(-2); // 将中文月格式转换为数字(注意要减1,因为月份是从0开始计数),并补0
+      const day = text1.split("月")[1].split("日")[0];
+      const hour = text2.split(":")[0];
+      const minute = text2.split(":")[1];
+      const combinedText = `${currentYear}-${month}-${day} ${hour}:${minute}:00`;
+      let dateObj = new Date(combinedText);
+      let timestamp = Math.floor(dateObj.getTime() / 1000);
+      // 获取配送费
+      let that = this
+      var params = {
+        url: "/p/orderRefund/refundPrice",
+        method: "GET",
+        data: {
+          refundSn: this.data.refundSn, //退款编号
+          deliveryTime: timestamp
+        },
+        callBack: function (res) {
+          that.setData({
+            sendInfo: res
+          })
+        }
+      };
+      http.request(params);
+      this.setData({
+        combinedTextValue: combinedText,
+        selectTimeshow: false
+      });
+    }
+  },
+  onCancel: function () {
+    this.setData({
+      selectTimeshow: false
+    })
+  },
+  toPaySend: function () {
+    if (Object.keys(this.data.sendInfo).length === 0) {
+      wx.showToast({
+        title: '请先选择取件时间',
+        icon: 'none'
+      })
+      return
+    } else {
+      let that = this
+      wx.showLoading({
+        mask: true
+      });
+      var params = {
+        url: "/p/order/refundPay",
+        method: "POST",
+        data: {
+          payType: 1,
+          orderType: 1,
+          orderNumbers: this.data.refundSn
+        },
+        callBack: (res) => {
+          wx.hideLoading();
+          wx.requestPayment({
+            timeStamp: res.timeStamp,
+            nonceStr: res.nonceStr,
+            package: res.package,
+            signType: res.signType,
+            paySign: res.paySign,
+            success: e => {
+              wx.showModal({
+                title: '支付成功',
+                content: '',
+                showCancel: false,
+                success: () => {
+                  this.setData({
+                    addCarshow:false
+                  })
+                  this.submitExpress()
+                }
+              })
+            },
+            fail: err => {
+              // this.countdownTime()
+              // that.setData({
+              //   cancelPay: true,
+              //   addCarshow:false
+              // })
+            }
+          })
+        }
+      };
+      http.request(params);
+    }
+  },
+  atoncePaySend: function () {
+    wx.showLoading({
+      mask: true
+    });
+    var params = {
+      url: "/p/order/refundPay",
+      method: "POST",
+      data: {
+        payType: 1,
+        orderType: 1,
+        orderNumbers: this.data.refundSn
+      },
+      callBack: (res) => {
+        wx.hideLoading();
+        wx.requestPayment({
+          timeStamp: res.timeStamp,
+          nonceStr: res.nonceStr,
+          package: res.package,
+          signType: res.signType,
+          paySign: res.paySign,
+          success: e => {
+            wx.showModal({
+              title: '支付成功',
+              content: '',
+              showCancel: false,
+              success: () => {
+                // this.setData({
+                //   cancelPay: false
+                // })
+                this.getRefundDetail()
+              }
+            })
+          },
+          fail: err => {}
+        })
+      }
+    };
+    http.request(params);
+  },
+  // 倒计时
+  countdownTime: function () {
+    // 十五分钟对应的毫秒数
+    const fifteenMinutesInMs = 15 * 60 * 1000;
+    const targetTimeStamp = this.data.sendInfo.touchTime;
+    // 计算增加十五分钟后的时间戳
+    const newTimeStamp = targetTimeStamp + fifteenMinutesInMs;
+    const currentTimeStamp = newTimeStamp;
+    const diff = currentTimeStamp - targetTimeStamp;
+    if (diff > 0) {
+      this.setData({
+        remainingTime: diff,
+      });
+      this.countdown();
+    } else {
+    }
+  },
+  // 倒计时
+  countdown: function () {
+    const interval = setInterval(() => {
+      if (this.data.remainingTime <= 0) {
+        clearInterval(interval);
+        this.setData({
+          cancelPay: false
+        })
+        return;
+      }
+      this.setData({
+        remainingTime: this.data.remainingTime - 1000,
+      });
+      // 将剩余时间(毫秒)转换为时分秒格式
+      const hours = Math.floor(this.data.remainingTime / (1000 * 60 * 60));
+      const minutes = Math.floor((this.data.remainingTime % (1000 * 60 * 60)) / (1000 * 60));
+      const seconds = Math.floor((this.data.remainingTime % (1000 * 60)) / 1000);
+      const timeFormat = `${this.padZero(hours)}:${this.padZero(minutes)}:${this.padZero(seconds)}`;
+      this.setData({
+        timeFormat: timeFormat
+      });
+    }, 1000);
+  },
+  // 辅助函数,用于将数字转换为两位数格式(不足两位前面补0)
+  padZero(num) {
+    return num < 10 ? '0' + num : num.toString();
+  },
+  // 根据id判断是否开启disabled
+  updateTimeIntervalsDisabled(id) {
+    let datatime = this.data.timeIntervals.map(subItem => {
+      if (id === 2) {
+        subItem.disabled = false;
+      } else if (id === 1) {
+        // 选中当天重新调用getTime方法判断当前时间
+        this.getTime()
+      }
+      return subItem;
+    });
+    // copy上面的数据结构,待优化
+    let day = []
+    day.push({
+      id: 1,
+      text: this.data.nomDay
+    }, {
+      id: 2,
+      text: this.data.tomorrowDay
+    })
+    let data = []
+    data.push({
+      values: day,
+      className: 'column1',
+    }, {
+      values: this.data.timeIntervals,
+      defaultIndex: 2,
+      className: 'column2',
+    })
+    this.setData({
+      timeIntervals: datatime,
+      columns: data
+    });
+  },
+  flowBution: function () {
+    wx.navigateTo({
+      url: '/pages/MaterialFlowInfo/MaterialFlowInfo?refundSn=' + this.data.refundSn
+    })
+    // this.setData({
+    //   flowShow: true
+    // })
+    // wx.navigateTo({
+    //   url: '/pages/MaterialFlow/MaterialFlow',
+    // })
+  },
+  flowOnClose: function () {
+    this.setData({
+      flowShow: false
+    })
+  },
+  /**
+   * 获取退款申请详情
+   */
+  getRefundDetail: function (e) {
+    var ths = this;
+    // wx.showLoading({})
+    var params = {
+      url: "/p/orderRefund/info",
+      method: "GET",
+      data: {
+        refundSn: this.data.refundSn //退款编号
+      },
+      callBack: function (res) {
+        let img=''
+        res.orderItems.map(item=>{
+          img=item.pic.split(',')
+          item.pic=img[0]
+        })
+        ths.setData({
+          applyTime: res.applyTime, //申请时间
+          applyType: res.applyType, //申请类型:1,仅退款,2退款退货
+          goodsNum: res.goodsNum, //退货数量
+          handelTime: res.handelTime, //卖家处理时间
+          orderAmount: res.orderAmount, //订单总金额
+          orderItems: res.orderItems, //订单项 
+          refundSn: res.refundSn, //退款编号
+          refundAmount: res.refundAmount, //退款金额
+          refundDelivery: res.refundDelivery, //收货地址对象
+          refundId: res.refundId, //记录ID
+          refundTime: res.refundTime, //退款时间
+          returnMoneySts: res.returnMoneySts, //处理退款状态:(1.买家申请 2.卖家接受 3.买家发货 4.卖家收货 5.退款成功 6.买家撤回申请 7.商家拒绝 -1.退款关闭)
+          updateTime: res.updateTime, //更新时间
+          rejectMessage: res.rejectMessage, //拒绝理由
+          buyerReason: res.buyerReason, //退款原因
+          shopName: res.shopName,
+          refundScore: res.refundScore, // 退款积分
+          payer: res.refundDelivery.payer,//运费承担方
+          sendPay:res.refundDelivery.deyNu //物流编号,判断是否提交成功
+        })
+        wx.hideLoading();
+        ths.get_countDown()
+      }
+    };
+    http.request(params);
+  },
+/**
+ * 同意后倒计时
+ * @param {*} e 
+ */
+get_countDown:function(){
+  const start = new Date(this.data.handelTime);
+    const end = new Date(start.getTime() + 48 * 60 * 60 * 1000);
+    const interval = setInterval(() => {
+      const now = new Date();
+      const diff = end - now;
+      if (diff <= 0) {
+        clearInterval(interval);
+        this.setData({
+          countdown_hours: '00天',
+          countdown_minutes:'00分钟'
+        });
+      } else {
+        const hours = Math.floor(diff / (1000 * 60 * 60));
+        const minutes = Math.floor((diff % (1000 * 60 * 60)) / (1000 * 60));
+        this.setData({
+          countdown_hours:String(hours).padStart(2, '0'),
+          countdown_minutes:String(minutes).padStart(2, '0')
+          // countdown_time:`${String(hours).padStart(2, '0')}小时${String(minutes).padStart(2, '0')}分钟`
+        });
+      }
+    }, 1000);
+},
+  /**
+   * 撤销退货退款申请
+   */
+  cancelApplication: function (e) {
+    wx.showModal({
+      title: '撤销',
+      content: '确定要撤销本次申请?',
+      success: (res) => {
+        if (res.confirm) {
+          wx.showLoading({})
+          var params = {
+            url: "/p/orderRefund/cancel",
+            method: "GET",
+            data: {refundSn:this.data.refundSn} , //退款订单编号
+            callBack: function (res) {
+              wx.hideLoading();
+              wx.navigateTo({
+                url: '/pages/afterSales/afterSales',
+              })
+            }
+          };
+          http.request(params);
+        } else {
+          console.log('取消')
+        }
+      }
+    })
+
+  },
+
+
+  /**
+   * 跳转修改退款申请
+   */
+  // toAlterRefundApply: function (e) {
+  //   var refundSn = e.currentTarget.dataset.refundsn;
+  //   console.log(e.currentTarget.dataset.refundsn)
+  //   wx.navigateTo({
+  //     url: '/pages/applyRefund/applyRefund?refundSn=' + refundSn,
+  //   })
+  // },
+
+
+  /**
+   * 填写物流信息
+   */
+  toLogisticsPage: function (e) {
+    var refundSn = e.currentTarget.dataset.refundsn;
+    console.log(e.currentTarget.dataset.refundsn)
+    wx.navigateTo({
+      url: '/pages/writeReturnLogistics/writeReturnLogistics?refundSn=' + refundSn,
+    })
+  },
+
+
+  /**
+   * 生命周期函数--监听页面初次渲染完成
+   */
+  onReady: function () {
+
+  },
+
+  /**
+   * 生命周期函数--监听页面显示
+   */
+  onShow: function () {
+
+  },
+
+  /**
+   * 生命周期函数--监听页面隐藏
+   */
+  onHide: function () {
+
+  },
+
+  /**
+   * 生命周期函数--监听页面卸载
+   */
+  onUnload: function () {
+
+  },
+
+  /**
+   * 页面相关事件处理函数--监听用户下拉动作
+   */
+  onPullDownRefresh: function () {
+
+  },
+
+  /**
+   * 页面上拉触底事件的处理函数
+   */
+  onReachBottom: function () {
+
+  },
+
+  /**
+   * 用户点击右上角分享
+   */
+  onShareAppMessage: function () {
+
+  }
+})

+ 5 - 0
pages/DetailsOfRefund2/DetailsOfRefund.json

@@ -0,0 +1,5 @@
+{
+  "usingComponents": {},
+  "backgroundTextStyle": "light",
+  "navigationBarTitleText": "退款详情"
+}

+ 268 - 0
pages/DetailsOfRefund2/DetailsOfRefund.wxml

@@ -0,0 +1,268 @@
+<!-- 退款详情 -->
+<!--pages/DetailsOfRefund/DetailsOfRefund.wxml-->
+
+<view class="page">
+  <!-- 头部状态 -->
+  <view class="describe-box">
+    <!-- 申请行进流程 -->
+    <view class="process">
+      <!-- 提交申请 -->
+      <view class="current-process" wx:if="{{returnMoneySts == 1}}">退款申请待商家处理</view>
+      <view class="acount-for-process" wx:if="{{returnMoneySts == 1}}">
+        你已成功发起退款申请,等待商家处理
+      </view>
+      <view class="acount-for-process" wx:if="{{returnMoneySts == 1}}">
+        {{updateTime}}
+      </view>
+      <!-- 商家拒绝 -->
+      <view class="current-process" wx:if="{{returnMoneySts == 7}}">商家不同意退款申请</view>
+      <view class="acount-for-process" wx:if="{{returnMoneySts == 7}}">
+        你可以修改退款申请
+      </view>
+      <view class="acount-for-process" wx:if="{{returnMoneySts == 7}}">
+        {{updateTime}}
+      </view>
+      <!-- 商家同意退款 -->
+      <view class="current-process" wx:if="{{returnMoneySts == 2}}">商家同意退款</view>
+      <view class="acount-for-process" wx:if="{{returnMoneySts == 2 && applyType == 1}}">
+        商家已同意,等待系统退款
+      </view>
+      <view class="acount-for-process" wx:if="{{returnMoneySts == 2 && applyType == 2}}">
+        商家已同意,请按照商家给出的退货地址寄回商品
+      </view>
+      <view class="acount-for-process" wx:if="{{returnMoneySts == 2}}">
+        {{updateTime}}
+      </view>
+      <!-- 寄出商品(退货退款情况下) -->
+      <view class="current-process" wx:if="{{returnMoneySts == 3}}">等待商家确认收货并退款</view>
+      <view class="acount-for-process" wx:if="{{returnMoneySts == 3}}">
+        你已退货,商家将在收货后尽快处理
+      </view>
+      <view class="acount-for-process" wx:if="{{returnMoneySts == 3}}">
+        {{updateTime}}
+      </view>
+      <!-- 商家确认收货 -->
+      <view class="current-process" wx:if="{{returnMoneySts == 4}}">商家确认收货</view>
+      <view class="acount-for-process" wx:if="{{returnMoneySts == 4}}">
+        商家已确认收货,等待系统退款
+      </view>
+      <view class="acount-for-process" wx:if="{{returnMoneySts == 4}}">
+        {{updateTime}}
+      </view>
+      <!-- 退款成功 -->
+      <view class="current-process" wx:if="{{returnMoneySts == 5}}">退款成功</view>
+      <view class="acount-for-process" wx:if="{{returnMoneySts == 5}}">
+        {{refundTime}}
+      </view>
+      <!-- 退款申请关闭 -->
+      <view class="current-process" wx:if="{{returnMoneySts == -1}}">退款申请关闭</view>
+      <view class="acount-for-process" wx:if="{{returnMoneySts == -1}}">
+        <!-- 由于你超时未处理,系统已关闭本次退款申请 -->
+        {{rejectMessage?rejectMessage:''}}
+      </view>
+      <view class="acount-for-process" wx:if="{{returnMoneySts == -1}}">
+        {{updateTime}}
+      </view>
+      <!-- 买家撤回申请 -->
+      <view class="current-process" wx:if="{{returnMoneySts == 6}}">申请已撤回</view>
+      <view class="acount-for-process" wx:if="{{returnMoneySts == 6}}">
+        你已撤回本次退款申请
+      </view>
+      <view class="acount-for-process" wx:if="{{returnMoneySts == 6}}">
+        {{updateTime}}
+      </view>
+      <!-- 隐藏内容(仅退款) -->
+      <view class="{{showView?'display':'more-content'}}" wx:if="{{returnMoneySts == 1}}">
+        <view class="cont">如果商家同意,申请将达成并退款给你</view>
+        <view class="cont">如果商家拒绝,你可以修改退款申请重新尝试</view>
+        <!-- <view class="cont">如果商家逾期未处理,退款申请将自动达成并退款给你</view> -->
+      </view>
+      <!-- 隐藏内容(退货退款申请商品未寄出) -->
+      <view class="{{showView?'display':'more-content'}}" wx:if="{{returnMoneySts == 2}}">
+        <view class="cont">如果商家同意,请按照给出的退货地址退货</view>
+        <view class="cont">如果商家拒绝,你可以修改退款申请重新尝试</view>
+        <!-- <view class="cont">如果商家逾期未处理,请按照系统给出的退货地址退货</view> -->
+      </view>
+      <!-- 隐藏内容(退货退款并已寄出货物) -->
+      <view class="{{showView?'display':'more-content'}}" wx:if="{{returnMoneySts == 3}}">
+        <view class="cont">如果商家确认收货,申请将达成并退款给你</view>
+        <view class="cont">如果商家拒绝收货,你可以修改退货物流信息重新尝试</view>
+        <!-- <view class="cont">如果商家逾期未处理,系统将自动确认收货并退款给你</view> -->
+      </view>
+    </view>
+    <!-- 申请行进流程end -->
+
+    <!-- 更多说明 -->
+    <view class="{{showView?'more-instructions':'display'}}" bindtap="onChangeShowState" wx:if="{{returnMoneySts < 4 && returnMoneySts !== -1 && applyType == 2}}">
+      <text class="more-txt">更多说明</text>
+      <view class="down-arrow-icon">
+        <image src="../../images/icon/down-arrow.png"></image>
+      </view>
+    </view>
+    <!-- 收起 -->
+    <view class="{{showView?'display':'more-instructions'}}" bindtap="onChangeShowState" wx:if="{{returnMoneySts < 4 && returnMoneySts !== -1 && applyType == 2}}">
+      <text class="more-txt">收起</text>
+      <view class="down-arrow-icon">
+        <image src="../../images/icon/up-arrow.png"></image>
+      </view>
+    </view>
+  </view>
+  <!-- 头部状态end -->
+
+  <!-- 【退款申请被拒绝时显示】拒绝理由 -->
+  <view class="refuse-reason" wx:if="{{returnMoneySts == 7}}">
+    拒绝理由:{{rejectMessage}}
+  </view>
+  <!-- 退货方式 -->
+  <!-- wx:if="{{returnMoneySts == 2 && applyType == 2}}" -->
+  <view class="return-address" wx:if="{{returnMoneySts == 3||returnMoneySts == 2 && applyType == 2}}">
+    <view class="addr-tit">退货方式</view>
+    <view class="address">
+      <view class="return-shop-box">
+        <view>
+          <view class="shop-title">{{payer==1?'商家':'用户'}}承担运费</view>
+          <view class="shop-text" wx:if="{{returnMoneySts==3}}">已发起配送</view>
+          <view class="shop-text" wx:else>请在{{countdown_hours}}小时{{countdown_minutes}}分钟内,发起配送,将货品退回给商家。</view>
+        </view>
+        <view class="shop-btn" bindtap="sendDistribution" wx:if="{{sendPay==null}}">发起配送</view>
+        <view class="shop-btn" bindtap="flowBution" wx:else>查看物流</view>
+      </view>
+    </view>
+  </view>
+  <!-- <view wx:if="{{cancelPay}}">
+    <view class="pay-card">
+      <view class="loading-time">等待支付,剩余<text style="color: #FF4D3A;">{{timeFormat}}</text></view>
+      <view class="time-out">超过15分钟未支付,订单将自动取消。</view>
+      <view class="pay-btn" bindtap="atoncePaySend">立即支付¥{{sendInfo.price}}</view>
+    </view>
+  </view> -->
+  <van-popup show="{{ addCarshow }}" closeable round position="bottom" custom-style="height: 45%" bind:close="onClose">
+    <view class="popup-box">
+      <view class="popup-title">寄回商品</view>
+      <view class="info-card-box">
+        <view class="card-address">顾客地址</view>
+        <view class="card-info">{{userAddrDto.address}}{{userAddrDto.addressName}}{{userAddrDto.addrDetail}}</view>
+        <view class="card-user">{{userAddrDto.receiver}} {{userAddrDto.mobile}}</view>
+        <view class="card-line"></view>
+        <view class="card-time-box" bindtap="selectUpTime">
+          <view class="card-time">*取件时间</view>
+          <view class="up-time">{{combinedTextValue||'请选择上门时间'}}
+            <van-icon name="arrow" />
+          </view>
+        </view>
+      </view>
+      <view class="costSide-card">
+        <view>配送费支付方</view>
+        <view>{{payer==1?'商家':'用户'}}</view>
+      </view>
+      <view class="bottom-button-box">
+        <!-- 支付方:payer=1店铺,2买家 -->
+        <view class="bottom-button" wx:if="{{payer==1}}" bindtap="submitBtn">提交</view>
+        <view class="send-pay-box" wx:else>
+          <view class="sendpay-text">配送费 <text style="color: #FF4D3A;">¥{{sendInfo.price||'0'}}</text></view>
+          <view class="sendpay-btn" bindtap="toPaySend">支付</view>
+        </view>
+      </view>
+    </view>
+  </van-popup>
+  <van-popup show="{{ selectTimeshow }}" overlay="{{false}}" round position="bottom" custom-style="height: 45%" bind:close="timeOnClose">
+    <view class="popup-box">
+      <view class="popup-title">选择上门时间</view>
+      <van-picker columns="{{ columns }}" show-toolbar bind:cancel="onCancel" bind:confirm="onConfirm" bind:change="onChange" />
+      <!-- <view class="popup-select-day">
+        <view class="day-left">
+          <view class="{{sts==0?'now-day':'tomorrow-day'}}" data-sts="0" data-time="{{nomDay}}" bindtap="selectday">{{nomDay+'(今天)'}}</view>
+          <view style="margin-top: 28rpx;" class="{{sts==1?'now-day':'tomorrow-day'}}" data-sts="1" data-time="{{tomorrowDay}}" bindtap="selectday">{{tomorrowDay+'(明天)'}}</view>
+        </view>
+        <view class="time-right">
+          <view class="sel-time{{currentSelectedIndex === index? 'selected' : ''}}" wx:for="{{timeIntervals}}" bindtap="selectTime" data-time="{{item}}" data-index="{{index}}">
+          <text wx:if="{{!item.hidden}}">{{item.interval}}</text></view>
+        </view>
+      </view> -->
+    </view>
+  </van-popup>
+  <van-popup show="{{ flowShow }}" closeable round position="bottom" custom-style="height: 45%" bind:close="flowOnClose">
+    <van-steps custom-class="steps-style" steps="{{ steps }}" active="{{ active }}" direction="vertical" active-color="#FF941A" />
+  </van-popup>
+  <!-- 【退货退款状态下,买家同意后】退货地址 -->
+  <view class="return-address" wx:if="{{returnMoneySts == 2 && applyType == 2}}">
+    <view class="addr-tit">退货地址</view>
+    <view class="address">
+      <view class="recipient">
+        <text class="addr-cont">收件人:{{refundDelivery.receiverName}}</text>
+        <text class="mobile">{{refundDelivery.receiverMobile}}</text>
+      </view>
+      <view class="addr">详细地址:{{refundDelivery.receiverAddr}}</view>
+    </view>
+  </view>
+
+
+  <!-- 退款信息 -->
+  <view class="refund-message">
+    <view class="refund-txt">退款信息</view>
+    <view class="goods-msg-box">
+      <!-- 店铺 -->
+      <!-- <view class="shop-box">
+        <view class="shop-img"><image src="../../images/icon/shop.png"></image></view>
+        <view class="shopname">店铺:{{shopName}}</view>
+      </view> -->
+      <!-- 图片 -->
+      <view class="img-box" wx:if="{{orderItems.length==1}}">
+        <image src="{{orderItems[0].pic}}"></image>
+      </view>
+      <!-- 信息 -->
+      <view class="goods-text" wx:if="{{orderItems.length==1}}">
+        <view class="goods-title">{{orderItems[0].prodName}}</view>
+        <view class="goods-quantity">数量:{{orderItems[0].prodCount}}件</view>
+      </view>
+
+      <block wx:if="{{orderItems.length>1}}">
+        <view class="refund-goods-item" wx:for="{{orderItems}}" wx:key="*this">
+          <!-- 图片 -->
+          <view class="img-box">
+            <image src="{{item.pic}}"></image>
+          </view>
+          <!-- 信息 -->
+          <view class="goods-text">
+            <view class="goods-title">{{item.prodName}}</view>
+            <view class="goods-quantity">数量:{{item.prodCount}}件</view>
+          </view>
+        </view>
+      </block>
+    </view>
+    <!-- 具体信息 -->
+    <view class="refund-cont">退款方式:{{['','仅退款','退货退款'][applyType]}}</view>
+    <view class="refund-cont">退款原因:{{buyerReason}}</view>
+    <view class="refund-cont">退款金额:
+      <text class="red" wx:if="{{refundAmount && refundAmount > 0}}">¥{{wxs.toPrice(refundAmount?refundAmount:0)}}</text>
+      <text class="red" wx:if="{{(refundScore && refundScore > 0) && (refundAmount && refundAmount > 0)}}">+</text>
+      <text class="red" wx:if="{{refundScore && refundScore > 0}}">{{refundScore}}积分</text>
+    </view>
+    <view class="refund-cont">退款编号:{{refundSn}}</view>
+    <view class="refund-cont">申请时间:{{applyTime}}</view>
+    <!-- 【退货申请显示】 -->
+    <view class="refund-cont" wx:if="{{goodsNum>0}}">退货数量:{{goodsNum}}</view>
+    <!-- 联系商家 -->
+    <!-- <view class="contact-merchant">联系商家</view> -->
+    <button class='contact-merchant' open-type="contact">联系客服</button>
+  </view>
+
+
+  <!-- 脚部撤销申请 -->
+  <!-- applyType: 1,  //申请类型:1,仅退款,2退款退货 -->
+  <!-- returnMoneySts: 处理退款状态:(1.买家申请 2.卖家接受 3.买家发货 4.卖家收货 5.退款成功 6.买家撤回申请 7.商家拒绝 -1.退款关闭) -->
+  <view class="foot-box">
+    <view class="footer">
+      <!-- 【申请后-申请完成前】 -->
+      <!-- <text class="undo-apply" bindtap="cancelApplication" wx:if="{{returnMoneySts ==1 || returnMoneySts == 7 || (returnMoneySts ==2 && applyType == 2)}}">撤销申请</text> -->
+      <text class="undo-apply" bindtap="cancelApplication" >撤销申请</text>
+      <!-- 【商家拒绝时显示】 -->
+      <!-- <text class="undo-apply apply-current" bindtap="toAlterRefundApply" wx:if="{{returnMoneySts ==1 || returnMoneySts == 7}}" data-refundsn="{{refundSn}}">修改申请</text> -->
+      <!-- 【商家同意后-货物寄出前】 -->
+      <!-- <text class="undo-apply apply-current" bindtap="toLogisticsPage" wx:if="{{returnMoneySts == 2 && applyType == 2}}" data-refundsn="{{refundSn}}">填写退货物流</text> -->
+    </view>
+  </view>
+
+</view>
+
+<wxs module="wxs" src="../../wxs/number.wxs" />

+ 633 - 0
pages/DetailsOfRefund2/DetailsOfRefund.wxss

@@ -0,0 +1,633 @@
+/* pages/DetailsOfRefund/DetailsOfRefund.wxss */
+.display {
+  display: none;
+}
+
+image {
+  width: 100%;
+  height: 100%;
+}
+
+.page {
+  position: fixed;
+  width: 100%;
+  height: 100%;
+  overflow: auto;
+  background: #f7f7f7;
+}
+
+/* 头部状态 */
+.describe-box {
+  background: #fff;
+  margin-bottom: 20rpx;
+}
+
+.process {
+  padding: 20rpx 25rpx;
+  border-bottom: 1rpx solid #f2f2f2;
+}
+
+.current-process {
+  font-size: 30rpx;
+  font-weight: bold;
+  padding: 10rpx 0;
+}
+
+.acount-for-process {
+  font-size: 28rpx;
+  color: #444;
+  line-height: 1.5em;
+}
+
+.red {
+  color: #e43130;
+}
+
+/* 隐藏内容 */
+.more-content {
+  border-top: 1rpx dashed #ebebeb;
+  margin-top: 15rpx;
+  padding-top: 10rpx;
+}
+
+.cont {
+  font-size: 28rpx;
+  color: #666666;
+  line-height: 1.8em
+}
+
+/* 更多说明 */
+.more-instructions {
+  padding: 18rpx 0;
+  padding-bottom: 22rpx;
+  text-align: center;
+  font-size: 27rpx;
+}
+
+.more-txt {
+  vertical-align: middle;
+}
+
+.down-arrow-icon {
+  display: inline-block;
+  width: 40rpx;
+  height: 25rpx;
+  vertical-align: middle;
+}
+
+
+/* 退款流程 */
+.refund-schedule {
+  background: #fff;
+  margin-bottom: 20rpx;
+  padding: 0 25rpx;
+}
+
+.refund-sum {
+  font-size: 28rpx;
+  padding: 25rpx 0;
+  border-bottom: 1rpx solid #f2f2f2;
+}
+
+.progress-bar {
+  position: relative;
+  display: flex;
+  justify-content: space-around;
+  padding: 20rpx 0;
+}
+
+.block {
+  display: inline-block;
+  text-align: center;
+}
+
+.round {
+  display: block;
+  width: 13rpx;
+  height: 13rpx;
+  border-radius: 50%;
+  background: #999999;
+  margin: 0 auto;
+  margin-top: 15rpx;
+}
+
+/* 激活状态圆点 */
+.round-current {
+  background: #3388ff;
+}
+
+.block-text {
+  margin-top: 15rpx;
+  text-align: center;
+}
+
+.block-text-tit {
+  font-size: 26rpx;
+  line-height: 2em;
+  color: #777;
+}
+
+.block-text-time {
+  font-size: 22rpx;
+  color: #aaa;
+}
+
+.line {
+  position: absolute;
+  top: 39rpx;
+  display: inline-block;
+  width: 215rpx;
+  height: 5rpx;
+  background: #bdbdbd;
+}
+
+/* 激活状态直线 */
+.line-current {
+  background: #3388ff;
+}
+
+.line01 {
+  left: 145rpx;
+}
+
+.line02 {
+  right: 115rpx;
+}
+
+/* 拒绝理由 */
+.refuse-reason {
+  font-size: 28rpx;
+  background: #fff;
+  padding: 20rpx;
+  margin-bottom: 20rpx;
+}
+
+
+/* 退货地址 */
+.return-address {
+  background: #fff;
+  margin-bottom: 20rpx;
+}
+
+.addr-tit {
+  padding: 10rpx 20rpx;
+  border-bottom: 1rpx solid #f2f2f2;
+  font-size: 30rpx;
+  font-weight: bold;
+}
+
+.addr {
+  padding-right: .5em;
+}
+
+.address {
+  padding: 20rpx;
+  font-size: 28rpx;
+}
+
+.recipient {
+  padding-bottom: 10rpx;
+}
+
+.mobile {
+  margin-left: 50rpx;
+}
+
+.pay-card {
+  background: #fff;
+  margin-bottom: 20rpx;
+  padding: 20rpx;
+}
+
+.loading-time {
+  font-family: PingFang SC, PingFang SC;
+  font-weight: bold;
+  font-size: 28rpx;
+  color: #181818;
+}
+
+.time-out {
+  margin-top: 20rpx;
+  font-family: PingFang SC, PingFang SC;
+  font-weight: normal;
+  font-size: 24rpx;
+  color: #AAAAAA;
+}
+
+.pay-btn {
+  margin-top: 20rpx;
+  width: 220rpx;
+  height: 64rpx;
+  border-radius: 40rpx;
+  border: 2rpx solid #FF4D3A;
+  font-family: PingFang SC, PingFang SC;
+  font-weight: normal;
+  font-size: 28rpx;
+  color: #FF4D3A;
+  text-align: center;
+  line-height: 64rpx;
+}
+
+/* 退货方式 */
+.return-shop-box {
+  display: flex;
+  align-items: center;
+  justify-content: space-between;
+}
+.shop-title {
+  font-family: PingFang SC, PingFang SC;
+  font-weight: bold;
+  font-size: 28rpx;
+  color: #181818;
+}
+
+.shop-text {
+  margin-top: 20rpx;
+  font-family: PingFang SC, PingFang SC;
+  font-weight: normal;
+  font-size: 24rpx;
+  color: #AAAAAA;
+}
+
+.shop-btn {
+  width: 136rpx;
+  height: 64rpx;
+  background: #FFFFFF;
+  border-radius: 40rpx;
+  border: 2rpx solid #FF4D3A;
+  font-family: PingFang SC, PingFang SC;
+  font-weight: normal;
+  font-size: 28rpx;
+  color: #FF4D3A;
+  line-height: 64rpx;
+  text-align: center;
+}
+
+.popup-box {
+  padding: 20rpx;
+}
+
+.popup-title {
+  margin-top: 28rpx;
+  font-family: PingFang SC, PingFang SC;
+  font-weight: 800;
+  font-size: 32rpx;
+  text-align: center;
+}
+
+.popup-select-day {
+  display: flex;
+}
+
+.day-left {
+  margin-top: 50rpx;
+}
+
+.now-day {
+  font-weight: normal;
+  font-size: 28rpx;
+  color: #222222;
+}
+
+.tomorrow-day {
+  font-weight: normal;
+  font-size: 28rpx;
+  color: #AAAAAA;
+}
+
+.time-right {
+  margin-top: 50rpx;
+  margin-left: 300rpx;
+  height: 500rpx;
+  overflow-y: auto; 
+  font-weight: normal;
+  font-size: 28rpx;
+  color: #222222;
+}
+.time-right::-webkit-scrollbar {
+  display: none;
+}
+.sel-time {
+  margin-bottom:28rpx;
+  font-weight: normal;
+  font-size: 28rpx;
+  color: #AAAAAA;
+}
+.sel-timeselected{
+  margin-bottom:28rpx;
+  color: #222222;
+}
+.info-card-box {
+  margin-top: 20rpx;
+  background-color: #F9F9F9;
+  border-radius: 16rpx;
+  padding: 20rpx;
+}
+
+.card-address {
+  font-family: PingFang SC, PingFang SC;
+  font-weight: normal;
+  font-size: 28rpx;
+  color: #222222;
+}
+
+.card-info {
+  margin-top: 20rpx;
+  font-family: PingFang SC, PingFang SC;
+  font-weight: bold;
+  font-size: 28rpx;
+  color: #222222;
+}
+
+.card-user {
+  margin-top: 20rpx;
+  font-family: PingFang SC, PingFang SC;
+  font-weight: normal;
+  font-size: 24rpx;
+  color: #AAAAAA;
+}
+
+.card-line {
+  margin-top: 20rpx;
+  border: 2rpx solid #F0F0F0;
+}
+
+.card-time-box {
+  margin-top: 20rpx;
+  display: flex;
+  align-items: center;
+  justify-content: space-between;
+}
+
+.card-time {
+  font-family: PingFang SC, PingFang SC;
+  font-weight: normal;
+  font-size: 28rpx;
+  color: #222222;
+}
+
+.up-time {
+  font-family: PingFang SC, PingFang SC;
+  font-weight: normal;
+  font-size: 28rpx;
+  color: #AAAAAA;
+}
+
+.costSide-card {
+  margin-top: 20rpx;
+  background-color: #F9F9F9;
+  border-radius: 16rpx;
+  padding: 20rpx;
+  display: flex;
+  align-items: center;
+  justify-content: space-between;
+}
+
+.costSide-card>view:first-child {
+  font-family: PingFang SC, PingFang SC;
+  font-weight: normal;
+  font-size: 28rpx;
+  color: #222222;
+}
+
+.costSide-card>view:last-child {
+  font-family: PingFang SC, PingFang SC;
+  font-weight: normal;
+  font-size: 28rpx;
+  color: #AAAAAA;
+}
+
+.bottom-button-box {
+  background: #FFFFFF;
+  box-shadow: 0rpx -6rpx 12rpx 2rpx rgba(0, 0, 0, 0.09);
+  border-radius: 32rpx 32rpx 0rpx 0rpx;
+  display: flex;
+  justify-content: center;
+}
+
+.bottom-button {
+  width: 702rpx;
+  height: 80rpx;
+  background: #FF941A;
+  border-radius: 40rpx;
+  margin-top: 30rpx;
+  font-family: PingFang SC, PingFang SC;
+  font-weight: bold;
+  font-size: 28rpx;
+  color: #FFFFFF;
+  text-align: center;
+  line-height: 80rpx;
+}
+
+.picker-style {
+  font-size: 16rpx !important;
+  margin-left: -80rpx;
+}
+
+.send-pay-box {
+  display: flex;
+  align-items: center;
+  margin-top: 30rpx;
+}
+
+.sendpay-text {
+  font-family: PingFang SC, PingFang SC;
+  font-weight: normal;
+  font-size: 28rpx;
+  width: 400rpx;
+}
+
+.sendpay-btn {
+  width: 220rpx;
+  height: 80rpx;
+  background: #FF941A;
+  border-radius: 40rpx;
+  font-family: PingFang SC, PingFang SC;
+  font-weight: bold;
+  font-size: 28rpx;
+  color: #FFFFFF;
+  line-height: 80rpx;
+  text-align: center;
+}
+
+/* 查看协商记录 */
+/* .negotiate-record {
+  position: relative;
+  font-size: 25rpx;
+  text-align: left;
+  background: #fff;
+  padding: 20rpx 25rpx;
+  margin-bottom: 20rpx;
+}
+.more-arrow {
+  position: absolute;
+  right: 20rpx;
+  top: 50%;
+  transform: translateY(-50%);
+  width: 22rpx;
+  height: 22rpx;
+} */
+
+
+/* 退款信息 */
+.refund-message {
+  background: #fff;
+  padding: 20rpx 25rpx;
+}
+
+.refund-txt {
+  font-size: 30rpx;
+  margin-bottom: 25rpx;
+  font-weight: bold;
+}
+
+/* 店铺 */
+.shop-box {
+  display: block;
+  padding-bottom: 20rpx;
+  margin-bottom: 20rpx;
+  border-bottom: 1rpx solid #f0f0f0;
+}
+
+.shop-img {
+  display: inline-block;
+  width: 36rpx;
+  height: 36rpx;
+  vertical-align: middle;
+  margin-right: 10rpx;
+}
+
+.shop-img>iamge {
+  display: block;
+  width: 100%;
+  height: 100%;
+}
+
+.shopname {
+  display: inline-block;
+  font-size: 28rpx;
+  line-height: 1em;
+  vertical-align: middle;
+  color: #444444;
+}
+
+/* 商品信息 */
+.goods-msg-box {
+  background: #f9f9f9;
+  padding: 15rpx 20rpx;
+  margin: 15rpx 0;
+}
+
+.img-box {
+  display: inline-block;
+  width: 150rpx;
+  height: 150rpx;
+  margin-right: 20rpx;
+  background: #eee;
+  vertical-align: top;
+}
+
+.goods-text {
+  display: inline-block;
+  vertical-align: top;
+  width: 70%;
+}
+
+.goods-title {
+  font-size: 28rpx;
+  display: -webkit-box;
+  -webkit-line-clamp: 2;
+  /*设定显示行数*/
+  -webkit-box-orient: vertical;
+  word-break: break-all;
+  overflow: hidden;
+  text-overflow: ellipsis;
+}
+
+.goods-quantity {
+  font-size: 28rpx;
+  color: #888888;
+  margin-top: 20rpx;
+}
+
+/* 具体信息 */
+.refund-cont {
+  font-size: 28rpx;
+  color: #666666;
+  line-height: 2em;
+}
+
+/* 联系商家 */
+.contact-merchant {
+  font-size: 28rpx;
+  color: #FF941A;
+  text-align: center;
+  padding-top: 20rpx;
+  margin-top: 20rpx;
+  border-top: 1rpx solid #f2f2f2;
+}
+
+button.contact-merchant {
+  background: #fff;
+}
+
+button.contact-merchant::after {
+  border: 0;
+}
+
+/* 整单退款商品列表 */
+.refund-goods-item {
+  padding: 20rpx 0;
+  border-bottom: 2rpx solid #ddd;
+}
+
+.refund-goods-item:last-child {
+  border-bottom: none;
+}
+
+/* 脚部撤销 */
+.foot-box {
+  display: block;
+  margin-top: 150rpx;
+}
+
+.footer {
+  display: block;
+  box-sizing: border-box;
+  position: fixed;
+  width: 100%;
+  bottom: 0;
+  font-size: 28rpx;
+  background: #fff;
+  padding: 0 30rpx;
+  text-align: right;
+  box-shadow: 1rpx 10rpx 10rpx 10rpx rgb(236, 236, 236);
+}
+
+.undo-apply {
+  display: inline-block;
+  box-sizing: border-box;
+  padding: 15rpx 20rpx;
+  font-size: 25rpx;
+  border-radius: 5rpx;
+  margin: 25rpx 0;
+  margin-left: 15rpx;
+  border-radius: 40rpx;
+  border: 1rpx solid #aaaaaa;
+  color: #555555;
+}
+
+.undo-apply-end {
+  display: inline-block;
+  box-sizing: border-box;
+  margin-left: 15rpx;
+  color: #777;
+  font-size: 30rpx;
+
+}
+
+.apply-current {
+  border: 1rpx solid rgb(0, 173, 0);
+  color: rgb(0, 173, 0);
+
+}

+ 2 - 0
pages/order-detail/order-detail.js

@@ -17,6 +17,7 @@ Page({
       70: '订单已送达',
       80: '订单已完成'
     },
+    totalUsableScore:0,
     dvyType:'',//配送方式
     orderItemDtos: [],
     remarks: "",
@@ -316,6 +317,7 @@ Page({
           dvyType = '自提'
         }
         ths.setData({
+          totalUsableScore:res.totalUsableScore,
           dvyType:dvyType,
           orderNumber: orderNum,
           actualTotal: res.actualTotal, //实际支付总额(商品总额+运费)

+ 11 - 7
pages/order-detail/order-detail.wxml

@@ -14,7 +14,7 @@
     </view>
 
     <view class="oprate-box box">
-      <view class="item" wx:if="{{status == 0}}" bindtap="onCancelOrder">
+      <view class="item" wx:if="{{status == 60}}" bindtap="delOrderList" data-ordernum="{{orderNumber}}">
         <image class="icon" src="../../images/icon/del-icon.png" mode=""/>
         <view class="label">
           删除订单
@@ -102,7 +102,7 @@
           </view>
           <!-- 申请退款btn -->
           <!-- <text class="apply-refund-btn" catchtap="applyRefund" data-itemactualtotal="{{item.actualTotal}}" data-item="{{item}}" wx:if="{{!item.refundSn && canRefund && orderType !=3||item.status==6}}" data-refundtype="2" data-type="{{status == 2?'1':'2'}}">申请退款</text> -->
-          <text class="apply-refund-btn" catchtap="viewRefund" data-ordernumber='{{item.orderNumber}}' data-refundsn="{{item.refundSn}}" wx:if="{{item.refundSn}}">查看退款</text>
+          <!-- <text class="apply-refund-btn" catchtap="viewRefund" data-ordernumber='{{item.orderNumber}}' data-refundsn="{{item.refundSn}}" wx:if="{{item.refundSn}}">查看退款</text> -->
           <!-- 申请退款btn -->
         </view>
       </block>
@@ -137,7 +137,11 @@
           </view>
         </view>
         <view class='item'>
-          <view class='item-tit'><text class="item-tit" wx:if="{{orderType && orderType!=3}}">{{orderType==1?'团购':'秒杀'}}</text>优惠:</view>
+          <view class='item-tit'>
+          <!-- <text class="item-tit" wx:if="{{orderType && orderType!=3}}">{{orderType==1?'团购':'秒杀'}}</text> -->
+          <!-- 优惠: -->
+          积分({{totalUsableScore}}):
+          </view>
           <view class='item-txt price'>
             <text class='symbol'>-¥</text>
             <text class='big-num'>{{wxs.parsePrice(reduceAmount)[0]}}</text>
@@ -151,7 +155,7 @@
             <text class='big-num' wx:if="{{actualTotal && actualTotal > 0}}">{{wxs.parsePrice(actualTotal)[0]}}</text>
             <text class='small-num' wx:if="{{actualTotal && actualTotal > 0}}">.{{wxs.parsePrice(actualTotal)[1]}}</text>
             <text class='small-num' wx:if="{{(actualTotal && actualTotal > 0) && (orderType==3 || orderScore > 0)}}">+</text>
-            <text class='big-num' wx:if="{{orderType==3 || orderScore > 0}}">{{orderScore}} <text class='small-num'>积分</text></text>
+            <text class='big-num' wx:if="{{orderType==3 || totalUsableScore > 0}}">{{totalUsableScore}} <text class='small-num'>积分</text></text>
           </view>
         </view>
       </view>
@@ -194,12 +198,12 @@
       <!-- <text class='dele-order' wx:if="{{status==5||status==6}}" bindtap='delOrderList' data-ordernum="{{orderNumber}}">删除订单</text> -->
       <view class='footer-box'>
         <!-- <text class="apply-refund-btn refund-full" data-refundtype="1" catchtap="applyRefund" wx:if="{{canAllRefund && orderType!=3}}" data-type="{{status == 2?'1':'2'}}">整单退款</text> -->
-        <text class="apply-refund-btn refund-full" data-refundtype="1" catchtap="applyRefund" data-type="{{status == 2?'1':'2'}}">整单退款</text>
-        <button class='apply-service foot-btn' open-type="contact">联系客服</button>
+        <!-- <text class="apply-refund-btn refund-full" data-refundtype="1" catchtap="applyRefund" data-type="{{status == 2?'1':'2'}}">整单退款</text>
+        <button class='apply-service foot-btn' open-type="contact">联系客服</button> -->
         <!-- <text class='buy-again'>再次购买</text> -->
 
         <!-- 【团购按钮】 -->
-        <button class='apply-service foot-btn' bindtap="toGroupDetails" data-ordernumber='{{orderNumber}}' wx:if="{{orderType==1}}">查看团购详情</button>
+        <!-- <button class='apply-service foot-btn' bindtap="toGroupDetails" data-ordernumber='{{orderNumber}}' wx:if="{{orderType==1}}">查看团购详情</button> -->
         <!-- 【团购按钮】 -->
       </view>
     </view>

+ 3 - 3
pages/order-detail/order-detail.wxss

@@ -293,9 +293,9 @@ page {
 }
 .prod-item .item-cont .prod-info .prod-info-cont {
   position: relative;
-  color: #888888;
+  font-size: 24rpx;
+  color: #AAAAAA;
   margin-top: 20rpx;
-  font-size: 28rpx;
    overflow: hidden;
     text-overflow: ellipsis;
     display: -webkit-box;
@@ -397,7 +397,7 @@ page {
 
 .order-msg .msg-item .item .item-tit {
   font-size: 28rpx;
-  color: #AAAAAA;
+  color: #222;
   line-height: 48rpx;
 }
 

+ 11 - 6
pages/orderList/orderList.js

@@ -20,13 +20,14 @@ Page({
     list: [],
     current: 1,
     pages: 0,
-    sts: 0,
+    sts: 9,//9是自定义的全部
   },
 
   /**
    * 生命周期函数--监听页面加载
    */
   onLoad: function (options) {
+    console.log(options);
     if (options.sts) {
       this.setData({
         sts: options.sts
@@ -46,15 +47,19 @@ Page({
   loadOrderData: function (sts, current) {
     var ths = this;
     wx.showLoading();
+    let data = {
+      current: current,
+      size: 10,
+    }
+    if(sts!=9){
+      data.status = sts
+
+    }
     //加载订单列表
     var params = {
       url: "/p/myOrder/myOrder",
       method: "GET",
-      data: {
-        current: current,
-        size: 10,
-        status: sts,
-      },
+      data,
       callBack: function (res) {
         // console.log(res);
         let img=''

+ 5 - 5
pages/orderList/orderList.wxml

@@ -2,11 +2,11 @@
 <view class='container'>
   <!-- 头部菜单 -->
   <view class='order-tit'>
-    <text bindtap='onStsTap' data-sts="0" class="{{sts==0?'on':''}}">全部</text>
-    <text bindtap='onStsTap' data-sts="1" class="{{sts==1?'on':''}}">待支付</text>
+    <text bindtap='onStsTap' data-sts="9" class="{{sts==9?'on':''}}">全部</text>
+    <text bindtap='onStsTap' data-sts="0" class="{{sts==0?'on':''}}">待支付</text>
     <!-- <text bindtap='onStsTap' data-sts="2" class="{{sts==2?'on':''}}">待发货</text> -->
-    <text bindtap='onStsTap' data-sts="3" class="{{sts==3?'on':''}}">待收货</text>
-    <text bindtap='onStsTap' data-sts="5" class="{{sts==5?'on':''}}">已完成</text>
+    <text bindtap='onStsTap' data-sts="20" class="{{sts==20?'on':''}}">待收货</text>
+    <text bindtap='onStsTap' data-sts="80" class="{{sts==80?'on':''}}">已完成</text>
   </view>
   <!-- end 头部菜单 -->
   <view class='main'>
@@ -108,7 +108,7 @@
             <text class='small-num' wx:if="{{item.actualTotal && item.orderType==3}}" decode="true">&nbsp;+&nbsp;</text>
             <text class='big-num' wx:if="{{item.orderType==3}}">{{item.orderItemDtos[0].useScore}} <text class='small-num'>积分</text></text>
             <!-- 纯积分支付的普通订单(积分抵扣了所有金额) -->
-            <text class='big-num' wx:if="{{item.orderType==0 && item.actualTotal==0}}">{{item.userScore}} <text class='small-num'>积分</text></text>
+            <text class='big-num' wx:if="{{item.orderType==0 && item.actualTotal==0}}">{{item.offsetPoints}} <text class='small-num'>积分</text></text>
           </view>
         </view>
         <!-- end 商品列表 -->

+ 1 - 0
pages/orderList/orderList.wxss

@@ -3,6 +3,7 @@
 page {
   background-color: #f4f4f4;
   color: #333;
+  padding-bottom: 200rpx;
 }
 
 /* 头部菜单 */

+ 1 - 1
pages/pay-result/pay-result.js

@@ -27,7 +27,7 @@ Page({
     })
     wx.redirectTo({
       // url: '/pages/orderList/orderList?sts=' + (this.data.sts == 0 ? '1' : '2')
-      url: '/pages/orderList/orderList?sts=' + (this.data.sts == 0 ? '1' : '3')//成功跳转待收货
+      url: '/pages/orderList/orderList?sts=' + (this.data.sts == 0 ? '0' : '20')//成功跳转待收货
     })
   },
   toIndex: function () {

+ 9 - 2
pages/submit-order/submit-order.js

@@ -134,11 +134,12 @@ Page({
         platform:1
       },
       callBack: res => {
+        wx.hideLoading();
+        
         this.setData({
-          address_id: res.userAddr.addrId,
+          address_id: res.userAddr?res.userAddr.addrId:0,
           shop_weight: res.weight
         })
-        wx.hideLoading();
         var shopCartOrders = res.shopCartOrders; //购物车店铺商品信息列表
         var couponIds = []
         let img=''
@@ -191,6 +192,12 @@ Page({
           totalUsableScore:res.totalUsableScore,
           totalAvailableScore:res.totalAvailableScore,
         });
+        if(!res.userAddr){
+          return wx.showToast({
+            title: '请添加收货地址',
+            icon:'none'
+          })
+        }
         this.getDeliveryAmount()
       },
       errCallBack: res => {

+ 1 - 1
pages/submit-order/submit-order.wxml

@@ -186,7 +186,7 @@
         </view>
         <!-- 积分 -->
         <view class='item'>
-          <view class='item-tit'>积分({{totalAvailableScore}}):</view>
+          <view class='item-tit'>积分({{totalAvailableScore||0}}):</view>
           <view class='item-txt price'>
             <text class='symbol'>-¥</text>
             <text class='big-num'>{{wxs.parsePrice(totalUsableScore)[0]}}</text>

+ 1 - 1
pages/user/user.wxml

@@ -45,7 +45,7 @@
     <view class='total-order box'>
       <view class='order-tit'>
         <text style='font-weight:bold'>我的订单</text>
-        <view class='checkmore' bindtap='toOrderListPage' data-sts="0">
+        <view class='checkmore' bindtap='toOrderListPage' data-sts="9">
           <text>查看全部 </text>
           <text class='arrowhead'></text>
         </view>

+ 2 - 2
utils/config.js

@@ -7,8 +7,8 @@ var wsDomain = "wss://shop-h5.dev.zswllife.cn/api"; //统一接口域名,测
 // var domain = "https://shop.haimamart.com/api"; //统一接口域名,正式环境 
 // var wsDomain = "wss://shop.haimamart.com/api"; //统一接口域名,正式环境 
 
-var domain = "http://192.168.1.206:8112"; //统一接口域名,测试环境
-var wsDomain = "ws://192.168.1.120:8112"; //统一接口域名,测试环境
+// var domain = "http://192.168.1.206:8112"; //统一接口域名,测试环境
+// var wsDomain = "ws://192.168.1.120:8112"; //统一接口域名,测试环境
 
 var picDomain = "http://img-test.gz-yami.com/";//图片域名