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