semiProductBom.vue 3.9 KB

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