instanceBom.vue 3.3 KB

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