inspectionBom.vue 3.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257
  1. <template>
  2. <view>
  3. <view class="title_box rx-bc">
  4. <view class="name">质检</view>
  5. </view>
  6. <view class="content_table2">
  7. <view class="head row rx-sc">
  8. <view class="item ww35">名称</view>
  9. <view class="item ww45">废品数量</view>
  10. <view class="item ww20">操作</view>
  11. </view>
  12. <view class="table">
  13. <u-list @scrolltolower="scrolltolower" class="z_list">
  14. <view class="tr row rx-sc" v-for="(it, idx) in List" :key='idx'>
  15. <view class="item ww35">
  16. {{ it.name }}
  17. </view>
  18. <view class="item ww45 content_num">
  19. <input class="uni-input" v-model="it.quantity" type="digit"></input>
  20. </view>
  21. <view class="ww20 rx-ac">
  22. <uni-icons custom-prefix="iconfont" type="icon-shanchu" size="20" color="#fa3534"
  23. @click="handleDel(idx)"></uni-icons>
  24. <uni-icons type="eye-filled" size="20" @click="handleView(it)"></uni-icons>
  25. </view>
  26. </view>
  27. </u-list>
  28. </view>
  29. </view>
  30. <ba-tree-picker ref="treePicker" :selectedData='selectedData' key="verify" :multiple="false"
  31. @select-change="confirm" title="选择分类" :localdata="classificationList" valueKey="id" textKey="name"
  32. childrenKey="children" multiple :selectParent='false' />
  33. </view>
  34. </template>
  35. <script>
  36. import {
  37. getLastTreeByPid,
  38. } from '@/api/pda/workOrder.js'
  39. import baTreePicker from '@/components/ba-tree-picker/ba-tree-picker.vue'
  40. export default {
  41. components: {
  42. baTreePicker,
  43. },
  44. data() {
  45. return {
  46. classificationList: [],
  47. selectedData: [],
  48. List: []
  49. }
  50. },
  51. created() {
  52. this.getLastTree()
  53. },
  54. methods: {
  55. getLastTree() {
  56. getLastTreeByPid(this.$route.query.inspectionId).then(res => {
  57. this.List = res
  58. })
  59. },
  60. confirm(id, name, list) {
  61. this.List = list
  62. this.selectedData = []
  63. this.selectedData = this.List.map(m => {
  64. return m.id
  65. })
  66. },
  67. handleDel(idx) {
  68. this.List.splice(idx, 1)
  69. },
  70. handleView(it) {},
  71. scrolltolower() {},
  72. }
  73. }
  74. </script>
  75. <style lang="scss" scoped>
  76. .title_box {
  77. margin-top: 28rpx;
  78. .name {
  79. font-size: 28rpx;
  80. font-style: normal;
  81. font-weight: 400;
  82. color: $theme-color;
  83. padding-left: 20rpx;
  84. position: relative;
  85. &:before {
  86. position: absolute;
  87. content: '';
  88. left: 0rpx;
  89. top: 0rpx;
  90. bottom: 0rpx;
  91. width: 4rpx;
  92. height: 28rpx;
  93. background: $theme-color;
  94. margin: auto;
  95. }
  96. }
  97. }
  98. .btn_box {
  99. height: 60rpx;
  100. width: 140rpx;
  101. background: $theme-color;
  102. font-size: 26rpx;
  103. font-style: normal;
  104. font-weight: 400;
  105. font-size: 24rpx;
  106. color: #fff;
  107. border-radius: 4rpx;
  108. margin-left: 40rpx;
  109. }
  110. .content_table2 {
  111. width: 100%;
  112. margin-top: 18rpx;
  113. .row {
  114. width: 100%;
  115. .item {
  116. color: #404446;
  117. font-size: 28rpx;
  118. padding-left: 12rpx;
  119. }
  120. .color157 {
  121. color: $theme-color;
  122. }
  123. .ww20 {
  124. width: 20%;
  125. }
  126. .ww35 {
  127. width: 35%;
  128. }
  129. .ww45 {
  130. width: 45%;
  131. }
  132. }
  133. .head {
  134. height: 64rpx;
  135. background: #F7F9FA;
  136. border-top: 2rpx solid #E3E5E5;
  137. border-left: 2rpx solid #E3E5E5;
  138. .item {
  139. height: 64rpx;
  140. line-height: 64rpx;
  141. border-right: 2rpx solid #E3E5E5;
  142. box-sizing: border-box;
  143. }
  144. }
  145. .tr {
  146. border-top: 2rpx solid #E3E5E5;
  147. border-left: 2rpx solid #E3E5E5;
  148. .item {
  149. font-size: 24rpx;
  150. min-height: 64rpx;
  151. display: flex;
  152. align-items: center;
  153. border-right: 2rpx solid #E3E5E5;
  154. box-sizing: border-box;
  155. white-space: normal;
  156. word-break: break-all;
  157. }
  158. &:last-child {
  159. border-bottom: 2rpx solid #E3E5E5;
  160. }
  161. }
  162. }
  163. .content_num {
  164. display: flex;
  165. align-items: center;
  166. padding: 0 4rpx;
  167. /deep/ .uni-input-input {
  168. border: 2rpx solid #F0F8F2;
  169. background: #F0F8F2;
  170. color: $theme-color;
  171. }
  172. }
  173. .z_list {
  174. max-height: 800rpx;
  175. }
  176. </style>