CardList.vue 4.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214
  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.code}} </view>
  10. </view>
  11. <view class="status"
  12. :class="statusList[item.status && item.status] && statusList[item.status && item.status].class">
  13. {{ statusList[item.status] && statusList[item.status].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>{{item.name }}</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.sourceNo }}</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.outInNo }}</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.createName}}</view>
  38. </view>
  39. </view>
  40. <view class="item_box rx-bc">
  41. <view class="item_one perce50 rx-sc">
  42. <view class="lable">创建时间:</view>
  43. <view>{{item.createTime}}</view>
  44. </view>
  45. </view>
  46. <view class="item_box rx-bc">
  47. <view class="item_one perce50 rx-sc">
  48. <view class="lable">仓库:</view>
  49. <view>{{item.warehouseName}}</view>
  50. </view>
  51. </view>
  52. </view>
  53. </u-list-item>
  54. <u-list-item v-if="list.length === 0">
  55. <view style='margin-top: 20vh;'>
  56. <u-empty iconSize='150' textSize='32' text='暂无数据'>
  57. </u-empty>
  58. </view>
  59. </u-list-item>
  60. </u-list>
  61. </view>
  62. </template>
  63. <script>
  64. export default {
  65. props: {
  66. list: {
  67. type: Array,
  68. default: () => []
  69. }
  70. },
  71. data() {
  72. return {
  73. statusList: {
  74. 0: {
  75. class: 'text-danger',
  76. label: '拣货中'
  77. },
  78. 1: {
  79. class: 'normal',
  80. label: '拣货完成'
  81. },
  82. 2: {
  83. class: 'text-primary',
  84. label: '已出库'
  85. }
  86. }
  87. }
  88. },
  89. methods: {
  90. goDetail(val) {
  91. uni.navigateTo({
  92. url: `/pages/warehouse/outHouse/details?&bizNo=${val.outInNo}`
  93. })
  94. }
  95. }
  96. }
  97. </script>
  98. <style lang="scss" scoped>
  99. .marginTop {
  100. border-top: 20rpx solid $page-bg;
  101. }
  102. .card_box {
  103. width: 750rpx;
  104. padding: 16rpx 32rpx;
  105. box-sizing: border-box;
  106. border-bottom: 2rpx solid #E1E1E1;
  107. .item_box {
  108. margin-top: 10rpx;
  109. .round {
  110. width: 40rpx;
  111. height: 40rpx;
  112. line-height: 40rpx;
  113. border-radius: 50%;
  114. background: $theme-color;
  115. color: #fff;
  116. text-align: center;
  117. font-size: 20rpx;
  118. }
  119. .orderId {
  120. color: #000;
  121. font-family: PingFang HK;
  122. font-size: 28rpx;
  123. font-style: normal;
  124. font-weight: 600;
  125. margin-left: 16rpx;
  126. }
  127. .item_one {
  128. width: 100%;
  129. font-size: 26rpx;
  130. font-style: normal;
  131. font-weight: 400;
  132. line-height: 38rpx;
  133. word-wrap: break-word;
  134. }
  135. .gylx {
  136. color: $theme-color;
  137. }
  138. .perce50 {
  139. width: 100%;
  140. }
  141. }
  142. .flex_between {
  143. display: flex;
  144. justify-content: space-between;
  145. }
  146. }
  147. .status {
  148. font-size: 28rpx;
  149. display: inline-block;
  150. padding: 4rpx 10rpx;
  151. border-radius: 18rpx;
  152. &.normal {
  153. background-color: $page-bg;
  154. }
  155. &.text-danger {
  156. background-color: rgba($color: $uni-color-order-error, $alpha: 0.1);
  157. }
  158. &.text-primary {
  159. background-color: rgba($color: $j-primary-green, $alpha: 0.1);
  160. }
  161. }
  162. // .kd-row {
  163. // font-size: 28rpx;
  164. // padding: 14rpx 12rpx 6rpx;
  165. // border-bottom: 1rpx solid $page-bg;
  166. // .kd-col {
  167. // display: flex;
  168. // justify-content: space-between;
  169. // align-items: center;
  170. // padding: 2rpx;
  171. // color: #aaaaaa;
  172. // }
  173. // .title {
  174. // font-weight: bold;
  175. // color: #333333;
  176. // }
  177. // }
  178. // .center {
  179. // text-align: center;
  180. // margin-bottom: 10rpx;
  181. // color: #999;
  182. // }
  183. // .no_data {
  184. // position: fixed;
  185. // top: 50%;
  186. // left: 50%;
  187. // transform: translate(-50%, -50%);
  188. // color: #999;
  189. // font-size: 28rpx;
  190. // }
  191. </style>