instanceBom.vue 3.4 KB

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