apply.vue 4.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139
  1. <template>
  2. <view class="container">
  3. <up-navbar class="u-navbar-box" title="护理申请" auto-back placeholder bgColor="transparent"
  4. :title-style="{fontWeight:'bold'}">
  5. </up-navbar>
  6. <scroll-view scroll-y class="flex-column flex-1" style="overflow: hidden;background-color: #F6F8FD;">
  7. <view class="p-32 flex-column" style="width: 686rpx;">
  8. <view class="w-100p flex-column">
  9. <view class="flex-row align-center">
  10. <view style="width: 6rpx;height: 32rpx;background-color: #39A1FF;border-radius: 4rpx;"></view>
  11. <text class="font-xmd text-black3" style="margin-left: 14rpx;">预约人信息</text>
  12. </view>
  13. <view class="flex-column py-4 px-24 mt-24"
  14. style="background: linear-gradient( 180deg, #E8F4FF 0%, #FFFFFF 100%);border-radius: 16rpx;">
  15. <view class="flex-row align-center justify-between">
  16. <text class="font text-black2">姓名</text>
  17. <view class="flex-row justify-end" style="width: 440rpx;">
  18. <up-input placeholder="请输入申请人姓名" border="none" v-model.trim="formData.name" clearable
  19. :maxlength="20" input-align="end"></up-input>
  20. <!-- <text class="font text-black2">请选择申请人</text> -->
  21. </view>
  22. </view>
  23. <view class="flex-row align-center justify-between mt-4">
  24. <text class="font text-black2">护理需求</text>
  25. <view style="width: 440rpx;">
  26. <up-input placeholder="请输入护理需求" border="none" v-model.trim="formData.demand" clearable
  27. :maxlength="50"></up-input>
  28. </view>
  29. </view>
  30. <view class="flex-row align-center justify-between mt-4">
  31. <text class="font text-black2">首选护理人员性别</text>
  32. <view style="width: 440rpx;">
  33. <u-input placeholder="请输入性别" border="none" type="number" v-model.trim="formData.sex"
  34. clearable :maxlength="11"></u-input>
  35. </view>
  36. </view>
  37. <view class="flex-row align-center justify-between mt-4">
  38. <text class="font text-black2">所在医院</text>
  39. <view style="width: 440rpx;">
  40. <u-input placeholder="请输入所在医院" border="none" type="number"
  41. v-model.trim="formData.hospital" clearable :maxlength="11"></u-input>
  42. </view>
  43. </view>
  44. <view class="flex-row align-center justify-between mt-4">
  45. <text class="font text-black2">详细地址</text>
  46. <view style="width: 440rpx;">
  47. <u-input placeholder="请输入详细地址" border="none" type="number"
  48. v-model.trim="formData.address" clearable :maxlength="11"></u-input>
  49. </view>
  50. </view>
  51. <view class="flex-row align-center justify-between mt-4">
  52. <text class="font text-black2">预计天数</text>
  53. <view style="width: 440rpx;">
  54. <u-input placeholder="请输入预计天数" border="none" type="number"
  55. v-model.trim="formData.dayCount" clearable :maxlength="11"></u-input>
  56. </view>
  57. </view>
  58. <view class="flex-row align-center justify-between mt-4">
  59. <text class="font text-black2">备注</text>
  60. <view style="width: 440rpx;">
  61. <u-input placeholder="请输入备注" border="none" type="number" v-model.trim="formData.remark"
  62. clearable :maxlength="50"></u-input>
  63. </view>
  64. </view>
  65. </view>
  66. </view>
  67. <view class="w-100p flex-row align-center justify-center mt-4"
  68. style="background-color: #39A1FF;height: 88rpx;border-radius: 50rpx;" @click="handleSubmit">
  69. <text class="font-md text-white">确认提交</text>
  70. </view>
  71. </view>
  72. </scroll-view>
  73. </view>
  74. </template>
  75. <script>
  76. import dayjs from 'dayjs'
  77. import {
  78. applyUrl
  79. } from '@/common/config/api.js'
  80. export default {
  81. data() {
  82. return {
  83. formData: {
  84. personId: '6',
  85. name: '',
  86. demand: '',
  87. sex: '',
  88. hospital: '',
  89. address: '',
  90. dayCount: '',
  91. remark: ''
  92. }
  93. }
  94. },
  95. methods: {
  96. handleSubmit() {
  97. applyUrl({
  98. address: this.formData.address,
  99. applyDate: dayjs().format('YYYY-MM-DD'),
  100. careDays: this.formData.dayCount,
  101. careNeeds: this.formData.demand,
  102. hospital: this.formData.hospital,
  103. nurseGender: this.formData.sex,
  104. personId: this.formData.personId,
  105. personName: this.formData.name,
  106. remark: this.formData.remark
  107. })
  108. .then(res => {
  109. console.log('提交');
  110. })
  111. .catch(err => {
  112. console.log(err);
  113. })
  114. },
  115. goChoosePeople() {
  116. uni.navigateTo({
  117. url: '/pages/subpack/pages/choose-people/choose-people'
  118. })
  119. }
  120. }
  121. }
  122. </script>
  123. <style lang="scss" scoped>
  124. .container {
  125. height: 100vh;
  126. // background-image: url('@/static/images/index-bg.png');
  127. // background-size: cover;
  128. // background-position: center;
  129. display: flex;
  130. flex-direction: column;
  131. }
  132. .u-navbar-box {
  133. background: radial-gradient(circle at left, #FFE5E4 0%, #EEF2F5 40%, #DBEEFB 100%);
  134. }
  135. </style>