complaint_not_start.vue 4.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212
  1. <template>
  2. <view>
  3. <view class="wrapper" v-if="isShow">
  4. <view class="suggestHead">
  5. <text>投诉号</text>
  6. <text class="suggestHeadDetail">{{complaint.id}}</text>
  7. </view>
  8. <view class="suggestHead">
  9. <text>投诉人UID</text>
  10. <text class="suggestHeadDetailID">{{complaint.fromUid}}</text>
  11. </view>
  12. <view class="suggestHead">
  13. <text>处理人UID</text>
  14. <text class="suggestHeadDetailID">{{complaint.processorUid}}</text>
  15. </view>
  16. <view class="suggestHead">
  17. <text>投诉标题</text>
  18. <text class="suggestHeadDetail">{{complaint.adviseTitle}}</text>
  19. </view>
  20. <view class="suggestHead">
  21. <text>投诉内容</text>
  22. <text class="suggestHeadDetail">{{complaint.adviseDetail}}</text>
  23. </view>
  24. <view class="suggestHead">
  25. <text>处理结果</text>
  26. <text class="suggestHeadDetail">{{complaint.result}}</text>
  27. </view>
  28. <view class="suggestHead">
  29. <text>投诉日期</text>
  30. <text class="suggestHeadDetail">{{complaint.fistDatetime}}</text>
  31. </view>
  32. <view class="suggestHead">
  33. <text>结案日期</text>
  34. <text class="suggestHeadDetail">{{complaint.closetime}}</text>
  35. </view>
  36. <view class="suggestHead">
  37. <text>状态</text>
  38. <text style="width: 50px;" class="handleStatusDetail">{{complaint.status}}</text>
  39. </view>
  40. </view>
  41. <view class="requires2">
  42. <uni-row >
  43. <text>待处理条数:{{current}}</text>
  44. </uni-row>
  45. </view>
  46. <!-- 提交按钮 -->
  47. <view class="suggestBtn" v-if="isShow">
  48. <button class="confirmBtn" @click="toConfirm">开始处理</button>
  49. </view>
  50. </view>
  51. </template>
  52. <script>
  53. import { mapState } from 'vuex';
  54. export default {
  55. computed: {
  56. ...mapState('m_user', ['token', 'userinfo'])
  57. },
  58. data() {
  59. return {
  60. complaint: {},
  61. index: 0,
  62. current:0,
  63. datas: {},
  64. isShow: false,
  65. };
  66. },
  67. onLoad(){
  68. this.findAllNotStartList()
  69. },
  70. methods:{
  71. checkIsHaveNext(){
  72. this.current = this.current - 1
  73. this.index = this.index + 1
  74. if(this.current == 0){
  75. this.isShow = false
  76. }else{
  77. this.complaint = this.datas.list[this.index]
  78. }
  79. },
  80. toConfirm(){
  81. // 开始向后端提交数据
  82. let strtxt ="处理中" + this.userinfo.uid
  83. this.submitToBack(this.complaint.id,"处理中",strtxt,this.userinfo.uid)
  84. this.checkIsHaveNext()
  85. },
  86. async findAllNotStartList() {
  87. const { data: result } = await uni.$http.get('/education/my-complaint/findAllNotStartComplaintList')
  88. // console.log(result)
  89. this.current = result.data.list.length
  90. if(this.current > 0){
  91. this.datas = result.data
  92. this.complaint = this.datas.list[this.index ]
  93. this.isShow = true
  94. }
  95. //console.log(this.item)
  96. },
  97. async submitToBack(complaintid,status,text,procuid) {
  98. // 准备参数对象
  99. const query = {
  100. complaintid: complaintid,
  101. status: status,
  102. text: text,
  103. procuid: procuid,
  104. }
  105. const {
  106. data: result
  107. } = await uni.$http.get('/education/my-complaint/updateComplaintInfo',query)
  108. //console.log(result)
  109. uni.$showMsg(result.message , 2000)
  110. },
  111. }
  112. }
  113. </script>
  114. <!-- 设置页面背景 -->
  115. <style lang="scss">
  116. page{
  117. height: 100%;
  118. // background-color: #FFF;
  119. }
  120. </style>
  121. <style lang="scss" scoped>
  122. // page {
  123. // height: 100%;
  124. // background-color: #FFF2CC;
  125. // }
  126. .wrapper {
  127. width: 93%;
  128. padding: 20rpx;
  129. margin-left: 10rpx;
  130. border-radius: 30rpx;
  131. background-color: #FFF;
  132. font-size: 30rpx;
  133. }
  134. /* 建议号、建议人、建议日期 */
  135. .suggestHead {
  136. display: flex;
  137. }
  138. .suggestHeadDetail,
  139. .suggestHeadDetailID {
  140. margin-left: 20rpx;
  141. font-weight: bold;
  142. }
  143. /* 建议人和处理人ID */
  144. .suggestHeadDetailID {
  145. color: #00B0F0;
  146. text-decoration: underline;
  147. }
  148. /* 建议标题 */
  149. .suggestTitle{
  150. // margin-top: 10rpx;
  151. display: flex;
  152. }
  153. /* 状态详情颜色 */
  154. .handleStatusDetail {
  155. font-weight: bold;
  156. color: red;
  157. margin-left: 20rpx;
  158. }
  159. .requires2 {
  160. background-color: #FFF;
  161. margin: 20rpx 20rpx;
  162. border-radius: 50rpx;
  163. font-size: 30rpx;
  164. padding: 20rpx 20rpx;
  165. //font-weight: bold;
  166. color: gray;
  167. display: flex;
  168. align-items: center;
  169. justify-content: center;
  170. }
  171. /* 下方按钮 */
  172. .suggestBtn{
  173. display: flex;
  174. padding: 60rpx;
  175. justify-content: space-around;
  176. }
  177. .confirmBtn{
  178. font-size: 30rpx;
  179. height: 85rpx;
  180. width: 200rpx;
  181. line-height: 85rpx;
  182. border-radius: 50rpx;
  183. text-align: center;
  184. color: white;
  185. margin-top: 5rpx;
  186. }
  187. .confirmBtn{
  188. background-color: #35b882;
  189. }
  190. </style>