telephone-clients 3.0.105-22 → 3.0.105-23

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 CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "telephone-clients",
3
- "version": "3.0.105-22",
3
+ "version": "3.0.105-23",
4
4
  "description": "呼叫模块前台组件",
5
5
  "main": "src/index.js",
6
6
  "directories": {
@@ -212,7 +212,7 @@
212
212
  'tool.getFullTree(dep.where(row.hasSpecialRole($派单员$)))',
213
213
  userid: Vue.user.id,
214
214
  is_has_jingweidu: this.$appdata.getSingleValue('照片水印加经纬度') || 'false',
215
- failure: ['更换不锈钢波纹管'],
215
+ failure: [],
216
216
  model: {
217
217
  f_userinfo_id: '',
218
218
  f_userinfo_code: '',
@@ -0,0 +1,541 @@
1
+ <template>
2
+ <div style="height: auto;width: 100%">
3
+ <div class="row app-row">
4
+ <div class="col-xs-4">
5
+ <label>用户姓名</label>
6
+ </div>
7
+ <div class="col-xs-8">
8
+ <input class="inputText4" v-model=model.f_user_name style="width: 100%"></input>
9
+ </div>
10
+
11
+ </div>
12
+ <div class="row app-row">
13
+ <div class="col-xs-4">
14
+ <label>联系电话</label>
15
+ </div>
16
+ <div class="col-xs-8">
17
+ <input class="input-font inputText4 " v-model=model.f_contact_phone style="width: 100%"></input>
18
+ </div>
19
+
20
+ </div>
21
+ <div class="row app-row">
22
+ <div class="col-xs-4">
23
+ <label>详细地址</label>
24
+ </div>
25
+ <div class="col-xs-8">
26
+ <input class="input-font inputText4 " v-model=model.f_address style="width: 100%"></input>
27
+ </div>
28
+
29
+ </div>
30
+ <div class="row app-row">
31
+ <div class="col-xs-4">
32
+ <label>用户类型</label>
33
+ </div>
34
+ <div class="col-xs-8">
35
+ <v-select id="f_user_type" :value.sync="model.f_user_type" class="input-font"
36
+ :options='user_types' placeholder='请选择用户类型'
37
+ class="inputText4"
38
+ :width="'100%'"
39
+ :value-single="true"
40
+ v-model="model.f_user_type" close-on-select clear-button></v-select>
41
+
42
+ </div>
43
+
44
+ </div>
45
+
46
+ <div class="row app-row">
47
+ <div class="col-xs-4">
48
+ <label>是否上报</label>
49
+ </div>
50
+ <div class="col-xs-8">
51
+ <v-select id="f_user_paidan" :value.sync="model.f_handlingtype" class="input-font"
52
+ :options='handling_types' placeholder='请选择是否上报'
53
+ class="inputText4"
54
+ :width="'100%'"
55
+ :value-single="true"
56
+ v-model="model.f_handlingtype" close-on-select clear-button></v-select>
57
+ </div>
58
+
59
+ </div>
60
+ <div class="row app-row" v-if="model.f_handlingtype=='转站点'">
61
+ <div class="col-xs-4">
62
+ <label>选择站点</label>
63
+ </div>
64
+ <div class="col-xs-8">
65
+ <right-tree islist :userid="userid" :source="source" v-on:re-res="reres" v-ref:f_reciever width="100%"
66
+ style="width: 100%">
67
+
68
+ </right-tree>
69
+ </div>
70
+
71
+ </div>
72
+ <div class="row app-row">
73
+ <div class="col-xs-4">
74
+ <label>报修类型</label>
75
+ </div>
76
+ <div class="col-xs-8">
77
+ <v-select id="f_qiangxiu" :value.sync="model.f_repairtype" class="input-font"
78
+ :options='repairstypes' placeholder='请选择报修类型'
79
+ class="inputText4"
80
+ :width="'100%'"
81
+ :value-single="true"
82
+ v-model="model.f_repairtype" close-on-select clear-button></v-select>
83
+ </div>
84
+
85
+ </div>
86
+ <div class="row app-row">
87
+ <div class="col-xs-4">
88
+ <label>故障类型</label>
89
+ </div>
90
+ <div class="col-xs-8">
91
+ <v-select id="f_guzhang" :value.sync="failure" class="input-font"
92
+ :options='failuretypes' placeholder='请选择故障类型'
93
+ class="inputText4"
94
+ :width="'100%'"
95
+ multiple
96
+ v-model="failure" clear-button></v-select>
97
+ </div>
98
+
99
+ </div>
100
+ <div class="row app-row">
101
+ <div class="col-xs-4">
102
+ <label>备注</label>
103
+ </div>
104
+ <div class="col-xs-8">
105
+ <textarea class="input-font " v-model=model.f_remarks style="width: 100%"></textarea>
106
+ </div>
107
+
108
+ </div>
109
+ <div class="row app-row text-center" style="margin-top: 20px;">
110
+ <button type="button" class="btn btn-lg btn-font btn-color" style="width: 25%;" @click="save">保存</button>
111
+ </div>
112
+ <div class="form-group col-sm-12">
113
+
114
+ <div class="panel" style="padding: 10px 10px 5px 10px;">
115
+ <div class="panel-body panel-self"
116
+ style="background-color: #F8F8F8;width: 90%;margin-left:5%;height: 220px;position: relative">
117
+ <div class="row" style="height: 180px;overflow: scroll;top: 1px">
118
+ <div class="col-sm-4">
119
+ <img-self :src="model.f_single_path" alt="抢修照片" :width="140" :height="170" capture="camera" type="file"
120
+ @change="upload"></img-self>
121
+ </div>
122
+ </div>
123
+
124
+ <div class="row text-right div-photo" style="height: 50px">
125
+ <img src="../../../assets/remove.png" @click="delfile('f_single_path', model.f_single_path)"/>
126
+ <button type="button" name="button" class="btn btn-primary btn-photo"
127
+ @click="takePic('f_single_path','抢修照片','拍照')">拍照
128
+ </button>
129
+ <button type="button" name="button" class="btn btn-primary btn-photo"
130
+ @click="takePic('f_single_path','抢修照片','相册')">相册
131
+ </button>
132
+ </div>
133
+ </div>
134
+ </div>
135
+
136
+ </div>
137
+ <div class="form-group col-sm-12">
138
+
139
+ <div class="panel" style="padding: 10px 10px 5px 10px;">
140
+ <div class="panel-body panel-self"
141
+ style="background-color: #F8F8F8;width: 90%;margin-left:5%;height: 220px;position: relative">
142
+ <div class="row" style="height: 180px;overflow: scroll;top: 1px">
143
+ <div class="col-sm-4">
144
+ <img-self :src="model.f_singlea_path" alt="抢修照片" :width="140" :height="170" capture="camera" type="file"
145
+ @change="upload"></img-self>
146
+ </div>
147
+ </div>
148
+
149
+ <div class="row text-right div-photo" style="height: 50px">
150
+ <img src="../../../assets/remove.png" @click="delfile('f_singlea_path', model.f_singlea_path)"/>
151
+ <button type="button" name="button" class="btn btn-primary btn-photo"
152
+ @click="takePic1('f_singlea_path','抢修照片','拍照')">拍照
153
+ </button>
154
+ <button type="button" name="button" class="btn btn-primary btn-photo"
155
+ @click="takePic1('f_singlea_path','抢修照片','相册')">相册
156
+ </button>
157
+ </div>
158
+ </div>
159
+ </div>
160
+
161
+ </div>
162
+ <div class="form-group col-sm-12">
163
+
164
+ <div class="panel" style="padding: 10px 10px 5px 10px;">
165
+ <div class="panel-body panel-self"
166
+ style="background-color: #F8F8F8;width: 90%;margin-left:5%;height: 220px;position: relative">
167
+ <div class="row" style="height: 180px;overflow: scroll;top: 1px">
168
+ <div class="col-sm-4">
169
+ <img-self :src="model.f_singleb_path" alt="抢修照片" :width="140" :height="170" capture="camera" type="file"
170
+ @change="upload"></img-self>
171
+ </div>
172
+ </div>
173
+
174
+ <div class="row text-right div-photo" style="height: 50px">
175
+ <img src="../../../assets/remove.png" @click="delfile('f_singleb_path', model.f_singleb_path)"/>
176
+ <button type="button" name="button" class="btn btn-primary btn-photo"
177
+ @click="takePic2('f_singleb_path','抢修照片','拍照')">拍照
178
+ </button>
179
+ <button type="button" name="button" class="btn btn-primary btn-photo"
180
+ @click="takePic2('f_singleb_path','抢修照片','相册')">相册
181
+ </button>
182
+ </div>
183
+ </div>
184
+ </div>
185
+
186
+ </div>
187
+ </div>
188
+ </template>
189
+
190
+ <script>
191
+ import Vue from 'vue'
192
+ import * as Util from '../../../components/Util'
193
+ import {HttpResetClass} from "vue-client";
194
+
195
+ export default {
196
+ title: '在线维修处理',
197
+ props: {
198
+ userinfo: {
199
+ type: Object,
200
+ default: null
201
+ },
202
+ f_userinfo_id: {
203
+ type: String,
204
+ default: ''
205
+ }
206
+ },
207
+ data() {
208
+ return {
209
+ source:
210
+ 'dep=this.getParentByType($organization$).getSpecialResByType($department$),' +
211
+ 'tool.getFullTree(dep.where(row.hasSpecialRole($派单员$)))',
212
+ userid: Vue.user.id,
213
+ is_has_jingweidu: this.$appdata.getSingleValue('照片水印加经纬度') || 'false',
214
+ failure: [],
215
+ model: {
216
+ f_userinfo_id: '',
217
+ f_userinfo_code: '',
218
+ aState: null,
219
+ f_address: '',
220
+ f_area: "",
221
+ f_attendant: Vue.user.name,
222
+ f_building: "",
223
+ f_card_id: "",
224
+ f_contact_phone: "",
225
+ f_depid: Vue.user.depids,
226
+ f_filiale_id: "",
227
+ f_floor: "",
228
+ f_handlingtype: "转维修员",
229
+ f_enter_number: '',
230
+ f_meetunit: "",
231
+ f_operator: Vue.user.name,
232
+ f_operatorid: Vue.user.id,
233
+ f_orgid: Vue.user.orgid,
234
+ f_orgname: Vue.user.orgs,
235
+ f_outlets: "",
236
+ f_phone: "",
237
+ f_reciever: "",
238
+ f_remarks: "",
239
+ f_repair_date: Util.getNowDate(),
240
+ f_repairman_phone: "",
241
+ f_repairtype: "整改",
242
+ f_residential_area: "",
243
+ f_room: "",
244
+ f_service_id: "",
245
+ f_source: "临时派单",
246
+ f_street: "",
247
+ f_unit: "",
248
+ f_unit_name: "",
249
+ f_user_name: "",
250
+ f_user_type: "",
251
+ failure: "",
252
+ f_single_path: '',
253
+ f_singlea_path: '',
254
+ f_singleb_path: '',
255
+ serviceacitivity: [{
256
+ f_service_acitivity_type: "派单",
257
+ f_reciever: Vue.user.name
258
+ }]
259
+ },
260
+ repairstypes: this.$appdata.getParam('报修类型'),
261
+ failuretypes: this.$appdata.getParam('在线维修故障类型'),
262
+ user_types: [{label: "民用", value: "民用"},
263
+ {label: "非民用", value: "非民用"}],
264
+ repair_types: [{label: "民用", value: "民用"},
265
+ {label: "非民用", value: "非民用"}],
266
+ handling_types: [{label: "是", value: "转站点"},
267
+ {label: "否", value: "转维修员"}]
268
+ }
269
+ },
270
+ methods: {
271
+ delfile(prop, fileName) {
272
+ if (fileName == Vue.nopic)
273
+ return
274
+ else {
275
+ HostApp.delfile(fileName)
276
+ this.model[prop] = Vue.nopic
277
+ }
278
+ },
279
+ cameraCallBack(prop, fileName) {
280
+ HostApp.__this__.model.f_single_path = fileName + '?' + Math.random()
281
+ HostApp.__callback__ = null
282
+ HostApp.__this__ = null
283
+ },
284
+ cameraCallBack1(prop, fileName) {
285
+ HostApp.__this__.model.f_singlea_path = fileName + '?' + Math.random()
286
+ HostApp.__callback__ = null
287
+ HostApp.__this__ = null
288
+ },
289
+ cameraCallBack2(prop, fileName) {
290
+ HostApp.__this__.model.f_singleb_path = fileName + '?' + Math.random()
291
+ HostApp.__callback__ = null
292
+ HostApp.__this__ = null
293
+ },
294
+
295
+ takePic(prop, title,type) {
296
+ const obj = HostApp.getGpsDetailAddress()
297
+ HostApp.__callback__ = this.cameraCallBack
298
+ HostApp.__this__ = this
299
+ let fileName
300
+ if (!this.model.f_single_path || this.model.f_single_path.includes("nopic.png")) {
301
+ fileName = Util.guid() + '-' + prop + '.jpg'
302
+ } else {
303
+ fileName = Util.getFileName(this.model.f_single_path)
304
+ }
305
+ let jingweidu = ''
306
+ if (this.is_has_jingweidu == 'true') {
307
+ jingweidu = '\t经度:' + obj.longitude + '\t纬度:' + obj.latitude
308
+ }
309
+ //tag
310
+ //tag
311
+ let page = 'com.aofeng.hybrid.android.peripheral.CameraActivity'
312
+ if(type === '相册'){
313
+ page ='com.aofeng.hybrid.android.peripheral.ActionPickActivity'
314
+ }
315
+ HostApp._open_a_page({
316
+ type: 'boomerang',
317
+ page: page,
318
+ param: {
319
+ file: fileName,
320
+ requestCode: 111,
321
+ callback: 'javascript:HostApp.__callback__("' + prop + '", "%s");',
322
+ watermark: title + '\t时间:' + Util.toStandardTimeString() + '\t' + Vue.user.name + jingweidu
323
+ }
324
+ })
325
+ },
326
+ takePic1(prop, title,type) {
327
+ HostApp.__callback__ = this.cameraCallBack1
328
+ HostApp.__this__ = this
329
+ let fileName
330
+ if (!this.model.f_singlea_path || this.model.f_singlea_path.includes("nopic.png")) {
331
+ fileName = Util.guid() + '-' + prop + '.jpg'
332
+ } else {
333
+ fileName = Util.getFileName(this.model.f_singlea_path)
334
+ }
335
+ //tag
336
+ //tag
337
+ let page = 'com.aofeng.hybrid.android.peripheral.CameraActivity'
338
+ if(type === '相册'){
339
+ page ='com.aofeng.hybrid.android.peripheral.ActionPickActivity'
340
+ }
341
+ HostApp._open_a_page({
342
+ type: 'boomerang',
343
+ page: page,
344
+ param: {
345
+ file: fileName,
346
+ requestCode: 111,
347
+ callback: 'javascript:HostApp.__callback__("' + prop + '", "%s");',
348
+ watermark: title + '\t时间:' + Util.toStandardTimeString() + '\t' + Vue.user.name
349
+ }
350
+ })
351
+ },
352
+ takePic2(prop, title,type) {
353
+ HostApp.__callback__ = this.cameraCallBack2
354
+ HostApp.__this__ = this
355
+ let fileName
356
+ if (!this.model.f_singleb_path || this.model.f_singleb_path.includes("nopic.png")) {
357
+ fileName = Util.guid() + '-' + prop + '.jpg'
358
+ } else {
359
+ fileName = Util.getFileName(this.model.f_singleb_path)
360
+ }
361
+ //tag
362
+ //tag
363
+ let page = 'com.aofeng.hybrid.android.peripheral.CameraActivity'
364
+ if(type === '相册'){
365
+ page ='com.aofeng.hybrid.android.peripheral.ActionPickActivity'
366
+ }
367
+ HostApp._open_a_page({
368
+ type: 'boomerang',
369
+ page: page,
370
+ param: {
371
+ file: fileName,
372
+ requestCode: 111,
373
+ callback: 'javascript:HostApp.__callback__("' + prop + '", "%s");',
374
+ watermark: title + '\t时间:' + Util.toStandardTimeString() + '\t' + Vue.user.name
375
+ }
376
+ })
377
+ },
378
+
379
+ save() {
380
+ if (!this.model.f_address) {
381
+ this.$showMessage('请填写地址信息')
382
+ return
383
+ }
384
+ //tag)
385
+ let data = {
386
+ model: this.model, loginUser: {
387
+ name: Vue.user.name,
388
+ ename: Vue.user.ename
389
+ }, user: null, callObj: null
390
+ }
391
+ if (this.model.f_handlingtype == '转维修员') {
392
+ data.toRepair = '一级派单'
393
+ this.model.f_meetunit = Vue.user.deps
394
+ this.model.f_orgid = Vue.user.orgid
395
+ this.model.f_filiale = Vue.user.org
396
+ this.model.f_outlets = Vue.user.deps
397
+ this.model.f_filiale_id = Vue.user.orgid
398
+ }
399
+ //tag
400
+ HostApp.__this__ = this
401
+ HostApp.logicWithHint({
402
+ 'logic': 'callerSendPhone', 'callback': 'javascript: HostApp.__this__.commitCallBack()',
403
+ 'data': data, 'backresult': 1
404
+ })
405
+ },
406
+ commitCallBack(jo) {
407
+ if (jo.state == "ok" && this.model.f_handlingtype == '转站点') {
408
+ this.$showMessage('抢修上报成功', ['confirm']).then((req) => {
409
+ if (req === 'confirm') {
410
+ this.$dispatch('confirm')
411
+ }
412
+ })
413
+ } else if (jo.state == "ok" && this.model.f_handlingtype == '转维修员') {
414
+ this.$showMessage('抢修上报成功,请前往待办工单页面查看', ['confirm']).then((req) => {
415
+ if (req === 'confirm') {
416
+ this.$dispatch('confirm')
417
+ }
418
+ })
419
+ } else {
420
+ this.$showMessage('服务器内部错误')
421
+ }
422
+ },
423
+ reres(val) {
424
+ if (val.res == undefined || val.res[0] == undefined || val.res[0] == '') {
425
+ return
426
+ }
427
+ this.model.serviceacitivity[0].f_meetunit = val.res[0]
428
+ this.model.f_meetunit = val.res[0]
429
+ this.model.f_filiale_id = val.orgobj[0].parentid
430
+ this.model.f_filiale = val.orgobj[0].parentname
431
+ this.model.f_outlets = val.res[0]
432
+ this.model.serviceacitivity[0].f_reciever = val.resids[0]
433
+ },
434
+ changeFailure(val) {
435
+ let failure = []
436
+ for (let i = 0; i < val.length; i++) {
437
+ failure.push({"f_failure_type": val[i], "failurecase": []})
438
+ }
439
+ this.model.failure = JSON.stringify(failure)
440
+ }
441
+ },
442
+ ready() {
443
+ this.changeFailure(this.failure)
444
+ // let gen = select(this)
445
+ // co(gen)
446
+ if (this.f_userinfo_id) {
447
+ new HttpResetClass().load('POST', 'rs/sql/tel_getUserInfoAdress', {
448
+ data: {
449
+ condition: `ti.f_userinfo_id = '${this.f_userinfo_id}'`
450
+ }
451
+ }, {resolveMsg: null, rejectMsg: null}).then((res) => {
452
+ this.userinfo = res.data[0]
453
+ })
454
+ }
455
+ },
456
+ watch: {
457
+ 'failure'(val) {
458
+ this.changeFailure(val)
459
+ },
460
+ 'userinfo'(val) {
461
+ if (val) {
462
+ this.model.f_user_name = val.f_user_name
463
+ this.model.f_contact_phone = val.f_user_phone
464
+ this.model.f_userinfo_id = val.f_userinfo_id
465
+ this.model.f_userinfo_code = val.f_userinfo_code
466
+ this.model.f_address = val.f_address
467
+ this.model.f_user_type = val.f_user_type
468
+ this.model.f_enter_number = val.f_enter_number
469
+ }
470
+ }
471
+ }
472
+ }
473
+ </script>
474
+
475
+ <style scoped>
476
+ .inputText4 {
477
+ font-family: Arial, Helvetica, sans-serif;
478
+ background: none repeat scroll 0 0 #F5F7FD;
479
+ border: 1px solid #B8BFE9;
480
+ padding: 5px 7px;
481
+ width: 100px;
482
+ vertical-align: middle;
483
+ height: 30px;
484
+ font-size: 12px;
485
+ margin: 0;
486
+ list-style: none outside none;
487
+ }
488
+
489
+ .input-font {
490
+ font: 15px PingFang-SC-Medium;
491
+ color: #333333;
492
+ }
493
+
494
+ .app-row {
495
+ background-color: white;
496
+ padding: 10px 10px 0 10px;
497
+ border-bottom: 1px solid rgba(235, 235, 235, 0.5);
498
+ }
499
+
500
+ .bg {
501
+ background-color: blue;
502
+ height: 1px;
503
+ border: 0;
504
+ }
505
+
506
+ .app-row {
507
+ background-color: white;
508
+ padding: 10px 10px 0 10px;
509
+ border-bottom: 1px solid rgba(235, 235, 235, 0.5);
510
+ }
511
+
512
+ .search_input {
513
+ border: 0;
514
+ outline: none;
515
+ }
516
+
517
+ .font {
518
+ font: 15px PingFang-SC-Medium;
519
+ color: #666666;
520
+ }
521
+
522
+ .input-font {
523
+ font: 15px PingFang-SC-Medium;
524
+ color: #333333;
525
+ }
526
+
527
+ .btn-font {
528
+ font: 600 16px PingFang-SC-Bold;
529
+ color: #499EDF;
530
+ }
531
+
532
+ .btn-color {
533
+ background-color: #FFFFFF;
534
+ border-radius: 10px;
535
+ border: 1px solid #499EDF;
536
+ }
537
+
538
+ .app-text {
539
+ font-size: 12px;
540
+ }
541
+ </style>
@@ -3,7 +3,8 @@ import Vue from "vue";
3
3
 
4
4
  //pc和手机端重写组件较多的话 建议将cp和android分到两个文件中 蓉城较少,所以我就合并到一起
5
5
  let specialComp = {
6
- 'other_charge': (resolve) => { require(['./android/Othercharge'], resolve) }
6
+ 'other_charge': (resolve) => { require(['./android/Othercharge'], resolve) },
7
+ 'temporary-single': (resolve) => { require(['./android/TemporarySingle'], resolve) }
7
8
  }
8
9
  exports.specialComp = specialComp
9
10