instanceBom.vue 3.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225
  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">
  7. <view class="left rx-ss" @click="getDelete(idx)">
  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 content_num">
  18. <input class="uni-input" v-model="mate.demandQuantity"
  19. @blur='mate.demandQuantity > mate.availableCountBase ? mate.demandQuantity = mate.availableCountBase : mate.demandQuantity'
  20. type="digit"></input>
  21. <view class="unit">/{{mate.unit}}</view>
  22. <view>&nbsp;&nbsp; (库存:{{ mate.availableCountBase }})</view>
  23. </view>
  24. </view>
  25. </view>
  26. </view>
  27. </view>
  28. </template>
  29. <script>
  30. import {
  31. tableHeader
  32. } from './feedBom.js'
  33. export default {
  34. props: {
  35. workOrderId: {
  36. type: String,
  37. default: ''
  38. },
  39. list: {
  40. type: Array,
  41. default: () => []
  42. }
  43. },
  44. data() {
  45. return {
  46. }
  47. },
  48. methods: {
  49. tableH(type) {
  50. return tableHeader(type)
  51. },
  52. getDelete(idx) {
  53. this.list.splice(idx, 1)
  54. },
  55. }
  56. }
  57. </script>
  58. <style lang="scss" scoped>
  59. .title_box {
  60. margin-top: 20rpx;
  61. .name {
  62. font-size: 28rpx;
  63. font-style: normal;
  64. font-weight: 400;
  65. color: $theme-color;
  66. padding-left: 20rpx;
  67. position: relative;
  68. &:before {
  69. position: absolute;
  70. content: '';
  71. left: 0rpx;
  72. top: 0rpx;
  73. bottom: 0rpx;
  74. width: 4rpx;
  75. height: 28rpx;
  76. background: $theme-color;
  77. margin: auto;
  78. }
  79. }
  80. .btn_box {
  81. padding: 0 18rpx;
  82. height: 60rpx;
  83. background: $theme-color;
  84. font-size: 26rpx;
  85. font-style: normal;
  86. font-weight: 400;
  87. font-size: 24rpx;
  88. color: #fff;
  89. border-radius: 4rpx;
  90. .scan {
  91. width: 34rpx;
  92. height: 34rpx;
  93. margin-right: 12rpx;
  94. }
  95. }
  96. }
  97. .material {
  98. margin-top: 10rpx;
  99. .left {
  100. width: 40rpx;
  101. }
  102. .zdy_check {
  103. width: 30rpx;
  104. height: 30rpx;
  105. border: 2rpx solid #c8c9cc;
  106. border-radius: 4rpx;
  107. }
  108. .check_active {
  109. background: $theme-color;
  110. border: 2rpx solid $theme-color;
  111. /deep/ .u-icon__icon {
  112. color: #fff !important;
  113. }
  114. }
  115. .content_table {
  116. width: 652rpx;
  117. border: 2rpx solid $border-color;
  118. .item {
  119. display: flex;
  120. border-bottom: 2rpx solid $border-color;
  121. .lable {
  122. width: 132rpx;
  123. text-align: center;
  124. background-color: #F7F9FA;
  125. font-size: 26rpx;
  126. border-right: 2rpx solid $border-color;
  127. flex-shrink: 0;
  128. }
  129. .ww80 {
  130. width: 80rpx;
  131. }
  132. .content {
  133. width: 518rpx;
  134. min-height: 64rpx;
  135. font-size: 28rpx;
  136. line-height: 28rpx;
  137. font-style: normal;
  138. font-weight: 400;
  139. padding: 18rpx 8rpx;
  140. box-sizing: border-box;
  141. word-wrap: break-word;
  142. flex-grow: 1 !important;
  143. }
  144. .content_num {
  145. display: flex;
  146. align-items: center;
  147. padding: 0 4rpx;
  148. /deep/ .uni-input-input {
  149. width: 200rpx;
  150. border: 2rpx solid #F0F8F2;
  151. background: #F0F8F2;
  152. color: $theme-color;
  153. }
  154. .unit {
  155. padding: 0 4rpx;
  156. font-size: 24rpx;
  157. color: #404446;
  158. }
  159. }
  160. .pd4 {
  161. padding: 4rpx 8rpx;
  162. }
  163. &:last-child {
  164. border-bottom: none;
  165. }
  166. }
  167. .ww55 {
  168. width: 55%;
  169. }
  170. .ww45 {
  171. width: 45%;
  172. }
  173. }
  174. }
  175. </style>