card.vue 3.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150
  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. >
  9. <view class="kd-col">
  10. <text class="title">生产工单号:{{ item.code }}</text>
  11. <!-- <text
  12. class="status"
  13. :class="
  14. statusList[item.auditStatus] && statusList[item.auditStatus].class
  15. "
  16. >{{
  17. statusList[item.auditStatus] && statusList[item.auditStatus].label
  18. }}</text> -->
  19. </view>
  20. <view class="kd-col">
  21. <text class="warehouse" > 生产版本:{{item.produceVersionName}}</text>
  22. <text>产品名称:{{item.productName}}</text>
  23. </view>
  24. <view class="kd-col">
  25. <text class="warehouse" > 牌号|型号:{{item.brandNo}}|{{item.model}}</text>
  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. 1: { class: '', label: '待审核' },
  57. 0: { class: 'text-danger', label: '已驳回' },
  58. 2: { class: 'text-primary', label: '已完成' }
  59. }
  60. }
  61. },
  62. methods: {
  63. // goDetail ({ id, auditStatus }) {
  64. // uni.navigateTo({
  65. // url: `/pages/production/order/detail?&id=${id}`
  66. // // auditStatus === 4
  67. // // ? `/pages/warehouse/inventoryAllocation/edit?&id=${id}`
  68. // // : `/pages/warehouse/inventoryAllocation/detail?&id=${id}`
  69. // })
  70. // }
  71. }
  72. }
  73. </script>
  74. <style lang="scss" scoped>
  75. .marginTop {
  76. border-top: 20rpx solid $page-bg;
  77. .kd-row {
  78. font-size: 28rpx;
  79. padding: 14rpx 12rpx 6rpx;
  80. border-bottom: 1rpx solid $page-bg;
  81. .kd-col {
  82. display: flex;
  83. justify-content: space-between;
  84. align-items: center;
  85. padding: 2rpx;
  86. color: #aaaaaa;
  87. .status {
  88. background-color: $page-bg;
  89. display: inline-block;
  90. padding: 4rpx 10rpx;
  91. border-radius: 18rpx;
  92. }
  93. }
  94. .title {
  95. font-weight: bold;
  96. color: #333333;
  97. }
  98. }
  99. .center {
  100. text-align: center;
  101. margin-bottom: 10rpx;
  102. color: #999;
  103. }
  104. .no_data {
  105. position: fixed;
  106. top: 50%;
  107. left: 50%;
  108. transform: translate(-50%, -50%);
  109. color: #999;
  110. font-size: 28rpx;
  111. }
  112. }
  113. .warehouse {
  114. display: flex;
  115. align-items: center;
  116. }
  117. .arrow {
  118. display: inline-block;
  119. position: relative;
  120. width: 50rpx;
  121. height: 10rpx;
  122. margin: 0 20rpx;
  123. &::after,
  124. &::before {
  125. content: '';
  126. position: absolute;
  127. }
  128. &::after {
  129. border-top: 4rpx solid #aaaaaa;
  130. border-right: 4rpx solid #aaaaaa;
  131. width: 12rpx;
  132. height: 12rpx;
  133. right: 0rpx;
  134. top: -6rpx;
  135. transform: rotate(45deg);
  136. }
  137. &::before {
  138. height: 4rpx;
  139. background-color: #aaaaaa;
  140. width: 50rpx;
  141. }
  142. }
  143. </style>