风险测评小程序前端代码仓库
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

245 lines
5.7 KiB

  1. <template>
  2. <view class="page__view">
  3. <navbar title="支付" leftClick @leftClick="$utils.navigateBack" />
  4. <view class="status">
  5. <view class="flex status-content">
  6. <!-- todo: 缺切图 -->
  7. <image class="icon" src="@/pages_order/static/report/icon-info.png" mode="widthFix"></image>
  8. <view>支付成功</view>
  9. </view>
  10. </view>
  11. <view class="tips">
  12. <view class="flex tips-content">
  13. <uv-icon name="error-circle" color="#014FA2" size="36rpx"></uv-icon>
  14. <view>请如实填写以下信息方可获取答题情况生成风险测评报告</view>
  15. </view>
  16. </view>
  17. <view class="form">
  18. <view class="flex form-header">
  19. <view class="line"></view>
  20. <view>基本信息</view>
  21. </view>
  22. <uv-form
  23. ref="form"
  24. :model="form"
  25. :rules="rules"
  26. errorType="toast"
  27. >
  28. <view class="form-item">
  29. <uv-form-item prop="name" :customStyle="formItemStyle">
  30. <view class="flex row">
  31. <view class="row-label">姓名</view>
  32. <view class="row-content">
  33. <input
  34. v-model="form.name"
  35. placeholder="请输入您的姓名"
  36. :placeholderStyle="placeholderStyle"
  37. />
  38. </view>
  39. </view>
  40. </uv-form-item>
  41. </view>
  42. <view class="form-item">
  43. <uv-form-item prop="phone" :customStyle="formItemStyle">
  44. <view class="flex row">
  45. <view class="row-label">手机号码</view>
  46. <view class="row-content">
  47. <input
  48. v-model="form.phone"
  49. placeholder="请输入您的手机号"
  50. :placeholderStyle="placeholderStyle"
  51. />
  52. </view>
  53. </view>
  54. </uv-form-item>
  55. </view>
  56. <view class="form-item">
  57. <uv-form-item prop="company" :customStyle="formItemStyle">
  58. <view class="flex row">
  59. <view class="row-label is-required">公司名称</view>
  60. <view class="row-content">
  61. <input
  62. v-model="form.company"
  63. placeholder="请选输入公司全称"
  64. :placeholderStyle="placeholderStyle"
  65. />
  66. </view>
  67. </view>
  68. </uv-form-item>
  69. </view>
  70. </uv-form>
  71. </view>
  72. <view class="bottom">
  73. <button :class="['btn', disabled ? 'is-disabled' : '']" :disabled="disabled" @click="onCreateReport">生成报告</button>
  74. </view>
  75. </view>
  76. </template>
  77. <script>
  78. export default {
  79. data() {
  80. return {
  81. id: null,
  82. form: {
  83. name: null,
  84. phone: null,
  85. company: null,
  86. },
  87. rules: {
  88. 'company': {
  89. type: 'string',
  90. required: true,
  91. message: '请填写公司名称~',
  92. },
  93. },
  94. formItemStyle: { padding: 0 },
  95. placeholderStyle: 'color: #BDBDBD; font-size: 28rpx; font-weight: 400;'
  96. }
  97. },
  98. computed: {
  99. disabled() {
  100. const { name, phone, company } = this.form
  101. return !name || !phone || !company
  102. }
  103. },
  104. onLoad(arg) {
  105. const { id } = arg
  106. this.id = id
  107. },
  108. methods: {
  109. onCreateReport() {
  110. // todo
  111. uni.navigateTo({
  112. url: `/pages_order/report/index?id=${this.id}`
  113. })
  114. },
  115. },
  116. }
  117. </script>
  118. <style scoped lang="scss">
  119. .status {
  120. width: 100%;
  121. padding: 0 20rpx;
  122. box-sizing: border-box;
  123. &-content {
  124. width: 100%;
  125. padding: 157rpx 0 84rpx 0;
  126. box-sizing: border-box;
  127. column-gap: 18rpx;
  128. font-size: 48rpx;
  129. font-weight: 600;
  130. color: #000000;
  131. border-bottom: 1rpx dashed #E2EAF1;
  132. }
  133. }
  134. .tips {
  135. width: 100%;
  136. padding: 68rpx 24rpx 35rpx 24rpx;
  137. box-sizing: border-box;
  138. &-content {
  139. justify-content: flex-start;
  140. column-gap: 15rpx;
  141. width: 100%;
  142. padding: 13rpx 22rpx;
  143. box-sizing: border-box;
  144. font-size: 22rpx;
  145. line-height: 40rpx;
  146. color: #014FA2;
  147. background: rgba($color: #014FA2, $alpha: 0.16);
  148. border-radius: 11rpx;
  149. .icon {
  150. width: 36rpx;
  151. height: auto;
  152. }
  153. }
  154. }
  155. .form {
  156. padding: 0 18rpx;
  157. &-header {
  158. margin-bottom: 28rpx;
  159. padding: 0 18rpx;
  160. justify-content: flex-start;
  161. column-gap: 7rpx;
  162. font-size: 30rpx;
  163. font-weight: 600;
  164. color: #000000;
  165. .line {
  166. width: 9rpx;
  167. height: 33rpx;
  168. background: #014FA2;
  169. border-radius: 6rpx;
  170. }
  171. }
  172. &-item {
  173. border-bottom: 0.5rpx solid rgba($color: #707070, $alpha: 0.14);
  174. }
  175. }
  176. .row {
  177. justify-content: space-between;
  178. padding: 36rpx 30rpx 22rpx 24rpx;
  179. &-label {
  180. position: relative;
  181. font-size: 30rpx;
  182. color: #000000;
  183. &.is-required:after {
  184. content: '*';
  185. position: absolute;
  186. top: 0;
  187. left: 0;
  188. font-size: 15rpx;
  189. line-height: 42rpx;
  190. color: #FF3838;
  191. }
  192. }
  193. &-content {
  194. /deep/ input {
  195. text-align: right;
  196. }
  197. }
  198. }
  199. .bottom {
  200. position: fixed;
  201. left: 0;
  202. bottom: 0;
  203. width: 100%;
  204. padding: 35rpx 56rpx;
  205. padding-bottom: calc(env(safe-area-inset-bottom) + 35rpx);
  206. background: #FFFFFF;
  207. box-sizing: border-box;
  208. .btn {
  209. width: 100%;
  210. padding: 29rpx 0;
  211. font-size: 30rpx;
  212. line-height: 1.5;
  213. color: #FFFFFF;
  214. background: #014FA2;
  215. border-radius: 50rpx;
  216. &.is-disabled {
  217. background: #999999;
  218. }
  219. }
  220. }
  221. </style>