bca6acdc by 杨炀

Merge commit '2afd2229'

# Conflicts:
#	common/api.js
#	pages/index/index.vue
2 parents 4a9a49bf 2afd2229
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 }
...@@ -40,6 +40,14 @@ const request = function(req) { ...@@ -40,6 +40,14 @@ const request = function(req) {
40 return 40 return
41 } 41 }
42 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 }
50
43 // if (req.method == 'POST' && !req.hideLoding) { 51 // if (req.method == 'POST' && !req.hideLoding) {
44 // uni.showLoading({ 52 // uni.showLoading({
45 // title: '提交中...' 53 // title: '提交中...'
...@@ -56,9 +64,9 @@ const request = function(req) { ...@@ -56,9 +64,9 @@ 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)) {
......
1 export function szToHz(num) {
2 const hzArr = ['〇', '一', '二', '三', '四', '五', '六', '七', '八', '九', '十']
3 return hzArr[parseInt(num)]
4 }
...@@ -202,13 +202,6 @@ ...@@ -202,13 +202,6 @@
202 } 202 }
203 203
204 }, { 204 }, {
205 "path": "pages/rank/skip/approval",
206 "style": {
207 "navigationBarTitleText": "越段考试审批",
208 "enablePullDownRefresh": false
209 }
210
211 }, {
212 "path": "pages/rank/apply", 205 "path": "pages/rank/apply",
213 "style": { 206 "style": {
214 "navigationBarTitleText": "段位考试申请", 207 "navigationBarTitleText": "段位考试申请",
...@@ -223,13 +216,6 @@ ...@@ -223,13 +216,6 @@
223 } 216 }
224 217
225 }, { 218 }, {
226 "path": "pages/rank/skip/applyDetail",
227 "style": {
228 "navigationBarTitleText": "越段考试详情",
229 "enablePullDownRefresh": false
230 }
231
232 }, {
233 "path": "pages/index/perfect", 219 "path": "pages/index/perfect",
234 "style": { 220 "style": {
235 "navigationBarTitleText": "注册引导", 221 "navigationBarTitleText": "注册引导",
...@@ -423,16 +409,9 @@ ...@@ -423,16 +409,9 @@
423 } 409 }
424 410
425 }, { 411 }, {
426 "path": "pages/rank/skip/scoreApproval", 412 "path": "pages/rank/cert",
427 "style": {
428 "navigationBarTitleText": "越段考试成绩审核",
429 "enablePullDownRefresh": false
430 }
431
432 }, {
433 "path": "pages/rank/skip/cert",
434 "style": { 413 "style": {
435 "navigationBarTitleText": "段证书发布", 414 "navigationBarTitleText": "段证书发布",
436 "enablePullDownRefresh": false 415 "enablePullDownRefresh": false
437 } 416 }
438 } 417 }
......
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}}
...@@ -21,7 +21,7 @@ ...@@ -21,7 +21,7 @@
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) }}
...@@ -34,25 +34,24 @@ ...@@ -34,25 +34,24 @@
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>
56 </view> 55 </view>
57 <view v-if="app.globalData.showPrice"> 56 <view v-if="app.globalData.showPrice">
58 金额 57 金额
...@@ -77,7 +76,7 @@ ...@@ -77,7 +76,7 @@
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">
...@@ -90,7 +89,7 @@ ...@@ -90,7 +89,7 @@
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>
...@@ -101,28 +100,31 @@ ...@@ -101,28 +100,31 @@
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({}) 116
118 const tablePersonInfo = ref({}) 117 const app = getApp();
119 const recordList = ref([]) 118 const deptType = ref('')
120 const list = ref([]) 119 const form = ref({})
121 let examId = '' 120 const tablePersonInfo = ref({})
122 onLoad((option) => { 121 const recordList = ref([])
122 const list = ref([])
123 let examId = ''
124 onLoad((option) => {
123 examId = option.examId 125 examId = option.examId
124 }) 126 })
125 onShow(() => { 127 onShow(() => {
126 if (app.globalData.isLogin) { 128 if (app.globalData.isLogin) {
127 init() 129 init()
128 } else { 130 } else {
...@@ -130,9 +132,9 @@ ...@@ -130,9 +132,9 @@
130 init() 132 init()
131 }; 133 };
132 } 134 }
133 }) 135 })
134 136
135 function init() { 137 function init() {
136 uni.showLoading({ 138 uni.showLoading({
137 title: '加载中' 139 title: '加载中'
138 }) 140 })
...@@ -140,21 +142,21 @@ ...@@ -140,21 +142,21 @@
140 getForm() 142 getForm()
141 getRecordList() 143 getRecordList()
142 getTablePersonInfo() 144 getTablePersonInfo()
143 } 145 }
144 146
145 function getForm() { 147 function getForm() {
146 api.getLevelApplyInfo(examId).then(res => { 148 api.getLevelApplyInfo(examId).then(res => {
147 uni.hideLoading() 149 uni.hideLoading()
148 form.value = res.data 150 form.value = res.data
149 }) 151 })
150 } 152 }
151 153
152 function getRecordList() { 154 function getRecordList() {
153 api.getApprovalRecord(examId).then(res => { 155 api.getApprovalRecord(examId).then(res => {
154 recordList.value = res.data.levelSteps 156 recordList.value = res.data.levelSteps
155 }) 157 })
156 } 158 }
157 function getTablePersonInfo() { 159 function getTablePersonInfo() {
158 api.getStudentList({ 160 api.getStudentList({
159 examId: examId 161 examId: examId
160 }).then(res=>{ 162 }).then(res=>{
...@@ -183,11 +185,8 @@ ...@@ -183,11 +185,8 @@
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 <uni-segmented-control class="whitebg" :current="current" :values="navs" @clickItem="onClickItem"
4 styleType="text" activeColor="#AD181F"></uni-segmented-control>
5
3 <!-- 段位考试审核 --> 6 <!-- 段位考试审核 -->
4 <view class="appList"> 7 <view class="appList">
5 <view class="appItem" v-for="item in list"> 8 <view class="appItem" v-for="item in infoList" :key="item.recordId" >
6 <view class="status" @click="goDetail(item)"> 9 <view @click="goDetail(item)">
10 <view class="status" >
7 <text :class="{ 11 <text :class="{
8 'text-primary':item.status=='1', 12 'text-primary':item.auditStatus=='0',
9 'text-success':item.status=='2', 13 'text-success':item.auditStatus=='1',
10 'text-danger':item.status=='3', 14 'text-danger':item.auditStatus=='2',
11 'text-warning':item.status=='4' 15 'text-warning':item.auditStatus=='3'
12 }">{{ item.statusStr }}</text> 16 }">{{ item.statusStr }}</text>
13 </view> 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>
...@@ -29,16 +33,14 @@ ...@@ -29,16 +33,14 @@
29 <view>{{item.pass}}</view> 33 <view>{{item.pass}}</view>
30 </view> 34 </view>
31 </view> 35 </view>
36 </view>
32 <view class="func" v-if="item.auditStatus=='0'"> 37 <view class="func" v-if="item.auditStatus=='0'">
33 <button @click="audit(item,'2')">拒绝</button> 38 <button @click="audit(item,'2')">拒绝</button>
34 <button @click="audit(item,'1')">同意</button> 39 <button @click="audit(item,'1')">同意</button>
35 </view> 40 </view>
36 </view> 41 </view>
37 </view> 42 </view>
38 43 <view class="nodata" v-if="infoList.length==0">
39
40
41 <view class="nodata" v-if="list.length==0">
42 <image mode="aspectFit" src="/static/nodata.png"></image> 44 <image mode="aspectFit" src="/static/nodata.png"></image>
43 <text>暂无数据</text> 45 <text>暂无数据</text>
44 </view> 46 </view>
...@@ -46,48 +48,85 @@ ...@@ -46,48 +48,85 @@
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
54 56 const app = getApp();
55 const app = getApp(); 57 const queryParams = ref({
56 const queryParams = ref({ 58 status: '0',
57 // type: '1', 59 rankStatus:'0'
58 // rankStatus: '0' 60 })
59 }) 61 const current = ref()
60 const list = ref([]) 62 const navs = ref(['审核中', '审核通过', '审核拒绝'])
61 const deptType = ref('') 63 const statusArr = ['审批中', '审批通过', '审批拒绝', '审批撤回']
62 onShow(() => { 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(() => {
63 if (app.globalData.isLogin) { 73 if (app.globalData.isLogin) {
64 init() 74 init()
65 } else { 75 } else {
66
67 app.firstLoadCallback = () => { 76 app.firstLoadCallback = () => {
68 init() 77 init()
69 }; 78 };
70 } 79 }
71 }) 80 })
72 function init(){ 81
82 function init(){
73 uni.showLoading({ 83 uni.showLoading({
74 title: '加载中' 84 title: '加载中'
75 }) 85 })
76 deptType.value = app.globalData.deptType 86 deptType.value = app.globalData.deptType
77 getList() 87 getList()
78 } 88 }
79 function getList() { 89
80 // api.getLevelList(queryParams.value).then(res => { 90 function onClickItem(e) {
81 // uni.hideLoading() 91 uni.showLoading({
82 // list.value = res.rows 92 title: '加载中'
83 // }) 93 })
84 } 94 queryParams.value.status = e.currentIndex
85 function audit(item, flag) { 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 })
118
119 infoList.value = list
120 total.value = res.total
121 })
122 }
123
124 function audit(item, flag) {
86 console.log(item.sourceData) 125 console.log(item.sourceData)
87 var obj = { 126 var obj = {
88 flag: flag, 127 flag: flag,
89 reason: null, 128 reason: null,
90 body: [JSON.stringify(item.sourceData)] 129 id: item.recordId
91 } 130 }
92 131
93 if (flag == '2') { 132 if (flag == '2') {
...@@ -122,18 +161,25 @@ ...@@ -122,18 +161,25 @@
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) => {
130 uni.showToast({ 168 uni.showToast({
131 title: '操作成功', 169 title: '操作成功',
132 icon: 'none' 170 icon: 'none'
133 }) 171 })
134 getList() 172 getList()
135 }) 173 })
136 } 174 }
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 <uni-segmented-control class="whitebg" :current="current" :values="navs" @clickItem="onClickItem"
4 styleType="text" activeColor="#AD181F"></uni-segmented-control>
5
3 <view class="appList"> 6 <view class="appList">
4 <view class="appItem" v-for="item in infoList"> 7 <view class="appItem" v-for="item in infoList" :key="item.payId" >
5 <view class="status" @click="goDetail(item)"> 8 <view @click="goDetail(item)">
9 <view class="status" >
6 <text :class="{ 10 <text :class="{
7 'text-primary':item.auditStatus=='0', 11 'text-primary':item.certStatus=='0',
8 'text-success':item.auditStatus=='1', 12 'text-warning':item.certStatus=='1',
9 'text-danger':item.auditStatus=='2', 13 'text-success':item.certStatus=='2',
10 'text-warning':item.auditStatus=='3' 14 }">{{ item.certStatusStr }}</text>
11 }">{{ item.statusStr }}</text>
12 </view> 15 </view>
13 16
14 <view class="date" v-if="item.status!='0'&&item.submitTime">提交时间:{{item.submitTime}}</view> 17 <view class="date">结算编号:{{item.payCode}}</view>
15 <view class="name mt0" @click="goDetail(item)">{{item.name}}</view> 18 <view class="name mt0" >{{item.name}}</view>
16 <view class="pp esp">考级日期:{{item.startTime.substring(0,16)}}{{item.endTime.substring(0,16)}}</view> 19 <view class="pp esp">考试时间:{{item.startTime?.substring(0,16)}}{{item.endTime?.substring(0,16)}}</view>
17 <view class="flexbox" @click="goDetail(item)"> 20 <view class="flexbox" >
18 <view> 21 <view>
19 申请日期 22 申请日期
20 <view>{{item.applyTime.substring(0, 10)}}</view> 23 <view>{{item.applyTime?.substring(0, 10)}}</view>
21 </view> 24 </view>
22 <view> 25 <view>
23 申请单位 26 申请单位
24 <view>{{item.memberName}}</view> 27 <view>{{item.memberName}}</view>
25 </view> 28 </view>
26 <view> 29 <view>
27 通过人数 30 已发证书
28 <view>{{item.pass}}</view> 31 <view>{{item.hasCerts}}</view>
32 </view>
33 <view>
34 待发证书
35 <view>{{item.noCerts}}</view>
36 </view>
29 </view> 37 </view>
30 </view> 38 </view>
31 <view class="func"> 39 <view class="func">
32 <button @click="send()">一键生成</button> 40 <button @click="send(item)">一键生成</button>
33 </view> 41 </view>
34 </view> 42 </view>
35 </view> 43 </view>
36
37 <view class="nodata" v-if="infoList.length==0"> 44 <view class="nodata" v-if="infoList.length==0">
38 <image mode="aspectFit" src="/static/nodata.png"></image> 45 <image mode="aspectFit" src="/static/nodata.png"></image>
39 <text>暂无数据</text> 46 <text>暂无数据</text>
...@@ -42,84 +49,86 @@ ...@@ -42,84 +49,86 @@
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,
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 56
71 }) 57 const app = getApp();
72 onShow(() => { 58 const queryParams = ref({})
59 const current = ref()
60 const navs = ref(['未发放', '部分发放', '已发放'])
61 const deptType = ref('')
62 const infoList = ref([])
63 const total = ref(0)
64
65 onLoad((options)=>{
66 queryParams.value.type=options.type
67 })
68
69 onShow(() => {
73 if (app.globalData.isLogin) { 70 if (app.globalData.isLogin) {
74 init() 71 init()
75 } else { 72 } else {
76
77 app.firstLoadCallback = () => { 73 app.firstLoadCallback = () => {
78 init() 74 init()
79 }; 75 };
80 } 76 }
81 }) 77 })
82 78
83 function init() { 79 function init(){
84 uni.showLoading({ 80 uni.showLoading({
85 title: '加载中' 81 title: '加载中'
86 }) 82 })
87 deptType.value = app.globalData.deptType 83 deptType.value = app.globalData.deptType
88 userType.value = app.globalData.userType
89 getList() 84 getList()
90 } 85 }
91 86
87 function onClickItem(e) {
88 uni.showLoading({
89 title: '加载中'
90 })
91 queryParams.value.certStatus = e.currentIndex
92 getList()
93 }
92 94
93 function getList() { 95 function getList() {
94 api.getVerityList(queryParams.value).then(res => { 96 examApi.certsLList(queryParams.value).then(res => {
95 uni.hideLoading() 97 uni.hideLoading()
96 infoList.value = res.rows 98 infoList.value = res.rows
99 total.value = res.total
100 })
101 }
102
103 function send(item) {
104 uni.showModal({
105 title: '提示',
106 content: `确定一键下发 ${item.name} 的证书?`,
107 success: function(res) {
108 if (res.confirm) {
109 examApi.submitCert([{
110 id: item.payId
111 }]).then(()=>{
112 uni.showToast({
113 title: '操作成功',
114 icon: 'none'
115 })
116 getList()
97 }) 117 })
98 } 118 }
99 function goDetail(item) { 119 }
100 if(item.status!='0'){ 120 })
101 let path = `/pages/level/applyDetail?examId=${item.examId}` 121 }
122
123 function goDetail(item) {
124 let path = `/pages/rank/applyDetail?examId=${item.examId}`
102 uni.navigateTo({ 125 uni.navigateTo({
103 url: path 126 url: path
104 }); 127 });
105 } else { 128 }
106 return
107 }
108 }
109 function send(){
110 129
111 }
112 </script> 130 </script>
113 131
114 132 <style lang="scss" scoped>
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 133
125 </style> 134 </style>
......
1 <template> 1 <template>
2 <view> 2 <view>
3 <uni-segmented-control class="whitebg" :current="current" :values="navs" @clickItem="onClickItem"
4 styleType="text" activeColor="#AD181F"></uni-segmented-control>
5
3 <!-- 段位考试审核 --> 6 <!-- 段位考试审核 -->
4 <view class="appList"> 7 <view class="appList">
5 <view class="appItem" v-for="item in list"> 8 <view class="appItem" v-for="item in infoList" :key="item.recordId" >
6 <view class="status" @click="goDetail(item)"> 9 <view @click="goDetail(item)">
10 <view class="status" >
7 <text :class="{ 11 <text :class="{
8 'text-primary':item.status=='1', 12 'text-primary':item.auditStatus=='0',
9 'text-success':item.status=='2', 13 'text-success':item.auditStatus=='1',
10 'text-danger':item.status=='3', 14 'text-danger':item.auditStatus=='2',
11 'text-warning':item.status=='4' 15 'text-warning':item.auditStatus=='3'
12 }">{{ item.statusStr }}</text> 16 }">{{ item.statusStr }}</text>
13 </view> 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>
...@@ -29,16 +33,14 @@ ...@@ -29,16 +33,14 @@
29 <view>{{item.pass}}</view> 33 <view>{{item.pass}}</view>
30 </view> 34 </view>
31 </view> 35 </view>
36 </view>
32 <view class="func" v-if="item.auditStatus=='0'"> 37 <view class="func" v-if="item.auditStatus=='0'">
33 <button @click="audit(item,'2')">拒绝</button> 38 <button @click="audit(item,'2')">拒绝</button>
34 <button @click="audit(item,'1')">同意</button> 39 <button @click="audit(item,'1')">同意</button>
35 </view> 40 </view>
36 </view> 41 </view>
37 </view> 42 </view>
38 43 <view class="nodata" v-if="infoList.length==0">
39
40
41 <view class="nodata" v-if="list.length==0">
42 <image mode="aspectFit" src="/static/nodata.png"></image> 44 <image mode="aspectFit" src="/static/nodata.png"></image>
43 <text>暂无数据</text> 45 <text>暂无数据</text>
44 </view> 46 </view>
...@@ -46,48 +48,85 @@ ...@@ -46,48 +48,85 @@
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
54 56 const app = getApp();
55 const app = getApp(); 57 const queryParams = ref({
56 const queryParams = ref({ 58 status: '0',
57 // type: '1', 59 rankStatus:'1'
58 // rankStatus: '0' 60 })
59 }) 61 const current = ref()
60 const list = ref([]) 62 const navs = ref(['审核中', '审核通过', '审核拒绝'])
61 const deptType = ref('') 63 const statusArr = ['审批中', '审批通过', '审批拒绝', '审批撤回']
62 onShow(() => { 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(() => {
63 if (app.globalData.isLogin) { 73 if (app.globalData.isLogin) {
64 init() 74 init()
65 } else { 75 } else {
66
67 app.firstLoadCallback = () => { 76 app.firstLoadCallback = () => {
68 init() 77 init()
69 }; 78 };
70 } 79 }
71 }) 80 })
72 function init(){ 81
82 function init(){
73 uni.showLoading({ 83 uni.showLoading({
74 title: '加载中' 84 title: '加载中'
75 }) 85 })
76 deptType.value = app.globalData.deptType 86 deptType.value = app.globalData.deptType
77 getList() 87 getList()
78 } 88 }
79 function getList() { 89
80 // api.getLevelList(queryParams.value).then(res => { 90 function onClickItem(e) {
81 // uni.hideLoading() 91 uni.showLoading({
82 // list.value = res.rows 92 title: '加载中'
83 // }) 93 })
84 } 94 queryParams.value.status = e.currentIndex
85 function audit(item, flag) { 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 })
118
119 infoList.value = list
120 total.value = res.total
121 })
122 }
123
124 function audit(item, flag) {
86 console.log(item.sourceData) 125 console.log(item.sourceData)
87 var obj = { 126 var obj = {
88 flag: flag, 127 flag: flag,
89 reason: null, 128 reason: null,
90 body: [JSON.stringify(item.sourceData)] 129 id: item.recordId
91 } 130 }
92 131
93 if (flag == '2') { 132 if (flag == '2') {
...@@ -122,18 +161,25 @@ ...@@ -122,18 +161,25 @@
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) => {
130 uni.showToast({ 168 uni.showToast({
131 title: '操作成功', 169 title: '操作成功',
132 icon: 'none' 170 icon: 'none'
133 }) 171 })
134 getList() 172 getList()
135 }) 173 })
136 } 174 }
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!