@@ -932,6 +932,12 @@ | |||
"navigationBarTitleText": "缴费详情" | |||
} | |||
}, | |||
{ | |||
"path": "pages/EducationalAdministration/StuInfoFresh/PayFee/payInvioce", | |||
"style": { | |||
"navigationBarTitleText": "发票查看" | |||
} | |||
}, | |||
//扫码报到 | |||
{ | |||
"path": "pages/WelcomNewStudents/ConfirmStudentsCheckIn/list", | |||
@@ -1047,7 +1053,7 @@ | |||
"path" : "pages/EducationalAdministration/StuInfoBasic_PayFee/PayFee/list", | |||
"style" : | |||
{ | |||
"navigationBarTitleText": "老生缴费", | |||
"navigationBarTitleText": "老生缴费管理", | |||
"enablePullDownRefresh": false | |||
} | |||
@@ -1056,7 +1062,7 @@ | |||
"path" : "pages/EducationalAdministration/StuInfoBasic_PayFee/PayFee/single", | |||
"style" : | |||
{ | |||
"navigationBarTitleText": "老生缴费", | |||
"navigationBarTitleText": "缴费详情", | |||
"enablePullDownRefresh": false | |||
} | |||
@@ -44,6 +44,7 @@ | |||
setTimeout(()=>{ | |||
this.TOAST("暂无发票信息") | |||
},100) | |||
return | |||
} | |||
this.menuOptions = success | |||
this.activeId = this.menuOptions[0].Id | |||
@@ -16,14 +16,6 @@ | |||
<l-input v-model="payfeetotal" disabled title="实缴合计" disabled right /> | |||
<l-input v-model="YJAmount" disabled title="已缴金额" disabled right /> | |||
</view> | |||
<!-- <tki-qrcode | |||
v-if="qrCodeUrl" | |||
ref="qrcode" | |||
:val="qrCodeUrl" | |||
:size="300" | |||
:onval="true" | |||
:loadMake="true" | |||
/> --> | |||
<view style="display:flex;justify-content: center;padding-top: 18px;"> | |||
<image v-if="qrCodeUrl" :src="qrCodeUrl" mode="widthFix"></image> | |||
</view> | |||
@@ -40,7 +32,7 @@ | |||
<view> | |||
<l-select v-model="queryData.OnsitePayFeeStatus" :range="dataSource.OnsitePayStatus" title="现场缴费状态" placeholder="请选择" /> | |||
</view> --> | |||
<view v-if="ready&&canPay" class="btn" @click="tapBtn('getQRCode')"> | |||
<view v-if="ready&&canPay&&!qrCodeUrl" class="btn" @click="tapBtn('getQRCode')"> | |||
生成二维码 | |||
</view> | |||
<view v-if="ready&&canPay" class="btn" @click="tapBtn('getPayRes')"> | |||
@@ -110,6 +102,7 @@ export default{ | |||
fieldsData:[ | |||
{type:'label',field:'ChargeItemName',name:'缴费项目'}, | |||
{type:'label',field:'Standard',name:'收费标准'}, | |||
// {type:'label',field:'copy_SJAmount',name:'本次应缴'}, | |||
{type:'input',field:'SJAmount',name:'本次实缴',edit:true}, | |||
] | |||
}, | |||
@@ -156,13 +149,18 @@ export default{ | |||
this.TOAST("未查询到该学生收费标准!请先维护收费标准。"); | |||
return; | |||
} | |||
this.FinaChargesStandardList = res.FinaChargesStandardList | |||
this.FinaChargesStandardList = res.FinaChargesStandardList.map((item)=>{ | |||
item.copy_SJAmount = item.SJAmount | |||
return item | |||
}) | |||
this.StuInfoFreshData = res.StuInfoFreshData | |||
this.PayFeeTotal = res.PayFeeTotal | |||
if(Number(this.PayFeeTotal)>0){ | |||
this.getpayfeetotal() | |||
if(Number(this.payfeetotal)>0){ | |||
this.canPay = true | |||
}else{ | |||
this.TOAST("缴费已经完成") | |||
this.changeIpnutEdit(false) | |||
this.TOAST("缴费已完成") | |||
} | |||
this.YJAmount = res.YJAmount | |||
this.ready = true | |||
@@ -212,9 +210,9 @@ export default{ | |||
let list = [],detail="",isNull=false; | |||
this.FinaChargesStandardList.forEach(item=>{ | |||
let value = 0 | |||
if(/^-?\d+(,\d{3})*(\.\d{1,2})?$/.test(item.SJAmount)){ | |||
if(/^-?\d+(,\d{3})*(\.\d{1,2})?$/.test(item.SJAmount)&&Number(item.SJAmount)<=Number(item.copy_SJAmount)&&Number(item.SJAmount)>=0){ | |||
value = Number(item.SJAmount) | |||
}else{ | |||
}else{ | |||
isNull=true | |||
} | |||
detail += item.ChargeItemCode + "!" + value + '&'; | |||
@@ -228,23 +226,27 @@ export default{ | |||
list.push(entity) | |||
}) | |||
if (isNull) { | |||
this.TOAST("收费项目金额为空或错误!请检查并填写。"); | |||
this.TOAST("[本次实缴]金额为空或错误!请检查并填写。"); | |||
return; | |||
} | |||
if(Number(this.payfeetotal) == 0){ | |||
this.TOAST("[实缴合计]不能为0!缴费失败。"); | |||
return; | |||
} | |||
detail = detail.substring(0, detail.length - 1); | |||
var param = {}; | |||
//param.LoanMoney = $('#LoanMoney').val(); | |||
param.PayFeeDetail = detail; | |||
param.PayMoney = this.payfeetotal; | |||
this.LOADING('正在生成付款信息请稍等…'); | |||
let postData = { strEntity: JSON.stringify(param), detailList: JSON.stringify(list) } | |||
console.log({ strEntity: param, detailList: list }); | |||
this.HTTP_POST('/learun/payfee/generateqrcode?keyValue=' + this.pageInfo.Id, { strEntity: JSON.stringify(param), detailList: JSON.stringify(list) }).then((res)=> { | |||
this.changeIpnutEdit(false) | |||
this.LOADING('正在生成付款信息请稍等…'); | |||
this.HTTP_POST('/learun/payfee/generateqrcode?keyValue=' + this.pageInfo.Id, postData ).then((res)=> { | |||
this.HIDE_LOADING(); | |||
if(!res){ | |||
return | |||
} | |||
this.qrCodeUrl = this.CONFIG("webHost")+res.imgUrl | |||
// $('#qrcodeImg').attr('src', res.info); | |||
}); | |||
} | |||
if(action == "getPayRes"){ | |||
@@ -260,7 +262,6 @@ export default{ | |||
this.NAV_TO("./payInvioce?keyValue="+this.pageInfo.Id) | |||
}, | |||
getpayfeetotal(){ | |||
this.qrCodeUrl = "" | |||
let value = 0 | |||
this.FinaChargesStandardList.map(item=>{ | |||
if(/^-?\d+(,\d{3})*(\.\d{1,2})?$/.test(item.SJAmount)){ | |||
@@ -268,7 +269,17 @@ export default{ | |||
} | |||
}) | |||
this.payfeetotal = value | |||
} | |||
}, | |||
changeIpnutEdit(edit){ | |||
let item = JSON.parse(JSON.stringify(this.item)) | |||
item.fieldsData = item.fieldsData.map((item1)=>{ | |||
if(["SJAmount"].includes(item1.field)){ | |||
item1.edit = edit | |||
} | |||
return item1 | |||
}) | |||
this.item = item | |||
}, | |||
}, | |||
created() { | |||
this.init() | |||
@@ -3,7 +3,7 @@ | |||
<!-- 主列表页 --> | |||
<view :class="sideOpen ? 'show' : ''" class="mainpage" style="padding-top: 80rpx"> | |||
<!-- 顶部条目/分页信息栏 --> | |||
<l-customlist-banner @buttonClick="sideOpen = true">{{ tips }}</l-customlist-banner> | |||
<l-customlist-banner @buttonClick="sideOpen = false">{{ tips }}</l-customlist-banner> | |||
<!-- 滚动列表,跨端支持上拉/下拉 --> | |||
<l-scroll-list v-if="ready" @pullDown="pullDown" @toBottom="fetchList()" ref="list"> | |||
@@ -20,31 +20,30 @@ | |||
{{ item.StuName }} | |||
</view> | |||
<view class="customlist-item-field"> | |||
<!-- <view class="customlist-item-field"> | |||
<text class="customlist-item-field-title">班级:</text> | |||
{{ displayListItem(item, 'ClassNo') }} | |||
<!-- {{ item.StuName }} --> | |||
</view> | |||
</view> --> | |||
<view class="customlist-item-field"> | |||
<text class="customlist-item-field-title">线上缴费状态:</text> | |||
{{ item.PayFeeStatus == "1" ? "已缴费" : "未缴费" }} | |||
<text class="customlist-item-field-title">性别:</text> | |||
{{ displayListItem(item, 'GenderNo') }} | |||
</view> | |||
<view class="customlist-item-field"> | |||
<text class="customlist-item-field-title">贷款回执码:</text> | |||
{{ item.StudentLoan }} | |||
<text class="customlist-item-field-title">缴费状态:</text> | |||
{{ displayListItem(item, 'PayFeeStatus') }} | |||
</view> | |||
<view class="customlist-item-field"> | |||
<text class="customlist-item-field-title">助学贷款状态:</text> | |||
{{ item.StudentLoanStatus == "1" ? "已审核" : "未审核" }} | |||
</view> | |||
<view class="customlist-item-field"> | |||
<text class="customlist-item-field-title">现场缴费状态:</text> | |||
{{ displayListItem(item, 'OnsitePayFeeStatus') }} | |||
<text class="customlist-item-field-title">开票状态:</text> | |||
{{ displayListItem(item, 'IsInvoice') }} | |||
</view> | |||
<!-- <view class="customlist-item-field"> | |||
<text class="customlist-item-field-title">缴费年度:</text> | |||
{{ item.PayYear }} | |||
</view> --> | |||
</view> | |||
</l-customlist> | |||
@@ -101,10 +100,17 @@ export default { | |||
dataSource: '1', | |||
dataSourceId: 'bjsj,classname,classno' | |||
}, | |||
OnsitePayFeeStatus: { | |||
type: 'select', | |||
itemCode: 'MeasureTime', | |||
dataSource: '0' | |||
GenderNo:{ | |||
type: 'dataItem', | |||
dataType: 'dataDictionary' | |||
}, | |||
PayFeeStatus:{ | |||
type: 'dataItem', | |||
dataType: 'dataDictionary' | |||
}, | |||
IsInvoice:{ | |||
type: 'dataItem', | |||
dataType: 'dataDictionary' | |||
} | |||
}, | |||
@@ -113,11 +119,15 @@ export default { | |||
StuNo: '', | |||
StuName: '' | |||
}, | |||
user:null, | |||
// 数据源 | |||
dataSource: { | |||
ClassNo: [], | |||
OnsitePayFeeStatus: Object.values(this.GET_GLOBAL('dataDictionary').OnsitePayStatus).map(t => ({ value: t.value, text: t.text })) | |||
GenderNo: Object.values(this.GET_GLOBAL('dataDictionary').usersex).map(t => ({ value: t.value, text: t.text })), | |||
PayFeeStatus:Object.values(this.GET_GLOBAL('dataDictionary').PayStatus).map(t => ({ value: t.value, text: t.text })), | |||
IsInvoice:Object.values(this.GET_GLOBAL('dataDictionary').InvoiceStatus).map(t => ({ value: t.value, text: t.text })), | |||
}, | |||
// 页面相关参数 | |||
@@ -145,6 +155,8 @@ export default { | |||
// 页面初始化 | |||
async init() { | |||
this.ON('stuInfoFreshPayFee', this.refreshList); | |||
this.user = this.GET_GLOBAL('loginUser'); | |||
this.queryData.StuNo = this.user.account | |||
// 拉取加载列表和数据源 | |||
await Promise.all([ | |||
@@ -162,11 +174,11 @@ export default { | |||
this.defaultQueryData = this.COPY(this.queryData); | |||
this.ready = true; | |||
}, | |||
tapLi(data) { | |||
this.NAV_TO('./single', data, true); | |||
tapLi({ID}) { | |||
this.NAV_TO('./single', {ID}, true); | |||
}, | |||
// 拉取列表 | |||
async fetchList() { | |||
async fetchList(isConcat=true) { | |||
if (this.page > this.total) { | |||
return; | |||
} | |||
@@ -180,12 +192,11 @@ export default { | |||
queryJson: JSON.stringify(this.queryData) | |||
}; | |||
this.LOADING('加载数据中…'); | |||
await this.HTTP_GET('StuInfoFresh/pageList', _postParam,'加载数据时出错').then(res => { | |||
await this.HTTP_GET('/learun/freshpayfee/getpayfeelist', _postParam,'加载数据时出错').then(res => { | |||
this.HIDE_LOADING(); | |||
// console.log(res) | |||
this.total = res.total; | |||
this.page = res.page + 1; | |||
this.list = this.list.concat(res.rows); | |||
this.list = isConcat?this.list.concat(res.rows):res.rows; | |||
this.tips = `已加载 ${Math.min(res.page, res.total)} / ${res.total} 页,共 ${res.records} 项`; | |||
this.loadState = res.page >= res.total ? '已加载所有项目' : '向下翻以加载更多'; | |||
@@ -193,12 +204,12 @@ export default { | |||
}, | |||
// 刷新清空列表 | |||
async refreshList() { | |||
async refreshList(isConcat=true) { | |||
this.page = 1; | |||
this.total = 2; | |||
this.list = []; | |||
await this.fetchList(); | |||
await this.fetchList(isConcat); | |||
}, | |||
// 列表下拉 | |||
@@ -211,7 +222,7 @@ export default { | |||
// 设置搜索条件 | |||
async searchChange() { | |||
this.sideOpen = false | |||
await this.refreshList(); | |||
await this.refreshList(false); | |||
}, | |||
// 显示列表中的标题项 | |||
@@ -228,6 +239,10 @@ export default { | |||
case 'select': | |||
const selectItem = this.dataSource[field].find(t => t.value === String(value)); | |||
return get(selectItem, 'text', ''); | |||
case 'dataItem': | |||
const sex = this.dataSource[field].find(t => t.value === String(value)); | |||
return get(sex, 'text', ''); | |||
case 'checkbox': | |||
if (!value || value.split(',').length <= 0) { | |||
@@ -0,0 +1,87 @@ | |||
<template> | |||
<view> | |||
<view class="menu"> | |||
<view v-for="item in menuOptions" :key="item.Id" :class="{menu_item:true,active:activeId==item.Id}" @click="()=>{activeId = item.Id;activeIdChange(item)}"> | |||
{{item.billNo}} | |||
</view> | |||
</view> | |||
<iframe v-for="item in menuOptions" :key="item.Id" v-show="activeId == item.Id" :src="item.billUrl"></iframe> | |||
</view> | |||
</template> | |||
<script> | |||
export default { | |||
data() { | |||
return { | |||
menuOptions:[], | |||
activeId:'', | |||
keyValue:'' | |||
} | |||
}, | |||
onLoad({keyValue}) { | |||
if(!keyValue){ | |||
this.NAV_BACK() | |||
setTimeout(()=>{ | |||
this.TOAST("请传入发票信息") | |||
},100) | |||
return | |||
} | |||
this.keyValue = keyValue | |||
this.init() | |||
}, | |||
methods: { | |||
// 选项卡改变 | |||
activeIdChange(item){ | |||
// | |||
}, | |||
init(){ | |||
this.LOADING() | |||
this.HTTP_GET("/learun/freshpayfee/getinvoice?keyValue="+this.keyValue).then((success)=>{ | |||
this.HIDE_LOADING() | |||
if(!success)return | |||
if(!success.length){ | |||
this.NAV_BACK() | |||
setTimeout(()=>{ | |||
this.TOAST("暂无发票信息") | |||
},100) | |||
return | |||
} | |||
this.menuOptions = success | |||
this.activeId = this.menuOptions[0].Id | |||
}) | |||
}, | |||
}, | |||
} | |||
</script> | |||
<style lang="scss" scoped> | |||
.menu{ | |||
display: flex; | |||
justify-content: space-between; | |||
background-color: #fff; | |||
border: 1px solid #E4E7ED; | |||
.menu_item{ | |||
flex: 1; | |||
text-align: center; | |||
box-sizing: border-box; | |||
line-height: 36px; | |||
border: 1px solid #E4E7ED; | |||
position: relative; | |||
} | |||
.menu_item.active::after{ | |||
content: ""; | |||
display: block; | |||
background-color: #409EFF; | |||
position: absolute; | |||
width: 50%; | |||
height: 2px; | |||
left: 0;right: 0; | |||
margin: auto; | |||
bottom: 0; | |||
} | |||
} | |||
iframe{ | |||
width: 100%; | |||
height: calc(100vh - 40px); | |||
} | |||
</style> |
@@ -1,6 +1,29 @@ | |||
<template> | |||
<view class="lr-form-container"> | |||
<view> | |||
<l-input v-model="StuInfoFreshData.StuNo" disabled title="学号" placeholder="请填写学号" right/> | |||
<l-input v-model="StuInfoFreshData.StuName" disabled title="姓名" placeholder="请填写学号" right /> | |||
<l-input :value="displayListItem(StuInfoFreshData, 'ClassNo')" disabled title="班级" placeholder="请填写班级" right /> | |||
<l-input :value="displayListItem(StuInfoFreshData, 'DeptNo')" disabled title="系别" placeholder="请填写系别" right /> | |||
<!-- 姓名 StuName 班级 className 系别 deptName FinaChargesStandardList [缴费项目 ChargeItemName 收费标准 Standard 本次实缴 SJAmount] --> | |||
<l-customform-table | |||
@input="($event)=>{FinaChargesStandardList = $event}" | |||
:value="FinaChargesStandardList" | |||
:item="item" | |||
:edit="false" | |||
/> | |||
<view style="margin-top: 8px;"> | |||
<l-input v-model="PayFeeTotal" disabled title="应缴合计" disabled right /> | |||
<l-input v-model="payfeetotal" disabled title="实缴合计" disabled right /> | |||
<l-input v-model="YJAmount" disabled title="已缴金额" disabled right /> | |||
</view> | |||
<view style="display:flex;justify-content: center;padding-top: 18px;"> | |||
<image v-if="qrCodeUrl" :src="qrCodeUrl" mode="widthFix"></image> | |||
</view> | |||
<!-- :edit="isEdit(item)" --> | |||
<!-- @input="setValue(item.__valuePath__, $event)" --> | |||
<!-- <view> | |||
<l-select v-model="queryData.PayFeeStatus" :range="dataSource.PayStatus" title="线上缴费状态" placeholder="请选择" /> | |||
</view> | |||
<view> | |||
@@ -8,22 +31,47 @@ | |||
</view> | |||
<view> | |||
<l-select v-model="queryData.OnsitePayFeeStatus" :range="dataSource.OnsitePayStatus" title="现场缴费状态" placeholder="请选择" /> | |||
</view> | |||
<view class="btn" @click="tapBtn"> | |||
提交 | |||
</view> --> | |||
<view v-if="ready&&canPay&&!qrCodeUrl" class="btn" @click="tapBtn('getQRCode')"> | |||
生成二维码 | |||
</view> | |||
<view v-if="ready&&canPay" class="btn" @click="tapBtn('getPayRes')"> | |||
查询缴费结果 | |||
</view> | |||
<view class="btn" v-if="ready" @click="lookInvioce"> | |||
查看发票 | |||
</view> | |||
<view class="btn" @click="NAV_BACK()"> | |||
取消缴费 | |||
</view> | |||
<view style="height: 18px;"> | |||
</view> | |||
</view> | |||
</template> | |||
<script> | |||
import moment from 'moment'; | |||
import get from 'lodash/get'; | |||
import set from 'lodash/set'; | |||
import pickBy from 'lodash/pickBy'; | |||
import mapValues from 'lodash/mapValues'; | |||
import tkiQrcode from "@/components/tki-qrcode/tki-qrcode.vue" | |||
export default{ | |||
components:{ | |||
tkiQrcode, | |||
}, | |||
data() { | |||
return { | |||
disabled: false, | |||
ready:false, | |||
canPay:false, | |||
// 数据源 | |||
dataSource: { | |||
PayStatus: Object.values(this.GET_GLOBAL('dataDictionary').PayStatus).map(t => ({ value: t.value, text: t.text })), | |||
OnsitePayStatus: Object.values(this.GET_GLOBAL('dataDictionary').OnsitePayStatus).map(t => ({ value: t.value, text: t.text })) | |||
ClassNo:[], | |||
DeptNo:[], | |||
// PayStatus: Object.values(this.GET_GLOBAL('dataDictionary').PayStatus).map(t => ({ value: t.value, text: t.text })), | |||
// OnsitePayStatus: Object.values(this.GET_GLOBAL('dataDictionary').OnsitePayStatus).map(t => ({ value: t.value, text: t.text })) | |||
}, | |||
queryData: { | |||
StudentLoan: '', | |||
@@ -31,45 +79,207 @@ export default{ | |||
OnsitePayFeeStatus: '', | |||
StudentLoanStatus: '0' | |||
}, | |||
pageInfo:{} | |||
pageInfo:{}, | |||
scheme: { | |||
ClassNo: { | |||
type: 'select', | |||
dataSource: '1', | |||
dataSourceId: 'bjsj,classname,classno' | |||
}, | |||
DeptNo:{ | |||
type: 'dataItem', | |||
dataType: 'dataDictionary' | |||
}, | |||
}, | |||
StuInfoFreshData:{}, | |||
PayFeeTotal:'', | |||
payfeetotal:'', | |||
YJAmount:'', | |||
FinaChargesStandardList:[], | |||
item:{ | |||
title:'缴费信息', | |||
fieldsData:[ | |||
{type:'label',field:'ChargeItemName',name:'缴费项目'}, | |||
{type:'label',field:'Standard',name:'收费标准'}, | |||
// {type:'label',field:'copy_SJAmount',name:'本次应缴'}, | |||
{type:'input',field:'SJAmount',name:'本次实缴',edit:true}, | |||
] | |||
}, | |||
qrCodeUrl:'', | |||
} | |||
}, | |||
watch: { | |||
FinaChargesStandardList: { | |||
handler (val) { | |||
this.getpayfeetotal() | |||
}, | |||
// 这里是关键,代表递归监听 demo 的变化 | |||
deep: true | |||
} | |||
}, | |||
methods:{ | |||
init() { | |||
// console.log(this.dataSource) | |||
async init() { | |||
this.pageInfo = this.GET_PARAM(); //获取页面传递参数 | |||
this.LOADING('加载数据中…'); | |||
this.HTTP_GET('StuInfoFresh/form', this.pageInfo.ID,'加载数据时出错').then(res => { | |||
await Promise.all([ | |||
this.FETCH_DATASOURCE('bjsj').then(data => { | |||
this.dataSource.ClassNo = data.data.map(t => ({ | |||
text: t.classname, | |||
value: t.classno | |||
})); | |||
}), | |||
this.FETCH_DATASOURCE('CdDeptInfo').then(data => { | |||
this.dataSource.DeptNo = data.data.map(t => ({ | |||
text: t.deptname, | |||
value: t.deptno | |||
})); | |||
}), | |||
() => {} | |||
]); | |||
this.HTTP_GET('/learun/freshpayfee/getpayfeeinfo?keyValue='+this.pageInfo.ID, null,'加载数据时出错').then(res => { | |||
this.HIDE_LOADING(); | |||
// console.log(res) | |||
if(res){ | |||
let data = res.StuInfoFresh; | |||
this.queryData.StudentLoan = data.StudentLoan == null? '' : data.StudentLoan; | |||
this.queryData.PayFeeStatus = data.PayFeeStatus == null? '' : data.PayFeeStatus; | |||
this.queryData.OnsitePayFeeStatus = data.OnsitePayFeeStatus == null? '' : data.OnsitePayFeeStatus; | |||
this.disabled = data.StudentLoanStatus == "1"? true : false; | |||
if(!res){ | |||
return | |||
} | |||
if (res['FinaChargesStandardList'].length == 0) { | |||
this.TOAST("未查询到该学生收费标准!请先维护收费标准。"); | |||
return; | |||
} | |||
this.FinaChargesStandardList = res.FinaChargesStandardList.map((item)=>{ | |||
item.copy_SJAmount = item.SJAmount | |||
return item | |||
}) | |||
this.StuInfoFreshData = res.StuInfoFreshData | |||
this.PayFeeTotal = res.PayFeeTotal | |||
this.getpayfeetotal() | |||
if(Number(this.payfeetotal)>0){ | |||
this.canPay = true | |||
}else{ | |||
this.changeIpnutEdit(false) | |||
this.TOAST("缴费已完成") | |||
} | |||
this.YJAmount = res.YJAmount | |||
this.ready = true | |||
}) | |||
}, | |||
tapBtn() { | |||
if(this.queryData.StudentLoan.trim() != ""){ | |||
this.queryData.StudentLoanStatus = 1; | |||
// 显示列表中的标题项 | |||
displayListItem(item, field) { | |||
const fieldItem = this.scheme[field]; | |||
const value = item[field]; | |||
switch (fieldItem.type) { | |||
case 'currentInfo': | |||
case 'organize': | |||
return fieldItem.dataType === 'time' ? value : get(this.GET_GLOBAL(fieldItem.dataType), `${value}.name`, ''); | |||
case 'radio': | |||
case 'select': | |||
const selectItem = this.dataSource[field].find(t => t.value === String(value)); | |||
return get(selectItem, 'text', ''); | |||
case 'dataItem': | |||
const sex = this.dataSource[field].find(t => t.value === String(value)); | |||
return get(sex, 'text', ''); | |||
case 'checkbox': | |||
if (!value || value.split(',').length <= 0) { | |||
return ''; | |||
} | |||
const checkboxItems = value.split(','); | |||
return this.dataSource[field] | |||
.filter(t => checkboxItems.includes(t.value)) | |||
.map(t => t.text) | |||
.join(','); | |||
case 'datetime': | |||
if (!value) { | |||
return ''; | |||
} | |||
return moment(value).format(Number(fieldItem.dateformat) === 0 ? 'YYYY年 M月 D日' : 'YYYY-MM-DD HH:mm'); | |||
default: | |||
return value === null || value === undefined ? '' : value; | |||
} | |||
let _postData = { | |||
keyValue: this.pageInfo.ID, | |||
strEntity: JSON.stringify(this.queryData) | |||
}, | |||
tapBtn(action) { | |||
if(action == "getQRCode"){ | |||
let list = [],detail="",isNull=false; | |||
this.FinaChargesStandardList.forEach(item=>{ | |||
let value = 0 | |||
if(/^-?\d+(,\d{3})*(\.\d{1,2})?$/.test(item.SJAmount)&&Number(item.SJAmount)<=Number(item.copy_SJAmount)&&Number(item.SJAmount)>=0){ | |||
value = Number(item.SJAmount) | |||
}else{ | |||
isNull=true | |||
} | |||
detail += item.ChargeItemCode + "!" + value + '&'; | |||
let entity = { | |||
Id: this.GUID(), | |||
ChargeItemName: item.ChargeItemName.replace(/^\s*|\s*$/g, ""), | |||
ChargeItemID: item.ChargeItemCode, | |||
YJAmount: item.Standard, | |||
SJAmount: value | |||
} | |||
list.push(entity) | |||
}) | |||
if (isNull) { | |||
this.TOAST("[本次实缴]金额为空或错误!请检查并填写。"); | |||
return; | |||
} | |||
if(Number(this.payfeetotal) == 0){ | |||
this.TOAST("[实缴合计]不能为0!缴费失败。"); | |||
return; | |||
} | |||
detail = detail.substring(0, detail.length - 1); | |||
var param = {}; | |||
param.PayFeeDetail = detail; | |||
param.PayMoney = this.payfeetotal; | |||
let postData = { strEntity: JSON.stringify(param), detailList: JSON.stringify(list) } | |||
console.log({ strEntity: param, detailList: list }); | |||
this.changeIpnutEdit(false) | |||
this.LOADING('正在生成付款信息请稍等…'); | |||
this.HTTP_POST('/learun/freshpayfee/generateqrcode?keyValue=' + this.pageInfo.ID, postData ).then((res)=> { | |||
this.HIDE_LOADING(); | |||
if(!res){ | |||
return | |||
} | |||
this.qrCodeUrl = this.CONFIG("webHost")+res.imgUrl | |||
}); | |||
} | |||
this.LOADING('提交数据中…'); | |||
this.HTTP_POST('StuInfoFresh/save', _postData,'加载数据时出错').then(res => { | |||
this.HIDE_LOADING(); | |||
console.log(res) | |||
if(res){ | |||
this.TOAST('提交数据成功'); | |||
this.EMIT('stuInfoFreshPayFee'); | |||
this.NAV_BACK() | |||
if(action == "getPayRes"){ | |||
this.StuInfoFreshData = {} | |||
this.PayFeeTotal = '' | |||
this.payfeetotal = '' | |||
this.YJAmount = '' | |||
this.FinaChargesStandardList = [] | |||
this.init() | |||
} | |||
}, | |||
lookInvioce(){ | |||
this.NAV_TO("./payInvioce?keyValue="+this.pageInfo.ID) | |||
}, | |||
getpayfeetotal(){ | |||
let value = 0 | |||
this.FinaChargesStandardList.map(item=>{ | |||
if(/^-?\d+(,\d{3})*(\.\d{1,2})?$/.test(item.SJAmount)){ | |||
value += Number(item.SJAmount) | |||
} | |||
}) | |||
} | |||
this.payfeetotal = value | |||
}, | |||
changeIpnutEdit(edit){ | |||
let item = JSON.parse(JSON.stringify(this.item)) | |||
item.fieldsData = item.fieldsData.map((item1)=>{ | |||
if(["SJAmount"].includes(item1.field)){ | |||
item1.edit = edit | |||
} | |||
return item1 | |||
}) | |||
this.item = item | |||
}, | |||
}, | |||
created() { | |||
this.init() | |||
@@ -78,5 +288,7 @@ export default{ | |||
</script> | |||
<style lang="less" scoped> | |||
@import '~@/common/css/customlist.less'; | |||
@import '~@/common/css/sidepage.less'; | |||
</style> | |||