turnoverBom.vue 6.9 KB

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