mergeUpDetail.vue
3.6 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
<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 in infoList" @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 v-if="app.globalData.showPrice">
金额
<text>
{{ (n.examFee * 1).toFixed(2) }}
</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 'lodash'
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 = `/pages/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;
.lab{color: #999;display: inline-block;text-align: justify;
text{word-break: break-all;}
}
}
}
</style>