byProductBom.vue 3.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211
  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">{{isDetails ? item.categoryName : item.name}}</view>
  17. <view class="item ww40 content_num">
  18. <input class="uni-input" v-model="item.recycleQuantity" type="digit" v-if="!isDetails"></input>
  19. <view v-if="isDetails">{{item.quantity}}</view>
  20. <view class="unit">{{item.unit}}</view>
  21. <view class="penalize" v-if="!isDetails" :style="{ color: item.warehouseId ? 'rgb(255 170 42)' : ''}" @click="penalize(index)">处置</view>
  22. <view v-if="isDetails" class="penalize" :style="{ color: item.warehouseId ? 'rgb(255 170 42)' : ''}" @click="handleView(item.warehouseName)">查看</view>
  23. </view>
  24. </view>
  25. </view>
  26. </view>
  27. </view>
  28. </view>
  29. </template>
  30. <script>
  31. export default {
  32. props: {
  33. list: {
  34. type: Array,
  35. default: () => {}
  36. },
  37. isDetails: {
  38. type: Boolean,
  39. default: false
  40. }
  41. },
  42. data() {
  43. return {
  44. }
  45. },
  46. methods: {
  47. penalize(index) {
  48. this.$emit('penalize', index)
  49. },
  50. handleView(name) {
  51. uni.showToast({
  52. icon: 'none',
  53. title: name
  54. })
  55. },
  56. },
  57. }
  58. </script>
  59. <style lang="scss" scoped>
  60. .title_box {
  61. margin-top: 20rpx;
  62. .name {
  63. font-size: 28rpx;
  64. font-style: normal;
  65. font-weight: 400;
  66. color: $theme-color;
  67. padding-left: 20rpx;
  68. position: relative;
  69. &:before {
  70. position: absolute;
  71. content: '';
  72. left: 0rpx;
  73. top: 0rpx;
  74. bottom: 0rpx;
  75. width: 4rpx;
  76. height: 28rpx;
  77. background: $theme-color;
  78. margin: auto;
  79. }
  80. }
  81. }
  82. .material {
  83. margin-top: 10rpx;
  84. .content_table {
  85. width: 100%;
  86. .row {
  87. width: 100%;
  88. .item {
  89. color: #404446;
  90. font-size: 28rpx;
  91. padding-left: 12rpx;
  92. }
  93. .ww30 {
  94. width: 30%;
  95. }
  96. .ww40 {
  97. width: 40%;
  98. }
  99. }
  100. .head {
  101. height: 64rpx;
  102. background: #F7F9FA;
  103. border-top: 2rpx solid #E3E5E5;
  104. border-left: 2rpx solid #E3E5E5;
  105. .item {
  106. height: 64rpx;
  107. line-height: 64rpx;
  108. border-right: 2rpx solid #E3E5E5;
  109. box-sizing: border-box;
  110. }
  111. }
  112. .tr {
  113. border-top: 2rpx solid #E3E5E5;
  114. border-left: 2rpx solid #E3E5E5;
  115. .item {
  116. font-size: 24rpx;
  117. min-height: 64rpx;
  118. display: flex;
  119. align-items: center;
  120. border-right: 2rpx solid #E3E5E5;
  121. box-sizing: border-box;
  122. white-space: normal;
  123. word-break: break-all;
  124. }
  125. &:last-child {
  126. border-bottom: 2rpx solid #E3E5E5;
  127. }
  128. }
  129. }
  130. .content_num {
  131. display: flex;
  132. align-items: center;
  133. padding: 0 4rpx;
  134. /deep/ .uni-input-input {
  135. border: 2rpx solid #F0F8F2;
  136. background: #F0F8F2;
  137. color: $theme-color;
  138. }
  139. .unit {
  140. width: 100rpx;
  141. font-size: 24rpx;
  142. color: #404446;
  143. }
  144. .penalize {
  145. width: 160rpx;
  146. line-height: 60rpx;
  147. background: $theme-color;
  148. font-size: 24rpx;
  149. text-align: center;
  150. color: #fff;
  151. }
  152. }
  153. }
  154. </style>