packingBom.vue 4.2 KB

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