instanceBom.vue 3.6 KB

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