turnoverBom.vue 5.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369
  1. <template>
  2. <view>
  3. <view class="title_box rx-bc">
  4. <view class="name">周转车</view>
  5. </view>
  6. <view v-for="(item, index) in newList" :key='index'>
  7. <view class="title_box rx-bc">
  8. <view class="left rx-ss" >
  9. <uni-icons custom-prefix="iconfont" @click="getDelete(index)" type="icon-shanchu" size="20" color="#fa3534"></uni-icons>
  10. <view class="des" @click="handContract()">{{ isContract ? '收缩' : '展开'}}</view>
  11. </view>
  12. </view>
  13. <view class="content_table">
  14. <view class="item rx-sc">
  15. <view class="rx ww50 ">
  16. <view class="lable ww80 rx-cc ">编号</view>
  17. <view class="content rx-sc">
  18. <view>{{item.code}}</view>
  19. </view>
  20. </view>
  21. <view class="rx ww50">
  22. <view class="lable rx-cc ww80">名称</view>
  23. <view class="content rx-sc">
  24. <view>{{item.name}}</view>
  25. </view>
  26. </view>
  27. </view>
  28. </view>
  29. <view class="content_table2">
  30. <view class="head row rx-sc">
  31. <view class="item ww10">货位</view>
  32. <view class="item ww25">工单编号</view>
  33. <view class="item ww25">产品编码</view>
  34. <view class="item ww20">数量PCS</view>
  35. <view class="item ww20">取样PCS</view>
  36. </view>
  37. <view class="table">
  38. <u-list @scrolltolower="scrolltolower" class="z_list">
  39. <view v-for="(it, idx) in item.extInfo.positionList" :key='idx'>
  40. <view class="tr row rx-sc" v-if=" isContract || ( it.workOrderCode != '' && it.workOrderCode != null)">
  41. <view class="item ww10">{{it.code}}</view>
  42. <view class="item ww25" :class="{'color157': it.workOrderCode === wordItem.code}">
  43. {{ it.workOrderCode }}
  44. </view>
  45. <view class="item ww25" :class="{'color157': it.categoryCode === wordItem.productCode}">
  46. {{it.categoryCode}}
  47. </view>
  48. <view class="item ww20 ">
  49. <text>{{it.quantity }}</text>
  50. </view>
  51. <view class="item ww20">
  52. <input class="uni-input content_num"
  53. v-model="it.sampleNum" type="digit"
  54. :disabled="isDisabled(it)"
  55. @blur="Number(it.sampleNum) > Number(it.quantity) ? it.sampleNum = Number(it.quantity) : ''"
  56. ></input>
  57. </view>
  58. </view>
  59. <!-- it.quantity <= 0&&!(it.workOrderCode == wordItem.code) -->
  60. </view>
  61. </u-list>
  62. </view>
  63. </view>
  64. </view>
  65. </view>
  66. </template>
  67. <script>
  68. export default {
  69. props: {
  70. list: {
  71. type: Array,
  72. default: () => []
  73. },
  74. wordItem: {
  75. type: Object,
  76. default: () => {}
  77. },
  78. },
  79. watch: {
  80. list: {
  81. immediate: true,
  82. deep: true,
  83. handler(newVal) {
  84. this.newList = newVal
  85. }
  86. }
  87. },
  88. data() {
  89. return {
  90. recycleQuantity: '',
  91. newList: [],
  92. isContract: false
  93. }
  94. },
  95. methods: {
  96. isDisabled(e){
  97. if(e.workOrderCode == this.wordItem.code ){
  98. if(e.quantity <= 0){
  99. return true
  100. }else{
  101. return false
  102. }
  103. }else{
  104. return true
  105. }
  106. },
  107. getDelete(index) {
  108. this.list.splice(index, 1)
  109. },
  110. scrolltolower() {},
  111. handContract() {
  112. this.isContract = !this.isContract
  113. }
  114. }
  115. }
  116. </script>
  117. <style lang="scss" scoped>
  118. .title_box {
  119. margin-top: 20rpx;
  120. .name {
  121. font-size: 28rpx;
  122. font-style: normal;
  123. font-weight: 400;
  124. color: $theme-color;
  125. padding-left: 20rpx;
  126. position: relative;
  127. &:before {
  128. position: absolute;
  129. content: '';
  130. left: 0rpx;
  131. top: 0rpx;
  132. bottom: 0rpx;
  133. width: 4rpx;
  134. height: 28rpx;
  135. background: $theme-color;
  136. margin: auto;
  137. }
  138. }
  139. .des{
  140. font-size: 28rpx;
  141. font-style: normal;
  142. font-weight: 400;
  143. color: $theme-color;
  144. margin-left: 38rpx;
  145. }
  146. .left {
  147. width: 140rpx;
  148. }
  149. .btn_box {
  150. padding: 0 18rpx;
  151. height: 60rpx;
  152. background: $theme-color;
  153. font-size: 26rpx;
  154. font-style: normal;
  155. font-weight: 400;
  156. font-size: 24rpx;
  157. color: #fff;
  158. border-radius: 4rpx;
  159. .scan {
  160. width: 34rpx;
  161. height: 34rpx;
  162. margin-right: 12rpx;
  163. }
  164. }
  165. }
  166. .content_table {
  167. margin-top: 8rpx;
  168. width: 100%;
  169. border: 2rpx solid $border-color;
  170. .item {
  171. display: flex;
  172. border-bottom: 2rpx solid $border-color;
  173. .lable {
  174. width: 132rpx;
  175. text-align: center;
  176. background-color: #F7F9FA;
  177. font-size: 26rpx;
  178. border-right: 2rpx solid $border-color;
  179. flex-shrink: 0;
  180. }
  181. .ww80 {
  182. width: 80rpx;
  183. }
  184. .ww50 {
  185. width: 50%;
  186. }
  187. .content {
  188. width: 518rpx;
  189. min-height: 64rpx;
  190. font-size: 28rpx;
  191. line-height: 28rpx;
  192. font-style: normal;
  193. font-weight: 400;
  194. padding: 2rpx 8rpx;
  195. box-sizing: border-box;
  196. word-wrap: break-word;
  197. flex-grow: 1 !important;
  198. font-size: 24rpx;
  199. }
  200. &:last-child {
  201. border-bottom: none;
  202. }
  203. }
  204. }
  205. .content_table2 {
  206. width: 100%;
  207. .row {
  208. width: 100%;
  209. .item {
  210. color: #404446;
  211. font-size: 28rpx;
  212. padding-left: 12rpx;
  213. }
  214. .color157 {
  215. color: $theme-color;
  216. }
  217. .ww20 {
  218. width: 20%;
  219. }
  220. .ww25 {
  221. width: 25%;
  222. }
  223. .ww30 {
  224. width: 35%;
  225. }
  226. .ww15 {
  227. width: 15%;
  228. }
  229. .ww10 {
  230. width: 10%;
  231. }
  232. }
  233. .head {
  234. height: 64rpx;
  235. background: #F7F9FA;
  236. border-top: 2rpx solid #E3E5E5;
  237. border-left: 2rpx solid #E3E5E5;
  238. .item {
  239. height: 64rpx;
  240. line-height: 64rpx;
  241. border-right: 2rpx solid #E3E5E5;
  242. box-sizing: border-box;
  243. font-size: 24;
  244. }
  245. }
  246. .tr {
  247. border-top: 2rpx solid #E3E5E5;
  248. border-left: 2rpx solid #E3E5E5;
  249. .item {
  250. font-size: 24rpx;
  251. min-height: 64rpx;
  252. display: flex;
  253. align-items: center;
  254. border-right: 2rpx solid #E3E5E5;
  255. box-sizing: border-box;
  256. white-space: normal;
  257. word-break: break-all;
  258. }
  259. &:last-child {
  260. border-bottom: 2rpx solid #E3E5E5;
  261. }
  262. }
  263. }
  264. .content_num {
  265. display: flex;
  266. align-items: center;
  267. padding: 0 4rpx;
  268. /deep/ .uni-input-input {
  269. border: 2rpx solid #F0F8F2;
  270. background: #F0F8F2;
  271. color: $theme-color;
  272. }
  273. }
  274. .z_list {
  275. max-height: 500rpx;
  276. }
  277. </style>