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
<template>
<div class="white_bg burt-container">
<!--详细信息-->
<companyInfo :detailObj="detailObj" />
<!--折扣信息-->
<Discount v-if="detailObj.id" :detailObj="detailObj" @getDetail="getDetail" />
</div>
</template>
<script>
import companyInfo from "./components/companyInfo";
import Discount from "./components/companyDiscount";
export default {
data(){
return {
id: '', //公司id
detailObj: { //公司详情
discountList: [], //折扣列表
claimApplicationTemplate: [],
authApplicationTemplate: []
}
}
},
components: {
companyInfo,
Discount
},
created(){
this.id = this.$route.query.id;
if(this.id){
this.getDetail();
}
},
methods: {
//获取详细信息
getDetail() {
this.$apis.PAYORDETAIL({
id: this.id,
})
.then((res) => {
if (res.returnCode == "0000") {
let data = res.content || {};
if(data.claimApplicationTemplate){
data.claimApplicationTemplate = [
{
uid: Math.random()*10000,
name: data.claimApplicationTemplate.slice(data.claimApplicationTemplate.lastIndexOf('/')+1),
status: 'done',
url: data.claimApplicationTemplate,
}
]
}else{
data.claimApplicationTemplate = [];
}
if(data.authApplicationTemplate){
data.authApplicationTemplate = [
{
uid: Math.random()*10000,
name: data.authApplicationTemplate.slice(data.authApplicationTemplate.lastIndexOf('/')+1),
status: 'done',
url: data.authApplicationTemplate,
}
]
}else{
data.authApplicationTemplate = [];
}
this.detailObj = data;
} else {
this.$message.error(res.returnMsg);
}
});
},
}
}
</script>
<style lang="less" scoped>
</style>