instanceBom.vue 3.1 KB

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