123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259 |
- const app = getApp()
- const util = require("../../../utils/jmsUtil.js");
- const api = require('../../../api/jms.js');
- import moment from 'moment'
- Page({
- data: {
- id:'',
- orderId:'',
- refundDetail:{},
- logList:[],
- orderInfo:{},
- orderBookInfo:[],
- type:'1',
- statusDesc: {
- 0: "",
- 1: "待审核",
- 2: "审核通过",
- 3: "退款成功",
- 4: "审核未通过",
- 5:"退款失败"
- },
-
- typeTag: ["", "primary","success","success", "warning", "warning"],
- ccResultList:{
- Y: "成立",
- N: "不成立",
- // O: "无法判定",
- },
- ccResList:{
- P: "服务人员",
- S: "商家运营",
- C: "客服",
- O: "其他"
- },
- refundMethodDesc:{
- 1: "银行卡",
- 2: "支付宝",
- 3: "微信",
- 4: "盒马二线手工退",
- 5: "盒马XP工单退"
- }
-
- },
-
- /**
- * 生命周期函数--监听页面加载
- */
- onLoad: function (options) {
- if(options.id||options.orderId){
- this.setData({
- id:options.id,
- orderId:options.orderId,
- refundDetail:app.globalData.refundDetail
- });
-
- // this.getTicketDetail();
- }
- },
- onChange(e){
- this.setData({
- type:e.detail.name
- });
- },
- getTicketDetail(){
- util.request(api.GetAftersaleById, {
- id:this.data.id
- }, 'GET').then(res=>{
- if (res.errno == 0) {
- let actions=res.data;
- let list=[];
- actions.forEach(item=>{
- let obj={
- inactiveIcon: 'passed',
- activeIcon: 'passed',
- text:"["+item.statusName+'] '+item.comment,
- desc:item.createTime+' '+item.handlerName
- };
- list.push(obj);
- });
- this.setData({
- logList:list
- });
- // this.setData({
- // actions:res.data.acitons,
- // consults:res.data.consults,
- // consultslist:res.data.consultslist,
- // ticket:res.data.ticket
- // });
- // let actions=res.data.actions;
- // let list=[];
- // actions.forEach(item=>{
- // let obj={
- // inactiveIcon: 'passed',
- // activeIcon: 'passed',
- // text:"["+item.statusDes+'] '+item.content,
- // desc:item.createTime+' '+item.createUserName
- // };
- // list.push(obj);
- // });
- // this.setData({
- // actions:list
- // });
- }else{
- wx.showToast({
- title: res.errmsg,
- icon:'none'
- })
- }
-
- });
- },
- getOrderGoodsDetail(){
- util.request(api.GetOrderGoodsById, {
- orderId:this.data.orderId
- }, 'GET').then(res=>{
- if (res.errno == 0) {
- this.setData({
- orderInfo:res.data
- });
-
- // this.setData({
- // actions:res.data.acitons,
- // consults:res.data.consults,
- // consultslist:res.data.consultslist,
- // ticket:res.data.ticket
- // });
- // let actions=res.data.actions;
- // let list=[];
- // actions.forEach(item=>{
- // let obj={
- // inactiveIcon: 'passed',
- // activeIcon: 'passed',
- // text:"["+item.statusDes+'] '+item.content,
- // desc:item.createTime+' '+item.createUserName
- // };
- // list.push(obj);
- // });
- // this.setData({
- // actions:list
- // });
- }else{
- wx.showToast({
- title: res.errmsg,
- icon:'none'
- })
- }
-
- });
- },
- getOrderBookDetail(){
- util.request(api.GetOrderBookDetailByOrderId, {
- orderId:this.data.orderId,
- fraId:app.globalData.userInfo.fraId
- }, 'GET').then(res=>{
- if (res.errno == 0) {
-
- this.setData({
- orderBookInfo:res.data
- });
- // this.setData({
- // actions:res.data.acitons,
- // consults:res.data.consults,
- // consultslist:res.data.consultslist,
- // ticket:res.data.ticket
- // });
- // let actions=res.data.actions;
- // let list=[];
- // actions.forEach(item=>{
- // let obj={
- // inactiveIcon: 'passed',
- // activeIcon: 'passed',
- // text:"["+item.statusDes+'] '+item.content,
- // desc:item.createTime+' '+item.createUserName
- // };
- // list.push(obj);
- // });
- // this.setData({
- // actions:list
- // });
- }else{
- wx.showToast({
- title: res.errmsg,
- icon:'none'
- })
- }
-
- });
- },
-
- /**
- * 生命周期函数--监听页面显示
- */
- onShow: function () {
-
- this.getTicketDetail();
- this.getOrderGoodsDetail();
- this.getOrderBookDetail();
- },
-
- /**
- * 生命周期函数--监听页面初次渲染完成
- */
- onReady: function () {
- },
- preImg(e){
- let url=e.currentTarget.dataset.url;
- wx.previewImage({
- current: url, // 当前显示图片的http链接
- urls: this.data.refundDetail.pictures// 需要预览的图片http链接列表
- })
- },
- goRemark(){
- wx.navigateTo({
- url: '/pages/refund/refundRemark/refundRemark?id='+this.data.id
- });
- },
- handleAudit(e){
- let type=e.currentTarget.dataset.type;
- wx.navigateTo({
- url: '/pages/refund/refundAudit/refundAudit?id='+this.data.id+'&orderId='+this.data.orderId+'&type='+type
- });
- },
-
- /**
- * 用户点击右上角分享
- */
- onShareAppMessage: function () {
- },
- })
|