4037b935 by 华明祺

登录调整

1 parent 8630af21
1 <script> 1 <script>
2 import { 2 import {
3 h5Login 3 getInfo
4 } from '@/common/login.js'; 4 } from '@/common/login.js';
5 import * as api from '@/common/api.js'; 5 import * as api from '@/common/api.js';
6 import config from '@/config.js'; 6 import config from '@/config.js';
...@@ -12,24 +12,21 @@ export default { ...@@ -12,24 +12,21 @@ export default {
12 console.log('App Launch', options); 12 console.log('App Launch', options);
13 firstload = true 13 firstload = true
14 14
15 this.globalData.baseUrl_api = config.baseUrl_api; 15 this.globalData.baseUrl_api = config.baseUrl_api;
16 16 if(loginUrl.indexOf(options.path)==-1){
17 if(loginUrl.indexOf( options.path)==-1){
18 let userName = uni.getStorageSync('userName') 17 let userName = uni.getStorageSync('userName')
19 if (userName) { 18 if (userName) {
20 h5Login(userName) 19 getInfo().then(() => {
21 .then(() => { 20 this.globalData.isLogin = true;
22 this.globalData.isLogin = true; 21 let firstLoadCallback = getApp().firstLoadCallback;
23 let firstLoadCallback = getApp().firstLoadCallback; 22 if (firstLoadCallback) {
24 if (firstLoadCallback) { 23 firstLoadCallback();
25 firstLoadCallback(); 24 }
26 } 25 }).catch(() => {
27 }) 26 uni.redirectTo({
28 .catch(() => { 27 url: '/login/login'
29 uni.redirectTo({
30 url: '/login/login'
31 })
32 }) 28 })
29 })
33 } else { 30 } else {
34 this.globalData.isLogin = false; 31 this.globalData.isLogin = false;
35 uni.redirectTo({ 32 uni.redirectTo({
......
...@@ -82,11 +82,12 @@ function getInfo() { ...@@ -82,11 +82,12 @@ function getInfo() {
82 }).then(res => { 82 }).then(res => {
83 const app = getApp() 83 const app = getApp()
84 const user = res.data.user 84 const user = res.data.user
85 // const personInfo = res.data.personInfo 85 // const personInfo = res.data.personInfo
86 uni.setStorageSync('userName', user.userName) 86 uni.setStorageSync('userName', user.userName)
87 // uni.setStorageSync('perId', personInfo.perId||-1) 87 // uni.setStorageSync('perId', personInfo.perId||-1)
88 app.globalData.deptType = user.dept.deptType 88 app.globalData.deptType = user.dept.deptType
89 app.globalData.genFlag = user.dept.genFlag 89 app.globalData.genFlag = user.dept.genFlag
90 user.dept.deptType = '3'
90 switch (user.dept.deptType) { 91 switch (user.dept.deptType) {
91 case '1': // 中跆协 92 case '1': // 中跆协
92 app.globalData.userType = '1' 93 app.globalData.userType = '1'
...@@ -136,5 +137,6 @@ export { ...@@ -136,5 +137,6 @@ export {
136 loginByPhone, 137 loginByPhone,
137 groupMemberRegister, 138 groupMemberRegister,
138 getMyOwnMemberInfo, 139 getMyOwnMemberInfo,
139 logout 140 logout,
141 getInfo
140 } 142 }
......
1 import config from '@/config.js' 1 import config from '@/config.js'
2 import { 2 import _ from 'lodash'
3 h5LoginAuto
4 } from './login'
5 3
6 const excludeUrls = ['login/login', 'login/register'] 4 const excludeUrls = ['getMemberCountInfo', 'getInfo']
7 5
8 // 获取Token 6 // 获取Token
9 function getToken() { 7 function getToken() {
10 try { 8 try {
11 const token = uni.getStorageSync('token') 9 const token = uni.getStorageSync('token')
12 if (token) { 10 if (token) {
13 return token 11 return token
14 } else { 12 } else {
15 return '' 13 return ''
16 } 14 }
17 } catch (e) { 15 } catch (e) {
18 console.log(e) 16 console.log(e)
19 } 17 }
20 } 18 }
21 19
22 // 获取请求头 20 // 获取请求头
23 function getHeaders() { 21 function getHeaders() {
24 const token = getToken() 22 const token = getToken()
25 const header = { 23 const header = {
26 'Authorization': token, 24 'Authorization': token,
27 'Content-Type': 'application/json', // 根据自己的数据类型 25 'Content-Type': 'application/json', // 根据自己的数据类型
28 'Content-Language': 'zh_CN', 26 'Content-Language': 'zh_CN',
29 // "Content-Type":"application/x-www-form-urlencoded", 27 // "Content-Type":"application/x-www-form-urlencoded",
30 'Ztx-Per-Id': uni.getStorageSync('perId') || '-1' 28 'Ztx-Per-Id': uni.getStorageSync('perId') || '-1'
31 } 29 }
32 return header 30 return header
33 } 31 }
34 32
35 const request = function(req) { 33 const request = function(req) {
36 req.method = req.method.toUpperCase() 34 req.method = req.method.toUpperCase()
37 if (!['GET', 'POST', 'PUT', 'DELETE'].includes(req.method)) { 35 if (!['GET', 'POST', 'PUT', 'DELETE'].includes(req.method)) {
38 uni.showToast({ 36 uni.showToast({
39 title: `暂不支持的请求方式: ${req.method}`, 37 title: `暂不支持的请求方式: ${req.method}`,
40 icon: 'none' 38 icon: 'none'
41 }) 39 })
42 return 40 return
43 } 41 }
44 42
45 // if (req.method === 'GET') { 43 // if (req.method === 'GET') {
46 // if (!req.params) { 44 // if (!req.params) {
47 // req.params = {} 45 // req.params = {}
48 // } 46 // }
49 // req.params.pageNum = req.params.pageNum || 1 47 // req.params.pageNum = req.params.pageNum || 1
50 // req.params.pageSize = req.params.pageSize || 50 48 // req.params.pageSize = req.params.pageSize || 50
51 // } 49 // }
52 50
53 // if (req.method == 'POST' && !req.hideLoding) { 51 // if (req.method == 'POST' && !req.hideLoding) {
54 // uni.showLoading({ 52 // uni.showLoading({
55 // title: '提交中...' 53 // title: '提交中...'
56 // }) 54 // })
57 // } 55 // }
58 56
59 return new Promise((resolve, reject) => { 57 return new Promise((resolve, reject) => {
60 uni.request({ 58 uni.request({
61 url: config.baseUrl_api + req.url, 59 url: config.baseUrl_api + req.url,
62 method: req.method, 60 method: req.method,
63 data: req.params, 61 data: req.params,
64 header: getHeaders() 62 header: getHeaders()
65 }).then(res => { 63 }).then(res => {
66 switch (res.statusCode) { 64 switch (res.statusCode) {
67 case 200: 65 case 200:
68 const data = res.data || {} 66 const data = res.data || {}
69 if (data.code === 0 || data.code === 200 || data.pageData?.code === 200) { 67 if (data.code === 0 || data.code === 200 || data.pageData?.code === 200) {
70 resolve(data) 68 resolve(data)
71 } else if (req.url.indexOf('getMemberCountInfo') > -1) { 69 } else if (_.some(excludeUrls, (url) => req.url.indexOf(url) > -1)) {
72 resolve(data) 70 resolve(data)
73 } else { 71 } else {
74 // if (!excludeUrls.includes(req.url)) { 72 // if (!excludeUrls.includes(req.url)) {
75 // if (data.msg) { 73 // if (data.msg) {
76 // uni.showModal({ 74 // uni.showModal({
77 // content: data.msg, 75 // content: data.msg,
78 // success: function(res) { 76 // success: function(res) {
79 77
80 // } 78 // }
81 // }) 79 // })
82 uni.showToast({ 80 uni.showToast({
83 title: data.msg, 81 title: data.msg,
84 icon: 'none', 82 icon: 'none',
85 duration: 2000 83 duration: 2000
86 }) 84 })
87 // } 85 // }
88 // uni.hideLoading() 86 // uni.hideLoading()
89 87
90 // } 88 // }
91 89
92 // 登录超时 90 // 登录超时
93 if (data.code === 60002 || data.code === 60001) { 91 // if (data.code === 60002 || data.code === 60001) {
94 uni.redirectTo({ 92 // uni.redirectTo({
95 url: '/login/login' 93 // url: '/login/login'
96 }) 94 // })
97 } else if (data.code === 401) { 95 // } else if (data.code === 401) {
98 h5LoginAuto() 96 // h5LoginAuto()
99 .then(() => { 97 // .then(() => {
100 uni.hideLoading() 98 // uni.hideLoading()
101 uni.redirectTo({ 99 // uni.redirectTo({
102 url: getCurrentPages()[getCurrentPages() 100 // url: getCurrentPages()[getCurrentPages()
103 .length - 1].$page.fullPath 101 // .length - 1].$page.fullPath
104 }) 102 // })
105 }) 103 // })
106 .catch(() => { 104 // .catch(() => {
107 uni.showToast({ 105 // uni.showToast({
108 title: '服务异常,请稍后重试', 106 // title: '服务异常,请稍后重试',
109 icon: 'none' 107 // icon: 'none'
110 }) 108 // })
111 }) 109 // })
112 } 110 // }
113 111
114 reject(res) 112 reject(res)
115 } 113 }
116 break 114 break
117 default: 115 default:
118 reject(res) 116 reject(res)
119 } 117 }
120 }).catch(res => { 118 }).catch(res => {
121 reject(res) 119 reject(res)
122 }).finally(() => { 120 }).finally(() => {
123 // if (req.method == 'POST' && !req.hideLoding) { 121 // if (req.method == 'POST' && !req.hideLoding) {
124 // uni.hideLoading() 122 // uni.hideLoading()
125 // } 123 // }
126 }) 124 })
127 }) 125 })
128 } 126 }
129 127
130 export default request
...\ No newline at end of file ...\ No newline at end of file
128 export default request
......
...@@ -5,9 +5,9 @@ ...@@ -5,9 +5,9 @@
5 // staging 会员系统 5 // staging 会员系统
6 // const baseUrl_api = "http://22yidpjzjifv.ngrok.xiaomiqiu123.top/stage-api/"; 6 // const baseUrl_api = "http://22yidpjzjifv.ngrok.xiaomiqiu123.top/stage-api/";
7 // const baseUrl_api = "http://123.60.96.243/stage-api/"; 7 // const baseUrl_api = "http://123.60.96.243/stage-api/";
8 // const baseUrl_api = 'http://192.168.1.11:8787' 8 const baseUrl_api = 'http://192.168.1.98:8787'
9 // const baseUrl_api = 'https://ztx.itechtop.cn/stage-api' 9 // const baseUrl_api = 'https://ztx.itechtop.cn/stage-api'
10 const baseUrl_api = 'https://tkcn.19wk.cn:8443/stage-api' 10 // const baseUrl_api = 'https://tkcn.19wk.cn:8443/stage-api'
11 11
12 // const baseUrl_api = 'https://newsystem.taekwondo.org.cn/stage-api' 12 // const baseUrl_api = 'https://newsystem.taekwondo.org.cn/stage-api'
13 export default { 13 export default {
......
1 <template> 1 <template>
2 <view> 2 <view>
3 <!--级位考试缴费单 查看+上传凭证 --> 3 <!--级位考试缴费单 查看+上传凭证 -->
4 <view class="appList"> 4 <view class="appList">
5 <view class="appItem" v-for="item in list"> 5 <view class="appItem" v-for="item in list">
6 <view class="status" @click="goDetail(item)"> 6 <view class="status" @click="goDetail(item)">
7 <text v-if="item.record.auditStatus==0" class="text-primary">审核中</text> 7 <text v-if="item.record.auditStatus==0" class="text-primary">审核中</text>
8 <text v-if="item.record.auditStatus==1" class="text-success"> 审核通过</text> 8 <text v-if="item.record.auditStatus==1" class="text-success"> 审核通过</text>
9 <text v-if="item.record.auditStatus==2" class="text-danger"> 审核拒绝</text> 9 <text v-if="item.record.auditStatus==2" class="text-danger"> 审核拒绝</text>
10 <text v-if="item.record.auditStatus==3" class="text-warning">已撤回</text> 10 <text v-if="item.record.auditStatus==3" class="text-warning">已撤回</text>
11 </view> 11 </view>
12 <view class="date" @click="goDetail(item)"> 12 <view class="date" @click="goDetail(item)">
13 <uni-icons type="calendar-filled" size="16" color="#AD181F"></uni-icons> 13 <uni-icons type="calendar-filled" size="16" color="#AD181F"></uni-icons>
14 <text v-if="item.payTime">{{item.payTime}} 缴费</text> 14 <text v-if="item.payTime">{{item.payTime}} 缴费</text>
15 <text v-else>{{item.payNoticeSendTime}} 下发</text> 15 <text v-else>{{item.payNoticeSendTime}} 下发</text>
16 </view> 16 </view>
17 <view class="name" @click="goDetail(item)">{{item.finalDocName}}</view> 17 <view class="name" @click="goDetail(item)">{{item.finalDocName}}</view>
18 <view class="flexbox" @click="goDetail(item)"> 18 <view class="flexbox" @click="goDetail(item)">
19 <view> 19 <view>
20 人数合计 20 人数合计
21 <view>{{item.personCount}}</view> 21 <view>{{item.personCount}}</view>
22 </view> 22 </view>
23 <view> 23 <view>
24 年限合计 24 年限合计
25 <view>{{item.yearCount}}</view> 25 <view>{{item.yearCount}}</view>
26 </view> 26 </view>
27 <view> 27 <view>
28 费用合计 28 费用合计
29 <view>¥{{item.allPrice}}</view> 29 <view>¥{{item.allPrice}}</view>
30 </view> 30 </view>
31 </view> 31 </view>
32 <view class="func"> 32 <view class="func">
33 <button 33 <button
34 v-if="(deptType == 2 || deptType == 3)&&item?.record?.auditStatus != 2 && item?.record?.auditStatus != 3" 34 v-if="(deptType == 2 || deptType == 3)&&item?.record?.auditStatus != 2 && item?.record?.auditStatus != 3"
35 @click="handleUpdate(item)">上传凭证</button> 35 @click="handleUpdate(item)">上传凭证</button>
36 </view> 36 </view>
37 </view> 37 </view>
38 </view> 38 </view>
39 <view class="nodata" v-if="list.length==0"> 39 <view class="nodata" v-if="list.length==0">
40 <image mode="aspectFit" src="/static/nodata.png"></image> 40 <image mode="aspectFit" src="/static/nodata.png"></image>
41 <text>暂无数据</text> 41 <text>暂无数据</text>
42 </view> 42 </view>
43 43
44 <!-- 上传凭证 --> 44 <!-- 上传凭证 -->
45 <uni-popup ref="UpPop" type="bottom" background-color="#fff" animation> 45 <uni-popup ref="UpPop" type="bottom" background-color="#fff" animation>
46 <view class="popBody"> 46 <view class="popBody">
47 <uni-forms v-model="form"> 47 <uni-forms v-model="form">
48 <uni-forms-item label="缴费日期" required> 48 <uni-forms-item label="缴费日期" required>
49 <uni-datetime-picker v-model="form.payTime"></uni-datetime-picker> 49 <uni-datetime-picker v-model="form.payTime"></uni-datetime-picker>
50 </uni-forms-item> 50 </uni-forms-item>
51 <uni-forms-item label="缴费凭证" required> 51 <uni-forms-item label="缴费凭证" required>
52 52
53 <uni-file-picker limit="1" file-mediatype="all" file-extname="png,jpg,jpeg,pdf,zip" 53 <uni-file-picker limit="1" file-mediatype="all" file-extname="png,jpg,jpeg,pdf,zip"
54 @select="selectFile" 54 @select="selectFile"
55 @progress="fileProgress" @delete="delSupplementFile(index)"></uni-file-picker> 55 @progress="fileProgress" @delete="delSupplementFile(index)"></uni-file-picker>
56 </uni-forms-item> 56 </uni-forms-item>
57 <uni-forms-item label="备注"> 57 <uni-forms-item label="备注">
58 <uni-easyinput v-model="form.remark" type="textarea"></uni-easyinput> 58 <uni-easyinput v-model="form.remark" type="textarea"></uni-easyinput>
59 </uni-forms-item> 59 </uni-forms-item>
60 </uni-forms> 60 </uni-forms>
61 61
62 <button class="btn-red" @click="uploadSure">确定</button> 62 <button class="btn-red" @click="uploadSure">确定</button>
63 </view> 63 </view>
64 </uni-popup> 64 </uni-popup>
65 </view> 65 </view>
66 </template> 66 </template>
67 67
68 <script setup> 68 <script setup>
69 import * as api from '@/common/api.js' 69 import * as api from '@/common/api.js'
70 import config from '@/config.js' 70 import config from '@/config.js'
71 import { 71 import {
72 onMounted, 72 onMounted,
73 ref 73 ref
74 } from 'vue' 74 } from 'vue'
75 import { 75 import {
76 onLoad 76 onLoad
77 } from '@dcloudio/uni-app' 77 } from '@dcloudio/uni-app'
78 const app = getApp(); 78 const app = getApp();
79 const list = ref([]) 79 const list = ref([])
80 const deptType = ref('') 80 const deptType = ref('')
81 const UpPop = ref(null) 81 const UpPop = ref(null)
82 const form = ref({ 82 const form = ref({
83 docId:'', 83 docId:'',
84 payTime:'', 84 payTime:'',
85 url:'', 85 url:'',
86 remark:'' 86 remark:''
87 }) 87 })
88 onLoad((option) => { 88 onLoad((option) => {
89 if (app.globalData.isLogin) { 89 if (app.globalData.isLogin) {
90 init() 90 init()
91 } else { 91 } else {
92 92
93 app.firstLoadCallback = () => { 93 app.firstLoadCallback = () => {
94 init() 94 init()
95 }; 95 };
96 } 96 }
97 }) 97 })
98 98
99 function init() { 99 function init() {
100 deptType.value = app.globalData.deptType 100 deptType.value = app.globalData.deptType
101 getList() 101 getList()
102 } 102 }
103 103
104 function getList() { 104 function getList() {
105 api.getFeeBillList().then(res => { 105 api.getFeeBillList().then(res => {
106 list.value = res.rows 106 list.value = res.rows
107 }) 107 })
108 } 108 }
109 109
110 function handleUpdate(item) { 110 function handleUpdate(item) {
111 form.value.docId = item.docId 111 form.value.docId = item.docId
112 UpPop.value.open() 112 UpPop.value.open()
113 } 113 }
114 let selectFileValue = {} 114 let selectFileValue = {}
115 function selectFile(e) { 115 function selectFile(e) {
116 let file = e.tempFiles[0] 116 let file = e.tempFiles[0]
117 api.uploadFile(e).then(data => { 117 if(!file){
118 selectFileValue = { 118 return
119 url: data.msg, 119 }
120 name: file.name, 120 api.uploadFile(e).then(data => {
121 extname: file.extname 121 selectFileValue = {
122 } 122 url: data.msg,
123 name: file.name,
124 extname: file.extname
125 }
123 126
124 form.value.url=JSON.stringify([selectFileValue]) 127 form.value.url=JSON.stringify([selectFileValue])
125 }); 128 });
126 } 129 }
127 function fileProgress(e) { 130 function fileProgress(e) {
128 console.log('progress:'+ e) 131 console.log('progress:'+ e)
129 } 132 }
130 function delSupplementFile(index) { 133 function delSupplementFile(index) {
131 selectFileValue = {} 134 selectFileValue = {}
132 } 135 }
133 function uploadSure(){ 136 function uploadSure(){
134 console.log(form.value) 137 console.log(form.value)
135 api.commitPaymentVoucher(form.value).then(res=>{ 138 api.commitPaymentVoucher(form.value).then(res=>{
136 UpPop.value.close() 139 UpPop.value.close()
137 form.value = {} 140 form.value = {}
138 uni.showToast({ 141 uni.showToast({
139 icon:'none', 142 icon:'none',
140 title:'操作成功' 143 title:'操作成功'
141 }) 144 })
142 getList() 145 getList()
143 }) 146 })
144 } 147 }
145 function goDetail(item) { 148 function goDetail(item) {
146 //详情 149 //详情
147 console.log(item.docId) 150 console.log(item.docId)
148 let path = `/personalVip/feeBillDetail?docId=${item.docId}` 151 let path = `/personalVip/feeBillDetail?docId=${item.docId}`
149 uni.navigateTo({ 152 uni.navigateTo({
150 url: path 153 url: path
151 }); 154 });
152 } 155 }
153 </script> 156 </script>
154 157
155 <style scoped lang="scss"> 158 <style scoped lang="scss">
......
This diff could not be displayed because it is too large.
1 <template> 1 <template>
2 <view> 2 <view>
3 <view class="hasfixedbottom"> 3 <view class="hasfixedbottom">
4 <view> 4 <view>
5 <uni-forms ref="baseForm" :border="true" :modelValue="baseFormData" label-width="80"> 5 <uni-forms ref="baseForm" :border="true" :modelValue="baseFormData" label-width="80">
6 6
7 <view class="nolineform"> 7 <view class="nolineform">
8 8
9 <uni-forms-item label="姓名" disabled required name="name"> 9 <uni-forms-item label="姓名" disabled required name="name">
10 <uni-easyinput :styles="inputstyle" :clearable='false' :placeholderStyle="placeholderStyle" 10 <uni-easyinput :styles="inputstyle" :clearable='false' :placeholderStyle="placeholderStyle"
11 v-model="baseFormData.name" placeholder="请输入姓名" /> 11 v-model="baseFormData.name" placeholder="请输入姓名" />
12 </uni-forms-item> 12 </uni-forms-item>
13 <uni-forms-item label="证件类型" disabled required name="idcType"> 13 <uni-forms-item label="证件类型" disabled required name="idcType">
14 <uni-data-select v-model="baseFormData.idcType" :localdata="idcTypeList"></uni-data-select> 14 <uni-data-select v-model="baseFormData.idcType" :localdata="idcTypeList"></uni-data-select>
15 </uni-forms-item> 15 </uni-forms-item>
16 16
17 <uni-forms-item label="证件号码" disabled required name="idcCode"> 17 <uni-forms-item label="证件号码" disabled required name="idcCode">
18 <uni-easyinput :styles="inputstyle" :clearable='false' :placeholderStyle="placeholderStyle" 18 <uni-easyinput :styles="inputstyle" :clearable='false' :placeholderStyle="placeholderStyle"
19 v-model="baseFormData.idcCode" @blur="giveBirthDay" placeholder="请输入证件号码" /> 19 v-model="baseFormData.idcCode" @blur="giveBirthDay" placeholder="请输入证件号码" />
20 </uni-forms-item> 20 </uni-forms-item>
21 <uni-forms-item label="性别" disabled required name="sex"> 21 <uni-forms-item label="性别" disabled required name="sex">
22 <uni-data-checkbox v-model="baseFormData.sex" @change="changeSex" :localdata="sexs" /> 22 <uni-data-checkbox v-model="baseFormData.sex" @change="changeSex" :localdata="sexs" />
23 </uni-forms-item> 23 </uni-forms-item>
24 <uni-forms-item label="出生日期" disabled required name="birth"> 24 <uni-forms-item label="出生日期" disabled required name="birth">
25 <uni-datetime-picker type="date" placeholder="YYYY-MM-DD" :border='false' 25 <uni-datetime-picker type="date" placeholder="YYYY-MM-DD" :border='false'
26 :clear-icon="false" v-model="baseFormData.birth" /> 26 :clear-icon="false" v-model="baseFormData.birth" />
27 </uni-forms-item> 27 </uni-forms-item>
28 <uni-forms-item label="联系方式" name="phone"> 28 <uni-forms-item label="联系方式" name="phone">
29 <uni-easyinput :styles="inputstyle" :placeholderStyle="placeholderStyle" 29 <uni-easyinput :styles="inputstyle" :placeholderStyle="placeholderStyle"
30 v-model="baseFormData.phone" placeholder="请输入联系方式" /> 30 v-model="baseFormData.phone" placeholder="请输入联系方式" />
31 </uni-forms-item> 31 </uni-forms-item>
32 32
33 <uni-forms-item label="所在地区"> 33 <uni-forms-item label="所在地区">
34 <uni-data-picker class="fixUniFormItemStyle" v-model="baseFormData.cityId" 34 <uni-data-picker class="fixUniFormItemStyle" v-model="baseFormData.cityId"
35 :localdata="regionsList" popup-title="请选择所在地区"></uni-data-picker> 35 :localdata="regionsList" popup-title="请选择所在地区"></uni-data-picker>
36 </uni-forms-item> 36 </uni-forms-item>
37 <uni-forms-item label="详细地址"><uni-easyinput :styles="inputstyle" 37 <uni-forms-item label="详细地址"><uni-easyinput :styles="inputstyle"
38 :placeholderStyle="placeholderStyle" v-model="baseFormData.address" 38 :placeholderStyle="placeholderStyle" v-model="baseFormData.address"
39 placeholder="请输入详细地址" /></uni-forms-item> 39 placeholder="请输入详细地址" /></uni-forms-item>
40 40
41 <uni-forms-item label="头像" required name="photo"> 41 <uni-forms-item label="头像" required name="photo">
42 <uni-file-picker v-model="baseFormData.photoObj" @delete="delPhoto" return-type="object" 42 <uni-file-picker v-model="baseFormData.photoObj" @delete="delPhoto" return-type="object"
43 limit="1" @select="upPhoto" :image-styles="imageStylesTx"></uni-file-picker> 43 limit="1" @select="upPhoto" :image-styles="imageStylesTx"></uni-file-picker>
44 </uni-forms-item> 44 </uni-forms-item>
45 45
46 </view> 46 </view>
47 </uni-forms> 47 </uni-forms>
48 48
49 </view> 49 </view>
50 50
51 </view> 51 </view>
52 <view class="fixedBottom"><button class="btn-red" @click="goSubmit">确 定</button></view> 52 <view class="fixedBottom"><button class="btn-red" @click="goSubmit">确 定</button></view>
53 </view> 53 </view>
54 </template> 54 </template>
55 55
56 <script setup> 56 <script setup>
57 import { 57 import {
58 onMounted, 58 onMounted,
59 ref 59 ref
60 } from 'vue' 60 } from 'vue'
61 import { 61 import {
62 onLoad 62 onLoad
63 } from '@dcloudio/uni-app'; 63 } from '@dcloudio/uni-app';
64 import * as api from '@/common/api.js' 64 import * as api from '@/common/api.js'
65 const perId = ref() 65 const perId = ref()
66 const regionsList = ref([]) 66 const regionsList = ref([])
67 const baseFormData = ref({ 67 const baseFormData = ref({
68 sex: '0', 68 sex: '0',
69 idcType: '0' 69 idcType: '0'
70 }) 70 })
71 const idcTypeList = ref([{ 71 const idcTypeList = ref([{
72 value: '0', 72 value: '0',
73 text: "身份证" 73 text: "身份证"
74 }, 74 },
75 { 75 {
76 value: '1', 76 value: '1',
77 text: "港澳台通信身份证" 77 text: "港澳台通信身份证"
78 }, 78 },
79 { 79 {
80 value: '3', 80 value: '3',
81 text: "外国护照" 81 text: "外国护照"
82 } 82 }
83 ]) 83 ])
84 const sexs = ref([{ 84 const sexs = ref([{
85 text: '女', 85 text: '女',
86 value: '0' 86 value: '0'
87 }, { 87 }, {
88 text: '男', 88 text: '男',
89 value: '1' 89 value: '1'
90 }]) 90 }])
91 const placeholderStyle = ref('text-align: right;font-size:30rpx') 91 const placeholderStyle = ref('text-align: right;font-size:30rpx')
92 const inputstyle = ref({ 92 const inputstyle = ref({
93 borderColor: '#fff', 93 borderColor: '#fff',
94 fontSize: '30rpx' 94 fontSize: '30rpx'
95 }) 95 })
96 const imageStylesTx = ref({ 96 const imageStylesTx = ref({
97 width: '210rpx', 97 width: '210rpx',
98 height: '280rpx', 98 height: '280rpx',
99 background: { 99 background: {
100 color: '#F4F6FA' 100 color: '#F4F6FA'
101 }, 101 },
102 border: { 102 border: {
103 radius: '2px' 103 radius: '2px'
104 } 104 }
105 }); 105 });
106 onLoad((option)=>{ 106 onLoad((option)=>{
107 107
108 }) 108 })
109 onMounted(() => { 109 onMounted(() => {
110 getRegionsList() 110 getRegionsList()
111 }) 111 })
112 112
113 function getRegionsList() { 113 function getRegionsList() {
114 api.regionsList().then(res => { 114 api.regionsList().then(res => {
115 regionsList.value = res.data 115 regionsList.value = res.data
116 }) 116 })
117 } 117 }
118 118
119 function upPhoto(e) { 119 function upPhoto(e) {
120 // api.uploadImg(e).then(data => { 120 let file = e.tempFiles[0]
121 // baseFormData.value.photo = data.data; 121 if(!file){
122 // }); 122 return
123 } 123 }
124 124
125 function delimgFont(n) { 125 // api.uploadImg(e).then(data => {
126 baseFormData.value.card = ''; 126 // baseFormData.value.photo = data.data;
127 } 127 // });
128 128 }
129 function delPhoto(n) { 129
130 baseFormData.value.photo = ''; 130 function delimgFont(n) {
131 } 131 baseFormData.value.card = '';
132 132 }
133 133
134 function goSubmit() { 134 function delPhoto(n) {
135 baseFormData.value.photo = '';
136 }
137
138
139 function goSubmit() {
135 140
136 } 141 }
137 142
138 function getUserInfo() { 143 function getUserInfo() {
139 api.getInfo(perId.value).then(res=>{ 144 api.getInfo(perId.value).then(res=>{
140 forms.value = res.data 145 forms.value = res.data
141 if (forms.areaAssName)forms.ancestorNameList = forms.value.ancestorNameList.join(',').replaceAll(',', '/') 146 if (forms.areaAssName)forms.ancestorNameList = forms.value.ancestorNameList.join(',').replaceAll(',', '/')
142 }) 147 })
143 } 148 }
144 </script> 149 </script>
145 150
146 <style lang="scss" scoped> 151 <style lang="scss" scoped>
......
1 <template> 1 <template>
2 <view> 2 <view>
3 <!-- 查看缴费单+上传凭证 --> 3 <!-- 查看缴费单+上传凭证 -->
4 <!-- 缴费审核 --> 4 <!-- 缴费审核 -->
5 <view class="appList"> 5 <view class="appList">
6 <view class="appItem" v-for="(item,index) in list" :key="index"> 6 <view class="appItem" v-for="(item,index) in list" :key="index">
7 <view class="status" @click="goDetail(item)"> 7 <view class="status" @click="goDetail(item)">
8 <text v-if="item.record.auditStatus==0" class="text-primary">审核中</text> 8 <text v-if="item.record.auditStatus==0" class="text-primary">审核中</text>
9 <text v-if="item.record.auditStatus==1" class="text-success"> 审核通过</text> 9 <text v-if="item.record.auditStatus==1" class="text-success"> 审核通过</text>
10 <text v-if="item.record.auditStatus==2" class="text-danger"> 审核拒绝</text> 10 <text v-if="item.record.auditStatus==2" class="text-danger"> 审核拒绝</text>
11 <text v-if="item.record.auditStatus==3" class="text-warning">已撤回</text> 11 <text v-if="item.record.auditStatus==3" class="text-warning">已撤回</text>
12 </view> 12 </view>
13 <view class="date" @click="goDetail(item)"> 13 <view class="date" @click="goDetail(item)">
14 <uni-icons type="calendar-filled" size="16" color="#AD181F"></uni-icons> 14 <uni-icons type="calendar-filled" size="16" color="#AD181F"></uni-icons>
15 <text v-if="item.payTime">{{item.payTime}} 缴费</text> 15 <text v-if="item.payTime">{{item.payTime}} 缴费</text>
16 <text v-else>{{item.payNoticeSendTime}} 下发</text> 16 <text v-else>{{item.payNoticeSendTime}} 下发</text>
17 </view> 17 </view>
18 <view class="name" @click="goDetail(item)">{{item.finalDocName}}</view> 18 <view class="name" @click="goDetail(item)">{{item.finalDocName}}</view>
19 <view class="flexbox" @click="goDetail(item)"> 19 <view class="flexbox" @click="goDetail(item)">
20 <view> 20 <view>
21 人数合计 21 人数合计
22 <view>{{item.personCount}}</view> 22 <view>{{item.personCount}}</view>
23 </view> 23 </view>
24 <view> 24 <view>
25 年限合计 25 年限合计
26 <view>{{item.yearCount}}</view> 26 <view>{{item.yearCount}}</view>
27 </view> 27 </view>
28 <view> 28 <view>
29 费用合计 29 费用合计
30 <view>¥{{item.allPrice}}</view> 30 <view>¥{{item.allPrice}}</view>
31 </view> 31 </view>
32 </view> 32 </view>
33 <view class="func"> 33 <view class="func">
34 <button 34 <button
35 v-if="(deptType == 2 || deptType == 3)&&item?.record?.auditStatus != 2 && item?.record?.auditStatus != 3" 35 v-if="(deptType == 2 || deptType == 3)&&item?.record?.auditStatus != 2 && item?.record?.auditStatus != 3"
36 @click="handleUpdate(item)">上传凭证</button> 36 @click="handleUpdate(item)">上传凭证</button>
37 </view> 37 </view>
38 </view> 38 </view>
39 </view> 39 </view>
40 <view class="nodata" v-if="list.length==0"> 40 <view class="nodata" v-if="list.length==0">
41 <image mode="aspectFit" src="/static/nodata.png"></image> 41 <image mode="aspectFit" src="/static/nodata.png"></image>
42 <text>暂无数据</text> 42 <text>暂无数据</text>
43 </view> 43 </view>
44 44
45 <!-- 上传凭证 --> 45 <!-- 上传凭证 -->
46 <uni-popup ref="UpPop" type="bottom" background-color="#fff" animation> 46 <uni-popup ref="UpPop" type="bottom" background-color="#fff" animation>
47 <view class="popBody"> 47 <view class="popBody">
48 <uni-forms v-model="form"> 48 <uni-forms v-model="form">
49 <uni-forms-item label="缴费日期" required> 49 <uni-forms-item label="缴费日期" required>
50 <uni-datetime-picker v-model="form.payTime"></uni-datetime-picker> 50 <uni-datetime-picker v-model="form.payTime"></uni-datetime-picker>
51 </uni-forms-item> 51 </uni-forms-item>
52 <uni-forms-item label="缴费凭证" required> 52 <uni-forms-item label="缴费凭证" required>
53 53
54 <uni-file-picker limit="1" file-mediatype="all" file-extname="png,jpg,jpeg,pdf,zip" 54 <uni-file-picker limit="1" file-mediatype="all" file-extname="png,jpg,jpeg,pdf,zip"
55 @select="selectFile" 55 @select="selectFile"
56 @progress="fileProgress" @delete="delSupplementFile(index)"></uni-file-picker> 56 @progress="fileProgress" @delete="delSupplementFile(index)"></uni-file-picker>
57 </uni-forms-item> 57 </uni-forms-item>
58 <uni-forms-item label="备注"> 58 <uni-forms-item label="备注">
59 <uni-easyinput v-model="form.remark" type="textarea"></uni-easyinput> 59 <uni-easyinput v-model="form.remark" type="textarea"></uni-easyinput>
60 </uni-forms-item> 60 </uni-forms-item>
61 </uni-forms> 61 </uni-forms>
62 62
63 <button class="btn-red" @click="uploadSure">确定</button> 63 <button class="btn-red" @click="uploadSure">确定</button>
64 </view> 64 </view>
65 </uni-popup> 65 </uni-popup>
66 </view> 66 </view>
67 </template> 67 </template>
68 68
69 <script setup> 69 <script setup>
70 import * as api from '@/common/api.js' 70 import * as api from '@/common/api.js'
71 import config from '@/config.js' 71 import config from '@/config.js'
72 import { 72 import {
73 onMounted, 73 onMounted,
74 ref 74 ref
75 } from 'vue' 75 } from 'vue'
76 import { 76 import {
77 onShow 77 onShow
78 } from '@dcloudio/uni-app' 78 } from '@dcloudio/uni-app'
79 const app = getApp(); 79 const app = getApp();
80 const list = ref([]) 80 const list = ref([])
81 const deptType = ref('') 81 const deptType = ref('')
82 const UpPop = ref(null) 82 const UpPop = ref(null)
83 const form = ref({ 83 const form = ref({
84 docId:'', 84 docId:'',
85 payTime:'', 85 payTime:'',
86 url:'', 86 url:'',
87 remark:'' 87 remark:''
88 }) 88 })
89 onShow(() => { 89 onShow(() => {
90 if (app.globalData.isLogin) { 90 if (app.globalData.isLogin) {
91 init() 91 init()
92 } else { 92 } else {
93 app.firstLoadCallback = () => { 93 app.firstLoadCallback = () => {
94 init() 94 init()
95 }; 95 };
96 } 96 }
97 }) 97 })
98 98
99 function init() { 99 function init() {
100 deptType.value = app.globalData.deptType 100 deptType.value = app.globalData.deptType
101 getList() 101 getList()
102 } 102 }
103 103
104 function getList() { 104 function getList() {
105 api.getFeeBillList().then(res => { 105 api.getFeeBillList().then(res => {
106 list.value = res.rows 106 list.value = res.rows
107 }) 107 })
108 } 108 }
109 109
110 function handleUpdate(item) { 110 function handleUpdate(item) {
111 form.value.docId = item.docId 111 form.value.docId = item.docId
112 UpPop.value.open() 112 UpPop.value.open()
113 } 113 }
114 let selectFileValue = {} 114 let selectFileValue = {}
115 function selectFile(e) { 115 function selectFile(e) {
116 let file = e.tempFiles[0] 116 let file = e.tempFiles[0]
117 api.uploadFile(e).then(data => { 117 if(!file){
118 selectFileValue = { 118 return
119 url: data.msg, 119 }
120 name: file.name, 120 api.uploadFile(e).then(data => {
121 extname: file.extname 121 selectFileValue = {
122 } 122 url: data.msg,
123 name: file.name,
124 extname: file.extname
125 }
123 126
124 form.value.url=JSON.stringify([selectFileValue]) 127 form.value.url=JSON.stringify([selectFileValue])
125 }); 128 });
126 } 129 }
127 function fileProgress(e) { 130 function fileProgress(e) {
128 console.log('progress:'+ e) 131 console.log('progress:'+ e)
129 } 132 }
130 function delSupplementFile(index) { 133 function delSupplementFile(index) {
131 selectFileValue = {} 134 selectFileValue = {}
132 } 135 }
133 function uploadSure(){ 136 function uploadSure(){
134 console.log(form.value) 137 console.log(form.value)
135 api.commitPaymentVoucher(form.value).then(res=>{ 138 api.commitPaymentVoucher(form.value).then(res=>{
136 UpPop.value.close() 139 UpPop.value.close()
137 form.value = {} 140 form.value = {}
138 uni.showToast({ 141 uni.showToast({
139 icon:'none', 142 icon:'none',
140 title:'操作成功' 143 title:'操作成功'
141 }) 144 })
142 getList() 145 getList()
143 }) 146 })
144 } 147 }
145 function goDetail(item) { 148 function goDetail(item) {
146 //详情 149 //详情
147 console.log(item.docId) 150 console.log(item.docId)
148 let path = `/personalVip/feeBillDetail?docId=${item.docId}` 151 let path = `/personalVip/feeBillDetail?docId=${item.docId}`
149 uni.navigateTo({ 152 uni.navigateTo({
150 url: path 153 url: path
151 }); 154 });
152 } 155 }
153 </script> 156 </script>
154 157
155 <style scoped lang="scss"> 158 <style scoped lang="scss">
......
Styling with Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!