sale-client 3.6.541 → 3.6.543

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "sale-client",
3
- "version": "3.6.541",
3
+ "version": "3.6.543",
4
4
  "description": "收费模块前台组件",
5
5
  "main": "src/index.js",
6
6
  "scripts": {
@@ -5,7 +5,7 @@
5
5
  <div style="flex: 1.2">
6
6
  <criteria-paged :model="model" v-ref:paged @sort="sort">
7
7
  <criteria @condition-changed="$parent.selfSearch" partial='criteria' v-ref:criteria>
8
- <div class="form-horizontal select-overspread container-fluid auto" novalidate partial>
8
+ <div class="form-horizontal select-overspread container-fluid auto" novalidate partial @keyup.enter="search()">
9
9
  <div class="row">
10
10
 
11
11
  <div
@@ -665,6 +665,9 @@ let loadParamGem = async function (self) {
665
665
  loadParamGem(this)
666
666
  this.titleShow = this.$appdata.getSingleValue('是否显示筛选框') == null? true : this.$appdata.getSingleValue('是否显示筛选框')
667
667
  this.getAuthority()
668
+
669
+ // 添加回车键监听
670
+ document.addEventListener('keyup', this.handleKeyUp)
668
671
  },
669
672
  compiled () {
670
673
  window.onresize = () => {
@@ -674,6 +677,12 @@ let loadParamGem = async function (self) {
674
677
  }
675
678
  },
676
679
  methods: {
680
+ // 添加处理回车键的方法
681
+ handleKeyUp(e) {
682
+ if (e.key === 'Enter') {
683
+ this.search()
684
+ }
685
+ },
677
686
  getAuthority () {
678
687
  if (this.$login.r.find(value => value == '销户导入')) {
679
688
  this.bacthPin = '销户导入'
@@ -1071,6 +1080,10 @@ let loadParamGem = async function (self) {
1071
1080
  'confirmaddress' (res) {
1072
1081
  console.log('选定地址', res)
1073
1082
  }
1083
+ },
1084
+ beforeDestroy() {
1085
+ // 组件销毁前移除事件监听
1086
+ document.removeEventListener('keyup', this.handleKeyUp)
1074
1087
  }
1075
1088
  }
1076
1089
  </script>
@@ -137,30 +137,35 @@ export default {
137
137
  '<html lang="zh-CN">' +
138
138
  '<head>' +
139
139
  '<meta charset="utf-8">' +
140
+ '<meta http-equiv="X-UA-Compatible" content="IE=edge">' +
141
+ '<meta name="viewport" content="width=device-width, initial-scale=1.0">' +
140
142
  '<title>POS打印文档</title>' +
141
143
  '<style type="text/css">' +
142
- '@page { size: 58mm auto; margin: 0mm; }' +
143
- 'body { font-family: "Helvetica Neue", Helvetica, Arial, sans-serif; font-size: 7pt; font-weight: normal; margin: 0; padding: 0; width: 180px; max-width: 180px; overflow-x: hidden; color: #000; }' +
144
- 'table { width: 200px; max-width: 200px; border-collapse: collapse; border: none; table-layout: fixed; }' +
144
+ '@page { size: 58mm auto; margin: 0mm; padding: 0mm; }' +
145
+ 'body { font-family: SimSun, "宋体", "Helvetica Neue", Helvetica, Arial, sans-serif; font-size: 6.8pt; font-weight: 350; margin: 0; padding: 0; width: 180px; max-width: 180px; overflow-x: hidden; color: #000; }' +
146
+ 'table { width: 180px; max-width: 180px; border-collapse: collapse; border: none; table-layout: fixed; margin: 0 auto; }' +
145
147
  'table, tr, td { border: none; }' +
146
- 'td { padding: 0; margin: 0; word-wrap: break-word; word-break: break-all; overflow-wrap: break-word; font-weight: normal; }' +
147
- '.title { font-weight: bold; text-align: center; font-size: 9pt; }' +
148
- '.subtitle { font-weight: normal; text-align: center; font-size: 8pt; }' +
149
- '.fs9 { font-size: 5pt !important; }' +
150
- '.fs10 { font-size: 5.5pt !important; }' +
151
- '.fs11 { font-size: 6pt !important; }' +
152
- '.fs12 { font-size: 6.5pt !important; }' +
153
- '.fs13 { font-size: 7pt !important; }' +
154
- '.fs14 { font-size: 8pt !important; }' +
155
- '.fs15 { font-size: 8.5pt !important; }' +
156
- '.fs16 { font-size: 9pt !important; }' +
157
- '.fs17 { font-size: 9.5pt !important; }' +
158
- '.fs18 { font-size: 10pt !important; }' +
148
+ 'td { padding: 0 1px; margin: 0; word-wrap: normal; word-break: normal; overflow-wrap: normal; font-weight: 350; white-space: pre-wrap; line-break: anywhere; }' +
149
+ '* { text-align-last: auto; line-break: anywhere; word-wrap: normal; word-break: normal; }' +
150
+ '.title { font-weight: 500 !important; text-align: center !important; font-size: 8.5pt !important; letter-spacing: normal !important; }' +
151
+ '.subtitle { font-weight: 350 !important; text-align: center !important; font-size: 7.8pt !important; letter-spacing: normal !important; }' +
152
+ 'td.fs9, .fs9 { font-size: 5pt !important; font-weight: 350 !important; }' +
153
+ 'td.fs10, .fs10 { font-size: 5.5pt !important; font-weight: 350 !important; }' +
154
+ 'td.fs11, .fs11 { font-size: 6pt !important; font-weight: 350 !important; }' +
155
+ 'td.fs12, .fs12 { font-size: 6.5pt !important; font-weight: 350 !important; }' +
156
+ 'td.fs13, .fs13 { font-size: 6.8pt !important; font-weight: 350 !important; }' +
157
+ 'td.fs14, .fs14 { font-size: 7.3pt !important; font-weight: 350 !important; }' +
158
+ 'td.fs15, .fs15 { font-size: 7.8pt !important; font-weight: 350 !important; }' +
159
+ 'td.fs16, .fs16 { font-size: 8.3pt !important; font-weight: 350 !important; }' +
160
+ 'td.fs17, .fs17 { font-size: 8.8pt !important; font-weight: 350 !important; }' +
161
+ 'td.fs18, .fs18 { font-size: 9.3pt !important; font-weight: 350 !important; }' +
159
162
  '.tdleft { text-align: left !important; }' +
160
163
  '.tdright { text-align: right !important; }' +
161
164
  '.tdcenter { text-align: center !important; }' +
162
- '.b { font-weight: bold !important; }' +
165
+ '.b { font-weight: 500 !important; }' +
163
166
  '.noborder { border: none !important; }' +
167
+ '-webkit-print-color-adjust: exact !important;' +
168
+ 'print-color-adjust: exact !important;' +
164
169
  '</style>' +
165
170
  '</head>' +
166
171
  '<body>' +
@@ -222,12 +227,18 @@ export default {
222
227
  // 设置表格为固定布局,保留原始宽度
223
228
  tables[i].style.tableLayout = 'fixed'
224
229
 
225
- // 设置标准58mm POS打印机宽度(约190px
226
- tables[i].style.width = '200px'
227
- tables[i].style.maxWidth = '200px'
230
+ // 设置标准58mm POS打印机宽度(恢复为180px
231
+ tables[i].style.width = '180px'
232
+ tables[i].style.maxWidth = '180px'
233
+ tables[i].style.overflowWrap = 'normal'
234
+ tables[i].style.wordWrap = 'normal'
235
+ tables[i].style.wordBreak = 'normal'
236
+ tables[i].style.whiteSpace = 'pre-wrap'
237
+ tables[i].style.margin = '0 auto'
228
238
 
229
239
  tables[i].setAttribute('cellpadding', '0')
230
240
  tables[i].setAttribute('cellspacing', '0')
241
+ tables[i].setAttribute('border', '0')
231
242
 
232
243
  // 处理表头行,添加标题样式
233
244
  var firstRow = tables[i].rows[0]
@@ -254,24 +265,74 @@ export default {
254
265
  // 处理所有单元格,保持比例而不是固定宽度
255
266
  for (var r = 0; r < tables[i].rows.length; r++) {
256
267
  var row = tables[i].rows[r]
257
- row.style.lineHeight = '1'
258
268
 
259
269
  for (var c3 = 0; c3 < row.cells.length; c3++) {
260
270
  var cell = row.cells[c3]
261
271
 
262
- // 根据原始宽度计算比例
272
+ // 设置自动换行属性 - 使用内联样式确保在任何环境下都能生效
273
+ cell.style.wordWrap = 'normal'
274
+ cell.style.wordBreak = 'normal'
275
+ cell.style.overflowWrap = 'normal'
276
+ cell.style.whiteSpace = 'pre-wrap'
277
+ cell.style.letterSpacing = '0'
278
+ cell.style.padding = '0 1px'
279
+
280
+ // 修改处理中文内容的方法
281
+ var cellText = cell.textContent
282
+ if (cellText && cellText.length > 2) {
283
+ // 不再使用零宽空格方法,而是采用直接处理原始内容
284
+ // 确保每个中文字符作为一个整体
285
+ var processedContent = this.processChinese(cellText)
286
+
287
+ // 仅在没有HTML内容时应用文本替换
288
+ if (cell.innerHTML === cellText) {
289
+ cell.textContent = processedContent
290
+ }
291
+ }
292
+
293
+ // 根据原始宽度计算比例,但略微缩小以防止溢出
263
294
  if (cell.hasAttribute('width')) {
264
295
  var origWidth = parseInt(cell.getAttribute('width'))
265
- var ratio = (origWidth / 240) * 100 // 假设原始设计是240px宽
296
+ // 将宽度总值调整为180px
297
+ var ratio = (origWidth / 180) * 100
266
298
  cell.style.width = ratio + '%'
299
+ // 使用更保守的最大宽度计算以防止溢出
300
+ 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
+ }
267
314
  }
268
315
 
269
- // 减小单元格高度
316
+ // 减小单元格高度,但保证有足够高度显示多行内容
270
317
  if (cell.hasAttribute('height')) {
271
- cell.style.height = Math.max(parseInt(cell.getAttribute('height')) - 5, 12) + 'px'
318
+ // 需要判断内容长度,较长的内容需要更高的单元格
319
+ var contentLength = cell.textContent ? cell.textContent.length : 0
320
+ var minHeight = 12
321
+ var additionalHeight = 0
322
+
323
+ // 对于长内容,增加高度
324
+ if (contentLength > 10) {
325
+ var lineCount = Math.ceil(contentLength / 10) // 粗略估计每行10个字符
326
+ additionalHeight = (lineCount - 1) * 10 // 每增加一行增加10px
327
+ }
328
+
329
+ var originalHeight = parseInt(cell.getAttribute('height'))
330
+ var finalHeight = Math.max(originalHeight, minHeight + additionalHeight)
331
+ cell.style.height = finalHeight + 'px'
332
+ cell.style.minHeight = minHeight + 'px'
272
333
  }
273
334
 
274
- // 保留原始对齐方式
335
+ // 保留原始对齐方式 - 使用内联样式直接设置,确保生效
275
336
  if (cell.className.indexOf('tdcenter') !== -1) {
276
337
  cell.style.textAlign = 'center'
277
338
  } else if (cell.className.indexOf('tdright') !== -1) {
@@ -280,11 +341,16 @@ export default {
280
341
  cell.style.textAlign = 'left'
281
342
  }
282
343
 
283
- // 处理字体大小 - 使用直接设置样式的方式,确保样式生效
344
+ // 处理字体大小 - 添加内联CSS样式,确保在任何环境中都生效
284
345
  var classNames = cell.className.split(' ')
346
+ var hasFontSize = false
347
+ var fontSizeClass = ''
348
+
285
349
  for (var j = 0; j < classNames.length; j++) {
286
350
  var className = classNames[j]
287
351
  if (className.indexOf('fs') === 0) {
352
+ hasFontSize = true
353
+ fontSizeClass = className
288
354
  var sizeNum = parseInt(className.substring(2))
289
355
  if (!isNaN(sizeNum)) {
290
356
  // 根据fs类名映射到适当的pt大小
@@ -302,38 +368,65 @@ export default {
302
368
  cell.style.fontSize = '6.5pt'
303
369
  break
304
370
  case 13:
305
- cell.style.fontSize = '7pt'
371
+ cell.style.fontSize = '6.8pt'
306
372
  break
307
373
  case 14:
308
- cell.style.fontSize = '8pt'
374
+ cell.style.fontSize = '7.3pt'
309
375
  break
310
376
  case 15:
311
- cell.style.fontSize = '8.5pt'
377
+ cell.style.fontSize = '7.8pt'
312
378
  break
313
379
  case 16:
314
- cell.style.fontSize = '9pt'
380
+ cell.style.fontSize = '8.3pt'
315
381
  break
316
382
  case 17:
317
- cell.style.fontSize = '9.5pt'
383
+ cell.style.fontSize = '8.8pt'
318
384
  break
319
385
  case 18:
320
- cell.style.fontSize = '10pt'
386
+ cell.style.fontSize = '9.3pt'
321
387
  break
322
388
  default:
323
389
  if (sizeNum < 9) {
324
390
  cell.style.fontSize = '5pt'
325
391
  } else if (sizeNum > 18) {
326
- cell.style.fontSize = '10pt'
392
+ cell.style.fontSize = '9.3pt'
327
393
  }
328
394
  }
329
395
  }
330
396
  }
331
397
  }
332
398
 
333
- // 设置字体和字重
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
+
412
+ // 检查是否有粗体类
413
+ var isBold = cell.className.indexOf('b') !== -1
414
+
415
+ // 设置字体和字重 - 直接使用内联样式
334
416
  cell.style.fontFamily = '"Helvetica Neue", Helvetica, Arial, sans-serif'
335
- cell.style.fontWeight = cell.className.indexOf('b') !== -1 ? 'bold' : 'normal'
417
+ cell.style.fontWeight = isBold ? '500' : '350'
418
+ cell.style.color = '#000'
336
419
  cell.style.padding = '0 1px' // 添加一点点左右内边距,防止文字紧贴边缘
420
+
421
+ // 为每个单元格添加唯一标识符
422
+ var cellId = 'cell_' + i + '_' + r + '_' + c3
423
+ cell.id = cellId
424
+
425
+ // 为特定单元格创建样式规则,最高优先级
426
+ var style = document.createElement('style')
427
+ style.type = 'text/css'
428
+ style.innerHTML = '#' + cellId + ' { font-size: ' + cell.style.fontSize + ' !important; font-weight: ' + cell.style.fontWeight + ' !important; }'
429
+ tempDiv.appendChild(style)
337
430
  }
338
431
  }
339
432
  }
@@ -401,6 +494,62 @@ export default {
401
494
  }
402
495
  }
403
496
  console.log('表单数据刷新完成')
497
+ },
498
+
499
+ // 添加一个新的方法来处理中文字符,确保它们不被截断
500
+ processChinese (text) {
501
+ if (!text) return text
502
+
503
+ var result = ''
504
+ var inTag = false
505
+
506
+ // 处理字符串,保持HTML标签完整
507
+ for (var i = 0; i < text.length; i++) {
508
+ var char = text.charAt(i)
509
+
510
+ // 检查是否在HTML标签内
511
+ if (char === '<') {
512
+ inTag = true
513
+ }
514
+
515
+ // 添加当前字符
516
+ result += char
517
+
518
+ // 如果不在标签内,处理字符
519
+ if (!inTag && i < text.length - 1) {
520
+ var nextChar = text.charAt(i + 1)
521
+
522
+ // 检查当前字符是否是中文
523
+ var isCurrChinese = this.isChinese(char)
524
+
525
+ // 检查下一个字符是否是中文
526
+ var isNextChinese = this.isChinese(nextChar)
527
+
528
+ // 如果当前是中文并且下一个不是中文,或者当前不是中文但下一个是中文
529
+ // 在边界处添加特殊空格以提供可能的换行点
530
+ if ((isCurrChinese && !isNextChinese) || (!isCurrChinese && isNextChinese)) {
531
+ result += '\u200A' // 窄空格
532
+ }
533
+
534
+ // 每3个中文字符添加窄空格,增加换行机会
535
+ if (isCurrChinese && (i % 3 === 2)) {
536
+ result += '\u200A' // 窄空格
537
+ }
538
+ }
539
+
540
+ // 如果标签结束
541
+ if (char === '>') {
542
+ inTag = false
543
+ }
544
+ }
545
+
546
+ return result
547
+ },
548
+
549
+ // 检查字符是否是中文
550
+ isChinese (char) {
551
+ var code = char.charCodeAt(0)
552
+ return code >= 0x4E00 && code <= 0x9FFF
404
553
  }
405
554
  }
406
555
  }
@@ -605,7 +605,7 @@
605
605
  this.dainputtores = [{label: '全部', value: ''}]
606
606
  }
607
607
  },
608
- async inputtorchange () {
608
+ async inputtorchange () {
609
609
  let val = this.$refs.paged.$refs.cri.model.f_inputtor
610
610
  if (val != null && val != '') {
611
611
  let param = {
@@ -755,8 +755,6 @@
755
755
  if (this.$refs.paged.$refs.cri.model.startDate === '' || this.$refs.paged.$refs.cri.model.endDate === '') {
756
756
  this.$showAlert('请先选择开始时间、结束时间,再进行查询操作!', 'warning', 3000)
757
757
  } else {
758
- // 小区查询条件
759
- let f_orgstr = this.orgCondtionStr
760
758
  let str = '1=1 '
761
759
  if (this.$refs.paged.$refs.cri.model.inputstartDate !== '') {
762
760
  str += `and f_input_date>='${this.$refs.paged.$refs.cri.model.inputstartDate}'`
@@ -764,8 +762,12 @@
764
762
  if (this.$refs.paged.$refs.cri.model.inputendDate !== '') {
765
763
  str += `and f_input_date<='${this.$refs.paged.$refs.cri.model.inputendDate}'`
766
764
  }
767
- args.condition = `${args.condition} and f_meter_type='机表'` + f_orgstr
768
- this.orgCondtionStr = args.condition
765
+ // 构建基础 condition(不叠加旧值)
766
+ let baseCondition = '1=1 and f_meter_type=\'机表\''
767
+ if (this.orgCondtionStr) {
768
+ baseCondition += ` ${this.orgCondtionStr}`
769
+ }
770
+ args.condition = baseCondition
769
771
  this.model.search(args.condition, args.model, str)
770
772
  this.sumsmodel = this.$refs.paged.$refs.grid.model.sums
771
773
  }
@@ -176,7 +176,6 @@ let asyncReady = async function (self) {
176
176
  let getSafeCheckGen = async function (self) {
177
177
  // 获取安检信息
178
178
  try {
179
- let http = new HttpResetClass()
180
179
  let param = {
181
180
  f_userfiles_id: self.data.f_userfiles_id,
182
181
  f_userinfo_id: self.data.f_userinfo_id
@@ -184,7 +183,8 @@ let getSafeCheckGen = async function (self) {
184
183
  if (self.data.f_olduserinfo_code) {
185
184
  param.f_olduserinfo_code = self.data.f_olduserinfo_code
186
185
  }
187
- let getSafeCheck = await http.load('POST', 'rs/logic/getSafecheck', param, {resolveMsg: null, rejectMsg: null})
186
+ console.log(222222)
187
+ let getSafeCheck = await self.$resetpost('rs/logic/getSafecheck', param, {resolveMsg: null, rejectMsg: null, newly: true})
188
188
  if (!(JSON.stringify(getSafeCheck.data) == '{}')) {
189
189
  self.model = {}
190
190
  self.model = Object.assign({}, self.model, getSafeCheck.data)
@@ -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 = '普通收据'
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_voucher'
438
+ } else {
439
+ name = 'rs/report/fmy_machine_bill'
440
+ }
441
+ } else {
442
+ if (title === '收费凭证补打') {
443
+ name = 'rs/report/machine_bill_voucher'
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_voucher'
452
+ } else {
453
+ name = 'rs/report/fmy_iot_bill'
454
+ }
455
+ } else {
456
+ if (title === '收费凭证补打') {
457
+ name = 'rs/report/iot_bill_voucher'
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_voucher'
467
+ } else {
468
+ name = 'rs/report/overuse_bill'
469
+ }
470
+ } else if (type === '其他收费' || type === '其他收费撤销') {
471
+ if (title === '收费凭证补打') {
472
+ name = 'rs/report/otherCharge_bill_voucher'
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_voucher'
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_voucher'
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_voucher'
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_voucher'
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>
@@ -372,11 +372,16 @@ let initCardGen = async function (self) {
372
372
  if (self.config.hasPrint) {
373
373
  if (self.model.f_print.indexOf('电子发票') == -1) {
374
374
  if (self.$login.r.includes('非民用纸质票据拆分')) {
375
- if (self.row.f_user_type === '非民用') {
375
+ if (self.row.f_user_type === '非民用' && self.model.f_print[0] !== '收费凭证') {
376
376
  self.billData.url = 'rs/report/fmy_sendCard_bill'
377
+ } else if (self.row.f_user_type === '非民用' && self.model.f_print[0] === '收费凭证') {
378
+ self.billData.url = 'rs/report/fmy_sendCard_bill_voucher'
377
379
  }
378
380
  }
379
381
  if (self.config.hasBillManage) {
382
+ if (self.model.f_print[0] === '收费凭证' && self.row.f_user_type === '民用') {
383
+ self.billData.url = 'rs/report/sendCard_bill_voucher'
384
+ }
380
385
  // 启用发票管理,获取票据管理中的票号并存储记录 d
381
386
  self.row.id = res.data.id
382
387
  self.row.f_bill_type = '发卡售气'
@@ -160,4 +160,7 @@ export default function () {
160
160
  Vue.component('user-check-bill', (resolve) => {
161
161
  require(['./handAccount/UserCheckBill'], resolve)
162
162
  })
163
+ Vue.component('card-list', (resolve) => {
164
+ require(['./CardList'], resolve)
165
+ })
163
166
  }
@@ -5,7 +5,7 @@
5
5
  <div style="flex: 1.2">
6
6
  <criteria-paged :model="model" v-ref:paged @sort="sort">
7
7
  <criteria @condition-changed="$parent.selfSearch" partial='criteria' v-ref:criteria>
8
- <div class="form-horizontal select-overspread container-fluid auto" novalidate partial>
8
+ <div class="form-horizontal select-overspread container-fluid auto" novalidate partial @keyup.enter="search()">
9
9
  <div class="row">
10
10
 
11
11
  <div
@@ -599,6 +599,9 @@ let loadParamGem = async function (self) {
599
599
  loadParamGem(this)
600
600
  this.titleShow = this.$appdata.getSingleValue('是否显示筛选框') == null? true : this.$appdata.getSingleValue('是否显示筛选框')
601
601
  this.getAuthority()
602
+
603
+ // 添加回车键监听
604
+ document.addEventListener('keyup', this.handleKeyUp)
602
605
  },
603
606
  compiled () {
604
607
  window.onresize = () => {
@@ -608,6 +611,12 @@ let loadParamGem = async function (self) {
608
611
  }
609
612
  },
610
613
  methods: {
614
+ // 添加处理回车键的方法
615
+ handleKeyUp(e) {
616
+ if (e.key === 'Enter') {
617
+ this.search()
618
+ }
619
+ },
611
620
  getAuthority () {
612
621
  if (this.$login.r.find(value => value == '销户导入')) {
613
622
  this.bacthPin = '销户导入'
@@ -1008,6 +1017,10 @@ let loadParamGem = async function (self) {
1008
1017
  'confirmaddress' (res) {
1009
1018
  console.log('选定地址', res)
1010
1019
  }
1020
+ },
1021
+ beforeDestroy() {
1022
+ // 组件销毁前移除事件监听
1023
+ document.removeEventListener('keyup', this.handleKeyUp)
1011
1024
  }
1012
1025
  }
1013
1026
  </script>
@@ -24,10 +24,10 @@
24
24
  <label class=" font_normal_body">设备编号</label>
25
25
  <input type="text" class="input_search" style="width:60%" v-model="row.f_devices_no" placeholder='设备编号' v-next-el="{id: $index+'brand'}">
26
26
  </div>
27
- <!-- <div class="col-sm-6 form-group" style="padding-right: 5px;">-->
28
- <!-- <label class="font_normal_body">设备品牌</label>-->
29
- <!-- <input type="text" class="input_search" style="width:60%" v-model="row.f_brand" placeholder='设备品牌' v-next-el="{id: $index+'devicesmodel'}" :id="$index+'brand'">-->
30
- <!-- </div>-->
27
+ <!-- <div class="col-sm-6 form-group" style="padding-right: 5px;">-->
28
+ <!-- <label class="font_normal_body">设备品牌</label>-->
29
+ <!-- <input type="text" class="input_search" style="width:60%" v-model="row.f_brand" placeholder='设备品牌' v-next-el="{id: $index+'devicesmodel'}" :id="$index+'brand'">-->
30
+ <!-- </div>-->
31
31
  <div class="col-sm-6 form-group" style="padding-right: 5px;">
32
32
  <label class="font_normal_body">设备型号</label>
33
33
  <input type="text" class="input_search" style="width:60%" v-model="row.f_devices_model"
@@ -196,7 +196,7 @@ export default {
196
196
  }
197
197
  },
198
198
  alarmExpireDate (index) {
199
- if (this.devicesinfonew[index].f_firstcheck_date === '' || this.devicesinfonew[index].f_firstcheck_date === undefined) {
199
+ if (this.devicesinfonew[index].f_firstcheck_date === '' || this.devicesinfonew[index].f_firstcheck_date === undefined || this.devicesinfonew[index].f_firstcheck_date === null) {
200
200
  } else {
201
201
  let b = new Date(this.devicesinfonew[index].f_firstcheck_date)
202
202
  let year = (b.getFullYear() - 0) + 3
@@ -224,42 +224,20 @@ export default {
224
224
  rejectMsg: '删除设备失败'
225
225
  }).then((res) => {
226
226
  this.devicesinfonew.splice(index, 1)
227
- this.$nextTick(() => {
228
- this.changeDate()
229
- })
230
227
  })
231
228
  }
232
229
  })
233
230
  } else {
234
231
  this.devicesinfonew.splice(index, 1)
235
- this.$nextTick(() => {
236
- this.changeDate()
237
- })
238
232
  }
239
233
  },
240
234
  addDevice () {
241
235
  console.log('设备信息', this.devicesinfonew)
242
- const newDevice = {
236
+ this.devicesinfonew.push({
243
237
  f_devices_type: '调压器',
244
- f_input_date: this.$login.toStandardTimeString(),
245
- }
246
- this.devicesinfonew.push(newDevice)
247
- this.$nextTick(() => {
248
- this.changeDate()
238
+ f_input_date: this.$login.toStandardTimeString()
249
239
  })
250
240
  }
251
- },
252
- watch: {
253
- show_devices (newVal) {
254
- if (newVal) {
255
- // 弹窗打开时,自动为所有"切断阀"设备执行一次 expireDate
256
- this.devicesinfonew.forEach((row, index) => {
257
- if (row.f_devices_type === '切断阀') {
258
- this.expireDate(index)
259
- }
260
- })
261
- }
262
- }
263
241
  }
264
242
  }
265
243
  </script>
package/src/main.js CHANGED
@@ -2,7 +2,7 @@ import Vue from 'vue'
2
2
  import all from 'vue-client/src/all'
3
3
  import App from './App'
4
4
  import system from 'system-clients/src/system'
5
- import FilialeSale from './filiale/gehua/sale'
5
+ import FilialeSale from './filiale/bayan/sale'
6
6
  import sale from './sale'
7
7
  import address from 'address-client/src/address'
8
8
  import ldap from 'ldap-clients/src/ldap'