telephone-clients 3.0.101 → 3.0.103

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 +116 -116
  2. package/src/App.vue +56 -52
  3. package/src/components/pc/NewRepairPaper.vue +370 -370
  4. package/src/components/pc/WorkListAllNew.vue +17 -23
  5. package/src/components/temp/ChangemeterInfo.vue +87 -87
  6. package/src/components/temp/DeviceInfo.vue +82 -82
  7. package/src/components/workorder/FaultAll.vue +826 -826
  8. package/src/components/workorder/PhoneStandWork.vue +354 -354
  9. package/src/components/workorder/RepairOrderV.vue +1446 -1446
  10. package/src/filiale/furuike/pc/ComplainWork.vue +348 -348
  11. package/src/filiale/furuike/pc/Seekwork.vue +352 -352
  12. package/src/filiale/gongyi/android/RepairOrderV.vue +1415 -1415
  13. package/src/filiale/liaoyuan/android/RepairOrderV.vue +831 -831
  14. package/src/filiale/qianneng/android/FaultAll.vue +883 -883
  15. package/src/filiale/qianneng/android/MaterIialOne.vue +123 -123
  16. package/src/filiale/qianneng/android/RepairOrderV.vue +874 -874
  17. package/src/filiale/qianneng/android/chargesList.vue +161 -161
  18. package/src/filiale/qianneng/pc/NewRepairPaper.vue +467 -467
  19. package/src/filiale/qianneng/pc/RepairsWork.vue +982 -982
  20. package/src/filiale/qianneng/pc/WorkListAllNew.vue +14 -24
  21. package/src/filiale/shanxian/telephone.js +12 -12
  22. package/src/filiale/shexian/android/AddMyTask.vue +347 -0
  23. package/src/filiale/shexian/pc/WorkList.vue +740 -0
  24. package/src/filiale/shexian/telephone.js +18 -17
  25. package/src/filiale/shexian/telephoneAndroid.js +26 -23
  26. package/src/filiale/tongchuan/pc/UserWork.vue +805 -805
  27. package/src/filiale/wenxi/android/RepairOrderV.vue +1419 -1419
  28. package/src/filiale/wuan/android/RepairOrderV.vue +1384 -1384
  29. package/src/filiale/zhongsheng/android/RepairOrderV.vue +1430 -1430
  30. package/src/filiale/zhongsheng/pc/RepairsWork.vue +775 -775
  31. package/src/filiale/zhongsheng/telephone.js +23 -23
  32. package/src/main.js +22 -22
@@ -1,982 +1,982 @@
1
- <template xmlns:v-validate="http://www.w3.org/1999/xhtml">
2
- <div class="auto select-overspread form-horizontal auto" id="pc-repair-work">
3
- <validator name="v">
4
- <div class="row">
5
- <div class="col-sm-6 form-group form-fix-width">
6
- <label class="font_normal_body" style="width: 30%">来电电话</label>
7
- <input style="width: 60%" type="text" readonly v-model='model.f_phone' class="form-control"></input>
8
- </div>
9
- <div class="col-sm-6 form-group form-fix-width">
10
- <label class="font_normal_body" for="f_user_name" :class="model.f_user_name ? '': 'class-error' "
11
- style="width: 30%">客户姓名</label>
12
- <input style="width: 60%" type="text" v-model='model.f_user_name' id="f_user_name" name="f_user_name"
13
- class="form-control"/>
14
- </div>
15
- <div class="col-sm-6 form-group form-fix-width">
16
- <label for="f_area" class="font_normal_body" style="width: 30%">客户类型</label>
17
- <v-select :value.sync="model.f_user_type" :value-single="true"
18
- :options='usertypes' placeholder='用户类型'
19
- close-on-select style="width: 60%">
20
- </v-select>
21
- </div>
22
-
23
- <div class="col-sm-6 form-group form-fix-width">
24
- <label class="font_normal_body " for="f_contact_phone" :class="model.f_contact_phone ? '' : 'class-error'"
25
- style="width: 30%">联系电话</label>
26
- <input style="width: 60%" type="text" v-model='model.f_contact_phone' id="f_contact_phone"
27
- class="form-control"/>
28
- </div>
29
- <div class="col-sm-6 form-group form-fix-width">
30
- <label class="font_normal_body " for="f_enter_number" :class="model.f_enter_number ? '' : 'class-error'"
31
- style="width: 30%">入户证号</label>
32
- <input style="width: 60%" type="text" v-model='model.f_enter_number' id="f_enter_number"
33
- class="form-control"/>
34
- </div>
35
- <div class="col-sm-12 form-group form-fix-width">
36
- <label for="f_address" class="font_normal_body" style="width: 15%">详细地址</label>
37
- <input style="width: 80%" type="text" class="form-control" v-model="model.f_address" id="f_address"
38
- placeholder="详细地址"
39
- v-el:address v-next-el="idnumber"
40
- />
41
- </div>
42
- <span class="col-sm-12" style="color: red;margin-left: 100px;"
43
- v-if="serviceList">工单编号:{{ serviceList.f_service_id }}此地址下有工单未处理完成</span>
44
- <div class="col-sm-6 form-group form-fix-width">
45
- <label for="f_repair" class="font_normal_body" style="width: 30%">警情类别</label>
46
- <v-select :value.sync="model.f_repairtype" :value-single="true"
47
- :options='repairstypes' placeholder='警情类别'
48
- close-on-select style="width: 60%" @change="getRepairstypes(model.f_repairtype)">
49
-
50
- </v-select>
51
- </div>
52
- <div class="col-sm-6 form-group form-fix-width" v-if="selectSendshow && operType != '修改工单'">
53
- <label class="font_normal_body" style="width: 30%">转接方式</label>
54
- <div class="form-control">
55
- <label v-for="handling1 in handling">
56
- <input style="width: 60%" type="radio"
57
- v-model="model.f_handlingtype"
58
- value="{{handling1.label}}">
59
- {{ handling1.label }}
60
- </label>
61
- </div>
62
- </div>
63
- <div class="col-sm-6 form-group form-fix-width" v-if="operType != '修改工单'">
64
- <label class=" font_normal_body" style="width: 30%">派单类型</label>
65
- <v-select :value.sync="model.f_handlingtype" :value-single="true"
66
- :options='handling' placeholder='请选择派单类型'
67
- close-on-select
68
- style="width: 60%"></v-select>
69
- </div>
70
- <div class="col-sm-6 form-group form-fix-width" :class="[$v.f_reciever.required ? 'select-error' : '']"
71
- v-if="meading == '转站点' && operType != '修改工单'">
72
- <label class=" font_normal_body" for="f_reciever" style="width: 30%">选择站点</label>
73
- <input style="width: 60%" type="text" v-show="false" v-model="serviceacitivity.f_reciever"
74
- v-validate:f_reciever='{ required: true }'>
75
- <right-tree islist :userid="userid" :source="source" v-on:re-res="reres" :textContent="选择站点管理员" :selectData=""
76
- v-ref:f_reciever>
77
-
78
- </right-tree>
79
- </div>
80
- <div class="col-sm-6 form-group form-fix-width" :class="[$v.f_reciever.required ? 'select-error' : '']"
81
- v-if="meading == '转维修员' && operType != '修改工单'">
82
- <label class="font_normal_body" style="width: 30%">维&ensp;修&ensp;员</label>
83
- <v-select :value="model.serviceacitivity[0].f_reciever" :value-single="true"
84
- :options='repairers' placeholder='请选择维修员'
85
- close-on-select v-on:change="repiarmancg" style="width: 60%"></v-select>
86
- </div>
87
- <div class="col-sm-6 form-group form-fix-width">
88
- <label class=" font_normal_body" style="width: 30%">工单来源</label>
89
- <v-select :value="model.f_source" :value-single="true"
90
- :options='sources' placeholder='请选择工单来源'
91
- close-on-select
92
- v-on:change="sourcechange" style="width: 60%"></v-select>
93
- </div>
94
- <div class="col-sm-6 form-group form-fix-width">
95
- <label class=" font_normal_body" style="width: 30%">截止天数</label>
96
- <v-select :value="model.day" :value-single="true"
97
- :options='days' placeholder='请选择截止天数'
98
- close-on-select
99
- v-on:change="daychange" style="width: 60%"></v-select>
100
- </div>
101
-
102
- <div class="col-sm-6 form-group form-fix-width">
103
- <label class=" font_normal_body" style="width: 30%">截止时间</label>
104
- <datepicker placeholder="请选择截至时间"
105
- :value.sync="model.f_finish_date"
106
- v-model="model.f_finish_date"
107
- :format="'yyyy-MM-dd HH:mm:ss'"
108
- style="width: 60%"
109
- :disabled="flag" ></datepicker>
110
- </div>
111
- <div class="col-sm-12 form-group form-fix-width">
112
- <label for="f_alarm_accident" class="font_normal_body" style="width: 15%">报警事故地址</label>
113
- <input style="width: 80%" type="text" class="form-control" v-model="model.f_alarm_accident"
114
- id="f_alarm_accident" placeholder="报警事故地址"
115
- v-el:address v-next-el="idnumber"
116
- />
117
- </div>
118
- <div class="row">
119
- <div class="col-sm-12 form-group form-fix-width">
120
- <label class="font_normal_body" style="width: 15%">报警详细内容</label>
121
- <textarea style="width: 80%" name="name" rows="2" class="ver-textarea" class="form-control"
122
- v-model='model.f_alarm_details'></textarea>
123
- </div>
124
- </div>
125
-
126
- </div>
127
- <!-- <div class="row" style="margin-left: 5%">-->
128
- <!-- <div class="col-xs-2 col-sm-2 " v-for="item in radios">-->
129
- <!-- <input class="" v-model="picked" :value="item.label" :checked='item.isChecked' @click="check(item.value)" type="radio">{{item.label}}-->
130
- <!-- </div>-->
131
- <!-- </div>-->
132
- <failure-edit v-ref:failureedit @input="procFailure" :value="model.failure"></failure-edit>
133
-
134
- <div class="row">
135
- <div class="col-sm-12 form-group form-fix-width">
136
- <label class="font_normal_body" style="width: 15%">备&emsp;&emsp;注</label>
137
- <textarea style="width: 80%" name="name" rows="2" class="ver-textarea" class="form-control"
138
- v-model='model.f_remarks'></textarea>
139
- </div>
140
- </div>
141
- <div class="row">
142
- <button type="button" name="button" class="btn btn-difault" v-if="operType !== '报修'" @click="$emit('cancel')">
143
- 取消
144
- </button>
145
- <!--<button type="button" name="button" class="btn btn-danger btn-ln fr" @click="save" :disabled='IsClickDisabled'>-->
146
- <button type="button" name="button" class="btn btn-danger btn-ln fr" @click="save">
147
- 提交
148
- </button>
149
- <button type="button" name="button" style="margin-right: 3%" v-if="operType == '报修'"
150
- class="btn btn-difault btn-ln fr" @click="cleardata('init')">
151
- 清空
152
- </button>
153
- </div>
154
- </validator>
155
- <modal :show.sync="showMessage" large="true" v-ref:modal backdrop="false">
156
- <header slot="modal-header" class="modal-header">
157
- 提醒
158
- </header>
159
- <article slot="modal-body" class="modal-body">
160
- <div class="from-group col-smm-12 col-md-12 col-xs-12">
161
- {{ message }}
162
- </div>
163
- </article>
164
- <footer slot="modal-footer" class="modal-footer">
165
- <button type="button" class="btn btn-success" @click='close'>确认</button>
166
- </footer>
167
- </modal>
168
- </div>
169
- </template>
170
-
171
- <script>
172
- import FailureEdit from '../pc/FailureEdit'
173
- import {HttpResetClass} from 'vue-client'
174
- import * as Util from '../../../components/Util'
175
-
176
- // 获取派单类型, 类型 : 转站点,转维修员,自选模式
177
- let getSendType = async function (self) {
178
- try {
179
- // 如果初始化为派维修员,则不获取配置文件
180
- if (self.meading == '转维修员') {
181
- self.model.f_handlingtype = '转维修员'
182
- } else if (self.meading == '转站点') {
183
- let http = new HttpResetClass()
184
- let result = await http.load('GET', `rs/vue/sendType.json`, {}, {resolveMsg: null, rejectMsg: null})
185
- //tag
186
- if (result.data.sendType == '自选模式') {
187
- self.selectSendshow = true
188
- } else {
189
- // 转站点/转维修员
190
- if (result.data.sendType == '转维修员') {
191
- self.model.f_handlingtype = '转维修员'
192
- }
193
- self.meading = result.data.sendType
194
- }
195
- }
196
- } catch (e) {
197
- //tag
198
- } finally {
199
- // 获取维修员
200
- if (self.meading == '转维修员') {
201
- self.repairers = []
202
- self.getEmp("维修员")
203
- }
204
- self.model.f_user_type = "民用"
205
- if (self.operType === '报修') {
206
- self.assignObj()
207
- } else if (self.operType === '重新派单') {
208
- // 通过当前登录人获取需要重新派发单子,也可对单子进行修改
209
- self.setModifyOrder()
210
- } else if (self.operType === '修改工单') {
211
- // 通过传入数据,查询出工单,选择站点将不可点击
212
- self.setModifyOrder()
213
- }
214
- }
215
- }
216
- // 工作类型对应的各项设置
217
- const config = {
218
- '报修': {
219
- url: 'rs/logic/callerSend'
220
- },
221
- '重新派单': {
222
- url: 'rs/logic/resend'
223
- },
224
- '修改工单': {
225
- url: 'rs/logic/modifyOrder'
226
- },
227
- }
228
-
229
- export default {
230
- title: '报修单',
231
- props: {
232
- data: { // 用户基本信息
233
- type: Object,
234
- default: null
235
- },
236
- type: { // 类型,为区分复选框,当组件重用并切重用组件同时出现,复选框id相同时会有干扰,
237
- type: String
238
- },
239
- callObj: { // 话务对象
240
- type: Object,
241
- default: null
242
- },
243
- loginUser: {
244
- type: Object
245
- },
246
- modifyOrder: { // 修改工单传入得工单信息
247
- type: Object
248
- },
249
- operType: { // 操作类型,有报修,重新派单,修改工单,其中修改时,选择站点将不可点击,重新派单和修改要先将工单查询出来
250
- type: String,
251
- default: '报修'
252
- },
253
- meading: {
254
- type: String,
255
- default: '转维修员'
256
- },
257
- // 其他类型工单提交,清空控制
258
- cleantf: {
259
- type: Number
260
- }
261
- },
262
- data() {
263
- return {
264
-
265
- selectSendshow: false,
266
- radios: [
267
- {
268
- label: '安检',
269
- value: 0,
270
- isChecked: false,
271
- },
272
- {
273
- label: '巡检',
274
- value: 1,
275
- isChecked: false,
276
- },
277
- {
278
- label: '第三个个',
279
- value: 2,
280
- isChecked: false,
281
- },
282
- {
283
- label: '第四个个',
284
- value: 3,
285
- isChecked: false,
286
- }
287
- ],
288
- // 选择小区树参数
289
- // villagedata: {
290
- // f_locationId: this.$login.f.parent.parentid,
291
- // f_locationType: 't_organization'
292
- // },
293
- flag:true,
294
- addressshow: false,
295
- addressselect: false,
296
- phoneValid: false,
297
- residential: [],
298
- row: {
299
- f_residential_area: ''
300
- },
301
- residentialquery: '',
302
- servicesource: '话务来电', // 工单来源
303
- areacondition: '',
304
- testdata: {f_equipment: ''},
305
- residentialTemplate: 'f_villagename',
306
- unitTemplate: 'f_unitname',
307
- model: {
308
- // 一次派单
309
- serviceacitivity: [{
310
- f_service_acitivity_type: '派单'
311
- }],
312
- f_source: '话务来电',
313
- f_finish_date:'',
314
- f_service_id: '',
315
- f_contact_phone: '',
316
- f_enter_number: '',
317
- f_meetunit: '',
318
- f_phone: '',
319
- f_user_name: '',
320
- f_address: '',
321
- f_alarm_accident: '',//报警详细地址
322
- f_alarm_details: '',//报警详细内容
323
- f_calledmatter_sattention: '',//接警注意事项
324
- f_repair_date: Util.getNowDate(),
325
- f_card_id: '',
326
- // f_department: '', 站点选择
327
- f_reciever: '',
328
- f_remarks: '',
329
- f_user_type: '',
330
- f_area: '',
331
- f_unit_name: '',
332
- f_street: '',
333
- f_residential_area: '',
334
- f_building: '',
335
- f_unit: '',
336
- f_floor: '',
337
- f_room: '',
338
- aState: null,
339
- f_handlingtype: '转维修员',
340
- f_repairtype: '',
341
- f_orgid: this.$login.f.orgid,
342
- f_orgname: this.$login.f.orgs,
343
- f_depname: this.$login.f.dops,
344
- f_depid: this.$login.f.depids,
345
- f_operator: this.$login.f.name,
346
- f_operatorid: this.$login.f.id,
347
- f_filiale: '',
348
- f_filiale_id: ''
349
- },
350
- showMessageData: {},
351
- showMessage: false,
352
- message: '',
353
- types: [],
354
- picked: '',
355
- information: [], // 用来存放字表信息
356
- serviceList: null, // 用来存放查询当前地址下的未完成工单
357
- id: '', // 编写测试时会使用
358
- f_service_id: '',// 编写测试时会使用
359
- repairstypes: this.$appdata.getParam('报修类型'),
360
- usertypes: this.$appdata.getParam('用户类型'),
361
- // stands : this.$appdata.getParam('站点管理员'),
362
- days:this.$appdata.getParam('截止天数'),
363
- sources: this.$appdata.getParam('工单来源'),
364
- handling: [{label: '转站点', value: '转站点'}, {label: '转维修员', value: '转维修员'}, {label: '转运营系统', value: '转运营系统'}],
365
- source:
366
- 'dep=this.getParentByType($organization$).getSpecialResByType($department$),' +
367
- 'tool.getFullTree(dep.where(row.hasSpecialRole($派单员$)))',
368
- userid: this.$login.f.id,
369
- repairers: [] // 维修员
370
- }
371
- },
372
- ready() {
373
-
374
- // 获取sendType.json配置信息 获取派单类型 转站点,转维修员,自选模式
375
- getSendType(this)
376
-
377
- },
378
- methods: {
379
- daychange(val){
380
- if (val=='其他'){
381
- this.flag = false
382
- }else {
383
- this.flag = true
384
- let t = new Date();//你已知的时间
385
- let t1= t.getTime()
386
- val = val*1000
387
- t.setTime(t1 + val * 60 * 60 * 24);
388
- let Y = t.getFullYear() + '-'
389
- let M = (t.getMonth()+1 < 10 ? '0'+(t.getMonth()+1):t.getMonth()+1) + '-'
390
- let D = (t.getDate()< 10 ? '0'+t.getDate():t.getDate())+ ' '
391
- let h = (t.getHours() < 10 ? '0'+t.getHours():t.getHours())+ ':'
392
- let m = (t.getMinutes() < 10 ? '0'+t.getMinutes():t.getMinutes())+ ':'
393
- let s = t.getSeconds() < 10 ? '0'+t.getSeconds():t.getSeconds()
394
- this.model.f_finish_date = Y+M+D+h+m+s
395
- console.log("当前时间:"+Y+M+D+h+m+s)
396
- }
397
- },
398
- getRepairstypes(val) {
399
- this.$refs.failureedit.getFailure(val)
400
- },
401
- close() {
402
- this.showMessage = false
403
- this.showMessageData = {}
404
- this.message = ''
405
- },
406
- changeFault(val) {
407
- //tag
408
- if (val == '安检') {
409
- this.getEmp("安检员")
410
- } else if (val == '巡检巡线') {
411
- this.getEmp("巡检巡线员")
412
- } else if (val == '工程电修') {
413
- this.getEmp("工程电修组")
414
- } else if (val == '其他') {
415
- this.getEmp("其他")
416
- }
417
- },
418
- check(index) {
419
- //tag
420
- // 先取消所有选中项
421
- for (let item of this.radios) {
422
- item.isChecked = false;
423
- }
424
- //再设置当前点击项选中
425
- this.picked = this.radios[index].label;
426
- // 设置值,以供传递
427
- this.radios[index].isChecked = true;
428
- //tag;
429
- },
430
- // 当维修员发生改变,获取维修员手机号
431
- repiarmancg(val) {
432
- if (val) {
433
- this.model.serviceacitivity[0].f_reciever = val
434
- let http1 = new HttpResetClass()
435
- http1.load('POST', 'rs/sql/tel_singleTable_OrderBy', {
436
- data: {
437
- items: 'f_user_telephone',
438
- tablename: 't_user',
439
- condition: `name = '${val}'`,
440
- orderitem: 'id'
441
- }
442
- }, {resolveMsg: null, rejectMsg: null}).then((ress) => {
443
- this.model.f_repairman_phone = ress.data[0].f_user_telephone
444
- })
445
- }
446
- },
447
- // 当工单来源属性发生改变
448
- sourcechange(val) {
449
- if (val == undefined || val == '') {
450
- return
451
- }
452
- this.model.f_source = val
453
- this.servicesource = val
454
- },
455
- // 获取维修员
456
- getEmp(role) {
457
- this.repairers = []
458
- let val
459
- if (this.$parent.$parent.findid == 0) {
460
- val = {
461
- source: 'this.getParentByType($department$).getAllChildrens().where(row.getAttributes().get($rolestr$).indexOf($维修员$)!=-1))',
462
- userid: `${this.$login.f.id}`
463
- }
464
- } else {
465
- val = {
466
- source: `this.getParentByType($organization$).getChildByName($${role}$).getUsers()`,
467
- userid: `${this.$login.f.id}`
468
- }
469
- }
470
- // let val = {source: 'this.getParentByType($department$).getChildByName($置换员$).getUsers()', userid: `${this.$login.f.id}`}
471
- let http = new HttpResetClass()
472
- http.load('POST', '/rs/search', {data: val}, {resolveMsg: null, rejectMsg: null}).then((res) => {
473
- res.data.forEach((item) => {
474
- this.repairers.push({label: item.name, value: item.name})
475
- })
476
- })
477
- },
478
- adressslect(val) {
479
- if (val == "NO") {
480
- this.addressshow = true
481
- this.addressselect = true
482
- } else {
483
- this.addressshow = false
484
- this.addressselect = false
485
- }
486
- },
487
- // 控制地址管理组件显示与否
488
- adressoff(val) {
489
- if (val == "NO") {
490
- this.addressshow = true
491
- this.addressselect = false
492
- } else {
493
- this.addressshow = false
494
- this.addressselect = true
495
- }
496
- },
497
- // 截取字符串
498
- interceptString(val) {
499
- },
500
- // 选中地址
501
- rerefParent(val, addstr) {
502
- var rows = val.rows
503
- let num = 0
504
- this.model.f_addressjson = JSON.stringify(rows)
505
- this.model.f_addressid = val.id
506
- if (rows.length > 0) {
507
- let arrid = this.model.f_addressid.split('.')
508
- for (let i = 0; i < rows.length; i++) {
509
- if (rows[i].type === '楼号') {
510
- this.model.f_building = rows[i].name
511
- } else if (rows[i].type === '楼层') {
512
- this.model.f_floor = rows[i].name
513
- } else if (rows[i].type === '门牌号') {
514
- this.model.f_room = rows[i].name
515
- this.model.f_room_id = arrid[i]
516
- } else if (rows[i].type === '区') {
517
- this.model.f_area = rows[i].name
518
- } else if (rows[i].type === '街道') {
519
- this.model.f_street = rows[i].name
520
- } else if (rows[i].type === '小区') {
521
- this.model.f_residential_area = rows[i].name
522
- this.model.f_districtname_id = arrid[i]
523
- } else if (rows[i].type === '单元') {
524
- this.model.f_unit = rows[i].name
525
- }
526
- }
527
- }
528
- // this.address()
529
- this.model.f_address = addstr
530
- },
531
- // 选中部门
532
- reres(val) {
533
- if (val.res == undefined || val.res[0] == undefined || val.res[0] == '') {
534
- return
535
- }
536
- this.model.serviceacitivity[0].f_meetunit = val.res[0]
537
- this.model.f_meetunit = val.res[0]
538
- this.model.f_filiale_id = val.orgobj[0].parentid
539
- this.model.f_filiale = val.orgobj[0].parentname
540
- this.model.f_outlets = val.res[0]
541
- this.model.serviceacitivity[0].f_reciever = val.resids[0]
542
- },
543
- onReady() {
544
- //tag
545
- this.$emit('ready')
546
- },
547
- onError(error) {
548
- //tag
549
- this.$emit('error', error)
550
- },
551
- add(query) {
552
- if (typeof (query) === 'string') {
553
- this.model.f_residential_area = query
554
- this.address()
555
- }
556
- },
557
- // 修改或者重派工单时,加载工单的故障信息
558
- projectCallback(item) {
559
- if (item) {
560
- return item.f_user_name
561
- }
562
-
563
- },
564
- selectUnit(query) {
565
- return this.$resetpost('rs/sql/tel_singleTable_OrderBy',
566
- {
567
- data: {
568
- items: 'f_unitname',
569
- tablename: 't_unitcoordinate',
570
- condition: `(f_unitname like '${query}%' or F_TRANS_PINYIN_CAPITAL(f_unitname) like '${query}%')and rownum<10`,
571
- orderitem: 'id'
572
- }
573
- }, {resolveMsg: null, rejectMsg: null}
574
- )
575
- },
576
- selectResidential(query) {
577
- return this.$resetpost('rs/sql/tel_singleTable_OrderBy',
578
- {
579
- data: {
580
- items: 'f_villagename',
581
- tablename: 't_villagecoordinate',
582
- condition: `(f_villagename like '${query}%' or F_TRANS_PINYIN_CAPITAL(f_villagename) like '${query}%')and rownum<10`,
583
- orderitem: 'id'
584
- }
585
- }, {resolveMsg: null, rejectMsg: null}
586
- )
587
- },
588
- setModifyOrder() {
589
- this.meading = this.modifyOrder.f_handlingtype
590
- if(this.meading === '转维修员' ){
591
- this.getEmp('维修员')
592
- }
593
- this.model = Object.assign({}, this.model, this.modifyOrder)
594
- },
595
- assignObj() {
596
- if (this.data) {
597
- this.model.f_address = this.data.f_address
598
- this.model.f_user_name = this.data.f_user_name
599
- this.model.f_user_type = this.data.f_user_type
600
- this.model.f_contact_phone = this.data.f_user_phone
601
- this.model.f_enter_number = this.data.f_enter_number
602
- this.model.f_userinfo_id = this.data.f_userinfo_id
603
- this.model.f_userinfo_code = this.data.f_userinfo_code
604
- //tag
605
- // this.residentialquery = this.data.unit_name
606
- this.model.f_card_id = this.data.card_id
607
- if (this.model.f_user_type === '民用') {
608
- this.model.f_area = this.data.f_area
609
- this.model.f_street = this.data.f_street
610
- this.model.f_residential_area = this.data.f_residential_area
611
- this.model.f_building = this.data.f_building
612
- this.model.f_unit = this.data.f_unit
613
- this.model.f_floor = this.data.f_floor
614
- this.model.f_room = this.data.f_room
615
- //this.address()
616
- }
617
- }
618
-
619
- //this.checkServerList(this.model.f_address)
620
- },
621
- // 提交
622
- getData(val) {
623
- return this.residential
624
- },
625
- // 清楚信息
626
- cleardata(type) {
627
- this.model = Object.assign({}, {
628
- // 一次派单
629
- serviceacitivity: [{
630
- f_service_acitivity_type: '派单',
631
- f_meetunit: this.model.serviceacitivity[0].f_meetunit,
632
- f_reciever: this.model.serviceacitivity[0].f_reciever
633
- }],
634
- f_finish_date:'',
635
- f_repairman_phone:this.model.f_repairman_phone,
636
- f_meetunit: this.model.f_meetunit,
637
- f_orgstr: this.model.f_orgstr,
638
- f_outlets: this.model.f_outlets,
639
- f_service_id: '',
640
- f_contact_phone: '',
641
- f_enter_number: '',
642
- f_alarm_accident: '',//报警详细地址
643
- f_alarm_details: '',//报警详细内容
644
- f_calledmatter_sattention: '', //接警注意事项
645
- f_phone: '',
646
- f_user_name: '',
647
- failure: '',
648
- f_json: '',
649
- f_userinfo_id: '',
650
- f_address: '',
651
- f_repair_date: Util.getNowDate(),
652
- f_card_id: '',
653
- f_remarks: '',
654
- f_user_type: '',
655
- f_area: '',
656
- f_street: '',
657
- f_residential_area: '',
658
- f_source: this.servicesource,
659
- f_building: '',
660
- f_unit: '',
661
- f_floor: '',
662
- f_room: '',
663
- f_handlingtype: this.model.f_handlingtype,
664
- aState: null,
665
- f_orgid: this.$login.f.orgid,
666
- f_orgname: this.$login.f.orgs,
667
- f_depname: this.$login.f.dops,
668
- f_depid: this.$login.f.depids,
669
- f_operator: this.$login.f.name,
670
- f_operatorid: this.$login.f.id,
671
- f_filiale: this.model.f_filiale,
672
- f_filiale_id: this.model.f_filiale_id
673
-
674
- }),
675
- this.modifyOrder = {}
676
- this.types = []
677
- this.data = {}
678
- if (this.callObj && this.callObj.callNum && type != 'init') {
679
- // Util.afterCallBz(this.$login.f.id, this.$login.f.name)
680
- this.callObj.callNum = null
681
- this.callObj.RecordsID = null
682
- this.model.aState = null
683
- }
684
- this.$refs.failureedit.failure.f_failure_type = []
685
-
686
- },
687
- save() {
688
- if (this.model.f_address == '' || this.model.f_address == undefined) {
689
- return this.$showAlert('请输入地址!', 'warning', 2000)
690
- }
691
- if (this.model.f_repairtype == '' || this.model.f_repairtype == undefined) {
692
- return this.$showAlert('请选择警情类别!', 'warning', 2000)
693
- }
694
- if (!JSON.parse(this.model.failure)[0].f_failure_type || JSON.parse(this.model.failure)[0].f_failure_type.length==0) {
695
- return this.$showAlert('请选择警情内容类别!', 'warning', 2000)
696
- }
697
-
698
- // 判断是否选择工单接收人
699
- if (this.operType != '修改工单') {
700
- if (this.model.serviceacitivity[0].f_reciever == '' || this.model.serviceacitivity[0].f_reciever == undefined) {
701
- if (this.meading == '转维修员') {
702
- return this.$showAlert('请选择维修人员', 'warning', 2000)
703
- } else if (this.meading == '转站点') {
704
- return this.$showAlert('请选择站点', 'warning', 2000)
705
- }
706
- }
707
- }
708
- if (this.meading == '转维修员') {
709
- this.model.f_meetunit = this.$login.f.deps
710
- this.model.f_orgid = this.$login.f.orgid
711
- this.model.f_filiale = this.$login.f.org
712
- this.model.f_outlets = this.$login.f.deps
713
- }
714
- this.model.f_filiale_id = this.$login.f.orgid
715
- let data = {
716
- model: this.model,
717
- loginUser: {
718
- name: this.loginUser.name,
719
- ename: this.loginUser.ename
720
- }, user: this.data, callObj: this.callObj
721
- }
722
- // 如果是修改工单,受理人还是原始的 派单人 不做修改
723
- if (this.operType == '报修') {
724
- data.model.f_attendant = this.loginUser.name
725
- }
726
- if(data.model.failure){
727
- data.model.f_json = this.trouble(data.model.failure)
728
- }
729
- //tag)
730
- // // 获得数据发送地址
731
- // let url = config[this.operType].url
732
- // 获得数据发送地址
733
- let url = ''
734
- if (this.meading === '转站点') {
735
- url = config[this.operType].url
736
- } else {
737
- url = config[this.operType].url
738
- if (this.meading == '转维修员') {
739
- data.toRepair = '一级派单'
740
- } else if (this.meading == '转运营系统') {
741
- data.toRepair = '转运营系统'
742
- }
743
- }
744
- this.showMessageData = data
745
- return this.$resetpost(url, data).then((data) => {
746
- if (data.data && data.data.id) {
747
- this.id = JSON.parse(data.data.id).id
748
-
749
- }
750
- if (this.callObj && this.callObj.callNum) {
751
- //tag
752
- Util.afterCallBz(this.$login.f.id, this.$login.f.name)
753
- }
754
-
755
- // 清空数据
756
- this.$emit('commitsus', this.model.f_phone)
757
- this.cleardata()
758
- this.showMessageData.f_service_id = data.data.f_service_id
759
- this.showMessageData.message = '通知消息为:工单号:' + this.showMessageData.f_service_id +
760
- ',报警人:' + this.showMessageData.model.f_user_name +
761
- ',报警电话:' + this.showMessageData.model.f_phone +
762
- ',联系电话:' + this.showMessageData.model.f_contact_phone +
763
- ',接管时间:' + this.showMessageData.model.f_repair_date +
764
- ',警情类别:' + this.showMessageData.model.f_repairtype +
765
- ',报警类别:' + JSON.parse(this.showMessageData.model.failure)[0].f_failure_type +
766
- ',报警事故地址:' + this.showMessageData.model.f_alarm_accident +
767
- ',报警详细内容:' + this.showMessageData.model.f_alarm_details +
768
- ',出警人:' + this.showMessageData.model.serviceacitivity[0].f_reciever +
769
- ',出警人电话:' + this.showMessageData.model.f_repairman_phone
770
- this.showMessage = true
771
- this.message = this.showMessageData.message
772
- //点提交后提示该单信息
773
- if (data.data && data.data.msg) {
774
- //tag
775
- this.$showMessage(data.data.msg)
776
- }
777
- })
778
- },
779
- address() {
780
- let strAddress = `${this.model.f_area ? this.model.f_area
781
- + '-' : ''}${this.model.f_street ? this.model.f_street
782
- + '-' : ''}${this.model.f_residential_area ? this.model.f_residential_area
783
- + '' : ''}${this.model.f_building ? this.model.f_building
784
- + '号楼' : ''}${this.model.f_unit ? this.model.f_unit
785
- + '单元' : ''}${this.model.f_floor ? this.model.f_floor
786
- + '层' : ''}${this.model.f_room ? this.model.f_room
787
- + '室' : ''}`
788
- this.model.f_address = strAddress
789
- },
790
- // 检查相同地址下有没有还未完成的工单
791
- checkServerList(address) {
792
- if (this.model.f_area && this.model.f_area && this.model.f_residential_area && this.model.f_building
793
- && this.model.f_unit && this.model.f_floor && this.model.f_room) {
794
- this.$console.info('开始查询')
795
- // 地址所有区域输入完成查询
796
- // this.$resetpost('rs/sql/getServiceActivity.sql', { condition: `f_address = '${address}' and f_single_type = '报修单'`}, {resolveMsg: null, rejectMsg: null}).then((res) => {
797
- // //有未完成工单
798
- // let ls = res.data.length
799
- // if (ls > 0) {
800
- // // 当前地址下还有工单未完成
801
- // }
802
- // })
803
- }
804
- },
805
- trouble (val) {
806
- let failureall=''
807
- // val=[{"f_failure_type":"抽油烟机","failurecase":[],"f_equipment":""},{"f_failure_type":"抽油烟机","failurecase":[],"f_equipment":""},{"f_failure_type":"抽油烟机","failurecase":[],"f_equipment":""}]
808
-
809
- let failure = JSON.parse(val)
810
- for (let i = 0; i <failure.length; i++) {
811
- if (failure[i].failurecase.length>0){
812
- failureall+=failure[i].f_failure_type+":"
813
- for (let j = 0; j < failure[i].failurecase.length; j++) {
814
- failureall+=failure[i].failurecase[j]
815
- if (j+1!=failure[i].failurecase.length){
816
- failureall+=","
817
- }
818
- }
819
-
820
- }else{
821
- failureall+=failure[i].f_failure_type
822
- }
823
- if (i+1!=failure.length){
824
- failureall+=';'
825
- }
826
- }
827
- return failureall
828
- },
829
- // 处理故障输入
830
- procFailure(value) {
831
- if (typeof (value.result) === 'string') {
832
- this.model.failure = value.result
833
- console.log('this.model.failure----------', this.model.failure)
834
- this.model.f_calledmatter_sattention = value.f_calledmatter_sattention
835
- }
836
- },
837
- },
838
- watch: {
839
- // 转接类型
840
- 'model.f_handlingtype'() {
841
- // 清楚上次记录
842
- this.model.serviceacitivity[0].f_reciever = ''
843
- this.model.serviceacitivity[0].f_meetunit = ''
844
- this.model.f_meetunit = ''
845
- this.model.f_orgstr = ''
846
- this.model.f_outlets = ''
847
- this.model.f_repairman_phone = ''
848
- if (this.model.f_handlingtype == '转维修员') {
849
- this.meading = '转维修员'
850
- this.repairers = []
851
- this.getEmp("维修员")
852
- } else if (this.model.f_handlingtype == '转站点') {
853
- this.repairers = []
854
- this.meading = '转站点'
855
- } else {
856
- this.repairers = []
857
- this.meading = '转运营系统'
858
- this.model.serviceacitivity[0].f_reciever = '运营系统'
859
- }
860
- },
861
- // 是否清空
862
- 'cleantf'() {
863
-
864
- this.cleardata()
865
- },
866
- 'data'() {
867
- this.assignObj()
868
- },
869
- 'model.f_contact_phone'(val) {
870
- this.phoneValid = /^((0\d{2,3}-\d{7,8})|(1[3584]\d{9}))$/.test(this.model.f_contact_phone)
871
- },
872
- // 话务对象发生变化将来电电话赋值给f_phone
873
- 'callObj.callNum'() {
874
- this.cleardata('init')
875
- this.model.f_phone = this.callObj.callNum
876
- this.model.f_records_id = this.callObj.RecordsID
877
- // this.model.f_contact_phone = this.callObj.callNum
878
- this.model.f_repair_date = Util.getNowDate()
879
- },
880
- 'types.length'() {
881
- var ev = new Event("resize", {"bubbles": true, "cancelable": false});
882
- window.dispatchEvent(ev);
883
- },
884
- 'callObj.aState'() {
885
- this.model.aState = this.callObj.aState
886
- //tag
887
- }
888
- },
889
- computed: {
890
- IsClickDisabled: function () {
891
- if (this.$v.valid) {
892
- if (this.model.aState === null) {
893
- //tag
894
- return false
895
- }
896
- if (this.model.f_phone && this.model.aState === '正在保存' && this.model.aState === '置忙') {
897
- //tag
898
- return false
899
- }
900
- if (!this.model.f_phone) {
901
- //tag
902
- return false
903
- } else {
904
- //tag
905
- return true
906
- }
907
- }
908
- },
909
- getTestData() {
910
- return this.testdata
911
- },
912
- serviceacitivity() {
913
- return this.model.serviceacitivity.find((row) => {
914
- return row.f_service_acitivity_type === '派单'
915
- })
916
- },
917
- alertObject() {
918
- let result = this.model.failure.find((value) => {
919
- return value.f_failure_type === '报警器'
920
- })
921
- if (result) {
922
- return result
923
- }
924
- return {f_equipment: ''}
925
- },
926
- gasstove() {
927
- let result = this.model.failure.find((value) => {
928
- return value.f_failure_type === '燃气灶'
929
- })
930
- if (result) {
931
- return result
932
- }
933
- return {f_equipment: ''}
934
- },
935
- furnace() {
936
- let result = this.model.failure.find((value) => {
937
- return value.f_failure_type === '壁挂炉'
938
- })
939
- if (result) {
940
- return result
941
- }
942
- return {f_equipment: ''}
943
- },
944
- heater() {
945
- let result = this.model.failure.find((value) => {
946
- return value.f_failure_type === '热水器'
947
- })
948
- if (result) {
949
- return result
950
- }
951
- return {f_equipment: ''}
952
- },
953
- lampblack() {
954
- let result = this.model.failure.find((value) => {
955
- return value.f_failure_type === '油烟机'
956
- })
957
- if (result) {
958
- return result
959
- }
960
- return {f_equipment: ''}
961
- }
962
- },
963
- events: {
964
- getPosition(val) {
965
- //tag
966
- this.$dispatch('distribute', val)
967
-
968
- }
969
- },
970
- components: {
971
- FailureEdit,
972
- 'failure-edit': FailureEdit
973
- }
974
- }
975
-
976
- </script>
977
- <style>
978
- .class-error {
979
- color: #a94442;
980
- }
981
-
982
- </style>
1
+ <template xmlns:v-validate="http://www.w3.org/1999/xhtml">
2
+ <div class="auto select-overspread form-horizontal auto" id="pc-repair-work">
3
+ <validator name="v">
4
+ <div class="row">
5
+ <div class="col-sm-6 form-group form-fix-width">
6
+ <label class="font_normal_body" style="width: 30%">来电电话</label>
7
+ <input style="width: 60%" type="text" readonly v-model='model.f_phone' class="form-control"></input>
8
+ </div>
9
+ <div class="col-sm-6 form-group form-fix-width">
10
+ <label class="font_normal_body" for="f_user_name" :class="model.f_user_name ? '': 'class-error' "
11
+ style="width: 30%">客户姓名</label>
12
+ <input style="width: 60%" type="text" v-model='model.f_user_name' id="f_user_name" name="f_user_name"
13
+ class="form-control"/>
14
+ </div>
15
+ <div class="col-sm-6 form-group form-fix-width">
16
+ <label for="f_area" class="font_normal_body" style="width: 30%">客户类型</label>
17
+ <v-select :value.sync="model.f_user_type" :value-single="true"
18
+ :options='usertypes' placeholder='用户类型'
19
+ close-on-select style="width: 60%">
20
+ </v-select>
21
+ </div>
22
+
23
+ <div class="col-sm-6 form-group form-fix-width">
24
+ <label class="font_normal_body " for="f_contact_phone" :class="model.f_contact_phone ? '' : 'class-error'"
25
+ style="width: 30%">联系电话</label>
26
+ <input style="width: 60%" type="text" v-model='model.f_contact_phone' id="f_contact_phone"
27
+ class="form-control"/>
28
+ </div>
29
+ <div class="col-sm-6 form-group form-fix-width">
30
+ <label class="font_normal_body " for="f_enter_number" :class="model.f_enter_number ? '' : 'class-error'"
31
+ style="width: 30%">入户证号</label>
32
+ <input style="width: 60%" type="text" v-model='model.f_enter_number' id="f_enter_number"
33
+ class="form-control"/>
34
+ </div>
35
+ <div class="col-sm-12 form-group form-fix-width">
36
+ <label for="f_address" class="font_normal_body" style="width: 15%">详细地址</label>
37
+ <input style="width: 80%" type="text" class="form-control" v-model="model.f_address" id="f_address"
38
+ placeholder="详细地址"
39
+ v-el:address v-next-el="idnumber"
40
+ />
41
+ </div>
42
+ <span class="col-sm-12" style="color: red;margin-left: 100px;"
43
+ v-if="serviceList">工单编号:{{ serviceList.f_service_id }}此地址下有工单未处理完成</span>
44
+ <div class="col-sm-6 form-group form-fix-width">
45
+ <label for="f_repair" class="font_normal_body" style="width: 30%">警情类别</label>
46
+ <v-select :value.sync="model.f_repairtype" :value-single="true"
47
+ :options='repairstypes' placeholder='警情类别'
48
+ close-on-select style="width: 60%" @change="getRepairstypes(model.f_repairtype)">
49
+
50
+ </v-select>
51
+ </div>
52
+ <div class="col-sm-6 form-group form-fix-width" v-if="selectSendshow && operType != '修改工单'">
53
+ <label class="font_normal_body" style="width: 30%">转接方式</label>
54
+ <div class="form-control">
55
+ <label v-for="handling1 in handling">
56
+ <input style="width: 60%" type="radio"
57
+ v-model="model.f_handlingtype"
58
+ value="{{handling1.label}}">
59
+ {{ handling1.label }}
60
+ </label>
61
+ </div>
62
+ </div>
63
+ <div class="col-sm-6 form-group form-fix-width" v-if="operType != '修改工单'">
64
+ <label class=" font_normal_body" style="width: 30%">派单类型</label>
65
+ <v-select :value.sync="model.f_handlingtype" :value-single="true"
66
+ :options='handling' placeholder='请选择派单类型'
67
+ close-on-select
68
+ style="width: 60%"></v-select>
69
+ </div>
70
+ <div class="col-sm-6 form-group form-fix-width" :class="[$v.f_reciever.required ? 'select-error' : '']"
71
+ v-if="meading == '转站点' && operType != '修改工单'">
72
+ <label class=" font_normal_body" for="f_reciever" style="width: 30%">选择站点</label>
73
+ <input style="width: 60%" type="text" v-show="false" v-model="serviceacitivity.f_reciever"
74
+ v-validate:f_reciever='{ required: true }'>
75
+ <right-tree islist :userid="userid" :source="source" v-on:re-res="reres" :textContent="选择站点管理员" :selectData=""
76
+ v-ref:f_reciever>
77
+
78
+ </right-tree>
79
+ </div>
80
+ <div class="col-sm-6 form-group form-fix-width" :class="[$v.f_reciever.required ? 'select-error' : '']"
81
+ v-if="meading == '转维修员' && operType != '修改工单'">
82
+ <label class="font_normal_body" style="width: 30%">维&ensp;修&ensp;员</label>
83
+ <v-select :value="model.serviceacitivity[0].f_reciever" :value-single="true"
84
+ :options='repairers' placeholder='请选择维修员'
85
+ close-on-select v-on:change="repiarmancg" style="width: 60%"></v-select>
86
+ </div>
87
+ <div class="col-sm-6 form-group form-fix-width">
88
+ <label class=" font_normal_body" style="width: 30%">工单来源</label>
89
+ <v-select :value="model.f_source" :value-single="true"
90
+ :options='sources' placeholder='请选择工单来源'
91
+ close-on-select
92
+ v-on:change="sourcechange" style="width: 60%"></v-select>
93
+ </div>
94
+ <div class="col-sm-6 form-group form-fix-width">
95
+ <label class=" font_normal_body" style="width: 30%">截止天数</label>
96
+ <v-select :value="model.day" :value-single="true"
97
+ :options='days' placeholder='请选择截止天数'
98
+ close-on-select
99
+ v-on:change="daychange" style="width: 60%"></v-select>
100
+ </div>
101
+
102
+ <div class="col-sm-6 form-group form-fix-width">
103
+ <label class=" font_normal_body" style="width: 30%">截止时间</label>
104
+ <datepicker placeholder="请选择截至时间"
105
+ :value.sync="model.f_finish_date"
106
+ v-model="model.f_finish_date"
107
+ :format="'yyyy-MM-dd HH:mm:ss'"
108
+ style="width: 60%"
109
+ :disabled="flag" ></datepicker>
110
+ </div>
111
+ <div class="col-sm-12 form-group form-fix-width">
112
+ <label for="f_alarm_accident" class="font_normal_body" style="width: 15%">报警事故地址</label>
113
+ <input style="width: 80%" type="text" class="form-control" v-model="model.f_alarm_accident"
114
+ id="f_alarm_accident" placeholder="报警事故地址"
115
+ v-el:address v-next-el="idnumber"
116
+ />
117
+ </div>
118
+ <div class="row">
119
+ <div class="col-sm-12 form-group form-fix-width">
120
+ <label class="font_normal_body" style="width: 15%">报警详细内容</label>
121
+ <textarea style="width: 80%" name="name" rows="2" class="ver-textarea" class="form-control"
122
+ v-model='model.f_alarm_details'></textarea>
123
+ </div>
124
+ </div>
125
+
126
+ </div>
127
+ <!-- <div class="row" style="margin-left: 5%">-->
128
+ <!-- <div class="col-xs-2 col-sm-2 " v-for="item in radios">-->
129
+ <!-- <input class="" v-model="picked" :value="item.label" :checked='item.isChecked' @click="check(item.value)" type="radio">{{item.label}}-->
130
+ <!-- </div>-->
131
+ <!-- </div>-->
132
+ <failure-edit v-ref:failureedit @input="procFailure" :value="model.failure"></failure-edit>
133
+
134
+ <div class="row">
135
+ <div class="col-sm-12 form-group form-fix-width">
136
+ <label class="font_normal_body" style="width: 15%">备&emsp;&emsp;注</label>
137
+ <textarea style="width: 80%" name="name" rows="2" class="ver-textarea" class="form-control"
138
+ v-model='model.f_remarks'></textarea>
139
+ </div>
140
+ </div>
141
+ <div class="row">
142
+ <button type="button" name="button" class="btn btn-difault" v-if="operType !== '报修'" @click="$emit('cancel')">
143
+ 取消
144
+ </button>
145
+ <!--<button type="button" name="button" class="btn btn-danger btn-ln fr" @click="save" :disabled='IsClickDisabled'>-->
146
+ <button type="button" name="button" class="btn btn-danger btn-ln fr" @click="save">
147
+ 提交
148
+ </button>
149
+ <button type="button" name="button" style="margin-right: 3%" v-if="operType == '报修'"
150
+ class="btn btn-difault btn-ln fr" @click="cleardata('init')">
151
+ 清空
152
+ </button>
153
+ </div>
154
+ </validator>
155
+ <modal :show.sync="showMessage" large="true" v-ref:modal backdrop="false">
156
+ <header slot="modal-header" class="modal-header">
157
+ 提醒
158
+ </header>
159
+ <article slot="modal-body" class="modal-body">
160
+ <div class="from-group col-smm-12 col-md-12 col-xs-12">
161
+ {{ message }}
162
+ </div>
163
+ </article>
164
+ <footer slot="modal-footer" class="modal-footer">
165
+ <button type="button" class="btn btn-success" @click='close'>确认</button>
166
+ </footer>
167
+ </modal>
168
+ </div>
169
+ </template>
170
+
171
+ <script>
172
+ import FailureEdit from '../pc/FailureEdit'
173
+ import {HttpResetClass} from 'vue-client'
174
+ import * as Util from '../../../components/Util'
175
+
176
+ // 获取派单类型, 类型 : 转站点,转维修员,自选模式
177
+ let getSendType = async function (self) {
178
+ try {
179
+ // 如果初始化为派维修员,则不获取配置文件
180
+ if (self.meading == '转维修员') {
181
+ self.model.f_handlingtype = '转维修员'
182
+ } else if (self.meading == '转站点') {
183
+ let http = new HttpResetClass()
184
+ let result = await http.load('GET', `rs/vue/sendType.json`, {}, {resolveMsg: null, rejectMsg: null})
185
+ //tag
186
+ if (result.data.sendType == '自选模式') {
187
+ self.selectSendshow = true
188
+ } else {
189
+ // 转站点/转维修员
190
+ if (result.data.sendType == '转维修员') {
191
+ self.model.f_handlingtype = '转维修员'
192
+ }
193
+ self.meading = result.data.sendType
194
+ }
195
+ }
196
+ } catch (e) {
197
+ //tag
198
+ } finally {
199
+ // 获取维修员
200
+ if (self.meading == '转维修员') {
201
+ self.repairers = []
202
+ self.getEmp("维修员")
203
+ }
204
+ self.model.f_user_type = "民用"
205
+ if (self.operType === '报修') {
206
+ self.assignObj()
207
+ } else if (self.operType === '重新派单') {
208
+ // 通过当前登录人获取需要重新派发单子,也可对单子进行修改
209
+ self.setModifyOrder()
210
+ } else if (self.operType === '修改工单') {
211
+ // 通过传入数据,查询出工单,选择站点将不可点击
212
+ self.setModifyOrder()
213
+ }
214
+ }
215
+ }
216
+ // 工作类型对应的各项设置
217
+ const config = {
218
+ '报修': {
219
+ url: 'rs/logic/callerSend'
220
+ },
221
+ '重新派单': {
222
+ url: 'rs/logic/resend'
223
+ },
224
+ '修改工单': {
225
+ url: 'rs/logic/modifyOrder'
226
+ },
227
+ }
228
+
229
+ export default {
230
+ title: '报修单',
231
+ props: {
232
+ data: { // 用户基本信息
233
+ type: Object,
234
+ default: null
235
+ },
236
+ type: { // 类型,为区分复选框,当组件重用并切重用组件同时出现,复选框id相同时会有干扰,
237
+ type: String
238
+ },
239
+ callObj: { // 话务对象
240
+ type: Object,
241
+ default: null
242
+ },
243
+ loginUser: {
244
+ type: Object
245
+ },
246
+ modifyOrder: { // 修改工单传入得工单信息
247
+ type: Object
248
+ },
249
+ operType: { // 操作类型,有报修,重新派单,修改工单,其中修改时,选择站点将不可点击,重新派单和修改要先将工单查询出来
250
+ type: String,
251
+ default: '报修'
252
+ },
253
+ meading: {
254
+ type: String,
255
+ default: '转维修员'
256
+ },
257
+ // 其他类型工单提交,清空控制
258
+ cleantf: {
259
+ type: Number
260
+ }
261
+ },
262
+ data() {
263
+ return {
264
+
265
+ selectSendshow: false,
266
+ radios: [
267
+ {
268
+ label: '安检',
269
+ value: 0,
270
+ isChecked: false,
271
+ },
272
+ {
273
+ label: '巡检',
274
+ value: 1,
275
+ isChecked: false,
276
+ },
277
+ {
278
+ label: '第三个个',
279
+ value: 2,
280
+ isChecked: false,
281
+ },
282
+ {
283
+ label: '第四个个',
284
+ value: 3,
285
+ isChecked: false,
286
+ }
287
+ ],
288
+ // 选择小区树参数
289
+ // villagedata: {
290
+ // f_locationId: this.$login.f.parent.parentid,
291
+ // f_locationType: 't_organization'
292
+ // },
293
+ flag:true,
294
+ addressshow: false,
295
+ addressselect: false,
296
+ phoneValid: false,
297
+ residential: [],
298
+ row: {
299
+ f_residential_area: ''
300
+ },
301
+ residentialquery: '',
302
+ servicesource: '话务来电', // 工单来源
303
+ areacondition: '',
304
+ testdata: {f_equipment: ''},
305
+ residentialTemplate: 'f_villagename',
306
+ unitTemplate: 'f_unitname',
307
+ model: {
308
+ // 一次派单
309
+ serviceacitivity: [{
310
+ f_service_acitivity_type: '派单'
311
+ }],
312
+ f_source: '话务来电',
313
+ f_finish_date:'',
314
+ f_service_id: '',
315
+ f_contact_phone: '',
316
+ f_enter_number: '',
317
+ f_meetunit: '',
318
+ f_phone: '',
319
+ f_user_name: '',
320
+ f_address: '',
321
+ f_alarm_accident: '',//报警详细地址
322
+ f_alarm_details: '',//报警详细内容
323
+ f_calledmatter_sattention: '',//接警注意事项
324
+ f_repair_date: Util.getNowDate(),
325
+ f_card_id: '',
326
+ // f_department: '', 站点选择
327
+ f_reciever: '',
328
+ f_remarks: '',
329
+ f_user_type: '',
330
+ f_area: '',
331
+ f_unit_name: '',
332
+ f_street: '',
333
+ f_residential_area: '',
334
+ f_building: '',
335
+ f_unit: '',
336
+ f_floor: '',
337
+ f_room: '',
338
+ aState: null,
339
+ f_handlingtype: '转维修员',
340
+ f_repairtype: '',
341
+ f_orgid: this.$login.f.orgid,
342
+ f_orgname: this.$login.f.orgs,
343
+ f_depname: this.$login.f.dops,
344
+ f_depid: this.$login.f.depids,
345
+ f_operator: this.$login.f.name,
346
+ f_operatorid: this.$login.f.id,
347
+ f_filiale: '',
348
+ f_filiale_id: ''
349
+ },
350
+ showMessageData: {},
351
+ showMessage: false,
352
+ message: '',
353
+ types: [],
354
+ picked: '',
355
+ information: [], // 用来存放字表信息
356
+ serviceList: null, // 用来存放查询当前地址下的未完成工单
357
+ id: '', // 编写测试时会使用
358
+ f_service_id: '',// 编写测试时会使用
359
+ repairstypes: this.$appdata.getParam('报修类型'),
360
+ usertypes: this.$appdata.getParam('用户类型'),
361
+ // stands : this.$appdata.getParam('站点管理员'),
362
+ days:this.$appdata.getParam('截止天数'),
363
+ sources: this.$appdata.getParam('工单来源'),
364
+ handling: [{label: '转站点', value: '转站点'}, {label: '转维修员', value: '转维修员'}, {label: '转运营系统', value: '转运营系统'}],
365
+ source:
366
+ 'dep=this.getParentByType($organization$).getSpecialResByType($department$),' +
367
+ 'tool.getFullTree(dep.where(row.hasSpecialRole($派单员$)))',
368
+ userid: this.$login.f.id,
369
+ repairers: [] // 维修员
370
+ }
371
+ },
372
+ ready() {
373
+
374
+ // 获取sendType.json配置信息 获取派单类型 转站点,转维修员,自选模式
375
+ getSendType(this)
376
+
377
+ },
378
+ methods: {
379
+ daychange(val){
380
+ if (val=='其他'){
381
+ this.flag = false
382
+ }else {
383
+ this.flag = true
384
+ let t = new Date();//你已知的时间
385
+ let t1= t.getTime()
386
+ val = val*1000
387
+ t.setTime(t1 + val * 60 * 60 * 24);
388
+ let Y = t.getFullYear() + '-'
389
+ let M = (t.getMonth()+1 < 10 ? '0'+(t.getMonth()+1):t.getMonth()+1) + '-'
390
+ let D = (t.getDate()< 10 ? '0'+t.getDate():t.getDate())+ ' '
391
+ let h = (t.getHours() < 10 ? '0'+t.getHours():t.getHours())+ ':'
392
+ let m = (t.getMinutes() < 10 ? '0'+t.getMinutes():t.getMinutes())+ ':'
393
+ let s = t.getSeconds() < 10 ? '0'+t.getSeconds():t.getSeconds()
394
+ this.model.f_finish_date = Y+M+D+h+m+s
395
+ console.log("当前时间:"+Y+M+D+h+m+s)
396
+ }
397
+ },
398
+ getRepairstypes(val) {
399
+ this.$refs.failureedit.getFailure(val)
400
+ },
401
+ close() {
402
+ this.showMessage = false
403
+ this.showMessageData = {}
404
+ this.message = ''
405
+ },
406
+ changeFault(val) {
407
+ //tag
408
+ if (val == '安检') {
409
+ this.getEmp("安检员")
410
+ } else if (val == '巡检巡线') {
411
+ this.getEmp("巡检巡线员")
412
+ } else if (val == '工程电修') {
413
+ this.getEmp("工程电修组")
414
+ } else if (val == '其他') {
415
+ this.getEmp("其他")
416
+ }
417
+ },
418
+ check(index) {
419
+ //tag
420
+ // 先取消所有选中项
421
+ for (let item of this.radios) {
422
+ item.isChecked = false;
423
+ }
424
+ //再设置当前点击项选中
425
+ this.picked = this.radios[index].label;
426
+ // 设置值,以供传递
427
+ this.radios[index].isChecked = true;
428
+ //tag;
429
+ },
430
+ // 当维修员发生改变,获取维修员手机号
431
+ repiarmancg(val) {
432
+ if (val) {
433
+ this.model.serviceacitivity[0].f_reciever = val
434
+ let http1 = new HttpResetClass()
435
+ http1.load('POST', 'rs/sql/tel_singleTable_OrderBy', {
436
+ data: {
437
+ items: 'f_user_telephone',
438
+ tablename: 't_user',
439
+ condition: `name = '${val}'`,
440
+ orderitem: 'id'
441
+ }
442
+ }, {resolveMsg: null, rejectMsg: null}).then((ress) => {
443
+ this.model.f_repairman_phone = ress.data[0].f_user_telephone
444
+ })
445
+ }
446
+ },
447
+ // 当工单来源属性发生改变
448
+ sourcechange(val) {
449
+ if (val == undefined || val == '') {
450
+ return
451
+ }
452
+ this.model.f_source = val
453
+ this.servicesource = val
454
+ },
455
+ // 获取维修员
456
+ getEmp(role) {
457
+ this.repairers = []
458
+ let val
459
+ if (this.$parent.$parent.findid == 0) {
460
+ val = {
461
+ source: 'this.getParentByType($department$).getAllChildrens().where(row.getAttributes().get($rolestr$).indexOf($维修员$)!=-1))',
462
+ userid: `${this.$login.f.id}`
463
+ }
464
+ } else {
465
+ val = {
466
+ source: `this.getParentByType($organization$).getChildByName($${role}$).getUsers()`,
467
+ userid: `${this.$login.f.id}`
468
+ }
469
+ }
470
+ // let val = {source: 'this.getParentByType($department$).getChildByName($置换员$).getUsers()', userid: `${this.$login.f.id}`}
471
+ let http = new HttpResetClass()
472
+ http.load('POST', '/rs/search', {data: val}, {resolveMsg: null, rejectMsg: null}).then((res) => {
473
+ res.data.forEach((item) => {
474
+ this.repairers.push({label: item.name, value: item.name})
475
+ })
476
+ })
477
+ },
478
+ adressslect(val) {
479
+ if (val == "NO") {
480
+ this.addressshow = true
481
+ this.addressselect = true
482
+ } else {
483
+ this.addressshow = false
484
+ this.addressselect = false
485
+ }
486
+ },
487
+ // 控制地址管理组件显示与否
488
+ adressoff(val) {
489
+ if (val == "NO") {
490
+ this.addressshow = true
491
+ this.addressselect = false
492
+ } else {
493
+ this.addressshow = false
494
+ this.addressselect = true
495
+ }
496
+ },
497
+ // 截取字符串
498
+ interceptString(val) {
499
+ },
500
+ // 选中地址
501
+ rerefParent(val, addstr) {
502
+ var rows = val.rows
503
+ let num = 0
504
+ this.model.f_addressjson = JSON.stringify(rows)
505
+ this.model.f_addressid = val.id
506
+ if (rows.length > 0) {
507
+ let arrid = this.model.f_addressid.split('.')
508
+ for (let i = 0; i < rows.length; i++) {
509
+ if (rows[i].type === '楼号') {
510
+ this.model.f_building = rows[i].name
511
+ } else if (rows[i].type === '楼层') {
512
+ this.model.f_floor = rows[i].name
513
+ } else if (rows[i].type === '门牌号') {
514
+ this.model.f_room = rows[i].name
515
+ this.model.f_room_id = arrid[i]
516
+ } else if (rows[i].type === '区') {
517
+ this.model.f_area = rows[i].name
518
+ } else if (rows[i].type === '街道') {
519
+ this.model.f_street = rows[i].name
520
+ } else if (rows[i].type === '小区') {
521
+ this.model.f_residential_area = rows[i].name
522
+ this.model.f_districtname_id = arrid[i]
523
+ } else if (rows[i].type === '单元') {
524
+ this.model.f_unit = rows[i].name
525
+ }
526
+ }
527
+ }
528
+ // this.address()
529
+ this.model.f_address = addstr
530
+ },
531
+ // 选中部门
532
+ reres(val) {
533
+ if (val.res == undefined || val.res[0] == undefined || val.res[0] == '') {
534
+ return
535
+ }
536
+ this.model.serviceacitivity[0].f_meetunit = val.res[0]
537
+ this.model.f_meetunit = val.res[0]
538
+ this.model.f_filiale_id = val.orgobj[0].parentid
539
+ this.model.f_filiale = val.orgobj[0].parentname
540
+ this.model.f_outlets = val.res[0]
541
+ this.model.serviceacitivity[0].f_reciever = val.resids[0]
542
+ },
543
+ onReady() {
544
+ //tag
545
+ this.$emit('ready')
546
+ },
547
+ onError(error) {
548
+ //tag
549
+ this.$emit('error', error)
550
+ },
551
+ add(query) {
552
+ if (typeof (query) === 'string') {
553
+ this.model.f_residential_area = query
554
+ this.address()
555
+ }
556
+ },
557
+ // 修改或者重派工单时,加载工单的故障信息
558
+ projectCallback(item) {
559
+ if (item) {
560
+ return item.f_user_name
561
+ }
562
+
563
+ },
564
+ selectUnit(query) {
565
+ return this.$resetpost('rs/sql/tel_singleTable_OrderBy',
566
+ {
567
+ data: {
568
+ items: 'f_unitname',
569
+ tablename: 't_unitcoordinate',
570
+ condition: `(f_unitname like '${query}%' or F_TRANS_PINYIN_CAPITAL(f_unitname) like '${query}%')and rownum<10`,
571
+ orderitem: 'id'
572
+ }
573
+ }, {resolveMsg: null, rejectMsg: null}
574
+ )
575
+ },
576
+ selectResidential(query) {
577
+ return this.$resetpost('rs/sql/tel_singleTable_OrderBy',
578
+ {
579
+ data: {
580
+ items: 'f_villagename',
581
+ tablename: 't_villagecoordinate',
582
+ condition: `(f_villagename like '${query}%' or F_TRANS_PINYIN_CAPITAL(f_villagename) like '${query}%')and rownum<10`,
583
+ orderitem: 'id'
584
+ }
585
+ }, {resolveMsg: null, rejectMsg: null}
586
+ )
587
+ },
588
+ setModifyOrder() {
589
+ this.meading = this.modifyOrder.f_handlingtype
590
+ if(this.meading === '转维修员' ){
591
+ this.getEmp('维修员')
592
+ }
593
+ this.model = Object.assign({}, this.model, this.modifyOrder)
594
+ },
595
+ assignObj() {
596
+ if (this.data) {
597
+ this.model.f_address = this.data.f_address
598
+ this.model.f_user_name = this.data.f_user_name
599
+ this.model.f_user_type = this.data.f_user_type
600
+ this.model.f_contact_phone = this.data.f_user_phone
601
+ this.model.f_enter_number = this.data.f_enter_number
602
+ this.model.f_userinfo_id = this.data.f_userinfo_id
603
+ this.model.f_userinfo_code = this.data.f_userinfo_code
604
+ //tag
605
+ // this.residentialquery = this.data.unit_name
606
+ this.model.f_card_id = this.data.card_id
607
+ if (this.model.f_user_type === '民用') {
608
+ this.model.f_area = this.data.f_area
609
+ this.model.f_street = this.data.f_street
610
+ this.model.f_residential_area = this.data.f_residential_area
611
+ this.model.f_building = this.data.f_building
612
+ this.model.f_unit = this.data.f_unit
613
+ this.model.f_floor = this.data.f_floor
614
+ this.model.f_room = this.data.f_room
615
+ //this.address()
616
+ }
617
+ }
618
+
619
+ //this.checkServerList(this.model.f_address)
620
+ },
621
+ // 提交
622
+ getData(val) {
623
+ return this.residential
624
+ },
625
+ // 清楚信息
626
+ cleardata(type) {
627
+ this.model = Object.assign({}, {
628
+ // 一次派单
629
+ serviceacitivity: [{
630
+ f_service_acitivity_type: '派单',
631
+ f_meetunit: this.model.serviceacitivity[0].f_meetunit,
632
+ f_reciever: this.model.serviceacitivity[0].f_reciever
633
+ }],
634
+ f_finish_date:'',
635
+ f_repairman_phone:this.model.f_repairman_phone,
636
+ f_meetunit: this.model.f_meetunit,
637
+ f_orgstr: this.model.f_orgstr,
638
+ f_outlets: this.model.f_outlets,
639
+ f_service_id: '',
640
+ f_contact_phone: '',
641
+ f_enter_number: '',
642
+ f_alarm_accident: '',//报警详细地址
643
+ f_alarm_details: '',//报警详细内容
644
+ f_calledmatter_sattention: '', //接警注意事项
645
+ f_phone: '',
646
+ f_user_name: '',
647
+ failure: '',
648
+ f_json: '',
649
+ f_userinfo_id: '',
650
+ f_address: '',
651
+ f_repair_date: Util.getNowDate(),
652
+ f_card_id: '',
653
+ f_remarks: '',
654
+ f_user_type: '',
655
+ f_area: '',
656
+ f_street: '',
657
+ f_residential_area: '',
658
+ f_source: this.servicesource,
659
+ f_building: '',
660
+ f_unit: '',
661
+ f_floor: '',
662
+ f_room: '',
663
+ f_handlingtype: this.model.f_handlingtype,
664
+ aState: null,
665
+ f_orgid: this.$login.f.orgid,
666
+ f_orgname: this.$login.f.orgs,
667
+ f_depname: this.$login.f.dops,
668
+ f_depid: this.$login.f.depids,
669
+ f_operator: this.$login.f.name,
670
+ f_operatorid: this.$login.f.id,
671
+ f_filiale: this.model.f_filiale,
672
+ f_filiale_id: this.model.f_filiale_id
673
+
674
+ }),
675
+ this.modifyOrder = {}
676
+ this.types = []
677
+ this.data = {}
678
+ if (this.callObj && this.callObj.callNum && type != 'init') {
679
+ // Util.afterCallBz(this.$login.f.id, this.$login.f.name)
680
+ this.callObj.callNum = null
681
+ this.callObj.RecordsID = null
682
+ this.model.aState = null
683
+ }
684
+ this.$refs.failureedit.failure.f_failure_type = []
685
+
686
+ },
687
+ save() {
688
+ if (this.model.f_address == '' || this.model.f_address == undefined) {
689
+ return this.$showAlert('请输入地址!', 'warning', 2000)
690
+ }
691
+ if (this.model.f_repairtype == '' || this.model.f_repairtype == undefined) {
692
+ return this.$showAlert('请选择警情类别!', 'warning', 2000)
693
+ }
694
+ if (!JSON.parse(this.model.failure)[0].f_failure_type || JSON.parse(this.model.failure)[0].f_failure_type.length==0) {
695
+ return this.$showAlert('请选择警情内容类别!', 'warning', 2000)
696
+ }
697
+
698
+ // 判断是否选择工单接收人
699
+ if (this.operType != '修改工单') {
700
+ if (this.model.serviceacitivity[0].f_reciever == '' || this.model.serviceacitivity[0].f_reciever == undefined) {
701
+ if (this.meading == '转维修员') {
702
+ return this.$showAlert('请选择维修人员', 'warning', 2000)
703
+ } else if (this.meading == '转站点') {
704
+ return this.$showAlert('请选择站点', 'warning', 2000)
705
+ }
706
+ }
707
+ }
708
+ if (this.meading == '转维修员') {
709
+ this.model.f_meetunit = this.$login.f.deps
710
+ this.model.f_orgid = this.$login.f.orgid
711
+ this.model.f_filiale = this.$login.f.org
712
+ this.model.f_outlets = this.$login.f.deps
713
+ }
714
+ this.model.f_filiale_id = this.$login.f.orgid
715
+ let data = {
716
+ model: this.model,
717
+ loginUser: {
718
+ name: this.loginUser.name,
719
+ ename: this.loginUser.ename
720
+ }, user: this.data, callObj: this.callObj
721
+ }
722
+ // 如果是修改工单,受理人还是原始的 派单人 不做修改
723
+ if (this.operType == '报修') {
724
+ data.model.f_attendant = this.loginUser.name
725
+ }
726
+ if(data.model.failure){
727
+ data.model.f_json = this.trouble(data.model.failure)
728
+ }
729
+ //tag)
730
+ // // 获得数据发送地址
731
+ // let url = config[this.operType].url
732
+ // 获得数据发送地址
733
+ let url = ''
734
+ if (this.meading === '转站点') {
735
+ url = config[this.operType].url
736
+ } else {
737
+ url = config[this.operType].url
738
+ if (this.meading == '转维修员') {
739
+ data.toRepair = '一级派单'
740
+ } else if (this.meading == '转运营系统') {
741
+ data.toRepair = '转运营系统'
742
+ }
743
+ }
744
+ this.showMessageData = data
745
+ return this.$resetpost(url, data).then((data) => {
746
+ if (data.data && data.data.id) {
747
+ this.id = JSON.parse(data.data.id).id
748
+
749
+ }
750
+ if (this.callObj && this.callObj.callNum) {
751
+ //tag
752
+ Util.afterCallBz(this.$login.f.id, this.$login.f.name)
753
+ }
754
+
755
+ // 清空数据
756
+ this.$emit('commitsus', this.model.f_phone)
757
+ this.cleardata()
758
+ this.showMessageData.f_service_id = data.data.f_service_id
759
+ this.showMessageData.message = '通知消息为:工单号:' + this.showMessageData.f_service_id +
760
+ ',报警人:' + this.showMessageData.model.f_user_name +
761
+ ',报警电话:' + this.showMessageData.model.f_phone +
762
+ ',联系电话:' + this.showMessageData.model.f_contact_phone +
763
+ ',接管时间:' + this.showMessageData.model.f_repair_date +
764
+ ',警情类别:' + this.showMessageData.model.f_repairtype +
765
+ ',报警类别:' + JSON.parse(this.showMessageData.model.failure)[0].f_failure_type +
766
+ ',报警事故地址:' + this.showMessageData.model.f_alarm_accident +
767
+ ',报警详细内容:' + this.showMessageData.model.f_alarm_details +
768
+ ',出警人:' + this.showMessageData.model.serviceacitivity[0].f_reciever +
769
+ ',出警人电话:' + this.showMessageData.model.f_repairman_phone
770
+ this.showMessage = true
771
+ this.message = this.showMessageData.message
772
+ //点提交后提示该单信息
773
+ if (data.data && data.data.msg) {
774
+ //tag
775
+ this.$showMessage(data.data.msg)
776
+ }
777
+ })
778
+ },
779
+ address() {
780
+ let strAddress = `${this.model.f_area ? this.model.f_area
781
+ + '-' : ''}${this.model.f_street ? this.model.f_street
782
+ + '-' : ''}${this.model.f_residential_area ? this.model.f_residential_area
783
+ + '' : ''}${this.model.f_building ? this.model.f_building
784
+ + '号楼' : ''}${this.model.f_unit ? this.model.f_unit
785
+ + '单元' : ''}${this.model.f_floor ? this.model.f_floor
786
+ + '层' : ''}${this.model.f_room ? this.model.f_room
787
+ + '室' : ''}`
788
+ this.model.f_address = strAddress
789
+ },
790
+ // 检查相同地址下有没有还未完成的工单
791
+ checkServerList(address) {
792
+ if (this.model.f_area && this.model.f_area && this.model.f_residential_area && this.model.f_building
793
+ && this.model.f_unit && this.model.f_floor && this.model.f_room) {
794
+ this.$console.info('开始查询')
795
+ // 地址所有区域输入完成查询
796
+ // this.$resetpost('rs/sql/getServiceActivity.sql', { condition: `f_address = '${address}' and f_single_type = '报修单'`}, {resolveMsg: null, rejectMsg: null}).then((res) => {
797
+ // //有未完成工单
798
+ // let ls = res.data.length
799
+ // if (ls > 0) {
800
+ // // 当前地址下还有工单未完成
801
+ // }
802
+ // })
803
+ }
804
+ },
805
+ trouble (val) {
806
+ let failureall=''
807
+ // val=[{"f_failure_type":"抽油烟机","failurecase":[],"f_equipment":""},{"f_failure_type":"抽油烟机","failurecase":[],"f_equipment":""},{"f_failure_type":"抽油烟机","failurecase":[],"f_equipment":""}]
808
+
809
+ let failure = JSON.parse(val)
810
+ for (let i = 0; i <failure.length; i++) {
811
+ if (failure[i].failurecase.length>0){
812
+ failureall+=failure[i].f_failure_type+":"
813
+ for (let j = 0; j < failure[i].failurecase.length; j++) {
814
+ failureall+=failure[i].failurecase[j]
815
+ if (j+1!=failure[i].failurecase.length){
816
+ failureall+=","
817
+ }
818
+ }
819
+
820
+ }else{
821
+ failureall+=failure[i].f_failure_type
822
+ }
823
+ if (i+1!=failure.length){
824
+ failureall+=';'
825
+ }
826
+ }
827
+ return failureall
828
+ },
829
+ // 处理故障输入
830
+ procFailure(value) {
831
+ if (typeof (value.result) === 'string') {
832
+ this.model.failure = value.result
833
+ console.log('this.model.failure----------', this.model.failure)
834
+ this.model.f_calledmatter_sattention = value.f_calledmatter_sattention
835
+ }
836
+ },
837
+ },
838
+ watch: {
839
+ // 转接类型
840
+ 'model.f_handlingtype'() {
841
+ // 清楚上次记录
842
+ this.model.serviceacitivity[0].f_reciever = ''
843
+ this.model.serviceacitivity[0].f_meetunit = ''
844
+ this.model.f_meetunit = ''
845
+ this.model.f_orgstr = ''
846
+ this.model.f_outlets = ''
847
+ this.model.f_repairman_phone = ''
848
+ if (this.model.f_handlingtype == '转维修员') {
849
+ this.meading = '转维修员'
850
+ this.repairers = []
851
+ this.getEmp("维修员")
852
+ } else if (this.model.f_handlingtype == '转站点') {
853
+ this.repairers = []
854
+ this.meading = '转站点'
855
+ } else {
856
+ this.repairers = []
857
+ this.meading = '转运营系统'
858
+ this.model.serviceacitivity[0].f_reciever = '运营系统'
859
+ }
860
+ },
861
+ // 是否清空
862
+ 'cleantf'() {
863
+
864
+ this.cleardata()
865
+ },
866
+ 'data'() {
867
+ this.assignObj()
868
+ },
869
+ 'model.f_contact_phone'(val) {
870
+ this.phoneValid = /^((0\d{2,3}-\d{7,8})|(1[3584]\d{9}))$/.test(this.model.f_contact_phone)
871
+ },
872
+ // 话务对象发生变化将来电电话赋值给f_phone
873
+ 'callObj.callNum'() {
874
+ this.cleardata('init')
875
+ this.model.f_phone = this.callObj.callNum
876
+ this.model.f_records_id = this.callObj.RecordsID
877
+ // this.model.f_contact_phone = this.callObj.callNum
878
+ this.model.f_repair_date = Util.getNowDate()
879
+ },
880
+ 'types.length'() {
881
+ var ev = new Event("resize", {"bubbles": true, "cancelable": false});
882
+ window.dispatchEvent(ev);
883
+ },
884
+ 'callObj.aState'() {
885
+ this.model.aState = this.callObj.aState
886
+ //tag
887
+ }
888
+ },
889
+ computed: {
890
+ IsClickDisabled: function () {
891
+ if (this.$v.valid) {
892
+ if (this.model.aState === null) {
893
+ //tag
894
+ return false
895
+ }
896
+ if (this.model.f_phone && this.model.aState === '正在保存' && this.model.aState === '置忙') {
897
+ //tag
898
+ return false
899
+ }
900
+ if (!this.model.f_phone) {
901
+ //tag
902
+ return false
903
+ } else {
904
+ //tag
905
+ return true
906
+ }
907
+ }
908
+ },
909
+ getTestData() {
910
+ return this.testdata
911
+ },
912
+ serviceacitivity() {
913
+ return this.model.serviceacitivity.find((row) => {
914
+ return row.f_service_acitivity_type === '派单'
915
+ })
916
+ },
917
+ alertObject() {
918
+ let result = this.model.failure.find((value) => {
919
+ return value.f_failure_type === '报警器'
920
+ })
921
+ if (result) {
922
+ return result
923
+ }
924
+ return {f_equipment: ''}
925
+ },
926
+ gasstove() {
927
+ let result = this.model.failure.find((value) => {
928
+ return value.f_failure_type === '燃气灶'
929
+ })
930
+ if (result) {
931
+ return result
932
+ }
933
+ return {f_equipment: ''}
934
+ },
935
+ furnace() {
936
+ let result = this.model.failure.find((value) => {
937
+ return value.f_failure_type === '壁挂炉'
938
+ })
939
+ if (result) {
940
+ return result
941
+ }
942
+ return {f_equipment: ''}
943
+ },
944
+ heater() {
945
+ let result = this.model.failure.find((value) => {
946
+ return value.f_failure_type === '热水器'
947
+ })
948
+ if (result) {
949
+ return result
950
+ }
951
+ return {f_equipment: ''}
952
+ },
953
+ lampblack() {
954
+ let result = this.model.failure.find((value) => {
955
+ return value.f_failure_type === '油烟机'
956
+ })
957
+ if (result) {
958
+ return result
959
+ }
960
+ return {f_equipment: ''}
961
+ }
962
+ },
963
+ events: {
964
+ getPosition(val) {
965
+ //tag
966
+ this.$dispatch('distribute', val)
967
+
968
+ }
969
+ },
970
+ components: {
971
+ FailureEdit,
972
+ 'failure-edit': FailureEdit
973
+ }
974
+ }
975
+
976
+ </script>
977
+ <style>
978
+ .class-error {
979
+ color: #a94442;
980
+ }
981
+
982
+ </style>