turnoverBom.vue 6.7 KB

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