instanceBom.vue 3.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228
  1. <template>
  2. <view>
  3. <view class="title_box rx-bc">
  4. <view class="name">物料清单</view>
  5. </view>
  6. <view class="material rx-ss" v-for="(mate, idx) in list" :key="idx">
  7. <view class="left rx-ss" @click="getDelete(idx)" v-if='workOrderId'>
  8. <uni-icons custom-prefix="iconfont" type="icon-shanchu" size="20" color="#fa3534"></uni-icons>
  9. </view>
  10. <view class="content_table">
  11. <view class="item" v-for="(itm, index) in tableH(mate.rootCategoryLevelId)" :key="index">
  12. <view class="lable rx-cc">{{ itm.label }}</view>
  13. <view class="content">{{ mate[itm.prop] }}</view>
  14. </view>
  15. <view class="item" >
  16. <view class="lable rx-cc">包装库存</view>
  17. <view class="content">{{ mate.packingCountBase }}/ {{ mate.minUnit}}</view>
  18. </view>
  19. <view class="item">
  20. <view class="lable rx-cc">数量</view>
  21. <view class="content content_num">
  22. <input class="uni-input" v-model="mate.feedQuantity"
  23. type="digit"></input>
  24. <view class="unit">/{{mate.packingCountBase}}</view>
  25. </view>
  26. </view>
  27. </view>
  28. </view>
  29. </view>
  30. </template>
  31. <script>
  32. import {
  33. tableHeader
  34. } from './feedBom.js'
  35. export default {
  36. props: {
  37. workOrderId: {
  38. type: String,
  39. default: ''
  40. },
  41. list: {
  42. type: Array,
  43. default: () => []
  44. }
  45. },
  46. data() {
  47. return {
  48. }
  49. },
  50. methods: {
  51. tableH(type) {
  52. return tableHeader(type)
  53. },
  54. getDelete(idx) {
  55. this.list.splice(idx, 1)
  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. .btn_box {
  83. padding: 0 18rpx;
  84. height: 60rpx;
  85. background: $theme-color;
  86. font-size: 26rpx;
  87. font-style: normal;
  88. font-weight: 400;
  89. font-size: 24rpx;
  90. color: #fff;
  91. border-radius: 4rpx;
  92. .scan {
  93. width: 34rpx;
  94. height: 34rpx;
  95. margin-right: 12rpx;
  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: 652rpx;
  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. .pd4 {
  163. padding: 4rpx 8rpx;
  164. }
  165. &:last-child {
  166. border-bottom: none;
  167. }
  168. }
  169. .ww55 {
  170. width: 55%;
  171. }
  172. .ww45 {
  173. width: 45%;
  174. }
  175. }
  176. }
  177. </style>