facecaf7 by renchao@pashanhoo.com

style:证书打印

1 parent 19b87257
1 /* 1 /*
2 * @Description: 不动产权证 2 * @Description: 不动产权证
3 * @Autor: renchao 3 * @Autor: renchao
4 * @LastEditTime: 2023-05-16 14:04:18 4 * @LastEditTime: 2023-09-05 13:24:14
5 */ 5 */
6 import request from '@/utils/request'; 6 import request from '@/utils/request';
7 let SERVER = window.config ? window.config : JSON.parse(localStorage.getItem('ApiUrl')) 7 let SERVER = window.config ? window.config : JSON.parse(localStorage.getItem('ApiUrl'))
...@@ -131,3 +131,13 @@ export function bdcqzPreview (data) { ...@@ -131,3 +131,13 @@ export function bdcqzPreview (data) {
131 responseType: 'blob' 131 responseType: 'blob'
132 }) 132 })
133 } 133 }
134 // 获取不动产权证详细信息
135 export function getBdcqzDetail (bsmBdcqz) {
136 return request({
137 url: SERVER.SERVERAPI + '/rest/ywbl/bdcqz/getBdcqzDetail',
138 method: 'get',
139 params: {
140 bsmBdcqz: bsmBdcqz
141 }
142 })
143 }
...\ No newline at end of file ...\ No newline at end of file
......
1 <!-- 1 <!--
2 * @Description: 2 * @Description:
3 * @Autor: renchao 3 * @Autor: renchao
4 * @LastEditTime: 2023-08-30 17:33:06 4 * @LastEditTime: 2023-09-05 15:14:08
5 --> 5 -->
6 <template> 6 <template>
7 <div> 7 <div>
...@@ -12,7 +12,9 @@ ...@@ -12,7 +12,9 @@
12 ref="ruleForm" 12 ref="ruleForm"
13 label-width="120px"> 13 label-width="120px">
14 <el-form-item label="印刷序列号:" prop="ysxlh"> 14 <el-form-item label="印刷序列号:" prop="ysxlh">
15 <el-select v-model="ruleForm.ysxlh" placeholder="请选择"> 15 <el-row>
16 <el-col :span="22">
17 <el-select v-model="ruleForm.ysxlh" @change="handleSelect" :disabled="disabled" placeholder="请选择">
16 <el-option 18 <el-option
17 v-for="item in ysxlh" 19 v-for="item in ysxlh"
18 :key="item.ysxlh" 20 :key="item.ysxlh"
...@@ -20,11 +22,17 @@ ...@@ -20,11 +22,17 @@
20 :value="item.ysxlh"> 22 :value="item.ysxlh">
21 </el-option> 23 </el-option>
22 </el-select> 24 </el-select>
25 </el-col>
26 <el-col :span="2" v-if="this.formData.ysxlh">
27 <el-button type="primary" @click="invalidDiglog=true">作废</el-button>
28 </el-col>
29 </el-row>
30
23 </el-form-item> 31 </el-form-item>
24 </el-form> 32 </el-form>
25 <div class="zs-content"> 33 <div class="zs-content">
26 <canvas ref="zs" width="1000" v-show="this.formData.bdcqz.bdcqzlx==1" height="700"></canvas> 34 <canvas ref="zs" width="1000" v-show="this.formData.bdcqzlx==1" height="700"></canvas>
27 <canvas ref="zm" width="1180" v-show="this.formData.bdcqz.bdcqzlx==2" height="780"></canvas> 35 <canvas ref="zm" width="1180" v-show="this.formData.bdcqzlx==2" height="780"></canvas>
28 </div> 36 </div>
29 </div> 37 </div>
30 <!-- 打印模板需要此模块 --> 38 <!-- 打印模板需要此模块 -->
...@@ -33,9 +41,25 @@ ...@@ -33,9 +41,25 @@
33 </object> 41 </object>
34 <div class="text-center pt-10"> 42 <div class="text-center pt-10">
35 <el-button @click="$popupCacel">取消</el-button> 43 <el-button @click="$popupCacel">取消</el-button>
36 <el-button type="primary" @click="handleSubmit">确定</el-button> 44 <el-button type="primary" @click="handlePrint" v-if="this.formData.ysxlh">打印</el-button>
45 <el-button type="primary" @click="handleSubmit" v-else>确定</el-button>
46 </div>
47
48 <el-dialog title="证书作废" :visible.sync="invalidDiglog" width="40%" :modal-append-to-body="false" top="30vh">
49 <div class="invalid-diglog">
50 <div class="invalid-title">
51 <i class="el-icon-question invalid-icon"></i>
52 <div class="invalid-body">您确定作废证书并再次打印?印刷序列号{{bdcqz.ysxlh}}</div>
53 </div>
54 <div class="invalid-reson">作废原因:</div>
55 <el-input v-model="zfyy" placeholder="请输入作废原因" type="textarea" :rows="4"></el-input>
56 <div class="text-center pt-10">
57 <el-button @click="closeInvalidDiglog">取 消</el-button>
58 <el-button type="primary" @click="confirmInvalid">确 定</el-button>
37 </div> 59 </div>
38 </div> 60 </div>
61 </el-dialog>
62 </div>
39 </template> 63 </template>
40 64
41 <script> 65 <script>
...@@ -43,7 +67,7 @@ ...@@ -43,7 +67,7 @@
43 import { datas } from "../../javascript/zsyl.js"; 67 import { datas } from "../../javascript/zsyl.js";
44 import { getPrintTemplateByCode } from "@/api/print"; 68 import { getPrintTemplateByCode } from "@/api/print";
45 import { getLodop } from "@/utils/LodopFuncs" 69 import { getLodop } from "@/utils/LodopFuncs"
46 import { readYsxlh, certificate, getSlsqBdcqzList } from "@/api/bdcqz.js"; 70 import { readYsxlh, certificate, getBdcqzDetail, invalidCertificate } from "@/api/bdcqz.js";
47 export default { 71 export default {
48 props: { 72 props: {
49 formData: { 73 formData: {
...@@ -55,18 +79,22 @@ ...@@ -55,18 +79,22 @@
55 }, 79 },
56 data () { 80 data () {
57 return { 81 return {
82 // 详细信息
83 bdcqz: {},
58 key: 0, 84 key: 0,
85 disabled: false,
59 // 不动产证书图片地址 86 // 不动产证书图片地址
60 imgSrc: require('@/image/bdcqz/bdcqzs2.jpg'), 87 imgSrc: require('@/image/bdcqz/bdcqzs2.jpg'),
61 bdczmSrc: require('@/image/bdcqz/bdczm.jpg'), 88 bdczmSrc: require('@/image/bdcqz/bdczm.jpg'),
62 loading: false, 89 loading: false,
63 bdcqz: [],
64 //印刷序列号集合 90 //印刷序列号集合
65 ysxlh: [], 91 ysxlh: [],
66 //列名称对象 92 //列名称对象
67 columns: [], 93 columns: [],
68 //tab选择绑定值 94 //tab选择绑定值
69 activeName: '', 95 activeName: '',
96 invalidDiglog: false,
97 zfyy: "",
70 ruleForm: { 98 ruleForm: {
71 bsmBdcqz: "", 99 bsmBdcqz: "",
72 szmc: "不动产权证书", 100 szmc: "不动产权证书",
...@@ -85,24 +113,82 @@ ...@@ -85,24 +113,82 @@
85 store.dispatch('user/refreshPage', false) 113 store.dispatch('user/refreshPage', false)
86 this.columns = datas.columns() 114 this.columns = datas.columns()
87 this.ysxlhList() 115 this.ysxlhList()
88 if (this.formData.bdcqz.bdcqzlx == 1) { 116 // 获取详细信息
117 this.getDetail()
118 if (this.formData.ysxlh) {
119 this.disabled = true
120 } else {
121 this.disabled = false
122 }
123 },
124 methods: {
125 /**
126 * @description: 获取详细信息
127 * @author: renchao
128 */
129 getDetail () {
130 this.loading = true
131 getBdcqzDetail(this.formData.bsmBdcqz).then(res => {
132 this.bdcqz = res.result
133 this.loading = false
134 if (this.bdcqz.ysxlh) this.ruleForm.ysxlh = this.bdcqz.ysxlh
135 if (this.bdcqz.bdcqzlx == 1) {
89 this.drawTextOnImage() 136 this.drawTextOnImage()
90 } else { 137 } else {
91 this.drawTextzmImage() 138 this.drawTextzmImage()
92 } 139 }
140 })
93 }, 141 },
94 methods: {
95 /** 142 /**
96 * @description: 获取印刷序列号列表 143 * @description: 获取印刷序列号列表
97 * @author: renchao 144 * @author: renchao
98 */ 145 */
99 ysxlhList () { 146 ysxlhList () {
100 readYsxlh({ zslx: this.formData.bdcqz.bdcqzlx }).then((res) => { 147 readYsxlh({ zslx: this.formData.bdcqzlx }).then((res) => {
101 if (res.code === 200) { 148 if (res.code === 200) {
102 this.ysxlh = res.result; 149 this.ysxlh = res.result;
103 } 150 }
104 }) 151 })
105 }, 152 },
153 handleSelect (val) {
154 this.bdcqz.ysxlh = this.ruleForm.ysxlh
155 if (this.bdcqz.bdcqzlx == 1) {
156 this.drawTextOnImage()
157 } else {
158 this.drawTextzmImage()
159 }
160 },
161 /**
162 * @description: closeInvalidDiglog
163 * @author: renchao
164 */
165 closeInvalidDiglog () {
166 this.zfyy = "";
167 this.invalidDiglog = false
168 },
169 /**
170 * @description: 作废缮证信息
171 * @author: renchao
172 */
173 confirmInvalid () {
174 invalidCertificate({ bsmBdcqz: this.bdcqz.bsmBdcqz, zfyy: this.zfyy }).then((res) => {
175 if (res.code === 200) {
176 this.$message.success("作废成功");
177 this.disabled = false
178 this.invalidDiglog = false;
179 this.zfyy = ''
180 this.ruleForm.ysxlh = ''
181 this.bdcqz.ysxlh = ''
182 if (this.bdcqz.bdcqzlx == 1) {
183 this.drawTextOnImage()
184 } else {
185 this.drawTextzmImage()
186 }
187 } else {
188 this.$message.error(res.message);
189 }
190 })
191 },
106 /** 192 /**
107 * @description: 不动产证书 193 * @description: 不动产证书
108 * @author: renchao 194 * @author: renchao
...@@ -128,25 +214,24 @@ ...@@ -128,25 +214,24 @@
128 context.drawImage(image, 0, 0); 214 context.drawImage(image, 0, 0);
129 context.font = '16px 楷体'; 215 context.font = '16px 楷体';
130 context.fillStyle = '#000000'; 216 context.fillStyle = '#000000';
131 context.fillText(this.formData.bdcqz.sjjc ? this.formData.bdcqz.sjjc : '', 60, 56); 217 context.fillText(this.bdcqz.sjjc ? this.bdcqz.sjjc : '', 60, 56);
132 context.fillText(this.formData.bdcqz.djnd ? this.formData.bdcqz.djnd : '', 113, 56); 218 context.fillText(this.bdcqz.djnd ? this.bdcqz.djnd : '', 113, 56);
133 context.fillText(this.formData.bdcqz.sxqc ? this.formData.bdcqz.sxqc : '', 180, 56); 219 context.fillText(this.bdcqz.sxqc ? this.bdcqz.sxqc : '', 180, 56);
134 context.fillText(this.formData.bdcqz.sxh ? this.formData.bdcqz.sxh : '', 370, 56); 220 context.fillText(this.bdcqz.sxh ? this.bdcqz.sxh : '', 370, 56);
135 context.fillText(this.formData.bdcqz.qlr ? this.formData.bdcqz.qlr : '', 129, 97); 221 context.fillText(this.bdcqz.qlr ? this.bdcqz.qlr : '', 129, 97);
136 context.fillText(this.formData.bdcqz.gyqk ? this.formData.bdcqz.gyqk : '', 129, 136); 222 context.fillText(this.bdcqz.gyqk ? this.bdcqz.gyqk : '', 129, 136);
137 223
138 this.bdcdyh = this.formData.bdcqz.bdcdyh.slice(0, 6) + ' ' + this.formData.bdcqz.bdcdyh.slice(6, 12) + ' ' + 224 this.bdcdyh = this.bdcqz.bdcdyh.slice(0, 6) + ' ' + this.bdcqz.bdcdyh.slice(6, 12) + ' ' +
139 this.formData.bdcqz.bdcdyh.slice(12, 19) + ' ' + this.formData.bdcqz.bdcdyh.slice(19, this.formData.bdcqz.bdcdyh.length) 225 this.bdcqz.bdcdyh.slice(12, 19) + ' ' + this.bdcqz.bdcdyh.slice(19, this.bdcqz.bdcdyh.length)
140 context.fillText(this.bdcdyh ? this.bdcdyh : '', 129, 223); 226 context.fillText(this.bdcdyh ? this.bdcdyh : '', 129, 223);
141 227
142 228
143 229
144 context.fillText(this.formData.bdcqz.qllx ? this.formData.bdcqz.qllx : '', 129, 263); 230 context.fillText(this.bdcqz.qllx ? this.bdcqz.qllx : '', 129, 263);
145 context.fillText(this.formData.bdcqz.qlxz ? this.formData.bdcqz.qlxz : '', 129, 303); 231 context.fillText(this.bdcqz.qlxz ? this.bdcqz.qlxz : '', 129, 303);
146 context.fillText(this.formData.bdcqz.yt ? this.formData.bdcqz.yt : '', 129, 346); 232 context.fillText(this.bdcqz.yt ? this.bdcqz.yt : '', 129, 346);
147 // context.fillText(this.formData.bdcqz.mj ? this.formData.bdcqz.mj : '', 129, 386); 233 let lines6 = this.bdcqz.mj ? this.bdcqz.mj.split(' ') : [];
148 let lines6 = this.formData.bdcqz.mj ? this.formData.bdcqz.mj.split(' ') : []; 234 if (getByteLen(this.bdcqz.mj) > 41) {
149 if (getByteLen(this.formData.bdcqz.mj) > 41) {
150 lines6.forEach((line, index) => { 235 lines6.forEach((line, index) => {
151 const y = 378 + (index * 27); // 每行文本的垂直位置 236 const y = 378 + (index * 27); // 每行文本的垂直位置
152 let currentLine = ''; 237 let currentLine = '';
...@@ -189,7 +274,7 @@ ...@@ -189,7 +274,7 @@
189 } 274 }
190 // 权利其他状态 275 // 权利其他状态
191 const maxWidth = 332; // 最大宽度限制 276 const maxWidth = 332; // 最大宽度限制
192 let lines = this.formData.bdcqz.qlqtzk ? this.formData.bdcqz.qlqtzk.split('\n') : []; 277 let lines = this.bdcqz.qlqtzk ? this.bdcqz.qlqtzk.split('\n') : [];
193 for (let i = 0; i < lines.length; i++) { 278 for (let i = 0; i < lines.length; i++) {
194 let num = Math.ceil(getByteLen(lines[i]) / 41) 279 let num = Math.ceil(getByteLen(lines[i]) / 41)
195 if (getByteLen(lines[i]) > 41) { 280 if (getByteLen(lines[i]) > 41) {
...@@ -224,7 +309,7 @@ ...@@ -224,7 +309,7 @@
224 } 309 }
225 } 310 }
226 311
227 let lines1 = this.formData.bdcqz.fj ? this.formData.bdcqz.fj.split('\n') : []; 312 let lines1 = this.bdcqz.fj ? this.bdcqz.fj.split('\n') : [];
228 lines1.forEach((line, index) => { 313 lines1.forEach((line, index) => {
229 const y = 100 + (index * 30); // 每行文本的垂直位置 314 const y = 100 + (index * 30); // 每行文本的垂直位置
230 let currentLine = ''; 315 let currentLine = '';
...@@ -244,8 +329,8 @@ ...@@ -244,8 +329,8 @@
244 context.fillText(line, 580, y + (index * 30)); // 调整行高 329 context.fillText(line, 580, y + (index * 30)); // 调整行高
245 }) 330 })
246 }) 331 })
247 let lines3 = this.formData.bdcqz.syqx ? this.formData.bdcqz.syqx.split(' ') : []; 332 let lines3 = this.bdcqz.syqx ? this.bdcqz.syqx.split(' ') : [];
248 if (getByteLen(this.formData.bdcqz.syqx) > 41) { 333 if (getByteLen(this.bdcqz.syqx) > 41) {
249 lines3.forEach((line, index) => { 334 lines3.forEach((line, index) => {
250 const y = 423 + (index * 27); // 每行文本的垂直位置 335 const y = 423 + (index * 27); // 每行文本的垂直位置
251 let currentLine = ''; 336 let currentLine = '';
...@@ -287,8 +372,8 @@ ...@@ -287,8 +372,8 @@
287 }) 372 })
288 } 373 }
289 374
290 let lines2 = this.formData.bdcqz.zl ? this.formData.bdcqz.zl.split(' ') : []; 375 let lines2 = this.bdcqz.zl ? this.bdcqz.zl.split(' ') : [];
291 if (getByteLen(this.formData.bdcqz.zl) > 41) { 376 if (getByteLen(this.bdcqz.zl) > 41) {
292 lines2.forEach((line, index) => { 377 lines2.forEach((line, index) => {
293 const y = 170 + (index * 20); // 每行文本的垂直位置 378 const y = 170 + (index * 20); // 每行文本的垂直位置
294 let currentLine = ''; 379 let currentLine = '';
...@@ -359,25 +444,24 @@ ...@@ -359,25 +444,24 @@
359 context.font = '16px 楷体'; 444 context.font = '16px 楷体';
360 context.fillStyle = '#000000'; 445 context.fillStyle = '#000000';
361 // ysxlh 446 // ysxlh
362 context.fillText(this.formData.bdcqz.ysxlh ? this.formData.bdcqz.ysxlh : '', 280, 712); 447 context.fillText(this.bdcqz.ysxlh ? this.bdcqz.ysxlh : '', 280, 712);
363 // djsj 448 // djsj
364 if (this.formData.bdcqz.djsj) { 449 if (this.bdcqz.djsj) {
365 let djsjList = this.formData.bdcqz.djsj.split(' ')[0].split('/') 450 let djsjList = this.bdcqz.djsj.split(' ')[0].split('/')
366 context.fillText(djsjList[0] ? djsjList[0] : '', 327, 580); 451 context.fillText(djsjList[0] ? djsjList[0] : '', 327, 580);
367 context.fillText(djsjList[1] ? djsjList[1] : '', 393, 580); 452 context.fillText(djsjList[1] ? djsjList[1] : '', 393, 580);
368 context.fillText(djsjList[2] ? djsjList[2] : '', 443, 580); 453 context.fillText(djsjList[2] ? djsjList[2] : '', 443, 580);
369 } 454 }
370 context.fillText(this.formData.bdcqz.sjjc ? this.formData.bdcqz.sjjc : '', 620, 125); 455 context.fillText(this.bdcqz.sjjc ? this.bdcqz.sjjc : '', 620, 125);
371 context.fillText(this.formData.bdcqz.djnd ? this.formData.bdcqz.djnd : '', 665, 125); 456 context.fillText(this.bdcqz.djnd ? this.bdcqz.djnd : '', 665, 125);
372 context.fillText(this.formData.bdcqz.sxqc ? this.formData.bdcqz.sxqc : '', 750, 125); 457 context.fillText(this.bdcqz.sxqc ? this.bdcqz.sxqc : '', 750, 125);
373 context.fillText(this.formData.bdcqz.sxh ? this.formData.bdcqz.sxh : '', 960, 123); 458 context.fillText(this.bdcqz.sxh ? this.bdcqz.sxh : '', 960, 123);
374 context.fillText(this.formData.bdcqz.zmqlhsx ? this.formData.bdcqz.zmqlhsx : '', 775, 180); 459 context.fillText(this.bdcqz.zmqlhsx ? this.bdcqz.zmqlhsx : '', 775, 180);
375 context.fillText(this.formData.bdcqz.qlr ? this.formData.bdcqz.qlr : '', 775, 228); 460 context.fillText(this.bdcqz.qlr ? this.bdcqz.qlr : '', 775, 228);
376 // 义务人 461 // 义务人
377 context.fillText(this.formData.bdcqz.ywr ? this.formData.bdcqz.ywr : '', 775, 275); 462 context.fillText(this.bdcqz.ywr ? this.bdcqz.ywr : '', 775, 275);
378 // context.fillText(this.formData.bdcqz.zl ? this.formData.bdcqz.zl : '', 775, 325); 463 let lines2 = this.bdcqz.zl ? this.bdcqz.zl.split(' ') : [];
379 let lines2 = this.formData.bdcqz.zl ? this.formData.bdcqz.zl.split(' ') : []; 464 if (getByteLen(this.bdcqz.zl) > 41) {
380 if (getByteLen(this.formData.bdcqz.zl) > 41) {
381 lines2.forEach((line, index) => { 465 lines2.forEach((line, index) => {
382 const y = 315 + (index * 20); // 每行文本的垂直位置 466 const y = 315 + (index * 20); // 每行文本的垂直位置
383 let currentLine = ''; 467 let currentLine = '';
...@@ -419,15 +503,15 @@ ...@@ -419,15 +503,15 @@
419 }) 503 })
420 } 504 }
421 // bdcdyh 505 // bdcdyh
422 this.bdcdyh = this.formData.bdcqz.bdcdyh.slice(0, 6) + ' ' + this.formData.bdcqz.bdcdyh.slice(6, 12) + ' ' + 506 this.bdcdyh = this.bdcqz.bdcdyh.slice(0, 6) + ' ' + this.bdcqz.bdcdyh.slice(6, 12) + ' ' +
423 this.formData.bdcqz.bdcdyh.slice(12, 19) + ' ' + this.formData.bdcqz.bdcdyh.slice(19, this.formData.bdcqz.bdcdyh.length) 507 this.bdcqz.bdcdyh.slice(12, 19) + ' ' + this.bdcqz.bdcdyh.slice(19, this.bdcqz.bdcdyh.length)
424 context.fillText(this.bdcdyh ? this.bdcdyh : '', 775, 373); 508 context.fillText(this.bdcdyh ? this.bdcdyh : '', 775, 373);
425 // qlqtzk 509 // qlqtzk
426 const maxWidth = 295; // 最大宽度限制 510 const maxWidth = 290; // 最大宽度限制
427 let lines = this.formData.bdcqz.qlqtzk ? this.formData.bdcqz.qlqtzk.split('\n') : []; 511 let lines = this.bdcqz.qlqtzk ? this.bdcqz.qlqtzk.split('\n') : [];
428 for (let i = 0; i < lines.length; i++) { 512 for (let i = 0; i < lines.length; i++) {
429 let num = Math.ceil(getByteLen(lines[i]) / 41) 513 let num = Math.ceil(getByteLen(lines[i]) / 37)
430 if (getByteLen(lines[i]) > 41) { 514 if (getByteLen(lines[i]) > 37) {
431 let currentLine = ''; 515 let currentLine = '';
432 let arr = []; 516 let arr = [];
433 for (let word of lines[i]) { 517 for (let word of lines[i]) {
...@@ -459,10 +543,10 @@ ...@@ -459,10 +543,10 @@
459 } 543 }
460 } 544 }
461 // fj 545 // fj
462 let lines1 = this.formData.bdcqz.fj ? this.formData.bdcqz.fj.split('\n') : []; 546 let lines1 = this.bdcqz.fj ? this.bdcqz.fj.split('\n') : [];
463 for (let i = 0; i < lines1.length; i++) { 547 for (let i = 0; i < lines1.length; i++) {
464 let num = Math.ceil(getByteLen(lines1[i]) / 41) 548 let num = Math.ceil(getByteLen(lines1[i]) / 37)
465 if (getByteLen(lines1[i]) > 41) { 549 if (getByteLen(lines1[i]) > 37) {
466 let currentLine = ''; 550 let currentLine = '';
467 let arr = []; 551 let arr = [];
468 for (let word of lines1[i]) { 552 for (let word of lines1[i]) {
...@@ -494,74 +578,72 @@ ...@@ -494,74 +578,72 @@
494 } 578 }
495 } 579 }
496 } 580 }
497
498 image.src = this.bdczmSrc; 581 image.src = this.bdczmSrc;
499 }, 582 },
500 /** 583 // 打印
501 * @description: handleSubmit 584 handlePrint () {
502 * @author: renchao 585 if (this.bdcqz.bdcqzlx == 1) {
503 */ 586 getPrintTemplateByCode({ tmpno: 'zsdy' }).then(resInfo => {
504 handleSubmit () { 587 if (resInfo.code == 200) {
505 this.savePrintRecord()
506 },
507 /**
508 * @description: 保存打印记录
509 * @author: renchao
510 */
511 savePrintRecord () {
512 let that = this
513 this.ruleForm.bsmBdcqz = this.formData.bdcqz.bsmBdcqz;
514 this.ruleForm.bdcqzlx = this.formData.bdcqz.bdcqzlx;
515 this.ruleForm.szzh = this.formData.bdcqz.bdcqzh;
516 certificate(this.ruleForm).then((res) => {
517 if (res.code === 200) {
518 that.$popupCacel()
519 if (this.formData.bdcqz.bdcqzlx == 1) {
520 getPrintTemplateByCode({ tmpno: 'zsdy' }).then(res => {
521 if (res.code == 200) {
522 //打开模板设计 588 //打开模板设计
523 let LODOP = getLodop(document.getElementById('LODOP_OB'), document.getElementById('LODOP_EM')); 589 let LODOP = getLodop(document.getElementById('LODOP_OB'), document.getElementById('LODOP_EM'));
524 LODOP.ADD_PRINT_DATA("ProgramData", res.result.tmpcontent); //装载模板 590 LODOP.ADD_PRINT_DATA("ProgramData", resInfo.result.tmpcontent); //装载模板
525 591
526 this.formData.bdcqz.bdcdyh1 = this.formData.bdcqz.bdcdyh.slice(0, 6) + ' ' + this.formData.bdcqz.bdcdyh.slice(6, 12) + ' ' + 592 this.bdcqz.bdcdyh1 = this.bdcqz.bdcdyh.slice(0, 6) + ' ' + this.bdcqz.bdcdyh.slice(6, 12) + ' ' +
527 this.formData.bdcqz.bdcdyh.slice(12, 19) + ' ' + this.formData.bdcqz.bdcdyh.slice(19, this.formData.bdcqz.bdcdyh.length) 593 this.bdcqz.bdcdyh.slice(12, 19) + ' ' + this.bdcqz.bdcdyh.slice(19, this.bdcqz.bdcdyh.length)
528 //todo 调取后端接口获取数据 循环set 594 //todo 调取后端接口获取数据 循环set
529 for (let key in this.formData.bdcqz) { 595 for (let key in this.bdcqz) {
530 LODOP.SET_PRINT_STYLEA(key, "CONTENT", this.formData.bdcqz[key]); 596 LODOP.SET_PRINT_STYLEA(key, "CONTENT", this.bdcqz[key]);
531 } 597 }
532 LODOP.PREVIEW(); 598 LODOP.PREVIEW();
533 that.$popupCacel()
534 } else { 599 } else {
535 this.$message.error(res.message) 600 this.$message.error(resInfo.message)
536 } 601 }
537 }) 602 })
538 } else { 603 } else {
539 getPrintTemplateByCode({ tmpno: 'zmdy' }).then(res => { 604 getPrintTemplateByCode({ tmpno: 'zmdy' }).then(resInfo => {
540 if (res.code == 200) { 605 if (resInfo.code == 200) {
541 //打开模板设计 606 //打开模板设计
542 let LODOP = getLodop(document.getElementById('LODOP_OB'), document.getElementById('LODOP_EM')); 607 let LODOP = getLodop(document.getElementById('LODOP_OB'), document.getElementById('LODOP_EM'));
543 LODOP.ADD_PRINT_DATA("ProgramData", res.result.tmpcontent); //装载模板 608 LODOP.ADD_PRINT_DATA("ProgramData", resInfo.result.tmpcontent); //装载模板
544 609
545 // 年月日 610 // 年月日
546 this.formData.bdcqz.nian = this.formData.bdcqz.djsj.split(' ')[0].split('/')[0] 611 this.bdcqz.nian = this.bdcqz.djsj.split(' ')[0].split('/')[0]
547 this.formData.bdcqz.yue = this.formData.bdcqz.djsj.split(' ')[0].split('/')[1] 612 this.bdcqz.yue = this.bdcqz.djsj.split(' ')[0].split('/')[1]
548 this.formData.bdcqz.ri = this.formData.bdcqz.djsj.split(' ')[0].split('/')[1] 613 this.bdcqz.ri = this.bdcqz.djsj.split(' ')[0].split('/')[1]
549 this.formData.bdcqz.bdcdyh1 = this.formData.bdcqz.bdcdyh.slice(0, 6) + ' ' + this.formData.bdcqz.bdcdyh.slice(6, 12) + ' ' + 614 this.bdcqz.bdcdyh1 = this.bdcqz.bdcdyh.slice(0, 6) + ' ' + this.bdcqz.bdcdyh.slice(6, 12) + ' ' +
550 this.formData.bdcqz.bdcdyh.slice(12, 19) + ' ' + this.formData.bdcqz.bdcdyh.slice(19, this.formData.bdcqz.bdcdyh.length) 615 this.bdcqz.bdcdyh.slice(12, 19) + ' ' + this.bdcqz.bdcdyh.slice(19, this.bdcqz.bdcdyh.length)
551 //todo 调取后端接口获取数据 循环set 616 //todo 调取后端接口获取数据 循环set
552 for (let key in this.formData.bdcqz) { 617 for (let key in this.bdcqz) {
553 LODOP.SET_PRINT_STYLEA(key, "CONTENT", this.formData.bdcqz[key]); 618 LODOP.SET_PRINT_STYLEA(key, "CONTENT", this.bdcqz[key]);
554 } 619 }
555 LODOP.PREVIEW(); 620 LODOP.PREVIEW();
556 that.$popupCacel()
557 } else { 621 } else {
558 this.$message.error(res.message) 622 this.$message.error(resInfo.message)
559 } 623 }
560 }) 624 })
561 } 625 }
562
563 //刷新列表 626 //刷新列表
564 store.dispatch('user/reWorkFresh', true) 627 store.dispatch('user/reWorkFresh', true)
628 },
629 /**
630 * @description: 保存打印记录
631 * @author: renchao
632 */
633 handleSubmit () {
634 let that = this
635 if (this.ruleForm.ysxlh == '') {
636 this.$message.error('请选择印刷序列号');
637 return;
638 }
639 this.ruleForm.bsmBdcqz = this.bdcqz.bsmBdcqz;
640 this.ruleForm.bdcqzlx = this.bdcqz.bdcqzlx;
641 this.ruleForm.szzh = this.bdcqz.bdcqzh;
642 this.bdcqz.ysxlh = this.ruleForm.ysxlh
643 certificate(this.ruleForm).then((res) => {
644 if (res.code === 200) {
645 that.$popupCacel()
646 this.handlePrint()
565 } else { 647 } else {
566 this.$message.error(res.message) 648 this.$message.error(res.message)
567 } 649 }
...@@ -579,4 +661,36 @@ ...@@ -579,4 +661,36 @@
579 .zs-content { 661 .zs-content {
580 text-align: center; 662 text-align: center;
581 } 663 }
664 .invalid-diglog {
665 padding-bottom: 20px;
666 font-size: 16px;
667 font-weight: bold;
668 color: rgb(99, 99, 99);
669
670 .invalid-title {
671 display: flex;
672 align-content: center;
673
674 .invalid-icon {
675 color: rgb(254, 148, 0);
676 font-size: 34px;
677 margin-right: 10px;
678 }
679
680 .invalid-body {
681 line-height: 40px;
682 margin-bottom: 10px;
683 }
684 }
685
686 .invalid-reson {
687 margin-bottom: 10px;
688 }
689
690 .dialog-footer {
691 margin-top: 10px;
692 display: flex;
693 justify-content: flex-end;
694 }
695 }
582 </style> 696 </style>
......
1 <!-- 1 <!--
2 * @Description: 2 * @Description:
3 * @Autor: renchao 3 * @Autor: renchao
4 * @LastEditTime: 2023-09-04 17:12:05 4 * @LastEditTime: 2023-09-05 14:28:25
5 --> 5 -->
6 <template> 6 <template>
7 <div class="szxx"> 7 <div class="szxx">
...@@ -55,28 +55,14 @@ ...@@ -55,28 +55,14 @@
55 </div> 55 </div>
56 </div> 56 </div>
57 </el-card> 57 </el-card>
58 <el-dialog title="证书作废" :visible.sync="invalidDiglog" width="30%" :modal-append-to-body="false" top="30vh"> 58
59 <div class="invalid-diglog">
60 <div class="invalid-title">
61 <i class="el-icon-question invalid-icon"></i>
62 <div class="invalid-body">您确定作废证书并再次打印?印刷序列号{{ysxlh}}</div>
63 </div>
64 <div class="invalid-reson">作废原因:</div>
65 <el-input v-model="zfyy" placeholder="请输入作废原因" type="textarea" :rows="4"></el-input>
66 <div class="text-center pt-10">
67 <el-button @click="closeInvalidDiglog">取 消</el-button>
68 <el-button type="primary" @click="confirmInvalid">确 定</el-button>
69 </div>
70 </div>
71 </el-dialog>
72 <el-empty description="暂无数据" v-if="tableData.length == 0"></el-empty> 59 <el-empty description="暂无数据" v-if="tableData.length == 0"></el-empty>
73 </div> 60 </div>
74 </template> 61 </template>
75 <script> 62 <script>
76 import { mapGetters } from 'vuex' 63 import { mapGetters } from 'vuex'
77 import store from '@/store/index.js' 64 import store from '@/store/index.js'
78 import { getPrintTemplateByCode } from "@/api/print"; 65 import { getSlsqBdcqzList } from "@/api/bdcqz.js";
79 import { getSlsqBdcqzList, invalidCertificate } from "@/api/bdcqz.js";
80 export default { 66 export default {
81 props: {}, 67 props: {},
82 data () { 68 data () {
...@@ -86,13 +72,8 @@ ...@@ -86,13 +72,8 @@
86 dialog: false, 72 dialog: false,
87 tableData: [], 73 tableData: [],
88 bdcqzlx: 1, 74 bdcqzlx: 1,
89 bdcqz: {}, 75 bdcqz: {}
90 zfyy: "", 76 }
91 invalidDiglog: false,
92 bsmSz: "",
93 bsmBdcqz: "",
94 ysxlh: ""
95 };
96 }, 77 },
97 computed: { 78 computed: {
98 ...mapGetters(['workFresh']) 79 ...mapGetters(['workFresh'])
...@@ -135,12 +116,11 @@ ...@@ -135,12 +116,11 @@
135 */ 116 */
136 openZsylDialog (item, type) { 117 openZsylDialog (item, type) {
137 store.dispatch('user/reWorkFresh', false) 118 store.dispatch('user/reWorkFresh', false)
138
139 if (type == 1) { 119 if (type == 1) {
140 //证书证明预览 120 //证书证明预览
141 this.$popupDialog("证书证明预览", "workflow/components/dialog/zsyl", { bdcqz: item, bsmSlsq: this.$route.query.bsmSlsq }, "76%", true); 121 this.$popupDialog("证书证明预览", "workflow/components/dialog/zsyl", { bdcqz: item, bsmSlsq: this.$route.query.bsmSlsq }, "76%", true);
142 } else { 122 } else {
143 this.$popupDialog("证书证明打印", "workflow/components/dialog/zsdy", { bdcqz: item, bsmSlsq: this.$route.query.bsmSlsq }, "76%", true); 123 this.$popupDialog("证书证明打印", "workflow/components/dialog/zsdy", { ...item }, "76%", true);
144 } 124 }
145 }, 125 },
146 /** 126 /**
...@@ -149,38 +129,7 @@ ...@@ -149,38 +129,7 @@
149 * @author: renchao 129 * @author: renchao
150 */ 130 */
151 openInvalidDiglog (item) { 131 openInvalidDiglog (item) {
152 this.bdcqz = item 132 this.$popupDialog("证书证明打印", "workflow/components/dialog/zsdy", { ...item }, "76%", true);
153 this.ysxlh = item.ysxlh
154 this.bsmSz = item.bsmSz;
155 this.invalidDiglog = true;
156 this.bsmBdcqz = item.bsmBdcqz
157 },
158 /**
159 * @description: closeInvalidDiglog
160 * @author: renchao
161 */
162 closeInvalidDiglog () {
163 this.invalidDiglog = false;
164 this.bsmSz = "";
165 this.zfyy = "";
166 },
167 /**
168 * @description: 作废缮证信息
169 * @author: renchao
170 */
171 confirmInvalid () {
172 invalidCertificate({ bsmBdcqz: this.bsmBdcqz, zfyy: this.zfyy }).then(async (res) => {
173 if (res.code === 200) {
174 this.list();
175 this.$message.success("作废成功");
176 this.invalidDiglog = false;
177 this.zfyy = ''
178 let res = await this.list()
179 if (res && res == 200) this.openZsylDialog(this.bdcqz);
180 } else {
181 this.$message.error(res.message);
182 }
183 })
184 }, 133 },
185 /** 134 /**
186 * @description: openRecordPop 135 * @description: openRecordPop
...@@ -263,39 +212,6 @@ ...@@ -263,39 +212,6 @@
263 padding-top: 8px; 212 padding-top: 8px;
264 font-size: 16px; 213 font-size: 16px;
265 } 214 }
266
267 .invalid-diglog {
268 padding-bottom: 20px;
269 font-size: 16px;
270 font-weight: bold;
271 color: rgb(99, 99, 99);
272
273 .invalid-title {
274 display: flex;
275 align-content: center;
276
277 .invalid-icon {
278 color: rgb(254, 148, 0);
279 font-size: 34px;
280 margin-right: 10px;
281 }
282
283 .invalid-body {
284 line-height: 40px;
285 margin-bottom: 10px;
286 }
287 }
288
289 .invalid-reson {
290 margin-bottom: 10px;
291 }
292
293 .dialog-footer {
294 margin-top: 10px;
295 display: flex;
296 justify-content: flex-end;
297 }
298 }
299 .box-card { 215 .box-card {
300 .szxx_header { 216 .szxx_header {
301 color: #303133; 217 color: #303133;
......
1 /* 1 /*
2 * @Description: 2 * @Description:
3 * @Autor: renchao 3 * @Autor: renchao
4 * @LastEditTime: 2023-07-11 13:59:14 4 * @LastEditTime: 2023-09-05 15:05:56
5 */ 5 */
6 import { getForm } from "../flowform"; 6 import { getForm } from "../flowform";
7 import { getHomeNoticeList } from "@/api/home.js" 7 import { getHomeNoticeList } from "@/api/home.js"
...@@ -49,7 +49,6 @@ export default { ...@@ -49,7 +49,6 @@ export default {
49 * @author: renchao 49 * @author: renchao
50 */ 50 */
51 getFromRouter (tabname) { 51 getFromRouter (tabname) {
52 console.log(tabname, 'tabnametabnametabnametabnametabname');
53 //根据tabname获取选中的表单 此操作为了获取后端返回的表单对象,使用里面的是否可操作的属性 52 //根据tabname获取选中的表单 此操作为了获取后端返回的表单对象,使用里面的是否可操作的属性
54 for (let item of this.tabList) { 53 for (let item of this.tabList) {
55 if (item.value === tabname) { 54 if (item.value === tabname) {
......