instanceBom.vue 4.7 KB

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