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