productsBom.vue 3.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219
  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" @input="maxFeedQuantity()"></input>
  30. {{ productsObj.unit }}
  31. </view>
  32. </view>
  33. </view>
  34. </view>
  35. </view>
  36. </view>
  37. </template>
  38. import { method } from 'lodash';<script>
  39. export default {
  40. props: {
  41. productsObj: {
  42. type: Object,
  43. default: () => {}
  44. },
  45. itemObj: {
  46. type: Object,
  47. default: () => {}
  48. }
  49. },
  50. methods: {
  51. maxFeedQuantity() {
  52. if(this.productsObj.feedQuantity > this.itemObj.formingNum) {
  53. this.$set(this.productsObj, 'feedQuantity', this.itemObj.formingNum)
  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. .left {
  85. width: 40rpx;
  86. }
  87. .zdy_check {
  88. width: 30rpx;
  89. height: 30rpx;
  90. border: 2rpx solid #c8c9cc;
  91. border-radius: 4rpx;
  92. }
  93. .check_active {
  94. background: $theme-color;
  95. border: 2rpx solid $theme-color;
  96. /deep/ .u-icon__icon {
  97. color: #fff !important;
  98. }
  99. }
  100. .content_table {
  101. width: 722rpx;
  102. border: 2rpx solid $border-color;
  103. .item {
  104. display: flex;
  105. border-bottom: 2rpx solid $border-color;
  106. .lable {
  107. width: 132rpx;
  108. text-align: center;
  109. background-color: #F7F9FA;
  110. font-size: 26rpx;
  111. border-right: 2rpx solid $border-color;
  112. flex-shrink: 0;
  113. }
  114. .ww80 {
  115. width: 80rpx;
  116. }
  117. .content {
  118. width: 518rpx;
  119. min-height: 64rpx;
  120. font-size: 28rpx;
  121. line-height: 28rpx;
  122. font-style: normal;
  123. font-weight: 400;
  124. padding: 18rpx 8rpx;
  125. box-sizing: border-box;
  126. word-wrap: break-word;
  127. flex-grow: 1 !important;
  128. }
  129. .content_num {
  130. display: flex;
  131. align-items: center;
  132. padding: 0 4rpx;
  133. /deep/ .uni-input-input {
  134. width: 200rpx;
  135. border: 2rpx solid #F0F8F2;
  136. background: #F0F8F2;
  137. color: $theme-color;
  138. }
  139. .unit {
  140. padding: 0 4rpx;
  141. font-size: 24rpx;
  142. color: #404446;
  143. }
  144. }
  145. .ww400 {
  146. /deep/ .uni-input-input {
  147. width: 400rpx;
  148. }
  149. }
  150. .pd4 {
  151. padding: 4rpx 8rpx;
  152. }
  153. &:last-child {
  154. border-bottom: none;
  155. }
  156. }
  157. .ww55 {
  158. width: 55%;
  159. }
  160. .ww45 {
  161. width: 45%;
  162. }
  163. }
  164. }
  165. </style>