ApproveList.vue 5.2 KB

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