instanceBom.vue 4.5 KB

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