scan.vue 2.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106
  1. <template>
  2. <view class="page-container uni-column">
  3. <view class="consultation-container uni-column">
  4. <view class="title uni-row">箱号:{{ data.carrier_code }}</view>
  5. <view class="info-row uni-row">
  6. <view class="label">批次号</view>
  7. <view class="value">{{ data.lot_code }}</view>
  8. </view>
  9. <view class="info-row uni-row">
  10. <view class="label">产品描述</view>
  11. <view class="value">{{ data.product_description }}</view>
  12. </view>
  13. <view class="info-row uni-row">
  14. <view class="label">当前工序</view>
  15. <view class="value">{{ data.current_process }}</view>
  16. </view>
  17. <view class="info-row uni-row">
  18. <view class="label">投产数量</view>
  19. <view class="value">{{ data.production_quantity }}</view>
  20. </view>
  21. <view class="btn uni-row" style="background-color: #ff5555; margin-top: 48rpx;" @click.stop="handleSubmit('err')">填写序检不合格结果</view>
  22. <view class="btn uni-row" @click.stop="handleSubmit('ok')">合格,无异常</view>
  23. </view>
  24. </view>
  25. </template>
  26. <script setup>
  27. import { ref } from 'vue'
  28. import { onLoad, onReady, onUnload, onShow } from '@dcloudio/uni-app'
  29. const data = ref({
  30. carrier_id: '',
  31. carrier_code: '',
  32. lot_id: 'D2423156000691',
  33. lot_code: 'D2423156000691',
  34. product_description: '',
  35. current_process: '热处理',
  36. production_quantity: 300
  37. })
  38. // 页面生命周期函数
  39. onLoad((option) => {
  40. console.log(option)
  41. data.value.carrier_id = option.carrierId
  42. data.value.carrier_code = option.carrierCode
  43. })
  44. const handleSubmit = (type) => {
  45. if (type === 'err') {
  46. uni.navigateTo({
  47. url: '/pages/processInspection/form?lotId=' + data.value.lot_id + '&lotCode=' + data.value.lot_code
  48. })
  49. }
  50. if (type === 'ok') {
  51. uni.navigateBack()
  52. }
  53. }
  54. </script>
  55. <style lang="scss">
  56. .page-container {
  57. height: 100%;
  58. background-color: #ececec;
  59. font-size: 28rpx;
  60. padding: 24rpx;
  61. box-sizing: border-box;
  62. }
  63. .consultation-container {
  64. background-color: #ffffff;
  65. padding: 24rpx;
  66. border-radius: 12rpx;
  67. .title {
  68. justify-content: center;
  69. font-size: 32rpx;
  70. font-weight: 700;
  71. }
  72. .info-row {
  73. margin-top: 24rpx;
  74. .label {
  75. width: 160rpx;
  76. }
  77. .value {
  78. flex: 1;
  79. textarea {
  80. flex: 1;
  81. border: 1px solid #888888;
  82. box-sizing: border-box;
  83. padding: 16rpx;
  84. }
  85. }
  86. }
  87. .btn {
  88. background-color: #00D068;
  89. color: #ffffff;
  90. border-radius: 8rpx;
  91. margin: 0 24rpx 24rpx 24rpx;
  92. height: 64rpx;
  93. justify-content: center;
  94. align-items: center;
  95. }
  96. }
  97. </style>