instanceBom.vue 3.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236
  1. <template>
  2. <view>
  3. <view class="title_box rx-bc">
  4. <view class="name">物料清单</view>
  5. </view>
  6. <view class="material rx-ss" v-for="(mate, idx) in list">
  7. <view class="left rx-ss" @click="getDelete(idx)">
  8. <uni-icons custom-prefix="iconfont" type="icon-shanchu" size="20" color="#fa3534"></uni-icons>
  9. </view>
  10. <view class="content_table">
  11. <view class="item">
  12. <view class="lable rx-cc">编码</view>
  13. <view class="content">
  14. {{mate.code}}
  15. </view>
  16. </view>
  17. <view class="item">
  18. <view class="lable rx-cc">名称</view>
  19. <view class="content">{{mate.name}}</view>
  20. </view>
  21. <view class="item" v-for="(itm, index) in tableH(4)" :key="index">
  22. <view class="lable rx-cc">{{ itm.label }}</view>
  23. <view class="content">{{ mate[itm.prop] }}</view>
  24. </view>
  25. <view class="item">
  26. <view class="lable rx-cc">数量</view>
  27. <view class="content content_num">
  28. <input class="uni-input" v-model="mate.demandQuantity"
  29. @blur='mate.demandQuantity > mate.availableCountBase ? mate.demandQuantity = mate.availableCountBase : mate.demandQuantity'
  30. type="digit"></input>
  31. <view class="unit">/{{mate.unit}}</view>
  32. <view>&nbsp;&nbsp; (库存:{{ mate.availableCountBase }})</view>
  33. </view>
  34. </view>
  35. </view>
  36. </view>
  37. </view>
  38. </template>
  39. <script>
  40. import {
  41. tableHeader
  42. } from './feedBom.js'
  43. export default {
  44. props: {
  45. workOrderId: {
  46. type: String,
  47. default: ''
  48. },
  49. list: {
  50. type: Array,
  51. default: () => []
  52. }
  53. },
  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. .title_box {
  70. margin-top: 20rpx;
  71. .name {
  72. font-size: 28rpx;
  73. font-style: normal;
  74. font-weight: 400;
  75. color: $theme-color;
  76. padding-left: 20rpx;
  77. position: relative;
  78. &:before {
  79. position: absolute;
  80. content: '';
  81. left: 0rpx;
  82. top: 0rpx;
  83. bottom: 0rpx;
  84. width: 4rpx;
  85. height: 28rpx;
  86. background: $theme-color;
  87. margin: auto;
  88. }
  89. }
  90. .btn_box {
  91. padding: 0 18rpx;
  92. height: 60rpx;
  93. background: $theme-color;
  94. font-size: 26rpx;
  95. font-style: normal;
  96. font-weight: 400;
  97. font-size: 24rpx;
  98. color: #fff;
  99. border-radius: 4rpx;
  100. .scan {
  101. width: 34rpx;
  102. height: 34rpx;
  103. margin-right: 12rpx;
  104. }
  105. }
  106. }
  107. .material {
  108. margin-top: 10rpx;
  109. .left {
  110. width: 40rpx;
  111. }
  112. .zdy_check {
  113. width: 30rpx;
  114. height: 30rpx;
  115. border: 2rpx solid #c8c9cc;
  116. border-radius: 4rpx;
  117. }
  118. .check_active {
  119. background: $theme-color;
  120. border: 2rpx solid $theme-color;
  121. /deep/ .u-icon__icon {
  122. color: #fff !important;
  123. }
  124. }
  125. .content_table {
  126. width: 652rpx;
  127. border: 2rpx solid $border-color;
  128. .item {
  129. display: flex;
  130. border-bottom: 2rpx solid $border-color;
  131. .lable {
  132. width: 132rpx;
  133. text-align: center;
  134. background-color: #F7F9FA;
  135. font-size: 26rpx;
  136. border-right: 2rpx solid $border-color;
  137. flex-shrink: 0;
  138. }
  139. .ww80 {
  140. width: 80rpx;
  141. }
  142. .content {
  143. width: 518rpx;
  144. min-height: 64rpx;
  145. font-size: 28rpx;
  146. line-height: 28rpx;
  147. font-style: normal;
  148. font-weight: 400;
  149. padding: 18rpx 8rpx;
  150. box-sizing: border-box;
  151. word-wrap: break-word;
  152. flex-grow: 1 !important;
  153. }
  154. .content_num {
  155. display: flex;
  156. align-items: center;
  157. padding: 0 4rpx;
  158. /deep/ .uni-input-input {
  159. width: 200rpx;
  160. border: 2rpx solid #F0F8F2;
  161. background: #F0F8F2;
  162. color: $theme-color;
  163. }
  164. .unit {
  165. padding: 0 4rpx;
  166. font-size: 24rpx;
  167. color: #404446;
  168. }
  169. }
  170. .pd4 {
  171. padding: 4rpx 8rpx;
  172. }
  173. &:last-child {
  174. border-bottom: none;
  175. }
  176. }
  177. .ww55 {
  178. width: 55%;
  179. }
  180. .ww45 {
  181. width: 45%;
  182. }
  183. }
  184. }
  185. </style>