1fa3debe by lttnew

审核

1 parent 9b888601
...@@ -913,7 +913,7 @@ export function getVerityMergeList(params) { ...@@ -913,7 +913,7 @@ export function getVerityMergeList(params) {
913 } 913 }
914 914
915 // 中跆协审核列表 915 // 中跆协审核列表
916 export function auditList(params) { 916 export function examauditList(params) {
917 return request({ 917 return request({
918 url: '/exam/info/list', 918 url: '/exam/info/list',
919 method: 'get', 919 method: 'get',
...@@ -923,8 +923,16 @@ export function auditList(params) { ...@@ -923,8 +923,16 @@ export function auditList(params) {
923 923
924 // 中跆协审核提交 924 // 中跆协审核提交
925 export function auditJi(data) { 925 export function auditJi(data) {
926 // 基础 URL
927 let url = `/exam/info/auditJi/${data.ids}?flag=${data.flag}&ids=${data.ids}`;
928
929 // reason 有值才拼接
930 if (data.reason && data.reason.trim() !== '') {
931 url += `&reason=${data.reason}`;
932 }
933
926 return request({ 934 return request({
927 url: `/exam/info/auditJi/${data.ids}?flag=${data.flag}&reason=${data.reason}&ids=${data.ids}`, 935 url: url,
928 method: 'post', 936 method: 'post',
929 params: data 937 params: data
930 }) 938 })
......
1 // dev 1 // dev
2 const baseUrl_api = 'http://192.168.1.137:8787' 2 // const baseUrl_api = 'http://192.168.1.137:8787'
3 // const baseUrl_api = 'http://tk001.wxjylt.com/stage-api' 3 const baseUrl_api = 'http://tk001.wxjylt.com/stage-api'
4 const loginImage_api = 'http://tk001.wxjylt.com/stage-api' 4 const loginImage_api = 'http://tk001.wxjylt.com/stage-api'
5 const payUrl = 'https://wxpay.cmbc.com.cn/mobilePlatform/appserver/lcbpPay.do' 5 const payUrl = 'https://wxpay.cmbc.com.cn/mobilePlatform/appserver/lcbpPay.do'
6 6
......
...@@ -77,7 +77,8 @@ ...@@ -77,7 +77,8 @@
77 <view class="content"> 77 <view class="content">
78 <view class="status"> 78 <view class="status">
79 <text v-if="n.auditResult==1" class="text-success">审核通过</text> 79 <text v-if="n.auditResult==1" class="text-success">审核通过</text>
80 <text v-if="n.auditResult!=1" class="text-danger"> 审核拒绝</text> 80 <text v-else-if="n.auditResult==0" class="text-danger">审核拒绝</text>
81 <text v-else class="text-primary">审核中</text>
81 </view> 82 </view>
82 <view class="name">{{ n.auditDeptName }}</view> 83 <view class="name">{{ n.auditDeptName }}</view>
83 <!-- <view class="name">{{ index + 1 }}</view>--> 84 <!-- <view class="name">{{ index + 1 }}</view>-->
......
...@@ -6,11 +6,14 @@ ...@@ -6,11 +6,14 @@
6 <view class="time">{{n.handleDate||'待审批'}}</view> 6 <view class="time">{{n.handleDate||'待审批'}}</view>
7 <view class="content"> 7 <view class="content">
8 <view class="status"> 8 <view class="status">
9 <text v-if="n.auditStatus==0" class="text-primary">审核中</text> 9 <text v-if="n.auditResult==1" class="text-success">审核通过</text>
10 <text v-else-if="n.auditResult==0" class="text-danger">审核拒绝</text>
11 <text v-else class="text-primary">审核中</text>
12 <!-- <text v-if="n.auditStatus==0" class="text-primary">审核中</text>
10 <text v-if="n.auditStatus==1" class="text-success">审核通过</text> 13 <text v-if="n.auditStatus==1" class="text-success">审核通过</text>
11 <text v-if="n.auditStatus==2" class="text-danger">审核拒绝</text> 14 <text v-if="n.auditStatus==2" class="text-danger">审核拒绝</text>
12 <text v-if="n.auditStatus==3" class="text-warning">已撤回</text> 15 <text v-if="n.auditStatus==3" class="text-warning">已撤回</text>
13 <text v-if="n.auditStatus==100" class="text-primary">审核中</text> 16 <text v-if="n.auditStatus==100" class="text-primary">审核中</text> -->
14 </view> 17 </view>
15 <!-- <view class="name">{{index+1}}</view> --> 18 <!-- <view class="name">{{index+1}}</view> -->
16 <view class="deptName">{{n.handlerDeptName}}</view> 19 <view class="deptName">{{n.handlerDeptName}}</view>
......
...@@ -52,9 +52,8 @@ ...@@ -52,9 +52,8 @@
52 <view class="content"> 52 <view class="content">
53 <view class="status"> 53 <view class="status">
54 <text v-if="n.auditResult==1" class="text-success">审核通过</text> 54 <text v-if="n.auditResult==1" class="text-success">审核通过</text>
55 <text v-if="n.auditResult==2" class="text-danger"> 审核拒绝</text> 55 <text v-else-if="n.auditResult==0" class="text-danger">审核拒绝</text>
56 <text v-if="n.auditResult==0" class="text-primary"> 审核中</text> 56 <text v-else class="text-primary">审核中</text>
57 <text v-if="n.auditResult==3" class="text-warning">已撤回</text>
58 57
59 </view> 58 </view>
60 <!-- <view class="name">{{index+1}}</view> --> 59 <!-- <view class="name">{{index+1}}</view> -->
......
...@@ -100,7 +100,7 @@ ...@@ -100,7 +100,7 @@
100 uni.showLoading({ title: '加载中', mask: true }) 100 uni.showLoading({ title: '加载中', mask: true })
101 totalCost.value = 0 101 totalCost.value = 0
102 totalNum.value = 0 102 totalNum.value = 0
103 api.auditList(queryParams.value).then(response => { 103 api.examauditList(queryParams.value).then(response => {
104 uni.hideLoading() 104 uni.hideLoading()
105 infoList.value = response.rows || [] 105 infoList.value = response.rows || []
106 total.value = response.total || 0 106 total.value = response.total || 0
......
...@@ -102,7 +102,9 @@ function doSubmit() { ...@@ -102,7 +102,9 @@ function doSubmit() {
102 flag: form.value.flag, 102 flag: form.value.flag,
103 reason: form.value.reason || '' 103 reason: form.value.reason || ''
104 } 104 }
105 105 if(!form.value.reason ){
106 delete params.reason
107 }
106 api.auditJi(params).then(res => { 108 api.auditJi(params).then(res => {
107 uni.showToast({ 109 uni.showToast({
108 title: '操作成功', 110 title: '操作成功',
......
...@@ -76,6 +76,20 @@ ...@@ -76,6 +76,20 @@
76 } 76 }
77 77
78 }, { 78 }, {
79 "path": "pages/rank/scoreDetail",
80 "style": {
81 "navigationBarTitleText": "成绩详情",
82 "enablePullDownRefresh": false
83 }
84
85 }, {
86 "path": "pages/rank/scoreAudit",
87 "style": {
88 "navigationBarTitleText": "成绩审核",
89 "enablePullDownRefresh": false
90 }
91
92 }, {
79 "path": "pages/rank/cert", 93 "path": "pages/rank/cert",
80 "style": { 94 "style": {
81 "navigationBarTitleText": "证书发布", 95 "navigationBarTitleText": "证书发布",
......
...@@ -254,7 +254,7 @@ ...@@ -254,7 +254,7 @@
254 <image :src="config.baseUrl_api+'/fs/static/icon/19.png'"/> 254 <image :src="config.baseUrl_api+'/fs/static/icon/19.png'"/>
255 考试审核 255 考试审核
256 </view> 256 </view>
257 <view @click="goPath('/pages/rank/scoreApproval?type=2')"> 257 <view @click="goPath('/pages/rank/scoreApproval?type=3')">
258 <uni-badge :text="numData.duanCjCount" class="potag"/> 258 <uni-badge :text="numData.duanCjCount" class="potag"/>
259 <image :src="config.baseUrl_api+'/fs/static/icon/19.png'"/> 259 <image :src="config.baseUrl_api+'/fs/static/icon/19.png'"/>
260 成绩审核 260 成绩审核
...@@ -263,7 +263,7 @@ ...@@ -263,7 +263,7 @@
263 <image :src="config.baseUrl_api+'/fs/static/icon/20.png'"/> 263 <image :src="config.baseUrl_api+'/fs/static/icon/20.png'"/>
264 证书发布 264 证书发布
265 </view> 265 </view>
266 <view @click="goPath('/personalVip/order?type=3')"> 266 <view @click="goPath('/personalVip/order?type=4')">
267 <image :src="config.baseUrl_api+'/fs/static/icon/6.png'"/> 267 <image :src="config.baseUrl_api+'/fs/static/icon/6.png'"/>
268 订单列表 268 订单列表
269 </view> 269 </view>
...@@ -271,12 +271,12 @@ ...@@ -271,12 +271,12 @@
271 271
272 <view class="ttt">越段考试</view> 272 <view class="ttt">越段考试</view>
273 <view class="girdBox"> 273 <view class="girdBox">
274 <view @click="goPath('/pages/rank/approval?type=3')"> 274 <view @click="goPath('/pages/rank/approval?type=4')">
275 <uni-badge :text="numData.yueduanCount" class="potag"/> 275 <uni-badge :text="numData.yueduanCount" class="potag"/>
276 <image :src="config.baseUrl_api+'/fs/static/icon/21.png'"/> 276 <image :src="config.baseUrl_api+'/fs/static/icon/21.png'"/>
277 考试审核 277 考试审核
278 </view> 278 </view>
279 <view @click="goPath('/pages/rank/scoreApproval?type=3')"> 279 <view @click="goPath('/pages/rank/scoreApproval?type=5')">
280 <uni-badge :text="numData.yueduanCjCount" class="potag"/> 280 <uni-badge :text="numData.yueduanCjCount" class="potag"/>
281 <image :src="config.baseUrl_api+'/fs/static/icon/22.png'"/> 281 <image :src="config.baseUrl_api+'/fs/static/icon/22.png'"/>
282 成绩审核 282 成绩审核
......
...@@ -132,9 +132,9 @@ ...@@ -132,9 +132,9 @@
132 <view class="content"> 132 <view class="content">
133 <view class="status"> 133 <view class="status">
134 <text v-if="n.auditResult==1" class="text-success">审核通过</text> 134 <text v-if="n.auditResult==1" class="text-success">审核通过</text>
135 <text v-if="n.auditResult==2" class="text-danger">审核拒绝</text> 135
136 <text v-if="n.auditResult==0" class="text-primary">审核中</text> 136 <text v-else-if="n.auditResult==0" class="text-danger">审核拒绝</text>
137 <text v-if="n.auditResult==3" class="text-warning">已撤回</text> 137 <text v-else class="text-primary">审核中</text>
138 </view> 138 </view>
139 <view class="deptName">{{ n.auditDeptName || n.deptName || '--' }}</view> 139 <view class="deptName">{{ n.auditDeptName || n.deptName || '--' }}</view>
140 <view v-if="n.auditMsg">备注:{{ n.auditMsg }}</view> 140 <view v-if="n.auditMsg">备注:{{ n.auditMsg }}</view>
......
...@@ -7,12 +7,12 @@ ...@@ -7,12 +7,12 @@
7 <view class="appList"> 7 <view class="appList">
8 <view class="appItem" v-for="item in infoList" :key="item.recordId" > 8 <view class="appItem" v-for="item in infoList" :key="item.recordId" >
9 <view @click="goDetail(item)"> 9 <view @click="goDetail(item)">
10 <view class="status" > 10 <view class="status" v-if="item.statusStr">
11 <text :class="{ 11 <text :class="{
12 'text-primary-bg':item.auditStatus=='0', 12 'text-primary-bg':item.auditStatus=='1',
13 'text-success-bg':item.auditStatus=='1', 13 'text-success-bg':item.status=='2',
14 'text-danger-bg':item.auditStatus=='2', 14 'text-danger-bg':item.status=='3',
15 'text-warning-bg':item.auditStatus=='3' 15 'text-warning-bg':item.status=='4'
16 }">{{ item.statusStr }}</text> 16 }">{{ item.statusStr }}</text>
17 </view> 17 </view>
18 18
...@@ -33,9 +33,8 @@ ...@@ -33,9 +33,8 @@
33 <view class="pp esp">考段日期:{{item.startTime.substring(0,16)}}{{item.endTime.substring(0,16)}}</view> 33 <view class="pp esp">考段日期:{{item.startTime.substring(0,16)}}{{item.endTime.substring(0,16)}}</view>
34 34
35 </view> 35 </view>
36 <view class="func" v-if="item.auditStatus=='0'"> 36 <view class="func" >
37 <button @click="audit(item,'2')">拒绝</button> 37 <button @click="goApproval(item)" v-if="item.status=='1'">审核</button>
38 <button @click="audit(item,'1')">同意</button>
39 </view> 38 </view>
40 <view class="func" v-if="item.isView=='1' && item.status=='1' && item.rankStatus =='0'"> 39 <view class="func" v-if="item.isView=='1' && item.status=='1' && item.rankStatus =='0'">
41 <button @click="handleBack(item)">撤回</button> 40 <button @click="handleBack(item)">撤回</button>
...@@ -50,171 +49,96 @@ ...@@ -50,171 +49,96 @@
50 </template> 49 </template>
51 50
52 <script setup> 51 <script setup>
53 import * as examApi from '@/common/api_exam.js' 52 import * as api from '@/common/api.js'
54 import config from '@/config.js' 53 import config from '@/config.js'
55 import _ from 'underscore' 54 import { ref } from 'vue'
56 import { ref } from 'vue' 55 import { onLoad, onShow } from '@dcloudio/uni-app'
57 import { onLoad,onShow } from '@dcloudio/uni-app' 56
58 57 const app = getApp()
59 const app = getApp(); 58
60 const queryParams = ref({ 59 const statusValues = ['', '1', '2', '3']
61 status: '0', 60 const navs = ref(['全部', '审批中', '审批通过', '审批拒绝'])
62 rankStatus:'0' 61 const current = ref(0)
63 }) 62
64 const current = ref() 63 const queryParams = ref({
65 const navs = ref(['审核中', '审核通过', '审核拒绝']) 64 auditSelectType: '2',
66 const statusArr = ['审批中', '审批通过', '审批拒绝', '审批撤回'] 65 rankStatus: '0',
67 const deptType = ref('') 66 // status: '',
68 const infoList = ref([]) 67 pageNum: 1,
69 const total = ref(0) 68 pageSize: 10
70
71 onLoad((options)=>{
72 queryParams.value.type=options.type
73 })
74
75 onShow(() => {
76 if (app.globalData.isLogin) {
77 init()
78 } else {
79 app.firstLoadCallback = () => {
80 init()
81 };
82 }
83 })
84
85 function init(){
86 deptType.value = app.globalData.deptType
87 getList()
88 }
89
90 function onClickItem(e) {
91 queryParams.value.status = e.currentIndex
92 getList()
93 }
94
95 function getList() {
96 uni.showLoading({
97 title: '加载中',
98 mask: true
99 })
100 examApi.getVerityList(queryParams.value).then(res => {
101 uni.hideLoading()
102 const list = []
103 _.each(res.rows, r => {
104 const item = JSON.parse(r.content)
105 item.recordId = r.recordId
106 item.auditStatus = r.auditStatus
107 item.submitStatus = r.submitStatus
108 item.distributeTime = r.distributeTime
109 item.statusStr = statusArr[r.auditStatus]
110 item.sourceData = r
111 item.scoreStatus = r.scoreStatus
112 item.status = r.status
113 item.isView = r.isView
114 item.payStatus = r.payStatus
115 item.rankStatus = r.rankStatus
116 item.processCentBar = r.processCentBar
117 list.push(item)
118 }) 69 })
119 70
120 infoList.value = list 71 const infoList = ref([])
121 total.value = res.total 72 const total = ref(0)
122 }) 73 const totalCost = ref(0)
123 } 74 const totalNum = ref(0)
124 75
125 function audit(item, flag) { 76 onLoad((options) => {
126 console.log(item.sourceData) 77 queryParams.value.type = options.type
127 var obj = { 78 queryParams.value.auditSelectType = options.type
128 flag: flag, 79 if (options.type == '2') {
129 reason: null, 80 uni.setNavigationBarTitle({ title: '段位考试审核' })
130 id: item.recordId 81 } else if (options.type == '4') {
82 uni.setNavigationBarTitle({ title: '越段考试审核' })
131 } 83 }
132
133 if (flag == '2') {
134 // 拒绝
135 // 弹出框填写理由
136 uni.showModal({
137 title: '请输入拒绝理由',
138 editable: true,
139 success: function(res) {
140 if (res.confirm) {
141 if (!res.content) {
142 uni.showToast({
143 title: '请输入拒绝理由',
144 icon: 'none'
145 }) 84 })
85
86 onShow(() => {
87 if (app.globalData.isLogin) {
88 getList()
146 } else { 89 } else {
147 obj.reason = res.content 90 app.firstLoadCallback = () => { getList() }
148 doApproval(obj)
149 }
150 }
151 }
152 })
153 } else if (flag == '1') {
154 // 二次确认
155 uni.showModal({
156 title: '提示',
157 content: `确定审批通过吗`,
158 success: function(res) {
159 if (res.confirm) {
160 doApproval(obj)
161 }
162 } 91 }
163 }) 92 })
93
94 function onClickItem(e) {
95 current.value = e.currentIndex
96 queryParams.value.status = statusValues[e.currentIndex]
97 getList()
164 } 98 }
165 }
166 99
167 function doApproval(obj) { 100 function getList() {
168 uni.showLoading({ 101 uni.showLoading({ title: '加载中', mask: true })
169 title: '加载中' 102 totalCost.value = 0
170 }) 103 totalNum.value = 0
171 examApi.doMergeFlows(obj).then((res) => { 104 api.examauditList(queryParams.value).then(res => {
172 uni.hideLoading() 105 uni.hideLoading()
173 uni.showToast({ 106 infoList.value = res.rows || []
174 title: '操作成功', 107 total.value = res.total || 0
175 icon: 'none' 108 infoList.value.forEach(item => {
109 totalCost.value += Number(item.price) || 0
110 totalNum.value += Number(item.totalNum) || 0
176 }) 111 })
177 getList() 112 }).catch(() => {
113 uni.hideLoading()
178 }) 114 })
179 } 115 }
180 116
181 function goDetail(item) { 117 function goDetail(item) {
182 let path = `/pages/rank/applyDetail?examId=${item.examId}`
183 uni.navigateTo({ 118 uni.navigateTo({
184 url: path 119 url: `/pages/rank/applyDetail?examId=${item.examId}&type=1`
185 });
186 }
187 function handleBack(row){
188 uni.showModal({
189 title: '请输入撤回理由',
190 editable: true,
191 success: function(res) {
192 if (res.confirm) {
193 if (!res.content) {
194 uni.showToast({
195 title: '请输入撤回理由',
196 icon: 'none'
197 }) 120 })
198 } else {
199 var obj = {
200 flag: '2',
201 reason: res.content,
202 recordId: row.recordId
203 }
204 api.doVerityBack(obj).then(rr=>{
205 uni.showToast({
206 title: '操作成功',
207 icon: 'none'
208 })
209 getList()
210 })
211 }
212 }
213 } 121 }
122
123 function goApproval(item) {
124 uni.navigateTo({
125 url: `/level/ztx/memberAuditPage?ids=${item.examId}`
214 }) 126 })
215 } 127 }
216 </script> 128 </script>
217 129
218 <style lang="scss" scoped> 130 <style lang="scss" scoped>
219 131 .stat-row {
132 display: flex;
133 gap: 40rpx;
134 padding: 20rpx 30rpx;
135 background: #fff;
136 font-size: 26rpx;
137 color: #666;
138
139 .red {
140 color: #C4121B;
141 font-weight: 600;
142 }
143 }
220 </style> 144 </style>
......
...@@ -3,51 +3,50 @@ ...@@ -3,51 +3,50 @@
3 <uni-segmented-control class="whitebg" :current="current" :values="navs" @clickItem="onClickItem" 3 <uni-segmented-control class="whitebg" :current="current" :values="navs" @clickItem="onClickItem"
4 styleType="text" activeColor="#AD181F"></uni-segmented-control> 4 styleType="text" activeColor="#AD181F"></uni-segmented-control>
5 5
6 <!-- 段位考试审核 --> 6 <!-- <view v-show="infoList.length>0" class="stat-row">
7 <view class="stat-item">费用合计:<text class="red">{{ totalCost.toFixed(2) }}</text></view>
8 <view class="stat-item">考试人数:<text class="red">{{ totalNum }}</text></view>
9 </view> -->
10
7 <view class="appList"> 11 <view class="appList">
8 <view class="appItem" v-for="item in infoList" :key="item.recordId"> 12 <view class="appItem" v-for="item in infoList" :key="item.examId">
9 <view @click="goDetail(item)"> 13 <view @click="goDetail(item)">
10 <view class="status"> 14 <view class="status">
11 <text :class="{ 15 <text :class="{
12 'text-primary-bg':item.auditStatus=='0', 16 'text-primary-bg': item.scoreStatus=='0',
13 'text-success-bg':item.auditStatus=='1', 17 'text-success-bg': item.scoreStatus=='2',
14 'text-danger-bg':item.auditStatus=='2', 18 'text-danger-bg': item.scoreStatus=='3',
15 'text-warning-bg':item.auditStatus=='3' 19 'text-warning-bg': item.scoreStatus=='4'
16 }">{{ item.statusStr }}</text> 20 }">{{ item.scoreStatusStr }}</text>
17 </view> 21 </view>
18 22
19 <view class="date" v-if="item.status!='0'&&item.submitTime"> 23 <view class="date" v-if="item.status!='0'&&item.submitTime">
20 <uni-icons type="calendar-filled" size="16" color="#AD181F"></uni-icons> 24 提交时间:{{ item.submitTime }}
21 提交时间:{{item.submitTime}}
22 </view> 25 </view>
23 <view class="text-primary">{{item.examCode}}</view> 26 <view class="text-primary">{{ item.examCode }}</view>
24 <view class="name mt10"><text class="dot"></text>{{item.name}}</view> 27 <view class="name mt10">{{ item.name }}</view>
25 <view class="flexbox"> 28 <view class="flexbox">
26 <view> 29 <view>
27 申请日期 30 申请日期
28 <view>{{item.applyTime.substring(0, 10)}}</view> 31 <view>{{ item.applyTime ? item.applyTime.substring(0, 10) : '--' }}</view>
29 </view> 32 </view>
30 <view> 33 <view>
31 考段考生数 34 考段考生数
32 <view>{{item.totalNum}}</view> 35 <view>{{ item.totalNum }}</view>
33 </view> 36 </view>
34 <view> 37 <view>
35 总金额 38 总金额
36 <view> 39 <view><text class="text-danger">¥{{ (Number(item.totalAmount) || 0).toFixed(2) }}</text></view>
37 <text class="text-danger">¥{{(item.totalAmount*1).toFixed(2)}}</text>
38 </view>
39 </view> 40 </view>
40 </view> 41 </view>
41 <view class="pp esp">考段日期:{{item.startTime.substring(0,16)}}{{item.endTime.substring(0,16)}} 42 <view class="pp esp">考段日期:{{ item.startTime ? item.startTime.substring(0, 16) : '--' }}{{ item.endTime ? item.endTime.substring(0, 16) : '--' }}</view>
42 </view> 43 </view>
43 44 <view class="func" v-if="item.scoreStatus=='1'">
44 </view> 45 <button @click="goApproval(item)">审核</button>
45 <view class="func" v-if="item.auditStatus=='0'">
46 <button @click="audit(item,'2')">拒绝</button>
47 <button @click="audit(item,'1')">同意</button>
48 </view> 46 </view>
49 </view> 47 </view>
50 </view> 48 </view>
49
51 <view class="nodata" v-if="infoList.length==0"> 50 <view class="nodata" v-if="infoList.length==0">
52 <image mode="aspectFit" :src="config.baseUrl_api + '/fs/static/nodata.png'"></image> 51 <image mode="aspectFit" :src="config.baseUrl_api + '/fs/static/nodata.png'"></image>
53 <text>暂无数据</text> 52 <text>暂无数据</text>
...@@ -56,159 +55,96 @@ ...@@ -56,159 +55,96 @@
56 </template> 55 </template>
57 56
58 <script setup> 57 <script setup>
59 import * as examApi from '@/common/api_exam.js' 58 import * as api from '@/common/api.js'
60 import _ from 'underscore' 59 import config from '@/config.js'
61 import { 60 import { ref } from 'vue'
62 ref 61 import { onLoad, onShow } from '@dcloudio/uni-app'
63 } from 'vue' 62
64 import { 63 const app = getApp()
65 onLoad, 64
66 onShow 65 const statusValues = ['', '1', '2', '3']
67 } from '@dcloudio/uni-app' 66 const navs = ref(['全部', '审核中', '审核通过', '审核拒绝'])
68 import config from '@/config.js' 67 const current = ref(0)
69 const app = getApp(); 68 const statusArr = ['审批中', '审批通过', '审批拒绝', '审批撤回']
69
70 const queryParams = ref({ 70 const queryParams = ref({
71 status: '0', 71 status: '',
72 rankStatus: '1' 72 pageNum: 1,
73 pageSize: 50
73 }) 74 })
74 const current = ref() 75
75 const navs = ref(['审核中', '审核通过', '审核拒绝'])
76 const statusArr = ['审批中', '审批通过', '审批拒绝', '审批撤回']
77 const deptType = ref('')
78 const infoList = ref([]) 76 const infoList = ref([])
79 const total = ref(0) 77 const total = ref(0)
78 const totalCost = ref(0)
79 const totalNum = ref(0)
80 80
81 onLoad((options) => { 81 onLoad((options) => {
82 queryParams.value.type = options.type 82 queryParams.value.type = options.type
83 if (options.type == 2) { 83 queryParams.value.auditSelectType = options.type
84 uni.setNavigationBarTitle({ 84 if (options.type == '3') {
85 title: '段位考试审核' 85 uni.setNavigationBarTitle({ title: '段位成绩审核' })
86 }) 86 } else if (options.type == '5') {
87 } 87 uni.setNavigationBarTitle({ title: '越段成绩审核' })
88 if (options.type == 3) {
89 uni.setNavigationBarTitle({
90 title: '越段考试审核'
91 })
92 } 88 }
93 }) 89 })
94 90
95 onShow(() => { 91 onShow(() => {
96 if (app.globalData.isLogin) { 92 if (app.globalData.isLogin) {
97 init() 93 getList()
98 } else { 94 } else {
99 app.firstLoadCallback = () => { 95 app.firstLoadCallback = () => { getList() }
100 init()
101 };
102 } 96 }
103 }) 97 })
104 98
105 function init() {
106 uni.showLoading({
107 title: '加载中'
108 })
109 deptType.value = app.globalData.deptType
110 getList()
111 }
112
113 function onClickItem(e) { 99 function onClickItem(e) {
114 uni.showLoading({ 100 current.value = e.currentIndex
115 title: '加载中' 101 queryParams.value.scoreStatus = statusValues[e.currentIndex]
116 })
117 queryParams.value.status = e.currentIndex
118 getList() 102 getList()
119 } 103 }
120 104
121 function getList() { 105 function getList() {
122 examApi.getVerityList(queryParams.value).then(res => { 106 uni.showLoading({ title: '加载中', mask: true })
107 totalCost.value = 0
108 totalNum.value = 0
109 api.examauditList(queryParams.value).then(res => {
123 uni.hideLoading() 110 uni.hideLoading()
124 const list = [] 111 infoList.value = res.rows || []
125 _.each(res.rows, r => { 112 total.value = res.total || 0
126 const item = JSON.parse(r.content) 113 infoList.value.forEach(item => {
127 item.recordId = r.recordId 114 item.statusStr = statusArr[item.auditStatus] || '审批中'
128 item.auditStatus = r.auditStatus 115 totalCost.value += Number(item.totalAmount) || 0
129 item.submitStatus = r.submitStatus 116 totalNum.value += Number(item.totalNum) || 0
130 item.distributeTime = r.distributeTime
131 item.statusStr = statusArr[r.auditStatus]
132 item.sourceData = r
133 item.scoreStatus = r.scoreStatus
134 item.status = r.status
135 item.isView = r.isView
136 item.payStatus = r.payStatus
137 item.rankStatus = r.rankStatus
138 item.processCentBar = r.processCentBar
139 list.push(item)
140 })
141
142 infoList.value = list
143 total.value = res.total
144 }) 117 })
145 } 118 }).catch(() => {
146 119 uni.hideLoading()
147 function audit(item, flag) {
148 console.log(item.sourceData)
149 var obj = {
150 flag: flag,
151 reason: null,
152 id: item.recordId
153 }
154
155 if (flag == '2') {
156 // 拒绝
157 // 弹出框填写理由
158 uni.showModal({
159 title: '请输入拒绝理由',
160 editable: true,
161 success: function(res) {
162 if (res.confirm) {
163 if (!res.content) {
164 uni.showToast({
165 title: '请输入拒绝理由',
166 icon: 'none'
167 })
168 } else {
169 obj.reason = res.content
170 doApproval(obj)
171 }
172 }
173 }
174 })
175 } else if (flag == '1') {
176 // 二次确认
177 uni.showModal({
178 title: '提示',
179 content: `确定审批通过吗`,
180 success: function(res) {
181 if (res.confirm) {
182 doApproval(obj)
183 }
184 }
185 }) 120 })
186 } 121 }
187 }
188 122
189 function doApproval(obj) { 123 function goApproval(item) {
190 uni.showLoading({ 124 uni.navigateTo({
191 title: '加载中', 125 url: `/pages/rank/scoreAudit?ids=${item.examId}`
192 mask: true
193 })
194 examApi.doMergeFlows(obj).then((res) => {
195 uni.hideLoading()
196 uni.showToast({
197 title: '操作成功',
198 icon: 'none'
199 })
200 getList()
201 }) 126 })
202 } 127 }
203 128
204 function goDetail(item) { 129 function goDetail(item) {
205 let path = `/pages/rank/applyDetail?examId=${item.examId}`
206 uni.navigateTo({ 130 uni.navigateTo({
207 url: path 131 url: `/pages/rank/scoreDetail?examId=${item.examId}&type=${queryParams.value.type}`
208 }); 132 })
209 } 133 }
210 </script> 134 </script>
211 135
212 <style lang="scss" scoped> 136 <style lang="scss" scoped>
137 .stat-row {
138 display: flex;
139 gap: 40rpx;
140 padding: 20rpx 30rpx;
141 background: #fff;
142 font-size: 26rpx;
143 color: #666;
213 144
145 .red {
146 color: #C4121B;
147 font-weight: 600;
148 }
149 }
214 </style> 150 </style>
......
1 <template>
2 <view class="audit-page">
3 <view class="form-section">
4 <view class="section-header">
5 <uni-icons type="edit" size="18" color="#AD181F"></uni-icons>
6 <text class="section-title">审核信息</text>
7 </view>
8 <view class="form-card">
9 <view class="form-item">
10 <text class="form-label">审批结果</text>
11 <radio-group @change="onFlagChange">
12 <view class="radio-group">
13 <label class="radio-item" :class="{ selected: form.flag == '1' }">
14 <radio value="1" :checked="form.flag == '1'" color="#C4121B" />
15 <text>审批通过</text>
16 </label>
17 <label class="radio-item" :class="{ selected: form.flag == '0' }">
18 <radio value="0" :checked="form.flag == '0'" color="#C4121B" />
19 <text>审批拒绝</text>
20 </label>
21 </view>
22 </radio-group>
23 </view>
24 <view class="form-item">
25 <text class="form-label">备注</text>
26 <textarea
27 v-model="form.reason"
28 class="textarea"
29 placeholder="请输入备注信息(拒绝时必填)"
30 :maxlength="500"
31 />
32 </view>
33 </view>
34 </view>
35
36 <view class="submit-wrap">
37 <button class="btn-cancel" @click="goBack">取消</button>
38 <button class="btn-submit" @click="doSubmit" :disabled="submitting">
39 <text v-if="!submitting">确认提交</text>
40 <text v-else>提交中...</text>
41 </button>
42 </view>
43 </view>
44 </template>
45
46 <script setup>
47 import * as api from '@/common/api.js'
48 import { ref } from 'vue'
49 import { onLoad } from '@dcloudio/uni-app'
50
51 const ids = ref('')
52 const submitting = ref(false)
53
54 const form = ref({
55 flag: '1',
56 reason: ''
57 })
58
59 onLoad((options) => {
60 if (options.ids) ids.value = options.ids
61 })
62
63 function goBack() {
64 uni.navigateBack()
65 }
66
67 function onFlagChange(e) {
68 form.value.flag = e.detail.value
69 }
70
71 function doSubmit() {
72 if (form.value.flag == '0' && !form.value.reason) {
73 uni.showToast({ title: '请输入拒绝理由', icon: 'none' })
74 return
75 }
76 if (submitting.value) return
77 submitting.value = true
78 const params = {
79 ids: ids.value,
80 flag: form.value.flag,
81 reason: form.value.reason || ''
82 }
83 if(!form.value.reason ){
84 delete params.reason
85 }
86 api.auditJi(params).then(res => {
87 uni.showToast({ title: '操作成功', icon: 'success' })
88 setTimeout(() => { uni.navigateBack() }, 1500)
89 }).catch(err => {
90 console.error('审核失败', err)
91 uni.showToast({ title: '操作失败', icon: 'none' })
92 submitting.value = false
93 })
94 }
95 </script>
96
97 <style lang="scss" scoped>
98 .audit-page {
99 min-height: 100vh;
100 background-color: #f5f5f5;
101 padding: 20rpx;
102 box-sizing: border-box;
103 }
104
105 .form-section {
106 background-color: #fff;
107 border-radius: 16rpx;
108 padding: 30rpx;
109 margin-bottom: 20rpx;
110 }
111
112 .section-header {
113 display: flex;
114 align-items: center;
115 margin-bottom: 30rpx;
116
117 .section-title {
118 font-size: 30rpx;
119 font-weight: 600;
120 color: #333;
121 margin-left: 10rpx;
122 }
123 }
124
125 .form-card {
126 .form-item {
127 margin-bottom: 30rpx;
128
129 &:last-child {
130 margin-bottom: 0;
131 }
132
133 .form-label {
134 display: block;
135 font-size: 28rpx;
136 color: #333;
137 margin-bottom: 16rpx;
138 font-weight: 500;
139 }
140
141 .radio-group {
142 display: flex;
143 gap: 24rpx;
144 }
145
146 .radio-item {
147 flex: 1;
148 display: flex;
149 align-items: center;
150 justify-content: center;
151 gap: 12rpx;
152 font-size: 28rpx;
153 color: #666;
154 padding: 20rpx 0;
155 border-radius: 12rpx;
156 border: 2rpx solid #eee;
157 background: #fafafa;
158
159 &.selected {
160 color: #C4121B;
161 border-color: #C4121B;
162 background: #fff5f5;
163 font-weight: 500;
164 }
165
166 radio {
167 transform: scale(0.8);
168 }
169 }
170
171 .textarea {
172 width: 100%;
173 height: 200rpx;
174 border: 1rpx solid #eee;
175 border-radius: 12rpx;
176 padding: 20rpx;
177 font-size: 28rpx;
178 color: #333;
179 background-color: #fafafa;
180 box-sizing: border-box;
181 }
182 }
183 }
184
185 .submit-wrap {
186 position: fixed;
187 bottom: 0;
188 left: 0;
189 right: 0;
190 height: 110rpx;
191 background-color: #fff;
192 display: flex;
193 align-items: center;
194 justify-content: center;
195 gap: 30rpx;
196 padding: 0 30rpx;
197 box-shadow: 0 -4rpx 20rpx rgba(0, 0, 0, 0.05);
198
199 button {
200 flex: 1;
201 height: 80rpx;
202 line-height: 80rpx;
203 font-size: 28rpx;
204 border-radius: 40rpx;
205 border: none;
206 }
207
208 .btn-cancel {
209 background-color: #f5f5f5;
210 color: #666;
211 }
212
213 .btn-submit {
214 background: #C4121B;
215 color: #fff;
216
217 &[disabled] {
218 background: #ccc;
219 }
220 }
221 }
222 </style>
1 <template>
2 <view>
3 <scroll-view scroll-y class="detail-content">
4 <!-- 基本信息 -->
5 <view class="card">
6 <view class="card-header">
7 <view class="header-left">考试信息</view>
8 </view>
9 <view class="card-body">
10 <view class="info-row">
11 <text class="label">考试名称</text>
12 <text class="value">{{ form.name || '--' }}</text>
13 </view>
14 <view class="info-row">
15 <text class="label">考试日期</text>
16 <text class="value">{{ form.startTime ? form.startTime.substring(0, 16) : '--' }}{{ form.endTime ? form.endTime.substring(0, 16) : '--' }}</text>
17 </view>
18 <view class="info-row">
19 <text class="label">考试地点</text>
20 <text class="value">{{ form.address || '--' }}</text>
21 </view>
22 <view class="info-row">
23 <text class="label">申请单位</text>
24 <text class="value">{{ form.memberName || '--' }}</text>
25 </view>
26 <view class="info-row">
27 <text class="label">考官</text>
28 <text class="value">{{ form.examinerNames || '--' }}</text>
29 </view>
30 </view>
31 </view>
32
33 <!-- 考生信息 -->
34 <view class="card">
35 <view class="card-header">
36 <view class="header-left">考生信息</view>
37 <view class="header-right">{{ list.length }}</view>
38 </view>
39 <view v-if="loading" class="state-tip">加载中...</view>
40 <view v-else-if="list.length === 0" class="state-tip">暂无考生信息</view>
41 <view class="student-list" v-else>
42 <view class="student-card" v-for="n in list" :key="n.id">
43 <view class="student-top">
44 <view class="student-name">
45 <text class="name">{{ n.realName || '--' }}</text>
46 </view>
47 <view class="score-tag" :class="n.isPass == 1 ? 'pass' : 'fail'">
48 {{ n.isPass == 1 ? '通过' : '未通过' }}
49 </view>
50 </view>
51 <view class="student-info">
52 <view class="info-col">
53 <text class="info-text">{{ n.idcCode || '--' }}</text>
54 </view>
55 <view class="info-col">
56 <text class="info-text">{{ !n.levelOld || n.levelOld == 0 ? '十' : szToHz(n.levelOld) }}</text>
57 </view>
58 <view class="info-col">
59 <text class="info-text">{{ n.levelNew ? szToHz(n.levelNew) + '级' : '--' }}</text>
60 </view>
61 <view class="info-col">
62 <text class="info-text text-red">¥{{ (Number(n.examFee) || 0).toFixed(2) }}</text>
63 </view>
64 </view>
65 </view>
66 </view>
67 </view>
68
69 <!-- 审核记录 -->
70 <view class="h3-padding">审核记录</view>
71 <view class="wBox">
72 <view v-if="loadingAudit" class="state-tip">加载中...</view>
73 <view v-else-if="recordList.length === 0" class="state-tip">暂无审核记录</view>
74 <view class="stepItem" v-else v-for="(n, index) in recordList" :key="index">
75 <view class="time">{{ n.auditTime || '待审批' }}</view>
76 <view class="content">
77 <view class="status">
78 <text v-if="n.auditResult==1" class="text-success">审核通过</text>
79 <text v-else-if="n.auditResult==0" class="text-danger">审核拒绝</text>
80 <text v-else class="text-primary">审核中</text>
81 </view>
82 <view class="deptName">{{ n.auditDeptName || '--' }}</view>
83 <view v-if="n.auditMsg">备注:{{ n.auditMsg }}</view>
84 </view>
85 </view>
86 </view>
87 </scroll-view>
88 </view>
89 </template>
90
91 <script setup>
92 import * as api from '@/common/api.js'
93 import { szToHz } from '@/common/utils.js'
94 import { ref } from 'vue'
95 import { onLoad } from '@dcloudio/uni-app'
96
97 const form = ref({})
98 const list = ref([])
99 const recordList = ref([])
100 const loading = ref(false)
101 const loadingAudit = ref(false)
102
103 const selectForm = ref({ pageNum: 1, pageSize: 100 })
104 let examId = ''
105 let examType = ref('2')
106
107 onLoad((option) => {
108 examId = option.examId
109 if (option.type) examType.value = option.type
110 initData()
111 })
112
113 function initData() {
114 uni.showLoading({ title: '加载中' })
115 getForm()
116 getList()
117 getRecordList()
118 }
119
120 function getForm() {
121 api.getExamInfo(examId).then(res => {
122 uni.hideLoading()
123 if (res.code === 200 || res.code === 0) {
124 form.value = res.data || {}
125 }
126 }).catch(() => { uni.hideLoading() })
127 }
128
129 function getList() {
130 loading.value = true
131 selectForm.value.examId = examId
132 api.getStudentList(selectForm.value).then(res => {
133 if (res && res.rows) {
134 list.value = res.rows
135 } else {
136 list.value = []
137 }
138 }).catch(() => { list.value = [] }).finally(() => { loading.value = false })
139 }
140
141 function getRecordList() {
142 loadingAudit.value = true
143 const typeMap = { '2': 1, '3': 2, '4': 4 }
144 const logType = typeMap[examType.value] || 1
145 api.getLogs(examId, logType).then(res => {
146 if (res && res.data) {
147 recordList.value = Array.isArray(res.data) ? res.data : (res.data.levelSteps || [])
148 } else {
149 recordList.value = []
150 }
151 }).catch(() => { recordList.value = [] }).finally(() => { loadingAudit.value = false })
152 }
153 </script>
154
155 <style scoped lang="scss">
156 $primary-color: #e8341d;
157 $success-color: #52c41a;
158 $danger-color: #e8341c;
159 $bg-color: #f5f7fa;
160 $card-bg: #ffffff;
161 $text-primary: #333;
162 $text-placeholder: #999;
163 $border-color: #eee;
164 $content-gap: 24rpx;
165
166 .detail-content {
167 padding: 20rpx;
168 background: $bg-color;
169 min-height: 100vh;
170 box-sizing: border-box;
171 }
172
173 .h3-padding {
174 padding: 30rpx 30rpx 0;
175 font-size: 30rpx;
176 font-weight: 600;
177 color: #333;
178 }
179
180 .wBox {
181 width: 700rpx;
182 padding: 30rpx;
183 margin: 20rpx auto 0;
184 background: #FFFFFF;
185 box-shadow: 0rpx 12rpx 116rpx 0rpx rgba(196, 203, 214, 0.1);
186 border-radius: 15rpx;
187 }
188
189 .stepItem {
190 display: flex;
191 padding: 16rpx 0;
192 border-bottom: 1rpx dashed #eee;
193
194 &:last-child {
195 border-bottom: none;
196 }
197
198 .time {
199 width: 160rpx;
200 font-size: 22rpx;
201 color: #999;
202 flex-shrink: 0;
203 padding-top: 4rpx;
204 }
205
206 .content {
207 flex: 1;
208
209 .status {
210 font-size: 28rpx;
211 font-weight: 600;
212 margin-bottom: 6rpx;
213 }
214
215 .deptName {
216 font-size: 26rpx;
217 color: #666;
218 }
219
220 view {
221 font-size: 24rpx;
222 color: #999;
223 margin-top: 4rpx;
224 }
225 }
226 }
227
228 .card {
229 background: $card-bg;
230 border-radius: 16rpx;
231 margin-bottom: 20rpx;
232 overflow: hidden;
233 box-shadow: 0 4rpx 12rpx rgba(0, 0, 0, 0.05);
234 }
235
236 .card-header {
237 display: flex;
238 justify-content: space-between;
239 align-items: center;
240 padding: 24rpx $content-gap 20rpx;
241 border-bottom: 1rpx solid $border-color;
242
243 .header-left {
244 font-size: 30rpx;
245 font-weight: 600;
246 color: $text-primary;
247 }
248
249 .header-right {
250 font-size: 26rpx;
251 color: $primary-color;
252 font-weight: 500;
253 }
254 }
255
256 .card-body {
257 padding: 8rpx $content-gap 24rpx;
258 }
259
260 .info-row {
261 display: flex;
262 justify-content: space-between;
263 align-items: center;
264 padding: 18rpx 0;
265 border-bottom: 1rpx solid #f5f5f5;
266
267 &:last-child {
268 border-bottom: none;
269 }
270
271 .label {
272 font-size: 28rpx;
273 color: $text-placeholder;
274 flex-shrink: 0;
275 width: 170rpx;
276 }
277
278 .value {
279 font-size: 28rpx;
280 color: $text-primary;
281 text-align: right;
282 flex: 1;
283 word-break: break-all;
284 padding-left: 10rpx;
285 }
286 }
287
288 .state-tip {
289 text-align: center;
290 padding: 60rpx 0;
291 font-size: 26rpx;
292 color: $text-placeholder;
293 }
294
295 .student-list {
296 padding: 0 $content-gap 24rpx;
297 }
298
299 .student-card {
300 border-radius: 12rpx;
301 padding: 24rpx;
302 margin-top: 16rpx;
303 border: 1rpx solid $border-color;
304
305 .student-top {
306 display: flex;
307 justify-content: space-between;
308 align-items: center;
309 margin-bottom: 20rpx;
310
311 .student-name .name {
312 font-size: 32rpx;
313 font-weight: 600;
314 color: $text-primary;
315 }
316 }
317
318 .student-info {
319 display: flex;
320 justify-content: space-between;
321 align-items: center;
322 gap: 12rpx;
323
324 .info-col {
325 flex: 1;
326 text-align: center;
327
328 .info-text {
329 font-size: 28rpx;
330 color: $text-primary;
331 font-weight: 500;
332 line-height: 1.4;
333 }
334 }
335 }
336 }
337
338 .score-tag {
339 font-size: 24rpx;
340 padding: 6rpx 16rpx;
341 border-radius: 20rpx;
342 flex-shrink: 0;
343 font-weight: 500;
344
345 &.pass {
346 background: rgba($success-color, 0.1);
347 color: $success-color;
348 border: 1rpx solid rgba($success-color, 0.2);
349 }
350
351 &.fail {
352 background: rgba($danger-color, 0.1);
353 color: $danger-color;
354 border: 1rpx solid rgba($danger-color, 0.2);
355 }
356 }
357
358 .text-red {
359 color: $danger-color !important;
360 }
361 </style>
...@@ -54,7 +54,8 @@ ...@@ -54,7 +54,8 @@
54 <view class="content"> 54 <view class="content">
55 <view class="status"> 55 <view class="status">
56 <text v-if="n.auditResult==1" class="text-success">审核通过</text> 56 <text v-if="n.auditResult==1" class="text-success">审核通过</text>
57 <text v-if="n.auditResult==0" class="text-danger">审核拒绝</text> 57 <text v-else-if="n.auditResult==0" class="text-danger">审核拒绝</text>
58 <text v-else class="text-primary">审核中</text>
58 </view> 59 </view>
59 <view class="deptName">{{ n.auditDeptName || '--' }}</view> 60 <view class="deptName">{{ n.auditDeptName || '--' }}</view>
60 <view v-if="n.auditMsg">备注:{{ n.auditMsg }}</view> 61 <view v-if="n.auditMsg">备注:{{ n.auditMsg }}</view>
......
Styling with Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!