ApproveList.vue 5.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269
  1. <template>
  2. <view>
  3. <!-- 流程 -->
  4. <view class="process">
  5. <view class="title">
  6. 流程
  7. </view>
  8. <u-time-line>
  9. <u-time-line-item node-top="10" v-for="(item,i) in approveList" :key="i">
  10. <template v-slot:node>
  11. <view>
  12. <view class="u-node" style="background:#CDCDCD;">
  13. <!-- 此处为uView的icon组件 -->
  14. <!-- <u-icon name="checkmark" color="#fff" :size="24"></u-icon> -->
  15. </view>
  16. </view>
  17. </template>
  18. <template v-slot:content>
  19. <view class="u-order">
  20. <view class="u-order-desc">
  21. <view class="level">
  22. <template v-for="(item2,index) in item.approveUserList">
  23. {{index!=0?',':''}}{{item2.name}}
  24. </template>
  25. </view>
  26. <view class="date">
  27. {{item.approveTime?item.approveTime:''}}
  28. </view>
  29. </view>
  30. <view class="u-order-time">
  31. <view class="photo">
  32. <template v-for="(item2,index) in item.approveUserList">
  33. <u-avatar size="56" class="img" :src="item2.headImg" :key="index"></u-avatar>
  34. </template>
  35. </view>
  36. <view class="confirm">
  37. <u-icon v-if="item.status==-1" name="more-circle-fill"
  38. :color="recordStatusColor(-1)"></u-icon>
  39. <u-icon v-if="item.status==0" name="more-circle-fill"
  40. :color="recordStatusColor(0)"></u-icon>
  41. <u-icon v-if="item.status==1" name="checkmark-circle-fill"
  42. :color="recordStatusColor(1)"></u-icon>
  43. <u-icon v-if="item.status==2" name="close-circle-fill"
  44. :color="recordStatusColor(2)"></u-icon>
  45. </view>
  46. <view class="name">
  47. <view v-if="item.status==-1">未开始</view>
  48. <view v-if="item.status==0">未审批</view>
  49. <view v-if="item.status==1">审批通过</view>
  50. <view v-if="item.status==2">审批驳回</view>
  51. </view>
  52. <view class="signUrl" v-if="item.signUrl">
  53. <img :src="item.signUrl" >
  54. </view>
  55. </view>
  56. </view>
  57. </template>
  58. </u-time-line-item>
  59. <u-time-line-item>
  60. <template v-slot:content>
  61. <view class="u-order">
  62. <view class="u-order-desc">
  63. <view class="level">
  64. 仓库管理
  65. </view>
  66. <view class="state"
  67. v-if="outRecordDetailObj&&outRecordDetailObj.outRecord&&outRecordDetailObj.outRecord.status==1">
  68. <view v-if="operator.status==0">等待出库</view>
  69. <view v-if="operator.status==1">出库成功</view>
  70. </view>
  71. </view>
  72. <view class="u-order-time">
  73. <view class="photo">
  74. <u-avatar size="56" class="img" :src="operator.userImg"></u-avatar>
  75. </view>
  76. <view class="confirm">
  77. <u-icon v-if="operator.status==0" name="more-circle-fill"
  78. :color="recordStatusColor(0)"></u-icon>
  79. <u-icon v-if="operator.status==1" name="checkmark-circle-fill"
  80. :color="recordStatusColor(1)"></u-icon>
  81. </view>
  82. <view class="name"
  83. v-if="outRecordDetailObj&&outRecordDetailObj.outRecord&&outRecordDetailObj.outRecord.status!=0">
  84. <view v-if="operator.status==0">等待出库</view>
  85. <view v-if="operator.status==1">出库成功</view>
  86. </view>
  87. <view class="name" v-else>
  88. <view>等待审批</view>
  89. </view>
  90. </view>
  91. </view>
  92. </template>
  93. </u-time-line-item>
  94. </u-time-line>
  95. </view>
  96. </view>
  97. </template>
  98. <script>
  99. import {
  100. recordStatusColor
  101. } from '@/apis/status.js'
  102. export default {
  103. name: "ApproveList",
  104. props: {
  105. approveList: {
  106. default: []
  107. },
  108. outRecordDetailObj: {}
  109. },
  110. data() {
  111. return {
  112. };
  113. },
  114. computed: {
  115. operator() {
  116. var obj = {
  117. userImg: "",
  118. status: "",
  119. name: "",
  120. }
  121. var outRecordDetailObj = this.outRecordDetailObj;
  122. if (outRecordDetailObj && outRecordDetailObj.outRecord && outRecordDetailObj.outRecord.status != 0) {
  123. if (outRecordDetailObj.outRecord.status == 3) {
  124. obj.status = 1;
  125. }
  126. }
  127. return obj
  128. }
  129. },
  130. methods: {
  131. recordStatusColor
  132. }
  133. }
  134. </script>
  135. <style scoped lang="scss">
  136. // 流程
  137. .process {
  138. background-color: #fff;
  139. margin-top: 24rpx;
  140. padding: 24rpx 32rpx;
  141. padding-bottom: 80px;
  142. .title {
  143. color: rgba(51, 51, 51, 1);
  144. font-size: 32rpx;
  145. }
  146. .u-time-axis-item {
  147. //margin-bottom: 76rpx;
  148. }
  149. .u-time-axis {
  150. //padding: 18rpx 40rpx;
  151. }
  152. .u-node {
  153. width: 18rpx;
  154. height: 18rpx;
  155. border-radius: 100rpx !important;
  156. display: flex;
  157. justify-content: center;
  158. align-items: center;
  159. background: #d0d0d0;
  160. }
  161. .u-order {
  162. margin-bottom: 32rpx;
  163. }
  164. .u-order-title {
  165. color: #333333;
  166. font-weight: bold;
  167. font-size: 32rpx;
  168. }
  169. .u-order-desc {
  170. margin-bottom: 16rpx;
  171. display: flex;
  172. justify-content: space-between;
  173. align-items: center;
  174. .level {
  175. color: #333333;
  176. font-size: 32rpx;
  177. font-weight: bold;
  178. }
  179. .date {
  180. color: rgba(119, 119, 119, 1);
  181. }
  182. .state {
  183. color: rgba(255, 121, 0, 1);
  184. }
  185. }
  186. .u-order-time {
  187. width: 160rpx;
  188. color: #777777;
  189. font-size: 28rpx;
  190. margin-top: 16rpx;
  191. display: flex;
  192. flex-direction: column;
  193. align-items: center;
  194. .photo {
  195. display: flex;
  196. width: 56rpx;
  197. height: 56rpx;
  198. border-radius: 100px;
  199. margin-bottom: 4rpx;
  200. .img {
  201. width: 100%;
  202. min-width: 25px;
  203. height: 100%;
  204. overflow: hidden;
  205. position: relative;
  206. }
  207. }
  208. .signUrl{
  209. border: 1px solid;
  210. margin-left: 40px;
  211. img{
  212. width:200rpx;
  213. height:80rpx;
  214. }
  215. }
  216. .confirm {
  217. position: absolute;
  218. top: 46rpx;
  219. left: 56rpx;
  220. }
  221. .name {
  222. color: rgba(51, 51, 51, 1);
  223. font-size: 24rpx;
  224. }
  225. }
  226. }
  227. </style>