paramBom.vue 3.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214
  1. <template>
  2. <view>
  3. <view class="title_box rx-bc">
  4. <view class="name">工艺参数</view>
  5. </view>
  6. <view>
  7. <view class="content_table2">
  8. <view class="head row rx-sc">
  9. <view class="item ww40">参数名</view>
  10. <view class="item ww40">参数值</view>
  11. <view class="item ww20">单位</view>
  12. </view>
  13. <view class="table">
  14. <view class="tr row rx-sc" v-for="(it, idx) in newList" :key='idx'>
  15. <view class="item ww40">
  16. {{ it.name }}
  17. </view>
  18. <view class="item ww40" v-if='it.textType != 3'>
  19. {{ it.defaultValue}}
  20. </view>
  21. <view class="item ww40" v-if='it.textType == 3'>
  22. {{ it.minValue}} - {{it.maxValue}}
  23. </view>
  24. <view class="item ww20 ">
  25. {{ it.unitName }}
  26. </view>
  27. </view>
  28. </view>
  29. </view>
  30. </view>
  31. </view>
  32. </template>
  33. <script>
  34. export default {
  35. props: {
  36. list: {
  37. type: Array,
  38. default: () => []
  39. },
  40. wordItem: {
  41. type: Object,
  42. default: () => {}
  43. }
  44. },
  45. watch: {
  46. list: {
  47. immediate: true,
  48. deep: true,
  49. handler(newVal) {
  50. this.newList = newVal
  51. }
  52. }
  53. },
  54. data() {
  55. return {
  56. recycleQuantity: '',
  57. newList: []
  58. }
  59. },
  60. methods: {
  61. quantInt(index, idx, it) {
  62. if (it.quantity >= 1) {
  63. this.$set(this.newList[index].extInfo.positionList[idx], 'workOrderCode', this.wordItem.code)
  64. this.$set(this.newList[index].extInfo.positionList[idx], 'categoryCode', this.wordItem.productCode)
  65. } else {
  66. this.$set(this.newList[index].extInfo.positionList[idx], 'workOrderCode', '')
  67. this.$set(this.newList[index].extInfo.positionList[idx], 'categoryCode', '')
  68. this.$set(this.newList[index].extInfo.positionList[idx], 'quantity', 0)
  69. }
  70. },
  71. handleScan(index) {
  72. this.$emit('handleScan', index, 'turnover')
  73. },
  74. getDelete(index) {
  75. this.list.splice(index, 1)
  76. },
  77. }
  78. }
  79. </script>
  80. <style lang="scss" scoped>
  81. .title_box {
  82. margin-top: 20rpx;
  83. .name {
  84. font-size: 28rpx;
  85. font-style: normal;
  86. font-weight: 400;
  87. color: $theme-color;
  88. padding-left: 20rpx;
  89. position: relative;
  90. &:before {
  91. position: absolute;
  92. content: '';
  93. left: 0rpx;
  94. top: 0rpx;
  95. bottom: 0rpx;
  96. width: 4rpx;
  97. height: 28rpx;
  98. background: $theme-color;
  99. margin: auto;
  100. }
  101. }
  102. }
  103. .content_table2 {
  104. width: 100%;
  105. margin-top: 10rpx;
  106. .row {
  107. width: 100%;
  108. .item {
  109. color: #404446;
  110. font-size: 28rpx;
  111. padding-left: 12rpx;
  112. }
  113. .color157 {
  114. color: $theme-color;
  115. }
  116. .ww40 {
  117. width: 40%;
  118. }
  119. .ww20 {
  120. width: 20%;
  121. }
  122. }
  123. .head {
  124. height: 64rpx;
  125. background: #F7F9FA;
  126. border-top: 2rpx solid #E3E5E5;
  127. border-left: 2rpx solid #E3E5E5;
  128. .item {
  129. height: 64rpx;
  130. line-height: 64rpx;
  131. border-right: 2rpx solid #E3E5E5;
  132. box-sizing: border-box;
  133. }
  134. }
  135. .tr {
  136. border-top: 2rpx solid #E3E5E5;
  137. border-left: 2rpx solid #E3E5E5;
  138. .item {
  139. font-size: 24rpx;
  140. min-height: 64rpx;
  141. display: flex;
  142. align-items: center;
  143. border-right: 2rpx solid #E3E5E5;
  144. box-sizing: border-box;
  145. white-space: normal;
  146. word-break: break-all;
  147. }
  148. &:last-child {
  149. border-bottom: 2rpx solid #E3E5E5;
  150. }
  151. }
  152. }
  153. </style>