index.js 4.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152
  1. Component({
  2. properties: {
  3. tabColorS: {
  4. type: Object
  5. }
  6. },
  7. lifetimes: {
  8. attached: function () {
  9. getApp().globalData.Language.getLanguagePackage(this)
  10. this.setData({
  11. siteid: wx.getStorageSync('userMsg').siteid
  12. })
  13. }
  14. },
  15. data: {},
  16. methods: {
  17. setPreview(res) {
  18. /* 基本信息 */
  19. let leader = null
  20. try {
  21. leader = res.data.team.find(v => v.isleader);
  22. } catch (error) {
  23. }
  24. let list1 = [{
  25. label: "工单号",
  26. value: res.data.billno
  27. }, {
  28. label: "申请单号",
  29. value: res.data.servicebillno
  30. }, {
  31. label: "服务类型",
  32. value: res.data.servicetype,
  33. style: this.data.tabColorS[res.data.servicetype] ? `color:${this.data.tabColorS[res.data.servicetype].color}` : ""
  34. }, {
  35. label: "工单类型",
  36. value: res.data.type,
  37. style: this.data.sColors[res.data.type] ? `color:${this.data.sColors[res.data.type].color}` : ''
  38. }, {
  39. label: "状态",
  40. value: getApp().globalData.Language.getMapText(res.data.status),
  41. style: `color:${this.data.sColors[res.data.status]}`
  42. }, {
  43. label: "企业名称",
  44. value: res.data.enterprisename
  45. }, {
  46. label: "企业编号",
  47. value: res.data.agentnum
  48. }, {
  49. label: "关联订单",
  50. value: res.data.sonum
  51. }, {
  52. label: "省市县",
  53. value: res.data.province + res.data.city + res.data.county
  54. }, {
  55. label: "详细地址",
  56. value: res.data.address
  57. }, {
  58. label: "现场联系人",
  59. value: res.data.scenecontact
  60. }, {
  61. label: "身份备注",
  62. value: res.data.scenecontactrole
  63. }, {
  64. label: "现场联系人电话",
  65. value: res.data.scenecontactphonenumber
  66. }, {
  67. label: "应用系统",
  68. value: res.data.class1
  69. }, {
  70. label: "客诉大类",
  71. value: res.data.class2
  72. }, {
  73. label: "问题描述",
  74. value: res.data.reason
  75. }, {
  76. label: "服务负责人",
  77. value: leader ? leader.name : ''
  78. }, {
  79. label: "服务负责人电话",
  80. value: leader ? leader.phonenumber : ''
  81. }, {
  82. label: "业务员",
  83. value: res.data.saler_name
  84. }, {
  85. label: "业务员电话",
  86. value: res.data.saler_phonenumber
  87. }, {
  88. label: "历史服务次数",
  89. value: res.data.historicalservicesqty
  90. }, {
  91. label: "异常类型",
  92. value: res.data.exception_type
  93. }, {
  94. label: "服务等级",
  95. value: res.data.service_level,
  96. style: `color:${this.data.sColors[res.data.service_level]}`
  97. }, {
  98. label: "项目名称",
  99. value: res.data.projectname
  100. }, {
  101. label: "操作类型",
  102. value: res.data.actiontype
  103. }, {
  104. label: "是否为我司出货产品",
  105. value: res.data.isouritem === 1 ? "是" : "否"
  106. }, {
  107. label: "是否在保质期内",
  108. value: res.data.inqualityguaranteeperiod === 1 ? "是" : "否"
  109. }, {
  110. label: "确认客诉异常描述",
  111. value: res.data.reason
  112. }, {
  113. label: "是否属实",
  114. value: res.data.isfact === 1 ? "是" : "否"
  115. }, {
  116. label: "备注",
  117. value: res.data.remarks
  118. }];
  119. /* 系统信息 */
  120. let list2 = [{
  121. label: "创建时间",
  122. value: res.data.createdate
  123. }, {
  124. label: "最近编辑人",
  125. value: res.data.changeby
  126. }, {
  127. label: "最近编辑时间",
  128. value: res.data.changedate
  129. }, {
  130. label: "接单时间",
  131. value: res.data.takedate
  132. }, {
  133. label: "开始工单时间",
  134. value: res.data.startdate
  135. }, {
  136. label: "完成时间",
  137. value: res.data.finishdate
  138. }, {
  139. label: "中止时间",
  140. value: res.data.abortdate
  141. }, {
  142. label: "中止原因",
  143. value: res.data.abortreason
  144. }];
  145. this.setData({
  146. list1,
  147. list2
  148. });
  149. },
  150. }
  151. })