mergeUpDetail.vue 3.44 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>¥{{ (form.totalAmount*1).toFixed(2) }}
			</view>
		</view>
		<view class="wBox">
			<view class="tt">
				考试信息
			</view>
			<view class="userlist">
				<view class="item" v-for="(n,index) in infoList" :key="index" @click="goDetail(n)" style="background-color: #fffafa;">
					<view class="w100">
						<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>
								金额
								<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 form = ref({})
	const list = ref([])
	const infoList = ref([])
	const deptType = ref()
	const type = ref(null)
	let rangeId = ''
	onLoad((option) => {
		if ('form' in option) {
			form.value = JSON.parse(decodeURIComponent(option.form))
		}
		type.value = option.type
		console.log(form.value)
		if (app.globalData.isLogin) {
			init()
		} else {

			app.firstLoadCallback = () => {
				init()
			};
		}

	})

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

	function getForm() {
		uni.showLoading({
			title: '加载中'
		})
		api.getMergePaymentInfo(form.value.recordId).then(res => {
			      _.each(res.data, (r) => {
			        const item = JSON.parse(r.content)
			        item.recordId = r.recordId
			        infoList.value.push(item)
			      })
				form.value.totalNum = Math.floor(_.sumBy(infoList.value, (o) => parseFloat(o.totalNum || 0)))
				form.value.totalAmount = Math.floor(_.sumBy(infoList.value, (o) => parseFloat(o.totalAmount || 0)))

			uni.hideLoading()
		
		})
	}

function goDetail(item){
	// examId
	let path = `/level/applyDetail?examId=${item.examId}`
	uni.navigateTo({
		url: path
	});
}
</script>

<style scoped lang="scss">
	.wBox {
		width: 700rpx;
		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;    margin: 0 0 10rpx;
			.lab{color: #999;display: inline-block;text-align: justify;
			text{word-break: break-all;}
			}
		}
	}
	
</style>