123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159 |
- <template>
- <view class="container">
- <view class="info-box">
- <view class="info-item-box flex">
- <view class="label">
- 姓名
- </view>
- <view class="text">
- {{ info.username }}
- </view>
- </view>
- <view class="info-item-box flex">
- <view class="label">
- 证件号码
- </view>
- <view class="text">
- {{ info.idNumber }}
- </view>
- </view>
- <view class="info-item-box flex">
- <view class="label">
- 业务水平认证证书编号
- </view>
- <view class="text">
- {{ info.licenseNo ?? '无' }}
- </view>
- </view>
- <view class="info-item-box flex">
- <view class="label">
- 信用信息卡号
- </view>
- <view class="text">
- {{ info.creditNo ?? '无' }}
- </view>
- </view>
- <view class="info-item-box flex">
- <view class="label">
- 缴费年份
- </view>
- <view class="text" @click="showYear = true">
- {{ info.year }}(可拉下选中缴费时间)
- </view>
- </view>
- </view>
- <u-select v-model="showYear" :list="yearList" @confirm="onYearConfirm"></u-select>
- <view class="bottom-box">
- <u-button type="error" shape="circle" @click="onSubmit">点击缴费</u-button>
- </view>
- </view>
- </template>
- <script setup>
- import { ref } from 'vue'
- import { onLoad } from '@dcloudio/uni-app'
- import { person, personPayment } from '@/api/cost.js'
-
- const form = ref({
- name: '',
- idNumber: ''
- })
-
- const info = ref({
- username: 'xxxxxxxxxx', // 姓名
- idNumber: 'xxxxxxxxxx', // 证件号码
- phone: 'xxxxxxxxxx', // 手机号码
- licenseNo: 'xxxxxxxxxx', // 业务水平认证证书编号
- creditNo: 'xxxxxxxxxx', // 信用信息卡号
- year: '', // 缴交年份
- duePrice: 0.00, // 价格
- })
-
- const showYear = ref(false)
- const yearList = ref([
- {
- value: '2025',
- label: '2025'
- }
- ])
- function onYearConfirm(val) {
- info.value.year = val[0].value
- }
-
- function onSubmit() {
- console.log('点击缴费');
- }
-
- onLoad((load) => {
- yearList.value = []
- const year = new Date().getFullYear()
-
- for (let i = 0; i < 10; i++) {
- yearList.value.push({
- value: `${year - i}`,
- label: `${year - i}`
- })
- }
-
- form.value = {
- name: load.name,
- idNumber: load.idNumber
- }
- person(form.value).then(res => {
- if (res && res.message === 'success') {
- info.value = res.data
- info.value.year = year
- }
- })
- })
- </script>
- <style lang="scss" scoped>
- .container {
- height: 100vh;
- width: 100vw;
- background-color: $uni-bg-color;
- padding: 0 20rpx;
- .info-box {
- padding: 30rpx;
- background-color: $uni-bg-color-grey;
- border-radius: $uni-card-border-radius;
- .info-item-box {
- font-size: $uni-title-font-size-2;
- border-bottom: 1rpx solid #E6E6E6;
- height: 82rpx;
- .label {
- font-weight: bold;
- }
- }
- .flex {
- display: flex;
- align-items: center;
- .label {
- width: 40%;
- }
- .text {
- width: 60%;
- }
- }
- .row {
- .label {
- line-height: 62rpx;
- }
- .text {
- line-height: 42rpx;
- font-size: $uni-title-font-size-3;
- font-weight: bold;
- }
- }
- }
-
- .bottom-box {
- padding: 20rpx;
-
- position: absolute;
- bottom: 50rpx;
- width: 95%;
- }
- }
- </style>
|