instanceBom.vue 4.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242
  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 class="item">
  36. <view class="lable rx-cc">领料仓库</view>
  37. <view class="content ">
  38. {{ mate.pathName }}
  39. </view>
  40. </view>
  41. </view>
  42. </view>
  43. </view>
  44. </template>
  45. <script>
  46. import {
  47. tableHeader
  48. } from '../../common.js'
  49. export default {
  50. props:{
  51. workOrderId: {
  52. type: String,
  53. default: ''
  54. },
  55. list: {
  56. type: Array,
  57. default: () => []
  58. },
  59. },
  60. data() {
  61. return {
  62. }
  63. },
  64. methods: {
  65. tableH(type) {
  66. return tableHeader(type)
  67. },
  68. getDelete(idx) {
  69. this.list.splice(idx, 1)
  70. },
  71. }
  72. }
  73. </script>
  74. <style lang="scss" scoped>
  75. .title_box {
  76. margin-top: 20rpx;
  77. .name {
  78. font-size: 28rpx;
  79. font-style: normal;
  80. font-weight: 400;
  81. color: $theme-color;
  82. padding-left: 20rpx;
  83. position: relative;
  84. &:before {
  85. position: absolute;
  86. content: '';
  87. left: 0rpx;
  88. top: 0rpx;
  89. bottom: 0rpx;
  90. width: 4rpx;
  91. height: 28rpx;
  92. background: $theme-color;
  93. margin: auto;
  94. }
  95. }
  96. .btn_box {
  97. padding: 0 18rpx;
  98. height: 60rpx;
  99. background: $theme-color;
  100. font-size: 26rpx;
  101. font-style: normal;
  102. font-weight: 400;
  103. font-size: 24rpx;
  104. color: #fff;
  105. border-radius: 4rpx;
  106. .scan {
  107. width: 34rpx;
  108. height: 34rpx;
  109. margin-right: 12rpx;
  110. }
  111. }
  112. }
  113. .material {
  114. margin-top: 10rpx;
  115. .left {
  116. width: 40rpx;
  117. }
  118. .zdy_check {
  119. width: 30rpx;
  120. height: 30rpx;
  121. border: 2rpx solid #c8c9cc;
  122. border-radius: 4rpx;
  123. }
  124. .check_active {
  125. background: $theme-color;
  126. border: 2rpx solid $theme-color;
  127. /deep/ .u-icon__icon {
  128. color: #fff !important;
  129. }
  130. }
  131. .content_table {
  132. width: 652rpx;
  133. border: 2rpx solid $border-color;
  134. .item {
  135. display: flex;
  136. border-bottom: 2rpx solid $border-color;
  137. .lable {
  138. width: 132rpx;
  139. text-align: center;
  140. background-color: #F7F9FA;
  141. font-size: 26rpx;
  142. border-right: 2rpx solid $border-color;
  143. flex-shrink: 0;
  144. }
  145. .ww80 {
  146. width: 80rpx;
  147. }
  148. .content {
  149. width: 518rpx;
  150. min-height: 64rpx;
  151. font-size: 28rpx;
  152. line-height: 28rpx;
  153. font-style: normal;
  154. font-weight: 400;
  155. padding: 18rpx 8rpx;
  156. box-sizing: border-box;
  157. word-wrap: break-word;
  158. flex-grow: 1 !important;
  159. }
  160. .content_num {
  161. display: flex;
  162. align-items: center;
  163. padding: 0 4rpx;
  164. /deep/ .uni-input-input {
  165. width: 200rpx;
  166. border: 2rpx solid #F0F8F2;
  167. background: #F0F8F2;
  168. color: $theme-color;
  169. }
  170. .unit {
  171. padding: 0 4rpx;
  172. font-size: 24rpx;
  173. color: #404446;
  174. }
  175. }
  176. .pd4 {
  177. padding: 4rpx 8rpx;
  178. }
  179. &:last-child {
  180. border-bottom: none;
  181. }
  182. }
  183. .ww55 {
  184. width: 55%;
  185. }
  186. .ww45 {
  187. width: 45%;
  188. }
  189. }
  190. }
  191. </style>