index.vue 1.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243
  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',lotCode:'D597412820',productDescription:'8669sdfrfw',carrierName:'X12522、X55222、X15522',nextProcess:{processAlias:'热处理'}},
  21. {productionPlanNo:'456123',lotCode:'D597412820',productDescription:'8669sdfrfw',carrierName:'X12522、X55222、X15522',nextProcess:{processAlias:'热处理'}},
  22. {productionPlanNo:'456123',lotCode:'D597412820',productDescription:'8669sdfrfw',carrierName:'X12522、X55222、X15522',nextProcess:{processAlias:'热处理'}}]
  23. // 调用子组件中的方法
  24. lotReporting.value.open(data);
  25. }
  26. </script>
  27. <style lang="scss">
  28. .bottom-btn-container {
  29. position: fixed;
  30. right: 20rpx;
  31. left: 20rpx;
  32. .start-batch-btn {
  33. margin-bottom: 24rpx;
  34. border-radius: 8rpx;
  35. background-color: #00e2a6;
  36. width: 80%;
  37. }
  38. }
  39. </style>