instanceBom.vue 4.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273
  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. created() {
  72. console.log(11,this.list)
  73. },
  74. methods: {
  75. tableH(type) {
  76. return tableHeader(type)
  77. },
  78. getDelete(idx) {
  79. this.list.splice(idx, 1)
  80. },
  81. }
  82. }
  83. </script>
  84. <style lang="scss" scoped>
  85. .title_box {
  86. margin-top: 20rpx;
  87. .name {
  88. font-size: 28rpx;
  89. font-style: normal;
  90. font-weight: 400;
  91. color: $theme-color;
  92. padding-left: 20rpx;
  93. position: relative;
  94. &:before {
  95. position: absolute;
  96. content: '';
  97. left: 0rpx;
  98. top: 0rpx;
  99. bottom: 0rpx;
  100. width: 4rpx;
  101. height: 28rpx;
  102. background: $theme-color;
  103. margin: auto;
  104. }
  105. }
  106. .btn_box {
  107. padding: 0 18rpx;
  108. height: 60rpx;
  109. background: $theme-color;
  110. font-size: 26rpx;
  111. font-style: normal;
  112. font-weight: 400;
  113. font-size: 24rpx;
  114. color: #fff;
  115. border-radius: 4rpx;
  116. .scan {
  117. width: 34rpx;
  118. height: 34rpx;
  119. margin-right: 12rpx;
  120. }
  121. }
  122. }
  123. .material {
  124. margin-top: 10rpx;
  125. .left {
  126. width: 40rpx;
  127. }
  128. .zdy_check {
  129. width: 30rpx;
  130. height: 30rpx;
  131. border: 2rpx solid #c8c9cc;
  132. border-radius: 4rpx;
  133. }
  134. .check_active {
  135. background: $theme-color;
  136. border: 2rpx solid $theme-color;
  137. /deep/ .u-icon__icon {
  138. color: #fff !important;
  139. }
  140. }
  141. .content_table {
  142. width: 722rpx;
  143. border: 2rpx solid $border-color;
  144. .item {
  145. display: flex;
  146. border-bottom: 2rpx solid $border-color;
  147. .lable {
  148. width: 132rpx;
  149. text-align: center;
  150. background-color: #F7F9FA;
  151. font-size: 26rpx;
  152. border-right: 2rpx solid $border-color;
  153. flex-shrink: 0;
  154. }
  155. .ww80 {
  156. width: 80rpx;
  157. }
  158. .content {
  159. width: 518rpx;
  160. min-height: 64rpx;
  161. font-size: 28rpx;
  162. line-height: 28rpx;
  163. font-style: normal;
  164. font-weight: 400;
  165. padding: 18rpx 8rpx;
  166. box-sizing: border-box;
  167. word-wrap: break-word;
  168. flex-grow: 1 !important;
  169. }
  170. .content_num {
  171. display: flex;
  172. align-items: center;
  173. padding: 0 4rpx;
  174. /deep/ .uni-input-input {
  175. width: 200rpx;
  176. border: 2rpx solid #F0F8F2;
  177. background: #F0F8F2;
  178. color: $theme-color;
  179. }
  180. .unit {
  181. padding: 0 4rpx;
  182. font-size: 24rpx;
  183. color: #404446;
  184. }
  185. }
  186. .ww400 {
  187. /deep/ .uni-input-input {
  188. width: 400rpx;
  189. }
  190. }
  191. .pd4 {
  192. padding: 4rpx 8rpx;
  193. }
  194. &:last-child {
  195. border-bottom: none;
  196. }
  197. }
  198. .ww55 {
  199. width: 55%;
  200. }
  201. .ww45 {
  202. width: 45%;
  203. }
  204. }
  205. }
  206. </style>