telephone-clients 3.0.104-20 → 3.0.104-21

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,775 +1,780 @@
1
- <template>
2
- <div style="height: auto;width: 100%" class="repair-bg">
3
- <work-busy :is-busy="saveing" v-show="saveing"></work-busy>
4
- <div class="bq-parent">
5
- <blockquote style="color: #499edf;border-left-color: #499edf;font-size: 16px">
6
- <p>
7
- 待办工单<span v-if="rows">({{ rows.length }}单)</span>
8
- <span v-if="!rows">(暂无待处理工单)</span>
9
- </p>
10
- </blockquote>
11
- </div>
12
-
13
- <div>
14
- <form>
15
- <!-- 查询条件-->
16
- <div class="row app-row">
17
- <div class="col-xs-4">
18
- <img src="../../../assets/用户姓名-蓝色.png" style="width: 20px;margin-bottom: 5px" alt="">
19
- <label for="f_userinfo_code" class="font text-left">用户姓名:</label>
20
- </div>
21
- <div class="col-xs-8">
22
- <input type="text" v-model="username" placeholder='用户姓名'
23
- class="search_input input-font"/>
24
- </div>
25
- </div>
26
- <div class="row app-row">
27
- <div class="col-xs-4">
28
- <img src="../../../assets/小区蓝色.png" style="width: 20px;margin-bottom: 5px" alt="">
29
- <label for="f_userinfo_code" class="font text-left">用户地址:</label>
30
- </div>
31
- <div class="col-xs-8">
32
- <input type="text" id="f_userinfo_code" class="search_input input-font"
33
- v-model="address" placeholder='用户地址'/>
34
- </div>
35
- </div>
36
- <div class="row app-row" v-if="worktype == '报修单'">
37
- <div class="col-xs-4">
38
- <img src="../../../assets/小区蓝色.png" style="width: 20px;margin-bottom: 5px" alt="">
39
- <label class="font text-left">报修类型:</label>
40
- </div>
41
- <div class="col-xs-8">
42
- <v-select :value.sync="repairtype"
43
- v-model="repairtype"
44
- :options='repairtypes'
45
- placeholder='请选择'
46
- close-on-select
47
- :value-single="true"
48
- ></v-select>
49
- </div>
50
- </div>
51
- <!-- 分割按钮和条件的高度 -->
52
- <div class="row app-row" style="height: 10px;"></div>
53
- <!-- 按钮 -->
54
- <div class="row text-center app-row">
55
- <button type="button" class="btn btn-lg btn-font btn-color" @click="ifsearch('')" style="min-width: 25%;">查询
56
- </button>
57
- <button type="button" class="btn btn-lg btn-font btn-color" @click='ifsearch(" and f_orderstatus!=null ")'
58
- style="min-width: 25%;">查询临时保存
59
- </button>
60
- <img style="float: right;margin-right: 3%;margin-top: -4px " @click="getNewOrder"
61
- src="../../../assets/shuaxindaiban1.png">
62
- </div>
63
- <div style="height:30px;" class="app-row"></div>
64
- </form>
65
- </div>
66
- <!-- 列表 -->
67
- <div class="panel panel-default repair-info-content auto">
68
- <div class="panel-body">
69
- <div class="panel panel-default well panel-blue-border" :class="row.failure.indexOf('漏气') !== -1 ? 'class-a':''"
70
- :style="row.f_repairtype === '抢险维修'?'border: 1px solid red;':''"
71
- v-for="row in listData.list">
72
- <div class="panel-body" style="padding: 10px">
73
- <div class="row form-group">
74
- <div class="col-sm-12 col-xs-12 col-md-12">
75
- <div class="row">
76
- <span v-if="row.state==='延期申请'" style="color: darkred">该工单已提交延期处理请勿操作</span>
77
- <span v-if="row.f_repairtype==='抢险维修'" style="color: red">抢险维修单请尽快处理</span>
78
- <div :class="{'text-danger': row.f_remindersign}" class="col-sm-12 col-xs-12 col-md-12 padd-div-shu">
79
- 工单编号: <span :style="row.f_repairtype === '抢险维修'?'color:red;':''">{{ row.f_service_id }}</span><span v-if="row.f_remindersign">(催单 {{ row.f_reminderdata }}) </span>
80
- </div>
81
- <div class="col-sm-12 col-xs-12 col-md-12 padd-div-shu">
82
- 派发时间: {{ row.f_created_date }}
83
- </div>
84
- <div v-show="false" class="col-sm-12 col-xs-12 col-md-12 padd-div-shu"
85
- v-if="worktype == '置换通气单'||worktype == '安装单'">
86
- 预约时间: {{ row.f_yuyue_date }}
87
- </div>
88
- <div v-show="false" class="col-sm-12 col-xs-12 col-md-12 padd-div-shu" v-if="worktype == '安装单'">
89
- 预约时间: {{ row.f_yuyue_date }}
90
- </div>
91
- <!--<div class="col-sm-12 col-xs-12 col-md-12 padd-div-shu" v-if="worktype == '报修单'">-->
92
- <!--报修类型: {{row.f_servicerepair_type}}-->
93
- <!--</div>-->
94
- <div class="col-sm-12 col-xs-12 col-md-12 padd-div-shu"
95
- v-if="worktype == '报修单'">
96
- 维修类型: <span :style="row.f_repairtype === '抢险维修'?'color:red;':''">{{ row.f_repairtype }}</span>
97
- </div>
98
- <div class="col-sm-12 col-xs-12 col-md-12 padd-div-shu" v-if="row.f_userinfo_code">
99
- 用户编号: {{ row.f_userinfo_code }}
100
- </div>
101
- <div class="col-sm-12 col-xs-12 col-md-12 padd-div-shu" v-if="row.f_enter_number">
102
- 用户证号: {{ row.f_enter_number }}
103
- </div>
104
- <div class="col-sm-12 col-xs-12 col-md-12 padd-div-shu">
105
- 用户姓名: {{ row.f_user_name }}
106
- </div>
107
- <div class="col-sm-12 col-xs-12 col-md-12 padd-div-shu">
108
- 来电电话: {{ row.f_phone }}
109
- <img src="../../../assets/telphonesend.png" style="width: 12px;"
110
- @click.stop.prevent='makeAPhoneCall(row.f_phone)'>
111
- </div>
112
- <div class="col-sm-12 col-xs-12 col-md-12">
113
- 联系电话: {{ row.f_contact_phone }}
114
- <img src="../../../assets/telphonesend.png" style="width: 12px;"
115
- @click.stop.prevent='makeAPhoneCall(row.f_contact_phone)'>
116
- </div>
117
- <div class="col-sm-12 col-xs-12 col-md-12 padd-div-shu">
118
- 用户地址: {{ row.f_address }}
119
- </div>
120
- <div v-show="row.f_advice" class="col-sm-12 col-xs-12 col-md-12" v-if="worktype == '报修单'">
121
- 指导建议: {{ row.f_advice }}
122
- </div>
123
- <div v-show="row.f_remarks" class="col-sm-12 col-xs-12 col-md-12 padd-div-shu">
124
- 备注信息: {{ row.f_remarks }}
125
- </div>
126
- <div v-show="row.f_yuyue_date" class="col-sm-12 col-xs-12 col-md-12 padd-div-shu"
127
- v-if="row.f_yuyue_date !=null">
128
- 预约时间: {{ row.f_yuyue_date }}
129
- </div>
130
- <div class="col-sm-12 col-xs-12 col-md-12 padd-div-shu" v-if="worktype == '报修单'">
131
- <failure-show :value='row.failure'>
132
- </failure-show>
133
- </div>
134
- </div>
135
- </div>
136
- <div class="col-sm-12 col-xs-12 col-md-12">
137
- <button type="button" name="button" class="btn btn-primary btn-sm" style="float: right"
138
- @click="selected(row,false)">处理
139
- </button>
140
-
141
- <button type="button" name="button" class="btn btn-primary btn-sm"
142
- style="float: right;margin-right:10px;" v-if="backservice=='否'" @click="moveservice(row)">转单
143
- </button>
144
- <button type="button" name="button" class="btn btn-primary btn-sm"
145
- style="float: right;margin-right:10px;" v-if="backservice=='是'" @click="sendback(row)">退回
146
- </button>
147
- <button type="button" name="button" class="btn btn-primary btn-sm"
148
- style="float: right;margin-right:10px;" @click="showend(row)">无法处理
149
- </button>
150
- <button type="button" name="button" class="btn btn-primary btn-sm"
151
- style="float: right;margin-right:10px;" v-if="false" @click="infoadd(row)">信息维护
152
- </button>
153
- <!--<button type="button" name="button" class="btn btn-primary" @click="delayedit(row)">延期申请</button>-->
154
- </div>
155
- </div>
156
- </div>
157
- </div>
158
- <div style="height:auto;width: 100%;text-align: center">
159
- <a v-if="!listData.isEnd" @click="showMore()">展开更多......</a>
160
- <span v-if="listData.isEnd">到底了......</span>
161
- </div>
162
- </div>
163
- <modal :show.sync="moveshow" v-ref:modal :backdrop="false">
164
- <div slot="modal-header" class="modal-header">
165
- <h4 class="modal-title">
166
- 转单
167
- </h4>
168
- </div>
169
- <div slot="modal-body" class="modal-body">
170
- <div class="row" style="margin-top: 6px">
171
- <label class="col-xs-4 col-md-4 control-label font text-left">接单人</label>
172
- <div class="col-xs-8">
173
- <v-select :value="orderman" :value-single="true"
174
- :options='repairers' placeholder='请选择接单人'
175
- close-on-select v-on:change="repiarmancg"></v-select>
176
- </div>
177
- </div>
178
- <div class="row" style="margin-top: 6px">
179
- <label class="control-label font text-left col-md-4 col-xs-4">备注</label>
180
- <div class="col-xs-8 col-md-8">
181
- <input type="text" v-model="moveselected.f_remarks"/>
182
- </div>
183
- </div>
184
- </div>
185
- <div slot="modal-footer" class="modal-footer">
186
- <button type="button" class="btn btn-default" @click="movedo()">确定</button>
187
- <button type="button" class="btn btn-default" @click="undo()">取消</button>
188
- </div>
189
- </modal>
190
- <modal :show.sync="endshow" v-ref:modalCase backdrop="false">
191
- <header slot="modal-header" class="modal-header">
192
- 工单结案
193
- </header>
194
- <article slot="modal-body" class="modal-body">
195
- <div class="col-sm-12 form-group">
196
- <label class="control-label col-sm-2">结案备注</label>
197
- <div class="col-sm-9">
198
- <input class="form-control" type="text" v-model="f_caseremarks"/>
199
- </div>
200
- </div>
201
- </article>
202
- <footer slot="modal-footer" class="modal-footer">
203
- <button type="button" class="btn btn-success" @click='caseok'>确定</button>
204
- <button type="button" class="btn btn-success" @click='caseclose'>关闭</button>
205
- </footer>
206
- </modal>
207
- <modal :show.sync="showinfo" v-ref:infomodal :backdrop="false">
208
- <div slot="modal-header" class="modal-header">
209
- <h4 class="modal-title">
210
- 工单信息维护
211
- </h4>
212
- </div>
213
- <div slot="modal-body" class="modal-body">
214
- <div class="row" style="margin-top: 6px">
215
- <label class="control-label font text-left col-md-4 col-xs-4">维护内容</label>
216
- <div class="col-xs-8 col-md-8">
217
- <input type="text" v-model="information"/>
218
- </div>
219
- </div>
220
- </div>
221
- <div slot="modal-footer" class="modal-footer">
222
- <button type="button" class="btn btn-default" @click="infoaddsure()">确定</button>
223
- <button type="button" class="btn btn-default" @click="infoclose()">取消</button>
224
- </div>
225
- </modal>
226
- <modal :show.sync="editflag" v-ref:infomodal :backdrop="false">
227
- <div slot="modal-header" class="modal-header">
228
- <h4 class="modal-title">
229
- 工单退回
230
- </h4>
231
- </div>
232
- <div slot="modal-body" class="modal-body">
233
- <div class="row" style="margin-top: 6px">
234
- <label class="col-xs-4 col-md-4 control-label font text-left">工单编号:</label>
235
- <span>{{ sendbackmodel.f_service_id }}</span>
236
- </div>
237
- <div class="row" style="margin-top: 6px">
238
- <label class="col-xs-4 col-md-4 control-label font text-left">客户名称:</label>
239
- <span>{{ sendbackmodel.f_user_name }}</span>
240
- </div>
241
- <div class="row" style="margin-top: 6px">
242
- <label class="control-label font text-left col-md-4 col-xs-4">退回原因</label>
243
- <div class="col-xs-8 col-md-8">
244
- <textarea style="width: 60%" name="name" rows="1" class="ver-textarea" type="text"
245
- v-model='f_site_back_reason'></textarea>
246
- </div>
247
- </div>
248
-
249
- </div>
250
- <div slot="modal-footer" class="modal-footer">
251
- <button type="button" name="button" class="btn btn-primary btn-photo" @click="WorkBack()">确定</button>
252
- <button type="button" class="btn btn-default" @click="WorkBackclose()">取消</button>
253
- </div>
254
- </modal>
255
- </div>
256
- </div>
257
- </template>
258
- <script>
259
- import FailureShow from '../../../components/pc/FailureShow'
260
- import {HttpResetClass} from 'vue-client'
261
- import * as Util from '../../../components/Util'
262
- import Vue from 'vue'
263
- // 工作类型对应的各项设置
264
- const config = {
265
- '报修单': {
266
- path: 'getServiceMobile'
267
- },
268
- '置换通气单': {
269
- path: 'getSubstitMobile'
270
- },
271
- '安装单': {
272
- path: 'getInstallMobile'
273
- }
274
- }
275
- export default {
276
- title: '维修员平板首页',
277
- data() {
278
- return {
279
- model: {
280
- serviceacitivity: [{
281
- f_site_back_date: '',
282
- f_site_back_name: '',
283
- serviceid: '',
284
- f_service_acitivity_type: '打回'
285
- }
286
- ]
287
- },
288
- saveing:false,
289
- sendbackmodel:{},
290
- // rows: Object
291
- rows: [{
292
- f_user_name: '',
293
- f_contact_phone: '',
294
- failure: ''
295
- }],
296
- editshow: false,
297
- row: {
298
- type: Object,
299
- default: {
300
- f_user_name: '',
301
- f_contact_phone: '',
302
- failure: ''
303
- }
304
- },
305
- repairtype: '',
306
- username: '',
307
- address: '',
308
- moveshow: false,
309
- repairers: [],
310
- repairtypes: this.$appdata.getParam('报修类型') ? [{
311
- label: '全部',
312
- value: ''
313
- }, ...this.$appdata.getParam('报修类型')] : [{label: '全部', value: ''}],
314
- moveselected: '',
315
- orderman: '',
316
- number: 0,
317
- listData: {
318
- list: [],
319
- isEnd: true,
320
- index: 0
321
- },
322
- loginUser: {
323
- name: Vue.user.name,
324
- ename: Vue.user.ename
325
- },
326
- infoone: '',
327
- showinfo: false,
328
- editflag: false,
329
- information: '',
330
- backservice: '',
331
- // 结案是否显示
332
- endshow:false,
333
- //结案备注
334
- f_caseremarks:'',
335
- // 当前处理的工单
336
- selectone:''
337
- }
338
- },
339
- props: {
340
- worktype: {
341
- type: String,
342
- default: '报修单'
343
- },
344
- sourcet: {
345
- type: String,
346
- default: '横屏'
347
- },
348
- tabname: {
349
- type: String
350
- }
351
- },
352
- methods: {
353
- // 结案确认
354
- caseok(){
355
- this.saveing = true
356
- let info = {
357
- id:this.selectone.id_back,
358
- f_state : '',
359
- f_processid: this.selectone.f_processid,
360
- f_closing_time: Util.toStandardTimeString(),
361
- f_orderstatus:'无法处理'
362
- }
363
- // 工单结案操作
364
- let data = {model: info, loginUser: {name: Vue.user.name, ename: Vue.user.ename},f_caseremarks:this.f_caseremarks}
365
- let http = new HttpResetClass()
366
- http.load('POST', `${this.$androidUtil.getProxyUrl()}/rs/logic/serviceCase`, data, {
367
- resolveMsg: null,
368
- rejectMsg: null
369
- }).then(() => {
370
- this.saveing = false
371
- this.$showMessage('结案成功!')
372
- this.endshow = false
373
- this.f_caseremarks = ''
374
- // 刷新界面
375
- this.getNewOrder()
376
- }).catch((error)=>{
377
- this.saveing=false
378
- this.$showMessage('网络异常,结案失败!')
379
- })
380
- },
381
- // 结案返回
382
- caseclose(){
383
- this.endshow = false
384
- this.f_caseremarks = ''
385
- this.editflag = null
386
- },
387
- showend(row){
388
- this.selectone = row
389
- this.endshow = true
390
- },
391
- WorkBack() {
392
- this.saveing=true
393
- this.model = this.sendbackmodel
394
- this.model.serviceacitivity = [{
395
- f_site_back_date: '',
396
- f_site_back_name: '',
397
- serviceid: '',
398
- f_site_back_reason: this.f_site_back_reason,
399
- f_service_acitivity_type: ''
400
- }
401
- ]
402
- if (!this.f_site_back_reason) {
403
- return this.$showMessage('请填写退回内容!')
404
- }
405
- let data = ''
406
- data = {
407
- model: this.model,
408
- loginUser: {name: Vue.user.name, ename: Vue.user.name, id: Vue.user.id}
409
- }
410
- console.log("退回参数" + JSON.stringify(data))
411
- let http = new HttpResetClass()
412
- http.load('POST', `${this.$androidUtil.getProxyUrl()}/rs/logic/sendBack`, data, {
413
- resolveMsg: null,
414
- rejectMsg: null
415
- }).then(() => {
416
- this.saveing=false
417
- this.$showMessage('退回成功!!!')
418
- this.f_site_back_reason = ''
419
- this.editflag = false
420
- this.getNewOrder()
421
- }).catch((error)=>{
422
- this.saveing=false
423
- this.$showMessage('网络异常,退回失败!!!')
424
- })
425
- },
426
- WorkBackclose() {
427
- this.editflag = false
428
- },
429
- infoaddsure() {
430
- if (!this.information) {
431
- return this.$showMessage('请填写维护内容!', ['confirm'])
432
- }
433
- // 组装数据
434
- var data = {
435
- id: this.infoone.id_back,
436
- f_processid: this.infoone.f_processid,
437
- f_content: this.information,
438
- serviceacitivity: [{}]
439
- }
440
- let http = new HttpResetClass()
441
- http.load('POST', `${this.$androidUtil.getProxyUrl()}/rs/logic/telinformation`, {
442
- model: data,
443
- loginUser: this.loginUser
444
- }, {resolveMsg: null, rejectMsg: null}).then(() => {
445
- this.$showMessage('维护内容添加成功!', ['confirm'])
446
- this.information = ''
447
- this.showinfo = false
448
- })
449
- },
450
- infoclose() {
451
- this.showinfo = false
452
- },
453
- infoadd(val) {
454
- this.infoone = val
455
- this.showinfo = true
456
- },
457
- repiarmancg(val) {
458
- this.orderman = val
459
- },
460
- movedo() {
461
- if (this.orderman == undefined || this.orderman == '') {
462
- this.$showMessage(`请先选择接单人!`, ['confirm'])
463
- return
464
- }
465
- //tag
466
- //tag)
467
- let result = this.$androidUtil.bzLogic('androidMoveService', {
468
- id_back: this.moveselected.id_back,
469
- f_reciever: this.orderman,
470
- f_remarks: this.moveselected.f_remarks,
471
- worktype: this.worktype
472
- })
473
- if (result.result === '成功') {
474
- this.$showMessage(`向 ${this.orderman} 转单成功!`, ['confirm'])
475
- this.orderman = ''
476
- this.moveselected = ''
477
- this.moveshow = false
478
- this.ifsearch()
479
- } else {
480
- this.$showMessage(`转单失败,请检查网络异常!`, ['confirm'])
481
- }
482
- },
483
- undo() {
484
- this.orderman = ''
485
- this.moveselected = ''
486
- this.moveshow = false
487
- },
488
- getEmp() {
489
- // 获取接单人数组
490
- let val = ''
491
- var worktypew = this.worktype == '报修单' ? '维修员' : this.worktype == '置换员' ? '置换员' : '安装员'
492
- let http = new HttpResetClass()
493
- //tag)
494
- val = {
495
- source: `this.getParentByType($organization$).getChildByName($${worktypew}$).getUsers()`,
496
- userid: `${Vue.user.id}`
497
- }
498
- // val = {source: `this.getParentByType($department$).getAllChildrens().where(row.getAttributes().get($rolestr$).indexOf($${worktypew}$) != -1))`, userid: `${Vue.user.id}`}
499
- // val = {source: `this.getParentByType($department$).getAllChildrens().where(row.getAttributes().get($rolestr$) == $${worktypew}$))`, userid: `${Vue.user.id}`}
500
- http.load('POST', `${this.$androidUtil.getProxyUrl()}/rs/search`, {data: val}, {
501
- resolveMsg: null,
502
- rejectMsg: null
503
- }).then((res) => {
504
- res.data.forEach((item) => {
505
- this.repairers.push({label: `${item.name}`, value: item.name})
506
- })
507
- })
508
- },
509
- ifsearch(condition) {
510
- this.listData.list = []
511
- this.listData.index = 0
512
- this.listData.isEnd = true
513
- if (!condition) {
514
- condition = ''
515
- }
516
- condition = '1 = 1 ' + condition
517
- if (this.username != '') {
518
- condition += " and f_user_name like '%" + this.username + "%'"
519
- }
520
- if (this.address != '') {
521
- condition += " and f_address like '%" + this.address + "%'"
522
- }
523
- if (this.repairtype != '') {
524
- condition += " and f_repairtype = '" + this.repairtype + "'"
525
- }
526
- //tag
527
- //tag
528
- // 测试环境异步,真实环境同步
529
- if (this.$androidUtil.isTest) {
530
- return this.$androidUtil.path({
531
- 'alias': `${config[this.worktype].path}`,
532
- 'data': {condition: condition}
533
- }).then((ret) => {
534
- this.rows = ret.data
535
- })
536
- } else {
537
- let result = this.$androidUtil.path({
538
- 'alias': `${config[this.worktype].path}`,
539
- 'data': {condition: condition}
540
- })
541
- if (result.code === 200) {
542
- this.rows = result.data
543
- } else {
544
- this.$showMessage(`加载数据失败, 返回码: ${result.code}, 错误信息:${result.data}`)
545
- }
546
- }
547
- this.showMore()
548
- },
549
- selected(row, isRecord) {
550
- var prpdata = {
551
- _this: this,
552
- title: '入户维修',
553
- safe: true
554
- }
555
- this.$dispatch('gotoson', prpdata)
556
- if (this.sourcet == '横屏') {
557
- this.$goto('repair-order', {row: row, worktype: this.worktype, isRecord: isRecord}, 'self', this.ifsearch)
558
- } else {
559
- this.$goto('repair-orderV', {row: row, worktype: this.worktype, isRecord: isRecord}, 'self', this.ifsearch)
560
- }
561
- },
562
- sendback(row) {
563
- this.$showMessage('退回后数据不可恢复,确认退回操作吗?', ['confirm', 'cancel'], {
564
- resolveMsg: null,
565
- rejectMsg: null
566
- }).then((res) => {
567
- if (res === 'confirm') {
568
- this.editflag = true
569
- this.sendbackmodel = row
570
- console.log("需要的参数" + JSON.stringify(this.sendbackmodel))
571
- } else {
572
- this.editflag = false
573
- }
574
- })
575
- },
576
- moveservice(row) {
577
- this.moveselected = row
578
- this.moveshow = true
579
- },
580
- delayedit(row) {
581
- row.state = '延期申请'
582
- this.$goto('delay-apply', {row: row})
583
- },
584
- search() {
585
- // 测试环境异步,真实环境同步
586
- var condition = '1 = 1'
587
- //tag
588
- if (this.$androidUtil.isTest) {
589
- return this.$androidUtil.path({
590
- 'alias': `${config[this.worktype].path}`,
591
- 'data': {condition: condition}
592
- }).then((ret) => {
593
- // ret.data.forEach((item) => {
594
- // item.service_version = item.failure.indexOf("漏气") !== -1
595
- // })
596
- this.rows = ret.data
597
- })
598
- } else {
599
- let result = this.$androidUtil.path({
600
- 'alias': `${config[this.worktype].path}`,
601
- 'data': {condition: condition}
602
- })
603
- if (result.code === 200) {
604
- //tag)
605
- this.rows = result.data
606
- } else {
607
- this.$showMessage(`加载数据失败, 返回码: ${result.code}, 错误信息:${result.data}`)
608
- }
609
- }
610
- },
611
- sumsearch() {
612
- // 测试环境异步,真实环境同步
613
- var condition = '1 = 1'
614
- //tag
615
- if (this.$androidUtil.isTest) {
616
- return this.$androidUtil.path({
617
- 'alias': `${config[this.worktype].path}`,
618
- 'data': {condition: condition}
619
- }).then((ret) => {
620
- // ret.data.forEach((item) => {
621
- // item.service_version = item.failure.indexOf("漏气") !== -1
622
- // })
623
- var titdata = {
624
- title: this.tabname,
625
- sum: ret.data.length
626
- }
627
- //tag
628
- //tag)
629
- this.$emit('changesum', titdata)
630
- })
631
- } else {
632
- let result = this.$androidUtil.path({
633
- 'alias': `${config[this.worktype].path}`,
634
- 'data': {condition: condition}
635
- })
636
- if (result.code === 200) {
637
- //tag)
638
- var crv = {
639
- title: this.tabname,
640
- sum: result.data.length
641
- }
642
- //tag
643
- //tag)
644
- this.$emit('changesum', crv)
645
- } else {
646
- this.$showMessage(`加载数据失败, 返回码: ${result.code}, 错误信息:${result.data}`)
647
- }
648
- }
649
- },
650
- makeAPhoneCall(phoneNumber) {
651
- this.$androidUtil.makeAPhoneCall(phoneNumber)
652
- },
653
- upload() {
654
- this.$goto('up-load')
655
- },
656
- back() {
657
- this.$back()
658
- },
659
- getNewOrder() {
660
- HostApp.__this__ = this
661
- HostApp.logicWithHint({
662
- // logic别名,key必须为logic
663
- 'logic': 'TelServiceTimeOut',
664
- // 回调执行方法名,key必须为callback
665
- 'callback': 'javascript:HostApp.__this__.getNewCallBack()',
666
- // logic执行需要的业务参数
667
- 'data': {params: ''},
668
- // 固定key,代表是否将logic执行结果作为参数传入回调方法,1代表true,0代表false,
669
- // 执行回调方法传入key为backresult
670
- // 如需额外拼接参数,写在logic返回值的params,例如xxlogic返回:{"params": "success"}
671
- 'backresult': 1
672
- })
673
- },
674
- getNewCallBack(obj) {
675
- //tag)
676
- this.ifsearch()
677
- },
678
- showMore() {
679
- if (!this.rows) {
680
- return
681
- }
682
- let endIndex = this.listData.index + 10
683
- if (endIndex > this.rows.length) {
684
- endIndex = this.rows.length
685
- }
686
- for (; this.listData.index < endIndex; this.listData.index++) {
687
- this.listData.list.push(this.rows[this.listData.index])
688
- }
689
- if (this.listData.index == this.rows.length) {
690
- this.listData.isEnd = true
691
- } else {
692
- this.listData.isEnd = false
693
- }
694
- }
695
- },
696
- ready() {
697
- let backservices = this.$appdata.getSingleValue('维修转单')
698
- console.log("参数为:::" + backservices)
699
- if (backservices === 'true' || backservices === '') {
700
- this.backservice = '否'
701
- } else {
702
- this.backservice = ''
703
- }
704
- this.getEmp()
705
- this.ifsearch()
706
- // var _this = this;
707
- // this.timeoutHandle = window.setInterval(function() {
708
- // _this.sumsearch()
709
- // }, 6000)
710
- },
711
- components: {
712
- FailureShow,
713
- 'failure-show': FailureShow
714
- }
715
- }
716
- </script>
717
- <style scoped>
718
- .searBtn {
719
- background: #FFFFFF;
720
- color: #0096fb;
721
- border: 1px solid #0096fb;
722
- border-radius: 5px;
723
- padding: 8px;
724
- text-align: center;
725
- font-size: 1.2em;
726
- z-index: 10;
727
- opacity: 0.5;
728
- bottom: 50px;
729
- margin-top: -10px;
730
- height: 40px;
731
- }
732
-
733
- .bg {
734
- background-color: #499edf;
735
- height: 1px;
736
- border: 0;
737
- }
738
-
739
- .app-row {
740
- background-color: white;
741
- padding: 10px 10px 0 10px;
742
- border-bottom: 1px solid rgba(235, 235, 235, 0.5);
743
- }
744
-
745
- .search_input {
746
- border: 0;
747
- outline: none;
748
- }
749
-
750
- .font {
751
- font: 15px PingFang-SC-Medium;
752
- color: #666666;
753
- }
754
-
755
- .input-font {
756
- font: 15px PingFang-SC-Medium;
757
- color: #333333;
758
- }
759
-
760
- .btn-font {
761
- font: 600 16px PingFang-SC-Bold;
762
- color: #499EDF;
763
- }
764
-
765
- .btn-color {
766
- background-color: #FFFFFF;
767
- border-radius: 10px;
768
- border: 1px solid #499EDF;
769
- }
770
-
771
- .panel-blue-border {
772
- border: 1px solid #499edf;
773
- border-radius: 5px;
774
- }
775
- </style>
1
+ <template>
2
+ <div style="height: auto;width: 100%" class="repair-bg">
3
+ <work-busy :is-busy="saveing" v-show="saveing"></work-busy>
4
+ <div class="bq-parent">
5
+ <blockquote style="color: #499edf;border-left-color: #499edf;font-size: 16px">
6
+ <p>
7
+ 待办工单<span v-if="rows">({{ rows.length }}单)</span>
8
+ <span v-if="!rows">(暂无待处理工单)</span>
9
+ </p>
10
+ </blockquote>
11
+ </div>
12
+
13
+ <div>
14
+ <form>
15
+ <!-- 查询条件-->
16
+ <div class="row app-row">
17
+ <div class="col-xs-4">
18
+ <img src="../../../assets/用户姓名-蓝色.png" style="width: 20px;margin-bottom: 5px" alt="">
19
+ <label for="f_userinfo_code" class="font text-left">用户姓名:</label>
20
+ </div>
21
+ <div class="col-xs-8">
22
+ <input type="text" v-model="username" placeholder='用户姓名'
23
+ class="search_input input-font"/>
24
+ </div>
25
+ </div>
26
+ <div class="row app-row">
27
+ <div class="col-xs-4">
28
+ <img src="../../../assets/小区蓝色.png" style="width: 20px;margin-bottom: 5px" alt="">
29
+ <label for="f_userinfo_code" class="font text-left">用户地址:</label>
30
+ </div>
31
+ <div class="col-xs-8">
32
+ <input type="text" id="f_userinfo_code" class="search_input input-font"
33
+ v-model="address" placeholder='用户地址'/>
34
+ </div>
35
+ </div>
36
+ <div class="row app-row" v-if="worktype == '报修单'">
37
+ <div class="col-xs-4">
38
+ <img src="../../../assets/小区蓝色.png" style="width: 20px;margin-bottom: 5px" alt="">
39
+ <label class="font text-left">报修类型:</label>
40
+ </div>
41
+ <div class="col-xs-8">
42
+ <v-select :value.sync="repairtype"
43
+ v-model="repairtype"
44
+ :options='repairtypes'
45
+ placeholder='请选择'
46
+ close-on-select
47
+ :value-single="true"
48
+ ></v-select>
49
+ </div>
50
+ </div>
51
+ <!-- 分割按钮和条件的高度 -->
52
+ <div class="row app-row" style="height: 10px;"></div>
53
+ <!-- 按钮 -->
54
+ <div class="row text-center app-row">
55
+ <button type="button" class="btn btn-lg btn-font btn-color" @click="ifsearch('')" style="min-width: 25%;">查询
56
+ </button>
57
+ <button type="button" class="btn btn-lg btn-font btn-color" @click='ifsearch(" and f_orderstatus!=null ")'
58
+ style="min-width: 25%;">查询临时保存
59
+ </button>
60
+ <img style="float: right;margin-right: 3%;margin-top: -4px " @click="getNewOrder"
61
+ src="../../../assets/shuaxindaiban1.png">
62
+ </div>
63
+ <div style="height:30px;" class="app-row"></div>
64
+ </form>
65
+ </div>
66
+ <!-- 列表 -->
67
+ <div class="panel panel-default repair-info-content auto">
68
+ <div class="panel-body">
69
+ <div class="panel panel-default well panel-blue-border" :class="row.failure.indexOf('漏气') !== -1 ? 'class-a':''"
70
+ :style="row.f_repairtype === '抢险维修'?'border: 1px solid red;':''"
71
+ v-for="row in listData.list">
72
+ <div class="panel-body" style="padding: 10px">
73
+ <div class="row form-group">
74
+ <div class="col-sm-12 col-xs-12 col-md-12">
75
+ <div class="row">
76
+ <span v-if="row.state==='延期申请'" style="color: darkred">该工单已提交延期处理请勿操作</span>
77
+ <span v-if="row.f_repairtype==='抢险维修'" style="color: red">抢险维修单请尽快处理</span>
78
+ <div :class="{'text-danger': row.f_remindersign}" class="col-sm-12 col-xs-12 col-md-12 padd-div-shu">
79
+ 工单编号: <span :style="row.f_repairtype === '抢险维修'?'color:red;':''">{{ row.f_service_id }}</span><span v-if="row.f_remindersign">(催单 {{ row.f_reminderdata }}) </span>
80
+ </div>
81
+ <div class="col-sm-12 col-xs-12 col-md-12 padd-div-shu">
82
+ 派发时间: {{ row.f_created_date }}
83
+ </div>
84
+ <div v-show="false" class="col-sm-12 col-xs-12 col-md-12 padd-div-shu"
85
+ v-if="worktype == '置换通气单'||worktype == '安装单'">
86
+ 预约时间: {{ row.f_yuyue_date }}
87
+ </div>
88
+ <div v-show="false" class="col-sm-12 col-xs-12 col-md-12 padd-div-shu" v-if="worktype == '安装单'">
89
+ 预约时间: {{ row.f_yuyue_date }}
90
+ </div>
91
+ <!--<div class="col-sm-12 col-xs-12 col-md-12 padd-div-shu" v-if="worktype == '报修单'">-->
92
+ <!--报修类型: {{row.f_servicerepair_type}}-->
93
+ <!--</div>-->
94
+ <div class="col-sm-12 col-xs-12 col-md-12 padd-div-shu"
95
+ v-if="worktype == '报修单'">
96
+ 维修类型: <span :style="row.f_repairtype === '抢险维修'?'color:red;':''">{{ row.f_repairtype }}</span>
97
+ </div>
98
+ <div class="col-sm-12 col-xs-12 col-md-12 padd-div-shu" v-if="row.f_userinfo_code">
99
+ 用户编号: {{ row.f_userinfo_code }}
100
+ </div>
101
+ <div class="col-sm-12 col-xs-12 col-md-12 padd-div-shu" v-if="row.f_enter_number">
102
+ 用户证号: {{ row.f_enter_number }}
103
+ </div>
104
+ <div class="col-sm-12 col-xs-12 col-md-12 padd-div-shu">
105
+ 用户姓名: {{ row.f_user_name }}
106
+ </div>
107
+ <div class="col-sm-12 col-xs-12 col-md-12 padd-div-shu">
108
+ 租户电话: {{ row.f_rent_phone }}
109
+ <img src="../../../assets/telphonesend.png" style="width: 12px;"
110
+ @click.stop.prevent='makeAPhoneCall(row.f_rent_phone)'>
111
+ </div>
112
+ <div class="col-sm-12 col-xs-12 col-md-12 padd-div-shu">
113
+ 来电电话: {{ row.f_phone }}
114
+ <img src="../../../assets/telphonesend.png" style="width: 12px;"
115
+ @click.stop.prevent='makeAPhoneCall(row.f_phone)'>
116
+ </div>
117
+ <div class="col-sm-12 col-xs-12 col-md-12">
118
+ 联系电话: {{ row.f_contact_phone }}
119
+ <img src="../../../assets/telphonesend.png" style="width: 12px;"
120
+ @click.stop.prevent='makeAPhoneCall(row.f_contact_phone)'>
121
+ </div>
122
+ <div class="col-sm-12 col-xs-12 col-md-12 padd-div-shu">
123
+ 用户地址: {{ row.f_address }}
124
+ </div>
125
+ <div v-show="row.f_advice" class="col-sm-12 col-xs-12 col-md-12" v-if="worktype == '报修单'">
126
+ 指导建议: {{ row.f_advice }}
127
+ </div>
128
+ <div v-show="row.f_remarks" class="col-sm-12 col-xs-12 col-md-12 padd-div-shu">
129
+ 备注信息: {{ row.f_remarks }}
130
+ </div>
131
+ <div v-show="row.f_yuyue_date" class="col-sm-12 col-xs-12 col-md-12 padd-div-shu"
132
+ v-if="row.f_yuyue_date !=null">
133
+ 预约时间: {{ row.f_yuyue_date }}
134
+ </div>
135
+ <div class="col-sm-12 col-xs-12 col-md-12 padd-div-shu" v-if="worktype == '报修单'">
136
+ <failure-show :value='row.failure'>
137
+ </failure-show>
138
+ </div>
139
+ </div>
140
+ </div>
141
+ <div class="col-sm-12 col-xs-12 col-md-12">
142
+ <button type="button" name="button" class="btn btn-primary btn-sm" style="float: right"
143
+ @click="selected(row,false)">处理
144
+ </button>
145
+
146
+ <button type="button" name="button" class="btn btn-primary btn-sm"
147
+ style="float: right;margin-right:10px;" v-if="backservice=='否'" @click="moveservice(row)">转单
148
+ </button>
149
+ <button type="button" name="button" class="btn btn-primary btn-sm"
150
+ style="float: right;margin-right:10px;" v-if="backservice=='是'" @click="sendback(row)">退回
151
+ </button>
152
+ <button type="button" name="button" class="btn btn-primary btn-sm"
153
+ style="float: right;margin-right:10px;" @click="showend(row)">无法处理
154
+ </button>
155
+ <button type="button" name="button" class="btn btn-primary btn-sm"
156
+ style="float: right;margin-right:10px;" v-if="false" @click="infoadd(row)">信息维护
157
+ </button>
158
+ <!--<button type="button" name="button" class="btn btn-primary" @click="delayedit(row)">延期申请</button>-->
159
+ </div>
160
+ </div>
161
+ </div>
162
+ </div>
163
+ <div style="height:auto;width: 100%;text-align: center">
164
+ <a v-if="!listData.isEnd" @click="showMore()">展开更多......</a>
165
+ <span v-if="listData.isEnd">到底了......</span>
166
+ </div>
167
+ </div>
168
+ <modal :show.sync="moveshow" v-ref:modal :backdrop="false">
169
+ <div slot="modal-header" class="modal-header">
170
+ <h4 class="modal-title">
171
+ 转单
172
+ </h4>
173
+ </div>
174
+ <div slot="modal-body" class="modal-body">
175
+ <div class="row" style="margin-top: 6px">
176
+ <label class="col-xs-4 col-md-4 control-label font text-left">接单人</label>
177
+ <div class="col-xs-8">
178
+ <v-select :value="orderman" :value-single="true"
179
+ :options='repairers' placeholder='请选择接单人'
180
+ close-on-select v-on:change="repiarmancg"></v-select>
181
+ </div>
182
+ </div>
183
+ <div class="row" style="margin-top: 6px">
184
+ <label class="control-label font text-left col-md-4 col-xs-4">备注</label>
185
+ <div class="col-xs-8 col-md-8">
186
+ <input type="text" v-model="moveselected.f_remarks"/>
187
+ </div>
188
+ </div>
189
+ </div>
190
+ <div slot="modal-footer" class="modal-footer">
191
+ <button type="button" class="btn btn-default" @click="movedo()">确定</button>
192
+ <button type="button" class="btn btn-default" @click="undo()">取消</button>
193
+ </div>
194
+ </modal>
195
+ <modal :show.sync="endshow" v-ref:modalCase backdrop="false">
196
+ <header slot="modal-header" class="modal-header">
197
+ 工单结案
198
+ </header>
199
+ <article slot="modal-body" class="modal-body">
200
+ <div class="col-sm-12 form-group">
201
+ <label class="control-label col-sm-2">结案备注</label>
202
+ <div class="col-sm-9">
203
+ <input class="form-control" type="text" v-model="f_caseremarks"/>
204
+ </div>
205
+ </div>
206
+ </article>
207
+ <footer slot="modal-footer" class="modal-footer">
208
+ <button type="button" class="btn btn-success" @click='caseok'>确定</button>
209
+ <button type="button" class="btn btn-success" @click='caseclose'>关闭</button>
210
+ </footer>
211
+ </modal>
212
+ <modal :show.sync="showinfo" v-ref:infomodal :backdrop="false">
213
+ <div slot="modal-header" class="modal-header">
214
+ <h4 class="modal-title">
215
+ 工单信息维护
216
+ </h4>
217
+ </div>
218
+ <div slot="modal-body" class="modal-body">
219
+ <div class="row" style="margin-top: 6px">
220
+ <label class="control-label font text-left col-md-4 col-xs-4">维护内容</label>
221
+ <div class="col-xs-8 col-md-8">
222
+ <input type="text" v-model="information"/>
223
+ </div>
224
+ </div>
225
+ </div>
226
+ <div slot="modal-footer" class="modal-footer">
227
+ <button type="button" class="btn btn-default" @click="infoaddsure()">确定</button>
228
+ <button type="button" class="btn btn-default" @click="infoclose()">取消</button>
229
+ </div>
230
+ </modal>
231
+ <modal :show.sync="editflag" v-ref:infomodal :backdrop="false">
232
+ <div slot="modal-header" class="modal-header">
233
+ <h4 class="modal-title">
234
+ 工单退回
235
+ </h4>
236
+ </div>
237
+ <div slot="modal-body" class="modal-body">
238
+ <div class="row" style="margin-top: 6px">
239
+ <label class="col-xs-4 col-md-4 control-label font text-left">工单编号:</label>
240
+ <span>{{ sendbackmodel.f_service_id }}</span>
241
+ </div>
242
+ <div class="row" style="margin-top: 6px">
243
+ <label class="col-xs-4 col-md-4 control-label font text-left">客户名称:</label>
244
+ <span>{{ sendbackmodel.f_user_name }}</span>
245
+ </div>
246
+ <div class="row" style="margin-top: 6px">
247
+ <label class="control-label font text-left col-md-4 col-xs-4">退回原因</label>
248
+ <div class="col-xs-8 col-md-8">
249
+ <textarea style="width: 60%" name="name" rows="1" class="ver-textarea" type="text"
250
+ v-model='f_site_back_reason'></textarea>
251
+ </div>
252
+ </div>
253
+
254
+ </div>
255
+ <div slot="modal-footer" class="modal-footer">
256
+ <button type="button" name="button" class="btn btn-primary btn-photo" @click="WorkBack()">确定</button>
257
+ <button type="button" class="btn btn-default" @click="WorkBackclose()">取消</button>
258
+ </div>
259
+ </modal>
260
+ </div>
261
+ </div>
262
+ </template>
263
+ <script>
264
+ import FailureShow from '../../../components/pc/FailureShow'
265
+ import {HttpResetClass} from 'vue-client'
266
+ import * as Util from '../../../components/Util'
267
+ import Vue from 'vue'
268
+ // 工作类型对应的各项设置
269
+ const config = {
270
+ '报修单': {
271
+ path: 'getServiceMobile'
272
+ },
273
+ '置换通气单': {
274
+ path: 'getSubstitMobile'
275
+ },
276
+ '安装单': {
277
+ path: 'getInstallMobile'
278
+ }
279
+ }
280
+ export default {
281
+ title: '维修员平板首页',
282
+ data() {
283
+ return {
284
+ model: {
285
+ serviceacitivity: [{
286
+ f_site_back_date: '',
287
+ f_site_back_name: '',
288
+ serviceid: '',
289
+ f_service_acitivity_type: '打回'
290
+ }
291
+ ]
292
+ },
293
+ saveing:false,
294
+ sendbackmodel:{},
295
+ // rows: Object
296
+ rows: [{
297
+ f_user_name: '',
298
+ f_contact_phone: '',
299
+ failure: ''
300
+ }],
301
+ editshow: false,
302
+ row: {
303
+ type: Object,
304
+ default: {
305
+ f_user_name: '',
306
+ f_contact_phone: '',
307
+ failure: ''
308
+ }
309
+ },
310
+ repairtype: '',
311
+ username: '',
312
+ address: '',
313
+ moveshow: false,
314
+ repairers: [],
315
+ repairtypes: this.$appdata.getParam('报修类型') ? [{
316
+ label: '全部',
317
+ value: ''
318
+ }, ...this.$appdata.getParam('报修类型')] : [{label: '全部', value: ''}],
319
+ moveselected: '',
320
+ orderman: '',
321
+ number: 0,
322
+ listData: {
323
+ list: [],
324
+ isEnd: true,
325
+ index: 0
326
+ },
327
+ loginUser: {
328
+ name: Vue.user.name,
329
+ ename: Vue.user.ename
330
+ },
331
+ infoone: '',
332
+ showinfo: false,
333
+ editflag: false,
334
+ information: '',
335
+ backservice: '',
336
+ // 结案是否显示
337
+ endshow:false,
338
+ //结案备注
339
+ f_caseremarks:'',
340
+ // 当前处理的工单
341
+ selectone:''
342
+ }
343
+ },
344
+ props: {
345
+ worktype: {
346
+ type: String,
347
+ default: '报修单'
348
+ },
349
+ sourcet: {
350
+ type: String,
351
+ default: '横屏'
352
+ },
353
+ tabname: {
354
+ type: String
355
+ }
356
+ },
357
+ methods: {
358
+ // 结案确认
359
+ caseok(){
360
+ this.saveing = true
361
+ let info = {
362
+ id:this.selectone.id_back,
363
+ f_state : '',
364
+ f_processid: this.selectone.f_processid,
365
+ f_closing_time: Util.toStandardTimeString(),
366
+ f_orderstatus:'无法处理'
367
+ }
368
+ // 工单结案操作
369
+ let data = {model: info, loginUser: {name: Vue.user.name, ename: Vue.user.ename},f_caseremarks:this.f_caseremarks}
370
+ let http = new HttpResetClass()
371
+ http.load('POST', `${this.$androidUtil.getProxyUrl()}/rs/logic/serviceCase`, data, {
372
+ resolveMsg: null,
373
+ rejectMsg: null
374
+ }).then(() => {
375
+ this.saveing = false
376
+ this.$showMessage('结案成功!')
377
+ this.endshow = false
378
+ this.f_caseremarks = ''
379
+ // 刷新界面
380
+ this.getNewOrder()
381
+ }).catch((error)=>{
382
+ this.saveing=false
383
+ this.$showMessage('网络异常,结案失败!')
384
+ })
385
+ },
386
+ // 结案返回
387
+ caseclose(){
388
+ this.endshow = false
389
+ this.f_caseremarks = ''
390
+ this.editflag = null
391
+ },
392
+ showend(row){
393
+ this.selectone = row
394
+ this.endshow = true
395
+ },
396
+ WorkBack() {
397
+ this.saveing=true
398
+ this.model = this.sendbackmodel
399
+ this.model.serviceacitivity = [{
400
+ f_site_back_date: '',
401
+ f_site_back_name: '',
402
+ serviceid: '',
403
+ f_site_back_reason: this.f_site_back_reason,
404
+ f_service_acitivity_type: ''
405
+ }
406
+ ]
407
+ if (!this.f_site_back_reason) {
408
+ return this.$showMessage('请填写退回内容!')
409
+ }
410
+ let data = ''
411
+ data = {
412
+ model: this.model,
413
+ loginUser: {name: Vue.user.name, ename: Vue.user.name, id: Vue.user.id}
414
+ }
415
+ console.log("退回参数" + JSON.stringify(data))
416
+ let http = new HttpResetClass()
417
+ http.load('POST', `${this.$androidUtil.getProxyUrl()}/rs/logic/sendBack`, data, {
418
+ resolveMsg: null,
419
+ rejectMsg: null
420
+ }).then(() => {
421
+ this.saveing=false
422
+ this.$showMessage('退回成功!!!')
423
+ this.f_site_back_reason = ''
424
+ this.editflag = false
425
+ this.getNewOrder()
426
+ }).catch((error)=>{
427
+ this.saveing=false
428
+ this.$showMessage('网络异常,退回失败!!!')
429
+ })
430
+ },
431
+ WorkBackclose() {
432
+ this.editflag = false
433
+ },
434
+ infoaddsure() {
435
+ if (!this.information) {
436
+ return this.$showMessage('请填写维护内容!', ['confirm'])
437
+ }
438
+ // 组装数据
439
+ var data = {
440
+ id: this.infoone.id_back,
441
+ f_processid: this.infoone.f_processid,
442
+ f_content: this.information,
443
+ serviceacitivity: [{}]
444
+ }
445
+ let http = new HttpResetClass()
446
+ http.load('POST', `${this.$androidUtil.getProxyUrl()}/rs/logic/telinformation`, {
447
+ model: data,
448
+ loginUser: this.loginUser
449
+ }, {resolveMsg: null, rejectMsg: null}).then(() => {
450
+ this.$showMessage('维护内容添加成功!', ['confirm'])
451
+ this.information = ''
452
+ this.showinfo = false
453
+ })
454
+ },
455
+ infoclose() {
456
+ this.showinfo = false
457
+ },
458
+ infoadd(val) {
459
+ this.infoone = val
460
+ this.showinfo = true
461
+ },
462
+ repiarmancg(val) {
463
+ this.orderman = val
464
+ },
465
+ movedo() {
466
+ if (this.orderman == undefined || this.orderman == '') {
467
+ this.$showMessage(`请先选择接单人!`, ['confirm'])
468
+ return
469
+ }
470
+ //tag
471
+ //tag)
472
+ let result = this.$androidUtil.bzLogic('androidMoveService', {
473
+ id_back: this.moveselected.id_back,
474
+ f_reciever: this.orderman,
475
+ f_remarks: this.moveselected.f_remarks,
476
+ worktype: this.worktype
477
+ })
478
+ if (result.result === '成功') {
479
+ this.$showMessage(`向 ${this.orderman} 转单成功!`, ['confirm'])
480
+ this.orderman = ''
481
+ this.moveselected = ''
482
+ this.moveshow = false
483
+ this.ifsearch()
484
+ } else {
485
+ this.$showMessage(`转单失败,请检查网络异常!`, ['confirm'])
486
+ }
487
+ },
488
+ undo() {
489
+ this.orderman = ''
490
+ this.moveselected = ''
491
+ this.moveshow = false
492
+ },
493
+ getEmp() {
494
+ // 获取接单人数组
495
+ let val = ''
496
+ var worktypew = this.worktype == '报修单' ? '维修员' : this.worktype == '置换员' ? '置换员' : '安装员'
497
+ let http = new HttpResetClass()
498
+ //tag)
499
+ val = {
500
+ source: `this.getParentByType($organization$).getChildByName($${worktypew}$).getUsers()`,
501
+ userid: `${Vue.user.id}`
502
+ }
503
+ // val = {source: `this.getParentByType($department$).getAllChildrens().where(row.getAttributes().get($rolestr$).indexOf($${worktypew}$) != -1))`, userid: `${Vue.user.id}`}
504
+ // val = {source: `this.getParentByType($department$).getAllChildrens().where(row.getAttributes().get($rolestr$) == $${worktypew}$))`, userid: `${Vue.user.id}`}
505
+ http.load('POST', `${this.$androidUtil.getProxyUrl()}/rs/search`, {data: val}, {
506
+ resolveMsg: null,
507
+ rejectMsg: null
508
+ }).then((res) => {
509
+ res.data.forEach((item) => {
510
+ this.repairers.push({label: `${item.name}`, value: item.name})
511
+ })
512
+ })
513
+ },
514
+ ifsearch(condition) {
515
+ this.listData.list = []
516
+ this.listData.index = 0
517
+ this.listData.isEnd = true
518
+ if (!condition) {
519
+ condition = ''
520
+ }
521
+ condition = '1 = 1 ' + condition
522
+ if (this.username != '') {
523
+ condition += " and f_user_name like '%" + this.username + "%'"
524
+ }
525
+ if (this.address != '') {
526
+ condition += " and f_address like '%" + this.address + "%'"
527
+ }
528
+ if (this.repairtype != '') {
529
+ condition += " and f_repairtype = '" + this.repairtype + "'"
530
+ }
531
+ //tag
532
+ //tag
533
+ // 测试环境异步,真实环境同步
534
+ if (this.$androidUtil.isTest) {
535
+ return this.$androidUtil.path({
536
+ 'alias': `${config[this.worktype].path}`,
537
+ 'data': {condition: condition}
538
+ }).then((ret) => {
539
+ this.rows = ret.data
540
+ })
541
+ } else {
542
+ let result = this.$androidUtil.path({
543
+ 'alias': `${config[this.worktype].path}`,
544
+ 'data': {condition: condition}
545
+ })
546
+ if (result.code === 200) {
547
+ this.rows = result.data
548
+ } else {
549
+ this.$showMessage(`加载数据失败, 返回码: ${result.code}, 错误信息:${result.data}`)
550
+ }
551
+ }
552
+ this.showMore()
553
+ },
554
+ selected(row, isRecord) {
555
+ var prpdata = {
556
+ _this: this,
557
+ title: '入户维修',
558
+ safe: true
559
+ }
560
+ this.$dispatch('gotoson', prpdata)
561
+ if (this.sourcet == '横屏') {
562
+ this.$goto('repair-order', {row: row, worktype: this.worktype, isRecord: isRecord}, 'self', this.ifsearch)
563
+ } else {
564
+ this.$goto('repair-orderV', {row: row, worktype: this.worktype, isRecord: isRecord}, 'self', this.ifsearch)
565
+ }
566
+ },
567
+ sendback(row) {
568
+ this.$showMessage('退回后数据不可恢复,确认退回操作吗?', ['confirm', 'cancel'], {
569
+ resolveMsg: null,
570
+ rejectMsg: null
571
+ }).then((res) => {
572
+ if (res === 'confirm') {
573
+ this.editflag = true
574
+ this.sendbackmodel = row
575
+ console.log("需要的参数" + JSON.stringify(this.sendbackmodel))
576
+ } else {
577
+ this.editflag = false
578
+ }
579
+ })
580
+ },
581
+ moveservice(row) {
582
+ this.moveselected = row
583
+ this.moveshow = true
584
+ },
585
+ delayedit(row) {
586
+ row.state = '延期申请'
587
+ this.$goto('delay-apply', {row: row})
588
+ },
589
+ search() {
590
+ // 测试环境异步,真实环境同步
591
+ var condition = '1 = 1'
592
+ //tag
593
+ if (this.$androidUtil.isTest) {
594
+ return this.$androidUtil.path({
595
+ 'alias': `${config[this.worktype].path}`,
596
+ 'data': {condition: condition}
597
+ }).then((ret) => {
598
+ // ret.data.forEach((item) => {
599
+ // item.service_version = item.failure.indexOf("漏气") !== -1
600
+ // })
601
+ this.rows = ret.data
602
+ })
603
+ } else {
604
+ let result = this.$androidUtil.path({
605
+ 'alias': `${config[this.worktype].path}`,
606
+ 'data': {condition: condition}
607
+ })
608
+ if (result.code === 200) {
609
+ //tag)
610
+ this.rows = result.data
611
+ } else {
612
+ this.$showMessage(`加载数据失败, 返回码: ${result.code}, 错误信息:${result.data}`)
613
+ }
614
+ }
615
+ },
616
+ sumsearch() {
617
+ // 测试环境异步,真实环境同步
618
+ var condition = '1 = 1'
619
+ //tag
620
+ if (this.$androidUtil.isTest) {
621
+ return this.$androidUtil.path({
622
+ 'alias': `${config[this.worktype].path}`,
623
+ 'data': {condition: condition}
624
+ }).then((ret) => {
625
+ // ret.data.forEach((item) => {
626
+ // item.service_version = item.failure.indexOf("漏气") !== -1
627
+ // })
628
+ var titdata = {
629
+ title: this.tabname,
630
+ sum: ret.data.length
631
+ }
632
+ //tag
633
+ //tag)
634
+ this.$emit('changesum', titdata)
635
+ })
636
+ } else {
637
+ let result = this.$androidUtil.path({
638
+ 'alias': `${config[this.worktype].path}`,
639
+ 'data': {condition: condition}
640
+ })
641
+ if (result.code === 200) {
642
+ //tag)
643
+ var crv = {
644
+ title: this.tabname,
645
+ sum: result.data.length
646
+ }
647
+ //tag
648
+ //tag)
649
+ this.$emit('changesum', crv)
650
+ } else {
651
+ this.$showMessage(`加载数据失败, 返回码: ${result.code}, 错误信息:${result.data}`)
652
+ }
653
+ }
654
+ },
655
+ makeAPhoneCall(phoneNumber) {
656
+ this.$androidUtil.makeAPhoneCall(phoneNumber)
657
+ },
658
+ upload() {
659
+ this.$goto('up-load')
660
+ },
661
+ back() {
662
+ this.$back()
663
+ },
664
+ getNewOrder() {
665
+ HostApp.__this__ = this
666
+ HostApp.logicWithHint({
667
+ // logic别名,key必须为logic
668
+ 'logic': 'TelServiceTimeOut',
669
+ // 回调执行方法名,key必须为callback
670
+ 'callback': 'javascript:HostApp.__this__.getNewCallBack()',
671
+ // logic执行需要的业务参数
672
+ 'data': {params: ''},
673
+ // 固定key,代表是否将logic执行结果作为参数传入回调方法,1代表true,0代表false,
674
+ // 执行回调方法传入key为backresult
675
+ // 如需额外拼接参数,写在logic返回值的params,例如xxlogic返回:{"params": "success"}
676
+ 'backresult': 1
677
+ })
678
+ },
679
+ getNewCallBack(obj) {
680
+ //tag)
681
+ this.ifsearch()
682
+ },
683
+ showMore() {
684
+ if (!this.rows) {
685
+ return
686
+ }
687
+ let endIndex = this.listData.index + 10
688
+ if (endIndex > this.rows.length) {
689
+ endIndex = this.rows.length
690
+ }
691
+ for (; this.listData.index < endIndex; this.listData.index++) {
692
+ this.listData.list.push(this.rows[this.listData.index])
693
+ }
694
+ if (this.listData.index == this.rows.length) {
695
+ this.listData.isEnd = true
696
+ } else {
697
+ this.listData.isEnd = false
698
+ }
699
+ }
700
+ },
701
+ ready() {
702
+ let backservices = this.$appdata.getSingleValue('维修转单')
703
+ console.log("参数为:::" + backservices)
704
+ if (backservices === 'true' || backservices === '') {
705
+ this.backservice = '否'
706
+ } else {
707
+ this.backservice = '是'
708
+ }
709
+ this.getEmp()
710
+ this.ifsearch()
711
+ // var _this = this;
712
+ // this.timeoutHandle = window.setInterval(function() {
713
+ // _this.sumsearch()
714
+ // }, 6000)
715
+ },
716
+ components: {
717
+ FailureShow,
718
+ 'failure-show': FailureShow
719
+ }
720
+ }
721
+ </script>
722
+ <style scoped>
723
+ .searBtn {
724
+ background: #FFFFFF;
725
+ color: #0096fb;
726
+ border: 1px solid #0096fb;
727
+ border-radius: 5px;
728
+ padding: 8px;
729
+ text-align: center;
730
+ font-size: 1.2em;
731
+ z-index: 10;
732
+ opacity: 0.5;
733
+ bottom: 50px;
734
+ margin-top: -10px;
735
+ height: 40px;
736
+ }
737
+
738
+ .bg {
739
+ background-color: #499edf;
740
+ height: 1px;
741
+ border: 0;
742
+ }
743
+
744
+ .app-row {
745
+ background-color: white;
746
+ padding: 10px 10px 0 10px;
747
+ border-bottom: 1px solid rgba(235, 235, 235, 0.5);
748
+ }
749
+
750
+ .search_input {
751
+ border: 0;
752
+ outline: none;
753
+ }
754
+
755
+ .font {
756
+ font: 15px PingFang-SC-Medium;
757
+ color: #666666;
758
+ }
759
+
760
+ .input-font {
761
+ font: 15px PingFang-SC-Medium;
762
+ color: #333333;
763
+ }
764
+
765
+ .btn-font {
766
+ font: 600 16px PingFang-SC-Bold;
767
+ color: #499EDF;
768
+ }
769
+
770
+ .btn-color {
771
+ background-color: #FFFFFF;
772
+ border-radius: 10px;
773
+ border: 1px solid #499EDF;
774
+ }
775
+
776
+ .panel-blue-border {
777
+ border: 1px solid #499edf;
778
+ border-radius: 5px;
779
+ }
780
+ </style>