ApproveList.vue 7.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322
  1. <template>
  2. <view>
  3. <!-- 流程 -->
  4. <view class="process" v-if="outRecordDetailObj">
  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!=0">
  68. <view v-if="operator.status==1" style="color: #4CAF50" >出库成功</view>
  69. <view v-else>等待出库</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==1" >出库成功</view>
  85. <view v-else>等待出库</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-item v-if="outRecordDetailObj&&outRecordDetailObj.outUser">
  95. <template v-slot:content>
  96. <view class="u-order">
  97. <view class="u-order-desc">
  98. <view class="level">
  99. {{outRecordDetailObj.outUser.name}}
  100. </view>
  101. <view class="state"
  102. v-if="outRecordDetailObj&&outRecordDetailObj.outRecord&&(outRecordDetailObj.outRecord.status==8||outRecordDetailObj.outRecord.status==3)">
  103. <view v-if="outRecordDetailObj.outRecord.status==8">等待签收</view>
  104. <view v-else style="color: #4CAF50" >确认签收</view>
  105. </view>
  106. </view>
  107. <view class="u-order-time">
  108. <view class="photo">
  109. <u-avatar size="56" class="img" :src="outRecordDetailObj.outUser.headImg"></u-avatar>
  110. </view>
  111. <view class="confirm">
  112. <u-icon v-if="outRecordDetailObj&&outRecordDetailObj.outRecord&&outRecordDetailObj.outRecord.status==3" name="checkmark-circle-fill"
  113. :color="recordStatusColor(1)"></u-icon>
  114. <u-icon v-else name="more-circle-fill"
  115. :color="recordStatusColor(0)"></u-icon>
  116. </view>
  117. <view class="name"
  118. v-if="outRecordDetailObj&&outRecordDetailObj.outRecord&&outRecordDetailObj.outRecord.status==3">
  119. <view >签收成功</view>
  120. </view>
  121. <view class="name" v-else>
  122. <view>等待签收</view>
  123. </view>
  124. </view>
  125. </view>
  126. </template>
  127. </u-time-line-item>
  128. </u-time-line>
  129. </view>
  130. </view>
  131. </template>
  132. <script>
  133. import {
  134. recordStatusColor
  135. } from '@/apis/status.js'
  136. export default {
  137. name: "ApproveList",
  138. props: {
  139. approveList: {
  140. default: []
  141. },
  142. outRecordDetailObj: {
  143. approveList:[],
  144. outRecord:{},
  145. outUser:{},
  146. }
  147. },
  148. data() {
  149. return {
  150. };
  151. },
  152. computed: {
  153. operator() {
  154. var obj = {
  155. userImg: "",
  156. status: "",
  157. name: "",
  158. }
  159. var outRecordDetailObj = this.outRecordDetailObj;
  160. if (outRecordDetailObj && outRecordDetailObj.outRecord && outRecordDetailObj.outRecord.status != 0) {
  161. if (outRecordDetailObj.outRecord.status == 3||outRecordDetailObj.outRecord.status == 8) {
  162. obj.status = 1;
  163. }
  164. }
  165. return obj
  166. }
  167. },
  168. methods: {
  169. recordStatusColor
  170. }
  171. }
  172. </script>
  173. <style scoped lang="scss">
  174. // 流程
  175. .process {
  176. background-color: #fff;
  177. margin-top: 24rpx;
  178. padding: 24rpx 32rpx;
  179. padding-bottom: 80px;
  180. .title {
  181. color: rgba(51, 51, 51, 1);
  182. font-size: 32rpx;
  183. }
  184. .u-time-axis-item {
  185. //margin-bottom: 76rpx;
  186. }
  187. .u-time-axis {
  188. //padding: 18rpx 40rpx;
  189. }
  190. .u-node {
  191. width: 18rpx;
  192. height: 18rpx;
  193. border-radius: 100rpx !important;
  194. display: flex;
  195. justify-content: center;
  196. align-items: center;
  197. background: #d0d0d0;
  198. }
  199. .u-order {
  200. margin-bottom: 32rpx;
  201. }
  202. .u-order-title {
  203. color: #333333;
  204. font-weight: bold;
  205. font-size: 32rpx;
  206. }
  207. .u-order-desc {
  208. margin-bottom: 16rpx;
  209. display: flex;
  210. justify-content: space-between;
  211. align-items: center;
  212. .level {
  213. color: #333333;
  214. font-size: 32rpx;
  215. font-weight: bold;
  216. }
  217. .date {
  218. color: rgba(119, 119, 119, 1);
  219. }
  220. .state {
  221. color: rgba(255, 121, 0, 1);
  222. }
  223. }
  224. .u-order-time {
  225. width: 160rpx;
  226. color: #777777;
  227. font-size: 28rpx;
  228. margin-top: 16rpx;
  229. display: flex;
  230. flex-direction: column;
  231. align-items: center;
  232. .photo {
  233. display: flex;
  234. width: 56rpx;
  235. height: 56rpx;
  236. border-radius: 100px;
  237. margin-bottom: 4rpx;
  238. .img {
  239. width: 100%;
  240. min-width: 25px;
  241. height: 100%;
  242. overflow: hidden;
  243. position: relative;
  244. }
  245. }
  246. .signUrl{
  247. border: 1px solid;
  248. margin-left: 40px;
  249. img{
  250. width:200rpx;
  251. height:80rpx;
  252. }
  253. }
  254. .confirm {
  255. position: absolute;
  256. top: 46rpx;
  257. left: 56rpx;
  258. }
  259. .name {
  260. color: rgba(51, 51, 51, 1);
  261. font-size: 24rpx;
  262. }
  263. }
  264. }
  265. </style>