card.vue 3.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151
  1. <template>
  2. <view class="marginTop">
  3. <view
  4. v-for="(item, index) in list"
  5. class="kd-row"
  6. :key="item.id"
  7. @click="goDetail(item)"
  8. v-show="list.length !== 0"
  9. >
  10. <view class="kd-col">
  11. <text class="title">生产工单号:{{ item.dialNumber }}</text>
  12. <text
  13. class="status"
  14. :class="
  15. statusList[item.auditStatus] && statusList[item.auditStatus].class
  16. "
  17. >{{
  18. statusList[item.auditStatus] && statusList[item.auditStatus].label
  19. }}</text>
  20. </view>
  21. <view class="kd-col">
  22. <text class="warehouse" > 生产版本:X01 挤压</text>
  23. <text>产品名称:木工刀</text>
  24. </view>
  25. <view class="kd-col">
  26. <text class="warehouse" > 牌号|型号:牌号|型号</text>
  27. <text>要求成型数量:10000PCS</text>
  28. </view>
  29. <view class="kd-col">
  30. <text class="warehouse" > 要求成型重量:1000KG</text>
  31. <text>要求成型日期:2023/6/20</text>
  32. </view>
  33. <view class="kd-col">
  34. <text class="warehouse" > 工单发布时间:2023/08/10 02:00:00</text>
  35. </view>
  36. <view class="kd-col">
  37. <text class="warehouse" > 计划开始时间:2023/08/10 02:00:00</text>
  38. </view>
  39. </view>
  40. <view v-show="list.length === 0" class="no_data">
  41. <u-empty mode="data" textSize="22"></u-empty>
  42. </view>
  43. </view>
  44. </template>
  45. <script>
  46. export default {
  47. props: {
  48. list: {
  49. type: Array,
  50. default: () => []
  51. }
  52. },
  53. data () {
  54. return {
  55. statusList: {
  56. 4: { class: '', label: '草稿' },
  57. 1: { class: '', label: '待审核' },
  58. 0: { class: 'text-danger', label: '已驳回' },
  59. 2: { class: 'text-primary', label: '已完成' }
  60. }
  61. }
  62. },
  63. methods: {
  64. goDetail ({ id, auditStatus }) {
  65. uni.navigateTo({
  66. url: `/pages/production/execute/extrusion/detail?&id=${id}`
  67. // auditStatus === 4
  68. // ? `/pages/warehouse/inventoryAllocation/edit?&id=${id}`
  69. // : `/pages/warehouse/inventoryAllocation/detail?&id=${id}`
  70. })
  71. }
  72. }
  73. }
  74. </script>
  75. <style lang="scss" scoped>
  76. .marginTop {
  77. border-top: 20rpx solid $page-bg;
  78. .kd-row {
  79. font-size: 28rpx;
  80. padding: 14rpx 12rpx 6rpx;
  81. border-bottom: 1rpx solid $page-bg;
  82. .kd-col {
  83. display: flex;
  84. justify-content: space-between;
  85. align-items: center;
  86. padding: 2rpx;
  87. color: #aaaaaa;
  88. .status {
  89. background-color: $page-bg;
  90. display: inline-block;
  91. padding: 4rpx 10rpx;
  92. border-radius: 18rpx;
  93. }
  94. }
  95. .title {
  96. font-weight: bold;
  97. color: #333333;
  98. }
  99. }
  100. .center {
  101. text-align: center;
  102. margin-bottom: 10rpx;
  103. color: #999;
  104. }
  105. .no_data {
  106. position: fixed;
  107. top: 50%;
  108. left: 50%;
  109. transform: translate(-50%, -50%);
  110. color: #999;
  111. font-size: 28rpx;
  112. }
  113. }
  114. .warehouse {
  115. display: flex;
  116. align-items: center;
  117. }
  118. .arrow {
  119. display: inline-block;
  120. position: relative;
  121. width: 50rpx;
  122. height: 10rpx;
  123. margin: 0 20rpx;
  124. &::after,
  125. &::before {
  126. content: '';
  127. position: absolute;
  128. }
  129. &::after {
  130. border-top: 4rpx solid #aaaaaa;
  131. border-right: 4rpx solid #aaaaaa;
  132. width: 12rpx;
  133. height: 12rpx;
  134. right: 0rpx;
  135. top: -6rpx;
  136. transform: rotate(45deg);
  137. }
  138. &::before {
  139. height: 4rpx;
  140. background-color: #aaaaaa;
  141. width: 50rpx;
  142. }
  143. }
  144. </style>