sale-client 3.6.543 → 3.6.545
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/build/dev-server.js +3 -0
- package/package.json +1 -1
- package/src/components/revenue/Common/reportPrintThermal.vue +69 -108
- package/src/components/webMeter/paramSave/ParamSetForm.vue +14 -8
- package/src/components/webMeter/paramSaveNew/ParamSetForm.vue +14 -8
- package/src/filiale/jingyang/EticketV4/EticketRecordList.vue +10 -2
- package/src/filiale/rongcheng/UserDeviceInfoTest.vue +20 -2
- package/src/filiale/wuhai/CardList.vue +609 -0
- package/src/filiale/wuhai/ReissueBill.vue +306 -0
- package/src/filiale/wuhai/sale.js +2 -0
package/build/dev-server.js
CHANGED
package/package.json
CHANGED
|
@@ -117,8 +117,6 @@ export default {
|
|
|
117
117
|
|
|
118
118
|
// 使用原生方式打印 - 简化版本,专注于表格格式控制
|
|
119
119
|
printWithNative (content, selectPrinter) {
|
|
120
|
-
console.log('使用原生方式打印 - 资江58热敏打印机格式优化版')
|
|
121
|
-
|
|
122
120
|
try {
|
|
123
121
|
// 创建一个新的打印窗口
|
|
124
122
|
var printWindow = window.open('', '_blank', 'height=600,width=800')
|
|
@@ -178,8 +176,6 @@ export default {
|
|
|
178
176
|
// 关闭文档流
|
|
179
177
|
printWindow.document.close()
|
|
180
178
|
|
|
181
|
-
console.log('简化版打印内容准备完成')
|
|
182
|
-
|
|
183
179
|
// 等待内容完全加载后打印
|
|
184
180
|
setTimeout(function () {
|
|
185
181
|
try {
|
|
@@ -282,7 +278,7 @@ export default {
|
|
|
282
278
|
if (cellText && cellText.length > 2) {
|
|
283
279
|
// 不再使用零宽空格方法,而是采用直接处理原始内容
|
|
284
280
|
// 确保每个中文字符作为一个整体
|
|
285
|
-
var processedContent = this.processChinese(cellText)
|
|
281
|
+
var processedContent = this.processChinese(cellText, cell)
|
|
286
282
|
|
|
287
283
|
// 仅在没有HTML内容时应用文本替换
|
|
288
284
|
if (cell.innerHTML === cellText) {
|
|
@@ -298,19 +294,6 @@ export default {
|
|
|
298
294
|
cell.style.width = ratio + '%'
|
|
299
295
|
// 使用更保守的最大宽度计算以防止溢出
|
|
300
296
|
cell.style.maxWidth = (origWidth * 0.9) + 'px'
|
|
301
|
-
|
|
302
|
-
// 对宽度较大的单元格添加额外的换行辅助
|
|
303
|
-
if (origWidth > 40) {
|
|
304
|
-
cell.style.wordBreak = 'normal'
|
|
305
|
-
cell.style.wordWrap = 'normal'
|
|
306
|
-
cell.style.whiteSpace = 'pre-wrap'
|
|
307
|
-
|
|
308
|
-
// 添加内部空格辅助换行,但使用改进的处理方法
|
|
309
|
-
if (cell.innerHTML === cellText && cellText.length > 3) {
|
|
310
|
-
var processedLongContent = this.processChinese(cellText)
|
|
311
|
-
cell.textContent = processedLongContent
|
|
312
|
-
}
|
|
313
|
-
}
|
|
314
297
|
}
|
|
315
298
|
|
|
316
299
|
// 减小单元格高度,但保证有足够高度显示多行内容
|
|
@@ -341,74 +324,8 @@ export default {
|
|
|
341
324
|
cell.style.textAlign = 'left'
|
|
342
325
|
}
|
|
343
326
|
|
|
344
|
-
//
|
|
345
|
-
|
|
346
|
-
var hasFontSize = false
|
|
347
|
-
var fontSizeClass = ''
|
|
348
|
-
|
|
349
|
-
for (var j = 0; j < classNames.length; j++) {
|
|
350
|
-
var className = classNames[j]
|
|
351
|
-
if (className.indexOf('fs') === 0) {
|
|
352
|
-
hasFontSize = true
|
|
353
|
-
fontSizeClass = className
|
|
354
|
-
var sizeNum = parseInt(className.substring(2))
|
|
355
|
-
if (!isNaN(sizeNum)) {
|
|
356
|
-
// 根据fs类名映射到适当的pt大小
|
|
357
|
-
switch (sizeNum) {
|
|
358
|
-
case 9:
|
|
359
|
-
cell.style.fontSize = '5pt'
|
|
360
|
-
break
|
|
361
|
-
case 10:
|
|
362
|
-
cell.style.fontSize = '5.5pt'
|
|
363
|
-
break
|
|
364
|
-
case 11:
|
|
365
|
-
cell.style.fontSize = '6pt'
|
|
366
|
-
break
|
|
367
|
-
case 12:
|
|
368
|
-
cell.style.fontSize = '6.5pt'
|
|
369
|
-
break
|
|
370
|
-
case 13:
|
|
371
|
-
cell.style.fontSize = '6.8pt'
|
|
372
|
-
break
|
|
373
|
-
case 14:
|
|
374
|
-
cell.style.fontSize = '7.3pt'
|
|
375
|
-
break
|
|
376
|
-
case 15:
|
|
377
|
-
cell.style.fontSize = '7.8pt'
|
|
378
|
-
break
|
|
379
|
-
case 16:
|
|
380
|
-
cell.style.fontSize = '8.3pt'
|
|
381
|
-
break
|
|
382
|
-
case 17:
|
|
383
|
-
cell.style.fontSize = '8.8pt'
|
|
384
|
-
break
|
|
385
|
-
case 18:
|
|
386
|
-
cell.style.fontSize = '9.3pt'
|
|
387
|
-
break
|
|
388
|
-
default:
|
|
389
|
-
if (sizeNum < 9) {
|
|
390
|
-
cell.style.fontSize = '5pt'
|
|
391
|
-
} else if (sizeNum > 18) {
|
|
392
|
-
cell.style.fontSize = '9.3pt'
|
|
393
|
-
}
|
|
394
|
-
}
|
|
395
|
-
}
|
|
396
|
-
}
|
|
397
|
-
}
|
|
398
|
-
|
|
399
|
-
// 如果没有找到字体大小类,应用默认字体大小
|
|
400
|
-
if (!hasFontSize) {
|
|
401
|
-
cell.style.fontSize = '6.8pt'
|
|
402
|
-
} else {
|
|
403
|
-
// 增强字体大小应用方式 - 通过属性确保CSS优先级
|
|
404
|
-
cell.setAttribute('data-fontsize', fontSizeClass)
|
|
405
|
-
// 设置行内样式中的!important
|
|
406
|
-
var currentStyle = cell.getAttribute('style') || ''
|
|
407
|
-
if (!currentStyle.includes('!important')) {
|
|
408
|
-
cell.setAttribute('style', currentStyle.replace(/font-size:[^;]+;/, 'font-size:' + cell.style.fontSize + ' !important;'))
|
|
409
|
-
}
|
|
410
|
-
}
|
|
411
|
-
|
|
327
|
+
// 设置字体大小
|
|
328
|
+
cell.style.fontSize = this.getFontSize(cell)
|
|
412
329
|
// 检查是否有粗体类
|
|
413
330
|
var isBold = cell.className.indexOf('b') !== -1
|
|
414
331
|
|
|
@@ -417,7 +334,6 @@ export default {
|
|
|
417
334
|
cell.style.fontWeight = isBold ? '500' : '350'
|
|
418
335
|
cell.style.color = '#000'
|
|
419
336
|
cell.style.padding = '0 1px' // 添加一点点左右内边距,防止文字紧贴边缘
|
|
420
|
-
|
|
421
337
|
// 为每个单元格添加唯一标识符
|
|
422
338
|
var cellId = 'cell_' + i + '_' + r + '_' + c3
|
|
423
339
|
cell.id = cellId
|
|
@@ -496,16 +412,60 @@ export default {
|
|
|
496
412
|
console.log('表单数据刷新完成')
|
|
497
413
|
},
|
|
498
414
|
|
|
415
|
+
// 获取元素的实际字体大小(以pt为单位)
|
|
416
|
+
getFontSize (element) {
|
|
417
|
+
var fontSize = '6.8pt' // 默认字体大小
|
|
418
|
+
var classNames = element.className.split(' ')
|
|
419
|
+
for (var i = 0; i < classNames.length; i++) {
|
|
420
|
+
var className = classNames[i]
|
|
421
|
+
if (className.indexOf('fs') === 0) {
|
|
422
|
+
var sizeNum = parseInt(className.substring(2))
|
|
423
|
+
if (!isNaN(sizeNum)) {
|
|
424
|
+
switch (sizeNum) {
|
|
425
|
+
case 9: return '5pt'
|
|
426
|
+
case 10: return '5.5pt'
|
|
427
|
+
case 11: return '6pt'
|
|
428
|
+
case 12: return '6.5pt'
|
|
429
|
+
case 13: return '6.8pt'
|
|
430
|
+
case 14: return '7.3pt'
|
|
431
|
+
case 15: return '7.8pt'
|
|
432
|
+
case 16: return '8.3pt'
|
|
433
|
+
case 17: return '8.8pt'
|
|
434
|
+
case 18: return '9.3pt'
|
|
435
|
+
default:
|
|
436
|
+
if (sizeNum < 9) return '5pt'
|
|
437
|
+
if (sizeNum > 18) return '9.3pt'
|
|
438
|
+
}
|
|
439
|
+
}
|
|
440
|
+
}
|
|
441
|
+
}
|
|
442
|
+
return fontSize
|
|
443
|
+
},
|
|
444
|
+
|
|
499
445
|
// 添加一个新的方法来处理中文字符,确保它们不被截断
|
|
500
|
-
processChinese (text) {
|
|
446
|
+
processChinese (text, cell) {
|
|
501
447
|
if (!text) return text
|
|
502
448
|
|
|
503
449
|
var result = ''
|
|
504
450
|
var inTag = false
|
|
451
|
+
var currentWidth = 0
|
|
452
|
+
|
|
453
|
+
// 创建一个临时的canvas来测量文本宽度
|
|
454
|
+
var canvas = document.createElement('canvas')
|
|
455
|
+
var context = canvas.getContext('2d')
|
|
456
|
+
|
|
457
|
+
// 设置canvas字体
|
|
458
|
+
var fontSize = this.getFontSize(cell)
|
|
459
|
+
context.font = fontSize + ' "Helvetica Neue", Helvetica, Arial, sans-serif'
|
|
460
|
+
|
|
461
|
+
// 获取单元格的实际可用宽度
|
|
462
|
+
var maxWidth = cell.hasAttribute('width')
|
|
463
|
+
? parseInt(cell.getAttribute('width'))
|
|
464
|
+
: 180 // 默认宽度
|
|
505
465
|
|
|
506
466
|
// 处理字符串,保持HTML标签完整
|
|
507
|
-
for (var
|
|
508
|
-
var char = text.charAt(
|
|
467
|
+
for (var j = 0; j < text.length; j++) {
|
|
468
|
+
var char = text.charAt(j)
|
|
509
469
|
|
|
510
470
|
// 检查是否在HTML标签内
|
|
511
471
|
if (char === '<') {
|
|
@@ -516,30 +476,31 @@ export default {
|
|
|
516
476
|
result += char
|
|
517
477
|
|
|
518
478
|
// 如果不在标签内,处理字符
|
|
519
|
-
if (!inTag
|
|
520
|
-
|
|
521
|
-
|
|
522
|
-
|
|
523
|
-
|
|
524
|
-
|
|
525
|
-
|
|
526
|
-
|
|
527
|
-
|
|
528
|
-
|
|
529
|
-
|
|
530
|
-
|
|
531
|
-
|
|
532
|
-
|
|
533
|
-
|
|
534
|
-
|
|
535
|
-
|
|
536
|
-
|
|
479
|
+
if (!inTag) {
|
|
480
|
+
// 使用canvas测量当前字符的实际宽度
|
|
481
|
+
var charWidth = context.measureText(char).width + 1
|
|
482
|
+
currentWidth += charWidth
|
|
483
|
+
|
|
484
|
+
// 检查是否需要添加换行
|
|
485
|
+
if (j < text.length - 1) {
|
|
486
|
+
var nextChar = text.charAt(j + 1)
|
|
487
|
+
|
|
488
|
+
// 测量下一个字符的宽度
|
|
489
|
+
var nextCharWidth = context.measureText(nextChar).width + 1
|
|
490
|
+
|
|
491
|
+
// 如果添加下一个字符会超出最大宽度,或者在特定字符类型转换处,添加换行
|
|
492
|
+
if ((currentWidth + nextCharWidth > maxWidth)) {
|
|
493
|
+
// 添加换行符
|
|
494
|
+
result += '\n'
|
|
495
|
+
currentWidth = 0
|
|
496
|
+
}
|
|
537
497
|
}
|
|
538
498
|
}
|
|
539
499
|
|
|
540
500
|
// 如果标签结束
|
|
541
501
|
if (char === '>') {
|
|
542
502
|
inTag = false
|
|
503
|
+
currentWidth = 0 // 重置宽度计数器
|
|
543
504
|
}
|
|
544
505
|
}
|
|
545
506
|
|
|
@@ -377,19 +377,25 @@ export default {
|
|
|
377
377
|
items: '*',
|
|
378
378
|
tablename: 't_gasparammanage',
|
|
379
379
|
condition: `f_gasbrand_id= ${this.gasbrandid}`,
|
|
380
|
-
orderitem: 'id'
|
|
380
|
+
orderitem: 'id desc'
|
|
381
381
|
}
|
|
382
382
|
}, {resolveMsg: null, rejectMsg: '获取参数历史信息信息失败'})
|
|
383
383
|
if (rat.data.length > 0) {
|
|
384
384
|
rat.data.forEach((item) => {
|
|
385
|
-
if (item.
|
|
386
|
-
item.f_param_value
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
|
|
385
|
+
if (!this.param[item.f_param_lname]) {
|
|
386
|
+
console.log(item.f_param_value, item.f_param_content)
|
|
387
|
+
if (item.f_param_value != item.f_param_content && item.f_param_content) {
|
|
388
|
+
item.f_param_value = item.f_param_content
|
|
389
|
+
}
|
|
390
|
+
if (item.f_param_value === '1') {
|
|
391
|
+
item.f_param_value = '开'
|
|
392
|
+
}
|
|
393
|
+
if (item.f_param_value === '0') {
|
|
394
|
+
item.f_param_value = '关'
|
|
395
|
+
}
|
|
396
|
+
console.log('参数取出来了---', item.f_param_lname)
|
|
397
|
+
this.$set(`param['${item.f_param_lname}']`, item.f_param_value)
|
|
390
398
|
}
|
|
391
|
-
console.log('参数取出来了---', item.f_param_lname)
|
|
392
|
-
this.$set(`param['${item.f_param_lname}']`, item.f_param_value)
|
|
393
399
|
// this.param[item.f_param_lname] = item.f_param_value
|
|
394
400
|
})
|
|
395
401
|
}
|
|
@@ -478,19 +478,25 @@ export default {
|
|
|
478
478
|
items: '*',
|
|
479
479
|
tablename: 't_gasparammanage',
|
|
480
480
|
condition: `f_gasbrand_id= ${this.gasbrandid}`,
|
|
481
|
-
orderitem: 'id'
|
|
481
|
+
orderitem: 'id desc'
|
|
482
482
|
}
|
|
483
483
|
}, {resolveMsg: null, rejectMsg: '获取参数历史信息信息失败'})
|
|
484
484
|
if (rat.data.length > 0) {
|
|
485
485
|
rat.data.forEach((item) => {
|
|
486
|
-
if (item.
|
|
487
|
-
item.f_param_value
|
|
488
|
-
|
|
489
|
-
|
|
490
|
-
|
|
486
|
+
if (!this.param[item.f_param_lname]) {
|
|
487
|
+
console.log(item.f_param_value, item.f_param_content)
|
|
488
|
+
if (item.f_param_value != item.f_param_content) {
|
|
489
|
+
item.f_param_value = item.f_param_content
|
|
490
|
+
}
|
|
491
|
+
if (item.f_param_value === '1') {
|
|
492
|
+
item.f_param_value = '开'
|
|
493
|
+
}
|
|
494
|
+
if (item.f_param_value === '0') {
|
|
495
|
+
item.f_param_value = '关'
|
|
496
|
+
}
|
|
497
|
+
console.log('参数取出来了---', item.f_param_lname)
|
|
498
|
+
this.$set(`param['${item.f_param_lname}']`, item.f_param_value)
|
|
491
499
|
}
|
|
492
|
-
console.log('参数取出来了---', item.f_param_lname)
|
|
493
|
-
this.$set(`param['${item.f_param_lname}']`, item.f_param_value)
|
|
494
500
|
// this.param[item.f_param_lname] = item.f_param_value
|
|
495
501
|
})
|
|
496
502
|
}
|
|
@@ -356,11 +356,19 @@ export default {
|
|
|
356
356
|
this.$refs.paged.$refs.cri.search()
|
|
357
357
|
},
|
|
358
358
|
resetStatus () {
|
|
359
|
-
|
|
359
|
+
console.log('>>> 发票状态重置, 登录信息:', this.$login.f)
|
|
360
|
+
let condition = ''
|
|
361
|
+
if (this.$login.f.orgid) {
|
|
362
|
+
condition = `${condition} and f_orgid = '${this.$login.f.orgid}'`
|
|
363
|
+
}
|
|
364
|
+
if (this.$login.f.depids) {
|
|
365
|
+
condition = `${condition} and f_depid = '${this.$login.f.depids}'`
|
|
366
|
+
}
|
|
367
|
+
axios.post('/invoice/rs/logic/resetStatus', { condition: condition }, {
|
|
360
368
|
resolveMsg: null,
|
|
361
369
|
rejectMsg: '发票状态重置失败!'
|
|
362
370
|
}).then(res => {
|
|
363
|
-
this.$showAlert('
|
|
371
|
+
this.$showAlert('本月因未认证导致开票失败的记录状态已重置!', 'success', 5000)
|
|
364
372
|
}).catch(error => {
|
|
365
373
|
this.$showAlert('操作失败!', 'error', 5000)
|
|
366
374
|
console.error('>>> 发票状态重置失败:', error)
|
|
@@ -161,7 +161,6 @@
|
|
|
161
161
|
}
|
|
162
162
|
},
|
|
163
163
|
addDevice () {
|
|
164
|
-
console.log('设备信息', this.devicesinfo)
|
|
165
164
|
const inputDate = this.$login.toStandardTimeString()
|
|
166
165
|
this.devicesinfo.push({
|
|
167
166
|
f_devices_type: '家用灶具',
|
|
@@ -171,7 +170,7 @@
|
|
|
171
170
|
},
|
|
172
171
|
updateExpireDate (device) {
|
|
173
172
|
if (device.f_input_date) {
|
|
174
|
-
if (device.f_devices_type === '自闭阀') {
|
|
173
|
+
if (device.f_devices_type === '自闭阀' || device.f_devices_type === '切断阀') {
|
|
175
174
|
const inputDate = new Date(device.f_input_date)
|
|
176
175
|
const expireDate = new Date(inputDate)
|
|
177
176
|
expireDate.setFullYear(expireDate.getFullYear() + 10)
|
|
@@ -190,6 +189,25 @@
|
|
|
190
189
|
}
|
|
191
190
|
device.f_expire_date = formatDate(expireDate)
|
|
192
191
|
}
|
|
192
|
+
if (device.f_devices_type === '报警器') {
|
|
193
|
+
const inputDate = new Date(device.f_input_date)
|
|
194
|
+
const expireDate = new Date(inputDate)
|
|
195
|
+
expireDate.setFullYear(expireDate.getFullYear() + 5)
|
|
196
|
+
const now = new Date()
|
|
197
|
+
expireDate.setHours(now.getHours())
|
|
198
|
+
expireDate.setMinutes(now.getMinutes())
|
|
199
|
+
expireDate.setSeconds(now.getSeconds())
|
|
200
|
+
const formatDate = (date) => {
|
|
201
|
+
const year = date.getFullYear()
|
|
202
|
+
const month = String(date.getMonth() + 1).padStart(2, '0')
|
|
203
|
+
const day = String(date.getDate()).padStart(2, '0')
|
|
204
|
+
const hours = String(date.getHours()).padStart(2, '0')
|
|
205
|
+
const minutes = String(date.getMinutes()).padStart(2, '0')
|
|
206
|
+
const seconds = String(date.getSeconds()).padStart(2, '0')
|
|
207
|
+
return `${year}-${month}-${day} ${hours}:${minutes}:${seconds}`
|
|
208
|
+
}
|
|
209
|
+
device.f_expire_date = formatDate(expireDate)
|
|
210
|
+
}
|
|
193
211
|
}
|
|
194
212
|
}
|
|
195
213
|
},
|
|
@@ -0,0 +1,609 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<div @keyup.enter="search">
|
|
3
|
+
<partial-view v-ref:pv>
|
|
4
|
+
<criteria-paged :model="model" :pager="false" v-ref:paged>
|
|
5
|
+
<criteria @condition-changed='$parent.$parent.selfSearch' partial='criteria' v-ref:cri>
|
|
6
|
+
<div class="form-horizontal" novalidate partial>
|
|
7
|
+
<div class="row">
|
|
8
|
+
<div class="form-group col-sm-4">
|
|
9
|
+
<!-- <label>用户编号:</label> -->
|
|
10
|
+
<input class="input_search" condition="f_userinfo_code = '{}'" placeholder='客户编号' style="width: 80%"
|
|
11
|
+
type="text"
|
|
12
|
+
v-model="model.f_userinfo_code">
|
|
13
|
+
</div>
|
|
14
|
+
<div class="form-group col-sm-4" style="flex: 1;width: max-content">
|
|
15
|
+
<!-- <label>操作类型:</label> -->
|
|
16
|
+
<v-select :options='$parent.$parent.$parent.operationtypes'
|
|
17
|
+
|
|
18
|
+
:value.sync="model.f_operat_type"
|
|
19
|
+
:width="'100%'"
|
|
20
|
+
close-on-select
|
|
21
|
+
condition="f_operat_type = '{}'"
|
|
22
|
+
id="f_paytype"
|
|
23
|
+
placeholder='操作类型'
|
|
24
|
+
style="width: 100%"
|
|
25
|
+
v-model="model.f_operat_type"></v-select>
|
|
26
|
+
</div>
|
|
27
|
+
<div class="form-group col-sm-2 button-range" style="padding-right: 10px">
|
|
28
|
+
<button @click="search()" class="button_search">查询</button>
|
|
29
|
+
<div
|
|
30
|
+
:class="{'button_shrink_top':$parent.$parent.$parent.criteriaShow,'button_shrink_bottom':!$parent.$parent.$parent.criteriaShow}"
|
|
31
|
+
@click="$parent.$parent.$parent.criteriaShow=!$parent.$parent.$parent.criteriaShow" class="button_spacing" style="float: right"></div>
|
|
32
|
+
</div>
|
|
33
|
+
<div class="form-group col-sm-5" v-show="$parent.$parent.$parent.criteriaShow">
|
|
34
|
+
<!-- <label>用户编号:</label> -->
|
|
35
|
+
<input class="input_search" condition="r.f_operator like '%{}%'" placeholder='操作员' style="width: 80%"
|
|
36
|
+
type="text"
|
|
37
|
+
v-model="model.f_operator">
|
|
38
|
+
</div>
|
|
39
|
+
</div>
|
|
40
|
+
<!-- <partial name="cardcriteria"></partial> -->
|
|
41
|
+
<!-- <div class="form-group">
|
|
42
|
+
<partial name="cardcriteria"></partial>
|
|
43
|
+
</div> -->
|
|
44
|
+
</div>
|
|
45
|
+
</criteria>
|
|
46
|
+
<div partial="list" style="overflow-y: scroll;height: 90%">
|
|
47
|
+
<accordion :one-at-atime="true" type="info" >
|
|
48
|
+
<panel :is-click="false" :is-open="true" type="info" v-for="row in model.rows" >
|
|
49
|
+
<span @click="$parent.$parent.$parent.selected(row)" class="panel-title row" slot="header"
|
|
50
|
+
style="cursor: pointer;">
|
|
51
|
+
<div class="col-sm-11">
|
|
52
|
+
<!-- <div class="row" v-if="row.f_state==='冲正' " style="color: red">-->
|
|
53
|
+
<!-- <strong :title="row.f_userinfo_code" class="col-sm-4" show-overflow-tooltip="true">{{row.f_userinfo_code.length>9?''+row.f_userinfo_code.substring(0,9)+'...':row.f_userinfo_code}}</strong>-->
|
|
54
|
+
<!-- <span class="col-sm-4">{{$parent.$parent.$parent.dateDes(row.f_operate_date)}}</span>-->
|
|
55
|
+
<!-- <span class="col-sm-4">{{row.type}}</span>-->
|
|
56
|
+
<!-- </div>-->
|
|
57
|
+
<div class="row">
|
|
58
|
+
<strong :title="row.f_userinfo_code" class="col-sm-4" show-overflow-tooltip="true">{{row.f_userinfo_code.length>9?''+row.f_userinfo_code.substring(0,9)+'...':row.f_userinfo_code}}</strong>
|
|
59
|
+
<span class="col-sm-4">{{$parent.$parent.$parent.dateDes(row.f_operate_date)}}</span>
|
|
60
|
+
<span class="col-sm-4">{{row.type}}</span>
|
|
61
|
+
</div>
|
|
62
|
+
</div>
|
|
63
|
+
<div class="col-sm-1" v-if="$parent.$parent.$parent.isOperate" title="涉及权限:冲正权限">
|
|
64
|
+
<dropdown class="auto"
|
|
65
|
+
v-if="(row.type ==='机表收费撤销' || row.type ==='卡表收费撤销' || row.type ==='物联网收费撤销' || row.type ==='其他收费撤销'
|
|
66
|
+
|| row.type ==='气损收费撤销' || row.type ==='预存缴费' || row.type === '补卡' || row.type === '物联网收费' ||
|
|
67
|
+
row.type === '用户退费' || row.type === '机表收费' || row.type === '数码表收费' ||
|
|
68
|
+
row.type === '卡表收费' || row.type === '超用收费' || row.type === '发卡售气' || row.type === '其他收费' ||
|
|
69
|
+
row.type === '换表' || row.state === 1 || row.type==='调价补费' || row.type==='卡表赠气' ||
|
|
70
|
+
row.type==='物联网赠气'|| row.type==='物联网赠费'|| row.type==='卡表赠费'|| row.type==='卡表赠气'||
|
|
71
|
+
row.type==='卡表收费撤销'||row.type==='物联网补费' || row.type==='物联网扣费'||row.type==='机表补费'||
|
|
72
|
+
row.type==='机表扣费'||row.type==='物联网补气'||row.type==='物联网扣气'||row.type==='气损收费' ||
|
|
73
|
+
row.type === '气表清零' || row.type === '掉气补气' || row.type === '其他补气' || row.type === '清零补气' ||
|
|
74
|
+
row.type === '换表补气' || row.type === '过户'|| row.type ==='价格补差' || row.type ==='价格补差撤销') && row.type!=='新增户档案' && row.type!=='转气转出' && row.type!=='转气转入'">
|
|
75
|
+
<button data-toggle="dropdown" style="border: 0px;background: none;" type="button"
|
|
76
|
+
v-if="row.f_user_state==='正常'||row.f_user_state==='预备'||row.type==='气损收费' ">
|
|
77
|
+
<span class="glyphicon glyphicon-th-list"></span>
|
|
78
|
+
</button>
|
|
79
|
+
<ul class="dropdown-menu dropdown-menu-right" slot="dropdown-menu" style=" min-width: 60px;" v-if="row.f_user_state==='正常'||row.f_user_state==='预备'||row.type==='气损收费' ">
|
|
80
|
+
<!-- <li-->
|
|
81
|
+
<!-- v-if="row.type === '换新表' || row.type === '气表清零' || row.type === '掉气补气' || row.type === '其他补气' || row.type === '清零补气' || row.type === '换表补气'-->
|
|
82
|
+
<!-- || row.type === '补卡' || row.type === '物联网开户' || row.type === '物联网收费' || row.type === '用户退费' || row.type === '机表收费' || row.type === '数码表收费' || row.type === '卡表收费' || row.type === '超用收费' || row.type === '发卡售气' || row.type === '其他收费' || row.type === '换表' || row.type === '过户'|| row.type==='预存缴费'|| row.type==='退费'|| row.type==='调价补费' ||row.type==='卡表收费撤销'||row.type==='物联网补费' || row.type==='物联网扣费'||row.type==='机表补费'||row.type==='机表扣费'||row.type==='物联网补气'||row.type==='物联网扣气'||row.type==='气损收费' ">-->
|
|
83
|
+
<!-- <a @click.stop="$parent.$parent.$parent.operate('票据补打', row)" href="#">票据补打</a>-->
|
|
84
|
+
<!-- </li>-->
|
|
85
|
+
<!-- <li-->
|
|
86
|
+
<!-- v-if="row.state === 1 && (row.type === '其他收费欠费登记' || row.type === '迁表' || row.type === '调价预存' || row.type === '拆表' || row.type === '物联网开户' || row.type === '物联网收费'|| row.type === '卡表收费' || row.type === '其他收费'|| row.type === '气费减免'||row.type === '维修收费' || row.type === '过户' || row.type === '换新表' || row.type === '气表清零' || row.type === '机表收费' || row.type === '超用收费' || row.type === '其他收费' || row.type === '补卡'|| row.type === '调价补费'|| row.type=='预存缴费' || row.type==='卡表赠气'|| row.type==='物联网赠费'|| row.type==='卡表赠费'|| row.type==='物联网赠气')">-->
|
|
87
|
+
<!-- <a @click.stop="$parent.$parent.$parent.operate('撤销', row)" href="#">撤销</a>-->
|
|
88
|
+
<!-- </li>-->
|
|
89
|
+
<li>
|
|
90
|
+
<a @click.stop="$parent.$parent.$parent.operate('票据补打', row)" href="#">票据补打</a>
|
|
91
|
+
</li>
|
|
92
|
+
<li>
|
|
93
|
+
<a @click.stop="$parent.$parent.$parent.operate('热敏收据补打', row)" href="#">热敏收据补打</a>
|
|
94
|
+
</li>
|
|
95
|
+
<li>
|
|
96
|
+
<a @click.stop="$parent.$parent.$parent.operate('撤销', row)" href="#">撤销</a>
|
|
97
|
+
</li>
|
|
98
|
+
</ul>
|
|
99
|
+
</dropdown>
|
|
100
|
+
</div>
|
|
101
|
+
|
|
102
|
+
</span>
|
|
103
|
+
<div class="panel-body" v-if="$parent.$parent.$parent.isSelected(row)">
|
|
104
|
+
<salecardgas-detail :data="row" v-if="row.type === '发卡售气'"></salecardgas-detail>
|
|
105
|
+
<movemeter-detail :data="row" v-if="row.type === '迁表'"></movemeter-detail>
|
|
106
|
+
<salecardgas-detail :data="row" v-if="row.type === '换表发卡'"></salecardgas-detail>
|
|
107
|
+
<cardmetercenter-detail :data="row" v-if="row.type === '卡表收费'||row.type === '数码表收费' "></cardmetercenter-detail>
|
|
108
|
+
<movegas-detail :data="row" v-if="row.type === '转气转出'"></movegas-detail>
|
|
109
|
+
<movegas-detail :data="row" v-if="row.type === '转气转入'"></movegas-detail>
|
|
110
|
+
<machinemetercenter-detail :data="row" v-if="row.type === '机表收费'"></machinemetercenter-detail>
|
|
111
|
+
<autoaccounts-detail :data="row" v-if="row.type === '自动下账'"></autoaccounts-detail>
|
|
112
|
+
<bankdk-detail :data="row" v-if="row.type === '银行代扣'"></bankdk-detail>
|
|
113
|
+
<bank-pay :data="row" v-if="row.type === '银行支付'"></bank-pay>
|
|
114
|
+
<wechat-pay :data="row" v-if="row.type === '微信支付'"></wechat-pay>
|
|
115
|
+
<disablemanage-detail :data="row" v-if="row.type === '停用'"></disablemanage-detail>
|
|
116
|
+
<enablemanage-detail :data="row" v-if="row.type === '启用'"></enablemanage-detail>
|
|
117
|
+
<replacecardmanage-detail :data="row" v-if="row.type === '补卡'"></replacecardmanage-detail>
|
|
118
|
+
<machinecard-detail :data="row" v-if="row.type === '机表补卡'"></machinecard-detail>
|
|
119
|
+
<transfermanage-detail :data="row" v-if="row.type === '过户'"></transfermanage-detail>
|
|
120
|
+
<othercharge-detail :data="row" v-if="row.type === '其他收费欠费登记'||row.type === '其他收费'||row.type === '维修收费'"></othercharge-detail>
|
|
121
|
+
<inputtorchange-detail :data="row" v-if="row.type === '抄表员变更'"></inputtorchange-detail>
|
|
122
|
+
<offgasaddgas-detail :data="row" v-if=" row.type === '换表补气' || row.type === '批量换表补气' || row.type === '其他补气' || row.type === '清零补气' || row.type === '掉气补气'||row.type==='物联网补费'||row.type==='物联网扣费'||row.type==='机表补费'||row.type==='机表扣费'||row.type==='物联网补气'||row.type==='物联网扣气' " ></offgasaddgas-detail>
|
|
123
|
+
<iotopen-detail :data="row" v-if="row.type === '开通'"></iotopen-detail>
|
|
124
|
+
<iotmetercenter-detail :data="row" v-if="row.type === '物联网收费' || row.type === '物联网开户' || row.type === '调价退费' || row.type === '调价补费'||row.type === '退押金' "></iotmetercenter-detail>
|
|
125
|
+
<overuserchange-detail :data="row" v-if="row.type === '超用收费'"></overuserchange-detail>
|
|
126
|
+
<adduser-detail :data="row" v-if="row.type === '新增户档案'"></adduser-detail>
|
|
127
|
+
<gaspricechange-detail :data="row" v-if="row.type === '气价变更'"></gaspricechange-detail>
|
|
128
|
+
<userchange-detail :data="row" v-if="row.type === '档案变更'"></userchange-detail>
|
|
129
|
+
<changemeter-detail :data="row" v-if="row.type === '换新表' || row.type === '批量换表' || row.type === '气表清零'"></changemeter-detail>
|
|
130
|
+
<changeflowmeter-detail :data="row" v-if="row.type === '换卡控流量计'"></changeflowmeter-detail>
|
|
131
|
+
<cardoveruser-detail :data="row" v-if="row.type === '卡表超用'||row.type === '超用'"></cardoveruser-detail>
|
|
132
|
+
<cancellation-detail :data="row" v-if="row.type === '销户'"></cancellation-detail>
|
|
133
|
+
<refund-detail :data="row" v-if="row.type === '退费' || row.type == '卡表退费'"></refund-detail>
|
|
134
|
+
|
|
135
|
+
<change-meter-cancel :data="row" v-if="row.type === '换表撤销'"></change-meter-cancel>
|
|
136
|
+
<autoaccounts-cancel-detail :data="row" v-if="row.type === '自动下账撤销'"></autoaccounts-cancel-detail>
|
|
137
|
+
<transfermanage-cancel-detail :data="row" v-if="row.type === '过户撤销'"></transfermanage-cancel-detail>
|
|
138
|
+
<cardmetercenter-cancel-detail :data="row" v-if="row.type === '卡表收费撤销'"></cardmetercenter-cancel-detail>
|
|
139
|
+
<machinemetercenter-cancel-detail :data="row" v-if="row.type === '机表收费撤销'"></machinemetercenter-cancel-detail>
|
|
140
|
+
<machinemetercenter-cancel-detail :data="row" v-if="row.type == '预存缴费撤销'"></machinemetercenter-cancel-detail>
|
|
141
|
+
<othercharge-cancel-detail :data="row" v-if="row.type === '其他收费撤销'"></othercharge-cancel-detail>
|
|
142
|
+
<replacecardmanage-cancel-detail :data="row" v-if="row.type === '补卡撤销'"></replacecardmanage-cancel-detail>
|
|
143
|
+
<iotmetercenter-cancel-detail :data="row" v-if="row.type === '物联网收费撤销'"></iotmetercenter-cancel-detail>
|
|
144
|
+
<feededuction-detail :data="row" v-if="row.type === '补费' ||row.type === '扣费' ||row.type === '补气' ||row.type === '扣气' "></feededuction-detail>
|
|
145
|
+
<with-gas :data="row" v-if="row.type==='物联网赠气' || row.type==='物联网赠费'||row.type==='卡表赠气'||row.type==='卡表赠费'"></with-gas>
|
|
146
|
+
<replace-card-manageDetail :data="row" v-if=" row.type==='物联网补费'||row.type==='物联网扣费'||row.type==='机表补费'||row.type==='机表扣费'||row.type==='物联网补气'||row.type==='物联网扣气' "></replace-card-manageDetail>
|
|
147
|
+
<blacklist-detail :data="row" v-if="row.type ==='拉黑' ||row.type === '取消拉黑' "></blacklist-detail>
|
|
148
|
+
<advance-delivery-detail :data="row" v-if="row.type ==='卡表预交' "></advance-delivery-detail>
|
|
149
|
+
<machinemetercenter-detail :data="row" v-if="row.type === '预存缴费'||row.type == '调价预存'"></machinemetercenter-detail>
|
|
150
|
+
<price-adjustment-detail :data="row" v-if="row.type === '价格补差'"></price-adjustment-detail>
|
|
151
|
+
<gasloss-detail :data="row" v-if="row.type === '气损收费' || row.type === '气损收费撤销'"></gasloss-detail>
|
|
152
|
+
<garbage-detail :data="row" v-if="row.type === '垃圾费收费'"></garbage-detail>
|
|
153
|
+
</div>
|
|
154
|
+
<div style="margin-top: 8px;background: #FFF;" v-if="!$parent.$parent.$parent.isSelected(row)">
|
|
155
|
+
<span>{{row.f_describe}}</span>
|
|
156
|
+
</div>
|
|
157
|
+
</panel>
|
|
158
|
+
</accordion>
|
|
159
|
+
</div>
|
|
160
|
+
|
|
161
|
+
</criteria-paged>
|
|
162
|
+
</partial-view>
|
|
163
|
+
<record-cancel :data="cancel_data" :show.sync="cancel_show" @cancel="cancelOper()" @cancel-success="cancelSucc()" v-if="cancel_show"></record-cancel>
|
|
164
|
+
<reissue-bill :data="reissue_data" :show.sync="reissue_show" @cancel="reissueOper()" @reissue-success="reissueSucc()" v-if="reissue_show"></reissue-bill>
|
|
165
|
+
</div>
|
|
166
|
+
</template>
|
|
167
|
+
<script>
|
|
168
|
+
/**
|
|
169
|
+
*操作记录信息
|
|
170
|
+
*/
|
|
171
|
+
import {PagedList} from 'vue-client'
|
|
172
|
+
import co from 'co'
|
|
173
|
+
|
|
174
|
+
let cancelGen = function *(self, data) {
|
|
175
|
+
let msgRet = yield self.$showMessage('撤销后数据不可恢复,确认撤销录入吗?', ['confirm', 'cancel'])
|
|
176
|
+
if (msgRet === 'cancel') return
|
|
177
|
+
// 撤销操作完成,刷新界面
|
|
178
|
+
self.search()
|
|
179
|
+
}
|
|
180
|
+
|
|
181
|
+
/**
|
|
182
|
+
* 发票补打
|
|
183
|
+
*/
|
|
184
|
+
let reprintGen = async function (self, row, title) {
|
|
185
|
+
try {
|
|
186
|
+
row.billUrl = self.getBillUrl(row, title)
|
|
187
|
+
if (!row.billUrl) {
|
|
188
|
+
self.$showMessage('当前操作类型暂时没有票据')
|
|
189
|
+
return
|
|
190
|
+
}
|
|
191
|
+
row.f_bill_type = row.type
|
|
192
|
+
row.f_bill_style = title === '热敏收据补打' ? '热敏收据' : '普通收据'
|
|
193
|
+
row.f_operator = self.$login.f.name
|
|
194
|
+
row.f_operatorid = self.$login.f.id
|
|
195
|
+
row.f_orgid = self.$login.f.orgid
|
|
196
|
+
row.f_orgname = self.$login.f.orgs
|
|
197
|
+
row.f_depid = self.$login.f.depids
|
|
198
|
+
row.f_depname = self.$login.f.deps
|
|
199
|
+
self.reissue_data = JSON.parse(JSON.stringify(row))
|
|
200
|
+
if (row.type === '调价预存') {
|
|
201
|
+
let id = await self.$resetpost('rs/sql/singleTable_OrderBy', {
|
|
202
|
+
data: {
|
|
203
|
+
items: 'f_surplus_id',
|
|
204
|
+
tablename: 't_sellinggas',
|
|
205
|
+
condition: `id = '${row.id}'`,
|
|
206
|
+
orderitem: 'id'
|
|
207
|
+
}
|
|
208
|
+
}, {resolveMsg: null, rejectMsg: '查询优惠信息失败'})
|
|
209
|
+
self.reissue_data.id = id.data[0].f_surplus_id
|
|
210
|
+
}
|
|
211
|
+
self.reissue_show = true
|
|
212
|
+
} catch (error) {
|
|
213
|
+
if (error.status) {
|
|
214
|
+
self.$warn(`加载数据出错, ${JSON.stringify(error)}`, 'CardList')
|
|
215
|
+
}
|
|
216
|
+
throw error
|
|
217
|
+
}
|
|
218
|
+
}
|
|
219
|
+
let asyncCardList = async function (self) {
|
|
220
|
+
await self.$getConfig(self, 'CardList')
|
|
221
|
+
console.log('操作汇总config', self.config)
|
|
222
|
+
}
|
|
223
|
+
export default {
|
|
224
|
+
title: '操作汇总',
|
|
225
|
+
data () {
|
|
226
|
+
return {
|
|
227
|
+
config: {
|
|
228
|
+
cancleother: false, // 默认可以撤销别人的操作
|
|
229
|
+
cancletime: true // 默认可以冲正今天以前的操作
|
|
230
|
+
},
|
|
231
|
+
model: new PagedList(`${this.sqlurl}`, 9999,
|
|
232
|
+
{
|
|
233
|
+
items: '"' + this.items + '"',
|
|
234
|
+
tablename: '"' + this.tablename + '"',
|
|
235
|
+
orderitem: '"' + this.orderitem + '"'
|
|
236
|
+
}),
|
|
237
|
+
show: false,
|
|
238
|
+
asideTitle: '用户操作',
|
|
239
|
+
row: Object,
|
|
240
|
+
comp: null,
|
|
241
|
+
operationtypes: this.$appdata.getParam('操作类型') ? [{
|
|
242
|
+
label: '全部',
|
|
243
|
+
value: ''
|
|
244
|
+
}, ...this.$appdata.getParam('操作类型')] : [],
|
|
245
|
+
|
|
246
|
+
cancel_show: false,
|
|
247
|
+
cancel_data: null,
|
|
248
|
+
criteriaShow: false,
|
|
249
|
+
reissue_show: false,
|
|
250
|
+
reissue_data: null,
|
|
251
|
+
authArr: this.$login.r ? this.$login.r : []
|
|
252
|
+
}
|
|
253
|
+
},
|
|
254
|
+
props: {
|
|
255
|
+
sqlurl: {
|
|
256
|
+
type: String,
|
|
257
|
+
default: 'rs/sql/getRecord'
|
|
258
|
+
},
|
|
259
|
+
items: {
|
|
260
|
+
type: String,
|
|
261
|
+
default: '*'
|
|
262
|
+
},
|
|
263
|
+
tablename: {
|
|
264
|
+
type: String,
|
|
265
|
+
default: 't_record'
|
|
266
|
+
},
|
|
267
|
+
orderitem: {
|
|
268
|
+
type: String,
|
|
269
|
+
default: 'f_operate_date desc'
|
|
270
|
+
},
|
|
271
|
+
btns: {
|
|
272
|
+
type: Array
|
|
273
|
+
},
|
|
274
|
+
operationtype: {
|
|
275
|
+
type: String,
|
|
276
|
+
default: ''
|
|
277
|
+
},
|
|
278
|
+
userinfoid: {},
|
|
279
|
+
isOperate: {
|
|
280
|
+
type: Boolean,
|
|
281
|
+
default: true
|
|
282
|
+
},
|
|
283
|
+
f_orgid: ''
|
|
284
|
+
},
|
|
285
|
+
ready () {
|
|
286
|
+
this.$refs.paged.$refs.cri.model.f_operat_type = [this.operationtype]
|
|
287
|
+
asyncCardList(this)
|
|
288
|
+
// this.search()
|
|
289
|
+
},
|
|
290
|
+
methods: {
|
|
291
|
+
dateDes (date) {
|
|
292
|
+
return this.$login.dateDescripte(date)
|
|
293
|
+
},
|
|
294
|
+
selected (row) {
|
|
295
|
+
if (this.row === row) {
|
|
296
|
+
this.row = null
|
|
297
|
+
} else {
|
|
298
|
+
this.row = row
|
|
299
|
+
}
|
|
300
|
+
},
|
|
301
|
+
isSelected (row) {
|
|
302
|
+
return this.row === row
|
|
303
|
+
},
|
|
304
|
+
search () {
|
|
305
|
+
let condition = '1=1'
|
|
306
|
+
if (this.f_orgid) {
|
|
307
|
+
condition += `and (u.f_filialeid in ${this.f_orgid} or g.f_orgid in ${this.f_orgid}) `
|
|
308
|
+
} else {
|
|
309
|
+
condition += `and (u.f_filialeid = '${this.$login.f.orgid}' or g.f_orgid ='${this.$login.f.orgid}')`
|
|
310
|
+
}
|
|
311
|
+
this.$refs.pv.load(this.sqlurl, {data: {condition: condition}}).then((a) => {
|
|
312
|
+
if (a.data.length === 0) {
|
|
313
|
+
this.model.rows = []
|
|
314
|
+
this.model.state = '错误'
|
|
315
|
+
this.model.error = '没有符合条件的记录'
|
|
316
|
+
return
|
|
317
|
+
}
|
|
318
|
+
this.model.state = '正确'
|
|
319
|
+
this.model.rows = a.data
|
|
320
|
+
})
|
|
321
|
+
},
|
|
322
|
+
disEvent (btn) {
|
|
323
|
+
this.$dispatch(`${btn.eventName}`)
|
|
324
|
+
},
|
|
325
|
+
async operate (title, row) {
|
|
326
|
+
console.log('撤销的这条数据的信息', row)
|
|
327
|
+
if (title === '撤销') {
|
|
328
|
+
// 验证是否能撤销
|
|
329
|
+
let res = await this.$resetpost('rs/logic/recordRepealJudge', {data: row}, {
|
|
330
|
+
resolveMsg: null,
|
|
331
|
+
rejectMsg: '验证权限错误!!'
|
|
332
|
+
})
|
|
333
|
+
if (!res.data.pass) {
|
|
334
|
+
this.$showMessage(res.data.msg)
|
|
335
|
+
return
|
|
336
|
+
}
|
|
337
|
+
if (row.type === '卡表收费') {
|
|
338
|
+
if (!this.authArr.includes('无卡收费撤销权限')) {
|
|
339
|
+
this.$showAlert('当前用户没有【无卡收费撤销权限】,请联系管理员获取此权限后再进行该操作!', 'warning', 3000)
|
|
340
|
+
return
|
|
341
|
+
}
|
|
342
|
+
}
|
|
343
|
+
if (row.type === '物联网收费' || row.type === '卡表赠气' || row.type === '物联网赠费' || row.type === '卡表赠费' || row.type === '物联网赠气') {
|
|
344
|
+
let table_name = this.$appdata.getSingleValue('新抄表') ? 't_web_handplan' : 't_handplan'
|
|
345
|
+
let getWebHand = await this.$SqlService.singleTable(table_name, `f_hand_state = '有效' and f_input_date > '${row.f_operate_date}' and f_userfiles_id = '${row.f_userfiles_id}'`)
|
|
346
|
+
console.log('长度', getWebHand)
|
|
347
|
+
if (getWebHand.data.length > 0) {
|
|
348
|
+
this.$showAlert('此次物联网收费之后有结算,不能撤销此纪录', 'warning', 1500)
|
|
349
|
+
return
|
|
350
|
+
}
|
|
351
|
+
} else if (row.type === '机表收费') {
|
|
352
|
+
let getWebHand = await this.$SqlService.singleTable('t_handplan', `f_hand_state = '有效' and f_input_date > '${row.f_operate_date}' and f_whether_pay = '是' and f_userfiles_id = '${row.f_userfiles_id}'`)
|
|
353
|
+
|
|
354
|
+
console.log('长度', getWebHand)
|
|
355
|
+
if (getWebHand.data.length > 0) {
|
|
356
|
+
this.$showAlert('此次机表收费之后有自动下账,不能撤销此纪录', 'warning', 1500)
|
|
357
|
+
return
|
|
358
|
+
}
|
|
359
|
+
let sql = `select th.*from t_handplan th
|
|
360
|
+
left join t_sellinghand tsh on th.id=tsh.f_hand_id
|
|
361
|
+
where th.f_hand_state = '有效' and th.f_input_date > '${row.f_operate_date}' and tsh.f_debt_money>0
|
|
362
|
+
and th.f_userfiles_id = '${row.f_userfiles_id}' and tsh.f_state='有效'`
|
|
363
|
+
let getwate = await this.$resetpost('rs/logic/sqlquery', {data: {sql: sql}}, {
|
|
364
|
+
resolveMsg: null,
|
|
365
|
+
rejectMsg: '获取记录详情出错!!'
|
|
366
|
+
})
|
|
367
|
+
if (getwate.data.length > 0) {
|
|
368
|
+
this.$showAlert('此次机表收费之后有自动下账,不能撤销此纪录', 'warning', 1500)
|
|
369
|
+
return
|
|
370
|
+
}
|
|
371
|
+
}
|
|
372
|
+
if (this.authArr.includes('冲正权限')) {
|
|
373
|
+
if (this.config.cancleother) {
|
|
374
|
+
if (row.f_operator != this.$login.f.name) {
|
|
375
|
+
this.$showAlert('不能撤销不是自己进行的操作', 'warning', 1500)
|
|
376
|
+
return
|
|
377
|
+
}
|
|
378
|
+
}
|
|
379
|
+
if (this.config.cancletime && !this.$login.f.rolesnames.includes('管理员')) {
|
|
380
|
+
let a = this.$login.toStandardYearMonth()
|
|
381
|
+
console.log('当前时间', a < row.f_operate_date)
|
|
382
|
+
if (!this.authArr.includes('跨月撤销')) {
|
|
383
|
+
if (row.f_operate_date < a) {
|
|
384
|
+
this.$showAlert('不能撤销非本月的记录,请联系管理员获取【跨月撤销】的权限。', 'warning', 1500)
|
|
385
|
+
return
|
|
386
|
+
}
|
|
387
|
+
a = this.$login.toStandardDateString() + ' 00:00:00'
|
|
388
|
+
if (row.f_operate_date < a) {
|
|
389
|
+
this.$showAlert('不能撤销不是当天的操作', 'warning', 1500)
|
|
390
|
+
return
|
|
391
|
+
}
|
|
392
|
+
}
|
|
393
|
+
}
|
|
394
|
+
} else {
|
|
395
|
+
this.$showAlert('当前用户没有【冲正权限】', 'warning', 1500)
|
|
396
|
+
return
|
|
397
|
+
}
|
|
398
|
+
}
|
|
399
|
+
|
|
400
|
+
if (title === '撤销') {
|
|
401
|
+
this.cancel_show = true
|
|
402
|
+
this.cancel_data = row
|
|
403
|
+
} else {
|
|
404
|
+
let reprint = reprintGen(this, row, title)
|
|
405
|
+
return co(reprint)
|
|
406
|
+
}
|
|
407
|
+
},
|
|
408
|
+
cancelOper () {
|
|
409
|
+
this.cancel_data = null
|
|
410
|
+
this.cancel_show = false
|
|
411
|
+
},
|
|
412
|
+
cancelSucc () {
|
|
413
|
+
console.log('-----------------------------撤销成功了,隐藏掉')
|
|
414
|
+
this.cancel_show = false
|
|
415
|
+
this.$dispatch('refresh')
|
|
416
|
+
},
|
|
417
|
+
reissueOper () {
|
|
418
|
+
this.reissue_data = null
|
|
419
|
+
this.reissue_show = false
|
|
420
|
+
},
|
|
421
|
+
reissueSucc () {
|
|
422
|
+
this.reissue_show = false
|
|
423
|
+
this.$dispatch('refresh')
|
|
424
|
+
},
|
|
425
|
+
|
|
426
|
+
getBillUrl (row, title) {
|
|
427
|
+
let type = row.type
|
|
428
|
+
let name = ''
|
|
429
|
+
// 根据type数据 选择调用的Logic
|
|
430
|
+
if (type === '过户') {
|
|
431
|
+
name = 'rs/report/transfer_bill'
|
|
432
|
+
} else if (type === '换新表' || type === '气表清零') {
|
|
433
|
+
name = 'rs/report/change_meter'
|
|
434
|
+
} else if (type === '机表收费' || type === '机表收费撤销') {
|
|
435
|
+
if (row.f_user_type === '非民用' && this.$login.r.includes('非民用纸质票据拆分')) {
|
|
436
|
+
if (title === '热敏收据补打') {
|
|
437
|
+
name = 'rs/report/fmy_machine_bill_thermal'
|
|
438
|
+
} else {
|
|
439
|
+
name = 'rs/report/fmy_machine_bill'
|
|
440
|
+
}
|
|
441
|
+
} else {
|
|
442
|
+
if (title === '热敏收据补打') {
|
|
443
|
+
name = 'rs/report/machine_bill_thermal'
|
|
444
|
+
} else {
|
|
445
|
+
name = 'rs/report/machine_bill'
|
|
446
|
+
}
|
|
447
|
+
}
|
|
448
|
+
} else if (type === '物联网收费' || type === '物联网收费撤销' || type === '物联网开户') {
|
|
449
|
+
if (row.f_user_type === '非民用' && this.$login.r.includes('非民用纸质票据拆分')) {
|
|
450
|
+
if (title === '热敏收据补打') {
|
|
451
|
+
name = 'rs/report/fmy_iot_bill_thermal'
|
|
452
|
+
} else {
|
|
453
|
+
name = 'rs/report/fmy_iot_bill'
|
|
454
|
+
}
|
|
455
|
+
} else {
|
|
456
|
+
if (title === '热敏收据补打') {
|
|
457
|
+
name = 'rs/report/iot_bill_thermal'
|
|
458
|
+
} else {
|
|
459
|
+
name = 'rs/report/iot_bill'
|
|
460
|
+
}
|
|
461
|
+
}
|
|
462
|
+
} else if (type === '物联网补费' || type === '物联网扣费' || type === '物联网补气' || type === '物联网扣气' || type === '机表补费' || type === '机表扣费') {
|
|
463
|
+
name = 'rs/report/MakeUp'
|
|
464
|
+
} else if (type === '超用收费') {
|
|
465
|
+
if (title === '热敏收据补打') {
|
|
466
|
+
name = 'rs/report/overuse_bill_thermal'
|
|
467
|
+
} else {
|
|
468
|
+
name = 'rs/report/overuse_bill'
|
|
469
|
+
}
|
|
470
|
+
} else if (type === '其他收费' || type === '其他收费撤销') {
|
|
471
|
+
if (title === '热敏收据补打') {
|
|
472
|
+
name = 'rs/report/otherCharge_bill_thermal'
|
|
473
|
+
} else {
|
|
474
|
+
name = 'rs/report/otherCharge_bill'
|
|
475
|
+
}
|
|
476
|
+
} else if (type === '补卡') {
|
|
477
|
+
name = 'rs/report/replace_sell'
|
|
478
|
+
} else if (type === '发卡售气') {
|
|
479
|
+
if (row.f_user_type === '非民用' && this.$login.r.includes('非民用纸质票据拆分')) {
|
|
480
|
+
if (title === '热敏收据补打') {
|
|
481
|
+
name = 'rs/report/fmy_sendCard_bill_thermal'
|
|
482
|
+
} else {
|
|
483
|
+
name = 'rs/report/fmy_sendCard_bill'
|
|
484
|
+
}
|
|
485
|
+
} else {
|
|
486
|
+
if (row.f_meter_classify === '金额卡表' && this.$appdata.getSingleValue('金额气量区分卡表票据')) {
|
|
487
|
+
name = 'rs/report/fee_sendCard_bill'
|
|
488
|
+
} else {
|
|
489
|
+
if (title === '热敏收据补打') {
|
|
490
|
+
name = 'rs/report/sendCard_bill_thermal'
|
|
491
|
+
} else {
|
|
492
|
+
name = 'rs/report/sendCard_bill'
|
|
493
|
+
}
|
|
494
|
+
}
|
|
495
|
+
}
|
|
496
|
+
} else if (type === '卡表收费' || type === '卡表收费撤销' || type === '卡表收费撤销') {
|
|
497
|
+
if (row.f_user_type === '非民用' && this.$login.r.includes('非民用纸质票据拆分')) {
|
|
498
|
+
if (title === '热敏收据补打') {
|
|
499
|
+
name = 'rs/report/fmy_card_bill_thermal'
|
|
500
|
+
} else {
|
|
501
|
+
name = 'rs/report/fmy_card_bill'
|
|
502
|
+
}
|
|
503
|
+
} else {
|
|
504
|
+
if (row.f_meter_classify === '金额卡表' && this.$appdata.getSingleValue('金额气量区分卡表票据')) {
|
|
505
|
+
name = 'rs/report/fee_card_bill'
|
|
506
|
+
} else {
|
|
507
|
+
if (title === '热敏收据补打') {
|
|
508
|
+
name = 'rs/report/card_bill_thermal'
|
|
509
|
+
} else {
|
|
510
|
+
name = 'rs/report/card_bill'
|
|
511
|
+
}
|
|
512
|
+
}
|
|
513
|
+
}
|
|
514
|
+
} else if (type === '预存缴费') {
|
|
515
|
+
name = 'rs/report/pre_sell'
|
|
516
|
+
} else if (type === '调价预存') {
|
|
517
|
+
name = 'rs/report/refund_sell'
|
|
518
|
+
} else if (type === '退费') {
|
|
519
|
+
name = 'rs/report/refund_sell'
|
|
520
|
+
} else if (type === '调价补费') {
|
|
521
|
+
name = 'rs/report/compensation_bill'
|
|
522
|
+
} else if (type === '数码表收费') {
|
|
523
|
+
name = 'rs/report/digtial_bill'
|
|
524
|
+
} else if (type === '气损收费' || type === '气损收费撤销') {
|
|
525
|
+
name = 'rs/report/gasloss_bill'
|
|
526
|
+
} else if (type === '掉气补气') {
|
|
527
|
+
name = 'rs/report/acceptOffGasAddGas_bill'
|
|
528
|
+
} else if (type === '其他补气') {
|
|
529
|
+
name = 'rs/report/acceptOtherGas_bill'
|
|
530
|
+
} else if (type === '清零补气' || type === '换表补气' || type === '批量换表补气') {
|
|
531
|
+
if (row.f_meter_classify.indexOf('卡表') > -1) {
|
|
532
|
+
name = 'rs/report/card_gas_bill'
|
|
533
|
+
} else {
|
|
534
|
+
name = 'rs/report/iot_sell'
|
|
535
|
+
}
|
|
536
|
+
} else if (type === '垃圾费收费') {
|
|
537
|
+
name = 'rs/report/garbageChargeReport'
|
|
538
|
+
} else if (type === '物联网赠费') {
|
|
539
|
+
name = 'rs/report/iotGiftFee'
|
|
540
|
+
} else if (type === '物联网赠气') {
|
|
541
|
+
name = 'rs/report/iotGiftGas'
|
|
542
|
+
} else if (type === '卡表赠费') {
|
|
543
|
+
name = 'rs/report/icGiftFee'
|
|
544
|
+
} else if (type === '卡表赠气') {
|
|
545
|
+
name = 'rs/report/icGiftGas'
|
|
546
|
+
}
|
|
547
|
+
return name
|
|
548
|
+
},
|
|
549
|
+
// 撤销为统一操作,所以写到基础组件中
|
|
550
|
+
operateCancel (row) {
|
|
551
|
+
let cancel = cancelGen(this, row)
|
|
552
|
+
co(cancel)
|
|
553
|
+
},
|
|
554
|
+
selfSearch (args) {
|
|
555
|
+
// if (!this.$login.f.parent.parent.name.includes('统一资源管理')) {
|
|
556
|
+
// args.condition += `and f_filialeids = '${this.$login.f.f_orgids}'`
|
|
557
|
+
// }
|
|
558
|
+
if (this.f_orgid) {
|
|
559
|
+
args.condition += `and r.f_orgid in ${this.f_orgid}`
|
|
560
|
+
} else {
|
|
561
|
+
args.condition += `and r.f_orgid = '${this.$login.f.orgid}'`
|
|
562
|
+
}
|
|
563
|
+
if (this.authArr.includes('操作记录查询限定')) {
|
|
564
|
+
args.condition += ` and r.f_operatorid = '${this.$login.f.id}'`
|
|
565
|
+
}
|
|
566
|
+
this.model.search(args.condition, args.model)
|
|
567
|
+
}
|
|
568
|
+
},
|
|
569
|
+
watch: {
|
|
570
|
+
// 'userinfoid' (newVal) {
|
|
571
|
+
// this.model.rows={}
|
|
572
|
+
// if (newVal && newVal !== '') {
|
|
573
|
+
// this.$nextTick(function () {
|
|
574
|
+
// this.$refs.paged.$refs.cri.model.f_userinfo_code = newVal
|
|
575
|
+
// }.bind(this))
|
|
576
|
+
// }else{
|
|
577
|
+
// this.$nextTick(function () {
|
|
578
|
+
// this.$refs.paged.$refs.cri.model.f_userinfo_code = ""
|
|
579
|
+
// }.bind(this))
|
|
580
|
+
// }
|
|
581
|
+
// this.$refs.paged.$refs.cri.model.f_operat_type = ''
|
|
582
|
+
// }
|
|
583
|
+
'userinfoid' (newVal) {
|
|
584
|
+
if (newVal && newVal !== '') {
|
|
585
|
+
this.$nextTick(function () {
|
|
586
|
+
this.$refs.paged.$refs.cri.model.f_userinfo_code = newVal
|
|
587
|
+
}.bind(this))
|
|
588
|
+
this.$refs.paged.$refs.cri.model.f_operat_type = ''
|
|
589
|
+
let condition = `f_userinfo_code = '${newVal}' and u.f_filialeid = '${this.$login.f.orgid}'`
|
|
590
|
+
this.$refs.pv.load(this.sqlurl, {data: {condition: condition}}).then((a) => {
|
|
591
|
+
if (a.data.length === 0) {
|
|
592
|
+
this.model.rows = []
|
|
593
|
+
this.model.state = '错误'
|
|
594
|
+
this.model.error = '没有符合条件的记录'
|
|
595
|
+
return
|
|
596
|
+
}
|
|
597
|
+
this.model.state = '正确'
|
|
598
|
+
this.model.rows = a.data
|
|
599
|
+
})
|
|
600
|
+
} else {
|
|
601
|
+
this.model.rows = {}
|
|
602
|
+
this.$nextTick(function () {
|
|
603
|
+
this.$refs.paged.$refs.cri.model.f_userinfo_code = ''
|
|
604
|
+
}.bind(this))
|
|
605
|
+
}
|
|
606
|
+
}
|
|
607
|
+
}
|
|
608
|
+
}
|
|
609
|
+
</script>
|
|
@@ -0,0 +1,306 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<div class="auto">
|
|
3
|
+
<modal :show.sync="show" v-ref:modal large backdrop="false" style="overflow-y: auto !important;">
|
|
4
|
+
<header slot="modal-header" class="modal-header" style="text-align: center;">
|
|
5
|
+
<h4 class="modal-title">{{ data.type }}票据补打</h4>
|
|
6
|
+
</header>
|
|
7
|
+
<article slot="modal-body" class="modal-body">
|
|
8
|
+
<validator name='v'>
|
|
9
|
+
<form class="form-horizontal select-overspread">
|
|
10
|
+
<div class="row" style="display: flex;justify-content: center;" id='reissue-bill'>
|
|
11
|
+
{{{ bill.data }}}
|
|
12
|
+
</div>
|
|
13
|
+
<div class="row" v-if="config.hasBillManage">
|
|
14
|
+
<div v-if="!messShow">
|
|
15
|
+
<!--<span><strong>发票号:{{model.f_using_number}}</strong></span>-->
|
|
16
|
+
<div v-if="model.f_rprint_type === 'new'">
|
|
17
|
+
<div class="form-group form-input-group col-sm-4">
|
|
18
|
+
<label class="control-label col-sm-2">新票号:</label>
|
|
19
|
+
<div class="col-sm-2">
|
|
20
|
+
<input type="text" class="form-control col-sm-2" v-model="model.newNumber.number" readonly>
|
|
21
|
+
</div>
|
|
22
|
+
</div>
|
|
23
|
+
</div>
|
|
24
|
+
<div v-if="model.f_rprint_type === 'old'">
|
|
25
|
+
<div class="form-group form-input-group col-sm-4">
|
|
26
|
+
<label class="control-label col-sm-2">原票号:</label>
|
|
27
|
+
<div class="col-sm-2">
|
|
28
|
+
<input type="text" class="form-control col-sm-2" v-model="model.oldNumber.number" readonly>
|
|
29
|
+
</div>
|
|
30
|
+
</div>
|
|
31
|
+
</div>
|
|
32
|
+
|
|
33
|
+
</div>
|
|
34
|
+
</div>
|
|
35
|
+
<div class="row" v-if="config.hasBillManage" style="margin-top: 1%">
|
|
36
|
+
<div class="form-group form-input-group col-sm-4">
|
|
37
|
+
<label class="col-sm-2 control-label">补打类型:</label>
|
|
38
|
+
<div class="col-sm-2">
|
|
39
|
+
<v-select
|
|
40
|
+
v-model="model.f_rprint_type"
|
|
41
|
+
placeholder='请选择'
|
|
42
|
+
:value.sync="model.f_rprint_type"
|
|
43
|
+
:options='rprinttype'
|
|
44
|
+
:value-single="true"
|
|
45
|
+
:disabled="isOnlyNew"
|
|
46
|
+
@change="printTypeChane"
|
|
47
|
+
close-on-select clear-button>
|
|
48
|
+
</v-select>
|
|
49
|
+
</div>
|
|
50
|
+
</div>
|
|
51
|
+
<div v-if="isOnlyNew">
|
|
52
|
+
|
|
53
|
+
<div class="form-group form-input-group col-sm-4"
|
|
54
|
+
:class="[$v.billtype.required ? 'has-error' : 'has-success']">
|
|
55
|
+
<label class="col-sm-2 control-label">票据类型</label>
|
|
56
|
+
<div class="col-sm-2">
|
|
57
|
+
<v-select :value.sync="model.f_bill_type"
|
|
58
|
+
v-model="model.f_bill_type"
|
|
59
|
+
:options='printtypes'
|
|
60
|
+
placeholder='请选择'
|
|
61
|
+
v-model="model.f_bill_type"
|
|
62
|
+
@change="useTypeChange"
|
|
63
|
+
:value-single="true"
|
|
64
|
+
close-on-select v-ref:billtype>
|
|
65
|
+
</v-select>
|
|
66
|
+
<input type="text" v-show="false" v-model="$refs.billtype.selectedItems"
|
|
67
|
+
v-validate:billtype='{required: true }'>
|
|
68
|
+
</div>
|
|
69
|
+
</div>
|
|
70
|
+
|
|
71
|
+
<div class="form-group form-input-group col-sm-4" :class="[$v.usetype.required ? 'select-error' : '']">
|
|
72
|
+
<label class="col-sm-2 control-label">使用类型</label>
|
|
73
|
+
<div class="col-sm-2">
|
|
74
|
+
<v-select :value.sync="model.f_use_type"
|
|
75
|
+
v-model="model.f_use_type"
|
|
76
|
+
:options='usetypes'
|
|
77
|
+
placeholder='请选择'
|
|
78
|
+
@change="useTypeChange"
|
|
79
|
+
:value-single="true"
|
|
80
|
+
close-on-select v-ref:usetype>
|
|
81
|
+
</v-select>
|
|
82
|
+
<input type="text" v-show="false" v-model="$refs.usetype.selectedItems"
|
|
83
|
+
v-validate:usetype='{required: true }'>
|
|
84
|
+
</div>
|
|
85
|
+
</div>
|
|
86
|
+
|
|
87
|
+
</div>
|
|
88
|
+
|
|
89
|
+
|
|
90
|
+
</div>
|
|
91
|
+
<div class="row" style="margin-top: 1%">
|
|
92
|
+
<div class="form-group form-input-group col-sm-12">
|
|
93
|
+
<label for="f_cause" class=" col-sm-2 control-label">补打原因:</label>
|
|
94
|
+
<div class="col-sm-10">
|
|
95
|
+
<textarea class="form-control" v-model="model.f_cause" rows="1" placeholder="补打原因"></textarea>
|
|
96
|
+
</div>
|
|
97
|
+
</div>
|
|
98
|
+
</div>
|
|
99
|
+
</form>
|
|
100
|
+
</validator>
|
|
101
|
+
</article>
|
|
102
|
+
<footer slot="modal-footer" class="modal-footer">
|
|
103
|
+
<button type="button" class="btn btn-success" v-if="data.f_bill_style === '普通收据'" @click='print(true)' :disabled="!$v.valid">选择打印机打印</button>
|
|
104
|
+
<button type="button" class="btn btn-success" v-if="data.f_bill_style === '普通收据'" @click='print()' :disabled="!$v.valid">打印</button>
|
|
105
|
+
<report-print id='reissue-bill' top='5mm' left='5mm' width='90%' height='80%' :notrepeat="false" v-if="data.f_bill_style === '普通收据'"
|
|
106
|
+
:showbtn="false" v-ref:reportprint></report-print>
|
|
107
|
+
<report-print-thermal id='reissue-bill' top='5mm' left='5mm' width='90%' height='80%' :notrepeat="false"
|
|
108
|
+
v-if="data.f_bill_style === '热敏收据'" v-ref:reportprint></report-print-thermal>
|
|
109
|
+
<button class="btn btn-default" @click="clean()">取消</button>
|
|
110
|
+
</footer>
|
|
111
|
+
</modal>
|
|
112
|
+
</div>
|
|
113
|
+
</template>
|
|
114
|
+
<script>
|
|
115
|
+
/**
|
|
116
|
+
*票据补打
|
|
117
|
+
*/
|
|
118
|
+
|
|
119
|
+
import {DataModel} from 'vue-client'
|
|
120
|
+
import ReportPrintThermal from '../../components/revenue/Common/reportPrintThermal.vue'
|
|
121
|
+
|
|
122
|
+
let readyGen = async function (self) {
|
|
123
|
+
await self.$getConfig(self, 'ReissueBill')
|
|
124
|
+
console.log('补打业务config', self.config)
|
|
125
|
+
await getBillData(self)
|
|
126
|
+
}
|
|
127
|
+
|
|
128
|
+
let getBillGen = async function (self) {
|
|
129
|
+
// 判断发票管理是否启用
|
|
130
|
+
if (self.config.hasBillManage) {
|
|
131
|
+
if (self.model.f_rprint_type === 'old') {
|
|
132
|
+
await getOld(self)
|
|
133
|
+
} else {
|
|
134
|
+
await getNew(self)
|
|
135
|
+
}
|
|
136
|
+
}
|
|
137
|
+
}
|
|
138
|
+
|
|
139
|
+
let getOld = async function (self) {
|
|
140
|
+
let param = {
|
|
141
|
+
id: self.data.id,
|
|
142
|
+
type: self.data.type
|
|
143
|
+
}
|
|
144
|
+
let getOld = await self.$resetpost('rs/logic/sale_getOldBillNumber', param, {resolveMsg: null, rejectMsg: null})
|
|
145
|
+
console.log('获取原始票号', getOld)
|
|
146
|
+
// 验证原始票号是否存在
|
|
147
|
+
if (getOld.data.id && getOld.data.number) {
|
|
148
|
+
self.model.oldNumber.number = getOld.data.number
|
|
149
|
+
self.model.oldNumber.id = getOld.data.id
|
|
150
|
+
} else {
|
|
151
|
+
self.$showAlert('此次正常操作时没有出票,只能使用新票号进行补打', 'warning', 2000)
|
|
152
|
+
self.model.f_rprint_type = 'new'
|
|
153
|
+
self.isOnlyNew = true
|
|
154
|
+
}
|
|
155
|
+
}
|
|
156
|
+
|
|
157
|
+
let getNew = async function (self) {
|
|
158
|
+
// 获取原来收费记录使用的发票类型
|
|
159
|
+
let param = {
|
|
160
|
+
id: self.data.id,
|
|
161
|
+
type: self.data.type
|
|
162
|
+
}
|
|
163
|
+
let oldUseType = await self.$resetpost('rs/logic/sale_getOldUseType', param, {
|
|
164
|
+
resolveMsg: null,
|
|
165
|
+
rejectMsg: '获取原始票据信息出错!!'
|
|
166
|
+
})
|
|
167
|
+
console.log('获取原始票据信息。。。', oldUseType)
|
|
168
|
+
|
|
169
|
+
let newparam = {
|
|
170
|
+
f_bill_user: self.$login.f.name, // 票据使用人
|
|
171
|
+
f_filialeids: self.$login.f.orgid // 所属分公司
|
|
172
|
+
}
|
|
173
|
+
|
|
174
|
+
if (oldUseType.data.billtype && oldUseType.data.f_use_type) {
|
|
175
|
+
newparam.f_bill_type = oldUseType.data.billtype
|
|
176
|
+
newparam.f_use_type = oldUseType.data.f_use_type
|
|
177
|
+
} else {
|
|
178
|
+
if (self.model.f_use_type && self.model.f_bill_type) {
|
|
179
|
+
newparam.f_bill_type = self.model.f_bill_type
|
|
180
|
+
newparam.f_use_type = self.model.f_use_type
|
|
181
|
+
} else {
|
|
182
|
+
self.isOnlyNew = true
|
|
183
|
+
// self.model.f_bill_type = '普通收据'
|
|
184
|
+
self.$showAlert('请选择票据使用类型', 'warning', 2000)
|
|
185
|
+
return
|
|
186
|
+
}
|
|
187
|
+
}
|
|
188
|
+
let getNew
|
|
189
|
+
try {
|
|
190
|
+
getNew = await self.$resetpost('rs/logic/sale_getNewBillNumber', newparam, {resolveMsg: null, rejectMsg: null})
|
|
191
|
+
} catch (e) {
|
|
192
|
+
self.model.newNumber.number = ''
|
|
193
|
+
self.model.newNumber.id = ''
|
|
194
|
+
self.$showAlert('未获取到发票号', 'warning', 2000)
|
|
195
|
+
return
|
|
196
|
+
}
|
|
197
|
+
console.log('获取新票号', getNew)
|
|
198
|
+
self.model.newNumber.number = getNew.data.number
|
|
199
|
+
self.model.newNumber.id = getNew.data.id
|
|
200
|
+
}
|
|
201
|
+
|
|
202
|
+
/**
|
|
203
|
+
* ready执行过程
|
|
204
|
+
*/
|
|
205
|
+
let getBillData = async function (self) {
|
|
206
|
+
// 显示票据
|
|
207
|
+
self.bill = new DataModel(self.data.billUrl, {reprint: "'补打'", operator: `'${self.$login.f.name}'`})
|
|
208
|
+
await self.bill.search(self.data.id)
|
|
209
|
+
// self.bill.data = '我是补打发票'
|
|
210
|
+
await getBillGen(self)
|
|
211
|
+
}
|
|
212
|
+
|
|
213
|
+
export default {
|
|
214
|
+
components: {ReportPrintThermal},
|
|
215
|
+
title: '票据补打',
|
|
216
|
+
data () {
|
|
217
|
+
return {
|
|
218
|
+
config: {
|
|
219
|
+
hasBillManage: false // 默认不启用发票管理
|
|
220
|
+
},
|
|
221
|
+
bill: Object,
|
|
222
|
+
model: {
|
|
223
|
+
oldNumber: {
|
|
224
|
+
number: '',
|
|
225
|
+
id: ''
|
|
226
|
+
},
|
|
227
|
+
newNumber: {
|
|
228
|
+
number: '',
|
|
229
|
+
id: ''
|
|
230
|
+
},
|
|
231
|
+
f_end_number: null,
|
|
232
|
+
f_cause: null,
|
|
233
|
+
f_rprint_type: 'new'
|
|
234
|
+
},
|
|
235
|
+
messShow: false,
|
|
236
|
+
|
|
237
|
+
isOnlyNew: false,
|
|
238
|
+
rprinttype: [{label: '原票号补打', value: 'old'}, {label: '新票号补打', value: 'new'}],
|
|
239
|
+
usetypes: this.$appdata.getParam('发票使用类型'),
|
|
240
|
+
printtypes: this.$appdata.getParam('分配票据格式')
|
|
241
|
+
}
|
|
242
|
+
},
|
|
243
|
+
props: ['show', 'data', 'billUrl'],
|
|
244
|
+
ready () {
|
|
245
|
+
readyGen(this)
|
|
246
|
+
},
|
|
247
|
+
methods: {
|
|
248
|
+
printTypeChane () {
|
|
249
|
+
if (this.model.f_rprint_type === 'new') {
|
|
250
|
+
getNew(this)
|
|
251
|
+
} else {
|
|
252
|
+
getOld(this)
|
|
253
|
+
}
|
|
254
|
+
},
|
|
255
|
+
|
|
256
|
+
useTypeChange () {
|
|
257
|
+
if (this.model.f_rprint_type === 'new') {
|
|
258
|
+
getNew(this)
|
|
259
|
+
}
|
|
260
|
+
},
|
|
261
|
+
clean () {
|
|
262
|
+
this.$dispatch('cancel', '票据补打', this.row)
|
|
263
|
+
},
|
|
264
|
+
async print (select) {
|
|
265
|
+
if (this.config.hasBillManage && !this.model.newNumber.number) {
|
|
266
|
+
this.$showMessage('当前没有票号')
|
|
267
|
+
return
|
|
268
|
+
}
|
|
269
|
+
// 进行补打
|
|
270
|
+
try {
|
|
271
|
+
console.log('开具收据的参数:', this.data.id, this.data.f_bill_type)
|
|
272
|
+
if (this.config.hasBillManage) {
|
|
273
|
+
await this.$CommonService.reissuePaperBill(this.data.id, this.data.f_bill_type, this.model)
|
|
274
|
+
} else {
|
|
275
|
+
this.data.f_cause = this.model.f_cause
|
|
276
|
+
await this.$resetpost('rs/logic/sale_billReprint', {data: this.data}, {
|
|
277
|
+
resolveMsg: null,
|
|
278
|
+
rejectMsg: '票据补打出错!!'
|
|
279
|
+
})
|
|
280
|
+
}
|
|
281
|
+
console.log('开始打印、、', select)
|
|
282
|
+
if (select) {
|
|
283
|
+
this.$refs.reportprint.print(true)
|
|
284
|
+
} else {
|
|
285
|
+
this.$refs.reportprint.print()
|
|
286
|
+
}
|
|
287
|
+
} catch (error) {
|
|
288
|
+
this.$dispatch('refresh')
|
|
289
|
+
}
|
|
290
|
+
}
|
|
291
|
+
},
|
|
292
|
+
events: {
|
|
293
|
+
'print' () {
|
|
294
|
+
console.log('发送补打成功事件')
|
|
295
|
+
this.$dispatch('reissue-success')
|
|
296
|
+
},
|
|
297
|
+
'print-error' () {
|
|
298
|
+
this.$showAlert('打印失败,若有需要,请补打发票', 'error', 3)
|
|
299
|
+
this.$dispatch('error', '票据补打', this.data, null)
|
|
300
|
+
}
|
|
301
|
+
}
|
|
302
|
+
}
|
|
303
|
+
</script>
|
|
304
|
+
|
|
305
|
+
<style>
|
|
306
|
+
</style>
|
|
@@ -34,4 +34,6 @@ export default function () {
|
|
|
34
34
|
// 补费扣费
|
|
35
35
|
Vue.component('deduction-manage', (resolve) => { require(['./deductionManage'], resolve) })
|
|
36
36
|
Vue.component('user-info-detail-manage-new', (resolve) => { require(['./UserInfoDetailManageNew'], resolve) })
|
|
37
|
+
Vue.component('card-list', (resolve) => { require(['./CardList'], resolve) })
|
|
38
|
+
Vue.component('reissue-bill', (resolve) => { require(['./ReissueBill'], resolve) })
|
|
37
39
|
}
|