manager_complaint_detail.vue 4.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234
  1. <template>
  2. <view>
  3. <view class="wrapper">
  4. <view>
  5. <view class="suggestHead">
  6. <text>投诉号</text>
  7. <text class="suggestHeadDetail">{{complaint.id}}</text>
  8. </view>
  9. <view class="suggestHead">
  10. <text>投诉人UID</text>
  11. <text class="suggestHeadDetailID">{{complaint.fromUid}}</text>
  12. </view>
  13. <view class="suggestHead">
  14. <text>处理人UID</text>
  15. <text class="suggestHeadDetailID">{{complaint.processorUid}}</text>
  16. </view>
  17. <view class="suggestHead">
  18. <text>投诉日期</text>
  19. <text class="suggestHeadDetail">{{complaint.fistDatetime}}</text>
  20. </view>
  21. </view>
  22. <view>
  23. <view class="suggestTitle">
  24. <text>投诉标题</text>
  25. <text class="suggestTitleDetail">{{complaint.complaintTitle}}</text>
  26. </view>
  27. <view class="suggestContent">
  28. <text>投诉内容</text>
  29. <text class="suggestContentDetail">{{complaint.complaintDetail}}</text>
  30. </view>
  31. </view>
  32. <view>
  33. <view class="handleResult">
  34. <text>处理结果</text>
  35. <text class="handleResultDetail">{{complaint.result}}</text>
  36. </view>
  37. <view class="handleDate">
  38. <text>结案日期</text>
  39. <text class="DateDetail">{{complaint.closetime}}</text>
  40. </view>
  41. <view class="handleStatus">
  42. <text>状态</text>
  43. <text style="width: 50px;" class="handleStatusDetail">{{complaint.status}}</text>
  44. <text class="handleBtn" @click="toHandleSuggest">处理</text>
  45. </view>
  46. </view>
  47. </view>
  48. </view>
  49. </template>
  50. <script>
  51. export default {
  52. data() {
  53. return {
  54. complaint: {}
  55. };
  56. },
  57. onLoad(opt){
  58. this.complaint = JSON.parse(opt.item);
  59. if(this.complaint.result==null){
  60. this.complaint.result=" ";
  61. }
  62. if(this.complaint.closetime==null){
  63. this.complaint.closetime = " ";
  64. }
  65. if(this.complaint.processorUid==null){
  66. this.complaint.processorUid = " ";
  67. }
  68. },
  69. methods:{
  70. toHandleSuggest(){
  71. if(this.complaint.status=="已处理"){
  72. uni.showModal({
  73. title: '',
  74. content: '该投诉已被处理'
  75. })
  76. }
  77. else{
  78. uni.request({
  79. url: `${uni.$http.baseUrl}/education/my-complaint/handlingComplaint`,
  80. data: {
  81. "id": this.complaint.id
  82. },
  83. header: {
  84. token: uni.getStorageSync('token')
  85. },
  86. method: 'POST',
  87. success: res => {
  88. console.log(res)
  89. this.complaint.status = "处理中"
  90. let complaint = JSON.stringify(this.complaint)
  91. uni.navigateTo({
  92. url: '/subpkg/manager/complaint/manager_complaint_handle?item=' + complaint
  93. })
  94. }
  95. })
  96. }
  97. }
  98. }
  99. }
  100. </script>
  101. <style lang="scss">
  102. page {
  103. height: 100%;
  104. background-color: #FFF2CC;
  105. }
  106. .wrapper {
  107. padding: 20rpx;
  108. }
  109. /* 建议号、建议人、建议日期 */
  110. .suggestHead {
  111. display: flex;
  112. margin-top: 10rpx;
  113. padding: 10rpx;
  114. }
  115. .suggestHeadDetail,
  116. .suggestHeadDetailID {
  117. margin-left: 20rpx;
  118. font-weight: bold;
  119. }
  120. /* 建议人和处理人ID */
  121. .suggestHeadDetailID {
  122. color: #00B0F0;
  123. text-decoration: underline;
  124. }
  125. /* 建议标题 */
  126. .suggestTitle,
  127. .suggestContent {
  128. margin-top: 40rpx;
  129. display: flex;
  130. }
  131. /* 建议标题内容 */
  132. .suggestTitleDetail {
  133. display: block;
  134. width: 70%;
  135. height: 120rpx;
  136. margin-left: 20rpx;
  137. overflow: hidden;
  138. text-overflow: ellipsis;
  139. display: -webkit-box;
  140. -webkit-box-orient: vertical;
  141. -webkit-line-clamp: 3;
  142. }
  143. /* 建议内容 */
  144. .suggestContentDetail {
  145. display: block;
  146. width: 70%;
  147. height: 200rpx;
  148. margin-left: 20rpx;
  149. overflow: hidden;
  150. text-overflow: ellipsis;
  151. display: -webkit-box;
  152. -webkit-box-orient: vertical;
  153. -webkit-line-clamp: 5;
  154. }
  155. /* 处理结果 */
  156. .handleResult {
  157. margin-top: 60rpx;
  158. display: flex;
  159. }
  160. /* 处理结果详情 */
  161. .handleResultDetail {
  162. display: block;
  163. width: 70%;
  164. height: 80rpx;
  165. margin-left: 20rpx;
  166. overflow: hidden;
  167. text-overflow: ellipsis;
  168. display: -webkit-box;
  169. -webkit-box-orient: vertical;
  170. -webkit-line-clamp: 2;
  171. }
  172. /* 结案日期、处理状态 */
  173. .handleDate,
  174. .handleStatus {
  175. display: flex;
  176. margin-top: 40rpx;
  177. }
  178. /* 结案日期详情、状态详情 */
  179. .DateDetail,
  180. .handleStatusDetail {
  181. margin-left: 20rpx;
  182. font-weight: bold;
  183. }
  184. /* 状态详情颜色 */
  185. .handleStatusDetail {
  186. color: red;
  187. }
  188. /* 开始处理按钮 */
  189. .handleStart {
  190. position: absolute;
  191. bottom: 160rpx;
  192. width: 200rpx;
  193. margin-left: auto;
  194. margin-right: auto;
  195. left: 0;
  196. right: 0;
  197. }
  198. .handleBtn {
  199. // padding: 10rpx 20rpx;
  200. width: 50px;
  201. padding-left: 15px;
  202. border-radius: 30rpx;
  203. background-color: #8FAADC;
  204. color: white;
  205. margin-left: 20px;
  206. }
  207. </style>