00b0ce95 by 张猛

证书发布

1 parent 9b888601
...@@ -965,6 +965,14 @@ export function submitCert2(data) { ...@@ -965,6 +965,14 @@ export function submitCert2(data) {
965 }) 965 })
966 } 966 }
967 967
968 export function issueAndUpdateCerts(data) {
969 return request({
970 url: `/exam/payment/submitCerts/issueAndUpdateCerts`,
971 method: 'put',
972 params: data
973 })
974 }
975
968 export function getCertsLList(query) { 976 export function getCertsLList(query) {
969 return request({ 977 return request({
970 url: '/exam/payment/certsList', 978 url: '/exam/payment/certsList',
...@@ -1962,7 +1970,7 @@ export function GroupGetLogs(id) { ...@@ -1962,7 +1970,7 @@ export function GroupGetLogs(id) {
1962 1970
1963 1971
1964 // 新个人会员审批 1972 // 新个人会员审批
1965 export function auditList(params) { 1973 export function memBerAuditList(params) {
1966 return request({ 1974 return request({
1967 url: '/person/paymentRangeNew/list', 1975 url: '/person/paymentRangeNew/list',
1968 method: 'get', 1976 method: 'get',
......
...@@ -6,7 +6,7 @@ ...@@ -6,7 +6,7 @@
6 <view class="appList"> 6 <view class="appList">
7 <view v-show="statistical.totalCost>0" class="vipData"> 7 <view v-show="statistical.totalCost>0" class="vipData">
8 <view>费用合计: 8 <view>费用合计:
9 <text>¥{{ statistical.totalCost.toFixed(2) }}</text> 9 <text>¥{{ statistical.totalCost?.toFixed(2) }}</text>
10 </view> 10 </view>
11 </view> 11 </view>
12 12
...@@ -37,7 +37,7 @@ ...@@ -37,7 +37,7 @@
37 </view> 37 </view>
38 <view> 38 <view>
39 费用合计 39 费用合计
40 <view> {{ (item.allPrice * 1).toFixed(2) }}</view> 40 <view> {{ (item.allPrice * 1)?.toFixed(2) }}</view>
41 </view> 41 </view>
42 <view> 42 <view>
43 政策优惠 43 政策优惠
......
1 <template> 1 <template>
2 <view> 2 <view>
3 <!-- 级位证书发布 --> 3 <!-- 级位证书发布 -->
4 <z-paging ref="paging" v-model="infoList" @query="getQuery" emptyViewImg="/static/nodata.png"> 4 <z-paging ref="paging" v-model="infoList" emptyViewImg="/static/nodata.png" @query="getQuery">
5
6 5
7 <view class="appList"> 6 <view class="appList">
8 <view class="appItem" v-for="(item,index) in infoList" :key="index"> 7 <view v-for="(item,index) in infoList" :key="index" class="appItem">
9 <view class="status" @click="goDetail(item)"> 8 <view class="status" @click="goDetail(item)">
10 <text :class="{ 9 <text :class="{
11 'text-warning-bg':item.certStatus=='0', 10 'text-warning-bg':item.certStatus=='0',
12 'text-primary-bg':item.certStatus=='1', 11 'text-primary-bg':item.certStatus=='1',
13 'text-success-bg':item.certStatus=='2' 12 'text-success-bg':item.certStatus=='2'
14 }">{{ item.certStatusStr }}</text> 13 }">
14 {{ item.certStatusStr }}
15 </text>
15 </view> 16 </view>
16 17
17 <view class="date"> 18 <view class="date">
18 <uni-icons type="calendar-filled" size="16" color="#AD181F"></uni-icons> 19 <uni-icons color="#AD181F" size="16" type="calendar-filled"></uni-icons>
19 {{item.submitTimeStr}} 提交 20 {{ item.submitTimeStr }} 提交
21 </view>
22 <view v-if="item.payCode" class="text-primary" @click="goDetail(item)">{{ item.payCode }}</view>
23 <view class="name mt10 w100" @click="goDetail(item)">
24 <text class="dot"></text>
25 {{ item.name }}
20 </view> 26 </view>
21 <view class="text-primary" v-if="item.payCode" @click="goDetail(item)">{{item.payCode}}</view>
22 <view class="name mt10 w100" @click="goDetail(item)"><text class="dot"></text>{{item.name}}</view>
23 <view class="flexbox" @click="goDetail(item)"> 27 <view class="flexbox" @click="goDetail(item)">
24 <view> 28 <view>
25 申请单位 29 申请单位
26 <view>{{item.memberName||'--'}}</view> 30 <view>{{ item.memberName || '--' }}</view>
27 </view> 31 </view>
28 <view> 32 <view>
29 已发/待发 33 已发/待发
30 <view>{{item.hasCerts}}/<text class="text-primary">{{item.noCerts}}</text></view> 34 <view>{{ item.hasCerts }}/
35 <text class="text-primary">{{ item.noCerts }}</text>
36 </view>
31 </view> 37 </view>
32 38
33 </view> 39 </view>
34 <view class="pp esp" v-if="item.certTimeStr">证书发送时间:{{item.certTimeStr}}</view> 40 <view v-if="item.certTimeStr" class="pp esp">证书发送时间:{{ item.certTimeStr }}</view>
35 41
36 <!-- v-if="item.certStatus != '2'" --> 42 <!-- v-if="item.certStatus != '2'" -->
37 <view class="func"> 43 <view class="func">
...@@ -48,32 +54,34 @@ ...@@ -48,32 +54,34 @@
48 </template> 54 </template>
49 55
50 <script setup> 56 <script setup>
51 import * as api from '@/common/api.js' 57 import * as api from '@/common/api.js'
52 import config from '@/config.js' 58 import config from '@/config.js'
53 import _ from 'underscore' 59 import _ from 'underscore'
54 import { 60 import {
55 onMounted, 61 onMounted,
56 ref 62 ref
57 } from 'vue' 63 } from 'vue'
58 import { 64 import {
59 onLoad, 65 onLoad,
60 onShow 66 onShow
61 } from '@dcloudio/uni-app' 67 } from '@dcloudio/uni-app'
62 const app = getApp(); 68 import {issueAndUpdateCerts} from "@/common/api.js";
63 const queryParams = ref({ 69
70 const app = getApp();
71 const queryParams = ref({
64 pageNum: 1, 72 pageNum: 1,
65 pageSize: 10, 73 pageSize: 10,
66 status: '0', 74 // certFlag: '0',
67 type: '1' 75 type: '1'
68 }) 76 })
69 const statusArr = ['审批中', '审批通过', '审批拒绝', '审批撤回'] 77 const statusArr = ['审批中', '审批通过', '审批拒绝', '审批撤回']
70 const current = ref() 78 const current = ref()
71 const infoList = ref([]) 79 const infoList = ref([])
72 const total = ref(0) 80 const total = ref(0)
73 const deptType = ref('') 81 const deptType = ref('')
74 const userType = ref('') 82 const userType = ref('')
75 const paging = ref(null) 83 const paging = ref(null)
76 onLoad((option) => { 84 onLoad((option) => {
77 queryParams.value.type = option.type 85 queryParams.value.type = option.type
78 if (option.type == 2) { 86 if (option.type == 2) {
79 uni.setNavigationBarTitle({ 87 uni.setNavigationBarTitle({
...@@ -85,8 +93,8 @@ ...@@ -85,8 +93,8 @@
85 title: '越段考试详情' 93 title: '越段考试详情'
86 }) 94 })
87 } 95 }
88 }) 96 })
89 onShow(() => { 97 onShow(() => {
90 if (app.globalData.isLogin) { 98 if (app.globalData.isLogin) {
91 init() 99 init()
92 } else { 100 } else {
...@@ -95,24 +103,24 @@ ...@@ -95,24 +103,24 @@
95 init() 103 init()
96 }; 104 };
97 } 105 }
98 }) 106 })
99 107
100 function init() { 108 function init() {
101 deptType.value = app.globalData.deptType 109 deptType.value = app.globalData.deptType
102 userType.value = app.globalData.userType 110 userType.value = app.globalData.userType
103 getList() 111 getList()
104 } 112 }
105 113
106 function getQuery(pageNum, pageSize) { 114 function getQuery(pageNum, pageSize) {
107 queryParams.value.pageNum = pageNum, 115 queryParams.value.pageNum = pageNum
108 queryParams.value.pageSize = pageSize 116 queryParams.value.pageSize = pageSize
109 api.getCertsLList(queryParams.value).then(res => { 117 api.getCertsLList(queryParams.value).then(res => {
110 paging.value.complete(res.rows); 118 paging.value.complete(res.rows);
111 total.value = res.total 119 total.value = res.total
112 }) 120 })
113 } 121 }
114 122
115 function getList() { 123 function getList() {
116 uni.showLoading({ 124 uni.showLoading({
117 title: '加载中' 125 title: '加载中'
118 }) 126 })
...@@ -120,65 +128,59 @@ ...@@ -120,65 +128,59 @@
120 infoList.value = res.rows 128 infoList.value = res.rows
121 uni.hideLoading() 129 uni.hideLoading()
122 }) 130 })
123 } 131 }
124 132
125 function goDetail(item) { 133 function goDetail(item) {
126 // const form = encodeURIComponent(JSON.stringify(item)) 134 // const form = encodeURIComponent(JSON.stringify(item))
127 let path = `/level/ztx/examList?type=${queryParams.value.type}&payId=${item.payId}` 135 let path = `/level/ztx/examList?type=${queryParams.value.type}&payId=${item.payId}`
128 uni.navigateTo({ 136 uni.navigateTo({
129 url: path 137 url: path
130 }); 138 });
131 } 139 }
132 140
133 function checkCert(payIds, sureFunc, confirmFunc) { 141 async function send(row) {
134 return api.checkPersonByPayIds(payIds).then(res => { 142 const res = await api.checkPersonByPayIds(row.payId)
135 if (res.data == 1) { 143 if (res.data == 1) {
136 confirmFunc().then((kk)=>{
137 if(kk.confirm){
138 sureFunc()
139 }
140 })
141 } else if (res.data == 2 || res.data == 3) {
142 uni.showModal({ 144 uni.showModal({
143 title: '提示', 145 title: '提示',
144 content:`存在学员没有照片,是否继续生成?`, 146 content: `确定下发 ${row.name} 的证书吗`,
145 success: (rr) => { 147 success: (res) => {
146 if(rr.confirm){ 148 if (res.confirm) {
147 sureFunc() 149 handelUpdate(row.payId)
148 } 150 }
149 } 151 }
150 }) 152 })
151 } 153 }
154
155 if (res.data == 2 || res.data == 3) {
156 uni.showModal({
157 title: '提示',
158 content: `存在学员没有照片,是否继续生成?`,
159 success: (res) => {
160 if (res.confirm) {
161 handelUpdate(row.payId)
162 }
163 }
152 }) 164 })
153 } 165 }
154 166
155 function send(row) { 167 async function handelUpdate(payId) {
156 checkCert(row.payId, () => { 168 await api.issueAndUpdateCerts([{id: payId}])
157 api.submitCert2([{
158 id: row.payId
159 }]).then(res => {
160 uni.showToast({
161 title: `下发成功`
162 })
163 getList() 169 getList()
164 }) 170 uni.showToast({title: `下发成功`})
165 },()=>{
166 return uni.showModal({
167 title: '提示',
168 content:`确定下发 ${row.name} 的证书吗`
169 })
170 })
171 } 171 }
172
173 }
172 </script> 174 </script>
173 175
174 176
175 <style scoped lang="scss"> 177 <style lang="scss" scoped>
176 .mt0 { 178 .mt0 {
177 margin-top: 0 !important; 179 margin-top: 0 !important;
178 } 180 }
179 181
180 .appList .appItem .name { 182 .appList .appItem .name {
181 width: 80%; 183 width: 80%;
182 word-break: break-all; 184 word-break: break-all;
183 } 185 }
184 </style> 186 </style>
......
...@@ -138,7 +138,7 @@ async function getList() { ...@@ -138,7 +138,7 @@ async function getList() {
138 if (deptType.value == 2 || deptType.value == 3) { 138 if (deptType.value == 2 || deptType.value == 3) {
139 queryParams.value.mergeFlag = 0 139 queryParams.value.mergeFlag = 0
140 } 140 }
141 const res = await api.auditList(queryParams.value) 141 const res = await api.memBerAuditList(queryParams.value)
142 list.value = res.rows 142 list.value = res.rows
143 total.value = res.total 143 total.value = res.total
144 statistical.value = { 144 statistical.value = {
......
Styling with Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!