inspectionBom.vue 3.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261
  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">废品数量 ({{ count|| 0 }})</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 inspectionList" :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="number" @input="onKeyInput"></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 baTreePicker from '@/components/ba-tree-picker/ba-tree-picker.vue'
  37. export default {
  38. components: {
  39. baTreePicker,
  40. },
  41. props: {
  42. inspectionList: {
  43. type: Array,
  44. default: () => []
  45. }
  46. },
  47. data() {
  48. return {
  49. // classificationList: [],
  50. // selectedData: [],
  51. count: 0,
  52. }
  53. },
  54. created() {
  55. },
  56. methods: {
  57. // confirm(id, name, list) {
  58. // this.List = list
  59. // this.selectedData = []
  60. // this.selectedData = this.List.map(m => {
  61. // return m.id
  62. // })
  63. // },
  64. handleDel(idx) {
  65. this.inspectionList.splice(idx, 1)
  66. },
  67. onKeyInput() {
  68. this.count = 0
  69. this.inspectionList.map(L => {
  70. this.count = Number(this.count) + Number(L.quantity)
  71. })
  72. },
  73. handleView(it) {
  74. },
  75. scrolltolower() {},
  76. }
  77. }
  78. </script>
  79. <style lang="scss" scoped>
  80. .title_box {
  81. margin-top: 28rpx;
  82. .name {
  83. font-size: 28rpx;
  84. font-style: normal;
  85. font-weight: 400;
  86. color: $theme-color;
  87. padding-left: 20rpx;
  88. position: relative;
  89. &:before {
  90. position: absolute;
  91. content: '';
  92. left: 0rpx;
  93. top: 0rpx;
  94. bottom: 0rpx;
  95. width: 4rpx;
  96. height: 28rpx;
  97. background: $theme-color;
  98. margin: auto;
  99. }
  100. }
  101. }
  102. .btn_box {
  103. height: 60rpx;
  104. width: 140rpx;
  105. background: $theme-color;
  106. font-size: 26rpx;
  107. font-style: normal;
  108. font-weight: 400;
  109. font-size: 24rpx;
  110. color: #fff;
  111. border-radius: 4rpx;
  112. margin-left: 40rpx;
  113. }
  114. .content_table2 {
  115. width: 100%;
  116. margin-top: 18rpx;
  117. .row {
  118. width: 100%;
  119. .item {
  120. color: #404446;
  121. font-size: 28rpx;
  122. padding-left: 12rpx;
  123. }
  124. .color157 {
  125. color: $theme-color;
  126. }
  127. .ww20 {
  128. width: 20%;
  129. }
  130. .ww35 {
  131. width: 35%;
  132. }
  133. .ww45 {
  134. width: 45%;
  135. }
  136. }
  137. .head {
  138. height: 64rpx;
  139. background: #F7F9FA;
  140. border-top: 2rpx solid #E3E5E5;
  141. border-left: 2rpx solid #E3E5E5;
  142. .item {
  143. height: 64rpx;
  144. line-height: 64rpx;
  145. border-right: 2rpx solid #E3E5E5;
  146. box-sizing: border-box;
  147. }
  148. }
  149. .tr {
  150. border-top: 2rpx solid #E3E5E5;
  151. border-left: 2rpx solid #E3E5E5;
  152. .item {
  153. font-size: 24rpx;
  154. min-height: 64rpx;
  155. display: flex;
  156. align-items: center;
  157. border-right: 2rpx solid #E3E5E5;
  158. box-sizing: border-box;
  159. white-space: normal;
  160. word-break: break-all;
  161. }
  162. &:last-child {
  163. border-bottom: 2rpx solid #E3E5E5;
  164. }
  165. }
  166. }
  167. .content_num {
  168. display: flex;
  169. align-items: center;
  170. padding: 0 4rpx;
  171. /deep/ .uni-input-input {
  172. border: 2rpx solid #F0F8F2;
  173. background: #F0F8F2;
  174. color: $theme-color;
  175. }
  176. }
  177. .z_list {
  178. max-height: 400rpx;
  179. }
  180. </style>