0a41b92e
wuxw
开发完成业务受理页面
|
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
|
<template>
<div>
<el-row class="margin-top-lg">
<el-col :span="12"></el-col>
<el-col :span="12" class="text-right" v-if="contractInfo.ownerId">
<el-button type="primary" size="small" @click="_openAddContractModal">
<i class="el-icon-plus"></i>{{$t('simplifyContract.draftContract')}}
</el-button>
</el-col>
</el-row>
<div class="margin-top">
<el-table :data="contractInfo.contracts" border>
<el-table-column prop="contractName" :label="$t('simplifyContract.contractName')" align="center"></el-table-column>
<el-table-column prop="contractCode" :label="$t('simplifyContract.contractCode')" align="center"></el-table-column>
<el-table-column prop="parentContractCode" :label="$t('simplifyContract.parentContractCode')" align="center">
<template slot-scope="scope">
{{scope.row.parentContractCode || '-'}}
</template>
</el-table-column>
<el-table-column prop="contractTypeName" :label="$t('simplifyContract.contractType')" align="center"></el-table-column>
<el-table-column prop="startTime" :label="$t('simplifyContract.startTime')" align="center"></el-table-column>
<el-table-column prop="endTime" :label="$t('simplifyContract.endTime')" align="center"></el-table-column>
<el-table-column prop="stateName" :label="$t('simplifyContract.status')" align="center"></el-table-column>
<el-table-column :label="$t('simplifyContract.operation')" align="center" width="300">
<template slot-scope="scope">
<el-button size="mini" @click="_openContractFee(scope.row)">{{$t('simplifyContract.fee')}}</el-button>
<el-button size="mini" @click="_viewContract(scope.row)">{{$t('simplifyContract.view')}}</el-button>
<el-button size="mini" @click="_printContract(scope.row)">{{$t('simplifyContract.print')}}</el-button>
</template>
</el-table-column>
</el-table>
<el-pagination
@current-change="handleCurrentChange"
:current-page="currentPage"
:page-size="pageSize"
layout="total, prev, pager, next"
:total="total"
class="pagination"
></el-pagination>
</div>
</div>
</template>
<script>
import { queryContract } from '@/api/simplify/simplifyContractApi'
import { getCommunityId } from '@/api/community/communityApi'
export default {
name: 'SimplifyContract',
data() {
return {
contractInfo: {
ownerId: '',
ownerName: '',
contracts: [],
total: 0,
records: 1,
moreCondition: false,
contractId: '',
conditions: {
objId: '',
contractCode: '',
contractType: ''
}
},
currentPage: 1,
pageSize: 10,
total: 0,
communityId: ''
}
},
created() {
this.communityId = getCommunityId()
this.$on('switch', this.handleSwitch)
this.$on('notify', this.listContractInfo)
},
methods: {
handleSwitch(params) {
if (!params.ownerId) return
this.clearContractInfoInfo()
Object.assign(this.contractInfo, params)
this.contractInfo.conditions.objId = params.ownerId
this.listContractInfo()
},
async listContractInfo() {
try {
const params = {
...this.contractInfo.conditions,
page: this.currentPage,
row: this.pageSize
}
const res = await queryContract(params)
this.contractInfo.contracts = res.data
this.total = res.data.total
} catch (error) {
console.error('Failed to load contracts:', error)
}
},
_openAddContractModal() {
this.$router.push('/pages/admin/newContractManage')
},
_printContract(contract) {
|
0a41b92e
wuxw
开发完成业务受理页面
|
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
|
},
_viewContract(contract) {
this.$router.push(`/pages/contract/contractDetail?contractId=${contract.contractId}`)
},
clearContractInfoInfo() {
this.contractInfo = {
ownerId: '',
ownerName: '',
contracts: [],
total: 0,
records: 1,
moreCondition: false,
contractId: '',
conditions: {
contractName: '',
contractCode: '',
contractType: ''
}
}
},
_openContractFee(contract) {
this.$router.push({
path: '/pages/property/listContractFee',
query: {
contractId: contract.contractId,
contractCode: contract.contractCode
}
})
},
handleCurrentChange(val) {
this.currentPage = val
this.listContractInfo()
}
}
}
</script>
<style scoped>
.margin-top {
margin-top: 15px;
}
.margin-top-lg {
margin-top: 20px;
}
.pagination {
margin-top: 15px;
text-align: right;
}
.text-right {
text-align: right;
}
</style>
|