团体支付考点
Showing
15 changed files
with
838 additions
and
466 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 {*} | ... | ... |
| 1 | import { | 1 | import { |
| 2 | useUserStore | 2 | useUserStore |
| 3 | } from '../store/modules/user' | 3 | } from '../store/modules/user' |
| 4 | import request from './request' | 4 | import request from './request' |
| 5 | 5 | ||
| 6 | function pcLogin(data) { | 6 | function pcLogin(data) { |
| 7 | return request({ | 7 | return request({ |
| 8 | url: '/login', | 8 | url: '/login', |
| 9 | method: 'post', | 9 | method: 'post', |
| 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 | }).then(getInfo) | 13 | pcLoginOpenId() |
| 14 | }).then(getInfo) | ||
| 14 | } | 15 | } |
| 15 | 16 | ||
| 16 | function h5Login(userName) { | 17 | function h5Login(userName) { |
| 17 | return request({ | 18 | return request({ |
| 18 | url: `/h5Login`, | 19 | url: `/h5Login`, |
| 19 | method: 'post', | 20 | method: 'post', |
| 20 | params: { | 21 | params: { |
| 21 | username: userName | 22 | username: userName |
| 22 | } | 23 | } |
| 23 | }).then((res) => { | 24 | }).then((res) => { |
| 24 | uni.setStorageSync('token', 'Bearer ' + res.data.token) | 25 | uni.setStorageSync('token', 'Bearer ' + res.data.token) |
| 25 | }).then(getInfo) | 26 | }).then(getInfo) |
| 26 | } | 27 | } |
| 27 | 28 | ||
| 28 | function h5LoginAuto() { | 29 | function h5LoginAuto() { |
| 29 | const userName = uni.getStorageSync('userName') | 30 | const userName = uni.getStorageSync('userName') |
| 30 | if (userName) { | 31 | if (userName) { |
| 31 | return h5Login(userName) | 32 | return h5Login(userName) |
| 32 | } else { | 33 | } else { |
| 33 | uni.redirectTo({ | 34 | uni.redirectTo({ |
| 34 | url: '/login/login' | 35 | url: '/login/login' |
| 35 | }) | 36 | }) |
| 36 | } | 37 | } |
| 37 | } | 38 | } |
| 38 | 39 | ||
| 39 | function logout() { | 40 | function logout() { |
| 40 | return request({ | 41 | return request({ |
| 41 | url: '/logout', | 42 | url: '/logout', |
| 42 | method: 'post' | 43 | method: 'post' |
| 43 | }).then(() => { | 44 | }).then(() => { |
| 44 | const userStore = useUserStore() | 45 | const userStore = useUserStore() |
| 45 | const app = getApp() | 46 | const app = getApp() |
| 46 | 47 | ||
| 47 | uni.removeStorageSync('token') | 48 | uni.removeStorageSync('token') |
| 48 | uni.removeStorageSync('userName') | 49 | uni.removeStorageSync('userName') |
| 49 | uni.removeStorageSync('webUserName') | 50 | uni.removeStorageSync('webUserName') |
| 50 | uni.removeStorageSync('openId') | 51 | uni.removeStorageSync('openId') |
| 51 | 52 | ||
| 52 | userStore.setUser(null) | 53 | userStore.setUser(null) |
| 53 | app.globalData.isLogin = false | 54 | app.globalData.isLogin = false |
| 54 | }) | 55 | }) |
| 55 | } | 56 | } |
| 56 | 57 | ||
| 57 | function getCodeImg() { | 58 | function getCodeImg() { |
| 58 | return request({ | 59 | return request({ |
| 59 | url: '/captchaImage', | 60 | url: '/captchaImage', |
| 60 | method: 'get' | 61 | method: 'get' |
| 61 | }) | 62 | }) |
| 62 | } | 63 | } |
| 63 | 64 | ||
| 64 | // 代退图形认证的获取手机验证码 | 65 | // 代退图形认证的获取手机验证码 |
| 65 | function getSmsCode(data) { | 66 | function getSmsCode(data) { |
| 66 | return request({ | 67 | return request({ |
| 67 | // url: '/captchaSmsWithCaptchaImage', | 68 | // url: '/captchaSmsWithCaptchaImage', |
| 68 | url: '/captchaSmsWithCaptchaImageForMiniApp', | 69 | url: '/captchaSmsWithCaptchaImageForMiniApp', |
| 69 | method: 'post', | 70 | method: 'post', |
| 70 | params: data | 71 | params: data |
| 71 | }) | 72 | }) |
| 72 | } | 73 | } |
| 73 | 74 | ||
| 74 | function loginByPhone(phonenumber, code) { | 75 | function loginByPhone(phonenumber, code) { |
| 75 | const data = { | 76 | const data = { |
| 76 | phonenumber, | 77 | phonenumber, |
| 77 | code | 78 | code |
| 78 | } | 79 | } |
| 79 | return request({ | 80 | return request({ |
| 80 | url: '/userLoginByPhone', | 81 | url: '/userLoginByPhone', |
| 81 | method: 'post', | 82 | method: 'post', |
| 82 | params: data | 83 | params: data |
| 83 | }).then((res) => { | 84 | }).then((res) => { |
| 84 | uni.showToast({ | 85 | uni.showToast({ |
| 85 | title: res.msg, | 86 | title: res.msg, |
| 86 | icon: 'none' | 87 | icon: 'none' |
| 87 | }) | 88 | }) |
| 88 | uni.setStorageSync('token', 'Bearer ' + res.data.token) | 89 | uni.setStorageSync('token', 'Bearer ' + res.data.token) |
| 89 | }).then(getInfo) | 90 | }).then(getInfo) |
| 90 | } | 91 | } |
| 91 | 92 | ||
| 92 | // 获取用户详细信息 | 93 | // 获取用户详细信息 |
| 93 | function getInfo() { | 94 | function getInfo() { |
| 94 | return request({ | 95 | return request({ |
| 95 | url: '/getInfo', | 96 | url: '/getInfo', |
| 96 | method: 'get' | 97 | method: 'get' |
| 97 | }).then(res => { | 98 | }).then(res => { |
| 98 | const userStore = useUserStore() | 99 | const userStore = useUserStore() |
| 99 | const app = getApp() | 100 | const app = getApp() |
| 100 | const user = res.data.user | 101 | const user = res.data.user |
| 101 | 102 | ||
| 102 | uni.setStorageSync('userName', user.userName) | 103 | uni.setStorageSync('userName', user.userName) |
| 103 | uni.removeStorageSync('webUserName') | 104 | uni.removeStorageSync('webUserName') |
| 104 | userStore.setUser(user) | 105 | userStore.setUser(user) |
| 105 | 106 | ||
| 106 | app.globalData.deptType = user.dept.deptType | 107 | app.globalData.deptType = user.dept.deptType |
| 107 | app.globalData.genFlag = user.dept.genFlag | 108 | app.globalData.genFlag = user.dept.genFlag |
| 108 | app.globalData.changePassFlag = user.changePassFlag | 109 | app.globalData.changePassFlag = user.changePassFlag |
| 109 | switch (user.dept.deptType) { | 110 | switch (user.dept.deptType) { |
| 110 | case '1': // 中跆协 | 111 | case '1': // 中跆协 |
| 111 | app.globalData.userType = '1' | 112 | app.globalData.userType = '1' |
| 112 | break | 113 | break |
| 113 | case '2': // 省 | 114 | case '2': // 省 |
| 114 | case '3': | 115 | case '3': |
| 115 | app.globalData.userType = '2' | 116 | app.globalData.userType = '2' |
| 116 | break | 117 | break |
| 117 | case '6': // 道馆 | 118 | case '6': // 道馆 |
| 118 | app.globalData.userType = '4' | 119 | app.globalData.userType = '4' |
| 119 | break | 120 | break |
| 120 | default: // 市、区 | 121 | default: // 市、区 |
| 121 | app.globalData.userType = '3' | 122 | app.globalData.userType = '3' |
| 122 | break | 123 | break |
| 123 | } | 124 | } |
| 124 | }) | 125 | }) |
| 125 | } | 126 | } |
| 126 | 127 | ||
| 127 | function getWebInfo() { | 128 | function getWebInfo() { |
| 128 | return request({ | 129 | return request({ |
| 129 | url: '/person/info/getInfo', | 130 | url: '/person/info/getInfo', |
| 130 | method: 'get' | 131 | method: 'get' |
| 131 | }).then(res => { | 132 | }).then(res => { |
| 132 | const userStore = useUserStore() | 133 | const userStore = useUserStore() |
| 133 | const user = res.data.user | 134 | const user = res.data.user |
| 134 | 135 | ||
| 135 | delete res.data.user | 136 | delete res.data.user |
| 136 | const perInfo = res.data | 137 | const perInfo = res.data |
| 137 | 138 | ||
| 138 | uni.setStorageSync('webUserName', user.userName) | 139 | uni.setStorageSync('webUserName', user.userName) |
| 139 | uni.removeStorageSync('userName') | 140 | uni.removeStorageSync('userName') |
| 140 | userStore.setUser(user) | 141 | userStore.setUser(user) |
| 141 | userStore.setPerInfo(perInfo) | 142 | userStore.setPerInfo(perInfo) |
| 142 | }) | 143 | }) |
| 143 | } | 144 | } |
| 144 | 145 | ||
| 145 | // 团队会员用户注册接口 | 146 | // 团队会员用户注册接口 |
| 146 | function groupMemberRegister(data) { | 147 | function groupMemberRegister(data) { |
| 147 | return request({ | 148 | return request({ |
| 148 | url: '/groupMemberRegister', | 149 | url: '/groupMemberRegister', |
| 149 | method: 'post', | 150 | method: 'post', |
| 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({ |
| 156 | url: '/member/info/getMyOwnMemberInfo', | 158 | url: '/member/info/getMyOwnMemberInfo', |
| 157 | method: 'get' | 159 | method: 'get' |
| 158 | }).then(res => { | 160 | }).then(res => { |
| 159 | const app = getApp() | 161 | const app = getApp() |
| 160 | app.globalData.authenticationStatus = res.data.authenticationStatus | 162 | app.globalData.authenticationStatus = res.data.authenticationStatus |
| 161 | app.globalData.memberInfo = res.data.memberInfo | 163 | app.globalData.memberInfo = res.data.memberInfo |
| 162 | app.globalData.isExam = res.data?.memberInfo?.isPoints | 164 | app.globalData.isExam = res.data?.memberInfo?.isPoints |
| 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') |
| 169 | if (openId) { | 188 | if (openId) { |
| 170 | return pcLoginByOpenId(openId) | 189 | return pcLoginByOpenId(openId) |
| 171 | } else { | 190 | } else { |
| 172 | return new Promise((resolve, reject) => { | 191 | return new Promise((resolve, reject) => { |
| 173 | uni.login({ | 192 | uni.login({ |
| 174 | provider: 'weixin', | 193 | provider: 'weixin', |
| 175 | success: (res) => { | 194 | success: (res) => { |
| 176 | resolve(res) | 195 | resolve(res) |
| 177 | }, | 196 | }, |
| 178 | fail: (res) => { | 197 | fail: (res) => { |
| 179 | uni.showToast({ | 198 | uni.showToast({ |
| 180 | title: '获取用户信息失败', | 199 | title: '获取用户信息失败', |
| 181 | icon: 'none', | 200 | icon: 'none', |
| 182 | duration: 2000 | 201 | duration: 2000 |
| 183 | }) | 202 | }) |
| 184 | reject(res) | 203 | reject(res) |
| 185 | } | 204 | } |
| 186 | }) | 205 | }) |
| 187 | }).then(res => { | 206 | }).then(res => { |
| 188 | return pcLoginByCode(res.code) | 207 | return pcLoginByCode(res.code) |
| 189 | }) | 208 | }) |
| 190 | } | 209 | } |
| 191 | } | 210 | } |
| 192 | 211 | ||
| 193 | function pcLoginByCode(code) { | 212 | function pcLoginByCode(code) { |
| 194 | return request({ | 213 | return request({ |
| 195 | url: `/loginByJsCode?jsCode=${code}`, | 214 | url: `/loginByJsCode?jsCode=${code}`, |
| 196 | method: "POST" | 215 | method: "POST" |
| 197 | }).then((res) => { | 216 | }).then((res) => { |
| 198 | uni.setStorageSync('token', 'Bearer ' + res.data.token); | 217 | uni.setStorageSync('token', 'Bearer ' + res.data.token); |
| 199 | uni.setStorageSync('openId', res.data.openId); | 218 | uni.setStorageSync('openId', res.data.openId); |
| 200 | }) | 219 | }) |
| 201 | } | 220 | } |
| 202 | 221 | ||
| 203 | function pcLoginByOpenId(openId) { | 222 | function pcLoginByOpenId(openId) { |
| 204 | return request({ | 223 | return request({ |
| 205 | url: `/loginByOpenId?openId=${openId}`, | 224 | url: `/loginByOpenId?openId=${openId}`, |
| 206 | method: "POST" | 225 | method: "POST" |
| 207 | }).then((res) => { | 226 | }).then((res) => { |
| 208 | uni.setStorageSync('token', 'Bearer ' + res.data.token); | 227 | uni.setStorageSync('token', 'Bearer ' + res.data.token); |
| 209 | }) | 228 | }) |
| 229 | } | ||
| 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 | }) | ||
| 210 | } | 238 | } |
| 211 | 239 | ||
| 212 | export { | 240 | export { |
| 213 | pcLogin, | ||
| 214 | getCodeImg, | ||
| 215 | getSmsCode, | ||
| 216 | h5Login, | ||
| 217 | h5LoginAuto, | ||
| 218 | loginByPhone, | ||
| 219 | groupMemberRegister, | ||
| 220 | getMyOwnMemberInfo, | ||
| 221 | logout, | ||
| 222 | getInfo, | ||
| 223 | getWebInfo, | ||
| 224 | wxLogin | ||
| 225 | } | ||
| ... | \ No newline at end of file | ... | \ No newline at end of file |
| 241 | pcLogin, | ||
| 242 | getCodeImg, | ||
| 243 | getSmsCode, | ||
| 244 | h5Login, | ||
| 245 | h5LoginAuto, | ||
| 246 | loginByPhone, | ||
| 247 | groupMemberRegister, | ||
| 248 | getMyOwnMemberInfo, | ||
| 249 | logout, | ||
| 250 | getInfo, | ||
| 251 | getWebInfo, | ||
| 252 | wxLogin | ||
| 253 | } | ... | ... |
| ... | @@ -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({ |
| ... | @@ -39,7 +39,7 @@ const request = function(req) { | ... | @@ -39,7 +39,7 @@ const request = function(req) { |
| 39 | }) | 39 | }) |
| 40 | return | 40 | return |
| 41 | } | 41 | } |
| 42 | 42 | ||
| 43 | // if (req.method === 'GET') { | 43 | // if (req.method === 'GET') { |
| 44 | // if (!req.params) { | 44 | // if (!req.params) { |
| 45 | // req.params = {} | 45 | // req.params = {} |
| ... | @@ -47,13 +47,13 @@ const request = function(req) { | ... | @@ -47,13 +47,13 @@ const request = function(req) { |
| 47 | // req.params.pageNum = req.params.pageNum || 1 | 47 | // req.params.pageNum = req.params.pageNum || 1 |
| 48 | // req.params.pageSize = req.params.pageSize || 50 | 48 | // req.params.pageSize = req.params.pageSize || 50 |
| 49 | // } | 49 | // } |
| 50 | 50 | ||
| 51 | // if (req.method == 'POST' && !req.hideLoding) { | 51 | // if (req.method == 'POST' && !req.hideLoding) { |
| 52 | // uni.showLoading({ | 52 | // uni.showLoading({ |
| 53 | // title: '提交中...' | 53 | // title: '提交中...' |
| 54 | // }) | 54 | // }) |
| 55 | // } | 55 | // } |
| 56 | 56 | ||
| 57 | return new Promise((resolve, reject) => { | 57 | return new Promise((resolve, reject) => { |
| 58 | uni.request({ | 58 | uni.request({ |
| 59 | url: config.baseUrl_api + req.url, | 59 | url: config.baseUrl_api + req.url, |
| ... | @@ -74,7 +74,7 @@ const request = function(req) { | ... | @@ -74,7 +74,7 @@ const request = function(req) { |
| 74 | // uni.showModal({ | 74 | // uni.showModal({ |
| 75 | // content: data.msg, | 75 | // content: data.msg, |
| 76 | // success: function(res) { | 76 | // success: function(res) { |
| 77 | 77 | ||
| 78 | // } | 78 | // } |
| 79 | // }) | 79 | // }) |
| 80 | uni.showToast({ | 80 | uni.showToast({ |
| ... | @@ -84,9 +84,9 @@ const request = function(req) { | ... | @@ -84,9 +84,9 @@ const request = function(req) { |
| 84 | }) | 84 | }) |
| 85 | // } | 85 | // } |
| 86 | // uni.hideLoading() | 86 | // uni.hideLoading() |
| 87 | 87 | ||
| 88 | // } | 88 | // } |
| 89 | 89 | ||
| 90 | // 登录超时 | 90 | // 登录超时 |
| 91 | // if (data.code === 60002 || data.code === 60001) { | 91 | // if (data.code === 60002 || data.code === 60001) { |
| 92 | // uni.redirectTo({ | 92 | // uni.redirectTo({ |
| ... | @@ -108,7 +108,7 @@ const request = function(req) { | ... | @@ -108,7 +108,7 @@ const request = function(req) { |
| 108 | // }) | 108 | // }) |
| 109 | // }) | 109 | // }) |
| 110 | // } | 110 | // } |
| 111 | 111 | ||
| 112 | reject(res) | 112 | reject(res) |
| 113 | } | 113 | } |
| 114 | break | 114 | break |
| ... | @@ -119,7 +119,7 @@ const request = function(req) { | ... | @@ -119,7 +119,7 @@ const request = function(req) { |
| 119 | reject(res) | 119 | reject(res) |
| 120 | }).finally(() => { | 120 | }).finally(() => { |
| 121 | // if (req.method == 'POST' && !req.hideLoading) { | 121 | // if (req.method == 'POST' && !req.hideLoading) { |
| 122 | uni.hideLoading() | 122 | uni.hideLoading() |
| 123 | // } | 123 | // } |
| 124 | }) | 124 | }) |
| 125 | }) | 125 | }) | ... | ... |
| 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 |
| ... | @@ -8,6 +9,8 @@ const payUrl = 'https://wxpay.cmbc.com.cn/mobilePlatform/appserver/lcbpPay.do' | ... | @@ -8,6 +9,8 @@ const payUrl = 'https://wxpay.cmbc.com.cn/mobilePlatform/appserver/lcbpPay.do' |
| 8 | // const payUrl = 'https://epay.cmbc.com.cn/appweb/appserver/lcbpPay.do' | 9 | // const payUrl = 'https://epay.cmbc.com.cn/appweb/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,61 +2,80 @@ | ... | @@ -2,61 +2,80 @@ |
| 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 | ||
| 17 | <view class="form-card"> | 17 | <view class="form-card"> |
| 18 | <view class="form-item"> | 18 | <view class="form-item"> |
| 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> |
| 41 | </view> | 41 | </view> |
| 42 | </view> | 42 | </view> |
| 43 | 43 | ||
| 44 | <view class="form-item"> | 44 | <view class="form-item"> |
| 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({ |
| ... | @@ -100,32 +150,51 @@ function doSubmit() { | ... | @@ -100,32 +150,51 @@ function doSubmit() { |
| 100 | }) | 150 | }) |
| 101 | return | 151 | return |
| 102 | } | 152 | } |
| 103 | 153 | ||
| 104 | if (submitting.value) return | 154 | if (submitting.value) return |
| 105 | submitting.value = true | 155 | submitting.value = true |
| 106 | 156 | ||
| 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: '操作成功', |
| 116 | icon: 'success' | 167 | icon: 'success' |
| 168 | }) | ||
| 169 | setTimeout(() => { | ||
| 170 | uni.navigateBack() | ||
| 171 | }, 1500) | ||
| 172 | }).catch(err => { | ||
| 173 | console.error('审核失败', err) | ||
| 174 | uni.showToast({ | ||
| 175 | title: '操作失败', | ||
| 176 | icon: 'none' | ||
| 177 | }) | ||
| 178 | submitting.value = false | ||
| 117 | }) | 179 | }) |
| 118 | setTimeout(() => { | 180 | } else { |
| 119 | uni.navigateBack() | 181 | api.shenAuditExamPointApply(params).then(res => { |
| 120 | }, 1500) | 182 | uni.showToast({ |
| 121 | }).catch(err => { | 183 | title: '操作成功', |
| 122 | console.error('审核失败', err) | 184 | icon: 'success' |
| 123 | uni.showToast({ | 185 | }) |
| 124 | title: '操作失败', | 186 | setTimeout(() => { |
| 125 | icon: 'none' | 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 | ||
| 126 | }) | 196 | }) |
| 127 | submitting.value = false | 197 | } |
| 128 | }) | ||
| 129 | } | 198 | } |
| 130 | </script> | 199 | </script> |
| 131 | 200 | ||
| ... | @@ -145,7 +214,7 @@ function doSubmit() { | ... | @@ -145,7 +214,7 @@ function doSubmit() { |
| 145 | display: flex; | 214 | display: flex; |
| 146 | align-items: center; | 215 | align-items: center; |
| 147 | gap: 12rpx; | 216 | gap: 12rpx; |
| 148 | 217 | ||
| 149 | .tips-text { | 218 | .tips-text { |
| 150 | font-size: 26rpx; | 219 | font-size: 26rpx; |
| 151 | color: #13B5B1; | 220 | color: #13B5B1; |
| ... | @@ -163,7 +232,7 @@ function doSubmit() { | ... | @@ -163,7 +232,7 @@ function doSubmit() { |
| 163 | display: flex; | 232 | display: flex; |
| 164 | align-items: center; | 233 | align-items: center; |
| 165 | margin-bottom: 30rpx; | 234 | margin-bottom: 30rpx; |
| 166 | 235 | ||
| 167 | .section-title { | 236 | .section-title { |
| 168 | font-size: 30rpx; | 237 | font-size: 30rpx; |
| 169 | font-weight: 600; | 238 | font-weight: 600; |
| ... | @@ -175,11 +244,11 @@ function doSubmit() { | ... | @@ -175,11 +244,11 @@ function doSubmit() { |
| 175 | .form-card { | 244 | .form-card { |
| 176 | .form-item { | 245 | .form-item { |
| 177 | margin-bottom: 30rpx; | 246 | margin-bottom: 30rpx; |
| 178 | 247 | ||
| 179 | &:last-child { | 248 | &:last-child { |
| 180 | margin-bottom: 0; | 249 | margin-bottom: 0; |
| 181 | } | 250 | } |
| 182 | 251 | ||
| 183 | .form-label { | 252 | .form-label { |
| 184 | display: block; | 253 | display: block; |
| 185 | font-size: 28rpx; | 254 | font-size: 28rpx; |
| ... | @@ -187,19 +256,19 @@ function doSubmit() { | ... | @@ -187,19 +256,19 @@ function doSubmit() { |
| 187 | margin-bottom: 16rpx; | 256 | margin-bottom: 16rpx; |
| 188 | font-weight: 500; | 257 | font-weight: 500; |
| 189 | } | 258 | } |
| 190 | 259 | ||
| 191 | .radio-group { | 260 | .radio-group { |
| 192 | display: flex; | 261 | display: flex; |
| 193 | gap: 40rpx; | 262 | gap: 40rpx; |
| 194 | } | 263 | } |
| 195 | 264 | ||
| 196 | .radio-item { | 265 | .radio-item { |
| 197 | display: flex; | 266 | display: flex; |
| 198 | align-items: center; | 267 | align-items: center; |
| 199 | gap: 12rpx; | 268 | gap: 12rpx; |
| 200 | font-size: 28rpx; | 269 | font-size: 28rpx; |
| 201 | color: #333; | 270 | color: #333; |
| 202 | 271 | ||
| 203 | .radio-circle { | 272 | .radio-circle { |
| 204 | width: 36rpx; | 273 | width: 36rpx; |
| 205 | height: 36rpx; | 274 | height: 36rpx; |
| ... | @@ -209,7 +278,7 @@ function doSubmit() { | ... | @@ -209,7 +278,7 @@ function doSubmit() { |
| 209 | align-items: center; | 278 | align-items: center; |
| 210 | justify-content: center; | 279 | justify-content: center; |
| 211 | } | 280 | } |
| 212 | 281 | ||
| 213 | &.selected { | 282 | &.selected { |
| 214 | .radio-circle { | 283 | .radio-circle { |
| 215 | background-color: #13B5B1; | 284 | background-color: #13B5B1; |
| ... | @@ -217,7 +286,7 @@ function doSubmit() { | ... | @@ -217,7 +286,7 @@ function doSubmit() { |
| 217 | } | 286 | } |
| 218 | } | 287 | } |
| 219 | } | 288 | } |
| 220 | 289 | ||
| 221 | .textarea { | 290 | .textarea { |
| 222 | width: 100%; | 291 | width: 100%; |
| 223 | height: 200rpx; | 292 | height: 200rpx; |
| ... | @@ -245,7 +314,7 @@ function doSubmit() { | ... | @@ -245,7 +314,7 @@ function doSubmit() { |
| 245 | gap: 30rpx; | 314 | gap: 30rpx; |
| 246 | padding: 0 30rpx; | 315 | padding: 0 30rpx; |
| 247 | box-shadow: 0 -4rpx 20rpx rgba(0, 0, 0, 0.05); | 316 | box-shadow: 0 -4rpx 20rpx rgba(0, 0, 0, 0.05); |
| 248 | 317 | ||
| 249 | button { | 318 | button { |
| 250 | flex: 1; | 319 | flex: 1; |
| 251 | height: 80rpx; | 320 | height: 80rpx; |
| ... | @@ -254,19 +323,176 @@ function doSubmit() { | ... | @@ -254,19 +323,176 @@ function doSubmit() { |
| 254 | border-radius: 40rpx; | 323 | border-radius: 40rpx; |
| 255 | border: none; | 324 | border: none; |
| 256 | } | 325 | } |
| 257 | 326 | ||
| 258 | .btn-cancel { | 327 | .btn-cancel { |
| 259 | background-color: #f5f5f5; | 328 | background-color: #f5f5f5; |
| 260 | color: #666; | 329 | color: #666; |
| 261 | } | 330 | } |
| 262 | 331 | ||
| 263 | .btn-submit { | 332 | .btn-submit { |
| 264 | background: linear-gradient(135deg, #13B5B1, #15c5c1); | 333 | background: linear-gradient(135deg, #13B5B1, #15c5c1); |
| 265 | color: #fff; | 334 | color: #fff; |
| 266 | 335 | ||
| 267 | &[disabled] { | 336 | &[disabled] { |
| 268 | background: #ccc; | 337 | background: #ccc; |
| 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> |
| ... | @@ -43,16 +43,16 @@ | ... | @@ -43,16 +43,16 @@ |
| 43 | </view> | 43 | </view> |
| 44 | </view> | 44 | </view> |
| 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> |
| ... | @@ -76,44 +76,44 @@ | ... | @@ -76,44 +76,44 @@ |
| 76 | </view> | 76 | </view> |
| 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 | } |
| ... | @@ -189,7 +189,7 @@ function formatDateTime(dateStr) { | ... | @@ -189,7 +189,7 @@ function formatDateTime(dateStr) { |
| 189 | display: flex; | 189 | display: flex; |
| 190 | align-items: center; | 190 | align-items: center; |
| 191 | margin-bottom: 24rpx; | 191 | margin-bottom: 24rpx; |
| 192 | 192 | ||
| 193 | .section-title { | 193 | .section-title { |
| 194 | font-size: 30rpx; | 194 | font-size: 30rpx; |
| 195 | font-weight: 600; | 195 | font-weight: 600; |
| ... | @@ -204,31 +204,31 @@ function formatDateTime(dateStr) { | ... | @@ -204,31 +204,31 @@ function formatDateTime(dateStr) { |
| 204 | justify-content: space-between; | 204 | justify-content: space-between; |
| 205 | padding: 16rpx 0; | 205 | padding: 16rpx 0; |
| 206 | border-bottom: 1px solid #f0f0f0; | 206 | border-bottom: 1px solid #f0f0f0; |
| 207 | 207 | ||
| 208 | &:last-child { | 208 | &:last-child { |
| 209 | border-bottom: none; | 209 | border-bottom: none; |
| 210 | } | 210 | } |
| 211 | 211 | ||
| 212 | .label { | 212 | .label { |
| 213 | font-size: 26rpx; | 213 | font-size: 26rpx; |
| 214 | color: #999; | 214 | color: #999; |
| 215 | flex-shrink: 0; | 215 | flex-shrink: 0; |
| 216 | } | 216 | } |
| 217 | 217 | ||
| 218 | .value { | 218 | .value { |
| 219 | font-size: 26rpx; | 219 | font-size: 26rpx; |
| 220 | color: #333; | 220 | color: #333; |
| 221 | text-align: right; | 221 | text-align: right; |
| 222 | margin-left: 20rpx; | 222 | margin-left: 20rpx; |
| 223 | 223 | ||
| 224 | &.text-success { | 224 | &.text-success { |
| 225 | color: #4caf50; | 225 | color: #4caf50; |
| 226 | } | 226 | } |
| 227 | 227 | ||
| 228 | &.text-warning { | 228 | &.text-warning { |
| 229 | color: #ff9800; | 229 | color: #ff9800; |
| 230 | } | 230 | } |
| 231 | 231 | ||
| 232 | &.text-danger { | 232 | &.text-danger { |
| 233 | color: #f44336; | 233 | color: #f44336; |
| 234 | } | 234 | } |
| ... | @@ -242,11 +242,11 @@ function formatDateTime(dateStr) { | ... | @@ -242,11 +242,11 @@ function formatDateTime(dateStr) { |
| 242 | display: flex; | 242 | display: flex; |
| 243 | padding: 20rpx 0; | 243 | padding: 20rpx 0; |
| 244 | border-bottom: 1px dashed #eee; | 244 | border-bottom: 1px dashed #eee; |
| 245 | 245 | ||
| 246 | &:last-child { | 246 | &:last-child { |
| 247 | border-bottom: none; | 247 | border-bottom: none; |
| 248 | } | 248 | } |
| 249 | 249 | ||
| 250 | .audit-dot { | 250 | .audit-dot { |
| 251 | width: 14rpx; | 251 | width: 14rpx; |
| 252 | height: 14rpx; | 252 | height: 14rpx; |
| ... | @@ -254,43 +254,43 @@ function formatDateTime(dateStr) { | ... | @@ -254,43 +254,43 @@ function formatDateTime(dateStr) { |
| 254 | margin-top: 8rpx; | 254 | margin-top: 8rpx; |
| 255 | margin-right: 20rpx; | 255 | margin-right: 20rpx; |
| 256 | flex-shrink: 0; | 256 | flex-shrink: 0; |
| 257 | 257 | ||
| 258 | &.pass { | 258 | &.pass { |
| 259 | background-color: #4caf50; | 259 | background-color: #4caf50; |
| 260 | } | 260 | } |
| 261 | 261 | ||
| 262 | &.fail { | 262 | &.fail { |
| 263 | background-color: #f44336; | 263 | background-color: #f44336; |
| 264 | } | 264 | } |
| 265 | } | 265 | } |
| 266 | 266 | ||
| 267 | .audit-content { | 267 | .audit-content { |
| 268 | flex: 1; | 268 | flex: 1; |
| 269 | 269 | ||
| 270 | .audit-row { | 270 | .audit-row { |
| 271 | display: flex; | 271 | display: flex; |
| 272 | margin-bottom: 10rpx; | 272 | margin-bottom: 10rpx; |
| 273 | 273 | ||
| 274 | &:last-child { | 274 | &:last-child { |
| 275 | margin-bottom: 0; | 275 | margin-bottom: 0; |
| 276 | } | 276 | } |
| 277 | 277 | ||
| 278 | .audit-label { | 278 | .audit-label { |
| 279 | font-size: 24rpx; | 279 | font-size: 24rpx; |
| 280 | color: #999; | 280 | color: #999; |
| 281 | width: 140rpx; | 281 | width: 140rpx; |
| 282 | flex-shrink: 0; | 282 | flex-shrink: 0; |
| 283 | } | 283 | } |
| 284 | 284 | ||
| 285 | .audit-value { | 285 | .audit-value { |
| 286 | font-size: 26rpx; | 286 | font-size: 26rpx; |
| 287 | color: #333; | 287 | color: #333; |
| 288 | flex: 1; | 288 | flex: 1; |
| 289 | 289 | ||
| 290 | &.text-success { | 290 | &.text-success { |
| 291 | color: #4caf50; | 291 | color: #4caf50; |
| 292 | } | 292 | } |
| 293 | 293 | ||
| 294 | &.text-danger { | 294 | &.text-danger { |
| 295 | color: #f44336; | 295 | color: #f44336; |
| 296 | } | 296 | } |
| ... | @@ -305,11 +305,11 @@ function formatDateTime(dateStr) { | ... | @@ -305,11 +305,11 @@ function formatDateTime(dateStr) { |
| 305 | border: 1px solid #eee; | 305 | border: 1px solid #eee; |
| 306 | border-radius: 12rpx; | 306 | border-radius: 12rpx; |
| 307 | overflow: hidden; | 307 | overflow: hidden; |
| 308 | 308 | ||
| 309 | .table-header { | 309 | .table-header { |
| 310 | display: flex; | 310 | display: flex; |
| 311 | background-color: #f5f5f5; | 311 | background-color: #f5f5f5; |
| 312 | 312 | ||
| 313 | .th { | 313 | .th { |
| 314 | padding: 20rpx 0; | 314 | padding: 20rpx 0; |
| 315 | text-align: center; | 315 | text-align: center; |
| ... | @@ -318,20 +318,28 @@ function formatDateTime(dateStr) { | ... | @@ -318,20 +318,28 @@ function formatDateTime(dateStr) { |
| 318 | font-weight: 500; | 318 | font-weight: 500; |
| 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 | 325 | ||
| 326 | .th-code { | ||
| 327 | width: 30%; | ||
| 328 | } | ||
| 329 | |||
| 330 | .th-idcard { | ||
| 331 | width: 45%; | ||
| 332 | } | ||
| 333 | |||
| 326 | .table-body { | 334 | .table-body { |
| 327 | .table-row { | 335 | .table-row { |
| 328 | display: flex; | 336 | display: flex; |
| 329 | border-bottom: 1px solid #eee; | 337 | border-bottom: 1px solid #eee; |
| 330 | 338 | ||
| 331 | &:last-child { | 339 | &:last-child { |
| 332 | border-bottom: none; | 340 | border-bottom: none; |
| 333 | } | 341 | } |
| 334 | 342 | ||
| 335 | .td { | 343 | .td { |
| 336 | padding: 20rpx 0; | 344 | padding: 20rpx 0; |
| 337 | text-align: center; | 345 | text-align: center; |
| ... | @@ -342,10 +350,18 @@ function formatDateTime(dateStr) { | ... | @@ -342,10 +350,18 @@ function formatDateTime(dateStr) { |
| 342 | white-space: nowrap; | 350 | white-space: nowrap; |
| 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 | ... | ... |
This diff is collapsed.
Click to expand it.
| 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 | ||
| 28 | 26 | ||
| 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 | }) |
| 38 | 37 | ||
| 39 | const goToPage = (url) => { | 38 | const goToPage = (url) => { |
| ... | @@ -46,7 +45,7 @@ const goToPage = (url) => { | ... | @@ -46,7 +45,7 @@ const goToPage = (url) => { |
| 46 | .role-entry-page { | 45 | .role-entry-page { |
| 47 | width: 100%; | 46 | width: 100%; |
| 48 | min-height: 100vh; | 47 | min-height: 100vh; |
| 49 | position: relative; | 48 | position: relative; |
| 50 | padding: 20rpx; | 49 | padding: 20rpx; |
| 51 | box-sizing: border-box; | 50 | box-sizing: border-box; |
| 52 | } | 51 | } |
| ... | @@ -57,7 +56,7 @@ const goToPage = (url) => { | ... | @@ -57,7 +56,7 @@ const goToPage = (url) => { |
| 57 | left: 0; | 56 | left: 0; |
| 58 | width: 100%; | 57 | width: 100%; |
| 59 | height: 100%; | 58 | height: 100%; |
| 60 | z-index: -1; | 59 | z-index: -1; |
| 61 | } | 60 | } |
| 62 | 61 | ||
| 63 | .header-wrapper { | 62 | .header-wrapper { |
| ... | @@ -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 | } |
| ... | @@ -93,4 +93,4 @@ const goToPage = (url) => { | ... | @@ -93,4 +93,4 @@ const goToPage = (url) => { |
| 93 | color: white; | 93 | color: white; |
| 94 | font-size: 28rpx; | 94 | font-size: 28rpx; |
| 95 | } | 95 | } |
| 96 | </style> | ||
| ... | \ No newline at end of file | ... | \ No newline at end of file |
| 96 | </style> | ... | ... |
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,35 +4,35 @@ | ... | @@ -4,35 +4,35 @@ |
| 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> |
| 15 | <button class="reset-btn" @click="resetQuery">重置</button> | 15 | <button class="reset-btn" @click="resetQuery">重置</button> |
| 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,8 +328,9 @@ async function confirmAddExpireExaminer() { | ... | @@ -303,8 +328,9 @@ 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; |
| 309 | } | 335 | } |
| 310 | </style> | ||
| ... | \ No newline at end of file | ... | \ No newline at end of file |
| 336 | </style> | ... | ... |
| ... | @@ -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> |
| ... | @@ -34,9 +41,9 @@ | ... | @@ -34,9 +41,9 @@ |
| 34 | <view class="submit-area"> | 41 | <view class="submit-area"> |
| 35 | <button class="submit-btn" @click="handelSubmit">确定提交</button> | 42 | <button class="submit-btn" @click="handelSubmit">确定提交</button> |
| 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"> |
| ... | @@ -46,9 +53,9 @@ | ... | @@ -46,9 +53,9 @@ |
| 46 | <view class="modal-tip">友情提示:非考点无法申请级位考试</view> | 53 | <view class="modal-tip">友情提示:非考点无法申请级位考试</view> |
| 47 | </view> | 54 | </view> |
| 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> |
| ... | @@ -58,20 +65,21 @@ | ... | @@ -58,20 +65,21 @@ |
| 58 | </view> | 65 | </view> |
| 59 | </view> | 66 | </view> |
| 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> |
| 70 | </view> | 78 | </view> |
| 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,10 +404,12 @@ function confirmApply() { | ... | @@ -374,10 +404,12 @@ 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 | } |
| 383 | </style> | ||
| ... | \ No newline at end of file | ... | \ No newline at end of file |
| 415 | </style> | ... | ... |
| 1 | <template> | 1 | <template> |
| 2 | <view> | 2 | <view> |
| 3 | <view class="wBox"> | 3 | <view class="wBox"> |
| 4 | <view class="tt"> | 4 | <view class="tt"> |
| 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> |
| 22 | </view> | 22 | </view> |
| 23 | </view> | 23 | </view> |
| 24 | 24 | ||
| 25 | </view> | 25 | </view> |
| 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(); |
| 49 | const [err, res] = await to(api.getMyRecent()) | 43 | const userType = ref('') |
| 50 | if (!err && res.data && res.data.auditLogs) { | 44 | const recordList = ref([]) |
| 51 | recordList.value = JSON.parse(res.data.auditLogs) | ||
| 52 | } | ||
| 53 | } | ||
| 54 | </script> | ||
| 55 | 45 | ||
| 56 | <style scoped lang="scss"> | 46 | onLoad(async (option) => { |
| 57 | .wBox { | 47 | console.log(option) |
| 58 | width: 700rpx; | 48 | if (option.type == 1) await getMyRecentFN() |
| 59 | padding: 30rpx; | 49 | if (option.type == 2) await getMyRecentExamFn() |
| 60 | margin: 20rpx auto; | 50 | }) |
| 61 | background: #FFFFFF; | ||
| 62 | box-shadow: 0rpx 12rpx 116rpx 0rpx rgba(196, 203, 214, 0.1); | ||
| 63 | border-radius: 15rpx; | ||
| 64 | 51 | ||
| 65 | .tt { | 52 | async function getMyRecentFN() { |
| 66 | color: #0A1629; | 53 | const [err, res] = await to(api.getMyRecent()) |
| 67 | margin: 0 0 30rpx; | 54 | if (!err && res.data && res.data.auditLogs) { |
| 68 | font-size: 30rpx; | 55 | recordList.value = JSON.parse(res.data.auditLogs) |
| 69 | } | 56 | } |
| 57 | } | ||
| 70 | 58 | ||
| 71 | .ddd { | 59 | async function getMyRecentExamFn() { |
| 72 | font-size: 28rpx; | 60 | const [err, res] = await to(api.getMyRecentExam()) |
| 73 | color: #333; | 61 | if (!err && res.data && res.data.auditLogs) { |
| 74 | margin: 0 0 10rpx; | 62 | recordList.value = JSON.parse(res.data.auditLogs) |
| 63 | } | ||
| 64 | } | ||
| 65 | </script> | ||
| 75 | 66 | ||
| 76 | .lab { | ||
| 77 | color: #999; | ||
| 78 | display: inline-block; | ||
| 79 | text-align: justify; | ||
| 80 | } | ||
| 81 | } | ||
| 82 | } | ||
| 83 | </style> | ||
| ... | \ No newline at end of file | ... | \ No newline at end of file |
| 67 | <style lang="scss" scoped> | ||
| 68 | .wBox { | ||
| 69 | width: 700rpx; | ||
| 70 | padding: 30rpx; | ||
| 71 | margin: 20rpx auto; | ||
| 72 | background: #FFFFFF; | ||
| 73 | box-shadow: 0rpx 12rpx 116rpx 0rpx rgba(196, 203, 214, 0.1); | ||
| 74 | border-radius: 15rpx; | ||
| 75 | |||
| 76 | .tt { | ||
| 77 | color: #0A1629; | ||
| 78 | margin: 0 0 30rpx; | ||
| 79 | font-size: 30rpx; | ||
| 80 | } | ||
| 81 | |||
| 82 | .ddd { | ||
| 83 | font-size: 28rpx; | ||
| 84 | color: #333; | ||
| 85 | margin: 0 0 10rpx; | ||
| 86 | |||
| 87 | .lab { | ||
| 88 | color: #999; | ||
| 89 | display: inline-block; | ||
| 90 | text-align: justify; | ||
| 91 | } | ||
| 92 | } | ||
| 93 | } | ||
| 94 | </style> | ... | ... |
-
Please register or sign in to post a comment