packingBom.vue 4.3 KB

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