sale-client 4.4.2 → 4.4.4

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.
@@ -1,2 +1,2 @@
1
- #Thu Jun 11 15:18:23 CST 2026
1
+ #Tue Jun 30 11:38:07 CST 2026
2
2
  gradle.version=5.2.1
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "sale-client",
3
- "version": "4.4.2",
3
+ "version": "4.4.4",
4
4
  "description": "收费模块前台组件",
5
5
  "main": "src/index.js",
6
6
  "scripts": {
@@ -0,0 +1,396 @@
1
+ <template>
2
+ <div class="evaluation-panel">
3
+ <div class="status-bar">
4
+ <div class="status-item">
5
+ <span :class="['status-badge', deviceStatusClass]"></span>
6
+ <span>设备状态: {{ deviceStatusText }}</span>
7
+ </div>
8
+ <div class="status-item">
9
+ <span>评价状态: {{ evaluationStatus }}</span>
10
+ </div>
11
+ </div>
12
+ <div class="auto-process" v-if="autoProcessMessage">
13
+ <h4>评价器状态</h4>
14
+ <p>{{ autoProcessMessage }}</p>
15
+ </div>
16
+ <div class="section">
17
+ <button v-on:click="handleEvaluate" v-bind:disabled="loading">发起评价</button>
18
+ <button v-on:click="checkStatus" v-bind:disabled="loading">检查在线状态</button>
19
+ </div>
20
+ </div>
21
+ </template>
22
+
23
+ <script>
24
+ import co from "co";
25
+
26
+ module.exports = {
27
+ title: 'EvaluationPanel',
28
+ data () {
29
+ return {
30
+ signInParams: {
31
+ num: this.$login.f.id,
32
+ name: this.$login.f.name,
33
+ pos: this.$login.f.f_show_rolestr,
34
+ org: this.$login.f.f_show_department_name,
35
+ equ: this.$login.f.f_show_department_name,
36
+ star: '5',
37
+ inf: `工号:${this.$login.f.id}`,
38
+ photo: '127.0.0.1:8068/photo.jpg'
39
+ },
40
+ loading: false,
41
+ response: null,
42
+ error: null,
43
+ deviceOnline: false,
44
+ deviceCheckTimer: null,
45
+ deviceCheckInterval: 10000,
46
+ evaluationStatus: '未发起',
47
+ // 组件销毁标志和请求跟踪
48
+ isComponentDestroyed: false,
49
+ pendingRequests: new Set()
50
+ }
51
+ },
52
+ props: {
53
+ row: {
54
+ type: Object,
55
+ default: undefined
56
+ }
57
+ },
58
+ beforeDestroy() {
59
+ this.cleanup();
60
+ },
61
+ destroyed() {
62
+ this.cleanup();
63
+ },
64
+ async ready() {
65
+ console.log('row', this.row)
66
+ await this.initSystem()
67
+ this.startDeviceStatusMonitoring()
68
+ },
69
+ methods: {
70
+ // 统一的清理方法
71
+ cleanup() {
72
+ console.log('开始清理组件资源');
73
+ this.isComponentDestroyed = true;
74
+
75
+ // 清理所有定时器
76
+ this.stopDeviceStatusMonitoring();
77
+
78
+ // 取消所有进行中的请求
79
+ this.pendingRequests.clear();
80
+
81
+ // 重置状态
82
+ this.loading = false;
83
+ },
84
+
85
+ // 安全执行方法,检查组件状态
86
+ safeExecute(callback) {
87
+ if (this.isComponentDestroyed) {
88
+ console.log('组件已销毁,停止执行');
89
+ return false;
90
+ }
91
+ return true;
92
+ },
93
+
94
+ async initSystem () {
95
+ if (!this.safeExecute()) return;
96
+
97
+ console.log('检查设备状态')
98
+ await this.checkStatus()
99
+ if (!this.safeExecute()) return;
100
+
101
+ console.log('设备在线')
102
+ if (this.deviceOnline) {
103
+ console.log('设备已就绪,可以开始评价')
104
+ }
105
+ },
106
+
107
+ // 提交评价
108
+ async submitEvaluation(value) {
109
+ if (!this.safeExecute()) return;
110
+
111
+ this.evaluationStatus = '未发起'
112
+ console.log('用户评价值:', value)
113
+ let req = await this.$resetpost('api/af-revenue/logic/saveEvaluationBussiness', {
114
+ f_orgid: this.$login.f.orgid,
115
+ f_userinfo_id: this.row.f_userinfo_id,
116
+ f_operatorid: this.$login.f.id,
117
+ f_satisfaction: 5 - value,
118
+ f_user_type: this.row.f_user_type
119
+ }, {resolveMsg: '提交评价成功', rejectMsg: '提交评价失败!'})
120
+ this.$dispatch('success', '评价')
121
+ },
122
+
123
+ handleEvaluate () {
124
+ if (!this.safeExecute()) return;
125
+
126
+ let self = this;
127
+ self.loading = true;
128
+ self.error = null;
129
+ self.response = null;
130
+ self.evaluationStatus = '等待用户评价'
131
+
132
+ const requestId = 'evaluate_' + Date.now();
133
+ this.pendingRequests.add(requestId);
134
+
135
+ this.$CEVEvaluator.startEvaluateDirect()
136
+ .then(async function (result) {
137
+ if (!self.safeExecute() || !self.pendingRequests.has(requestId)) return;
138
+
139
+ self.response = JSON.stringify(result.data, null, 2);
140
+ if (result.data.code === '0') {
141
+ console.log('result.data.data', result.data.data)
142
+ self.evaluationStatus = '用户已评价'
143
+ let res = await self.$showMessage(`用户已评价,请提交`, ['confirm', 'cancel'])
144
+ if (res !== 'confirm') return
145
+ self.submitEvaluation(result.data.data)
146
+ }
147
+ })
148
+ .catch(function(err) {
149
+ if (!self.safeExecute() || !self.pendingRequests.has(requestId)) return;
150
+
151
+ self.error = err.message || '评价启动失败';
152
+ self.showCeAlert('用户评价失败: ' + (err.message || '未知错误'), 'error');
153
+ self.evaluationStatus = '未发起'
154
+ })
155
+ .finally(function() {
156
+ self.pendingRequests.delete(requestId);
157
+ if (self.safeExecute()) {
158
+ self.loading = false;
159
+ }
160
+ });
161
+ },
162
+
163
+ // 启动设备状态定时监测
164
+ startDeviceStatusMonitoring() {
165
+ if (!this.safeExecute()) return;
166
+
167
+ // 先停止可能存在的旧定时器
168
+ this.stopDeviceStatusMonitoring();
169
+
170
+ this.deviceCheckTimer = setInterval(async () => {
171
+ if (!this.safeExecute()) {
172
+ this.stopDeviceStatusMonitoring();
173
+ return;
174
+ }
175
+
176
+ await this.checkStatus();
177
+ if (!this.safeExecute()) return;
178
+
179
+ if (this.deviceOnline) {
180
+ console.log('设备在线,状态正常')
181
+ }
182
+ }, this.deviceCheckInterval);
183
+ },
184
+
185
+ // 停止设备状态监测
186
+ stopDeviceStatusMonitoring() {
187
+ if (this.deviceCheckTimer) {
188
+ clearInterval(this.deviceCheckTimer);
189
+ this.deviceCheckTimer = null;
190
+ }
191
+ },
192
+
193
+ checkStatus () {
194
+ if (!this.safeExecute()) return;
195
+
196
+ let self = this;
197
+ self.loading = true;
198
+ self.error = null;
199
+ self.response = null;
200
+
201
+ const requestId = 'checkStatus_' + Date.now();
202
+ this.pendingRequests.add(requestId);
203
+
204
+ return co(
205
+ this.$CEVEvaluator.checkOnline()
206
+ .then(function(result) {
207
+ if (!self.safeExecute() || !self.pendingRequests.has(requestId)) return;
208
+
209
+ self.response = JSON.stringify(result.data, null, 2);
210
+ if (result.data.code === '0' && result.data.online === '1') {
211
+ self.deviceOnline = true
212
+ } else {
213
+ self.deviceOnline = false
214
+ self.showCeAlert('状态检查完成', 'success');
215
+ }
216
+ })
217
+ .catch(function(err) {
218
+ if (!self.safeExecute() || !self.pendingRequests.has(requestId)) return;
219
+
220
+ self.error = err.message || '状态检查失败';
221
+ self.showCeAlert('状态检查失败', 'error');
222
+ })
223
+ .finally(function() {
224
+ self.pendingRequests.delete(requestId);
225
+ if (self.safeExecute()) {
226
+ self.loading = false;
227
+ }
228
+ })
229
+ )
230
+ },
231
+
232
+ showCeAlert (message, type) {
233
+ if (!this.safeExecute()) return;
234
+
235
+ if (type === 'error') {
236
+ console.error(message);
237
+ this.$showAlert(message, 'danger', 2000);
238
+ } else {
239
+ console.log(message);
240
+ this.$showAlert(message, 'success', 2000);
241
+ }
242
+ }
243
+ },
244
+ computed: {
245
+ deviceStatusClass() {
246
+ if (this.loading) return 'loading';
247
+ return this.deviceOnline ? 'online' : 'offline';
248
+ },
249
+ deviceStatusText() {
250
+ if (this.loading) return '检测中...';
251
+ return this.deviceOnline ? '在线' : '离线';
252
+ },
253
+ autoProcessMessage () {
254
+ if (!this.deviceOnline) return '系统启动中,正在检查设备状态...'
255
+ return this.deviceOnline ? '系统已就绪,可以开始评价' : '系统初始化失败,请检查设备连接'
256
+ }
257
+ },
258
+ };
259
+ </script>
260
+
261
+ <style scoped>
262
+ .section {
263
+ margin-bottom: 20px;
264
+ padding: 15px;
265
+ border: 1px solid #e0e0e0;
266
+ border-radius: 5px;
267
+ }
268
+
269
+ .section h3 {
270
+ margin-top: 0;
271
+ color: #333;
272
+ border-bottom: 1px solid #ddd;
273
+ padding-bottom: 8px;
274
+ }
275
+
276
+ .input-group {
277
+ margin-bottom: 10px;
278
+ display: flex;
279
+ align-items: center;
280
+ }
281
+
282
+ .input-group label {
283
+ display: inline-block;
284
+ width: 80px;
285
+ font-weight: bold;
286
+ margin-right: 10px;
287
+ }
288
+
289
+ .input-group input {
290
+ flex: 1;
291
+ padding: 8px;
292
+ border: 1px solid #ccc;
293
+ border-radius: 3px;
294
+ max-width: 300px;
295
+ }
296
+
297
+ button {
298
+ margin-right: 10px;
299
+ margin-bottom: 10px;
300
+ padding: 10px 15px;
301
+ background-color: #4CAF50;
302
+ color: white;
303
+ border: none;
304
+ border-radius: 4px;
305
+ cursor: pointer;
306
+ font-size: 14px;
307
+ }
308
+
309
+ button:disabled {
310
+ background-color: #cccccc;
311
+ cursor: not-allowed;
312
+ }
313
+
314
+ button:hover:not(:disabled) {
315
+ background-color: #45a049;
316
+ }
317
+
318
+ .response, .error {
319
+ margin-top: 20px;
320
+ padding: 15px;
321
+ border-radius: 5px;
322
+ font-size: 14px;
323
+ }
324
+
325
+ .response {
326
+ background-color: #f0f9f0;
327
+ border-left: 4px solid #4CAF50;
328
+ }
329
+
330
+ .error {
331
+ background-color: #fef0f0;
332
+ border-left: 4px solid #f56c6c;
333
+ }
334
+
335
+ pre {
336
+ white-space: pre-wrap;
337
+ word-wrap: break-word;
338
+ margin: 0;
339
+ font-family: 'Courier New', monospace;
340
+ font-size: 13px;
341
+ }
342
+
343
+ h2 {
344
+ text-align: center;
345
+ color: #333;
346
+ margin-bottom: 30px;
347
+ }
348
+ .auto-process {
349
+ background: #fff3cd;
350
+ border-left: 4px solid #ffc107;
351
+ padding: 10px 15px;
352
+ margin: 15px 0;
353
+ border-radius: 4px;
354
+ }
355
+
356
+ .auto-process h4 {
357
+ color: #856404;
358
+ margin-bottom: 5px;
359
+ }
360
+ .status-item {
361
+ display: flex;
362
+ align-items: center;
363
+ gap: 8px;
364
+ margin: 5px 0;
365
+ }
366
+
367
+ .status-badge {
368
+ display: inline-block;
369
+ width: 12px;
370
+ height: 12px;
371
+ border-radius: 50%;
372
+ margin-right: 5px;
373
+ }
374
+
375
+ .online {
376
+ background: #2ecc71;
377
+ }
378
+
379
+ .offline {
380
+ background: #e74c3c;
381
+ }
382
+
383
+ .loading {
384
+ background: #f39c12;
385
+ animation: pulse 1.5s infinite;
386
+ }
387
+ .timer-badge {
388
+ display: inline-block;
389
+ padding: 3px 8px;
390
+ border-radius: 12px;
391
+ background: #3498db;
392
+ color: white;
393
+ font-size: 12px;
394
+ margin-left: 8px;
395
+ }
396
+ </style>
@@ -407,7 +407,7 @@
407
407
  this.print = true
408
408
  }
409
409
  } else {
410
- this.$dispatch('success')
410
+ this.$dispatch('success', '其他补气')
411
411
  }
412
412
  },
413
413
  pregas () {
@@ -481,7 +481,7 @@
481
481
  this.$dispatch('cancelclean', this.row)
482
482
  },
483
483
  printok () {
484
- this.$dispatch('success')
484
+ this.$dispatch('success', '其他补气')
485
485
  }
486
486
  },
487
487
  events: {
@@ -298,7 +298,7 @@
298
298
  },
299
299
  eticket_toggle () {
300
300
  this.eticket_show = false
301
- this.$dispatch('success')
301
+ this.$dispatch('success', '补卡')
302
302
  },
303
303
  confirm () {
304
304
  this.eticket_msg = false
@@ -404,7 +404,7 @@
404
404
  },
405
405
  printok () {
406
406
  // 收据打完,判断是否还有其他票据进行请求 TODO
407
- this.$dispatch('success')
407
+ this.$dispatch('success', '补卡')
408
408
  },
409
409
  fillcardChange (val) {
410
410
  if (val === 'IC卡丢失或损坏') {
@@ -587,7 +587,7 @@ export default {
587
587
  if (msg == 'confirm') {
588
588
  this.$dispatch('get-new-row', this.row)
589
589
  } else {
590
- this.$dispatch('success')
590
+ this.$dispatch('success', '换表')
591
591
  }
592
592
  },
593
593
  flowmetermodels (label) {
@@ -616,7 +616,7 @@ export default {
616
616
  if (msg == 'confirm') {
617
617
  this.$dispatch('get-new-row', this.row)
618
618
  } else {
619
- this.$dispatch('success')
619
+ this.$dispatch('success', '换表')
620
620
  }
621
621
  },
622
622
  flowmetermodels (label) {
@@ -379,7 +379,7 @@
379
379
  }
380
380
  }
381
381
  } else {
382
- self.$dispatch('success')
382
+ self.$dispatch('success', '卡表收费')
383
383
  }
384
384
  self.clickConfirm = false
385
385
  } catch (error) {
@@ -728,7 +728,7 @@
728
728
  },
729
729
  eticket_toggle () {
730
730
  this.eticket_show = false
731
- this.$dispatch('success')
731
+ this.$dispatch('success','卡表收费')
732
732
  },
733
733
  clean () {
734
734
  this.$info('取消操作')
@@ -745,7 +745,7 @@
745
745
  this.$CommonService.openEticket(this.row.id, '售气收费')
746
746
  }
747
747
  }
748
- this.$dispatch('success')
748
+ this.$dispatch('success','卡表收费')
749
749
  },
750
750
  pregas () {
751
751
  this.dymoney = 0
@@ -6,16 +6,16 @@
6
6
  <div class="binary-right" style="width:68%;overflow-y: scroll" >
7
7
  <div :style="{height:(row?'auto':'100%')}">
8
8
  <!--<div class="auto" v-if="sustainMoney != null">-->
9
- <!--<h2 style="margin-top: 10px">当前连续收款金额: {{sustainMoney}}</h2>-->
9
+ <!--<h2 style="margin-top: 10px">当前连续收款金额: {{sustainMoney}}</h2>-->
10
10
  <!--</div>-->
11
11
  <div>
12
12
  <charge-list :row="row" @select-oper="showWork" @dblclick="toBusiness" @deal-msg="dealMsg"
13
13
  v-ref:list></charge-list>
14
14
 
15
15
  <div class="auto" style="margin-top: 1%;" v-if="row">
16
- <charge-oper :data.sync="row" :card-info="cardInfo"></charge-oper>
16
+ <charge-oper :data.sync="row" :card-info="cardInfo" v-ref:oper></charge-oper>
17
17
  </div>
18
- </div>
18
+ </div>
19
19
  </div>
20
20
  </div>
21
21
  <div class="binary-right" style="width:22%" >
@@ -46,195 +46,288 @@
46
46
  import {HttpResetClass} from 'vue-client'
47
47
 
48
48
  export default {
49
- title: '收费(综合)',
50
- components: { ChargeOper },
51
- data () {
52
- return {
53
- sustainMoney: null,
54
- // 页面开关
55
- listpage: true,
56
- f_orgid: '',
57
- row: null,
58
- cardInfo: null,
59
- warningInfo: null,
60
- modalrow: null,
61
- showModal: false,
62
- rowData: {},
63
- dibao_remind: this.$appdata.getSingleValue('低保快到期提醒') ? this.$appdata.getSingleValue('低保快到期提醒') : 0,
64
- show: [true],
65
- selectFiled: '其他信息',
66
- worktype: '其他信息'
67
- }
49
+ title: '收费(综合)',
50
+ components: {ChargeOper},
51
+ data() {
52
+ return {
53
+ sustainMoney: null,
54
+ // 页面开关
55
+ listpage: true,
56
+ f_orgid: '',
57
+ row: null,
58
+ cardInfo: null,
59
+ warningInfo: null,
60
+ modalrow: null,
61
+ showModal: false,
62
+ rowData: {},
63
+ dibao_remind: this.$appdata.getSingleValue('低保快到期提醒') ? this.$appdata.getSingleValue('低保快到期提醒') : 0,
64
+ clear_state: this.$appdata.getSingleValue('业务完成是否自动清条件') ? this.$appdata.getSingleValue('业务完成是否自动清条件') : '是',
65
+ reSearchShowMsy: !!this.$appdata.getSingleValue('收费后验证'),
66
+ reSearchShowBusiness: !!this.$appdata.getSingleValue('业务完成重新加载'),
67
+ shouldNavigateToEvaluation: false, // 标记是否应该导航到评价页面
68
+ activeBusiness: null, // 当前激活的业务
69
+ show: [true],
70
+ selectFiled: '其他信息',
71
+ worktype: '其他信息',
72
+ searchTime: 1000,
73
+ interval: null
74
+ }
75
+ },
76
+ ready() {
77
+ this.setsustainMoney()
78
+ },
79
+ methods: {
80
+ setsustainMoney() {
81
+ this.sustainMoney = window.localStorage.getItem('sustainMoney')
68
82
  },
69
- ready () {
70
- this.setsustainMoney()
83
+ setField(type) {
84
+ this.selectFiled = type
85
+ this.worktype = type
71
86
  },
72
- methods: {
73
- setsustainMoney () {
74
- this.sustainMoney = window.localStorage.getItem('sustainMoney')
75
- },
76
- setField (type) {
77
- this.selectFiled = type
78
- this.worktype = type
79
- },
80
- async toBusiness (obj) {
81
- console.log('双击列表的时候传进来的数据:', obj)
82
- if (!(obj instanceof Event)) {
87
+ async toBusiness(obj) {
88
+ console.log('双击列表的时候传进来的数据:', obj)
89
+ if (!(obj instanceof Event)) {
83
90
  // 对此数据进行验证
84
- if (await this.validateRow(obj)) {
91
+ if (await this.validateRow(obj)) {
92
+ this.shouldNavigateToEvaluation = false
85
93
  // 获取未写卡或者写卡失败记录
86
- let getUnWriteSell = await this.$SqlService.singleTable('t_sellinggas', `f_state = '有效' and (f_write_card = '未写卡' or (f_write_card = '写卡失败' and f_operate_date >= DATEADD(HOUR, -3, GETDATE()))) and f_userfiles_id = '${obj.f_userfiles_id}'`)
87
- console.log('获取未写卡记录', getUnWriteSell)
88
- if (getUnWriteSell.data.length > 1) {
89
- this.$showAlert('此卡已缴费多次未写卡。请核实后处理!!', 'warning', 5000)
90
- } else {
91
- this.row = obj
92
- this.row.unWriteSell = getUnWriteSell.data
93
- this.cardInfo = this.$refs.list.cardInfo
94
- this.$refs.list.criteriaShow = false
94
+ let getUnWriteSell = await this.$SqlService.singleTable('t_sellinggas', `f_state = '有效' and (f_write_card = '未写卡' or (f_write_card = '写卡失败' and f_operate_date >= DATEADD(HOUR, -3, GETDATE()))) and f_userfiles_id = '${obj.f_userfiles_id}'`)
95
+ console.log('获取未写卡记录', getUnWriteSell)
96
+ if (getUnWriteSell.data.length > 1) {
97
+ this.$showAlert('此卡已缴费多次未写卡。请核实后处理!!', 'warning', 5000)
98
+ } else {
99
+ this.row = obj
100
+ this.shouldNavigateToEvaluation = false
101
+ this.row.unWriteSell = getUnWriteSell.data
102
+ this.cardInfo = this.$refs.list.cardInfo
103
+ this.$refs.list.criteriaShow = false
95
104
  // 将列表只显示该条数据
96
- this.$refs.list.refreshRow(obj)
97
- }
105
+ this.$refs.list.refreshRow(obj)
98
106
  }
99
107
  }
100
- },
101
- close () {
102
- this.showModal = false
103
- this.warningInfo = null
104
- this.clean()
105
- this.$refs.list.search()
106
- // this.$refs.card.search()
107
- },
108
- async validateRow (obj) {
109
- console.log('查看传进来的参数:', obj)
110
- this.warningInfo = await this.$resetpost('api/af-revenue/logic/getWarningMsg',
111
- {data: {
108
+ }
109
+ },
110
+ close() {
111
+ this.showModal = false
112
+ this.warningInfo = null
113
+ this.clean()
114
+ this.$refs.list.search()
115
+ // this.$refs.card.search()
116
+ },
117
+ async validateRow(obj) {
118
+ console.log('查看传进来的参数:', obj)
119
+ this.warningInfo = await this.$resetpost('api/af-revenue/logic/getWarningMsg',
120
+ {
121
+ data: {
112
122
  f_userfiles_id: obj.f_userfiles_id,
113
123
  f_userinfo_code: obj.f_userinfo_code,
114
124
  f_userinfo_id: obj.f_userinfo_id
115
125
  }
116
- }
117
- , {resolveMsg: '', rejectMsg: '获取提示失败'})
118
- if (this.warningInfo.data.warningNum > 0 && obj.f_user_state !== '预备') {
119
- this.modalrow = obj
120
- this.showModal = true
121
- return false
122
- } else {
123
- return true
124
126
  }
125
- },
126
- clean () {
127
- this.row = null
128
- this.cardInfo = null
129
- },
130
- clearCondition () {
131
- Object.keys(this.$refs.list.$refs.paged.$refs.cri.model).forEach((key) => {
132
- this.$refs.list.$refs.paged.$refs.cri.model[key] = ''
133
- })
134
- // console.log('清数据。。。', this.$refs.list.$refs.paged.$refs.grid.model.rows)
135
- // this.$set('$refs.list.$refs.paged.$refs.grid.model.rows', [])
136
- },
137
- dealMsg (obj) {
138
- console.log('==================obj', obj)
139
- this.listpage = false
140
- this.rowData = obj
141
- },
142
- cancel (obj) {
143
- this.listpage = true
144
- },
145
- modalsuccess (obj) {
146
- this.showModal = false
147
- this.$refs.list.criteriaShow = false
148
- this.row = obj
149
- this.cardInfo = this.$refs.list.cardInfo
150
- // 将列表只显示该条数据
151
- this.$refs.list.refreshRow(obj)
152
- },
153
- async serRow (obj) {
154
- let newdata = await this.$resetpost('api/af-revenue/sql/sale_getUser', {
155
- data: {condition: `i.f_userinfo_code='${obj.f_userinfo_code}' and u.f_filialeid = '${obj.f_filialeid}'`, orderitem: `f_userinfo_id Desc`}
156
- }, {resolveMsg: null, rejectMsg: '获取用户信息失败'})
157
- this.toBusiness(newdata.data[0])
158
- // this.$refs.list.search()
127
+ , {resolveMsg: '', rejectMsg: '获取提示失败'})
128
+ if (this.warningInfo.data.warningNum > 0 && obj.f_user_state !== '预备') {
129
+ this.modalrow = obj
130
+ this.showModal = true
131
+ return false
132
+ } else {
133
+ return true
159
134
  }
160
135
  },
161
- events: {
162
- 'error' (name, row, res) {
163
- this.clean()
164
- },
165
- 'row' (val) {
136
+ clean() {
137
+ this.row = null
138
+ this.cardInfo = null
139
+ },
140
+ clearCondition() {
141
+ Object.keys(this.$refs.list.$refs.paged.$refs.cri.model).forEach((key) => {
142
+ console.log('key', key)
143
+ console.log('对应啥数据', this.$refs.list.$refs.paged.$refs.cri.model[key])
144
+ this.$refs.list.$refs.paged.$refs.cri.model[key] = []
145
+ })
146
+ // console.log('清数据。。。', this.$refs.list.$refs.paged.$refs.grid.model.rows)
147
+ // this.$set('$refs.list.$refs.paged.$refs.grid.model.rows', [])
148
+ },
149
+ dealMsg(obj) {
150
+ console.log('==================obj', obj)
151
+ this.listpage = false
152
+ this.rowData = obj
153
+ },
154
+ cancel(obj) {
155
+ this.listpage = true
156
+ },
157
+ cancelAndRefresh(obj) {
158
+ this.listpage = true
159
+ this.clean()
160
+ this.clearCondition()
161
+ this.$refs.list.searchNoData()
162
+ this.$refs.card.search()
163
+ },
164
+ async modalsuccess(obj) {
165
+ this.showModal = false
166
+ this.$refs.list.criteriaShow = false
167
+ this.row = obj
168
+ this.cardInfo = this.$refs.list.cardInfo
169
+ // 将列表只显示该条数据
170
+ await this.$refs.list.refreshRow(obj)
171
+ // 如果应该导航到评价页面,则执行评价业务
172
+ if (this.shouldNavigateToEvaluation && this.$refs.oper) {
173
+ this.activeBusiness = '评价'
174
+ this.$nextTick(() => {
175
+ this.$refs.oper.business({name: '评价', value: {routeName: 'service-evaluation'}})
176
+ // 执行完后清除标志
177
+ this.shouldNavigateToEvaluation = false;
178
+ }, 100)
179
+ } else {
180
+ // 清除标志(普通业务场景)
181
+ this.shouldNavigateToEvaluation = false;
182
+ }
183
+ console.log('this.row', this.row)
184
+ },
185
+ // 监听业务切换
186
+ onBusinessChange(businessName) {
187
+ this.activeBusiness = businessName
188
+ },
189
+ async serRow(obj, evaluationFlag = false) {
190
+ // 设置标志
191
+ this.shouldNavigateToEvaluation = evaluationFlag;
166
192
 
167
- },
168
- 'success' (name, row, res) {
169
- this.setsustainMoney()
170
- // name === '发卡售气' ? this.$refs.list.toNext(this.index) : null
171
- if (name === '机表收费确认') {
172
- this.serRow(row)
173
- return
174
- }
175
- console.log('成功事件')
176
- this.clean()
177
- this.$refs.list.search()
178
- // this.clearCondition()
179
- // this.$refs.card.search()
180
- // this.$refs.info.$refs.recordstoryinfo.getdata()
181
- },
182
- 'clean' (row) {
183
- // this.$refs.list.singleRefresh(row)
184
- this.clean()
185
- },
186
- 'refresh' () {
187
- this.setsustainMoney()
188
- this.clean()
189
- this.clearCondition()
190
- this.$refs.list.searchNoData()
191
- this.$refs.card.search()
192
- },
193
- 'resflushvalue' () {
194
- this.$refs.info.$refs.valueaddinfo.reflush()
195
- },
196
- 'refreshrow' (val) {
197
- console.log(val)
198
- this.row = val
199
- this.$refs.list.refreshRow(val)
200
- // this.$refs.card.search()
201
- },
202
- 'cancelclean' (row) {
203
- this.clean()
204
- this.$refs.list.searchNoData()
205
- // this.$refs.card.search()
193
+ let newdata = await this.$resetpost('api/af-revenue/sql/sale_getUser', {
194
+ data: {
195
+ condition: `i.f_userinfo_code='${obj.f_userinfo_code}' and u.f_filialeid = '${obj.f_filialeid}'`,
196
+ orderitem: `f_userinfo_id Desc`
206
197
  }
198
+ }, {resolveMsg: null, rejectMsg: '获取用户信息失败'})
199
+ await this.toBusiness(newdata.data[0])
200
+ if (evaluationFlag) {
201
+ this.$refs.oper.business({name: '评价', value: {routeName: 'service-evaluation'}})
202
+ }
203
+ },
204
+ hasEvaluatePermission(name) {
205
+ if (!this.$login.r || !Array.isArray(this.$login.r)) {
206
+ console.warn('权限列表不存在或不是数组')
207
+ return false
208
+ }
209
+ const permissionName = `${name}评价权限`
210
+ return this.$login.r.includes(permissionName)
211
+ }
212
+ },
213
+ events: {
214
+ 'error' (name, row, res) {
215
+ this.clean()
207
216
  },
208
- watch: {
209
- 'row' () {
210
- // this.$refs.tab.$el.click()
217
+ 'row' (val) {
218
+
219
+ },
220
+
221
+ 'success' (name, row, res) {
222
+ this.setsustainMoney()
223
+ // name === '发卡售气' ? this.$refs.list.toNext(this.index) : null
224
+ if (name === '机表收费确认') {
225
+ this.serRow(row)
226
+ return
227
+ }
228
+ if (name === '卡表收费' && this.reSearchShowMsy) {
229
+ this.$refs.list.$refs.paged.$refs.cri.$refs.readcard.readCard()
230
+ this.$refs.oper.noButton = false
231
+ return
232
+ }
233
+ if (name === '物联网收费' && this.reSearchShowMsy) {
234
+ this.serRow(row)
235
+ return
236
+ }
237
+ if (this.hasEvaluatePermission(name) && this.reSearchShowBusiness) {
238
+ console.log('row', row)
239
+ this.$refs.oper.noButton = false
240
+ this.$showMessage('要进行业务评价吗?', ['confirm', 'cancel']).then((res) => {
241
+ if(res !== 'confirm') {
242
+ if (row) {
243
+ this.serRow(row)
244
+ this.activeBusiness = null
245
+ } else {
246
+ this.serRow(this.row)
247
+ }
248
+ return
249
+ } else {
250
+ if (row) {
251
+ this.serRow(row,true)
252
+ } else {
253
+ this.serRow(this.row,true)
254
+ }
255
+ }
256
+ })
257
+ return
258
+ }
259
+ console.log('成功事件')
260
+ this.clean()
261
+ if (this.clear_state === '是') {
262
+ this.clearCondition()
211
263
  }
264
+ this.$refs.list.search()
265
+ // this.clearCondition()
266
+ // this.$refs.card.search()
267
+ // this.$refs.info.$refs.recordstoryinfo.getdata()
268
+ },
269
+ 'clean' (row) {
270
+ // this.$refs.list.singleRefresh(row)
271
+ this.clean()
272
+ },
273
+ 'refresh' () {
274
+ this.setsustainMoney()
275
+ this.clean()
276
+ this.clearCondition()
277
+ this.$refs.list.searchNoData()
278
+ this.$refs.card.search()
279
+ },
280
+ 'resflushvalue' () {
281
+ this.$refs.info.$refs.valueaddinfo.reflush()
282
+ },
283
+ 'resflushrowdata' () {
284
+ this.toBusiness(this.row)
285
+ },
286
+ 'resflushdata' (data) {
287
+ this.toBusiness(data)
288
+ },
289
+ 'refreshrow' (val) {
290
+ console.log(val)
291
+ this.row = val
292
+ this.$refs.list.refreshRow(val)
293
+ // this.$refs.card.search()
294
+ },
295
+ 'cancelclean' (row) {
296
+ this.clean()
297
+ this.$refs.list.searchNoData()
298
+ // this.$refs.card.search()
299
+ }
300
+ },
301
+ watch: {
302
+ 'row' () {
303
+ // this.$refs.tab.$el.click()
212
304
  }
213
305
  }
306
+ }
214
307
  </script>
215
308
  <style>
216
- .basic-main {
217
- width: 79%;
218
- }
219
- .tel_voiceActive{
220
- font-family: PingFang-SC-Bold;
221
- font-size: 16px;
222
- font-weight: normal!important;
223
- font-stretch: normal!important;
224
- line-height: 18px;
225
- letter-spacing: 0px;
226
- color: #333333!important;
227
- border-bottom: 3px solid #599fe5;
228
- padding:10px 10px!important;
229
- }
230
- .tel_f_size{
231
- font-family: PingFang-SC-Medium;
232
- font-size: 16px;
233
- font-weight: normal;
234
- font-stretch: normal;
235
- line-height: 18px;
236
- letter-spacing: 0px;
237
- color: #666666!important;
238
- padding:10px 10px!important;
239
- }
309
+ .basic-main {
310
+ width: 79%;
311
+ }
312
+ .tel_voiceActive{
313
+ font-family: PingFang-SC-Bold;
314
+ font-size: 16px;
315
+ font-weight: normal!important;
316
+ font-stretch: normal!important;
317
+ line-height: 18px;
318
+ letter-spacing: 0px;
319
+ color: #333333!important;
320
+ border-bottom: 3px solid #599fe5;
321
+ padding:10px 10px!important;
322
+ }
323
+ .tel_f_size{
324
+ font-family: PingFang-SC-Medium;
325
+ font-size: 16px;
326
+ font-weight: normal;
327
+ font-stretch: normal;
328
+ line-height: 18px;
329
+ letter-spacing: 0px;
330
+ color: #666666!important;
331
+ padding:10px 10px!important;
332
+ }
240
333
  </style>
@@ -44,7 +44,7 @@
44
44
  })
45
45
  let getBtns = res.data
46
46
  console.log('获取的业务按钮', getBtns)
47
- console.log('有没有用户信息', self.data)
47
+ console.log('有没有用户信息', self.$login.r)
48
48
  if (self.$login.r.length === 0) {
49
49
  self.$showAlert('您没有相关的业务操作权限, 请联系管理员!!', 'warning', 2000)
50
50
  } else {
@@ -175,6 +175,7 @@
175
175
  },
176
176
  methods: {
177
177
  business (btn) {
178
+ this.$dispatch('business-changed', btn.name)
178
179
  // // 处理按钮样式
179
180
  // this.styleChange(btn.name)
180
181
  // this.isBusiness = true
@@ -218,7 +219,16 @@
218
219
  },
219
220
  watch: {
220
221
  'data' () {
221
- getBtnsGen(this)
222
+ getBtnsGen(this).then(() => {
223
+ if (this.$parent.activeBusiness) {
224
+ const targetBtn = this.operBtns.find(btn => btn.name === this.$parent.activeBusiness)
225
+ if (targetBtn) {
226
+ this.$nextTick(() => {
227
+ this.business(targetBtn)
228
+ })
229
+ }
230
+ }
231
+ })
222
232
  }
223
233
  },
224
234
  events: {
@@ -167,20 +167,20 @@ export default {
167
167
  }
168
168
  } else if (this.config.printType === '国税发票') {
169
169
  // TODO
170
- this.$dispatch('success')
170
+ this.$dispatch('success','垃圾费收费')
171
171
  } else if (this.config.printType === '电子发票') {
172
172
  // TODO
173
- this.$dispatch('success')
173
+ this.$dispatch('success','垃圾费收费')
174
174
  }
175
175
  } else {
176
- this.$dispatch('success')
176
+ this.$dispatch('success','垃圾费收费')
177
177
  }
178
178
  },
179
179
  clean () {
180
180
  this.$dispatch('refresh')
181
181
  },
182
182
  printok () {
183
- this.$dispatch('success')
183
+ this.$dispatch('success','垃圾费收费')
184
184
  },
185
185
  validateBill (val) {
186
186
  this.validateOk = !val.isOk
@@ -371,7 +371,7 @@
371
371
  // self.$dispatch('success')
372
372
  }
373
373
  } else {
374
- self.$dispatch('success')
374
+ self.$dispatch('success','物联网表收费')
375
375
  }
376
376
  } catch (error) {
377
377
  if (error.status === 301) {
@@ -652,7 +652,7 @@
652
652
  },
653
653
  eticket_toggle () {
654
654
  this.eticket_show = false
655
- this.$dispatch('success')
655
+ this.$dispatch('success','物联网表收费')
656
656
  },
657
657
  async confirm () {
658
658
  let res = await this.$showMessage(`确定对客户${this.row.f_user_name}进行物联网表缴费吗?`, ['confirm', 'cancel'])
@@ -697,7 +697,7 @@
697
697
  this.$CommonService.openEticket(this.row.id, '售气收费')
698
698
  }
699
699
  }
700
- this.$dispatch('success')
700
+ this.$dispatch('success','物联网表收费')
701
701
  },
702
702
  pregas () {
703
703
  this.dymoney = 0
@@ -557,7 +557,7 @@ export default {
557
557
  this.billData.bill = val.bill
558
558
  },
559
559
  printok () {
560
- this.$dispatch('success')
560
+ this.$dispatch('success', '机表收费')
561
561
  },
562
562
  checkOverdue () {
563
563
  this.$nextTick(() => {
@@ -597,7 +597,7 @@ export default {
597
597
  },
598
598
  eticket_toggle () {
599
599
  this.eticket_show = false
600
- this.$dispatch('success')
600
+ this.$dispatch('success','机表收费')
601
601
  },
602
602
  // 优惠计算
603
603
  async privilegeCalculate () {
@@ -426,7 +426,7 @@ let initCardGen = async function (self) {
426
426
  }
427
427
  } else {
428
428
  self.$showAlert('发卡售气成功', 'success', 2000)
429
- self.$dispatch('success')
429
+ self.$dispatch('success','发卡售气')
430
430
  }
431
431
  self.clickConfirm = false
432
432
  } catch (error) {
@@ -716,7 +716,7 @@ export default {
716
716
  },
717
717
  eticket_toggle() {
718
718
  this.eticket_show = false
719
- this.$dispatch('success')
719
+ this.$dispatch('success','发卡售气')
720
720
  },
721
721
  async confirm() {
722
722
  this.eticket_msg = false
@@ -814,7 +814,7 @@ export default {
814
814
  this.$CommonService.openEticket(this.row.id, '售气收费')
815
815
  }
816
816
  }
817
- this.$dispatch('success')
817
+ this.$dispatch('success','发卡售气')
818
818
  },
819
819
  calText(val) {
820
820
  let str = ''
@@ -52,4 +52,5 @@ export default function () {
52
52
  Vue.component('sale-userinfo', (resolve) => { require(['./Userinfo'], resolve) })
53
53
  // 高拍仪
54
54
  Vue.component('high-meter', (resolve) => { require(['../../components/UserFiles/HighMeterCard.vue'], resolve) })
55
+ Vue.component('service-evaluation', (resolve) => { require(['../../components/charge/ServiceEvaluation'], resolve) })
55
56
  }
@@ -6,6 +6,9 @@
6
6
  <saletab header="流水查询" v-if="permission('流水查询')">
7
7
  <record-query-user :row="row" v-if="show == '流水查询'"></record-query-user>
8
8
  </saletab>
9
+ <saletab header="机表流水查询" v-if="permission('机表流水查询')&&row.f_meter_type.includes('机表')">
10
+ <machine-record-query :row="row" v-if="show == '机表流水查询'" @deal-msg="dealMsg"></machine-record-query>
11
+ </saletab>
9
12
  <saletab header="收费查询" v-if="permission('收费查询')">
10
13
  <charge-query-users :row="row" v-if="show == '收费查询'" @deal-msg="dealMsg"></charge-query-users>
11
14
  </saletab>
@@ -0,0 +1,143 @@
1
+ import {HttpResetClass} from 'vue-client'
2
+ let CEVEvaluatorService = {
3
+ install(Vue, options) {
4
+ const baseURL = 'http://127.0.0.1:10791/inf/'
5
+
6
+ // 编码参数方法
7
+ function encodeParams(params, encodeFields) {
8
+ if (encodeFields === void 0) { encodeFields = []; }
9
+ var encoded = Object.assign({}, params);
10
+ encodeFields.forEach(function(field) {
11
+ if (encoded[field] !== undefined && encoded[field] !== null) {
12
+ encoded[field] = encodeURIComponent(encoded[field]);
13
+ }
14
+ });
15
+ return encoded;
16
+ }
17
+
18
+ // 验证IP地址格式
19
+ function validateIP(ip) {
20
+ return /^(?:(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.){3}(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)$/.test(ip);
21
+ }
22
+
23
+ // 服务方法
24
+ const serviceMethods = {
25
+ // 签到
26
+ signIn: async function (params) {
27
+ const encodedParams = encodeParams(params, ['name', 'pos', 'org', 'equ', 'inf', 'photo']);
28
+ let http = new HttpResetClass()
29
+ return await http.load('POST',`${baseURL}SS`, encodedParams, {resolveMsg: null, rejectMsg: null});
30
+ },
31
+
32
+ // 获取耗时操作进度
33
+ getProgress: async function () {
34
+ let http = new HttpResetClass()
35
+ return await http.load('POST',`${baseURL}PR`,{}, {resolveMsg: null, rejectMsg: null});
36
+ },
37
+
38
+ // 签退
39
+ signOut: async function () {
40
+ let http = new HttpResetClass()
41
+ return await http.load('POST',`${baseURL}SO`, {}, {resolveMsg: null, rejectMsg: null});
42
+ },
43
+
44
+ // 启动评价(直接模式)
45
+ startEvaluateDirect: async function () {
46
+ let http = new HttpResetClass()
47
+ return await http.load('POST',`${baseURL}ES`,{}, {resolveMsg: null, rejectMsg: null});
48
+ },
49
+
50
+ // 启动评价(对接模式)
51
+ startEvaluate: async function (params) {
52
+ // 验证IP格式
53
+ if (params.ip && !validateIP(params.ip)) {
54
+ return Promise.reject(new Error('IP地址格式不正确'));
55
+ }
56
+ let http = new HttpResetClass()
57
+ return await http.load('POST',`${baseURL}EK`, params, {resolveMsg: null, rejectMsg: null});
58
+ },
59
+
60
+ // 获取评价结果
61
+ getEvaluateResult: async function () {
62
+ let http = new HttpResetClass()
63
+ return await http.load('POST',`${baseURL}GE`, {}, {resolveMsg: null, rejectMsg: null});
64
+ },
65
+
66
+ // 暂停服务
67
+ pauseService: async function () {
68
+ let http = new HttpResetClass()
69
+ return await http.load('POST',`${baseURL}PS`, {}, {resolveMsg: null, rejectMsg: null});
70
+ },
71
+
72
+ // 播放欢迎词
73
+ playWelcome: async function () {
74
+ let http = new HttpResetClass()
75
+ return await http.load('POST',`${baseURL}WL`, {}, {resolveMsg: null, rejectMsg: null});
76
+ },
77
+
78
+ // 播放等待提醒
79
+ playWaitTip: async function () {
80
+ let http = new HttpResetClass()
81
+ return await http.load('POST',`${baseURL}WT`, {}, {resolveMsg: null, rejectMsg: null});
82
+ },
83
+
84
+ // 检查设备在线状态
85
+ checkOnline: async function () {
86
+ let http = new HttpResetClass()
87
+ return await http.load('POST',`${baseURL}OL`, {}, {resolveMsg: null, rejectMsg: null});
88
+ },
89
+
90
+ // 获取登录信息
91
+ getLoginInfo: async function () {
92
+ let http = new HttpResetClass()
93
+ return await http.load('POST',`${baseURL}LS`,{}, {resolveMsg: null, rejectMsg: null});
94
+ },
95
+
96
+ // 下载广告文件
97
+ downloadAd: async function (params) {
98
+ let http = new HttpResetClass()
99
+ return await http.load('POST',`${baseURL}AF`, params, {resolveMsg: null, rejectMsg: null});
100
+ },
101
+
102
+ // 获取广告内容
103
+ getAdInfo: async function () {
104
+ let http = new HttpResetClass()
105
+ return await http.load('POST',`${baseURL}AI`, {}, {resolveMsg: null, rejectMsg: null});
106
+ },
107
+
108
+ // 下载配置文件
109
+ downloadConfig: async function (params) {
110
+ let http = new HttpResetClass()
111
+ return await http.load('POST',`${baseURL}DL`, params, {resolveMsg: null, rejectMsg: null});
112
+ },
113
+
114
+ // 清除下载内容
115
+ clearDownloads: async function () {
116
+ let http = new HttpResetClass()
117
+ return await http.load('POST',`${baseURL}CL`,{}, {resolveMsg: null, rejectMsg: null});
118
+ },
119
+
120
+ // 设置服务器IP
121
+ setServerIP: async function (params) {
122
+ let http = new HttpResetClass()
123
+ return await http.load('POST',`${baseURL}SEVIP`, params, {resolveMsg: null, rejectMsg: null});
124
+ },
125
+
126
+ // 获取版本信息
127
+ getVersion: async function () {
128
+ let http = new HttpResetClass()
129
+ return await http.load('POST',`${baseURL}VR`, {}, {resolveMsg: null, rejectMsg: null});
130
+ },
131
+
132
+ // 验证IP地址(工具方法)
133
+ validateIP: function (ip) {
134
+ return validateIP(ip);
135
+ }
136
+ };
137
+
138
+ // 注册到Vue
139
+ Vue.CEVEvaluator = Vue.prototype.$CEVEvaluator = serviceMethods;
140
+ }
141
+ };
142
+
143
+ export default CEVEvaluatorService;
package/src/sale.js CHANGED
@@ -19,6 +19,7 @@ import LoadParams from './plugins/LoadParams'
19
19
  import FileManageService from './plugins/FileManageService'
20
20
  import InvoiceService from './plugins/InvoiceService'
21
21
  import FileDownload from './plugins/FileDownload'
22
+ import CevEvaluatorPlugin from './plugins/CevEvaluatorPlugin'
22
23
  // import { all } from 'vue-client'
23
24
 
24
25
  /* 异步注册组件 */
@@ -44,6 +45,7 @@ export default function () {
44
45
  Vue.use(LoadParams)
45
46
  Vue.use(InvoiceService)
46
47
  Vue.use(FileDownload)
48
+ Vue.use(CevEvaluatorPlugin)
47
49
  // 团体缴费
48
50
  Vue.component('charge-manage-group', (resolve) => { require(['./components/chargeBatch/ChargeManageGroup'], resolve) })
49
51
  // 团体缴费查询列表
package/src/saleRes.json CHANGED
@@ -522,5 +522,6 @@
522
522
  "json-parse": "./components/revenue/comprehen/common/JSONParse",
523
523
  "transfer-audit-center": "./components/revenue/third/transferAuditCenter",
524
524
  "transfer-audit": "./components/revenue/third/transferAudit",
525
- "transfer-audit-dispose-basics": "./components/revenue/third/transferAuditDisposeBasics"
525
+ "transfer-audit-dispose-basics": "./components/revenue/third/transferAuditDisposeBasics",
526
+ "service-evaluation": "./components/charge/business/ServiceEvaluation"
526
527
  }