packingBom.vue 3.6 KB

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