box_information.vue 5.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246
  1. <template>
  2. <view style="background-color: #FFFFFF; width: auto;">
  3. <view style="height: 90vh;">
  4. <!-- 列选择器 -->
  5. <u-select v-model="choiceName" :list="choicelist" @confirm="confirm1"></u-select>
  6. <u-select v-model="relationship" :list="relationshipList" @confirm="confirm2"></u-select>
  7. <!-- 步骤条 -->
  8. <view class="steps">
  9. <u-steps :list="numList" :current="current"></u-steps>
  10. </view>
  11. <!-- 分隔 -->
  12. <u-gap height="30" bg-color="#f9f9f9"></u-gap>
  13. <!-- 宝贝信息 -->
  14. <view>
  15. <view>
  16. <!-- 标题 -->
  17. <view class="information-title">宝贝信息</view>
  18. <u-line color="#ededed" />
  19. <!-- 姓名 -->
  20. <uni-list :border="false">
  21. <uni-list-item :border="false" :clickable="true" @click="choiceName = true">
  22. <!-- 自定义左(header)右(footer)的内容 -->
  23. <view slot="header">
  24. <text class="xinghao">*</text>
  25. <text style="font-size: 28rpx;">绑定人</text>
  26. </view>
  27. <view slot="footer">
  28. <text style="font-size: 30rpx;">{{babyNmae}}</text>
  29. </view>
  30. </uni-list-item>
  31. <!-- 身份证 -->
  32. <uni-list-item :border="false">
  33. <!-- 自定义左(header)右(footer)的内容 -->
  34. <view slot="header">
  35. <text class="xinghao">*</text>
  36. <text style="font-size: 28rpx;">绑定人身份证</text>
  37. </view>
  38. <view slot="footer">
  39. <u-input v-model="babyID" type="idcard" :border="false" placeholder="请填写宝贝身份证" :clearable="false" input-align="right"
  40. height="50" />
  41. </view>
  42. </uni-list-item>
  43. <!-- 社保 -->
  44. <uni-list-item :border="false">
  45. <!-- 自定义左(header)右(footer)的内容 -->
  46. <view slot="header">
  47. <text class="xinghao">*</text>
  48. <text style="font-size: 28rpx;">绑定人是否有社保</text>
  49. </view>
  50. <view slot="footer">
  51. <u-radio-group v-model="guarantee" @change="radioGroupChange">
  52. <u-radio @change="radioChange" v-for="(item, index) in list" :key="index" :name="item.name" :disabled="item.disabled">
  53. {{item.name}}
  54. </u-radio>
  55. </u-radio-group>
  56. </view>
  57. </uni-list-item>
  58. </uni-list>
  59. </view>
  60. </view>
  61. <!-- 分隔 -->
  62. <u-gap height="30" bg-color="#f9f9f9"></u-gap>
  63. <!-- 监护人信息 -->
  64. <view>
  65. <view>
  66. <!-- 标题 -->
  67. <view class="information-title">监护人信息</view>
  68. <!-- 线条 -->
  69. <u-line color="#ededed" />
  70. <uni-list :border="false">
  71. <!-- 监护人姓名 -->
  72. <uni-list-item :border="false">
  73. <!-- 自定义左(header)右(footer)的内容 -->
  74. <view slot="header">
  75. <text class="xinghao">*</text>
  76. <text style="font-size: 28rpx;">监护人姓名</text>
  77. </view>
  78. <view slot="footer">
  79. <u-input v-model="guardianName" type="text" :border="false" placeholder="请填写您真实姓名" :clearable="false"
  80. input-align="right" height="50" />
  81. </view>
  82. </uni-list-item>
  83. <!-- 关系 -->
  84. <uni-list-item :border="false" :showArrow="true" :clickable="true" @click="relationship = true">
  85. <!-- 自定义左(header)右(footer)的内容 -->
  86. <view slot="header">
  87. <text class="xinghao">*</text>
  88. <text style="font-size: 28rpx;">与宝贝的关系</text>
  89. </view>
  90. <view slot="footer">
  91. <view style="color: #AAAAAA;" v-if="nRelationship == '' ">请选择</view>
  92. <view style="color: #AAAAAA;" v-else>{{nRelationship}}</view>
  93. </view>
  94. </uni-list-item>
  95. </uni-list>
  96. </view>
  97. </view>
  98. </view>
  99. <!-- 按钮 -->
  100. <view class="information-button">
  101. <u-button shape="circle" type="primary" @click="next">下一步</u-button>
  102. </view>
  103. </view>
  104. </template>
  105. <script>
  106. export default {
  107. data() {
  108. return {
  109. //当前处于第几步
  110. current: 0,
  111. numList: [{
  112. name: '基本信息'
  113. }, {
  114. name: '确认订单'
  115. }, {
  116. name: '支付结果'
  117. }],
  118. list: [{
  119. name: '是',
  120. disabled: false
  121. },
  122. {
  123. name: '否',
  124. disabled: false
  125. }
  126. ],
  127. //控制列选择器
  128. choiceName: false,
  129. relationship: false,
  130. choicelist: [{
  131. value: '1',
  132. label: '测试1'
  133. },
  134. {
  135. value: '2',
  136. label: '测试2'
  137. }
  138. ],
  139. relationshipList: [{
  140. value: '1',
  141. label: '父母'
  142. },
  143. {
  144. value: '2',
  145. label: '祖父母'
  146. },
  147. {
  148. value: '3',
  149. label: '亲属'
  150. },
  151. {
  152. value: '4',
  153. label: '其他'
  154. }
  155. ],
  156. /**
  157. * 需要传的数据
  158. * 名字
  159. * 身份证
  160. * 社保 值为 是 否
  161. * 监护人姓名
  162. * */
  163. babyNmae: '测试',
  164. babyID: '',
  165. guarantee: '',
  166. guardianName: '',
  167. nRelationship: ''
  168. }
  169. },
  170. methods: {
  171. // 选中某个单选框时,由radio时触发
  172. radioChange(e) {
  173. console.log(e);
  174. },
  175. // 选中任一radio时,由radio-group触发
  176. radioGroupChange(e) {
  177. console.log(e);
  178. },
  179. confirm1(e) {
  180. this.babyNmae = e[0].label
  181. },
  182. confirm2(e) {
  183. this.nRelationship = e[0].label
  184. },
  185. //下一步
  186. next(e) {
  187. console.log(123123)
  188. uni.navigateTo({
  189. url: '/pages/order/payment'
  190. });
  191. }
  192. }
  193. }
  194. </script>
  195. <style>
  196. .steps {
  197. padding-top: 50rpx;
  198. padding-bottom: 30rpx;
  199. height: auto;
  200. }
  201. /* 信息标题 */
  202. .information-title {
  203. height: auto;
  204. width: auto;
  205. font-size: 36rpx;
  206. font-weight: 700;
  207. padding: 30rpx 0 20rpx 30rpx;
  208. }
  209. /* 星号 */
  210. .xinghao {
  211. width: 20px;
  212. height: 20px;
  213. display: inline-block;
  214. vertical-align: middle;
  215. text-align: center;
  216. line-height: 26px;
  217. font-size: 15px;
  218. color: #f00;
  219. }
  220. .information-button {
  221. height: 10vh;
  222. padding: 0 20rpx;
  223. }
  224. </style>