turnoverBom.vue 6.7 KB

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