考点
Showing
9 changed files
with
473 additions
and
109 deletions
| ... | @@ -35,11 +35,11 @@ const emit = defineEmits(['switch']) | ... | @@ -35,11 +35,11 @@ const emit = defineEmits(['switch']) |
| 35 | const switching = ref(false) | 35 | const switching = ref(false) |
| 36 | 36 | ||
| 37 | const tabs = [ | 37 | const tabs = [ |
| 38 | { text: '人员', url: '/pages/index/daoGuanPerson', icon: '/static/img/tool01.png', activeIcon: '/static/img/tool01_dwn.png' }, | 38 | { text: '人员', url: '/pages/index/daoGuanPerson', icon: config.baseUrl_api + '/fs/static/img/tool01.png', activeIcon: config.baseUrl_api + '/fs/static/img/tool01_dwn.png' }, |
| 39 | { text: '订单', url: '/pages/index/daoGuanOrder', icon: '/static/img/tool02.png', activeIcon: '/static/img/tool02_dwn.png' }, | 39 | { text: '订单', url: '/pages/index/daoGuanOrder', icon: config.baseUrl_api + '/fs/static/img/tool02.png', activeIcon: config.baseUrl_api + '/fs/static/img/tool02_dwn.png' }, |
| 40 | { text: '通知', url: '/pages/index/daoGuanNotice', icon: '/static/img/tool03.png', activeIcon: '/static/img/tool03_dwn.png' }, | 40 | { text: '通知', url: '/pages/index/daoGuanNotice', icon: config.baseUrl_api + '/fs/static/img/tool03.png', activeIcon: config.baseUrl_api + '/fs/static/img/tool03_dwn.png' }, |
| 41 | { text: '级位', url: '/pages/index/daoGuanLevel', icon: '/static/img/tool04.png', activeIcon: '/static/img/tool04_dwn.png' }, | 41 | { text: '级位', url: '/pages/index/daoGuanLevel', icon: config.baseUrl_api + '/fs/static/img/tool04.png', activeIcon: config.baseUrl_api + '/fs/static/img/tool04_dwn.png' }, |
| 42 | { text: '我的', url: '/pages/index/daoGuanMy', icon: '/static/img/tool05.png', activeIcon: '/static/img/tool05_dwn.png' }, | 42 | { text: '我的', url: '/pages/index/daoGuanMy', icon: config.baseUrl_api + '/fs/static/img/tool05.png', activeIcon: config.baseUrl_api + '/fs/static/img/tool05_dwn.png' }, |
| 43 | ] | 43 | ] |
| 44 | 44 | ||
| 45 | const tabBgLeft = computed(() => { | 45 | const tabBgLeft = computed(() => { | ... | ... |
| ... | @@ -5,7 +5,7 @@ | ... | @@ -5,7 +5,7 @@ |
| 5 | <image class="empty-img" mode="aspectFit" :src="config.baseUrl_api + '/fs/static/nodata.png'"></image> | 5 | <image class="empty-img" mode="aspectFit" :src="config.baseUrl_api + '/fs/static/nodata.png'"></image> |
| 6 | <text class="empty-text">暂无考官数据</text> | 6 | <text class="empty-text">暂无考官数据</text> |
| 7 | 7 | ||
| 8 | <button class="go-lib-btn" @click="goPath('/level/chooseExaminer?pageType=0')">去考官库添加考官吧</button> | 8 | <!-- <button class="go-lib-btn" @click="goPath('/level/chooseExaminer?pageType=0')">去考官库添加考官吧</button> --> |
| 9 | </view> | 9 | </view> |
| 10 | <!-- <view class="empty-tip" v-else-if="infoList.length === 0">暂无可添加的考官</view> --> | 10 | <!-- <view class="empty-tip" v-else-if="infoList.length === 0">暂无可添加的考官</view> --> |
| 11 | 11 | ... | ... |
| ... | @@ -4,9 +4,9 @@ | ... | @@ -4,9 +4,9 @@ |
| 4 | <custom-modal ref="customModalRef" :cancelText="modalConfig.cancelText" :confirmText="modalConfig.confirmText" | 4 | <custom-modal ref="customModalRef" :cancelText="modalConfig.cancelText" :confirmText="modalConfig.confirmText" |
| 5 | :content="modalConfig.content" :showCancel="modalConfig.showCancel" | 5 | :content="modalConfig.content" :showCancel="modalConfig.showCancel" |
| 6 | :title="modalConfig.title" @confirm="onModalConfirm"/> | 6 | :title="modalConfig.title" @confirm="onModalConfirm"/> |
| 7 | 7 | ||
| 8 | <!-- 考官选择类型 --> | 8 | <!-- 考官选择类型 --> |
| 9 | <!-- <view class="radio-section"> | 9 | <view class="radio-section"> |
| 10 | <radio-group class="radio-group" @change="onSelfSelectChange"> | 10 | <radio-group class="radio-group" @change="onSelfSelectChange"> |
| 11 | <label class="radio-item"> | 11 | <label class="radio-item"> |
| 12 | <radio :checked="form.selfSelect == '1'" class="custom-radio" value="1"/> | 12 | <radio :checked="form.selfSelect == '1'" class="custom-radio" value="1"/> |
| ... | @@ -17,36 +17,40 @@ | ... | @@ -17,36 +17,40 @@ |
| 17 | <text class="radio-text">省跆协指派考官</text> | 17 | <text class="radio-text">省跆协指派考官</text> |
| 18 | </label> | 18 | </label> |
| 19 | </radio-group> | 19 | </radio-group> |
| 20 | </view> --> | 20 | </view> |
| 21 | 21 | ||
| 22 | <!-- 温馨提示 --> | 22 | <!-- 温馨提示 --> |
| 23 | <view v-if="form.selfSelect == '1'" class="tip-box"> | 23 | <view class="tip-box"> |
| 24 | <text class="tip-text">温馨提示: | 24 | <text class="tip-text">温馨提示: |
| 25 | 您可以自行录入考官信息,如果暂时没有考官,可以选择由省跆协指派进行考点申报,请尽快完成考点考官的认证。 | 25 | 您可以自行录入考官信息,如果暂时没有考官,可以选择由省跆协指派进行考点申报,请尽快完成考点考官的认证。 |
| 26 | </text> | 26 | </text> |
| 27 | </view> | 27 | </view> |
| 28 | 28 | ||
| 29 | <!-- 省跆协指派提示 --> | 29 | <!-- 省跆协指派提示 --> |
| 30 | <view v-if="form.selfSelect == '0'" class="tip-box"> | 30 | <!-- <view v-if="form.selfSelect == '0'" class="tip-box"> |
| 31 | <text class="tip-text">温馨提示:关于考官指派,请联系{{ shenForm.baseName || '' }},联系电话:{{ | 31 | <text class="tip-text">温馨提示:关于考官指派,请联系{{ shenForm.baseName || '' }},联系电话:{{ |
| 32 | shenForm.phone || '' | 32 | shenForm.phone || '' |
| 33 | }} | 33 | }} |
| 34 | </text> | 34 | </text> |
| 35 | </view> | 35 | </view> --> |
| 36 | 36 | ||
| 37 | <view class="section"> | 37 | <view class="section"> |
| 38 | <!-- 自行录入考官区域 --> | 38 | <!-- 自行录入考官区域 --> |
| 39 | <view v-if="form.selfSelect == '1'" class="section examiner-section"> | 39 | <view v-if="form.selfSelect == '1'" class="section examiner-section"> |
| 40 | <button class="add-btn" @click="handelAddExamine">+ 添加考官</button> | 40 | <button class="add-btn" @click="addExaminer">+ 添加考官</button> |
| 41 | </view> | ||
| 42 | <view v-else class="section examiner-section"> | ||
| 43 | <button class="add-btn" @click="addExaminer">+ 选择考官</button> | ||
| 41 | </view> | 44 | </view> |
| 42 | 45 | ||
| 43 | <view v-if="form.selfSelect == '1'" class="examiner-list"> | 46 | <view class="examiner-list"> |
| 44 | <view v-for="(item, index) in list" :key="item.id" class="examiner-item"> | 47 | <view v-for="item in list" :key="item.id" class="examiner-item"> |
| 45 | <view class="info"> | 48 | <view class="info"> |
| 46 | <text class="name">{{ item.perName }} {{ item.perCode }}</text> | 49 | <text class="name">{{ item.perName }} {{ item.perCode }}</text> |
| 47 | <text class="idc">证件号码:{{ item.perIdcCode }}</text> | 50 | <text class="idc">证件号码:{{ item.perIdcCode }}</text> |
| 48 | <text class="reg">注册地:{{ item.memName }}</text> | 51 | <text class="reg">注册地:{{ JSON.parse(item.roleInfo).unit || '' }}</text> |
| 49 | </view> | 52 | </view> |
| 53 | |||
| 50 | <button class="del-btn" @click="handleDel(item)">删除</button> | 54 | <button class="del-btn" @click="handleDel(item)">删除</button> |
| 51 | </view> | 55 | </view> |
| 52 | </view> | 56 | </view> |
| ... | @@ -55,6 +59,44 @@ | ... | @@ -55,6 +59,44 @@ |
| 55 | <view class="submit-area"> | 59 | <view class="submit-area"> |
| 56 | <button class="submit-btn" @click="handelSubmit">确定提交</button> | 60 | <button class="submit-btn" @click="handelSubmit">确定提交</button> |
| 57 | </view> | 61 | </view> |
| 62 | |||
| 63 | <!-- 添加考官弹框 --> | ||
| 64 | <uni-popup ref="addPopup" type="bottom" background-color="#fff"> | ||
| 65 | <view class="popBody" style="background:#fff;"> | ||
| 66 | <view class="h3 text-center">添加考官</view> | ||
| 67 | <view class="form-item"> | ||
| 68 | <text class="label">考官姓名</text> | ||
| 69 | <uni-easyinput v-model="addForm.name" placeholder="请输入考官姓名" /> | ||
| 70 | </view> | ||
| 71 | <view class="form-item"> | ||
| 72 | <text class="label">考官编号</text> | ||
| 73 | <uni-easyinput v-model="addForm.certCode" placeholder="请输入考官编号" /> | ||
| 74 | </view> | ||
| 75 | <view class="btn-group"> | ||
| 76 | <button class="btn-cancel" @click="closeAddPopup">取消</button> | ||
| 77 | <button class="btn-confirm" @click="searchAndAdd">查询</button> | ||
| 78 | </view> | ||
| 79 | |||
| 80 | <!-- 搜索结果 --> | ||
| 81 | <view v-if="searchResult" class="search-result"> | ||
| 82 | <view class="result-item"> | ||
| 83 | <view class="info"> | ||
| 84 | <view class="name">{{searchResult.perName}}</view> | ||
| 85 | <view class="date">会员号:{{searchResult.perCode||'-'}}</view> | ||
| 86 | <view class="date">证件号码:{{searchResult.idcCode||'-'}}</view> | ||
| 87 | <view class="date">注册地:{{searchResult.memName||'-'}}</view> | ||
| 88 | </view> | ||
| 89 | <view class="action"> | ||
| 90 | <text v-if="searchResult.added" class="text-gray">已添加</text> | ||
| 91 | <text v-else class="text-primary" @click="doAddExaminer(searchResult)">添加</text> | ||
| 92 | </view> | ||
| 93 | </view> | ||
| 94 | </view> | ||
| 95 | <view v-if="searchNoData" class="no-data"> | ||
| 96 | <text>未查询到考官信息</text> | ||
| 97 | </view> | ||
| 98 | </view> | ||
| 99 | </uni-popup> | ||
| 58 | </view> | 100 | </view> |
| 59 | </template> | 101 | </template> |
| 60 | 102 | ||
| ... | @@ -74,6 +116,16 @@ const list = ref([]) | ... | @@ -74,6 +116,16 @@ const list = ref([]) |
| 74 | const memId = ref(null) | 116 | const memId = ref(null) |
| 75 | const shenForm = ref({}) | 117 | const shenForm = ref({}) |
| 76 | 118 | ||
| 119 | // 选择考官弹框 | ||
| 120 | const addPopup = ref(null) | ||
| 121 | const addForm = ref({ | ||
| 122 | type: 1, | ||
| 123 | name: '', | ||
| 124 | certCode: '' | ||
| 125 | }) | ||
| 126 | const searchResult = ref(null) | ||
| 127 | const searchNoData = ref(false) | ||
| 128 | |||
| 77 | // 自定义弹窗 | 129 | // 自定义弹窗 |
| 78 | const customModalRef = ref(null) | 130 | const customModalRef = ref(null) |
| 79 | const modalConfig = ref({ | 131 | const modalConfig = ref({ |
| ... | @@ -128,22 +180,75 @@ function handleDel(row) { | ... | @@ -128,22 +180,75 @@ function handleDel(row) { |
| 128 | function onSelfSelectChange(e) { | 180 | function onSelfSelectChange(e) { |
| 129 | form.value.selfSelect = e.detail.value | 181 | form.value.selfSelect = e.detail.value |
| 130 | showExamine.value = e.detail.value == '1' | 182 | showExamine.value = e.detail.value == '1' |
| 131 | if (e.detail.value == '0') { | 183 | // if (e.detail.value == '0') { |
| 132 | modalAction = 'assign' | 184 | // modalAction = 'assign' |
| 133 | modalConfig.value = { | 185 | // modalConfig.value = { |
| 134 | title: '温馨提示', | 186 | // title: '温馨提示', |
| 135 | content: `关于考官指派,请联系${shenForm.value.baseName || ''},联系电话:${shenForm.value.phone || ''}`, | 187 | // content: `关于考官指派,请联系${shenForm.value.baseName || ''},联系电话:${shenForm.value.phone || ''}`, |
| 136 | showCancel: false, | 188 | // showCancel: false, |
| 137 | confirmText: '我知道了' | 189 | // confirmText: '我知道了' |
| 138 | } | 190 | // } |
| 139 | customModalRef.value.open() | 191 | // customModalRef.value.open() |
| 192 | // } | ||
| 193 | } | ||
| 194 | // 打开添加考官弹窗 | ||
| 195 | function addExaminer() { | ||
| 196 | addForm.value.name = '' | ||
| 197 | addForm.value.certCode = '' | ||
| 198 | searchResult.value = null | ||
| 199 | searchNoData.value = false | ||
| 200 | addPopup.value.open() | ||
| 201 | } | ||
| 202 | |||
| 203 | // 关闭添加考官弹窗 | ||
| 204 | function closeAddPopup() { | ||
| 205 | addPopup.value.close() | ||
| 206 | } | ||
| 207 | |||
| 208 | // 搜索并添加考官 | ||
| 209 | function searchAndAdd() { | ||
| 210 | if (!addForm.value.name) { | ||
| 211 | uni.showToast({ title: '请输入考官姓名', icon: 'none' }) | ||
| 212 | return | ||
| 213 | } | ||
| 214 | if (!addForm.value.certCode) { | ||
| 215 | uni.showToast({ title: '请输入考官编号', icon: 'none' }) | ||
| 216 | return | ||
| 140 | } | 217 | } |
| 218 | |||
| 219 | uni.showLoading({ title: '查询中' }) | ||
| 220 | api.getCoachList(addForm.value).then(res => { | ||
| 221 | uni.hideLoading() | ||
| 222 | if (res.rows && res.rows.length > 0) { | ||
| 223 | searchResult.value = res.rows[0] | ||
| 224 | // 检查是否已添加 | ||
| 225 | const isAdded = list.value.some(l => l.perId === searchResult.value.perId) | ||
| 226 | if (isAdded) { | ||
| 227 | searchResult.value.added = true | ||
| 228 | } | ||
| 229 | searchNoData.value = false | ||
| 230 | } else { | ||
| 231 | searchResult.value = null | ||
| 232 | searchNoData.value = true | ||
| 233 | } | ||
| 234 | }).catch(() => { | ||
| 235 | uni.hideLoading() | ||
| 236 | searchResult.value = null | ||
| 237 | searchNoData.value = true | ||
| 238 | }) | ||
| 141 | } | 239 | } |
| 142 | 240 | ||
| 143 | function handelAddExamine() { | 241 | // 执行添加考官 |
| 144 | const chosenStr = JSON.stringify(list.value) | 242 | function doAddExaminer(row) { |
| 145 | uni.navigateTo({ | 243 | uni.showLoading({ title: '添加中' }) |
| 146 | url: `/myCenter/chooseExaminer?memId=${memId.value}&chosen=${chosenStr}` | 244 | api.selfAdd(row.perId).then(() => { |
| 245 | uni.hideLoading() | ||
| 246 | uni.showToast({ title: '添加成功', icon: 'success' }) | ||
| 247 | addPopup.value.close() | ||
| 248 | getExaminer() | ||
| 249 | }).catch(() => { | ||
| 250 | uni.hideLoading() | ||
| 251 | uni.showToast({ title: '添加失败', icon: 'error' }) | ||
| 147 | }) | 252 | }) |
| 148 | } | 253 | } |
| 149 | 254 | ||
| ... | @@ -417,4 +522,107 @@ function confirmApply() { | ... | @@ -417,4 +522,107 @@ function confirmApply() { |
| 417 | .btn-cancel::after, .btn-confirm::after { | 522 | .btn-cancel::after, .btn-confirm::after { |
| 418 | border: none; | 523 | border: none; |
| 419 | } | 524 | } |
| 525 | |||
| 526 | /* 添加考官弹框 */ | ||
| 527 | .popBody { | ||
| 528 | width: 100%; | ||
| 529 | padding: 40rpx 30rpx; | ||
| 530 | padding-bottom: calc(40rpx + env(safe-area-inset-bottom)); | ||
| 531 | background: #fff; | ||
| 532 | border-radius: 24rpx 24rpx 0 0; | ||
| 533 | box-sizing: border-box; | ||
| 534 | } | ||
| 535 | |||
| 536 | .popBody .h3 { | ||
| 537 | font-size: 32rpx; | ||
| 538 | font-weight: bold; | ||
| 539 | margin-bottom: 30rpx; | ||
| 540 | text-align: center; | ||
| 541 | } | ||
| 542 | |||
| 543 | .popBody .form-item { | ||
| 544 | margin-bottom: 20rpx; | ||
| 545 | } | ||
| 546 | |||
| 547 | .popBody .form-item .label { | ||
| 548 | display: block; | ||
| 549 | font-size: 28rpx; | ||
| 550 | color: #333; | ||
| 551 | margin-bottom: 10rpx; | ||
| 552 | } | ||
| 553 | |||
| 554 | .popBody .btn-group { | ||
| 555 | display: flex; | ||
| 556 | justify-content: center; | ||
| 557 | gap: 40rpx; | ||
| 558 | margin-top: 30rpx; | ||
| 559 | } | ||
| 560 | |||
| 561 | .popBody .btn-cancel, | ||
| 562 | .popBody .btn-confirm { | ||
| 563 | width: 200rpx; | ||
| 564 | height: 70rpx; | ||
| 565 | line-height: 70rpx; | ||
| 566 | font-size: 28rpx; | ||
| 567 | border-radius: 35rpx; | ||
| 568 | } | ||
| 569 | |||
| 570 | .popBody .btn-cancel { | ||
| 571 | background: #fff; | ||
| 572 | color: #C4121B; | ||
| 573 | border: 1px solid #C4121B; | ||
| 574 | } | ||
| 575 | |||
| 576 | .popBody .btn-confirm { | ||
| 577 | background: #C4121B; | ||
| 578 | color: #fff; | ||
| 579 | } | ||
| 580 | |||
| 581 | .search-result { | ||
| 582 | margin-top: 30rpx; | ||
| 583 | border-top: 1px solid #eee; | ||
| 584 | padding-top: 20rpx; | ||
| 585 | } | ||
| 586 | |||
| 587 | .search-result .result-item { | ||
| 588 | display: flex; | ||
| 589 | justify-content: space-between; | ||
| 590 | align-items: center; | ||
| 591 | padding: 20rpx; | ||
| 592 | background: #f9f9f9; | ||
| 593 | border-radius: 8rpx; | ||
| 594 | } | ||
| 595 | |||
| 596 | .search-result .result-item .name { | ||
| 597 | font-size: 30rpx; | ||
| 598 | font-weight: bold; | ||
| 599 | margin-bottom: 8rpx; | ||
| 600 | } | ||
| 601 | |||
| 602 | .search-result .result-item .date { | ||
| 603 | font-size: 24rpx; | ||
| 604 | color: #666; | ||
| 605 | margin-top: 4rpx; | ||
| 606 | } | ||
| 607 | |||
| 608 | .search-result .result-item .action { | ||
| 609 | font-size: 28rpx; | ||
| 610 | color: #007aff; | ||
| 611 | padding: 10rpx 20rpx; | ||
| 612 | } | ||
| 613 | |||
| 614 | .no-data { | ||
| 615 | text-align: center; | ||
| 616 | padding: 40rpx; | ||
| 617 | color: #999; | ||
| 618 | font-size: 28rpx; | ||
| 619 | } | ||
| 620 | |||
| 621 | .text-primary { | ||
| 622 | color: #007aff; | ||
| 623 | } | ||
| 624 | |||
| 625 | .text-gray { | ||
| 626 | color: #999; | ||
| 627 | } | ||
| 420 | </style> | 628 | </style> | ... | ... |
| ... | @@ -2,7 +2,7 @@ | ... | @@ -2,7 +2,7 @@ |
| 2 | <view class="exam-point-list"> | 2 | <view class="exam-point-list"> |
| 3 | <!-- 顶部申请按钮 --> | 3 | <!-- 顶部申请按钮 --> |
| 4 | <view v-if="status==0" class="apply-btn-box"> | 4 | <view v-if="status==0" class="apply-btn-box"> |
| 5 | <button :disabled="memberInfo.isPoints==0||formInfo.auditStatus==2||formInfo.auditStatus==1" class="apply-btn" | 5 | <button :disabled="memberInfo.isPoints==0&&(formInfo.auditStatus==2||formInfo.auditStatus==1)" class="apply-btn" |
| 6 | @click="goApply">申请考点 | 6 | @click="goApply">申请考点 |
| 7 | </button> | 7 | </button> |
| 8 | </view> | 8 | </view> | ... | ... |
| 1 | <template> | 1 | <template> |
| 2 | <view class="level-page"> | 2 | <view class="level-page"> |
| 3 | <!-- 提示弹框 --> | ||
| 4 | <custom-modal ref="tipModalRef" title="提示" :content="tipContent" :showCancel="false" confirmText="我知道了" @confirm="onTipConfirm" /> | ||
| 5 | |||
| 3 | <view class="hero"> | 6 | <view class="hero"> |
| 4 | <image class="hero-bg" :src="config.baseUrl_api + '/fs/static/img/top.png'" mode="aspectFill"></image> | 7 | <image class="hero-bg" :src="config.baseUrl_api + '/fs/static/img/top.png'" mode="aspectFill"></image> |
| 5 | <view class="hero-brand"> | 8 | <view class="hero-brand"> |
| ... | @@ -18,7 +21,7 @@ | ... | @@ -18,7 +21,7 @@ |
| 18 | </view> | 21 | </view> |
| 19 | 22 | ||
| 20 | <view class="level-grid"> | 23 | <view class="level-grid"> |
| 21 | <image class="level-card" :src="config.baseUrl_api + '/fs/static/img/jw_btn01.png'" mode="aspectFit" @click="goPath('/level/addApply')"></image> | 24 | <image class="level-card" :src="config.baseUrl_api + '/fs/static/img/jw_btn01.png'" mode="aspectFit" @click="goToAddApply"></image> |
| 22 | <image class="level-card" :src="config.baseUrl_api + '/fs/static/img/jw_btn02.png'" mode="aspectFit" @click="goPath('/personalVip/addChangeLevel')"></image> | 25 | <image class="level-card" :src="config.baseUrl_api + '/fs/static/img/jw_btn02.png'" mode="aspectFit" @click="goPath('/personalVip/addChangeLevel')"></image> |
| 23 | <image class="level-card" :src="config.baseUrl_api + '/fs/static/img/jw_btn03.png'" mode="aspectFit" @click="goPath('/level/apply')"></image> | 26 | <image class="level-card" :src="config.baseUrl_api + '/fs/static/img/jw_btn03.png'" mode="aspectFit" @click="goPath('/level/apply')"></image> |
| 24 | <image class="level-card" :src="config.baseUrl_api + '/fs/static/img/jw_btn04.png'" mode="aspectFit" @click="goPath('/personalVip/changeLevel')"></image> | 27 | <image class="level-card" :src="config.baseUrl_api + '/fs/static/img/jw_btn04.png'" mode="aspectFit" @click="goPath('/personalVip/changeLevel')"></image> |
| ... | @@ -33,6 +36,12 @@ | ... | @@ -33,6 +36,12 @@ |
| 33 | <script setup> | 36 | <script setup> |
| 34 | import config from '@/config.js' | 37 | import config from '@/config.js' |
| 35 | import DaoGuanTabBar from '@/components/dao-guan-tab-bar.vue' | 38 | import DaoGuanTabBar from '@/components/dao-guan-tab-bar.vue' |
| 39 | import customModal from '@/components/custom-modal.vue' | ||
| 40 | import { ref } from 'vue' | ||
| 41 | |||
| 42 | const app = getApp() | ||
| 43 | const tipModalRef = ref(null) | ||
| 44 | const tipContent = ref('') | ||
| 36 | 45 | ||
| 37 | const onTabSwitch = () => { | 46 | const onTabSwitch = () => { |
| 38 | // tab switch handled by component | 47 | // tab switch handled by component |
| ... | @@ -41,6 +50,26 @@ const onTabSwitch = () => { | ... | @@ -41,6 +50,26 @@ const onTabSwitch = () => { |
| 41 | const goPath = (url) => { | 50 | const goPath = (url) => { |
| 42 | uni.navigateTo({ url }) | 51 | uni.navigateTo({ url }) |
| 43 | } | 52 | } |
| 53 | |||
| 54 | function onTipConfirm() { | ||
| 55 | // 关闭提示弹框 | ||
| 56 | } | ||
| 57 | |||
| 58 | function goToAddApply() { | ||
| 59 | const deptType = app.globalData.deptType | ||
| 60 | const isPoints = app.globalData.memberInfo?.isPoints | ||
| 61 | console.log('isPoints:', isPoints) | ||
| 62 | |||
| 63 | // 如果 deptType == 1 且 isPoints != 1,弹出提示 | ||
| 64 | if (isPoints == 1) { | ||
| 65 | tipContent.value = '当前暂未完成考点认证,如需开设级位考试,请先提交考点申请。' | ||
| 66 | tipModalRef.value.open() | ||
| 67 | return | ||
| 68 | } | ||
| 69 | |||
| 70 | // 否则正常跳转 | ||
| 71 | goPath('/level/addApply') | ||
| 72 | } | ||
| 44 | </script> | 73 | </script> |
| 45 | 74 | ||
| 46 | <style lang="scss" scoped> | 75 | <style lang="scss" scoped> | ... | ... |
| ... | @@ -45,6 +45,14 @@ | ... | @@ -45,6 +45,14 @@ |
| 45 | <text class="arrow">></text> | 45 | <text class="arrow">></text> |
| 46 | </view> | 46 | </view> |
| 47 | 47 | ||
| 48 | <view class="menu-item" @click="goPath('/myCenter/examPointApplyList')"> | ||
| 49 | <view class="menu-left"> | ||
| 50 | <image class="menu-icon" :src="config.baseUrl_api + '/fs/static/img/user02.png'" mode="aspectFit"></image> | ||
| 51 | <text>考点认证</text> | ||
| 52 | </view> | ||
| 53 | <text class="arrow">></text> | ||
| 54 | </view> | ||
| 55 | |||
| 48 | <view class="menu-item" @click="goPath('/myCenter/safe')"> | 56 | <view class="menu-item" @click="goPath('/myCenter/safe')"> |
| 49 | <view class="menu-left"> | 57 | <view class="menu-left"> |
| 50 | <image class="menu-icon" :src="config.baseUrl_api + '/fs/static/img/user03.png'" mode="aspectFit"></image> | 58 | <image class="menu-icon" :src="config.baseUrl_api + '/fs/static/img/user03.png'" mode="aspectFit"></image> | ... | ... |
| ... | @@ -68,8 +68,7 @@ | ... | @@ -68,8 +68,7 @@ |
| 68 | <view class="dialog-title">申请成为考点</view> | 68 | <view class="dialog-title">申请成为考点</view> |
| 69 | <view class="dialog-message"> | 69 | <view class="dialog-message"> |
| 70 | <text>恭喜您成为中国跆拳道协会单位会员!</text> | 70 | <text>恭喜您成为中国跆拳道协会单位会员!</text> |
| 71 | <text>根据协会考点管理办法,需成为考点单位才能进行考级业务的办理。</text> | 71 | <text>根据协会考点管理办法,需成为考点单位才能进行考级业务的办理。是否现在申请成为考点?</text> |
| 72 | <text>是否现在申请成为考点。</text> | ||
| 73 | </view> | 72 | </view> |
| 74 | <view class="dialog-footer"> | 73 | <view class="dialog-footer"> |
| 75 | <button class="dialog-btn cancel" @click="closeExamPointDialog">取消</button> | 74 | <button class="dialog-btn cancel" @click="closeExamPointDialog">取消</button> |
| ... | @@ -566,7 +565,7 @@ const onTabSwitch = () => { | ... | @@ -566,7 +565,7 @@ const onTabSwitch = () => { |
| 566 | color: #555; | 565 | color: #555; |
| 567 | font-size: 28rpx; | 566 | font-size: 28rpx; |
| 568 | line-height: 1.6; | 567 | line-height: 1.6; |
| 569 | text-align: center; | 568 | // text-align: center; |
| 570 | } | 569 | } |
| 571 | 570 | ||
| 572 | .dialog-footer { | 571 | .dialog-footer { |
| ... | @@ -597,6 +596,6 @@ const onTabSwitch = () => { | ... | @@ -597,6 +596,6 @@ const onTabSwitch = () => { |
| 597 | margin-top: 24rpx; | 596 | margin-top: 24rpx; |
| 598 | color: #999; | 597 | color: #999; |
| 599 | font-size: 24rpx; | 598 | font-size: 24rpx; |
| 600 | text-align: center; | 599 | text-align: right; |
| 601 | } | 600 | } |
| 602 | </style> | 601 | </style> | ... | ... |
| ... | @@ -11,30 +11,31 @@ | ... | @@ -11,30 +11,31 @@ |
| 11 | <view class="form-item"> | 11 | <view class="form-item"> |
| 12 | <text class="label">发票类型</text> | 12 | <text class="label">发票类型</text> |
| 13 | <view class="type-select"> | 13 | <view class="type-select"> |
| 14 | <view | 14 | <view |
| 15 | :class="{ active: form.type === '1' }" | 15 | :class="{ active: form.type === '0' }" |
| 16 | class="type-option" | 16 | class="type-option" |
| 17 | @click="form.type = '1'" | 17 | @click="form.type = '0'" |
| 18 | > | 18 | > |
| 19 | <view class="type-icon"> | 19 | <view class="type-icon enterprise"> |
| 20 | <text class="icon-text">个</text> | 20 | <text class="icon-text">企</text> |
| 21 | </view> | 21 | </view> |
| 22 | <view class="type-info"> | 22 | <view class="type-info"> |
| 23 | <text class="type-name">个人</text> | 23 | <text class="type-name">企业单位</text> |
| 24 | </view> | 24 | </view> |
| 25 | </view> | 25 | </view> |
| 26 | <view | 26 | <view |
| 27 | :class="{ active: form.type === '0' }" | 27 | :class="{ active: form.type === '1' }" |
| 28 | class="type-option" | 28 | class="type-option" |
| 29 | @click="form.type = '0'" | 29 | @click="form.type = '1'" |
| 30 | > | 30 | > |
| 31 | <view class="type-icon enterprise"> | 31 | <view class="type-icon"> |
| 32 | <text class="icon-text">企</text> | 32 | <text class="icon-text">个</text> |
| 33 | </view> | 33 | </view> |
| 34 | <view class="type-info"> | 34 | <view class="type-info"> |
| 35 | <text class="type-name">企业</text> | 35 | <text class="type-name">个人/非企业</text> |
| 36 | </view> | 36 | </view> |
| 37 | </view> | 37 | </view> |
| 38 | |||
| 38 | </view> | 39 | </view> |
| 39 | </view> | 40 | </view> |
| 40 | 41 | ||
| ... | @@ -44,7 +45,7 @@ | ... | @@ -44,7 +45,7 @@ |
| 44 | <input | 45 | <input |
| 45 | v-model="form.name" | 46 | v-model="form.name" |
| 46 | class="input" | 47 | class="input" |
| 47 | placeholder="请输入公司全称或个人姓名" | 48 | :placeholder="form.type === '0' ? '请输入公司全称' : '请输入发票抬头'" |
| 48 | /> | 49 | /> |
| 49 | <text class="hint">请确保发票抬头与公司营业执照或个人身份证上的名称一致</text> | 50 | <text class="hint">请确保发票抬头与公司营业执照或个人身份证上的名称一致</text> |
| 50 | </view> | 51 | </view> |
| ... | @@ -89,7 +90,7 @@ const form = reactive({ | ... | @@ -89,7 +90,7 @@ const form = reactive({ |
| 89 | id: '', // 订单ID | 90 | id: '', // 订单ID |
| 90 | name: '', // 发票抬头 | 91 | name: '', // 发票抬头 |
| 91 | taxno: '', // 纳税人识别号 | 92 | taxno: '', // 纳税人识别号 |
| 92 | type: '1', // 发票类型:1=个人 0=企业 | 93 | type: '0', // 发票类型:1=个人 0=企业 |
| 93 | amount: 0 // 金额 | 94 | amount: 0 // 金额 |
| 94 | }); | 95 | }); |
| 95 | 96 | ... | ... |
| ... | @@ -92,6 +92,26 @@ | ... | @@ -92,6 +92,26 @@ |
| 92 | </view> | 92 | </view> |
| 93 | <view class="fixedBottom"><button class="btn-red" @click="goSubmit">确 定</button></view> | 93 | <view class="fixedBottom"><button class="btn-red" @click="goSubmit">确 定</button></view> |
| 94 | 94 | ||
| 95 | <!-- 个人中心浮动按钮 --> | ||
| 96 | <view class="float-btn" @click="goHome"> | ||
| 97 | <uni-icons type="person-filled" size="32" color="#fff"></uni-icons> | ||
| 98 | </view> | ||
| 99 | |||
| 100 | <!-- 有效期提示弹框 --> | ||
| 101 | <view class="validity-modal" v-if="showValidityModal"> | ||
| 102 | <view class="validity-modal-mask" @click="closeValidityModal"></view> | ||
| 103 | <view class="validity-modal-content"> | ||
| 104 | <view class="validity-modal-title">提示</view> | ||
| 105 | <view class="validity-modal-body"> | ||
| 106 | 当前会员有效期为 {{ validityDateText }},是否继续缴费? | ||
| 107 | </view> | ||
| 108 | <view class="validity-modal-footer"> | ||
| 109 | <button class="btn-modal-cancel" @click="goHomeFromModal">个人中心</button> | ||
| 110 | <button class="btn-modal-confirm" @click="goPayFromModal">继续缴费</button> | ||
| 111 | </view> | ||
| 112 | </view> | ||
| 113 | </view> | ||
| 114 | |||
| 95 | </view> | 115 | </view> |
| 96 | </template> | 116 | </template> |
| 97 | 117 | ||
| ... | @@ -179,6 +199,9 @@ const imageStylesZJ = ref({ | ... | @@ -179,6 +199,9 @@ const imageStylesZJ = ref({ |
| 179 | height: '316rpx' | 199 | height: '316rpx' |
| 180 | }); | 200 | }); |
| 181 | 201 | ||
| 202 | const showValidityModal = ref(false) | ||
| 203 | const validityDateText = ref('') | ||
| 204 | |||
| 182 | onLoad(async (option) => { | 205 | onLoad(async (option) => { |
| 183 | if (option.name && option.idcCode) { | 206 | if (option.name && option.idcCode) { |
| 184 | baseFormData.value.name = option.name | 207 | baseFormData.value.name = option.name |
| ... | @@ -303,6 +326,8 @@ function upIdCardImgFront(e) { | ... | @@ -303,6 +326,8 @@ function upIdCardImgFront(e) { |
| 303 | baseFormData.value.uuid = res.data.uuid | 326 | baseFormData.value.uuid = res.data.uuid |
| 304 | baseFormData.value.perCode = res.data.perCode || '' | 327 | baseFormData.value.perCode = res.data.perCode || '' |
| 305 | baseFormData.value.validityDate = res.data.validityDate?.slice(0, 10) //去掉时分秒 | 328 | baseFormData.value.validityDate = res.data.validityDate?.slice(0, 10) //去掉时分秒 |
| 329 | // 检查有效期,未过期则弹出提示 | ||
| 330 | checkAndShowValidityModal() | ||
| 306 | // baseFormData.value.cityId = res.data.cityId | 331 | // baseFormData.value.cityId = res.data.cityId |
| 307 | // baseFormData.value.address = res.data.address | 332 | // baseFormData.value.address = res.data.address |
| 308 | } else { | 333 | } else { |
| ... | @@ -391,6 +416,7 @@ function getExtractInfo(obj) { | ... | @@ -391,6 +416,7 @@ function getExtractInfo(obj) { |
| 391 | baseFormData.value.phone = res.data.phone | 416 | baseFormData.value.phone = res.data.phone |
| 392 | baseFormData.value.perCode = res.data.perCode || '' | 417 | baseFormData.value.perCode = res.data.perCode || '' |
| 393 | baseFormData.value.validityDate = res.data.validityDate?.slice(0, 10) //去掉时分秒 | 418 | baseFormData.value.validityDate = res.data.validityDate?.slice(0, 10) //去掉时分秒 |
| 419 | checkAndShowValidityModal() | ||
| 394 | // baseFormData.value.cityId = res.data.cityId | 420 | // baseFormData.value.cityId = res.data.cityId |
| 395 | // baseFormData.value.address = res.data.address | 421 | // baseFormData.value.address = res.data.address |
| 396 | if (res.data.photo) { | 422 | if (res.data.photo) { |
| ... | @@ -547,72 +573,59 @@ function goSubmit() { | ... | @@ -547,72 +573,59 @@ function goSubmit() { |
| 547 | content: '请确认信息正确', | 573 | content: '请确认信息正确', |
| 548 | success: function (res) { | 574 | success: function (res) { |
| 549 | if (res.confirm) { | 575 | if (res.confirm) { |
| 550 | if (baseFormData.value.idcType == '4') { | 576 | goPay() |
| 551 | baseFormData.value.idcType = '0' | ||
| 552 | } | ||
| 553 | delete baseFormData.value.card | ||
| 554 | |||
| 555 | const time = new Date().valueOf() + '' | ||
| 556 | baseFormData.value.t = time + Math.floor(Math.random() * 10) | ||
| 557 | baseFormData.value.signT = aes2.AESEncrypt(baseFormData.value.idcType + time) | ||
| 558 | const baseFormDataJson = encodeURIComponent(JSON.stringify(baseFormData.value)) | ||
| 559 | |||
| 560 | api.insertSinglePay({ | ||
| 561 | ...baseFormData.value, | ||
| 562 | payYear: 1, | ||
| 563 | payType: 1, | ||
| 564 | validityDate: undefined | ||
| 565 | }).then(res => { | ||
| 566 | if (res.code == 200) { | ||
| 567 | uni.navigateTo({ | ||
| 568 | url: `/personal/goPay_per?baseFormData=${baseFormDataJson}` | ||
| 569 | }) | ||
| 570 | } | ||
| 571 | }) | ||
| 572 | |||
| 573 | |||
| 574 | // uni.showModal({ | ||
| 575 | // content: '保存成功', | ||
| 576 | // title: '提示', | ||
| 577 | // confirmText:'去支付', | ||
| 578 | // cancelColor:'个人中心', | ||
| 579 | // success: function(res) { | ||
| 580 | |||
| 581 | // }, | ||
| 582 | // fail:function(){ | ||
| 583 | // uni.reLaunch({ | ||
| 584 | // url:`/personal/home` | ||
| 585 | // }) | ||
| 586 | // } | ||
| 587 | // }) | ||
| 588 | // api.addPersonToMyDept(baseFormData.value).then(Response => { | ||
| 589 | // if (Response.data == 0) { | ||
| 590 | // let msg = '该成员,实名认证未通过,注册失败!' | ||
| 591 | // uni.showModal({ | ||
| 592 | // content: msg, | ||
| 593 | // title: '提示', | ||
| 594 | // success: function() {} | ||
| 595 | // }) | ||
| 596 | // return | ||
| 597 | // } | ||
| 598 | // if (Response.data * 1 < 0) { | ||
| 599 | // // 会员调入弹出 | ||
| 600 | // uni.showModal({ | ||
| 601 | // content: '该会员已存在其他道馆,如需添加,请发起会员调动', | ||
| 602 | // title: '提示', | ||
| 603 | // success: function() {} | ||
| 604 | // }) | ||
| 605 | // return | ||
| 606 | // } | ||
| 607 | // // let msg = '保存成功' | ||
| 608 | |||
| 609 | |||
| 610 | // }) | ||
| 611 | } | 577 | } |
| 612 | } | 578 | } |
| 613 | }); | 579 | }); |
| 614 | } | 580 | } |
| 615 | 581 | ||
| 582 | function goPay() { | ||
| 583 | if (baseFormData.value.idcType == '4') { | ||
| 584 | baseFormData.value.idcType = '0' | ||
| 585 | } | ||
| 586 | delete baseFormData.value.card | ||
| 587 | |||
| 588 | const time = new Date().valueOf() + '' | ||
| 589 | baseFormData.value.t = time + Math.floor(Math.random() * 10) | ||
| 590 | baseFormData.value.signT = aes2.AESEncrypt(baseFormData.value.idcType + time) | ||
| 591 | const baseFormDataJson = encodeURIComponent(JSON.stringify(baseFormData.value)) | ||
| 592 | |||
| 593 | // 直接跳转到支付页,由 goPay_per 调用 insertSinglePay 创建订单 | ||
| 594 | uni.navigateTo({ | ||
| 595 | url: `/personal/goPay_per?baseFormData=${baseFormDataJson}` | ||
| 596 | }) | ||
| 597 | } | ||
| 598 | |||
| 599 | function checkAndShowValidityModal() { | ||
| 600 | const validityDateStr = baseFormData.value.validityDate | ||
| 601 | if (validityDateStr && validityDateStr.trim && validityDateStr.trim()) { | ||
| 602 | const now = new Date() | ||
| 603 | const validityDate = new Date(validityDateStr) | ||
| 604 | if (!isNaN(validityDate.getTime()) && validityDate > now) { | ||
| 605 | validityDateText.value = validityDateStr | ||
| 606 | showValidityModal.value = true | ||
| 607 | return true | ||
| 608 | } | ||
| 609 | } | ||
| 610 | return false | ||
| 611 | } | ||
| 612 | |||
| 613 | function closeValidityModal() { | ||
| 614 | showValidityModal.value = false | ||
| 615 | } | ||
| 616 | |||
| 617 | function goHomeFromModal() { | ||
| 618 | closeValidityModal() | ||
| 619 | uni.reLaunch({ | ||
| 620 | url: '/personal/home' | ||
| 621 | }) | ||
| 622 | } | ||
| 623 | |||
| 624 | function goPayFromModal() { | ||
| 625 | closeValidityModal() | ||
| 626 | goPay() | ||
| 627 | } | ||
| 628 | |||
| 616 | function getUserInfo() { | 629 | function getUserInfo() { |
| 617 | api.getInfo(perId.value).then(res => { | 630 | api.getInfo(perId.value).then(res => { |
| 618 | baseFormData.value = res.data | 631 | baseFormData.value = res.data |
| ... | @@ -620,6 +633,12 @@ function getUserInfo() { | ... | @@ -620,6 +633,12 @@ function getUserInfo() { |
| 620 | ',').replaceAll(',', '/') | 633 | ',').replaceAll(',', '/') |
| 621 | }) | 634 | }) |
| 622 | } | 635 | } |
| 636 | |||
| 637 | function goHome() { | ||
| 638 | uni.reLaunch({ | ||
| 639 | url: '/personal/home' | ||
| 640 | }) | ||
| 641 | } | ||
| 623 | </script> | 642 | </script> |
| 624 | 643 | ||
| 625 | <style lang="scss"> | 644 | <style lang="scss"> |
| ... | @@ -772,5 +791,105 @@ function getUserInfo() { | ... | @@ -772,5 +791,105 @@ function getUserInfo() { |
| 772 | :deep(.fixUniFormItemStyle .uni-data-picker__text) { | 791 | :deep(.fixUniFormItemStyle .uni-data-picker__text) { |
| 773 | text-align: left !important; | 792 | text-align: left !important; |
| 774 | } | 793 | } |
| 794 | |||
| 795 | /* 个人中心浮动按钮 */ | ||
| 796 | .float-btn { | ||
| 797 | position: fixed; | ||
| 798 | right: 5rpx; | ||
| 799 | bottom: 240rpx; | ||
| 800 | width: 100rpx; | ||
| 801 | height: 100rpx; | ||
| 802 | border-radius: 50%; | ||
| 803 | background: #C40F18; | ||
| 804 | display: flex; | ||
| 805 | align-items: center; | ||
| 806 | justify-content: center; | ||
| 807 | box-shadow: 0 4rpx 16rpx rgba(196, 15, 24, 0.4); | ||
| 808 | z-index: 99; | ||
| 809 | } | ||
| 810 | |||
| 811 | .float-btn-text { | ||
| 812 | color: #fff; | ||
| 813 | font-size: 24rpx; | ||
| 814 | font-weight: bold; | ||
| 815 | } | ||
| 816 | |||
| 817 | /* 有效期提示弹框 */ | ||
| 818 | .validity-modal { | ||
| 819 | position: fixed; | ||
| 820 | top: 0; | ||
| 821 | left: 0; | ||
| 822 | right: 0; | ||
| 823 | bottom: 0; | ||
| 824 | z-index: 1000; | ||
| 825 | display: flex; | ||
| 826 | align-items: center; | ||
| 827 | justify-content: center; | ||
| 828 | } | ||
| 829 | |||
| 830 | .validity-modal-mask { | ||
| 831 | position: absolute; | ||
| 832 | top: 0; | ||
| 833 | left: 0; | ||
| 834 | right: 0; | ||
| 835 | bottom: 0; | ||
| 836 | background: rgba(0, 0, 0, 0.5); | ||
| 837 | } | ||
| 838 | |||
| 839 | .validity-modal-content { | ||
| 840 | position: relative; | ||
| 841 | width: 560rpx; | ||
| 842 | background: #fff; | ||
| 843 | border-radius: 16rpx; | ||
| 844 | overflow: hidden; | ||
| 845 | z-index: 1001; | ||
| 846 | } | ||
| 847 | |||
| 848 | .validity-modal-title { | ||
| 849 | text-align: center; | ||
| 850 | font-size: 34rpx; | ||
| 851 | font-weight: bold; | ||
| 852 | padding: 30rpx 0 20rpx; | ||
| 853 | color: #333; | ||
| 854 | } | ||
| 855 | |||
| 856 | .validity-modal-body { | ||
| 857 | padding: 20rpx 40rpx 40rpx; | ||
| 858 | font-size: 30rpx; | ||
| 859 | color: #666; | ||
| 860 | line-height: 1.6; | ||
| 861 | text-align: center; | ||
| 862 | } | ||
| 863 | |||
| 864 | .validity-modal-footer { | ||
| 865 | display: flex; | ||
| 866 | justify-content: space-between; | ||
| 867 | padding: 0 40rpx 40rpx; | ||
| 868 | gap: 24rpx; | ||
| 869 | } | ||
| 870 | |||
| 871 | .validity-modal-footer button { | ||
| 872 | flex: 1; | ||
| 873 | height: 80rpx; | ||
| 874 | line-height: 80rpx; | ||
| 875 | font-size: 28rpx; | ||
| 876 | border-radius: 40rpx; | ||
| 877 | border: none; | ||
| 878 | } | ||
| 879 | |||
| 880 | .validity-modal-footer button::after { | ||
| 881 | border: none; | ||
| 882 | } | ||
| 883 | |||
| 884 | .btn-modal-cancel { | ||
| 885 | color: #666; | ||
| 886 | background: #f5f5f5; | ||
| 887 | } | ||
| 888 | |||
| 889 | .btn-modal-confirm { | ||
| 890 | color: #fff; | ||
| 891 | background: #C40F18; | ||
| 892 | font-weight: bold; | ||
| 893 | } | ||
| 775 | </style> | 894 | </style> |
| 776 | 895 | ... | ... |
-
Please register or sign in to post a comment