index.vue 2.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135
  1. <template>
  2. <view class="content-box">
  3. <uni-nav-bar fixed="true" statusBar="true" left-icon="back" :title="title" background-color="#F7F9FA"
  4. color="#000" @clickLeft="back">
  5. </uni-nav-bar>
  6. <view class="list_box">
  7. <u-list @scrolltolower="scrolltolower">
  8. <view class="card_box" v-for="(item,index) in List" :key="index">
  9. <workOrderBom :item='item' v-if='item' @handleScan='handleWordScan'></workOrderBom>
  10. <inspectionBom></inspectionBom>
  11. </view>
  12. </u-list>
  13. </view>
  14. <view class="bottom-wrapper">
  15. <view class="btn_box" @click="save">一键报工</view>
  16. </view>
  17. </view>
  18. </template>
  19. <script>
  20. import {
  21. workorderList,
  22. } from '@/api/pda/workOrder.js'
  23. import {
  24. batchSave
  25. } from '@/api/pda/feeding.js'
  26. import workOrderBom from '../../feeding/components/workOrderBom.vue'
  27. import inspectionBom from '../components/inspectionBom.vue'
  28. export default {
  29. components: {
  30. workOrderBom,
  31. inspectionBom
  32. },
  33. data() {
  34. return {
  35. title: null,
  36. id: null,
  37. taskId: null,
  38. List: [],
  39. }
  40. },
  41. onLoad(options) {
  42. this.title = options.taskName ? options.taskName : '质检'
  43. this.id = options.workOrderId
  44. this.taskId = options.taskId
  45. this.getList()
  46. },
  47. methods: {
  48. getList() {
  49. workorderList({
  50. ids: [this.id],
  51. taskId: this.taskId
  52. }).then(res => {
  53. this.List = res.map(m => {
  54. m.workOrderId = m.id
  55. delete m.id
  56. return {
  57. ...m
  58. }
  59. })
  60. })
  61. },
  62. scrolltolower() {},
  63. handleWordScan() {
  64. uni.showToast({
  65. icon: 'none',
  66. title: '不支持换工单'
  67. })
  68. },
  69. }
  70. }
  71. </script>
  72. <style lang="scss" scoped>
  73. .content-box {
  74. height: 100vh;
  75. overflow: hidden;
  76. display: flex;
  77. flex-direction: column;
  78. }
  79. .list_box {
  80. flex: 1;
  81. overflow: hidden;
  82. padding: 4rpx 0;
  83. .u-list {
  84. height: 100% !important;
  85. }
  86. .card_box {
  87. padding: 16rpx 24rpx;
  88. }
  89. }
  90. .bottom-wrapper {
  91. .btn_box {
  92. width: 750rpx;
  93. height: 88rpx;
  94. line-height: 88rpx;
  95. background: $theme-color;
  96. text-align: center;
  97. font-size: 36rpx;
  98. font-style: normal;
  99. font-weight: 400;
  100. color: #fff;
  101. }
  102. }
  103. .operate_box {
  104. padding: 10rpx 160rpx;
  105. /deep/ .u-button {
  106. width: 160rpx;
  107. }
  108. }
  109. </style>