2afd2229 by 华明祺

段位考试审批

1 parent 4c57b42c
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>
<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!