complaintProgress.vue 6.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304
  1. <template>
  2. <view class="container" v-if="info">
  3. <!-- 头部订单信息区域 -->
  4. <view class="header">
  5. <view class="header_title">
  6. <view class="title_left">{{ info.title }}</view>
  7. <view class="title_right">{{ info.detailsVoList[0].progressType }}</view>
  8. </view>
  9. <view class="header_info">
  10. <view class="info_box">
  11. <view class="box_key">订单号</view>
  12. <view class="box_value">{{ info.bookingId }}</view>
  13. </view>
  14. <view class="info_box">
  15. <view class="box_key">投诉单号</view>
  16. <view class="box_value">{{ info.complaintId }}</view>
  17. </view>
  18. <view class="info_box">
  19. <view class="box_key">反馈时间</view>
  20. <view class="box_value">{{ info.dateTime }}</view>
  21. </view>
  22. </view>
  23. </view>
  24. <!-- 进度详情区域 -->
  25. <view class="progress" v-if="info.detailsVoList">
  26. <view class="progress_title">进度详情</view>
  27. <!-- 进度条区域 -->
  28. <view class="progress_body">
  29. <!-- 每一个进度区域 -->
  30. <view class="body_item" v-for="(item, index) in info.detailsVoList" :key="index">
  31. <view class="item_left">
  32. <view class="left_top">{{ item.dateTime.slice(5, 10) }}</view>
  33. <view class="left_bottom">{{ item.dateTime.slice(11, 16) }}</view>
  34. <view class="left_dot"></view>
  35. </view>
  36. <view class="item_right">
  37. <view class="right_top">{{ item.progressType }}</view>
  38. <view class="right_bottom" v-if="item.title">标题:{{ item.title }}</view>
  39. <view class="right_bottom" v-if="item.content">问题描述:{{ item.content }}</view>
  40. <view class="right_bottom" v-if="item.progressType === '待处理'">问题跟进中</view>
  41. <view class="right_bottom" v-if="item.progressType === '已处理'">您的问题已处理</view>
  42. <!-- 图片区域 -->
  43. <view class="right_bottom" v-if="item.urlList.length">
  44. <view class="bottom_key">图片:</view>
  45. <view class="bottom_value">
  46. <img mode="aspectFill" v-for="(img, index2) in item.urlList" :key="index2" :src="img" @click="() => handleClickImg(item.urlList, index2)" />
  47. </view>
  48. </view>
  49. </view>
  50. </view>
  51. </view>
  52. </view>
  53. <!-- 底部按钮区域 -->
  54. <view class="foot">
  55. <view class="btn_phone">服务热线</view>
  56. <view class="btn_finish" v-if="info.detailsVoList[0].progressType !== '已处理'" @click="handleFinish">处理完成</view>
  57. </view>
  58. </view>
  59. </template>
  60. <script>
  61. var dayjs = require('dayjs')
  62. export default {
  63. data() {
  64. return {
  65. // 进度条列表数据
  66. list: [],
  67. id: '',
  68. // 进度详情数据
  69. info: null
  70. }
  71. },
  72. onLoad(options) {
  73. this.id = options.id
  74. this.getData()
  75. },
  76. methods: {
  77. // 获取进度详情数据
  78. async getData() {
  79. const res = await this.$myRequest({
  80. url: '/mhotel/complaintprogressDetails.action',
  81. data: {
  82. complaintId: this.id
  83. }
  84. })
  85. // console.log(res)
  86. if (res.code === 200) {
  87. this.info = res.page
  88. }
  89. },
  90. // 处理完成按钮回调
  91. handleFinish() {
  92. uni.showModal({
  93. title: '提示',
  94. content: '确定处理完成了吗?',
  95. success: async (res) => {
  96. if (res.confirm) {
  97. let time = dayjs(new Date()).format('YYYY-MM-DD HH:mm:ss')
  98. const res = await this.$myRequest({
  99. url: '/mhotel/complaintresolutionComplaint.action',
  100. data: {
  101. complaintId: this.info.complaintId,
  102. createId: uni.getStorageSync('userInfo').id,
  103. createDate: time,
  104. modifyDate: time
  105. }
  106. })
  107. // console.log(res)
  108. if (res.code === 200) {
  109. uni.redirectTo({
  110. url: '/pages/myComplaint/myComplaint'
  111. })
  112. }
  113. }
  114. }
  115. })
  116. },
  117. // 点击进度条图片回调
  118. handleClickImg(urls, index) {
  119. uni.previewImage({
  120. urls,
  121. current: index
  122. })
  123. }
  124. }
  125. }
  126. </script>
  127. <style lang="scss">
  128. .container {
  129. height: 100vh;
  130. overflow-y: auto;
  131. background-color: #f7f7f7;
  132. .header {
  133. box-sizing: border-box;
  134. padding: 0 30rpx;
  135. height: 290rpx;
  136. background-color: #fff;
  137. .header_title {
  138. display: flex;
  139. align-items: center;
  140. height: 89rpx;
  141. font-size: 28rpx;
  142. border-bottom: 1rpx solid #e5e5e5;
  143. .title_left {
  144. flex: 4;
  145. font-weight: bold;
  146. overflow: hidden;
  147. text-overflow: ellipsis;
  148. white-space: nowrap;
  149. }
  150. .title_right {
  151. flex: 1;
  152. text-align: end;
  153. color: #a6a6a6;
  154. }
  155. }
  156. .header_info {
  157. display: flex;
  158. flex-direction: column;
  159. justify-content: space-evenly;
  160. height: 200rpx;
  161. font-size: 28rpx;
  162. .info_box {
  163. display: flex;
  164. align-items: center;
  165. .box_key {
  166. width: 130rpx;
  167. color: #808080;
  168. }
  169. .box_value {
  170. color: #383838;
  171. }
  172. }
  173. }
  174. }
  175. .progress {
  176. box-sizing: border-box;
  177. padding: 0 30rpx;
  178. margin-top: 20rpx;
  179. background-color: #fff;
  180. .progress_title {
  181. display: flex;
  182. align-items: center;
  183. height: 89rpx;
  184. font-size: 28rpx;
  185. font-weight: bold;
  186. border-bottom: 1rpx solid #e5e5e5;
  187. }
  188. .progress_body {
  189. padding-top: 22rpx;
  190. padding-bottom: 47rpx;
  191. .body_item {
  192. display: flex;
  193. .item_left {
  194. position: relative;
  195. display: flex;
  196. flex-direction: column;
  197. align-items: center;
  198. padding-right: 20rpx;
  199. width: 100rpx;
  200. border-right: 1rpx dotted #a6a6a6;
  201. .left_top {
  202. font-size: 28rpx;
  203. }
  204. .left_bottom {
  205. font-size: 20rpx;
  206. }
  207. .left_dot {
  208. position: absolute;
  209. top: 18rpx;
  210. right: -8rpx;
  211. width: 16rpx;
  212. height: 16rpx;
  213. border-radius: 50%;
  214. background-color: #096562;
  215. }
  216. }
  217. .item_right {
  218. flex: 1;
  219. margin-top: -10rpx;
  220. margin-left: 30rpx;
  221. padding-bottom: 20rpx;
  222. overflow: hidden;
  223. .right_top {
  224. margin-bottom: 8rpx;
  225. font-weight: bold;
  226. font-size: 28rpx;
  227. }
  228. .right_bottom {
  229. display: flex;
  230. margin-bottom: 12rpx;
  231. font-size: 24rpx;
  232. color: #808080;
  233. .bottom_key {
  234. width: 75rpx;
  235. }
  236. .bottom_value {
  237. flex: 1;
  238. display: grid;
  239. grid-template-columns: repeat(auto-fill, 103rpx);
  240. gap: 12rpx;
  241. img {
  242. width: 103rpx;
  243. height: 122rpx;
  244. border-radius: 5rpx;
  245. }
  246. }
  247. }
  248. }
  249. }
  250. }
  251. }
  252. .foot {
  253. display: flex;
  254. justify-content: space-between;
  255. box-sizing: border-box;
  256. padding: 66rpx 30rpx;
  257. font-size: 28rpx;
  258. .btn_phone {
  259. display: flex;
  260. justify-content: center;
  261. align-items: center;
  262. width: 330rpx;
  263. height: 84rpx;
  264. color: #096562;
  265. border-radius: 22rpx;
  266. border: 1rpx solid #096562;
  267. }
  268. .btn_finish {
  269. display: flex;
  270. justify-content: center;
  271. align-items: center;
  272. width: 330rpx;
  273. height: 84rpx;
  274. color: #fff;
  275. border-radius: 22rpx;
  276. background-color: #096562;
  277. }
  278. }
  279. }
  280. </style>