f391b4a8 by 杨炀

Merge commit '4037b935'

# Conflicts:
#	level/addApply.vue
#	personalVip/addVip.vue
2 parents e4576d59 4037b935
<script>
import {
h5Login
getInfo
} from '@/common/login.js';
import * as api from '@/common/api.js';
import config from '@/config.js';
......@@ -12,24 +12,21 @@ export default {
console.log('App Launch', options);
firstload = true
this.globalData.baseUrl_api = config.baseUrl_api;
if(loginUrl.indexOf( options.path)==-1){
this.globalData.baseUrl_api = config.baseUrl_api;
if(loginUrl.indexOf(options.path)==-1){
let userName = uni.getStorageSync('userName')
if (userName) {
h5Login(userName)
.then(() => {
this.globalData.isLogin = true;
let firstLoadCallback = getApp().firstLoadCallback;
if (firstLoadCallback) {
firstLoadCallback();
}
})
.catch(() => {
uni.redirectTo({
url: '/login/login'
})
getInfo().then(() => {
this.globalData.isLogin = true;
let firstLoadCallback = getApp().firstLoadCallback;
if (firstLoadCallback) {
firstLoadCallback();
}
}).catch(() => {
uni.redirectTo({
url: '/login/login'
})
})
} else {
this.globalData.isLogin = false;
uni.redirectTo({
......
......@@ -82,11 +82,12 @@ function getInfo() {
}).then(res => {
const app = getApp()
const user = res.data.user
// const personInfo = res.data.personInfo
// const personInfo = res.data.personInfo
uni.setStorageSync('userName', user.userName)
// uni.setStorageSync('perId', personInfo.perId||-1)
app.globalData.deptType = user.dept.deptType
app.globalData.genFlag = user.dept.genFlag
app.globalData.genFlag = user.dept.genFlag
user.dept.deptType = '3'
switch (user.dept.deptType) {
case '1': // 中跆协
app.globalData.userType = '1'
......@@ -136,5 +137,6 @@ export {
loginByPhone,
groupMemberRegister,
getMyOwnMemberInfo,
logout
logout,
getInfo
}
......
import config from '@/config.js'
import {
h5LoginAuto
} from './login'
import config from '@/config.js'
import _ from 'lodash'
const excludeUrls = ['login/login', 'login/register']
const excludeUrls = ['getMemberCountInfo', 'getInfo']
// 获取Token
function getToken() {
try {
const token = uni.getStorageSync('token')
if (token) {
return token
} else {
return ''
}
} catch (e) {
console.log(e)
}
try {
const token = uni.getStorageSync('token')
if (token) {
return token
} else {
return ''
}
} catch (e) {
console.log(e)
}
}
// 获取请求头
function getHeaders() {
const token = getToken()
const header = {
'Authorization': token,
'Content-Type': 'application/json', // 根据自己的数据类型
'Content-Language': 'zh_CN',
// "Content-Type":"application/x-www-form-urlencoded",
'Ztx-Per-Id': uni.getStorageSync('perId') || '-1'
}
return header
const token = getToken()
const header = {
'Authorization': token,
'Content-Type': 'application/json', // 根据自己的数据类型
'Content-Language': 'zh_CN',
// "Content-Type":"application/x-www-form-urlencoded",
'Ztx-Per-Id': uni.getStorageSync('perId') || '-1'
}
return header
}
const request = function(req) {
req.method = req.method.toUpperCase()
if (!['GET', 'POST', 'PUT', 'DELETE'].includes(req.method)) {
uni.showToast({
title: `暂不支持的请求方式: ${req.method}`,
icon: 'none'
})
return
}
req.method = req.method.toUpperCase()
if (!['GET', 'POST', 'PUT', 'DELETE'].includes(req.method)) {
uni.showToast({
title: `暂不支持的请求方式: ${req.method}`,
icon: 'none'
})
return
}
// if (req.method === 'GET') {
// if (!req.params) {
// req.params = {}
// }
// req.params.pageNum = req.params.pageNum || 1
// req.params.pageSize = req.params.pageSize || 50
// }
// if (req.method === 'GET') {
// if (!req.params) {
// req.params = {}
// }
// req.params.pageNum = req.params.pageNum || 1
// req.params.pageSize = req.params.pageSize || 50
// }
// if (req.method == 'POST' && !req.hideLoding) {
// uni.showLoading({
// title: '提交中...'
// })
// }
// if (req.method == 'POST' && !req.hideLoding) {
// uni.showLoading({
// title: '提交中...'
// })
// }
return new Promise((resolve, reject) => {
uni.request({
url: config.baseUrl_api + req.url,
method: req.method,
data: req.params,
header: getHeaders()
}).then(res => {
switch (res.statusCode) {
case 200:
const data = res.data || {}
if (data.code === 0 || data.code === 200 || data.pageData?.code === 200) {
resolve(data)
} else if (req.url.indexOf('getMemberCountInfo') > -1) {
resolve(data)
} else {
// if (!excludeUrls.includes(req.url)) {
// if (data.msg) {
// uni.showModal({
// content: data.msg,
// success: function(res) {
return new Promise((resolve, reject) => {
uni.request({
url: config.baseUrl_api + req.url,
method: req.method,
data: req.params,
header: getHeaders()
}).then(res => {
switch (res.statusCode) {
case 200:
const data = res.data || {}
if (data.code === 0 || data.code === 200 || data.pageData?.code === 200) {
resolve(data)
} else if (_.some(excludeUrls, (url) => req.url.indexOf(url) > -1)) {
resolve(data)
} else {
// if (!excludeUrls.includes(req.url)) {
// if (data.msg) {
// uni.showModal({
// content: data.msg,
// success: function(res) {
// }
// })
uni.showToast({
title: data.msg,
icon: 'none',
duration: 2000
})
// }
// uni.hideLoading()
// }
// })
uni.showToast({
title: data.msg,
icon: 'none',
duration: 2000
})
// }
// uni.hideLoading()
// }
// }
// 登录超时
if (data.code === 60002 || data.code === 60001) {
uni.redirectTo({
url: '/login/login'
})
} else if (data.code === 401) {
h5LoginAuto()
.then(() => {
uni.hideLoading()
uni.redirectTo({
url: getCurrentPages()[getCurrentPages()
.length - 1].$page.fullPath
})
})
.catch(() => {
uni.showToast({
title: '服务异常,请稍后重试',
icon: 'none'
})
})
}
// 登录超时
// if (data.code === 60002 || data.code === 60001) {
// uni.redirectTo({
// url: '/login/login'
// })
// } else if (data.code === 401) {
// h5LoginAuto()
// .then(() => {
// uni.hideLoading()
// uni.redirectTo({
// url: getCurrentPages()[getCurrentPages()
// .length - 1].$page.fullPath
// })
// })
// .catch(() => {
// uni.showToast({
// title: '服务异常,请稍后重试',
// icon: 'none'
// })
// })
// }
reject(res)
}
break
default:
reject(res)
}
}).catch(res => {
reject(res)
}).finally(() => {
// if (req.method == 'POST' && !req.hideLoding) {
// uni.hideLoading()
// }
})
})
reject(res)
}
break
default:
reject(res)
}
}).catch(res => {
reject(res)
}).finally(() => {
// if (req.method == 'POST' && !req.hideLoding) {
// uni.hideLoading()
// }
})
})
}
export default request
\ No newline at end of file
export default request
......
......@@ -5,9 +5,9 @@
// staging 会员系统
// const baseUrl_api = "http://22yidpjzjifv.ngrok.xiaomiqiu123.top/stage-api/";
// const baseUrl_api = "http://123.60.96.243/stage-api/";
// const baseUrl_api = 'http://192.168.1.11:8787'
const baseUrl_api = 'http://192.168.1.98:8787'
// const baseUrl_api = 'https://ztx.itechtop.cn/stage-api'
const baseUrl_api = 'https://tkcn.19wk.cn:8443/stage-api'
// const baseUrl_api = 'https://tkcn.19wk.cn:8443/stage-api'
// const baseUrl_api = 'https://newsystem.taekwondo.org.cn/stage-api'
export default {
......
......@@ -75,6 +75,7 @@
考试级别
<!-- <text style="padding: 15rpx 0;">{{ szToHz(n.levelNew) }}</text> -->
<view @click="changeLevelfather(n)">
<uni-data-select v-model="n.levelNew" :localdata="levelArr"
@change="changeLevel"></uni-data-select>
</view>
......@@ -84,7 +85,8 @@
<view style="width: 30%;">
是否通过
<view>
<uni-data-select :clear="false" v-model="n.isPass" :localdata="range"></uni-data-select>
<uni-data-select :clear="false" v-model="n.isPass"
:localdata="range"></uni-data-select>
</view>
</view>
</view>
......@@ -111,11 +113,11 @@
<uni-popup ref="choseStudent" type="bottom" background-color="#fff" animation>
<view class="popBody">
<view class="searchbar">
<uni-easyinput placeholderStyle="font-size:30rpx" :input-border="false" prefixIcon="search"
v-model="studentQuery.name" placeholder="搜索姓名" @blur="chooseOnline" @clear="chooseOnline">
</uni-easyinput>
<view class="popBody">
<view class="searchbar">
<uni-easyinput placeholderStyle="font-size:30rpx" :input-border="false" prefixIcon="search"
v-model="studentQuery.name" placeholder="搜索姓名" @blur="chooseOnline" @clear="chooseOnline">
</uni-easyinput>
</view>
<view class="userlist" style="height:80vh;overflow: auto;">
<view class="item" v-for=" (n,index) in studentList" :key="index">
......@@ -194,9 +196,9 @@
const infoList = ref([])
const ids = ref([])
const tablePersonInfo = ref({})
const transcript = ref([])
const studentQuery = ref({
name:''
const transcript = ref([])
const studentQuery = ref({
name: ''
})
const levelArr = ref([{
value: '10',
......@@ -414,8 +416,8 @@
var obj = {
memId: memberInfo.memId,
examId: form.value.examId,
examType: form.value.type,
name:studentQuery.value.name
examType: form.value.type,
name: studentQuery.value.name
}
api.chooseStudentsList(obj).then(response => {
studentList.value = response.rows
......@@ -527,18 +529,21 @@
let nowRow
function changeLevelfather(row) {
nowRow = row
api.jiDropDownBox({perId: row.perId}).then(res=>{
console.log(res.data)
for(var l of res.data){
l.text = l.name
l.disabled = l.status
}
levelArr.value = res.data
nowRow = row
api.jiDropDownBox({
perId: row.perId
}).then(res => {
console.log(res.data)
for (var l of res.data) {
l.text = l.name
l.disabled = l.status
}
levelArr.value = res.data
})
}
function changeLevel(e) {
console.log(e)
if (e !== nowRow.levelRecommend) {
......@@ -618,7 +623,10 @@
let selectFileValue = {}
function selectFile(e) {
console.log(e)
let file = e.tempFiles[0]
if (!file) {
return
}
for (const n in e.tempFiles) {
api.uploadFileList(e.tempFilePaths[n]).then(data => {
console.log(data)
......
<template>
<view>
<!--级位考试缴费单 查看+上传凭证 -->
<view class="appList">
<view class="appItem" v-for="item in list">
<view class="status" @click="goDetail(item)">
<text v-if="item.record.auditStatus==0" class="text-primary">审核中</text>
<text v-if="item.record.auditStatus==1" class="text-success"> 审核通过</text>
<text v-if="item.record.auditStatus==2" class="text-danger"> 审核拒绝</text>
<text v-if="item.record.auditStatus==3" class="text-warning">已撤回</text>
</view>
<view class="date" @click="goDetail(item)">
<uni-icons type="calendar-filled" size="16" color="#AD181F"></uni-icons>
<text v-if="item.payTime">{{item.payTime}} 缴费</text>
<text v-else>{{item.payNoticeSendTime}} 下发</text>
</view>
<view class="name" @click="goDetail(item)">{{item.finalDocName}}</view>
<view class="flexbox" @click="goDetail(item)">
<view>
人数合计
<view>{{item.personCount}}</view>
</view>
<view>
年限合计
<view>{{item.yearCount}}</view>
</view>
<view>
费用合计
<view>¥{{item.allPrice}}</view>
</view>
</view>
<view class="func">
<button
v-if="(deptType == 2 || deptType == 3)&&item?.record?.auditStatus != 2 && item?.record?.auditStatus != 3"
@click="handleUpdate(item)">上传凭证</button>
</view>
</view>
</view>
<view class="nodata" v-if="list.length==0">
<image mode="aspectFit" src="/static/nodata.png"></image>
<text>暂无数据</text>
</view>
<view>
<!--级位考试缴费单 查看+上传凭证 -->
<view class="appList">
<view class="appItem" v-for="item in list">
<view class="status" @click="goDetail(item)">
<text v-if="item.record.auditStatus==0" class="text-primary">审核中</text>
<text v-if="item.record.auditStatus==1" class="text-success"> 审核通过</text>
<text v-if="item.record.auditStatus==2" class="text-danger"> 审核拒绝</text>
<text v-if="item.record.auditStatus==3" class="text-warning">已撤回</text>
</view>
<view class="date" @click="goDetail(item)">
<uni-icons type="calendar-filled" size="16" color="#AD181F"></uni-icons>
<text v-if="item.payTime">{{item.payTime}} 缴费</text>
<text v-else>{{item.payNoticeSendTime}} 下发</text>
</view>
<view class="name" @click="goDetail(item)">{{item.finalDocName}}</view>
<view class="flexbox" @click="goDetail(item)">
<view>
人数合计
<view>{{item.personCount}}</view>
</view>
<view>
年限合计
<view>{{item.yearCount}}</view>
</view>
<view>
费用合计
<view>¥{{item.allPrice}}</view>
</view>
</view>
<view class="func">
<button
v-if="(deptType == 2 || deptType == 3)&&item?.record?.auditStatus != 2 && item?.record?.auditStatus != 3"
@click="handleUpdate(item)">上传凭证</button>
</view>
</view>
</view>
<view class="nodata" v-if="list.length==0">
<image mode="aspectFit" src="/static/nodata.png"></image>
<text>暂无数据</text>
</view>
<!-- 上传凭证 -->
<uni-popup ref="UpPop" type="bottom" background-color="#fff" animation>
<view class="popBody">
<uni-forms v-model="form">
<uni-forms-item label="缴费日期" required>
<uni-datetime-picker v-model="form.payTime"></uni-datetime-picker>
</uni-forms-item>
<uni-forms-item label="缴费凭证" required>
<!-- 上传凭证 -->
<uni-popup ref="UpPop" type="bottom" background-color="#fff" animation>
<view class="popBody">
<uni-forms v-model="form">
<uni-forms-item label="缴费日期" required>
<uni-datetime-picker v-model="form.payTime"></uni-datetime-picker>
</uni-forms-item>
<uni-forms-item label="缴费凭证" required>
<uni-file-picker limit="1" file-mediatype="all" file-extname="png,jpg,jpeg,pdf,zip"
@select="selectFile"
@progress="fileProgress" @delete="delSupplementFile(index)"></uni-file-picker>
</uni-forms-item>
<uni-forms-item label="备注">
<uni-easyinput v-model="form.remark" type="textarea"></uni-easyinput>
</uni-forms-item>
</uni-forms>
<uni-file-picker limit="1" file-mediatype="all" file-extname="png,jpg,jpeg,pdf,zip"
@select="selectFile"
@progress="fileProgress" @delete="delSupplementFile(index)"></uni-file-picker>
</uni-forms-item>
<uni-forms-item label="备注">
<uni-easyinput v-model="form.remark" type="textarea"></uni-easyinput>
</uni-forms-item>
</uni-forms>
<button class="btn-red" @click="uploadSure">确定</button>
</view>
</uni-popup>
</view>
<button class="btn-red" @click="uploadSure">确定</button>
</view>
</uni-popup>
</view>
</template>
<script setup>
import * as api from '@/common/api.js'
import config from '@/config.js'
import {
onMounted,
ref
} from 'vue'
import {
onLoad
} from '@dcloudio/uni-app'
const app = getApp();
const list = ref([])
const deptType = ref('')
const UpPop = ref(null)
const form = ref({
docId:'',
payTime:'',
url:'',
remark:''
})
onLoad((option) => {
if (app.globalData.isLogin) {
init()
} else {
import * as api from '@/common/api.js'
import config from '@/config.js'
import {
onMounted,
ref
} from 'vue'
import {
onLoad
} from '@dcloudio/uni-app'
const app = getApp();
const list = ref([])
const deptType = ref('')
const UpPop = ref(null)
const form = ref({
docId:'',
payTime:'',
url:'',
remark:''
})
onLoad((option) => {
if (app.globalData.isLogin) {
init()
} else {
app.firstLoadCallback = () => {
init()
};
}
})
app.firstLoadCallback = () => {
init()
};
}
})
function init() {
deptType.value = app.globalData.deptType
getList()
}
function init() {
deptType.value = app.globalData.deptType
getList()
}
function getList() {
api.getFeeBillList().then(res => {
list.value = res.rows
})
}
function getList() {
api.getFeeBillList().then(res => {
list.value = res.rows
})
}
function handleUpdate(item) {
form.value.docId = item.docId
UpPop.value.open()
}
let selectFileValue = {}
function selectFile(e) {
let file = e.tempFiles[0]
api.uploadFile(e).then(data => {
selectFileValue = {
url: data.msg,
name: file.name,
extname: file.extname
}
function handleUpdate(item) {
form.value.docId = item.docId
UpPop.value.open()
}
let selectFileValue = {}
function selectFile(e) {
let file = e.tempFiles[0]
if(!file){
return
}
api.uploadFile(e).then(data => {
selectFileValue = {
url: data.msg,
name: file.name,
extname: file.extname
}
form.value.url=JSON.stringify([selectFileValue])
});
}
function fileProgress(e) {
console.log('progress:'+ e)
}
function delSupplementFile(index) {
selectFileValue = {}
}
function uploadSure(){
console.log(form.value)
api.commitPaymentVoucher(form.value).then(res=>{
UpPop.value.close()
form.value = {}
uni.showToast({
icon:'none',
title:'操作成功'
})
getList()
})
}
function goDetail(item) {
//详情
console.log(item.docId)
let path = `/personalVip/feeBillDetail?docId=${item.docId}`
uni.navigateTo({
url: path
});
}
form.value.url=JSON.stringify([selectFileValue])
});
}
function fileProgress(e) {
console.log('progress:'+ e)
}
function delSupplementFile(index) {
selectFileValue = {}
}
function uploadSure(){
console.log(form.value)
api.commitPaymentVoucher(form.value).then(res=>{
UpPop.value.close()
form.value = {}
uni.showToast({
icon:'none',
title:'操作成功'
})
getList()
})
}
function goDetail(item) {
//详情
console.log(item.docId)
let path = `/personalVip/feeBillDetail?docId=${item.docId}`
uni.navigateTo({
url: path
});
}
</script>
<style scoped lang="scss">
......
This diff could not be displayed because it is too large.
<template>
<view>
<view class="hasfixedbottom">
<view>
<uni-forms ref="baseForm" :border="true" :modelValue="baseFormData" label-width="80">
<view class="nolineform">
<uni-forms-item label="姓名" disabled required name="name">
<uni-easyinput :styles="inputstyle" :clearable='false' :placeholderStyle="placeholderStyle"
v-model="baseFormData.name" placeholder="请输入姓名" />
</uni-forms-item>
<uni-forms-item label="证件类型" disabled required name="idcType">
<uni-data-select v-model="baseFormData.idcType" :localdata="idcTypeList"></uni-data-select>
</uni-forms-item>
<uni-forms-item label="证件号码" disabled required name="idcCode">
<uni-easyinput :styles="inputstyle" :clearable='false' :placeholderStyle="placeholderStyle"
v-model="baseFormData.idcCode" @blur="giveBirthDay" placeholder="请输入证件号码" />
</uni-forms-item>
<uni-forms-item label="性别" disabled required name="sex">
<uni-data-checkbox v-model="baseFormData.sex" @change="changeSex" :localdata="sexs" />
</uni-forms-item>
<uni-forms-item label="出生日期" disabled required name="birth">
<uni-datetime-picker type="date" placeholder="YYYY-MM-DD" :border='false'
:clear-icon="false" v-model="baseFormData.birth" />
</uni-forms-item>
<uni-forms-item label="联系方式" name="phone">
<uni-easyinput :styles="inputstyle" :placeholderStyle="placeholderStyle"
v-model="baseFormData.phone" placeholder="请输入联系方式" />
</uni-forms-item>
<uni-forms-item label="所在地区">
<uni-data-picker class="fixUniFormItemStyle" v-model="baseFormData.cityId"
:localdata="regionsList" popup-title="请选择所在地区"></uni-data-picker>
</uni-forms-item>
<uni-forms-item label="详细地址"><uni-easyinput :styles="inputstyle"
:placeholderStyle="placeholderStyle" v-model="baseFormData.address"
placeholder="请输入详细地址" /></uni-forms-item>
<uni-forms-item label="头像" required name="photo">
<uni-file-picker v-model="baseFormData.photoObj" @delete="delPhoto" return-type="object"
limit="1" @select="upPhoto" :image-styles="imageStylesTx"></uni-file-picker>
</uni-forms-item>
</view>
</uni-forms>
</view>
<view>
<view class="hasfixedbottom">
<view>
<uni-forms ref="baseForm" :border="true" :modelValue="baseFormData" label-width="80">
<view class="nolineform">
<uni-forms-item label="姓名" disabled required name="name">
<uni-easyinput :styles="inputstyle" :clearable='false' :placeholderStyle="placeholderStyle"
v-model="baseFormData.name" placeholder="请输入姓名" />
</uni-forms-item>
<uni-forms-item label="证件类型" disabled required name="idcType">
<uni-data-select v-model="baseFormData.idcType" :localdata="idcTypeList"></uni-data-select>
</uni-forms-item>
<uni-forms-item label="证件号码" disabled required name="idcCode">
<uni-easyinput :styles="inputstyle" :clearable='false' :placeholderStyle="placeholderStyle"
v-model="baseFormData.idcCode" @blur="giveBirthDay" placeholder="请输入证件号码" />
</uni-forms-item>
<uni-forms-item label="性别" disabled required name="sex">
<uni-data-checkbox v-model="baseFormData.sex" @change="changeSex" :localdata="sexs" />
</uni-forms-item>
<uni-forms-item label="出生日期" disabled required name="birth">
<uni-datetime-picker type="date" placeholder="YYYY-MM-DD" :border='false'
:clear-icon="false" v-model="baseFormData.birth" />
</uni-forms-item>
<uni-forms-item label="联系方式" name="phone">
<uni-easyinput :styles="inputstyle" :placeholderStyle="placeholderStyle"
v-model="baseFormData.phone" placeholder="请输入联系方式" />
</uni-forms-item>
<uni-forms-item label="所在地区">
<uni-data-picker class="fixUniFormItemStyle" v-model="baseFormData.cityId"
:localdata="regionsList" popup-title="请选择所在地区"></uni-data-picker>
</uni-forms-item>
<uni-forms-item label="详细地址"><uni-easyinput :styles="inputstyle"
:placeholderStyle="placeholderStyle" v-model="baseFormData.address"
placeholder="请输入详细地址" /></uni-forms-item>
<uni-forms-item label="头像" required name="photo">
<uni-file-picker v-model="baseFormData.photoObj" @delete="delPhoto" return-type="object"
limit="1" @select="upPhoto" :image-styles="imageStylesTx"></uni-file-picker>
</uni-forms-item>
</view>
</uni-forms>
</view>
</view>
<view class="fixedBottom"><button class="btn-red" @click="goSubmit">确 定</button></view>
</view>
</view>
<view class="fixedBottom"><button class="btn-red" @click="goSubmit">确 定</button></view>
</view>
</template>
<script setup>
import {
onMounted,
ref
} from 'vue'
import {
onLoad
} from '@dcloudio/uni-app';
import * as api from '@/common/api.js'
const perId = ref()
const regionsList = ref([])
const baseFormData = ref({
sex: '0',
idcType: '0'
})
const idcTypeList = ref([{
value: '0',
text: "身份证"
},
{
value: '1',
text: "港澳台通信身份证"
},
{
value: '3',
text: "外国护照"
}
])
const sexs = ref([{
text: '女',
value: '0'
}, {
text: '男',
value: '1'
}])
const placeholderStyle = ref('text-align: right;font-size:30rpx')
const inputstyle = ref({
borderColor: '#fff',
fontSize: '30rpx'
})
const imageStylesTx = ref({
width: '210rpx',
height: '280rpx',
background: {
color: '#F4F6FA'
},
border: {
radius: '2px'
}
});
onLoad((option)=>{
import {
onMounted,
ref
} from 'vue'
import {
onLoad
} from '@dcloudio/uni-app';
import * as api from '@/common/api.js'
const perId = ref()
const regionsList = ref([])
const baseFormData = ref({
sex: '0',
idcType: '0'
})
const idcTypeList = ref([{
value: '0',
text: "身份证"
},
{
value: '1',
text: "港澳台通信身份证"
},
{
value: '3',
text: "外国护照"
}
])
const sexs = ref([{
text: '女',
value: '0'
}, {
text: '男',
value: '1'
}])
const placeholderStyle = ref('text-align: right;font-size:30rpx')
const inputstyle = ref({
borderColor: '#fff',
fontSize: '30rpx'
})
const imageStylesTx = ref({
width: '210rpx',
height: '280rpx',
background: {
color: '#F4F6FA'
},
border: {
radius: '2px'
}
});
onLoad((option)=>{
})
onMounted(() => {
getRegionsList()
})
function getRegionsList() {
api.regionsList().then(res => {
regionsList.value = res.data
})
}
function upPhoto(e) {
// api.uploadImg(e).then(data => {
// baseFormData.value.photo = data.data;
// });
}
function delimgFont(n) {
baseFormData.value.card = '';
}
function delPhoto(n) {
baseFormData.value.photo = '';
}
function goSubmit() {
})
onMounted(() => {
getRegionsList()
})
function getRegionsList() {
api.regionsList().then(res => {
regionsList.value = res.data
})
}
function upPhoto(e) {
let file = e.tempFiles[0]
if(!file){
return
}
// api.uploadImg(e).then(data => {
// baseFormData.value.photo = data.data;
// });
}
function delimgFont(n) {
baseFormData.value.card = '';
}
function delPhoto(n) {
baseFormData.value.photo = '';
}
function goSubmit() {
}
function getUserInfo() {
api.getInfo(perId.value).then(res=>{
forms.value = res.data
if (forms.areaAssName)forms.ancestorNameList = forms.value.ancestorNameList.join(',').replaceAll(',', '/')
})
}
}
function getUserInfo() {
api.getInfo(perId.value).then(res=>{
forms.value = res.data
if (forms.areaAssName)forms.ancestorNameList = forms.value.ancestorNameList.join(',').replaceAll(',', '/')
})
}
</script>
<style lang="scss" scoped>
......
<template>
<view>
<!-- 查看缴费单+上传凭证 -->
<!-- 缴费审核 -->
<view class="appList">
<view class="appItem" v-for="(item,index) in list" :key="index">
<view class="status" @click="goDetail(item)">
<text v-if="item.record.auditStatus==0" class="text-primary">审核中</text>
<text v-if="item.record.auditStatus==1" class="text-success"> 审核通过</text>
<text v-if="item.record.auditStatus==2" class="text-danger"> 审核拒绝</text>
<text v-if="item.record.auditStatus==3" class="text-warning">已撤回</text>
</view>
<view class="date" @click="goDetail(item)">
<uni-icons type="calendar-filled" size="16" color="#AD181F"></uni-icons>
<text v-if="item.payTime">{{item.payTime}} 缴费</text>
<text v-else>{{item.payNoticeSendTime}} 下发</text>
</view>
<view class="name" @click="goDetail(item)">{{item.finalDocName}}</view>
<view class="flexbox" @click="goDetail(item)">
<view>
人数合计
<view>{{item.personCount}}</view>
</view>
<view>
年限合计
<view>{{item.yearCount}}</view>
</view>
<view>
费用合计
<view>¥{{item.allPrice}}</view>
</view>
</view>
<view class="func">
<button
v-if="(deptType == 2 || deptType == 3)&&item?.record?.auditStatus != 2 && item?.record?.auditStatus != 3"
@click="handleUpdate(item)">上传凭证</button>
</view>
</view>
</view>
<view class="nodata" v-if="list.length==0">
<image mode="aspectFit" src="/static/nodata.png"></image>
<text>暂无数据</text>
</view>
<view>
<!-- 查看缴费单+上传凭证 -->
<!-- 缴费审核 -->
<view class="appList">
<view class="appItem" v-for="(item,index) in list" :key="index">
<view class="status" @click="goDetail(item)">
<text v-if="item.record.auditStatus==0" class="text-primary">审核中</text>
<text v-if="item.record.auditStatus==1" class="text-success"> 审核通过</text>
<text v-if="item.record.auditStatus==2" class="text-danger"> 审核拒绝</text>
<text v-if="item.record.auditStatus==3" class="text-warning">已撤回</text>
</view>
<view class="date" @click="goDetail(item)">
<uni-icons type="calendar-filled" size="16" color="#AD181F"></uni-icons>
<text v-if="item.payTime">{{item.payTime}} 缴费</text>
<text v-else>{{item.payNoticeSendTime}} 下发</text>
</view>
<view class="name" @click="goDetail(item)">{{item.finalDocName}}</view>
<view class="flexbox" @click="goDetail(item)">
<view>
人数合计
<view>{{item.personCount}}</view>
</view>
<view>
年限合计
<view>{{item.yearCount}}</view>
</view>
<view>
费用合计
<view>¥{{item.allPrice}}</view>
</view>
</view>
<view class="func">
<button
v-if="(deptType == 2 || deptType == 3)&&item?.record?.auditStatus != 2 && item?.record?.auditStatus != 3"
@click="handleUpdate(item)">上传凭证</button>
</view>
</view>
</view>
<view class="nodata" v-if="list.length==0">
<image mode="aspectFit" src="/static/nodata.png"></image>
<text>暂无数据</text>
</view>
<!-- 上传凭证 -->
<uni-popup ref="UpPop" type="bottom" background-color="#fff" animation>
<view class="popBody">
<uni-forms v-model="form">
<uni-forms-item label="缴费日期" required>
<uni-datetime-picker v-model="form.payTime"></uni-datetime-picker>
</uni-forms-item>
<uni-forms-item label="缴费凭证" required>
<!-- 上传凭证 -->
<uni-popup ref="UpPop" type="bottom" background-color="#fff" animation>
<view class="popBody">
<uni-forms v-model="form">
<uni-forms-item label="缴费日期" required>
<uni-datetime-picker v-model="form.payTime"></uni-datetime-picker>
</uni-forms-item>
<uni-forms-item label="缴费凭证" required>
<uni-file-picker limit="1" file-mediatype="all" file-extname="png,jpg,jpeg,pdf,zip"
@select="selectFile"
@progress="fileProgress" @delete="delSupplementFile(index)"></uni-file-picker>
</uni-forms-item>
<uni-forms-item label="备注">
<uni-easyinput v-model="form.remark" type="textarea"></uni-easyinput>
</uni-forms-item>
</uni-forms>
<uni-file-picker limit="1" file-mediatype="all" file-extname="png,jpg,jpeg,pdf,zip"
@select="selectFile"
@progress="fileProgress" @delete="delSupplementFile(index)"></uni-file-picker>
</uni-forms-item>
<uni-forms-item label="备注">
<uni-easyinput v-model="form.remark" type="textarea"></uni-easyinput>
</uni-forms-item>
</uni-forms>
<button class="btn-red" @click="uploadSure">确定</button>
</view>
</uni-popup>
</view>
<button class="btn-red" @click="uploadSure">确定</button>
</view>
</uni-popup>
</view>
</template>
<script setup>
import * as api from '@/common/api.js'
import config from '@/config.js'
import {
onMounted,
ref
} from 'vue'
import {
onShow
} from '@dcloudio/uni-app'
const app = getApp();
const list = ref([])
const deptType = ref('')
const UpPop = ref(null)
const form = ref({
docId:'',
payTime:'',
url:'',
remark:''
})
onShow(() => {
if (app.globalData.isLogin) {
init()
} else {
app.firstLoadCallback = () => {
init()
};
}
})
import * as api from '@/common/api.js'
import config from '@/config.js'
import {
onMounted,
ref
} from 'vue'
import {
onShow
} from '@dcloudio/uni-app'
const app = getApp();
const list = ref([])
const deptType = ref('')
const UpPop = ref(null)
const form = ref({
docId:'',
payTime:'',
url:'',
remark:''
})
onShow(() => {
if (app.globalData.isLogin) {
init()
} else {
app.firstLoadCallback = () => {
init()
};
}
})
function init() {
deptType.value = app.globalData.deptType
getList()
}
function init() {
deptType.value = app.globalData.deptType
getList()
}
function getList() {
api.getFeeBillList().then(res => {
list.value = res.rows
})
}
function getList() {
api.getFeeBillList().then(res => {
list.value = res.rows
})
}
function handleUpdate(item) {
form.value.docId = item.docId
UpPop.value.open()
}
let selectFileValue = {}
function selectFile(e) {
let file = e.tempFiles[0]
api.uploadFile(e).then(data => {
selectFileValue = {
url: data.msg,
name: file.name,
extname: file.extname
}
function handleUpdate(item) {
form.value.docId = item.docId
UpPop.value.open()
}
let selectFileValue = {}
function selectFile(e) {
let file = e.tempFiles[0]
if(!file){
return
}
api.uploadFile(e).then(data => {
selectFileValue = {
url: data.msg,
name: file.name,
extname: file.extname
}
form.value.url=JSON.stringify([selectFileValue])
});
}
function fileProgress(e) {
console.log('progress:'+ e)
}
function delSupplementFile(index) {
selectFileValue = {}
}
function uploadSure(){
console.log(form.value)
api.commitPaymentVoucher(form.value).then(res=>{
UpPop.value.close()
form.value = {}
uni.showToast({
icon:'none',
title:'操作成功'
})
getList()
})
}
function goDetail(item) {
//详情
console.log(item.docId)
let path = `/personalVip/feeBillDetail?docId=${item.docId}`
uni.navigateTo({
url: path
});
}
form.value.url=JSON.stringify([selectFileValue])
});
}
function fileProgress(e) {
console.log('progress:'+ e)
}
function delSupplementFile(index) {
selectFileValue = {}
}
function uploadSure(){
console.log(form.value)
api.commitPaymentVoucher(form.value).then(res=>{
UpPop.value.close()
form.value = {}
uni.showToast({
icon:'none',
title:'操作成功'
})
getList()
})
}
function goDetail(item) {
//详情
console.log(item.docId)
let path = `/personalVip/feeBillDetail?docId=${item.docId}`
uni.navigateTo({
url: path
});
}
</script>
<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!