card.vue 3.3 KB

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