instanceBom.vue 3.1 KB

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