card.vue 3.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193
  1. <template>
  2. <view class="marginTop">
  3. <u-list>
  4. <u-list-item v-for="(item, index) in list" :key="index" 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.allotCode}} </view>
  10. </view>
  11. <view class="status" :class="statusList[item.status] && statusList[item.status].class">
  12. {{ statusList[item.status] && statusList[item.status].label }}
  13. </view>
  14. </view>
  15. <view class="item_box rx-bc">
  16. <view class="item_one perce50 rx-sc">
  17. <view class="lable">调拨类型:</view>
  18. <view>{{ item.type == 1 ? '库内调拨' : '库外调拨' }}</view>
  19. </view>
  20. </view>
  21. <view class="item_box rx-bc">
  22. <view class="item_one perce50 rx-sc">
  23. <view class="lable"></view>
  24. <view>{{ item.sourceWarehouse }}
  25. <text class="arrow"></text>
  26. {{ item.type == 1 ? item.sourceWarehouse : item.targetWarehouse }}
  27. </view>
  28. </view>
  29. </view>
  30. <view class="item_box rx-bc">
  31. <view class="item_one perce50 rx-sc">
  32. <view class="lable">创建时间:</view>
  33. <view>{{item.createTime}}</view>
  34. </view>
  35. </view>
  36. <view class="item_box rx-bc">
  37. <view class="item_one perce50 rx-sc">
  38. <view class="lable">创建人:</view>
  39. <view>{{item.allotName}}</view>
  40. </view>
  41. </view>
  42. </view>
  43. </u-list-item>
  44. <u-list-item v-if="list.length === 0">
  45. <view style='margin-top: 20vh;'>
  46. <u-empty iconSize='150' textSize='32' text='暂无数据'>
  47. </u-empty>
  48. </view>
  49. </u-list-item>
  50. </u-list>
  51. </view>
  52. </template>
  53. <script>
  54. export default {
  55. props: {
  56. list: {
  57. type: Array,
  58. default: () => []
  59. }
  60. },
  61. data() {
  62. return {
  63. statusList: {
  64. 1: {
  65. class: '',
  66. label: '审核中'
  67. },
  68. 0: {
  69. class: 'text-danger',
  70. label: '未提交'
  71. },
  72. 2: {
  73. class: 'text-primary',
  74. label: '已完成'
  75. }
  76. }
  77. }
  78. },
  79. methods: {
  80. goDetail({
  81. id,
  82. auditStatus
  83. }) {
  84. // uni.navigateTo({
  85. // url: auditStatus === 4 ? `/pages/warehouse/inventoryAllocation/edit?&id=${id}` : `/pages/warehouse/inventoryAllocation/detail?&id=${id}`
  86. // })
  87. uni.navigateTo({
  88. url: `/pages/warehouse/inventoryAllocation/detail?&id=${id}`
  89. })
  90. }
  91. }
  92. }
  93. </script>
  94. <style lang="scss" scoped>
  95. .marginTop {
  96. border-top: 20rpx solid $page-bg;
  97. }
  98. .arrow {
  99. display: inline-block;
  100. position: relative;
  101. width: 50rpx;
  102. height: 10rpx;
  103. margin: 0 20rpx;
  104. &::after,
  105. &::before {
  106. content: '';
  107. position: absolute;
  108. }
  109. &::after {
  110. border-top: 4rpx solid #aaaaaa;
  111. border-right: 4rpx solid #aaaaaa;
  112. width: 12rpx;
  113. height: 12rpx;
  114. right: 0rpx;
  115. top: -6rpx;
  116. transform: rotate(45deg);
  117. }
  118. &::before {
  119. height: 4rpx;
  120. background-color: #aaaaaa;
  121. width: 50rpx;
  122. }
  123. }
  124. .card_box {
  125. width: 750rpx;
  126. padding: 16rpx 32rpx;
  127. box-sizing: border-box;
  128. border-bottom: 2rpx solid #E1E1E1;
  129. .item_box {
  130. margin-top: 10rpx;
  131. .round {
  132. width: 40rpx;
  133. height: 40rpx;
  134. line-height: 40rpx;
  135. border-radius: 50%;
  136. background: $theme-color;
  137. color: #fff;
  138. text-align: center;
  139. font-size: 20rpx;
  140. }
  141. .orderId {
  142. color: #000;
  143. font-family: PingFang HK;
  144. font-size: 28rpx;
  145. font-style: normal;
  146. font-weight: 600;
  147. margin-left: 16rpx;
  148. }
  149. .item_one {
  150. width: 100%;
  151. font-size: 26rpx;
  152. font-style: normal;
  153. font-weight: 400;
  154. line-height: 38rpx;
  155. word-wrap: break-word;
  156. }
  157. .gylx {
  158. color: $theme-color;
  159. }
  160. .perce50 {
  161. width: 100%;
  162. }
  163. }
  164. .flex_between {
  165. display: flex;
  166. justify-content: space-between;
  167. }
  168. }
  169. .status {
  170. font-size: 28rpx;
  171. background-color: $page-bg;
  172. display: inline-block;
  173. padding: 2px 5px;
  174. border-radius: 18rpx;
  175. }
  176. </style>