telephone-clients 4.0.0-1-89 → 4.0.0-1-90

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.
Files changed (32) hide show
  1. package/package.json +2 -2
  2. package/src/components/pc/MaintenanceWorker.vue +152 -0
  3. package/src/components/pc/NewRepairPaper.vue +704 -704
  4. package/src/components/pc/NewRepairTablePaper.vue +442 -442
  5. package/src/components/pc/WorkHistory.vue +650 -650
  6. package/src/components/pc/WorkListNew.vue +838 -838
  7. package/src/components/sendsingle/onlinecharge.vue +424 -424
  8. package/src/components/workorder/ChangeMeterPageNew.vue +663 -663
  9. package/src/components/workorder/ChangeMeterUserInfo.vue +130 -130
  10. package/src/components/workorder/RepairFirstV.vue +736 -736
  11. package/src/components/workorder/RepairInfo.vue +178 -178
  12. package/src/components/workorder/RepairOrderT.vue +713 -713
  13. package/src/components/workorder/oldMeterPage.vue +104 -104
  14. package/src/components/workorder/repairFirstTable.vue +715 -715
  15. package/src/filiale/jinhong/android/FaultAll.vue +936 -936
  16. package/src/filiale/jinhong/android/ZHihuanFirst.vue +540 -540
  17. package/src/filiale/jinhong/pc/WorkListAllNew.vue +884 -884
  18. package/src/filiale/jinhong/telephone.js +10 -10
  19. package/src/filiale/jinhong/telephoneAndroid.js +13 -13
  20. package/src/filiale/meihekou/android/Othercharge.vue +454 -454
  21. package/src/filiale/meihekou/android/PhoneStandWorkNew.vue +692 -692
  22. package/src/filiale/meihekou/android/ServiceOnlineQuery.vue +477 -477
  23. package/src/filiale/meihekou/pc/WorkListAllNew.vue +925 -901
  24. package/src/filiale/meihekou/pc/WorkListNew.vue +1103 -1049
  25. package/src/filiale/meihekou/telephoneAndroid.js +26 -26
  26. package/src/filiale/xinjiangdexin/telephone.js +16 -16
  27. package/src/filiale/xinliansihui/android/FaultAll.vue +923 -923
  28. package/src/filiale/xinliansihui/android/RepairFirstV.vue +734 -734
  29. package/src/filiale/xinliansihui/android/RepairOrderT.vue +713 -713
  30. package/src/main.js +1 -1
  31. package/src/telephone-android.js +425 -425
  32. package/src/telephone.js +799 -796
@@ -1,540 +1,540 @@
1
- <template>
2
- <!--<div class="app-botton" @click="back()">-->
3
- <!--<span class="glyphicon glyphicon-menu-left">返回</span>-->
4
- <!--</div>-->
5
- <div class="repair-bg auto" id="zhihuan-first" style="padding-bottom:5px;overflow:auto">
6
- <!--<div class="app-botton" @click="back()">-->
7
- <!--<span class="glyphicon glyphicon-menu-left">返回</span>-->
8
- <!--</div>-->
9
- <div class="bq-parent">
10
- <blockquote style="color: #499edf;border-left-color: #499edf;font-size: 16px">
11
- <p>
12
- 待办工单<span v-if="rows">({{rows.length}}单)</span>
13
- <span v-if="!rows">(暂无待处理工单)</span>
14
- <img @click="getNewOrder" src="../../../assets/shuaxindaiban1.png" style="width: 40px;padding: 5px; float:right">
15
- </p>
16
- </blockquote>
17
- </div>
18
- <div class="panel panel-default repair-info-content auto">
19
- <div class="panel-body">
20
- <!--<div class="media-right">-->
21
- <!--<img @click="search" src="../../../assets/shuaxindaiban.png" class="img-responsive media-object" style="width: 40px;padding: 5px;">-->
22
- <!--</div>-->
23
- <div class="row">
24
- <input type="text" v-model="username" placeholder='用户姓名' style="width: 30%;float: left"/>
25
- <div class="col-sm-7" style="float: left;margin-left: 3%;margin-bottom: 3%">
26
- <button type="button" name="button" class="btn btn-primary" @click='ifsearch("")' >查询</button>
27
- <button type="button" name="button" class="btn btn-primary" @click='ifsearch(" and f_orderstatus!=null ")' >查询临时保存</button>
28
- </div>
29
- </div>
30
- <div class="row">
31
- <div class="col-sm-12" style="margin-bottom: 3%">
32
- <input style="width: 100%" type="text" v-model="address" placeholder='用户地址' style="width: 100%"/>
33
- </div>
34
- </div>
35
- <div class="panel panel-default well" :class="row.failure.indexOf('漏气') !== -1 ? 'class-a':''" v-for="row in listData.list" >
36
- <div class="panel-body bg-info" style="padding: 10px">
37
- <div class="row form-group">
38
- <div class="col-sm-12 col-xs-12 col-md-12">
39
- <div class="row" >
40
- <span v-if="row.state==='延期申请'" style="color: darkred">该工单已提交延期处理请勿操作</span>
41
- <div :class="{'text-danger': row.f_remindersign}" class="col-sm-12 col-xs-12 col-md-12 padd-div-shu">
42
- 工单编号: {{row.f_service_id}}<span v-if="row.f_remindersign">(催单 {{row.f_reminderdata}}) </span>
43
- </div>
44
- <div class="col-sm-12 col-xs-12 col-md-12 padd-div-shu">
45
- 派发时间: {{row.f_created_date}}
46
- </div>
47
- <div v-show="false" class="col-sm-12 col-xs-12 col-md-12 padd-div-shu" v-if="worktype == '置换通气单'">
48
- 预约时间: {{row.f_yuyue_date}}
49
- </div>
50
- <div class="col-sm-12 col-xs-12 col-md-12 padd-div-shu" v-if="worktype == '报修单'">
51
- 报修类型: {{row.f_repairtype}}
52
- </div>
53
- <div class="col-sm-12 col-xs-12 col-md-12 padd-div-shu">
54
- 用户姓名: {{row.f_user_name}}
55
- </div>
56
- <div class="col-sm-12 col-xs-12 col-md-12 padd-div-shu">
57
- 来电电话: {{row.f_phone}}
58
- <img src="../../../assets/telphonesend.png" style="width: 12px;" @click.stop.prevent='makeAPhoneCall(row.f_phone)'>
59
- </div>
60
- <div class="col-sm-12 col-xs-12 col-md-12">
61
- 联系电话: {{row.f_contact_phone}}
62
- <img src="../../../assets/telphonesend.png" style="width: 12px;" @click.stop.prevent='makeAPhoneCall(row.f_contact_phone)'>
63
- </div>
64
- <div class="col-sm-12 col-xs-12 col-md-12 padd-div-shu">
65
- 用户地址: {{row.f_address}}
66
- </div>
67
- <div class="col-sm-12 col-xs-12 col-md-12" v-if="worktype == '报修单'||worktype == '置换通气单'">
68
- 指导建议: {{row.f_advice}}
69
- </div>
70
- <div v-show="row.f_remarks" class="col-sm-12 col-xs-12 col-md-12 padd-div-shu">
71
- 备注信息: {{row.f_remarks}}
72
- </div>
73
- <div v-show="row.f_is_block" class="col-sm-12 col-xs-12 col-md-12 padd-div-shu">
74
- 是否封堵: {{row.f_is_block}}
75
- </div>
76
- </div>
77
- </div>
78
- <div class="col-sm-12 col-xs-12 col-md-12">
79
- <button type="button" name="button" class="btn btn-primary" style="background-color:#499edf;float: right" @click="selected(row)">处理</button>
80
- <button type="button" name="button" class="btn btn-primary" style="background-color:#499edf;float: right;margin-right:10px;" @click="moveservice(row)">转单</button>
81
- <button type="button" name="button" class="btn btn-primary" style="background-color:#499edf;float: right;margin-right:10px;" @click="showshutdown(row)">结案</button>
82
- <!--<button type="button" name="button" class="btn btn-primary" @click="delayedit(row)">延期申请</button>-->
83
- </div>
84
- </div>
85
- </div>
86
- </div>
87
- <div style="height:auto;width: 100%;text-align: center">
88
- <a v-if="!listData.isEnd" @click="showMore()">展开更多......</a>
89
- <span v-if="listData.isEnd">到底了......</span>
90
- </div>
91
- </div>
92
- <modal :show.sync="moveshow" v-ref:modal :backdrop="false">
93
- <div slot="modal-header" class="modal-header">
94
- <h4 class="modal-title">
95
- 转单
96
- </h4>
97
- </div>
98
- <div slot="modal-body" class="modal-body">
99
- <div class="row" style="margin-top: 6px">
100
- <label class="col-xs-4 col-md-4 control-label font text-left">接单人</label>
101
- <div class="col-xs-8">
102
- <v-select :value="orderman" :value-single="true"
103
- :options='repairers' placeholder='请选择接单人'
104
- close-on-select v-on:change="repiarmancg"></v-select>
105
- </div>
106
- </div>
107
- <div class="row" style="margin-top: 6px">
108
- <label class="control-label font text-left col-md-4 col-xs-4">备注</label>
109
- <div class="col-xs-8 col-md-8">
110
- <input type="text" v-model="moveselected.f_remarks"/>
111
- </div>
112
- </div>
113
- </div>
114
- <div slot="modal-footer" class="modal-footer">
115
- <button type="button" class="btn btn-default" @click="movedo()">确定</button>
116
- <button type="button" class="btn btn-default" @click="undo()">取消</button>
117
- </div>
118
- </modal>
119
- <modal :show.sync="shutshow" v-ref:modal :backdrop="false">
120
- <div slot="modal-header" class="modal-header">
121
- <h4 class="modal-title">
122
- 结案
123
- </h4>
124
- </div>
125
- <div slot="modal-body" class="modal-body">
126
- <div class="row" style="margin-top: 6px">
127
- <label class="control-label font text-left col-md-4 col-xs-4">备注</label>
128
- <div class="col-xs-8 col-md-8">
129
- <input type="text" v-model="shutrow.f_remarks"/>
130
- </div>
131
- </div>
132
- </div>
133
- <div slot="modal-footer" class="modal-footer">
134
- <button type="button" class="btn btn-default" @click="shutdown(shutrow)">确定</button>
135
- <button type="button" class="btn btn-default" @click="undo()">取消</button>
136
- </div>
137
- </modal>
138
- </div>
139
- </div>
140
- </template>
141
- <script>
142
- import FailureShow from '../../../components/pc/FailureShow'
143
- import { HttpResetClass } from 'vue-client'
144
- import Vue from 'vue'
145
- import * as Util from "../../../components/Util";
146
- // 工作类型对应的各项设置
147
- const config = {
148
- '报修单': {
149
- path: 'getServiceMobile'
150
- },
151
- '置换通气单': {
152
- path: 'getSubstitMobile'
153
- }
154
- }
155
- export default{
156
- title: '维修员平板首页',
157
- data () {
158
- return {
159
- // rows: Object
160
- rows: [{
161
- f_user_name:'',
162
- f_contact_phone:'',
163
- failure:''
164
- }],
165
- editshow:false,
166
- row:{
167
- type:Object,
168
- default:{
169
- f_user_name:'',
170
- f_contact_phone:'',
171
- failure:''
172
- }
173
- },
174
- username:'',
175
- address:'',
176
- moveshow:false,
177
- moveselected:'',
178
- orderman:'',
179
- number:0,
180
- savebutten:true, // 工单保存按钮
181
- wwcbutten:true, // 未完成按钮
182
- wwxbutten:true, // 未维修按钮
183
- jabutten:true, //结案按钮
184
- imgurl: 'http://192.168.2.77:8081',
185
- fileName: '',
186
- datajson: '',
187
- norepair: '',
188
- showNorepair: false,
189
- showCannotrepair: false,
190
- showhead: true,
191
- repairers : [],
192
- config:{},
193
- shutshow: false,
194
- shutrow: {},
195
- listData: {
196
- list: [],
197
- isEnd: true,
198
- index: 0
199
- }
200
- }
201
- },
202
- props: {
203
- worktype:{
204
- type:String,
205
- default:'置换通气单'
206
- },
207
- sourcet:{
208
- type:String,
209
- default:'横屏'
210
- },
211
- tabname:{
212
- type:String
213
- },
214
- msg: {
215
- type: Object
216
- },
217
- savevalid: {
218
- type: Object
219
- },
220
- model: {
221
- type: Object
222
- },
223
- show: {
224
- type: Boolean,
225
- default: false
226
- },
227
- system: ''
228
- },
229
- methods: {
230
- repiarmancg(val){
231
- this.orderman = val
232
- },
233
- movedo(){
234
- if(this.orderman == undefined || this.orderman == '' ){
235
- this.$showMessage(`请先选择接单人!`, ['confirm'])
236
- return
237
- }
238
- //tag
239
- //tag)
240
- let result = this.$androidUtil.bzLogic('androidMoveService', {id_back: this.moveselected.id_back, f_reciever: this.orderman,worktype:this.worktype, f_remarks: this.moveselected.f_remarks})
241
- if (result.result === '成功') {
242
- this.$showMessage(`向 ${this.orderman} 转单成功!`, ['confirm'])
243
- this.orderman = ''
244
- this.moveselected = ''
245
- this.moveshow = false
246
- this.ifsearch()
247
- } else {
248
- this.$showMessage(`转单失败,请检查网络异常!`, ['confirm'])
249
- }
250
-
251
- },
252
- undo(){
253
- this.orderman = ''
254
- this.moveselected = ''
255
- this.moveshow = false
256
- this.shutshow = false
257
- },
258
- getEmp () {
259
- // 获取接单人数组
260
- let val = ''
261
- var worktypew = this.worktype == '报修单' ? '维修员':'置换员'
262
- let http = new HttpResetClass()
263
- val = {source: `this.getParentByType($department$).getAllChildrens().where(row.getAttributes().get($rolestr$).indexOf($${worktypew}$) != -1))`, userid: `${Vue.user.id}`}
264
- // val = {source: `this.getParentByType($department$).getAllChildrens().where(row.getAttributes().get($rolestr$) == $${worktypew}$))`, userid: `${Vue.user.id}`}
265
- http.load('POST', `${this.$androidUtil.getProxyUrl()}/rs/search`, {data: val}, {resolveMsg: null, rejectMsg: null}).then((res) => {
266
- res.data.forEach((item) => {
267
- this.repairers.push({label: `${item.name}`, value: item.name})
268
- })
269
- })
270
- },
271
- ifsearch(condition){
272
- this.listData.list = []
273
- this.listData.index = 0
274
- this.listData.isEnd = true
275
- if (!condition) {
276
- condition = ''
277
- }
278
- condition = '1 = 1 ' + condition
279
- if(this.username != ''){
280
- condition += " and f_user_name like '%" + this.username + "%'"
281
- }
282
- if(this.address != ''){
283
- condition += " and f_address like '%" + this.address + "%'"
284
- }
285
- let result = this.$androidUtil.path({'alias':`${config[this.worktype].path}`,'data':{condition:condition}})
286
- if (result.code === 200) {
287
- this.rows = result.data
288
- } else {
289
- this.$showMessage(`加载数据失败, 返回码: ${result.code}, 错误信息:${result.data}`)
290
- }
291
- this.showMore()
292
- },
293
- selected (row) {
294
- var prpdata = {
295
- _this:this,
296
- title:'入户置换',
297
- safe:true
298
- }
299
- this.$dispatch('gotoson',prpdata)
300
- if(this.sourcet == '横屏'){
301
- this.$goto('repair-order', {row: row,worktype:this.worktype},'self',this.getNewOrder)
302
- }else{
303
- this.$goto('repair-orderV', {row: row,worktype:this.worktype},'self',this.getNewOrder)
304
- }
305
- },
306
- moveservice(row){
307
- this.moveselected = row
308
- this.moveshow = true
309
- },
310
- delayedit (row) {
311
- row.state = '延期申请'
312
- this.$goto('delay-apply', {row:row})
313
- },
314
- search () {
315
- // 测试环境异步,真实环境同步
316
- var condition = '1 = 1'
317
- //tag
318
- if (this.$androidUtil.isTest) {
319
- return this.$androidUtil.path({'alias':`${config[this.worktype].path}`,'data':{condition:condition}}).then((ret) => {
320
- // ret.data.forEach((item) => {
321
- // item.service_version = item.failure.indexOf("漏气") !== -1
322
- // })
323
- this.rows = ret.data
324
- })
325
- } else {
326
- let result = this.$androidUtil.path({'alias':`${config[this.worktype].path}`,'data':{condition:condition}})
327
- if (result.code === 200) {
328
- //tag)
329
- this.rows = result.data
330
- } else {
331
- this.$showMessage(`加载数据失败, 返回码: ${result.code}, 错误信息:${result.data}`)
332
- }
333
- }
334
- },
335
- sumsearch () {
336
- // 测试环境异步,真实环境同步
337
- var condition = '1 = 1'
338
- //tag
339
- if (this.$androidUtil.isTest) {
340
- return this.$androidUtil.path({'alias':`${config[this.worktype].path}`,'data':{condition:condition}}).then((ret) => {
341
- // ret.data.forEach((item) => {
342
- // item.service_version = item.failure.indexOf("漏气") !== -1
343
- // })
344
- var crv = {
345
- title:this.tabname,
346
- sum:ret.data.length
347
- }
348
- this.$emit('changesum',crv)
349
- })
350
- } else {
351
- let result = this.$androidUtil.path({'alias':`${config[this.worktype].path}`,'data':{condition:condition}})
352
- if (result.code === 200) {
353
- //tag)
354
- var crv = {
355
- title:this.tabname,
356
- sum:result.data.length
357
- }
358
- this.$emit('changesum',crv)
359
- } else {
360
- this.$showMessage(`加载数据失败, 返回码: ${result.code}, 错误信息:${result.data}`)
361
- }
362
- }
363
- },
364
- makeAPhoneCall(phoneNumber) {
365
- this.$androidUtil.makeAPhoneCall(phoneNumber)
366
- },
367
- upload () {
368
- this.$goto('up-load')
369
- },
370
- back () {
371
- this.$back()
372
- },
373
- async showshutdown(row) {
374
- this.shutrow = row
375
- this.shutshow = true
376
- },
377
- async shutdown(row){
378
- this.shutshow = false
379
- let repairdetails = []
380
- if(Vue.config.telephone.RepairsConfig.data != undefined){
381
- //tag
382
- //tag)
383
- repairdetails = Object.assign([], JSON.parse(JSON.stringify(Vue.config.telephone.RepairsConfig.data)))
384
- }else{
385
- this.$showMessage('网络异常,请重新登陆系统!', ['confirm'])
386
- return
387
- }
388
- let data = {
389
- id: row.id,
390
- model: {
391
- serviceacitivity: [{
392
- f_result_status: '结案',
393
- f_is_abnormal: '',
394
- f_date_leave: Util.toStandardTimeString(),
395
- f_is_userfilesadd: "未上传",
396
- f_workorder_type: "置换通气单",
397
- f_order_man: Vue.user.name,
398
- f_service_acitivity_type: "置换通气单"
399
- }],
400
- f_processid: row.f_processid,
401
- id_back: row.id_back,
402
- f_source: '',
403
- id: row.id,
404
- f_success: '成功',
405
- f_remarks: row.f_remarks
406
- },
407
- loginUser: {
408
- name: Vue.user.name,
409
- ename: Vue.user.ename
410
- }
411
- }
412
- if (repairdetails.length > 0) {
413
- let repairlist = []
414
- for (let j = 0;j< repairdetails.length;j++) {
415
- let repairitem = []
416
- for (let i = 0;i< repairdetails[j].details.length;i++) {
417
- repairitem.push({f_project:repairdetails[j].details[i].f_project,type:repairdetails[j].details[i].type,f_status:'',f_content:'',f_is_must:repairdetails[j].details[i].f_is_must ? 'true':'false'})
418
- }
419
- repairlist.push({f_type: repairdetails[j].f_type, details: repairitem,imgs:[],f_remarks:repairdetails[j].f_remarks})
420
- }
421
- data.model.serviceacitivity[0].servicerepair = Object.assign([], repairlist)
422
- }
423
- //tag)
424
- data.model = Object.assign(data.model, row)
425
- this.deleteEmptyProperty(data.model)
426
- //tag)
427
- try {
428
- let res = await this.$androidUtil.bzLogic("WorkOrderClose", data)
429
- //tag)
430
- this.$showMessage('该工单已结案')
431
- this.ifsearch()
432
- } catch (e) {
433
- this.$showMessage('网络连接失败,请稍后再试。')
434
- }
435
- },
436
- showMore() {
437
- if (!this.rows) {
438
- return
439
- }
440
- let endIndex = this.listData.index + 10
441
- if (endIndex > this.rows.length) {
442
- endIndex = this.rows.length
443
- }
444
- for (; this.listData.index < endIndex; this.listData.index++) {
445
- this.listData.list.push(this.rows[this.listData.index])
446
- }
447
- if(this.listData.index == this.rows.length){
448
- this.listData.isEnd = true
449
- }else {
450
- this.listData.isEnd = false
451
- }
452
- },
453
- deleteEmptyProperty(object){
454
- for (var i in object) {
455
- var value = object[i];
456
- if (typeof value === 'object') {
457
- if (Array.isArray(value)) {
458
- if (value.length == 0) {
459
- delete object[i];
460
- //tag;
461
- continue;
462
- }
463
- }
464
- this.deleteEmptyProperty(value);
465
- if (this.isEmpty(value)) {
466
- //tag;
467
- delete object[i];
468
- //tag;
469
- }
470
- } else {
471
- if (value === '' || value === null || value === undefined) {
472
- delete object[i];
473
- //tag;
474
- } else {
475
- //tag;
476
- }
477
- }
478
- }
479
- },
480
- isEmpty(object) {
481
- for (var name in object) {
482
- return false;
483
- }
484
- return true;
485
- },
486
- getNewOrder(){
487
- HostApp.__this__ = this
488
- HostApp.logicWithHint({
489
- // logic别名,key必须为logic
490
- 'logic': 'TelServiceTimeOut',
491
- // 回调执行方法名,key必须为callback
492
- 'callback': 'javascript:HostApp.__this__.getNewCallBack()',
493
- // logic执行需要的业务参数
494
- 'data': {params: ''},
495
- // 固定key,代表是否将logic执行结果作为参数传入回调方法,1代表true,0代表false,
496
- // 执行回调方法传入key为backresult
497
- // 如需额外拼接参数,写在logic返回值的params,例如xxlogic返回:{"params": "success"}
498
- 'backresult': 1
499
- })
500
- },
501
- getNewCallBack(obj){
502
- //tag)
503
- this.ifsearch()
504
- }
505
- },
506
- ready () {
507
- this.getEmp()
508
- this.ifsearch()
509
- // var _this = this;
510
- // this.timeoutHandle = window.setInterval(function() {
511
- // _this.sumsearch()
512
- // }, 6000)
513
- },
514
- components: {
515
- FailureShow,
516
- 'failure-show': FailureShow
517
- }
518
- }
519
- </script>
520
- <style>
521
- .class-a{
522
- border:1px solid red;
523
- }
524
- .padd-div-shu{
525
- padding-bottom: 5px;
526
- }
527
- .app-botton {
528
- position:fixed;
529
- background: #87b2dd;
530
- color: #FFF;
531
- padding: 8px;
532
- text-align: center;
533
- font-size: 1.2em;
534
- z-index: 10;
535
- opacity:0.5;
536
- bottom: 50px;
537
- margin-top: -10px;
538
- height: 40px;
539
- }
540
- </style>
1
+ <template>
2
+ <!--<div class="app-botton" @click="back()">-->
3
+ <!--<span class="glyphicon glyphicon-menu-left">返回</span>-->
4
+ <!--</div>-->
5
+ <div class="repair-bg auto" id="zhihuan-first" style="padding-bottom:5px;overflow:auto">
6
+ <!--<div class="app-botton" @click="back()">-->
7
+ <!--<span class="glyphicon glyphicon-menu-left">返回</span>-->
8
+ <!--</div>-->
9
+ <div class="bq-parent">
10
+ <blockquote style="color: #499edf;border-left-color: #499edf;font-size: 16px">
11
+ <p>
12
+ 待办工单<span v-if="rows">({{rows.length}}单)</span>
13
+ <span v-if="!rows">(暂无待处理工单)</span>
14
+ <img @click="getNewOrder" src="../../../assets/shuaxindaiban1.png" style="width: 40px;padding: 5px; float:right">
15
+ </p>
16
+ </blockquote>
17
+ </div>
18
+ <div class="panel panel-default repair-info-content auto">
19
+ <div class="panel-body">
20
+ <!--<div class="media-right">-->
21
+ <!--<img @click="search" src="../../../assets/shuaxindaiban.png" class="img-responsive media-object" style="width: 40px;padding: 5px;">-->
22
+ <!--</div>-->
23
+ <div class="row">
24
+ <input type="text" v-model="username" placeholder='用户姓名' style="width: 30%;float: left"/>
25
+ <div class="col-sm-7" style="float: left;margin-left: 3%;margin-bottom: 3%">
26
+ <button type="button" name="button" class="btn btn-primary" @click='ifsearch("")' >查询</button>
27
+ <button type="button" name="button" class="btn btn-primary" @click='ifsearch(" and f_orderstatus!=null ")' >查询临时保存</button>
28
+ </div>
29
+ </div>
30
+ <div class="row">
31
+ <div class="col-sm-12" style="margin-bottom: 3%">
32
+ <input style="width: 100%" type="text" v-model="address" placeholder='用户地址' style="width: 100%"/>
33
+ </div>
34
+ </div>
35
+ <div class="panel panel-default well" :class="row.failure.indexOf('漏气') !== -1 ? 'class-a':''" v-for="row in listData.list" >
36
+ <div class="panel-body bg-info" style="padding: 10px">
37
+ <div class="row form-group">
38
+ <div class="col-sm-12 col-xs-12 col-md-12">
39
+ <div class="row" >
40
+ <span v-if="row.state==='延期申请'" style="color: darkred">该工单已提交延期处理请勿操作</span>
41
+ <div :class="{'text-danger': row.f_remindersign}" class="col-sm-12 col-xs-12 col-md-12 padd-div-shu">
42
+ 工单编号: {{row.f_service_id}}<span v-if="row.f_remindersign">(催单 {{row.f_reminderdata}}) </span>
43
+ </div>
44
+ <div class="col-sm-12 col-xs-12 col-md-12 padd-div-shu">
45
+ 派发时间: {{row.f_created_date}}
46
+ </div>
47
+ <div v-show="false" class="col-sm-12 col-xs-12 col-md-12 padd-div-shu" v-if="worktype == '置换通气单'">
48
+ 预约时间: {{row.f_yuyue_date}}
49
+ </div>
50
+ <div class="col-sm-12 col-xs-12 col-md-12 padd-div-shu" v-if="worktype == '报修单'">
51
+ 报修类型: {{row.f_repairtype}}
52
+ </div>
53
+ <div class="col-sm-12 col-xs-12 col-md-12 padd-div-shu">
54
+ 用户姓名: {{row.f_user_name}}
55
+ </div>
56
+ <div class="col-sm-12 col-xs-12 col-md-12 padd-div-shu">
57
+ 来电电话: {{row.f_phone}}
58
+ <img src="../../../assets/telphonesend.png" style="width: 12px;" @click.stop.prevent='makeAPhoneCall(row.f_phone)'>
59
+ </div>
60
+ <div class="col-sm-12 col-xs-12 col-md-12">
61
+ 联系电话: {{row.f_contact_phone}}
62
+ <img src="../../../assets/telphonesend.png" style="width: 12px;" @click.stop.prevent='makeAPhoneCall(row.f_contact_phone)'>
63
+ </div>
64
+ <div class="col-sm-12 col-xs-12 col-md-12 padd-div-shu">
65
+ 用户地址: {{row.f_address}}
66
+ </div>
67
+ <div class="col-sm-12 col-xs-12 col-md-12" v-if="worktype == '报修单'||worktype == '置换通气单'">
68
+ 指导建议: {{row.f_advice}}
69
+ </div>
70
+ <div v-show="row.f_remarks" class="col-sm-12 col-xs-12 col-md-12 padd-div-shu">
71
+ 备注信息: {{row.f_remarks}}
72
+ </div>
73
+ <div v-show="row.f_is_block" class="col-sm-12 col-xs-12 col-md-12 padd-div-shu">
74
+ 是否封堵: {{row.f_is_block}}
75
+ </div>
76
+ </div>
77
+ </div>
78
+ <div class="col-sm-12 col-xs-12 col-md-12">
79
+ <button type="button" name="button" class="btn btn-primary" style="background-color:#499edf;float: right" @click="selected(row)">处理</button>
80
+ <button type="button" name="button" class="btn btn-primary" style="background-color:#499edf;float: right;margin-right:10px;" @click="moveservice(row)">转单</button>
81
+ <button type="button" name="button" class="btn btn-primary" style="background-color:#499edf;float: right;margin-right:10px;" @click="showshutdown(row)">结案</button>
82
+ <!--<button type="button" name="button" class="btn btn-primary" @click="delayedit(row)">延期申请</button>-->
83
+ </div>
84
+ </div>
85
+ </div>
86
+ </div>
87
+ <div style="height:auto;width: 100%;text-align: center">
88
+ <a v-if="!listData.isEnd" @click="showMore()">展开更多......</a>
89
+ <span v-if="listData.isEnd">到底了......</span>
90
+ </div>
91
+ </div>
92
+ <modal :show.sync="moveshow" v-ref:modal :backdrop="false">
93
+ <div slot="modal-header" class="modal-header">
94
+ <h4 class="modal-title">
95
+ 转单
96
+ </h4>
97
+ </div>
98
+ <div slot="modal-body" class="modal-body">
99
+ <div class="row" style="margin-top: 6px">
100
+ <label class="col-xs-4 col-md-4 control-label font text-left">接单人</label>
101
+ <div class="col-xs-8">
102
+ <v-select :value="orderman" :value-single="true"
103
+ :options='repairers' placeholder='请选择接单人'
104
+ close-on-select v-on:change="repiarmancg"></v-select>
105
+ </div>
106
+ </div>
107
+ <div class="row" style="margin-top: 6px">
108
+ <label class="control-label font text-left col-md-4 col-xs-4">备注</label>
109
+ <div class="col-xs-8 col-md-8">
110
+ <input type="text" v-model="moveselected.f_remarks"/>
111
+ </div>
112
+ </div>
113
+ </div>
114
+ <div slot="modal-footer" class="modal-footer">
115
+ <button type="button" class="btn btn-default" @click="movedo()">确定</button>
116
+ <button type="button" class="btn btn-default" @click="undo()">取消</button>
117
+ </div>
118
+ </modal>
119
+ <modal :show.sync="shutshow" v-ref:modal :backdrop="false">
120
+ <div slot="modal-header" class="modal-header">
121
+ <h4 class="modal-title">
122
+ 结案
123
+ </h4>
124
+ </div>
125
+ <div slot="modal-body" class="modal-body">
126
+ <div class="row" style="margin-top: 6px">
127
+ <label class="control-label font text-left col-md-4 col-xs-4">备注</label>
128
+ <div class="col-xs-8 col-md-8">
129
+ <input type="text" v-model="shutrow.f_remarks"/>
130
+ </div>
131
+ </div>
132
+ </div>
133
+ <div slot="modal-footer" class="modal-footer">
134
+ <button type="button" class="btn btn-default" @click="shutdown(shutrow)">确定</button>
135
+ <button type="button" class="btn btn-default" @click="undo()">取消</button>
136
+ </div>
137
+ </modal>
138
+ </div>
139
+ </div>
140
+ </template>
141
+ <script>
142
+ import FailureShow from '../../../components/pc/FailureShow'
143
+ import { HttpResetClass } from 'vue-client'
144
+ import Vue from 'vue'
145
+ import * as Util from "../../../components/Util";
146
+ // 工作类型对应的各项设置
147
+ const config = {
148
+ '报修单': {
149
+ path: 'getServiceMobile'
150
+ },
151
+ '置换通气单': {
152
+ path: 'getSubstitMobile'
153
+ }
154
+ }
155
+ export default{
156
+ title: '维修员平板首页',
157
+ data () {
158
+ return {
159
+ // rows: Object
160
+ rows: [{
161
+ f_user_name:'',
162
+ f_contact_phone:'',
163
+ failure:''
164
+ }],
165
+ editshow:false,
166
+ row:{
167
+ type:Object,
168
+ default:{
169
+ f_user_name:'',
170
+ f_contact_phone:'',
171
+ failure:''
172
+ }
173
+ },
174
+ username:'',
175
+ address:'',
176
+ moveshow:false,
177
+ moveselected:'',
178
+ orderman:'',
179
+ number:0,
180
+ savebutten:true, // 工单保存按钮
181
+ wwcbutten:true, // 未完成按钮
182
+ wwxbutten:true, // 未维修按钮
183
+ jabutten:true, //结案按钮
184
+ imgurl: 'http://192.168.2.77:8081',
185
+ fileName: '',
186
+ datajson: '',
187
+ norepair: '',
188
+ showNorepair: false,
189
+ showCannotrepair: false,
190
+ showhead: true,
191
+ repairers : [],
192
+ config:{},
193
+ shutshow: false,
194
+ shutrow: {},
195
+ listData: {
196
+ list: [],
197
+ isEnd: true,
198
+ index: 0
199
+ }
200
+ }
201
+ },
202
+ props: {
203
+ worktype:{
204
+ type:String,
205
+ default:'置换通气单'
206
+ },
207
+ sourcet:{
208
+ type:String,
209
+ default:'横屏'
210
+ },
211
+ tabname:{
212
+ type:String
213
+ },
214
+ msg: {
215
+ type: Object
216
+ },
217
+ savevalid: {
218
+ type: Object
219
+ },
220
+ model: {
221
+ type: Object
222
+ },
223
+ show: {
224
+ type: Boolean,
225
+ default: false
226
+ },
227
+ system: ''
228
+ },
229
+ methods: {
230
+ repiarmancg(val){
231
+ this.orderman = val
232
+ },
233
+ movedo(){
234
+ if(this.orderman == undefined || this.orderman == '' ){
235
+ this.$showMessage(`请先选择接单人!`, ['confirm'])
236
+ return
237
+ }
238
+ //tag
239
+ //tag)
240
+ let result = this.$androidUtil.bzLogic('androidMoveService', {id_back: this.moveselected.id_back, f_reciever: this.orderman,worktype:this.worktype, f_remarks: this.moveselected.f_remarks})
241
+ if (result.result === '成功') {
242
+ this.$showMessage(`向 ${this.orderman} 转单成功!`, ['confirm'])
243
+ this.orderman = ''
244
+ this.moveselected = ''
245
+ this.moveshow = false
246
+ this.ifsearch()
247
+ } else {
248
+ this.$showMessage(`转单失败,请检查网络异常!`, ['confirm'])
249
+ }
250
+
251
+ },
252
+ undo(){
253
+ this.orderman = ''
254
+ this.moveselected = ''
255
+ this.moveshow = false
256
+ this.shutshow = false
257
+ },
258
+ getEmp () {
259
+ // 获取接单人数组
260
+ let val = ''
261
+ var worktypew = this.worktype == '报修单' ? '维修员':'置换员'
262
+ let http = new HttpResetClass()
263
+ val = {source: `this.getParentByType($department$).getAllChildrens().where(row.getAttributes().get($rolestr$).indexOf($${worktypew}$) != -1))`, userid: `${Vue.user.id}`}
264
+ // val = {source: `this.getParentByType($department$).getAllChildrens().where(row.getAttributes().get($rolestr$) == $${worktypew}$))`, userid: `${Vue.user.id}`}
265
+ http.load('POST', `${this.$androidUtil.getProxyUrl()}/rs/search`, {data: val}, {resolveMsg: null, rejectMsg: null}).then((res) => {
266
+ res.data.forEach((item) => {
267
+ this.repairers.push({label: `${item.name}`, value: item.name})
268
+ })
269
+ })
270
+ },
271
+ ifsearch(condition){
272
+ this.listData.list = []
273
+ this.listData.index = 0
274
+ this.listData.isEnd = true
275
+ if (!condition) {
276
+ condition = ''
277
+ }
278
+ condition = '1 = 1 ' + condition
279
+ if(this.username != ''){
280
+ condition += " and f_user_name like '%" + this.username + "%'"
281
+ }
282
+ if(this.address != ''){
283
+ condition += " and f_address like '%" + this.address + "%'"
284
+ }
285
+ let result = this.$androidUtil.path({'alias':`${config[this.worktype].path}`,'data':{condition:condition}})
286
+ if (result.code === 200) {
287
+ this.rows = result.data
288
+ } else {
289
+ this.$showMessage(`加载数据失败, 返回码: ${result.code}, 错误信息:${result.data}`)
290
+ }
291
+ this.showMore()
292
+ },
293
+ selected (row) {
294
+ var prpdata = {
295
+ _this:this,
296
+ title:'入户置换',
297
+ safe:true
298
+ }
299
+ this.$dispatch('gotoson',prpdata)
300
+ if(this.sourcet == '横屏'){
301
+ this.$goto('repair-order', {row: row,worktype:this.worktype},'self',this.getNewOrder)
302
+ }else{
303
+ this.$goto('repair-orderV', {row: row,worktype:this.worktype},'self',this.getNewOrder)
304
+ }
305
+ },
306
+ moveservice(row){
307
+ this.moveselected = row
308
+ this.moveshow = true
309
+ },
310
+ delayedit (row) {
311
+ row.state = '延期申请'
312
+ this.$goto('delay-apply', {row:row})
313
+ },
314
+ search () {
315
+ // 测试环境异步,真实环境同步
316
+ var condition = '1 = 1'
317
+ //tag
318
+ if (this.$androidUtil.isTest) {
319
+ return this.$androidUtil.path({'alias':`${config[this.worktype].path}`,'data':{condition:condition}}).then((ret) => {
320
+ // ret.data.forEach((item) => {
321
+ // item.service_version = item.failure.indexOf("漏气") !== -1
322
+ // })
323
+ this.rows = ret.data
324
+ })
325
+ } else {
326
+ let result = this.$androidUtil.path({'alias':`${config[this.worktype].path}`,'data':{condition:condition}})
327
+ if (result.code === 200) {
328
+ //tag)
329
+ this.rows = result.data
330
+ } else {
331
+ this.$showMessage(`加载数据失败, 返回码: ${result.code}, 错误信息:${result.data}`)
332
+ }
333
+ }
334
+ },
335
+ sumsearch () {
336
+ // 测试环境异步,真实环境同步
337
+ var condition = '1 = 1'
338
+ //tag
339
+ if (this.$androidUtil.isTest) {
340
+ return this.$androidUtil.path({'alias':`${config[this.worktype].path}`,'data':{condition:condition}}).then((ret) => {
341
+ // ret.data.forEach((item) => {
342
+ // item.service_version = item.failure.indexOf("漏气") !== -1
343
+ // })
344
+ var crv = {
345
+ title:this.tabname,
346
+ sum:ret.data.length
347
+ }
348
+ this.$emit('changesum',crv)
349
+ })
350
+ } else {
351
+ let result = this.$androidUtil.path({'alias':`${config[this.worktype].path}`,'data':{condition:condition}})
352
+ if (result.code === 200) {
353
+ //tag)
354
+ var crv = {
355
+ title:this.tabname,
356
+ sum:result.data.length
357
+ }
358
+ this.$emit('changesum',crv)
359
+ } else {
360
+ this.$showMessage(`加载数据失败, 返回码: ${result.code}, 错误信息:${result.data}`)
361
+ }
362
+ }
363
+ },
364
+ makeAPhoneCall(phoneNumber) {
365
+ this.$androidUtil.makeAPhoneCall(phoneNumber)
366
+ },
367
+ upload () {
368
+ this.$goto('up-load')
369
+ },
370
+ back () {
371
+ this.$back()
372
+ },
373
+ async showshutdown(row) {
374
+ this.shutrow = row
375
+ this.shutshow = true
376
+ },
377
+ async shutdown(row){
378
+ this.shutshow = false
379
+ let repairdetails = []
380
+ if(Vue.config.telephone.RepairsConfig.data != undefined){
381
+ //tag
382
+ //tag)
383
+ repairdetails = Object.assign([], JSON.parse(JSON.stringify(Vue.config.telephone.RepairsConfig.data)))
384
+ }else{
385
+ this.$showMessage('网络异常,请重新登陆系统!', ['confirm'])
386
+ return
387
+ }
388
+ let data = {
389
+ id: row.id,
390
+ model: {
391
+ serviceacitivity: [{
392
+ f_result_status: '结案',
393
+ f_is_abnormal: '',
394
+ f_date_leave: Util.toStandardTimeString(),
395
+ f_is_userfilesadd: "未上传",
396
+ f_workorder_type: "置换通气单",
397
+ f_order_man: Vue.user.name,
398
+ f_service_acitivity_type: "置换通气单"
399
+ }],
400
+ f_processid: row.f_processid,
401
+ id_back: row.id_back,
402
+ f_source: '',
403
+ id: row.id,
404
+ f_success: '成功',
405
+ f_remarks: row.f_remarks
406
+ },
407
+ loginUser: {
408
+ name: Vue.user.name,
409
+ ename: Vue.user.ename
410
+ }
411
+ }
412
+ if (repairdetails.length > 0) {
413
+ let repairlist = []
414
+ for (let j = 0;j< repairdetails.length;j++) {
415
+ let repairitem = []
416
+ for (let i = 0;i< repairdetails[j].details.length;i++) {
417
+ repairitem.push({f_project:repairdetails[j].details[i].f_project,type:repairdetails[j].details[i].type,f_status:'',f_content:'',f_is_must:repairdetails[j].details[i].f_is_must ? 'true':'false'})
418
+ }
419
+ repairlist.push({f_type: repairdetails[j].f_type, details: repairitem,imgs:[],f_remarks:repairdetails[j].f_remarks})
420
+ }
421
+ data.model.serviceacitivity[0].servicerepair = Object.assign([], repairlist)
422
+ }
423
+ //tag)
424
+ data.model = Object.assign(data.model, row)
425
+ this.deleteEmptyProperty(data.model)
426
+ //tag)
427
+ try {
428
+ let res = await this.$androidUtil.bzLogic("WorkOrderClose", data)
429
+ //tag)
430
+ this.$showMessage('该工单已结案')
431
+ this.ifsearch()
432
+ } catch (e) {
433
+ this.$showMessage('网络连接失败,请稍后再试。')
434
+ }
435
+ },
436
+ showMore() {
437
+ if (!this.rows) {
438
+ return
439
+ }
440
+ let endIndex = this.listData.index + 10
441
+ if (endIndex > this.rows.length) {
442
+ endIndex = this.rows.length
443
+ }
444
+ for (; this.listData.index < endIndex; this.listData.index++) {
445
+ this.listData.list.push(this.rows[this.listData.index])
446
+ }
447
+ if(this.listData.index == this.rows.length){
448
+ this.listData.isEnd = true
449
+ }else {
450
+ this.listData.isEnd = false
451
+ }
452
+ },
453
+ deleteEmptyProperty(object){
454
+ for (var i in object) {
455
+ var value = object[i];
456
+ if (typeof value === 'object') {
457
+ if (Array.isArray(value)) {
458
+ if (value.length == 0) {
459
+ delete object[i];
460
+ //tag;
461
+ continue;
462
+ }
463
+ }
464
+ this.deleteEmptyProperty(value);
465
+ if (this.isEmpty(value)) {
466
+ //tag;
467
+ delete object[i];
468
+ //tag;
469
+ }
470
+ } else {
471
+ if (value === '' || value === null || value === undefined) {
472
+ delete object[i];
473
+ //tag;
474
+ } else {
475
+ //tag;
476
+ }
477
+ }
478
+ }
479
+ },
480
+ isEmpty(object) {
481
+ for (var name in object) {
482
+ return false;
483
+ }
484
+ return true;
485
+ },
486
+ getNewOrder(){
487
+ HostApp.__this__ = this
488
+ HostApp.logicWithHint({
489
+ // logic别名,key必须为logic
490
+ 'logic': 'TelServiceTimeOut',
491
+ // 回调执行方法名,key必须为callback
492
+ 'callback': 'javascript:HostApp.__this__.getNewCallBack()',
493
+ // logic执行需要的业务参数
494
+ 'data': {params: ''},
495
+ // 固定key,代表是否将logic执行结果作为参数传入回调方法,1代表true,0代表false,
496
+ // 执行回调方法传入key为backresult
497
+ // 如需额外拼接参数,写在logic返回值的params,例如xxlogic返回:{"params": "success"}
498
+ 'backresult': 1
499
+ })
500
+ },
501
+ getNewCallBack(obj){
502
+ //tag)
503
+ this.ifsearch()
504
+ }
505
+ },
506
+ ready () {
507
+ this.getEmp()
508
+ this.ifsearch()
509
+ // var _this = this;
510
+ // this.timeoutHandle = window.setInterval(function() {
511
+ // _this.sumsearch()
512
+ // }, 6000)
513
+ },
514
+ components: {
515
+ FailureShow,
516
+ 'failure-show': FailureShow
517
+ }
518
+ }
519
+ </script>
520
+ <style>
521
+ .class-a{
522
+ border:1px solid red;
523
+ }
524
+ .padd-div-shu{
525
+ padding-bottom: 5px;
526
+ }
527
+ .app-botton {
528
+ position:fixed;
529
+ background: #87b2dd;
530
+ color: #FFF;
531
+ padding: 8px;
532
+ text-align: center;
533
+ font-size: 1.2em;
534
+ z-index: 10;
535
+ opacity:0.5;
536
+ bottom: 50px;
537
+ margin-top: -10px;
538
+ height: 40px;
539
+ }
540
+ </style>