2afd2229 by 华明祺

段位考试审批

1 parent 4c57b42c
1 import request from './request.js'
2
3 /**
4 * 审批列表
5 * @returns {*}
6 */
7 export function getVerityList(params) {
8 return request({
9 url: '/exam/info/verityList',
10 method: 'get',
11 params: params
12 })
13 }
14
15 /**
16 * 审批
17 * @param {Object} data
18 */
19 export function doMergeFlows(data) {
20 return request({
21 url: `/exam/info/submit/mergeFlows`,
22 method: 'post',
23 params: data
24 })
25 }
26
27
28 /**
29 * 查询证书列表
30 * @param query
31 * @returns {*}
32 */
33 export function certsLList(query) {
34 return request({
35 url: '/exam/payment/certsList',
36 method: 'get',
37 params: query
38 })
39 }
40
41 /**
42 * 一键下发
43 * @param data
44 * @returns {*}
45 */
46 export function submitCert(data) {
47 return request({
48 url: `/exam/payment/submitCerts/nesting`,
49 method: 'put',
50 params: data
51 })
52 }
...@@ -39,6 +39,14 @@ const request = function(req) { ...@@ -39,6 +39,14 @@ const request = function(req) {
39 }) 39 })
40 return 40 return
41 } 41 }
42
43 if (req.method === 'GET') {
44 if (!req.params) {
45 req.params = {}
46 }
47 req.params.pageNum = req.params.pageNum || 1
48 req.params.pageSize = req.params.pageSize || 50
49 }
42 50
43 // if (req.method == 'POST' && !req.hideLoding) { 51 // if (req.method == 'POST' && !req.hideLoding) {
44 // uni.showLoading({ 52 // uni.showLoading({
...@@ -56,10 +64,10 @@ const request = function(req) { ...@@ -56,10 +64,10 @@ const request = function(req) {
56 switch (res.statusCode) { 64 switch (res.statusCode) {
57 case 200: 65 case 200:
58 const data = res.data || {} 66 const data = res.data || {}
59 if (data.code === 200||data.pageData?.code === 200) { 67 if (data.code === 200 || data.pageData?.code === 200) {
60 resolve(data) 68 resolve(data)
61 } else if (req.url.indexOf('getMemberCountInfo')>-1){ 69 } else if (req.url.indexOf('getMemberCountInfo') > -1) {
62 resolve(data) 70 resolve(data)
63 } else { 71 } else {
64 if (!excludeUrls.includes(req.url)) { 72 if (!excludeUrls.includes(req.url)) {
65 uni.showToast({ 73 uni.showToast({
......
1 export function szToHz(num) {
2 const hzArr = ['〇', '一', '二', '三', '四', '五', '六', '七', '八', '九', '十']
3 return hzArr[parseInt(num)]
4 }
...@@ -188,13 +188,6 @@ ...@@ -188,13 +188,6 @@
188 } 188 }
189 189
190 }, { 190 }, {
191 "path": "pages/rank/skip/approval",
192 "style": {
193 "navigationBarTitleText": "越段考试审批",
194 "enablePullDownRefresh": false
195 }
196
197 }, {
198 "path": "pages/rank/apply", 191 "path": "pages/rank/apply",
199 "style": { 192 "style": {
200 "navigationBarTitleText": "段位考试申请", 193 "navigationBarTitleText": "段位考试申请",
...@@ -209,13 +202,6 @@ ...@@ -209,13 +202,6 @@
209 } 202 }
210 203
211 }, { 204 }, {
212 "path": "pages/rank/skip/applyDetail",
213 "style": {
214 "navigationBarTitleText": "越段考试详情",
215 "enablePullDownRefresh": false
216 }
217
218 }, {
219 "path": "pages/index/perfect", 205 "path": "pages/index/perfect",
220 "style": { 206 "style": {
221 "navigationBarTitleText": "注册引导", 207 "navigationBarTitleText": "注册引导",
...@@ -409,16 +395,9 @@ ...@@ -409,16 +395,9 @@
409 } 395 }
410 396
411 }, { 397 }, {
412 "path": "pages/rank/skip/scoreApproval", 398 "path": "pages/rank/cert",
413 "style": {
414 "navigationBarTitleText": "越段考试成绩审核",
415 "enablePullDownRefresh": false
416 }
417
418 }, {
419 "path": "pages/rank/skip/cert",
420 "style": { 399 "style": {
421 "navigationBarTitleText": "段证书发布", 400 "navigationBarTitleText": "段证书发布",
422 "enablePullDownRefresh": false 401 "enablePullDownRefresh": false
423 } 402 }
424 } 403 }
......
1 <template> 1 <template>
2 <view> 2 <view>
3 <view class="wBox"> 3 <view class="wBox">
4 <view class="tt">考级基本信息</view> 4 <view class="tt">考段基本信息</view>
5 <view class="ddd"> 5 <view class="ddd">
6 <text class="lab">考级名称:</text>{{ form.name }} 6 <text class="lab">考段名称:</text>{{ form.name }}
7 </view> 7 </view>
8 <view class="ddd"> 8 <view class="ddd">
9 <text class="lab">申请日期:</text>{{form.applyTime}} 9 <text class="lab">申请日期:</text>{{form.applyTime}}
10 </view> 10 </view>
11 <view class="ddd"> 11 <view class="ddd">
12 <text class="lab">申请单位:</text>{{ form.memberName }} 12 <text class="lab">申请单位:</text>{{ form.memberName }}
13 </view> 13 </view>
14 <view class="ddd"> 14 <view class="ddd">
15 <text class="lab">考官:</text>{{form.examinerNames?.split(',').join('/')}} 15 <text class="lab">考官:</text>{{form.examinerNames?.split(',').join('/')}}
16 </view> 16 </view>
17 <view class="ddd"> 17 <view class="ddd">
18 <text class="lab">考试开始时间:</text>{{form.startTime}} 18 <text class="lab">考试开始时间:</text>{{form.startTime}}
19 </view> 19 </view>
20 <view class="ddd"> 20 <view class="ddd">
21 <text class="lab">考试结束时间:</text>{{form.endTime}} 21 <text class="lab">考试结束时间:</text>{{form.endTime}}
22 </view> 22 </view>
23 <view class="ddd"> 23 <view class="ddd">
24 <text class="lab">考级地点:</text>{{form.address}} 24 <text class="lab">考段地点:</text>{{form.address}}
25 </view> 25 </view>
26 <view class="ddd" v-if="app.globalData.showPrice"> 26 <view class="ddd" v-if="app.globalData.showPrice">
27 <text class="lab">总金额:</text>{{(form.totalAmount*1).toFixed(2) }} 27 <text class="lab">总金额:</text>{{(form.totalAmount*1).toFixed(2) }}
28 </view> 28 </view>
29 </view> 29 </view>
30 <view class="wBox"> 30 <view class="wBox">
31 <view class="tt"> 31 <view class="tt">
32 考生信息 32 考生信息
33 </view> 33 </view>
34 <view class="vipData"> 34 <view class="vipData">
35 <view><text>{{ tablePersonInfo.total }}</text></view> 35 <view><text>{{ tablePersonInfo.total }}</text></view>
36 <view v-for="l in tablePersonInfo.levelArr" :key="l.level"> 36 <view v-for="l in tablePersonInfo.levelArr" :key="l.level">
37 {{ szToHz(l.level) }}级: <text>{{ l.num }} </text> 37 {{ szToHz(l.level) }}段: <text>{{ l.num }} </text>
38 </view> 38 </view>
39 </view> 39 </view>
40 <view class="userlist"> 40 <view class="userlist">
41 <view class="item" v-for="n in list" style="background-color: #fffafa;"> 41 <view class="item" v-for="n in list" :key="n.id" style="background-color: #fffafa;">
42 <view class="w100"> 42 <view class="w100">
43 <view class="name">{{n.realName}} <text>{{n.memName}}</text></view> 43 <view class="name">{{n.realName}} <text>{{n.memName}}</text></view>
44 <!-- <view class="date">{{n.idcTypeStr}}{{n.idcCode}}</view> --> 44 <!-- <view class="date">{{n.idcTypeStr}}{{n.idcCode}}</view> -->
45 <view class="flexbox"> 45 <view class="flexbox">
46 <view> 46 <view>
47 原有级别 47 原有段位
48 <text v-if="n.levelOld">{{ szToHz(n.levelOld) }}</text> 48 <text v-if="n.levelOld">{{ szToHz(n.levelOld) }}段/品</text>
49 <text v-else>十级</text> 49 <text v-else>--</text>
50 </view> 50 </view>
51 <view> 51 <view>
52 考试级别 52 考试级别
53 <text> 53 <text v-if="n.levelNew">{{ szToHz(n.levelNew) }}段/品</text>
54 {{ szToHz(n.levelNew) }} 54 <text v-else>--</text>
55 </text> 55 </view>
56 </view> 56 <view v-if="app.globalData.showPrice">
57 <view v-if="app.globalData.showPrice"> 57 金额
58 金额 58 <text>
59 <text> 59 {{ (n.examFee * 1).toFixed(2) }}
60 {{ (n.examFee * 1).toFixed(2) }} 60 </text>
61 </text> 61 </view>
62 </view> 62 <view>
63 <view> 63 是否通过
64 是否通过 64 <text v-if="n.isPass=='1'" class="text-success">通过</text>
65 <text v-if="n.isPass=='1'" class="text-success">通过</text> 65 <text v-else class="text-danger">未通过</text>
66 <text v-else class="text-danger">未通过</text> 66 </view>
67 </view> 67 </view>
68 </view> 68 </view>
69 </view>
70 69
71 </view> 70 </view>
72 </view> 71 </view>
73 72
74 </view> 73 </view>
75 <view class="wBox"> 74 <view class="wBox">
76 <view class="tt"> 75 <view class="tt">
77 审核信息 76 审核信息
78 </view> 77 </view>
79 <view> 78 <view>
80 <view class="stepItem" v-for="(n,index) in recordList"> 79 <view class="stepItem" v-for="(n,index) in recordList" :key="index">
81 <view class="time">{{n.handleDate||'待审批'}}</view> 80 <view class="time">{{n.handleDate||'待审批'}}</view>
82 <view class="content"> 81 <view class="content">
83 <view class="status"> 82 <view class="status">
84 <text :class="{ 83 <text :class="{
85 'text-success':n.auditStatus=='1', 84 'text-success':n.auditStatus=='1',
86 'text-danger':n.auditStatus=='2', 85 'text-danger':n.auditStatus=='2',
87 'text-warning':n.auditStatus=='3' 86 'text-warning':n.auditStatus=='3'
88 }">{{ n.auditStatusStr }}</text> 87 }">{{ n.auditStatusStr }}</text>
89 </view> 88 </view>
90 <!-- <view class="name">{{index+1}}</view> --> 89 <!-- <view class="name">{{index+1}}</view> -->
91 <view class="deptName">{{n.deptName}}</view> 90 <view class="deptName">{{n.deptName}}</view>
92 <view v-if="n.auditStatus==2"> 91 <view v-if="n.auditStatus==2">
93 备注:{{n.reason||'/' }} 92 备注:{{n.reason||'' }}
94 </view> 93 </view>
95 </view> 94 </view>
96 </view> 95 </view>
97 </view> 96 </view>
98 </view> 97 </view>
99 98
100 </view> 99 </view>
101 </template> 100 </template>
102 101
103 <script setup> 102 <script setup>
104 import * as api from '@/common/api.js' 103 import * as api from '@/common/api.js'
105 import config from '@/config.js' 104 import config from '@/config.js'
106 import _ from 'lodash' 105 import _ from 'lodash'
107 import { 106 import {
108 onMounted, 107 onMounted,
109 ref 108 ref
110 } from 'vue' 109 } from 'vue'
111 import { 110 import {
112 onLoad, 111 onLoad,
113 onShow 112 onShow
114 } from '@dcloudio/uni-app' 113 } from '@dcloudio/uni-app'
115 const app = getApp(); 114 import {szToHz} from '@/common/utils.js'
116 const deptType = ref('') 115
117 const form = ref({})
118 const tablePersonInfo = ref({})
119 const recordList = ref([])
120 const list = ref([])
121 let examId = ''
122 onLoad((option) => {
123 examId = option.examId
124 })
125 onShow(() => {
126 if (app.globalData.isLogin) {
127 init()
128 } else {
129 app.firstLoadCallback = () => {
130 init()
131 };
132 }
133 })
134 116
135 function init() { 117 const app = getApp();
136 uni.showLoading({ 118 const deptType = ref('')
137 title: '加载中' 119 const form = ref({})
138 }) 120 const tablePersonInfo = ref({})
139 deptType.value = app.globalData.deptType 121 const recordList = ref([])
140 getForm() 122 const list = ref([])
141 getRecordList() 123 let examId = ''
142 getTablePersonInfo() 124 onLoad((option) => {
143 } 125 examId = option.examId
126 })
127 onShow(() => {
128 if (app.globalData.isLogin) {
129 init()
130 } else {
131 app.firstLoadCallback = () => {
132 init()
133 };
134 }
135 })
144 136
145 function getForm() { 137 function init() {
146 api.getLevelApplyInfo(examId).then(res => { 138 uni.showLoading({
147 uni.hideLoading() 139 title: '加载中'
148 form.value = res.data 140 })
149 }) 141 deptType.value = app.globalData.deptType
150 } 142 getForm()
143 getRecordList()
144 getTablePersonInfo()
145 }
151 146
152 function getRecordList() { 147 function getForm() {
153 api.getApprovalRecord(examId).then(res => { 148 api.getLevelApplyInfo(examId).then(res => {
154 recordList.value = res.data.levelSteps 149 uni.hideLoading()
155 }) 150 form.value = res.data
156 } 151 })
157 function getTablePersonInfo() { 152 }
158 api.getStudentList({ 153
159 examId: examId 154 function getRecordList() {
160 }).then(res=>{ 155 api.getApprovalRecord(examId).then(res => {
161 list.value = res.rows 156 recordList.value = res.data.levelSteps
157 })
158 }
159 function getTablePersonInfo() {
160 api.getStudentList({
161 examId: examId
162 }).then(res=>{
163 list.value = res.rows
162 164
163 const total = list.value.length 165 const total = list.value.length
164 const levelArr = [] 166 const levelArr = []
165 _.each(list.value, (d) => { 167 _.each(list.value, (d) => {
166 const temp = _.find(levelArr, (l) => { 168 const temp = _.find(levelArr, (l) => {
167 return l.level == d.levelNew 169 return l.level == d.levelNew
168 }) 170 })
169 if (temp) { 171 if (temp) {
170 temp.num++ 172 temp.num++
171 } else { 173 } else {
172 levelArr.push({ 174 levelArr.push({
173 level: d.levelNew, 175 level: d.levelNew,
174 num: 1 176 num: 1
175 }) 177 })
176 } 178 }
177 }) 179 })
178 180
179 tablePersonInfo.value = { 181 tablePersonInfo.value = {
180 total: total, 182 total: total,
181 levelArr: _.sortBy(levelArr, (l) => { 183 levelArr: _.sortBy(levelArr, (l) => {
182 return l.level 184 return l.level
183 }) 185 })
184 } 186 }
185 }) 187 })
186 } 188 }
187 function szToHz(num) { 189
188 const hzArr = ['〇', '一', '二', '三', '四', '五', '六', '七', '八', '九', '十']
189 return hzArr[parseInt(num)]
190 }
191 </script> 190 </script>
192 191
193 <style scoped> 192 <style scoped>
......
1 <template> 1 <template>
2 <view> 2 <view>
3 <!-- 段位考试审核 --> 3 <uni-segmented-control class="whitebg" :current="current" :values="navs" @clickItem="onClickItem"
4 <view class="appList"> 4 styleType="text" activeColor="#AD181F"></uni-segmented-control>
5 <view class="appItem" v-for="item in list"> 5
6 <view class="status" @click="goDetail(item)"> 6 <!-- 段位考试审核 -->
7 <text :class="{ 7 <view class="appList">
8 'text-primary':item.status=='1', 8 <view class="appItem" v-for="item in infoList" :key="item.recordId" >
9 'text-success':item.status=='2', 9 <view @click="goDetail(item)">
10 'text-danger':item.status=='3', 10 <view class="status" >
11 'text-warning':item.status=='4' 11 <text :class="{
12 }">{{ item.statusStr }}</text> 12 'text-primary':item.auditStatus=='0',
13 </view> 13 'text-success':item.auditStatus=='1',
14 'text-danger':item.auditStatus=='2',
15 'text-warning':item.auditStatus=='3'
16 }">{{ item.statusStr }}</text>
17 </view>
14 18
15 <view class="date" v-if="item.status!='0'&&item.submitTime">提交时间:{{item.submitTime}}</view> 19 <view class="date" v-if="item.status!='0'&&item.submitTime">提交时间:{{item.submitTime}}</view>
16 <view class="name mt0" @click="goDetail(item)">{{item.name}}</view> 20 <view class="name mt0" >{{item.name}}</view>
17 <view class="pp esp">考级日期:{{item.startTime.substring(0,16)}}{{item.endTime.substring(0,16)}}</view> 21 <view class="pp esp">考级日期:{{item.startTime.substring(0,16)}}{{item.endTime.substring(0,16)}}</view>
18 <view class="flexbox" @click="goDetail(item)"> 22 <view class="flexbox" >
19 <view> 23 <view>
20 申请日期 24 申请日期
21 <view>{{item.applyTime.substring(0, 10)}}</view> 25 <view>{{item.applyTime.substring(0, 10)}}</view>
22 </view> 26 </view>
23 <view> 27 <view>
24 申请单位 28 申请单位
25 <view>{{item.memberName}}</view> 29 <view>{{item.memberName}}</view>
26 </view> 30 </view>
27 <view> 31 <view>
28 通过人数 32 通过人数
29 <view>{{item.pass}}</view> 33 <view>{{item.pass}}</view>
30 </view> 34 </view>
31 </view> 35 </view>
32 <view class="func" v-if="item.auditStatus=='0'"> 36 </view>
33 <button @click="audit(item,'2')">拒绝</button> 37 <view class="func" v-if="item.auditStatus=='0'">
34 <button @click="audit(item,'1')">同意</button> 38 <button @click="audit(item,'2')">拒绝</button>
35 </view> 39 <button @click="audit(item,'1')">同意</button>
36 </view> 40 </view>
37 </view> 41 </view>
38 42 </view>
39 43 <view class="nodata" v-if="infoList.length==0">
40 44 <image mode="aspectFit" src="/static/nodata.png"></image>
41 <view class="nodata" v-if="list.length==0"> 45 <text>暂无数据</text>
42 <image mode="aspectFit" src="/static/nodata.png"></image> 46 </view>
43 <text>暂无数据</text> 47 </view>
44 </view>
45 </view>
46 </template> 48 </template>
47 49
48 <script setup> 50 <script setup>
49 import * as api from '@/common/api.js' 51 import * as examApi from '@/common/api_exam.js'
50 import config from '@/config.js' 52 import _ from 'lodash'
51 import _ from 'lodash' 53 import { ref } from 'vue'
52 import { ref } from 'vue' 54 import { onLoad,onShow } from '@dcloudio/uni-app'
53 import { onLoad,onShow } from '@dcloudio/uni-app' 55
56 const app = getApp();
57 const queryParams = ref({
58 status: '0',
59 rankStatus:'0'
60 })
61 const current = ref()
62 const navs = ref(['审核中', '审核通过', '审核拒绝'])
63 const statusArr = ['审批中', '审批通过', '审批拒绝', '审批撤回']
64 const deptType = ref('')
65 const infoList = ref([])
66 const total = ref(0)
67
68 onLoad((options)=>{
69 queryParams.value.type=options.type
70 })
71
72 onShow(() => {
73 if (app.globalData.isLogin) {
74 init()
75 } else {
76 app.firstLoadCallback = () => {
77 init()
78 };
79 }
80 })
54 81
55 const app = getApp(); 82 function init(){
56 const queryParams = ref({ 83 uni.showLoading({
57 // type: '1', 84 title: '加载中'
58 // rankStatus: '0' 85 })
59 }) 86 deptType.value = app.globalData.deptType
60 const list = ref([]) 87 getList()
61 const deptType = ref('') 88 }
62 onShow(() => { 89
63 if (app.globalData.isLogin) { 90 function onClickItem(e) {
64 init() 91 uni.showLoading({
65 } else { 92 title: '加载中'
93 })
94 queryParams.value.status = e.currentIndex
95 getList()
96 }
97
98 function getList() {
99 examApi.getVerityList(queryParams.value).then(res => {
100 uni.hideLoading()
101 const list = []
102 _.each(res.rows, r => {
103 const item = JSON.parse(r.content)
104 item.recordId = r.recordId
105 item.auditStatus = r.auditStatus
106 item.submitStatus = r.submitStatus
107 item.distributeTime = r.distributeTime
108 item.statusStr = statusArr[r.auditStatus]
109 item.sourceData = r
110 item.scoreStatus = r.scoreStatus
111 item.status = r.status
112 item.isView = r.isView
113 item.payStatus = r.payStatus
114 item.rankStatus = r.rankStatus
115 item.processCentBar = r.processCentBar
116 list.push(item)
117 })
66 118
67 app.firstLoadCallback = () => { 119 infoList.value = list
68 init() 120 total.value = res.total
69 }; 121 })
70 } 122 }
71 }) 123
72 function init(){ 124 function audit(item, flag) {
73 uni.showLoading({ 125 console.log(item.sourceData)
74 title: '加载中' 126 var obj = {
75 }) 127 flag: flag,
76 deptType.value = app.globalData.deptType 128 reason: null,
77 getList() 129 id: item.recordId
78 } 130 }
79 function getList() {
80 // api.getLevelList(queryParams.value).then(res => {
81 // uni.hideLoading()
82 // list.value = res.rows
83 // })
84 }
85 function audit(item, flag) {
86 console.log(item.sourceData)
87 var obj = {
88 flag: flag,
89 reason: null,
90 body: [JSON.stringify(item.sourceData)]
91 }
92 131
93 if (flag == '2') { 132 if (flag == '2') {
94 // 拒绝 133 // 拒绝
95 // 弹出框填写理由 134 // 弹出框填写理由
96 uni.showModal({ 135 uni.showModal({
97 title: '请输入拒绝理由', 136 title: '请输入拒绝理由',
98 editable: true, 137 editable: true,
99 success: function(res) { 138 success: function(res) {
100 if (res.confirm) { 139 if (res.confirm) {
101 if (!res.content) { 140 if (!res.content) {
102 uni.showToast({ 141 uni.showToast({
103 title: '请输入拒绝理由', 142 title: '请输入拒绝理由',
104 icon: 'none' 143 icon: 'none'
105 }) 144 })
106 } else { 145 } else {
107 obj.reason = res.content 146 obj.reason = res.content
108 doApproval(obj) 147 doApproval(obj)
109 } 148 }
110 } 149 }
111 } 150 }
112 }) 151 })
113 } else if (flag == '1') { 152 } else if (flag == '1') {
114 // 二次确认 153 // 二次确认
115 uni.showModal({ 154 uni.showModal({
116 title: '提示', 155 title: '提示',
117 content: `确定审批通过吗`, 156 content: `确定审批通过吗`,
118 success: function(res) { 157 success: function(res) {
119 if (res.confirm) { 158 if (res.confirm) {
120 doApproval(obj) 159 doApproval(obj)
121 } 160 }
122 } 161 }
123 }) 162 })
124 } 163 }
125 } 164 }
126 165
127 function doApproval(obj) { 166 function doApproval(obj) {
128 console.log(obj) 167 examApi.doMergeFlows(obj).then((res) => {
129 api.doVerity(obj).then((res) => { 168 uni.showToast({
130 uni.showToast({ 169 title: '操作成功',
131 title: '操作成功', 170 icon: 'none'
132 icon: 'none' 171 })
133 }) 172 getList()
134 getList() 173 })
135 }) 174 }
136 } 175
176 function goDetail(item) {
177 let path = `/pages/rank/applyDetail?examId=${item.examId}`
178 uni.navigateTo({
179 url: path
180 });
181 }
182
137 </script> 183 </script>
138 184
139 <style lang="scss" scoped> 185 <style lang="scss" scoped>
......
1 <template> 1 <template>
2 <view> 2 <view>
3 <view class="appList"> 3 <uni-segmented-control class="whitebg" :current="current" :values="navs" @clickItem="onClickItem"
4 <view class="appItem" v-for="item in infoList"> 4 styleType="text" activeColor="#AD181F"></uni-segmented-control>
5 <view class="status" @click="goDetail(item)"> 5
6 <text :class="{ 6 <view class="appList">
7 'text-primary':item.auditStatus=='0', 7 <view class="appItem" v-for="item in infoList" :key="item.payId" >
8 'text-success':item.auditStatus=='1', 8 <view @click="goDetail(item)">
9 'text-danger':item.auditStatus=='2', 9 <view class="status" >
10 'text-warning':item.auditStatus=='3' 10 <text :class="{
11 }">{{ item.statusStr }}</text> 11 'text-primary':item.certStatus=='0',
12 </view> 12 'text-warning':item.certStatus=='1',
13 13 'text-success':item.certStatus=='2',
14 <view class="date" v-if="item.status!='0'&&item.submitTime">提交时间:{{item.submitTime}}</view> 14 }">{{ item.certStatusStr }}</text>
15 <view class="name mt0" @click="goDetail(item)">{{item.name}}</view> 15 </view>
16 <view class="pp esp">考级日期:{{item.startTime.substring(0,16)}}{{item.endTime.substring(0,16)}}</view>
17 <view class="flexbox" @click="goDetail(item)">
18 <view>
19 申请日期
20 <view>{{item.applyTime.substring(0, 10)}}</view>
21 </view>
22 <view>
23 申请单位
24 <view>{{item.memberName}}</view>
25 </view>
26 <view>
27 通过人数
28 <view>{{item.pass}}</view>
29 </view>
30 </view>
31 <view class="func">
32 <button @click="send()">一键生成</button>
33 </view>
34 </view>
35 </view>
36 16
37 <view class="nodata" v-if="infoList.length==0"> 17 <view class="date">结算编号:{{item.payCode}}</view>
38 <image mode="aspectFit" src="/static/nodata.png"></image> 18 <view class="name mt0" >{{item.name}}</view>
39 <text>暂无数据</text> 19 <view class="pp esp">考试时间:{{item.startTime?.substring(0,16)}}{{item.endTime?.substring(0,16)}}</view>
40 </view> 20 <view class="flexbox" >
41 </view> 21 <view>
22 申请日期
23 <view>{{item.applyTime?.substring(0, 10)}}</view>
24 </view>
25 <view>
26 申请单位
27 <view>{{item.memberName}}</view>
28 </view>
29 <view>
30 已发证书
31 <view>{{item.hasCerts}}</view>
32 </view>
33 <view>
34 待发证书
35 <view>{{item.noCerts}}</view>
36 </view>
37 </view>
38 </view>
39 <view class="func">
40 <button @click="send(item)">一键生成</button>
41 </view>
42 </view>
43 </view>
44 <view class="nodata" v-if="infoList.length==0">
45 <image mode="aspectFit" src="/static/nodata.png"></image>
46 <text>暂无数据</text>
47 </view>
48 </view>
42 </template> 49 </template>
43 50
44 <script setup> 51 <script setup>
45 import * as api from '@/common/api.js' 52 import * as examApi from '@/common/api_exam.js'
46 import config from '@/config.js' 53 import _ from 'lodash'
47 import _ from 'lodash' 54 import { ref } from 'vue'
48 import { 55 import { onLoad,onShow } from '@dcloudio/uni-app'
49 onMounted, 56
50 ref 57 const app = getApp();
51 } from 'vue' 58 const queryParams = ref({})
52 import { 59 const current = ref()
53 onLoad, 60 const navs = ref(['未发放', '部分发放', '已发放'])
54 onShow 61 const deptType = ref('')
55 } from '@dcloudio/uni-app' 62 const infoList = ref([])
56 const app = getApp(); 63 const total = ref(0)
57 const queryParams = ref({ 64
58 // pageNum: 1, 65 onLoad((options)=>{
59 // pageSize: 10 66 queryParams.value.type=options.type
60 status: '0', 67 })
61 type: '1' 68
62 }) 69 onShow(() => {
63 const statusArr = ['审批中', '审批通过', '审批拒绝', '审批撤回'] 70 if (app.globalData.isLogin) {
64 const current = ref() 71 init()
65 const infoList = ref([]) 72 } else {
66 const total = ref(0) 73 app.firstLoadCallback = () => {
67 const deptType = ref('') 74 init()
68 const userType = ref('') 75 };
69 onLoad((option) => { 76 }
70 77 })
71 }) 78
72 onShow(() => { 79 function init(){
73 if (app.globalData.isLogin) { 80 uni.showLoading({
74 init() 81 title: '加载中'
75 } else { 82 })
76 83 deptType.value = app.globalData.deptType
77 app.firstLoadCallback = () => { 84 getList()
78 init() 85 }
79 }; 86
80 } 87 function onClickItem(e) {
81 }) 88 uni.showLoading({
82 89 title: '加载中'
83 function init() { 90 })
84 uni.showLoading({ 91 queryParams.value.certStatus = e.currentIndex
85 title: '加载中' 92 getList()
86 }) 93 }
87 deptType.value = app.globalData.deptType 94
88 userType.value = app.globalData.userType 95 function getList() {
89 getList() 96 examApi.certsLList(queryParams.value).then(res => {
90 } 97 uni.hideLoading()
91 98 infoList.value = res.rows
92 99 total.value = res.total
93 function getList() { 100 })
94 api.getVerityList(queryParams.value).then(res => { 101 }
95 uni.hideLoading() 102
96 infoList.value = res.rows 103 function send(item) {
97 }) 104 uni.showModal({
98 } 105 title: '提示',
99 function goDetail(item) { 106 content: `确定一键下发 ${item.name} 的证书?`,
100 if(item.status!='0'){ 107 success: function(res) {
101 let path = `/pages/level/applyDetail?examId=${item.examId}` 108 if (res.confirm) {
102 uni.navigateTo({ 109 examApi.submitCert([{
103 url: path 110 id: item.payId
104 }); 111 }]).then(()=>{
105 } else { 112 uni.showToast({
106 return 113 title: '操作成功',
107 } 114 icon: 'none'
108 } 115 })
109 function send(){ 116 getList()
110 117 })
111 } 118 }
112 </script> 119 }
120 })
121 }
122
123 function goDetail(item) {
124 let path = `/pages/rank/applyDetail?examId=${item.examId}`
125 uni.navigateTo({
126 url: path
127 });
128 }
129
130 </script>
113 131
132 <style lang="scss" scoped>
114 133
115 <style scoped lang="scss">
116 .mt0 {
117 margin-top: 0 !important;
118 }
119
120 .appList .appItem .name {
121 width: 80%;
122 word-break: break-all;
123 }
124
125 </style> 134 </style>
......
1 <template> 1 <template>
2 <view> 2 <view>
3 <!-- 段位考试审核 --> 3 <uni-segmented-control class="whitebg" :current="current" :values="navs" @clickItem="onClickItem"
4 <view class="appList"> 4 styleType="text" activeColor="#AD181F"></uni-segmented-control>
5 <view class="appItem" v-for="item in list"> 5
6 <view class="status" @click="goDetail(item)"> 6 <!-- 段位考试审核 -->
7 <text :class="{ 7 <view class="appList">
8 'text-primary':item.status=='1', 8 <view class="appItem" v-for="item in infoList" :key="item.recordId" >
9 'text-success':item.status=='2', 9 <view @click="goDetail(item)">
10 'text-danger':item.status=='3', 10 <view class="status" >
11 'text-warning':item.status=='4' 11 <text :class="{
12 }">{{ item.statusStr }}</text> 12 'text-primary':item.auditStatus=='0',
13 </view> 13 'text-success':item.auditStatus=='1',
14 'text-danger':item.auditStatus=='2',
15 'text-warning':item.auditStatus=='3'
16 }">{{ item.statusStr }}</text>
17 </view>
14 18
15 <view class="date" v-if="item.status!='0'&&item.submitTime">提交时间:{{item.submitTime}}</view> 19 <view class="date" v-if="item.status!='0'&&item.submitTime">提交时间:{{item.submitTime}}</view>
16 <view class="name mt0" @click="goDetail(item)">{{item.name}}</view> 20 <view class="name mt0" >{{item.name}}</view>
17 <view class="pp esp">考级日期:{{item.startTime.substring(0,16)}}{{item.endTime.substring(0,16)}}</view> 21 <view class="pp esp">考级日期:{{item.startTime.substring(0,16)}}{{item.endTime.substring(0,16)}}</view>
18 <view class="flexbox" @click="goDetail(item)"> 22 <view class="flexbox" >
19 <view> 23 <view>
20 申请日期 24 申请日期
21 <view>{{item.applyTime.substring(0, 10)}}</view> 25 <view>{{item.applyTime.substring(0, 10)}}</view>
22 </view> 26 </view>
23 <view> 27 <view>
24 申请单位 28 申请单位
25 <view>{{item.memberName}}</view> 29 <view>{{item.memberName}}</view>
26 </view> 30 </view>
27 <view> 31 <view>
28 通过人数 32 通过人数
29 <view>{{item.pass}}</view> 33 <view>{{item.pass}}</view>
30 </view> 34 </view>
31 </view> 35 </view>
32 <view class="func" v-if="item.auditStatus=='0'"> 36 </view>
33 <button @click="audit(item,'2')">拒绝</button> 37 <view class="func" v-if="item.auditStatus=='0'">
34 <button @click="audit(item,'1')">同意</button> 38 <button @click="audit(item,'2')">拒绝</button>
35 </view> 39 <button @click="audit(item,'1')">同意</button>
36 </view> 40 </view>
37 </view> 41 </view>
38 42 </view>
39 43 <view class="nodata" v-if="infoList.length==0">
40 44 <image mode="aspectFit" src="/static/nodata.png"></image>
41 <view class="nodata" v-if="list.length==0"> 45 <text>暂无数据</text>
42 <image mode="aspectFit" src="/static/nodata.png"></image> 46 </view>
43 <text>暂无数据</text> 47 </view>
44 </view>
45 </view>
46 </template> 48 </template>
47 49
48 <script setup> 50 <script setup>
49 import * as api from '@/common/api.js' 51 import * as examApi from '@/common/api_exam.js'
50 import config from '@/config.js' 52 import _ from 'lodash'
51 import _ from 'lodash' 53 import { ref } from 'vue'
52 import { ref } from 'vue' 54 import { onLoad,onShow } from '@dcloudio/uni-app'
53 import { onLoad,onShow } from '@dcloudio/uni-app' 55
56 const app = getApp();
57 const queryParams = ref({
58 status: '0',
59 rankStatus:'1'
60 })
61 const current = ref()
62 const navs = ref(['审核中', '审核通过', '审核拒绝'])
63 const statusArr = ['审批中', '审批通过', '审批拒绝', '审批撤回']
64 const deptType = ref('')
65 const infoList = ref([])
66 const total = ref(0)
67
68 onLoad((options)=>{
69 queryParams.value.type=options.type
70 })
71
72 onShow(() => {
73 if (app.globalData.isLogin) {
74 init()
75 } else {
76 app.firstLoadCallback = () => {
77 init()
78 };
79 }
80 })
54 81
55 const app = getApp(); 82 function init(){
56 const queryParams = ref({ 83 uni.showLoading({
57 // type: '1', 84 title: '加载中'
58 // rankStatus: '0' 85 })
59 }) 86 deptType.value = app.globalData.deptType
60 const list = ref([]) 87 getList()
61 const deptType = ref('') 88 }
62 onShow(() => { 89
63 if (app.globalData.isLogin) { 90 function onClickItem(e) {
64 init() 91 uni.showLoading({
65 } else { 92 title: '加载中'
93 })
94 queryParams.value.status = e.currentIndex
95 getList()
96 }
97
98 function getList() {
99 examApi.getVerityList(queryParams.value).then(res => {
100 uni.hideLoading()
101 const list = []
102 _.each(res.rows, r => {
103 const item = JSON.parse(r.content)
104 item.recordId = r.recordId
105 item.auditStatus = r.auditStatus
106 item.submitStatus = r.submitStatus
107 item.distributeTime = r.distributeTime
108 item.statusStr = statusArr[r.auditStatus]
109 item.sourceData = r
110 item.scoreStatus = r.scoreStatus
111 item.status = r.status
112 item.isView = r.isView
113 item.payStatus = r.payStatus
114 item.rankStatus = r.rankStatus
115 item.processCentBar = r.processCentBar
116 list.push(item)
117 })
66 118
67 app.firstLoadCallback = () => { 119 infoList.value = list
68 init() 120 total.value = res.total
69 }; 121 })
70 } 122 }
71 }) 123
72 function init(){ 124 function audit(item, flag) {
73 uni.showLoading({ 125 console.log(item.sourceData)
74 title: '加载中' 126 var obj = {
75 }) 127 flag: flag,
76 deptType.value = app.globalData.deptType 128 reason: null,
77 getList() 129 id: item.recordId
78 } 130 }
79 function getList() {
80 // api.getLevelList(queryParams.value).then(res => {
81 // uni.hideLoading()
82 // list.value = res.rows
83 // })
84 }
85 function audit(item, flag) {
86 console.log(item.sourceData)
87 var obj = {
88 flag: flag,
89 reason: null,
90 body: [JSON.stringify(item.sourceData)]
91 }
92 131
93 if (flag == '2') { 132 if (flag == '2') {
94 // 拒绝 133 // 拒绝
95 // 弹出框填写理由 134 // 弹出框填写理由
96 uni.showModal({ 135 uni.showModal({
97 title: '请输入拒绝理由', 136 title: '请输入拒绝理由',
98 editable: true, 137 editable: true,
99 success: function(res) { 138 success: function(res) {
100 if (res.confirm) { 139 if (res.confirm) {
101 if (!res.content) { 140 if (!res.content) {
102 uni.showToast({ 141 uni.showToast({
103 title: '请输入拒绝理由', 142 title: '请输入拒绝理由',
104 icon: 'none' 143 icon: 'none'
105 }) 144 })
106 } else { 145 } else {
107 obj.reason = res.content 146 obj.reason = res.content
108 doApproval(obj) 147 doApproval(obj)
109 } 148 }
110 } 149 }
111 } 150 }
112 }) 151 })
113 } else if (flag == '1') { 152 } else if (flag == '1') {
114 // 二次确认 153 // 二次确认
115 uni.showModal({ 154 uni.showModal({
116 title: '提示', 155 title: '提示',
117 content: `确定审批通过吗`, 156 content: `确定审批通过吗`,
118 success: function(res) { 157 success: function(res) {
119 if (res.confirm) { 158 if (res.confirm) {
120 doApproval(obj) 159 doApproval(obj)
121 } 160 }
122 } 161 }
123 }) 162 })
124 } 163 }
125 } 164 }
126 165
127 function doApproval(obj) { 166 function doApproval(obj) {
128 console.log(obj) 167 examApi.doMergeFlows(obj).then((res) => {
129 api.doVerity(obj).then((res) => { 168 uni.showToast({
130 uni.showToast({ 169 title: '操作成功',
131 title: '操作成功', 170 icon: 'none'
132 icon: 'none' 171 })
133 }) 172 getList()
134 getList() 173 })
135 }) 174 }
136 } 175
176 function goDetail(item) {
177 let path = `/pages/rank/applyDetail?examId=${item.examId}`
178 uni.navigateTo({
179 url: path
180 });
181 }
182
137 </script> 183 </script>
138 184
139 <style lang="scss" scoped> 185 <style lang="scss" scoped>
......
1 <template>
2 <view>
3 <view class="wBox">
4 <view class="tt">考级基本信息</view>
5 <view class="ddd">
6 <text class="lab">考级名称:</text>{{ form.name }}
7 </view>
8 <view class="ddd">
9 <text class="lab">申请日期:</text>{{form.applyTime}}
10 </view>
11 <view class="ddd">
12 <text class="lab">申请单位:</text>{{ form.memberName }}
13 </view>
14 <view class="ddd">
15 <text class="lab">考官:</text>{{form.examinerNames?.split(',').join('/')}}
16 </view>
17 <view class="ddd">
18 <text class="lab">考试开始时间:</text>{{form.startTime}}
19 </view>
20 <view class="ddd">
21 <text class="lab">考试结束时间:</text>{{form.endTime}}
22 </view>
23 <view class="ddd">
24 <text class="lab">考级地点:</text>{{form.address}}
25 </view>
26 <view class="ddd" v-if="app.globalData.showPrice">
27 <text class="lab">总金额:</text>{{(form.totalAmount*1).toFixed(2) }}
28 </view>
29 </view>
30 <view class="wBox">
31 <view class="tt">
32 考生信息
33 </view>
34 <view class="vipData">
35 <view><text>{{ tablePersonInfo.total }}</text></view>
36 <view v-for="l in tablePersonInfo.levelArr" :key="l.level">
37 {{ szToHz(l.level) }}级: <text>{{ l.num }} </text>
38 </view>
39 </view>
40 <view class="userlist">
41 <view class="item" v-for="n in list" style="background-color: #fffafa;">
42 <view class="w100">
43 <view class="name">{{n.realName}} <text>{{n.memName}}</text></view>
44 <!-- <view class="date">{{n.idcTypeStr}}{{n.idcCode}}</view> -->
45 <view class="flexbox">
46 <view>
47 原有级别
48 <text v-if="n.levelOld">{{ szToHz(n.levelOld) }}</text>
49 <text v-else>十级</text>
50 </view>
51 <view>
52 考试级别
53 <text>
54 {{ szToHz(n.levelNew) }}
55 </text>
56 </view>
57 <view v-if="app.globalData.showPrice">
58 金额
59 <text>
60 {{ (n.examFee * 1).toFixed(2) }}
61 </text>
62 </view>
63 <view>
64 是否通过
65 <text v-if="n.isPass=='1'" class="text-success">通过</text>
66 <text v-else class="text-danger">未通过</text>
67 </view>
68 </view>
69 </view>
70
71 </view>
72 </view>
73
74 </view>
75 <view class="wBox">
76 <view class="tt">
77 审核信息
78 </view>
79 <view>
80 <view class="stepItem" v-for="(n,index) in recordList">
81 <view class="time">{{n.handleDate||'待审批'}}</view>
82 <view class="content">
83 <view class="status">
84 <text :class="{
85 'text-success':n.auditStatus=='1',
86 'text-danger':n.auditStatus=='2',
87 'text-warning':n.auditStatus=='3'
88 }">{{ n.auditStatusStr }}</text>
89 </view>
90 <!-- <view class="name">{{index+1}}</view> -->
91 <view class="deptName">{{n.deptName}}</view>
92 <view v-if="n.auditStatus==2">
93 备注:{{n.reason||'/' }}
94 </view>
95 </view>
96 </view>
97 </view>
98 </view>
99
100 </view>
101 </template>
102
103 <script setup>
104 import * as api from '@/common/api.js'
105 import config from '@/config.js'
106 import _ from 'lodash'
107 import {
108 onMounted,
109 ref
110 } from 'vue'
111 import {
112 onLoad,
113 onShow
114 } from '@dcloudio/uni-app'
115 const app = getApp();
116 const deptType = ref('')
117 const form = ref({})
118 const tablePersonInfo = ref({})
119 const recordList = ref([])
120 const list = ref([])
121 let examId = ''
122 onLoad((option) => {
123 examId = option.examId
124 })
125 onShow(() => {
126 if (app.globalData.isLogin) {
127 init()
128 } else {
129 app.firstLoadCallback = () => {
130 init()
131 };
132 }
133 })
134
135 function init() {
136 uni.showLoading({
137 title: '加载中'
138 })
139 deptType.value = app.globalData.deptType
140 getForm()
141 getRecordList()
142 getTablePersonInfo()
143 }
144
145 function getForm() {
146 api.getLevelApplyInfo(examId).then(res => {
147 uni.hideLoading()
148 form.value = res.data
149 })
150 }
151
152 function getRecordList() {
153 api.getApprovalRecord(examId).then(res => {
154 recordList.value = res.data.levelSteps
155 })
156 }
157 function getTablePersonInfo() {
158 api.getStudentList({
159 examId: examId
160 }).then(res=>{
161 list.value = res.rows
162
163 const total = list.value.length
164 const levelArr = []
165 _.each(list.value, (d) => {
166 const temp = _.find(levelArr, (l) => {
167 return l.level == d.levelNew
168 })
169 if (temp) {
170 temp.num++
171 } else {
172 levelArr.push({
173 level: d.levelNew,
174 num: 1
175 })
176 }
177 })
178
179 tablePersonInfo.value = {
180 total: total,
181 levelArr: _.sortBy(levelArr, (l) => {
182 return l.level
183 })
184 }
185 })
186 }
187 function szToHz(num) {
188 const hzArr = ['〇', '一', '二', '三', '四', '五', '六', '七', '八', '九', '十']
189 return hzArr[parseInt(num)]
190 }
191 </script>
192
193 <style scoped>
194 .wBox {
195 width: 700rpx;
196 padding: 30rpx;
197 margin: 20rpx auto;
198 background: #FFFFFF;
199 box-shadow: 0rpx 12rpx 116rpx 0rpx rgba(196, 203, 214, 0.1);
200 border-radius: 15rpx;
201
202 .tt {
203 color: #0A1629;margin: 0 0 30rpx;
204 font-size: 30rpx;
205 }
206
207 .ddd{font-size: 28rpx;color: #333;
208 .lab{color: #999;display: inline-block;text-align: justify;}
209 }
210 }
211
212 </style>
...\ No newline at end of file ...\ No newline at end of file
1 <template>
2 <view>
3 <!-- 段位考试审核 -->
4 <view class="appList">
5 <view class="appItem" v-for="item in list">
6 <view class="status" @click="goDetail(item)">
7 <text :class="{
8 'text-primary':item.status=='1',
9 'text-success':item.status=='2',
10 'text-danger':item.status=='3',
11 'text-warning':item.status=='4'
12 }">{{ item.statusStr }}</text>
13 </view>
14
15 <view class="date" v-if="item.status!='0'&&item.submitTime">提交时间:{{item.submitTime}}</view>
16 <view class="name mt0" @click="goDetail(item)">{{item.name}}</view>
17 <view class="pp esp">考级日期:{{item.startTime.substring(0,16)}}{{item.endTime.substring(0,16)}}</view>
18 <view class="flexbox" @click="goDetail(item)">
19 <view>
20 申请日期
21 <view>{{item.applyTime.substring(0, 10)}}</view>
22 </view>
23 <view>
24 申请单位
25 <view>{{item.memberName}}</view>
26 </view>
27 <view>
28 通过人数
29 <view>{{item.pass}}</view>
30 </view>
31 </view>
32 <view class="func" v-if="item.auditStatus=='0'">
33 <button @click="audit(item,'2')">拒绝</button>
34 <button @click="audit(item,'1')">同意</button>
35 </view>
36 </view>
37 </view>
38
39
40
41 <view class="nodata" v-if="list.length==0">
42 <image mode="aspectFit" src="/static/nodata.png"></image>
43 <text>暂无数据</text>
44 </view>
45 </view>
46 </template>
47
48 <script setup>
49 import * as api from '@/common/api.js'
50 import config from '@/config.js'
51 import _ from 'lodash'
52 import { ref } from 'vue'
53 import { onLoad,onShow } from '@dcloudio/uni-app'
54
55 const app = getApp();
56 const queryParams = ref({
57 // type: '1',
58 // rankStatus: '0'
59 })
60 const list = ref([])
61 const deptType = ref('')
62 onShow(() => {
63 if (app.globalData.isLogin) {
64 init()
65 } else {
66
67 app.firstLoadCallback = () => {
68 init()
69 };
70 }
71 })
72 function init(){
73 uni.showLoading({
74 title: '加载中'
75 })
76 deptType.value = app.globalData.deptType
77 getList()
78 }
79 function getList() {
80 // api.getLevelList(queryParams.value).then(res => {
81 // uni.hideLoading()
82 // list.value = res.rows
83 // })
84 }
85 function audit(item, flag) {
86 console.log(item.sourceData)
87 var obj = {
88 flag: flag,
89 reason: null,
90 body: [JSON.stringify(item.sourceData)]
91 }
92
93 if (flag == '2') {
94 // 拒绝
95 // 弹出框填写理由
96 uni.showModal({
97 title: '请输入拒绝理由',
98 editable: true,
99 success: function(res) {
100 if (res.confirm) {
101 if (!res.content) {
102 uni.showToast({
103 title: '请输入拒绝理由',
104 icon: 'none'
105 })
106 } else {
107 obj.reason = res.content
108 doApproval(obj)
109 }
110 }
111 }
112 })
113 } else if (flag == '1') {
114 // 二次确认
115 uni.showModal({
116 title: '提示',
117 content: `确定审批通过吗`,
118 success: function(res) {
119 if (res.confirm) {
120 doApproval(obj)
121 }
122 }
123 })
124 }
125 }
126
127 function doApproval(obj) {
128 console.log(obj)
129 api.doVerity(obj).then((res) => {
130 uni.showToast({
131 title: '操作成功',
132 icon: 'none'
133 })
134 getList()
135 })
136 }
137 </script>
138
139 <style lang="scss" scoped>
140
141 </style>
1 <template>
2 <view>
3 <view class="appList">
4 <view class="appItem" v-for="item in infoList">
5 <view class="status" @click="goDetail(item)">
6 <text :class="{
7 'text-primary':item.auditStatus=='0',
8 'text-success':item.auditStatus=='1',
9 'text-danger':item.auditStatus=='2',
10 'text-warning':item.auditStatus=='3'
11 }">{{ item.statusStr }}</text>
12 </view>
13
14 <view class="date" v-if="item.status!='0'&&item.submitTime">提交时间:{{item.submitTime}}</view>
15 <view class="name mt0" @click="goDetail(item)">{{item.name}}</view>
16 <view class="pp esp">考级日期:{{item.startTime.substring(0,16)}}{{item.endTime.substring(0,16)}}</view>
17 <view class="flexbox" @click="goDetail(item)">
18 <view>
19 申请日期
20 <view>{{item.applyTime.substring(0, 10)}}</view>
21 </view>
22 <view>
23 申请单位
24 <view>{{item.memberName}}</view>
25 </view>
26 <view>
27 通过人数
28 <view>{{item.pass}}</view>
29 </view>
30 </view>
31 <view class="func">
32 <button @click="send()">一键生成</button>
33 </view>
34 </view>
35 </view>
36
37 <view class="nodata" v-if="infoList.length==0">
38 <image mode="aspectFit" src="/static/nodata.png"></image>
39 <text>暂无数据</text>
40 </view>
41 </view>
42 </template>
43
44 <script setup>
45 import * as api from '@/common/api.js'
46 import config from '@/config.js'
47 import _ from 'lodash'
48 import {
49 onMounted,
50 ref
51 } from 'vue'
52 import {
53 onLoad,
54 onShow
55 } from '@dcloudio/uni-app'
56 const app = getApp();
57 const queryParams = ref({
58 // pageNum: 1,
59 // pageSize: 10
60 status: '0',
61 type: '1'
62 })
63 const statusArr = ['审批中', '审批通过', '审批拒绝', '审批撤回']
64 const current = ref()
65 const infoList = ref([])
66 const total = ref(0)
67 const deptType = ref('')
68 const userType = ref('')
69 onLoad((option) => {
70
71 })
72 onShow(() => {
73 if (app.globalData.isLogin) {
74 init()
75 } else {
76
77 app.firstLoadCallback = () => {
78 init()
79 };
80 }
81 })
82
83 function init() {
84 uni.showLoading({
85 title: '加载中'
86 })
87 deptType.value = app.globalData.deptType
88 userType.value = app.globalData.userType
89 getList()
90 }
91
92
93 function getList() {
94 api.getVerityList(queryParams.value).then(res => {
95 uni.hideLoading()
96 infoList.value = res.rows
97 })
98 }
99 function goDetail(item) {
100 if(item.status!='0'){
101 let path = `/pages/level/applyDetail?examId=${item.examId}`
102 uni.navigateTo({
103 url: path
104 });
105 } else {
106 return
107 }
108 }
109 function send(){
110
111 }
112 </script>
113
114
115 <style scoped lang="scss">
116 .mt0 {
117 margin-top: 0 !important;
118 }
119
120 .appList .appItem .name {
121 width: 80%;
122 word-break: break-all;
123 }
124
125 </style>
1 <template>
2 <view>
3 <!-- 段位考试审核 -->
4 <view class="appList">
5 <view class="appItem" v-for="item in list">
6 <view class="status" @click="goDetail(item)">
7 <text :class="{
8 'text-primary':item.status=='1',
9 'text-success':item.status=='2',
10 'text-danger':item.status=='3',
11 'text-warning':item.status=='4'
12 }">{{ item.statusStr }}</text>
13 </view>
14
15 <view class="date" v-if="item.status!='0'&&item.submitTime">提交时间:{{item.submitTime}}</view>
16 <view class="name mt0" @click="goDetail(item)">{{item.name}}</view>
17 <view class="pp esp">考级日期:{{item.startTime.substring(0,16)}}{{item.endTime.substring(0,16)}}</view>
18 <view class="flexbox" @click="goDetail(item)">
19 <view>
20 申请日期
21 <view>{{item.applyTime.substring(0, 10)}}</view>
22 </view>
23 <view>
24 申请单位
25 <view>{{item.memberName}}</view>
26 </view>
27 <view>
28 通过人数
29 <view>{{item.pass}}</view>
30 </view>
31 </view>
32 <view class="func" v-if="item.auditStatus=='0'">
33 <button @click="audit(item,'2')">拒绝</button>
34 <button @click="audit(item,'1')">同意</button>
35 </view>
36 </view>
37 </view>
38
39
40
41 <view class="nodata" v-if="list.length==0">
42 <image mode="aspectFit" src="/static/nodata.png"></image>
43 <text>暂无数据</text>
44 </view>
45 </view>
46 </template>
47
48 <script setup>
49 import * as api from '@/common/api.js'
50 import config from '@/config.js'
51 import _ from 'lodash'
52 import { ref } from 'vue'
53 import { onLoad,onShow } from '@dcloudio/uni-app'
54
55 const app = getApp();
56 const queryParams = ref({
57 // type: '1',
58 // rankStatus: '0'
59 })
60 const list = ref([])
61 const deptType = ref('')
62 onShow(() => {
63 if (app.globalData.isLogin) {
64 init()
65 } else {
66
67 app.firstLoadCallback = () => {
68 init()
69 };
70 }
71 })
72 function init(){
73 uni.showLoading({
74 title: '加载中'
75 })
76 deptType.value = app.globalData.deptType
77 getList()
78 }
79 function getList() {
80 // api.getLevelList(queryParams.value).then(res => {
81 // uni.hideLoading()
82 // list.value = res.rows
83 // })
84 }
85 function audit(item, flag) {
86 console.log(item.sourceData)
87 var obj = {
88 flag: flag,
89 reason: null,
90 body: [JSON.stringify(item.sourceData)]
91 }
92
93 if (flag == '2') {
94 // 拒绝
95 // 弹出框填写理由
96 uni.showModal({
97 title: '请输入拒绝理由',
98 editable: true,
99 success: function(res) {
100 if (res.confirm) {
101 if (!res.content) {
102 uni.showToast({
103 title: '请输入拒绝理由',
104 icon: 'none'
105 })
106 } else {
107 obj.reason = res.content
108 doApproval(obj)
109 }
110 }
111 }
112 })
113 } else if (flag == '1') {
114 // 二次确认
115 uni.showModal({
116 title: '提示',
117 content: `确定审批通过吗`,
118 success: function(res) {
119 if (res.confirm) {
120 doApproval(obj)
121 }
122 }
123 })
124 }
125 }
126
127 function doApproval(obj) {
128 console.log(obj)
129 api.doVerity(obj).then((res) => {
130 uni.showToast({
131 title: '操作成功',
132 icon: 'none'
133 })
134 getList()
135 })
136 }
137 </script>
138
139 <style lang="scss" scoped>
140
141 </style>
Styling with Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!