manager_complaint_handle.vue 4.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224
  1. <template>
  2. <view style=" background-color: #F0F0F0; height: 100%;">
  3. <!--pages/handleSuggest/handleSuggest.wxml-->
  4. <!-- 投诉信息 -->
  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="suggestHeadId">{{complaint.fromUid}}</text>
  12. </view>
  13. <view class="suggestHead">
  14. <text>处理人UID</text>
  15. <text class="suggestHeadId">{{complaint.processorUid}}</text>
  16. </view>
  17. <view class="suggestHead">
  18. <text>投诉日期</text>
  19. <text class="suggestHeadDetail">{{complaint.fistDatetime}}</text>
  20. </view>
  21. <!-- 投诉标题 -->
  22. <view class="suggestTitle">
  23. <text class="suggestTitleText">投诉标题</text>
  24. <text class="suggestTitleDetail">{{complaint.complaintTitle}}</text>
  25. </view>
  26. <!-- 投诉内容 -->
  27. <view class="suggestTitle">
  28. <text class="suggestTitleText">投诉内容</text>
  29. <text class="suggestTitleDetail">{{complaint.complaintDetail}}</text>
  30. </view>
  31. <!-- 结案日期 -->
  32. <view class="handleDate">
  33. <text>结案日期</text>
  34. <text class="handleDateDetail">{{complaint.closetime}}</text>
  35. </view>
  36. <!-- 处理状态 -->
  37. <view class="handleStatus">
  38. <text>状态</text>
  39. <text class="handleStatusDetail">{{complaint.status}}</text>
  40. </view>
  41. <!-- 处理结果 -->
  42. <view class="handleResult">
  43. <view class="handleResultTitle">处理结果</view>
  44. <!-- 未处理 -->
  45. <view>
  46. <textarea v-model="result" class="handleDetail" maxlength="512" placeholder="不超过512个字"></textarea>
  47. </view>
  48. </view>
  49. <!-- 底部按钮 -->
  50. <view class="handleEnd">
  51. <text class="handleClosed" @click="toHandle">结案</text>
  52. </view>
  53. </view>
  54. </template>
  55. <script>
  56. export default {
  57. data() {
  58. return {
  59. complaint: {},
  60. result: ""
  61. };
  62. },
  63. onLoad(opt){
  64. this.complaint = JSON.parse(opt.item);
  65. if(this.complaint.processorUid==null){
  66. this.complaint.processorUid = " ";
  67. }
  68. },
  69. methods:{
  70. toHandle(){
  71. var head = '^[ ]+$';
  72. var re = new RegExp(head);
  73. if (re.test(this.result)) {
  74. uni.showModal({
  75. title: '',
  76. content: '结果不能为空'
  77. })
  78. }
  79. else if(this.result==null || this.result==""){
  80. uni.showModal({
  81. title: '',
  82. content: '结果不能为空'
  83. })
  84. }
  85. else{
  86. uni.request({
  87. url: `${uni.$http.baseUrl}/education/my-complaint/handleComplaint`,
  88. data: {
  89. "id": this.complaint.id,
  90. "result": this.result
  91. },
  92. header: {
  93. token: uni.getStorageSync('token')
  94. },
  95. method: 'POST',
  96. success: res => {
  97. uni.$showMsg(res.data.message)
  98. uni.navigateBack({
  99. delta: 2,
  100. })
  101. }
  102. })
  103. }
  104. }
  105. }
  106. }
  107. </script>
  108. <!-- 设置页面背景 -->
  109. <style lang="scss">
  110. page{
  111. padding: 20rpx;
  112. height: 100%;
  113. // background-color: #D4F5E9;
  114. }
  115. </style>
  116. <style lang="scss" scoped>
  117. /* pages/handleSuggest/handleSuggest.wxss */
  118. /* 设置页面背景 */
  119. // page{
  120. // padding: 20rpx;
  121. // height: 100%;
  122. // background-color: #FFF2CC;
  123. // }
  124. /* 顶部的投诉信息 */
  125. .suggestHead{
  126. margin-top: 20rpx;
  127. }
  128. /* 顶部投诉信息详情、结案日期详情、状态处理详情 */
  129. .suggestHeadDetail,
  130. .suggestHeadId,
  131. .handleDateDetail,
  132. .handleStatusDetail{
  133. margin-left: 20rpx;
  134. font-weight: bold;
  135. }
  136. .suggestHeadId{
  137. color: #00B0F0;
  138. text-decoration: underline;
  139. }
  140. /* 投诉详情 */
  141. .suggestTitle{
  142. margin-top: 30rpx;
  143. display: flex;
  144. flex-direction: column;
  145. }
  146. /* 标题 */
  147. .suggestTitleText{
  148. text-align: center;
  149. font-weight: bold;
  150. margin-bottom: 10rpx;
  151. }
  152. /* 内容 */
  153. .suggestTitleDetail{
  154. width: 94%;
  155. }
  156. /* 结案日期 */
  157. .handleDate{
  158. margin-top: 40rpx;
  159. }
  160. /* 处理状态 */
  161. .handleStatus{
  162. margin-top: 40rpx;
  163. }
  164. .handleStatusDetail{
  165. color: red;
  166. }
  167. /* 处理结果 */
  168. .handleResult{
  169. display: flex;
  170. flex-direction: column;
  171. }
  172. .handleResultTitle{
  173. text-align: center;
  174. margin: 20rpx 0;
  175. font-weight: bold;
  176. }
  177. /* 处理结果详情 */
  178. .handleDetail{
  179. padding: 10rpx;
  180. background-color: #fff;
  181. // border: 1rpx solid gray;
  182. border-radius: 20rpx;
  183. width: 93%;
  184. //margin: auto;
  185. //margin-bottom: 40rpx;
  186. }
  187. .handleResultDetail{
  188. min-height: 200rpx;
  189. padding: 10rpx;
  190. background-color: #fff;
  191. border-radius: 20rpx;
  192. width: 93%;
  193. margin-bottom: 40rpx;
  194. }
  195. /* 结案 */
  196. .handleEnd{
  197. display: flex;
  198. justify-content: center;
  199. margin-top: 40rpx;
  200. margin-bottom: 40rpx;
  201. }
  202. .handleClosed{
  203. background-color: #35b882;
  204. font-size: 40rpx;
  205. padding: 10rpx 30rpx;
  206. border-radius: 40rpx;
  207. color: white;
  208. }
  209. </style>