packingBom.vue 4.1 KB

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