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