productsBom.vue 4.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215
  1. <template>
  2. <view>
  3. <view class="title_box rx-bc">
  4. <view class="name">在制品{{ productsObj.length }}个</view>
  5. </view>
  6. <view v-for="(item, index) of productsObj" :key="index">
  7. <view class="material rx-ss">
  8. <view class="content_table">
  9. <view class="item">
  10. <view class="lable rx-cc">名称</view>
  11. <view class="content"> {{ item.name + "-在制品" }} </view>
  12. </view>
  13. <view class="item">
  14. <view class="lable rx-cc">批次号</view>
  15. <view class="content"> {{ item.batchNo }} </view>
  16. </view>
  17. <view class="item">
  18. <view class="lable rx-cc">牌号</view>
  19. <view class="content"> {{ item.brandNum }} </view>
  20. </view>
  21. <view class="item">
  22. <view class="lable rx-cc">型号</view>
  23. <view class="content"> {{ item.modelType }} </view>
  24. </view>
  25. <view class="item">
  26. <view class="lable rx-cc">数量</view>
  27. <view class="content">
  28. {{ item.extInfo.sourceQuantity || 0 }}
  29. {{ item.unit }}
  30. </view>
  31. </view>
  32. <view class="item">
  33. <view class="lable rx-cc">重量</view>
  34. <view class="content">
  35. {{ item.extInfo.newWeight || 0 }}{{ item.extInfo.weightUnit }}
  36. </view>
  37. </view>
  38. <view class="item">
  39. <view class="lable rx-cc">设备名称</view>
  40. <view class="content"> {{ item.deviceName }} </view>
  41. </view>
  42. <view class="item">
  43. <view class="lable rx-cc">炉次号</view>
  44. <view class="content"> {{ item.extInfo.heatNumber }} </view>
  45. </view>
  46. </view>
  47. </view>
  48. </view>
  49. </view>
  50. </template>
  51. <script>
  52. import { method } from "lodash";
  53. export default {
  54. props: {
  55. productsObj: {
  56. type: Array,
  57. default: () => {},
  58. },
  59. itemObj: {
  60. type: Object,
  61. default: () => {},
  62. },
  63. },
  64. mounted() {
  65. console.log(this.productsObj, "this.productsObj");
  66. },
  67. methods: {
  68. maxFeedQuantity() {
  69. if (this.productsObj.feedQuantity > this.itemObj.formingNum) {
  70. this.$set(this.productsObj, "feedQuantity", this.itemObj.formingNum);
  71. }
  72. },
  73. },
  74. };
  75. </script>
  76. <style lang="scss" scoped>
  77. .title_box {
  78. margin-top: 20rpx;
  79. .name {
  80. font-size: 28rpx;
  81. font-style: normal;
  82. font-weight: 400;
  83. color: $theme-color;
  84. padding-left: 20rpx;
  85. position: relative;
  86. &:before {
  87. position: absolute;
  88. content: "";
  89. left: 0rpx;
  90. top: 0rpx;
  91. bottom: 0rpx;
  92. width: 4rpx;
  93. height: 28rpx;
  94. background: $theme-color;
  95. margin: auto;
  96. }
  97. }
  98. }
  99. .material {
  100. margin-top: 10rpx;
  101. .left {
  102. width: 40rpx;
  103. }
  104. .zdy_check {
  105. width: 30rpx;
  106. height: 30rpx;
  107. border: 2rpx solid #c8c9cc;
  108. border-radius: 4rpx;
  109. }
  110. .check_active {
  111. background: $theme-color;
  112. border: 2rpx solid $theme-color;
  113. /deep/ .u-icon__icon {
  114. color: #fff !important;
  115. }
  116. }
  117. .content_table {
  118. width: 722rpx;
  119. border: 2rpx solid $border-color;
  120. .item {
  121. display: flex;
  122. border-bottom: 2rpx solid $border-color;
  123. .lable {
  124. width: 132rpx;
  125. text-align: center;
  126. background-color: #f7f9fa;
  127. font-size: 26rpx;
  128. border-right: 2rpx solid $border-color;
  129. flex-shrink: 0;
  130. }
  131. .ww80 {
  132. width: 80rpx;
  133. }
  134. .content {
  135. width: 518rpx;
  136. min-height: 64rpx;
  137. font-size: 28rpx;
  138. line-height: 28rpx;
  139. font-style: normal;
  140. font-weight: 400;
  141. padding: 18rpx 8rpx;
  142. box-sizing: border-box;
  143. word-wrap: break-word;
  144. flex-grow: 1 !important;
  145. }
  146. .content_num {
  147. display: flex;
  148. align-items: center;
  149. padding: 0 4rpx;
  150. /deep/ .uni-input-input {
  151. width: 200rpx;
  152. border: 2rpx solid #f0f8f2;
  153. background: #f0f8f2;
  154. color: $theme-color;
  155. }
  156. .unit {
  157. padding: 0 4rpx;
  158. font-size: 24rpx;
  159. color: #404446;
  160. }
  161. }
  162. .ww400 {
  163. /deep/ .uni-input-input {
  164. width: 400rpx;
  165. }
  166. }
  167. .pd4 {
  168. padding: 4rpx 8rpx;
  169. }
  170. &:last-child {
  171. border-bottom: none;
  172. }
  173. }
  174. .ww55 {
  175. width: 55%;
  176. }
  177. .ww45 {
  178. width: 45%;
  179. }
  180. }
  181. }
  182. </style>