safecheck-client 3.0.32-3 → 3.0.32-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.
- package/package.json +3 -3
- package/src/App.vue +31 -31
- package/src/assets//345/215/225/345/205/203/345/217/267.png +0 -0
- package/src/assets//345/234/260/345/235/200.png +0 -0
- package/src/assets//345/247/223/345/220/215.png +0 -0
- package/src/assets//345/260/217/345/214/272.png +0 -0
- package/src/assets//345/260/217/345/214/272/350/223/235/350/211/262.png +0 -0
- package/src/assets//345/272/225/346/225/260.png +0 -0
- package/src/assets//346/210/267/347/274/226/345/217/267.png +0 -0
- package/src/assets//346/245/274/345/217/267.png +0 -0
- package/src/assets//346/245/274/345/261/202.png +0 -0
- package/src/assets//350/241/250/347/261/273/345/236/213.png +0 -0
- package/src/assets//351/227/250/347/211/214/345/217/267.png +0 -0
- package/src/components/android/PhoneUpUserinfo.vue +6 -0
- package/src/components/planmanage/checkPlanList.vue +3 -3
- package/src/components/rongcheng/AspiratedDevices.vue +999 -999
- package/src/components/rongcheng/DefectPaper.vue +4 -1
- package/src/components/rongcheng/SafecheckDevices.vue +1031 -1031
- package/src/components/rongcheng/SafecheckOrderV.vue +2524 -2524
- package/src/components/rongcheng/SafecheckUserInfo.vue +1005 -1004
- package/src/filiale/dexin/android/CasualSave.vue +1050 -0
- package/src/filiale/dexin/android/SafecheckDevices.vue +4 -4
- package/src/filiale/dexin/android/SafecheckOrderV.vue +2851 -2799
- package/src/filiale/dexin/android/WebMeterOpen.vue +377 -0
- package/src/filiale/dexin/android/WebMeterOpenEdit.vue +225 -0
- package/src/filiale/dexin/android.js +4 -1
- package/src/filiale/fugou/pc/AddToCheckBook.vue +160 -0
- package/src/filiale/fugou/pc/CheckBook.vue +301 -0
- package/src/filiale/fugou/pc/CheckBookAll.vue +67 -0
- package/src/filiale/fugou/pc/CheckBookArea.vue +146 -0
- package/src/filiale/fugou/pc/CheckBookCompany.vue +144 -0
- package/src/filiale/fugou/pc/CheckBookDetails.vue +161 -0
- package/src/filiale/fugou/pc/CheckBookEntry.vue +66 -0
- package/src/filiale/fugou/pc/CheckBookList.vue +366 -0
- package/src/filiale/fugou/pc/CheckBookSearchArea.vue +560 -0
- package/src/filiale/fugou/pc/CheckBookSearchUnit.vue +229 -0
- package/src/filiale/fugou/pc/CheckBookSearchUser.vue +651 -0
- package/src/filiale/fugou/pc/CheckBookSearchUserList.vue +674 -0
- package/src/filiale/fugou/pc/CheckBookUser.vue +101 -0
- package/src/filiale/fugou/pc/PaperDefectMain.vue +22 -1
- package/src/filiale/fugou/pc/PlanManage.vue +1019 -0
- package/src/filiale/fugou/pc/checkPlanList.vue +371 -0
- package/src/filiale/fugou/pc/checkUserList.vue +7 -107
- package/src/filiale/fugou/pc.js +60 -5
- package/src/filiale/qingjian/android/SafecheckOrderV.vue +1 -0
- package/src/filiale/qingjian/android/SafecheckUserInfo.vue +4 -0
- package/src/filiale/rongchuang/pc/NewCheckpaper.vue +111 -48
- package/src/filiale/shexian/pc/PaperList.vue +822 -822
- package/src/filiale/shexian/pc.js +16 -16
- package/src/filiale/wensu/android/CurrentCreate.vue +1 -1
- package/src/filiale/wensu/pc/CheckSearchUser.vue +58 -53
- package/src/filiale/wensu/pc/DefectPaperNew.vue +8 -8
- package/src/filiale/wensu/pc/RoleSelector.vue +2 -2
- package/src/filiale/wensu/pc/checkUserList.vue +5 -1
- package/src/filiale/yangchunboneng/android/SafecheckOrderV.vue +3 -3
- package/src/filiale/yongzhou/pc/safeStatistics.vue +1 -0
- package/src/filiale/yongzhou/pc/safeStatisticsYear.vue +1 -0
- package/src/filiale/zhongyi/pc/DefectListNew.vue +1 -1
- package/src/main.js +33 -33
- package/static/stretch_bottom.png +0 -0
- package/static/stretch_top.png +0 -0
@@ -1,999 +1,999 @@
|
|
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="#" 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" style="padding: 0">
|
10
|
-
<!-- 安检项内容 -->
|
11
|
-
<div class="auto repair-info-content compatible" style="padding: 0">
|
12
|
-
<div class="row auto" style="padding: 0">
|
13
|
-
<div v-show="false" class="{{shuclass}}" v-if=" device.device != '燃气表'">
|
14
|
-
<button type="button" name="button" class="btn btn-primary" @click='adddetails()' :disabled="issee">增加</button>
|
15
|
-
</div>
|
16
|
-
<!--<div class="{{shuclass}}" v-if="device.device != '燃气表' && candelete">-->
|
17
|
-
<!--<button type="button" name="button" class="btn btn-primary" @click='deletedetails()' :disabled="issee">删除</button>-->
|
18
|
-
<!--</div>-->
|
19
|
-
<div class="shuclass1" v-show="row.isshow" v-for="row in f_items" style="padding: 4px; border:1px solid #D4D4D4;border-bottom: 0" >
|
20
|
-
<label v-if="row.type != 'radio' && row.type != 'text' && row.type != 'picture' && row.type != 'checkbox'" v-show="row.isshow" class="fivelabel">{{row.f_item_name}}<br/>{{row.remark}}</label>
|
21
|
-
<label v-if="row.type == 'radio'" v-show="row.isshow" class="radiolabel">{{row.f_item_name}}<br/>{{row.remark}}</label>
|
22
|
-
<label v-if="row.type == 'text' || row.type == 'picture' || row.type == 'checkbox'" v-show="row.isshow" class="textlabel">{{row.f_item_name}}<br/>{{row.remark}}</label>
|
23
|
-
<!--<span v-if="show" style="font-weight:bold">{{row.f_content}}</span>-->
|
24
|
-
<!--<datepicker placeholder="请选择时间"-->
|
25
|
-
<!--:value.sync="row.f_content"-->
|
26
|
-
<!--v-model="row.f_content"-->
|
27
|
-
<!--:format="'yyyy-MM-dd'"-->
|
28
|
-
<!--v-if="!show && row.type == 'date'"-->
|
29
|
-
<!--:readonly="true"-->
|
30
|
-
<!--></datepicker>-->
|
31
|
-
<div style="float: left;width:60%" class="form-group col-sm-12" v-if="row.type == 'date'" v-show="row.isshow">
|
32
|
-
<datepicker id="f_making_date" :placeholder= row.f_item_name
|
33
|
-
:value.sync="row.f_item_value"
|
34
|
-
v-if="row.type == 'date'"
|
35
|
-
v-show="row.isshow"
|
36
|
-
:disabled-days-of-Week="[]"
|
37
|
-
:format=row.format
|
38
|
-
:show-reset-button="reset" readonly="readonly">
|
39
|
-
</datepicker>
|
40
|
-
</div>
|
41
|
-
<div style="clear: both" v-if="row.type == 'picture'" class="form-group col-sm-12" >
|
42
|
-
<div class="auto" >
|
43
|
-
<div class="panel">
|
44
|
-
<div class="panel-body panel-self" style="background-color: #F8F8F8;width: 160px;height: 160px;position: relative">
|
45
|
-
<div class="row" style="height: 160px;width:160px;overflow: scroll;top: 1px">
|
46
|
-
<div class="col-sm-4" v-show="row.f_path">
|
47
|
-
<img-self :src="row.f_path" :alt="row.f_item_name" width="140" height="140"></img-self>
|
48
|
-
</div>
|
49
|
-
<div class="col-sm-4" v-show="!row.f_path" @click="takePic($index, row.f_item_name)">
|
50
|
-
<img src="../../assets/tackpic.png" :alt="点击拍摄照片" width="140" height="140"></img>
|
51
|
-
</div>
|
52
|
-
<img v-show="row.f_path" src="../../assets/remove.png" :class="style__" @click="delfile($index, row.f_path)" v-if="role!='androidview'" style="width: 40px;height: 40px;position: absolute;left:110px;top:110px"></img>
|
53
|
-
</div>
|
54
|
-
</div>
|
55
|
-
</div>
|
56
|
-
</div>
|
57
|
-
</div>
|
58
|
-
<div style="float: left;width:60%" class="form-group" v-if="row.type == 'string'" v-show="row.isshow">
|
59
|
-
<input type="text" class="form-control" maxlength="100" v-model="row.f_item_value" :readonly="role == 'androidview' || row.readonly">
|
60
|
-
</div>
|
61
|
-
<div style="float: left;width:60%" class="form-group" v-if="!show && row.type == 'number'" v-show="row.isshow">
|
62
|
-
<input type="text" class="form-control" maxlength="100" v-model="row.f_item_value" onkeyup="value=value.replace(/[^\d\.]/g,'')" :readonly="row.readonly">
|
63
|
-
</div>
|
64
|
-
<!--<input type="text" class="form-control" v-model="row.f_content" v-if="!show && row.type == 'string' && row.f_project != '表号'" :disabled="(!(ischecked == '有')) || issee" :readonly="issee">-->
|
65
|
-
<!--<input type="text" class="form-control" v-model="meternum" v-if="!show && row.type == 'string' && row.f_project == '表号' " :disabled="(!(ischecked == '有')) || issee" :readonly="issee" >-->
|
66
|
-
<!--<button type="button" name="button" class="btn btn-primary" @click="scan" v-if="!show && row.f_project == '表号' ">扫码</button>-->
|
67
|
-
<input-select v-if="row.type == 'inputSelector'"
|
68
|
-
v-show="row.isshow"
|
69
|
-
:value.sync="row.selected"
|
70
|
-
v-model="row.selected"
|
71
|
-
:readonly="false"
|
72
|
-
:options="row.options"
|
73
|
-
@change="changse"
|
74
|
-
@click="transelation($index)"></input-select>
|
75
|
-
<v-select style="float: left" :value.sync="row.selected"
|
76
|
-
v-model="row.selected"
|
77
|
-
v-if="row.type == 'selector'"
|
78
|
-
v-show="row.isshow"
|
79
|
-
placeholder='请选择'
|
80
|
-
:options="row.options"
|
81
|
-
:disabled="role == 'androidview' || row.readonly"
|
82
|
-
@change="changse"
|
83
|
-
@click="transelation($index)"
|
84
|
-
:multiple="row.multiple"
|
85
|
-
:close-on-select="!row.multiple" clear-button></v-select>
|
86
|
-
<div style="float: left;width: 30%" class="form-group" v-if="!show && row.type == 'radio'">
|
87
|
-
<div class="col-xs-6 col-sm-6 col-md-6" v-for="item in row.options">
|
88
|
-
<input type="radio" :name="row.f_item_name" @click="disSelect($parent.$index,item.value)" :value="item.value" :disabled="(!(ischecked == '有')) || issee" v-model="row.f_item_value" >
|
89
|
-
<span>{{item.label}}</span>
|
90
|
-
</div>
|
91
|
-
</div>
|
92
|
-
<div v-if="!show && row.type == 'checkbox'" class="col-xs-12 col-sm-12 col-md-12" style="white-space: nowrap" >
|
93
|
-
<div style="float: left" v-for="item in row.options">
|
94
|
-
<input type="checkbox" :name="row.f_item_name" :value="item.value" :disabled="(!(ischecked == '有')) || issee" v-model="row.f_item_value">
|
95
|
-
<span>{{item.label}}</span>
|
96
|
-
</div>
|
97
|
-
</div>
|
98
|
-
<div style="clear: both">
|
99
|
-
<label v-if="row.f_item_value.indexOf('其他') >-1" class="fivelabel">其他</label>
|
100
|
-
<div style="float: left;width:60%" class="form-group" v-if="row.f_item_value.indexOf('其他') >-1">
|
101
|
-
<input type="text" class="form-control" maxlength="100" v-model="row.f_else" :readonly="role == 'androidview' || row.readonly">
|
102
|
-
</div>
|
103
|
-
</div>
|
104
|
-
<div style="clear: both">
|
105
|
-
<div class="form-group" v-if="(row.type == 'selector' || row.type == 'radio' || row.type =='checkbox') && (row.f_path != '' || row.f_is_defect != '') && (livedispose == 'true' || livedispose == true) " >
|
106
|
-
<label class="fivelabel">现场已处理</label>
|
107
|
-
<v-select :value="row.f_live_dispose"
|
108
|
-
:value-single="true"
|
109
|
-
:options="lives"
|
110
|
-
:disabled="role == 'androidview'"
|
111
|
-
@change="changlive"
|
112
|
-
@click="transelation($index)"
|
113
|
-
close-on-select clear-button></v-select>
|
114
|
-
</div>
|
115
|
-
<div class="form-group col-sm-12" v-if="(row.type == 'selector' || row.type == 'radio' || row.type =='checkbox') && (row.f_path != '' || row.f_is_defect != '')" style="margin-top: 40px">
|
116
|
-
<div class="auto" >
|
117
|
-
<div class="panel">
|
118
|
-
<div class="panel-body panel-self" style="background-color: #F8F8F8;width: 160px;height: 160px;position: relative">
|
119
|
-
<div class="row" style="height: 160px;width:160px;overflow: scroll;top: 1px">
|
120
|
-
<div class="col-sm-4" v-show="row.f_path">
|
121
|
-
<img-self :src="row.f_path" :alt="row.f_item_name" width="140" height="140"></img-self>
|
122
|
-
</div>
|
123
|
-
<div class="col-sm-4" v-show="!row.f_path" @click="takePic($index, row.f_item_name)">
|
124
|
-
<img src="../../assets/tackpic.png" :alt="点击拍摄照片" width="140" height="140"></img>
|
125
|
-
</div>
|
126
|
-
<img v-show="row.f_path" src="../../assets/remove.png" :class="style__" @click="delfile($index, row.f_path)" v-if="role!='androidview'" style="width: 40px;height: 40px;position: absolute;left:110px;top:110px"></img>
|
127
|
-
</div>
|
128
|
-
</div>
|
129
|
-
</div>
|
130
|
-
</div>
|
131
|
-
</div>
|
132
|
-
<div class="auto" v-if="(row.type == 'selector' || row.type == 'radio' || row.type =='checkbox') && row.tooltip != undefined && row.tooltip != '' ">
|
133
|
-
<div class="panel">
|
134
|
-
<div class="panel-body panel-self" style="background-color: #F8F8F8;width: 100%;height: auto">
|
135
|
-
{{row.tooltip}}
|
136
|
-
</div>
|
137
|
-
</div>
|
138
|
-
</div>
|
139
|
-
</div>
|
140
|
-
<!--<v-select :value.sync="row.f_content" :options='getOptions(row.f_project)' placeholder='请选择' :disabled="(!(ischecked == '有')) || issee" close-on-select :value-single="true" v-if="!show && row.type == 'selector' && row.f_project != '气表品牌'"-->
|
141
|
-
<!--></v-select>-->
|
142
|
-
<!--<v-select :value.sync="row.f_content" :options='getOptions(row.f_project)' @change="getgasmodel" placeholder='请选择' :disabled="(!(ischecked == '有')) || issee" close-on-select :value-single="true" v-if="!show && row.type == 'selector' && row.f_project == '气表品牌'"-->
|
143
|
-
<!--></v-select>-->
|
144
|
-
<!-- <div class="auto" v-if="!show && row.type == 'checkbox' ">-->
|
145
|
-
<!-- <input class="magic-checkbox" type="checkbox" id="shebeicheckbox"-->
|
146
|
-
<!-- :checked="row.f_content == '有'"-->
|
147
|
-
<!-- @click="switchDetails(row.f_project, $event)" :disabled="issee"/>-->
|
148
|
-
<!-- <label for="shebeicheckbox" style="width:150px;padding-bottom: 10px">{{row.f_project}}</label>-->
|
149
|
-
<!-- </div>-->
|
150
|
-
<!--<img-area :model="Detail.imgs" :sutitle="row.f_project" v-if="row.type == 'picture'" :disabled="issee"></img-area>-->
|
151
|
-
</div>
|
152
|
-
<!--<div style="width: 100%;padding: 2px" v-if="device.device == '燃气表' && item.f_plan_meters[0].f_meter_type=='机表' && paper.f_is_meterreadding=='未抄表'">
|
153
|
-
<button type="button" name="button" style="margin-left: 35%" class="btn btn-primary" @click="readmeter">
|
154
|
-
机表抄表
|
155
|
-
</button>
|
156
|
-
</div>-->
|
157
|
-
</div>
|
158
|
-
</div>
|
159
|
-
<div style="border-top: 1px solid #D4D4D4"></div>
|
160
|
-
</div>
|
161
|
-
</div>
|
162
|
-
</div>
|
163
|
-
</template>
|
164
|
-
<script>
|
165
|
-
import Vue from 'vue'
|
166
|
-
import * as Util from '../Util'
|
167
|
-
|
168
|
-
export default {
|
169
|
-
title: '维修列表信息',
|
170
|
-
data() {
|
171
|
-
return {
|
172
|
-
// telphoneValid: '/^((0\\d{2,3}-\\d{7,8})|(1[3584]\\d{9}))$/',
|
173
|
-
// meterstyle:[],
|
174
|
-
shuclass:'col-xs-12 col-sm-12 col-md-12 form-input-group mg8',
|
175
|
-
shuclass1:'col-xs-12 col-sm-12 col-md-12 mg8',
|
176
|
-
// labels:[],
|
177
|
-
meternum:'',
|
178
|
-
ischecked:'有',
|
179
|
-
gasmodel:'',
|
180
|
-
textstyle:'color: red',
|
181
|
-
paper: this.$parent.$parent.data,
|
182
|
-
f_items:[],
|
183
|
-
page:{},
|
184
|
-
selectindex:null,
|
185
|
-
lives:[{label: '是', value: '是'},{label: '否', value: '否'}],
|
186
|
-
f_live_dispose:'否',
|
187
|
-
// 初始表底
|
188
|
-
f_initial_base: {},
|
189
|
-
// 气量异常差值 计算公式 => 气量异常差值 = 累计购气量 - (已用气量 - 初始表底) - 剩余气量
|
190
|
-
f_gas_aberrant_number: {},
|
191
|
-
// 金额异常差值 计算公式 => 金额异常差值 = 累计购金额 - 已用金额 - 剩余金额
|
192
|
-
f_fee_aberrant_number: {},
|
193
|
-
// 累购气量
|
194
|
-
f_total_gas: {},
|
195
|
-
// 累购金额
|
196
|
-
f_total_fee: {},
|
197
|
-
// 已用气量
|
198
|
-
f_table_base: {},
|
199
|
-
// 已用金额
|
200
|
-
f_fee_base: {},
|
201
|
-
// 剩余气量
|
202
|
-
f_gas_balance: {},
|
203
|
-
// 剩余金额
|
204
|
-
f_fee_balance: {},
|
205
|
-
//本期表读数
|
206
|
-
f_issue_reading:{},
|
207
|
-
//上期表读数
|
208
|
-
f_prior_reading:{},
|
209
|
-
// 安装日期
|
210
|
-
f_install_date:{},
|
211
|
-
// 使用年限
|
212
|
-
f_use_limit:{},
|
213
|
-
// 到期日期
|
214
|
-
f_scrap_date:{},
|
215
|
-
// 气量异常差值允许误差
|
216
|
-
gasDeviation: (
|
217
|
-
function (_this) {
|
218
|
-
let deviation = _this.$appdata.getSingleValue('气量异常差值允许误差')
|
219
|
-
if (deviation && !isNaN(deviation)) {
|
220
|
-
return deviation
|
221
|
-
} else {
|
222
|
-
return 0
|
223
|
-
}
|
224
|
-
}
|
225
|
-
)(this),
|
226
|
-
// 金额异常差值允许误差
|
227
|
-
feeDeviation: (
|
228
|
-
function (_this) {
|
229
|
-
let deviation = _this.$appdata.getSingleValue('金额异常差值允许误差')
|
230
|
-
if (deviation && !isNaN(deviation)) {
|
231
|
-
return deviation
|
232
|
-
} else {
|
233
|
-
return 0
|
234
|
-
}
|
235
|
-
}
|
236
|
-
)(this),
|
237
|
-
showElse:false, //控制其他选项是否显示
|
238
|
-
}
|
239
|
-
},
|
240
|
-
props: ['config','device','idx','operation','item','role'],
|
241
|
-
// props: {
|
242
|
-
// // 维修对应的用户数据收集
|
243
|
-
// model: {
|
244
|
-
// type: Object
|
245
|
-
// },
|
246
|
-
// service:{
|
247
|
-
// type: Object
|
248
|
-
// },
|
249
|
-
// show: {
|
250
|
-
// type: Boolean,
|
251
|
-
// default: false
|
252
|
-
// },
|
253
|
-
// repairitem:{
|
254
|
-
// type: Object
|
255
|
-
// },
|
256
|
-
// shutype:'heng',
|
257
|
-
// tabs:{
|
258
|
-
// type: Object
|
259
|
-
// },
|
260
|
-
// repairdetails:{
|
261
|
-
// type: Object
|
262
|
-
// },
|
263
|
-
// faultshow:{
|
264
|
-
// type: Object
|
265
|
-
// },
|
266
|
-
// issee:''
|
267
|
-
// },
|
268
|
-
methods: {
|
269
|
-
changse(val){
|
270
|
-
if(val == undefined){
|
271
|
-
return
|
272
|
-
}
|
273
|
-
if(this.selectindex != null) {
|
274
|
-
if(this.f_items[this.selectindex].type == 'selector'){
|
275
|
-
this.f_items[this.selectindex].f_item_value = val
|
276
|
-
}else if(this.f_items[this.selectindex].type == 'inputSelector'){
|
277
|
-
this.f_items[this.selectindex].f_item_value = val.target.value
|
278
|
-
}
|
279
|
-
}
|
280
|
-
},
|
281
|
-
changlive(val){
|
282
|
-
if(val == undefined){
|
283
|
-
return
|
284
|
-
}
|
285
|
-
if(this.selectindex != null) {
|
286
|
-
this.f_items[this.selectindex].f_live_dispose = val
|
287
|
-
}
|
288
|
-
},
|
289
|
-
switchDetails(detailsType, event){
|
290
|
-
if (event.srcElement.checked) {
|
291
|
-
for(var i = 0;i<this.Detail.details.length;i++){
|
292
|
-
if(this.Detail.details[i].f_project == detailsType){
|
293
|
-
this.Detail.details[i].f_content = '有'
|
294
|
-
this.ischecked = '有'
|
295
|
-
return
|
296
|
-
}
|
297
|
-
}
|
298
|
-
} else {
|
299
|
-
this.Detail.imgs = []
|
300
|
-
for(var i = 0;i<this.Detail.details.length;i++){
|
301
|
-
if(this.Detail.details[i].f_project == detailsType){
|
302
|
-
this.Detail.details[i].f_content = '无'
|
303
|
-
this.ischecked = '无'
|
304
|
-
}else{
|
305
|
-
this.Detail.details[i].f_content = ''
|
306
|
-
}
|
307
|
-
}
|
308
|
-
}
|
309
|
-
},
|
310
|
-
getgasmodel(val){
|
311
|
-
this.gasmodel = val
|
312
|
-
},
|
313
|
-
getradios(val,flag){
|
314
|
-
let Reoptions = []
|
315
|
-
for (let i = 0;i<this.repairdetails.length;i++) {
|
316
|
-
var t = false
|
317
|
-
if(this.repairdetails[i].f_type == this.repairitem.header ){
|
318
|
-
for(var j =0;j<this.repairdetails[i].details.length;j++){
|
319
|
-
if(this.repairdetails[i].details[j].f_project == val ){
|
320
|
-
Reoptions = this.repairdetails[i].details[j].options
|
321
|
-
t = true
|
322
|
-
break
|
323
|
-
}
|
324
|
-
}
|
325
|
-
}
|
326
|
-
if(t){
|
327
|
-
break
|
328
|
-
}
|
329
|
-
}
|
330
|
-
for(let j = 0;j<Reoptions.length;j++){
|
331
|
-
if(Reoptions[j].data == flag){
|
332
|
-
for(var e = 0;e<this.Detail.details.length;e++){
|
333
|
-
if(this.Detail.details[e].f_project == val){
|
334
|
-
this.Detail.details[e].f_status = Reoptions[j].f_status
|
335
|
-
return
|
336
|
-
}
|
337
|
-
}
|
338
|
-
break
|
339
|
-
}
|
340
|
-
}
|
341
|
-
},
|
342
|
-
deletedetails(){
|
343
|
-
this.$showMessage('该操作会删除所填信息,是否继续!', ['confirm', 'cancel']).then((res) => {
|
344
|
-
if (res === 'confirm') {
|
345
|
-
for(var i = 0;i<this.tabs.length;i++){
|
346
|
-
if(this.tabs[i].number == this.repairitem.number){
|
347
|
-
this.tabs.splice(i, 1)
|
348
|
-
this.model.servicerepair.splice(this.repairitem.number, 1)
|
349
|
-
for(let t = i;t < this.tabs.length;t++ ) {
|
350
|
-
this.tabs[t].number -= 1
|
351
|
-
}
|
352
|
-
return
|
353
|
-
}
|
354
|
-
}
|
355
|
-
}
|
356
|
-
})
|
357
|
-
},
|
358
|
-
takePic(prop, title) {
|
359
|
-
if (this.role == 'androidview') {
|
360
|
-
return
|
361
|
-
}
|
362
|
-
HostApp.__callback__ = this.cameraCallBack
|
363
|
-
HostApp.__this__ = this
|
364
|
-
//tag
|
365
|
-
let fileName
|
366
|
-
if(!this.f_items[prop].f_path || this.f_items[prop].f_path.includes("nopic.png")) {
|
367
|
-
fileName = Util.guid() + '-' + 'device'+this.device.n + '-' + this.idx + '-'+'f_items'+prop+ '.jpg'
|
368
|
-
} else {
|
369
|
-
fileName = Util.getFileName(this.f_items[prop].f_path)
|
370
|
-
}
|
371
|
-
HostApp._open_a_page({type: 'boomerang',
|
372
|
-
page: 'com.aofeng.hybrid.android.peripheral.CameraActivity',
|
373
|
-
param: {file: fileName, requestCode: 111, callback:'javascript:HostApp.__callback__("'+ prop +'", "%s");', watermark: title + '\t时间:'+ Util.toStandardTimeString() + '\t' + Vue.user.name}
|
374
|
-
})
|
375
|
-
},
|
376
|
-
cameraCallBack(prop, fileName) {
|
377
|
-
HostApp.__this__.$set( 'f_items['+prop+'].f_path', fileName + '?' + Math.random())
|
378
|
-
//tag
|
379
|
-
HostApp.__callback__ = null
|
380
|
-
HostApp.__this__ = null
|
381
|
-
},
|
382
|
-
delfile(prop, fileName) {
|
383
|
-
//tag
|
384
|
-
//tag)
|
385
|
-
if(fileName == Vue.nopic)
|
386
|
-
return
|
387
|
-
else {
|
388
|
-
HostApp.delfile(fileName)
|
389
|
-
this.f_items[prop].f_path = Vue.nopic
|
390
|
-
}
|
391
|
-
},
|
392
|
-
adddetails(){
|
393
|
-
// 下标作为序号,取值用。 增加 序号得依次增加
|
394
|
-
if(this.tabs.length > 0){
|
395
|
-
for(let i = this.tabs.length-1;i > 0 ;i-- ){
|
396
|
-
if(this.tabs[i].header == this.repairitem.header){
|
397
|
-
if(this.model.servicerepair.length > 0){
|
398
|
-
for(let j = this.model.servicerepair.length -1;j > -1;j-- ){
|
399
|
-
if(this.model.servicerepair[j].f_type == this.repairitem.header){
|
400
|
-
this.model.servicerepair.splice(j+1, 0, Object.assign({}, JSON.parse(JSON.stringify(this.tabs[i].details))))
|
401
|
-
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})
|
402
|
-
for(let t = i+2;t < this.tabs.length;t++ ) {
|
403
|
-
this.tabs[t].number += 1
|
404
|
-
}
|
405
|
-
this.faultshow.number += this.faultshow.number + 1
|
406
|
-
return
|
407
|
-
}
|
408
|
-
}
|
409
|
-
}
|
410
|
-
}
|
411
|
-
}
|
412
|
-
}
|
413
|
-
},
|
414
|
-
transelation(val){
|
415
|
-
this.selectindex = val
|
416
|
-
},
|
417
|
-
towatch(){
|
418
|
-
for(let n in this.f_items){
|
419
|
-
if(this.f_items[n].type == 'selector' || this.f_items[n].type == 'inputSelector'){
|
420
|
-
// 监听下拉框,如果有隐患,需要拍照
|
421
|
-
this.$watch('f_items['+n+'].selected',function(val) {
|
422
|
-
// 下拉框值
|
423
|
-
//tag)
|
424
|
-
// 下拉框所属设备
|
425
|
-
//tag
|
426
|
-
// 下拉框所属项
|
427
|
-
//tag
|
428
|
-
let shImage = false
|
429
|
-
if(val.indexOf('其他') == -1){
|
430
|
-
this.f_items[n].f_else = ''
|
431
|
-
}
|
432
|
-
// if(this.config[this.device.device].items[item].type == 'selector'){
|
433
|
-
// this.f_items[n].f_item_value = val
|
434
|
-
// }else if(this.config[this.device.device].items[item].type == 'inputSelector'){
|
435
|
-
// this.f_items[n].f_item_value = val[0]
|
436
|
-
// }
|
437
|
-
// 在配置中查找该项
|
438
|
-
for (let item in this.config[this.device.device].items) {
|
439
|
-
let type = this.config[this.device.device].items[item].type
|
440
|
-
let multiple = this.config[this.device.device].items[item].multiple
|
441
|
-
let options = this.config[this.device.device].items[item].options
|
442
|
-
if ((this.config[this.device.device].items[item].type == 'selector' || this.config[this.device.device].items[item].type == 'inputSelector') && item == this.f_items[n].f_item_name) {
|
443
|
-
for (let i in options) {
|
444
|
-
let value
|
445
|
-
if(this.config[this.device.device].items[item].type == 'selector' && this.config[this.device.device].items[item].multiple == false){
|
446
|
-
value = val[0]
|
447
|
-
}else if (this.config[this.device.device].items[item].type == 'inputSelector'){
|
448
|
-
value = val
|
449
|
-
}
|
450
|
-
//tag)
|
451
|
-
// 如果未选择,清空图片、隐患信息等
|
452
|
-
if((type == 'selector' && val.length == 0) || (type == 'inputSelector' && val == '')){
|
453
|
-
this.f_items[n].f_path = ''
|
454
|
-
this.f_items[n].f_is_defect = ''
|
455
|
-
this.f_items[n].f_defect_level = ''
|
456
|
-
this.f_items[n].f_live_dispose = ''
|
457
|
-
this.f_items[n].tooltip = ''
|
458
|
-
}
|
459
|
-
if((type == 'selector' && multiple == false && options[i].data == val[0]) || (type == 'inputSelector' && options[i].data == val) || (type == 'selector' && multiple == true && val.indexOf(options[i].data) > -1)){
|
460
|
-
// 找到选中的项了
|
461
|
-
//tag
|
462
|
-
if(options[i].isdefect == true ){
|
463
|
-
shImage = true
|
464
|
-
}
|
465
|
-
if(options[i].isdefect == false || this.f_items[n].f_item_value == ''){
|
466
|
-
shImage = false
|
467
|
-
}
|
468
|
-
//tag
|
469
|
-
if(shImage){
|
470
|
-
this.f_items[n].f_is_defect =true
|
471
|
-
this.f_items[n].f_defect_level = options[i].level
|
472
|
-
this.f_items[n].f_path = Vue.nopic
|
473
|
-
this.f_items[n].f_live_dispose = '否'
|
474
|
-
this.f_items[n].tooltip= options[i].tooltip
|
475
|
-
}else{
|
476
|
-
this.f_items[n].f_path = ''
|
477
|
-
this.f_items[n].f_is_defect = ''
|
478
|
-
this.f_items[n].f_defect_level = ''
|
479
|
-
this.f_items[n].f_live_dispose = ''
|
480
|
-
this.f_items[n].tooltip = ''
|
481
|
-
}
|
482
|
-
}
|
483
|
-
}
|
484
|
-
}
|
485
|
-
}
|
486
|
-
}
|
487
|
-
)
|
488
|
-
// this.$watch('other',function(val){
|
489
|
-
// //tag
|
490
|
-
// if(this.selectindex != null) {
|
491
|
-
// let index = this.f_items[this.selectindex].f_item_value.indexOf('其他')
|
492
|
-
// if(index > -1){
|
493
|
-
// this.f_items[this.selectindex].f_item_value.splice(index,1,this.other)
|
494
|
-
// }
|
495
|
-
// }
|
496
|
-
//
|
497
|
-
// })
|
498
|
-
}else if(this.f_items[n].type == 'radio') {
|
499
|
-
// 监听单选框,如果有隐患,需要拍照
|
500
|
-
this.$watch('f_items[' + n + '].f_item_value', function (val) {
|
501
|
-
//tag)
|
502
|
-
let options = this.f_items[n].options
|
503
|
-
//tag)
|
504
|
-
for (let i = 0; i < options.length; i++) {
|
505
|
-
//tag)
|
506
|
-
// 找到选中的项了
|
507
|
-
if (options[i].value == val) {
|
508
|
-
// 如果有隐患,拍图片
|
509
|
-
if (options[i].isdefect) {
|
510
|
-
this.f_items[n].f_is_defect = true
|
511
|
-
this.f_items[n].f_defect_level = options[i].level
|
512
|
-
this.f_items[n].f_path = Vue.nopic
|
513
|
-
this.f_items[n].f_live_dispose = '否'
|
514
|
-
this.f_items[n].tooltip = options[i].tooltip
|
515
|
-
//tag)
|
516
|
-
return
|
517
|
-
}
|
518
|
-
}
|
519
|
-
}
|
520
|
-
this.f_items[n].f_path = ''
|
521
|
-
this.f_items[n].f_is_defect = ''
|
522
|
-
this.f_items[n].f_defect_level = ''
|
523
|
-
this.f_items[n].f_live_dispose = ''
|
524
|
-
this.f_items[n].tooltip = ''
|
525
|
-
})
|
526
|
-
}else if(this.f_items[n].type == 'checkbox') {
|
527
|
-
// 监听单选框,如果有隐患,需要拍照
|
528
|
-
this.$watch('f_items[' + n + '].f_item_value', function (val) {
|
529
|
-
//tag)
|
530
|
-
// 如果是手动赋值,不执行下面逻辑
|
531
|
-
if (this.f_items[n].isReSet) {
|
532
|
-
this.f_items[n].isReSet = false
|
533
|
-
return
|
534
|
-
}
|
535
|
-
let options = this.f_items[n].options
|
536
|
-
//tag)
|
537
|
-
// 取出选中项中有隐患的详细信息
|
538
|
-
let selected = options.filter(item => { return val.indexOf(item.value) != -1 && item.isdefect })
|
539
|
-
|
540
|
-
if(selected.length > 0){
|
541
|
-
// 防止赋值无限调用
|
542
|
-
this.f_items[n].isReSet = true
|
543
|
-
let selectList = selected.map(item => {return item.value})
|
544
|
-
// 如果选中的是非隐患项,取消选中isdefect为true的
|
545
|
-
if (selectList.indexOf(val[val.length - 1]) == -1) {
|
546
|
-
this.f_items[n].f_item_value = val.filter(item => {return selectList.indexOf(item) == -1})
|
547
|
-
this.f_items[n].f_path = ''
|
548
|
-
this.f_items[n].f_is_defect = ''
|
549
|
-
this.f_items[n].f_defect_level = ''
|
550
|
-
this.f_items[n].f_live_dispose = ''
|
551
|
-
this.f_items[n].tooltip = ''
|
552
|
-
return
|
553
|
-
}
|
554
|
-
// 如果选中的是隐患项,取消选中isdefect为false的
|
555
|
-
this.f_items[n].f_item_value = selectList
|
556
|
-
// 如果第一次选择隐患项,初始化
|
557
|
-
if (!this.f_items[n].f_is_defect) {
|
558
|
-
this.f_items[n].f_is_defect = true
|
559
|
-
this.f_items[n].f_defect_level = selected[0].level
|
560
|
-
this.f_items[n].f_path = Vue.nopic
|
561
|
-
this.f_items[n].f_live_dispose = '否'
|
562
|
-
this.f_items[n].tooltip = selected[0].tooltip
|
563
|
-
}
|
564
|
-
//tag)
|
565
|
-
return
|
566
|
-
}
|
567
|
-
this.f_items[n].f_path = ''
|
568
|
-
this.f_items[n].f_is_defect = ''
|
569
|
-
this.f_items[n].f_defect_level = ''
|
570
|
-
this.f_items[n].f_live_dispose = ''
|
571
|
-
this.f_items[n].tooltip = ''
|
572
|
-
})
|
573
|
-
}
|
574
|
-
}
|
575
|
-
//tag)
|
576
|
-
},
|
577
|
-
//计算已用气量/金额
|
578
|
-
getTableBaseNumber() {
|
579
|
-
//tag
|
580
|
-
if(!this.f_items[this.f_issue_reading.index].f_item_value || parseFloat(this.f_items[this.f_prior_reading.index].f_item_value).toString() == "NaN"){
|
581
|
-
return
|
582
|
-
}
|
583
|
-
//tag
|
584
|
-
//判断是金额表还是气量表
|
585
|
-
if(this.item.f_plan_meters[0].f_meter_type=='机表' || this.item.f_plan_meters[0].f_collection_type=='按气量'){
|
586
|
-
//tag
|
587
|
-
//tag
|
588
|
-
//tag
|
589
|
-
//tag
|
590
|
-
// 先清空
|
591
|
-
this.f_items[this.f_table_base.index].f_item_value = null
|
592
|
-
//已用气量=本期表读数-上期表读数
|
593
|
-
this.f_items[this.f_table_base.index].f_item_value= this.f_items[this.f_issue_reading.index].f_item_value-this.f_items[this.f_prior_reading.index].f_item_value
|
594
|
-
if (isNaN(this.f_items[this.f_table_base.index].f_item_value)) {
|
595
|
-
this.f_items[this.f_table_base.index].f_item_value = null
|
596
|
-
}
|
597
|
-
}else{
|
598
|
-
//tag
|
599
|
-
// 先清空
|
600
|
-
this.f_items[this.f_fee_base.index].f_item_value = null
|
601
|
-
//已用金额=本期表读数-上期表读数
|
602
|
-
this.f_items[this.f_fee_base.index].f_item_value= this.f_items[this.f_issue_reading.index].f_item_value-this.f_items[this.f_prior_reading.index].f_item_value
|
603
|
-
if (isNaN(this.f_items[this.f_fee_base.index].f_item_value)) {
|
604
|
-
this.f_items[this.f_fee_base.index].f_item_value = null
|
605
|
-
}
|
606
|
-
}
|
607
|
-
|
608
|
-
},
|
609
|
-
//计算剩余气量和金额
|
610
|
-
getGasBalanceNumber() {
|
611
|
-
//tag
|
612
|
-
if(this.item.f_plan_meters[0].f_meter_type=='机表' || this.item.f_plan_meters[0].f_collection_type=='按气量'){//按气量
|
613
|
-
|
614
|
-
if(!this.f_items[this.f_issue_reading.index].f_item_value || parseFloat(this.f_items[this.f_total_gas.index].f_item_value).toString() == "NaN"){
|
615
|
-
return
|
616
|
-
}
|
617
|
-
//剩余气量 = 累购-本期表读数
|
618
|
-
this.f_items[this.f_gas_balance.index].f_item_value= this.f_items[this.f_total_gas.index].f_item_value-this.f_items[this.f_issue_reading.index].f_item_value
|
619
|
-
if (isNaN(this.f_items[this.f_gas_balance.index].f_item_value)) {
|
620
|
-
this.f_items[this.f_gas_balance.index].f_item_value = null
|
621
|
-
}
|
622
|
-
}else{//按金额parseFloat(this.f_items[this.f_total_gas.index].f_item_value).toString() == "NaN"
|
623
|
-
if (!this.f_items[this.f_issue_reading.index].f_item_value || parseFloat(this.f_items[this.f_total_fee.index].f_item_value).toString() == "NaN") {
|
624
|
-
return
|
625
|
-
}
|
626
|
-
//剩余金额 = 累购-本期表读数
|
627
|
-
this.f_items[this.f_fee_balance.index].f_item_value=this.f_items[this.f_total_fee.index].f_item_value-this.f_items[this.f_issue_reading.index].f_item_value
|
628
|
-
if (isNaN(this.f_items[this.f_fee_balance.index].f_item_value)) {
|
629
|
-
this.f_items[this.f_fee_balance.index].f_item_value = null
|
630
|
-
}
|
631
|
-
}
|
632
|
-
|
633
|
-
},
|
634
|
-
// 计算到期日期
|
635
|
-
getscrapNumber() {
|
636
|
-
//tag
|
637
|
-
if(!this.f_items[this.f_install_date.index].f_item_value || !this.f_items[this.f_use_limit.index].f_item_value ){
|
638
|
-
return
|
639
|
-
}
|
640
|
-
let data = new Date(this.f_items[this.f_install_date.index].f_item_value)
|
641
|
-
data.setFullYear(data.getFullYear() + parseInt(this.f_items[this.f_use_limit.index].f_item_value))
|
642
|
-
this.f_items[this.f_scrap_date.index].f_item_value = data.toISOString().split('T')[0];
|
643
|
-
},
|
644
|
-
readmeter(){
|
645
|
-
if(!this.f_items[this.f_issue_reading.index].f_item_value && parseFloat(this.f_items[this.f_issue_reading.index].f_item_value).toString() == "NaN"){
|
646
|
-
this.$showMessage("请输入本期表读数!")
|
647
|
-
return
|
648
|
-
}
|
649
|
-
if(this.paper.f_is_meterreadding=='已抄表'){
|
650
|
-
this.$showMessage("本次安检已抄表,无法再次抄表!")
|
651
|
-
return
|
652
|
-
}
|
653
|
-
let param={
|
654
|
-
f_userinfoid:this.item.f_userinfoid,
|
655
|
-
f_checker:this.paper.f_checker_name,
|
656
|
-
f_checkerid:this.paper.f_checker_id,
|
657
|
-
f_tablebase:this.f_items[this.f_issue_reading.index].f_item_value
|
658
|
-
}
|
659
|
-
//tag)
|
660
|
-
HostApp.__this__ = this
|
661
|
-
HostApp.logicWithHint({
|
662
|
-
// logic别名,key必须为logic
|
663
|
-
'logic': 'rc_ReadMeterToJiBiao',
|
664
|
-
// 回调执行方法名,key必须为callback
|
665
|
-
'callback': 'javascript:HostApp.__this__.readmeterCallBack()',
|
666
|
-
// logic执行需要的业务参数
|
667
|
-
'data': {param:param},
|
668
|
-
// 固定key,代表是否将logic执行结果作为参数传入回调方法,1代表true,0代表false,
|
669
|
-
// 执行回调方法传入key为backresult
|
670
|
-
// 如需额外拼接参数,写在logic返回值的params,例如xxlogic返回:{"params": "success"}
|
671
|
-
'backresult': 1
|
672
|
-
})
|
673
|
-
},
|
674
|
-
readmeterCallBack(jo){
|
675
|
-
//tag)
|
676
|
-
if(jo.state == 'ok'){
|
677
|
-
let res = JSON.parse(jo.result)
|
678
|
-
//tag)
|
679
|
-
//tag)
|
680
|
-
if(res.code==200){
|
681
|
-
if(res.data=='已欠费'){
|
682
|
-
this.$showMessage(`抄表成功,该用户已欠费,欠费金额: ¥${res.oughtfee}`)
|
683
|
-
}
|
684
|
-
if(res.data=='未欠费'){
|
685
|
-
this.$showMessage(`抄表成功!该用户账户剩余金额: ¥${res.balance}`)
|
686
|
-
}
|
687
|
-
this.paper.f_is_meterreadding='已抄表'
|
688
|
-
}else{
|
689
|
-
this.$showMessage("抄表失败!")
|
690
|
-
}
|
691
|
-
}else{
|
692
|
-
this.$showMessage("服务器内部错误,抄表失败!")
|
693
|
-
}
|
694
|
-
},
|
695
|
-
disSelect(index, itemValue) {
|
696
|
-
//tag)
|
697
|
-
//tag)
|
698
|
-
if (this.f_items[index].f_item_value == itemValue) {
|
699
|
-
this.$set(`f_items[${index}].f_item_value`, '')
|
700
|
-
}
|
701
|
-
}
|
702
|
-
},
|
703
|
-
ready() {
|
704
|
-
//tag
|
705
|
-
//tag
|
706
|
-
if(Vue.config.safecheck != undefined){
|
707
|
-
if(Vue.config.safecheck.ApproveConfig != undefined){
|
708
|
-
if(Vue.config.safecheck.ApproveConfig.livedispose != undefined) {
|
709
|
-
this.livedispose = Vue.config.safecheck.ApproveConfig.livedispose
|
710
|
-
}
|
711
|
-
}
|
712
|
-
}
|
713
|
-
//tag
|
714
|
-
//tag)
|
715
|
-
//tag)
|
716
|
-
//tag)
|
717
|
-
//创建页面所需数据
|
718
|
-
this.$set('piece', this.paper['device'+this.device.n][this.idx])
|
719
|
-
//tag)
|
720
|
-
//tag)
|
721
|
-
let n = 0
|
722
|
-
for (let item in this.config[this.device.device].items) {
|
723
|
-
let index = this.config[this.device.device].items[item].index-1
|
724
|
-
this.$set('page.options' + index, [])
|
725
|
-
//tag)
|
726
|
-
//tag)
|
727
|
-
//tag)
|
728
|
-
// 先根据配置组接页面
|
729
|
-
let f_item_value
|
730
|
-
if(this.config[this.device.device].items[item].type == 'selector' || this.config[this.device.device].items[item].type == 'checkbox'){
|
731
|
-
f_item_value = []
|
732
|
-
// 判断选项的默认值
|
733
|
-
for (let defitem in this.config[this.device.device].items[item].options) {
|
734
|
-
let defopt = this.config[this.device.device].items[item].options[defitem]
|
735
|
-
if (defopt.isdefault) {
|
736
|
-
//tag
|
737
|
-
f_item_value[0] = defopt.data
|
738
|
-
}
|
739
|
-
}
|
740
|
-
// if(this.config[this.device.device].items[item].data){
|
741
|
-
// f_item_value.push(this.config[this.device.device].items[item].data)
|
742
|
-
// }
|
743
|
-
}else{
|
744
|
-
f_item_value = this.config[this.device.device].items[item].data ? this.config[this.device.device].items[item].data : ''
|
745
|
-
}
|
746
|
-
//tag)
|
747
|
-
let it = {
|
748
|
-
type: this.config[this.device.device].items[item].type,
|
749
|
-
f_item_name: item,
|
750
|
-
checkmust: this.config[this.device.device].items[item].checkmust,
|
751
|
-
f_item_value: f_item_value,
|
752
|
-
f_is_defect: '',
|
753
|
-
multiple:this.config[this.device.device].items[item].multiple == true?this.config[this.device.device].items[item].multiple:false,
|
754
|
-
isshow:this.config[this.device.device].items[item].isshow == false?this.config[this.device.device].items[item].isshow:true,
|
755
|
-
readonly: this.config[this.device.device].items[item].readonly == true?true:false,
|
756
|
-
remark: this.config[this.device.device].items[item].remark ? this.config[this.device.device].items[item].remark : '',
|
757
|
-
format: this.config[this.device.device].items[item].format ? this.config[this.device.device].items[item].format : 'yyyy-MM-dd 00:00:00',
|
758
|
-
f_path: '',
|
759
|
-
tooltip:'',
|
760
|
-
f_live_dispose:'',
|
761
|
-
f_else:''
|
762
|
-
}
|
763
|
-
//tag)
|
764
|
-
//tag)
|
765
|
-
this.$set('f_items['+index+']',it)
|
766
|
-
if (this.config[this.device.device].items[item].type == 'selector' ||this.config[this.device.device].items[item].type == 'inputSelector') {
|
767
|
-
if(this.config[this.device.device].items[item].type == 'selector'){
|
768
|
-
this.page['options' + index].push({
|
769
|
-
label: "请选择",
|
770
|
-
value: ''
|
771
|
-
})
|
772
|
-
}
|
773
|
-
for (let i in this.config[this.device.device].items[item].options) {
|
774
|
-
this.page['options' + index].push({
|
775
|
-
label: this.config[this.device.device].items[item].options[i].data,
|
776
|
-
value: this.config[this.device.device].items[item].options[i].data
|
777
|
-
})
|
778
|
-
}
|
779
|
-
if(this.config[this.device.device].items[item].type == 'selector'){
|
780
|
-
this.$set('f_items['+index+'].selected', f_item_value)
|
781
|
-
}else if(this.config[this.device.device].items[item].type == 'inputSelector'){
|
782
|
-
this.$set('f_items['+index+'].selected', f_item_value)
|
783
|
-
}
|
784
|
-
|
785
|
-
this.$set('f_items['+index+'].options',this.page['options' + index])
|
786
|
-
|
787
|
-
//tag)
|
788
|
-
} else if (this.config[this.device.device].items[item].type == 'radio' || this.config[this.device.device].items[item].type == 'checkbox') {
|
789
|
-
for (let i in this.config[this.device.device].items[item].options) {
|
790
|
-
this.page['options' + index].push({
|
791
|
-
label: this.config[this.device.device].items[item].options[i].data,
|
792
|
-
value: this.config[this.device.device].items[item].options[i].data,
|
793
|
-
isdefect: this.config[this.device.device].items[item].options[i].isdefect,
|
794
|
-
level: this.config[this.device.device].items[item].options[i].level
|
795
|
-
})
|
796
|
-
}
|
797
|
-
this.$set('f_items[' + index + '].options', this.page['options' + index])
|
798
|
-
this.$set('f_items[' + index + '].f_item_value', f_item_value)
|
799
|
-
//tag)
|
800
|
-
}
|
801
|
-
n = n + 1
|
802
|
-
}
|
803
|
-
//tag)
|
804
|
-
//tag)
|
805
|
-
//tag)
|
806
|
-
if(JSON.stringify(this.piece) == '{}') {
|
807
|
-
// 如果没有,则新建
|
808
|
-
this.$set('piece.f_items',this.f_items)
|
809
|
-
this.$set('piece.f_device_type',this.device.device)
|
810
|
-
} else {
|
811
|
-
// 已经存在,把之前的数据重新填入
|
812
|
-
for (let f in this.f_items){
|
813
|
-
for(let p in this.piece.f_items) {
|
814
|
-
if (this.f_items[f].f_item_name == this.piece.f_items[p].f_item_name) {
|
815
|
-
//tag)
|
816
|
-
//tag)
|
817
|
-
//tag)
|
818
|
-
//tag)
|
819
|
-
this.f_items[f] = Object.assign(this.f_items[f], this.piece.f_items[p])
|
820
|
-
//tag)
|
821
|
-
if (this.f_items[f].type == 'selector' || this.f_items[f].type == 'inputSelector') {
|
822
|
-
//tag)
|
823
|
-
//tag)
|
824
|
-
this.f_items[f].selected = this.piece.f_items[p].f_item_value
|
825
|
-
//tag)
|
826
|
-
}
|
827
|
-
// 取出特殊值
|
828
|
-
if (this.f_items[f].f_item_name == '初始表底') {
|
829
|
-
//tag)
|
830
|
-
this.f_initial_base.index = f
|
831
|
-
} else if (this.f_items[f].f_item_name == '上期表读数') {
|
832
|
-
//tag)
|
833
|
-
this.f_prior_reading.index = f
|
834
|
-
} else if (this.f_items[f].f_item_name == '本期表读数') {
|
835
|
-
//tag)
|
836
|
-
this.f_issue_reading.index = f
|
837
|
-
/*this.$watch('f_items[' + f + '].f_item_value', function () {
|
838
|
-
this.getTableBaseNumber()
|
839
|
-
this.getGasBalanceNumber()
|
840
|
-
})*/
|
841
|
-
} else if (this.f_items[f].f_item_name == '累购气量') {
|
842
|
-
//tag)
|
843
|
-
this.f_total_gas.index = f
|
844
|
-
} else if (this.f_items[f].f_item_name == '已用气量') {
|
845
|
-
//tag)
|
846
|
-
this.f_table_base.index = f
|
847
|
-
/*this.$watch('f_items[' + f + '].f_item_value', function () {
|
848
|
-
this.getGasAberrantNumber('已用气量')
|
849
|
-
})*/
|
850
|
-
} else if (this.f_items[f].f_item_name == '剩余气量') {
|
851
|
-
//tag)
|
852
|
-
this.f_gas_balance.index = f
|
853
|
-
/*this.$watch('f_items[' + f + '].f_item_value', function () {
|
854
|
-
this.getGasAberrantNumber('')
|
855
|
-
})*/
|
856
|
-
} else if (this.f_items[f].f_item_name == '气量异常差值') {
|
857
|
-
//tag)
|
858
|
-
this.f_gas_aberrant_number.index = f
|
859
|
-
} else if (this.f_items[f].f_item_name == '累购金额') {
|
860
|
-
//tag)
|
861
|
-
this.f_total_fee.index = f
|
862
|
-
} else if (this.f_items[f].f_item_name == '已用金额') {
|
863
|
-
//tag)
|
864
|
-
this.f_fee_base.index = f
|
865
|
-
this.$watch('f_items[' + f + '].f_item_value', function () {
|
866
|
-
this.getFeeAberrantNumber('已用金额')
|
867
|
-
})
|
868
|
-
} else if (this.f_items[f].f_item_name == '剩余金额') {
|
869
|
-
//tag)
|
870
|
-
this.f_fee_balance.index = f
|
871
|
-
this.$watch('f_items[' + f + '].f_item_value', function () {
|
872
|
-
this.getFeeAberrantNumber('')
|
873
|
-
})
|
874
|
-
} else if (this.f_items[f].f_item_name == '金额异常差值') {
|
875
|
-
//tag)
|
876
|
-
this.f_fee_aberrant_number.index = f
|
877
|
-
}
|
878
|
-
}
|
879
|
-
}
|
880
|
-
for (let em in this.config[this.device.device].items) {
|
881
|
-
if (this.config[this.device.device].items[em].type == 'selector' && em == this.f_items[f].f_item_name) {
|
882
|
-
this.f_items[f].options =[]
|
883
|
-
for (let k in this.config[this.device.device].items[em].options) {
|
884
|
-
this.f_items[f].options.push({
|
885
|
-
label: this.config[this.device.device].items[em].options[k].data,
|
886
|
-
value: this.config[this.device.device].items[em].options[k].data
|
887
|
-
})
|
888
|
-
}
|
889
|
-
}
|
890
|
-
}
|
891
|
-
if (this.f_items[f].f_item_name == '安装日期') {
|
892
|
-
//tag)
|
893
|
-
this.f_install_date.index = f
|
894
|
-
this.$watch('f_items[' + f + '].f_item_value', function () {
|
895
|
-
this.getscrapNumber()
|
896
|
-
})
|
897
|
-
}else if (this.f_items[f].f_item_name == '使用年限') {
|
898
|
-
//tag)
|
899
|
-
this.f_use_limit.index = f
|
900
|
-
this.$watch('f_items[' + f + '].f_item_value', function () {
|
901
|
-
this.getscrapNumber()
|
902
|
-
})
|
903
|
-
}else if (this.f_items[f].f_item_name == '到期日期') {
|
904
|
-
//tag)
|
905
|
-
this.f_scrap_date.index = f
|
906
|
-
}
|
907
|
-
}
|
908
|
-
//tag)
|
909
|
-
this.$set('piece.f_items',this.f_items)
|
910
|
-
}
|
911
|
-
this.towatch()
|
912
|
-
},
|
913
|
-
destroyed(){
|
914
|
-
let nullCount = 0
|
915
|
-
let metertitles
|
916
|
-
//判断当前是否有选中项
|
917
|
-
for (let row in this.f_items){
|
918
|
-
if(this.f_items[row].selected && this.f_items[row].selected != '' && this.f_items[row].selected instanceof Array){
|
919
|
-
//tag
|
920
|
-
this.f_items[row].f_item_value = this.f_items[row].selected
|
921
|
-
}else if(this.f_items[row].selected && this.f_items[row].selected != ''){
|
922
|
-
//tag
|
923
|
-
this.f_items[row].f_item_value = this.f_items[row].selected
|
924
|
-
}
|
925
|
-
// if(this.f_items[row].f_item_value instanceof Array && this.f_items[row].f_item_value.length != 0 ){
|
926
|
-
// nullCount = nullCount+1
|
927
|
-
// }else if(this.f_items[row].f_item_value != ''){
|
928
|
-
// nullCount = nullCount+1
|
929
|
-
// }
|
930
|
-
}
|
931
|
-
let picture = []
|
932
|
-
// for (let row in this.f_items){
|
933
|
-
// let a={}
|
934
|
-
// a.f_path = this.f_items[row].f_path
|
935
|
-
// a.name = this.f_items[row].f_item_name
|
936
|
-
// }
|
937
|
-
// picture.push(a)
|
938
|
-
this.$set(`paper['device${this.device.n}'][${this.idx}]`, this.piece)
|
939
|
-
//tag
|
940
|
-
},
|
941
|
-
computed:{
|
942
|
-
|
943
|
-
}
|
944
|
-
}
|
945
|
-
</script>
|
946
|
-
<style lang="less" scoped>
|
947
|
-
.class-erro {
|
948
|
-
color: #a94442;
|
949
|
-
}
|
950
|
-
.fivelabel{
|
951
|
-
border: none;
|
952
|
-
border-left: 5px solid #A2C2EB;
|
953
|
-
float: left;
|
954
|
-
width: 35%;
|
955
|
-
margin-bottom: 3px;
|
956
|
-
text-align: left;
|
957
|
-
word-wrap: break-word;
|
958
|
-
white-space: normal;
|
959
|
-
}
|
960
|
-
.radiolabel{
|
961
|
-
border: none;
|
962
|
-
border-left: 5px solid #A2C2EB;
|
963
|
-
float: left;
|
964
|
-
width: 65%;
|
965
|
-
margin-bottom: 3px;
|
966
|
-
text-align: left;
|
967
|
-
word-wrap: break-word;
|
968
|
-
white-space: normal;
|
969
|
-
}
|
970
|
-
|
971
|
-
.textlabel {
|
972
|
-
border: none;
|
973
|
-
border-left: 5px solid #A2C2EB;
|
974
|
-
width: 100%;
|
975
|
-
margin-bottom: 3px;
|
976
|
-
text-align: left;
|
977
|
-
word-wrap: break-word;
|
978
|
-
white-space: normal;
|
979
|
-
}
|
980
|
-
.spanrodio{
|
981
|
-
margin-right: 10px;
|
982
|
-
}
|
983
|
-
.div-photo{
|
984
|
-
width: auto;
|
985
|
-
height: auto;
|
986
|
-
/* margin-top: 10px; */
|
987
|
-
position: absolute;
|
988
|
-
bottom: 10px;
|
989
|
-
right: 10px;
|
990
|
-
}
|
991
|
-
.btn-photo{
|
992
|
-
border: 0;
|
993
|
-
border-radius: 7px;
|
994
|
-
background-color: #7dc1f4;
|
995
|
-
font: 15px PingFang-SC-Bold;
|
996
|
-
height: 20%;
|
997
|
-
}
|
998
|
-
</style>
|
999
|
-
|
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="#" 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" style="padding: 0">
|
10
|
+
<!-- 安检项内容 -->
|
11
|
+
<div class="auto repair-info-content compatible" style="padding: 0">
|
12
|
+
<div class="row auto" style="padding: 0">
|
13
|
+
<div v-show="false" class="{{shuclass}}" v-if=" device.device != '燃气表'">
|
14
|
+
<button type="button" name="button" class="btn btn-primary" @click='adddetails()' :disabled="issee">增加</button>
|
15
|
+
</div>
|
16
|
+
<!--<div class="{{shuclass}}" v-if="device.device != '燃气表' && candelete">-->
|
17
|
+
<!--<button type="button" name="button" class="btn btn-primary" @click='deletedetails()' :disabled="issee">删除</button>-->
|
18
|
+
<!--</div>-->
|
19
|
+
<div class="shuclass1" v-show="row.isshow" v-for="row in f_items" style="padding: 4px; border:1px solid #D4D4D4;border-bottom: 0" >
|
20
|
+
<label v-if="row.type != 'radio' && row.type != 'text' && row.type != 'picture' && row.type != 'checkbox'" v-show="row.isshow" class="fivelabel">{{row.f_item_name}}<br/>{{row.remark}}</label>
|
21
|
+
<label v-if="row.type == 'radio'" v-show="row.isshow" class="radiolabel">{{row.f_item_name}}<br/>{{row.remark}}</label>
|
22
|
+
<label v-if="row.type == 'text' || row.type == 'picture' || row.type == 'checkbox'" v-show="row.isshow" class="textlabel">{{row.f_item_name}}<br/>{{row.remark}}</label>
|
23
|
+
<!--<span v-if="show" style="font-weight:bold">{{row.f_content}}</span>-->
|
24
|
+
<!--<datepicker placeholder="请选择时间"-->
|
25
|
+
<!--:value.sync="row.f_content"-->
|
26
|
+
<!--v-model="row.f_content"-->
|
27
|
+
<!--:format="'yyyy-MM-dd'"-->
|
28
|
+
<!--v-if="!show && row.type == 'date'"-->
|
29
|
+
<!--:readonly="true"-->
|
30
|
+
<!--></datepicker>-->
|
31
|
+
<div style="float: left;width:60%" class="form-group col-sm-12" v-if="row.type == 'date'" v-show="row.isshow">
|
32
|
+
<datepicker id="f_making_date" :placeholder= row.f_item_name
|
33
|
+
:value.sync="row.f_item_value"
|
34
|
+
v-if="row.type == 'date'"
|
35
|
+
v-show="row.isshow"
|
36
|
+
:disabled-days-of-Week="[]"
|
37
|
+
:format=row.format
|
38
|
+
:show-reset-button="reset" readonly="readonly">
|
39
|
+
</datepicker>
|
40
|
+
</div>
|
41
|
+
<div style="clear: both" v-if="row.type == 'picture'" class="form-group col-sm-12" >
|
42
|
+
<div class="auto" >
|
43
|
+
<div class="panel">
|
44
|
+
<div class="panel-body panel-self" style="background-color: #F8F8F8;width: 160px;height: 160px;position: relative">
|
45
|
+
<div class="row" style="height: 160px;width:160px;overflow: scroll;top: 1px">
|
46
|
+
<div class="col-sm-4" v-show="row.f_path">
|
47
|
+
<img-self :src="row.f_path" :alt="row.f_item_name" width="140" height="140"></img-self>
|
48
|
+
</div>
|
49
|
+
<div class="col-sm-4" v-show="!row.f_path" @click="takePic($index, row.f_item_name)">
|
50
|
+
<img src="../../assets/tackpic.png" :alt="点击拍摄照片" width="140" height="140"></img>
|
51
|
+
</div>
|
52
|
+
<img v-show="row.f_path" src="../../assets/remove.png" :class="style__" @click="delfile($index, row.f_path)" v-if="role!='androidview'" style="width: 40px;height: 40px;position: absolute;left:110px;top:110px"></img>
|
53
|
+
</div>
|
54
|
+
</div>
|
55
|
+
</div>
|
56
|
+
</div>
|
57
|
+
</div>
|
58
|
+
<div style="float: left;width:60%" class="form-group" v-if="row.type == 'string'" v-show="row.isshow">
|
59
|
+
<input type="text" class="form-control" maxlength="100" v-model="row.f_item_value" :readonly="role == 'androidview' || row.readonly">
|
60
|
+
</div>
|
61
|
+
<div style="float: left;width:60%" class="form-group" v-if="!show && row.type == 'number'" v-show="row.isshow">
|
62
|
+
<input type="text" class="form-control" maxlength="100" v-model="row.f_item_value" onkeyup="value=value.replace(/[^\d\.]/g,'')" :readonly="row.readonly">
|
63
|
+
</div>
|
64
|
+
<!--<input type="text" class="form-control" v-model="row.f_content" v-if="!show && row.type == 'string' && row.f_project != '表号'" :disabled="(!(ischecked == '有')) || issee" :readonly="issee">-->
|
65
|
+
<!--<input type="text" class="form-control" v-model="meternum" v-if="!show && row.type == 'string' && row.f_project == '表号' " :disabled="(!(ischecked == '有')) || issee" :readonly="issee" >-->
|
66
|
+
<!--<button type="button" name="button" class="btn btn-primary" @click="scan" v-if="!show && row.f_project == '表号' ">扫码</button>-->
|
67
|
+
<input-select v-if="row.type == 'inputSelector'"
|
68
|
+
v-show="row.isshow"
|
69
|
+
:value.sync="row.selected"
|
70
|
+
v-model="row.selected"
|
71
|
+
:readonly="false"
|
72
|
+
:options="row.options"
|
73
|
+
@change="changse"
|
74
|
+
@click="transelation($index)"></input-select>
|
75
|
+
<v-select style="float: left" :value.sync="row.selected"
|
76
|
+
v-model="row.selected"
|
77
|
+
v-if="row.type == 'selector'"
|
78
|
+
v-show="row.isshow"
|
79
|
+
placeholder='请选择'
|
80
|
+
:options="row.options"
|
81
|
+
:disabled="role == 'androidview' || row.readonly"
|
82
|
+
@change="changse"
|
83
|
+
@click="transelation($index)"
|
84
|
+
:multiple="row.multiple"
|
85
|
+
:close-on-select="!row.multiple" clear-button></v-select>
|
86
|
+
<div style="float: left;width: 30%" class="form-group" v-if="!show && row.type == 'radio'">
|
87
|
+
<div class="col-xs-6 col-sm-6 col-md-6" v-for="item in row.options">
|
88
|
+
<input type="radio" :name="row.f_item_name" @click="disSelect($parent.$index,item.value)" :value="item.value" :disabled="(!(ischecked == '有')) || issee" v-model="row.f_item_value" >
|
89
|
+
<span>{{item.label}}</span>
|
90
|
+
</div>
|
91
|
+
</div>
|
92
|
+
<div v-if="!show && row.type == 'checkbox'" class="col-xs-12 col-sm-12 col-md-12" style="white-space: nowrap" >
|
93
|
+
<div style="float: left" v-for="item in row.options">
|
94
|
+
<input type="checkbox" :name="row.f_item_name" :value="item.value" :disabled="(!(ischecked == '有')) || issee" v-model="row.f_item_value">
|
95
|
+
<span>{{item.label}}</span>
|
96
|
+
</div>
|
97
|
+
</div>
|
98
|
+
<div style="clear: both">
|
99
|
+
<label v-if="row.f_item_value.indexOf('其他') >-1" class="fivelabel">其他</label>
|
100
|
+
<div style="float: left;width:60%" class="form-group" v-if="row.f_item_value.indexOf('其他') >-1">
|
101
|
+
<input type="text" class="form-control" maxlength="100" v-model="row.f_else" :readonly="role == 'androidview' || row.readonly">
|
102
|
+
</div>
|
103
|
+
</div>
|
104
|
+
<div style="clear: both">
|
105
|
+
<div class="form-group" v-if="(row.type == 'selector' || row.type == 'radio' || row.type =='checkbox') && (row.f_path != '' || row.f_is_defect != '') && (livedispose == 'true' || livedispose == true) " >
|
106
|
+
<label class="fivelabel">现场已处理</label>
|
107
|
+
<v-select :value="row.f_live_dispose"
|
108
|
+
:value-single="true"
|
109
|
+
:options="lives"
|
110
|
+
:disabled="role == 'androidview'"
|
111
|
+
@change="changlive"
|
112
|
+
@click="transelation($index)"
|
113
|
+
close-on-select clear-button></v-select>
|
114
|
+
</div>
|
115
|
+
<div class="form-group col-sm-12" v-if="(row.type == 'selector' || row.type == 'radio' || row.type =='checkbox') && (row.f_path != '' || row.f_is_defect != '')" style="margin-top: 40px">
|
116
|
+
<div class="auto" >
|
117
|
+
<div class="panel">
|
118
|
+
<div class="panel-body panel-self" style="background-color: #F8F8F8;width: 160px;height: 160px;position: relative">
|
119
|
+
<div class="row" style="height: 160px;width:160px;overflow: scroll;top: 1px">
|
120
|
+
<div class="col-sm-4" v-show="row.f_path">
|
121
|
+
<img-self :src="row.f_path" :alt="row.f_item_name" width="140" height="140"></img-self>
|
122
|
+
</div>
|
123
|
+
<div class="col-sm-4" v-show="!row.f_path" @click="takePic($index, row.f_item_name)">
|
124
|
+
<img src="../../assets/tackpic.png" :alt="点击拍摄照片" width="140" height="140"></img>
|
125
|
+
</div>
|
126
|
+
<img v-show="row.f_path" src="../../assets/remove.png" :class="style__" @click="delfile($index, row.f_path)" v-if="role!='androidview'" style="width: 40px;height: 40px;position: absolute;left:110px;top:110px"></img>
|
127
|
+
</div>
|
128
|
+
</div>
|
129
|
+
</div>
|
130
|
+
</div>
|
131
|
+
</div>
|
132
|
+
<div class="auto" v-if="(row.type == 'selector' || row.type == 'radio' || row.type =='checkbox') && row.tooltip != undefined && row.tooltip != '' ">
|
133
|
+
<div class="panel">
|
134
|
+
<div class="panel-body panel-self" style="background-color: #F8F8F8;width: 100%;height: auto">
|
135
|
+
{{row.tooltip}}
|
136
|
+
</div>
|
137
|
+
</div>
|
138
|
+
</div>
|
139
|
+
</div>
|
140
|
+
<!--<v-select :value.sync="row.f_content" :options='getOptions(row.f_project)' placeholder='请选择' :disabled="(!(ischecked == '有')) || issee" close-on-select :value-single="true" v-if="!show && row.type == 'selector' && row.f_project != '气表品牌'"-->
|
141
|
+
<!--></v-select>-->
|
142
|
+
<!--<v-select :value.sync="row.f_content" :options='getOptions(row.f_project)' @change="getgasmodel" placeholder='请选择' :disabled="(!(ischecked == '有')) || issee" close-on-select :value-single="true" v-if="!show && row.type == 'selector' && row.f_project == '气表品牌'"-->
|
143
|
+
<!--></v-select>-->
|
144
|
+
<!-- <div class="auto" v-if="!show && row.type == 'checkbox' ">-->
|
145
|
+
<!-- <input class="magic-checkbox" type="checkbox" id="shebeicheckbox"-->
|
146
|
+
<!-- :checked="row.f_content == '有'"-->
|
147
|
+
<!-- @click="switchDetails(row.f_project, $event)" :disabled="issee"/>-->
|
148
|
+
<!-- <label for="shebeicheckbox" style="width:150px;padding-bottom: 10px">{{row.f_project}}</label>-->
|
149
|
+
<!-- </div>-->
|
150
|
+
<!--<img-area :model="Detail.imgs" :sutitle="row.f_project" v-if="row.type == 'picture'" :disabled="issee"></img-area>-->
|
151
|
+
</div>
|
152
|
+
<!--<div style="width: 100%;padding: 2px" v-if="device.device == '燃气表' && item.f_plan_meters[0].f_meter_type=='机表' && paper.f_is_meterreadding=='未抄表'">
|
153
|
+
<button type="button" name="button" style="margin-left: 35%" class="btn btn-primary" @click="readmeter">
|
154
|
+
机表抄表
|
155
|
+
</button>
|
156
|
+
</div>-->
|
157
|
+
</div>
|
158
|
+
</div>
|
159
|
+
<div style="border-top: 1px solid #D4D4D4"></div>
|
160
|
+
</div>
|
161
|
+
</div>
|
162
|
+
</div>
|
163
|
+
</template>
|
164
|
+
<script>
|
165
|
+
import Vue from 'vue'
|
166
|
+
import * as Util from '../Util'
|
167
|
+
|
168
|
+
export default {
|
169
|
+
title: '维修列表信息',
|
170
|
+
data() {
|
171
|
+
return {
|
172
|
+
// telphoneValid: '/^((0\\d{2,3}-\\d{7,8})|(1[3584]\\d{9}))$/',
|
173
|
+
// meterstyle:[],
|
174
|
+
shuclass:'col-xs-12 col-sm-12 col-md-12 form-input-group mg8',
|
175
|
+
shuclass1:'col-xs-12 col-sm-12 col-md-12 mg8',
|
176
|
+
// labels:[],
|
177
|
+
meternum:'',
|
178
|
+
ischecked:'有',
|
179
|
+
gasmodel:'',
|
180
|
+
textstyle:'color: red',
|
181
|
+
paper: this.$parent.$parent.data,
|
182
|
+
f_items:[],
|
183
|
+
page:{},
|
184
|
+
selectindex:null,
|
185
|
+
lives:[{label: '是', value: '是'},{label: '否', value: '否'}],
|
186
|
+
f_live_dispose:'否',
|
187
|
+
// 初始表底
|
188
|
+
f_initial_base: {},
|
189
|
+
// 气量异常差值 计算公式 => 气量异常差值 = 累计购气量 - (已用气量 - 初始表底) - 剩余气量
|
190
|
+
f_gas_aberrant_number: {},
|
191
|
+
// 金额异常差值 计算公式 => 金额异常差值 = 累计购金额 - 已用金额 - 剩余金额
|
192
|
+
f_fee_aberrant_number: {},
|
193
|
+
// 累购气量
|
194
|
+
f_total_gas: {},
|
195
|
+
// 累购金额
|
196
|
+
f_total_fee: {},
|
197
|
+
// 已用气量
|
198
|
+
f_table_base: {},
|
199
|
+
// 已用金额
|
200
|
+
f_fee_base: {},
|
201
|
+
// 剩余气量
|
202
|
+
f_gas_balance: {},
|
203
|
+
// 剩余金额
|
204
|
+
f_fee_balance: {},
|
205
|
+
//本期表读数
|
206
|
+
f_issue_reading:{},
|
207
|
+
//上期表读数
|
208
|
+
f_prior_reading:{},
|
209
|
+
// 安装日期
|
210
|
+
f_install_date:{},
|
211
|
+
// 使用年限
|
212
|
+
f_use_limit:{},
|
213
|
+
// 到期日期
|
214
|
+
f_scrap_date:{},
|
215
|
+
// 气量异常差值允许误差
|
216
|
+
gasDeviation: (
|
217
|
+
function (_this) {
|
218
|
+
let deviation = _this.$appdata.getSingleValue('气量异常差值允许误差')
|
219
|
+
if (deviation && !isNaN(deviation)) {
|
220
|
+
return deviation
|
221
|
+
} else {
|
222
|
+
return 0
|
223
|
+
}
|
224
|
+
}
|
225
|
+
)(this),
|
226
|
+
// 金额异常差值允许误差
|
227
|
+
feeDeviation: (
|
228
|
+
function (_this) {
|
229
|
+
let deviation = _this.$appdata.getSingleValue('金额异常差值允许误差')
|
230
|
+
if (deviation && !isNaN(deviation)) {
|
231
|
+
return deviation
|
232
|
+
} else {
|
233
|
+
return 0
|
234
|
+
}
|
235
|
+
}
|
236
|
+
)(this),
|
237
|
+
showElse:false, //控制其他选项是否显示
|
238
|
+
}
|
239
|
+
},
|
240
|
+
props: ['config','device','idx','operation','item','role'],
|
241
|
+
// props: {
|
242
|
+
// // 维修对应的用户数据收集
|
243
|
+
// model: {
|
244
|
+
// type: Object
|
245
|
+
// },
|
246
|
+
// service:{
|
247
|
+
// type: Object
|
248
|
+
// },
|
249
|
+
// show: {
|
250
|
+
// type: Boolean,
|
251
|
+
// default: false
|
252
|
+
// },
|
253
|
+
// repairitem:{
|
254
|
+
// type: Object
|
255
|
+
// },
|
256
|
+
// shutype:'heng',
|
257
|
+
// tabs:{
|
258
|
+
// type: Object
|
259
|
+
// },
|
260
|
+
// repairdetails:{
|
261
|
+
// type: Object
|
262
|
+
// },
|
263
|
+
// faultshow:{
|
264
|
+
// type: Object
|
265
|
+
// },
|
266
|
+
// issee:''
|
267
|
+
// },
|
268
|
+
methods: {
|
269
|
+
changse(val){
|
270
|
+
if(val == undefined){
|
271
|
+
return
|
272
|
+
}
|
273
|
+
if(this.selectindex != null) {
|
274
|
+
if(this.f_items[this.selectindex].type == 'selector'){
|
275
|
+
this.f_items[this.selectindex].f_item_value = val
|
276
|
+
}else if(this.f_items[this.selectindex].type == 'inputSelector'){
|
277
|
+
this.f_items[this.selectindex].f_item_value = val.target.value
|
278
|
+
}
|
279
|
+
}
|
280
|
+
},
|
281
|
+
changlive(val){
|
282
|
+
if(val == undefined){
|
283
|
+
return
|
284
|
+
}
|
285
|
+
if(this.selectindex != null) {
|
286
|
+
this.f_items[this.selectindex].f_live_dispose = val
|
287
|
+
}
|
288
|
+
},
|
289
|
+
switchDetails(detailsType, event){
|
290
|
+
if (event.srcElement.checked) {
|
291
|
+
for(var i = 0;i<this.Detail.details.length;i++){
|
292
|
+
if(this.Detail.details[i].f_project == detailsType){
|
293
|
+
this.Detail.details[i].f_content = '有'
|
294
|
+
this.ischecked = '有'
|
295
|
+
return
|
296
|
+
}
|
297
|
+
}
|
298
|
+
} else {
|
299
|
+
this.Detail.imgs = []
|
300
|
+
for(var i = 0;i<this.Detail.details.length;i++){
|
301
|
+
if(this.Detail.details[i].f_project == detailsType){
|
302
|
+
this.Detail.details[i].f_content = '无'
|
303
|
+
this.ischecked = '无'
|
304
|
+
}else{
|
305
|
+
this.Detail.details[i].f_content = ''
|
306
|
+
}
|
307
|
+
}
|
308
|
+
}
|
309
|
+
},
|
310
|
+
getgasmodel(val){
|
311
|
+
this.gasmodel = val
|
312
|
+
},
|
313
|
+
getradios(val,flag){
|
314
|
+
let Reoptions = []
|
315
|
+
for (let i = 0;i<this.repairdetails.length;i++) {
|
316
|
+
var t = false
|
317
|
+
if(this.repairdetails[i].f_type == this.repairitem.header ){
|
318
|
+
for(var j =0;j<this.repairdetails[i].details.length;j++){
|
319
|
+
if(this.repairdetails[i].details[j].f_project == val ){
|
320
|
+
Reoptions = this.repairdetails[i].details[j].options
|
321
|
+
t = true
|
322
|
+
break
|
323
|
+
}
|
324
|
+
}
|
325
|
+
}
|
326
|
+
if(t){
|
327
|
+
break
|
328
|
+
}
|
329
|
+
}
|
330
|
+
for(let j = 0;j<Reoptions.length;j++){
|
331
|
+
if(Reoptions[j].data == flag){
|
332
|
+
for(var e = 0;e<this.Detail.details.length;e++){
|
333
|
+
if(this.Detail.details[e].f_project == val){
|
334
|
+
this.Detail.details[e].f_status = Reoptions[j].f_status
|
335
|
+
return
|
336
|
+
}
|
337
|
+
}
|
338
|
+
break
|
339
|
+
}
|
340
|
+
}
|
341
|
+
},
|
342
|
+
deletedetails(){
|
343
|
+
this.$showMessage('该操作会删除所填信息,是否继续!', ['confirm', 'cancel']).then((res) => {
|
344
|
+
if (res === 'confirm') {
|
345
|
+
for(var i = 0;i<this.tabs.length;i++){
|
346
|
+
if(this.tabs[i].number == this.repairitem.number){
|
347
|
+
this.tabs.splice(i, 1)
|
348
|
+
this.model.servicerepair.splice(this.repairitem.number, 1)
|
349
|
+
for(let t = i;t < this.tabs.length;t++ ) {
|
350
|
+
this.tabs[t].number -= 1
|
351
|
+
}
|
352
|
+
return
|
353
|
+
}
|
354
|
+
}
|
355
|
+
}
|
356
|
+
})
|
357
|
+
},
|
358
|
+
takePic(prop, title) {
|
359
|
+
if (this.role == 'androidview') {
|
360
|
+
return
|
361
|
+
}
|
362
|
+
HostApp.__callback__ = this.cameraCallBack
|
363
|
+
HostApp.__this__ = this
|
364
|
+
//tag
|
365
|
+
let fileName
|
366
|
+
if(!this.f_items[prop].f_path || this.f_items[prop].f_path.includes("nopic.png")) {
|
367
|
+
fileName = Util.guid() + '-' + 'device'+this.device.n + '-' + this.idx + '-'+'f_items'+prop+ '.jpg'
|
368
|
+
} else {
|
369
|
+
fileName = Util.getFileName(this.f_items[prop].f_path)
|
370
|
+
}
|
371
|
+
HostApp._open_a_page({type: 'boomerang',
|
372
|
+
page: 'com.aofeng.hybrid.android.peripheral.CameraActivity',
|
373
|
+
param: {file: fileName, requestCode: 111, callback:'javascript:HostApp.__callback__("'+ prop +'", "%s");', watermark: title + '\t时间:'+ Util.toStandardTimeString() + '\t' + Vue.user.name}
|
374
|
+
})
|
375
|
+
},
|
376
|
+
cameraCallBack(prop, fileName) {
|
377
|
+
HostApp.__this__.$set( 'f_items['+prop+'].f_path', fileName + '?' + Math.random())
|
378
|
+
//tag
|
379
|
+
HostApp.__callback__ = null
|
380
|
+
HostApp.__this__ = null
|
381
|
+
},
|
382
|
+
delfile(prop, fileName) {
|
383
|
+
//tag
|
384
|
+
//tag)
|
385
|
+
if(fileName == Vue.nopic)
|
386
|
+
return
|
387
|
+
else {
|
388
|
+
HostApp.delfile(fileName)
|
389
|
+
this.f_items[prop].f_path = Vue.nopic
|
390
|
+
}
|
391
|
+
},
|
392
|
+
adddetails(){
|
393
|
+
// 下标作为序号,取值用。 增加 序号得依次增加
|
394
|
+
if(this.tabs.length > 0){
|
395
|
+
for(let i = this.tabs.length-1;i > 0 ;i-- ){
|
396
|
+
if(this.tabs[i].header == this.repairitem.header){
|
397
|
+
if(this.model.servicerepair.length > 0){
|
398
|
+
for(let j = this.model.servicerepair.length -1;j > -1;j-- ){
|
399
|
+
if(this.model.servicerepair[j].f_type == this.repairitem.header){
|
400
|
+
this.model.servicerepair.splice(j+1, 0, Object.assign({}, JSON.parse(JSON.stringify(this.tabs[i].details))))
|
401
|
+
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})
|
402
|
+
for(let t = i+2;t < this.tabs.length;t++ ) {
|
403
|
+
this.tabs[t].number += 1
|
404
|
+
}
|
405
|
+
this.faultshow.number += this.faultshow.number + 1
|
406
|
+
return
|
407
|
+
}
|
408
|
+
}
|
409
|
+
}
|
410
|
+
}
|
411
|
+
}
|
412
|
+
}
|
413
|
+
},
|
414
|
+
transelation(val){
|
415
|
+
this.selectindex = val
|
416
|
+
},
|
417
|
+
towatch(){
|
418
|
+
for(let n in this.f_items){
|
419
|
+
if(this.f_items[n].type == 'selector' || this.f_items[n].type == 'inputSelector'){
|
420
|
+
// 监听下拉框,如果有隐患,需要拍照
|
421
|
+
this.$watch('f_items['+n+'].selected',function(val) {
|
422
|
+
// 下拉框值
|
423
|
+
//tag)
|
424
|
+
// 下拉框所属设备
|
425
|
+
//tag
|
426
|
+
// 下拉框所属项
|
427
|
+
//tag
|
428
|
+
let shImage = false
|
429
|
+
if(val.indexOf('其他') == -1){
|
430
|
+
this.f_items[n].f_else = ''
|
431
|
+
}
|
432
|
+
// if(this.config[this.device.device].items[item].type == 'selector'){
|
433
|
+
// this.f_items[n].f_item_value = val
|
434
|
+
// }else if(this.config[this.device.device].items[item].type == 'inputSelector'){
|
435
|
+
// this.f_items[n].f_item_value = val[0]
|
436
|
+
// }
|
437
|
+
// 在配置中查找该项
|
438
|
+
for (let item in this.config[this.device.device].items) {
|
439
|
+
let type = this.config[this.device.device].items[item].type
|
440
|
+
let multiple = this.config[this.device.device].items[item].multiple
|
441
|
+
let options = this.config[this.device.device].items[item].options
|
442
|
+
if ((this.config[this.device.device].items[item].type == 'selector' || this.config[this.device.device].items[item].type == 'inputSelector') && item == this.f_items[n].f_item_name) {
|
443
|
+
for (let i in options) {
|
444
|
+
let value
|
445
|
+
if(this.config[this.device.device].items[item].type == 'selector' && this.config[this.device.device].items[item].multiple == false){
|
446
|
+
value = val[0]
|
447
|
+
}else if (this.config[this.device.device].items[item].type == 'inputSelector'){
|
448
|
+
value = val
|
449
|
+
}
|
450
|
+
//tag)
|
451
|
+
// 如果未选择,清空图片、隐患信息等
|
452
|
+
if((type == 'selector' && val.length == 0) || (type == 'inputSelector' && val == '')){
|
453
|
+
this.f_items[n].f_path = ''
|
454
|
+
this.f_items[n].f_is_defect = ''
|
455
|
+
this.f_items[n].f_defect_level = ''
|
456
|
+
this.f_items[n].f_live_dispose = ''
|
457
|
+
this.f_items[n].tooltip = ''
|
458
|
+
}
|
459
|
+
if((type == 'selector' && multiple == false && options[i].data == val[0]) || (type == 'inputSelector' && options[i].data == val) || (type == 'selector' && multiple == true && val.indexOf(options[i].data) > -1)){
|
460
|
+
// 找到选中的项了
|
461
|
+
//tag
|
462
|
+
if(options[i].isdefect == true ){
|
463
|
+
shImage = true
|
464
|
+
}
|
465
|
+
if(options[i].isdefect == false || this.f_items[n].f_item_value == ''){
|
466
|
+
shImage = false
|
467
|
+
}
|
468
|
+
//tag
|
469
|
+
if(shImage){
|
470
|
+
this.f_items[n].f_is_defect =true
|
471
|
+
this.f_items[n].f_defect_level = options[i].level
|
472
|
+
this.f_items[n].f_path = Vue.nopic
|
473
|
+
this.f_items[n].f_live_dispose = '否'
|
474
|
+
this.f_items[n].tooltip= options[i].tooltip
|
475
|
+
}else{
|
476
|
+
this.f_items[n].f_path = ''
|
477
|
+
this.f_items[n].f_is_defect = ''
|
478
|
+
this.f_items[n].f_defect_level = ''
|
479
|
+
this.f_items[n].f_live_dispose = ''
|
480
|
+
this.f_items[n].tooltip = ''
|
481
|
+
}
|
482
|
+
}
|
483
|
+
}
|
484
|
+
}
|
485
|
+
}
|
486
|
+
}
|
487
|
+
)
|
488
|
+
// this.$watch('other',function(val){
|
489
|
+
// //tag
|
490
|
+
// if(this.selectindex != null) {
|
491
|
+
// let index = this.f_items[this.selectindex].f_item_value.indexOf('其他')
|
492
|
+
// if(index > -1){
|
493
|
+
// this.f_items[this.selectindex].f_item_value.splice(index,1,this.other)
|
494
|
+
// }
|
495
|
+
// }
|
496
|
+
//
|
497
|
+
// })
|
498
|
+
}else if(this.f_items[n].type == 'radio') {
|
499
|
+
// 监听单选框,如果有隐患,需要拍照
|
500
|
+
this.$watch('f_items[' + n + '].f_item_value', function (val) {
|
501
|
+
//tag)
|
502
|
+
let options = this.f_items[n].options
|
503
|
+
//tag)
|
504
|
+
for (let i = 0; i < options.length; i++) {
|
505
|
+
//tag)
|
506
|
+
// 找到选中的项了
|
507
|
+
if (options[i].value == val) {
|
508
|
+
// 如果有隐患,拍图片
|
509
|
+
if (options[i].isdefect) {
|
510
|
+
this.f_items[n].f_is_defect = true
|
511
|
+
this.f_items[n].f_defect_level = options[i].level
|
512
|
+
this.f_items[n].f_path = Vue.nopic
|
513
|
+
this.f_items[n].f_live_dispose = '否'
|
514
|
+
this.f_items[n].tooltip = options[i].tooltip
|
515
|
+
//tag)
|
516
|
+
return
|
517
|
+
}
|
518
|
+
}
|
519
|
+
}
|
520
|
+
this.f_items[n].f_path = ''
|
521
|
+
this.f_items[n].f_is_defect = ''
|
522
|
+
this.f_items[n].f_defect_level = ''
|
523
|
+
this.f_items[n].f_live_dispose = ''
|
524
|
+
this.f_items[n].tooltip = ''
|
525
|
+
})
|
526
|
+
}else if(this.f_items[n].type == 'checkbox') {
|
527
|
+
// 监听单选框,如果有隐患,需要拍照
|
528
|
+
this.$watch('f_items[' + n + '].f_item_value', function (val) {
|
529
|
+
//tag)
|
530
|
+
// 如果是手动赋值,不执行下面逻辑
|
531
|
+
if (this.f_items[n].isReSet) {
|
532
|
+
this.f_items[n].isReSet = false
|
533
|
+
return
|
534
|
+
}
|
535
|
+
let options = this.f_items[n].options
|
536
|
+
//tag)
|
537
|
+
// 取出选中项中有隐患的详细信息
|
538
|
+
let selected = options.filter(item => { return val.indexOf(item.value) != -1 && item.isdefect })
|
539
|
+
|
540
|
+
if(selected.length > 0){
|
541
|
+
// 防止赋值无限调用
|
542
|
+
this.f_items[n].isReSet = true
|
543
|
+
let selectList = selected.map(item => {return item.value})
|
544
|
+
// 如果选中的是非隐患项,取消选中isdefect为true的
|
545
|
+
if (selectList.indexOf(val[val.length - 1]) == -1) {
|
546
|
+
this.f_items[n].f_item_value = val.filter(item => {return selectList.indexOf(item) == -1})
|
547
|
+
this.f_items[n].f_path = ''
|
548
|
+
this.f_items[n].f_is_defect = ''
|
549
|
+
this.f_items[n].f_defect_level = ''
|
550
|
+
this.f_items[n].f_live_dispose = ''
|
551
|
+
this.f_items[n].tooltip = ''
|
552
|
+
return
|
553
|
+
}
|
554
|
+
// 如果选中的是隐患项,取消选中isdefect为false的
|
555
|
+
this.f_items[n].f_item_value = selectList
|
556
|
+
// 如果第一次选择隐患项,初始化
|
557
|
+
if (!this.f_items[n].f_is_defect) {
|
558
|
+
this.f_items[n].f_is_defect = true
|
559
|
+
this.f_items[n].f_defect_level = selected[0].level
|
560
|
+
this.f_items[n].f_path = Vue.nopic
|
561
|
+
this.f_items[n].f_live_dispose = '否'
|
562
|
+
this.f_items[n].tooltip = selected[0].tooltip
|
563
|
+
}
|
564
|
+
//tag)
|
565
|
+
return
|
566
|
+
}
|
567
|
+
this.f_items[n].f_path = ''
|
568
|
+
this.f_items[n].f_is_defect = ''
|
569
|
+
this.f_items[n].f_defect_level = ''
|
570
|
+
this.f_items[n].f_live_dispose = ''
|
571
|
+
this.f_items[n].tooltip = ''
|
572
|
+
})
|
573
|
+
}
|
574
|
+
}
|
575
|
+
//tag)
|
576
|
+
},
|
577
|
+
//计算已用气量/金额
|
578
|
+
getTableBaseNumber() {
|
579
|
+
//tag
|
580
|
+
if(!this.f_items[this.f_issue_reading.index].f_item_value || parseFloat(this.f_items[this.f_prior_reading.index].f_item_value).toString() == "NaN"){
|
581
|
+
return
|
582
|
+
}
|
583
|
+
//tag
|
584
|
+
//判断是金额表还是气量表
|
585
|
+
if(this.item.f_plan_meters[0].f_meter_type=='机表' || this.item.f_plan_meters[0].f_collection_type=='按气量'){
|
586
|
+
//tag
|
587
|
+
//tag
|
588
|
+
//tag
|
589
|
+
//tag
|
590
|
+
// 先清空
|
591
|
+
this.f_items[this.f_table_base.index].f_item_value = null
|
592
|
+
//已用气量=本期表读数-上期表读数
|
593
|
+
this.f_items[this.f_table_base.index].f_item_value= this.f_items[this.f_issue_reading.index].f_item_value-this.f_items[this.f_prior_reading.index].f_item_value
|
594
|
+
if (isNaN(this.f_items[this.f_table_base.index].f_item_value)) {
|
595
|
+
this.f_items[this.f_table_base.index].f_item_value = null
|
596
|
+
}
|
597
|
+
}else{
|
598
|
+
//tag
|
599
|
+
// 先清空
|
600
|
+
this.f_items[this.f_fee_base.index].f_item_value = null
|
601
|
+
//已用金额=本期表读数-上期表读数
|
602
|
+
this.f_items[this.f_fee_base.index].f_item_value= this.f_items[this.f_issue_reading.index].f_item_value-this.f_items[this.f_prior_reading.index].f_item_value
|
603
|
+
if (isNaN(this.f_items[this.f_fee_base.index].f_item_value)) {
|
604
|
+
this.f_items[this.f_fee_base.index].f_item_value = null
|
605
|
+
}
|
606
|
+
}
|
607
|
+
|
608
|
+
},
|
609
|
+
//计算剩余气量和金额
|
610
|
+
getGasBalanceNumber() {
|
611
|
+
//tag
|
612
|
+
if(this.item.f_plan_meters[0].f_meter_type=='机表' || this.item.f_plan_meters[0].f_collection_type=='按气量'){//按气量
|
613
|
+
|
614
|
+
if(!this.f_items[this.f_issue_reading.index].f_item_value || parseFloat(this.f_items[this.f_total_gas.index].f_item_value).toString() == "NaN"){
|
615
|
+
return
|
616
|
+
}
|
617
|
+
//剩余气量 = 累购-本期表读数
|
618
|
+
this.f_items[this.f_gas_balance.index].f_item_value= this.f_items[this.f_total_gas.index].f_item_value-this.f_items[this.f_issue_reading.index].f_item_value
|
619
|
+
if (isNaN(this.f_items[this.f_gas_balance.index].f_item_value)) {
|
620
|
+
this.f_items[this.f_gas_balance.index].f_item_value = null
|
621
|
+
}
|
622
|
+
}else{//按金额parseFloat(this.f_items[this.f_total_gas.index].f_item_value).toString() == "NaN"
|
623
|
+
if (!this.f_items[this.f_issue_reading.index].f_item_value || parseFloat(this.f_items[this.f_total_fee.index].f_item_value).toString() == "NaN") {
|
624
|
+
return
|
625
|
+
}
|
626
|
+
//剩余金额 = 累购-本期表读数
|
627
|
+
this.f_items[this.f_fee_balance.index].f_item_value=this.f_items[this.f_total_fee.index].f_item_value-this.f_items[this.f_issue_reading.index].f_item_value
|
628
|
+
if (isNaN(this.f_items[this.f_fee_balance.index].f_item_value)) {
|
629
|
+
this.f_items[this.f_fee_balance.index].f_item_value = null
|
630
|
+
}
|
631
|
+
}
|
632
|
+
|
633
|
+
},
|
634
|
+
// 计算到期日期
|
635
|
+
getscrapNumber() {
|
636
|
+
//tag
|
637
|
+
if(!this.f_items[this.f_install_date.index].f_item_value || !this.f_items[this.f_use_limit.index].f_item_value ){
|
638
|
+
return
|
639
|
+
}
|
640
|
+
let data = new Date(this.f_items[this.f_install_date.index].f_item_value)
|
641
|
+
data.setFullYear(data.getFullYear() + parseInt(this.f_items[this.f_use_limit.index].f_item_value))
|
642
|
+
this.f_items[this.f_scrap_date.index].f_item_value = data.toISOString().split('T')[0];
|
643
|
+
},
|
644
|
+
readmeter(){
|
645
|
+
if(!this.f_items[this.f_issue_reading.index].f_item_value && parseFloat(this.f_items[this.f_issue_reading.index].f_item_value).toString() == "NaN"){
|
646
|
+
this.$showMessage("请输入本期表读数!")
|
647
|
+
return
|
648
|
+
}
|
649
|
+
if(this.paper.f_is_meterreadding=='已抄表'){
|
650
|
+
this.$showMessage("本次安检已抄表,无法再次抄表!")
|
651
|
+
return
|
652
|
+
}
|
653
|
+
let param={
|
654
|
+
f_userinfoid:this.item.f_userinfoid,
|
655
|
+
f_checker:this.paper.f_checker_name,
|
656
|
+
f_checkerid:this.paper.f_checker_id,
|
657
|
+
f_tablebase:this.f_items[this.f_issue_reading.index].f_item_value
|
658
|
+
}
|
659
|
+
//tag)
|
660
|
+
HostApp.__this__ = this
|
661
|
+
HostApp.logicWithHint({
|
662
|
+
// logic别名,key必须为logic
|
663
|
+
'logic': 'rc_ReadMeterToJiBiao',
|
664
|
+
// 回调执行方法名,key必须为callback
|
665
|
+
'callback': 'javascript:HostApp.__this__.readmeterCallBack()',
|
666
|
+
// logic执行需要的业务参数
|
667
|
+
'data': {param:param},
|
668
|
+
// 固定key,代表是否将logic执行结果作为参数传入回调方法,1代表true,0代表false,
|
669
|
+
// 执行回调方法传入key为backresult
|
670
|
+
// 如需额外拼接参数,写在logic返回值的params,例如xxlogic返回:{"params": "success"}
|
671
|
+
'backresult': 1
|
672
|
+
})
|
673
|
+
},
|
674
|
+
readmeterCallBack(jo){
|
675
|
+
//tag)
|
676
|
+
if(jo.state == 'ok'){
|
677
|
+
let res = JSON.parse(jo.result)
|
678
|
+
//tag)
|
679
|
+
//tag)
|
680
|
+
if(res.code==200){
|
681
|
+
if(res.data=='已欠费'){
|
682
|
+
this.$showMessage(`抄表成功,该用户已欠费,欠费金额: ¥${res.oughtfee}`)
|
683
|
+
}
|
684
|
+
if(res.data=='未欠费'){
|
685
|
+
this.$showMessage(`抄表成功!该用户账户剩余金额: ¥${res.balance}`)
|
686
|
+
}
|
687
|
+
this.paper.f_is_meterreadding='已抄表'
|
688
|
+
}else{
|
689
|
+
this.$showMessage("抄表失败!")
|
690
|
+
}
|
691
|
+
}else{
|
692
|
+
this.$showMessage("服务器内部错误,抄表失败!")
|
693
|
+
}
|
694
|
+
},
|
695
|
+
disSelect(index, itemValue) {
|
696
|
+
//tag)
|
697
|
+
//tag)
|
698
|
+
if (this.f_items[index].f_item_value == itemValue) {
|
699
|
+
this.$set(`f_items[${index}].f_item_value`, '')
|
700
|
+
}
|
701
|
+
}
|
702
|
+
},
|
703
|
+
ready() {
|
704
|
+
//tag
|
705
|
+
//tag
|
706
|
+
if(Vue.config.safecheck != undefined){
|
707
|
+
if(Vue.config.safecheck.ApproveConfig != undefined){
|
708
|
+
if(Vue.config.safecheck.ApproveConfig.livedispose != undefined) {
|
709
|
+
this.livedispose = Vue.config.safecheck.ApproveConfig.livedispose
|
710
|
+
}
|
711
|
+
}
|
712
|
+
}
|
713
|
+
//tag
|
714
|
+
//tag)
|
715
|
+
//tag)
|
716
|
+
//tag)
|
717
|
+
//创建页面所需数据
|
718
|
+
this.$set('piece', this.paper['device'+this.device.n][this.idx])
|
719
|
+
//tag)
|
720
|
+
//tag)
|
721
|
+
let n = 0
|
722
|
+
for (let item in this.config[this.device.device].items) {
|
723
|
+
let index = this.config[this.device.device].items[item].index-1
|
724
|
+
this.$set('page.options' + index, [])
|
725
|
+
//tag)
|
726
|
+
//tag)
|
727
|
+
//tag)
|
728
|
+
// 先根据配置组接页面
|
729
|
+
let f_item_value
|
730
|
+
if(this.config[this.device.device].items[item].type == 'selector' || this.config[this.device.device].items[item].type == 'checkbox'){
|
731
|
+
f_item_value = []
|
732
|
+
// 判断选项的默认值
|
733
|
+
for (let defitem in this.config[this.device.device].items[item].options) {
|
734
|
+
let defopt = this.config[this.device.device].items[item].options[defitem]
|
735
|
+
if (defopt.isdefault) {
|
736
|
+
//tag
|
737
|
+
f_item_value[0] = defopt.data
|
738
|
+
}
|
739
|
+
}
|
740
|
+
// if(this.config[this.device.device].items[item].data){
|
741
|
+
// f_item_value.push(this.config[this.device.device].items[item].data)
|
742
|
+
// }
|
743
|
+
}else{
|
744
|
+
f_item_value = this.config[this.device.device].items[item].data ? this.config[this.device.device].items[item].data : ''
|
745
|
+
}
|
746
|
+
//tag)
|
747
|
+
let it = {
|
748
|
+
type: this.config[this.device.device].items[item].type,
|
749
|
+
f_item_name: item,
|
750
|
+
checkmust: this.config[this.device.device].items[item].checkmust,
|
751
|
+
f_item_value: f_item_value,
|
752
|
+
f_is_defect: '',
|
753
|
+
multiple:this.config[this.device.device].items[item].multiple == true?this.config[this.device.device].items[item].multiple:false,
|
754
|
+
isshow:this.config[this.device.device].items[item].isshow == false?this.config[this.device.device].items[item].isshow:true,
|
755
|
+
readonly: this.config[this.device.device].items[item].readonly == true?true:false,
|
756
|
+
remark: this.config[this.device.device].items[item].remark ? this.config[this.device.device].items[item].remark : '',
|
757
|
+
format: this.config[this.device.device].items[item].format ? this.config[this.device.device].items[item].format : 'yyyy-MM-dd 00:00:00',
|
758
|
+
f_path: '',
|
759
|
+
tooltip:'',
|
760
|
+
f_live_dispose:'',
|
761
|
+
f_else:''
|
762
|
+
}
|
763
|
+
//tag)
|
764
|
+
//tag)
|
765
|
+
this.$set('f_items['+index+']',it)
|
766
|
+
if (this.config[this.device.device].items[item].type == 'selector' ||this.config[this.device.device].items[item].type == 'inputSelector') {
|
767
|
+
if(this.config[this.device.device].items[item].type == 'selector'){
|
768
|
+
this.page['options' + index].push({
|
769
|
+
label: "请选择",
|
770
|
+
value: ''
|
771
|
+
})
|
772
|
+
}
|
773
|
+
for (let i in this.config[this.device.device].items[item].options) {
|
774
|
+
this.page['options' + index].push({
|
775
|
+
label: this.config[this.device.device].items[item].options[i].data,
|
776
|
+
value: this.config[this.device.device].items[item].options[i].data
|
777
|
+
})
|
778
|
+
}
|
779
|
+
if(this.config[this.device.device].items[item].type == 'selector'){
|
780
|
+
this.$set('f_items['+index+'].selected', f_item_value)
|
781
|
+
}else if(this.config[this.device.device].items[item].type == 'inputSelector'){
|
782
|
+
this.$set('f_items['+index+'].selected', f_item_value)
|
783
|
+
}
|
784
|
+
|
785
|
+
this.$set('f_items['+index+'].options',this.page['options' + index])
|
786
|
+
|
787
|
+
//tag)
|
788
|
+
} else if (this.config[this.device.device].items[item].type == 'radio' || this.config[this.device.device].items[item].type == 'checkbox') {
|
789
|
+
for (let i in this.config[this.device.device].items[item].options) {
|
790
|
+
this.page['options' + index].push({
|
791
|
+
label: this.config[this.device.device].items[item].options[i].data,
|
792
|
+
value: this.config[this.device.device].items[item].options[i].data,
|
793
|
+
isdefect: this.config[this.device.device].items[item].options[i].isdefect,
|
794
|
+
level: this.config[this.device.device].items[item].options[i].level
|
795
|
+
})
|
796
|
+
}
|
797
|
+
this.$set('f_items[' + index + '].options', this.page['options' + index])
|
798
|
+
this.$set('f_items[' + index + '].f_item_value', f_item_value)
|
799
|
+
//tag)
|
800
|
+
}
|
801
|
+
n = n + 1
|
802
|
+
}
|
803
|
+
//tag)
|
804
|
+
//tag)
|
805
|
+
//tag)
|
806
|
+
if(JSON.stringify(this.piece) == '{}') {
|
807
|
+
// 如果没有,则新建
|
808
|
+
this.$set('piece.f_items',this.f_items)
|
809
|
+
this.$set('piece.f_device_type',this.device.device)
|
810
|
+
} else {
|
811
|
+
// 已经存在,把之前的数据重新填入
|
812
|
+
for (let f in this.f_items){
|
813
|
+
for(let p in this.piece.f_items) {
|
814
|
+
if (this.f_items[f].f_item_name == this.piece.f_items[p].f_item_name) {
|
815
|
+
//tag)
|
816
|
+
//tag)
|
817
|
+
//tag)
|
818
|
+
//tag)
|
819
|
+
this.f_items[f] = Object.assign(this.f_items[f], this.piece.f_items[p])
|
820
|
+
//tag)
|
821
|
+
if (this.f_items[f].type == 'selector' || this.f_items[f].type == 'inputSelector') {
|
822
|
+
//tag)
|
823
|
+
//tag)
|
824
|
+
this.f_items[f].selected = this.piece.f_items[p].f_item_value
|
825
|
+
//tag)
|
826
|
+
}
|
827
|
+
// 取出特殊值
|
828
|
+
if (this.f_items[f].f_item_name == '初始表底') {
|
829
|
+
//tag)
|
830
|
+
this.f_initial_base.index = f
|
831
|
+
} else if (this.f_items[f].f_item_name == '上期表读数') {
|
832
|
+
//tag)
|
833
|
+
this.f_prior_reading.index = f
|
834
|
+
} else if (this.f_items[f].f_item_name == '本期表读数') {
|
835
|
+
//tag)
|
836
|
+
this.f_issue_reading.index = f
|
837
|
+
/*this.$watch('f_items[' + f + '].f_item_value', function () {
|
838
|
+
this.getTableBaseNumber()
|
839
|
+
this.getGasBalanceNumber()
|
840
|
+
})*/
|
841
|
+
} else if (this.f_items[f].f_item_name == '累购气量') {
|
842
|
+
//tag)
|
843
|
+
this.f_total_gas.index = f
|
844
|
+
} else if (this.f_items[f].f_item_name == '已用气量') {
|
845
|
+
//tag)
|
846
|
+
this.f_table_base.index = f
|
847
|
+
/*this.$watch('f_items[' + f + '].f_item_value', function () {
|
848
|
+
this.getGasAberrantNumber('已用气量')
|
849
|
+
})*/
|
850
|
+
} else if (this.f_items[f].f_item_name == '剩余气量') {
|
851
|
+
//tag)
|
852
|
+
this.f_gas_balance.index = f
|
853
|
+
/*this.$watch('f_items[' + f + '].f_item_value', function () {
|
854
|
+
this.getGasAberrantNumber('')
|
855
|
+
})*/
|
856
|
+
} else if (this.f_items[f].f_item_name == '气量异常差值') {
|
857
|
+
//tag)
|
858
|
+
this.f_gas_aberrant_number.index = f
|
859
|
+
} else if (this.f_items[f].f_item_name == '累购金额') {
|
860
|
+
//tag)
|
861
|
+
this.f_total_fee.index = f
|
862
|
+
} else if (this.f_items[f].f_item_name == '已用金额') {
|
863
|
+
//tag)
|
864
|
+
this.f_fee_base.index = f
|
865
|
+
this.$watch('f_items[' + f + '].f_item_value', function () {
|
866
|
+
this.getFeeAberrantNumber('已用金额')
|
867
|
+
})
|
868
|
+
} else if (this.f_items[f].f_item_name == '剩余金额') {
|
869
|
+
//tag)
|
870
|
+
this.f_fee_balance.index = f
|
871
|
+
this.$watch('f_items[' + f + '].f_item_value', function () {
|
872
|
+
this.getFeeAberrantNumber('')
|
873
|
+
})
|
874
|
+
} else if (this.f_items[f].f_item_name == '金额异常差值') {
|
875
|
+
//tag)
|
876
|
+
this.f_fee_aberrant_number.index = f
|
877
|
+
}
|
878
|
+
}
|
879
|
+
}
|
880
|
+
for (let em in this.config[this.device.device].items) {
|
881
|
+
if (this.config[this.device.device].items[em].type == 'selector' && em == this.f_items[f].f_item_name) {
|
882
|
+
this.f_items[f].options =[]
|
883
|
+
for (let k in this.config[this.device.device].items[em].options) {
|
884
|
+
this.f_items[f].options.push({
|
885
|
+
label: this.config[this.device.device].items[em].options[k].data,
|
886
|
+
value: this.config[this.device.device].items[em].options[k].data
|
887
|
+
})
|
888
|
+
}
|
889
|
+
}
|
890
|
+
}
|
891
|
+
if (this.f_items[f].f_item_name == '安装日期') {
|
892
|
+
//tag)
|
893
|
+
this.f_install_date.index = f
|
894
|
+
this.$watch('f_items[' + f + '].f_item_value', function () {
|
895
|
+
this.getscrapNumber()
|
896
|
+
})
|
897
|
+
}else if (this.f_items[f].f_item_name == '使用年限') {
|
898
|
+
//tag)
|
899
|
+
this.f_use_limit.index = f
|
900
|
+
this.$watch('f_items[' + f + '].f_item_value', function () {
|
901
|
+
this.getscrapNumber()
|
902
|
+
})
|
903
|
+
}else if (this.f_items[f].f_item_name == '到期日期') {
|
904
|
+
//tag)
|
905
|
+
this.f_scrap_date.index = f
|
906
|
+
}
|
907
|
+
}
|
908
|
+
//tag)
|
909
|
+
this.$set('piece.f_items',this.f_items)
|
910
|
+
}
|
911
|
+
this.towatch()
|
912
|
+
},
|
913
|
+
destroyed(){
|
914
|
+
let nullCount = 0
|
915
|
+
let metertitles
|
916
|
+
//判断当前是否有选中项
|
917
|
+
for (let row in this.f_items){
|
918
|
+
if(this.f_items[row].selected && this.f_items[row].selected != '' && this.f_items[row].selected instanceof Array){
|
919
|
+
//tag
|
920
|
+
this.f_items[row].f_item_value = this.f_items[row].selected
|
921
|
+
}else if(this.f_items[row].selected && this.f_items[row].selected != ''){
|
922
|
+
//tag
|
923
|
+
this.f_items[row].f_item_value = this.f_items[row].selected
|
924
|
+
}
|
925
|
+
// if(this.f_items[row].f_item_value instanceof Array && this.f_items[row].f_item_value.length != 0 ){
|
926
|
+
// nullCount = nullCount+1
|
927
|
+
// }else if(this.f_items[row].f_item_value != ''){
|
928
|
+
// nullCount = nullCount+1
|
929
|
+
// }
|
930
|
+
}
|
931
|
+
let picture = []
|
932
|
+
// for (let row in this.f_items){
|
933
|
+
// let a={}
|
934
|
+
// a.f_path = this.f_items[row].f_path
|
935
|
+
// a.name = this.f_items[row].f_item_name
|
936
|
+
// }
|
937
|
+
// picture.push(a)
|
938
|
+
this.$set(`paper['device${this.device.n}'][${this.idx}]`, this.piece)
|
939
|
+
//tag
|
940
|
+
},
|
941
|
+
computed:{
|
942
|
+
|
943
|
+
}
|
944
|
+
}
|
945
|
+
</script>
|
946
|
+
<style lang="less" scoped>
|
947
|
+
.class-erro {
|
948
|
+
color: #a94442;
|
949
|
+
}
|
950
|
+
.fivelabel{
|
951
|
+
border: none;
|
952
|
+
border-left: 5px solid #A2C2EB;
|
953
|
+
float: left;
|
954
|
+
width: 35%;
|
955
|
+
margin-bottom: 3px;
|
956
|
+
text-align: left;
|
957
|
+
word-wrap: break-word;
|
958
|
+
white-space: normal;
|
959
|
+
}
|
960
|
+
.radiolabel{
|
961
|
+
border: none;
|
962
|
+
border-left: 5px solid #A2C2EB;
|
963
|
+
float: left;
|
964
|
+
width: 65%;
|
965
|
+
margin-bottom: 3px;
|
966
|
+
text-align: left;
|
967
|
+
word-wrap: break-word;
|
968
|
+
white-space: normal;
|
969
|
+
}
|
970
|
+
|
971
|
+
.textlabel {
|
972
|
+
border: none;
|
973
|
+
border-left: 5px solid #A2C2EB;
|
974
|
+
width: 100%;
|
975
|
+
margin-bottom: 3px;
|
976
|
+
text-align: left;
|
977
|
+
word-wrap: break-word;
|
978
|
+
white-space: normal;
|
979
|
+
}
|
980
|
+
.spanrodio{
|
981
|
+
margin-right: 10px;
|
982
|
+
}
|
983
|
+
.div-photo{
|
984
|
+
width: auto;
|
985
|
+
height: auto;
|
986
|
+
/* margin-top: 10px; */
|
987
|
+
position: absolute;
|
988
|
+
bottom: 10px;
|
989
|
+
right: 10px;
|
990
|
+
}
|
991
|
+
.btn-photo{
|
992
|
+
border: 0;
|
993
|
+
border-radius: 7px;
|
994
|
+
background-color: #7dc1f4;
|
995
|
+
font: 15px PingFang-SC-Bold;
|
996
|
+
height: 20%;
|
997
|
+
}
|
998
|
+
</style>
|
999
|
+
|