telephone-clients 4.0.0-1-30 → 4.0.0-1-33

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.
@@ -1,471 +1,477 @@
1
- <template>
2
- <div style="height: auto;width: 100%" class="repair-bg">
3
- <div class="bq-parent">
4
- <blockquote style="color: #499edf;border-left-color: #499edf;font-size: 16px">
5
- <p>
6
- 待派发工单<span v-if="rows">({{rows.length}}单)</span>
7
- <span v-if="!rows">(暂无待派发工单)</span>
8
- </p>
9
- </blockquote>
10
- </div>
11
-
12
- <div>
13
- <form>
14
- <!-- 查询条件-->
15
- <div class="row app-row">
16
- <div class="col-xs-4">
17
- <img src="../../../assets/用户姓名-蓝色.png" style="width: 20px;margin-bottom: 5px" alt="">
18
- <label for="f_userinfo_code" class="font text-left">用户姓名:</label>
19
- </div>
20
- <div class="col-xs-8" >
21
- <input type="text" v-model="username" placeholder='用户姓名'
22
- class="search_input input-font" />
23
- </div>
24
- </div>
25
- <div class="row app-row">
26
- <div class="col-xs-4">
27
- <img src="../../../assets/小区蓝色.png" style="width: 20px;margin-bottom: 5px" alt="">
28
- <label for="f_userinfo_code" class="font text-left">用户地址:</label>
29
- </div>
30
- <div class="col-xs-8" >
31
- <input type="text" id="f_userinfo_code" class="search_input input-font"
32
- v-model="address" placeholder='用户地址' />
33
- </div>
34
- </div>
35
- <!-- 分割按钮和条件的高度 -->
36
- <div class="row app-row" style="height: 10px;"></div>
37
- <!-- 按钮 -->
38
- <div class="row text-center app-row">
39
- <button type="button" class="btn btn-lg btn-font btn-color" @click="ifsearch()" style="min-width: 25%;">查询</button>
40
- </div>
41
- <div style="height:30px;" class="app-row"></div>
42
- </form>
43
- </div>
44
- <!-- 列表 -->
45
- <div class="panel panel-default repair-info-content auto">
46
- <div class="panel-body">
47
- <div class="panel panel-default well panel-blue-border" :class="row.failure.indexOf('漏气') !== -1 ? 'class-a':''" v-for="row in listData.list" >
48
- <div class="panel-body" style="padding: 10px">
49
- <div class="row form-group">
50
- <div class="col-sm-12 col-xs-12 col-md-12">
51
- <div class="row" >
52
- <div :class="{'text-danger': row.f_remindersign}" class="col-sm-12 col-xs-12 col-md-12 padd-div-shu">
53
- 工单编号: {{row.f_service_id}}<span v-if="row.f_remindersign">(催单 {{row.f_reminderdata}}) </span>
54
- </div>
55
- <div class="col-sm-12 col-xs-12 col-md-12 padd-div-shu">
56
- 派发时间: {{row.f_created_date}}
57
- </div>
58
- <div v-show="false" class="col-sm-12 col-xs-12 col-md-12 padd-div-shu" v-if="worktype == '置换通气单'||worktype == '安装单'">
59
- 预约时间: {{row.f_yuyue_date}}
60
- </div>
61
- <!-- <div class="col-sm-12 col-xs-12 col-md-12 padd-div-shu" v-if="worktype == '报修单'">
62
- 报修类型: {{row.f_servicerepair_type}}
63
- </div>-->
64
- <div class="col-sm-12 col-xs-12 col-md-12 padd-div-shu" v-if="row.f_repairtype">
65
- 报修类型: {{row.f_repairtype}}
66
- </div>
67
- <div class="col-sm-12 col-xs-12 col-md-12 padd-div-shu" v-if="row.f_userinfo_code">
68
- 用户编号: {{row.f_userinfo_code}}
69
- </div>
70
- <div class="col-sm-12 col-xs-12 col-md-12 padd-div-shu" v-if="row.f_enter_number">
71
- 用户证号: {{row.f_enter_number}}
72
- </div>
73
- <div class="col-sm-12 col-xs-12 col-md-12 padd-div-shu">
74
- 用户姓名: {{row.f_user_name}}
75
- </div>
76
- <div v-show="false" class="col-sm-12 col-xs-12 col-md-12 padd-div-shu">
77
- 来电电话: {{row.f_phone}}
78
- <img src="../../../assets/telphonesend.png" style="width: 12px;" @click.stop.prevent='makeAPhoneCall(row.f_phone)'>
79
- </div>
80
- <div class="col-sm-12 col-xs-12 col-md-12">
81
- 联系电话: {{row.f_contact_phone}}
82
- <img src="../../../assets/telphonesend.png" style="width: 12px;" @click.stop.prevent='makeAPhoneCall(row.f_contact_phone)'>
83
- </div>
84
- <div class="col-sm-12 col-xs-12 col-md-12 padd-div-shu">
85
- 用户地址: {{row.f_address}}
86
- </div>
87
- <div v-show="row.f_remarks" class="col-sm-12 col-xs-12 col-md-12 padd-div-shu">
88
- 备注信息: {{row.f_remarks}}
89
- </div>
90
- <div class="col-sm-12 col-xs-12 col-md-12 padd-div-shu" v-if="row.failure">
91
- <failure-show :value='row.failure'>
92
- </failure-show>
93
- </div>
94
- </div>
95
- </div>
96
- <div class="col-sm-12 col-xs-12 col-md-12">
97
- <button type="button" name="button" class="btn btn-primary btn-sm" style="float: right;margin-right: 5px;" @click="selected(row)">下派</button>
98
- <button type="button" name="button" class="btn btn-primary btn-sm" style="float: right;margin-right: 5px;" @click="returnOrder(row)">退回</button>
99
- <button type="button" name="button" class="btn btn-primary btn-sm" style="float: right;margin-right: 5px;" @click="caseend(row)">结案</button>
100
- </div>
101
- </div>
102
- </div>
103
- </div>
104
- <div style="height:auto;width: 100%;text-align: center">
105
- <a v-if="!listData.isEnd" @click="showMore()">展开更多......</a>
106
- <span v-if="listData.isEnd">到底了......</span>
107
- </div>
108
- </div>
109
- <modal :show.sync="return_modal" v-ref:modalCase backdrop="false">
110
- <header slot="modal-header" class="modal-header">
111
- 工单退回
112
- </header>
113
- <article slot="modal-body" class="modal-body">
114
- <div class="col-sm-12 form-group">
115
- <label class="control-label col-sm-2">退回备注</label>
116
- <div class="col-sm-9">
117
- <input class="form-control" type="text" v-model="return_modal_data.serviceacitivity[0].f_site_back_reason"/>
118
- </div>
119
- </div>
120
- </article>
121
- <footer slot="modal-footer" class="modal-footer">
122
- <button type="button" class="btn btn-success" @click='returnOrderBack()'>确定</button>
123
- <button type="button" class="btn btn-success" @click='returnModalClose()'>关闭</button>
124
- </footer>
125
- </modal>
126
- <modal :show.sync="sendshow" v-ref:modal :backdrop="false">
127
- <div slot="modal-header" class="modal-header">
128
- <h4 class="modal-title">
129
- 派发工单
130
- </h4>
131
- </div>
132
- <div slot="modal-body" class="modal-body">
133
- <div class="row" style="margin-top: 6px">
134
- <label class="col-xs-4 col-md-4 control-label font text-left">派单方式</label>
135
- <div class="col-xs-8">
136
- <v-select :value-single="true" :value.sync="f_handlingtype" v-model="f_handlingtype"
137
- :options='repairerType' placeholder='请选择派单方式'
138
- close-on-select></v-select>
139
- </div>
140
- </div>
141
- <div class="row" style="margin-top: 6px" v-if="f_handlingtype == '转维修员'">
142
- <label class="col-xs-4 col-md-4 control-label font text-left">维修员</label>
143
- <div class="col-xs-8">
144
- <v-select :value="sendselected.serviceacitivity[0].f_reciever" :value-single="true"
145
- :options='repairers' placeholder='请选择维修员'
146
- close-on-select v-on:change="repiarmancg"></v-select>
147
- </div>
148
- </div>
149
- <div class="row" style="margin-top: 6px" v-if="f_handlingtype == '转站点'">
150
- <label class="col-xs-4 col-md-4 control-label font text-left">站点</label>
151
- <input style="width: 60%" type="text" v-show="false" v-model="sendselected.serviceacitivity[0].f_reciever">
152
- <right-tree islist :userid="userid" :source="source" v-on:re-res="reres" :textContent="选择站点管理员">
153
-
154
- </right-tree>
155
- </div>
156
- <div class="row" style="margin-top: 6px">
157
- <label class="control-label font text-left col-md-4 col-xs-4">备注</label>
158
- <div class="col-xs-8 col-md-8">
159
- <input type="text" v-model="sendselected.f_advice"/>
160
- </div>
161
- </div>
162
- </div>
163
- <div slot="modal-footer" class="modal-footer">
164
- <button type="button" class="btn btn-default" @click="worksend()">确定</button>
165
- <button type="button" class="btn btn-default" @click="undo()">取消</button>
166
- </div>
167
- </modal>
168
- <modal :show.sync="caseshow" v-ref:modalCase backdrop="false">
169
- <header slot="modal-header" class="modal-header">
170
- 工单结案
171
- </header>
172
- <article slot="modal-body" class="modal-body">
173
- <div class="col-sm-12 form-group">
174
- <label class="control-label col-sm-2">结案备注</label>
175
- <div class="col-sm-9">
176
- <input class="form-control" type="text" v-model="f_caseremarks"/>
177
- </div>
178
- </div>
179
- </article>
180
- <footer slot="modal-footer" class="modal-footer">
181
- <button type="button" class="btn btn-success" @click='caseok'>确定</button>
182
- <button type="button" class="btn btn-success" @click='caseclose'>关闭</button>
183
- </footer>
184
- </modal>
185
- </div>
186
- </div>
187
- </template>
188
- <script>
189
- import FailureShow from '../../../components/pc/FailureShow'
190
- import { HttpResetClass } from 'vue-client'
191
- import Vue from 'vue'
192
- import * as Util from "../../../components/Util";
193
-
194
- export default{
195
- title: '移动端站点派发',
196
- data () {
197
- return {
198
- return_modal:false,
199
- return_modal_data:{},
200
- userid: Vue.user.id,
201
- source:
202
- 'dep=this.getParentByType($organization$).getSpecialResByType($department$),' +
203
- 'tool.getFullTree(dep.where(row.hasSpecialRole($派单员$)))',
204
- repairName: '',
205
- f_handlingtype:'转维修员',
206
- repairerType:[{label: '转维修员', value: '转维修员'}, {label: '转站点', value: '转站点'}],
207
- repairerStands:[],
208
- f_caseremarks:'',
209
- selectone:'',
210
- rows: [],
211
- username:'',
212
- address:'',
213
- sendshow:false,
214
- repairers: [],
215
- caseshow:false,
216
- sendselected:{
217
- serviceacitivity:[
218
- {
219
- f_service_acitivity_type: '派单',
220
- f_reciever:''
221
- }
222
- ],
223
- f_advice:''
224
- },
225
- number:0,
226
- listData: {
227
- list: [],
228
- isEnd: true,
229
- index: 0
230
- }
231
- }
232
- },
233
- props: {
234
- },
235
- methods: {
236
- returnOrderBack(){
237
- new HttpResetClass().load('POST', `${this.$androidUtil.getProxyUrl()}/af-telephone/rs/logic/siteBack`, {model: this.return_modal_data, loginUser: {name: Vue.user.name, ename: Vue.user.ename, id: Vue.user.id}}).then((res) => {
238
- this.returnModalClose()
239
- this.$showMessage(`退回成功`)
240
- })
241
- },
242
- returnModalClose(){
243
- this.return_modal_data = {}
244
- this.return_modal = false
245
- },
246
- returnOrder(row){
247
- row.serviceacitivity = [
248
- {
249
- "f_service_acitivity_type": "打回",
250
- "f_site_back_reason": ""
251
- }
252
- ]
253
- this.return_modal_data = row
254
- this.return_modal = true
255
- },
256
- reres(val){
257
- if(val.res == undefined || val.res[0] == undefined || val.res[0] == ''){
258
- return
259
- }
260
- this.sendselected.serviceacitivity[0].f_meetunit = val.res[0]
261
- this.sendselected.f_meetunit = val.res[0]
262
- this.sendselected.f_filiale_id = val.orgobj[0].parentid
263
- this.sendselected.f_filiale = val.orgobj[0].parentname
264
- this.sendselected.f_outlets = val.res[0]
265
- this.sendselected.serviceacitivity[0].f_reciever = val.resids[0]
266
- },
267
- caseend(val){
268
- this.selectone = val
269
- this.caseshow = true
270
- },
271
- // 结案确认
272
- caseok(){
273
- // 工单结案操作
274
- let data = {model: this.selectone, loginUser: {name: Vue.user.name, ename: Vue.user.ename},f_caseremarks:this.f_caseremarks}
275
- let HttpReset1 = new HttpResetClass()
276
- // 将数据发送给业务逻辑
277
- HttpReset1.load('POST',`${this.$androidUtil.getProxyUrl()}/af-telephone/rs/logic/serviceCase`, data).then((res) => {
278
- this.f_caseremarks = ''
279
- this.caseshow = false
280
- this.ifsearch()
281
- })
282
- },
283
- // 结案返回
284
- caseclose(){
285
- this.f_caseremarks = ''
286
- this.caseshow = false
287
- this.selectone = ''
288
- },
289
- worksend() {
290
- if (!this.sendselected.serviceacitivity[0].f_reciever) {
291
- this.$showMessage(`请选择接单人员!`, ['confirm'])
292
- return
293
- }
294
- let data = {
295
- model: this.sendselected,
296
- loginUser: {name: Vue.user.name, ename: Vue.user.ename},
297
- f_handlingtype: this.f_handlingtype
298
- }
299
- let HttpReset = new HttpResetClass()
300
- // 将数据发送给业务逻辑
301
- HttpReset.load('POST', `${this.$androidUtil.getProxyUrl()}/af-telephone/rs/logic/siteSend`, data).then((res) => {
302
- if (res.data.code == 300) {
303
- this.sendshow = false
304
- this.sendselected = {
305
- serviceacitivity: [
306
- {
307
- f_service_acitivity_type: '派单',
308
- f_reciever: ''
309
- }
310
- ],
311
- f_advice: ''
312
- }
313
- this.ifsearch()
314
- this.$showMessage(`该单已被派发!`, ['confirm'])
315
- return
316
- } else {
317
- this.sendshow = false
318
- this.sendselected = {
319
- serviceacitivity: [
320
- {
321
- f_service_acitivity_type: '派单',
322
- f_reciever: ''
323
- }
324
- ],
325
- f_advice: ''
326
- }
327
- this.ifsearch()
328
- this.$showMessage(`派发成功!`, ['confirm'])
329
- return
330
- }
331
- })
332
- },
333
- repiarmancg(val){
334
- this.sendselected.serviceacitivity[0].f_reciever = val
335
- },
336
- // 获取维修员
337
- getEmp () {
338
- // 获取接单人数组
339
- let http = new HttpResetClass()
340
- var val = {source: `this.getParentByType($organization$).getChildByName($维修员$).getUsers()`, userid: `${Vue.user.id}`}
341
- http.load('POST', `${this.$androidUtil.getProxyUrl()}/rs/search`, {data: val}, {resolveMsg: null, rejectMsg: null}).then((res) => {
342
- res.data.forEach((item) => {
343
- this.repairers.push({label: `${item.name}`, value: item.name})
344
- })
345
- })
346
- },
347
- ifsearch(){
348
- this.listData.list = []
349
- this.listData.index = 0
350
- this.listData.isEnd = true
351
- var condition = `1 = 1 and tswo.f_workorder_type = '报修单'`
352
- if(this.username != ''){
353
- condition += " and tswo.f_user_name like '%" + this.username + "%'"
354
- }
355
- if(this.address != ''){
356
- condition += " and tswo.f_address like '%" + this.address + "%'"
357
- }
358
- var val = {
359
- condition:{
360
- condition:condition,
361
- sign:'1 = 1'
362
- },
363
- userid:Vue.user.name
364
- }
365
- //tag
366
- //tag
367
- let http = new HttpResetClass()
368
- http.load('POST', `${this.$androidUtil.getProxyUrl()}/af-telephone/rs/sql/operatorService`, {data: val}, {resolveMsg: null, rejectMsg: null}).then((res) => {
369
- this.rows = res.data
370
- this.showMore()
371
- })
372
- },
373
- selected (row) {
374
- this.sendselected = Object.assign({}, this.sendselected, row)
375
- this.sendshow =true
376
- },
377
- undo(){
378
- this.sendselected ={
379
- serviceacitivity:[
380
- {
381
- f_service_acitivity_type: '派单',
382
- f_reciever:''
383
- }
384
- ],
385
- f_advice:''
386
- }
387
- this.sendshow = false
388
- this.ifsearch()
389
- },
390
- makeAPhoneCall(phoneNumber) {
391
- this.$androidUtil.makeAPhoneCall(phoneNumber)
392
- },
393
- showMore() {
394
- if (!this.rows) {
395
- return
396
- }
397
- let endIndex = this.listData.index + 10
398
- if (endIndex > this.rows.length) {
399
- endIndex = this.rows.length
400
- }
401
- for (; this.listData.index < endIndex; this.listData.index++) {
402
- this.listData.list.push(this.rows[this.listData.index])
403
- }
404
- if(this.listData.index == this.rows.length){
405
- this.listData.isEnd = true
406
- }else {
407
- this.listData.isEnd = false
408
- }
409
- }
410
- },
411
- ready () {
412
- this.getEmp()
413
- this.ifsearch()
414
- },
415
- components: {
416
- FailureShow,
417
- 'failure-show': FailureShow
418
- }
419
- }
420
- </script>
421
- <style scoped>
422
- .searBtn {
423
- background: #FFFFFF;
424
- color: #0096fb;
425
- border: 1px solid #0096fb;
426
- border-radius: 5px;
427
- padding: 8px;
428
- text-align: center;
429
- font-size: 1.2em;
430
- z-index: 10;
431
- opacity:0.5;
432
- bottom: 50px;
433
- margin-top: -10px;
434
- height: 40px;
435
- }
436
- .bg {
437
- background-color: #499edf;
438
- height: 1px;
439
- border: 0;
440
- }
441
- .app-row {
442
- background-color: white;
443
- padding: 10px 10px 0 10px;
444
- border-bottom: 1px solid rgba(235, 235, 235, 0.5);
445
- }
446
- .search_input {
447
- border: 0;
448
- outline: none;
449
- }
450
- .font{
451
- font: 15px PingFang-SC-Medium;
452
- color: #666666;
453
- }
454
- .input-font{
455
- font: 15px PingFang-SC-Medium;
456
- color: #333333;
457
- }
458
- .btn-font{
459
- font:600 16px PingFang-SC-Bold;
460
- color: #499EDF;
461
- }
462
- .btn-color{
463
- background-color: #FFFFFF;
464
- border-radius: 10px ;
465
- border: 1px solid #499EDF;
466
- }
467
- .panel-blue-border {
468
- border: 1px solid #499edf;
469
- border-radius: 5px;
470
- }
471
- </style>
1
+ <template>
2
+ <div style="height: auto;width: 100%" class="repair-bg">
3
+ <div class="bq-parent">
4
+ <blockquote style="color: #499edf;border-left-color: #499edf;font-size: 16px">
5
+ <p>
6
+ 待派发工单<span v-if="rows">({{rows.length}}单)</span>
7
+ <span v-if="!rows">(暂无待派发工单)</span>
8
+ </p>
9
+ </blockquote>
10
+ </div>
11
+
12
+ <div>
13
+ <form>
14
+ <!-- 查询条件-->
15
+ <div class="row app-row">
16
+ <div class="col-xs-4">
17
+ <img src="../../../assets/用户姓名-蓝色.png" style="width: 20px;margin-bottom: 5px" alt="">
18
+ <label for="f_userinfo_code" class="font text-left">用户姓名:</label>
19
+ </div>
20
+ <div class="col-xs-8" >
21
+ <input type="text" v-model="username" placeholder='用户姓名'
22
+ class="search_input input-font" />
23
+ </div>
24
+ </div>
25
+ <div class="row app-row">
26
+ <div class="col-xs-4">
27
+ <img src="../../../assets/小区蓝色.png" style="width: 20px;margin-bottom: 5px" alt="">
28
+ <label for="f_userinfo_code" class="font text-left">用户地址:</label>
29
+ </div>
30
+ <div class="col-xs-8" >
31
+ <input type="text" id="f_userinfo_code" class="search_input input-font"
32
+ v-model="address" placeholder='用户地址' />
33
+ </div>
34
+ </div>
35
+ <!-- 分割按钮和条件的高度 -->
36
+ <div class="row app-row" style="height: 10px;"></div>
37
+ <!-- 按钮 -->
38
+ <div class="row text-center app-row">
39
+ <button type="button" class="btn btn-lg btn-font btn-color" @click="ifsearch()" style="min-width: 25%;">查询</button>
40
+ </div>
41
+ <div style="height:30px;" class="app-row"></div>
42
+ </form>
43
+ </div>
44
+ <!-- 列表 -->
45
+ <div class="panel panel-default repair-info-content auto">
46
+ <div class="panel-body">
47
+ <div class="panel panel-default well panel-blue-border" :class="row.failure.indexOf('漏气') !== -1 ? 'class-a':''" v-for="row in listData.list" >
48
+ <div class="panel-body" style="padding: 10px">
49
+ <div class="row form-group">
50
+ <div class="col-sm-12 col-xs-12 col-md-12">
51
+ <div class="row" >
52
+ <div :class="{'text-danger': row.f_remindersign}" class="col-sm-12 col-xs-12 col-md-12 padd-div-shu">
53
+ 工单编号: {{row.f_service_id}}<span v-if="row.f_remindersign">(催单 {{row.f_reminderdata}}) </span>
54
+ </div>
55
+ <div class="col-sm-12 col-xs-12 col-md-12 padd-div-shu">
56
+ 派发时间: {{row.f_created_date}}
57
+ </div>
58
+ <div v-show="false" class="col-sm-12 col-xs-12 col-md-12 padd-div-shu" v-if="worktype == '置换通气单'||worktype == '安装单'">
59
+ 预约时间: {{row.f_yuyue_date}}
60
+ </div>
61
+ <!-- <div class="col-sm-12 col-xs-12 col-md-12 padd-div-shu" v-if="worktype == '报修单'">
62
+ 报修类型: {{row.f_servicerepair_type}}
63
+ </div>-->
64
+ <div class="col-sm-12 col-xs-12 col-md-12 padd-div-shu" v-if="row.f_repairtype">
65
+ 报修类型: {{row.f_repairtype}}
66
+ </div>
67
+ <div class="col-sm-12 col-xs-12 col-md-12 padd-div-shu" v-if="row.f_finish_date">
68
+ 截止天数: {{Math.floor((new Date(row.f_finish_date.substring(0,10)).getTime() - new Date(row.f_created_date.substring(0,10)).getTime()) / 86400000)}}
69
+ </div>
70
+ <div class="col-sm-12 col-xs-12 col-md-12 padd-div-shu" v-if="row.f_finish_date">
71
+ 截止日期: {{row.f_finish_date}}
72
+ </div>
73
+ <div class="col-sm-12 col-xs-12 col-md-12 padd-div-shu" v-if="row.f_userinfo_code">
74
+ 用户编号: {{row.f_userinfo_code}}
75
+ </div>
76
+ <div class="col-sm-12 col-xs-12 col-md-12 padd-div-shu" v-if="row.f_enter_number">
77
+ 用户证号: {{row.f_enter_number}}
78
+ </div>
79
+ <div class="col-sm-12 col-xs-12 col-md-12 padd-div-shu">
80
+ 用户姓名: {{row.f_user_name}}
81
+ </div>
82
+ <div v-show="false" class="col-sm-12 col-xs-12 col-md-12 padd-div-shu">
83
+ 来电电话: {{row.f_phone}}
84
+ <img src="../../../assets/telphonesend.png" style="width: 12px;" @click.stop.prevent='makeAPhoneCall(row.f_phone)'>
85
+ </div>
86
+ <div class="col-sm-12 col-xs-12 col-md-12">
87
+ 联系电话: {{row.f_contact_phone}}
88
+ <img src="../../../assets/telphonesend.png" style="width: 12px;" @click.stop.prevent='makeAPhoneCall(row.f_contact_phone)'>
89
+ </div>
90
+ <div class="col-sm-12 col-xs-12 col-md-12 padd-div-shu">
91
+ 用户地址: {{row.f_address}}
92
+ </div>
93
+ <div v-show="row.f_remarks" class="col-sm-12 col-xs-12 col-md-12 padd-div-shu">
94
+ 备注信息: {{row.f_remarks}}
95
+ </div>
96
+ <div class="col-sm-12 col-xs-12 col-md-12 padd-div-shu" v-if="row.failure">
97
+ <failure-show :value='row.failure'>
98
+ </failure-show>
99
+ </div>
100
+ </div>
101
+ </div>
102
+ <div class="col-sm-12 col-xs-12 col-md-12">
103
+ <button type="button" name="button" class="btn btn-primary btn-sm" style="float: right;margin-right: 5px;" @click="selected(row)">下派</button>
104
+ <button type="button" name="button" class="btn btn-primary btn-sm" style="float: right;margin-right: 5px;" @click="returnOrder(row)">退回</button>
105
+ <button type="button" name="button" class="btn btn-primary btn-sm" style="float: right;margin-right: 5px;" @click="caseend(row)">结案</button>
106
+ </div>
107
+ </div>
108
+ </div>
109
+ </div>
110
+ <div style="height:auto;width: 100%;text-align: center">
111
+ <a v-if="!listData.isEnd" @click="showMore()">展开更多......</a>
112
+ <span v-if="listData.isEnd">到底了......</span>
113
+ </div>
114
+ </div>
115
+ <modal :show.sync="return_modal" v-ref:modalCase backdrop="false">
116
+ <header slot="modal-header" class="modal-header">
117
+ 工单退回
118
+ </header>
119
+ <article slot="modal-body" class="modal-body">
120
+ <div class="col-sm-12 form-group">
121
+ <label class="control-label col-sm-2">退回备注</label>
122
+ <div class="col-sm-9">
123
+ <input class="form-control" type="text" v-model="return_modal_data.serviceacitivity[0].f_site_back_reason"/>
124
+ </div>
125
+ </div>
126
+ </article>
127
+ <footer slot="modal-footer" class="modal-footer">
128
+ <button type="button" class="btn btn-success" @click='returnOrderBack()'>确定</button>
129
+ <button type="button" class="btn btn-success" @click='returnModalClose()'>关闭</button>
130
+ </footer>
131
+ </modal>
132
+ <modal :show.sync="sendshow" v-ref:modal :backdrop="false">
133
+ <div slot="modal-header" class="modal-header">
134
+ <h4 class="modal-title">
135
+ 派发工单
136
+ </h4>
137
+ </div>
138
+ <div slot="modal-body" class="modal-body">
139
+ <div class="row" style="margin-top: 6px">
140
+ <label class="col-xs-4 col-md-4 control-label font text-left">派单方式</label>
141
+ <div class="col-xs-8">
142
+ <v-select :value-single="true" :value.sync="f_handlingtype" v-model="f_handlingtype"
143
+ :options='repairerType' placeholder='请选择派单方式'
144
+ close-on-select></v-select>
145
+ </div>
146
+ </div>
147
+ <div class="row" style="margin-top: 6px" v-if="f_handlingtype == '转维修员'">
148
+ <label class="col-xs-4 col-md-4 control-label font text-left">维修员</label>
149
+ <div class="col-xs-8">
150
+ <v-select :value="sendselected.serviceacitivity[0].f_reciever" :value-single="true"
151
+ :options='repairers' placeholder='请选择维修员'
152
+ close-on-select v-on:change="repiarmancg"></v-select>
153
+ </div>
154
+ </div>
155
+ <div class="row" style="margin-top: 6px" v-if="f_handlingtype == '转站点'">
156
+ <label class="col-xs-4 col-md-4 control-label font text-left">站点</label>
157
+ <input style="width: 60%" type="text" v-show="false" v-model="sendselected.serviceacitivity[0].f_reciever">
158
+ <right-tree islist :userid="userid" :source="source" v-on:re-res="reres" :textContent="选择站点管理员">
159
+
160
+ </right-tree>
161
+ </div>
162
+ <div class="row" style="margin-top: 6px">
163
+ <label class="control-label font text-left col-md-4 col-xs-4">备注</label>
164
+ <div class="col-xs-8 col-md-8">
165
+ <input type="text" v-model="sendselected.f_advice"/>
166
+ </div>
167
+ </div>
168
+ </div>
169
+ <div slot="modal-footer" class="modal-footer">
170
+ <button type="button" class="btn btn-default" @click="worksend()">确定</button>
171
+ <button type="button" class="btn btn-default" @click="undo()">取消</button>
172
+ </div>
173
+ </modal>
174
+ <modal :show.sync="caseshow" v-ref:modalCase backdrop="false">
175
+ <header slot="modal-header" class="modal-header">
176
+ 工单结案
177
+ </header>
178
+ <article slot="modal-body" class="modal-body">
179
+ <div class="col-sm-12 form-group">
180
+ <label class="control-label col-sm-2">结案备注</label>
181
+ <div class="col-sm-9">
182
+ <input class="form-control" type="text" v-model="f_caseremarks"/>
183
+ </div>
184
+ </div>
185
+ </article>
186
+ <footer slot="modal-footer" class="modal-footer">
187
+ <button type="button" class="btn btn-success" @click='caseok'>确定</button>
188
+ <button type="button" class="btn btn-success" @click='caseclose'>关闭</button>
189
+ </footer>
190
+ </modal>
191
+ </div>
192
+ </div>
193
+ </template>
194
+ <script>
195
+ import FailureShow from '../../../components/pc/FailureShow'
196
+ import { HttpResetClass } from 'vue-client'
197
+ import Vue from 'vue'
198
+ import * as Util from "../../../components/Util";
199
+
200
+ export default{
201
+ title: '移动端站点派发',
202
+ data () {
203
+ return {
204
+ return_modal:false,
205
+ return_modal_data:{},
206
+ userid: Vue.user.id,
207
+ source:
208
+ 'dep=this.getParentByType($organization$).getSpecialResByType($department$),' +
209
+ 'tool.getFullTree(dep.where(row.hasSpecialRole($派单员$)))',
210
+ repairName: '',
211
+ f_handlingtype:'转维修员',
212
+ repairerType:[{label: '转维修员', value: '转维修员'}, {label: '转站点', value: '转站点'}],
213
+ repairerStands:[],
214
+ f_caseremarks:'',
215
+ selectone:'',
216
+ rows: [],
217
+ username:'',
218
+ address:'',
219
+ sendshow:false,
220
+ repairers: [],
221
+ caseshow:false,
222
+ sendselected:{
223
+ serviceacitivity:[
224
+ {
225
+ f_service_acitivity_type: '派单',
226
+ f_reciever:''
227
+ }
228
+ ],
229
+ f_advice:''
230
+ },
231
+ number:0,
232
+ listData: {
233
+ list: [],
234
+ isEnd: true,
235
+ index: 0
236
+ }
237
+ }
238
+ },
239
+ props: {
240
+ },
241
+ methods: {
242
+ returnOrderBack(){
243
+ new HttpResetClass().load('POST', `${this.$androidUtil.getProxyUrl()}/af-telephone/rs/logic/siteBack`, {model: this.return_modal_data, loginUser: {name: Vue.user.name, ename: Vue.user.ename, id: Vue.user.id}}).then((res) => {
244
+ this.returnModalClose()
245
+ this.$showMessage(`退回成功`)
246
+ })
247
+ },
248
+ returnModalClose(){
249
+ this.return_modal_data = {}
250
+ this.return_modal = false
251
+ },
252
+ returnOrder(row){
253
+ row.serviceacitivity = [
254
+ {
255
+ "f_service_acitivity_type": "打回",
256
+ "f_site_back_reason": ""
257
+ }
258
+ ]
259
+ this.return_modal_data = row
260
+ this.return_modal = true
261
+ },
262
+ reres(val){
263
+ if(val.res == undefined || val.res[0] == undefined || val.res[0] == ''){
264
+ return
265
+ }
266
+ this.sendselected.serviceacitivity[0].f_meetunit = val.res[0]
267
+ this.sendselected.f_meetunit = val.res[0]
268
+ this.sendselected.f_filiale_id = val.orgobj[0].parentid
269
+ this.sendselected.f_filiale = val.orgobj[0].parentname
270
+ this.sendselected.f_outlets = val.res[0]
271
+ this.sendselected.serviceacitivity[0].f_reciever = val.resids[0]
272
+ },
273
+ caseend(val){
274
+ this.selectone = val
275
+ this.caseshow = true
276
+ },
277
+ // 结案确认
278
+ caseok(){
279
+ // 工单结案操作
280
+ let data = {model: this.selectone, loginUser: {name: Vue.user.name, ename: Vue.user.ename},f_caseremarks:this.f_caseremarks}
281
+ let HttpReset1 = new HttpResetClass()
282
+ // 将数据发送给业务逻辑
283
+ HttpReset1.load('POST',`${this.$androidUtil.getProxyUrl()}/af-telephone/rs/logic/serviceCase`, data).then((res) => {
284
+ this.f_caseremarks = ''
285
+ this.caseshow = false
286
+ this.ifsearch()
287
+ })
288
+ },
289
+ // 结案返回
290
+ caseclose(){
291
+ this.f_caseremarks = ''
292
+ this.caseshow = false
293
+ this.selectone = ''
294
+ },
295
+ worksend() {
296
+ if (!this.sendselected.serviceacitivity[0].f_reciever) {
297
+ this.$showMessage(`请选择接单人员!`, ['confirm'])
298
+ return
299
+ }
300
+ let data = {
301
+ model: this.sendselected,
302
+ loginUser: {name: Vue.user.name, ename: Vue.user.ename},
303
+ f_handlingtype: this.f_handlingtype
304
+ }
305
+ let HttpReset = new HttpResetClass()
306
+ // 将数据发送给业务逻辑
307
+ HttpReset.load('POST', `${this.$androidUtil.getProxyUrl()}/af-telephone/rs/logic/siteSend`, data).then((res) => {
308
+ if (res.data.code == 300) {
309
+ this.sendshow = false
310
+ this.sendselected = {
311
+ serviceacitivity: [
312
+ {
313
+ f_service_acitivity_type: '派单',
314
+ f_reciever: ''
315
+ }
316
+ ],
317
+ f_advice: ''
318
+ }
319
+ this.ifsearch()
320
+ this.$showMessage(`该单已被派发!`, ['confirm'])
321
+ return
322
+ } else {
323
+ this.sendshow = false
324
+ this.sendselected = {
325
+ serviceacitivity: [
326
+ {
327
+ f_service_acitivity_type: '派单',
328
+ f_reciever: ''
329
+ }
330
+ ],
331
+ f_advice: ''
332
+ }
333
+ this.ifsearch()
334
+ this.$showMessage(`派发成功!`, ['confirm'])
335
+ return
336
+ }
337
+ })
338
+ },
339
+ repiarmancg(val){
340
+ this.sendselected.serviceacitivity[0].f_reciever = val
341
+ },
342
+ // 获取维修员
343
+ getEmp () {
344
+ // 获取接单人数组
345
+ let http = new HttpResetClass()
346
+ var val = {source: `this.getParentByType($organization$).getChildByName($维修员$).getUsers()`, userid: `${Vue.user.id}`}
347
+ http.load('POST', `${this.$androidUtil.getProxyUrl()}/rs/search`, {data: val}, {resolveMsg: null, rejectMsg: null}).then((res) => {
348
+ res.data.forEach((item) => {
349
+ this.repairers.push({label: `${item.name}`, value: item.name})
350
+ })
351
+ })
352
+ },
353
+ ifsearch(){
354
+ this.listData.list = []
355
+ this.listData.index = 0
356
+ this.listData.isEnd = true
357
+ var condition = `1 = 1 and tswo.f_workorder_type = '报修单'`
358
+ if(this.username != ''){
359
+ condition += " and tswo.f_user_name like '%" + this.username + "%'"
360
+ }
361
+ if(this.address != ''){
362
+ condition += " and tswo.f_address like '%" + this.address + "%'"
363
+ }
364
+ var val = {
365
+ condition:{
366
+ condition:condition,
367
+ sign:'1 = 1'
368
+ },
369
+ userid:Vue.user.name
370
+ }
371
+ //tag
372
+ //tag
373
+ let http = new HttpResetClass()
374
+ http.load('POST', `${this.$androidUtil.getProxyUrl()}/af-telephone/rs/sql/operatorService`, {data: val}, {resolveMsg: null, rejectMsg: null}).then((res) => {
375
+ this.rows = res.data
376
+ this.showMore()
377
+ })
378
+ },
379
+ selected (row) {
380
+ this.sendselected = Object.assign({}, this.sendselected, row)
381
+ this.sendshow =true
382
+ },
383
+ undo(){
384
+ this.sendselected ={
385
+ serviceacitivity:[
386
+ {
387
+ f_service_acitivity_type: '派单',
388
+ f_reciever:''
389
+ }
390
+ ],
391
+ f_advice:''
392
+ }
393
+ this.sendshow = false
394
+ this.ifsearch()
395
+ },
396
+ makeAPhoneCall(phoneNumber) {
397
+ this.$androidUtil.makeAPhoneCall(phoneNumber)
398
+ },
399
+ showMore() {
400
+ if (!this.rows) {
401
+ return
402
+ }
403
+ let endIndex = this.listData.index + 10
404
+ if (endIndex > this.rows.length) {
405
+ endIndex = this.rows.length
406
+ }
407
+ for (; this.listData.index < endIndex; this.listData.index++) {
408
+ this.listData.list.push(this.rows[this.listData.index])
409
+ }
410
+ if(this.listData.index == this.rows.length){
411
+ this.listData.isEnd = true
412
+ }else {
413
+ this.listData.isEnd = false
414
+ }
415
+ }
416
+ },
417
+ ready () {
418
+ this.getEmp()
419
+ this.ifsearch()
420
+ },
421
+ components: {
422
+ FailureShow,
423
+ 'failure-show': FailureShow
424
+ }
425
+ }
426
+ </script>
427
+ <style scoped>
428
+ .searBtn {
429
+ background: #FFFFFF;
430
+ color: #0096fb;
431
+ border: 1px solid #0096fb;
432
+ border-radius: 5px;
433
+ padding: 8px;
434
+ text-align: center;
435
+ font-size: 1.2em;
436
+ z-index: 10;
437
+ opacity:0.5;
438
+ bottom: 50px;
439
+ margin-top: -10px;
440
+ height: 40px;
441
+ }
442
+ .bg {
443
+ background-color: #499edf;
444
+ height: 1px;
445
+ border: 0;
446
+ }
447
+ .app-row {
448
+ background-color: white;
449
+ padding: 10px 10px 0 10px;
450
+ border-bottom: 1px solid rgba(235, 235, 235, 0.5);
451
+ }
452
+ .search_input {
453
+ border: 0;
454
+ outline: none;
455
+ }
456
+ .font{
457
+ font: 15px PingFang-SC-Medium;
458
+ color: #666666;
459
+ }
460
+ .input-font{
461
+ font: 15px PingFang-SC-Medium;
462
+ color: #333333;
463
+ }
464
+ .btn-font{
465
+ font:600 16px PingFang-SC-Bold;
466
+ color: #499EDF;
467
+ }
468
+ .btn-color{
469
+ background-color: #FFFFFF;
470
+ border-radius: 10px ;
471
+ border: 1px solid #499EDF;
472
+ }
473
+ .panel-blue-border {
474
+ border: 1px solid #499edf;
475
+ border-radius: 5px;
476
+ }
477
+ </style>