9a662d55 by 杨炀

fixed: 36版本

1.小程序登录的时候如果手机号或者账号错误的时候,没提示
2.小程序在个人中心编辑的时候,不能保存
1 parent d3376bed
...@@ -11,6 +11,14 @@ export function active(data) { ...@@ -11,6 +11,14 @@ export function active(data) {
11 params: data 11 params: data
12 }) 12 })
13 } 13 }
14 export function commitPaymentVoucherYJ(data) {
15 return request({
16 url: '/person/paymentDocYj/commitPaymentVoucher',
17 method: 'post',
18 params: data
19 })
20 }
21
14 export function editMyMemberCertifiedInfo(data) { 22 export function editMyMemberCertifiedInfo(data) {
15 return request({ 23 return request({
16 url: '/system/dept/editMyMemberCertifiedInfo', 24 url: '/system/dept/editMyMemberCertifiedInfo',
......
...@@ -71,6 +71,10 @@ function loginByPhone(phonenumber, code) { ...@@ -71,6 +71,10 @@ function loginByPhone(phonenumber, code) {
71 method: 'post', 71 method: 'post',
72 params: data 72 params: data
73 }).then((res) => { 73 }).then((res) => {
74 uni.showToast({
75 title: res.msg,
76 icon: 'none'
77 })
74 uni.setStorageSync('token', 'Bearer ' + res.data.token) 78 uni.setStorageSync('token', 'Bearer ' + res.data.token)
75 }).then(getInfo) 79 }).then(getInfo)
76 } 80 }
......
...@@ -26,11 +26,14 @@ ...@@ -26,11 +26,14 @@
26 </view> 26 </view>
27 <view class="date"> 27 <view class="date">
28 <uni-icons type="calendar-filled" size="16" color="#AD181F"></uni-icons> 28 <uni-icons type="calendar-filled" size="16" color="#AD181F"></uni-icons>
29 {{item.content.commitTime}} 提交</view> 29 {{item.content.commitTime}} 提交
30 <view class="text-primary" @click="goDetail(item)" v-if="item.content?.wfCode">{{item.content?.wfCode}}</view> 30 </view>
31 <view class="text-primary" @click="goDetail(item)" v-if="item.content?.wfCode">{{item.content?.wfCode}}
32 </view>
31 <view class="name w100 mt0" @click="goDetail(item)"> 33 <view class="name w100 mt0" @click="goDetail(item)">
32 <!-- <text class="dot"></text> --> 34 <!-- <text class="dot"></text> -->
33 {{item.content.certName}}</view> 35 {{item.content.certName}}
36 </view>
34 <view class="flexbox" @click="goDetail(item)"> 37 <view class="flexbox" @click="goDetail(item)">
35 <view v-if="userType == '3'"> 38 <view v-if="userType == '3'">
36 所属省份 39 所属省份
...@@ -44,19 +47,29 @@ ...@@ -44,19 +47,29 @@
44 所属二级 47 所属二级
45 <view>{{item.content.secondDeptName}}</view> 48 <view>{{item.content.secondDeptName}}</view>
46 </view> 49 </view>
47 <view> 50
48 年限
49 <view>{{item.content.renewYear}}</view>
50 </view>
51 <view v-if="deptType == 1"> 51 <view v-if="deptType == 1">
52 会员/新会员 52 会员/新会员/年限
53 <view>{{item.content.allCount}}/<text class="text-danger">{{item.content.newCount}}</text> 53 <view>{{item.content.allCount}}/<text
54 class="text-danger">{{item.content.newCount}}</text>/{{item.content.renewYear}}
55 </view>
54 </view> 56 </view>
57 <view v-else>
58 年限
59 <view>{{item.content.renewYear}}</view>
55 </view> 60 </view>
56 <view v-if="deptType == 1"> 61 <view v-if="deptType == 1">
57 费用合计 62 费用合计
58 <view> ¥{{ (item?.content?.allFee*1).toFixed(2) }}</view> 63 <view> ¥{{ (item?.content?.allFee*1).toFixed(2) }}</view>
59 </view> 64 </view>
65 <view v-if="deptType == 1" @click.stop="viewSettleFile(item.doc)">
66 缴费状态
67 <view>
68 <text v-if="item.doc?.settleFlag==0" class="text-warning">已结算</text>
69 <text v-if="item.doc?.settleFlag==1&&item.doc.payFlag==0" class="text-success">已上传</text>
70 <text v-if="item.doc?.settleFlag==1&&item.doc.payFlag==1" class="text-danger">未上传</text>
71 </view>
72 </view>
60 </view> 73 </view>
61 <view class="func" v-if="(userType == '1'&&item.auditStatus == 0)"> 74 <view class="func" v-if="(userType == '1'&&item.auditStatus == 0)">
62 <button @click="audit(item.recordId,'0')">拒绝</button> 75 <button @click="audit(item.recordId,'0')">拒绝</button>
...@@ -69,7 +82,8 @@ ...@@ -69,7 +82,8 @@
69 <!-- 市 --> 82 <!-- 市 -->
70 <view class="func" v-if="userType == '3'"> 83 <view class="func" v-if="userType == '3'">
71 <button @click="goGroupInfo(item)">机构资料</button> 84 <button @click="goGroupInfo(item)">机构资料</button>
72 <button v-if="item.auditStatus == 1&&item.isView==1&&item.content.allCount > 0" @click="sendBack(item)">撤回</button> 85 <button v-if="item.auditStatus == 1&&item.isView==1&&item.content.allCount > 0"
86 @click="sendBack(item)">撤回</button>
73 <button v-if="item.auditStatus == 0" @click="audit(item.recordId,'0')">拒绝</button> 87 <button v-if="item.auditStatus == 0" @click="audit(item.recordId,'0')">拒绝</button>
74 <button v-if="item.auditStatus == 0" @click="audit(item.recordId,'1')">同意</button> 88 <button v-if="item.auditStatus == 0" @click="audit(item.recordId,'1')">同意</button>
75 89
...@@ -95,29 +109,29 @@ ...@@ -95,29 +109,29 @@
95 </template> 109 </template>
96 110
97 <script setup> 111 <script setup>
98 import * as api from '@/common/api.js' 112 import * as api from '@/common/api.js'
99 import config from '@/config.js' 113 import config from '@/config.js'
100 import { 114 import {
101 onMounted, 115 onMounted,
102 ref 116 ref
103 } from 'vue' 117 } from 'vue'
104 import { 118 import {
105 onLoad 119 onLoad
106 } from '@dcloudio/uni-app' 120 } from '@dcloudio/uni-app'
107 const app = getApp(); 121 const app = getApp();
108 const queryParams = ref({ 122 const queryParams = ref({
109 // pageNum: 1, 123 // pageNum: 1,
110 // pageSize: 10 124 // pageSize: 10
111 auditStatus: '0' 125 auditStatus: '0'
112 }) 126 })
113 const navs = ref(['审核中', '审核通过', '审核拒绝', '撤回']) 127 const navs = ref(['审核中', '审核通过', '审核拒绝', '撤回'])
114 const current = ref() 128 const current = ref()
115 const list = ref([]) 129 const list = ref([])
116 const total = ref(0) 130 const total = ref(0)
117 const deptType = ref('') 131 const deptType = ref('')
118 const userType = ref('') 132 const userType = ref('')
119 const totalCost = ref(0) 133 const totalCost = ref(0)
120 onLoad(() => { 134 onLoad(() => {
121 if (app.globalData.isLogin) { 135 if (app.globalData.isLogin) {
122 init() 136 init()
123 } else { 137 } else {
...@@ -126,22 +140,22 @@ onLoad(() => { ...@@ -126,22 +140,22 @@ onLoad(() => {
126 init() 140 init()
127 }; 141 };
128 } 142 }
129 }) 143 })
130 144
131 function init() { 145 function init() {
132 deptType.value = app.globalData.deptType 146 deptType.value = app.globalData.deptType
133 userType.value = app.globalData.userType 147 userType.value = app.globalData.userType
134 // console.log(userType.value) 148 // console.log(userType.value)
135 getList() 149 getList()
136 } 150 }
137 151
138 function onClickItem(e) { 152 function onClickItem(e) {
139 console.log(e) 153 console.log(e)
140 queryParams.value.auditStatus = e.currentIndex 154 queryParams.value.auditStatus = e.currentIndex
141 getList() 155 getList()
142 } 156 }
143 157
144 function getList() { 158 function getList() {
145 uni.showLoading({ 159 uni.showLoading({
146 title: '加载中' 160 title: '加载中'
147 }) 161 })
...@@ -159,14 +173,16 @@ function getList() { ...@@ -159,14 +173,16 @@ function getList() {
159 list.value = res.rows 173 list.value = res.rows
160 list.value.forEach(item => { 174 list.value.forEach(item => {
161 item.content = JSON.parse(item.content) 175 item.content = JSON.parse(item.content)
162 // item.doc = JSON.parse(item.doc) 176 if(item.doc){
177 item.doc = JSON.parse(item.doc)
178 }
163 totalCost.value = totalCost.value + (item.content.allFee * 1) 179 totalCost.value = totalCost.value + (item.content.allFee * 1)
164 }) 180 })
165 total.value = res.total 181 total.value = res.total
166 }) 182 })
167 } 183 }
168 184
169 function audit(recordId, flag) { 185 function audit(recordId, flag) {
170 if (flag == '0') { 186 if (flag == '0') {
171 // 拒绝 187 // 拒绝
172 // 弹出框填写理由 188 // 弹出框填写理由
...@@ -198,9 +214,9 @@ function audit(recordId, flag) { ...@@ -198,9 +214,9 @@ function audit(recordId, flag) {
198 } 214 }
199 }) 215 })
200 } 216 }
201 } 217 }
202 218
203 function doApproval(recordId, flag, reason) { 219 function doApproval(recordId, flag, reason) {
204 var obj = { 220 var obj = {
205 flag: flag, 221 flag: flag,
206 reason: reason || '', 222 reason: reason || '',
...@@ -215,9 +231,9 @@ function doApproval(recordId, flag, reason) { ...@@ -215,9 +231,9 @@ function doApproval(recordId, flag, reason) {
215 }) 231 })
216 getList() 232 getList()
217 }) 233 })
218 } 234 }
219 235
220 function goDetail(item) { 236 function goDetail(item) {
221 const auditLog = encodeURIComponent(JSON.stringify(item.auditLog)) 237 const auditLog = encodeURIComponent(JSON.stringify(item.auditLog))
222 const form = encodeURIComponent(JSON.stringify(item)) 238 const form = encodeURIComponent(JSON.stringify(item))
223 239
...@@ -234,23 +250,23 @@ function goDetail(item) { ...@@ -234,23 +250,23 @@ function goDetail(item) {
234 url: path 250 url: path
235 }); 251 });
236 } 252 }
237 } 253 }
238 254
239 function goMerge() { 255 function goMerge() {
240 let path = `/group/apply/merge` 256 let path = `/group/apply/merge`
241 uni.redirectTo({ 257 uni.redirectTo({
242 url: path 258 url: path
243 }); 259 });
244 } 260 }
245 261
246 function goMergeUp() { 262 function goMergeUp() {
247 let path = `/group/apply/mergeUp` 263 let path = `/group/apply/mergeUp`
248 uni.redirectTo({ 264 uni.redirectTo({
249 url: path 265 url: path
250 }); 266 });
251 } 267 }
252 268
253 function sendBack(row) { 269 function sendBack(row) {
254 uni.showModal({ 270 uni.showModal({
255 title: '提示', 271 title: '提示',
256 content: `确定撤回${row.content.certName}吗`, 272 content: `确定撤回${row.content.certName}吗`,
...@@ -270,13 +286,86 @@ function sendBack(row) { ...@@ -270,13 +286,86 @@ function sendBack(row) {
270 } 286 }
271 } 287 }
272 }) 288 })
273 } 289 }
274 290
275 function goGroupInfo(row){ 291 function goGroupInfo(row) {
276 uni.navigateTo({ 292 uni.navigateTo({
277 url: `/group/groupInfo?memId=${row.content?.memId}` 293 url: `/group/groupInfo?memId=${row.content?.memId}`
278 }) 294 })
279 } 295 }
296
297 function viewSettleFile(doc){
298 let url
299 if(doc.payEvidence){
300 url = JSON.parse(doc.payEvidence)[0].url || null
301 console.log(url)
302 if(url){showImg(url)}
303 }
304 }
305 function showImg(n) {
306 var str = ''
307 if(n.indexOf('http')==-1){
308 str = config.baseUrl_api + n
309 } else {
310 str = n
311 }
312 if (n.indexOf('png') > -1 || n.indexOf('jpg') > -1 || n.indexOf(
313 'jpeg') > -1) {
314 uni.previewImage({
315 urls: [str],
316 success: function(res) {
317 console.log('success', res)
318 },
319 fail: function(res) {
320 console.log('fail', res)
321 },
322 complete: function(res) {
323 console.log('complete', res)
324 }
325 })
326 } else {
327 goWebView(str)
328 }
329 }
330 function goWebView(url) {
331 url = url.replace("http://", "https://")
332 uni.showLoading({
333 title: '下载中'
334 });
335 uni.downloadFile({
336 url: url,
337 success: function(res) {
338 uni.hideLoading();
339 var filePath = res.tempFilePath;
340 uni.showLoading({
341 title: '正在打开'
342 });
343 uni.openDocument({
344 filePath: filePath,
345 showMenu: true,
346 success: function(res) {
347 uni.hideLoading();
348 },
349 fail: function(err) {
350 uni.hideLoading();
351 uni.showToast({
352 title: err,
353 icon: 'none',
354 duration: 2000
355 });
356 }
357 });
358 },
359 fail: function(error) {
360 uni.hideLoading();
361 uni.showToast({
362 title: `下载失败`,
363 icon: 'none',
364 duration: 2000
365 });
366 }
367 });
368 }
280 </script> 369 </script>
281 370
282 <style scoped> 371 <style scoped>
......
...@@ -163,14 +163,12 @@ ...@@ -163,14 +163,12 @@
163 return 163 return
164 } 164 }
165 165
166 pcLogin(form.value) 166 pcLogin(form.value).then((res) => {
167 .then((res) => {
168 app.globalData.isLogin = true 167 app.globalData.isLogin = true
169 uni.redirectTo({ 168 uni.redirectTo({
170 url: '/pages/index/index' 169 url: '/pages/index/index'
171 }) 170 })
172 }) 171 })
173 .catch(getCode)
174 } else if (isActive.value == 1) { 172 } else if (isActive.value == 1) {
175 if (!form2.value.telNo) { 173 if (!form2.value.telNo) {
176 uni.showToast({ 174 uni.showToast({
...@@ -179,6 +177,15 @@ ...@@ -179,6 +177,15 @@
179 }) 177 })
180 return 178 return
181 } 179 }
180 var pattern = /^1[3456789]\d{9}$/;
181 if (!pattern.test(form2.value.telNo)) {
182 uni.showToast({
183 title: '请输入正确的手机号',
184 duration: 2000,
185 icon: 'none'
186 })
187 return
188 }
182 if (!form2.value.code) { 189 if (!form2.value.code) {
183 uni.showToast({ 190 uni.showToast({
184 title: '短信验证码不能为空', 191 title: '短信验证码不能为空',
...@@ -222,6 +229,15 @@ ...@@ -222,6 +229,15 @@
222 }) 229 })
223 return 230 return
224 } 231 }
232 var pattern = /^1[3456789]\d{9}$/;
233 if (!pattern.test(form2.value.telNo)) {
234 uni.showToast({
235 title: '请输入正确的手机号',
236 duration: 2000,
237 icon: 'none'
238 })
239 return
240 }
225 if (!form2.value.captcha) { 241 if (!form2.value.captcha) {
226 uni.showToast({ 242 uni.showToast({
227 title: '图形验证码不能为空', 243 title: '图形验证码不能为空',
...@@ -236,14 +252,17 @@ ...@@ -236,14 +252,17 @@
236 code: form2.value.captcha 252 code: form2.value.captcha
237 }).then(res => { 253 }).then(res => {
238 uni.showToast({ 254 uni.showToast({
239 title: '短信验证码下发成功', 255 title: res.data.msg,
240 icon: 'none' 256 icon: 'none'
241 }) 257 })
242 countDown.value.start = true 258 countDown.value.start = true
243 }).catch(res=>{
244 console.log(res.data.msg)
245 getCode()
246 }) 259 })
260 // .catch(res=>{
261 // uni.showModal({
262 // content:res.data.msg
263 // })
264 // getCode()
265 // })
247 } 266 }
248 267
249 function timeup() { 268 function timeup() {
......
...@@ -101,7 +101,7 @@ function submit(){ ...@@ -101,7 +101,7 @@ function submit(){
101 }) 101 })
102 return 102 return
103 } 103 }
104 if(!user.value.phoneNumber){ 104 if(!user.value.phonenumber){
105 uni.showToast({ 105 uni.showToast({
106 icon:'none',title:`请输入手机号码` 106 icon:'none',title:`请输入手机号码`
107 }) 107 })
...@@ -117,6 +117,7 @@ function submit(){ ...@@ -117,6 +117,7 @@ function submit(){
117 uni.showToast({ 117 uni.showToast({
118 icon:'none',title:`修改成功` 118 icon:'none',title:`修改成功`
119 }) 119 })
120 edit.value = false
120 }) 121 })
121 } 122 }
122 function changeSex(e){ 123 function changeSex(e){
......
...@@ -41,7 +41,7 @@ ...@@ -41,7 +41,7 @@
41 </view> 41 </view>
42 <view class="func"> 42 <view class="func">
43 <button 43 <button
44 @click="handleUpdate(item)" v-if="item.settleFlag != 0">上传凭证 44 @click="handleUpdate(item)" v-if="item.settleFlag != 0">确认并上传
45 </button> 45 </button>
46 <button @click="handleDownload(item)" >下载缴费通知单</button> 46 <button @click="handleDownload(item)" >下载缴费通知单</button>
47 </view> 47 </view>
...@@ -62,7 +62,7 @@ ...@@ -62,7 +62,7 @@
62 <uni-forms-item label="缴费凭证" required> 62 <uni-forms-item label="缴费凭证" required>
63 63
64 <uni-file-picker limit="1" file-mediatype="all" file-extname="png,jpg,jpeg,pdf,zip" 64 <uni-file-picker limit="1" file-mediatype="all" file-extname="png,jpg,jpeg,pdf,zip"
65 @select="selectFile" 65 @select="selectFile" v-model="form.payEvidenceObj"
66 @progress="fileProgress" @delete="delSupplementFile(index)"></uni-file-picker> 66 @progress="fileProgress" @delete="delSupplementFile(index)"></uni-file-picker>
67 </uni-forms-item> 67 </uni-forms-item>
68 <uni-forms-item label="备注"> 68 <uni-forms-item label="备注">
...@@ -118,6 +118,16 @@ function getList() { ...@@ -118,6 +118,16 @@ function getList() {
118 118
119 function handleUpdate(item) { 119 function handleUpdate(item) {
120 form.value.yjId = item.yjId 120 form.value.yjId = item.yjId
121 form.value.payTime = item.payTime
122 if(item.payEvidence){
123 let file = JSON.parse(item.payEvidence)
124 console.log(file)
125 form.value.payEvidenceObj = {
126 url: file[0].url,
127 name: file[0].name,
128 extname: 'png'
129 }
130 }
121 UpPop.value.open() 131 UpPop.value.open()
122 } 132 }
123 let selectFileValue = {} 133 let selectFileValue = {}
...@@ -144,7 +154,11 @@ function delSupplementFile(index) { ...@@ -144,7 +154,11 @@ function delSupplementFile(index) {
144 } 154 }
145 function uploadSure(){ 155 function uploadSure(){
146 console.log(form.value) 156 console.log(form.value)
147 api.commitPaymentVoucher(form.value).then(res=>{ 157 api.commitPaymentVoucherYJ({
158 payTime:form.value.payTime,
159 url:form.value.url,
160 yjId:form.value.yjId
161 }).then(res=>{
148 UpPop.value.close() 162 UpPop.value.close()
149 form.value = {} 163 form.value = {}
150 uni.showToast({ 164 uni.showToast({
...@@ -224,6 +238,7 @@ function circulation(id) { ...@@ -224,6 +238,7 @@ function circulation(id) {
224 </script> 238 </script>
225 239
226 <style scoped lang="scss"> 240 <style scoped lang="scss">
241 :deep(.file-picker__progress){opacity: 0;}
227 .popBody { 242 .popBody {
228 font-size: 28rpx; 243 font-size: 28rpx;
229 line-height: 1.5; 244 line-height: 1.5;
......
Styling with Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!