| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228 | 
							- // 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: '', //退款金额
 
-     goodsTotal:0,
 
-     records:[],//退款流程
 
-     refundStatusObj:{
 
-       1:'申请原因',
 
-       2:'商家待审核',
 
-       3:'审核通过',
 
-       4:'驳回',
 
-       5:'退款成功',
 
-     },
 
-     refundDelivery: [], //收货地址对象
 
-     refundId: '', //记录ID
 
-     refundTime: '', //退款时间
 
-     returnMoneySts: 1, //处理退款状态:(1.买家申请 2.卖家接受 3.买家发货 4.卖家收货 5.退款成功 6.买家撤回申请 7.商家拒绝 -1.退款关闭)
 
-     updateTime: '', //更新时间
 
-     refundSn: '', //退款编号
 
-     rejectMessage: '', //拒绝理由
 
-     buyerReason: '', //退款原因
 
-     shopName: '', //店铺名称
 
-     refundScore: 0, // 退款积分
 
-     photoFiles:[],
 
-     addCarshow: false,
 
-     selectTimeshow: false,
 
-     flowShow: false,
 
-     userAddrDto: {},
 
-     payer: '',
 
-     sendPay:'',
 
-     sts: 0,
 
-     nomDay: '',
 
-     tomorrowDay: '',
 
-     timeIntervals: [],
 
-     columns: [],
 
-     combinedTextValue: '',
 
-     sendInfo: {},
 
-     currentSelectedIndex: -1, // 初始没有选中项,索引设为 -1
 
-     cancelPay: false,
 
-     remainingTime: '',
 
-     timeFormat: '',
 
-     orderNumSend:'',
 
-     countdown_hours:'',
 
-     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(options) {
 
-     this.setData({
 
-       orderNumSend:options.orderNumber
 
-     })
 
-     this.setData({
 
-       refundSn: options.refundSn,
 
-     });
 
-     if(options.userAddrDto){
 
-       this.setData({
 
-         userAddrDto: JSON.parse(options.userAddrDto)
 
-       })
 
-     }
 
-     //获取退款申请详情
 
-     this.getRefundDetail()
 
-   },
 
-    /**
 
-    * 获取退款申请详情
 
-    */
 
-   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]
 
-         })
 
-         let photoFiles = []
 
-         if(res.photoFiles){
 
-           photoFiles = res.photoFiles.split(',')
 
-         }
 
-         ths.setData({
 
-           applyTime: res.applyTime, //申请时间
 
-           applyType: res.applyType, //申请类型:1,仅退款,2退款退货
 
-           goodsNum: res.goodsNum, //退货数量
 
-           handelTime: res.handelTime, //卖家处理时间
 
-           orderAmount: res.orderAmount, //订单总金额
 
-           orderItems: res.orderItems, //订单项 
 
-           orderNumber: res.orderNumber, //订单项 
 
-           refundSn: res.refundSn, //退款编号
 
-           refundAmount: res.refundAmount, //退款金额
 
-           goodsTotal:res.goodsTotal,
 
-           records:res.records,//退款流程
 
-           offsetPoints:res.offsetPoints,
 
-           freightAmount:res.freightAmount,
 
-           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, //退款原因
 
-           photoFiles, //图片
 
-           shopName: res.shopName,
 
-           refundScore: res.refundScore, // 退款积分
 
-           payer: res.refundDelivery.payer,//运费承担方
 
-           sendPay:res.refundDelivery.deyNu //物流编号,判断是否提交成功
 
-         })
 
-         wx.hideLoading();
 
-         ths.get_countDown()
 
-       }
 
-     };
 
-     http.request(params);
 
-   },
 
-   // 一键复制事件
 
-   copyBtn: function(e) {
 
-     let data = e.currentTarget.dataset.value
 
-     wx.setClipboardData({
 
-       //准备复制的数据
 
-       data,
 
-       success: function(res) {
 
-         wx.showToast({
 
-           title: '复制成功',
 
-         });
 
-       }
 
-     })
 
-   },
 
-   /**
 
-    * 生命周期函数--监听页面初次渲染完成
 
-    */
 
-   onReady() {
 
-   },
 
-   /**
 
-    * 生命周期函数--监听页面显示
 
-    */
 
-   onShow() {
 
-   },
 
-   /**
 
-    * 生命周期函数--监听页面隐藏
 
-    */
 
-   onHide() {
 
-   },
 
-   /**
 
-    * 生命周期函数--监听页面卸载
 
-    */
 
-   onUnload() {
 
-   },
 
-   /**
 
-    * 页面相关事件处理函数--监听用户下拉动作
 
-    */
 
-   onPullDownRefresh() {
 
-   },
 
-   /**
 
-    * 页面上拉触底事件的处理函数
 
-    */
 
-   onReachBottom() {
 
-   },
 
-   /**
 
-    * 用户点击右上角分享
 
-    */
 
-   onShareAppMessage() {
 
-   }
 
- })
 
 
  |