consultation.vue 1.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293
  1. <template>
  2. <view class="page-container uni-column">
  3. <view class="consultation-container uni-column">
  4. <view class="title uni-row">咨询</view>
  5. <view class="info-row uni-row">
  6. <view class="label">批次号</view>
  7. <view class="value">{{ daywork.lot_code }}</view>
  8. </view>
  9. <view class="info-row uni-row">
  10. <view class="label">产品描述</view>
  11. <view class="value">{{ daywork.product_description }}</view>
  12. </view>
  13. <view class="info-row uni-column">
  14. <view class="label" style="margin-bottom: 16rpx;">问题描述</view>
  15. <view class="value uni-row">
  16. <textarea v-model="daywork.question"></textarea>
  17. </view>
  18. </view>
  19. <view class="btn uni-row" @click.stop="handleSubmit">提交</view>
  20. </view>
  21. </view>
  22. </template>
  23. <script setup>
  24. import { ref } from 'vue'
  25. import { onLoad, onReady, onUnload, onShow } from '@dcloudio/uni-app'
  26. const daywork = ref({
  27. lot_code: 'D35400554012',
  28. product_description: '电机-254.364.14552',
  29. question: ''
  30. })
  31. // 页面生命周期函数
  32. onLoad(() => {
  33. })
  34. const handleSubmit = () => {
  35. uni.$emit('addWasteConsultationEvent', {
  36. question: daywork.value.question
  37. })
  38. uni.navigateBack()
  39. }
  40. </script>
  41. <style lang="scss">
  42. .page-container {
  43. height: 100%;
  44. background-color: #ececec;
  45. font-size: 28rpx;
  46. padding: 24rpx;
  47. box-sizing: border-box;
  48. }
  49. .consultation-container {
  50. background-color: #ffffff;
  51. padding: 24rpx;
  52. border-radius: 12rpx;
  53. .title {
  54. justify-content: center;
  55. font-size: 32rpx;
  56. font-weight: 700;
  57. }
  58. .info-row {
  59. margin-top: 24rpx;
  60. .label {
  61. width: 160rpx;
  62. }
  63. .value {
  64. flex: 1;
  65. textarea {
  66. flex: 1;
  67. border: 1px solid #888888;
  68. box-sizing: border-box;
  69. padding: 16rpx;
  70. }
  71. }
  72. }
  73. .btn {
  74. background-color: #00D068;
  75. color: #ffffff;
  76. border-radius: 8rpx;
  77. margin: 24rpx;
  78. height: 64rpx;
  79. justify-content: center;
  80. align-items: center;
  81. }
  82. }
  83. </style>