paramBom.vue 3.9 KB

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