2afd2229 by 华明祺

段位考试审批

1 parent 4c57b42c
import request from './request.js'
import config from '@/config.js'
import * as loginServer from '@/common/login.js';
function getMessage(params) {
return request({
url: '/common/home/getMessage',
method: 'get',
params: params
})
return request({
url: '/common/home/getMessage',
method: 'get',
params: params
})
}
function reader(query) {
return request({
url: '/common/home/readMessage',
method: 'get',
params: query
})
return request({
url: '/common/home/readMessage',
method: 'get',
params: query
})
}
function regionsList(params) {
return request({
url: '/common/region/regionsList',
method: 'get',
params
})
return request({
url: '/common/region/regionsList',
method: 'get',
params
})
}
// 添加会员自动录入 上传图片
function carUrl(data, type) {
return uni.uploadFile({
url: `${config.baseUrl_api}/person/info/getPersonInfoFromCert/${type}`,
header: {
'Authorization': uni.getStorageSync('token'),
},
name: 'pic',
filePath: data
})
// return request({
// url: `/person/info/getPersonInfoFromCert/${type}`,
// method: 'post',
// params: data
// })
return uni.uploadFile({
url: `${config.baseUrl_api}/person/info/getPersonInfoFromCert/${type}`,
header: {
'Authorization': uni.getStorageSync('token')
},
name: 'pic',
filePath: data
})
// return request({
// url: `/person/info/getPersonInfoFromCert/${type}`,
// method: 'post',
// params: data
// })
}
// 添加会员信息
function addPersonToMyDept(data) {
return request({
url: '/person/info/addPersonToMyDept',
method: 'post',
params: data
})
return request({
url: '/person/info/addPersonToMyDept',
method: 'post',
params: data
})
}
// 图片上传
function uploadImg(e) {
const tempFilePaths = e.tempFilePaths;
const imgUrl = tempFilePaths[0]
uni.showLoading({
title: '加载中'
});
return uni.uploadFile({
url: config.baseUrl_api + '/upload/uploadImg',
filePath: imgUrl,
name: 'image'
}).then(res => {
let data = JSON.parse(res.data);
return data
}).finally(() => {
uni.hideLoading();
});
const tempFilePaths = e.tempFilePaths
const imgUrl = tempFilePaths[0]
uni.showLoading({
title: '加载中'
})
return uni.uploadFile({
url: config.baseUrl_api + '/upload/uploadImg',
filePath: imgUrl,
name: 'image'
}).then(res => {
const data = JSON.parse(res.data)
return data
}).finally(() => {
uni.hideLoading()
})
}
function getInfo(perId) {
return request({
url: '/person/info/' + perId,
method: 'get'
})
return request({
url: '/person/info/' + perId,
method: 'get'
})
}
// 查询个人会员信息列表
function selectPageList(query) {
return request({
url: '/person/info/selectPageList',
method: 'get',
params: query
})
return request({
url: '/person/info/selectPageList',
method: 'get',
params: query
})
}
function delInfo(perId) {
return request({
url: '/person/info/' + perId,
method: 'delete'
})
return request({
url: '/person/info/' + perId,
method: 'delete'
})
}
// 查询个人个人会员缴费列表
function getPaymentList(query) {
return request({
url: '/person/paymentRange/selectPageList',
method: 'get',
params: query
})
return request({
url: '/person/paymentRange/selectPageList',
method: 'get',
params: query
})
}
// 查询添加个人个人会员缴费列表
function addSelectPageList(query) {
return request({
url: '/person/payment/selectPageList',
method: 'get',
params: query
})
return request({
url: '/person/payment/selectPageList',
method: 'get',
params: query
})
}
function fillAuditLog(ids) {
return request({
url: `/person/paymentRange/fillAuditLog/${ids}`,
method: 'get'
})
return request({
url: `/person/paymentRange/fillAuditLog/${ids}`,
method: 'get'
})
}
// 审核列表
function getVerifyList(params) {
return request({
url: '/person/paymentRange/verifyList',
method: 'get',
params: params
})
return request({
url: '/person/paymentRange/verifyList',
method: 'get',
params: params
})
}
// 审核
function audit(data) {
return request({
url: '/person/paymentRange/audit',
method: 'post',
params: data
})
return request({
url: '/person/paymentRange/audit',
method: 'post',
params: data
})
}
// 审核详情
function getHistoryByRelateId(rId) {
return request({
url: `/person/paymentRange/getHistoryByRelateId/${rId}`,
method: 'get',
})
return request({
url: `/person/paymentRange/getHistoryByRelateId/${rId}`,
method: 'get'
})
}
// 查询团体会员信息列表
function getGroupVipList(query) {
return request({
url: '/member/info/selectPageList',
method: 'get',
params: query
})
return request({
url: '/member/info/selectPageList',
method: 'get',
params: query
})
}
// 查询团体会员 全部会员数,有效会员数
function getMemberCountInfo(query) {
return request({
url: '/member/info/getMemberCountInfo',
method: 'get',
params: query
})
return request({
url: '/member/info/getMemberCountInfo',
method: 'get',
params: query
})
}
function getFeeBillList(query) {
return request({
url: '/person/paymentDoc/list',
method: 'get',
params: query
})
return request({
url: '/person/paymentDoc/list',
method: 'get',
params: query
})
}
function commitPaymentVoucher(data) {
return request({
url: '/person/paymentDoc/commitPaymentVoucher',
method: 'post',
params: data
})
return request({
url: '/person/paymentDoc/commitPaymentVoucher',
method: 'post',
params: data
})
}
function getFeeBillDetail(payId) {
return request({
url: `/person/paymentDoc/${payId}`,
method: 'get'
})
return request({
url: `/person/paymentDoc/${payId}`,
method: 'get'
})
}
// 获取自己团队成员信息
function getMyOwnMemberInfo() {
return request({
url: '/member/info/getMyOwnMemberInfo',
method: 'get'
})
return request({
url: '/member/info/getMyOwnMemberInfo',
method: 'get'
})
}
// 会员调入
function getMobilizelist(params) {
return request({
url: '/person/transferRange/list',
method: 'get',
params
})
return request({
url: '/person/transferRange/list',
method: 'get',
params
})
}
// 调动会员成员
function getTransferList(data) {
return request({
url: `/person/transfer/list`,
method: 'get',
params: data
})
return request({
url: `/person/transfer/list`,
method: 'get',
params: data
})
}
// 查询团体会员信息列表
function getGroupList(params) {
return request({
url: `/member/certified/verifyList`,
method: 'get',
params: params
})
return request({
url: `/member/certified/verifyList`,
method: 'get',
params: params
})
}
// 查询
function pickUp(data) {
return request({
url: `/person/info/pickUp`,
method: 'get',
params: data
})
return request({
url: `/person/info/pickUp`,
method: 'get',
params: data
})
}
// 添加调入会员
function addTransferToRange(data) {
return request({
url: `/person/transfer/addTransferToRange`,
method: 'post',
params: data
})
return request({
url: `/person/transfer/addTransferToRange`,
method: 'post',
params: data
})
}
function commit(rangeIds) {
return request({
url: `/person/transferRange/commit/${rangeIds}`,
method: 'post'
})
return request({
url: `/person/transferRange/commit/${rangeIds}`,
method: 'post'
})
}
// 调动审批
function mobilizeAudit(data) {
return request({
url: `/person/transferRange/audit/${data.rangeIds}`,
method: 'post',
params: data
})
return request({
url: `/person/transferRange/audit/${data.rangeIds}`,
method: 'post',
params: data
})
}
//文件上传
// 文件上传
function uploadFile(e) {
const fileUrl = e.tempFilePaths[0]
uni.showLoading({
title: '加载中'
});
return uni.uploadFile({
url: config.baseUrl_api + '/upload/uploadFileToLocalServer',
filePath: fileUrl,
name: 'file',
header: {
'Authorization': uni.getStorageSync('token')
}
}).then(res => {
let data = JSON.parse(res.data);
return data
}).finally(() => {
uni.hideLoading();
});
const fileUrl = e.tempFilePaths[0]
uni.showLoading({
title: '加载中'
})
return uni.uploadFile({
url: config.baseUrl_api + '/upload/uploadFileToLocalServer',
filePath: fileUrl,
name: 'file',
header: {
'Authorization': uni.getStorageSync('token')
}
}).then(res => {
const data = JSON.parse(res.data)
return data
}).finally(() => {
uni.hideLoading()
})
}
// 查询考级信息列表
function getLevelList(query) {
......@@ -352,7 +351,7 @@ function getVerityList(params) {
function getGroupHistoryByRelateId(id) {
return request({
url: `/member/certified/getHistoryByRelateId/${id}`,
method: 'get'
method: 'get'
})
}
// 创建自己的团队
......@@ -360,7 +359,7 @@ function createMyMember(data) {
return request({
url: '/member/info/createMyMember',
method: 'post',
params:data
params: data
})
}
function doVerity(data) {
......@@ -388,13 +387,13 @@ function groupMergeApi(data) {
return request({
url: `/member/certified/merge`,
method: 'post',
params:data
params: data
})
}
function getDetailList(data) {
function getDetailList(data) {
return request({
url: `/member/certified/getDetailList`,
method: 'get',
method: 'get',
params: data
})
}
......@@ -408,7 +407,7 @@ function getPayList(data) {
function getFillAuditLog(rangeId) {
return request({
url: `/member/certifiedRange/fillAuditLog/${rangeId}`,
method: 'get'
method: 'get'
})
}
function commitGroupPay(rangeId) {
......@@ -464,7 +463,7 @@ function addPersonPaymentGroup(data) {
params: data
})
}
function commitRenew(id) {
function commitRenew(id) {
return request({
url: `/person/paymentRange/commit/${id}`,
method: 'post'
......@@ -495,49 +494,49 @@ function getMergePaymentInfo(mergeId) {
}
export {
getMessage,
reader,
regionsList,
carUrl,
uploadImg,
addPersonToMyDept,
getInfo,
selectPageList,
delInfo,
getPaymentList,
addSelectPageList,
fillAuditLog,
getVerifyList,
audit,
getHistoryByRelateId,
getGroupVipList,
getMemberCountInfo,
getFeeBillList,
commitPaymentVoucher,
getFeeBillDetail,
getMyOwnMemberInfo,
getMobilizelist,
getTransferList,
getGroupList,
pickUp,
addTransferToRange,
commit,
mobilizeAudit,
getMessage,
reader,
regionsList,
carUrl,
uploadImg,
addPersonToMyDept,
getInfo,
selectPageList,
delInfo,
getPaymentList,
addSelectPageList,
fillAuditLog,
getVerifyList,
audit,
getHistoryByRelateId,
getGroupVipList,
getMemberCountInfo,
getFeeBillList,
commitPaymentVoucher,
getFeeBillDetail,
getMyOwnMemberInfo,
getMobilizelist,
getTransferList,
getGroupList,
pickUp,
addTransferToRange,
commit,
mobilizeAudit,
uploadFile,
getLevelList,
getLevelApplyInfo,
getStudentList,getApprovalRecord,submitVerity,
getCoachList,
updateLevelInfo,addLevelInfo,
chooseStudentsList,batchChoose,getVerityList,
getGroupHistoryByRelateId,
createMyMember,doVerity,mergeRecords,
groupAudit,groupMergeApi,
getDetailList,getPayList,
getFillAuditLog,commitGroupPay,getGroupFeeBill,
groupCommitPaymentVoucher,getFeeBillById,
personalCommit,
delPayment,editYear,addPersonPaymentGroup,
commitRenew,getVerityMergeList,doMergeFlows,getMergePaymentInfo
}
\ No newline at end of file
uploadFile,
getLevelList,
getLevelApplyInfo,
getStudentList, getApprovalRecord, submitVerity,
getCoachList,
updateLevelInfo, addLevelInfo,
chooseStudentsList, batchChoose, getVerityList,
getGroupHistoryByRelateId,
createMyMember, doVerity, mergeRecords,
groupAudit, groupMergeApi,
getDetailList, getPayList,
getFillAuditLog, commitGroupPay, getGroupFeeBill,
groupCommitPaymentVoucher, getFeeBillById,
personalCommit,
delPayment, editYear, addPersonPaymentGroup,
commitRenew, getVerityMergeList, doMergeFlows, getMergePaymentInfo
}
......
import request from './request.js'
/**
* 审批列表
* @returns {*}
*/
export function getVerityList(params) {
return request({
url: '/exam/info/verityList',
method: 'get',
params: params
})
}
/**
* 审批
* @param {Object} data
*/
export function doMergeFlows(data) {
return request({
url: `/exam/info/submit/mergeFlows`,
method: 'post',
params: data
})
}
/**
* 查询证书列表
* @param query
* @returns {*}
*/
export function certsLList(query) {
return request({
url: '/exam/payment/certsList',
method: 'get',
params: query
})
}
/**
* 一键下发
* @param data
* @returns {*}
*/
export function submitCert(data) {
return request({
url: `/exam/payment/submitCerts/nesting`,
method: 'put',
params: data
})
}
......@@ -39,6 +39,14 @@ const request = function(req) {
})
return
}
if (req.method === 'GET') {
if (!req.params) {
req.params = {}
}
req.params.pageNum = req.params.pageNum || 1
req.params.pageSize = req.params.pageSize || 50
}
// if (req.method == 'POST' && !req.hideLoding) {
// uni.showLoading({
......@@ -56,10 +64,10 @@ const request = function(req) {
switch (res.statusCode) {
case 200:
const data = res.data || {}
if (data.code === 200||data.pageData?.code === 200) {
if (data.code === 200 || data.pageData?.code === 200) {
resolve(data)
} else if (req.url.indexOf('getMemberCountInfo')>-1){
resolve(data)
} else if (req.url.indexOf('getMemberCountInfo') > -1) {
resolve(data)
} else {
if (!excludeUrls.includes(req.url)) {
uni.showToast({
......
export function szToHz(num) {
const hzArr = ['〇', '一', '二', '三', '四', '五', '六', '七', '八', '九', '十']
return hzArr[parseInt(num)]
}
......@@ -188,13 +188,6 @@
}
}, {
"path": "pages/rank/skip/approval",
"style": {
"navigationBarTitleText": "越段考试审批",
"enablePullDownRefresh": false
}
}, {
"path": "pages/rank/apply",
"style": {
"navigationBarTitleText": "段位考试申请",
......@@ -209,13 +202,6 @@
}
}, {
"path": "pages/rank/skip/applyDetail",
"style": {
"navigationBarTitleText": "越段考试详情",
"enablePullDownRefresh": false
}
}, {
"path": "pages/index/perfect",
"style": {
"navigationBarTitleText": "注册引导",
......@@ -409,16 +395,9 @@
}
}, {
"path": "pages/rank/skip/scoreApproval",
"style": {
"navigationBarTitleText": "越段考试成绩审核",
"enablePullDownRefresh": false
}
}, {
"path": "pages/rank/skip/cert",
"path": "pages/rank/cert",
"style": {
"navigationBarTitleText": "段证书发布",
"navigationBarTitleText": "段证书发布",
"enablePullDownRefresh": false
}
}
......
<template>
<view class="page">
<view class="bgbg">
<view class="welcome">您好!
{{memberInfo.name}}
<br />欢迎使用中跆协会员管理系统
</view>
<view class="flexbox">
<!-- userType 1:中跆协 2:省 3:市区 4:道馆-->
<!-- 4 -->
<view v-if="userType=='4'" @click="goAddVip">添加会员</view>
<view v-if="userType=='4'" @click="goPath('/pages/personalVip/payment')">会员缴费</view>
<view v-if="userType=='2'" @click="goPath('/pages/personalVip/feeBill')">会员缴费单</view>
<!-- 3 2 1-->
<view v-if="userType!='4'" @click="goPath('/pages/personalVip/audit')">缴费审核</view>
<!-- 都有 -->
<view @click="goPath('/pages/personalVip/list')">会员查询</view>
</view>
</view>
<view class="girdBox">
<view v-if="userType!='3'" @click="goPath('/pages/personalVip/mobilize')">
<image />
会员调动
</view>
<view v-if="userType!='4'" @click="goPath('/pages/group/list')">
<image />团体会员查询
</view>
<!--市区 省 中跆协 -->
<view v-if="userType!='4'" @click="goPath('/pages/group/apply/applyList')">
<image />团体会员审核
</view>
<view v-if="userType=='2'" @click="goPath('/pages/group/pay')">
<image />团体会员认证
</view>
<view v-if="userType=='2'" @click="goPath('/pages/group/feeBill')">
<image />团体会员缴费单
</view>
<view v-if="userType=='4'" @click="goPath('/pages/level/apply')">
<image />级位考试申请
</view>
<view v-if="userType!='4'" @click="goPath('/pages/level/approval')">
<image />级位考试审核
</view>
<view v-if="userType=='2'" @click="goPath('/pages/level/apply')">
<image />段位考试申请
</view>
</view>
<view v-if="userType=='1'" class="girdBox">
<view @click="goPath('/pages/rank/approval')">
<image />段位考试审核
</view>
<view @click="goPath('/pages/rank/scoreApproval')">
<image />考段成绩审核
</view>
<view @click="goPath('/pages/rank/cert')">
<image />考段证书发布
</view>
<view @click="goPath('/pages/rank/skip/approval')">
<image />越段考试审核
</view>
<view @click="goPath('/pages/rank/skip/scoreApproval')">
<image />越段成绩审核
</view>
<view @click="goPath('/pages/rank/skip/cert')">
<image />越段证书发布
</view>
</view>
<uni-section title="待办提醒" padding>
<template v-slot:right>
<text @click="goMsgList" class="more">更多></text>
</template>
<view class="msglist">
<view class="msgitem" v-for="n in messageList" @click="readMessage(n)">
<text class="dot" :class="n.readFlag=='1'?'done':''"></text>
<view class="tt esp">{{n.name}}</view>
<view class="date">{{n.createTime}}</view>
</view>
<view class="nodata" v-if="messageList.length==0">
<image mode="aspectFit" src="/static/nodata.png"></image>
<text>暂无数据</text>
</view>
</view>
</uni-section>
</view>
<view class="page">
<view class="bgbg">
<view class="welcome">您好!
{{memberInfo.name}}
<br />欢迎使用中跆协会员管理系统
</view>
<view class="flexbox">
<!-- userType 1:中跆协 2:省 3:市区 4:道馆-->
<!-- 4 -->
<view v-if="userType=='4'" @click="goAddVip">添加会员</view>
<view v-if="userType=='4'" @click="goPath('/pages/personalVip/payment')">会员缴费</view>
<view v-if="userType=='2'" @click="goPath('/pages/personalVip/feeBill')">会员缴费单</view>
<!-- 3 2 1-->
<view v-if="userType!='4'" @click="goPath('/pages/personalVip/audit')">缴费审核</view>
<!-- 都有 -->
<view @click="goPath('/pages/personalVip/list')">会员查询</view>
</view>
</view>
<view class="girdBox">
<view v-if="userType!='3'" @click="goPath('/pages/personalVip/mobilize')">
<image />
会员调动
</view>
<view v-if="userType!='4'" @click="goPath('/pages/group/list')">
<image />团体会员查询
</view>
<!--市区 省 中跆协 -->
<view v-if="userType!='4'" @click="goPath('/pages/group/apply/applyList')">
<image />团体会员审核
</view>
<view v-if="userType=='2'" @click="goPath('/pages/group/pay')">
<image />团体会员认证
</view>
<view v-if="userType=='2'" @click="goPath('/pages/group/feeBill')">
<image />团体会员缴费单
</view>
<view v-if="userType=='4'" @click="goPath('/pages/level/apply')">
<image />级位考试申请
</view>
<view v-if="userType!='4'" @click="goPath('/pages/level/approval')">
<image />级位考试审核
</view>
<view v-if="userType=='2'" @click="goPath('/pages/level/apply')">
<image />段位考试申请
</view>
</view>
<view v-if="userType=='1'" class="girdBox">
<view @click="goPath('/pages/rank/approval?type=2')">
<image />段位考试审核
</view>
<view @click="goPath('/pages/rank/scoreApproval?type=2')">
<image />考段成绩审核
</view>
<view @click="goPath('/pages/rank/cert?type=2')">
<image />考段证书发布
</view>
<view @click="goPath('/pages/rank/approval?type=3')">
<image />越段考试审核
</view>
<view @click="goPath('/pages/rank/scoreApproval?type=3')">
<image />越段成绩审核
</view>
<view @click="goPath('/pages/rank/cert?type=3')">
<image />越段证书发布
</view>
</view>
<uni-section title="待办提醒" padding>
<template v-slot:right>
<text @click="goMsgList" class="more">更多></text>
</template>
<view class="msglist">
<view class="msgitem" v-for="n in messageList" :key="n.name" @click="readMessage(n)">
<text class="dot" :class="n.readFlag=='1'?'done':''"></text>
<view class="tt esp">{{n.name}}</view>
<view class="date">{{n.createTime}}</view>
</view>
<view class="nodata" v-if="messageList.length==0">
<image mode="aspectFit" src="/static/nodata.png"></image>
<text>暂无数据</text>
</view>
</view>
</uni-section>
</view>
</template>
<script setup>
import * as api from '@/common/api.js';
import * as loginServer from '@/common/login.js';
import {
onLoad,
onShow,
onReady,
onPullDownRefresh
} from '@dcloudio/uni-app';
import {
ref,
getCurrentInstance
} from 'vue';
const {
proxy
} = getCurrentInstance()
const app = getApp();
const userType = ref('1')
const memberInfo = ref({})
let proId;
const svId = ref(null);
const messageList = ref([])
onShow(() => {
if (app.globalData.isLogin) {
init()
} else {
app.firstLoadCallback = () => {
init()
};
}
})
onLoad(option => {
if (option.scene) {
proId = decodeURIComponent(option.scene);
} else {
proId = option.proId;
}
});
function goPath(path) {
uni.navigateTo({
url: path
});
}
function gologin() {
let path = '/pages/index/login';
uni.navigateTo({
url: path
});
}
function goCenter() {
let path = '/pages/usercenter/usercenter';
uni.navigateTo({
url: path
});
}
function goAddVip() {
let path = '/pages/personalVip/addVip';
uni.navigateTo({
url: path
});
}
function goRenew() {
let path = '/pages/personalVip/renew';
uni.navigateTo({
url: path
});
}
function init() {
uni.showLoading({
title: '加载中'
});
loginServer.getMyOwnMemberInfo().then(res => {
userType.value = app.globalData.userType
memberInfo.value = app.globalData.memberInfo
console.log(userType.value, app.globalData.authenticationStatus)
if (userType.value != '1' && app.globalData.authenticationStatus != '2' && app.globalData
.authenticationStatus !=
'4') {
// 注册引导
// uni.navigateTo({
// url: '/pages/index/perfect'
// });
} else {
getMes()
}
uni.hideLoading();
})
}
function getMes() {
api.getMessage({
pageNum: 1,
pageSize: 10
}).then(res => {
if (res.rows && res.rows.length > 0)
for (var d of res.rows) {
switch (d.type) {
case 30001:
d.name = '你有一条会员缴费等待审批,点击去处理!'
d.path = '/pages/personalVip/audit'
break
case 30002:
d.name = '你有一条级位考试等待审批,点击去处理!'
d.path = '/pages/level/approval'
break
case 30003:
d.name = '你有一条段位考试等待审批,点击去处理!'
d.path = '/pages/rank/approval'
break
case 30004:
d.name = '你有一条会员调动等待审批,点击去处理!'
d.path = '/pages/personalVip/mobillize'
break
case 30005:
d.name = '你有一条团体会员认证等待审批,点击去处理!'
d.path = '/pages/group/authentication'
break
case 30006:
d.name = '你有一条段位成绩等待审批,点击去处理!'
d.path = '/pages/rank/scoreApproval'
break
case 40001:
d.name = '你有一条级位申请待提交,点击去处理!'
d.path = `/pages/level/apply/modify?id=${d.eventId}`
break
case 40002:
d.name = '你有一条段位申请待提交,点击去处理!'
d.path = `/pages/rank/apply/modify?id=${d.eventId}`
break
case 40003:
d.name = '你有一条成绩维护的数据待提交,点击去处理!'
d.path = `/pages/rank/score/modify?id=${d.eventId}`
break
case 50001:
d.name = '你有一条新的个人会员申请,点击去处理!'
d.path = '/pages/personalVip/approvalList'
break
}
}
messageList.value = res.rows
})
}
function readMessage(item) {
uni.navigateTo({
url: item.path
});
api.reader({
id: item.id
}).then(res => {
item.readFlag = '1'
})
}
function goMsgList() {
let path = '/pages/index/msgList';
uni.navigateTo({
url: path
});
}
function goItem(item) {
if (item.path) {
let path = item.path
// if (checkUserPhone(path)) {
uni.navigateTo({
url: item.path
});
// }
} else {
uni.showToast({
title: `暂未开放`,
icon: 'none'
});
}
}
import * as api from '@/common/api.js';
import * as loginServer from '@/common/login.js';
import {
onLoad,
onShow,
onReady,
onPullDownRefresh
} from '@dcloudio/uni-app';
import {
ref,
getCurrentInstance
} from 'vue';
const {
proxy
} = getCurrentInstance()
const app = getApp();
const userType = ref('1')
const memberInfo = ref({})
let proId;
const svId = ref(null);
const messageList = ref([])
onShow(() => {
if (app.globalData.isLogin) {
init()
} else {
app.firstLoadCallback = () => {
init()
};
}
})
onLoad(option => {
if (option.scene) {
proId = decodeURIComponent(option.scene);
} else {
proId = option.proId;
}
});
function goPath(path) {
uni.navigateTo({
url: path
});
}
function gologin() {
let path = '/pages/index/login';
uni.navigateTo({
url: path
});
}
function goCenter() {
let path = '/pages/usercenter/usercenter';
uni.navigateTo({
url: path
});
}
function goAddVip() {
let path = '/pages/personalVip/addVip';
uni.navigateTo({
url: path
});
}
function goRenew() {
let path = '/pages/personalVip/renew';
uni.navigateTo({
url: path
});
}
function init() {
uni.showLoading({
title: '加载中'
});
loginServer.getMyOwnMemberInfo().then(res => {
userType.value = app.globalData.userType
memberInfo.value = app.globalData.memberInfo
console.log(userType.value, app.globalData.authenticationStatus)
if (userType.value != '1' && app.globalData.authenticationStatus != '2' && app.globalData
.authenticationStatus !=
'4') {
// 注册引导
// uni.navigateTo({
// url: '/pages/index/perfect'
// });
} else {
getMes()
}
uni.hideLoading();
})
}
function getMes() {
api.getMessage({
pageNum: 1,
pageSize: 10
}).then(res => {
if (res.rows && res.rows.length > 0)
for (var d of res.rows) {
switch (d.type) {
case 30001:
d.name = '你有一条会员缴费等待审批,点击去处理!'
d.path = '/pages/personalVip/audit'
break
case 30002:
d.name = '你有一条级位考试等待审批,点击去处理!'
d.path = '/pages/level/approval'
break
case 30003:
d.name = '你有一条段位考试等待审批,点击去处理!'
d.path = '/pages/rank/approval'
break
case 30004:
d.name = '你有一条会员调动等待审批,点击去处理!'
d.path = '/pages/personalVip/mobillize'
break
case 30005:
d.name = '你有一条团体会员认证等待审批,点击去处理!'
d.path = '/pages/group/authentication'
break
case 30006:
d.name = '你有一条段位成绩等待审批,点击去处理!'
d.path = '/pages/rank/scoreApproval'
break
case 40001:
d.name = '你有一条级位申请待提交,点击去处理!'
d.path = `/pages/level/apply/modify?id=${d.eventId}`
break
case 40002:
d.name = '你有一条段位申请待提交,点击去处理!'
d.path = `/pages/rank/apply/modify?id=${d.eventId}`
break
case 40003:
d.name = '你有一条成绩维护的数据待提交,点击去处理!'
d.path = `/pages/rank/score/modify?id=${d.eventId}`
break
case 50001:
d.name = '你有一条新的个人会员申请,点击去处理!'
d.path = '/pages/personalVip/approvalList'
break
}
}
messageList.value = res.rows
})
}
function readMessage(item) {
uni.navigateTo({
url: item.path
});
api.reader({
id: item.id
}).then(res => {
item.readFlag = '1'
})
}
function goMsgList() {
let path = '/pages/index/msgList';
uni.navigateTo({
url: path
});
}
function goItem(item) {
if (item.path) {
let path = item.path
// if (checkUserPhone(path)) {
uni.navigateTo({
url: item.path
});
// }
} else {
uni.showToast({
title: `暂未开放`,
icon: 'none'
});
}
}
</script>
<style scope lang="scss">
.welcome {
......
<template>
<view>
<view class="wBox">
<view class="tt">考级基本信息</view>
<view class="ddd">
<text class="lab">考级名称:</text>{{ form.name }}
</view>
<view class="ddd">
<text class="lab">申请日期:</text>{{form.applyTime}}
</view>
<view class="ddd">
<text class="lab">申请单位:</text>{{ form.memberName }}
</view>
<view class="ddd">
<text class="lab">考官:</text>{{form.examinerNames?.split(',').join('/')}}
</view>
<view class="ddd">
<text class="lab">考试开始时间:</text>{{form.startTime}}
</view>
<view class="ddd">
<text class="lab">考试结束时间:</text>{{form.endTime}}
</view>
<view class="ddd">
<text class="lab">考级地点:</text>{{form.address}}
</view>
<view class="ddd" v-if="app.globalData.showPrice">
<text class="lab">总金额:</text>{{(form.totalAmount*1).toFixed(2) }}
</view>
</view>
<view class="wBox">
<view class="tt">
考生信息
</view>
<view class="vipData">
<view><text>{{ tablePersonInfo.total }}</text></view>
<view v-for="l in tablePersonInfo.levelArr" :key="l.level">
{{ szToHz(l.level) }}级: <text>{{ l.num }} </text>
</view>
</view>
<view class="userlist">
<view class="item" v-for="n in list" style="background-color: #fffafa;">
<view class="w100">
<view class="name">{{n.realName}} <text>{{n.memName}}</text></view>
<!-- <view class="date">{{n.idcTypeStr}}{{n.idcCode}}</view> -->
<view class="flexbox">
<view>
原有级别
<text v-if="n.levelOld">{{ szToHz(n.levelOld) }}</text>
<text v-else>十级</text>
</view>
<view>
考试级别
<text>
{{ szToHz(n.levelNew) }}
</text>
</view>
<view v-if="app.globalData.showPrice">
金额
<text>
{{ (n.examFee * 1).toFixed(2) }}
</text>
</view>
<view>
是否通过
<text v-if="n.isPass=='1'" class="text-success">通过</text>
<text v-else class="text-danger">未通过</text>
</view>
</view>
</view>
<view>
<view class="wBox">
<view class="tt">考段基本信息</view>
<view class="ddd">
<text class="lab">考段名称:</text>{{ form.name }}
</view>
<view class="ddd">
<text class="lab">申请日期:</text>{{form.applyTime}}
</view>
<view class="ddd">
<text class="lab">申请单位:</text>{{ form.memberName }}
</view>
<view class="ddd">
<text class="lab">考官:</text>{{form.examinerNames?.split(',').join('/')}}
</view>
<view class="ddd">
<text class="lab">考试开始时间:</text>{{form.startTime}}
</view>
<view class="ddd">
<text class="lab">考试结束时间:</text>{{form.endTime}}
</view>
<view class="ddd">
<text class="lab">考段地点:</text>{{form.address}}
</view>
<view class="ddd" v-if="app.globalData.showPrice">
<text class="lab">总金额:</text>{{(form.totalAmount*1).toFixed(2) }}
</view>
</view>
<view class="wBox">
<view class="tt">
考生信息
</view>
<view class="vipData">
<view><text>{{ tablePersonInfo.total }}</text></view>
<view v-for="l in tablePersonInfo.levelArr" :key="l.level">
{{ szToHz(l.level) }}段: <text>{{ l.num }} </text>
</view>
</view>
<view class="userlist">
<view class="item" v-for="n in list" :key="n.id" style="background-color: #fffafa;">
<view class="w100">
<view class="name">{{n.realName}} <text>{{n.memName}}</text></view>
<!-- <view class="date">{{n.idcTypeStr}}{{n.idcCode}}</view> -->
<view class="flexbox">
<view>
原有段位
<text v-if="n.levelOld">{{ szToHz(n.levelOld) }}段/品</text>
<text v-else>--</text>
</view>
<view>
考试级别
<text v-if="n.levelNew">{{ szToHz(n.levelNew) }}段/品</text>
<text v-else>--</text>
</view>
<view v-if="app.globalData.showPrice">
金额
<text>
{{ (n.examFee * 1).toFixed(2) }}
</text>
</view>
<view>
是否通过
<text v-if="n.isPass=='1'" class="text-success">通过</text>
<text v-else class="text-danger">未通过</text>
</view>
</view>
</view>
</view>
</view>
</view>
</view>
</view>
<view class="wBox">
<view class="tt">
审核信息
</view>
<view>
<view class="stepItem" v-for="(n,index) in recordList">
<view class="time">{{n.handleDate||'待审批'}}</view>
<view class="content">
<view class="status">
<text :class="{
'text-success':n.auditStatus=='1',
'text-danger':n.auditStatus=='2',
'text-warning':n.auditStatus=='3'
}">{{ n.auditStatusStr }}</text>
</view>
<!-- <view class="name">{{index+1}}</view> -->
<view class="deptName">{{n.deptName}}</view>
<view v-if="n.auditStatus==2">
备注:{{n.reason||'/' }}
</view>
</view>
</view>
</view>
</view>
</view>
<view class="wBox">
<view class="tt">
审核信息
</view>
<view>
<view class="stepItem" v-for="(n,index) in recordList" :key="index">
<view class="time">{{n.handleDate||'待审批'}}</view>
<view class="content">
<view class="status">
<text :class="{
'text-success':n.auditStatus=='1',
'text-danger':n.auditStatus=='2',
'text-warning':n.auditStatus=='3'
}">{{ n.auditStatusStr }}</text>
</view>
<!-- <view class="name">{{index+1}}</view> -->
<view class="deptName">{{n.deptName}}</view>
<view v-if="n.auditStatus==2">
备注:{{n.reason||'' }}
</view>
</view>
</view>
</view>
</view>
</view>
</view>
</template>
<script setup>
import * as api from '@/common/api.js'
import config from '@/config.js'
import _ from 'lodash'
import {
onMounted,
ref
} from 'vue'
import {
onLoad,
onShow
} from '@dcloudio/uni-app'
const app = getApp();
const deptType = ref('')
const form = ref({})
const tablePersonInfo = ref({})
const recordList = ref([])
const list = ref([])
let examId = ''
onLoad((option) => {
examId = option.examId
})
onShow(() => {
if (app.globalData.isLogin) {
init()
} else {
app.firstLoadCallback = () => {
init()
};
}
})
import * as api from '@/common/api.js'
import config from '@/config.js'
import _ from 'lodash'
import {
onMounted,
ref
} from 'vue'
import {
onLoad,
onShow
} from '@dcloudio/uni-app'
import {szToHz} from '@/common/utils.js'
function init() {
uni.showLoading({
title: '加载中'
})
deptType.value = app.globalData.deptType
getForm()
getRecordList()
getTablePersonInfo()
}
const app = getApp();
const deptType = ref('')
const form = ref({})
const tablePersonInfo = ref({})
const recordList = ref([])
const list = ref([])
let examId = ''
onLoad((option) => {
examId = option.examId
})
onShow(() => {
if (app.globalData.isLogin) {
init()
} else {
app.firstLoadCallback = () => {
init()
};
}
})
function getForm() {
api.getLevelApplyInfo(examId).then(res => {
uni.hideLoading()
form.value = res.data
})
}
function init() {
uni.showLoading({
title: '加载中'
})
deptType.value = app.globalData.deptType
getForm()
getRecordList()
getTablePersonInfo()
}
function getRecordList() {
api.getApprovalRecord(examId).then(res => {
recordList.value = res.data.levelSteps
})
}
function getTablePersonInfo() {
api.getStudentList({
examId: examId
}).then(res=>{
list.value = res.rows
function getForm() {
api.getLevelApplyInfo(examId).then(res => {
uni.hideLoading()
form.value = res.data
})
}
function getRecordList() {
api.getApprovalRecord(examId).then(res => {
recordList.value = res.data.levelSteps
})
}
function getTablePersonInfo() {
api.getStudentList({
examId: examId
}).then(res=>{
list.value = res.rows
const total = list.value.length
const levelArr = []
_.each(list.value, (d) => {
const temp = _.find(levelArr, (l) => {
return l.level == d.levelNew
})
if (temp) {
temp.num++
} else {
levelArr.push({
level: d.levelNew,
num: 1
})
}
})
const total = list.value.length
const levelArr = []
_.each(list.value, (d) => {
const temp = _.find(levelArr, (l) => {
return l.level == d.levelNew
})
if (temp) {
temp.num++
} else {
levelArr.push({
level: d.levelNew,
num: 1
})
}
})
tablePersonInfo.value = {
total: total,
levelArr: _.sortBy(levelArr, (l) => {
return l.level
})
}
})
}
function szToHz(num) {
const hzArr = ['〇', '一', '二', '三', '四', '五', '六', '七', '八', '九', '十']
return hzArr[parseInt(num)]
}
tablePersonInfo.value = {
total: total,
levelArr: _.sortBy(levelArr, (l) => {
return l.level
})
}
})
}
</script>
<style scoped>
......
<template>
<view>
<!-- 段位考试审核 -->
<view class="appList">
<view class="appItem" v-for="item in list">
<view class="status" @click="goDetail(item)">
<text :class="{
'text-primary':item.status=='1',
'text-success':item.status=='2',
'text-danger':item.status=='3',
'text-warning':item.status=='4'
}">{{ item.statusStr }}</text>
</view>
<view>
<uni-segmented-control class="whitebg" :current="current" :values="navs" @clickItem="onClickItem"
styleType="text" activeColor="#AD181F"></uni-segmented-control>
<!-- 段位考试审核 -->
<view class="appList">
<view class="appItem" v-for="item in infoList" :key="item.recordId" >
<view @click="goDetail(item)">
<view class="status" >
<text :class="{
'text-primary':item.auditStatus=='0',
'text-success':item.auditStatus=='1',
'text-danger':item.auditStatus=='2',
'text-warning':item.auditStatus=='3'
}">{{ item.statusStr }}</text>
</view>
<view class="date" v-if="item.status!='0'&&item.submitTime">提交时间:{{item.submitTime}}</view>
<view class="name mt0" @click="goDetail(item)">{{item.name}}</view>
<view class="pp esp">考级日期:{{item.startTime.substring(0,16)}}{{item.endTime.substring(0,16)}}</view>
<view class="flexbox" @click="goDetail(item)">
<view>
申请日期
<view>{{item.applyTime.substring(0, 10)}}</view>
</view>
<view>
申请单位
<view>{{item.memberName}}</view>
</view>
<view>
通过人数
<view>{{item.pass}}</view>
</view>
</view>
<view class="func" v-if="item.auditStatus=='0'">
<button @click="audit(item,'2')">拒绝</button>
<button @click="audit(item,'1')">同意</button>
</view>
</view>
</view>
<view class="nodata" v-if="list.length==0">
<image mode="aspectFit" src="/static/nodata.png"></image>
<text>暂无数据</text>
</view>
</view>
<view class="date" v-if="item.status!='0'&&item.submitTime">提交时间:{{item.submitTime}}</view>
<view class="name mt0" >{{item.name}}</view>
<view class="pp esp">考级日期:{{item.startTime.substring(0,16)}}{{item.endTime.substring(0,16)}}</view>
<view class="flexbox" >
<view>
申请日期
<view>{{item.applyTime.substring(0, 10)}}</view>
</view>
<view>
申请单位
<view>{{item.memberName}}</view>
</view>
<view>
通过人数
<view>{{item.pass}}</view>
</view>
</view>
</view>
<view class="func" v-if="item.auditStatus=='0'">
<button @click="audit(item,'2')">拒绝</button>
<button @click="audit(item,'1')">同意</button>
</view>
</view>
</view>
<view class="nodata" v-if="infoList.length==0">
<image mode="aspectFit" src="/static/nodata.png"></image>
<text>暂无数据</text>
</view>
</view>
</template>
<script setup>
import * as api from '@/common/api.js'
import config from '@/config.js'
import _ from 'lodash'
import { ref } from 'vue'
import { onLoad,onShow } from '@dcloudio/uni-app'
import * as examApi from '@/common/api_exam.js'
import _ from 'lodash'
import { ref } from 'vue'
import { onLoad,onShow } from '@dcloudio/uni-app'
const app = getApp();
const queryParams = ref({
status: '0',
rankStatus:'0'
})
const current = ref()
const navs = ref(['审核中', '审核通过', '审核拒绝'])
const statusArr = ['审批中', '审批通过', '审批拒绝', '审批撤回']
const deptType = ref('')
const infoList = ref([])
const total = ref(0)
onLoad((options)=>{
queryParams.value.type=options.type
})
onShow(() => {
if (app.globalData.isLogin) {
init()
} else {
app.firstLoadCallback = () => {
init()
};
}
})
const app = getApp();
const queryParams = ref({
// type: '1',
// rankStatus: '0'
})
const list = ref([])
const deptType = ref('')
onShow(() => {
if (app.globalData.isLogin) {
init()
} else {
function init(){
uni.showLoading({
title: '加载中'
})
deptType.value = app.globalData.deptType
getList()
}
function onClickItem(e) {
uni.showLoading({
title: '加载中'
})
queryParams.value.status = e.currentIndex
getList()
}
function getList() {
examApi.getVerityList(queryParams.value).then(res => {
uni.hideLoading()
const list = []
_.each(res.rows, r => {
const item = JSON.parse(r.content)
item.recordId = r.recordId
item.auditStatus = r.auditStatus
item.submitStatus = r.submitStatus
item.distributeTime = r.distributeTime
item.statusStr = statusArr[r.auditStatus]
item.sourceData = r
item.scoreStatus = r.scoreStatus
item.status = r.status
item.isView = r.isView
item.payStatus = r.payStatus
item.rankStatus = r.rankStatus
item.processCentBar = r.processCentBar
list.push(item)
})
app.firstLoadCallback = () => {
init()
};
}
})
function init(){
uni.showLoading({
title: '加载中'
})
deptType.value = app.globalData.deptType
getList()
}
function getList() {
// api.getLevelList(queryParams.value).then(res => {
// uni.hideLoading()
// list.value = res.rows
// })
}
function audit(item, flag) {
console.log(item.sourceData)
var obj = {
flag: flag,
reason: null,
body: [JSON.stringify(item.sourceData)]
}
infoList.value = list
total.value = res.total
})
}
function audit(item, flag) {
console.log(item.sourceData)
var obj = {
flag: flag,
reason: null,
id: item.recordId
}
if (flag == '2') {
// 拒绝
// 弹出框填写理由
uni.showModal({
title: '请输入拒绝理由',
editable: true,
success: function(res) {
if (res.confirm) {
if (!res.content) {
uni.showToast({
title: '请输入拒绝理由',
icon: 'none'
})
} else {
obj.reason = res.content
doApproval(obj)
}
}
}
})
} else if (flag == '1') {
// 二次确认
uni.showModal({
title: '提示',
content: `确定审批通过吗`,
success: function(res) {
if (res.confirm) {
doApproval(obj)
}
}
})
}
}
if (flag == '2') {
// 拒绝
// 弹出框填写理由
uni.showModal({
title: '请输入拒绝理由',
editable: true,
success: function(res) {
if (res.confirm) {
if (!res.content) {
uni.showToast({
title: '请输入拒绝理由',
icon: 'none'
})
} else {
obj.reason = res.content
doApproval(obj)
}
}
}
})
} else if (flag == '1') {
// 二次确认
uni.showModal({
title: '提示',
content: `确定审批通过吗`,
success: function(res) {
if (res.confirm) {
doApproval(obj)
}
}
})
}
}
function doApproval(obj) {
console.log(obj)
api.doVerity(obj).then((res) => {
uni.showToast({
title: '操作成功',
icon: 'none'
})
getList()
})
}
function doApproval(obj) {
examApi.doMergeFlows(obj).then((res) => {
uni.showToast({
title: '操作成功',
icon: 'none'
})
getList()
})
}
function goDetail(item) {
let path = `/pages/rank/applyDetail?examId=${item.examId}`
uni.navigateTo({
url: path
});
}
</script>
<style lang="scss" scoped>
......
<template>
<view>
<view class="appList">
<view class="appItem" v-for="item in infoList">
<view class="status" @click="goDetail(item)">
<text :class="{
'text-primary':item.auditStatus=='0',
'text-success':item.auditStatus=='1',
'text-danger':item.auditStatus=='2',
'text-warning':item.auditStatus=='3'
}">{{ item.statusStr }}</text>
</view>
<view class="date" v-if="item.status!='0'&&item.submitTime">提交时间:{{item.submitTime}}</view>
<view class="name mt0" @click="goDetail(item)">{{item.name}}</view>
<view class="pp esp">考级日期:{{item.startTime.substring(0,16)}}{{item.endTime.substring(0,16)}}</view>
<view class="flexbox" @click="goDetail(item)">
<view>
申请日期
<view>{{item.applyTime.substring(0, 10)}}</view>
</view>
<view>
申请单位
<view>{{item.memberName}}</view>
</view>
<view>
通过人数
<view>{{item.pass}}</view>
</view>
</view>
<view class="func">
<button @click="send()">一键生成</button>
</view>
</view>
</view>
<view>
<uni-segmented-control class="whitebg" :current="current" :values="navs" @clickItem="onClickItem"
styleType="text" activeColor="#AD181F"></uni-segmented-control>
<view class="appList">
<view class="appItem" v-for="item in infoList" :key="item.payId" >
<view @click="goDetail(item)">
<view class="status" >
<text :class="{
'text-primary':item.certStatus=='0',
'text-warning':item.certStatus=='1',
'text-success':item.certStatus=='2',
}">{{ item.certStatusStr }}</text>
</view>
<view class="nodata" v-if="infoList.length==0">
<image mode="aspectFit" src="/static/nodata.png"></image>
<text>暂无数据</text>
</view>
</view>
<view class="date">结算编号:{{item.payCode}}</view>
<view class="name mt0" >{{item.name}}</view>
<view class="pp esp">考试时间:{{item.startTime?.substring(0,16)}}{{item.endTime?.substring(0,16)}}</view>
<view class="flexbox" >
<view>
申请日期
<view>{{item.applyTime?.substring(0, 10)}}</view>
</view>
<view>
申请单位
<view>{{item.memberName}}</view>
</view>
<view>
已发证书
<view>{{item.hasCerts}}</view>
</view>
<view>
待发证书
<view>{{item.noCerts}}</view>
</view>
</view>
</view>
<view class="func">
<button @click="send(item)">一键生成</button>
</view>
</view>
</view>
<view class="nodata" v-if="infoList.length==0">
<image mode="aspectFit" src="/static/nodata.png"></image>
<text>暂无数据</text>
</view>
</view>
</template>
<script setup>
import * as api from '@/common/api.js'
import config from '@/config.js'
import _ from 'lodash'
import {
onMounted,
ref
} from 'vue'
import {
onLoad,
onShow
} from '@dcloudio/uni-app'
const app = getApp();
const queryParams = ref({
// pageNum: 1,
// pageSize: 10
status: '0',
type: '1'
})
const statusArr = ['审批中', '审批通过', '审批拒绝', '审批撤回']
const current = ref()
const infoList = ref([])
const total = ref(0)
const deptType = ref('')
const userType = ref('')
onLoad((option) => {
})
onShow(() => {
if (app.globalData.isLogin) {
init()
} else {
app.firstLoadCallback = () => {
init()
};
}
})
function init() {
uni.showLoading({
title: '加载中'
})
deptType.value = app.globalData.deptType
userType.value = app.globalData.userType
getList()
}
function getList() {
api.getVerityList(queryParams.value).then(res => {
uni.hideLoading()
infoList.value = res.rows
})
}
function goDetail(item) {
if(item.status!='0'){
let path = `/pages/level/applyDetail?examId=${item.examId}`
uni.navigateTo({
url: path
});
} else {
return
}
}
function send(){
}
</script>
<script setup>
import * as examApi from '@/common/api_exam.js'
import _ from 'lodash'
import { ref } from 'vue'
import { onLoad,onShow } from '@dcloudio/uni-app'
const app = getApp();
const queryParams = ref({})
const current = ref()
const navs = ref(['未发放', '部分发放', '已发放'])
const deptType = ref('')
const infoList = ref([])
const total = ref(0)
onLoad((options)=>{
queryParams.value.type=options.type
})
onShow(() => {
if (app.globalData.isLogin) {
init()
} else {
app.firstLoadCallback = () => {
init()
};
}
})
function init(){
uni.showLoading({
title: '加载中'
})
deptType.value = app.globalData.deptType
getList()
}
function onClickItem(e) {
uni.showLoading({
title: '加载中'
})
queryParams.value.certStatus = e.currentIndex
getList()
}
function getList() {
examApi.certsLList(queryParams.value).then(res => {
uni.hideLoading()
infoList.value = res.rows
total.value = res.total
})
}
function send(item) {
uni.showModal({
title: '提示',
content: `确定一键下发 ${item.name} 的证书?`,
success: function(res) {
if (res.confirm) {
examApi.submitCert([{
id: item.payId
}]).then(()=>{
uni.showToast({
title: '操作成功',
icon: 'none'
})
getList()
})
}
}
})
}
function goDetail(item) {
let path = `/pages/rank/applyDetail?examId=${item.examId}`
uni.navigateTo({
url: path
});
}
</script>
<style lang="scss" scoped>
<style scoped lang="scss">
.mt0 {
margin-top: 0 !important;
}
.appList .appItem .name {
width: 80%;
word-break: break-all;
}
</style>
......
<template>
<view>
<!-- 段位考试审核 -->
<view class="appList">
<view class="appItem" v-for="item in list">
<view class="status" @click="goDetail(item)">
<text :class="{
'text-primary':item.status=='1',
'text-success':item.status=='2',
'text-danger':item.status=='3',
'text-warning':item.status=='4'
}">{{ item.statusStr }}</text>
</view>
<view>
<uni-segmented-control class="whitebg" :current="current" :values="navs" @clickItem="onClickItem"
styleType="text" activeColor="#AD181F"></uni-segmented-control>
<!-- 段位考试审核 -->
<view class="appList">
<view class="appItem" v-for="item in infoList" :key="item.recordId" >
<view @click="goDetail(item)">
<view class="status" >
<text :class="{
'text-primary':item.auditStatus=='0',
'text-success':item.auditStatus=='1',
'text-danger':item.auditStatus=='2',
'text-warning':item.auditStatus=='3'
}">{{ item.statusStr }}</text>
</view>
<view class="date" v-if="item.status!='0'&&item.submitTime">提交时间:{{item.submitTime}}</view>
<view class="name mt0" @click="goDetail(item)">{{item.name}}</view>
<view class="pp esp">考级日期:{{item.startTime.substring(0,16)}}{{item.endTime.substring(0,16)}}</view>
<view class="flexbox" @click="goDetail(item)">
<view>
申请日期
<view>{{item.applyTime.substring(0, 10)}}</view>
</view>
<view>
申请单位
<view>{{item.memberName}}</view>
</view>
<view>
通过人数
<view>{{item.pass}}</view>
</view>
</view>
<view class="func" v-if="item.auditStatus=='0'">
<button @click="audit(item,'2')">拒绝</button>
<button @click="audit(item,'1')">同意</button>
</view>
</view>
</view>
<view class="nodata" v-if="list.length==0">
<image mode="aspectFit" src="/static/nodata.png"></image>
<text>暂无数据</text>
</view>
</view>
<view class="date" v-if="item.status!='0'&&item.submitTime">提交时间:{{item.submitTime}}</view>
<view class="name mt0" >{{item.name}}</view>
<view class="pp esp">考级日期:{{item.startTime.substring(0,16)}}{{item.endTime.substring(0,16)}}</view>
<view class="flexbox" >
<view>
申请日期
<view>{{item.applyTime.substring(0, 10)}}</view>
</view>
<view>
申请单位
<view>{{item.memberName}}</view>
</view>
<view>
通过人数
<view>{{item.pass}}</view>
</view>
</view>
</view>
<view class="func" v-if="item.auditStatus=='0'">
<button @click="audit(item,'2')">拒绝</button>
<button @click="audit(item,'1')">同意</button>
</view>
</view>
</view>
<view class="nodata" v-if="infoList.length==0">
<image mode="aspectFit" src="/static/nodata.png"></image>
<text>暂无数据</text>
</view>
</view>
</template>
<script setup>
import * as api from '@/common/api.js'
import config from '@/config.js'
import _ from 'lodash'
import { ref } from 'vue'
import { onLoad,onShow } from '@dcloudio/uni-app'
import * as examApi from '@/common/api_exam.js'
import _ from 'lodash'
import { ref } from 'vue'
import { onLoad,onShow } from '@dcloudio/uni-app'
const app = getApp();
const queryParams = ref({
status: '0',
rankStatus:'1'
})
const current = ref()
const navs = ref(['审核中', '审核通过', '审核拒绝'])
const statusArr = ['审批中', '审批通过', '审批拒绝', '审批撤回']
const deptType = ref('')
const infoList = ref([])
const total = ref(0)
onLoad((options)=>{
queryParams.value.type=options.type
})
onShow(() => {
if (app.globalData.isLogin) {
init()
} else {
app.firstLoadCallback = () => {
init()
};
}
})
const app = getApp();
const queryParams = ref({
// type: '1',
// rankStatus: '0'
})
const list = ref([])
const deptType = ref('')
onShow(() => {
if (app.globalData.isLogin) {
init()
} else {
function init(){
uni.showLoading({
title: '加载中'
})
deptType.value = app.globalData.deptType
getList()
}
function onClickItem(e) {
uni.showLoading({
title: '加载中'
})
queryParams.value.status = e.currentIndex
getList()
}
function getList() {
examApi.getVerityList(queryParams.value).then(res => {
uni.hideLoading()
const list = []
_.each(res.rows, r => {
const item = JSON.parse(r.content)
item.recordId = r.recordId
item.auditStatus = r.auditStatus
item.submitStatus = r.submitStatus
item.distributeTime = r.distributeTime
item.statusStr = statusArr[r.auditStatus]
item.sourceData = r
item.scoreStatus = r.scoreStatus
item.status = r.status
item.isView = r.isView
item.payStatus = r.payStatus
item.rankStatus = r.rankStatus
item.processCentBar = r.processCentBar
list.push(item)
})
app.firstLoadCallback = () => {
init()
};
}
})
function init(){
uni.showLoading({
title: '加载中'
})
deptType.value = app.globalData.deptType
getList()
}
function getList() {
// api.getLevelList(queryParams.value).then(res => {
// uni.hideLoading()
// list.value = res.rows
// })
}
function audit(item, flag) {
console.log(item.sourceData)
var obj = {
flag: flag,
reason: null,
body: [JSON.stringify(item.sourceData)]
}
infoList.value = list
total.value = res.total
})
}
function audit(item, flag) {
console.log(item.sourceData)
var obj = {
flag: flag,
reason: null,
id: item.recordId
}
if (flag == '2') {
// 拒绝
// 弹出框填写理由
uni.showModal({
title: '请输入拒绝理由',
editable: true,
success: function(res) {
if (res.confirm) {
if (!res.content) {
uni.showToast({
title: '请输入拒绝理由',
icon: 'none'
})
} else {
obj.reason = res.content
doApproval(obj)
}
}
}
})
} else if (flag == '1') {
// 二次确认
uni.showModal({
title: '提示',
content: `确定审批通过吗`,
success: function(res) {
if (res.confirm) {
doApproval(obj)
}
}
})
}
}
if (flag == '2') {
// 拒绝
// 弹出框填写理由
uni.showModal({
title: '请输入拒绝理由',
editable: true,
success: function(res) {
if (res.confirm) {
if (!res.content) {
uni.showToast({
title: '请输入拒绝理由',
icon: 'none'
})
} else {
obj.reason = res.content
doApproval(obj)
}
}
}
})
} else if (flag == '1') {
// 二次确认
uni.showModal({
title: '提示',
content: `确定审批通过吗`,
success: function(res) {
if (res.confirm) {
doApproval(obj)
}
}
})
}
}
function doApproval(obj) {
console.log(obj)
api.doVerity(obj).then((res) => {
uni.showToast({
title: '操作成功',
icon: 'none'
})
getList()
})
}
function doApproval(obj) {
examApi.doMergeFlows(obj).then((res) => {
uni.showToast({
title: '操作成功',
icon: 'none'
})
getList()
})
}
function goDetail(item) {
let path = `/pages/rank/applyDetail?examId=${item.examId}`
uni.navigateTo({
url: path
});
}
</script>
<style lang="scss" scoped>
......
<template>
<view>
<view class="wBox">
<view class="tt">考级基本信息</view>
<view class="ddd">
<text class="lab">考级名称:</text>{{ form.name }}
</view>
<view class="ddd">
<text class="lab">申请日期:</text>{{form.applyTime}}
</view>
<view class="ddd">
<text class="lab">申请单位:</text>{{ form.memberName }}
</view>
<view class="ddd">
<text class="lab">考官:</text>{{form.examinerNames?.split(',').join('/')}}
</view>
<view class="ddd">
<text class="lab">考试开始时间:</text>{{form.startTime}}
</view>
<view class="ddd">
<text class="lab">考试结束时间:</text>{{form.endTime}}
</view>
<view class="ddd">
<text class="lab">考级地点:</text>{{form.address}}
</view>
<view class="ddd" v-if="app.globalData.showPrice">
<text class="lab">总金额:</text>{{(form.totalAmount*1).toFixed(2) }}
</view>
</view>
<view class="wBox">
<view class="tt">
考生信息
</view>
<view class="vipData">
<view><text>{{ tablePersonInfo.total }}</text></view>
<view v-for="l in tablePersonInfo.levelArr" :key="l.level">
{{ szToHz(l.level) }}级: <text>{{ l.num }} </text>
</view>
</view>
<view class="userlist">
<view class="item" v-for="n in list" style="background-color: #fffafa;">
<view class="w100">
<view class="name">{{n.realName}} <text>{{n.memName}}</text></view>
<!-- <view class="date">{{n.idcTypeStr}}{{n.idcCode}}</view> -->
<view class="flexbox">
<view>
原有级别
<text v-if="n.levelOld">{{ szToHz(n.levelOld) }}</text>
<text v-else>十级</text>
</view>
<view>
考试级别
<text>
{{ szToHz(n.levelNew) }}
</text>
</view>
<view v-if="app.globalData.showPrice">
金额
<text>
{{ (n.examFee * 1).toFixed(2) }}
</text>
</view>
<view>
是否通过
<text v-if="n.isPass=='1'" class="text-success">通过</text>
<text v-else class="text-danger">未通过</text>
</view>
</view>
</view>
</view>
</view>
</view>
<view class="wBox">
<view class="tt">
审核信息
</view>
<view>
<view class="stepItem" v-for="(n,index) in recordList">
<view class="time">{{n.handleDate||'待审批'}}</view>
<view class="content">
<view class="status">
<text :class="{
'text-success':n.auditStatus=='1',
'text-danger':n.auditStatus=='2',
'text-warning':n.auditStatus=='3'
}">{{ n.auditStatusStr }}</text>
</view>
<!-- <view class="name">{{index+1}}</view> -->
<view class="deptName">{{n.deptName}}</view>
<view v-if="n.auditStatus==2">
备注:{{n.reason||'/' }}
</view>
</view>
</view>
</view>
</view>
</view>
</template>
<script setup>
import * as api from '@/common/api.js'
import config from '@/config.js'
import _ from 'lodash'
import {
onMounted,
ref
} from 'vue'
import {
onLoad,
onShow
} from '@dcloudio/uni-app'
const app = getApp();
const deptType = ref('')
const form = ref({})
const tablePersonInfo = ref({})
const recordList = ref([])
const list = ref([])
let examId = ''
onLoad((option) => {
examId = option.examId
})
onShow(() => {
if (app.globalData.isLogin) {
init()
} else {
app.firstLoadCallback = () => {
init()
};
}
})
function init() {
uni.showLoading({
title: '加载中'
})
deptType.value = app.globalData.deptType
getForm()
getRecordList()
getTablePersonInfo()
}
function getForm() {
api.getLevelApplyInfo(examId).then(res => {
uni.hideLoading()
form.value = res.data
})
}
function getRecordList() {
api.getApprovalRecord(examId).then(res => {
recordList.value = res.data.levelSteps
})
}
function getTablePersonInfo() {
api.getStudentList({
examId: examId
}).then(res=>{
list.value = res.rows
const total = list.value.length
const levelArr = []
_.each(list.value, (d) => {
const temp = _.find(levelArr, (l) => {
return l.level == d.levelNew
})
if (temp) {
temp.num++
} else {
levelArr.push({
level: d.levelNew,
num: 1
})
}
})
tablePersonInfo.value = {
total: total,
levelArr: _.sortBy(levelArr, (l) => {
return l.level
})
}
})
}
function szToHz(num) {
const hzArr = ['〇', '一', '二', '三', '四', '五', '六', '七', '八', '九', '十']
return hzArr[parseInt(num)]
}
</script>
<style scoped>
.wBox {
width: 700rpx;
padding: 30rpx;
margin: 20rpx auto;
background: #FFFFFF;
box-shadow: 0rpx 12rpx 116rpx 0rpx rgba(196, 203, 214, 0.1);
border-radius: 15rpx;
.tt {
color: #0A1629;margin: 0 0 30rpx;
font-size: 30rpx;
}
.ddd{font-size: 28rpx;color: #333;
.lab{color: #999;display: inline-block;text-align: justify;}
}
}
</style>
\ No newline at end of file
<template>
<view>
<!-- 段位考试审核 -->
<view class="appList">
<view class="appItem" v-for="item in list">
<view class="status" @click="goDetail(item)">
<text :class="{
'text-primary':item.status=='1',
'text-success':item.status=='2',
'text-danger':item.status=='3',
'text-warning':item.status=='4'
}">{{ item.statusStr }}</text>
</view>
<view class="date" v-if="item.status!='0'&&item.submitTime">提交时间:{{item.submitTime}}</view>
<view class="name mt0" @click="goDetail(item)">{{item.name}}</view>
<view class="pp esp">考级日期:{{item.startTime.substring(0,16)}}{{item.endTime.substring(0,16)}}</view>
<view class="flexbox" @click="goDetail(item)">
<view>
申请日期
<view>{{item.applyTime.substring(0, 10)}}</view>
</view>
<view>
申请单位
<view>{{item.memberName}}</view>
</view>
<view>
通过人数
<view>{{item.pass}}</view>
</view>
</view>
<view class="func" v-if="item.auditStatus=='0'">
<button @click="audit(item,'2')">拒绝</button>
<button @click="audit(item,'1')">同意</button>
</view>
</view>
</view>
<view class="nodata" v-if="list.length==0">
<image mode="aspectFit" src="/static/nodata.png"></image>
<text>暂无数据</text>
</view>
</view>
</template>
<script setup>
import * as api from '@/common/api.js'
import config from '@/config.js'
import _ from 'lodash'
import { ref } from 'vue'
import { onLoad,onShow } from '@dcloudio/uni-app'
const app = getApp();
const queryParams = ref({
// type: '1',
// rankStatus: '0'
})
const list = ref([])
const deptType = ref('')
onShow(() => {
if (app.globalData.isLogin) {
init()
} else {
app.firstLoadCallback = () => {
init()
};
}
})
function init(){
uni.showLoading({
title: '加载中'
})
deptType.value = app.globalData.deptType
getList()
}
function getList() {
// api.getLevelList(queryParams.value).then(res => {
// uni.hideLoading()
// list.value = res.rows
// })
}
function audit(item, flag) {
console.log(item.sourceData)
var obj = {
flag: flag,
reason: null,
body: [JSON.stringify(item.sourceData)]
}
if (flag == '2') {
// 拒绝
// 弹出框填写理由
uni.showModal({
title: '请输入拒绝理由',
editable: true,
success: function(res) {
if (res.confirm) {
if (!res.content) {
uni.showToast({
title: '请输入拒绝理由',
icon: 'none'
})
} else {
obj.reason = res.content
doApproval(obj)
}
}
}
})
} else if (flag == '1') {
// 二次确认
uni.showModal({
title: '提示',
content: `确定审批通过吗`,
success: function(res) {
if (res.confirm) {
doApproval(obj)
}
}
})
}
}
function doApproval(obj) {
console.log(obj)
api.doVerity(obj).then((res) => {
uni.showToast({
title: '操作成功',
icon: 'none'
})
getList()
})
}
</script>
<style lang="scss" scoped>
</style>
<template>
<view>
<view class="appList">
<view class="appItem" v-for="item in infoList">
<view class="status" @click="goDetail(item)">
<text :class="{
'text-primary':item.auditStatus=='0',
'text-success':item.auditStatus=='1',
'text-danger':item.auditStatus=='2',
'text-warning':item.auditStatus=='3'
}">{{ item.statusStr }}</text>
</view>
<view class="date" v-if="item.status!='0'&&item.submitTime">提交时间:{{item.submitTime}}</view>
<view class="name mt0" @click="goDetail(item)">{{item.name}}</view>
<view class="pp esp">考级日期:{{item.startTime.substring(0,16)}}{{item.endTime.substring(0,16)}}</view>
<view class="flexbox" @click="goDetail(item)">
<view>
申请日期
<view>{{item.applyTime.substring(0, 10)}}</view>
</view>
<view>
申请单位
<view>{{item.memberName}}</view>
</view>
<view>
通过人数
<view>{{item.pass}}</view>
</view>
</view>
<view class="func">
<button @click="send()">一键生成</button>
</view>
</view>
</view>
<view class="nodata" v-if="infoList.length==0">
<image mode="aspectFit" src="/static/nodata.png"></image>
<text>暂无数据</text>
</view>
</view>
</template>
<script setup>
import * as api from '@/common/api.js'
import config from '@/config.js'
import _ from 'lodash'
import {
onMounted,
ref
} from 'vue'
import {
onLoad,
onShow
} from '@dcloudio/uni-app'
const app = getApp();
const queryParams = ref({
// pageNum: 1,
// pageSize: 10
status: '0',
type: '1'
})
const statusArr = ['审批中', '审批通过', '审批拒绝', '审批撤回']
const current = ref()
const infoList = ref([])
const total = ref(0)
const deptType = ref('')
const userType = ref('')
onLoad((option) => {
})
onShow(() => {
if (app.globalData.isLogin) {
init()
} else {
app.firstLoadCallback = () => {
init()
};
}
})
function init() {
uni.showLoading({
title: '加载中'
})
deptType.value = app.globalData.deptType
userType.value = app.globalData.userType
getList()
}
function getList() {
api.getVerityList(queryParams.value).then(res => {
uni.hideLoading()
infoList.value = res.rows
})
}
function goDetail(item) {
if(item.status!='0'){
let path = `/pages/level/applyDetail?examId=${item.examId}`
uni.navigateTo({
url: path
});
} else {
return
}
}
function send(){
}
</script>
<style scoped lang="scss">
.mt0 {
margin-top: 0 !important;
}
.appList .appItem .name {
width: 80%;
word-break: break-all;
}
</style>
<template>
<view>
<!-- 段位考试审核 -->
<view class="appList">
<view class="appItem" v-for="item in list">
<view class="status" @click="goDetail(item)">
<text :class="{
'text-primary':item.status=='1',
'text-success':item.status=='2',
'text-danger':item.status=='3',
'text-warning':item.status=='4'
}">{{ item.statusStr }}</text>
</view>
<view class="date" v-if="item.status!='0'&&item.submitTime">提交时间:{{item.submitTime}}</view>
<view class="name mt0" @click="goDetail(item)">{{item.name}}</view>
<view class="pp esp">考级日期:{{item.startTime.substring(0,16)}}{{item.endTime.substring(0,16)}}</view>
<view class="flexbox" @click="goDetail(item)">
<view>
申请日期
<view>{{item.applyTime.substring(0, 10)}}</view>
</view>
<view>
申请单位
<view>{{item.memberName}}</view>
</view>
<view>
通过人数
<view>{{item.pass}}</view>
</view>
</view>
<view class="func" v-if="item.auditStatus=='0'">
<button @click="audit(item,'2')">拒绝</button>
<button @click="audit(item,'1')">同意</button>
</view>
</view>
</view>
<view class="nodata" v-if="list.length==0">
<image mode="aspectFit" src="/static/nodata.png"></image>
<text>暂无数据</text>
</view>
</view>
</template>
<script setup>
import * as api from '@/common/api.js'
import config from '@/config.js'
import _ from 'lodash'
import { ref } from 'vue'
import { onLoad,onShow } from '@dcloudio/uni-app'
const app = getApp();
const queryParams = ref({
// type: '1',
// rankStatus: '0'
})
const list = ref([])
const deptType = ref('')
onShow(() => {
if (app.globalData.isLogin) {
init()
} else {
app.firstLoadCallback = () => {
init()
};
}
})
function init(){
uni.showLoading({
title: '加载中'
})
deptType.value = app.globalData.deptType
getList()
}
function getList() {
// api.getLevelList(queryParams.value).then(res => {
// uni.hideLoading()
// list.value = res.rows
// })
}
function audit(item, flag) {
console.log(item.sourceData)
var obj = {
flag: flag,
reason: null,
body: [JSON.stringify(item.sourceData)]
}
if (flag == '2') {
// 拒绝
// 弹出框填写理由
uni.showModal({
title: '请输入拒绝理由',
editable: true,
success: function(res) {
if (res.confirm) {
if (!res.content) {
uni.showToast({
title: '请输入拒绝理由',
icon: 'none'
})
} else {
obj.reason = res.content
doApproval(obj)
}
}
}
})
} else if (flag == '1') {
// 二次确认
uni.showModal({
title: '提示',
content: `确定审批通过吗`,
success: function(res) {
if (res.confirm) {
doApproval(obj)
}
}
})
}
}
function doApproval(obj) {
console.log(obj)
api.doVerity(obj).then((res) => {
uni.showToast({
title: '操作成功',
icon: 'none'
})
getList()
})
}
</script>
<style lang="scss" scoped>
</style>
Styling with Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!