telephone-clients 3.0.103 → 3.0.104-11

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