zsyl.vue
4.82 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
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
<template>
<dialogBox title="证书预览" :isReset='false' :isSave='false' width="865px"
@closeDialog="closeDialog" v-model="value">
<div class="from-clues">
<!-- 表单部分 -->
<div class="middle_padding" v-if="isToPrint">
<el-form :model="ruleForm" :rules="rules" ref="ruleForm" label-width="120px">
<el-form-item label="印刷序列号:" prop="ysxlh">
<el-select v-model="ruleForm.ysxlh" placeholder="请选择">
<el-option
v-for="item in ysxlh"
:key="item.ysxlh"
:label="item.ysxlh"
:value="item.ysxlh">
</el-option>
</el-select>
</el-form-item>
</el-form>
</div>
<div class="zsyl-box">
<div class="zsyl-left">
<div class="zsyl-title">
<span>{{bdcqz.bdcqzh}}</span>
</div>
<table class="table-column">
<tr v-for="(item, colindex) in columns" :key="colindex">
<td>
<span>{{ item.label }}</span>
</td>
<td>
<span>
{{ getRowValue(item.prop) }}
</span>
</td>
</tr>
</table>
</div>
<div class="zsyl-right">
<div class="zsyl-title">附记</div>
<div class="zsyl-text"></div>
</div>
</div>
<div class="zsyl-button" v-if="isToPrint">
<el-button class="operation_button dy-button" type="text" @click="printCertificate()">打印证书</el-button>
<el-button class="operation_button gb-button" type="text" @click="closeDialog()">关闭</el-button>
</div>
</div>
</dialogBox>
</template>
<script>
import { datas } from "../javascript/zsyl.js";
import { readYsxlh,certificate } from "@/api/fqsq.js"
export default {
components: {
},
props: {
value: { type: Boolean, default: false },
},
data () {
return {
//印刷序列号集合
ysxlh: [],
//证书类型
zslx: '',
//列名称对象
columns: [],
//选择的不动产权证文件
bdcqz: '',
//证书打开类型 是否需要展示打印按钮
isToPrint: false,
ruleForm: {
bsmBdcqz: '',
szmc: '不动产权证书',
bdcqzlx: '',
szzh: '',
ysxlh: '',
},
rules: {
ysxlh: [
{ required: true, message: '请选择印刷序列号', trigger: 'change' }
],
},
}
},
mounted(){
},
created() {
this.columns = datas.columns();
},
methods: {
//获取印刷序列号列表
ysxlhList() {
this.zslx = this.$parent.bdcqzlx
this.isToPrint = true;
readYsxlh({zslx:this.$parent.bdcqzlx}).then(res => {
if (res.code === 200) {
this.ysxlh = res.result
}
})
},
closeDialog () {
this.$emit("input", false);
},
//获取证书内容
getRowValue(code){
var value = this.bdcqz[code]
if(code == 'gyqk'){
switch(value){
case '1':
return '单独所有';
case '2':
return '共同共有';
case '3':
return '按份所有';
}
}
return value;
},
//打印证书
printCertificate() {
this.ruleForm.bsmBdcqz = this.$parent.bdcqz.bsmBdcqz
this.ruleForm.bdcqzlx = this.$parent.bdcqz.bdcqzlx
this.ruleForm.szzh = this.$parent.bdcqz.bdcqzh
certificate(this.ruleForm).then(res => {
if (res.code === 200) {
this.$message.success('打印成功');
this.$emit("input", false);
this.$parent.list();
}else{
this.$message.error(res.message);
}
})
},
}
}
</script>
<style scoped lang="scss">
@import "~@/styles/mixin.scss";
.zsyl-box{
display: flex;
justify-content: space-between;
padding: 20px;
background: #FAFBE5;
.zsyl-left{
width: 330px;
.zsyl-title{
font-size: 18px;
text-align: center;
}
}
.zsyl-right{
width: 330px;
.zsyl-title{
letter-spacing: 50px;
text-align: center;
text-indent: 50px;
}
.zsyl-text{
border: 1px solid #ccc;
height: 90%;
}
}
.zsyl-title{
margin-bottom: 12px;
}
/deep/.el-table__row{
background: #FAFBE5!important;
}
}
.middle_padding {
padding-bottom: 10px;
}
.zsyl-button{
text-align: center;
margin-top: 20px;
.operation_button{
width: 100px;
border: 1px solid rgb(0,121,254);
}
.dy-button {
color: white;
background-color: rgb(0,121,254);
}
}
.table-column {
border-spacing: 1px;
width: 100%;
tr td {
border: 1px solid #ccc;
text-align: center;
height: 40px;
padding: 4px;
font-size: 13px;
background: rgb(251,249,229);
}
}
</style>