telephone-clients 4.0.0-1-5 → 4.0.0-1-6

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.
@@ -0,0 +1,431 @@
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" @click="selected(row)">下派</button>
98
+ <button type="button" name="button" class="btn btn-primary btn-sm" style="float: right" @click="caseend(row)">结案</button>
99
+ </div>
100
+ </div>
101
+ </div>
102
+ </div>
103
+ <div style="height:auto;width: 100%;text-align: center">
104
+ <a v-if="!listData.isEnd" @click="showMore()">展开更多......</a>
105
+ <span v-if="listData.isEnd">到底了......</span>
106
+ </div>
107
+ </div>
108
+ <modal :show.sync="sendshow" v-ref:modal :backdrop="false">
109
+ <div slot="modal-header" class="modal-header">
110
+ <h4 class="modal-title">
111
+ 派发工单
112
+ </h4>
113
+ </div>
114
+ <div slot="modal-body" class="modal-body">
115
+ <div class="row" style="margin-top: 6px">
116
+ <label class="col-xs-4 col-md-4 control-label font text-left">派单方式</label>
117
+ <div class="col-xs-8">
118
+ <v-select :value-single="true" :value.sync="f_handlingtype" v-model="f_handlingtype"
119
+ :options='repairerType' placeholder='请选择派单方式'
120
+ close-on-select></v-select>
121
+ </div>
122
+ </div>
123
+ <div class="row" style="margin-top: 6px" v-if="f_handlingtype == '转维修员'">
124
+ <label class="col-xs-4 col-md-4 control-label font text-left">维修员</label>
125
+ <div class="col-xs-8">
126
+ <v-select :value="sendselected.serviceacitivity[0].f_reciever" :value-single="true"
127
+ :options='repairers' placeholder='请选择维修员'
128
+ close-on-select v-on:change="repiarmancg"></v-select>
129
+ </div>
130
+ </div>
131
+ <div class="row" style="margin-top: 6px" v-if="f_handlingtype == '转站点'">
132
+ <label class="col-xs-4 col-md-4 control-label font text-left">站点</label>
133
+ <input style="width: 60%" type="text" v-show="false" v-model="sendselected.serviceacitivity[0].f_reciever">
134
+ <right-tree islist :userid="userid" :source="source" v-on:re-res="reres" :textContent="选择站点管理员">
135
+
136
+ </right-tree>
137
+ </div>
138
+ <div class="row" style="margin-top: 6px">
139
+ <label class="control-label font text-left col-md-4 col-xs-4">备注</label>
140
+ <div class="col-xs-8 col-md-8">
141
+ <input type="text" v-model="sendselected.f_advice"/>
142
+ </div>
143
+ </div>
144
+ </div>
145
+ <div slot="modal-footer" class="modal-footer">
146
+ <button type="button" class="btn btn-default" @click="worksend()">确定</button>
147
+ <button type="button" class="btn btn-default" @click="undo()">取消</button>
148
+ </div>
149
+ </modal>
150
+ <modal :show.sync="caseshow" v-ref:modalCase backdrop="false">
151
+ <header slot="modal-header" class="modal-header">
152
+ 工单结案
153
+ </header>
154
+ <article slot="modal-body" class="modal-body">
155
+ <div class="col-sm-12 form-group">
156
+ <label class="control-label col-sm-2">结案备注</label>
157
+ <div class="col-sm-9">
158
+ <input class="form-control" type="text" v-model="f_caseremarks"/>
159
+ </div>
160
+ </div>
161
+ </article>
162
+ <footer slot="modal-footer" class="modal-footer">
163
+ <button type="button" class="btn btn-success" @click='caseok'>确定</button>
164
+ <button type="button" class="btn btn-success" @click='caseclose'>关闭</button>
165
+ </footer>
166
+ </modal>
167
+ </div>
168
+ </div>
169
+ </template>
170
+ <script>
171
+ import FailureShow from '../../../components/pc/FailureShow'
172
+ import { HttpResetClass } from 'vue-client'
173
+ import Vue from 'vue'
174
+ import * as Util from "../../../components/Util";
175
+
176
+ export default{
177
+ title: '移动端站点派发',
178
+ data () {
179
+ return {
180
+ userid: Vue.user.id,
181
+ source:
182
+ 'dep=this.getParentByType($organization$).getSpecialResByType($department$),' +
183
+ 'tool.getFullTree(dep.where(row.hasSpecialRole($派单员$)))',
184
+ repairName: '',
185
+ f_handlingtype:'转维修员',
186
+ repairerType:[{label: '转维修员', value: '转维修员'}, {label: '转站点', value: '转站点'}],
187
+ repairerStands:[],
188
+ f_caseremarks:'',
189
+ selectone:'',
190
+ rows: [],
191
+ username:'',
192
+ address:'',
193
+ sendshow:false,
194
+ repairers: [],
195
+ caseshow:false,
196
+ sendselected:{
197
+ serviceacitivity:[
198
+ {
199
+ f_service_acitivity_type: '派单',
200
+ f_reciever:''
201
+ }
202
+ ],
203
+ f_advice:''
204
+ },
205
+ number:0,
206
+ listData: {
207
+ list: [],
208
+ isEnd: true,
209
+ index: 0
210
+ }
211
+ }
212
+ },
213
+ props: {
214
+ },
215
+ methods: {
216
+ reres(val){
217
+ if(val.res == undefined || val.res[0] == undefined || val.res[0] == ''){
218
+ return
219
+ }
220
+ this.sendselected.serviceacitivity[0].f_meetunit = val.res[0]
221
+ this.sendselected.f_meetunit = val.res[0]
222
+ this.sendselected.f_filiale_id = val.orgobj[0].parentid
223
+ this.sendselected.f_filiale = val.orgobj[0].parentname
224
+ this.sendselected.f_outlets = val.res[0]
225
+ this.sendselected.serviceacitivity[0].f_reciever = val.resids[0]
226
+ },
227
+ caseend(val){
228
+ this.selectone = val
229
+ this.caseshow = true
230
+ },
231
+ // 结案确认
232
+ caseok(){
233
+ // 工单结案操作
234
+ let data = {model: this.selectone, loginUser: {name: Vue.user.name, ename: Vue.user.ename},f_caseremarks:this.f_caseremarks}
235
+ let HttpReset1 = new HttpResetClass()
236
+ // 将数据发送给业务逻辑
237
+ HttpReset1.load('POST',`${this.$androidUtil.getProxyUrl()}/af-telephone/rs/logic/serviceCase`, data).then((res) => {
238
+ this.f_caseremarks = ''
239
+ this.caseshow = false
240
+ this.ifsearch()
241
+ })
242
+ },
243
+ // 结案返回
244
+ caseclose(){
245
+ this.f_caseremarks = ''
246
+ this.caseshow = false
247
+ this.selectone = ''
248
+ },
249
+ worksend() {
250
+ if (!this.sendselected.serviceacitivity[0].f_reciever) {
251
+ this.$showMessage(`请选择接单人员!`, ['confirm'])
252
+ return
253
+ }
254
+ let data = {
255
+ model: this.sendselected,
256
+ loginUser: {name: Vue.user.name, ename: Vue.user.ename},
257
+ f_handlingtype: this.f_handlingtype
258
+ }
259
+ let HttpReset = new HttpResetClass()
260
+ // 将数据发送给业务逻辑
261
+ HttpReset.load('POST', `${this.$androidUtil.getProxyUrl()}/af-telephone/rs/logic/siteSend`, data).then((res) => {
262
+ if (res.data.code == 300) {
263
+ this.sendshow = false
264
+ this.sendselected = {
265
+ serviceacitivity: [
266
+ {
267
+ f_service_acitivity_type: '派单',
268
+ f_reciever: ''
269
+ }
270
+ ],
271
+ f_advice: ''
272
+ }
273
+ this.ifsearch()
274
+ this.$showMessage(`该单已被派发!`, ['confirm'])
275
+ return
276
+ } else {
277
+ this.sendshow = false
278
+ this.sendselected = {
279
+ serviceacitivity: [
280
+ {
281
+ f_service_acitivity_type: '派单',
282
+ f_reciever: ''
283
+ }
284
+ ],
285
+ f_advice: ''
286
+ }
287
+ this.ifsearch()
288
+ this.$showMessage(`派发成功!`, ['confirm'])
289
+ return
290
+ }
291
+ })
292
+ },
293
+ repiarmancg(val){
294
+ this.sendselected.serviceacitivity[0].f_reciever = val
295
+ },
296
+ // 获取维修员
297
+ getEmp () {
298
+ // 获取接单人数组
299
+ let http = new HttpResetClass()
300
+ var val = {source: `this.getParentByType($organization$).getChildByName($维修员$).getUsers()`, userid: `${Vue.user.id}`}
301
+ http.load('POST', `${this.$androidUtil.getProxyUrl()}/rs/search`, {data: val}, {resolveMsg: null, rejectMsg: null}).then((res) => {
302
+ res.data.forEach((item) => {
303
+ this.repairers.push({label: `${item.name}`, value: item.name})
304
+ })
305
+ })
306
+ },
307
+ ifsearch(){
308
+ this.listData.list = []
309
+ this.listData.index = 0
310
+ this.listData.isEnd = true
311
+ var condition = `1 = 1 and tswo.f_workorder_type = '报修单'`
312
+ if(this.username != ''){
313
+ condition += " and tswo.f_user_name like '%" + this.username + "%'"
314
+ }
315
+ if(this.address != ''){
316
+ condition += " and tswo.f_address like '%" + this.address + "%'"
317
+ }
318
+ var val = {
319
+ condition:{
320
+ condition:condition,
321
+ sign:'1 = 1'
322
+ },
323
+ userid:Vue.user.name
324
+ }
325
+ //tag
326
+ //tag
327
+ let http = new HttpResetClass()
328
+ http.load('POST', `${this.$androidUtil.getProxyUrl()}/af-telephone/rs/sql/operatorService`, {data: val}, {resolveMsg: null, rejectMsg: null}).then((res) => {
329
+ this.rows = res.data
330
+ this.showMore()
331
+ })
332
+ },
333
+ selected (row) {
334
+ this.sendselected = Object.assign({}, this.sendselected, row)
335
+ this.sendshow =true
336
+ },
337
+ undo(){
338
+ this.sendselected ={
339
+ serviceacitivity:[
340
+ {
341
+ f_service_acitivity_type: '派单',
342
+ f_reciever:''
343
+ }
344
+ ],
345
+ f_advice:''
346
+ }
347
+ this.sendshow = false
348
+ this.ifsearch()
349
+ },
350
+ makeAPhoneCall(phoneNumber) {
351
+ this.$androidUtil.makeAPhoneCall(phoneNumber)
352
+ },
353
+ showMore() {
354
+ if (!this.rows) {
355
+ return
356
+ }
357
+ let endIndex = this.listData.index + 10
358
+ if (endIndex > this.rows.length) {
359
+ endIndex = this.rows.length
360
+ }
361
+ for (; this.listData.index < endIndex; this.listData.index++) {
362
+ this.listData.list.push(this.rows[this.listData.index])
363
+ }
364
+ if(this.listData.index == this.rows.length){
365
+ this.listData.isEnd = true
366
+ }else {
367
+ this.listData.isEnd = false
368
+ }
369
+ }
370
+ },
371
+ ready () {
372
+ this.getEmp()
373
+ this.ifsearch()
374
+ },
375
+ components: {
376
+ FailureShow,
377
+ 'failure-show': FailureShow
378
+ }
379
+ }
380
+ </script>
381
+ <style scoped>
382
+ .searBtn {
383
+ background: #FFFFFF;
384
+ color: #0096fb;
385
+ border: 1px solid #0096fb;
386
+ border-radius: 5px;
387
+ padding: 8px;
388
+ text-align: center;
389
+ font-size: 1.2em;
390
+ z-index: 10;
391
+ opacity:0.5;
392
+ bottom: 50px;
393
+ margin-top: -10px;
394
+ height: 40px;
395
+ }
396
+ .bg {
397
+ background-color: #499edf;
398
+ height: 1px;
399
+ border: 0;
400
+ }
401
+ .app-row {
402
+ background-color: white;
403
+ padding: 10px 10px 0 10px;
404
+ border-bottom: 1px solid rgba(235, 235, 235, 0.5);
405
+ }
406
+ .search_input {
407
+ border: 0;
408
+ outline: none;
409
+ }
410
+ .font{
411
+ font: 15px PingFang-SC-Medium;
412
+ color: #666666;
413
+ }
414
+ .input-font{
415
+ font: 15px PingFang-SC-Medium;
416
+ color: #333333;
417
+ }
418
+ .btn-font{
419
+ font:600 16px PingFang-SC-Bold;
420
+ color: #499EDF;
421
+ }
422
+ .btn-color{
423
+ background-color: #FFFFFF;
424
+ border-radius: 10px ;
425
+ border: 1px solid #499EDF;
426
+ }
427
+ .panel-blue-border {
428
+ border: 1px solid #499edf;
429
+ border-radius: 5px;
430
+ }
431
+ </style>