byProductBom.vue 2.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199
  1. <template>
  2. <view>
  3. <view class="title_box rx-bc">
  4. <view class="name">副产品回收</view>
  5. </view>
  6. <view class="material">
  7. <view class="content_table">
  8. <view class="head row rx-sc">
  9. <view class="item ww30">物料编码</view>
  10. <view class="item ww30">物料名称</view>
  11. <view class="item ww40">重量</view>
  12. </view>
  13. <view class="table">
  14. <view class="tr row rx-sc" v-for="(item, index) in list" :key='index'>
  15. <view class="item ww30">{{item.code}}</view>
  16. <view class="item ww30">{{item.name}}</view>
  17. <view class="item ww40 content_num">
  18. <input class="uni-input" v-model="item.recycleQuantity" type="digit"></input>
  19. <view class="unit">{{item.unit}}</view>
  20. <view class="penalize" :style="{ color: item.warehouseId ? 'rgb(255 170 42)' : ''}" @click="penalize(index)">处置</view>
  21. </view>
  22. </view>
  23. </view>
  24. </view>
  25. </view>
  26. </view>
  27. </template>
  28. <script>
  29. export default {
  30. props: {
  31. list: {
  32. type: Array,
  33. default: () => {}
  34. }
  35. },
  36. data() {
  37. return {
  38. }
  39. },
  40. methods: {
  41. penalize(index) {
  42. this.$emit('penalize', index)
  43. }
  44. },
  45. }
  46. </script>
  47. <style lang="scss" scoped>
  48. .title_box {
  49. margin-top: 20rpx;
  50. .name {
  51. font-size: 28rpx;
  52. font-style: normal;
  53. font-weight: 400;
  54. color: $theme-color;
  55. padding-left: 20rpx;
  56. position: relative;
  57. &:before {
  58. position: absolute;
  59. content: '';
  60. left: 0rpx;
  61. top: 0rpx;
  62. bottom: 0rpx;
  63. width: 4rpx;
  64. height: 28rpx;
  65. background: $theme-color;
  66. margin: auto;
  67. }
  68. }
  69. }
  70. .material {
  71. margin-top: 10rpx;
  72. .content_table {
  73. width: 100%;
  74. .row {
  75. width: 100%;
  76. .item {
  77. color: #404446;
  78. font-size: 28rpx;
  79. padding-left: 12rpx;
  80. }
  81. .ww30 {
  82. width: 30%;
  83. }
  84. .ww40 {
  85. width: 40%;
  86. }
  87. }
  88. .head {
  89. height: 64rpx;
  90. background: #F7F9FA;
  91. border-top: 2rpx solid #E3E5E5;
  92. border-left: 2rpx solid #E3E5E5;
  93. .item {
  94. height: 64rpx;
  95. line-height: 64rpx;
  96. border-right: 2rpx solid #E3E5E5;
  97. box-sizing: border-box;
  98. }
  99. }
  100. .tr {
  101. border-top: 2rpx solid #E3E5E5;
  102. border-left: 2rpx solid #E3E5E5;
  103. .item {
  104. font-size: 24rpx;
  105. min-height: 64rpx;
  106. display: flex;
  107. align-items: center;
  108. border-right: 2rpx solid #E3E5E5;
  109. box-sizing: border-box;
  110. white-space: normal;
  111. word-break: break-all;
  112. }
  113. &:last-child {
  114. border-bottom: 2rpx solid #E3E5E5;
  115. }
  116. }
  117. }
  118. .content_num {
  119. display: flex;
  120. align-items: center;
  121. padding: 0 4rpx;
  122. /deep/ .uni-input-input {
  123. border: 2rpx solid #F0F8F2;
  124. background: #F0F8F2;
  125. color: $theme-color;
  126. }
  127. .unit {
  128. width: 100rpx;
  129. font-size: 24rpx;
  130. color: #404446;
  131. }
  132. .penalize {
  133. width: 160rpx;
  134. line-height: 60rpx;
  135. background: $theme-color;
  136. font-size: 24rpx;
  137. text-align: center;
  138. color: #fff;
  139. }
  140. }
  141. }
  142. </style>