paymentDetail.vue 3.74 KB
<template>
	<view>
		<view class="wBox">
			<view class="tt">基本信息</view>
			<view class="ddd">
				<text class="lab">结算编号:</text>{{ form.flowCode }}
			</view>
			<view class="ddd">
				<text class="lab">{{ type=='1'?'考级名称':'考段名称' }}</text>{{form.mergeName}}
			</view>
			<view class="ddd">
				<text class="lab">申请单位:</text>{{ form.memName }}
			</view>
			<view class="ddd" v-if="form.mergeTime">
				<text class="lab">申请日期:</text>{{form.mergeTime?.slice(0,10)}}
			</view>
			<view class="ddd">
				<text class="lab">{{ type=='1'?'考级人数':'考段人数' }}</text>{{form.totalNum}}
			</view>
			<view class="ddd">
				<text class="lab">总金额:</text>
				<text class="text-danger">¥{{ (form.totalAmount*1).toFixed(2) }}</text>
			</view>
		</view>
		<view class="wBox">
			<view class="tt">
				考试信息
			</view>
			<view class="userlist">
				<view class="item" v-for="n in infoList" @click="goDetail(n)" style="background-color: #fffafa;">
					<view class="w100">
						<view class="text-primary">{{n.examCode}}</view>
						<view class="name">{{n.name}}</view>
						<!-- <view class="date">{{n.idcTypeStr}}{{n.idcCode}}</view> -->
						<view class="flexbox">
<!-- 							<view>
								上报单位
								<text>{{n.memberName}}</text>
							</view> -->
							<view>
								{{type=='1'?'考级考生数':'考段考生数'}}
								<text>
									{{n.totalNum}}
								</text>
							</view>
							<view class="w50">
								金额
								<text class="text-danger">¥{{ (n.totalAmount*1).toFixed(2) }}</text>
							</view>
						</view>
					</view>

				</view>
			</view>

		</view>
	</view>
</template>

<script setup>
	import * as api from '@/common/api.js'
	import config from '@/config.js'
	import _ from 'underscore'
	import {
		onMounted,
		ref
	} from 'vue'
	import {
		onLoad
	} from '@dcloudio/uni-app'
	const app = getApp();
	const queryParams = ref({
		recordId: ''
	})

	const payId = ref('')
	const list = ref([])
	const form = ref({})
	const infoList = ref([])
	const deptType = ref()
	const type = ref(null)
	let rangeId = ''
	onLoad((option) => {
		type.value = option.type
		if ('form' in option) {
			var obj = JSON.parse(decodeURIComponent(option.form))
			    form.value.flowCode = obj.payCode
			    form.value.mergeName = obj.name
			    form.value.memName = obj.memberName
			    form.value.mergeTime = obj.submitTime
			    form.value.totalNum = Math.floor(obj.totalNum)
			    form.value.totalAmount = Math.floor(obj.totalAmount)
				payId.value = obj.payId
		}
		if (app.globalData.isLogin) {
			init()
		} else {
			app.firstLoadCallback = () => {
				init()
			};
		}

	})
	function init() {
		deptType.value = app.globalData.deptType
		getForm()
	}

	function getForm() {
		uni.showLoading({
			title: '加载中'
		})
		api.getPaymentDetailsByPayId(payId.value).then(res => {
			infoList.value = res.data
			uni.hideLoading()
		})
	}

	function goDetail(item) {
		// examId
		if(type.value == '1'){
			const form  = encodeURIComponent(JSON.stringify(item))
			let path = `/level/applyDetail?examId=${item.examId}&form=${form}`
			uni.navigateTo({
				url: path
			});
		} else {
			let path = `/pages/rank/applyDetail?examId=${item.examId}`
			uni.navigateTo({
				url: path
			});
		}
	}
</script>

<style scoped lang="scss">
	.wBox {
		width: 700rpx;box-sizing: border-box;
		padding: 30rpx;
		margin: 20rpx auto;
		background: #FFFFFF;
		box-shadow: 0rpx 12rpx 116rpx 0rpx rgba(196, 203, 214, 0.1);
		border-radius: 15rpx;

		.tt {
			color: #0A1629;
			margin: 0 0 30rpx;
			font-size: 30rpx;
		}

		.ddd {
			font-size: 28rpx;
			color: #333;

			.lab {
				color: #999;
				display: inline-block;
				text-align: justify;

				text {
					word-break: break-all;
				}
			}
		}
	}
</style>