packingBom.vue 4.4 KB

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