index.vue 1.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869
  1. <template>
  2. <view class="uni-column" style="padding: 24rpx">
  3. <view style="color: #999;margin: 50% auto;">
  4. <text>扫码开始快速报工</text>
  5. </view>
  6. <view class='bottom-btn-container'>
  7. <button class="start-batch-btn uni-row" type=primary @click='handleAdd'>扫码开始报工</button>
  8. </view>
  9. <dialog-lotReporting ref="lotReporting"></dialog-lotReporting>
  10. </view>
  11. </template>
  12. <script setup>
  13. import {
  14. ref
  15. } from 'vue'
  16. import path from '@/api/base/path.js'
  17. const lotReporting = ref(null)
  18. function handleAdd() {
  19. let data = [{
  20. productionPlanNo: '456123',
  21. lotCode: 'D597412820',
  22. productDescription: '8669sdfrfw',
  23. carrierName: 'X12522、X55222、X15522',
  24. nextProcess: {
  25. processAlias: '热处理'
  26. }
  27. },
  28. {
  29. productionPlanNo: '456123',
  30. lotCode: 'D597412820',
  31. productDescription: '8669sdfrfw',
  32. carrierName: 'X12522、X55222、X15522',
  33. nextProcess: {
  34. processAlias: '热处理'
  35. }
  36. },
  37. {
  38. productionPlanNo: '456123',
  39. lotCode: 'D597412820',
  40. productDescription: '8669sdfrfw',
  41. carrierName: 'X12522、X55222、X15522',
  42. nextProcess: {
  43. processAlias: '热处理'
  44. }
  45. }
  46. ]
  47. // 调用子组件中的方法
  48. lotReporting.value.open(data);
  49. }
  50. </script>
  51. <style lang="scss">
  52. .bottom-btn-container {
  53. position: fixed;
  54. top: 80%;
  55. right: 20rpx;
  56. left: 20rpx;
  57. .start-batch-btn {
  58. margin-bottom: 24rpx;
  59. border-radius: 8rpx;
  60. background-color: #00e2a6;
  61. width: 80%;
  62. }
  63. }
  64. </style>