telephone-clients 3.0.104-1 → 3.0.104-100

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 (102) hide show
  1. package/package.json +3 -3
  2. package/src/App.vue +54 -54
  3. package/src/components/android/ImgArea.vue +80 -0
  4. package/src/components/guoxin/Console.vue +42 -5
  5. package/src/components/guoxin/call.state.api.js +3 -1
  6. package/src/components/pc/ComplainWork.vue +3 -0
  7. package/src/components/pc/NewRepairPaper.vue +370 -370
  8. package/src/components/pc/RecordListLeft.vue +80 -10
  9. package/src/components/pc/RepairsWork.vue +33 -3
  10. package/src/components/pc/RoleSelector.vue +7 -1
  11. package/src/components/pc/Seekwork.vue +3 -0
  12. package/src/components/pc/SiteSend.vue +38 -1
  13. package/src/components/pc/TelLossList.vue +20 -3
  14. package/src/components/pc/VisitInfo.vue +44 -7
  15. package/src/components/pc/WorkHistory.vue +1 -1
  16. package/src/components/pc/WorkList.vue +4 -3
  17. package/src/components/pc/WorkListAllNew.vue +16 -8
  18. package/src/components/pc/WorkListNew.vue +722 -712
  19. package/src/components/sendsingle/onlinequeryuser.vue +1 -1
  20. package/src/components/telcount/TelByOrderMan.vue +22 -4
  21. package/src/components/telreport/RepairsDetailsReport.vue +2 -2
  22. package/src/components/telreport/TrafficClassificationReport.vue +13 -13
  23. package/src/components/telreport/Trafficassess.vue +2 -2
  24. package/src/components/temp/HandplanInfo.vue +16 -1
  25. package/src/components/temp/InstructInfo.vue +1 -1
  26. package/src/components/temp/SecuritycheckInfo.vue +14 -0
  27. package/src/components/workorder/RepairDetails.vue +8 -2
  28. package/src/components/workorder/RepairInfo.vue +3 -3
  29. package/src/components/workorder/RepairPaperAndroid.vue +351 -0
  30. package/src/components/workorder/ServiceOnlineQuery.vue +306 -0
  31. package/src/components/workorder/TemporarySingle.vue +346 -302
  32. package/src/filiale/furuike/pc/QueryVisitHistory.vue +14 -1
  33. package/src/filiale/furuike/pc/WorkHistory.vue +576 -576
  34. package/src/filiale/hanzhong/telephone.js +1 -1
  35. package/src/filiale/jiaocheng/android/createQRcode.vue +204 -0
  36. package/src/filiale/jiaocheng/android/onlineBuyGas.vue +637 -0
  37. package/src/filiale/jiaocheng/telephone.js +8 -0
  38. package/src/filiale/jiaocheng/telephoneAndroid.js +15 -0
  39. package/src/filiale/lixian/onlineChangeMeter.vue +481 -0
  40. package/src/filiale/lixian/onlineoperation.vue +606 -0
  41. package/src/filiale/lixian/onlinequeryuser.vue +509 -0
  42. package/src/filiale/lixian/telephoneAndroid.js +23 -0
  43. package/src/filiale/qianneng/android/AppInstallationMaterial.vue +880 -845
  44. package/src/filiale/qianneng/android/TemporarySingle.vue +537 -537
  45. package/src/filiale/qianneng/pc/MaterialDetailed.vue +260 -260
  46. package/src/filiale/qianneng/pc/NewRepairPaper.vue +467 -467
  47. package/src/filiale/qianneng/pc/RepairsWork.vue +992 -992
  48. package/src/filiale/qianneng/pc/WorkListAllNew.vue +11 -3
  49. package/src/filiale/qianneng/pc/changetable.vue +273 -273
  50. package/src/filiale/qianneng/telephone.js +22 -22
  51. package/src/filiale/rizhao/pc/IgnitionVentilation.vue +0 -1
  52. package/src/filiale/rizhao/pc/RepairsWork.vue +0 -1
  53. package/src/filiale/rizhao/pc/WorkListAllNew.vue +11 -5
  54. package/src/filiale/rizhao/telephone.js +1 -1
  55. package/src/filiale/shanxian/android/RepairFirstV.vue +3 -0
  56. package/src/filiale/shanxian/pc/TelFindUser.vue +310 -0
  57. package/src/filiale/shanxian/pc/WorkList.vue +2 -2
  58. package/src/filiale/shanxian/telephone.js +1 -0
  59. package/src/filiale/shexian/android/AddMyTask.vue +7 -0
  60. package/src/filiale/shexian/android/RepairFirstV.vue +5 -0
  61. package/src/filiale/shexian/android/RepairInfo.vue +1 -0
  62. package/src/filiale/shexian/pc/TelAgentVoiceReport.vue +9 -9
  63. package/src/filiale/shexian/pc/TelByRepairType.vue +3 -3
  64. package/src/filiale/shexian/pc/WorkList.vue +4 -1
  65. package/src/filiale/shexian/pc/WorkListAllNew.vue +14 -1
  66. package/src/filiale/tongchuan/android/RepairDetails.vue +623 -0
  67. package/src/filiale/tongchuan/pc/AnalysisMain.vue +7 -7
  68. package/src/filiale/tongchuan/pc/RepairsWork.vue +8 -0
  69. package/src/filiale/tongchuan/pc/UserWork.vue +8 -0
  70. package/src/filiale/tongchuan/telephoneAndroid.js +1 -0
  71. package/src/filiale/wenxi/android/FaultAll.vue +710 -0
  72. package/src/filiale/wenxi/android/PhoneUpUserinfo.vue +73 -162
  73. package/src/filiale/wenxi/android/RepairOrderV.vue +1 -1
  74. package/src/filiale/wenxi/android/ZHihuanFirst.vue +149 -129
  75. package/src/filiale/wenxi/pc/DistributeWork.vue +1 -1
  76. package/src/filiale/wenxi/pc/RecordListLeft.vue +272 -0
  77. package/src/filiale/wenxi/pc/RepairsWork.vue +143 -64
  78. package/src/filiale/wenxi/pc/TelAgentVoiceReport.vue +290 -0
  79. package/src/filiale/wenxi/pc/TelLossList.vue +272 -0
  80. package/src/filiale/wenxi/pc/WorkListAll.vue +698 -0
  81. package/src/filiale/wenxi/telephone.js +5 -0
  82. package/src/filiale/wenxi/telephoneAndroid.js +2 -1
  83. package/src/filiale/wuhai/telephone.js +1 -1
  84. package/src/filiale/yuncheng/android/LdapHelper.js +75 -0
  85. package/src/filiale/yuncheng/android/Outlay.vue +201 -0
  86. package/src/filiale/yuncheng/android/RepairInfo.vue +163 -0
  87. package/src/filiale/yuncheng/android/RepairOrderV.vue +1483 -0
  88. package/src/filiale/yuncheng/android/RepairUserInfo.vue +390 -0
  89. package/src/filiale/yuncheng/android/RightTree.vue +218 -0
  90. package/src/filiale/yuncheng/android/TemporarySingle.vue +522 -0
  91. package/src/filiale/yuncheng/android/ZHihuanFirst.vue +541 -0
  92. package/src/filiale/yuncheng/pc/DistributeWork.vue +199 -0
  93. package/src/filiale/yuncheng/pc/GasWork.vue +773 -0
  94. package/src/filiale/yuncheng/pc/TelFindUser.vue +31 -11
  95. package/src/filiale/yuncheng/pc/WorkList.vue +823 -0
  96. package/src/filiale/yuncheng/pc/WorkListAllNew.vue +781 -0
  97. package/src/filiale/yuncheng/telephone.js +5 -1
  98. package/src/filiale/yuncheng/telephoneAndroid.js +19 -0
  99. package/src/filiale/zhongyi/pc/WorkListAllNew.vue +2 -1
  100. package/src/main.js +1 -1
  101. package/src/telephone-android.js +7 -0
  102. package/src/telephone.js +1 -1
@@ -0,0 +1,773 @@
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 style="width: 30%" class="font_normal_body" for="f_user_name"
11
+ :class="model.f_user_name ? '': 'class-error' ">联系人</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_gasproperties" :value-single="true"-->
18
+ <!-- :options='gastypes' placeholder='用气性质'-->
19
+ <!-- close-on-select>-->
20
+ <!-- </v-select>-->
21
+ <!-- </div>-->
22
+ <div class="col-sm-6 form-group form-fix-width">
23
+ <label for="f_area" class="font_normal_body" style="width: 30%">客户类型</label>
24
+ <v-select :value.sync="model.f_user_type" :value-single="true"
25
+ :options='usertypes' placeholder='用户类型'
26
+ close-on-select style="width: 60%">
27
+ </v-select>
28
+ </div>
29
+ <div class="col-sm-6 form-group form-fix-width">
30
+ <label style="width: 30%" class="font_normal_body " for="f_contact_phone"
31
+ :class="model.f_contact_phone ? '' : 'class-error'">联系电话</label>
32
+ <input style="width: 60%" type="text" v-model='model.f_contact_phone' id="f_contact_phone"
33
+ class="form-control"/>
34
+ </div>
35
+ <div class="col-sm-12 form-group form-fix-width">
36
+ <label style="width: 15%" for="f_address" class="font_normal_body">详细地址</label>
37
+ <input style="width: 65%" type="text" class="form-control" v-model="model.f_address" id="f_address"
38
+ placeholder="详细地址"
39
+ v-el:address v-next-el="idnumber"/>
40
+ <!-- <button style="width: 15%" type="button" name="button" class="btn btn-difault" @click='adressshow'>-->
41
+ <!-- 选择地址-->
42
+ <!-- </button>-->
43
+ </div>
44
+ </div>
45
+ <div class="row">
46
+ <div class="col-sm-6 form-group form-fix-width" v-if="selectSendshow && operType != '修改工单'">
47
+ <label class="font_normal_body" style="width: 30%">转接方式</label>
48
+ <div class="form-control">
49
+ <label v-for="handling1 in handling">
50
+ <input type="radio"
51
+ v-model="model.f_handlingtype"
52
+ value="{{handling1.label}}">
53
+ {{ handling1.label }}
54
+ </label>
55
+ </div>
56
+ </div>
57
+ <div class="col-sm-6 form-group form-fix-width">
58
+ <label class=" font_normal_body" style="width: 30%">派单类型</label>
59
+ <v-select :value.sync="model.f_handlingtype" :value-single="true"
60
+ :options='handling' placeholder='请选择派单类型'
61
+ close-on-select
62
+ ></v-select>
63
+ </div>
64
+ <div class="col-sm-6 form-group form-fix-width" v-if="meading == '转站点'">
65
+ <label class=" font_normal_body" style="width: 30%">选择站点</label>
66
+ <input type="text" v-show="false" v-model="serviceacitivity.f_reciever">
67
+ <right-tree islist :userid="userid" :source="source" v-on:re-res="reres" :textContent="选择站点" :selectData="">
68
+
69
+ </right-tree>
70
+ </div>
71
+ <div class="col-sm-6 form-group form-fix-width" :class="[$v.f_reciever.required ? 'select-error' : '']"
72
+ v-if="meading == '转维修员'">
73
+ <label class="font_normal_body" style="width: 30%">置换员</label>
74
+ <v-select :value="model.serviceacitivity[0].f_reciever" :value-single="true"
75
+ :options='repairers' placeholder='请选择置换员'
76
+ close-on-select v-on:change="repiarmancg"></v-select>
77
+ </div>
78
+ <div class="col-sm-6 form-group form-fix-width">
79
+ <label class=" font_normal_body" style="width: 30%">工单来源</label>
80
+ <v-select :value="model.f_source" :value-single="true"
81
+ :options='sources' placeholder='请选择工单来源'
82
+ close-on-select
83
+ v-on:change="sourcechange"></v-select>
84
+ </div>
85
+ <div class="col-sm-6 form-group form-fix-width">
86
+ <label class=" font_normal_body" style="width: 30%">预约时间</label>
87
+ <datepicker placeholder="请选择预约时间"
88
+ :value.sync="model.f_yuyue_date"
89
+ v-model="model.f_yuyue_date"
90
+ :format="'yyyy-MM-dd HH:mm:ss'"
91
+ style="width: 60%"></datepicker>
92
+ </div>
93
+
94
+
95
+ </div>
96
+ <div class="row">
97
+ <div class="col-sm-12 form-group form-fix-width">
98
+ <label class="font_normal_body" style="width: 15%">备注</label>
99
+ <textarea style="width: 80%" name="name" rows="2" class="ver-textarea" class="form-control"
100
+ v-model='model.f_remarks'></textarea>
101
+ </div>
102
+ </div>
103
+ <div class="row">
104
+ <button type="button" name="button" class="btn btn-difault" v-if="operType !== '报修'" @click="$emit('cancel')">
105
+ 取消
106
+ </button>
107
+ <!--<button type="button" name="button" style="float: right" class="button_spacing button_search" class="btn btn-danger btn-ln fr" @click="save" :disabled='IsClickDisabled'>-->
108
+ <button type="button" name="button" style="float: right" class="button_spacing button_search" @click="save">
109
+ 提交
110
+ </button>
111
+ </div>
112
+ </validator>
113
+ <modal v-if="addressshow" :show.sync="true" v-ref:modal backdrop="false" width="90%" height="90%">
114
+ <header slot="modal-header" class="modal-header">
115
+ <h4 class="modal-title">地址管理</h4>
116
+ </header>
117
+ <article slot="modal-body" class="modal-body">
118
+ <batch_orders @submit="rerefParent" @cancel="addressclose" :clear="rowsdata">
119
+
120
+ </batch_orders>
121
+ </article>
122
+ <footer slot="modal-footer" class="modal-footer">
123
+ <button type="button" name="button" class="btn btn-difault" @click="addressshow = false">
124
+ 取消
125
+ </button>
126
+ </footer>
127
+ </modal>
128
+ </div>
129
+ </template>
130
+
131
+ <script>
132
+ import {HttpResetClass} from 'vue-client'
133
+ import * as Util from '../../../components/Util'
134
+ // 获取派单类型, 类型 : 转站点,转维修员,自选模式
135
+ let getSendType = async function (self) {
136
+ try {
137
+ // 如果初始化为派维修员,则不获取配置文件
138
+ if (self.meading == '转维修员') {
139
+ self.model.f_handlingtype = '转维修员'
140
+ } else {
141
+ let http = new HttpResetClass()
142
+ let result = await http.load('GET', `rs/vue/sendType.json`, {}, {resolveMsg: null, rejectMsg: null})
143
+ //tag
144
+ if (result.data.sendType == '自选模式') {
145
+ self.selectSendshow = true
146
+ } else {
147
+ // 转站点/转维修员
148
+ if (result.data.sendType == '转维修员') {
149
+ self.model.f_handlingtype = '转维修员'
150
+ }
151
+ self.meading = result.data.sendType
152
+ }
153
+ }
154
+ } catch (e) {
155
+ //tag
156
+ } finally {
157
+ // 获取维修员
158
+ if (self.meading == '转维修员') {
159
+ self.repairers = []
160
+ self.getEmp()
161
+ }
162
+ self.model.f_user_type = "民用"
163
+ if (self.operType === '报修') {
164
+ // self.assignObj()
165
+ } else if (self.operType === '重新派单') {
166
+ // 通过当前登录人获取需要重新派发单子,也可对单子进行修改
167
+ self.setModifyOrder()
168
+ } else if (self.operType === '修改工单') {
169
+ // 通过传入数据,查询出工单,选择站点将不可点击
170
+ self.setModifyOrder()
171
+ }
172
+ }
173
+ }
174
+ // 工作类型对应的各项设置
175
+ const config = {
176
+ '报修': {
177
+ url: 'rs/logic/callerSendZH'
178
+ },
179
+ '重新派单': {
180
+ url: 'rs/logic/resend'
181
+ },
182
+ '修改工单': {
183
+ url: 'rs/logic/modifyOrder'
184
+ },
185
+ }
186
+
187
+ export default {
188
+ title: '置换通气单',
189
+ props: {
190
+ data: { // 用户基本信息
191
+ type: Object,
192
+ default: null
193
+ },
194
+ type: { // 类型,为区分复选框,当组件重用并切重用组件同时出现,复选框id相同时会有干扰,
195
+ type: String
196
+ },
197
+ callObj: { // 话务对象
198
+ type: Object,
199
+ default: null
200
+ },
201
+ loginUser: {
202
+ type: Object
203
+ },
204
+ modifyOrder: { // 修改工单传入得工单信息
205
+ type: Object
206
+ },
207
+ operType: { // 操作类型,有报修,重新派单,修改工单,其中修改时,选择站点将不可点击,重新派单和修改要先将工单查询出来
208
+ type: String,
209
+ default: '报修'
210
+ },
211
+ meading: {
212
+ type: String,
213
+ default: '转维修员'
214
+ }
215
+ },
216
+ data() {
217
+ return {
218
+ rowsdata: false, //
219
+ saveing: false,
220
+ selectSendshow: false,
221
+ // 维修员信息
222
+ repairers: [],
223
+ // 建档时表具信息
224
+ materdata: {
225
+ type: Object
226
+ },
227
+ mattershow: false,
228
+ // 小区编号
229
+ districtname_id: '',
230
+ servicesource: '话务来电', // 工单来源
231
+ // // 选择小区树参数
232
+ // villagedata: {
233
+ // f_locationId: this.$login.f.parent.parentid,
234
+ // f_locationType: 't_organization'
235
+ // },
236
+ addressshow: false,
237
+ addressselect: false,
238
+ phoneValid: false,
239
+ residential: [],
240
+ row: {
241
+ f_residential_area: ''
242
+ },
243
+ residentialquery: '',
244
+ areacondition: '',
245
+ testdata: {f_equipment: ''},
246
+ residentialTemplate: 'f_villagename',
247
+ unitTemplate: 'f_unitname',
248
+ model: {
249
+ // 一次派单
250
+ serviceacitivity: [{
251
+ f_service_acitivity_type: '派单'
252
+ }],
253
+ f_yuyue_date: '', // 预约时间
254
+ f_source: '话务来电',
255
+ f_service_id: '',
256
+ f_userinfo_id: '',
257
+ f_contact_phone: '',
258
+ f_meetunit: '',
259
+ f_phone: '',
260
+ f_user_name: '',
261
+ f_address: '',
262
+ f_repair_date: Util.getNowDate(),
263
+ f_card_id: '',
264
+ f_reciever: '',
265
+ f_remarks: '',
266
+ f_user_type: '',
267
+ f_gasproperties: '',
268
+ f_area: '',
269
+ f_unit_name: '',
270
+ f_street: '',
271
+ f_residential_area: '',
272
+ f_building: '',
273
+ f_handlingtype: '转维修员',
274
+ f_unit: '',
275
+ f_floor: '',
276
+ f_room: '',
277
+ aState: null,
278
+ f_addressid: '',
279
+ f_orgid: this.$login.f.orgid,
280
+ f_orgname: this.$login.f.orgs,
281
+ f_depname: this.$login.f.dops,
282
+ f_depid: this.$login.f.depids,
283
+ f_operator: this.$login.f.name,
284
+ f_operatorid: this.$login.f.id,
285
+ f_filiale: '',
286
+ f_filiale_id: '',
287
+ f_change_tag: ''
288
+ },
289
+ addressuser: [], // 存工单数据数组
290
+ types: [],
291
+ information: [], // 用来存放字表信息
292
+ serviceList: null, // 用来存放查询当前地址下的未完成工单
293
+ id: '', // 编写测试时会使用
294
+ f_service_id: '',
295
+ repairstypes: this.$appdata.getParam('报修类型'),
296
+ usertypes: this.$appdata.getParam('用户类型'),
297
+ gastypes: this.$appdata.getParam('用气性质'),
298
+ stands: this.$appdata.getParam('站点管理员'),
299
+ sources: this.$appdata.getParam('工单来源'),
300
+ handling: [{label: '转站点', value: '转站点'}, {label: '转置换员', value: '转维修员'}],
301
+ source:
302
+ 'dep=this.getParentByType($organization$).getSpecialResByType($department$),' +
303
+ 'tool.getFullTree(dep.where(row.hasSpecialRole($派单员$)))',
304
+ userid: this.$login.f.id,
305
+ }
306
+ },
307
+ ready() {
308
+ // 获取sendType.json配置信息 获取派单类型 转站点,转维修员,自选模式
309
+ getSendType(this)
310
+ },
311
+ methods: {
312
+ assignObj() {
313
+ if (this.data) {
314
+ debugger
315
+ this.model.f_address = this.data.f_address
316
+ this.model.f_user_name = this.data.f_user_name
317
+ this.model.f_meternumber = this.data.f_meternumber
318
+ this.model.f_user_type = this.data.f_user_type
319
+ this.model.f_contact_phone = this.data.f_user_phone
320
+ this.model.f_userinfo_id = this.data.f_userinfo_id
321
+ this.model.f_userinfo_code = this.data.f_userinfo_code
322
+ this.model.f_card_id = this.data.card_id
323
+ if (this.model.f_user_type === '民用') {
324
+ this.model.f_area = this.data.f_area
325
+ this.model.f_street = this.data.f_street
326
+ this.model.f_residential_area = this.data.f_residential_area
327
+ this.model.f_building = this.data.f_building
328
+ this.model.f_unit = this.data.f_unit
329
+ this.model.f_floor = this.data.f_floor
330
+ this.model.f_room = this.data.f_room
331
+ }
332
+ }
333
+ },
334
+ // 当维修员发生改变,获取维修员手机号
335
+ repiarmancg(val) {
336
+ if (val) {
337
+ //tag
338
+ if (typeof val == 'string') {
339
+ this.model.serviceacitivity[0].f_reciever = val
340
+ let http1 = new HttpResetClass()
341
+ http1.load('POST', 'rs/sql/tel_singleTable_OrderBy', {
342
+ data: {
343
+ items: 'f_user_telephone',
344
+ tablename: 't_user',
345
+ condition: `name = '${val}'`,
346
+ orderitem: 'id'
347
+ }
348
+ }, {resolveMsg: null, rejectMsg: null}).then((ress) => {
349
+ this.model.f_repairman_phone = ress.data[0].f_user_telephone
350
+ })
351
+ }
352
+ }
353
+ },
354
+ // 当工单来源属性发生改变
355
+ sourcechange(val) {
356
+ if (val == undefined || val == '') {
357
+ return
358
+ }
359
+ this.model.f_source = val
360
+ this.servicesource = val
361
+ },
362
+ adressshow() {
363
+ this.addressshow = true
364
+ },
365
+ isshow() {
366
+ this.mattershow = true
367
+ },
368
+ // 获取维修员
369
+ getEmp() {
370
+ let val = {
371
+ source: 'this.getAllChildrens().where(row.getAttributes().get($rolestr$) == $置换员$))',
372
+ userid: `${this.$login.f.id}`
373
+ }
374
+ // let val = {source: 'this.getParentByType($department$).getAllChildrens().where(row.getAttributes().get($rolestr$) == $维修员$))', userid: `${this.$login.f.id}`}
375
+ // let val = {source: 'this.getParentByType($department$).getChildByName($置换员$).getUsers()', userid: `${this.$login.f.id}`}
376
+ let http = new HttpResetClass()
377
+ http.load('POST', '/rs/search', {data: val}, {resolveMsg: null, rejectMsg: null}).then((res) => {
378
+ let result = res.data.filter(res => res.orgid == this.$login.f.orgid)
379
+ result.forEach((item) => {
380
+ this.repairers.push({label: `${item.name} ${item.f_user_telephone}`, value: item.name})
381
+
382
+ })
383
+ })
384
+ },
385
+ addressclose() {
386
+ this.addressuser = []
387
+ this.model.f_address = ''
388
+ this.model.f_addressid = ''
389
+ this.addressshow = false
390
+ },
391
+ // 控制地址管理组件显示与否
392
+ // 截取字符串
393
+ interceptString(val) {
394
+ },
395
+ // 选中地址
396
+ rerefParent(val) {
397
+ this.addressshow = false
398
+ this.addressuser = []
399
+ this.model.f_address = ''
400
+ this.model.f_addressid = ''
401
+ this.model.f_userinfo_id = ''
402
+ if (val.length > 0) {
403
+ //tag
404
+ this.model.f_address = val[0].name
405
+ this.model.f_addressid = val[0].id
406
+ this.model.f_userinfo_id = val[0].f_userinfo_id
407
+ val.forEach((item) => {
408
+ var address = {
409
+ f_address: item.name,
410
+ id: item.id,
411
+ f_userinfo_id: item.f_userinfo_id
412
+ }
413
+ this.addressuser.push(address)
414
+ })
415
+ }
416
+ },
417
+ // 选中部门
418
+ reres(val) {
419
+ if (val.res == undefined || val.res[0] == undefined || val.res[0] == '') {
420
+ return
421
+ }
422
+ this.model.serviceacitivity[0].f_meetunit = val.res[0]
423
+ this.model.f_meetunit = val.res[0]
424
+ this.model.f_filiale_id = val.orgobj[0].parentid
425
+ this.model.f_filiale = val.orgobj[0].parentname
426
+ this.model.f_outlets = val.res[0]
427
+ this.model.serviceacitivity[0].f_reciever = val.resids[0]
428
+ },
429
+ onReady() {
430
+ //tag
431
+ this.$emit('ready')
432
+ },
433
+ onError(error) {
434
+ //tag
435
+ this.$emit('error', error)
436
+ },
437
+ add(query) {
438
+ if (typeof (query) === 'string') {
439
+ this.model.f_residential_area = query
440
+ this.address()
441
+ }
442
+ },
443
+ // 修改或者重派工单时,加载工单的故障信息
444
+ projectCallback(item) {
445
+ if (item) {
446
+ return item.f_user_name
447
+ }
448
+
449
+ },
450
+ selectUnit(query) {
451
+ return this.$resetpost('rs/sql/tel_singleTable_OrderBy',
452
+ {
453
+ data: {
454
+ items: 'f_unitname',
455
+ tablename: 't_unitcoordinate',
456
+ condition: `(f_unitname like '${query}%' or F_TRANS_PINYIN_CAPITAL(f_unitname) like '${query}%')and rownum<10`,
457
+ orderitem: 'id'
458
+ }
459
+ }, {resolveMsg: null, rejectMsg: null}
460
+ )
461
+ },
462
+ selectResidential(query) {
463
+ return this.$resetpost('rs/sql/tel_singleTable_OrderBy',
464
+ {
465
+ data: {
466
+ items: 'f_villagename',
467
+ tablename: 't_villagecoordinate',
468
+ condition: `(f_villagename like '${query}%' or F_TRANS_PINYIN_CAPITAL(f_villagename) like '${query}%')and rownum<10`,
469
+ orderitem: 'id'
470
+ }
471
+ }, {resolveMsg: null, rejectMsg: null}
472
+ )
473
+ },
474
+ setModifyOrder() {
475
+ this.model = Object.assign({}, this.model, this.modifyOrder)
476
+ },
477
+ // 提交
478
+ getData(val) {
479
+ return this.residential
480
+ },
481
+
482
+ // 清理信息
483
+ cleardata(type) {
484
+ this.model = Object.assign({}, {
485
+ // 一次派单
486
+ serviceacitivity: [{
487
+ f_service_acitivity_type: '派单',
488
+ f_meetunit: this.model.serviceacitivity[0].f_meetunit,
489
+ f_reciever: this.model.serviceacitivity[0].f_reciever
490
+ }],
491
+ f_yuyue_date: '', // 预约时间
492
+ f_meetunit: this.model.f_meetunit,
493
+ f_outlets: this.model.f_outlets,
494
+ f_service_id: '',
495
+ f_contact_phone: '',
496
+ f_phone: '',
497
+ f_user_name: '',
498
+ f_userinfo_id: '',
499
+ failure: '',
500
+ f_address: '',
501
+ f_handlingtype: this.model.f_handlingtype,
502
+ f_repair_date: Util.getNowDate(),
503
+ f_card_id: '',
504
+ f_remarks: '',
505
+ f_user_type: '',
506
+ f_area: '',
507
+ f_street: '',
508
+ f_residential_area: '',
509
+ f_building: '',
510
+ f_unit: '',
511
+ f_floor: '',
512
+ f_room: '',
513
+ f_source: this.servicesource,
514
+ aState: null,
515
+ f_addressid: '',
516
+ f_orgid: this.$login.f.orgid,
517
+ f_orgname: this.$login.f.orgs,
518
+ f_depname: this.$login.f.dops,
519
+ f_depid: this.$login.f.depids,
520
+ f_operator: this.$login.f.name,
521
+ f_operatorid: this.$login.f.id,
522
+ f_filiale: this.model.f_filiale,
523
+ f_filiale_id: this.model.f_filiale_id
524
+ }),
525
+ this.modifyOrder = {}
526
+ this.addressuser = []
527
+ this.rowsdata = true
528
+ this.types = []
529
+ if (this.callObj && this.callObj.callNum && type != 'init') {
530
+ // Util.afterCallBz(this.$login.f.id, this.$login.f.name)
531
+ this.callObj.callNum = null
532
+ this.model.aState = null
533
+ }
534
+ },
535
+ async save() {
536
+ // 判断是否录入用户类型
537
+ if (this.model.f_user_type == '' || this.model.f_user_type == undefined) {
538
+ return this.$showAlert('请选择客户类型!', 'warning', 2000)
539
+ }
540
+ // 判断是否输入地址
541
+ if (this.model.f_address == '' || this.model.f_address == undefined) {
542
+ return this.$showAlert('请选择地址!', 'warning', 2000)
543
+ }
544
+ if (this.operType != '修改工单') {
545
+ if (this.model.serviceacitivity[0].f_reciever == '' || this.model.serviceacitivity[0].f_reciever == undefined) {
546
+ if (this.meading == '转维修员') {
547
+ return this.$showAlert('请选择置换人员', 'warning', 2000)
548
+ } else {
549
+ return this.$showAlert('请选择站点', 'warning', 2000)
550
+ }
551
+ }
552
+ }
553
+ this.$emit('saveing')
554
+ if (this.meading == '转维修员') {
555
+ this.model.f_meetunit = this.$login.f.deps
556
+ this.model.f_orgid = this.$login.f.orgid
557
+ this.model.f_filiale = this.$login.f.org
558
+ this.model.f_outlets = this.$login.f.deps
559
+ this.model.f_filiale_id = this.$login.f.orgid
560
+ }
561
+ if (this.operType === '报修') {
562
+ this.model.f_change_tag = "散户派工"
563
+ let data = {
564
+ model: this.model, loginUser: {
565
+ name: this.loginUser.name,
566
+ ename: this.loginUser.ename
567
+ }, callObj: this.callObj
568
+ }
569
+ let url = ''
570
+ if (this.meading === '转站点') {
571
+ url = config[this.operType].url
572
+ } else {
573
+ url = config[this.operType].url
574
+ data.toRepair = '一级派单'
575
+ }
576
+ let http2 = new HttpResetClass()
577
+ let dataid = await http2.load('POST', url, data, {resolveMsg: null, rejectMsg: null})
578
+ console.log('点火派单结果'+dataid)
579
+ var sendnum = 1
580
+ }
581
+ this.$emit('saveend')
582
+ this.$emit('commitsus', this.model.f_phone)
583
+ this.cleardata()
584
+ if (this.operType == '修改工单') {
585
+ this.$showMessage(`修改成功!`)
586
+ } else {
587
+ this.$showMessage(`本次下发 ${sendnum} 条置换单!`)
588
+ }
589
+ },
590
+ async checkServerList(addressid) {
591
+ if (addressid) {
592
+ let http1 = new HttpResetClass()
593
+ let res = await http1.load('POST', 'rs/sql/tel_getServiceActivity', {data: {condition: `f_addressid = '${addressid}'`}}, {
594
+ resolveMsg: null,
595
+ rejectMsg: null
596
+ })
597
+ //有未完成工单
598
+ let ls = res.data.length
599
+ var AddressService = {}
600
+ if (ls > 0) {
601
+ // 当前地址下还有工单未完成
602
+ AddressService = {
603
+ defname: res.data[0].defname,
604
+ f_service_id: res.data[0].f_service_id
605
+ }
606
+ } else {
607
+ AddressService = {
608
+ defname: '无工单'
609
+ }
610
+ }
611
+ return AddressService
612
+ }
613
+ },
614
+ // 处理故障输入
615
+ procFailure(value) {
616
+ this.model.failure = value
617
+ },
618
+ },
619
+ watch: {
620
+ 'data'() {
621
+ this.assignObj()
622
+ },
623
+ // 转接类型
624
+ 'model.f_handlingtype'() {
625
+ // 清楚上次记录
626
+ this.model.serviceacitivity[0].f_reciever = ''
627
+ this.model.serviceacitivity[0].f_meetunit = ''
628
+ this.model.f_meetunit = ''
629
+ this.model.f_outlets = ''
630
+ this.model.f_repairman_phone = ''
631
+ if (this.model.f_handlingtype == '转维修员') {
632
+ this.meading = '转维修员'
633
+ this.repairers = []
634
+ this.getEmp()
635
+ } else {
636
+ this.repairers = []
637
+ this.meading = '转站点'
638
+ }
639
+ },
640
+ // 是否清空
641
+ 'cleantf'() {
642
+ this.cleardata()
643
+ },
644
+ 'model.f_contact_phone'(val) {
645
+ this.phoneValid = /^((0\d{2,3}-\d{7,8})|(1[3584]\d{9}))$/.test(this.model.f_contact_phone)
646
+ },
647
+ // 话务对象发生变化将来电电话赋值给f_phone
648
+ 'callObj.callNum'() {
649
+ this.cleardata('init')
650
+ this.model.f_phone = this.callObj.callNum
651
+ this.model.f_records_id = this.callObj.RecordsID
652
+ // this.model.f_contact_phone = this.callObj.callNum
653
+ this.model.f_repair_date = Util.getNowDate()
654
+ },
655
+ 'types.length'() {
656
+ var ev = new Event("resize", {"bubbles": true, "cancelable": false});
657
+ window.dispatchEvent(ev);
658
+ },
659
+ 'callObj.aState'() {
660
+ this.model.aState = this.callObj.aState
661
+ //tag
662
+ },
663
+ 'model.f_user_type'() {
664
+ if (this.model.f_user_type == '民用') {
665
+ this.model.f_gasproperties = '民用用气'
666
+ } else {
667
+ this.model.f_gasproperties = '工商业用气'
668
+ }
669
+ //tag
670
+ },
671
+ // 'model.f_gasproperties'() {
672
+ // if (this.model.f_gasproperties != '民用用气') {
673
+ // this.model.f_user_type = '非民用'
674
+ // } else {
675
+ // this.model.f_user_type = '民用'
676
+ // }
677
+ // //tag
678
+ // }
679
+ },
680
+ computed: {
681
+ IsClickDisabled: function () {
682
+ if (this.$v.valid) {
683
+ if (this.model.aState === null) {
684
+ //tag
685
+ return false
686
+ }
687
+ if (this.model.f_phone && this.model.aState === '正在保存' && this.model.aState === '置忙') {
688
+ //tag
689
+ return false
690
+ }
691
+ if (!this.model.f_phone) {
692
+
693
+ //tag
694
+ return false
695
+ }
696
+ //tag
697
+ return true
698
+ } else {
699
+ //tag
700
+ return true
701
+ }
702
+ },
703
+ getTestData() {
704
+ return this.testdata
705
+ },
706
+ serviceacitivity() {
707
+ return this.model.serviceacitivity.find((row) => {
708
+ return row.f_service_acitivity_type === '派单'
709
+ })
710
+ },
711
+ alertObject() {
712
+ let result = this.model.failure.find((value) => {
713
+ return value.f_failure_type === '报警器'
714
+ })
715
+ if (result) {
716
+ return result
717
+ }
718
+ return {f_equipment: ''}
719
+ },
720
+ gasstove() {
721
+ let result = this.model.failure.find((value) => {
722
+ return value.f_failure_type === '燃气灶'
723
+ })
724
+ if (result) {
725
+ return result
726
+ }
727
+ return {f_equipment: ''}
728
+ },
729
+ furnace() {
730
+ let result = this.model.failure.find((value) => {
731
+ return value.f_failure_type === '壁挂炉'
732
+ })
733
+ if (result) {
734
+ return result
735
+ }
736
+ return {f_equipment: ''}
737
+ },
738
+ heater() {
739
+ let result = this.model.failure.find((value) => {
740
+ return value.f_failure_type === '热水器'
741
+ })
742
+ if (result) {
743
+ return result
744
+ }
745
+ return {f_equipment: ''}
746
+ },
747
+ lampblack() {
748
+ let result = this.model.failure.find((value) => {
749
+ return value.f_failure_type === '油烟机'
750
+ })
751
+ if (result) {
752
+ return result
753
+ }
754
+ return {f_equipment: ''}
755
+ }
756
+ },
757
+ events: {
758
+ getPosition(val) {
759
+ //tag
760
+ this.$dispatch('distribute', val)
761
+
762
+ }
763
+ },
764
+ components: {}
765
+ }
766
+
767
+ </script>
768
+ <style>
769
+ .class-error {
770
+ color: #a94442;
771
+ }
772
+
773
+ </style>