团体支付考点
Showing
15 changed files
with
576 additions
and
179 deletions
This diff is collapsed.
Click to expand it.
| ... | @@ -50,6 +50,7 @@ export function submitCert(data) { | ... | @@ -50,6 +50,7 @@ export function submitCert(data) { |
| 50 | params: data | 50 | params: data |
| 51 | }) | 51 | }) |
| 52 | } | 52 | } |
| 53 | |||
| 53 | /** | 54 | /** |
| 54 | * 段位考试成绩列表 | 55 | * 段位考试成绩列表 |
| 55 | * @param params | 56 | * @param params |
| ... | @@ -165,6 +166,19 @@ export function ztxAudit(params) { | ... | @@ -165,6 +166,19 @@ export function ztxAudit(params) { |
| 165 | } | 166 | } |
| 166 | 167 | ||
| 167 | /** | 168 | /** |
| 169 | * 考点审核 | ||
| 170 | * @param params | ||
| 171 | * @returns {*} | ||
| 172 | */ | ||
| 173 | export function shenAuditExamPointApply(params) { | ||
| 174 | return request({ | ||
| 175 | url: `/member/examPointApply/shenAudit/${params.ids}`, | ||
| 176 | method: 'post', | ||
| 177 | params | ||
| 178 | }) | ||
| 179 | } | ||
| 180 | |||
| 181 | /** | ||
| 168 | * 获取机构资料 | 182 | * 获取机构资料 |
| 169 | * @param memId | 183 | * @param memId |
| 170 | * @returns {*} | 184 | * @returns {*} | ... | ... |
| ... | @@ -10,6 +10,7 @@ function pcLogin(data) { | ... | @@ -10,6 +10,7 @@ function pcLogin(data) { |
| 10 | params: data | 10 | params: data |
| 11 | }).then((res) => { | 11 | }).then((res) => { |
| 12 | uni.setStorageSync('token', 'Bearer ' + res.data.token) | 12 | uni.setStorageSync('token', 'Bearer ' + res.data.token) |
| 13 | pcLoginOpenId() | ||
| 13 | }).then(getInfo) | 14 | }).then(getInfo) |
| 14 | } | 15 | } |
| 15 | 16 | ||
| ... | @@ -150,6 +151,7 @@ function groupMemberRegister(data) { | ... | @@ -150,6 +151,7 @@ function groupMemberRegister(data) { |
| 150 | params: data | 151 | params: data |
| 151 | }) | 152 | }) |
| 152 | } | 153 | } |
| 154 | |||
| 153 | // 获取道馆信息 | 155 | // 获取道馆信息 |
| 154 | function getMyOwnMemberInfo() { | 156 | function getMyOwnMemberInfo() { |
| 155 | return request({ | 157 | return request({ |
| ... | @@ -163,6 +165,23 @@ function getMyOwnMemberInfo() { | ... | @@ -163,6 +165,23 @@ function getMyOwnMemberInfo() { |
| 163 | }) | 165 | }) |
| 164 | } | 166 | } |
| 165 | 167 | ||
| 168 | function pcLoginOpenId() { | ||
| 169 | uni.login({ | ||
| 170 | provider: 'weixin', | ||
| 171 | success: (res) => { | ||
| 172 | if (res.code) { | ||
| 173 | pcBindOpenId(res.code) | ||
| 174 | } | ||
| 175 | }, | ||
| 176 | fail: (res) => { | ||
| 177 | uni.showToast({ | ||
| 178 | title: '获取用户信息失败', | ||
| 179 | icon: 'none', | ||
| 180 | duration: 2000 | ||
| 181 | }) | ||
| 182 | } | ||
| 183 | }) | ||
| 184 | } | ||
| 166 | 185 | ||
| 167 | function wxLogin() { | 186 | function wxLogin() { |
| 168 | const openId = uni.getStorageSync('openId') | 187 | const openId = uni.getStorageSync('openId') |
| ... | @@ -209,6 +228,15 @@ function pcLoginByOpenId(openId) { | ... | @@ -209,6 +228,15 @@ function pcLoginByOpenId(openId) { |
| 209 | }) | 228 | }) |
| 210 | } | 229 | } |
| 211 | 230 | ||
| 231 | function pcBindOpenId(code) { | ||
| 232 | return request({ | ||
| 233 | url: `/bindOpenId?jsCode=${code}`, | ||
| 234 | method: "POST", | ||
| 235 | }).then((res) => { | ||
| 236 | uni.setStorageSync('openId', res.data.openId); | ||
| 237 | }) | ||
| 238 | } | ||
| 239 | |||
| 212 | export { | 240 | export { |
| 213 | pcLogin, | 241 | pcLogin, |
| 214 | getCodeImg, | 242 | getCodeImg, | ... | ... |
| ... | @@ -66,6 +66,7 @@ async function minShengPay(orderId, encryptedData) { | ... | @@ -66,6 +66,7 @@ async function minShengPay(orderId, encryptedData) { |
| 66 | })) | 66 | })) |
| 67 | 67 | ||
| 68 | if (decryptErr || !decryptResult?.data) { | 68 | if (decryptErr || !decryptResult?.data) { |
| 69 | |||
| 69 | handlePaymentError(new Error(ERROR_MESSAGES.DECRYPT_FAILED), orderId) | 70 | handlePaymentError(new Error(ERROR_MESSAGES.DECRYPT_FAILED), orderId) |
| 70 | } | 71 | } |
| 71 | 72 | ||
| ... | @@ -85,14 +86,14 @@ async function minShengPay(orderId, encryptedData) { | ... | @@ -85,14 +86,14 @@ async function minShengPay(orderId, encryptedData) { |
| 85 | 86 | ||
| 86 | uni.hideLoading() | 87 | uni.hideLoading() |
| 87 | // 8. 调起微信支付 | 88 | // 8. 调起微信支付 |
| 88 | const [payErr, paySuccess] = await to(invokeWechatPayment(payParams, orderId)) | 89 | const [payErr] = await to(invokeWechatPayment(payParams, orderId)) |
| 89 | if (payErr) { | 90 | if (payErr) { |
| 90 | handlePaymentError(payErr, orderId) | 91 | handlePaymentError(payErr, orderId) |
| 91 | 92 | ||
| 92 | } | 93 | } |
| 93 | if (paySuccess) { | 94 | // if (paySuccess) { |
| 94 | return paySuccess | 95 | // return paySuccess |
| 95 | } | 96 | // } |
| 96 | } | 97 | } |
| 97 | 98 | ||
| 98 | /** | 99 | /** |
| ... | @@ -194,7 +195,6 @@ function parsePayInfo(payInfoStr) { | ... | @@ -194,7 +195,6 @@ function parsePayInfo(payInfoStr) { |
| 194 | * @returns {Promise<Object>} 支付结果 | 195 | * @returns {Promise<Object>} 支付结果 |
| 195 | */ | 196 | */ |
| 196 | function invokeWechatPayment(payParams, orderId) { | 197 | function invokeWechatPayment(payParams, orderId) { |
| 197 | debugger | ||
| 198 | return new Promise((resolve, reject) => { | 198 | return new Promise((resolve, reject) => { |
| 199 | // 参数校验 | 199 | // 参数校验 |
| 200 | const requiredFields = ['appId', 'nonceStr', 'prepayId', 'timeStamp', 'signType', 'paySign'] | 200 | const requiredFields = ['appId', 'nonceStr', 'prepayId', 'timeStamp', 'signType', 'paySign'] | ... | ... |
| ... | @@ -30,7 +30,7 @@ function getHeaders() { | ... | @@ -30,7 +30,7 @@ function getHeaders() { |
| 30 | return header | 30 | return header |
| 31 | } | 31 | } |
| 32 | 32 | ||
| 33 | const request = function(req) { | 33 | const request = function (req) { |
| 34 | req.method = req.method.toUpperCase() | 34 | req.method = req.method.toUpperCase() |
| 35 | if (!['GET', 'POST', 'PUT', 'DELETE'].includes(req.method)) { | 35 | if (!['GET', 'POST', 'PUT', 'DELETE'].includes(req.method)) { |
| 36 | uni.showToast({ | 36 | uni.showToast({ | ... | ... |
| 1 | // dev | 1 | // dev |
| 2 | // const baseUrl_api = 'http://192.168.1.137:8787' | 2 | const baseUrl_api = 'http://192.168.1.137:8787' |
| 3 | const baseUrl_api = 'http://tk001.wxjylt.com/stage-api' | 3 | // const baseUrl_api = 'http://tk001.wxjylt.com/stage-api' |
| 4 | const loginImage_api = 'http://tk001.wxjylt.com/stage-api' | ||
| 4 | const payUrl = 'https://wxpay.cmbc.com.cn/mobilePlatform/appserver/lcbpPay.do' | 5 | const payUrl = 'https://wxpay.cmbc.com.cn/mobilePlatform/appserver/lcbpPay.do' |
| 5 | 6 | ||
| 6 | // prod | 7 | // prod |
| ... | @@ -9,5 +10,7 @@ const payUrl = 'https://wxpay.cmbc.com.cn/mobilePlatform/appserver/lcbpPay.do' | ... | @@ -9,5 +10,7 @@ const payUrl = 'https://wxpay.cmbc.com.cn/mobilePlatform/appserver/lcbpPay.do' |
| 9 | 10 | ||
| 10 | export default { | 11 | export default { |
| 11 | baseUrl_api, | 12 | baseUrl_api, |
| 12 | payUrl | 13 | payUrl, |
| 14 | loginImage_api | ||
| 13 | } | 15 | } |
| 16 | ... | ... |
| ... | @@ -2,15 +2,15 @@ | ... | @@ -2,15 +2,15 @@ |
| 2 | <view class="audit-page"> | 2 | <view class="audit-page"> |
| 3 | <!-- 提示信息 --> | 3 | <!-- 提示信息 --> |
| 4 | <view class="tips-box"> | 4 | <view class="tips-box"> |
| 5 | <uni-icons type="info" size="18" color="#13B5B1"></uni-icons> | 5 | <uni-icons color="#13B5B1" size="18" type="info"></uni-icons> |
| 6 | <text class="tips-text" v-if="type === 'batch'">批量审核 {{ ids.split(',').length }} 条记录</text> | 6 | <text v-if="type === 'batch'" class="tips-text">批量审核 {{ ids.split(',').length }} 条记录</text> |
| 7 | <text class="tips-text" v-else>单个审核</text> | 7 | <text v-else class="tips-text">单个审核</text> |
| 8 | </view> | 8 | </view> |
| 9 | 9 | ||
| 10 | <!-- 审核表单 --> | 10 | <!-- 审核表单 --> |
| 11 | <view class="form-section"> | 11 | <view class="form-section"> |
| 12 | <view class="section-header"> | 12 | <view class="section-header"> |
| 13 | <uni-icons type="edit" size="18" color="#AD181F"></uni-icons> | 13 | <uni-icons color="#AD181F" size="18" type="edit"></uni-icons> |
| 14 | <text class="section-title">审核信息</text> | 14 | <text class="section-title">审核信息</text> |
| 15 | </view> | 15 | </view> |
| 16 | 16 | ||
| ... | @@ -19,22 +19,22 @@ | ... | @@ -19,22 +19,22 @@ |
| 19 | <text class="form-label">审批结果</text> | 19 | <text class="form-label">审批结果</text> |
| 20 | <view class="radio-group"> | 20 | <view class="radio-group"> |
| 21 | <view | 21 | <view |
| 22 | class="radio-item" | ||
| 23 | :class="{ selected: form.flag === '1' }" | 22 | :class="{ selected: form.flag === '1' }" |
| 23 | class="radio-item" | ||
| 24 | @click="form.flag = '1'" | 24 | @click="form.flag = '1'" |
| 25 | > | 25 | > |
| 26 | <view class="radio-circle"> | 26 | <view class="radio-circle"> |
| 27 | <uni-icons v-if="form.flag === '1'" type="checkmark" size="10" color="#fff"></uni-icons> | 27 | <uni-icons v-if="form.flag === '1'" color="#fff" size="10" type="checkmark"></uni-icons> |
| 28 | </view> | 28 | </view> |
| 29 | <text>审批通过</text> | 29 | <text>审批通过</text> |
| 30 | </view> | 30 | </view> |
| 31 | <view | 31 | <view |
| 32 | class="radio-item" | ||
| 33 | :class="{ selected: form.flag === '0' }" | 32 | :class="{ selected: form.flag === '0' }" |
| 33 | class="radio-item" | ||
| 34 | @click="form.flag = '0'" | 34 | @click="form.flag = '0'" |
| 35 | > | 35 | > |
| 36 | <view class="radio-circle"> | 36 | <view class="radio-circle"> |
| 37 | <uni-icons v-if="form.flag === '0'" type="checkmark" size="10" color="#fff"></uni-icons> | 37 | <uni-icons v-if="form.flag === '0'" color="#fff" size="10" type="checkmark"></uni-icons> |
| 38 | </view> | 38 | </view> |
| 39 | <text>审批拒绝</text> | 39 | <text>审批拒绝</text> |
| 40 | </view> | 40 | </view> |
| ... | @@ -45,18 +45,37 @@ | ... | @@ -45,18 +45,37 @@ |
| 45 | <text class="form-label">备注</text> | 45 | <text class="form-label">备注</text> |
| 46 | <textarea | 46 | <textarea |
| 47 | v-model="form.reason" | 47 | v-model="form.reason" |
| 48 | :maxlength="500" | ||
| 48 | class="textarea" | 49 | class="textarea" |
| 49 | placeholder="请输入备注信息(拒绝时必填)" | 50 | placeholder="请输入备注信息(拒绝时必填)" |
| 50 | :maxlength="500" | ||
| 51 | /> | 51 | /> |
| 52 | </view> | 52 | </view> |
| 53 | </view> | 53 | </view> |
| 54 | </view> | 54 | </view> |
| 55 | 55 | ||
| 56 | |||
| 57 | <view v-if="userType==2&&selfSelect==0" class="section"> | ||
| 58 | <view class="section examiner-section"> | ||
| 59 | <button class="add-btn" @click="handelAddExamine">+ 添加考官</button> | ||
| 60 | </view> | ||
| 61 | |||
| 62 | <view class="examiner-list"> | ||
| 63 | <view v-for="(item, index) in list" :key="item.id" class="examiner-item"> | ||
| 64 | <view class="info"> | ||
| 65 | <text class="name">{{ item.perName }} {{ item.perCode }}</text> | ||
| 66 | <text class="idc">证件号码:{{ item.perIdcCode }}</text> | ||
| 67 | <text class="reg">注册地:{{ item.memName }}</text> | ||
| 68 | </view> | ||
| 69 | <button class="del-btn" @click="handleDel(item)">删除</button> | ||
| 70 | </view> | ||
| 71 | </view> | ||
| 72 | </view> | ||
| 73 | |||
| 74 | |||
| 56 | <!-- 提交按钮 --> | 75 | <!-- 提交按钮 --> |
| 57 | <view class="submit-wrap"> | 76 | <view class="submit-wrap"> |
| 58 | <button class="btn-cancel" @click="goBack">取消</button> | 77 | <button class="btn-cancel" @click="goBack">取消</button> |
| 59 | <button class="btn-submit" @click="doSubmit" :disabled="submitting"> | 78 | <button :disabled="submitting" class="btn-submit" @click="doSubmit"> |
| 60 | <text v-if="!submitting">确认提交</text> | 79 | <text v-if="!submitting">确认提交</text> |
| 61 | <text v-else>提交中...</text> | 80 | <text v-else>提交中...</text> |
| 62 | </button> | 81 | </button> |
| ... | @@ -66,32 +85,63 @@ | ... | @@ -66,32 +85,63 @@ |
| 66 | 85 | ||
| 67 | <script setup> | 86 | <script setup> |
| 68 | import * as api from '@/common/api_exam.js' | 87 | import * as api from '@/common/api_exam.js' |
| 69 | import { ref } from 'vue' | 88 | import {ref} from 'vue' |
| 70 | import { onLoad } from '@dcloudio/uni-app' | 89 | import {onLoad} from '@dcloudio/uni-app' |
| 90 | import {listApi} from "@/common/api.js"; | ||
| 71 | 91 | ||
| 72 | 92 | ||
| 73 | const type = ref('single') // single 或 batch | 93 | const type = ref('single') // single 或 batch |
| 74 | const ids = ref('') | 94 | const ids = ref('') |
| 75 | const submitting = ref(false) | 95 | const submitting = ref(false) |
| 76 | 96 | const selfSelect = ref('1') | |
| 97 | const userType = ref('') | ||
| 98 | const list = ref([]) | ||
| 99 | const memId = ref('') | ||
| 100 | const app = getApp(); | ||
| 77 | const form = ref({ | 101 | const form = ref({ |
| 78 | flag: '1', | 102 | flag: '1', |
| 79 | reason: '' | 103 | reason: '', |
| 104 | selfSelect: "1" | ||
| 80 | }) | 105 | }) |
| 81 | 106 | ||
| 82 | onLoad((options) => { | 107 | onLoad((options) => { |
| 108 | console.log(options) | ||
| 83 | if (options.type) { | 109 | if (options.type) { |
| 84 | type.value = options.type | 110 | type.value = options.type |
| 85 | } | 111 | } |
| 86 | if (options.ids) { | 112 | if (options.ids) { |
| 87 | ids.value = options.ids | 113 | ids.value = options.ids |
| 88 | } | 114 | } |
| 115 | if (options.selfSelect) { | ||
| 116 | selfSelect.value = options.selfSelect | ||
| 117 | } | ||
| 118 | if (options.memId) { | ||
| 119 | memId.value = options.memId | ||
| 120 | getExaminer() | ||
| 121 | |||
| 122 | } | ||
| 123 | userType.value = app.globalData.userType | ||
| 124 | console.log(userType.value) | ||
| 89 | }) | 125 | }) |
| 90 | 126 | ||
| 91 | function goBack() { | 127 | function goBack() { |
| 92 | uni.navigateBack() | 128 | uni.navigateBack() |
| 93 | } | 129 | } |
| 94 | 130 | ||
| 131 | function handelAddExamine() { | ||
| 132 | const chosenStr = JSON.stringify(list.value) | ||
| 133 | uni.navigateTo({ | ||
| 134 | url: `/myCenter/chooseExaminer?memId=${memId.value}&isValidity=0&chosen=${chosenStr}&selfSelect=0` | ||
| 135 | }) | ||
| 136 | } | ||
| 137 | |||
| 138 | |||
| 139 | async function getExaminer() { | ||
| 140 | const res = await listApi({memId: memId.value}) | ||
| 141 | list.value = res.rows | ||
| 142 | } | ||
| 143 | |||
| 144 | |||
| 95 | function doSubmit() { | 145 | function doSubmit() { |
| 96 | if (form.value.flag === '0' && !form.value.reason) { | 146 | if (form.value.flag === '0' && !form.value.reason) { |
| 97 | uni.showToast({ | 147 | uni.showToast({ |
| ... | @@ -107,9 +157,10 @@ function doSubmit() { | ... | @@ -107,9 +157,10 @@ function doSubmit() { |
| 107 | const params = { | 157 | const params = { |
| 108 | ids: ids.value, | 158 | ids: ids.value, |
| 109 | flag: form.value.flag, | 159 | flag: form.value.flag, |
| 110 | reason: form.value.reason || '' | 160 | reason: form.value.reason || '', |
| 161 | selfSelect: selfSelect.value | ||
| 111 | } | 162 | } |
| 112 | 163 | if (userType.value == '1') { | |
| 113 | api.ztxAudit(params).then(res => { | 164 | api.ztxAudit(params).then(res => { |
| 114 | uni.showToast({ | 165 | uni.showToast({ |
| 115 | title: '操作成功', | 166 | title: '操作成功', |
| ... | @@ -126,6 +177,24 @@ function doSubmit() { | ... | @@ -126,6 +177,24 @@ function doSubmit() { |
| 126 | }) | 177 | }) |
| 127 | submitting.value = false | 178 | submitting.value = false |
| 128 | }) | 179 | }) |
| 180 | } else { | ||
| 181 | api.shenAuditExamPointApply(params).then(res => { | ||
| 182 | uni.showToast({ | ||
| 183 | title: '操作成功', | ||
| 184 | icon: 'success' | ||
| 185 | }) | ||
| 186 | setTimeout(() => { | ||
| 187 | uni.navigateBack() | ||
| 188 | }, 1500) | ||
| 189 | }).catch(err => { | ||
| 190 | console.error('审核失败', err) | ||
| 191 | uni.showToast({ | ||
| 192 | title: '操作失败', | ||
| 193 | icon: 'none' | ||
| 194 | }) | ||
| 195 | submitting.value = false | ||
| 196 | }) | ||
| 197 | } | ||
| 129 | } | 198 | } |
| 130 | </script> | 199 | </script> |
| 131 | 200 | ||
| ... | @@ -269,4 +338,161 @@ function doSubmit() { | ... | @@ -269,4 +338,161 @@ function doSubmit() { |
| 269 | } | 338 | } |
| 270 | } | 339 | } |
| 271 | } | 340 | } |
| 341 | |||
| 342 | .section { | ||
| 343 | padding: 15rpx 20rpx; | ||
| 344 | } | ||
| 345 | |||
| 346 | /* 考官区域 */ | ||
| 347 | .examiner-section { | ||
| 348 | background: #fff; | ||
| 349 | padding: 15rpx; | ||
| 350 | margin-bottom: 20rpx; | ||
| 351 | border: none; | ||
| 352 | border-radius: 0; | ||
| 353 | } | ||
| 354 | |||
| 355 | .add-btn { | ||
| 356 | background: #fff; | ||
| 357 | color: #C4121B; | ||
| 358 | border: 1rpx solid #C4121B; | ||
| 359 | border-radius: 10rpx; | ||
| 360 | padding: 10rpx 0; | ||
| 361 | width: 100%; | ||
| 362 | font-size: 14px; | ||
| 363 | } | ||
| 364 | |||
| 365 | .examiner-list { | ||
| 366 | padding: 0 10rpx; | ||
| 367 | background-color: #fff; | ||
| 368 | margin-bottom: 20rpx; | ||
| 369 | overflow-y: auto; | ||
| 370 | margin-bottom: 70px; | ||
| 371 | } | ||
| 372 | |||
| 373 | examiner-item { | ||
| 374 | display: flex; | ||
| 375 | justify-content: space-between; | ||
| 376 | align-items: flex-start; | ||
| 377 | padding: 20rpx; | ||
| 378 | border-bottom: 1rpx solid #eee; | ||
| 379 | align-items: center; | ||
| 380 | } | ||
| 381 | |||
| 382 | .info { | ||
| 383 | flex: 1; | ||
| 384 | } | ||
| 385 | |||
| 386 | .name { | ||
| 387 | font-size: 14px; | ||
| 388 | font-weight: 500; | ||
| 389 | color: #333; | ||
| 390 | display: block; | ||
| 391 | margin-bottom: 5rpx; | ||
| 392 | } | ||
| 393 | |||
| 394 | .idc, .reg { | ||
| 395 | font-size: 12px; | ||
| 396 | color: #666; | ||
| 397 | display: block; | ||
| 398 | margin: 10rpx 0; | ||
| 399 | } | ||
| 400 | |||
| 401 | .del-btn { | ||
| 402 | color: #C4121B; | ||
| 403 | font-size: 12px; | ||
| 404 | border: 1rpx solid #C4121B; | ||
| 405 | border-radius: 50rpx; | ||
| 406 | padding: 10rpx 25rpx; | ||
| 407 | line-height: 1.2; | ||
| 408 | background: #fff; | ||
| 409 | } | ||
| 410 | |||
| 411 | /* 提交按钮 */ | ||
| 412 | .submit-area { | ||
| 413 | padding: 20rpx 0; | ||
| 414 | background-color: #fff; | ||
| 415 | width: 100%; | ||
| 416 | position: fixed; | ||
| 417 | bottom: 0; | ||
| 418 | } | ||
| 419 | |||
| 420 | .submit-btn { | ||
| 421 | width: 80%; | ||
| 422 | height: 88rpx; | ||
| 423 | border-radius: 44rpx; | ||
| 424 | margin: 0 auto; | ||
| 425 | line-height: 88rpx; | ||
| 426 | background: #C4121B; | ||
| 427 | color: #fff; | ||
| 428 | text-align: center; | ||
| 429 | font-size: 16px; | ||
| 430 | border: none; | ||
| 431 | } | ||
| 432 | |||
| 433 | /* 自定义弹窗样式(核心) */ | ||
| 434 | .custom-modal { | ||
| 435 | width: 600rpx; | ||
| 436 | background: #fff; | ||
| 437 | border-radius: 20rpx; | ||
| 438 | padding: 40rpx 30rpx; | ||
| 439 | box-sizing: border-box; | ||
| 440 | text-align: center; | ||
| 441 | } | ||
| 442 | |||
| 443 | .modal-title { | ||
| 444 | font-size: 36rpx; | ||
| 445 | font-weight: 600; | ||
| 446 | color: #333; | ||
| 447 | margin-bottom: 30rpx; | ||
| 448 | } | ||
| 449 | |||
| 450 | .modal-content { | ||
| 451 | font-size: 30rpx; | ||
| 452 | color: #666; | ||
| 453 | line-height: 1.6; | ||
| 454 | margin-bottom: 30rpx; | ||
| 455 | } | ||
| 456 | |||
| 457 | .modal-tip { | ||
| 458 | font-size: 28rpx; | ||
| 459 | color: #FF7A00; | ||
| 460 | margin-top: 20rpx; | ||
| 461 | } | ||
| 462 | |||
| 463 | .modal-btns { | ||
| 464 | display: flex; | ||
| 465 | justify-content: space-between; | ||
| 466 | gap: 20rpx; | ||
| 467 | } | ||
| 468 | |||
| 469 | .btn-cancel { | ||
| 470 | flex: 1; | ||
| 471 | height: 80rpx; | ||
| 472 | line-height: 80rpx; | ||
| 473 | background: #f5f5f5; | ||
| 474 | color: #999; | ||
| 475 | border-radius: 40rpx; | ||
| 476 | font-size: 32rpx; | ||
| 477 | border: none; | ||
| 478 | } | ||
| 479 | |||
| 480 | .btn-confirm { | ||
| 481 | flex: 1; | ||
| 482 | height: 80rpx; | ||
| 483 | line-height: 80rpx; | ||
| 484 | background: #C4121B; | ||
| 485 | color: #fff; | ||
| 486 | border-radius: 40rpx; | ||
| 487 | font-size: 32rpx; | ||
| 488 | border: none; | ||
| 489 | } | ||
| 490 | |||
| 491 | .single-btn { | ||
| 492 | flex: 1; | ||
| 493 | } | ||
| 494 | |||
| 495 | .btn-cancel::after, .btn-confirm::after { | ||
| 496 | border: none; | ||
| 497 | } | ||
| 272 | </style> | 498 | </style> | ... | ... |
| ... | @@ -3,7 +3,7 @@ | ... | @@ -3,7 +3,7 @@ |
| 3 | <!-- 基本信息 --> | 3 | <!-- 基本信息 --> |
| 4 | <view class="section"> | 4 | <view class="section"> |
| 5 | <view class="section-header"> | 5 | <view class="section-header"> |
| 6 | <uni-icons type="paperclip" size="18" color="#AD181F"></uni-icons> | 6 | <uni-icons color="#AD181F" size="18" type="paperclip"></uni-icons> |
| 7 | <text class="section-title">基本信息</text> | 7 | <text class="section-title">基本信息</text> |
| 8 | </view> | 8 | </view> |
| 9 | <view class="info-card"> | 9 | <view class="info-card"> |
| ... | @@ -17,7 +17,7 @@ | ... | @@ -17,7 +17,7 @@ |
| 17 | </view> | 17 | </view> |
| 18 | <view class="info-row"> | 18 | <view class="info-row"> |
| 19 | <text class="label">审核状态</text> | 19 | <text class="label">审核状态</text> |
| 20 | <text class="value" :class="getStatusClass(form.auditStatus)"> | 20 | <text :class="getStatusClass(form.auditStatus)" class="value"> |
| 21 | {{ getStatusText(form.auditStatus) }} | 21 | {{ getStatusText(form.auditStatus) }} |
| 22 | </text> | 22 | </text> |
| 23 | </view> | 23 | </view> |
| ... | @@ -45,14 +45,14 @@ | ... | @@ -45,14 +45,14 @@ |
| 45 | </view> | 45 | </view> |
| 46 | 46 | ||
| 47 | <!-- 审核记录 --> | 47 | <!-- 审核记录 --> |
| 48 | <view class="section" v-if="auditList.length > 0"> | 48 | <view v-if="auditList.length > 0" class="section"> |
| 49 | <view class="section-header"> | 49 | <view class="section-header"> |
| 50 | <uni-icons type="checkmark-circle" size="18" color="#AD181F"></uni-icons> | 50 | <uni-icons color="#AD181F" size="18" type="checkmark-circle"></uni-icons> |
| 51 | <text class="section-title">审核记录</text> | 51 | <text class="section-title">审核记录</text> |
| 52 | </view> | 52 | </view> |
| 53 | <view class="audit-list"> | 53 | <view class="audit-list"> |
| 54 | <view class="audit-item" v-for="(item, index) in auditList" :key="index"> | 54 | <view v-for="(item, index) in auditList" :key="index" class="audit-item"> |
| 55 | <view class="audit-dot" :class="item.auditResult == 2 ? 'pass' : 'fail'"></view> | 55 | <view :class="item.auditResult == 2 ? 'pass' : 'fail'" class="audit-dot"></view> |
| 56 | <view class="audit-content"> | 56 | <view class="audit-content"> |
| 57 | <view class="audit-row"> | 57 | <view class="audit-row"> |
| 58 | <text class="audit-label">审核协会</text> | 58 | <text class="audit-label">审核协会</text> |
| ... | @@ -64,11 +64,11 @@ | ... | @@ -64,11 +64,11 @@ |
| 64 | </view> | 64 | </view> |
| 65 | <view class="audit-row"> | 65 | <view class="audit-row"> |
| 66 | <text class="audit-label">审核状态</text> | 66 | <text class="audit-label">审核状态</text> |
| 67 | <text class="audit-value" :class="item.auditResult == 2 ? 'text-success' : 'text-danger'"> | 67 | <text :class="item.auditResult == 2 ? 'text-success' : 'text-danger'" class="audit-value"> |
| 68 | {{ item.auditResult == 2 ? '通过' : '拒绝' }} | 68 | {{ item.auditResult == 2 ? '通过' : '拒绝' }} |
| 69 | </text> | 69 | </text> |
| 70 | </view> | 70 | </view> |
| 71 | <view class="audit-row" v-if="item.auditMsg"> | 71 | <view v-if="item.auditMsg" class="audit-row"> |
| 72 | <text class="audit-label">备注</text> | 72 | <text class="audit-label">备注</text> |
| 73 | <text class="audit-value">{{ item.auditMsg }}</text> | 73 | <text class="audit-value">{{ item.auditMsg }}</text> |
| 74 | </view> | 74 | </view> |
| ... | @@ -77,43 +77,43 @@ | ... | @@ -77,43 +77,43 @@ |
| 77 | </view> | 77 | </view> |
| 78 | </view> | 78 | </view> |
| 79 | 79 | ||
| 80 | <!-- 考官信息 --> | 80 | <!-- <!– 考官信息 –>--> |
| 81 | <view class="section" v-if="examinerList.length > 0"> | 81 | <!-- <view class="section" v-if="examinerList.length > 0">--> |
| 82 | <view class="section-header"> | 82 | <!-- <view class="section-header">--> |
| 83 | <uni-icons type="person" size="18" color="#AD181F"></uni-icons> | 83 | <!-- <uni-icons type="person" size="18" color="#AD181F"></uni-icons>--> |
| 84 | <text class="section-title">考官信息</text> | 84 | <!-- <text class="section-title">考官信息</text>--> |
| 85 | </view> | 85 | <!-- </view>--> |
| 86 | <view class="examiner-table" v-if="examinerList.length > 0"> | 86 | <!-- <view class="examiner-table" v-if="examinerList.length > 0">--> |
| 87 | <view class="table-header"> | 87 | <!-- <view class="table-header">--> |
| 88 | <view class="th th-name">姓名</view> | 88 | <!-- <view class="th th-name">姓名</view>--> |
| 89 | <view class="th th-code">会员号</view> | 89 | <!-- <view class="th th-code">会员号</view>--> |
| 90 | <view class="th th-idcard">证件号码</view> | 90 | <!-- <view class="th th-idcard">证件号码</view>--> |
| 91 | </view> | 91 | <!-- </view>--> |
| 92 | <view class="table-body"> | 92 | <!-- <view class="table-body">--> |
| 93 | <view class="table-row" v-for="(item, index) in examinerList" :key="index"> | 93 | <!-- <view class="table-row" v-for="(item, index) in examinerList" :key="index">--> |
| 94 | <view class="td td-name">{{ item.perName }}</view> | 94 | <!-- <view class="td td-name">{{ item.perName }}</view>--> |
| 95 | <view class="td td-code">{{ item.perCode || '-' }}</view> | 95 | <!-- <view class="td td-code">{{ item.perCode || '-' }}</view>--> |
| 96 | <view class="td td-idcard">{{ item.perIdcCode || '-' }}</view> | 96 | <!-- <view class="td td-idcard">{{ item.perIdcCode || '-' }}</view>--> |
| 97 | </view> | 97 | <!-- </view>--> |
| 98 | </view> | 98 | <!-- </view>--> |
| 99 | </view> | 99 | <!-- </view>--> |
| 100 | <view class="no-data" v-else> | 100 | <!-- <view class="no-data" v-else>--> |
| 101 | <text>暂无考官信息</text> | 101 | <!-- <text>暂无考官信息</text>--> |
| 102 | </view> | 102 | <!-- </view>--> |
| 103 | </view> | 103 | <!-- </view>--> |
| 104 | </view> | 104 | </view> |
| 105 | </template> | 105 | </template> |
| 106 | 106 | ||
| 107 | <script setup> | 107 | <script setup> |
| 108 | import * as api from '@/common/api_exam.js' | 108 | import * as api from '@/common/api_exam.js' |
| 109 | import { ref } from 'vue' | 109 | import {ref} from 'vue' |
| 110 | import { onLoad } from '@dcloudio/uni-app' | 110 | import {onLoad} from '@dcloudio/uni-app' |
| 111 | 111 | ||
| 112 | const form = ref({}) | 112 | const form = ref({}) |
| 113 | const auditList = ref([]) | 113 | const auditList = ref([]) |
| 114 | const examinerList = ref([]) | 114 | const examinerList = ref([]) |
| 115 | 115 | ||
| 116 | const auditStatusMap = { 1: '审核中', 2: '审核通过', 3: '审核拒绝' } | 116 | const auditStatusMap = {1: '审核中', 2: '审核通过', 3: '审核拒绝'} |
| 117 | 117 | ||
| 118 | onLoad((options) => { | 118 | onLoad((options) => { |
| 119 | if (options.item) { | 119 | if (options.item) { |
| ... | @@ -133,7 +133,7 @@ onLoad((options) => { | ... | @@ -133,7 +133,7 @@ onLoad((options) => { |
| 133 | }) | 133 | }) |
| 134 | 134 | ||
| 135 | function getExaminerList(memId) { | 135 | function getExaminerList(memId) { |
| 136 | api.listInfo({ memId: memId }).then(res => { | 136 | api.listInfo({memId: memId}).then(res => { |
| 137 | if (res.rows) { | 137 | if (res.rows) { |
| 138 | examinerList.value = res.rows | 138 | examinerList.value = res.rows |
| 139 | } | 139 | } |
| ... | @@ -319,9 +319,17 @@ function formatDateTime(dateStr) { | ... | @@ -319,9 +319,17 @@ function formatDateTime(dateStr) { |
| 319 | } | 319 | } |
| 320 | } | 320 | } |
| 321 | 321 | ||
| 322 | .th-name { width: 25%; } | 322 | .th-name { |
| 323 | .th-code { width: 30%; } | 323 | width: 25%; |
| 324 | .th-idcard { width: 45%; } | 324 | } |
| 325 | |||
| 326 | .th-code { | ||
| 327 | width: 30%; | ||
| 328 | } | ||
| 329 | |||
| 330 | .th-idcard { | ||
| 331 | width: 45%; | ||
| 332 | } | ||
| 325 | 333 | ||
| 326 | .table-body { | 334 | .table-body { |
| 327 | .table-row { | 335 | .table-row { |
| ... | @@ -343,9 +351,17 @@ function formatDateTime(dateStr) { | ... | @@ -343,9 +351,17 @@ function formatDateTime(dateStr) { |
| 343 | } | 351 | } |
| 344 | } | 352 | } |
| 345 | 353 | ||
| 346 | .td-name { width: 25%; } | 354 | .td-name { |
| 347 | .td-code { width: 30%; } | 355 | width: 25%; |
| 348 | .td-idcard { width: 45%; } | 356 | } |
| 357 | |||
| 358 | .td-code { | ||
| 359 | width: 30%; | ||
| 360 | } | ||
| 361 | |||
| 362 | .td-idcard { | ||
| 363 | width: 45%; | ||
| 364 | } | ||
| 349 | } | 365 | } |
| 350 | } | 366 | } |
| 351 | 367 | ... | ... |
| ... | @@ -38,10 +38,10 @@ | ... | @@ -38,10 +38,10 @@ |
| 38 | <!-- 顶部Tab栏(截图风格) --> | 38 | <!-- 顶部Tab栏(截图风格) --> |
| 39 | <view class="tab-bar"> | 39 | <view class="tab-bar"> |
| 40 | <view | 40 | <view |
| 41 | class="tab-item" | ||
| 42 | v-for="(tab, index) in tabList" | 41 | v-for="(tab, index) in tabList" |
| 43 | :key="index" | 42 | :key="index" |
| 44 | :class="{ active: currentTab === index }" | 43 | :class="{ active: currentTab === index }" |
| 44 | class="tab-item" | ||
| 45 | @click="switchTab(index)" | 45 | @click="switchTab(index)" |
| 46 | > | 46 | > |
| 47 | {{ tab.name }} | 47 | {{ tab.name }} |
| ... | @@ -49,26 +49,26 @@ | ... | @@ -49,26 +49,26 @@ |
| 49 | </view> | 49 | </view> |
| 50 | 50 | ||
| 51 | <!-- 批量审核按钮(保留原逻辑,仅优化样式) --> | 51 | <!-- 批量审核按钮(保留原逻辑,仅优化样式) --> |
| 52 | <view class="batch-btn-wrap" v-if="selectedList.length > 0 && currentTab === 0"> | 52 | <view v-if="selectedList.length > 0 && currentTab === 0" class="batch-btn-wrap"> |
| 53 | <button class="btn-batch" :disabled="selectedList.length === 0" @click="goBatchAudit"> | 53 | <button :disabled="selectedList.length === 0" class="btn-batch" @click="goBatchAudit"> |
| 54 | <uni-icons type="checkmark-circle" size="16" color="#fff"></uni-icons> | 54 | <uni-icons color="#fff" size="16" type="checkmark-circle"></uni-icons> |
| 55 | 批量审核 ({{ selectedList.length }}) | 55 | 批量审核 ({{ selectedList.length }}) |
| 56 | </button> | 56 | </button> |
| 57 | </view> | 57 | </view> |
| 58 | 58 | ||
| 59 | <!-- 列表区域(保留原字段+截图样式+所有按钮) --> | 59 | <!-- 列表区域(保留原字段+截图样式+所有按钮) --> |
| 60 | <scroll-view | 60 | <scroll-view |
| 61 | :lower-threshold="100" | ||
| 61 | class="scroll-list" | 62 | class="scroll-list" |
| 62 | scroll-y | 63 | scroll-y |
| 63 | @scrolltolower="loadMore" | 64 | @scrolltolower="loadMore" |
| 64 | :lower-threshold="100" | ||
| 65 | > | 65 | > |
| 66 | <view class="appList"> | 66 | <view class="appList"> |
| 67 | <view | 67 | <view |
| 68 | class="appItem" | ||
| 69 | v-for="(item, index) in infoList" | 68 | v-for="(item, index) in infoList" |
| 70 | :key="index" | 69 | :key="index" |
| 71 | :class="{ 'item-checked': isSelected(item) }" | 70 | :class="{ 'item-checked': isSelected(item) }" |
| 71 | class="appItem" | ||
| 72 | > | 72 | > |
| 73 | <!-- 选择框(保留原逻辑+适配截图样式) --> | 73 | <!-- 选择框(保留原逻辑+适配截图样式) --> |
| 74 | <!-- <view class="checkbox-wrap" v-if="item.auditStatus == 1" @click="toggleSelect(item)"> | 74 | <!-- <view class="checkbox-wrap" v-if="item.auditStatus == 1" @click="toggleSelect(item)"> |
| ... | @@ -78,12 +78,12 @@ | ... | @@ -78,12 +78,12 @@ |
| 78 | </view> --> | 78 | </view> --> |
| 79 | 79 | ||
| 80 | <!-- 主内容区(点击跳详情,保留原所有字段) --> | 80 | <!-- 主内容区(点击跳详情,保留原所有字段) --> |
| 81 | <view @click="goDetail(item)" class="item-content"> | 81 | <view class="item-content" @click="goDetail(item)"> |
| 82 | <!-- 状态标签+提交时间(截图风格顶部) --> | 82 | <!-- 状态标签+提交时间(截图风格顶部) --> |
| 83 | <view class="item-top"> | 83 | <view class="item-top"> |
| 84 | 84 | ||
| 85 | <text class="submit-time">{{ formatDate(item.commitTime) }} 提交</text> | 85 | <text class="submit-time">{{ formatDate(item.commitTime) }} 提交</text> |
| 86 | <text class="status-tag" :class="getStatusClass(item.auditStatus)"> | 86 | <text :class="getStatusClass(item.auditStatus)" class="status-tag"> |
| 87 | {{ getStatusText(item.auditStatus) }} | 87 | {{ getStatusText(item.auditStatus) }} |
| 88 | </text> | 88 | </text> |
| 89 | </view> | 89 | </view> |
| ... | @@ -127,21 +127,22 @@ | ... | @@ -127,21 +127,22 @@ |
| 127 | v-if="item.auditStatus == 1" | 127 | v-if="item.auditStatus == 1" |
| 128 | class="btn-info" | 128 | class="btn-info" |
| 129 | @click.stop="goAudit(item)" | 129 | @click.stop="goAudit(item)" |
| 130 | >审核</button> | 130 | >审核 |
| 131 | </button> | ||
| 131 | <button class="btn-info" @click.stop="goInstitution(item)">机构资料</button> | 132 | <button class="btn-info" @click.stop="goInstitution(item)">机构资料</button> |
| 132 | </view> | 133 | </view> |
| 133 | </view> | 134 | </view> |
| 134 | </view> | 135 | </view> |
| 135 | 136 | ||
| 136 | <!-- 加载更多(保留原逻辑) --> | 137 | <!-- 加载更多(保留原逻辑) --> |
| 137 | <view class="loading-more" v-if="infoList.length > 0"> | 138 | <view v-if="infoList.length > 0" class="loading-more"> |
| 138 | <uni-load-more :status="loadMoreStatus" :contentText="loadMoreText"></uni-load-more> | 139 | <uni-load-more :contentText="loadMoreText" :status="loadMoreStatus"></uni-load-more> |
| 139 | </view> | 140 | </view> |
| 140 | </scroll-view> | 141 | </scroll-view> |
| 141 | 142 | ||
| 142 | <!-- 空数据(保留原逻辑+适配截图样式) --> | 143 | <!-- 空数据(保留原逻辑+适配截图样式) --> |
| 143 | <view class="nodata" v-if="infoList.length == 0 && !loading"> | 144 | <view v-if="infoList.length == 0 && !loading" class="nodata"> |
| 144 | <image mode="aspectFit" :src="config.baseUrl_api + '/fs/static/nodata.png'"></image> | 145 | <image :src="config.baseUrl_api + '/fs/static/nodata.png'" mode="aspectFit"></image> |
| 145 | <text>暂无数据</text> | 146 | <text>暂无数据</text> |
| 146 | </view> | 147 | </view> |
| 147 | </view> | 148 | </view> |
| ... | @@ -151,8 +152,8 @@ | ... | @@ -151,8 +152,8 @@ |
| 151 | // 完全保留你原代码的所有JS逻辑、方法、字段,未做任何修改 | 152 | // 完全保留你原代码的所有JS逻辑、方法、字段,未做任何修改 |
| 152 | import * as api from '@/common/api_exam.js' | 153 | import * as api from '@/common/api_exam.js' |
| 153 | import config from '@/config.js' | 154 | import config from '@/config.js' |
| 154 | import { ref } from 'vue' | 155 | import {ref} from 'vue' |
| 155 | import { onLoad, onShow } from '@dcloudio/uni-app' | 156 | import {onLoad, onShow} from '@dcloudio/uni-app' |
| 156 | 157 | ||
| 157 | const app = getApp() | 158 | const app = getApp() |
| 158 | const loading = ref(false) | 159 | const loading = ref(false) |
| ... | @@ -179,12 +180,14 @@ const selectedList = ref([]) | ... | @@ -179,12 +180,14 @@ const selectedList = ref([]) |
| 179 | 180 | ||
| 180 | // 新增Tab配置(匹配截图,关联原审核状态) | 181 | // 新增Tab配置(匹配截图,关联原审核状态) |
| 181 | const tabList = ref([ | 182 | const tabList = ref([ |
| 182 | { name: '全部', auditStatus: '' }, | 183 | {name: '全部', auditStatus: ''}, |
| 183 | { name: '审核中', auditStatus: '1' }, | 184 | {name: '审核中', auditStatus: '1'}, |
| 184 | { name: '审核通过', auditStatus: '2' }, | 185 | {name: '审核通过', auditStatus: '2'}, |
| 185 | { name: '审核拒绝', auditStatus: '3' } | 186 | {name: '审核拒绝', auditStatus: '3'} |
| 186 | ]) | 187 | ]) |
| 187 | const currentTab = ref(0) | 188 | const currentTab = ref(0) |
| 189 | const userType = ref('') | ||
| 190 | |||
| 188 | 191 | ||
| 189 | onLoad(() => { | 192 | onLoad(() => { |
| 190 | init() | 193 | init() |
| ... | @@ -198,6 +201,9 @@ onShow(() => { | ... | @@ -198,6 +201,9 @@ onShow(() => { |
| 198 | // init() | 201 | // init() |
| 199 | } | 202 | } |
| 200 | } | 203 | } |
| 204 | |||
| 205 | userType.value = app.globalData.userType | ||
| 206 | init() | ||
| 201 | }) | 207 | }) |
| 202 | 208 | ||
| 203 | function init() { | 209 | function init() { |
| ... | @@ -208,12 +214,20 @@ function init() { | ... | @@ -208,12 +214,20 @@ function init() { |
| 208 | function switchTab(index) { | 214 | function switchTab(index) { |
| 209 | if (currentTab.value === index) return | 215 | if (currentTab.value === index) return |
| 210 | currentTab.value = index | 216 | currentTab.value = index |
| 211 | // 同步原审核状态查询参数 | 217 | |
| 212 | queryParams.value.auditStatus = Number(tabList.value[index].auditStatus) | ||
| 213 | // 重置列表和选择状态 | 218 | // 重置列表和选择状态 |
| 214 | queryParams.value.pageNum = 1 | 219 | queryParams.value.pageNum = 1 |
| 215 | loadMoreStatus.value = 'more' | 220 | loadMoreStatus.value = 'more' |
| 216 | selectedList.value = [] | 221 | selectedList.value = [] |
| 222 | |||
| 223 | if (userType.value == 1) { | ||
| 224 | // 同步原审核状态查询参数 | ||
| 225 | queryParams.value.auditStatus = Number(tabList.value[index].auditStatus) | ||
| 226 | } | ||
| 227 | if (userType.value == 2) { | ||
| 228 | // 同步原审核状态查询参数 | ||
| 229 | queryParams.value.shenAuditStatus = tabList.value[index].auditStatus | ||
| 230 | } | ||
| 217 | getList() | 231 | getList() |
| 218 | } | 232 | } |
| 219 | 233 | ||
| ... | @@ -229,9 +243,9 @@ function getList(isLoadMore = false) { | ... | @@ -229,9 +243,9 @@ function getList(isLoadMore = false) { |
| 229 | loadMoreStatus.value = 'loading' | 243 | loadMoreStatus.value = 'loading' |
| 230 | } | 244 | } |
| 231 | 245 | ||
| 232 | uni.showLoading({ title: '加载中' }) | 246 | uni.showLoading({title: '加载中'}) |
| 233 | 247 | ||
| 234 | const params = { ...queryParams.value } | 248 | const params = {...queryParams.value} |
| 235 | if (commitTimeStart.value) { | 249 | if (commitTimeStart.value) { |
| 236 | params.commitTimeStart = commitTimeStart.value + ' 00:00:00' | 250 | params.commitTimeStart = commitTimeStart.value + ' 00:00:00' |
| 237 | } | 251 | } |
| ... | @@ -327,15 +341,17 @@ function goDetail(item) { | ... | @@ -327,15 +341,17 @@ function goDetail(item) { |
| 327 | } | 341 | } |
| 328 | 342 | ||
| 329 | function goAudit(item) { | 343 | function goAudit(item) { |
| 330 | const itemStr = encodeURIComponent(JSON.stringify(item)) | 344 | |
| 345 | // const itemStr = encodeURIComponent(JSON.stringify(item)) | ||
| 331 | uni.navigateTo({ | 346 | uni.navigateTo({ |
| 332 | url: `/level/ztx/examinationAudit?item=${itemStr}&type=single` | 347 | url: `/level/ztx/examinationAudit?ids=${item.id}&type=single&selfSelect=${item.selfSelect}&memId=${item.memId}` |
| 333 | }) | 348 | }) |
| 334 | } | 349 | } |
| 335 | 350 | ||
| 336 | function goBatchAudit() { | 351 | function goBatchAudit() { |
| 337 | if (selectedList.value.length === 0) return | 352 | if (selectedList.value.length === 0) return |
| 338 | const ids = selectedList.value.map(s => s.id).join(',') | 353 | const arr = selectedList.value.filter(s => s.selfSelect == 1) |
| 354 | const ids = arr.map(s => s.id).join(',') | ||
| 339 | uni.navigateTo({ | 355 | uni.navigateTo({ |
| 340 | url: `/level/ztx/examinationAudit?ids=${ids}&type=batch` | 356 | url: `/level/ztx/examinationAudit?ids=${ids}&type=batch` |
| 341 | }) | 357 | }) |
| ... | @@ -348,7 +364,7 @@ function goInstitution(item) { | ... | @@ -348,7 +364,7 @@ function goInstitution(item) { |
| 348 | } | 364 | } |
| 349 | 365 | ||
| 350 | function getStatusText(status) { | 366 | function getStatusText(status) { |
| 351 | const statusMap = { 1: '审核中', 2: '审核通过', 3: '审核拒绝' } | 367 | const statusMap = {1: '审核中', 2: '审核通过', 3: '审核拒绝'} |
| 352 | return statusMap[status] || '-' | 368 | return statusMap[status] || '-' |
| 353 | } | 369 | } |
| 354 | 370 | ||
| ... | @@ -656,14 +672,16 @@ function formatDate(dateStr) { | ... | @@ -656,14 +672,16 @@ function formatDate(dateStr) { |
| 656 | padding: 30rpx; | 672 | padding: 30rpx; |
| 657 | margin: 20rpx; | 673 | margin: 20rpx; |
| 658 | border-radius: 16rpx; | 674 | border-radius: 16rpx; |
| 659 | box-shadow: 0 2rpx 8rpx rgba(0,0,0,0.05); | 675 | box-shadow: 0 2rpx 8rpx rgba(0, 0, 0, 0.05); |
| 660 | } | 676 | } |
| 677 | |||
| 661 | .search-form { | 678 | .search-form { |
| 662 | display: flex; | 679 | display: flex; |
| 663 | flex-wrap: wrap; | 680 | flex-wrap: wrap; |
| 664 | justify-content: space-between; | 681 | justify-content: space-between; |
| 665 | gap: 24rpx; | 682 | gap: 24rpx; |
| 666 | } | 683 | } |
| 684 | |||
| 667 | .form-item { | 685 | .form-item { |
| 668 | width: 48%; | 686 | width: 48%; |
| 669 | display: flex; | 687 | display: flex; |
| ... | @@ -678,6 +696,7 @@ function formatDate(dateStr) { | ... | @@ -678,6 +696,7 @@ function formatDate(dateStr) { |
| 678 | font-size: 26rpx; | 696 | font-size: 26rpx; |
| 679 | color: #666; | 697 | color: #666; |
| 680 | } | 698 | } |
| 699 | |||
| 681 | input { | 700 | input { |
| 682 | width: 100%; | 701 | width: 100%; |
| 683 | height: 70rpx; | 702 | height: 70rpx; |
| ... | @@ -688,6 +707,7 @@ function formatDate(dateStr) { | ... | @@ -688,6 +707,7 @@ function formatDate(dateStr) { |
| 688 | background-color: #fafafa; | 707 | background-color: #fafafa; |
| 689 | box-sizing: border-box; | 708 | box-sizing: border-box; |
| 690 | } | 709 | } |
| 710 | |||
| 691 | .picker-value { | 711 | .picker-value { |
| 692 | width: 100%; | 712 | width: 100%; |
| 693 | height: 70rpx; | 713 | height: 70rpx; |
| ... | @@ -702,6 +722,7 @@ function formatDate(dateStr) { | ... | @@ -702,6 +722,7 @@ function formatDate(dateStr) { |
| 702 | line-height: 70rpx; | 722 | line-height: 70rpx; |
| 703 | box-sizing: border-box; | 723 | box-sizing: border-box; |
| 704 | } | 724 | } |
| 725 | |||
| 705 | .date-range { | 726 | .date-range { |
| 706 | display: flex; | 727 | display: flex; |
| 707 | align-items: center; | 728 | align-items: center; |
| ... | @@ -711,11 +732,13 @@ function formatDate(dateStr) { | ... | @@ -711,11 +732,13 @@ function formatDate(dateStr) { |
| 711 | .picker-value { | 732 | .picker-value { |
| 712 | flex: 1; | 733 | flex: 1; |
| 713 | } | 734 | } |
| 735 | |||
| 714 | .date-separator { | 736 | .date-separator { |
| 715 | color: #999; | 737 | color: #999; |
| 716 | } | 738 | } |
| 717 | } | 739 | } |
| 718 | } | 740 | } |
| 741 | |||
| 719 | .search-btns { | 742 | .search-btns { |
| 720 | display: flex; | 743 | display: flex; |
| 721 | justify-content: center; | 744 | justify-content: center; |
| ... | @@ -730,10 +753,12 @@ function formatDate(dateStr) { | ... | @@ -730,10 +753,12 @@ function formatDate(dateStr) { |
| 730 | border-radius: 35rpx; | 753 | border-radius: 35rpx; |
| 731 | border: none; | 754 | border: none; |
| 732 | } | 755 | } |
| 756 | |||
| 733 | .btn-search { | 757 | .btn-search { |
| 734 | background: linear-gradient(135deg, #13B5B1, #15c5c1); | 758 | background: linear-gradient(135deg, #13B5B1, #15c5c1); |
| 735 | color: #fff; | 759 | color: #fff; |
| 736 | } | 760 | } |
| 761 | |||
| 737 | .btn-reset { | 762 | .btn-reset { |
| 738 | background-color: #f5f5f5; | 763 | background-color: #f5f5f5; |
| 739 | color: #666; | 764 | color: #666; | ... | ... |
| 1 | |||
| 2 | |||
| 3 | <template> | 1 | <template> |
| 4 | <view class="role-entry-page"> | 2 | <view class="role-entry-page"> |
| 5 | <!-- 全屏背景图 --> | 3 | <!-- 全屏背景图 --> |
| 6 | <image class="page-bg" :src="config.baseUrl_api + '/fs/static/bg.png'" mode="aspectFill"></image> | 4 | <image :src="config.loginImage_api + '/fs/static/bg.png'" class="page-bg" mode="aspectFill"></image> |
| 7 | 5 | ||
| 8 | <!-- 顶部 Logo 区域 --> | 6 | <!-- 顶部 Logo 区域 --> |
| 9 | <view class="header-wrapper"> | 7 | <view class="header-wrapper"> |
| 10 | <view class="logo-box"> | 8 | <view class="logo-box"> |
| 11 | <image class="logo" :src="config.baseUrl_api + '/fs/static/wx_logo.png'" mode="aspectFit"></image> | 9 | <image :src="config.loginImage_api + '/fs/static/wx_logo.png'" class="logo" mode="aspectFit"></image> |
| 12 | </view> | 10 | </view> |
| 13 | </view> | 11 | </view> |
| 14 | 12 | ||
| 15 | <!-- 功能按钮区域 --> | 13 | <!-- 功能按钮区域 --> |
| 16 | <view class="btn-container"> | 14 | <view class="btn-container"> |
| 17 | <view @click="goToPage('/personal/addVip_per')"> | 15 | <view @click="goToPage('/personal/addVip_per')"> |
| 18 | <image :src="config.baseUrl_api + '/fs/static/btn01.png'" class="btn-item"></image> | 16 | <image :src="config.loginImage_api + '/fs/static/btn01.png'" class="btn-item"></image> |
| 19 | </view> | 17 | </view> |
| 20 | <view @click="goToPage('/personal/home')"> | 18 | <view @click="goToPage('/personal/home')"> |
| 21 | <image :src="config.baseUrl_api + '/fs/static/btn02.png'" class="btn-item"></image> | 19 | <image :src="config.loginImage_api + '/fs/static/btn02.png'" class="btn-item"></image> |
| 22 | </view> | 20 | </view> |
| 23 | <view @click="goToPage('/login/loginC')"> | 21 | <view @click="goToPage('/login/loginC')"> |
| 24 | <image :src="config.baseUrl_api + '/fs/static/btn03.png'" class="btn-item"></image> | 22 | <image :src="config.loginImage_api + '/fs/static/btn03.png'" class="btn-item"></image> |
| 25 | </view> | 23 | </view> |
| 26 | </view> | 24 | </view> |
| 27 | 25 | ||
| ... | @@ -29,9 +27,10 @@ | ... | @@ -29,9 +27,10 @@ |
| 29 | </view> | 27 | </view> |
| 30 | </template> | 28 | </template> |
| 31 | <script setup> | 29 | <script setup> |
| 32 | import { ref } from 'vue' | 30 | import {ref} from 'vue' |
| 33 | import {onShow} from '@dcloudio/uni-app' | 31 | import {onShow} from '@dcloudio/uni-app' |
| 34 | import config from '@/config.js' | 32 | import config from '@/config.js' |
| 33 | |||
| 35 | onShow(() => { | 34 | onShow(() => { |
| 36 | uni.hideLoading(); | 35 | uni.hideLoading(); |
| 37 | }) | 36 | }) |
| ... | @@ -71,6 +70,7 @@ const goToPage = (url) => { | ... | @@ -71,6 +70,7 @@ const goToPage = (url) => { |
| 71 | display: flex; | 70 | display: flex; |
| 72 | justify-content: space-between; | 71 | justify-content: space-between; |
| 73 | padding: 0 40rpx; | 72 | padding: 0 40rpx; |
| 73 | |||
| 74 | img, image { | 74 | img, image { |
| 75 | width: 90px; | 75 | width: 90px; |
| 76 | } | 76 | } | ... | ... |
This diff could not be displayed because it is too large.
| ... | @@ -23,15 +23,23 @@ | ... | @@ -23,15 +23,23 @@ |
| 23 | style="margin: 0 20rpx 0 0;" @click="payTheFees">激活 | 23 | style="margin: 0 20rpx 0 0;" @click="payTheFees">激活 |
| 24 | </button> | 24 | </button> |
| 25 | <view v-else> | 25 | <view v-else> |
| 26 | <button :disabled="auditStatus==1||auditStatus==2||form.isPoints==0" class="btn-red" size="mini" | 26 | <button v-if="form.deptType==6" |
| 27 | :disabled="auditStatus==1||auditStatus==2||form.isPoints==0" class="btn-red" | ||
| 28 | size="mini" | ||
| 27 | style="margin: 0 20rpx 0 0;" | 29 | style="margin: 0 20rpx 0 0;" |
| 28 | @click="showApplyDialog">考点申请 | 30 | @click="showApplyDialog">考点申请 |
| 29 | </button> | 31 | </button> |
| 32 | <button v-if="form.deptType==6" | ||
| 33 | class="btn-red-kx" | ||
| 34 | size="mini" | ||
| 35 | style="margin: 0 20rpx 0 0;" | ||
| 36 | @click="auditEditFN(2)">考点详情 | ||
| 37 | </button> | ||
| 30 | <button :disabled="btn" class="btn-red" size="mini" style="margin: 0 20rpx 0 0;" | 38 | <button :disabled="btn" class="btn-red" size="mini" style="margin: 0 20rpx 0 0;" |
| 31 | @click="payTheFees">去缴费 | 39 | @click="payTheFees">去缴费 |
| 32 | </button> | 40 | </button> |
| 33 | <button v-if="form.deptType!=1" class="btn-red-kx" size="mini" style="margin: 0 20rpx 0 0;" | 41 | <button v-if="form.deptType!=1" class="btn-red-kx" size="mini" style="margin: 0 20rpx 0 0;" |
| 34 | @click="auditEditFN">审核详情 | 42 | @click="auditEditFN(1)">审核详情 |
| 35 | </button> | 43 | </button> |
| 36 | </view> | 44 | </view> |
| 37 | </view> | 45 | </view> |
| ... | @@ -167,12 +175,15 @@ const applyPopup = ref(null) | ... | @@ -167,12 +175,15 @@ const applyPopup = ref(null) |
| 167 | const popupShow = ref(false) | 175 | const popupShow = ref(false) |
| 168 | // 考点审核状态 0 未提交 1 审核中 2 审核成功 3 审核失败 | 176 | // 考点审核状态 0 未提交 1 审核中 2 审核成功 3 审核失败 |
| 169 | const auditStatus = ref(0) | 177 | const auditStatus = ref(0) |
| 170 | 178 | const openId = uni.getStorageSync('openId') | |
| 171 | onShow(() => { | 179 | onShow(() => { |
| 180 | console.log(openId) | ||
| 172 | init() | 181 | init() |
| 173 | if (form.value.deptType != 1) { // 修复:原代码deptType未定义,改为form.value.deptType | 182 | if (form.value.deptType != 1) { // 修复:原代码deptType未定义,改为form.value.deptType |
| 174 | getMyStatusAPI() | 183 | getMyStatusAPI() |
| 175 | } | 184 | } |
| 185 | |||
| 186 | console.log() | ||
| 176 | }) | 187 | }) |
| 177 | 188 | ||
| 178 | // 页面卸载时恢复滚动(防止异常锁死) | 189 | // 页面卸载时恢复滚动(防止异常锁死) |
| ... | @@ -339,9 +350,9 @@ function goToApplyPage() { | ... | @@ -339,9 +350,9 @@ function goToApplyPage() { |
| 339 | }) | 350 | }) |
| 340 | } | 351 | } |
| 341 | 352 | ||
| 342 | function auditEditFN() { | 353 | function auditEditFN(type) { |
| 343 | uni.navigateTo({ | 354 | uni.navigateTo({ |
| 344 | url: `/myCenter/reviewList` | 355 | url: `/myCenter/reviewList?type=${type}` |
| 345 | }) | 356 | }) |
| 346 | } | 357 | } |
| 347 | 358 | ||
| ... | @@ -599,4 +610,9 @@ function payTheFees() { | ... | @@ -599,4 +610,9 @@ function payTheFees() { |
| 599 | :deep(.uni-popup__mask) { | 610 | :deep(.uni-popup__mask) { |
| 600 | touch-action: none !important; | 611 | touch-action: none !important; |
| 601 | } | 612 | } |
| 613 | |||
| 614 | .btn-red, .btn-red-kx { | ||
| 615 | padding: 0 !important; | ||
| 616 | width: 140rpx; | ||
| 617 | } | ||
| 602 | </style> | 618 | </style> | ... | ... |
| ... | @@ -4,11 +4,11 @@ | ... | @@ -4,11 +4,11 @@ |
| 4 | <view class="search-area"> | 4 | <view class="search-area"> |
| 5 | <view class="search-item"> | 5 | <view class="search-item"> |
| 6 | <text>考官姓名:</text> | 6 | <text>考官姓名:</text> |
| 7 | <input v-model="queryParams.name" placeholder="请输入考官姓名" class="search-input" /> | 7 | <input v-model="queryParams.name" class="search-input" placeholder="请输入考官姓名"/> |
| 8 | </view> | 8 | </view> |
| 9 | <view class="search-item"> | 9 | <view class="search-item"> |
| 10 | <text>考官编号:</text> | 10 | <text>考官编号:</text> |
| 11 | <input v-model="queryParams.certCode" placeholder="请输入考官编号" class="search-input" /> | 11 | <input v-model="queryParams.certCode" class="search-input" placeholder="请输入考官编号"/> |
| 12 | </view> | 12 | </view> |
| 13 | <view class="search-buttons"> | 13 | <view class="search-buttons"> |
| 14 | <button class="search-btn" @click="handleQuery">查询</button> | 14 | <button class="search-btn" @click="handleQuery">查询</button> |
| ... | @@ -16,23 +16,23 @@ | ... | @@ -16,23 +16,23 @@ |
| 16 | </view> | 16 | </view> |
| 17 | </view> | 17 | </view> |
| 18 | 18 | ||
| 19 | <view class="list-item" v-for="(item, index) in infoList" :key="item.perId"> | 19 | <view v-for="(item, index) in infoList" :key="item.perId" class="list-item"> |
| 20 | <view class="info"> | 20 | <view class="info"> |
| 21 | <view class="name">{{ item.name }} {{ item.perCode }}</view> | 21 | <view class="name">{{ item.name }} {{ item.perCode }}</view> |
| 22 | <view class="idc">证件号码:{{ item.idcCode }}</view> | 22 | <view class="idc">证件号码:{{ item.idcCode }}</view> |
| 23 | <view class="reg">注册地:{{ item.memName }}</view> | 23 | <view class="reg">注册地:{{ item.memName }}</view> |
| 24 | </view> | 24 | </view> |
| 25 | <button | 25 | <button |
| 26 | class="choose-btn" | ||
| 27 | :class="{ disabled: checkChosen(item) }" | 26 | :class="{ disabled: checkChosen(item) }" |
| 28 | @click="handleChoose(item)" | ||
| 29 | :disabled="checkChosen(item)" | 27 | :disabled="checkChosen(item)" |
| 28 | class="choose-btn" | ||
| 29 | @click="handleChoose(item)" | ||
| 30 | > | 30 | > |
| 31 | {{ checkChosen(item) ? '已选择' : '选择' }} | 31 | {{ checkChosen(item) ? '已选择' : '选择' }} |
| 32 | </button> | 32 | </button> |
| 33 | </view> | 33 | </view> |
| 34 | 34 | ||
| 35 | <uni-popup ref="expirePopup" type="center" background-color="rgba(0,0,0,0.5)"> | 35 | <uni-popup ref="expirePopup" background-color="rgba(0,0,0,0.5)" type="center"> |
| 36 | <view class="custom-modal"> | 36 | <view class="custom-modal"> |
| 37 | <view class="modal-title">提示</view> | 37 | <view class="modal-title">提示</view> |
| 38 | <view class="modal-content">该考官资质已过期,是否继续添加?</view> | 38 | <view class="modal-content">该考官资质已过期,是否继续添加?</view> |
| ... | @@ -46,8 +46,8 @@ | ... | @@ -46,8 +46,8 @@ |
| 46 | </template> | 46 | </template> |
| 47 | 47 | ||
| 48 | <script setup> | 48 | <script setup> |
| 49 | import { ref, reactive, toRefs } from 'vue' | 49 | import {ref, reactive, toRefs} from 'vue' |
| 50 | import { onLoad } from '@dcloudio/uni-app'; | 50 | import {onLoad} from '@dcloudio/uni-app'; |
| 51 | import * as api from '@/common/api.js' | 51 | import * as api from '@/common/api.js' |
| 52 | import _ from 'lodash' | 52 | import _ from 'lodash' |
| 53 | 53 | ||
| ... | @@ -63,13 +63,10 @@ const memId = ref('') | ... | @@ -63,13 +63,10 @@ const memId = ref('') |
| 63 | const chosen = ref([]) | 63 | const chosen = ref([]) |
| 64 | const expirePopup = ref(null) | 64 | const expirePopup = ref(null) |
| 65 | const currentExpireItem = ref(null) | 65 | const currentExpireItem = ref(null) |
| 66 | 66 | const infoList = ref([]) | |
| 67 | onLoad((option) => { | 67 | const loading = ref(false) |
| 68 | isValidity.value = option.isValidity | 68 | const total = ref(0) |
| 69 | memId.value = option.memId | 69 | const selfSelect = ref('0') |
| 70 | chosen.value = JSON.parse(option.chosen) | ||
| 71 | }) | ||
| 72 | |||
| 73 | const data = reactive({ | 70 | const data = reactive({ |
| 74 | queryParams: { | 71 | queryParams: { |
| 75 | pageNum: 1, | 72 | pageNum: 1, |
| ... | @@ -80,18 +77,23 @@ const data = reactive({ | ... | @@ -80,18 +77,23 @@ const data = reactive({ |
| 80 | shenMemId: '' | 77 | shenMemId: '' |
| 81 | } | 78 | } |
| 82 | }) | 79 | }) |
| 83 | const { queryParams } = toRefs(data) | 80 | const {queryParams} = toRefs(data) |
| 81 | |||
| 82 | onLoad((option) => { | ||
| 83 | console.log(option) | ||
| 84 | isValidity.value = option.isValidity | ||
| 85 | memId.value = option.memId | ||
| 86 | chosen.value = JSON.parse(option.chosen) | ||
| 87 | selfSelect.value = option.selfSelect ?? '1' | ||
| 88 | }) | ||
| 84 | 89 | ||
| 85 | const infoList = ref([]) | ||
| 86 | const loading = ref(false) | ||
| 87 | const total = ref(0) | ||
| 88 | 90 | ||
| 89 | // 获取考官列表 | 91 | // 获取考官列表 |
| 90 | async function getList() { | 92 | async function getList() { |
| 91 | if (!queryParams.value.name) | 93 | if (!queryParams.value.name) |
| 92 | return uni.showToast({ title: '请输入考官姓名', icon: 'none' }) | 94 | return uni.showToast({title: '请输入考官姓名', icon: 'none'}) |
| 93 | if (queryParams.value.type == 1 && !queryParams.value.certCode) | 95 | if (queryParams.value.type == 1 && !queryParams.value.certCode) |
| 94 | return uni.showToast({ title: '请输入考官编号', icon: 'none' }) | 96 | return uni.showToast({title: '请输入考官编号', icon: 'none'}) |
| 95 | 97 | ||
| 96 | loading.value = true | 98 | loading.value = true |
| 97 | const res = await api.getCoachList(queryParams.value) | 99 | const res = await api.getCoachList(queryParams.value) |
| ... | @@ -100,7 +102,7 @@ async function getList() { | ... | @@ -100,7 +102,7 @@ async function getList() { |
| 100 | loading.value = false | 102 | loading.value = false |
| 101 | 103 | ||
| 102 | if (infoList.value.length === 0) { | 104 | if (infoList.value.length === 0) { |
| 103 | uni.showToast({ title: '请核实考官编号、有效期及归属地!', icon: 'none' }) | 105 | uni.showToast({title: '请核实考官编号、有效期及归属地!', icon: 'none'}) |
| 104 | } | 106 | } |
| 105 | } | 107 | } |
| 106 | 108 | ||
| ... | @@ -126,8 +128,9 @@ function resetQuery() { | ... | @@ -126,8 +128,9 @@ function resetQuery() { |
| 126 | } | 128 | } |
| 127 | 129 | ||
| 128 | async function handleChoose(row) { | 130 | async function handleChoose(row) { |
| 131 | debugger | ||
| 129 | if (checkChosen(row)) { | 132 | if (checkChosen(row)) { |
| 130 | return uni.showToast({ title: '已选择该考官', icon: 'none' }) | 133 | return uni.showToast({title: '已选择该考官', icon: 'none'}) |
| 131 | } | 134 | } |
| 132 | 135 | ||
| 133 | // 资质过期逻辑 | 136 | // 资质过期逻辑 |
| ... | @@ -150,11 +153,19 @@ async function confirmAddExpireExaminer() { | ... | @@ -150,11 +153,19 @@ async function confirmAddExpireExaminer() { |
| 150 | if (!currentExpireItem.value) return | 153 | if (!currentExpireItem.value) return |
| 151 | 154 | ||
| 152 | try { | 155 | try { |
| 156 | if (selfSelect.value == 1) { | ||
| 157 | // 自己添加 | ||
| 158 | await api.selfAdd(currentExpireItem.value.perId) | ||
| 159 | } else { | ||
| 160 | // 省级添加 | ||
| 161 | await api.otherAdd(memId.value, currentExpireItem.value.perId) | ||
| 162 | } | ||
| 163 | |||
| 153 | await api.otherAdd(memId.value, currentExpireItem.value.perId) | 164 | await api.otherAdd(memId.value, currentExpireItem.value.perId) |
| 154 | uni.showToast({ title: '添加成功', icon: 'success' }) | 165 | uni.showToast({title: '添加成功', icon: 'success'}) |
| 155 | uni.navigateBack({ delta: 1 }) | 166 | uni.navigateBack({delta: 1}) |
| 156 | } catch (err) { | 167 | } catch (err) { |
| 157 | uni.showToast({ title: '添加失败', icon: 'none' }) | 168 | uni.showToast({title: '添加失败', icon: 'none'}) |
| 158 | } finally { | 169 | } finally { |
| 159 | expirePopup.value.close() | 170 | expirePopup.value.close() |
| 160 | currentExpireItem.value = null | 171 | currentExpireItem.value = null |
| ... | @@ -184,6 +195,7 @@ async function confirmAddExpireExaminer() { | ... | @@ -184,6 +195,7 @@ async function confirmAddExpireExaminer() { |
| 184 | align-items: center; | 195 | align-items: center; |
| 185 | margin-bottom: 20rpx; | 196 | margin-bottom: 20rpx; |
| 186 | } | 197 | } |
| 198 | |||
| 187 | .search-input { | 199 | .search-input { |
| 188 | flex: 1; | 200 | flex: 1; |
| 189 | border: 1rpx solid #ddd; | 201 | border: 1rpx solid #ddd; |
| ... | @@ -198,6 +210,7 @@ async function confirmAddExpireExaminer() { | ... | @@ -198,6 +210,7 @@ async function confirmAddExpireExaminer() { |
| 198 | margin-top: 30rpx; | 210 | margin-top: 30rpx; |
| 199 | margin-left: 80px; | 211 | margin-left: 80px; |
| 200 | } | 212 | } |
| 213 | |||
| 201 | .search-btn, .reset-btn { | 214 | .search-btn, .reset-btn { |
| 202 | width: 220rpx; | 215 | width: 220rpx; |
| 203 | height: 70rpx; | 216 | height: 70rpx; |
| ... | @@ -206,10 +219,12 @@ async function confirmAddExpireExaminer() { | ... | @@ -206,10 +219,12 @@ async function confirmAddExpireExaminer() { |
| 206 | text-align: center; | 219 | text-align: center; |
| 207 | font-size: 28rpx; | 220 | font-size: 28rpx; |
| 208 | } | 221 | } |
| 222 | |||
| 209 | .search-btn { | 223 | .search-btn { |
| 210 | background: #C4121B; | 224 | background: #C4121B; |
| 211 | color: #fff; | 225 | color: #fff; |
| 212 | } | 226 | } |
| 227 | |||
| 213 | .reset-btn { | 228 | .reset-btn { |
| 214 | background: #f7f7f7; | 229 | background: #f7f7f7; |
| 215 | color: #333; | 230 | color: #333; |
| ... | @@ -230,19 +245,23 @@ async function confirmAddExpireExaminer() { | ... | @@ -230,19 +245,23 @@ async function confirmAddExpireExaminer() { |
| 230 | border-bottom: 1rpx solid #eee; | 245 | border-bottom: 1rpx solid #eee; |
| 231 | background-color: #fff; | 246 | background-color: #fff; |
| 232 | } | 247 | } |
| 248 | |||
| 233 | .info { | 249 | .info { |
| 234 | flex: 1; | 250 | flex: 1; |
| 235 | } | 251 | } |
| 252 | |||
| 236 | .name { | 253 | .name { |
| 237 | font-size: 30rpx; | 254 | font-size: 30rpx; |
| 238 | font-weight: bold; | 255 | font-weight: bold; |
| 239 | color: #333; | 256 | color: #333; |
| 240 | } | 257 | } |
| 258 | |||
| 241 | .idc, .reg { | 259 | .idc, .reg { |
| 242 | font-size: 26rpx; | 260 | font-size: 26rpx; |
| 243 | color: #666; | 261 | color: #666; |
| 244 | margin: 20rpx 0; | 262 | margin: 20rpx 0; |
| 245 | } | 263 | } |
| 264 | |||
| 246 | .choose-btn { | 265 | .choose-btn { |
| 247 | color: #C4121B; | 266 | color: #C4121B; |
| 248 | font-size: 26rpx; | 267 | font-size: 26rpx; |
| ... | @@ -252,6 +271,7 @@ async function confirmAddExpireExaminer() { | ... | @@ -252,6 +271,7 @@ async function confirmAddExpireExaminer() { |
| 252 | background-color: #fff; | 271 | background-color: #fff; |
| 253 | margin: 10rpx auto; | 272 | margin: 10rpx auto; |
| 254 | } | 273 | } |
| 274 | |||
| 255 | .choose-btn.disabled { | 275 | .choose-btn.disabled { |
| 256 | color: #ccc; | 276 | color: #ccc; |
| 257 | border-color: #ccc; | 277 | border-color: #ccc; |
| ... | @@ -266,23 +286,27 @@ async function confirmAddExpireExaminer() { | ... | @@ -266,23 +286,27 @@ async function confirmAddExpireExaminer() { |
| 266 | box-sizing: border-box; | 286 | box-sizing: border-box; |
| 267 | text-align: center; | 287 | text-align: center; |
| 268 | } | 288 | } |
| 289 | |||
| 269 | .modal-title { | 290 | .modal-title { |
| 270 | font-size: 36rpx; | 291 | font-size: 36rpx; |
| 271 | font-weight: 600; | 292 | font-weight: 600; |
| 272 | color: #333; | 293 | color: #333; |
| 273 | margin-bottom: 30rpx; | 294 | margin-bottom: 30rpx; |
| 274 | } | 295 | } |
| 296 | |||
| 275 | .modal-content { | 297 | .modal-content { |
| 276 | font-size: 30rpx; | 298 | font-size: 30rpx; |
| 277 | color: #666; | 299 | color: #666; |
| 278 | line-height: 1.6; | 300 | line-height: 1.6; |
| 279 | margin-bottom: 30rpx; | 301 | margin-bottom: 30rpx; |
| 280 | } | 302 | } |
| 303 | |||
| 281 | .modal-btns { | 304 | .modal-btns { |
| 282 | display: flex; | 305 | display: flex; |
| 283 | justify-content: space-between; | 306 | justify-content: space-between; |
| 284 | gap: 20rpx; | 307 | gap: 20rpx; |
| 285 | } | 308 | } |
| 309 | |||
| 286 | .btn-cancel { | 310 | .btn-cancel { |
| 287 | flex: 1; | 311 | flex: 1; |
| 288 | height: 80rpx; | 312 | height: 80rpx; |
| ... | @@ -293,6 +317,7 @@ async function confirmAddExpireExaminer() { | ... | @@ -293,6 +317,7 @@ async function confirmAddExpireExaminer() { |
| 293 | font-size: 32rpx; | 317 | font-size: 32rpx; |
| 294 | border: none; | 318 | border: none; |
| 295 | } | 319 | } |
| 320 | |||
| 296 | .btn-confirm { | 321 | .btn-confirm { |
| 297 | flex: 1; | 322 | flex: 1; |
| 298 | height: 80rpx; | 323 | height: 80rpx; |
| ... | @@ -303,6 +328,7 @@ async function confirmAddExpireExaminer() { | ... | @@ -303,6 +328,7 @@ async function confirmAddExpireExaminer() { |
| 303 | font-size: 32rpx; | 328 | font-size: 32rpx; |
| 304 | border: none; | 329 | border: none; |
| 305 | } | 330 | } |
| 331 | |||
| 306 | /* 去除button默认边框 */ | 332 | /* 去除button默认边框 */ |
| 307 | .btn-cancel::after, .btn-confirm::after { | 333 | .btn-cancel::after, .btn-confirm::after { |
| 308 | border: none; | 334 | border: none; | ... | ... |
| ... | @@ -2,25 +2,32 @@ | ... | @@ -2,25 +2,32 @@ |
| 2 | <view class="container"> | 2 | <view class="container"> |
| 3 | <!-- 考官选择类型 --> | 3 | <!-- 考官选择类型 --> |
| 4 | <view class="radio-section"> | 4 | <view class="radio-section"> |
| 5 | <radio-group @change="onSelfSelectChange" class="radio-group"> | 5 | <radio-group class="radio-group" @change="onSelfSelectChange"> |
| 6 | <label class="radio-item"> | 6 | <label class="radio-item"> |
| 7 | <radio value="1" :checked="form.selfSelect == '1'" class="custom-radio" /> | 7 | <radio :checked="form.selfSelect == '1'" class="custom-radio" value="1"/> |
| 8 | <text class="radio-text">自行录入考官(级位考官)</text> | 8 | <text class="radio-text">自行录入考官(级位考官)</text> |
| 9 | </label> | 9 | </label> |
| 10 | <label class="radio-item"> | 10 | <label v-if="shenForm.memberEpAudit==1" class="radio-item"> |
| 11 | <radio value="0" :checked="form.selfSelect == '0'" class="custom-radio" /> | 11 | <radio :checked="form.selfSelect == '0'" class="custom-radio" value="0"/> |
| 12 | <text class="radio-text">省跆协指派考官</text> | 12 | <text class="radio-text">省跆协指派考官</text> |
| 13 | </label> | 13 | </label> |
| 14 | </radio-group> | 14 | </radio-group> |
| 15 | </view> | 15 | </view> |
| 16 | <view class="section"> | 16 | <view class="section"> |
| 17 | <!-- 自行录入考官区域 --> | 17 | <!-- 自行录入考官区域 --> |
| 18 | <view class="section examiner-section" v-if="showExamine"> | 18 | <view v-if="form.selfSelect==0" class="section examiner-section"> |
| 19 | <view class="modal-title">温馨提示</view> | ||
| 20 | <view class="modal-content"> 关于考官指派,请联系{{ shenForm.baseName }},联系电话:{{ shenForm.phone }} | ||
| 21 | </view> | ||
| 22 | </view> | ||
| 23 | |||
| 24 | <!-- 温馨提示 --> | ||
| 25 | <view v-if="showExamine" class="section examiner-section"> | ||
| 19 | <button class="add-btn" @click="handelAddExamine">+ 添加考官</button> | 26 | <button class="add-btn" @click="handelAddExamine">+ 添加考官</button> |
| 20 | </view> | 27 | </view> |
| 21 | 28 | ||
| 22 | <view class="examiner-list" v-if="showExamine"> | 29 | <view v-if="showExamine" class="examiner-list"> |
| 23 | <view class="examiner-item" v-for="(item, index) in list" :key="item.id"> | 30 | <view v-for="(item, index) in list" :key="item.id" class="examiner-item"> |
| 24 | <view class="info"> | 31 | <view class="info"> |
| 25 | <text class="name">{{ item.perName }} {{ item.perCode }}</text> | 32 | <text class="name">{{ item.perName }} {{ item.perCode }}</text> |
| 26 | <text class="idc">证件号码:{{ item.perIdcCode }}</text> | 33 | <text class="idc">证件号码:{{ item.perIdcCode }}</text> |
| ... | @@ -36,7 +43,7 @@ | ... | @@ -36,7 +43,7 @@ |
| 36 | </view> | 43 | </view> |
| 37 | 44 | ||
| 38 | <!-- 自定义考点申请弹窗(替换原uni.showModal) --> | 45 | <!-- 自定义考点申请弹窗(替换原uni.showModal) --> |
| 39 | <uni-popup ref="applyPopup" type="center" background-color="rgba(0,0,0,0.5)"> | 46 | <uni-popup ref="applyPopup" background-color="rgba(0,0,0,0.5)" type="center"> |
| 40 | <view class="custom-modal"> | 47 | <view class="custom-modal"> |
| 41 | <view class="modal-title">考点申请</view> | 48 | <view class="modal-title">考点申请</view> |
| 42 | <view class="modal-btns"> | 49 | <view class="modal-btns"> |
| ... | @@ -48,7 +55,7 @@ | ... | @@ -48,7 +55,7 @@ |
| 48 | </uni-popup> | 55 | </uni-popup> |
| 49 | 56 | ||
| 50 | <!-- 自定义删除确认弹窗 --> | 57 | <!-- 自定义删除确认弹窗 --> |
| 51 | <uni-popup ref="delPopup" type="center" background-color="rgba(0,0,0,0.5)"> | 58 | <uni-popup ref="delPopup" background-color="rgba(0,0,0,0.5)" type="center"> |
| 52 | <view class="custom-modal"> | 59 | <view class="custom-modal"> |
| 53 | <view class="modal-title">提示</view> | 60 | <view class="modal-title">提示</view> |
| 54 | <view class="modal-content">确定删除该考官吗?</view> | 61 | <view class="modal-content">确定删除该考官吗?</view> |
| ... | @@ -60,10 +67,11 @@ | ... | @@ -60,10 +67,11 @@ |
| 60 | </uni-popup> | 67 | </uni-popup> |
| 61 | 68 | ||
| 62 | <!-- 自定义省跆协指派提示弹窗 --> | 69 | <!-- 自定义省跆协指派提示弹窗 --> |
| 63 | <uni-popup ref="assignPopup" type="center" background-color="rgba(0,0,0,0.5)"> | 70 | <uni-popup ref="assignPopup" background-color="rgba(0,0,0,0.5)" type="center"> |
| 64 | <view class="custom-modal"> | 71 | <view class="custom-modal"> |
| 65 | <view class="modal-title">温馨提示</view> | 72 | <view class="modal-title">温馨提示</view> |
| 66 | <view class="modal-content">关于考官指派,请联系河北省跆协,联系电话:XXXX</view> | 73 | <view class="modal-content"> 关于考官指派,请联系{{ shenForm.baseName }},联系电话:{{ shenForm.phone }} |
| 74 | </view> | ||
| 67 | <view class="modal-btns"> | 75 | <view class="modal-btns"> |
| 68 | <button class="btn-confirm single-btn" @click="closeAssignPopup()">我知道了</button> | 76 | <button class="btn-confirm single-btn" @click="closeAssignPopup()">我知道了</button> |
| 69 | </view> | 77 | </view> |
| ... | @@ -71,7 +79,7 @@ | ... | @@ -71,7 +79,7 @@ |
| 71 | </uni-popup> | 79 | </uni-popup> |
| 72 | 80 | ||
| 73 | <!-- 自定义提交成功弹窗 --> | 81 | <!-- 自定义提交成功弹窗 --> |
| 74 | <uni-popup ref="successPopup" type="center" background-color="rgba(0,0,0,0.5)"> | 82 | <uni-popup ref="successPopup" background-color="rgba(0,0,0,0.5)" type="center"> |
| 75 | <view class="custom-modal"> | 83 | <view class="custom-modal"> |
| 76 | <view class="modal-title">成功</view> | 84 | <view class="modal-title">成功</view> |
| 77 | <view class="modal-content">提交成功,请等待审核</view> | 85 | <view class="modal-content">提交成功,请等待审核</view> |
| ... | @@ -84,9 +92,10 @@ | ... | @@ -84,9 +92,10 @@ |
| 84 | </template> | 92 | </template> |
| 85 | 93 | ||
| 86 | <script setup> | 94 | <script setup> |
| 87 | import { ref, } from 'vue' | 95 | import {ref,} from 'vue' |
| 88 | import { onLoad,onShow } from '@dcloudio/uni-app' | 96 | import {onLoad, onShow} from '@dcloudio/uni-app' |
| 89 | import * as api from '@/common/api.js' | 97 | import * as api from '@/common/api.js' |
| 98 | import {getShenMemberInfo} from "@/common/api.js"; | ||
| 90 | 99 | ||
| 91 | const form = ref({ | 100 | const form = ref({ |
| 92 | selfSelect: '1' // 1:自行录入 0:省跆协指派 | 101 | selfSelect: '1' // 1:自行录入 0:省跆协指派 |
| ... | @@ -95,6 +104,7 @@ const showExamine = ref(true) | ... | @@ -95,6 +104,7 @@ const showExamine = ref(true) |
| 95 | const loading = ref(false) | 104 | const loading = ref(false) |
| 96 | const list = ref([]) | 105 | const list = ref([]) |
| 97 | const memId = ref(null) | 106 | const memId = ref(null) |
| 107 | const shenForm = ref({}) | ||
| 98 | 108 | ||
| 99 | // 弹窗引用 | 109 | // 弹窗引用 |
| 100 | const applyPopup = ref(null) | 110 | const applyPopup = ref(null) |
| ... | @@ -112,27 +122,35 @@ onShow(() => { | ... | @@ -112,27 +122,35 @@ onShow(() => { |
| 112 | if (memId.value) { | 122 | if (memId.value) { |
| 113 | getExaminer() | 123 | getExaminer() |
| 114 | } | 124 | } |
| 125 | getShenMemberInfoFn() | ||
| 115 | }) | 126 | }) |
| 116 | 127 | ||
| 117 | async function getExaminer() { | 128 | async function getExaminer() { |
| 118 | loading.value = true | 129 | loading.value = true |
| 119 | const res = await api.listApi({ memId: memId.value }) | 130 | const res = await api.listApi({memId: memId.value}) |
| 120 | list.value = res.rows | 131 | list.value = res.rows |
| 121 | loading.value = false | 132 | loading.value = false |
| 122 | } | 133 | } |
| 123 | 134 | ||
| 135 | async function getShenMemberInfoFn() { | ||
| 136 | const res = await api.getShenMemberInfo() | ||
| 137 | shenForm.value = res.data ?? {} | ||
| 138 | } | ||
| 139 | |||
| 124 | // 删除考官:打开自定义弹窗 | 140 | // 删除考官:打开自定义弹窗 |
| 125 | function handleDel(row) { | 141 | function handleDel(row) { |
| 126 | currentDelItem.value = row | 142 | currentDelItem.value = row |
| 127 | delPopup.value.open() | 143 | delPopup.value.open() |
| 128 | } | 144 | } |
| 145 | |||
| 129 | // 确认删除 | 146 | // 确认删除 |
| 130 | async function confirmDel() { | 147 | async function confirmDel() { |
| 131 | await api.examinerDel(currentDelItem.value.id) | 148 | await api.examinerDel(currentDelItem.value.id) |
| 132 | uni.showToast({ title: '删除成功', icon: 'success' }) | 149 | uni.showToast({title: '删除成功', icon: 'success'}) |
| 133 | getExaminer() | 150 | await getExaminer() |
| 134 | closeDelPopup() | 151 | closeDelPopup() |
| 135 | } | 152 | } |
| 153 | |||
| 136 | function closeDelPopup() { | 154 | function closeDelPopup() { |
| 137 | delPopup.value.close() | 155 | delPopup.value.close() |
| 138 | } | 156 | } |
| ... | @@ -141,10 +159,11 @@ function closeDelPopup() { | ... | @@ -141,10 +159,11 @@ function closeDelPopup() { |
| 141 | function onSelfSelectChange(e) { | 159 | function onSelfSelectChange(e) { |
| 142 | form.value.selfSelect = e.detail.value | 160 | form.value.selfSelect = e.detail.value |
| 143 | showExamine.value = e.detail.value == '1' | 161 | showExamine.value = e.detail.value == '1' |
| 144 | if (e.detail.value == '2') { | 162 | if (e.detail.value == '0') { |
| 145 | assignPopup.value.open() | 163 | assignPopup.value.open() |
| 146 | } | 164 | } |
| 147 | } | 165 | } |
| 166 | |||
| 148 | function closeAssignPopup() { | 167 | function closeAssignPopup() { |
| 149 | assignPopup.value.close() | 168 | assignPopup.value.close() |
| 150 | } | 169 | } |
| ... | @@ -159,19 +178,20 @@ function handelAddExamine() { | ... | @@ -159,19 +178,20 @@ function handelAddExamine() { |
| 159 | // 提交申请:打开自定义成功弹窗 | 178 | // 提交申请:打开自定义成功弹窗 |
| 160 | async function handelSubmit() { | 179 | async function handelSubmit() { |
| 161 | if (!form.value.selfSelect) { | 180 | if (!form.value.selfSelect) { |
| 162 | return uni.showToast({ title: '请选择考官类型', icon: 'none' }) | 181 | return uni.showToast({title: '请选择考官类型', icon: 'none'}) |
| 163 | } | 182 | } |
| 164 | if (form.value.selfSelect == '1' && list.value.length == 0) { | 183 | if (form.value.selfSelect == '1' && list.value.length == 0) { |
| 165 | return uni.showToast({ title: '请添加考官', icon: 'none' }) | 184 | return uni.showToast({title: '请添加考官', icon: 'none'}) |
| 166 | } | 185 | } |
| 167 | 186 | ||
| 168 | try { | 187 | try { |
| 169 | await api.commitExamPointApply(form.value) | 188 | await api.commitExamPointApply(form.value) |
| 170 | successPopup.value.open() | 189 | successPopup.value.open() |
| 171 | } catch (err) { | 190 | } catch (err) { |
| 172 | uni.showToast({ title: err.data.msg, icon: 'none' }) | 191 | uni.showToast({title: err.data.msg, icon: 'none'}) |
| 173 | } | 192 | } |
| 174 | } | 193 | } |
| 194 | |||
| 175 | function confirmSuccess() { | 195 | function confirmSuccess() { |
| 176 | successPopup.value.close() | 196 | successPopup.value.close() |
| 177 | uni.navigateBack() | 197 | uni.navigateBack() |
| ... | @@ -181,9 +201,11 @@ function confirmSuccess() { | ... | @@ -181,9 +201,11 @@ function confirmSuccess() { |
| 181 | function openApplyPopup() { | 201 | function openApplyPopup() { |
| 182 | applyPopup.value.open() | 202 | applyPopup.value.open() |
| 183 | } | 203 | } |
| 204 | |||
| 184 | function closeApplyPopup() { | 205 | function closeApplyPopup() { |
| 185 | applyPopup.value.close() | 206 | applyPopup.value.close() |
| 186 | } | 207 | } |
| 208 | |||
| 187 | function confirmApply() { | 209 | function confirmApply() { |
| 188 | applyPopup.value.close() | 210 | applyPopup.value.close() |
| 189 | // 此处添加考点申请逻辑 | 211 | // 此处添加考点申请逻辑 |
| ... | @@ -195,9 +217,11 @@ function confirmApply() { | ... | @@ -195,9 +217,11 @@ function confirmApply() { |
| 195 | .container { | 217 | .container { |
| 196 | min-height: 100vh; | 218 | min-height: 100vh; |
| 197 | } | 219 | } |
| 198 | .section{ | 220 | |
| 199 | padding:15rpx 20rpx; | 221 | .section { |
| 222 | padding: 15rpx 20rpx; | ||
| 200 | } | 223 | } |
| 224 | |||
| 201 | /* 单选框区域 */ | 225 | /* 单选框区域 */ |
| 202 | .radio-section { | 226 | .radio-section { |
| 203 | background: #fff; | 227 | background: #fff; |
| ... | @@ -332,28 +356,33 @@ function confirmApply() { | ... | @@ -332,28 +356,33 @@ function confirmApply() { |
| 332 | box-sizing: border-box; | 356 | box-sizing: border-box; |
| 333 | text-align: center; | 357 | text-align: center; |
| 334 | } | 358 | } |
| 359 | |||
| 335 | .modal-title { | 360 | .modal-title { |
| 336 | font-size: 36rpx; | 361 | font-size: 36rpx; |
| 337 | font-weight: 600; | 362 | font-weight: 600; |
| 338 | color: #333; | 363 | color: #333; |
| 339 | margin-bottom: 30rpx; | 364 | margin-bottom: 30rpx; |
| 340 | } | 365 | } |
| 366 | |||
| 341 | .modal-content { | 367 | .modal-content { |
| 342 | font-size: 30rpx; | 368 | font-size: 30rpx; |
| 343 | color: #666; | 369 | color: #666; |
| 344 | line-height: 1.6; | 370 | line-height: 1.6; |
| 345 | margin-bottom: 30rpx; | 371 | margin-bottom: 30rpx; |
| 346 | } | 372 | } |
| 373 | |||
| 347 | .modal-tip { | 374 | .modal-tip { |
| 348 | font-size: 28rpx; | 375 | font-size: 28rpx; |
| 349 | color: #FF7A00; | 376 | color: #FF7A00; |
| 350 | margin-top: 20rpx; | 377 | margin-top: 20rpx; |
| 351 | } | 378 | } |
| 379 | |||
| 352 | .modal-btns { | 380 | .modal-btns { |
| 353 | display: flex; | 381 | display: flex; |
| 354 | justify-content: space-between; | 382 | justify-content: space-between; |
| 355 | gap: 20rpx; | 383 | gap: 20rpx; |
| 356 | } | 384 | } |
| 385 | |||
| 357 | .btn-cancel { | 386 | .btn-cancel { |
| 358 | flex: 1; | 387 | flex: 1; |
| 359 | height: 80rpx; | 388 | height: 80rpx; |
| ... | @@ -364,6 +393,7 @@ function confirmApply() { | ... | @@ -364,6 +393,7 @@ function confirmApply() { |
| 364 | font-size: 32rpx; | 393 | font-size: 32rpx; |
| 365 | border: none; | 394 | border: none; |
| 366 | } | 395 | } |
| 396 | |||
| 367 | .btn-confirm { | 397 | .btn-confirm { |
| 368 | flex: 1; | 398 | flex: 1; |
| 369 | height: 80rpx; | 399 | height: 80rpx; |
| ... | @@ -374,9 +404,11 @@ function confirmApply() { | ... | @@ -374,9 +404,11 @@ function confirmApply() { |
| 374 | font-size: 32rpx; | 404 | font-size: 32rpx; |
| 375 | border: none; | 405 | border: none; |
| 376 | } | 406 | } |
| 407 | |||
| 377 | .single-btn { | 408 | .single-btn { |
| 378 | flex: 1; | 409 | flex: 1; |
| 379 | } | 410 | } |
| 411 | |||
| 380 | .btn-cancel::after, .btn-confirm::after { | 412 | .btn-cancel::after, .btn-confirm::after { |
| 381 | border: none; | 413 | border: none; |
| 382 | } | 414 | } | ... | ... |
| ... | @@ -5,17 +5,17 @@ | ... | @@ -5,17 +5,17 @@ |
| 5 | 审核信息 | 5 | 审核信息 |
| 6 | </view> | 6 | </view> |
| 7 | <view> | 7 | <view> |
| 8 | <view class="stepItem" v-for="(n,index) in recordList" :key="index"> | 8 | <view v-for="(n,index) in recordList" :key="index" class="stepItem"> |
| 9 | <view class="time">{{n.auditTime||'待审批'}}</view> | 9 | <view class="time">{{ n.auditTime || '待审批' }}</view> |
| 10 | <view class="content"> | 10 | <view class="content"> |
| 11 | <view class="status"> | 11 | <view class="status"> |
| 12 | <text v-if="n.auditResult==1" class="text-success">审核通过</text> | 12 | <text v-if="n.auditResult==1" class="text-success">审核通过</text> |
| 13 | <text v-if="n.auditResult==0" class="text-danger"> 审核拒绝</text> | 13 | <text v-if="n.auditResult==0" class="text-danger"> 审核拒绝</text> |
| 14 | </view> | 14 | </view> |
| 15 | <!-- <view class="name">第 {{index+1}} 步</view> --> | 15 | <!-- <view class="name">第 {{index+1}} 步</view> --> |
| 16 | <view class="deptName">{{n.auditDeptName}}</view> | 16 | <view class="deptName">{{ n.auditDeptName }}</view> |
| 17 | <view v-if="n.auditResult==0"> | 17 | <view v-if="n.auditResult==0"> |
| 18 | 备注:{{n.auditMsg||'/' }} | 18 | 备注:{{ n.auditMsg || '/' }} |
| 19 | </view> | 19 | </view> |
| 20 | </view> | 20 | </view> |
| 21 | </view> | 21 | </view> |
| ... | @@ -26,35 +26,46 @@ | ... | @@ -26,35 +26,46 @@ |
| 26 | </template> | 26 | </template> |
| 27 | 27 | ||
| 28 | <script setup> | 28 | <script setup> |
| 29 | import * as api from '@/common/api.js' | 29 | import * as api from '@/common/api.js' |
| 30 | import config from '@/config.js' | 30 | import config from '@/config.js' |
| 31 | import _ from 'underscore' | 31 | import _ from 'underscore' |
| 32 | import to from 'await-to-js' | 32 | import to from 'await-to-js' |
| 33 | import { | 33 | import { |
| 34 | onMounted, | 34 | onMounted, |
| 35 | ref | 35 | ref |
| 36 | } from 'vue' | 36 | } from 'vue' |
| 37 | import { | 37 | import { |
| 38 | onLoad, | 38 | onLoad, |
| 39 | onShow | 39 | onShow |
| 40 | } from '@dcloudio/uni-app' | 40 | } from '@dcloudio/uni-app' |
| 41 | const app = getApp(); | ||
| 42 | const userType = ref('') | ||
| 43 | const recordList = ref([]) | ||
| 44 | onLoad(async (option) => { | ||
| 45 | await getMyRecentFN() | ||
| 46 | }) | ||
| 47 | 41 | ||
| 48 | async function getMyRecentFN() { | 42 | const app = getApp(); |
| 43 | const userType = ref('') | ||
| 44 | const recordList = ref([]) | ||
| 45 | |||
| 46 | onLoad(async (option) => { | ||
| 47 | console.log(option) | ||
| 48 | if (option.type == 1) await getMyRecentFN() | ||
| 49 | if (option.type == 2) await getMyRecentExamFn() | ||
| 50 | }) | ||
| 51 | |||
| 52 | async function getMyRecentFN() { | ||
| 49 | const [err, res] = await to(api.getMyRecent()) | 53 | const [err, res] = await to(api.getMyRecent()) |
| 50 | if (!err && res.data && res.data.auditLogs) { | 54 | if (!err && res.data && res.data.auditLogs) { |
| 51 | recordList.value = JSON.parse(res.data.auditLogs) | 55 | recordList.value = JSON.parse(res.data.auditLogs) |
| 52 | } | 56 | } |
| 57 | } | ||
| 58 | |||
| 59 | async function getMyRecentExamFn() { | ||
| 60 | const [err, res] = await to(api.getMyRecentExam()) | ||
| 61 | if (!err && res.data && res.data.auditLogs) { | ||
| 62 | recordList.value = JSON.parse(res.data.auditLogs) | ||
| 53 | } | 63 | } |
| 64 | } | ||
| 54 | </script> | 65 | </script> |
| 55 | 66 | ||
| 56 | <style scoped lang="scss"> | 67 | <style lang="scss" scoped> |
| 57 | .wBox { | 68 | .wBox { |
| 58 | width: 700rpx; | 69 | width: 700rpx; |
| 59 | padding: 30rpx; | 70 | padding: 30rpx; |
| 60 | margin: 20rpx auto; | 71 | margin: 20rpx auto; |
| ... | @@ -79,5 +90,5 @@ | ... | @@ -79,5 +90,5 @@ |
| 79 | text-align: justify; | 90 | text-align: justify; |
| 80 | } | 91 | } |
| 81 | } | 92 | } |
| 82 | } | 93 | } |
| 83 | </style> | 94 | </style> | ... | ... |
-
Please register or sign in to post a comment