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 5
6 6 <view class="appList">
7 <view class="appList"> 7 <view v-for="(item,index) in infoList" :key="index" class="appItem">
8 <view class="appItem" v-for="(item,index) in infoList" :key="index"> 8 <view class="status" @click="goDetail(item)">
9 <view class="status" @click="goDetail(item)"> 9 <text :class="{
10 <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 }">
15 </view> 14 {{ item.certStatusStr }}
16 15 </text>
17 <view class="date"> 16 </view>
18 <uni-icons type="calendar-filled" size="16" color="#AD181F"></uni-icons> 17
19 {{item.submitTimeStr}} 提交 18 <view class="date">
20 </view> 19 <uni-icons color="#AD181F" size="16" type="calendar-filled"></uni-icons>
21 <view class="text-primary" v-if="item.payCode" @click="goDetail(item)">{{item.payCode}}</view> 20 {{ item.submitTimeStr }} 提交
22 <view class="name mt10 w100" @click="goDetail(item)"><text class="dot"></text>{{item.name}}</view> 21 </view>
23 <view class="flexbox" @click="goDetail(item)"> 22 <view v-if="item.payCode" class="text-primary" @click="goDetail(item)">{{ item.payCode }}</view>
24 <view> 23 <view class="name mt10 w100" @click="goDetail(item)">
25 申请单位 24 <text class="dot"></text>
26 <view>{{item.memberName||'--'}}</view> 25 {{ item.name }}
27 </view> 26 </view>
28 <view> 27 <view class="flexbox" @click="goDetail(item)">
29 已发/待发 28 <view>
30 <view>{{item.hasCerts}}/<text class="text-primary">{{item.noCerts}}</text></view> 29 申请单位
31 </view> 30 <view>{{ item.memberName || '--' }}</view>
32 31 </view>
33 </view> 32 <view>
34 <view class="pp esp" v-if="item.certTimeStr">证书发送时间:{{item.certTimeStr}}</view> 33 已发/待发
35 34 <view>{{ item.hasCerts }}/
36 <!-- v-if="item.certStatus != '2'" --> 35 <text class="text-primary">{{ item.noCerts }}</text>
37 <view class="func"> 36 </view>
38 <button @click="send(item)">更新证书</button> 37 </view>
39 </view> 38
40 </view> 39 </view>
41 </view> 40 <view v-if="item.certTimeStr" class="pp esp">证书发送时间:{{ item.certTimeStr }}</view>
42 </z-paging> 41
43 <!-- <view class="nodata" v-if="infoList.length==0"> 42 <!-- v-if="item.certStatus != '2'" -->
44 <image mode="aspectFit" :src="config.baseUrl_api + '/fs/static/nodata.png'"></image> 43 <view class="func">
45 <text>暂无数据</text> 44 <button @click="send(item)">更新证书</button>
46 </view> --> 45 </view>
47 </view> 46 </view>
47 </view>
48 </z-paging>
49 <!-- <view class="nodata" v-if="infoList.length==0">
50 <image mode="aspectFit" :src="config.baseUrl_api + '/fs/static/nodata.png'"></image>
51 <text>暂无数据</text>
52 </view> -->
53 </view>
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({
64 pageNum: 1,
65 pageSize: 10,
66 status: '0',
67 type: '1'
68 })
69 const statusArr = ['审批中', '审批通过', '审批拒绝', '审批撤回']
70 const current = ref()
71 const infoList = ref([])
72 const total = ref(0)
73 const deptType = ref('')
74 const userType = ref('')
75 const paging = ref(null)
76 onLoad((option) => {
77 queryParams.value.type = option.type
78 if (option.type == 2) {
79 uni.setNavigationBarTitle({
80 title: '段位考试详情'
81 })
82 }
83 if (option.type == 3) {
84 uni.setNavigationBarTitle({
85 title: '越段考试详情'
86 })
87 }
88 })
89 onShow(() => {
90 if (app.globalData.isLogin) {
91 init()
92 } else {
93
94 app.firstLoadCallback = () => {
95 init()
96 };
97 }
98 })
99 69
100 function init() { 70 const app = getApp();
101 deptType.value = app.globalData.deptType 71 const queryParams = ref({
102 userType.value = app.globalData.userType 72 pageNum: 1,
103 getList() 73 pageSize: 10,
104 } 74 // certFlag: '0',
75 type: '1'
76 })
77 const statusArr = ['审批中', '审批通过', '审批拒绝', '审批撤回']
78 const current = ref()
79 const infoList = ref([])
80 const total = ref(0)
81 const deptType = ref('')
82 const userType = ref('')
83 const paging = ref(null)
84 onLoad((option) => {
85 queryParams.value.type = option.type
86 if (option.type == 2) {
87 uni.setNavigationBarTitle({
88 title: '段位考试详情'
89 })
90 }
91 if (option.type == 3) {
92 uni.setNavigationBarTitle({
93 title: '越段考试详情'
94 })
95 }
96 })
97 onShow(() => {
98 if (app.globalData.isLogin) {
99 init()
100 } else {
101
102 app.firstLoadCallback = () => {
103 init()
104 };
105 }
106 })
105 107
106 function getQuery(pageNum, pageSize) { 108 function init() {
107 queryParams.value.pageNum = pageNum, 109 deptType.value = app.globalData.deptType
108 queryParams.value.pageSize = pageSize 110 userType.value = app.globalData.userType
109 api.getCertsLList(queryParams.value).then(res => { 111 getList()
110 paging.value.complete(res.rows); 112 }
111 total.value = res.total
112 })
113 }
114 113
115 function getList() { 114 function getQuery(pageNum, pageSize) {
116 uni.showLoading({ 115 queryParams.value.pageNum = pageNum
117 title: '加载中' 116 queryParams.value.pageSize = pageSize
118 }) 117 api.getCertsLList(queryParams.value).then(res => {
119 api.getCertsLList(queryParams.value).then(res => { 118 paging.value.complete(res.rows);
120 infoList.value = res.rows 119 total.value = res.total
121 uni.hideLoading() 120 })
122 }) 121 }
123 }
124 122
125 function goDetail(item) { 123 function getList() {
126 // const form = encodeURIComponent(JSON.stringify(item)) 124 uni.showLoading({
127 let path = `/level/ztx/examList?type=${queryParams.value.type}&payId=${item.payId}` 125 title: '加载中'
128 uni.navigateTo({ 126 })
129 url: path 127 api.getCertsLList(queryParams.value).then(res => {
130 }); 128 infoList.value = res.rows
131 } 129 uni.hideLoading()
130 })
131 }
132 132
133 function checkCert(payIds, sureFunc, confirmFunc) { 133 function goDetail(item) {
134 return api.checkPersonByPayIds(payIds).then(res => { 134 // const form = encodeURIComponent(JSON.stringify(item))
135 if (res.data == 1) { 135 let path = `/level/ztx/examList?type=${queryParams.value.type}&payId=${item.payId}`
136 confirmFunc().then((kk)=>{ 136 uni.navigateTo({
137 if(kk.confirm){ 137 url: path
138 sureFunc() 138 });
139 } 139 }
140 })
141 } else if (res.data == 2 || res.data == 3) {
142 uni.showModal({
143 title: '提示',
144 content:`存在学员没有照片,是否继续生成?`,
145 success: (rr) => {
146 if(rr.confirm){
147 sureFunc()
148 }
149 }
150 })
151 }
152 })
153 }
154 140
155 function send(row) { 141 async function send(row) {
156 checkCert(row.payId, () => { 142 const res = await api.checkPersonByPayIds(row.payId)
157 api.submitCert2([{ 143 if (res.data == 1) {
158 id: row.payId 144 uni.showModal({
159 }]).then(res => { 145 title: '提示',
160 uni.showToast({ 146 content: `确定下发 ${row.name} 的证书吗`,
161 title: `下发成功` 147 success: (res) => {
162 }) 148 if (res.confirm) {
163 getList() 149 handelUpdate(row.payId)
164 }) 150 }
165 },()=>{ 151 }
166 return uni.showModal({ 152 })
167 title: '提示', 153 }
168 content:`确定下发 ${row.name} 的证书吗` 154
169 }) 155 if (res.data == 2 || res.data == 3) {
170 }) 156 uni.showModal({
171 } 157 title: '提示',
158 content: `存在学员没有照片,是否继续生成?`,
159 success: (res) => {
160 if (res.confirm) {
161 handelUpdate(row.payId)
162 }
163 }
164 })
165 }
166
167 async function handelUpdate(payId) {
168 await api.issueAndUpdateCerts([{id: payId}])
169 getList()
170 uni.showToast({title: `下发成功`})
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 {
181 width: 80%;
182 word-break: break-all;
183 }
184 </style>
...\ No newline at end of file ...\ No newline at end of file
182 .appList .appItem .name {
183 width: 80%;
184 word-break: break-all;
185 }
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!