productsBom.vue 3.5 KB

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