backlogDetail.vue 5.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236
  1. <template>
  2. <view class="back-content">
  3. <!-- 轮播图 -->
  4. <swiper v-if="infoData.backlogPhotoList && infoData.backlogPhotoList.length" class="top-ad-swiper" :indicator-dots="false" :autoplay="true" :interval="5000" :duration="600" :circular="true">
  5. <swiper-item v-for="(item,index) in infoData.backlogPhotoList" :key="index">
  6. <div class="swiper-item uni-bg-red">
  7. <u-image mode="scaleToFill" width="750upx" height="400upx" :src="item.photo"></u-image>
  8. </div>
  9. </swiper-item>
  10. </swiper>
  11. <view v-else class="noPic">
  12. 暂无图片
  13. </view>
  14. <view class="back-text">
  15. <!-- 门店 -->
  16. <view class="text-item">
  17. {{infoData.storeName}}
  18. </view>
  19. <!-- 处理人 -->
  20. <view class="text-item">
  21. <view>
  22. <text>处理人</text>
  23. <text class="margin-left ellipsis-one">{{infoData.receiveUserName}}</text>
  24. </view>
  25. <view class="time ">
  26. {{infoData.effectiveEndTime}} 到期
  27. </view>
  28. </view>
  29. <!-- 创建人 -->
  30. <view class="text-item">
  31. <view>
  32. <text>创建人</text>
  33. <text class="margin-left ellipsis-one">{{infoData.putUserName}}</text>
  34. </view>
  35. <view class="time">
  36. {{infoData.createTime}} 创建
  37. </view>
  38. </view>
  39. <!-- 指标 -->
  40. <view class="text-item">
  41. <view>
  42. 考评指标
  43. </view>
  44. <view class="margin-left">
  45. {{infoData.clsName}}
  46. </view>
  47. </view>
  48. <!-- 描述 -->
  49. <view class="text-item">
  50. <view>
  51. 描述
  52. </view>
  53. <view class="margin-left">
  54. {{infoData.problemDesc}}
  55. </view>
  56. </view>
  57. </view>
  58. <view class="step-content">
  59. <u-steps :list="numList" direction ="column" :current="0"></u-steps>
  60. </view>
  61. <view class="footer">
  62. <!-- receiveFlag 接收人/责任人标记 只有处理人可以整改-->
  63. <u-button v-if="infoData.receiveFlag && infoData.receiveFlag == 1 && infoData.status=='PENDING'" type="primary">整改完成</u-button>
  64. <!-- putFlag 创建人标记 只有创建人可以审核-->
  65. <view v-if="infoData.putFlag && infoData.putFlag == 1 && infoData.status=='CHECK_PENDING'" class="check-pending">
  66. <u-button class="act-btn" type="error">整改不通过</u-button>
  67. <u-button class="act-btn" type="success">整改通过</u-button>
  68. </view>
  69. <!-- copyFlag 抄送标识 只有抄送人可以评论-->
  70. <view v-if="infoData.copyFlag && infoData.copyFlag==1" class="comment-input">
  71. <input type="text" v-model="comment" @confirm="sendComment" placeholder="请输入评论..."/>
  72. <view>整改状态:<text :class="clsStatus()">{{infoData.status}}</text></view>
  73. </view>
  74. </view>
  75. </view>
  76. </template>
  77. <script>
  78. import { getBackLogDetail, getBackLogRecord } from '@/api/backLog.js'
  79. export default {
  80. components: {
  81. },
  82. data() {
  83. return {
  84. infoData:{}, // 详情数据
  85. numList: [],
  86. comment: '' // 评论
  87. }
  88. },
  89. onLoad(option) {
  90. console.log(option.id)
  91. this.getData(option.id)
  92. this.getRecordData(option.id)
  93. },
  94. methods: {
  95. // 获取详情数据
  96. getData (id) {
  97. getBackLogDetail({id:id}).then(res=>{
  98. if(res.status==200){
  99. this.infoData = res.data
  100. } else {
  101. this.toashMsg(res.message)
  102. this.infoData = {}
  103. }
  104. })
  105. },
  106. // 获取进度数据
  107. getRecordData (id) {
  108. getBackLogRecord({id:id}).then(res=>{
  109. if(res.status==200){
  110. let arr = []
  111. res.data.map(item=>{
  112. const p = {}
  113. const k = '\xa0\xa0\xa0\xa0\xa0\xa0'
  114. p.name = item.handleTime + k + item.handleType + k + (item.handleDesc ? item.handleDesc : '')
  115. arr.push(p)
  116. })
  117. this.numList = arr
  118. } else {
  119. this.toashMsg(res.message)
  120. this.numList = []
  121. }
  122. })
  123. },
  124. sendComment (v) {
  125. },
  126. // 状态颜色处理
  127. clsStatus(status){
  128. if(status == '待审核'){
  129. return 'dsh'
  130. }
  131. if(status == '待整改'){
  132. return 'dzg'
  133. }
  134. if(status == '整改完成'){
  135. return 'ywc'
  136. }
  137. if(status == '已过期'){
  138. return 'ygq'
  139. }
  140. }
  141. }
  142. }
  143. </script>
  144. <style lang="scss" scoped>
  145. .back-content {
  146. background-color: #eee;
  147. height: 100%;
  148. display: flex;
  149. flex-direction: column;
  150. // 轮播图
  151. .top-ad-swiper{
  152. height: 340upx;
  153. }
  154. .noPic{
  155. width: 750upx;
  156. height: 400upx;
  157. font-size: 38upx;
  158. text-align: center;
  159. line-height: 400upx;
  160. color: #666;
  161. }
  162. // 详情内容
  163. .back-text{
  164. background: #ffffff;
  165. padding: 10upx 20upx;
  166. margin-bottom: 20upx;
  167. border-radius: 6upx;
  168. box-shadow: 1px 1px 3px #EEEEEE;
  169. .text-item{
  170. display: flex;
  171. align-items: center;
  172. padding: 10upx 10upx;
  173. font-size: 28upx;
  174. justify-content: space-between;
  175. .margin-left{
  176. margin-left: 30upx;
  177. }
  178. .time{
  179. color: #888;
  180. font-size: 26upx;
  181. margin-left: 10upx;
  182. }
  183. > view{
  184. &:first-child{
  185. flex: 1;
  186. }
  187. }
  188. }
  189. }
  190. // 步骤条
  191. .step-content {
  192. padding: 0 20upx;
  193. background-color: #fff;
  194. flex: 1;
  195. overflow-y: scroll;
  196. }
  197. // 底部按钮
  198. .footer {
  199. background-color: #fff;
  200. // margin-top: 20upx;
  201. .check-pending{
  202. display: flex;
  203. .act-btn {
  204. width: 50%;
  205. }
  206. }
  207. .comment-input{
  208. width: 100%;
  209. padding: 20upx;
  210. input{
  211. background-color: #f4f4f4;
  212. padding: 20upx;
  213. border-radius: 10upx;
  214. }
  215. view{
  216. margin-top: 20upx;
  217. }
  218. }
  219. .dsh{
  220. color: red;
  221. }
  222. .dzg{
  223. color: #007AFF;
  224. }
  225. .ygq {
  226. color: #999;
  227. }
  228. .ywc {
  229. color: #10c71e;
  230. }
  231. }
  232. }
  233. </style>