ticketDetail.js 2.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167
  1. const app = getApp()
  2. const util = require("../../../utils/jmsUtil.js");
  3. const api = require('../../../api/jms.js');
  4. import moment from 'moment'
  5. Page({
  6. data: {
  7. id:'',
  8. ticket:{},
  9. ations:[],
  10. consults:[],
  11. consultslist:[],
  12. statusDesc: {
  13. 0: "创建",
  14. 1: "处理中",
  15. 2: "已完成",
  16. 3: "作废",
  17. },
  18. substatusDesc: {
  19. 101: "待处理",
  20. 102: "升级",
  21. 103: "超时驳回",
  22. 104: "重新打开",
  23. 106: "等待客户上传图片",
  24. 107: "客户已上传图片",
  25. 108: "加盟商处理中",
  26. 109: "加盟商已处理",
  27. 201: "完成",
  28. 301: "作废",
  29. 0: "创建",
  30. },
  31. typeTag: ["", "success", "warning", "danger"],
  32. levelMap: {
  33. 0: "无",
  34. 1: "一般",
  35. 2: "严重",
  36. 3: "非常严重",
  37. },
  38. ccResultList:{
  39. Y: "成立",
  40. N: "不成立",
  41. // O: "无法判定",
  42. },
  43. ccResList:{
  44. P: "服务人员",
  45. S: "商家运营",
  46. C: "客服",
  47. O: "其他"
  48. },
  49. refundMethodDesc:{
  50. 1: "银行卡",
  51. 2: "支付宝",
  52. 3: "微信",
  53. 4: "盒马二线手工退",
  54. 5: "盒马XP工单退"
  55. }
  56. },
  57. /**
  58. * 生命周期函数--监听页面加载
  59. */
  60. onLoad: function (options) {
  61. if(options.id){
  62. this.setData({id:options.id});
  63. // this.getTicketDetail();
  64. }
  65. },
  66. getTicketDetail(){
  67. util.request(api.TicketDetail, {
  68. id:this.data.id
  69. }, 'GET').then(res=>{
  70. if (res.errno == 0) {
  71. this.setData({
  72. actions:res.data.acitons,
  73. consults:res.data.consults,
  74. consultslist:res.data.consultslist,
  75. ticket:res.data.ticket
  76. });
  77. let actions=res.data.actions;
  78. let list=[];
  79. actions.forEach(item=>{
  80. let obj={
  81. inactiveIcon: 'passed',
  82. activeIcon: 'passed',
  83. text:"["+item.statusDes+'] '+item.content,
  84. desc:item.createTime+' '+item.createUserName
  85. };
  86. list.push(obj);
  87. });
  88. this.setData({
  89. actions:list
  90. });
  91. }else{
  92. wx.showToast({
  93. title: res.errmsg,
  94. icon:'none'
  95. })
  96. }
  97. });
  98. },
  99. /**
  100. * 生命周期函数--监听页面显示
  101. */
  102. onShow: function () {
  103. this.getTicketDetail();
  104. },
  105. /**
  106. * 生命周期函数--监听页面初次渲染完成
  107. */
  108. onReady: function () {
  109. },
  110. preImg(e){
  111. let url=e.currentTarget.dataset.url;
  112. wx.previewImage({
  113. current: url, // 当前显示图片的http链接
  114. urls: this.data.ticket.fileUrl // 需要预览的图片http链接列表
  115. })
  116. },
  117. goRemark(){
  118. wx.navigateTo({
  119. url: '/pages/ticket/ticketRemark/ticketRemark?id='+this.data.id
  120. });
  121. },
  122. handleTicket(){
  123. wx.navigateTo({
  124. url: '/pages/ticket/ticketHandle/ticketHandle?id='+this.data.id
  125. });
  126. },
  127. /**
  128. * 用户点击右上角分享
  129. */
  130. onShareAppMessage: function () {
  131. },
  132. })