card.vue 3.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165
  1. <template>
  2. <view class="marginTop">
  3. <u-list>
  4. <u-list-item v-for="(item, index) in list" :key="item.id" v-show="list.length !== 0">
  5. <view class="card_box" @click="goDetail(item)">
  6. <view class="item_box flex_between">
  7. <view class="rx-sc">
  8. <view class="round">{{Number(index)+1}}</view>
  9. <view class="orderId">{{item.bizNo}} </view>
  10. </view>
  11. <view class="status"
  12. :class="statusList[item.verifyStatus] && statusList[item.verifyStatus].class">
  13. {{ statusList[item.verifyStatus] && statusList[item.verifyStatus].label }}
  14. </view>
  15. </view>
  16. <view class="item_box rx-bc">
  17. <view class="item_one perce50 rx-sc">
  18. <view class="lable">出库类型:</view>
  19. <view>{{ outputSceneState.filter(ite => item.bizType == ite.value)[0].text }}</view>
  20. </view>
  21. </view>
  22. <view class="item_box rx-bc">
  23. <view class="item_one perce50 rx-sc">
  24. <view class="lable">审核人:</view>
  25. <view>{{item.verifyName}}</view>
  26. </view>
  27. </view>
  28. <view class="item_box rx-bc">
  29. <view class="item_one perce50 rx-sc">
  30. <view class="lable">创建人:</view>
  31. <view>{{item.createUserName}}</view>
  32. </view>
  33. </view>
  34. <view class="item_box rx-bc">
  35. <view class="item_one perce50 rx-sc">
  36. <view class="lable">出库时间:</view>
  37. <view>{{item.createTime}}</view>
  38. </view>
  39. </view>
  40. </view>
  41. </u-list-item>
  42. <u-list-item v-if="list.length === 0">
  43. <view style='margin-top: 20vh;'>
  44. <u-empty iconSize='150' textSize='32' text='暂无数据'>
  45. </u-empty>
  46. </view>
  47. </u-list-item>
  48. </u-list>
  49. </view>
  50. </template>
  51. <script>
  52. import {
  53. outputSceneState
  54. } from '../../common'
  55. export default {
  56. props: {
  57. list: {
  58. type: Array,
  59. default: () => []
  60. }
  61. },
  62. data() {
  63. return {
  64. outputSceneState,
  65. statusList: {
  66. 0: {
  67. class: '',
  68. label: '未提交'
  69. },
  70. 1: {
  71. class: 'text-warning',
  72. label: '审核中'
  73. },
  74. 2: {
  75. class: 'text-primary',
  76. label: '审核通过'
  77. },
  78. 3: {
  79. class: 'text-danger',
  80. label: '已驳回'
  81. }
  82. }
  83. }
  84. },
  85. methods: {
  86. goDetail({
  87. id
  88. }) {
  89. uni.navigateTo({
  90. url: `/pages/warehouse/outHouse/details?&id=${id}`
  91. })
  92. }
  93. }
  94. }
  95. </script>
  96. <style lang="scss" scoped>
  97. .marginTop {
  98. border-top: 20rpx solid $page-bg;
  99. }
  100. .card_box {
  101. width: 750rpx;
  102. padding: 16rpx 32rpx;
  103. box-sizing: border-box;
  104. border-bottom: 2rpx solid #E1E1E1;
  105. .item_box {
  106. margin-top: 10rpx;
  107. .round {
  108. width: 40rpx;
  109. height: 40rpx;
  110. line-height: 40rpx;
  111. border-radius: 50%;
  112. background: $theme-color;
  113. color: #fff;
  114. text-align: center;
  115. font-size: 20rpx;
  116. }
  117. .orderId {
  118. color: #000;
  119. font-family: PingFang HK;
  120. font-size: 28rpx;
  121. font-style: normal;
  122. font-weight: 600;
  123. margin-left: 16rpx;
  124. }
  125. .item_one {
  126. width: 100%;
  127. font-size: 26rpx;
  128. font-style: normal;
  129. font-weight: 400;
  130. line-height: 38rpx;
  131. word-wrap: break-word;
  132. }
  133. .gylx {
  134. color: $theme-color;
  135. }
  136. .perce50 {
  137. width: 100%;
  138. }
  139. }
  140. .flex_between {
  141. display: flex;
  142. justify-content: space-between;
  143. }
  144. }
  145. .status {
  146. font-size: 28rpx;
  147. background-color: $page-bg;
  148. display: inline-block;
  149. padding: 2px 5px;
  150. border-radius: 18rpx;
  151. }
  152. </style>