telephone-clients 3.0.104-58 → 3.0.104-59

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.104-58",
3
+ "version": "3.0.104-59",
4
4
  "description": "呼叫模块前台组件",
5
5
  "main": "src/index.js",
6
6
  "directories": {
@@ -1,613 +1,614 @@
1
- <template>
2
- <div class="select-overspread repair-bg auto" style="padding-bottom:5px;">
3
- <div class="bq-parent" v-if="shutype == 'heng'">
4
- <blockquote class="blockquote">
5
- <p><span>{{repairitem.header}}</span><a @click="mute()" style="float:right" href="javascript:void(0)" class="repair-mute-class"><img src="../../assets/novoice.png" width="25px;" alt=""><span style="margin-left:10px;color: #304A66">关闭声音</span></a></p>
6
- </blockquote>
7
- </div>
8
- <div class="panel panel-default auto repair-info-content">
9
- <div class="panel-body">
10
- <!-- 维修项内容 -->
11
- <div class="auto repair-info-content compatible">
12
- <div class="row auto">
13
- <div class="{{shuclass}}" v-if="!show && Detail.f_remarks == '设备'">
14
- <button type="button" name="button" class="btn btn-primary" @click='adddetails()' :disabled="issee">增加</button>
15
- </div>
16
- <div class="{{shuclass}}" v-if="!show && Detail.f_remarks == '设备' && candelete">
17
- <button type="button" name="button" class="btn btn-primary" @click='deletedetails()' :disabled="issee">删除</button>
18
- </div>
19
- <div class="{{service.f_source == '安检'?shuclass1:shuclass}}" v-for="row in Detail.details">
20
- <label :class="[row.f_project.length > 6 ? 'fivelabel' : 'lb-left text-justify', service.f_source == '安检'?'tel_del_lable':'']" @click='getCheckImg(row.f_defect_id)' :style="gettextstyle(row.f_project) == 'false'? textstyle:''" v-if="((row.type != 'checkbox') && (ischecked == '有')) || show">{{row.f_project}}</label>
21
- <span v-show="ischecked == '有'" v-if="show" style="font-weight:bold">{{row.f_content}}</span>
22
- <datepicker v-show="ischecked == '有'"
23
- placeholder="请选择时间"
24
- :value.sync="row.f_content"
25
- v-model="row.f_content"
26
- :format="'yyyy-MM-dd'"
27
- v-if="!show && row.type == 'date'"
28
- :disabled="(!(ischecked == '有')) && issee"
29
- :readonly="true"
30
- ></datepicker>
31
- <input v-show="ischecked == '有'" type="text" class="form-control" v-model="row.f_content" v-if="!show && row.type == 'string' && row.f_project.indexOf('表号') == -1" :disabled="(!(ischecked == '有')) || issee" :readonly="issee">
32
- <input v-show="ischecked == '有'" type="text" class="form-control" v-model="row.f_content" v-if="!show && row.type == 'string' && row.f_project.indexOf('表号') != -1 " :disabled="(!(ischecked == '有')) || issee" :readonly="issee" >
33
- <button v-show="ischecked == '有'" type="button" name="button" class="btn btn-primary" @click="scan(row.f_project)" v-if="!show && row.f_project.indexOf('表号') != -1 ">扫码</button>
34
- <v-select v-show="ischecked == '有'"
35
- :value.sync="row.f_content"
36
- :options='getOptions(row.f_project)'
37
- placeholder='请选择'
38
- :disabled="(!(ischecked == '有')) || issee" close-on-select
39
- :value-single="true" v-if="!show && row.type == 'selector' && row.f_project != '气表品牌' && row.f_project != '气价名称'"
40
- ></v-select>
41
-
42
- <div style="clear: both" v-if="service.f_source == '安检' && row.f_content=='已处理'">
43
- <div class="form-group col-sm-12" style="display: flex;flex-wrap: wrap">
44
- <div class="auto" style="margin:1px">
45
- <div class="panel">
46
- <div class="panel-body panel-self" style="background-color: #F8F8F8;width: 150px;height: 150px;position: relative">
47
- <div class="col-xs-6" style="height: 160px;width:160px;overflow: scroll;top: 1px">
48
- <div class="col-sm-4" v-show="row.f_first_repairimg">
49
- <img-self :src="row.f_first_repairimg" width="140" height="140"></img-self>
50
- </div>
51
- <div class="col-sm-4" v-show="!row.f_first_repairimg" @click="takePic($index, row.f_project,1)">
52
- <img src="../../assets/tackpic.png" :alt="点击拍摄照片" width="140" height="140"></img>
53
- </div>
54
- <img v-show="row.f_first_repairimg" src="../../assets/remove.png" :class="style__" @click="delfile($index, row.f_first_repairimg,1)" style="width: 40px;height: 40px;position: absolute;left:110px;top:110px"></img>
55
- </div>
56
- </div>
57
- </div>
58
- </div>
59
- <!-- <div class="auto" style="margin:1px">-->
60
- <!-- <div class="panel">-->
61
- <!-- <div class="panel-body panel-self" style="background-color: #F8F8F8;width: 150px;height: 150px;position: relative">-->
62
- <!-- <div class="col-xs-6" style="height: 160px;width:160px;overflow: scroll;top: 1px">-->
63
- <!-- <div class="col-sm-4" v-show="row.f_second_repairimg">-->
64
- <!-- <img-self :src="row.f_second_repairimg" :alt="row.f_project" width="140" height="140"></img-self>-->
65
- <!-- </div>-->
66
- <!-- <div class="col-sm-4" v-show="!row.f_second_repairimg" @click="takePic($index, row.f_project,2)">-->
67
- <!-- <img src="../../../assets/tackpic.png" :alt="点击拍摄照片" width="140" height="140"></img>-->
68
- <!-- </div>-->
69
- <!-- <img v-show="row.f_second_repairimg" src="../../../assets/remove.png" :class="style__" @click="delfile($index, row.f_second_repairimg,2)" style="width: 40px;height: 40px;position: absolute;left:110px;top:110px"></img>-->
70
- <!-- </div>-->
71
- <!-- </div>-->
72
- <!-- </div>-->
73
- <!-- </div>-->
74
- </div>
75
- </div>
76
- <div v-show="row.f_defect_remark" class="{{shuclass}}" >
77
- <div style="margin-left: 5px;font-weight: bolder;">
78
- 备&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;注: {{row.f_defect_remark}}
79
- </div>
80
- </div>
81
- <v-select
82
- v-show="ischecked == '有'"
83
- :value.sync="row.f_content"
84
- :options='getOptions(row.f_project)'
85
- @change="getgasmodel" placeholder='请选择'
86
- :disabled="(!(ischecked == '有')) || issee" close-on-select
87
- :value-single="true" v-if="!show && row.type == 'selector' && row.f_project == '气表品牌'"
88
- ></v-select>
89
- <v-select
90
- v-show="ischecked == '有'"
91
- :value.sync="row.f_content"
92
- :options='pricelists'
93
- @change="getgasmodel" placeholder='请选择'
94
- :disabled="(!(ischecked == '有')) || issee" close-on-select
95
- :value-single="true" v-if="!show && row.type == 'selector' && row.f_project == '气价名称'"
96
- ></v-select>
97
- <div v-show="ischecked == '有'" class="form-control" v-if="!show && row.type == 'radio'" style="border-color: white;align-self: center" >
98
- <div class="col-xs-6 col-sm-6 col-md-6">
99
- <input type="radio" id="one" value="是" v-model="row.f_content" :disabled="(!(ischecked == '有')) || issee" @click="getradios(row.f_project,'是')" >
100
- <span for="one">是</span>
101
- </div>
102
- <div class="col-xs-6 col-sm-6 col-md-6">
103
- <input type="radio" id="two" value="否" v-model="row.f_content" :disabled="(!(ischecked == '有')) || issee" @click="getradios(row.f_project,'否')">
104
- <span for="two">否</span>
105
- </div>
106
- </div>
107
- <div class="auto" v-if="!show && row.type == 'checkbox' ">
108
- <input class="magic-checkbox" type="checkbox" id="shebeicheckbox"
109
- :checked="row.f_content == '有'"
110
- @click="switchDetails(row.f_project, $event)" :disabled="issee"/>
111
- <label for="shebeicheckbox" style="width:150px;padding-bottom: 10px">{{row.f_project}}</label>
112
- </div>
113
- <div class="auto" v-if="row.type == 'devices'">
114
- <button type="button" name="button" class="btn btn-primary" @click='goToPhoneUpDetail()' :disabled="issee">维护</button>
115
- </div>
116
- <div class="auto" v-if="row.type == 'information'">
117
- <button type="button" name="button" class="btn btn-primary" @click='goToPhoneUpDetailPlus()' :disabled="issee">维护</button>
118
- </div>
119
- <input v-show="ischecked == '有'" type="text" class="form-control" v-model="row.f_content" v-if="!show && row.type == 'number'" onkeyup="value=value.replace(/[^\d\.]/g,'')" :readonly="issee">
120
- <img-area v-show="ischecked == '有'" :model="Detail.imgs" :sutitle="row.f_project" v-if="row.type == 'picture'" :disabled="issee"></img-area>
121
- </div>
122
- </div>
123
- </div>
124
- </div>
125
- </div>
126
- <modal :show.sync="showModal" :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="from-group">
134
- <div class="row" style="display: flex;flex-direction: column;align-items: center;">
135
- <div class="col-md-6" v-for="row in defectImgs">
136
- <img-self :src="row" style="margin: 5px" width="200" height="250"></img-self>
137
- </div>
138
- </div>
139
- </div>
140
- </div>
141
- <div slot="modal-footer" class="modal-footer">
142
- <button type="button" class="btn btn-default" @click="closeshowModal">确认</button>
143
- </div>
144
- </modal>
145
- </div>
146
- </template>
147
- <script>
148
- import Vue from 'vue'
149
- import {HttpResetClass} from "vue-client";
150
- import * as Util from '../Util'
151
-
152
-
153
- export default {
154
- title: '维修列表信息',
155
- data() {
156
- return {
157
- telphoneValid: '/^((0\\d{2,3}-\\d{7,8})|(1[3584]\\d{9}))$/',
158
- meterstyle:[],
159
- shuclass:'col-xs-6 col-sm-6 col-md-6 form-input-group mg8',
160
- labels:[],
161
- meternum:'',
162
- ischecked:'有',
163
- gasmodel:'',
164
- textstyle:'color: red',
165
- codedata:'',
166
- defectImgs: [],
167
- showModal:false
168
- }
169
- },
170
- props: {
171
- // 维修对应的用户数据收集
172
- model: {
173
- type: Object
174
- },
175
- service:{
176
- type: Object
177
- },
178
- show: {
179
- type: Boolean,
180
- default: false
181
- },
182
- repairitem:{
183
- type: Object
184
- },
185
- shutype:'heng',
186
- tabs:{
187
- type: Object
188
- },
189
- repairdetails:{
190
- type: Object
191
- },
192
- faultshow:{
193
- type: Object
194
- },
195
- issee:'',
196
- pricelists: {
197
- type: Array
198
- }
199
- },
200
- methods: {
201
- closeshowModal(){
202
- this.showModal=false
203
- },
204
- getCheckImg(defectid){
205
- if(defectid){
206
- this.defectImgs=[]
207
- let http = new HttpResetClass()
208
- http.load('POST',this.$androidUtil.getProxyUrl()+'/rs/sql/tel_singleTable_OrderBy', {data: {
209
- items: '*',
210
- tablename: 't_devices_items',
211
- condition: `id = '${defectid}'`,
212
- orderitem: 'id'
213
- }}, {resolveMsg: null, rejectMsg: null}).then((res) => {
214
- //tag)
215
- if(res.data[0].f_path){
216
- this.defectImgs.push(`${this.$androidUtil.getProxyUrl()}/rs/image/file/`+res.data[0].f_path)
217
- }
218
- if(res.data[0].f_p1_path){
219
- this.defectImgs.push(`${this.$androidUtil.getProxyUrl()}/rs/image/file/`+res.data[0].f_p1_path)
220
- }
221
- if(res.data[0].f_p2_path){
222
- this.defectImgs.push(`${this.$androidUtil.getProxyUrl()}/rs/image/file/`+res.data[0].f_p2_path)
223
- }
224
- if(res.data[0].f_p3_path){
225
- this.defectImgs.push(`${this.$androidUtil.getProxyUrl()}/rs/image/file/`+res.data[0].f_p3_path)
226
- }
227
- this.showModal=true
228
- })
229
- }
230
- },
231
- goToPhoneUpDetail(){
232
- this.$dispatch('gotoson', {
233
- _this: this.$parent.$parent,
234
- title: '设备信息变更',
235
- safe: false
236
- })
237
- this.$parent.$parent.$goto('PhoneUpDetail-tel', {f_userinfo_id: this.model.baseuserinfo.f_userinfo_id,f_source:'维修'})
238
- },
239
- goToPhoneUpDetailPlus(){
240
- this.$dispatch('gotoson', {
241
- _this: this.$parent.$parent,
242
- title: '设备信息变更',
243
- safe: false
244
- })
245
- this.$parent.$parent.$goto('PhoneUpUserinfoTel', {f_userinfo_id: this.model.baseuserinfo.f_userinfo_id,f_source:'维修'})
246
- },
247
- switchDetails(detailsType, event){
248
- if (event.srcElement.checked) {
249
- for(var i = 0;i<this.Detail.details.length;i++){
250
- if(this.Detail.details[i].f_project == detailsType){
251
- this.Detail.details[i].f_content = '有'
252
- this.ischecked = '有'
253
- return
254
- }
255
- }
256
- } else {
257
- this.Detail.imgs = []
258
- for(var i = 0;i<this.Detail.details.length;i++){
259
- if(this.Detail.details[i].f_project == detailsType){
260
- this.Detail.details[i].f_content = '无'
261
- this.ischecked = '无'
262
- }else{
263
- this.Detail.details[i].f_content = ''
264
- }
265
- }
266
- }
267
- },
268
- scan(val){
269
- this.codedata = val
270
- HostApp.__this__=this,
271
- HostApp.scanCode({callback:"javascript:HostApp.__this__.getCode();"})
272
- },
273
- getCode(){
274
- var datapa = HostApp.getCode().data;
275
- //tag
276
- //tag
277
- for(var i = 0;i<this.Detail.details.length;i++){
278
- if(this.Detail.details[i].f_project == this.codedata){
279
- //tag
280
- // this.meternum = datapa
281
- this.$set('Detail.details['+i+'].f_content',datapa)
282
- this.codedata = ''
283
- //tag
284
- return
285
- }
286
- }
287
- },
288
- getDetail(value){
289
- if (this.model && this.model.details.length > 0) {
290
- let result = this.model.details.find((row) => {
291
- return row.f_project === value
292
- })
293
- //tag
294
- //tag)
295
- return result
296
- }
297
- },
298
- getgasmodel(val){
299
- this.gasmodel = val
300
- },
301
- getOptions(val){
302
- if(val == '气表品牌'){
303
- //tag
304
- return this.$appdata.saleParams.gasbrands
305
- }
306
- if(val == '气表型号'){
307
- //tag
308
- //tag
309
- return this.$appdata.getParam(this.gasmodel)
310
- }
311
- let Reoptions = []
312
- let OptionItem = []
313
- for (let i = 0;i<this.repairdetails.length;i++) {
314
- var t = false
315
- if(this.repairdetails[i].f_type == this.repairitem.header ){
316
- for(var j =0;j<this.repairdetails[i].details.length;j++){
317
- if(this.repairdetails[i].details[j].f_project == val ){
318
- Reoptions = this.repairdetails[i].details[j].options
319
- t = true
320
- break
321
- }
322
- }
323
- }
324
- if(t){
325
- break
326
- }
327
- }
328
- for(let j = 0;j<Reoptions.length;j++){
329
- OptionItem.push({
330
- label: Reoptions[j].data,
331
- value: Reoptions[j].data
332
- })
333
- }
334
- return OptionItem
335
- },
336
- getradios(val,flag){
337
- let Reoptions = []
338
- for (let i = 0;i<this.repairdetails.length;i++) {
339
- var t = false
340
- if(this.repairdetails[i].f_type == this.repairitem.header ){
341
- for(var j =0;j<this.repairdetails[i].details.length;j++){
342
- if(this.repairdetails[i].details[j].f_project == val ){
343
- Reoptions = this.repairdetails[i].details[j].options
344
- t = true
345
- break
346
- }
347
- }
348
- }
349
- if(t){
350
- break
351
- }
352
- }
353
- for(let j = 0;j<Reoptions.length;j++){
354
- if(Reoptions[j].data == flag){
355
- for(var e = 0;e<this.Detail.details.length;e++){
356
- if(this.Detail.details[e].f_project == val){
357
- this.Detail.details[e].f_status = Reoptions[j].f_status
358
- return
359
- }
360
- }
361
- break
362
- }
363
- }
364
- },
365
- mute () {
366
- HostApp.mute()
367
- },
368
- deletedetails(){
369
- this.$showMessage('该操作会删除所填信息,是否继续!', ['confirm', 'cancel']).then((res) => {
370
- if (res === 'confirm') {
371
- for(var i = 0;i<this.tabs.length;i++){
372
- if(this.tabs[i].number == this.repairitem.number){
373
- this.tabs.splice(i, 1)
374
- this.model.servicerepair.splice(this.repairitem.number, 1)
375
- for(let t = i;t < this.tabs.length;t++ ) {
376
- this.tabs[t].number -= 1
377
- }
378
- return
379
- }
380
- }
381
- }
382
- })
383
- },
384
- adddetails(){
385
- // 下标作为序号,取值用。 增加 序号得依次增加
386
- if(this.tabs.length > 0){
387
- for(let i = this.tabs.length-1;i > 0 ;i-- ){
388
- if(this.tabs[i].header == this.repairitem.header){
389
- if(this.model.servicerepair.length > 0){
390
- for(let j = this.model.servicerepair.length -1;j > -1;j-- ){
391
- if(this.model.servicerepair[j].f_type == this.repairitem.header){
392
- this.model.servicerepair.splice(j+1, 0, Object.assign({}, JSON.parse(JSON.stringify(this.tabs[i].details))))
393
- this.tabs.splice(i+1, 0, {header: `${this.repairitem.header}`,details:this.tabs[i].details,complete:'repair-details',class:'repair-details-class',number:j+1,items:this.tabs[i].items})
394
- for(let t = i+2;t < this.tabs.length;t++ ) {
395
- this.tabs[t].number += 1
396
- }
397
- this.faultshow.number += this.faultshow.number + 1
398
- return
399
- }
400
- }
401
- }
402
- }
403
- }
404
- }
405
- },
406
- takePic(prop, title,order) {
407
-
408
- HostApp.__callback__ = this.cameraCallBack
409
- HostApp.__this__ = this
410
- //tag
411
- let fileName
412
- if(order==1 && (!this.Detail.details[prop].f_first_repairimg || this.Detail.details[prop][prop].f_first_repairimg.includes("nopic.png"))) {
413
- fileName = Util.guid() + '-' + 'details'+prop + '-' +'f_items'+prop+ '.jpg'
414
- }else if(order==2 && (!this.Detail.details[prop].f_second_repairimg || this.Detail.details[prop].f_second_repairimg.includes("nopic.png"))) {
415
- fileName = Util.guid() + '-' + 'details'+prop + '-' +'f_items'+prop+ '.jpg'
416
- }
417
- HostApp._open_a_page({type: 'boomerang',
418
- page: 'com.aofeng.hybrid.android.peripheral.CameraActivity',
419
- param: {file: fileName, requestCode: 111, callback:'javascript:HostApp.__callback__("'+ prop +'", "%s",'+order+');', watermark: title + '\t时间:'+ Util.toStandardTimeString() + '\t' + Vue.user.name}
420
- })
421
- },
422
- cameraCallBack(prop, fileName,order) {
423
- //tag
424
- if(order==2){
425
- HostApp.__this__.$set( 'Detail.details['+prop+'].f_second_repairimg', fileName)
426
- HostApp.__this__.$set( 'Detail.details['+prop+'].f_second_imgname', fileName.substring(fileName.lastIndexOf('/')+1,fileName.length))
427
- //tag
428
- //tag
429
- }else{
430
- HostApp.__this__.$set( 'Detail.details['+prop+'].f_first_repairimg', fileName)
431
- HostApp.__this__.$set( 'Detail.details['+prop+'].f_first_imgname', fileName.substring(fileName.lastIndexOf('/')+1,fileName.length))
432
- //tag
433
- //tag
434
- }
435
- HostApp.__callback__ = null
436
- HostApp.__this__ = null
437
- },
438
- delfile(prop, fileName,order) {
439
- //tag
440
- //tag)
441
- if(fileName == Vue.nopic)
442
- return
443
- else {
444
- if(order==2){
445
- HostApp.delfile(fileName)
446
- this.Detail.details[prop].f_second_repairimg = Vue.nopic
447
- }else{
448
- HostApp.delfile(fileName)
449
- this.Detail.details[prop].f_first_repairimg = Vue.nopic
450
- }
451
- }
452
- }
453
- },
454
- ready() {
455
- //tag)
456
- // 表号扫码
457
- //tag)
458
- for(let i = 0;i<this.Detail.details.length;i++){
459
- if(this.Detail.details[i].f_project.indexOf('表号') != -1){
460
- //tag
461
- this.meternum = this.Detail.details[i].f_content
462
- //tag
463
- }
464
- }
465
- // 回写 控制checkbox
466
- for(let i = 0;i<this.Detail.details.length;i++){
467
- if(this.Detail.details[i].type == 'checkbox'){
468
- if(this.Detail.details[i].f_content){
469
- this.ischecked = this.Detail.details[i].f_content
470
- return
471
- }else{
472
- this.ischecked = '无'
473
- this.Detail.details[i].f_content = '无'
474
- return
475
- }
476
- }
477
- }
478
- // 刷新气表型号
479
- for (let i = 0; i < this.Detail.details.length; i++) {
480
- if (this.Detail.details[i].f_project == '气表品牌') {
481
- //tag
482
- this.getgasmodel(this.Detail.details[i].f_content)
483
- }
484
- }
485
-
486
- // 赋予默认值
487
- for (let a = 0; a < this.repairdetails.length; a++) {
488
- for (let i = 0; i < this.repairdetails[a].details.length; i++) {
489
- let f_item_value = ''
490
- if ((this.repairdetails[a].details[i].type == 'selector' && !this.repairdetails[a].details[i].multiple) || this.repairdetails[a].details[i].type == 'radio' ){
491
- if (this.repairdetails[a].details[i].options) {
492
- for (let j = 0; j < this.repairdetails[a].details[i].options.length; j++) {
493
- if (this.repairdetails[a].details[i].options[j].isdefault) {
494
- f_item_value = this.repairdetails[a].details[i].options[j].data
495
- }
496
- }
497
- }
498
- } else if (this.repairdetails[a].details[i].type == 'string' && this.repairdetails[a].details[i].isdefault) {
499
- f_item_value = this.repairdetails[a].details[i].isdefault
500
- }
501
- for (let k = 0; k < this.Detail.details.length; k++) {
502
- if (this.Detail.details[k].f_project == this.repairdetails[a].details[i].f_project) {
503
- this.Detail.details[k].f_content = this.Detail.details[k].f_content?this.Detail.details[k].f_content:f_item_value
504
- }
505
- }
506
- }
507
- }
508
- },
509
- watch: {
510
- 'valid' () {
511
- this.savevalid.uservalid = this.$v.valid
512
- },
513
- // 'meternum'(val){
514
- // if(val == undefined || val == ''){
515
- // return
516
- // }
517
- // this.$resetpost(`${this.$androidUtil.getProxyUrl()}/rs/sql/get_meterinfo`,
518
- // {data: {
519
- // condition:`f_meternumber = '${val}'`}}, {resolveMsg: "获取成功", rejectMsg: null}).then((res) => {
520
- // if (res.data.length > 0) {
521
- // for (var i = 0; i < this.Detail.details.length; i++) {
522
- // if (this.Detail.details[i].f_project == '气表品牌') {
523
- // //tag
524
- // //tag
525
- // this.f_meter_brand = res.data[0].f_meter_brand
526
- // this.Detail.details[i].f_content = res.data[0].f_meter_brand
527
- // //tag
528
- // }
529
- // if (this.Detail.details[i].f_project == '气表型号') {
530
- // //tag
531
- // this.f_meter_style = res.data[0].f_meter_style
532
- // this.Detail.details[i].f_content = res.data[0].f_meter_style,
533
- // //tag
534
- // }
535
- // if (this.Detail.details[i].f_project == '表类型') {
536
- // //tag
537
- // this.f_meter_type = res.data[0].f_meter_type
538
- // this.Detail.details[i].f_content = res.data[0].f_meter_type
539
- // //tag
540
- // }
541
- // }
542
- // }
543
- // })
544
- // for(var i = 0;i<this.Detail.details.length;i++){
545
- // if(this.Detail.details[i].f_project.indexOf('表号') != -1){
546
- // //tag
547
- // this.Detail.details[i].f_content = val
548
- // return
549
- // }
550
- // }
551
- // },
552
- 'shutype'(val){
553
- if(val == 'shu'){
554
- this.shuclass = 'col-xs-12 col-sm-12 col-md-12 form-input-group mg8'
555
- }
556
- }
557
- },
558
- computed:{
559
- gettextstyle: function () {
560
- return function (val) {
561
- for(var e = 0;e<this.Detail.details.length;e++){
562
- if(this.Detail.details[e].f_project == val){
563
- return this.Detail.details[e].f_status
564
- }
565
- }
566
- }
567
- },
568
- Detail(){
569
- if (this.model && this.model.servicerepair.length > 0) {
570
- let result = this.model.servicerepair.find((row,index) => {
571
- return index === this.repairitem.number
572
- })
573
- return result
574
- }
575
- },
576
- candelete(){
577
- var number = 0
578
- if (this.model && this.model.servicerepair.length > 0) {
579
- for(var i = 0;i<this.model.servicerepair.length;i++){
580
- if(this.model.servicerepair[i].f_type == this.repairitem.header){
581
- number +=1
582
- if(number > 1){
583
- return true
584
- }
585
- }
586
- }
587
- return false
588
- }
589
- }
590
- }
591
-
592
- }
593
- </script>
594
- <style lang="less" scoped>
595
- .class-erro {
596
- color: #a94442;
597
- }
598
- .tel_del_lable {
599
- color: #0000ff99;
600
- text-decoration: underline;
601
- }
602
- .fivelabel{
603
- padding-left: 8px;
604
- border: none;
605
- border-left: 5px solid #A2C2EB;
606
- width:110px;
607
- text-align: left;
608
- }
609
- .spanrodio{
610
- margin-right: 10px;
611
- }
612
- </style>
613
-
1
+ <template>
2
+ <div class="select-overspread repair-bg auto" style="padding-bottom:5px;">
3
+ <div class="bq-parent" v-if="shutype == 'heng'">
4
+ <blockquote class="blockquote">
5
+ <p><span>{{repairitem.header}}</span><a @click="mute()" style="float:right" href="javascript:void(0)" class="repair-mute-class"><img src="../../assets/novoice.png" width="25px;" alt=""><span style="margin-left:10px;color: #304A66">关闭声音</span></a></p>
6
+ </blockquote>
7
+ </div>
8
+ <div class="panel panel-default auto repair-info-content">
9
+ <div class="panel-body">
10
+ <!-- 维修项内容 -->
11
+ <div class="auto repair-info-content compatible">
12
+ <div class="row auto">
13
+ <div class="{{shuclass}}" v-if="!show && Detail.f_remarks == '设备'">
14
+ <button type="button" name="button" class="btn btn-primary" @click='adddetails()' :disabled="issee">增加</button>
15
+ </div>
16
+ <div class="{{shuclass}}" v-if="!show && Detail.f_remarks == '设备' && candelete">
17
+ <button type="button" name="button" class="btn btn-primary" @click='deletedetails()' :disabled="issee">删除</button>
18
+ </div>
19
+ <div class="{{service.f_source == '安检'?shuclass1:shuclass}}" v-for="row in Detail.details">
20
+ <label :class="[row.f_project.length > 6 ? 'fivelabel' : 'lb-left text-justify', service.f_source == '安检'?'tel_del_lable':'']" @click='getCheckImg(row.f_defect_id)' :style="gettextstyle(row.f_project) == 'false'? textstyle:''" v-if="((row.type != 'checkbox') && (ischecked == '有')) || show">{{row.f_project}}</label>
21
+ <span v-show="ischecked == '有'" v-if="show" style="font-weight:bold">{{row.f_content}}</span>
22
+ <datepicker v-show="ischecked == '有'"
23
+ placeholder="请选择时间"
24
+ :value.sync="row.f_content"
25
+ v-model="row.f_content"
26
+ :format="'yyyy-MM-dd'"
27
+ v-if="!show && row.type == 'date'"
28
+ :disabled="(!(ischecked == '有')) && issee"
29
+ :readonly="true"
30
+ ></datepicker>
31
+ <input v-show="ischecked == '有'" type="text" class="form-control" v-model="row.f_content" v-if="!show && row.type == 'string' && row.f_project.indexOf('表号') == -1" :disabled="(!(ischecked == '有')) || issee" :readonly="issee">
32
+ <input v-show="ischecked == '有'" type="text" class="form-control" v-model="row.f_content" v-if="!show && row.type == 'string' && row.f_project.indexOf('表号') != -1 " :disabled="(!(ischecked == '有')) || issee" :readonly="issee" >
33
+ <button v-show="ischecked == '有'" type="button" name="button" class="btn btn-primary" @click="scan(row.f_project)" v-if="!show && row.f_project.indexOf('表号') != -1 ">扫码</button>
34
+ <v-select v-show="ischecked == '有'"
35
+ :value.sync="row.f_content"
36
+ :options='getOptions(row.f_project)'
37
+ placeholder='请选择'
38
+ :disabled="(!(ischecked == '有')) || issee" close-on-select
39
+ :value-single="true" v-if="!show && row.type == 'selector' && row.f_project != '气表品牌' && row.f_project != '气价名称'"
40
+ ></v-select>
41
+
42
+ <div style="clear: both" v-if="service.f_source == '安检' && row.f_content=='已处理'">
43
+ <div class="form-group col-sm-12" style="display: flex;flex-wrap: wrap">
44
+ <div class="auto" style="margin:1px">
45
+ <div class="panel">
46
+ <div class="panel-body panel-self" style="background-color: #F8F8F8;width: 150px;height: 150px;position: relative">
47
+ <div class="col-xs-6" style="height: 160px;width:160px;overflow: scroll;top: 1px">
48
+ <div class="col-sm-4" v-show="row.f_first_repairimg">
49
+ <img-self :src="row.f_first_repairimg" width="140" height="140"></img-self>
50
+ </div>
51
+ <div class="col-sm-4" v-show="!row.f_first_repairimg" @click="takePic($index, row.f_project,1)">
52
+ <img src="../../assets/tackpic.png" :alt="点击拍摄照片" width="140" height="140"></img>
53
+ </div>
54
+ <img v-show="row.f_first_repairimg" src="../../assets/remove.png" :class="style__" @click="delfile($index, row.f_first_repairimg,1)" style="width: 40px;height: 40px;position: absolute;left:110px;top:110px"></img>
55
+ </div>
56
+ </div>
57
+ </div>
58
+ </div>
59
+ <!-- <div class="auto" style="margin:1px">-->
60
+ <!-- <div class="panel">-->
61
+ <!-- <div class="panel-body panel-self" style="background-color: #F8F8F8;width: 150px;height: 150px;position: relative">-->
62
+ <!-- <div class="col-xs-6" style="height: 160px;width:160px;overflow: scroll;top: 1px">-->
63
+ <!-- <div class="col-sm-4" v-show="row.f_second_repairimg">-->
64
+ <!-- <img-self :src="row.f_second_repairimg" :alt="row.f_project" width="140" height="140"></img-self>-->
65
+ <!-- </div>-->
66
+ <!-- <div class="col-sm-4" v-show="!row.f_second_repairimg" @click="takePic($index, row.f_project,2)">-->
67
+ <!-- <img src="../../../assets/tackpic.png" :alt="点击拍摄照片" width="140" height="140"></img>-->
68
+ <!-- </div>-->
69
+ <!-- <img v-show="row.f_second_repairimg" src="../../../assets/remove.png" :class="style__" @click="delfile($index, row.f_second_repairimg,2)" style="width: 40px;height: 40px;position: absolute;left:110px;top:110px"></img>-->
70
+ <!-- </div>-->
71
+ <!-- </div>-->
72
+ <!-- </div>-->
73
+ <!-- </div>-->
74
+ </div>
75
+ </div>
76
+ <div v-show="row.f_defect_remark" class="{{shuclass}}" >
77
+ <div style="margin-left: 5px;font-weight: bolder;">
78
+ 备&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;注: {{row.f_defect_remark}}
79
+ </div>
80
+ </div>
81
+ <v-select
82
+ v-show="ischecked == '有'"
83
+ :value.sync="row.f_content"
84
+ :options='getOptions(row.f_project)'
85
+ @change="getgasmodel" placeholder='请选择'
86
+ :disabled="(!(ischecked == '有')) || issee" close-on-select
87
+ :value-single="true" v-if="!show && row.type == 'selector' && row.f_project == '气表品牌'"
88
+ ></v-select>
89
+ <v-select
90
+ v-show="ischecked == '有'"
91
+ :value.sync="row.f_content"
92
+ :options='pricelists'
93
+ @change="getgasmodel" placeholder='请选择'
94
+ :disabled="(!(ischecked == '有')) || issee" close-on-select
95
+ :value-single="true" v-if="!show && row.type == 'selector' && row.f_project == '气价名称'"
96
+ ></v-select>
97
+ <div v-show="ischecked == '有'" class="form-control" v-if="!show && row.type == 'radio'" style="border-color: white;align-self: center" >
98
+ <div class="col-xs-6 col-sm-6 col-md-6">
99
+ <input type="radio" id="one" value="是" v-model="row.f_content" :disabled="(!(ischecked == '有')) || issee" @click="getradios(row.f_project,'是')" >
100
+ <span for="one">是</span>
101
+ </div>
102
+ <div class="col-xs-6 col-sm-6 col-md-6">
103
+ <input type="radio" id="two" value="否" v-model="row.f_content" :disabled="(!(ischecked == '有')) || issee" @click="getradios(row.f_project,'否')">
104
+ <span for="two">否</span>
105
+ </div>
106
+ </div>
107
+ <div class="auto" v-if="!show && row.type == 'checkbox' ">
108
+ <input class="magic-checkbox" type="checkbox" id="shebeicheckbox"
109
+ :checked="row.f_content == '有'"
110
+ @click="switchDetails(row.f_project, $event)" :disabled="issee"/>
111
+ <label for="shebeicheckbox" style="width:150px;padding-bottom: 10px">{{row.f_project}}</label>
112
+ </div>
113
+ <div class="auto" v-if="row.type == 'devices'">
114
+ <button type="button" name="button" class="btn btn-primary" @click='goToPhoneUpDetail()' :disabled="issee">维护</button>
115
+ </div>
116
+ <div class="auto" v-if="row.type == 'information'">
117
+ <button type="button" name="button" class="btn btn-primary" @click='goToPhoneUpDetailPlus()' :disabled="issee">维护</button>
118
+ </div>
119
+ <input v-show="ischecked == '有'" type="text" class="form-control" v-model="row.f_content" v-if="!show && row.type == 'number'" onkeyup="value=value.replace(/[^\d\.]/g,'')" :readonly="issee">
120
+ <img-area v-show="ischecked == '有'" :model="Detail.imgs" :sutitle="row.f_project" v-if="row.type == 'picture'" :disabled="issee"></img-area>
121
+ </div>
122
+ </div>
123
+ </div>
124
+ </div>
125
+ </div>
126
+ <modal :show.sync="showModal" :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="from-group">
134
+ <div class="row" style="display: flex;flex-direction: column;align-items: center;">
135
+ <div class="col-md-6" v-for="row in defectImgs">
136
+ <img-self :src="row" style="margin: 5px" width="200" height="250"></img-self>
137
+ </div>
138
+ </div>
139
+ </div>
140
+ </div>
141
+ <div slot="modal-footer" class="modal-footer">
142
+ <button type="button" class="btn btn-default" @click="closeshowModal">确认</button>
143
+ </div>
144
+ </modal>
145
+ </div>
146
+ </template>
147
+ <script>
148
+ import Vue from 'vue'
149
+ import {HttpResetClass} from "vue-client";
150
+ import * as Util from '../Util'
151
+
152
+
153
+ export default {
154
+ title: '维修列表信息',
155
+ data() {
156
+ return {
157
+ telphoneValid: '/^((0\\d{2,3}-\\d{7,8})|(1[3584]\\d{9}))$/',
158
+ meterstyle:[],
159
+ shuclass:'col-xs-6 col-sm-6 col-md-6 form-input-group mg8',
160
+ labels:[],
161
+ meternum:'',
162
+ ischecked:'有',
163
+ gasmodel:'',
164
+ textstyle:'color: red',
165
+ codedata:'',
166
+ defectImgs: [],
167
+ showModal:false
168
+ }
169
+ },
170
+ props: {
171
+ // 维修对应的用户数据收集
172
+ model: {
173
+ type: Object
174
+ },
175
+ service:{
176
+ type: Object
177
+ },
178
+ show: {
179
+ type: Boolean,
180
+ default: false
181
+ },
182
+ repairitem:{
183
+ type: Object
184
+ },
185
+ shutype:'heng',
186
+ tabs:{
187
+ type: Object
188
+ },
189
+ repairdetails:{
190
+ type: Object
191
+ },
192
+ faultshow:{
193
+ type: Object
194
+ },
195
+ issee:'',
196
+ pricelists: {
197
+ type: Array
198
+ }
199
+ },
200
+ methods: {
201
+ closeshowModal(){
202
+ this.showModal=false
203
+ },
204
+ getCheckImg(defectid){
205
+ if(defectid){
206
+ this.defectImgs=[]
207
+ let http = new HttpResetClass()
208
+ http.load('POST',this.$androidUtil.getProxyUrl()+'/rs/sql/tel_singleTable_OrderBy', {data: {
209
+ items: '*',
210
+ tablename: 't_devices_items',
211
+ condition: `id = '${defectid}'`,
212
+ orderitem: 'id'
213
+ }}, {resolveMsg: null, rejectMsg: null}).then((res) => {
214
+ //tag)
215
+ if(res.data[0].f_path){
216
+ this.defectImgs.push(`${this.$androidUtil.getProxyUrl()}/rs/image/file/`+res.data[0].f_path)
217
+ }
218
+ if(res.data[0].f_p1_path){
219
+ this.defectImgs.push(`${this.$androidUtil.getProxyUrl()}/rs/image/file/`+res.data[0].f_p1_path)
220
+ }
221
+ if(res.data[0].f_p2_path){
222
+ this.defectImgs.push(`${this.$androidUtil.getProxyUrl()}/rs/image/file/`+res.data[0].f_p2_path)
223
+ }
224
+ if(res.data[0].f_p3_path){
225
+ this.defectImgs.push(`${this.$androidUtil.getProxyUrl()}/rs/image/file/`+res.data[0].f_p3_path)
226
+ }
227
+ this.showModal=true
228
+ })
229
+ }
230
+ },
231
+ goToPhoneUpDetail(){
232
+ this.$dispatch('gotoson', {
233
+ _this: this.$parent.$parent,
234
+ title: '设备信息变更',
235
+ safe: false
236
+ })
237
+ this.$parent.$parent.$goto('PhoneUpDetail-tel', {f_userinfo_id: this.model.baseuserinfo.f_userinfo_id,f_source:'维修'})
238
+ },
239
+ goToPhoneUpDetailPlus(){
240
+ this.$dispatch('gotoson', {
241
+ _this: this.$parent.$parent,
242
+ title: '设备信息变更',
243
+ safe: false
244
+ })
245
+ this.$parent.$parent.$goto('PhoneUpUserinfoTel', {f_userinfo_id: this.model.baseuserinfo.f_userinfo_id,f_source:'维修'})
246
+ },
247
+ switchDetails(detailsType, event){
248
+ if (event.srcElement.checked) {
249
+ for(var i = 0;i<this.Detail.details.length;i++){
250
+ if(this.Detail.details[i].f_project == detailsType){
251
+ this.Detail.details[i].f_content = '有'
252
+ this.ischecked = '有'
253
+ return
254
+ }
255
+ }
256
+ } else {
257
+ this.Detail.imgs = []
258
+ for(var i = 0;i<this.Detail.details.length;i++){
259
+ if(this.Detail.details[i].f_project == detailsType){
260
+ this.Detail.details[i].f_content = '无'
261
+ this.ischecked = '无'
262
+ }else{
263
+ this.Detail.details[i].f_content = ''
264
+ }
265
+ }
266
+ }
267
+ },
268
+ scan(val){
269
+ this.codedata = val
270
+ HostApp.__this__=this,
271
+ HostApp.scanCode({callback:"javascript:HostApp.__this__.getCode();"})
272
+ },
273
+ getCode(){
274
+ var datapa = HostApp.getCode().data;
275
+ //tag
276
+ //tag
277
+ for(var i = 0;i<this.Detail.details.length;i++){
278
+ if(this.Detail.details[i].f_project == this.codedata){
279
+ //tag
280
+ // this.meternum = datapa
281
+ this.$set('Detail.details['+i+'].f_content',datapa)
282
+ this.codedata = ''
283
+ //tag
284
+ return
285
+ }
286
+ }
287
+ },
288
+ getDetail(value){
289
+ if (this.model && this.model.details.length > 0) {
290
+ let result = this.model.details.find((row) => {
291
+ return row.f_project === value
292
+ })
293
+ //tag
294
+ //tag)
295
+ return result
296
+ }
297
+ },
298
+ getgasmodel(val){
299
+ this.gasmodel = val
300
+ },
301
+ getOptions(val){
302
+ if(val == '气表品牌'){
303
+ //tag
304
+ return this.$appdata.saleParams.gasbrands
305
+ }
306
+ if(val == '气表型号'){
307
+ //tag
308
+ //tag
309
+ return this.$appdata.getParam(this.gasmodel)
310
+ }
311
+ let Reoptions = []
312
+ let OptionItem = []
313
+ for (let i = 0;i<this.repairdetails.length;i++) {
314
+ var t = false
315
+ if(this.repairdetails[i].f_type == this.repairitem.header ){
316
+ for(var j =0;j<this.repairdetails[i].details.length;j++){
317
+ if(this.repairdetails[i].details[j].f_project == val ){
318
+ Reoptions = this.repairdetails[i].details[j].options
319
+ t = true
320
+ break
321
+ }
322
+ }
323
+ }
324
+ if(t){
325
+ break
326
+ }
327
+ }
328
+ for(let j = 0;j<Reoptions.length;j++){
329
+ OptionItem.push({
330
+ label: Reoptions[j].data,
331
+ value: Reoptions[j].data
332
+ })
333
+ }
334
+ return OptionItem
335
+ },
336
+ getradios(val,flag){
337
+ let Reoptions = []
338
+ for (let i = 0;i<this.repairdetails.length;i++) {
339
+ var t = false
340
+ if(this.repairdetails[i].f_type == this.repairitem.header ){
341
+ for(var j =0;j<this.repairdetails[i].details.length;j++){
342
+ if(this.repairdetails[i].details[j].f_project == val ){
343
+ Reoptions = this.repairdetails[i].details[j].options
344
+ t = true
345
+ break
346
+ }
347
+ }
348
+ }
349
+ if(t){
350
+ break
351
+ }
352
+ }
353
+ for(let j = 0;j<Reoptions.length;j++){
354
+ if(Reoptions[j].data == flag){
355
+ for(var e = 0;e<this.Detail.details.length;e++){
356
+ if(this.Detail.details[e].f_project == val){
357
+ this.Detail.details[e].f_status = Reoptions[j].f_status
358
+ return
359
+ }
360
+ }
361
+ break
362
+ }
363
+ }
364
+ },
365
+ mute () {
366
+ HostApp.mute()
367
+ },
368
+ deletedetails(){
369
+ this.$showMessage('该操作会删除所填信息,是否继续!', ['confirm', 'cancel']).then((res) => {
370
+ if (res === 'confirm') {
371
+ for(var i = 0;i<this.tabs.length;i++){
372
+ if(this.tabs[i].number == this.repairitem.number){
373
+ this.tabs.splice(i, 1)
374
+ this.model.servicerepair.splice(this.repairitem.number, 1)
375
+ for(let t = i;t < this.tabs.length;t++ ) {
376
+ this.tabs[t].number -= 1
377
+ }
378
+ return
379
+ }
380
+ }
381
+ }
382
+ })
383
+ },
384
+ adddetails(){
385
+ // 下标作为序号,取值用。 增加 序号得依次增加
386
+ if(this.tabs.length > 0){
387
+ for(let i = this.tabs.length-1;i > 0 ;i-- ){
388
+ if(this.tabs[i].header == this.repairitem.header){
389
+ if(this.model.servicerepair.length > 0){
390
+ for(let j = this.model.servicerepair.length -1;j > -1;j-- ){
391
+ if(this.model.servicerepair[j].f_type == this.repairitem.header){
392
+ this.model.servicerepair.splice(j+1, 0, Object.assign({}, JSON.parse(JSON.stringify(this.tabs[i].details))))
393
+ this.tabs.splice(i+1, 0, {header: `${this.repairitem.header}`,details:this.tabs[i].details,complete:'repair-details',class:'repair-details-class',number:j+1,items:this.tabs[i].items})
394
+ for(let t = i+2;t < this.tabs.length;t++ ) {
395
+ this.tabs[t].number += 1
396
+ }
397
+ this.faultshow.number += this.faultshow.number + 1
398
+ return
399
+ }
400
+ }
401
+ }
402
+ }
403
+ }
404
+ }
405
+ },
406
+ takePic(prop, title,order) {
407
+ const obj = HostApp.getGpsDetailAddress()
408
+
409
+ HostApp.__callback__ = this.cameraCallBack
410
+ HostApp.__this__ = this
411
+ //tag
412
+ let fileName
413
+ if(order==1 && (!this.Detail.details[prop].f_first_repairimg || this.Detail.details[prop][prop].f_first_repairimg.includes("nopic.png"))) {
414
+ fileName = Util.guid() + '-' + 'details'+prop + '-' +'f_items'+prop+ '.jpg'
415
+ }else if(order==2 && (!this.Detail.details[prop].f_second_repairimg || this.Detail.details[prop].f_second_repairimg.includes("nopic.png"))) {
416
+ fileName = Util.guid() + '-' + 'details'+prop + '-' +'f_items'+prop+ '.jpg'
417
+ }
418
+ HostApp._open_a_page({type: 'boomerang',
419
+ page: 'com.aofeng.hybrid.android.peripheral.CameraActivity',
420
+ param: {file: fileName, requestCode: 111, callback:'javascript:HostApp.__callback__("'+ prop +'", "%s",'+order+');', watermark: title + '\t时间:'+ Util.toStandardTimeString() + '\t' + Vue.user.name + '\t经度:' + obj.longitude+ '\t纬度:' + obj.latitude}
421
+ })
422
+ },
423
+ cameraCallBack(prop, fileName,order) {
424
+ //tag
425
+ if(order==2){
426
+ HostApp.__this__.$set( 'Detail.details['+prop+'].f_second_repairimg', fileName)
427
+ HostApp.__this__.$set( 'Detail.details['+prop+'].f_second_imgname', fileName.substring(fileName.lastIndexOf('/')+1,fileName.length))
428
+ //tag
429
+ //tag
430
+ }else{
431
+ HostApp.__this__.$set( 'Detail.details['+prop+'].f_first_repairimg', fileName)
432
+ HostApp.__this__.$set( 'Detail.details['+prop+'].f_first_imgname', fileName.substring(fileName.lastIndexOf('/')+1,fileName.length))
433
+ //tag
434
+ //tag
435
+ }
436
+ HostApp.__callback__ = null
437
+ HostApp.__this__ = null
438
+ },
439
+ delfile(prop, fileName,order) {
440
+ //tag
441
+ //tag)
442
+ if(fileName == Vue.nopic)
443
+ return
444
+ else {
445
+ if(order==2){
446
+ HostApp.delfile(fileName)
447
+ this.Detail.details[prop].f_second_repairimg = Vue.nopic
448
+ }else{
449
+ HostApp.delfile(fileName)
450
+ this.Detail.details[prop].f_first_repairimg = Vue.nopic
451
+ }
452
+ }
453
+ }
454
+ },
455
+ ready() {
456
+ //tag)
457
+ // 表号扫码
458
+ //tag)
459
+ for(let i = 0;i<this.Detail.details.length;i++){
460
+ if(this.Detail.details[i].f_project.indexOf('表号') != -1){
461
+ //tag
462
+ this.meternum = this.Detail.details[i].f_content
463
+ //tag
464
+ }
465
+ }
466
+ // 回写 控制checkbox
467
+ for(let i = 0;i<this.Detail.details.length;i++){
468
+ if(this.Detail.details[i].type == 'checkbox'){
469
+ if(this.Detail.details[i].f_content){
470
+ this.ischecked = this.Detail.details[i].f_content
471
+ return
472
+ }else{
473
+ this.ischecked = '无'
474
+ this.Detail.details[i].f_content = '无'
475
+ return
476
+ }
477
+ }
478
+ }
479
+ // 刷新气表型号
480
+ for (let i = 0; i < this.Detail.details.length; i++) {
481
+ if (this.Detail.details[i].f_project == '气表品牌') {
482
+ //tag
483
+ this.getgasmodel(this.Detail.details[i].f_content)
484
+ }
485
+ }
486
+
487
+ // 赋予默认值
488
+ for (let a = 0; a < this.repairdetails.length; a++) {
489
+ for (let i = 0; i < this.repairdetails[a].details.length; i++) {
490
+ let f_item_value = ''
491
+ if ((this.repairdetails[a].details[i].type == 'selector' && !this.repairdetails[a].details[i].multiple) || this.repairdetails[a].details[i].type == 'radio' ){
492
+ if (this.repairdetails[a].details[i].options) {
493
+ for (let j = 0; j < this.repairdetails[a].details[i].options.length; j++) {
494
+ if (this.repairdetails[a].details[i].options[j].isdefault) {
495
+ f_item_value = this.repairdetails[a].details[i].options[j].data
496
+ }
497
+ }
498
+ }
499
+ } else if (this.repairdetails[a].details[i].type == 'string' && this.repairdetails[a].details[i].isdefault) {
500
+ f_item_value = this.repairdetails[a].details[i].isdefault
501
+ }
502
+ for (let k = 0; k < this.Detail.details.length; k++) {
503
+ if (this.Detail.details[k].f_project == this.repairdetails[a].details[i].f_project) {
504
+ this.Detail.details[k].f_content = this.Detail.details[k].f_content?this.Detail.details[k].f_content:f_item_value
505
+ }
506
+ }
507
+ }
508
+ }
509
+ },
510
+ watch: {
511
+ 'valid' () {
512
+ this.savevalid.uservalid = this.$v.valid
513
+ },
514
+ // 'meternum'(val){
515
+ // if(val == undefined || val == ''){
516
+ // return
517
+ // }
518
+ // this.$resetpost(`${this.$androidUtil.getProxyUrl()}/rs/sql/get_meterinfo`,
519
+ // {data: {
520
+ // condition:`f_meternumber = '${val}'`}}, {resolveMsg: "获取成功", rejectMsg: null}).then((res) => {
521
+ // if (res.data.length > 0) {
522
+ // for (var i = 0; i < this.Detail.details.length; i++) {
523
+ // if (this.Detail.details[i].f_project == '气表品牌') {
524
+ // //tag
525
+ // //tag
526
+ // this.f_meter_brand = res.data[0].f_meter_brand
527
+ // this.Detail.details[i].f_content = res.data[0].f_meter_brand
528
+ // //tag
529
+ // }
530
+ // if (this.Detail.details[i].f_project == '气表型号') {
531
+ // //tag
532
+ // this.f_meter_style = res.data[0].f_meter_style
533
+ // this.Detail.details[i].f_content = res.data[0].f_meter_style,
534
+ // //tag
535
+ // }
536
+ // if (this.Detail.details[i].f_project == '表类型') {
537
+ // //tag
538
+ // this.f_meter_type = res.data[0].f_meter_type
539
+ // this.Detail.details[i].f_content = res.data[0].f_meter_type
540
+ // //tag
541
+ // }
542
+ // }
543
+ // }
544
+ // })
545
+ // for(var i = 0;i<this.Detail.details.length;i++){
546
+ // if(this.Detail.details[i].f_project.indexOf('表号') != -1){
547
+ // //tag
548
+ // this.Detail.details[i].f_content = val
549
+ // return
550
+ // }
551
+ // }
552
+ // },
553
+ 'shutype'(val){
554
+ if(val == 'shu'){
555
+ this.shuclass = 'col-xs-12 col-sm-12 col-md-12 form-input-group mg8'
556
+ }
557
+ }
558
+ },
559
+ computed:{
560
+ gettextstyle: function () {
561
+ return function (val) {
562
+ for(var e = 0;e<this.Detail.details.length;e++){
563
+ if(this.Detail.details[e].f_project == val){
564
+ return this.Detail.details[e].f_status
565
+ }
566
+ }
567
+ }
568
+ },
569
+ Detail(){
570
+ if (this.model && this.model.servicerepair.length > 0) {
571
+ let result = this.model.servicerepair.find((row,index) => {
572
+ return index === this.repairitem.number
573
+ })
574
+ return result
575
+ }
576
+ },
577
+ candelete(){
578
+ var number = 0
579
+ if (this.model && this.model.servicerepair.length > 0) {
580
+ for(var i = 0;i<this.model.servicerepair.length;i++){
581
+ if(this.model.servicerepair[i].f_type == this.repairitem.header){
582
+ number +=1
583
+ if(number > 1){
584
+ return true
585
+ }
586
+ }
587
+ }
588
+ return false
589
+ }
590
+ }
591
+ }
592
+
593
+ }
594
+ </script>
595
+ <style lang="less" scoped>
596
+ .class-erro {
597
+ color: #a94442;
598
+ }
599
+ .tel_del_lable {
600
+ color: #0000ff99;
601
+ text-decoration: underline;
602
+ }
603
+ .fivelabel{
604
+ padding-left: 8px;
605
+ border: none;
606
+ border-left: 5px solid #A2C2EB;
607
+ width:110px;
608
+ text-align: left;
609
+ }
610
+ .spanrodio{
611
+ margin-right: 10px;
612
+ }
613
+ </style>
614
+