safecheck-client 3.0.34-42 → 3.0.34-44
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 +1 -1
- package/src/components/android/QRCode/QRCodeBinding.vue +300 -300
- package/src/components/android/QRCode/QRCodePage.vue +212 -212
- package/src/components/android/examples/SafeListExamples.vue +1 -1
- package/src/components/android/examples/UserExamples.vue +1 -1
- package/src/components/rongcheng/AspiratedPaperFeedbackm.vue +1045 -1045
- package/src/components/rongcheng/AspiratedPaperMessage.vue +1378 -1378
- package/src/components/rongcheng/PaperListNPSQ.vue +455 -455
- package/src/components/rongcheng/PaperListSQ.vue +444 -444
- package/src/components/rongcheng/PaperStatem.vue +419 -414
- package/src/components/rongcheng/PhoneUpUserinfo.vue +1328 -1328
- package/src/filiale/bayan/android/SafecheckOrderV.vue +2889 -2889
- package/src/filiale/tongchuan/android/Select.vue +421 -421
- package/src/filiale/tongchuan/android.js +21 -21
- package/src/filiale/tongchuan/utils/EventListener.js +29 -29
- package/src/filiale/tongchuan/utils/coerceBoolean.js +7 -7
- package/src/main.js +33 -33
- package/src/rongcheng.js +316 -316
@@ -1,1328 +1,1328 @@
|
|
1
|
-
<template>
|
2
|
-
<work-busy :is-busy="excessive"></work-busy>
|
3
|
-
<div style="height: 100%">
|
4
|
-
<div class="panel auto" v-if="false">
|
5
|
-
<div class="panel-heading" @click="selectVal('基本信息')" style="background-color: #ffffff">
|
6
|
-
<span class="spanboder">
|
7
|
-
<img src="../../assets/person.png" style="width: 22px;margin-right: 8px;">基本信息
|
8
|
-
<img class="butt3" :src="imgback('基本信息')">
|
9
|
-
</span>
|
10
|
-
</div>
|
11
|
-
<div class="panel-body " id="upuserinfo_sel" v-show="headername == '基本信息'">
|
12
|
-
<div class="row auto" style="margin: 5px 0">
|
13
|
-
<label class="righttxt">用户编号:</label>
|
14
|
-
<input type="text" class="form-control rightipt" v-model="userinfo.baseinfo.base.f_userinfo_code" readonly />
|
15
|
-
</div>
|
16
|
-
<div class="row auto" style="margin: 5px 0">
|
17
|
-
<label class="righttxt">用户名称:</label><input type="text" class="form-control rightipt"
|
18
|
-
v-model="userinfo.baseinfo.base.f_user_name" readonly />
|
19
|
-
</div>
|
20
|
-
<div class="row auto" style="margin: 5px 0">
|
21
|
-
<label class="righttxt">用户状态:</label><input type="text" class="form-control rightipt" readonly
|
22
|
-
v-model="userinfo.baseinfo.base.f_user_state" />
|
23
|
-
</div>
|
24
|
-
<div class="row auto" style="margin: 5px 0">
|
25
|
-
<label class="righttxt">用户电话:</label><input type="text" class="form-control rightipt"
|
26
|
-
v-model="userinfo.baseinfo.base.f_user_phone" />
|
27
|
-
</div>
|
28
|
-
<div class="row auto" style="margin: 5px 0">
|
29
|
-
<label class="righttxt">租户姓名:</label><input type="text" class="form-control rightipt"
|
30
|
-
v-model="userinfo.baseinfo.base.f_rent_name" />
|
31
|
-
</div>
|
32
|
-
<div class="row auto" style="margin: 5px 0">
|
33
|
-
<label class="righttxt">租户电话:</label><input type="text" class="form-control rightipt"
|
34
|
-
v-model="userinfo.baseinfo.base.f_zuhu_phone" />
|
35
|
-
</div>
|
36
|
-
<div class="row auto" style="margin: 5px 0">
|
37
|
-
<label class="righttxt">建档日期:</label><input type="text" class="form-control rightipt"
|
38
|
-
v-model="userinfo.baseinfo.base.f_createfile_date" readonly />
|
39
|
-
</div>
|
40
|
-
<!-- <div class="row auto" style="margin: 5px 0">
|
41
|
-
<label class="righttxt">开户日期:</label><input type="text" class="form-control rightipt" v-model="userinfo.baseinfo.base.f_open_date" readonly />
|
42
|
-
</div>-->
|
43
|
-
<div class="row auto" style="margin: 5px 0">
|
44
|
-
<label class="righttxt">地址类型:</label>
|
45
|
-
<div class="rightipt" style="display: flex;justify-content: space-around;margin-top: 5px">
|
46
|
-
<div><input type="radio" v-model="addressType" name="addressType" @change="changeAddressType"
|
47
|
-
id="phone_addressType1" value="普通地址" /><label style="font-weight: normal;padding-left: 2px"
|
48
|
-
for="phone_addressType1">普通地址</label></div>
|
49
|
-
<div><input type="radio" v-model="addressType" name="addressType" @change="changeAddressType"
|
50
|
-
id="phone_addressType2" value="特殊地址" /><label style="font-weight: normal;padding-left: 2px"
|
51
|
-
for="phone_addressType2">特殊地址</label></div>
|
52
|
-
</div>
|
53
|
-
<!--<input type="text" style="width: 75%;float:right" class="form-control" v-model="row.f_devices_type" />-->
|
54
|
-
<!--<input type="text" class="form-control rightipt" readonly v-model="userinfo.addressinfo.f_pcd" />-->
|
55
|
-
<!--<v-select :value.sync="userinfo.addressinfo.f_iscity" class="input-font" style="margin-left: 5%;"
|
56
|
-
:width="'60%'"
|
57
|
-
v-model="userinfo.addressinfo.f_iscity"
|
58
|
-
:options='cityTypes' placeholder='地区类型' close-on-select clear-button value-single @change="area_change()"></v-select>-->
|
59
|
-
</div>
|
60
|
-
<div class="row auto" style="margin: 5px 0">
|
61
|
-
<label class="righttxt">地区类型:</label>
|
62
|
-
<!--<input type="text" style="width: 75%;float:right" class="form-control" v-model="row.f_devices_type" />-->
|
63
|
-
<input type="text" class="form-control rightipt" readonly v-model="userinfo.addressinfo.f_iscity" />
|
64
|
-
<!--<v-select :value.sync="userinfo.addressinfo.f_iscity" class="input-font" style="margin-left: 5%;"
|
65
|
-
:width="'60%'"
|
66
|
-
:disabled="true"
|
67
|
-
v-model="userinfo.addressinfo.f_iscity"
|
68
|
-
:options='cityTypes' placeholder='地区类型' close-on-select clear-button value-single ></v-select>-->
|
69
|
-
</div>
|
70
|
-
<div class="row auto" style="margin: 5px 0">
|
71
|
-
<label class="righttxt">省 市 区:</label>
|
72
|
-
<!--<input type="text" style="width: 75%;float:right" class="form-control" v-model="row.f_devices_type" />-->
|
73
|
-
<!--<input type="text" class="form-control rightipt" readonly v-model="userinfo.addressinfo.f_pcd" />-->
|
74
|
-
<v-select :value.sync="selectPcd" class="input-font" style="margin-left: 5%;" :width="'60%'"
|
75
|
-
v-model="selectPcd" :options='pcds' placeholder='请选择省市区' close-on-select clear-button value-single
|
76
|
-
@change="pcd_change()"></v-select>
|
77
|
-
</div>
|
78
|
-
<div class="row auto" style="margin: 5px 0">
|
79
|
-
<label class="righttxt">街道名称:</label>
|
80
|
-
<!--<input type="text" readonly class="form-control rightipt" v-model="userinfo.addressinfo.f_street" />-->
|
81
|
-
<v-select :value.sync="selectStreet" class="input-font" style="margin-left: 5%;" :width="'60%'"
|
82
|
-
v-model="selectStreet" :options='streets' placeholder='请选择街道' close-on-select clear-button value-single
|
83
|
-
@change="street_change()"></v-select>
|
84
|
-
</div>
|
85
|
-
<div class="row auto" style="margin: 5px 0">
|
86
|
-
<label class="righttxt">集收单位:</label>
|
87
|
-
<!--<input type="text" readonly class="form-control rightipt" v-model="userinfo.addressinfo.f_residential_area" />-->
|
88
|
-
<v-select :value.sync="selectArea" class="input-font" style="margin-left: 5%;" :width="'60%'"
|
89
|
-
v-model="selectArea" :timeout="500" @select-search="select_search" :options='area' placeholder='请选择集收单位'
|
90
|
-
close-on-select clear-button value-single @change="area_change()"></v-select>
|
91
|
-
</div>
|
92
|
-
<!--<div class="row auto" style="margin: 5px 0" v-show="addressType=='特殊地址'">
|
93
|
-
<label class="righttxt">集收单位:</label>
|
94
|
-
<!–<input type="text" readonly class="form-control rightipt" v-model="userinfo.addressinfo.f_residential_area" />–>
|
95
|
-
<v-select :value.sync="selectArea" class="input-font" style="margin-left: 5%;"
|
96
|
-
:width="'60%'"
|
97
|
-
v-model="selectArea"
|
98
|
-
@select-search="select_search"
|
99
|
-
:options='area' placeholder='请选择集收单位' close-on-select clear-button value-single @change="area_changeTC()"></v-select>
|
100
|
-
</div>-->
|
101
|
-
<div class="row auto" style="margin: 5px 0" v-show="addressType == '普通地址'">
|
102
|
-
<label class="righttxt">楼    号:</label><input type="text" @change="changeNewAddress"
|
103
|
-
class="form-control rightipt" v-model="userinfo.addressinfo.f_building" />
|
104
|
-
</div>
|
105
|
-
<div class="row auto" style="margin: 5px 0" v-show="addressType == '普通地址'">
|
106
|
-
<label class="righttxt">单    元:</label><input type="text" @change="changeNewAddress"
|
107
|
-
class="form-control rightipt" v-model="userinfo.addressinfo.f_unit" />
|
108
|
-
</div>
|
109
|
-
<div class="row auto" style="margin: 5px 0" v-show="addressType == '普通地址'">
|
110
|
-
<label class="righttxt">楼    层:</label><input type="text" @change="changeNewAddress"
|
111
|
-
class="form-control rightipt" v-model="userinfo.addressinfo.f_floor" />
|
112
|
-
</div>
|
113
|
-
<div class="row auto" style="margin: 5px 0" v-show="addressType == '普通地址'">
|
114
|
-
<label class="righttxt">门 牌 号:</label><input type="text" @change="changeNewAddress"
|
115
|
-
class="form-control rightipt" v-model="userinfo.addressinfo.f_room" />
|
116
|
-
</div>
|
117
|
-
<div class="row auto" style="margin: 5px 0">
|
118
|
-
<label class="righttxt">详细地址:</label><input type="text" class="form-control rightipt" readonly
|
119
|
-
v-model="userinfo_old.addressinfo.f_address" />
|
120
|
-
</div>
|
121
|
-
<div class="row auto" style="margin: 5px 0">
|
122
|
-
<label class="righttxt">新 地 址:</label>
|
123
|
-
<!--<input type="text" class="form-control rightipt" readonly v-model="getaddress()" />-->
|
124
|
-
<textarea :readonly="addressType == '普通地址'" class="form-control rightipt" : style="height: 80px"
|
125
|
-
v-model="userinfo.addressinfo.f_address"></textarea>
|
126
|
-
</div>
|
127
|
-
|
128
|
-
<!--<div class="row auto" style="margin: 5px 0" v-show="addressType=='特殊地址'">
|
129
|
-
<label class="righttxt">新 地 址:</label><!–<input type="text" class="form-control rightipt" v-model="userinfo.addressinfo.f_address" />–>
|
130
|
-
<textarea class="form-control rightipt" style="height: 80px" v-model="getAddressTS"></textarea>
|
131
|
-
</div>-->
|
132
|
-
|
133
|
-
<div class="row auto" style="margin: 5px 0">
|
134
|
-
<label class="righttxt">备    注:</label><textarea class="form-control rightipt"
|
135
|
-
style="height: 150px" v-model="userinfo.baseinfo.base.f_remark"></textarea>
|
136
|
-
<!--<input type="text" class="form-control rightipt" v-model="userinfo.baseinfo.base.f_remark" />-->
|
137
|
-
</div>
|
138
|
-
</div>
|
139
|
-
</div>
|
140
|
-
<div class="panel auto" v-if="false">
|
141
|
-
<div class="panel-heading" @click="selectVal('表具信息')" style="background-color: #ffffff">
|
142
|
-
<span class="spanboder">
|
143
|
-
<img src="../../assets/person.png" style="width: 22px;margin-right: 8px;">表具信息
|
144
|
-
<img class="butt3" :src="imgback('表具信息')">
|
145
|
-
</span>
|
146
|
-
</div>
|
147
|
-
<div class="panel-body " v-show="headername == '表具信息'">
|
148
|
-
<div class="row auto" style="margin: 5px 0">
|
149
|
-
<label class="righttxt">表    号:</label>
|
150
|
-
<input type="text" :readonly="userinfo.meterinfo[0].f_meter_classify != '机表'" class="form-control rightipt"
|
151
|
-
style="width: 45%" v-model="userinfo.meterinfo[0].f_meternumber" />
|
152
|
-
<button type="button"
|
153
|
-
:disabled="!(userinfo.meterinfo[0].f_meter_classify == '机表' || userinfo.meterinfo[0].f_meter_classify == '金额卡表' || userinfo.meterinfo[0].f_meter_classify == '气量卡表')"
|
154
|
-
name="button" class="btn btn-primary" style="width: 15%" @click="scan">扫码
|
155
|
-
</button>
|
156
|
-
</div>
|
157
|
-
|
158
|
-
<div class="row auto" style="margin: 5px 0">
|
159
|
-
<label class="righttxt">通 气 人:</label>
|
160
|
-
<input type="text" class="form-control rightipt" v-model="userinfo.meterinfo[0].f_gas_person" />
|
161
|
-
</div>
|
162
|
-
<div class="row auto" style="margin: 5px 0">
|
163
|
-
<label class="righttxt">通气时间:</label>
|
164
|
-
<datepicker class="rightipt" :value.sync="userinfo.meterinfo[0].f_gas_date"
|
165
|
-
v-model="userinfo.meterinfo[0].f_gas_date" :disabled-days-of-Week="[]" :format="'yyyy-MM-dd'"
|
166
|
-
:show-reset-button="reset">
|
167
|
-
</datepicker>
|
168
|
-
</div>
|
169
|
-
<div class="row auto" style="margin: 5px 0" v-show="showBox">
|
170
|
-
<label class="righttxt">调 压 箱:</label>
|
171
|
-
<v-select class="rightipt" :value.sync="userinfo.meterinfo[0].f_adjustable_id"
|
172
|
-
v-model="userinfo.meterinfo[0].f_adjustable_id" placeholder='请选择' :width='wid' readonly
|
173
|
-
:options="boxOptions" close-on-select value-single></v-select>
|
174
|
-
</div>
|
175
|
-
<div class="row auto" style="margin: 5px 0">
|
176
|
-
<label class="righttxt">是否直通:</label>
|
177
|
-
<v-select :value.sync="userinfo.meterinfo[0].f_if_direct" class="input-font" style="margin-left: 5%;"
|
178
|
-
:width="'60%'" v-model="userinfo.meterinfo[0].f_if_direct" :options='directOptions' placeholder='是否直通'
|
179
|
-
close-on-select clear-button value-single>
|
180
|
-
</v-select>
|
181
|
-
</div>
|
182
|
-
<div class="row auto" style="margin: 5px 0">
|
183
|
-
<label class="righttxt">表 封 号:</label>
|
184
|
-
<input type="text" class="form-control rightipt" v-model="userinfo.meterinfo[0].f_metertitles" />
|
185
|
-
</div>
|
186
|
-
<div class="row auto" style="margin: 5px 0">
|
187
|
-
<label class="righttxt">表 位 置:</label>
|
188
|
-
<!--<input type="text" class="form-control rightipt" v-model="userinfo.meterinfo[0].f_position" readonly/>-->
|
189
|
-
<v-select class="rightipt" :value.sync="userinfo.meterinfo[0].f_position"
|
190
|
-
v-model="userinfo.meterinfo[0].f_position" placeholder='请选择' :width='wid' readonly :options="wz_types"
|
191
|
-
close-on-select value-single></v-select>
|
192
|
-
</div>
|
193
|
-
<div class="row auto" style="margin: 5px 0">
|
194
|
-
<label class="righttxt">表    向:</label>
|
195
|
-
<!--<input type="text" class="form-control rightipt" v-model="userinfo.meterinfo[0].f_position" readonly/>-->
|
196
|
-
<v-select class="rightipt" :value.sync="userinfo.meterinfo[0].f_aroundmeter"
|
197
|
-
v-model="userinfo.meterinfo[0].f_aroundmeter" placeholder='请选择' :width='wid' readonly
|
198
|
-
:options="aroundmeters" close-on-select value-single></v-select>
|
199
|
-
</div>
|
200
|
-
<div class="row auto" style="margin: 5px 0">
|
201
|
-
<label class="righttxt">气表类型:</label>
|
202
|
-
<input type="text" class="form-control rightipt" v-model="userinfo.meterinfo[0].f_meter_classify" readonly />
|
203
|
-
</div>
|
204
|
-
<div class="row auto" style="margin: 5px 0">
|
205
|
-
<label class="righttxt">表前阀状态:</label>
|
206
|
-
<!--<input type="text" class="form-control rightipt" v-model="userinfo.meterinfo[0].f_position" readonly/>-->
|
207
|
-
<v-select class="rightipt" :value.sync="userinfo.meterinfo[0].f_bqf_state"
|
208
|
-
v-model="userinfo.meterinfo[0].f_bqf_state" placeholder='请选择' :width='wid' readonly :options="bqf_states"
|
209
|
-
close-on-select value-single></v-select>
|
210
|
-
</div>
|
211
|
-
<!-- <div class="row auto" style="margin: 5px 0">
|
212
|
-
<div style="display: flex;justify-content: center;">
|
213
|
-
<button v-if="userinfo.meterinfo[0].f_meter_classify=='机表'" class="col-sm-3 btn btn-primary" @click="upUserState()">机表关阀停用</button>
|
214
|
-
</div>
|
215
|
-
</div>-->
|
216
|
-
</div>
|
217
|
-
</div>
|
218
|
-
<div class="panel auto">
|
219
|
-
<div class="panel-heading" @click="selectVal('用气设备信息')" style="background-color: #ffffff">
|
220
|
-
<span class="spanboder"><img src="../../assets/list.png" style="width: 22px;margin-right: 8px;">用气设备信息<img
|
221
|
-
class="butt3" :src="imgback('用气设备信息')"></span>
|
222
|
-
</div>
|
223
|
-
<div class="panel-body" v-show="headername == '用气设备信息'">
|
224
|
-
<div class="row" v-for="(idx, row) in model"
|
225
|
-
style="border:2px solid #A2C2EB; border-top:10px solid #A2C2EB; box-shadow: #00b3ee;margin-bottom: 10px">
|
226
|
-
<div class="row auto" style="margin: 5px 0">
|
227
|
-
<label class="righttxt">设备类型:</label>
|
228
|
-
<!--<input type="text" class="form-control rightipt" readonly v-model="row.f_devices_type" />-->
|
229
|
-
<v-select class="rightipt" :value.sync="row.f_devices_type" v-model="row.f_devices_type" placeholder='请选择'
|
230
|
-
@change="getServiceLife(idx, row.f_devices_type)" :width='wid' readonly :options="devices_types"
|
231
|
-
close-on-select value-single></v-select>
|
232
|
-
</div>
|
233
|
-
<div class="row auto" style="margin: 5px 0">
|
234
|
-
<label class="righttxt">设备品牌:</label>
|
235
|
-
<input type="text" class="form-control rightipt" v-model="row.f_brand" />
|
236
|
-
</div>
|
237
|
-
<div class="row auto" style="margin: 5px 0">
|
238
|
-
<label class="righttxt">设备型号:</label><input type="text" class="form-control rightipt"
|
239
|
-
v-model="row.f_devices_model" />
|
240
|
-
</div>
|
241
|
-
<div class="row auto" style="margin: 5px 0" v-if="false">
|
242
|
-
<label class="righttxt">生产日期:</label>
|
243
|
-
<datepicker class="rightipt" :value.sync="row.f_make_date" v-model="row.f_make_date"
|
244
|
-
:disabled-days-of-Week="[]" :format="'yyyy-MM-dd'" :show-reset-button="reset" readonly="readonly">
|
245
|
-
</datepicker>
|
246
|
-
</div>
|
247
|
-
<div class="row auto" style="margin: 5px 0">
|
248
|
-
<label class="righttxt">安装日期:</label>
|
249
|
-
<datepicker class="rightipt" @change="countExpireFate(idx, row.f_input_date)" :value.sync="row.f_input_date"
|
250
|
-
v-model="row.f_input_date" :disabled-days-of-Week="[]" :format="'yyyy-MM-dd'" :show-reset-button="reset"
|
251
|
-
readonly="readonly">
|
252
|
-
</datepicker>
|
253
|
-
</div>
|
254
|
-
<div class="row auto" style="margin: 5px 0">
|
255
|
-
<label class="righttxt">使用年限:</label><input type="number" class="form-control rightipt"
|
256
|
-
v-model="row.f_service_life" readonly />
|
257
|
-
</div>
|
258
|
-
<div class="row auto" style="margin: 5px 0">
|
259
|
-
<label class="righttxt">到期日期:</label>
|
260
|
-
<input type="text" class="form-control rightipt" v-model="row.f_expire_date" readonly />
|
261
|
-
</div>
|
262
|
-
<div class="row auto" style="margin: 5px 0">
|
263
|
-
<label class="righttxt">安 装 人:</label><input type="text" class="form-control rightipt"
|
264
|
-
v-model="row.f_input_person" />
|
265
|
-
</div>
|
266
|
-
<div class="row auto" style="margin: 5px 0">
|
267
|
-
<label class="righttxt">设备数量:</label><input type="number" class="form-control rightipt"
|
268
|
-
v-model="row.f_devices_num" />
|
269
|
-
</div>
|
270
|
-
<div class="row auto" style="margin: 5px 0">
|
271
|
-
<label class="righttxt">管道类型:</label>
|
272
|
-
<!--<input type="text" class="form-control rightipt" readonly v-model="row.f_devices_type" />-->
|
273
|
-
<v-select class="rightipt" :value.sync="row.f_pipe_type" v-model="row.f_pipe_type" placeholder='请选择'
|
274
|
-
:width='wid' readonly :options="pipe_types" close-on-select value-single></v-select>
|
275
|
-
</div>
|
276
|
-
<div class="row auto" style="margin: 5px 0">
|
277
|
-
<label class="righttxt">安装日期:</label>
|
278
|
-
<datepicker class="rightipt" @change="countExpireFate_pipe(idx, row.f_pipeinstall_date, row.f_pipe_type)"
|
279
|
-
:value.sync="row.f_pipeinstall_date" v-model="row.f_pipeinstall_date" :disabled-days-of-Week="[]"
|
280
|
-
:format="'yyyy-MM-dd'" :show-reset-button="reset" readonly="readonly">
|
281
|
-
</datepicker>
|
282
|
-
</div>
|
283
|
-
<div class="row auto" style="margin: 5px 0">
|
284
|
-
<label class="righttxt">到期日期:</label>
|
285
|
-
<input type="text" class="form-control rightipt" v-model="row.f_pipeexpire_date" readonly />
|
286
|
-
</div>
|
287
|
-
<!--<div class="row auto" style="margin: 5px 0">
|
288
|
-
<label class="righttxt">设备状态:</label><input type="text" class="form-control rightipt" readonly v-model="row.f_userinfodevices_state" />
|
289
|
-
</div>-->
|
290
|
-
<!--<div class="row auto" style="margin: 5px 0">
|
291
|
-
<label class="righttxt">购买方式:</label><input type="text" class="form-control rightipt" readonly v-model="row.watchpurchase" />
|
292
|
-
</div>-->
|
293
|
-
<div style="display: flex;justify-content: center;margin-bottom: 3px"
|
294
|
-
v-if="$index > this.userinfo_old.devicesinfo.length - 1 || this.userinfo_old.devicesinfo.length == 0">
|
295
|
-
<button class="btn btn-warning" @click="delDevices($index)">删除设备</button>
|
296
|
-
</div>
|
297
|
-
</div>
|
298
|
-
<div style="display: flex;justify-content: space-around;">
|
299
|
-
<button class="col-sm-3 btn btn-primary" @click="addDevices($index)">新增设备</button>
|
300
|
-
</div>
|
301
|
-
</div>
|
302
|
-
</div>
|
303
|
-
<div class="panel auto">
|
304
|
-
<div class="panel-heading" @click="selectVal('设备信息')" style="background-color: #ffffff">
|
305
|
-
<span class="spanboder"><img src="../../assets/list.png" style="width: 22px;margin-right: 8px;">设备信息<img
|
306
|
-
class="butt3" :src="imgback('设备信息')"></span>
|
307
|
-
</div>
|
308
|
-
<div class="panel-body" v-show="headername == '设备信息'">
|
309
|
-
<div class="row" v-for="(idx, row) in devicemodel"
|
310
|
-
style="border:2px solid #A2C2EB; border-top:10px solid #A2C2EB; box-shadow: #00b3ee;margin-bottom: 10px">
|
311
|
-
<div class="row auto" style="margin: 5px 0">
|
312
|
-
<label class="righttxt">设备类型:</label>
|
313
|
-
<v-select class="rightipt" :value.sync="row.f_devices_type" v-model="row.f_devices_type" placeholder='请选择'
|
314
|
-
:width='wid' readonly :options="device_type"
|
315
|
-
close-on-select value-single></v-select>
|
316
|
-
</div>
|
317
|
-
<div class="row auto" style="margin: 5px 0">
|
318
|
-
<label class="righttxt">厂家:</label>
|
319
|
-
<input type="text" class="form-control rightipt" v-model="row.f_manufactor" />
|
320
|
-
</div>
|
321
|
-
<div class="row auto" style="margin: 5px 0">
|
322
|
-
<label class="righttxt">设备编号:</label><input type="text" class="form-control rightipt"
|
323
|
-
v-model="row.f_devices_model" />
|
324
|
-
</div>
|
325
|
-
<div class="row auto" style="margin: 5px 0">
|
326
|
-
<label class="righttxt">设备型号:</label><input type="text" class="form-control rightipt"
|
327
|
-
v-model="row.f_devices_model" />
|
328
|
-
</div>
|
329
|
-
<div class="row auto" style="margin: 5px 0">
|
330
|
-
<label class="righttxt">安 装 人:</label><input type="text" class="form-control rightipt"
|
331
|
-
v-model="row.f_instaler_person" />
|
332
|
-
</div>
|
333
|
-
<div class="row auto" style="margin: 5px 0">
|
334
|
-
<label class="righttxt">安装日期:</label>
|
335
|
-
<datepicker class="rightipt" :value.sync="row.f_input_date"
|
336
|
-
v-model="row.f_input_date" :disabled-days-of-Week="[]" :format="'yyyy-MM-dd'" :show-reset-button="reset"
|
337
|
-
readonly="readonly">
|
338
|
-
</datepicker>
|
339
|
-
</div>
|
340
|
-
<div class="row auto" style="margin: 5px 0" >
|
341
|
-
<label class="righttxt">生产日期:</label>
|
342
|
-
<datepicker class="rightipt" :value.sync="row.f_make_date" v-model="row.f_make_date"
|
343
|
-
:disabled-days-of-Week="[]" :format="'yyyy-MM-dd'" :show-reset-button="reset" >
|
344
|
-
</datepicker>
|
345
|
-
</div>
|
346
|
-
<div class="row auto" style="margin: 5px 0">
|
347
|
-
<label class="righttxt">设备数量:</label>
|
348
|
-
<input type="number" class="form-control rightipt" v-model="row.f_devices_num" />
|
349
|
-
</div>
|
350
|
-
<div class="row auto" style="margin: 5px 0" v-show="row.f_devices_type == '报警器'">
|
351
|
-
<label class="righttxt">首校日期:</label>
|
352
|
-
<datepicker class="rightipt" :value.sync="row.f_firstcheck_date" v-model="row.f_firstcheck_date"
|
353
|
-
:disabled-days-of-Week="[]" :format="'yyyy-MM-dd'" :show-reset-button="reset" >
|
354
|
-
</datepicker>
|
355
|
-
</div>
|
356
|
-
<div class="row auto" style="margin: 5px 0" v-show="row.f_devices_type == '报警器'">
|
357
|
-
<label class="righttxt">报废日期:</label>
|
358
|
-
<datepicker class="rightipt" :value.sync="row.f_expire_date" v-model="row.f_expire_date"
|
359
|
-
:disabled-days-of-Week="[]" :format="'yyyy-MM-dd'" :show-reset-button="reset" >
|
360
|
-
</datepicker>
|
361
|
-
</div>
|
362
|
-
<div class="row auto" style="margin: 5px 0" v-show="row.f_devices_type == '报警器'">
|
363
|
-
<label class="righttxt">下次校验:</label>
|
364
|
-
<datepicker class="rightipt" :value.sync="row.f_nextcheck_date" v-model="row.f_nextcheck_date"
|
365
|
-
:disabled-days-of-Week="[]" :format="'yyyy-MM-dd'" :show-reset-button="reset" >
|
366
|
-
</datepicker>
|
367
|
-
</div>
|
368
|
-
<div class="row auto" style="margin: 5px 0" v-show="row.f_devices_type == '切断阀'">
|
369
|
-
<label class="righttxt">报废日期:</label>
|
370
|
-
<datepicker class="rightipt" :value.sync="row.f_expire_date" v-model="row.f_expire_date"
|
371
|
-
:disabled-days-of-Week="[]" :format="'yyyy-MM-dd'" :show-reset-button="reset" >
|
372
|
-
</datepicker>
|
373
|
-
</div>
|
374
|
-
<div class="row auto" style="margin: 5px 0" v-show="row.f_devices_type == '调压器'">
|
375
|
-
<label class="righttxt">流量:</label>
|
376
|
-
<input type="number" class="form-control rightipt" v-model="row.f_rate_flow" />
|
377
|
-
</div>
|
378
|
-
<div class="row auto" style="margin: 5px 0" v-show="row.f_devices_type == '调压器'">
|
379
|
-
<label class="righttxt">出口压力:</label>
|
380
|
-
<input type="text" class="form-control rightipt" v-model="row.f_pressure_range" />
|
381
|
-
</div>
|
382
|
-
<div class="row auto" style="margin: 5px 0" v-show="row.f_devices_type == '调压器'">
|
383
|
-
<label class="righttxt">进口压力:</label>
|
384
|
-
<input type="text" class="form-control rightipt" v-model="row.f_import_pressure" />
|
385
|
-
</div>
|
386
|
-
<div style="display: flex;justify-content: center;margin-bottom: 3px">
|
387
|
-
<button class="btn btn-warning" @click="deleteDevice($index)">删除设备</button>
|
388
|
-
</div>
|
389
|
-
</div>
|
390
|
-
<div style="display: flex;justify-content: space-around;">
|
391
|
-
<button class="col-sm-3 btn btn-primary" @click="pushDevices($index)">新增设备</button>
|
392
|
-
</div>
|
393
|
-
</div>
|
394
|
-
</div>
|
395
|
-
<div class="panel auto">
|
396
|
-
<div class="panel-body">
|
397
|
-
<div style="display: flex;justify-content: center;">
|
398
|
-
<!-- <button class="col-sm-3 btn btn-primary" :disabled="enable" @click="isNeedAudit ? editUserInfo() : editUserInfoNoAudit()">{{isNeedAudit ? '上传审核' : '上传'}}</button>-->
|
399
|
-
<button class="col-sm-3 btn btn-primary" :disabled="enable" @click="editUserInfo()">上传</button>
|
400
|
-
</div>
|
401
|
-
</div>
|
402
|
-
</div>
|
403
|
-
</div>
|
404
|
-
</template>
|
405
|
-
|
406
|
-
<script>
|
407
|
-
import { HttpResetClass } from 'vue-client'
|
408
|
-
import * as Util from "../Util";
|
409
|
-
import Vue from 'vue'
|
410
|
-
import { toStandardDateString } from "../Util";
|
411
|
-
|
412
|
-
export default {
|
413
|
-
title: '设备查看',
|
414
|
-
data() {
|
415
|
-
return {
|
416
|
-
model: [],
|
417
|
-
devicemodel:[],
|
418
|
-
show: false,
|
419
|
-
row: Object,
|
420
|
-
userinfo: Object,
|
421
|
-
userinfo_old: Object,
|
422
|
-
wid: "60%",
|
423
|
-
aroundmeters: [],
|
424
|
-
devices_types: [],
|
425
|
-
device_type: [{label: '调压器', value: '调压器'}, {label: '报警器', value: '报警器'}, {label: '切断阀', value: '切断阀'}],
|
426
|
-
pipe_types: [{label: '包覆管', value: '包覆管'}, {label: '波纹管', value: '波纹管'}],
|
427
|
-
wz_types: [],
|
428
|
-
cityTypes: [{ label: '市区', value: '市区' }, { label: '城镇', value: '城镇' }],
|
429
|
-
bqf_states: [{ label: '开阀', value: '开阀' }, { label: '关阀', value: '关阀' }],
|
430
|
-
pcds: [],
|
431
|
-
streets: [],
|
432
|
-
update: false,
|
433
|
-
headername: '用气设备信息',
|
434
|
-
excessive: false,
|
435
|
-
area: [],
|
436
|
-
enable: false,
|
437
|
-
f_meterno_path: Vue.nopic,
|
438
|
-
selectArea: { id: '' },
|
439
|
-
selectPcd: { id: '' },
|
440
|
-
selectStreet: { id: '' },
|
441
|
-
changemeterno: false,//是否修改了机表表号
|
442
|
-
approveChange: false,//是否需要进行信息变更审核
|
443
|
-
newAddress: '',
|
444
|
-
addressType: '',
|
445
|
-
//需要审核的字段
|
446
|
-
checkField: {
|
447
|
-
checkUserinfoField: [
|
448
|
-
'f_user_name'
|
449
|
-
],
|
450
|
-
checkUserFilesField: [
|
451
|
-
'f_meternumber'
|
452
|
-
],
|
453
|
-
checkAddressField: [
|
454
|
-
'f_pcd_id',
|
455
|
-
'f_street_id',
|
456
|
-
'f_residential_area_id',
|
457
|
-
'f_building',
|
458
|
-
'f_unit',
|
459
|
-
'f_floor',
|
460
|
-
'f_room',
|
461
|
-
'f_slice_area',
|
462
|
-
'f_special',
|
463
|
-
'f_address'
|
464
|
-
],
|
465
|
-
},
|
466
|
-
boxOptions: [],
|
467
|
-
showBox: false,
|
468
|
-
directOptions: [{ label: '是', value: '是' }, { label: '否', value: '否' }],
|
469
|
-
deviceBrandOption: {},
|
470
|
-
isNeedAudit: this.$appdata.getSingleValue('信息变更是否需要审核') == 'false' ? false : true
|
471
|
-
}
|
472
|
-
},
|
473
|
-
props: {
|
474
|
-
user: {
|
475
|
-
type: Object
|
476
|
-
},
|
477
|
-
f_userinfo_id: '',
|
478
|
-
f_source: ''
|
479
|
-
},
|
480
|
-
methods: {
|
481
|
-
deleteDevice(idx) {
|
482
|
-
this.$showMessage('删除后不可恢复,确认删除吗?', ['confirm', 'cancel']).then((res) => {
|
483
|
-
if (res === 'confirm') {
|
484
|
-
this.devicemodel.splice(idx, 1)
|
485
|
-
}
|
486
|
-
})
|
487
|
-
},
|
488
|
-
pushDevices() {
|
489
|
-
let obj = {
|
490
|
-
"f_operator": Vue.user.name,
|
491
|
-
"f_operate_date": Util.toStandardTimeString(),
|
492
|
-
"f_operatorid": Vue.user.id,
|
493
|
-
"f_devices_type":null,
|
494
|
-
"f_manufactor":null,
|
495
|
-
"f_devices_no":null,
|
496
|
-
"f_devices_model":null,
|
497
|
-
"f_instaler_person":null,
|
498
|
-
"f_make_date":null,
|
499
|
-
"f_input_date":null,
|
500
|
-
"f_devices_num":null,
|
501
|
-
"f_firstcheck_date":null,
|
502
|
-
"f_rate_flow":null,
|
503
|
-
"f_expire_date":null,
|
504
|
-
"f_nextcheck_date":null,
|
505
|
-
"f_pressure_range":null,
|
506
|
-
"f_import_pressure":null
|
507
|
-
}
|
508
|
-
this.devicemodel.push(obj)
|
509
|
-
},
|
510
|
-
countExpireFate_pipe(index, dateTime, type) {
|
511
|
-
let old = new Date(dateTime)
|
512
|
-
let newYear = old.getFullYear() + Number(this.$appdata.getSingleValue(type + '-年限') || 0)
|
513
|
-
let month = old.getMonth() + 1
|
514
|
-
let date = old.getDate()
|
515
|
-
this.model[index].f_pipeexpire_date = newYear + '-' + (month < 10 ? '0' + month : month) + '-' + (date < 10 ? '0' + date : date)
|
516
|
-
},
|
517
|
-
countExpireFate(index, dateTime) {
|
518
|
-
let old = new Date(dateTime)
|
519
|
-
let newYear = old.getFullYear() + Number(this.model[index].f_service_life)
|
520
|
-
let month = old.getMonth() + 1
|
521
|
-
let date = old.getDate()
|
522
|
-
this.model[index].f_expire_date = newYear + '-' + (month < 10 ? '0' + month : month) + '-' + (date < 10 ? '0' + date : date)
|
523
|
-
},
|
524
|
-
getServiceLife(index, type) {
|
525
|
-
const year = this.$appdata.getSingleValue(type + '-' + this.userinfo.meterinfo[0].f_user_type + '-年限') || 0
|
526
|
-
this.model[index].f_service_life = year
|
527
|
-
},
|
528
|
-
dateAddYear(dateTime, year) {
|
529
|
-
let old = new Date(dateTime)
|
530
|
-
let newYear = old.getFullYear() + Number(year)
|
531
|
-
let month = old.getMonth() + 1
|
532
|
-
let date = old.getDate()
|
533
|
-
return newYear + '-' + (month < 10 ? '0' + month : month) + '-' + (date < 10 ? '0' + date : date)
|
534
|
-
},
|
535
|
-
scan() {
|
536
|
-
HostApp.__this__ = this,
|
537
|
-
HostApp.scanCode({ callback: "javascript:HostApp.__this__.getCode();" })
|
538
|
-
},
|
539
|
-
getCode() {
|
540
|
-
var datapa = HostApp.getCode().data;
|
541
|
-
//tag
|
542
|
-
this.userinfo.meterinfo[0].f_meternumber = datapa
|
543
|
-
},
|
544
|
-
//数据检查
|
545
|
-
checkVal() {
|
546
|
-
//检查一些必要信息是否未填
|
547
|
-
this.approveChange = false
|
548
|
-
this.changemeterno = false
|
549
|
-
let checked = { ischeck: true, msg: '' }
|
550
|
-
//tag
|
551
|
-
//tag
|
552
|
-
//tag
|
553
|
-
if (!this.userinfo.baseinfo.base.f_user_name) {
|
554
|
-
checked = { ischeck: false, msg: '请输入用户名称!' }
|
555
|
-
}
|
556
|
-
if (!this.selectPcd.id) {
|
557
|
-
checked = { ischeck: false, msg: '请选择省市区!' }
|
558
|
-
}
|
559
|
-
if (!this.selectStreet.id) {
|
560
|
-
checked = { ischeck: false, msg: '请选择街道!' }
|
561
|
-
}
|
562
|
-
if (!this.userinfo.addressinfo.f_address) {
|
563
|
-
checked = { ischeck: false, msg: '新地址不能为空!' }
|
564
|
-
}
|
565
|
-
if (this.addressType == '普通地址') {
|
566
|
-
if (!this.selectArea.id) {
|
567
|
-
checked = { ischeck: false, msg: '请选择集收单位!' }
|
568
|
-
}
|
569
|
-
if (!this.userinfo.addressinfo.f_room) {
|
570
|
-
checked = { ischeck: false, msg: '新输入门牌号!' }
|
571
|
-
}
|
572
|
-
}
|
573
|
-
if (this.userinfo.meterinfo[0].f_meter_classify == '机表' && this.userinfo_old.meterinfo[0].f_meternumber) {
|
574
|
-
|
575
|
-
//tag
|
576
|
-
//tag
|
577
|
-
if (this.userinfo.meterinfo[0].f_meternumber) {
|
578
|
-
if (this.userinfo.meterinfo[0].f_meternumber != this.userinfo_old.meterinfo[0].f_meternumber) {
|
579
|
-
if (!this.f_meterno_path || this.f_meterno_path == Vue.nopic) {
|
580
|
-
checked = { ischeck: false, msg: '请拍摄表号照片!' }
|
581
|
-
} else {
|
582
|
-
//用来标识当前有修改机表表号,后台需要进行照片上传
|
583
|
-
this.changemeterno = true
|
584
|
-
}
|
585
|
-
}
|
586
|
-
} else {
|
587
|
-
checked = { ischeck: false, msg: '请输入表号!' }
|
588
|
-
}
|
589
|
-
}
|
590
|
-
//检查本次修改信息中是否包含需要审核的内容
|
591
|
-
for (let check in this.checkField) {
|
592
|
-
//tag
|
593
|
-
if (typeof check != 'function') {
|
594
|
-
for (let i = 0; i < this.checkField[check].length; i++) {
|
595
|
-
//tag
|
596
|
-
if (check == 'checkUserinfoField') {
|
597
|
-
//tag
|
598
|
-
//tag
|
599
|
-
if (this.userinfo.baseinfo.base[this.checkField[check][i]] != this.userinfo_old.baseinfo.base[this.checkField[check][i]]) {
|
600
|
-
//tag
|
601
|
-
this.approveChange = true
|
602
|
-
}
|
603
|
-
} else if (check == 'checkUserFilesField') {
|
604
|
-
//tag
|
605
|
-
//tag
|
606
|
-
if (this.userinfo.meterinfo[0][this.checkField[check][i]] != this.userinfo_old.meterinfo[0][this.checkField[check][i]]) {
|
607
|
-
//tag
|
608
|
-
this.approveChange = true
|
609
|
-
}
|
610
|
-
} else if (check == 'checkAddressField') {
|
611
|
-
//tag
|
612
|
-
//tag
|
613
|
-
if (this.userinfo.addressinfo[this.checkField[check][i]] != this.userinfo_old.addressinfo[this.checkField[check][i]]) {
|
614
|
-
//tag
|
615
|
-
this.approveChange = true
|
616
|
-
}
|
617
|
-
}
|
618
|
-
}
|
619
|
-
}
|
620
|
-
}
|
621
|
-
//tag
|
622
|
-
return checked
|
623
|
-
},
|
624
|
-
select_search(text) {
|
625
|
-
//tag
|
626
|
-
if (this.selectStreet.id) {
|
627
|
-
let pcdText = text ? `and f_street_id=${this.selectStreet.id} and f_residential_area like '%${text}%'` : `and f_street_id=${this.selectStreet.id}`
|
628
|
-
new HttpResetClass().load("POST", `${this.$androidUtil.getProxyUrl()}/rs/sql/safe_singleTable_OrderBy`, {
|
629
|
-
data: {
|
630
|
-
items: "*",
|
631
|
-
tablename: "t_area",
|
632
|
-
orderitem: "id",
|
633
|
-
condition: `f_orgid = '${Vue.user.orgid}' ${pcdText} `
|
634
|
-
}
|
635
|
-
}, { resolveMsg: null, rejectMsg: null }).then((res) => {
|
636
|
-
//tag)
|
637
|
-
if (res.data.length > 0) {
|
638
|
-
this.area = []
|
639
|
-
res.data.forEach((result) => {
|
640
|
-
this.area.push({ label: result.f_residential_area, value: result })
|
641
|
-
})
|
642
|
-
}
|
643
|
-
})
|
644
|
-
} else {
|
645
|
-
this.area = []
|
646
|
-
}
|
647
|
-
},
|
648
|
-
cameraCallBack(prop, fileName) {
|
649
|
-
HostApp.__this__.$set(prop, fileName + '?' + Math.random())
|
650
|
-
//tag
|
651
|
-
HostApp.__callback__ = null
|
652
|
-
HostApp.__this__ = null
|
653
|
-
},
|
654
|
-
takePic(prop, title) {
|
655
|
-
HostApp.__callback__ = this.cameraCallBack
|
656
|
-
HostApp.__this__ = this
|
657
|
-
//tag
|
658
|
-
let fileName
|
659
|
-
if (!this[prop] || this[prop].includes("nopic.png")) {
|
660
|
-
fileName = Util.guid() + '-' + prop + '.jpg'
|
661
|
-
} else {
|
662
|
-
fileName = Util.getFileName(this[prop])
|
663
|
-
}
|
664
|
-
HostApp._open_a_page({
|
665
|
-
type: 'boomerang',
|
666
|
-
page: 'com.aofeng.hybrid.android.peripheral.CameraActivity',
|
667
|
-
param: {
|
668
|
-
file: fileName,
|
669
|
-
requestCode: 111,
|
670
|
-
callback: 'javascript:HostApp.__callback__("' + prop + '", "%s");',
|
671
|
-
watermark: title + '\t时间:' + Util.toStandardTimeString() + '\t' + Vue.user.name
|
672
|
-
}
|
673
|
-
})
|
674
|
-
},
|
675
|
-
delfile(prop, fileName) {
|
676
|
-
if (fileName == Vue.nopic)
|
677
|
-
return
|
678
|
-
else {
|
679
|
-
HostApp.delfile(fileName)
|
680
|
-
this[prop] = Vue.nopic
|
681
|
-
}
|
682
|
-
},
|
683
|
-
editUserInfoNoAudit() {
|
684
|
-
let checked = this.checkVal()
|
685
|
-
if (!checked.ischeck) {
|
686
|
-
this.$showMessage(checked.msg)
|
687
|
-
return
|
688
|
-
}
|
689
|
-
for (let i = 0; i < this.model.length; i++) {
|
690
|
-
this.model[i].f_user_id = this.userinfo.meterinfo[0].f_user_id
|
691
|
-
}
|
692
|
-
this.$showMessage('确定是否修改上传用户信息?', ['confirm', 'cancel']).then((res) => {
|
693
|
-
if (res === 'confirm') {
|
694
|
-
this.excessive = true
|
695
|
-
let userinfoms = Object.assign({}, this.userinfo_old.baseinfo.base)
|
696
|
-
// userinfoms.f_user_name=row.f_user_name
|
697
|
-
userinfoms.f_user_phone = this.userinfo.baseinfo.base.f_user_phone
|
698
|
-
userinfoms.f_rent_name = this.userinfo.baseinfo.base.f_rent_name
|
699
|
-
userinfoms.f_zuhu_phone = this.userinfo.baseinfo.base.f_zuhu_phone
|
700
|
-
userinfoms.f_operator_record = Vue.user.name
|
701
|
-
userinfoms.f_operatorid_record = Vue.user.id
|
702
|
-
userinfoms.f_remark = this.userinfo.baseinfo.base.f_remark
|
703
|
-
userinfoms.f_orgid_record = Vue.user.orgid
|
704
|
-
userinfoms.f_orgname_record = Vue.user.orgs
|
705
|
-
userinfoms.f_depid_record = Vue.user.depids
|
706
|
-
userinfoms.f_depname_record = Vue.user.deps
|
707
|
-
this.userinfo_old.meterinfo[0].f_gas_person = this.userinfo.meterinfo[0].f_gas_person
|
708
|
-
this.userinfo_old.meterinfo[0].f_gas_date = this.userinfo.meterinfo[0].f_gas_date
|
709
|
-
this.userinfo_old.meterinfo[0].f_adjustable_id = this.userinfo.meterinfo[0].f_adjustable_id
|
710
|
-
this.userinfo_old.meterinfo[0].f_metertitles = this.userinfo.meterinfo[0].f_metertitles
|
711
|
-
this.userinfo_old.meterinfo[0].f_position = this.userinfo.meterinfo[0].f_position
|
712
|
-
this.userinfo_old.meterinfo[0].f_aroundmeter = this.userinfo.meterinfo[0].f_aroundmeter
|
713
|
-
this.userinfo_old.meterinfo[0].f_bqf_state = this.userinfo.meterinfo[0].f_bqf_state
|
714
|
-
this.userinfo_old.meterinfo[0].f_if_direct = this.userinfo.meterinfo[0].f_if_direct
|
715
|
-
userinfoms.userfiles = []
|
716
|
-
this.userinfo_old.meterinfo[0].devicesinfo = this.model
|
717
|
-
userinfoms.userfiles.push(this.userinfo_old.meterinfo[0])
|
718
|
-
new HttpResetClass().load('POST', `${this.$androidUtil.getProxyUrl()}/rs/logic/filemanage_fileSave`, {
|
719
|
-
data: {
|
720
|
-
userinfo: userinfoms,
|
721
|
-
modifyReason: this.f_source ? `${this.f_source}维护档案信息` : '',
|
722
|
-
address: {
|
723
|
-
id: this.userinfo_old.addressinfo.id,
|
724
|
-
oldid: this.userinfo_old.addressinfo.id,
|
725
|
-
f_address: this.userinfo_old.addressinfo.f_address ? this.userinfo_old.addressinfo.f_address : this.userinfo.addressinfo.f_address
|
726
|
-
}
|
727
|
-
}
|
728
|
-
}, { resolveMsg: null, rejectMsg: null }).then((res1) => {
|
729
|
-
if (res1.data.status == 200) {
|
730
|
-
let data = this.userinfo.addressinfo
|
731
|
-
data.f_address = this.userinfo_old.addressinfo.f_address ? this.userinfo_old.addressinfo.f_address : this.userinfo.addressinfo.f_address
|
732
|
-
//
|
733
|
-
data.f_operator = Vue.user.name
|
734
|
-
new HttpResetClass().load('POST', `${this.$androidUtil.getProxyUrl()}/rs/logic/address_updateuseraddress`, { data: data }).then((res2) => {
|
735
|
-
this.$showMessage("修改用户地址信息成功!")
|
736
|
-
}).catch(error => {
|
737
|
-
this.$showMessage("修改用户地址信息!")
|
738
|
-
})
|
739
|
-
this.$showMessage("修改用户信息成功!")
|
740
|
-
this.enable = true
|
741
|
-
this.excessive = false
|
742
|
-
}
|
743
|
-
}).catch((msg) => {
|
744
|
-
this.$showMessage("修改用户信息失败,请检查手机网络状况!")
|
745
|
-
this.excessive = false
|
746
|
-
})
|
747
|
-
}
|
748
|
-
})
|
749
|
-
},
|
750
|
-
editUserInfo() {
|
751
|
-
this.$showMessage('确定是否修改上传审核用户信息?', ['confirm', 'cancel']).then((res) => {
|
752
|
-
if (res === 'confirm') {
|
753
|
-
for (let i = 0; i < this.model.length; i++) {
|
754
|
-
this.model[i].f_user_id = this.userinfo.meterinfo[0].f_user_id
|
755
|
-
}
|
756
|
-
this.excessive = true
|
757
|
-
let userinfoms = Object.assign({}, this.userinfo_old.baseinfo.base)
|
758
|
-
//userinfoms.f_user_name=row.f_user_name
|
759
|
-
userinfoms.f_user_phone = this.userinfo.baseinfo.base.f_user_phone
|
760
|
-
userinfoms.f_rent_name = this.userinfo.baseinfo.base.f_rent_name
|
761
|
-
userinfoms.f_zuhu_phone = this.userinfo.baseinfo.base.f_zuhu_phone
|
762
|
-
userinfoms.f_operator_record = Vue.user.name
|
763
|
-
userinfoms.f_operatorid_record = Vue.user.id
|
764
|
-
userinfoms.f_remark = this.userinfo.baseinfo.base.f_remark
|
765
|
-
userinfoms.f_orgid_record = Vue.user.orgid
|
766
|
-
userinfoms.f_orgname_record = Vue.user.orgs
|
767
|
-
userinfoms.f_depid_record = Vue.user.depids
|
768
|
-
userinfoms.f_depname_record = Vue.user.deps
|
769
|
-
this.userinfo_old.meterinfo[0].f_gas_person = this.userinfo.meterinfo[0].f_gas_person
|
770
|
-
this.userinfo_old.meterinfo[0].f_gas_date = this.userinfo.meterinfo[0].f_gas_date
|
771
|
-
this.userinfo_old.meterinfo[0].f_adjustable_id = this.userinfo.meterinfo[0].f_adjustable_id
|
772
|
-
this.userinfo_old.meterinfo[0].f_metertitles = this.userinfo.meterinfo[0].f_metertitles
|
773
|
-
this.userinfo_old.meterinfo[0].f_position = this.userinfo.meterinfo[0].f_position
|
774
|
-
this.userinfo_old.meterinfo[0].f_aroundmeter = this.userinfo.meterinfo[0].f_aroundmeter
|
775
|
-
this.userinfo_old.meterinfo[0].f_bqf_state = this.userinfo.meterinfo[0].f_bqf_state
|
776
|
-
this.userinfo_old.meterinfo[0].f_if_direct = this.userinfo.meterinfo[0].f_if_direct
|
777
|
-
userinfoms.userfiles = []
|
778
|
-
this.userinfo_old.meterinfo[0].devicesinfo = this.model
|
779
|
-
for (let i = 0; i < this.devicemodel.length; i++){
|
780
|
-
this.userinfo_old.meterinfo[0].devicesinfo.push(this.devicemodel[i])
|
781
|
-
}
|
782
|
-
userinfoms.userfiles.push(this.userinfo_old.meterinfo[0])
|
783
|
-
//tag)
|
784
|
-
new HttpResetClass().load('POST', `${this.$androidUtil.getProxyUrl()}/rs/logic/filemanage_fileSave`, {
|
785
|
-
data: {
|
786
|
-
userinfo: userinfoms,
|
787
|
-
modifyReason: this.f_source ? `${this.f_source}维护档案信息` : '',
|
788
|
-
address: { id: this.userinfo_old.addressinfo.id, oldid: this.userinfo_old.addressinfo.id }
|
789
|
-
}
|
790
|
-
}, { resolveMsg: null, rejectMsg: null }).then((res1) => {
|
791
|
-
if (res1.data.status == 200) {
|
792
|
-
//本次修改信息包含需要审核信息
|
793
|
-
// if (this.approveChange) {
|
794
|
-
// //tag
|
795
|
-
// let res2 = this.$androidUtil.bzLogic('safe_upUserinfoApprove', {
|
796
|
-
// row: {
|
797
|
-
// f_time: Util.toStandardTimeString(),
|
798
|
-
// f_modifier: Vue.user.name,//Vue.user.name
|
799
|
-
// f_modifier_id: Vue.user.id,//Vue.user.id
|
800
|
-
// f_modify_type: '用户档案',
|
801
|
-
// f_userinfoid: this.userinfo.baseinfo.base.f_userinfo_id,
|
802
|
-
// f_userinfo_code: this.userinfo.baseinfo.base.f_userinfo_code,
|
803
|
-
// f_approved: '未审核',
|
804
|
-
// filialestr: Vue.user.orgid,//Vue.user.orgid
|
805
|
-
// version: 1,
|
806
|
-
// f_user_name: this.userinfo.baseinfo.base.f_user_name,
|
807
|
-
// f_user_phone: this.userinfo.baseinfo.base.f_user_phone,
|
808
|
-
// f_street: this.userinfo.addressinfo.f_street,
|
809
|
-
// f_building: this.userinfo.addressinfo.f_building,
|
810
|
-
// f_unit: this.userinfo.addressinfo.f_unit,
|
811
|
-
// f_floor: this.userinfo.addressinfo.f_floor,
|
812
|
-
// f_room: this.userinfo.addressinfo.f_room,
|
813
|
-
// f_building_suffix: this.userinfo.addressinfo.f_special == 1 ? null : this.userinfo.addressinfo.f_building_suffix,
|
814
|
-
// f_unit_suffix: this.userinfo.addressinfo.f_special == 1 ? null : this.userinfo.addressinfo.f_unit_suffix,
|
815
|
-
// f_floor_suffix: this.userinfo.addressinfo.f_special == 1 ? null : this.userinfo.addressinfo.f_floor_suffix,
|
816
|
-
// f_room_suffix: this.userinfo.addressinfo.f_special == 1 ? null : this.userinfo.addressinfo.f_room_suffix,
|
817
|
-
// f_residential_area: this.userinfo.addressinfo.f_residential_area,
|
818
|
-
// f_address: this.userinfo.addressinfo.f_address,
|
819
|
-
// f_pcd: this.userinfo.addressinfo.f_pcd,
|
820
|
-
// f_pcd_id: this.userinfo.addressinfo.f_pcd_id,
|
821
|
-
// f_street_id: this.userinfo.addressinfo.f_street_id,
|
822
|
-
// f_residential_area_id: this.userinfo.addressinfo.f_residential_area_id,
|
823
|
-
// f_used_name: this.userinfo.baseinfo.base.f_used_name,
|
824
|
-
// f_rent_phone: this.userinfo.baseinfo.base.f_rent_phone,
|
825
|
-
// f_slice_area: this.userinfo.addressinfo.f_slice_area,
|
826
|
-
// f_remark: this.userinfo.baseinfo.base.f_remark,
|
827
|
-
// f_source: this.f_source,
|
828
|
-
// f_meterno_path: this.f_meterno_path,
|
829
|
-
// f_iscity: this.userinfo.addressinfo.f_iscity,
|
830
|
-
// f_special: this.userinfo.addressinfo.f_special,
|
831
|
-
// f_meternumber: this.userinfo.meterinfo[0].f_meternumber,
|
832
|
-
// changemeterno: this.changemeterno
|
833
|
-
// },
|
834
|
-
// tablename: 't_modify_userinfo'
|
835
|
-
// })
|
836
|
-
// //tag)
|
837
|
-
// if (res2.code == 200) {
|
838
|
-
// this.$showMessage("变更用户信息成功,需要审核的信息已提交审核,等待管理员处理!")
|
839
|
-
// this.enable = true
|
840
|
-
// this.excessive = false
|
841
|
-
// } else {
|
842
|
-
// this.$showMessage("上传审核信息失败,请检查图片和网络状况是否正常!")
|
843
|
-
// this.excessive = false
|
844
|
-
// }
|
845
|
-
// } else {
|
846
|
-
// this.$showMessage("修改用户信息成功!")
|
847
|
-
// this.enable = true
|
848
|
-
// this.excessive = false
|
849
|
-
// }
|
850
|
-
this.$showMessage("修改用户信息成功!")
|
851
|
-
this.enable = true
|
852
|
-
this.excessive = false
|
853
|
-
}
|
854
|
-
}).catch((msg) => {
|
855
|
-
this.$showMessage("修改用户信息失败,请检查手机网络状况!")
|
856
|
-
this.excessive = false
|
857
|
-
})
|
858
|
-
|
859
|
-
}
|
860
|
-
})
|
861
|
-
},
|
862
|
-
imgback(header) {
|
863
|
-
if (this.headername == header) {
|
864
|
-
return require('../../assets/xiangxia1.png')
|
865
|
-
} else {
|
866
|
-
return require('../../assets/xiangyou1.png')
|
867
|
-
}
|
868
|
-
this.headername = header
|
869
|
-
},
|
870
|
-
selectVal(header) {
|
871
|
-
if (this.headername == header) {
|
872
|
-
this.headername = ''
|
873
|
-
} else {
|
874
|
-
this.headername = header
|
875
|
-
}
|
876
|
-
|
877
|
-
},
|
878
|
-
changeNewAddress() {
|
879
|
-
this.userinfo.addressinfo.f_address = this.addressType == '普通地址' ? this.getAddress : this.getAddressTS
|
880
|
-
},
|
881
|
-
area_change() {
|
882
|
-
//tag
|
883
|
-
this.userinfo.addressinfo.f_residential_area = this.selectArea.f_residential_area
|
884
|
-
this.userinfo.addressinfo.f_residential_area_id = this.selectArea.id
|
885
|
-
this.userinfo.addressinfo.f_slice_area = this.selectArea.f_slice_area
|
886
|
-
this.changeNewAddress()
|
887
|
-
//this.userinfo.addressinfo.f_residential_area=this.f_residential_area.f_residential_area
|
888
|
-
},
|
889
|
-
async street_change() {
|
890
|
-
//tag
|
891
|
-
if (this.selectStreet.id) {
|
892
|
-
//如果街道改变--给街道赋值!
|
893
|
-
this.userinfo.addressinfo.f_street = this.selectStreet.f_street
|
894
|
-
this.userinfo.addressinfo.f_street_id = this.selectStreet.id
|
895
|
-
this.userinfo.addressinfo.f_iscity = this.selectStreet.f_iscity
|
896
|
-
//清空当前选中小区的值
|
897
|
-
this.userinfo.addressinfo.f_residential_area = ''
|
898
|
-
this.userinfo.addressinfo.f_residential_area_id = ''
|
899
|
-
this.userinfo.addressinfo.f_slice_area = ''
|
900
|
-
this.selectArea = { id: '' }
|
901
|
-
this.area = []
|
902
|
-
let pcdText = ` and f_street_id=${this.selectStreet.id}`
|
903
|
-
let res = await new HttpResetClass().load("POST", `${this.$androidUtil.getProxyUrl()}/rs/sql/safe_singleTable_OrderBy`, {
|
904
|
-
data: {
|
905
|
-
items: "*",
|
906
|
-
tablename: "t_area",
|
907
|
-
orderitem: "id",
|
908
|
-
condition: `f_orgid = '${Vue.user.orgid}' ${pcdText} `
|
909
|
-
}
|
910
|
-
}, { resolveMsg: null, rejectMsg: null })
|
911
|
-
////tag)
|
912
|
-
res.data.forEach((result) => {
|
913
|
-
this.area.push({ label: result.f_residential_area, value: result })
|
914
|
-
})
|
915
|
-
} else {
|
916
|
-
this.area = []
|
917
|
-
}
|
918
|
-
|
919
|
-
this.changeNewAddress()
|
920
|
-
},
|
921
|
-
async pcd_change() {
|
922
|
-
//tag
|
923
|
-
if (this.selectPcd.id) {
|
924
|
-
//tag
|
925
|
-
//如果省市区改变-重新赋值
|
926
|
-
this.userinfo.addressinfo.f_pcd = this.selectPcd.f_pcd
|
927
|
-
this.userinfo.addressinfo.f_pcd_id = this.selectPcd.id
|
928
|
-
//清空 选中的街道和集收单位
|
929
|
-
this.selectStreet = { id: '' }
|
930
|
-
this.userinfo.addressinfo.f_street = ''
|
931
|
-
this.userinfo.addressinfo.f_street_id = ''
|
932
|
-
this.userinfo.addressinfo.f_iscity = ''
|
933
|
-
this.selectArea = { id: '' }
|
934
|
-
this.userinfo.addressinfo.f_residential_area = ''
|
935
|
-
this.userinfo.addressinfo.f_residential_area_id = ''
|
936
|
-
this.userinfo.addressinfo.f_slice_area = ''
|
937
|
-
this.streets = []
|
938
|
-
let pcdText = `and f_pcd_id=${this.selectPcd.id}`
|
939
|
-
let streetlist = await new HttpResetClass().load("POST", `${this.$androidUtil.getProxyUrl()}/rs/sql/safe_singleTable_OrderBy`, {
|
940
|
-
data: {
|
941
|
-
items: "*",
|
942
|
-
tablename: "t_street",
|
943
|
-
orderitem: "id",
|
944
|
-
condition: `f_orgid = '${Vue.user.orgid}' ${pcdText}`
|
945
|
-
}
|
946
|
-
}, { resolveMsg: null, rejectMsg: null })
|
947
|
-
streetlist.data.forEach((result) => {
|
948
|
-
this.streets.push({ label: result.f_street, value: result })
|
949
|
-
})
|
950
|
-
} else {
|
951
|
-
this.streets = []
|
952
|
-
}
|
953
|
-
this.changeNewAddress()
|
954
|
-
},
|
955
|
-
upUserState() {
|
956
|
-
//tag)
|
957
|
-
if (this.userinfo.meterinfo[0].f_table_state == '正常') {
|
958
|
-
let data = {
|
959
|
-
f_userfiles_id: {
|
960
|
-
f_userfiles_id: this.userinfo.meterinfo[0].f_userfiles_id,
|
961
|
-
f_table_state: '停用',
|
962
|
-
version: this.userinfo.meterinfo[0].version
|
963
|
-
},
|
964
|
-
f_userfile_id: this.userinfo.meterinfo[0].f_userfiles_id,
|
965
|
-
f_user_id: this.userinfo.meterinfo[0].f_user_id,
|
966
|
-
f_userinfo_id: this.userinfo.meterinfo[0].f_userinfo_id,
|
967
|
-
f_user_name: this.userinfo.baseinfo.base.f_user_name,
|
968
|
-
f_comments: '安检时发现问题关闭阀门',
|
969
|
-
f_othereason: '',
|
970
|
-
f_operat_type: '停用',
|
971
|
-
f_describe: `${Vue.user.name}对客户${this.userinfo.baseinfo.base.f_user_name}进行表具停用操作`,
|
972
|
-
f_state: '有效',
|
973
|
-
f_operator: Vue.user.name,//${Vue.$login.f.name}
|
974
|
-
f_operatorid: Vue.user.id,
|
975
|
-
f_orgid: Vue.user.orgid,
|
976
|
-
f_orgname: Vue.user.orgs,
|
977
|
-
f_depid: Vue.user.depids,
|
978
|
-
f_depname: Vue.user.deps,
|
979
|
-
f_zoneid: Vue.user.zoneid,
|
980
|
-
f_zones: Vue.user.zones
|
981
|
-
}
|
982
|
-
new HttpResetClass().load('post', `${this.$androidUtil.getProxyUrl()}/rs/entity/t_disable`,
|
983
|
-
data, { resolveMsg: null, rejectMsg: null }).then((row) => {
|
984
|
-
this.$showMessage('已成功关阀停气!')
|
985
|
-
this.userinfo.meterinfo[0].f_table_state = '停用'
|
986
|
-
})
|
987
|
-
} else {
|
988
|
-
this.$showMessage('该用户已被关阀停用,请勿重复操作!')
|
989
|
-
}
|
990
|
-
|
991
|
-
},
|
992
|
-
addDevices() {
|
993
|
-
//Vue.user.name
|
994
|
-
let obj = {
|
995
|
-
"f_operator": Vue.user.name,
|
996
|
-
"f_picture": null,
|
997
|
-
"f_pipe_type": null,
|
998
|
-
"f_pipeinstall_date": null,
|
999
|
-
"f_pipe_connection": null,
|
1000
|
-
"f_expire_date": null,
|
1001
|
-
"f_pipeexpire_date": null,
|
1002
|
-
"f_comments": null,
|
1003
|
-
"f_operate_date": Util.toStandardTimeString(),
|
1004
|
-
"f_operatorid": Vue.user.id,
|
1005
|
-
"f_service_life": '',
|
1006
|
-
"f_devices_num": null,
|
1007
|
-
"f_process_id": null,
|
1008
|
-
"f_devices_type": null,
|
1009
|
-
"f_make_date": null,
|
1010
|
-
"f_input_date": null,
|
1011
|
-
"f_state": "有效",
|
1012
|
-
"f_brand": null,
|
1013
|
-
"f_devices_model": null,
|
1014
|
-
"f_devices_no": null,
|
1015
|
-
"img": { "content": null, "filename": null }
|
1016
|
-
}
|
1017
|
-
this.model.push(obj)
|
1018
|
-
},
|
1019
|
-
delDevices(idx) {
|
1020
|
-
//tag
|
1021
|
-
this.$showMessage('删除后不可恢复,确认删除吗?', ['confirm', 'cancel']).then((res) => {
|
1022
|
-
if (res === 'confirm') {
|
1023
|
-
this.model.splice(idx, 1)
|
1024
|
-
}
|
1025
|
-
})
|
1026
|
-
},
|
1027
|
-
async getAreaList(text) {
|
1028
|
-
if (this.selectStreet.id) {
|
1029
|
-
this.area = []
|
1030
|
-
let pcdText = text ? `and f_street_id=${this.selectStreet.id} and f_residential_area like '%${text}%'` : `and f_street_id=${this.selectStreet.id}`
|
1031
|
-
let res = await new HttpResetClass().load("POST", `${this.$androidUtil.getProxyUrl()}/rs/sql/safe_singleTable_OrderBy`, {
|
1032
|
-
data: {
|
1033
|
-
items: "*",
|
1034
|
-
tablename: "t_area",
|
1035
|
-
orderitem: "id",
|
1036
|
-
condition: `f_orgid = '${Vue.user.orgid}' ${pcdText}`
|
1037
|
-
}
|
1038
|
-
}, { resolveMsg: null, rejectMsg: null })
|
1039
|
-
////tag)
|
1040
|
-
res.data.forEach((result) => {
|
1041
|
-
this.area.push({ label: result.f_residential_area, value: result })
|
1042
|
-
})
|
1043
|
-
//tag
|
1044
|
-
this.area.push({
|
1045
|
-
label: this.userinfo.addressinfo.f_residential_area,
|
1046
|
-
value: {
|
1047
|
-
id: this.userinfo.addressinfo.f_residential_area_id,
|
1048
|
-
f_residential_area: this.userinfo.addressinfo.f_residential_area
|
1049
|
-
}
|
1050
|
-
})
|
1051
|
-
} else {
|
1052
|
-
this.area = []
|
1053
|
-
}
|
1054
|
-
|
1055
|
-
},
|
1056
|
-
async getStreetList() {
|
1057
|
-
if (this.selectPcd.id) {
|
1058
|
-
//tag
|
1059
|
-
this.streets = []
|
1060
|
-
let pcdText = `and f_pcd_id=${this.selectPcd.id}`
|
1061
|
-
let streetlist = await new HttpResetClass().load("POST", `${this.$androidUtil.getProxyUrl()}/rs/sql/safe_singleTable_OrderBy`, {
|
1062
|
-
data: {
|
1063
|
-
items: "*",
|
1064
|
-
tablename: "t_street",
|
1065
|
-
orderitem: "id",
|
1066
|
-
condition: `f_orgid = '${Vue.user.orgid}' ${pcdText}`
|
1067
|
-
}
|
1068
|
-
}, { resolveMsg: null, rejectMsg: null })
|
1069
|
-
streetlist.data.forEach((result) => {
|
1070
|
-
//如果第一次进来有地址id 就拿下地址区域
|
1071
|
-
if (this.selectStreet.id && this.selectStreet.id == result.id) {
|
1072
|
-
//tag)
|
1073
|
-
this.userinfo.addressinfo.f_iscity = result.f_iscity
|
1074
|
-
}
|
1075
|
-
this.streets.push({ label: result.f_street, value: result })
|
1076
|
-
})
|
1077
|
-
} else {
|
1078
|
-
this.streets = []
|
1079
|
-
}
|
1080
|
-
},
|
1081
|
-
changeAddressType(val) {
|
1082
|
-
//tag
|
1083
|
-
if (this.addressType == '普通地址') {
|
1084
|
-
this.userinfo.addressinfo.f_special = null
|
1085
|
-
} else if (this.addressType == '特殊地址') {
|
1086
|
-
this.userinfo.addressinfo.f_special = 1
|
1087
|
-
this.userinfo.addressinfo.f_building = null
|
1088
|
-
this.userinfo.addressinfo.f_unit = null
|
1089
|
-
this.userinfo.addressinfo.f_floor = null
|
1090
|
-
this.userinfo.addressinfo.f_room = null
|
1091
|
-
}
|
1092
|
-
this.changeNewAddress()
|
1093
|
-
}
|
1094
|
-
|
1095
|
-
},
|
1096
|
-
computed: {
|
1097
|
-
getAddress() {
|
1098
|
-
return (this.userinfo.addressinfo.f_pcd ? this.userinfo.addressinfo.f_pcd : '') +
|
1099
|
-
(this.userinfo.addressinfo.f_street ? this.userinfo.addressinfo.f_street : '') +
|
1100
|
-
(this.userinfo.addressinfo.f_residential_area ? this.userinfo.addressinfo.f_residential_area : '') +
|
1101
|
-
(this.userinfo.addressinfo.f_building ? this.userinfo.addressinfo.f_building + (this.userinfo.addressinfo.f_building_suffix ? this.userinfo.addressinfo.f_building_suffix : '') : '') +
|
1102
|
-
(this.userinfo.addressinfo.f_unit ? this.userinfo.addressinfo.f_unit + (this.userinfo.addressinfo.f_unit_suffix ? this.userinfo.addressinfo.f_unit_suffix : '') : '') +
|
1103
|
-
(this.userinfo.addressinfo.f_floor ? this.userinfo.addressinfo.f_floor + (this.userinfo.addressinfo.f_floor_suffix ? this.userinfo.addressinfo.f_floor_suffix : '') : '') +
|
1104
|
-
(this.userinfo.addressinfo.f_room ? this.userinfo.addressinfo.f_room + (this.userinfo.addressinfo.f_room_suffix ? this.userinfo.addressinfo.f_room_suffix : '') : '')
|
1105
|
-
},
|
1106
|
-
getAddressTS() {
|
1107
|
-
return (this.userinfo.addressinfo.f_pcd ? this.userinfo.addressinfo.f_pcd : '') +
|
1108
|
-
(this.userinfo.addressinfo.f_street ? this.userinfo.addressinfo.f_street : '') +
|
1109
|
-
(this.userinfo.addressinfo.f_residential_area ? this.userinfo.addressinfo.f_residential_area : '')
|
1110
|
-
}
|
1111
|
-
},
|
1112
|
-
watch: {
|
1113
|
-
|
1114
|
-
/*'selectPcd.id' (val) {
|
1115
|
-
//tag
|
1116
|
-
if(this.selectPcd.id){
|
1117
|
-
this.getStreetList()
|
1118
|
-
}
|
1119
|
-
},
|
1120
|
-
'selectStreet.id' (val) {
|
1121
|
-
//tag
|
1122
|
-
if(this.selectStreet.id){
|
1123
|
-
this.getAreaList()
|
1124
|
-
}
|
1125
|
-
}*/
|
1126
|
-
},
|
1127
|
-
async ready() {
|
1128
|
-
/*//tag)
|
1129
|
-
|
1130
|
-
//tag)
|
1131
|
-
//tag)*/
|
1132
|
-
//this.f_userinfo_id=1102260
|
1133
|
-
//this.f_userinfo_id=1997541
|
1134
|
-
if (!this.f_userinfo_id) {
|
1135
|
-
this.$showMessage("未检测到用户!")
|
1136
|
-
this.enable = true
|
1137
|
-
return
|
1138
|
-
}
|
1139
|
-
try {
|
1140
|
-
|
1141
|
-
this.devices_types = Vue.$appdata.getParam('设备类型')
|
1142
|
-
console.log('this.devices_types=', JSON.stringify(this.devices_types))
|
1143
|
-
for (const devices_type of this.devices_types) {
|
1144
|
-
console.log('Vue.$appdata.getParam(`档案设备信息-${devices_type.label}品牌`)=', JSON.stringify(Vue.$appdata.getParam(`档案设备信息-${devices_type.label}品牌`)))
|
1145
|
-
this.deviceBrandOption[devices_type.label] = Vue.$appdata.getParam(`档案设备信息-${devices_type.label}品牌`) || []
|
1146
|
-
}
|
1147
|
-
console.log('this.deviceBrandOption=', JSON.stringify(this.deviceBrandOption))
|
1148
|
-
this.wz_types = Vue.$appdata.getParam('安装位置')
|
1149
|
-
this.aroundmeters = Vue.$appdata.getParam('左右表')
|
1150
|
-
|
1151
|
-
////tag)
|
1152
|
-
this.excessive = true
|
1153
|
-
//Vue.user.orgid ${this.f_userinfo_id} 10101 ${Vue.user.orgid}
|
1154
|
-
|
1155
|
-
let pcdlist = await new HttpResetClass().load("POST", `${this.$androidUtil.getProxyUrl()}/rs/sql/safe_singleTable_OrderBy`, {
|
1156
|
-
data: {
|
1157
|
-
items: "*",
|
1158
|
-
tablename: "t_pcd",
|
1159
|
-
orderitem: "id",
|
1160
|
-
condition: `f_orgid = '${Vue.user.orgid}'`
|
1161
|
-
}
|
1162
|
-
}, { resolveMsg: null, rejectMsg: null })
|
1163
|
-
//tag)
|
1164
|
-
pcdlist.data.forEach((result) => {
|
1165
|
-
this.pcds.push({ label: result.f_pcd, value: result })
|
1166
|
-
})
|
1167
|
-
////tag)
|
1168
|
-
let res = await new HttpResetClass().load('post', `${this.$androidUtil.getProxyUrl()}/rs/logic/filemanage_getFilesDetail`, {
|
1169
|
-
//f_userinfo_code:'12381344',
|
1170
|
-
f_userinfo_id: this.f_userinfo_id
|
1171
|
-
}, { resolveMsg: null, rejectMsg: null })
|
1172
|
-
//tag
|
1173
|
-
//tag
|
1174
|
-
this.userinfo = res.data
|
1175
|
-
this.userinfo_old = JSON.parse(JSON.stringify(res.data))
|
1176
|
-
this.model = this.userinfo.meterinfo[0].devicesinfo.concat(this.userinfo.meterinfo[0].devicesinfonew)
|
1177
|
-
//已经超期
|
1178
|
-
let now = Util.toStandardDateString()
|
1179
|
-
let overdue = this.model.filter(item => item.f_expire_date <= now).map(item => item.f_devices_type).join(',')
|
1180
|
-
//临近超期
|
1181
|
-
|
1182
|
-
const advent_time = (this.$appdata.getSingleValue('设备超期提醒') || 7) * 1000 * 60 * 60 * 24
|
1183
|
-
const nowTime = new Date().getTime()
|
1184
|
-
const adventTimeLimit = nowTime + advent_time
|
1185
|
-
const advent = this.model
|
1186
|
-
.filter(item => {
|
1187
|
-
const expireTime = new Date(item.f_expire_date).getTime()
|
1188
|
-
return expireTime >= nowTime && expireTime <= adventTimeLimit
|
1189
|
-
})
|
1190
|
-
.map(item => {
|
1191
|
-
const expireTime = new Date(item.f_expire_date).getTime()
|
1192
|
-
const daysLeft = Math.round((expireTime - nowTime) / (1000 * 60 * 60 * 24))
|
1193
|
-
return `${item.f_devices_type}设备还有${daysLeft >= 0 ? daysLeft : 0}天超期`
|
1194
|
-
})
|
1195
|
-
.join(',')
|
1196
|
-
if (overdue && advent) {
|
1197
|
-
this.$showMessage(`${overdue}设备已过期,${advent}`)
|
1198
|
-
} else if (advent) {
|
1199
|
-
this.$showMessage(`${advent}`)
|
1200
|
-
} else if (overdue) {
|
1201
|
-
this.$showMessage(`${overdue}设备已过期`)
|
1202
|
-
}
|
1203
|
-
this.selectArea.id = this.userinfo.addressinfo.f_residential_area_id
|
1204
|
-
this.selectPcd.id = this.userinfo.addressinfo.f_pcd_id
|
1205
|
-
this.selectPcd.f_pcd = this.userinfo.addressinfo.f_pcd
|
1206
|
-
this.selectStreet.id = this.userinfo.addressinfo.f_street_id
|
1207
|
-
this.selectStreet.f_street = this.userinfo.addressinfo.f_street
|
1208
|
-
await this.getStreetList()
|
1209
|
-
await this.getAreaList()
|
1210
|
-
this.excessive = false
|
1211
|
-
this.addressType = this.userinfo.addressinfo.f_special == 1 ? '特殊地址' : '普通地址'
|
1212
|
-
//this.userinfo.addressinfo.f_special=1
|
1213
|
-
//tag
|
1214
|
-
} catch (e) {
|
1215
|
-
this.excessive = false
|
1216
|
-
this.enable = true
|
1217
|
-
this.$showMessage('获取用户信息出错,请检查网络状况!')
|
1218
|
-
}
|
1219
|
-
new HttpResetClass().load('get', `${this.$androidUtil.getProxyUrl()}/rs/vue/UserAddress.json`, { data: {} }, {
|
1220
|
-
resolveMsg: null,
|
1221
|
-
rejectMsg: null
|
1222
|
-
}).then((addressUnit) => {
|
1223
|
-
//tag
|
1224
|
-
//tag
|
1225
|
-
//tag
|
1226
|
-
//tag
|
1227
|
-
this.userinfo.addressinfo.f_building_suffix = addressUnit.data.f_building_suffix
|
1228
|
-
this.userinfo.addressinfo.f_unit_suffix = addressUnit.data.f_unit_suffix
|
1229
|
-
this.userinfo.addressinfo.f_floor_suffix = addressUnit.data.f_floor_suffix
|
1230
|
-
this.userinfo.addressinfo.f_room_suffix = addressUnit.data.f_room_suffix
|
1231
|
-
}).catch((msg) => {
|
1232
|
-
//tag)
|
1233
|
-
})
|
1234
|
-
this.showBox = this.$appdata.getSingleValue('档案审核是否显示调压箱') == '是' ? true : false
|
1235
|
-
console.log(this.showBox)
|
1236
|
-
if (this.showBox) {
|
1237
|
-
// 获取调压箱
|
1238
|
-
new HttpResetClass().load('post', `${this.$androidUtil.getProxyUrl()}/rs/sql/adjustableboxQuery`, { data: { condition: '1 = 1' } }, {
|
1239
|
-
resolveMsg: null,
|
1240
|
-
rejectMsg: null
|
1241
|
-
}).then((res) => {
|
1242
|
-
const boxOptions = []
|
1243
|
-
for (const data of res.data) {
|
1244
|
-
const one = {
|
1245
|
-
label: data.f_adjustable_id + data.f_adjustable_name,
|
1246
|
-
value: Number(data.f_adjustable_id)
|
1247
|
-
}
|
1248
|
-
boxOptions.push(one)
|
1249
|
-
}
|
1250
|
-
this.boxOptions = JSON.parse(JSON.stringify(boxOptions))
|
1251
|
-
console.log(this.boxOptions)
|
1252
|
-
}).catch((msg) => {
|
1253
|
-
//tag)
|
1254
|
-
})
|
1255
|
-
}
|
1256
|
-
}
|
1257
|
-
}
|
1258
|
-
</script>
|
1259
|
-
<style lang="less" scoped>
|
1260
|
-
.butt3 {
|
1261
|
-
float: right;
|
1262
|
-
width: 12px;
|
1263
|
-
margin: 1% 2% 0 0;
|
1264
|
-
}
|
1265
|
-
|
1266
|
-
.rightipt {
|
1267
|
-
width: 60%;
|
1268
|
-
float: left;
|
1269
|
-
margin-left: 5%;
|
1270
|
-
}
|
1271
|
-
|
1272
|
-
.righttxt {
|
1273
|
-
border: none;
|
1274
|
-
margin-left: 5px;
|
1275
|
-
/*border-left: 5px solid #A2C2EB;*/
|
1276
|
-
float: left;
|
1277
|
-
width: 25%;
|
1278
|
-
margin-bottom: 3px;
|
1279
|
-
text-align: left;
|
1280
|
-
word-wrap: break-word;
|
1281
|
-
white-space: normal;
|
1282
|
-
}
|
1283
|
-
|
1284
|
-
.tit1 {
|
1285
|
-
background-image: url('../../assets/用户姓名.png');
|
1286
|
-
background-repeat: no-repeat;
|
1287
|
-
background-position: center;
|
1288
|
-
}
|
1289
|
-
|
1290
|
-
.spanboder {
|
1291
|
-
border-bottom: 2px solid #499edf;
|
1292
|
-
padding-bottom: 8px
|
1293
|
-
}
|
1294
|
-
|
1295
|
-
#upuserinfo_sel /deep/ ul {
|
1296
|
-
width: 100% !important;
|
1297
|
-
left: 0 !important;
|
1298
|
-
}
|
1299
|
-
|
1300
|
-
.btn-photo {
|
1301
|
-
border: 0;
|
1302
|
-
border-radius: 7px;
|
1303
|
-
background-color: #7dc1f4;
|
1304
|
-
font: 15px PingFang-SC-Bold;
|
1305
|
-
height: 20%;
|
1306
|
-
}
|
1307
|
-
|
1308
|
-
.panel-self {
|
1309
|
-
border-radius: 10px;
|
1310
|
-
border: 1px solid #499EDF;
|
1311
|
-
background-color: #F8F8F8;
|
1312
|
-
}
|
1313
|
-
|
1314
|
-
.div-photo {
|
1315
|
-
width: auto;
|
1316
|
-
height: auto;
|
1317
|
-
/* margin-top: 10px; */
|
1318
|
-
position: absolute;
|
1319
|
-
bottom: 10px;
|
1320
|
-
right: 10px;
|
1321
|
-
}
|
1322
|
-
</style>
|
1323
|
-
<style lang="less">
|
1324
|
-
#upuserinfo_sel ul {
|
1325
|
-
width: 100% !important;
|
1326
|
-
left: 0 !important;
|
1327
|
-
}
|
1328
|
-
</style>
|
1
|
+
<template>
|
2
|
+
<work-busy :is-busy="excessive"></work-busy>
|
3
|
+
<div style="height: 100%">
|
4
|
+
<div class="panel auto" v-if="false">
|
5
|
+
<div class="panel-heading" @click="selectVal('基本信息')" style="background-color: #ffffff">
|
6
|
+
<span class="spanboder">
|
7
|
+
<img src="../../assets/person.png" style="width: 22px;margin-right: 8px;">基本信息
|
8
|
+
<img class="butt3" :src="imgback('基本信息')">
|
9
|
+
</span>
|
10
|
+
</div>
|
11
|
+
<div class="panel-body " id="upuserinfo_sel" v-show="headername == '基本信息'">
|
12
|
+
<div class="row auto" style="margin: 5px 0">
|
13
|
+
<label class="righttxt">用户编号:</label>
|
14
|
+
<input type="text" class="form-control rightipt" v-model="userinfo.baseinfo.base.f_userinfo_code" readonly />
|
15
|
+
</div>
|
16
|
+
<div class="row auto" style="margin: 5px 0">
|
17
|
+
<label class="righttxt">用户名称:</label><input type="text" class="form-control rightipt"
|
18
|
+
v-model="userinfo.baseinfo.base.f_user_name" readonly />
|
19
|
+
</div>
|
20
|
+
<div class="row auto" style="margin: 5px 0">
|
21
|
+
<label class="righttxt">用户状态:</label><input type="text" class="form-control rightipt" readonly
|
22
|
+
v-model="userinfo.baseinfo.base.f_user_state" />
|
23
|
+
</div>
|
24
|
+
<div class="row auto" style="margin: 5px 0">
|
25
|
+
<label class="righttxt">用户电话:</label><input type="text" class="form-control rightipt"
|
26
|
+
v-model="userinfo.baseinfo.base.f_user_phone" />
|
27
|
+
</div>
|
28
|
+
<div class="row auto" style="margin: 5px 0">
|
29
|
+
<label class="righttxt">租户姓名:</label><input type="text" class="form-control rightipt"
|
30
|
+
v-model="userinfo.baseinfo.base.f_rent_name" />
|
31
|
+
</div>
|
32
|
+
<div class="row auto" style="margin: 5px 0">
|
33
|
+
<label class="righttxt">租户电话:</label><input type="text" class="form-control rightipt"
|
34
|
+
v-model="userinfo.baseinfo.base.f_zuhu_phone" />
|
35
|
+
</div>
|
36
|
+
<div class="row auto" style="margin: 5px 0">
|
37
|
+
<label class="righttxt">建档日期:</label><input type="text" class="form-control rightipt"
|
38
|
+
v-model="userinfo.baseinfo.base.f_createfile_date" readonly />
|
39
|
+
</div>
|
40
|
+
<!-- <div class="row auto" style="margin: 5px 0">
|
41
|
+
<label class="righttxt">开户日期:</label><input type="text" class="form-control rightipt" v-model="userinfo.baseinfo.base.f_open_date" readonly />
|
42
|
+
</div>-->
|
43
|
+
<div class="row auto" style="margin: 5px 0">
|
44
|
+
<label class="righttxt">地址类型:</label>
|
45
|
+
<div class="rightipt" style="display: flex;justify-content: space-around;margin-top: 5px">
|
46
|
+
<div><input type="radio" v-model="addressType" name="addressType" @change="changeAddressType"
|
47
|
+
id="phone_addressType1" value="普通地址" /><label style="font-weight: normal;padding-left: 2px"
|
48
|
+
for="phone_addressType1">普通地址</label></div>
|
49
|
+
<div><input type="radio" v-model="addressType" name="addressType" @change="changeAddressType"
|
50
|
+
id="phone_addressType2" value="特殊地址" /><label style="font-weight: normal;padding-left: 2px"
|
51
|
+
for="phone_addressType2">特殊地址</label></div>
|
52
|
+
</div>
|
53
|
+
<!--<input type="text" style="width: 75%;float:right" class="form-control" v-model="row.f_devices_type" />-->
|
54
|
+
<!--<input type="text" class="form-control rightipt" readonly v-model="userinfo.addressinfo.f_pcd" />-->
|
55
|
+
<!--<v-select :value.sync="userinfo.addressinfo.f_iscity" class="input-font" style="margin-left: 5%;"
|
56
|
+
:width="'60%'"
|
57
|
+
v-model="userinfo.addressinfo.f_iscity"
|
58
|
+
:options='cityTypes' placeholder='地区类型' close-on-select clear-button value-single @change="area_change()"></v-select>-->
|
59
|
+
</div>
|
60
|
+
<div class="row auto" style="margin: 5px 0">
|
61
|
+
<label class="righttxt">地区类型:</label>
|
62
|
+
<!--<input type="text" style="width: 75%;float:right" class="form-control" v-model="row.f_devices_type" />-->
|
63
|
+
<input type="text" class="form-control rightipt" readonly v-model="userinfo.addressinfo.f_iscity" />
|
64
|
+
<!--<v-select :value.sync="userinfo.addressinfo.f_iscity" class="input-font" style="margin-left: 5%;"
|
65
|
+
:width="'60%'"
|
66
|
+
:disabled="true"
|
67
|
+
v-model="userinfo.addressinfo.f_iscity"
|
68
|
+
:options='cityTypes' placeholder='地区类型' close-on-select clear-button value-single ></v-select>-->
|
69
|
+
</div>
|
70
|
+
<div class="row auto" style="margin: 5px 0">
|
71
|
+
<label class="righttxt">省 市 区:</label>
|
72
|
+
<!--<input type="text" style="width: 75%;float:right" class="form-control" v-model="row.f_devices_type" />-->
|
73
|
+
<!--<input type="text" class="form-control rightipt" readonly v-model="userinfo.addressinfo.f_pcd" />-->
|
74
|
+
<v-select :value.sync="selectPcd" class="input-font" style="margin-left: 5%;" :width="'60%'"
|
75
|
+
v-model="selectPcd" :options='pcds' placeholder='请选择省市区' close-on-select clear-button value-single
|
76
|
+
@change="pcd_change()"></v-select>
|
77
|
+
</div>
|
78
|
+
<div class="row auto" style="margin: 5px 0">
|
79
|
+
<label class="righttxt">街道名称:</label>
|
80
|
+
<!--<input type="text" readonly class="form-control rightipt" v-model="userinfo.addressinfo.f_street" />-->
|
81
|
+
<v-select :value.sync="selectStreet" class="input-font" style="margin-left: 5%;" :width="'60%'"
|
82
|
+
v-model="selectStreet" :options='streets' placeholder='请选择街道' close-on-select clear-button value-single
|
83
|
+
@change="street_change()"></v-select>
|
84
|
+
</div>
|
85
|
+
<div class="row auto" style="margin: 5px 0">
|
86
|
+
<label class="righttxt">集收单位:</label>
|
87
|
+
<!--<input type="text" readonly class="form-control rightipt" v-model="userinfo.addressinfo.f_residential_area" />-->
|
88
|
+
<v-select :value.sync="selectArea" class="input-font" style="margin-left: 5%;" :width="'60%'"
|
89
|
+
v-model="selectArea" :timeout="500" @select-search="select_search" :options='area' placeholder='请选择集收单位'
|
90
|
+
close-on-select clear-button value-single @change="area_change()"></v-select>
|
91
|
+
</div>
|
92
|
+
<!--<div class="row auto" style="margin: 5px 0" v-show="addressType=='特殊地址'">
|
93
|
+
<label class="righttxt">集收单位:</label>
|
94
|
+
<!–<input type="text" readonly class="form-control rightipt" v-model="userinfo.addressinfo.f_residential_area" />–>
|
95
|
+
<v-select :value.sync="selectArea" class="input-font" style="margin-left: 5%;"
|
96
|
+
:width="'60%'"
|
97
|
+
v-model="selectArea"
|
98
|
+
@select-search="select_search"
|
99
|
+
:options='area' placeholder='请选择集收单位' close-on-select clear-button value-single @change="area_changeTC()"></v-select>
|
100
|
+
</div>-->
|
101
|
+
<div class="row auto" style="margin: 5px 0" v-show="addressType == '普通地址'">
|
102
|
+
<label class="righttxt">楼    号:</label><input type="text" @change="changeNewAddress"
|
103
|
+
class="form-control rightipt" v-model="userinfo.addressinfo.f_building" />
|
104
|
+
</div>
|
105
|
+
<div class="row auto" style="margin: 5px 0" v-show="addressType == '普通地址'">
|
106
|
+
<label class="righttxt">单    元:</label><input type="text" @change="changeNewAddress"
|
107
|
+
class="form-control rightipt" v-model="userinfo.addressinfo.f_unit" />
|
108
|
+
</div>
|
109
|
+
<div class="row auto" style="margin: 5px 0" v-show="addressType == '普通地址'">
|
110
|
+
<label class="righttxt">楼    层:</label><input type="text" @change="changeNewAddress"
|
111
|
+
class="form-control rightipt" v-model="userinfo.addressinfo.f_floor" />
|
112
|
+
</div>
|
113
|
+
<div class="row auto" style="margin: 5px 0" v-show="addressType == '普通地址'">
|
114
|
+
<label class="righttxt">门 牌 号:</label><input type="text" @change="changeNewAddress"
|
115
|
+
class="form-control rightipt" v-model="userinfo.addressinfo.f_room" />
|
116
|
+
</div>
|
117
|
+
<div class="row auto" style="margin: 5px 0">
|
118
|
+
<label class="righttxt">详细地址:</label><input type="text" class="form-control rightipt" readonly
|
119
|
+
v-model="userinfo_old.addressinfo.f_address" />
|
120
|
+
</div>
|
121
|
+
<div class="row auto" style="margin: 5px 0">
|
122
|
+
<label class="righttxt">新 地 址:</label>
|
123
|
+
<!--<input type="text" class="form-control rightipt" readonly v-model="getaddress()" />-->
|
124
|
+
<textarea :readonly="addressType == '普通地址'" class="form-control rightipt" : style="height: 80px"
|
125
|
+
v-model="userinfo.addressinfo.f_address"></textarea>
|
126
|
+
</div>
|
127
|
+
|
128
|
+
<!--<div class="row auto" style="margin: 5px 0" v-show="addressType=='特殊地址'">
|
129
|
+
<label class="righttxt">新 地 址:</label><!–<input type="text" class="form-control rightipt" v-model="userinfo.addressinfo.f_address" />–>
|
130
|
+
<textarea class="form-control rightipt" style="height: 80px" v-model="getAddressTS"></textarea>
|
131
|
+
</div>-->
|
132
|
+
|
133
|
+
<div class="row auto" style="margin: 5px 0">
|
134
|
+
<label class="righttxt">备    注:</label><textarea class="form-control rightipt"
|
135
|
+
style="height: 150px" v-model="userinfo.baseinfo.base.f_remark"></textarea>
|
136
|
+
<!--<input type="text" class="form-control rightipt" v-model="userinfo.baseinfo.base.f_remark" />-->
|
137
|
+
</div>
|
138
|
+
</div>
|
139
|
+
</div>
|
140
|
+
<div class="panel auto" v-if="false">
|
141
|
+
<div class="panel-heading" @click="selectVal('表具信息')" style="background-color: #ffffff">
|
142
|
+
<span class="spanboder">
|
143
|
+
<img src="../../assets/person.png" style="width: 22px;margin-right: 8px;">表具信息
|
144
|
+
<img class="butt3" :src="imgback('表具信息')">
|
145
|
+
</span>
|
146
|
+
</div>
|
147
|
+
<div class="panel-body " v-show="headername == '表具信息'">
|
148
|
+
<div class="row auto" style="margin: 5px 0">
|
149
|
+
<label class="righttxt">表    号:</label>
|
150
|
+
<input type="text" :readonly="userinfo.meterinfo[0].f_meter_classify != '机表'" class="form-control rightipt"
|
151
|
+
style="width: 45%" v-model="userinfo.meterinfo[0].f_meternumber" />
|
152
|
+
<button type="button"
|
153
|
+
:disabled="!(userinfo.meterinfo[0].f_meter_classify == '机表' || userinfo.meterinfo[0].f_meter_classify == '金额卡表' || userinfo.meterinfo[0].f_meter_classify == '气量卡表')"
|
154
|
+
name="button" class="btn btn-primary" style="width: 15%" @click="scan">扫码
|
155
|
+
</button>
|
156
|
+
</div>
|
157
|
+
|
158
|
+
<div class="row auto" style="margin: 5px 0">
|
159
|
+
<label class="righttxt">通 气 人:</label>
|
160
|
+
<input type="text" class="form-control rightipt" v-model="userinfo.meterinfo[0].f_gas_person" />
|
161
|
+
</div>
|
162
|
+
<div class="row auto" style="margin: 5px 0">
|
163
|
+
<label class="righttxt">通气时间:</label>
|
164
|
+
<datepicker class="rightipt" :value.sync="userinfo.meterinfo[0].f_gas_date"
|
165
|
+
v-model="userinfo.meterinfo[0].f_gas_date" :disabled-days-of-Week="[]" :format="'yyyy-MM-dd'"
|
166
|
+
:show-reset-button="reset">
|
167
|
+
</datepicker>
|
168
|
+
</div>
|
169
|
+
<div class="row auto" style="margin: 5px 0" v-show="showBox">
|
170
|
+
<label class="righttxt">调 压 箱:</label>
|
171
|
+
<v-select class="rightipt" :value.sync="userinfo.meterinfo[0].f_adjustable_id"
|
172
|
+
v-model="userinfo.meterinfo[0].f_adjustable_id" placeholder='请选择' :width='wid' readonly
|
173
|
+
:options="boxOptions" close-on-select value-single></v-select>
|
174
|
+
</div>
|
175
|
+
<div class="row auto" style="margin: 5px 0">
|
176
|
+
<label class="righttxt">是否直通:</label>
|
177
|
+
<v-select :value.sync="userinfo.meterinfo[0].f_if_direct" class="input-font" style="margin-left: 5%;"
|
178
|
+
:width="'60%'" v-model="userinfo.meterinfo[0].f_if_direct" :options='directOptions' placeholder='是否直通'
|
179
|
+
close-on-select clear-button value-single>
|
180
|
+
</v-select>
|
181
|
+
</div>
|
182
|
+
<div class="row auto" style="margin: 5px 0">
|
183
|
+
<label class="righttxt">表 封 号:</label>
|
184
|
+
<input type="text" class="form-control rightipt" v-model="userinfo.meterinfo[0].f_metertitles" />
|
185
|
+
</div>
|
186
|
+
<div class="row auto" style="margin: 5px 0">
|
187
|
+
<label class="righttxt">表 位 置:</label>
|
188
|
+
<!--<input type="text" class="form-control rightipt" v-model="userinfo.meterinfo[0].f_position" readonly/>-->
|
189
|
+
<v-select class="rightipt" :value.sync="userinfo.meterinfo[0].f_position"
|
190
|
+
v-model="userinfo.meterinfo[0].f_position" placeholder='请选择' :width='wid' readonly :options="wz_types"
|
191
|
+
close-on-select value-single></v-select>
|
192
|
+
</div>
|
193
|
+
<div class="row auto" style="margin: 5px 0">
|
194
|
+
<label class="righttxt">表    向:</label>
|
195
|
+
<!--<input type="text" class="form-control rightipt" v-model="userinfo.meterinfo[0].f_position" readonly/>-->
|
196
|
+
<v-select class="rightipt" :value.sync="userinfo.meterinfo[0].f_aroundmeter"
|
197
|
+
v-model="userinfo.meterinfo[0].f_aroundmeter" placeholder='请选择' :width='wid' readonly
|
198
|
+
:options="aroundmeters" close-on-select value-single></v-select>
|
199
|
+
</div>
|
200
|
+
<div class="row auto" style="margin: 5px 0">
|
201
|
+
<label class="righttxt">气表类型:</label>
|
202
|
+
<input type="text" class="form-control rightipt" v-model="userinfo.meterinfo[0].f_meter_classify" readonly />
|
203
|
+
</div>
|
204
|
+
<div class="row auto" style="margin: 5px 0">
|
205
|
+
<label class="righttxt">表前阀状态:</label>
|
206
|
+
<!--<input type="text" class="form-control rightipt" v-model="userinfo.meterinfo[0].f_position" readonly/>-->
|
207
|
+
<v-select class="rightipt" :value.sync="userinfo.meterinfo[0].f_bqf_state"
|
208
|
+
v-model="userinfo.meterinfo[0].f_bqf_state" placeholder='请选择' :width='wid' readonly :options="bqf_states"
|
209
|
+
close-on-select value-single></v-select>
|
210
|
+
</div>
|
211
|
+
<!-- <div class="row auto" style="margin: 5px 0">
|
212
|
+
<div style="display: flex;justify-content: center;">
|
213
|
+
<button v-if="userinfo.meterinfo[0].f_meter_classify=='机表'" class="col-sm-3 btn btn-primary" @click="upUserState()">机表关阀停用</button>
|
214
|
+
</div>
|
215
|
+
</div>-->
|
216
|
+
</div>
|
217
|
+
</div>
|
218
|
+
<div class="panel auto">
|
219
|
+
<div class="panel-heading" @click="selectVal('用气设备信息')" style="background-color: #ffffff">
|
220
|
+
<span class="spanboder"><img src="../../assets/list.png" style="width: 22px;margin-right: 8px;">用气设备信息<img
|
221
|
+
class="butt3" :src="imgback('用气设备信息')"></span>
|
222
|
+
</div>
|
223
|
+
<div class="panel-body" v-show="headername == '用气设备信息'">
|
224
|
+
<div class="row" v-for="(idx, row) in model"
|
225
|
+
style="border:2px solid #A2C2EB; border-top:10px solid #A2C2EB; box-shadow: #00b3ee;margin-bottom: 10px">
|
226
|
+
<div class="row auto" style="margin: 5px 0">
|
227
|
+
<label class="righttxt">设备类型:</label>
|
228
|
+
<!--<input type="text" class="form-control rightipt" readonly v-model="row.f_devices_type" />-->
|
229
|
+
<v-select class="rightipt" :value.sync="row.f_devices_type" v-model="row.f_devices_type" placeholder='请选择'
|
230
|
+
@change="getServiceLife(idx, row.f_devices_type)" :width='wid' readonly :options="devices_types"
|
231
|
+
close-on-select value-single></v-select>
|
232
|
+
</div>
|
233
|
+
<div class="row auto" style="margin: 5px 0">
|
234
|
+
<label class="righttxt">设备品牌:</label>
|
235
|
+
<input type="text" class="form-control rightipt" v-model="row.f_brand" />
|
236
|
+
</div>
|
237
|
+
<div class="row auto" style="margin: 5px 0">
|
238
|
+
<label class="righttxt">设备型号:</label><input type="text" class="form-control rightipt"
|
239
|
+
v-model="row.f_devices_model" />
|
240
|
+
</div>
|
241
|
+
<div class="row auto" style="margin: 5px 0" v-if="false">
|
242
|
+
<label class="righttxt">生产日期:</label>
|
243
|
+
<datepicker class="rightipt" :value.sync="row.f_make_date" v-model="row.f_make_date"
|
244
|
+
:disabled-days-of-Week="[]" :format="'yyyy-MM-dd'" :show-reset-button="reset" readonly="readonly">
|
245
|
+
</datepicker>
|
246
|
+
</div>
|
247
|
+
<div class="row auto" style="margin: 5px 0">
|
248
|
+
<label class="righttxt">安装日期:</label>
|
249
|
+
<datepicker class="rightipt" @change="countExpireFate(idx, row.f_input_date)" :value.sync="row.f_input_date"
|
250
|
+
v-model="row.f_input_date" :disabled-days-of-Week="[]" :format="'yyyy-MM-dd'" :show-reset-button="reset"
|
251
|
+
readonly="readonly">
|
252
|
+
</datepicker>
|
253
|
+
</div>
|
254
|
+
<div class="row auto" style="margin: 5px 0">
|
255
|
+
<label class="righttxt">使用年限:</label><input type="number" class="form-control rightipt"
|
256
|
+
v-model="row.f_service_life" readonly />
|
257
|
+
</div>
|
258
|
+
<div class="row auto" style="margin: 5px 0">
|
259
|
+
<label class="righttxt">到期日期:</label>
|
260
|
+
<input type="text" class="form-control rightipt" v-model="row.f_expire_date" readonly />
|
261
|
+
</div>
|
262
|
+
<div class="row auto" style="margin: 5px 0">
|
263
|
+
<label class="righttxt">安 装 人:</label><input type="text" class="form-control rightipt"
|
264
|
+
v-model="row.f_input_person" />
|
265
|
+
</div>
|
266
|
+
<div class="row auto" style="margin: 5px 0">
|
267
|
+
<label class="righttxt">设备数量:</label><input type="number" class="form-control rightipt"
|
268
|
+
v-model="row.f_devices_num" />
|
269
|
+
</div>
|
270
|
+
<div class="row auto" style="margin: 5px 0">
|
271
|
+
<label class="righttxt">管道类型:</label>
|
272
|
+
<!--<input type="text" class="form-control rightipt" readonly v-model="row.f_devices_type" />-->
|
273
|
+
<v-select class="rightipt" :value.sync="row.f_pipe_type" v-model="row.f_pipe_type" placeholder='请选择'
|
274
|
+
:width='wid' readonly :options="pipe_types" close-on-select value-single></v-select>
|
275
|
+
</div>
|
276
|
+
<div class="row auto" style="margin: 5px 0">
|
277
|
+
<label class="righttxt">安装日期:</label>
|
278
|
+
<datepicker class="rightipt" @change="countExpireFate_pipe(idx, row.f_pipeinstall_date, row.f_pipe_type)"
|
279
|
+
:value.sync="row.f_pipeinstall_date" v-model="row.f_pipeinstall_date" :disabled-days-of-Week="[]"
|
280
|
+
:format="'yyyy-MM-dd'" :show-reset-button="reset" readonly="readonly">
|
281
|
+
</datepicker>
|
282
|
+
</div>
|
283
|
+
<div class="row auto" style="margin: 5px 0">
|
284
|
+
<label class="righttxt">到期日期:</label>
|
285
|
+
<input type="text" class="form-control rightipt" v-model="row.f_pipeexpire_date" readonly />
|
286
|
+
</div>
|
287
|
+
<!--<div class="row auto" style="margin: 5px 0">
|
288
|
+
<label class="righttxt">设备状态:</label><input type="text" class="form-control rightipt" readonly v-model="row.f_userinfodevices_state" />
|
289
|
+
</div>-->
|
290
|
+
<!--<div class="row auto" style="margin: 5px 0">
|
291
|
+
<label class="righttxt">购买方式:</label><input type="text" class="form-control rightipt" readonly v-model="row.watchpurchase" />
|
292
|
+
</div>-->
|
293
|
+
<div style="display: flex;justify-content: center;margin-bottom: 3px"
|
294
|
+
v-if="$index > this.userinfo_old.devicesinfo.length - 1 || this.userinfo_old.devicesinfo.length == 0">
|
295
|
+
<button class="btn btn-warning" @click="delDevices($index)">删除设备</button>
|
296
|
+
</div>
|
297
|
+
</div>
|
298
|
+
<div style="display: flex;justify-content: space-around;">
|
299
|
+
<button class="col-sm-3 btn btn-primary" @click="addDevices($index)">新增设备</button>
|
300
|
+
</div>
|
301
|
+
</div>
|
302
|
+
</div>
|
303
|
+
<div class="panel auto">
|
304
|
+
<div class="panel-heading" @click="selectVal('设备信息')" style="background-color: #ffffff">
|
305
|
+
<span class="spanboder"><img src="../../assets/list.png" style="width: 22px;margin-right: 8px;">设备信息<img
|
306
|
+
class="butt3" :src="imgback('设备信息')"></span>
|
307
|
+
</div>
|
308
|
+
<div class="panel-body" v-show="headername == '设备信息'">
|
309
|
+
<div class="row" v-for="(idx, row) in devicemodel"
|
310
|
+
style="border:2px solid #A2C2EB; border-top:10px solid #A2C2EB; box-shadow: #00b3ee;margin-bottom: 10px">
|
311
|
+
<div class="row auto" style="margin: 5px 0">
|
312
|
+
<label class="righttxt">设备类型:</label>
|
313
|
+
<v-select class="rightipt" :value.sync="row.f_devices_type" v-model="row.f_devices_type" placeholder='请选择'
|
314
|
+
:width='wid' readonly :options="device_type"
|
315
|
+
close-on-select value-single></v-select>
|
316
|
+
</div>
|
317
|
+
<div class="row auto" style="margin: 5px 0">
|
318
|
+
<label class="righttxt">厂家:</label>
|
319
|
+
<input type="text" class="form-control rightipt" v-model="row.f_manufactor" />
|
320
|
+
</div>
|
321
|
+
<div class="row auto" style="margin: 5px 0">
|
322
|
+
<label class="righttxt">设备编号:</label><input type="text" class="form-control rightipt"
|
323
|
+
v-model="row.f_devices_model" />
|
324
|
+
</div>
|
325
|
+
<div class="row auto" style="margin: 5px 0">
|
326
|
+
<label class="righttxt">设备型号:</label><input type="text" class="form-control rightipt"
|
327
|
+
v-model="row.f_devices_model" />
|
328
|
+
</div>
|
329
|
+
<div class="row auto" style="margin: 5px 0">
|
330
|
+
<label class="righttxt">安 装 人:</label><input type="text" class="form-control rightipt"
|
331
|
+
v-model="row.f_instaler_person" />
|
332
|
+
</div>
|
333
|
+
<div class="row auto" style="margin: 5px 0">
|
334
|
+
<label class="righttxt">安装日期:</label>
|
335
|
+
<datepicker class="rightipt" :value.sync="row.f_input_date"
|
336
|
+
v-model="row.f_input_date" :disabled-days-of-Week="[]" :format="'yyyy-MM-dd'" :show-reset-button="reset"
|
337
|
+
readonly="readonly">
|
338
|
+
</datepicker>
|
339
|
+
</div>
|
340
|
+
<div class="row auto" style="margin: 5px 0" >
|
341
|
+
<label class="righttxt">生产日期:</label>
|
342
|
+
<datepicker class="rightipt" :value.sync="row.f_make_date" v-model="row.f_make_date"
|
343
|
+
:disabled-days-of-Week="[]" :format="'yyyy-MM-dd'" :show-reset-button="reset" >
|
344
|
+
</datepicker>
|
345
|
+
</div>
|
346
|
+
<div class="row auto" style="margin: 5px 0">
|
347
|
+
<label class="righttxt">设备数量:</label>
|
348
|
+
<input type="number" class="form-control rightipt" v-model="row.f_devices_num" />
|
349
|
+
</div>
|
350
|
+
<div class="row auto" style="margin: 5px 0" v-show="row.f_devices_type == '报警器'">
|
351
|
+
<label class="righttxt">首校日期:</label>
|
352
|
+
<datepicker class="rightipt" :value.sync="row.f_firstcheck_date" v-model="row.f_firstcheck_date"
|
353
|
+
:disabled-days-of-Week="[]" :format="'yyyy-MM-dd'" :show-reset-button="reset" >
|
354
|
+
</datepicker>
|
355
|
+
</div>
|
356
|
+
<div class="row auto" style="margin: 5px 0" v-show="row.f_devices_type == '报警器'">
|
357
|
+
<label class="righttxt">报废日期:</label>
|
358
|
+
<datepicker class="rightipt" :value.sync="row.f_expire_date" v-model="row.f_expire_date"
|
359
|
+
:disabled-days-of-Week="[]" :format="'yyyy-MM-dd'" :show-reset-button="reset" >
|
360
|
+
</datepicker>
|
361
|
+
</div>
|
362
|
+
<div class="row auto" style="margin: 5px 0" v-show="row.f_devices_type == '报警器'">
|
363
|
+
<label class="righttxt">下次校验:</label>
|
364
|
+
<datepicker class="rightipt" :value.sync="row.f_nextcheck_date" v-model="row.f_nextcheck_date"
|
365
|
+
:disabled-days-of-Week="[]" :format="'yyyy-MM-dd'" :show-reset-button="reset" >
|
366
|
+
</datepicker>
|
367
|
+
</div>
|
368
|
+
<div class="row auto" style="margin: 5px 0" v-show="row.f_devices_type == '切断阀'">
|
369
|
+
<label class="righttxt">报废日期:</label>
|
370
|
+
<datepicker class="rightipt" :value.sync="row.f_expire_date" v-model="row.f_expire_date"
|
371
|
+
:disabled-days-of-Week="[]" :format="'yyyy-MM-dd'" :show-reset-button="reset" >
|
372
|
+
</datepicker>
|
373
|
+
</div>
|
374
|
+
<div class="row auto" style="margin: 5px 0" v-show="row.f_devices_type == '调压器'">
|
375
|
+
<label class="righttxt">流量:</label>
|
376
|
+
<input type="number" class="form-control rightipt" v-model="row.f_rate_flow" />
|
377
|
+
</div>
|
378
|
+
<div class="row auto" style="margin: 5px 0" v-show="row.f_devices_type == '调压器'">
|
379
|
+
<label class="righttxt">出口压力:</label>
|
380
|
+
<input type="text" class="form-control rightipt" v-model="row.f_pressure_range" />
|
381
|
+
</div>
|
382
|
+
<div class="row auto" style="margin: 5px 0" v-show="row.f_devices_type == '调压器'">
|
383
|
+
<label class="righttxt">进口压力:</label>
|
384
|
+
<input type="text" class="form-control rightipt" v-model="row.f_import_pressure" />
|
385
|
+
</div>
|
386
|
+
<div style="display: flex;justify-content: center;margin-bottom: 3px">
|
387
|
+
<button class="btn btn-warning" @click="deleteDevice($index)">删除设备</button>
|
388
|
+
</div>
|
389
|
+
</div>
|
390
|
+
<div style="display: flex;justify-content: space-around;">
|
391
|
+
<button class="col-sm-3 btn btn-primary" @click="pushDevices($index)">新增设备</button>
|
392
|
+
</div>
|
393
|
+
</div>
|
394
|
+
</div>
|
395
|
+
<div class="panel auto">
|
396
|
+
<div class="panel-body">
|
397
|
+
<div style="display: flex;justify-content: center;">
|
398
|
+
<!-- <button class="col-sm-3 btn btn-primary" :disabled="enable" @click="isNeedAudit ? editUserInfo() : editUserInfoNoAudit()">{{isNeedAudit ? '上传审核' : '上传'}}</button>-->
|
399
|
+
<button class="col-sm-3 btn btn-primary" :disabled="enable" @click="editUserInfo()">上传</button>
|
400
|
+
</div>
|
401
|
+
</div>
|
402
|
+
</div>
|
403
|
+
</div>
|
404
|
+
</template>
|
405
|
+
|
406
|
+
<script>
|
407
|
+
import { HttpResetClass } from 'vue-client'
|
408
|
+
import * as Util from "../Util";
|
409
|
+
import Vue from 'vue'
|
410
|
+
import { toStandardDateString } from "../Util";
|
411
|
+
|
412
|
+
export default {
|
413
|
+
title: '设备查看',
|
414
|
+
data() {
|
415
|
+
return {
|
416
|
+
model: [],
|
417
|
+
devicemodel:[],
|
418
|
+
show: false,
|
419
|
+
row: Object,
|
420
|
+
userinfo: Object,
|
421
|
+
userinfo_old: Object,
|
422
|
+
wid: "60%",
|
423
|
+
aroundmeters: [],
|
424
|
+
devices_types: [],
|
425
|
+
device_type: [{label: '调压器', value: '调压器'}, {label: '报警器', value: '报警器'}, {label: '切断阀', value: '切断阀'}],
|
426
|
+
pipe_types: [{label: '包覆管', value: '包覆管'}, {label: '波纹管', value: '波纹管'}],
|
427
|
+
wz_types: [],
|
428
|
+
cityTypes: [{ label: '市区', value: '市区' }, { label: '城镇', value: '城镇' }],
|
429
|
+
bqf_states: [{ label: '开阀', value: '开阀' }, { label: '关阀', value: '关阀' }],
|
430
|
+
pcds: [],
|
431
|
+
streets: [],
|
432
|
+
update: false,
|
433
|
+
headername: '用气设备信息',
|
434
|
+
excessive: false,
|
435
|
+
area: [],
|
436
|
+
enable: false,
|
437
|
+
f_meterno_path: Vue.nopic,
|
438
|
+
selectArea: { id: '' },
|
439
|
+
selectPcd: { id: '' },
|
440
|
+
selectStreet: { id: '' },
|
441
|
+
changemeterno: false,//是否修改了机表表号
|
442
|
+
approveChange: false,//是否需要进行信息变更审核
|
443
|
+
newAddress: '',
|
444
|
+
addressType: '',
|
445
|
+
//需要审核的字段
|
446
|
+
checkField: {
|
447
|
+
checkUserinfoField: [
|
448
|
+
'f_user_name'
|
449
|
+
],
|
450
|
+
checkUserFilesField: [
|
451
|
+
'f_meternumber'
|
452
|
+
],
|
453
|
+
checkAddressField: [
|
454
|
+
'f_pcd_id',
|
455
|
+
'f_street_id',
|
456
|
+
'f_residential_area_id',
|
457
|
+
'f_building',
|
458
|
+
'f_unit',
|
459
|
+
'f_floor',
|
460
|
+
'f_room',
|
461
|
+
'f_slice_area',
|
462
|
+
'f_special',
|
463
|
+
'f_address'
|
464
|
+
],
|
465
|
+
},
|
466
|
+
boxOptions: [],
|
467
|
+
showBox: false,
|
468
|
+
directOptions: [{ label: '是', value: '是' }, { label: '否', value: '否' }],
|
469
|
+
deviceBrandOption: {},
|
470
|
+
isNeedAudit: this.$appdata.getSingleValue('信息变更是否需要审核') == 'false' ? false : true
|
471
|
+
}
|
472
|
+
},
|
473
|
+
props: {
|
474
|
+
user: {
|
475
|
+
type: Object
|
476
|
+
},
|
477
|
+
f_userinfo_id: '',
|
478
|
+
f_source: ''
|
479
|
+
},
|
480
|
+
methods: {
|
481
|
+
deleteDevice(idx) {
|
482
|
+
this.$showMessage('删除后不可恢复,确认删除吗?', ['confirm', 'cancel']).then((res) => {
|
483
|
+
if (res === 'confirm') {
|
484
|
+
this.devicemodel.splice(idx, 1)
|
485
|
+
}
|
486
|
+
})
|
487
|
+
},
|
488
|
+
pushDevices() {
|
489
|
+
let obj = {
|
490
|
+
"f_operator": Vue.user.name,
|
491
|
+
"f_operate_date": Util.toStandardTimeString(),
|
492
|
+
"f_operatorid": Vue.user.id,
|
493
|
+
"f_devices_type":null,
|
494
|
+
"f_manufactor":null,
|
495
|
+
"f_devices_no":null,
|
496
|
+
"f_devices_model":null,
|
497
|
+
"f_instaler_person":null,
|
498
|
+
"f_make_date":null,
|
499
|
+
"f_input_date":null,
|
500
|
+
"f_devices_num":null,
|
501
|
+
"f_firstcheck_date":null,
|
502
|
+
"f_rate_flow":null,
|
503
|
+
"f_expire_date":null,
|
504
|
+
"f_nextcheck_date":null,
|
505
|
+
"f_pressure_range":null,
|
506
|
+
"f_import_pressure":null
|
507
|
+
}
|
508
|
+
this.devicemodel.push(obj)
|
509
|
+
},
|
510
|
+
countExpireFate_pipe(index, dateTime, type) {
|
511
|
+
let old = new Date(dateTime)
|
512
|
+
let newYear = old.getFullYear() + Number(this.$appdata.getSingleValue(type + '-年限') || 0)
|
513
|
+
let month = old.getMonth() + 1
|
514
|
+
let date = old.getDate()
|
515
|
+
this.model[index].f_pipeexpire_date = newYear + '-' + (month < 10 ? '0' + month : month) + '-' + (date < 10 ? '0' + date : date)
|
516
|
+
},
|
517
|
+
countExpireFate(index, dateTime) {
|
518
|
+
let old = new Date(dateTime)
|
519
|
+
let newYear = old.getFullYear() + Number(this.model[index].f_service_life)
|
520
|
+
let month = old.getMonth() + 1
|
521
|
+
let date = old.getDate()
|
522
|
+
this.model[index].f_expire_date = newYear + '-' + (month < 10 ? '0' + month : month) + '-' + (date < 10 ? '0' + date : date)
|
523
|
+
},
|
524
|
+
getServiceLife(index, type) {
|
525
|
+
const year = this.$appdata.getSingleValue(type + '-' + this.userinfo.meterinfo[0].f_user_type + '-年限') || 0
|
526
|
+
this.model[index].f_service_life = year
|
527
|
+
},
|
528
|
+
dateAddYear(dateTime, year) {
|
529
|
+
let old = new Date(dateTime)
|
530
|
+
let newYear = old.getFullYear() + Number(year)
|
531
|
+
let month = old.getMonth() + 1
|
532
|
+
let date = old.getDate()
|
533
|
+
return newYear + '-' + (month < 10 ? '0' + month : month) + '-' + (date < 10 ? '0' + date : date)
|
534
|
+
},
|
535
|
+
scan() {
|
536
|
+
HostApp.__this__ = this,
|
537
|
+
HostApp.scanCode({ callback: "javascript:HostApp.__this__.getCode();" })
|
538
|
+
},
|
539
|
+
getCode() {
|
540
|
+
var datapa = HostApp.getCode().data;
|
541
|
+
//tag
|
542
|
+
this.userinfo.meterinfo[0].f_meternumber = datapa
|
543
|
+
},
|
544
|
+
//数据检查
|
545
|
+
checkVal() {
|
546
|
+
//检查一些必要信息是否未填
|
547
|
+
this.approveChange = false
|
548
|
+
this.changemeterno = false
|
549
|
+
let checked = { ischeck: true, msg: '' }
|
550
|
+
//tag
|
551
|
+
//tag
|
552
|
+
//tag
|
553
|
+
if (!this.userinfo.baseinfo.base.f_user_name) {
|
554
|
+
checked = { ischeck: false, msg: '请输入用户名称!' }
|
555
|
+
}
|
556
|
+
if (!this.selectPcd.id) {
|
557
|
+
checked = { ischeck: false, msg: '请选择省市区!' }
|
558
|
+
}
|
559
|
+
if (!this.selectStreet.id) {
|
560
|
+
checked = { ischeck: false, msg: '请选择街道!' }
|
561
|
+
}
|
562
|
+
if (!this.userinfo.addressinfo.f_address) {
|
563
|
+
checked = { ischeck: false, msg: '新地址不能为空!' }
|
564
|
+
}
|
565
|
+
if (this.addressType == '普通地址') {
|
566
|
+
if (!this.selectArea.id) {
|
567
|
+
checked = { ischeck: false, msg: '请选择集收单位!' }
|
568
|
+
}
|
569
|
+
if (!this.userinfo.addressinfo.f_room) {
|
570
|
+
checked = { ischeck: false, msg: '新输入门牌号!' }
|
571
|
+
}
|
572
|
+
}
|
573
|
+
if (this.userinfo.meterinfo[0].f_meter_classify == '机表' && this.userinfo_old.meterinfo[0].f_meternumber) {
|
574
|
+
|
575
|
+
//tag
|
576
|
+
//tag
|
577
|
+
if (this.userinfo.meterinfo[0].f_meternumber) {
|
578
|
+
if (this.userinfo.meterinfo[0].f_meternumber != this.userinfo_old.meterinfo[0].f_meternumber) {
|
579
|
+
if (!this.f_meterno_path || this.f_meterno_path == Vue.nopic) {
|
580
|
+
checked = { ischeck: false, msg: '请拍摄表号照片!' }
|
581
|
+
} else {
|
582
|
+
//用来标识当前有修改机表表号,后台需要进行照片上传
|
583
|
+
this.changemeterno = true
|
584
|
+
}
|
585
|
+
}
|
586
|
+
} else {
|
587
|
+
checked = { ischeck: false, msg: '请输入表号!' }
|
588
|
+
}
|
589
|
+
}
|
590
|
+
//检查本次修改信息中是否包含需要审核的内容
|
591
|
+
for (let check in this.checkField) {
|
592
|
+
//tag
|
593
|
+
if (typeof check != 'function') {
|
594
|
+
for (let i = 0; i < this.checkField[check].length; i++) {
|
595
|
+
//tag
|
596
|
+
if (check == 'checkUserinfoField') {
|
597
|
+
//tag
|
598
|
+
//tag
|
599
|
+
if (this.userinfo.baseinfo.base[this.checkField[check][i]] != this.userinfo_old.baseinfo.base[this.checkField[check][i]]) {
|
600
|
+
//tag
|
601
|
+
this.approveChange = true
|
602
|
+
}
|
603
|
+
} else if (check == 'checkUserFilesField') {
|
604
|
+
//tag
|
605
|
+
//tag
|
606
|
+
if (this.userinfo.meterinfo[0][this.checkField[check][i]] != this.userinfo_old.meterinfo[0][this.checkField[check][i]]) {
|
607
|
+
//tag
|
608
|
+
this.approveChange = true
|
609
|
+
}
|
610
|
+
} else if (check == 'checkAddressField') {
|
611
|
+
//tag
|
612
|
+
//tag
|
613
|
+
if (this.userinfo.addressinfo[this.checkField[check][i]] != this.userinfo_old.addressinfo[this.checkField[check][i]]) {
|
614
|
+
//tag
|
615
|
+
this.approveChange = true
|
616
|
+
}
|
617
|
+
}
|
618
|
+
}
|
619
|
+
}
|
620
|
+
}
|
621
|
+
//tag
|
622
|
+
return checked
|
623
|
+
},
|
624
|
+
select_search(text) {
|
625
|
+
//tag
|
626
|
+
if (this.selectStreet.id) {
|
627
|
+
let pcdText = text ? `and f_street_id=${this.selectStreet.id} and f_residential_area like '%${text}%'` : `and f_street_id=${this.selectStreet.id}`
|
628
|
+
new HttpResetClass().load("POST", `${this.$androidUtil.getProxyUrl()}/rs/sql/safe_singleTable_OrderBy`, {
|
629
|
+
data: {
|
630
|
+
items: "*",
|
631
|
+
tablename: "t_area",
|
632
|
+
orderitem: "id",
|
633
|
+
condition: `f_orgid = '${Vue.user.orgid}' ${pcdText} `
|
634
|
+
}
|
635
|
+
}, { resolveMsg: null, rejectMsg: null }).then((res) => {
|
636
|
+
//tag)
|
637
|
+
if (res.data.length > 0) {
|
638
|
+
this.area = []
|
639
|
+
res.data.forEach((result) => {
|
640
|
+
this.area.push({ label: result.f_residential_area, value: result })
|
641
|
+
})
|
642
|
+
}
|
643
|
+
})
|
644
|
+
} else {
|
645
|
+
this.area = []
|
646
|
+
}
|
647
|
+
},
|
648
|
+
cameraCallBack(prop, fileName) {
|
649
|
+
HostApp.__this__.$set(prop, fileName + '?' + Math.random())
|
650
|
+
//tag
|
651
|
+
HostApp.__callback__ = null
|
652
|
+
HostApp.__this__ = null
|
653
|
+
},
|
654
|
+
takePic(prop, title) {
|
655
|
+
HostApp.__callback__ = this.cameraCallBack
|
656
|
+
HostApp.__this__ = this
|
657
|
+
//tag
|
658
|
+
let fileName
|
659
|
+
if (!this[prop] || this[prop].includes("nopic.png")) {
|
660
|
+
fileName = Util.guid() + '-' + prop + '.jpg'
|
661
|
+
} else {
|
662
|
+
fileName = Util.getFileName(this[prop])
|
663
|
+
}
|
664
|
+
HostApp._open_a_page({
|
665
|
+
type: 'boomerang',
|
666
|
+
page: 'com.aofeng.hybrid.android.peripheral.CameraActivity',
|
667
|
+
param: {
|
668
|
+
file: fileName,
|
669
|
+
requestCode: 111,
|
670
|
+
callback: 'javascript:HostApp.__callback__("' + prop + '", "%s");',
|
671
|
+
watermark: title + '\t时间:' + Util.toStandardTimeString() + '\t' + Vue.user.name
|
672
|
+
}
|
673
|
+
})
|
674
|
+
},
|
675
|
+
delfile(prop, fileName) {
|
676
|
+
if (fileName == Vue.nopic)
|
677
|
+
return
|
678
|
+
else {
|
679
|
+
HostApp.delfile(fileName)
|
680
|
+
this[prop] = Vue.nopic
|
681
|
+
}
|
682
|
+
},
|
683
|
+
editUserInfoNoAudit() {
|
684
|
+
let checked = this.checkVal()
|
685
|
+
if (!checked.ischeck) {
|
686
|
+
this.$showMessage(checked.msg)
|
687
|
+
return
|
688
|
+
}
|
689
|
+
for (let i = 0; i < this.model.length; i++) {
|
690
|
+
this.model[i].f_user_id = this.userinfo.meterinfo[0].f_user_id
|
691
|
+
}
|
692
|
+
this.$showMessage('确定是否修改上传用户信息?', ['confirm', 'cancel']).then((res) => {
|
693
|
+
if (res === 'confirm') {
|
694
|
+
this.excessive = true
|
695
|
+
let userinfoms = Object.assign({}, this.userinfo_old.baseinfo.base)
|
696
|
+
// userinfoms.f_user_name=row.f_user_name
|
697
|
+
userinfoms.f_user_phone = this.userinfo.baseinfo.base.f_user_phone
|
698
|
+
userinfoms.f_rent_name = this.userinfo.baseinfo.base.f_rent_name
|
699
|
+
userinfoms.f_zuhu_phone = this.userinfo.baseinfo.base.f_zuhu_phone
|
700
|
+
userinfoms.f_operator_record = Vue.user.name
|
701
|
+
userinfoms.f_operatorid_record = Vue.user.id
|
702
|
+
userinfoms.f_remark = this.userinfo.baseinfo.base.f_remark
|
703
|
+
userinfoms.f_orgid_record = Vue.user.orgid
|
704
|
+
userinfoms.f_orgname_record = Vue.user.orgs
|
705
|
+
userinfoms.f_depid_record = Vue.user.depids
|
706
|
+
userinfoms.f_depname_record = Vue.user.deps
|
707
|
+
this.userinfo_old.meterinfo[0].f_gas_person = this.userinfo.meterinfo[0].f_gas_person
|
708
|
+
this.userinfo_old.meterinfo[0].f_gas_date = this.userinfo.meterinfo[0].f_gas_date
|
709
|
+
this.userinfo_old.meterinfo[0].f_adjustable_id = this.userinfo.meterinfo[0].f_adjustable_id
|
710
|
+
this.userinfo_old.meterinfo[0].f_metertitles = this.userinfo.meterinfo[0].f_metertitles
|
711
|
+
this.userinfo_old.meterinfo[0].f_position = this.userinfo.meterinfo[0].f_position
|
712
|
+
this.userinfo_old.meterinfo[0].f_aroundmeter = this.userinfo.meterinfo[0].f_aroundmeter
|
713
|
+
this.userinfo_old.meterinfo[0].f_bqf_state = this.userinfo.meterinfo[0].f_bqf_state
|
714
|
+
this.userinfo_old.meterinfo[0].f_if_direct = this.userinfo.meterinfo[0].f_if_direct
|
715
|
+
userinfoms.userfiles = []
|
716
|
+
this.userinfo_old.meterinfo[0].devicesinfo = this.model
|
717
|
+
userinfoms.userfiles.push(this.userinfo_old.meterinfo[0])
|
718
|
+
new HttpResetClass().load('POST', `${this.$androidUtil.getProxyUrl()}/rs/logic/filemanage_fileSave`, {
|
719
|
+
data: {
|
720
|
+
userinfo: userinfoms,
|
721
|
+
modifyReason: this.f_source ? `${this.f_source}维护档案信息` : '',
|
722
|
+
address: {
|
723
|
+
id: this.userinfo_old.addressinfo.id,
|
724
|
+
oldid: this.userinfo_old.addressinfo.id,
|
725
|
+
f_address: this.userinfo_old.addressinfo.f_address ? this.userinfo_old.addressinfo.f_address : this.userinfo.addressinfo.f_address
|
726
|
+
}
|
727
|
+
}
|
728
|
+
}, { resolveMsg: null, rejectMsg: null }).then((res1) => {
|
729
|
+
if (res1.data.status == 200) {
|
730
|
+
let data = this.userinfo.addressinfo
|
731
|
+
data.f_address = this.userinfo_old.addressinfo.f_address ? this.userinfo_old.addressinfo.f_address : this.userinfo.addressinfo.f_address
|
732
|
+
//
|
733
|
+
data.f_operator = Vue.user.name
|
734
|
+
new HttpResetClass().load('POST', `${this.$androidUtil.getProxyUrl()}/rs/logic/address_updateuseraddress`, { data: data }).then((res2) => {
|
735
|
+
this.$showMessage("修改用户地址信息成功!")
|
736
|
+
}).catch(error => {
|
737
|
+
this.$showMessage("修改用户地址信息!")
|
738
|
+
})
|
739
|
+
this.$showMessage("修改用户信息成功!")
|
740
|
+
this.enable = true
|
741
|
+
this.excessive = false
|
742
|
+
}
|
743
|
+
}).catch((msg) => {
|
744
|
+
this.$showMessage("修改用户信息失败,请检查手机网络状况!")
|
745
|
+
this.excessive = false
|
746
|
+
})
|
747
|
+
}
|
748
|
+
})
|
749
|
+
},
|
750
|
+
editUserInfo() {
|
751
|
+
this.$showMessage('确定是否修改上传审核用户信息?', ['confirm', 'cancel']).then((res) => {
|
752
|
+
if (res === 'confirm') {
|
753
|
+
for (let i = 0; i < this.model.length; i++) {
|
754
|
+
this.model[i].f_user_id = this.userinfo.meterinfo[0].f_user_id
|
755
|
+
}
|
756
|
+
this.excessive = true
|
757
|
+
let userinfoms = Object.assign({}, this.userinfo_old.baseinfo.base)
|
758
|
+
//userinfoms.f_user_name=row.f_user_name
|
759
|
+
userinfoms.f_user_phone = this.userinfo.baseinfo.base.f_user_phone
|
760
|
+
userinfoms.f_rent_name = this.userinfo.baseinfo.base.f_rent_name
|
761
|
+
userinfoms.f_zuhu_phone = this.userinfo.baseinfo.base.f_zuhu_phone
|
762
|
+
userinfoms.f_operator_record = Vue.user.name
|
763
|
+
userinfoms.f_operatorid_record = Vue.user.id
|
764
|
+
userinfoms.f_remark = this.userinfo.baseinfo.base.f_remark
|
765
|
+
userinfoms.f_orgid_record = Vue.user.orgid
|
766
|
+
userinfoms.f_orgname_record = Vue.user.orgs
|
767
|
+
userinfoms.f_depid_record = Vue.user.depids
|
768
|
+
userinfoms.f_depname_record = Vue.user.deps
|
769
|
+
this.userinfo_old.meterinfo[0].f_gas_person = this.userinfo.meterinfo[0].f_gas_person
|
770
|
+
this.userinfo_old.meterinfo[0].f_gas_date = this.userinfo.meterinfo[0].f_gas_date
|
771
|
+
this.userinfo_old.meterinfo[0].f_adjustable_id = this.userinfo.meterinfo[0].f_adjustable_id
|
772
|
+
this.userinfo_old.meterinfo[0].f_metertitles = this.userinfo.meterinfo[0].f_metertitles
|
773
|
+
this.userinfo_old.meterinfo[0].f_position = this.userinfo.meterinfo[0].f_position
|
774
|
+
this.userinfo_old.meterinfo[0].f_aroundmeter = this.userinfo.meterinfo[0].f_aroundmeter
|
775
|
+
this.userinfo_old.meterinfo[0].f_bqf_state = this.userinfo.meterinfo[0].f_bqf_state
|
776
|
+
this.userinfo_old.meterinfo[0].f_if_direct = this.userinfo.meterinfo[0].f_if_direct
|
777
|
+
userinfoms.userfiles = []
|
778
|
+
this.userinfo_old.meterinfo[0].devicesinfo = this.model
|
779
|
+
for (let i = 0; i < this.devicemodel.length; i++){
|
780
|
+
this.userinfo_old.meterinfo[0].devicesinfo.push(this.devicemodel[i])
|
781
|
+
}
|
782
|
+
userinfoms.userfiles.push(this.userinfo_old.meterinfo[0])
|
783
|
+
//tag)
|
784
|
+
new HttpResetClass().load('POST', `${this.$androidUtil.getProxyUrl()}/rs/logic/filemanage_fileSave`, {
|
785
|
+
data: {
|
786
|
+
userinfo: userinfoms,
|
787
|
+
modifyReason: this.f_source ? `${this.f_source}维护档案信息` : '',
|
788
|
+
address: { id: this.userinfo_old.addressinfo.id, oldid: this.userinfo_old.addressinfo.id }
|
789
|
+
}
|
790
|
+
}, { resolveMsg: null, rejectMsg: null }).then((res1) => {
|
791
|
+
if (res1.data.status == 200) {
|
792
|
+
//本次修改信息包含需要审核信息
|
793
|
+
// if (this.approveChange) {
|
794
|
+
// //tag
|
795
|
+
// let res2 = this.$androidUtil.bzLogic('safe_upUserinfoApprove', {
|
796
|
+
// row: {
|
797
|
+
// f_time: Util.toStandardTimeString(),
|
798
|
+
// f_modifier: Vue.user.name,//Vue.user.name
|
799
|
+
// f_modifier_id: Vue.user.id,//Vue.user.id
|
800
|
+
// f_modify_type: '用户档案',
|
801
|
+
// f_userinfoid: this.userinfo.baseinfo.base.f_userinfo_id,
|
802
|
+
// f_userinfo_code: this.userinfo.baseinfo.base.f_userinfo_code,
|
803
|
+
// f_approved: '未审核',
|
804
|
+
// filialestr: Vue.user.orgid,//Vue.user.orgid
|
805
|
+
// version: 1,
|
806
|
+
// f_user_name: this.userinfo.baseinfo.base.f_user_name,
|
807
|
+
// f_user_phone: this.userinfo.baseinfo.base.f_user_phone,
|
808
|
+
// f_street: this.userinfo.addressinfo.f_street,
|
809
|
+
// f_building: this.userinfo.addressinfo.f_building,
|
810
|
+
// f_unit: this.userinfo.addressinfo.f_unit,
|
811
|
+
// f_floor: this.userinfo.addressinfo.f_floor,
|
812
|
+
// f_room: this.userinfo.addressinfo.f_room,
|
813
|
+
// f_building_suffix: this.userinfo.addressinfo.f_special == 1 ? null : this.userinfo.addressinfo.f_building_suffix,
|
814
|
+
// f_unit_suffix: this.userinfo.addressinfo.f_special == 1 ? null : this.userinfo.addressinfo.f_unit_suffix,
|
815
|
+
// f_floor_suffix: this.userinfo.addressinfo.f_special == 1 ? null : this.userinfo.addressinfo.f_floor_suffix,
|
816
|
+
// f_room_suffix: this.userinfo.addressinfo.f_special == 1 ? null : this.userinfo.addressinfo.f_room_suffix,
|
817
|
+
// f_residential_area: this.userinfo.addressinfo.f_residential_area,
|
818
|
+
// f_address: this.userinfo.addressinfo.f_address,
|
819
|
+
// f_pcd: this.userinfo.addressinfo.f_pcd,
|
820
|
+
// f_pcd_id: this.userinfo.addressinfo.f_pcd_id,
|
821
|
+
// f_street_id: this.userinfo.addressinfo.f_street_id,
|
822
|
+
// f_residential_area_id: this.userinfo.addressinfo.f_residential_area_id,
|
823
|
+
// f_used_name: this.userinfo.baseinfo.base.f_used_name,
|
824
|
+
// f_rent_phone: this.userinfo.baseinfo.base.f_rent_phone,
|
825
|
+
// f_slice_area: this.userinfo.addressinfo.f_slice_area,
|
826
|
+
// f_remark: this.userinfo.baseinfo.base.f_remark,
|
827
|
+
// f_source: this.f_source,
|
828
|
+
// f_meterno_path: this.f_meterno_path,
|
829
|
+
// f_iscity: this.userinfo.addressinfo.f_iscity,
|
830
|
+
// f_special: this.userinfo.addressinfo.f_special,
|
831
|
+
// f_meternumber: this.userinfo.meterinfo[0].f_meternumber,
|
832
|
+
// changemeterno: this.changemeterno
|
833
|
+
// },
|
834
|
+
// tablename: 't_modify_userinfo'
|
835
|
+
// })
|
836
|
+
// //tag)
|
837
|
+
// if (res2.code == 200) {
|
838
|
+
// this.$showMessage("变更用户信息成功,需要审核的信息已提交审核,等待管理员处理!")
|
839
|
+
// this.enable = true
|
840
|
+
// this.excessive = false
|
841
|
+
// } else {
|
842
|
+
// this.$showMessage("上传审核信息失败,请检查图片和网络状况是否正常!")
|
843
|
+
// this.excessive = false
|
844
|
+
// }
|
845
|
+
// } else {
|
846
|
+
// this.$showMessage("修改用户信息成功!")
|
847
|
+
// this.enable = true
|
848
|
+
// this.excessive = false
|
849
|
+
// }
|
850
|
+
this.$showMessage("修改用户信息成功!")
|
851
|
+
this.enable = true
|
852
|
+
this.excessive = false
|
853
|
+
}
|
854
|
+
}).catch((msg) => {
|
855
|
+
this.$showMessage("修改用户信息失败,请检查手机网络状况!")
|
856
|
+
this.excessive = false
|
857
|
+
})
|
858
|
+
|
859
|
+
}
|
860
|
+
})
|
861
|
+
},
|
862
|
+
imgback(header) {
|
863
|
+
if (this.headername == header) {
|
864
|
+
return require('../../assets/xiangxia1.png')
|
865
|
+
} else {
|
866
|
+
return require('../../assets/xiangyou1.png')
|
867
|
+
}
|
868
|
+
this.headername = header
|
869
|
+
},
|
870
|
+
selectVal(header) {
|
871
|
+
if (this.headername == header) {
|
872
|
+
this.headername = ''
|
873
|
+
} else {
|
874
|
+
this.headername = header
|
875
|
+
}
|
876
|
+
|
877
|
+
},
|
878
|
+
changeNewAddress() {
|
879
|
+
this.userinfo.addressinfo.f_address = this.addressType == '普通地址' ? this.getAddress : this.getAddressTS
|
880
|
+
},
|
881
|
+
area_change() {
|
882
|
+
//tag
|
883
|
+
this.userinfo.addressinfo.f_residential_area = this.selectArea.f_residential_area
|
884
|
+
this.userinfo.addressinfo.f_residential_area_id = this.selectArea.id
|
885
|
+
this.userinfo.addressinfo.f_slice_area = this.selectArea.f_slice_area
|
886
|
+
this.changeNewAddress()
|
887
|
+
//this.userinfo.addressinfo.f_residential_area=this.f_residential_area.f_residential_area
|
888
|
+
},
|
889
|
+
async street_change() {
|
890
|
+
//tag
|
891
|
+
if (this.selectStreet.id) {
|
892
|
+
//如果街道改变--给街道赋值!
|
893
|
+
this.userinfo.addressinfo.f_street = this.selectStreet.f_street
|
894
|
+
this.userinfo.addressinfo.f_street_id = this.selectStreet.id
|
895
|
+
this.userinfo.addressinfo.f_iscity = this.selectStreet.f_iscity
|
896
|
+
//清空当前选中小区的值
|
897
|
+
this.userinfo.addressinfo.f_residential_area = ''
|
898
|
+
this.userinfo.addressinfo.f_residential_area_id = ''
|
899
|
+
this.userinfo.addressinfo.f_slice_area = ''
|
900
|
+
this.selectArea = { id: '' }
|
901
|
+
this.area = []
|
902
|
+
let pcdText = ` and f_street_id=${this.selectStreet.id}`
|
903
|
+
let res = await new HttpResetClass().load("POST", `${this.$androidUtil.getProxyUrl()}/rs/sql/safe_singleTable_OrderBy`, {
|
904
|
+
data: {
|
905
|
+
items: "*",
|
906
|
+
tablename: "t_area",
|
907
|
+
orderitem: "id",
|
908
|
+
condition: `f_orgid = '${Vue.user.orgid}' ${pcdText} `
|
909
|
+
}
|
910
|
+
}, { resolveMsg: null, rejectMsg: null })
|
911
|
+
////tag)
|
912
|
+
res.data.forEach((result) => {
|
913
|
+
this.area.push({ label: result.f_residential_area, value: result })
|
914
|
+
})
|
915
|
+
} else {
|
916
|
+
this.area = []
|
917
|
+
}
|
918
|
+
|
919
|
+
this.changeNewAddress()
|
920
|
+
},
|
921
|
+
async pcd_change() {
|
922
|
+
//tag
|
923
|
+
if (this.selectPcd.id) {
|
924
|
+
//tag
|
925
|
+
//如果省市区改变-重新赋值
|
926
|
+
this.userinfo.addressinfo.f_pcd = this.selectPcd.f_pcd
|
927
|
+
this.userinfo.addressinfo.f_pcd_id = this.selectPcd.id
|
928
|
+
//清空 选中的街道和集收单位
|
929
|
+
this.selectStreet = { id: '' }
|
930
|
+
this.userinfo.addressinfo.f_street = ''
|
931
|
+
this.userinfo.addressinfo.f_street_id = ''
|
932
|
+
this.userinfo.addressinfo.f_iscity = ''
|
933
|
+
this.selectArea = { id: '' }
|
934
|
+
this.userinfo.addressinfo.f_residential_area = ''
|
935
|
+
this.userinfo.addressinfo.f_residential_area_id = ''
|
936
|
+
this.userinfo.addressinfo.f_slice_area = ''
|
937
|
+
this.streets = []
|
938
|
+
let pcdText = `and f_pcd_id=${this.selectPcd.id}`
|
939
|
+
let streetlist = await new HttpResetClass().load("POST", `${this.$androidUtil.getProxyUrl()}/rs/sql/safe_singleTable_OrderBy`, {
|
940
|
+
data: {
|
941
|
+
items: "*",
|
942
|
+
tablename: "t_street",
|
943
|
+
orderitem: "id",
|
944
|
+
condition: `f_orgid = '${Vue.user.orgid}' ${pcdText}`
|
945
|
+
}
|
946
|
+
}, { resolveMsg: null, rejectMsg: null })
|
947
|
+
streetlist.data.forEach((result) => {
|
948
|
+
this.streets.push({ label: result.f_street, value: result })
|
949
|
+
})
|
950
|
+
} else {
|
951
|
+
this.streets = []
|
952
|
+
}
|
953
|
+
this.changeNewAddress()
|
954
|
+
},
|
955
|
+
upUserState() {
|
956
|
+
//tag)
|
957
|
+
if (this.userinfo.meterinfo[0].f_table_state == '正常') {
|
958
|
+
let data = {
|
959
|
+
f_userfiles_id: {
|
960
|
+
f_userfiles_id: this.userinfo.meterinfo[0].f_userfiles_id,
|
961
|
+
f_table_state: '停用',
|
962
|
+
version: this.userinfo.meterinfo[0].version
|
963
|
+
},
|
964
|
+
f_userfile_id: this.userinfo.meterinfo[0].f_userfiles_id,
|
965
|
+
f_user_id: this.userinfo.meterinfo[0].f_user_id,
|
966
|
+
f_userinfo_id: this.userinfo.meterinfo[0].f_userinfo_id,
|
967
|
+
f_user_name: this.userinfo.baseinfo.base.f_user_name,
|
968
|
+
f_comments: '安检时发现问题关闭阀门',
|
969
|
+
f_othereason: '',
|
970
|
+
f_operat_type: '停用',
|
971
|
+
f_describe: `${Vue.user.name}对客户${this.userinfo.baseinfo.base.f_user_name}进行表具停用操作`,
|
972
|
+
f_state: '有效',
|
973
|
+
f_operator: Vue.user.name,//${Vue.$login.f.name}
|
974
|
+
f_operatorid: Vue.user.id,
|
975
|
+
f_orgid: Vue.user.orgid,
|
976
|
+
f_orgname: Vue.user.orgs,
|
977
|
+
f_depid: Vue.user.depids,
|
978
|
+
f_depname: Vue.user.deps,
|
979
|
+
f_zoneid: Vue.user.zoneid,
|
980
|
+
f_zones: Vue.user.zones
|
981
|
+
}
|
982
|
+
new HttpResetClass().load('post', `${this.$androidUtil.getProxyUrl()}/rs/entity/t_disable`,
|
983
|
+
data, { resolveMsg: null, rejectMsg: null }).then((row) => {
|
984
|
+
this.$showMessage('已成功关阀停气!')
|
985
|
+
this.userinfo.meterinfo[0].f_table_state = '停用'
|
986
|
+
})
|
987
|
+
} else {
|
988
|
+
this.$showMessage('该用户已被关阀停用,请勿重复操作!')
|
989
|
+
}
|
990
|
+
|
991
|
+
},
|
992
|
+
addDevices() {
|
993
|
+
//Vue.user.name
|
994
|
+
let obj = {
|
995
|
+
"f_operator": Vue.user.name,
|
996
|
+
"f_picture": null,
|
997
|
+
"f_pipe_type": null,
|
998
|
+
"f_pipeinstall_date": null,
|
999
|
+
"f_pipe_connection": null,
|
1000
|
+
"f_expire_date": null,
|
1001
|
+
"f_pipeexpire_date": null,
|
1002
|
+
"f_comments": null,
|
1003
|
+
"f_operate_date": Util.toStandardTimeString(),
|
1004
|
+
"f_operatorid": Vue.user.id,
|
1005
|
+
"f_service_life": '',
|
1006
|
+
"f_devices_num": null,
|
1007
|
+
"f_process_id": null,
|
1008
|
+
"f_devices_type": null,
|
1009
|
+
"f_make_date": null,
|
1010
|
+
"f_input_date": null,
|
1011
|
+
"f_state": "有效",
|
1012
|
+
"f_brand": null,
|
1013
|
+
"f_devices_model": null,
|
1014
|
+
"f_devices_no": null,
|
1015
|
+
"img": { "content": null, "filename": null }
|
1016
|
+
}
|
1017
|
+
this.model.push(obj)
|
1018
|
+
},
|
1019
|
+
delDevices(idx) {
|
1020
|
+
//tag
|
1021
|
+
this.$showMessage('删除后不可恢复,确认删除吗?', ['confirm', 'cancel']).then((res) => {
|
1022
|
+
if (res === 'confirm') {
|
1023
|
+
this.model.splice(idx, 1)
|
1024
|
+
}
|
1025
|
+
})
|
1026
|
+
},
|
1027
|
+
async getAreaList(text) {
|
1028
|
+
if (this.selectStreet.id) {
|
1029
|
+
this.area = []
|
1030
|
+
let pcdText = text ? `and f_street_id=${this.selectStreet.id} and f_residential_area like '%${text}%'` : `and f_street_id=${this.selectStreet.id}`
|
1031
|
+
let res = await new HttpResetClass().load("POST", `${this.$androidUtil.getProxyUrl()}/rs/sql/safe_singleTable_OrderBy`, {
|
1032
|
+
data: {
|
1033
|
+
items: "*",
|
1034
|
+
tablename: "t_area",
|
1035
|
+
orderitem: "id",
|
1036
|
+
condition: `f_orgid = '${Vue.user.orgid}' ${pcdText}`
|
1037
|
+
}
|
1038
|
+
}, { resolveMsg: null, rejectMsg: null })
|
1039
|
+
////tag)
|
1040
|
+
res.data.forEach((result) => {
|
1041
|
+
this.area.push({ label: result.f_residential_area, value: result })
|
1042
|
+
})
|
1043
|
+
//tag
|
1044
|
+
this.area.push({
|
1045
|
+
label: this.userinfo.addressinfo.f_residential_area,
|
1046
|
+
value: {
|
1047
|
+
id: this.userinfo.addressinfo.f_residential_area_id,
|
1048
|
+
f_residential_area: this.userinfo.addressinfo.f_residential_area
|
1049
|
+
}
|
1050
|
+
})
|
1051
|
+
} else {
|
1052
|
+
this.area = []
|
1053
|
+
}
|
1054
|
+
|
1055
|
+
},
|
1056
|
+
async getStreetList() {
|
1057
|
+
if (this.selectPcd.id) {
|
1058
|
+
//tag
|
1059
|
+
this.streets = []
|
1060
|
+
let pcdText = `and f_pcd_id=${this.selectPcd.id}`
|
1061
|
+
let streetlist = await new HttpResetClass().load("POST", `${this.$androidUtil.getProxyUrl()}/rs/sql/safe_singleTable_OrderBy`, {
|
1062
|
+
data: {
|
1063
|
+
items: "*",
|
1064
|
+
tablename: "t_street",
|
1065
|
+
orderitem: "id",
|
1066
|
+
condition: `f_orgid = '${Vue.user.orgid}' ${pcdText}`
|
1067
|
+
}
|
1068
|
+
}, { resolveMsg: null, rejectMsg: null })
|
1069
|
+
streetlist.data.forEach((result) => {
|
1070
|
+
//如果第一次进来有地址id 就拿下地址区域
|
1071
|
+
if (this.selectStreet.id && this.selectStreet.id == result.id) {
|
1072
|
+
//tag)
|
1073
|
+
this.userinfo.addressinfo.f_iscity = result.f_iscity
|
1074
|
+
}
|
1075
|
+
this.streets.push({ label: result.f_street, value: result })
|
1076
|
+
})
|
1077
|
+
} else {
|
1078
|
+
this.streets = []
|
1079
|
+
}
|
1080
|
+
},
|
1081
|
+
changeAddressType(val) {
|
1082
|
+
//tag
|
1083
|
+
if (this.addressType == '普通地址') {
|
1084
|
+
this.userinfo.addressinfo.f_special = null
|
1085
|
+
} else if (this.addressType == '特殊地址') {
|
1086
|
+
this.userinfo.addressinfo.f_special = 1
|
1087
|
+
this.userinfo.addressinfo.f_building = null
|
1088
|
+
this.userinfo.addressinfo.f_unit = null
|
1089
|
+
this.userinfo.addressinfo.f_floor = null
|
1090
|
+
this.userinfo.addressinfo.f_room = null
|
1091
|
+
}
|
1092
|
+
this.changeNewAddress()
|
1093
|
+
}
|
1094
|
+
|
1095
|
+
},
|
1096
|
+
computed: {
|
1097
|
+
getAddress() {
|
1098
|
+
return (this.userinfo.addressinfo.f_pcd ? this.userinfo.addressinfo.f_pcd : '') +
|
1099
|
+
(this.userinfo.addressinfo.f_street ? this.userinfo.addressinfo.f_street : '') +
|
1100
|
+
(this.userinfo.addressinfo.f_residential_area ? this.userinfo.addressinfo.f_residential_area : '') +
|
1101
|
+
(this.userinfo.addressinfo.f_building ? this.userinfo.addressinfo.f_building + (this.userinfo.addressinfo.f_building_suffix ? this.userinfo.addressinfo.f_building_suffix : '') : '') +
|
1102
|
+
(this.userinfo.addressinfo.f_unit ? this.userinfo.addressinfo.f_unit + (this.userinfo.addressinfo.f_unit_suffix ? this.userinfo.addressinfo.f_unit_suffix : '') : '') +
|
1103
|
+
(this.userinfo.addressinfo.f_floor ? this.userinfo.addressinfo.f_floor + (this.userinfo.addressinfo.f_floor_suffix ? this.userinfo.addressinfo.f_floor_suffix : '') : '') +
|
1104
|
+
(this.userinfo.addressinfo.f_room ? this.userinfo.addressinfo.f_room + (this.userinfo.addressinfo.f_room_suffix ? this.userinfo.addressinfo.f_room_suffix : '') : '')
|
1105
|
+
},
|
1106
|
+
getAddressTS() {
|
1107
|
+
return (this.userinfo.addressinfo.f_pcd ? this.userinfo.addressinfo.f_pcd : '') +
|
1108
|
+
(this.userinfo.addressinfo.f_street ? this.userinfo.addressinfo.f_street : '') +
|
1109
|
+
(this.userinfo.addressinfo.f_residential_area ? this.userinfo.addressinfo.f_residential_area : '')
|
1110
|
+
}
|
1111
|
+
},
|
1112
|
+
watch: {
|
1113
|
+
|
1114
|
+
/*'selectPcd.id' (val) {
|
1115
|
+
//tag
|
1116
|
+
if(this.selectPcd.id){
|
1117
|
+
this.getStreetList()
|
1118
|
+
}
|
1119
|
+
},
|
1120
|
+
'selectStreet.id' (val) {
|
1121
|
+
//tag
|
1122
|
+
if(this.selectStreet.id){
|
1123
|
+
this.getAreaList()
|
1124
|
+
}
|
1125
|
+
}*/
|
1126
|
+
},
|
1127
|
+
async ready() {
|
1128
|
+
/*//tag)
|
1129
|
+
|
1130
|
+
//tag)
|
1131
|
+
//tag)*/
|
1132
|
+
//this.f_userinfo_id=1102260
|
1133
|
+
//this.f_userinfo_id=1997541
|
1134
|
+
if (!this.f_userinfo_id) {
|
1135
|
+
this.$showMessage("未检测到用户!")
|
1136
|
+
this.enable = true
|
1137
|
+
return
|
1138
|
+
}
|
1139
|
+
try {
|
1140
|
+
|
1141
|
+
this.devices_types = Vue.$appdata.getParam('设备类型')
|
1142
|
+
console.log('this.devices_types=', JSON.stringify(this.devices_types))
|
1143
|
+
for (const devices_type of this.devices_types) {
|
1144
|
+
console.log('Vue.$appdata.getParam(`档案设备信息-${devices_type.label}品牌`)=', JSON.stringify(Vue.$appdata.getParam(`档案设备信息-${devices_type.label}品牌`)))
|
1145
|
+
this.deviceBrandOption[devices_type.label] = Vue.$appdata.getParam(`档案设备信息-${devices_type.label}品牌`) || []
|
1146
|
+
}
|
1147
|
+
console.log('this.deviceBrandOption=', JSON.stringify(this.deviceBrandOption))
|
1148
|
+
this.wz_types = Vue.$appdata.getParam('安装位置')
|
1149
|
+
this.aroundmeters = Vue.$appdata.getParam('左右表')
|
1150
|
+
|
1151
|
+
////tag)
|
1152
|
+
this.excessive = true
|
1153
|
+
//Vue.user.orgid ${this.f_userinfo_id} 10101 ${Vue.user.orgid}
|
1154
|
+
|
1155
|
+
let pcdlist = await new HttpResetClass().load("POST", `${this.$androidUtil.getProxyUrl()}/rs/sql/safe_singleTable_OrderBy`, {
|
1156
|
+
data: {
|
1157
|
+
items: "*",
|
1158
|
+
tablename: "t_pcd",
|
1159
|
+
orderitem: "id",
|
1160
|
+
condition: `f_orgid = '${Vue.user.orgid}'`
|
1161
|
+
}
|
1162
|
+
}, { resolveMsg: null, rejectMsg: null })
|
1163
|
+
//tag)
|
1164
|
+
pcdlist.data.forEach((result) => {
|
1165
|
+
this.pcds.push({ label: result.f_pcd, value: result })
|
1166
|
+
})
|
1167
|
+
////tag)
|
1168
|
+
let res = await new HttpResetClass().load('post', `${this.$androidUtil.getProxyUrl()}/rs/logic/filemanage_getFilesDetail`, {
|
1169
|
+
//f_userinfo_code:'12381344',
|
1170
|
+
f_userinfo_id: this.f_userinfo_id
|
1171
|
+
}, { resolveMsg: null, rejectMsg: null })
|
1172
|
+
//tag
|
1173
|
+
//tag
|
1174
|
+
this.userinfo = res.data
|
1175
|
+
this.userinfo_old = JSON.parse(JSON.stringify(res.data))
|
1176
|
+
this.model = this.userinfo.meterinfo[0].devicesinfo.concat(this.userinfo.meterinfo[0].devicesinfonew)
|
1177
|
+
//已经超期
|
1178
|
+
let now = Util.toStandardDateString()
|
1179
|
+
let overdue = this.model.filter(item => item.f_expire_date <= now).map(item => item.f_devices_type).join(',')
|
1180
|
+
//临近超期
|
1181
|
+
|
1182
|
+
const advent_time = (this.$appdata.getSingleValue('设备超期提醒') || 7) * 1000 * 60 * 60 * 24
|
1183
|
+
const nowTime = new Date().getTime()
|
1184
|
+
const adventTimeLimit = nowTime + advent_time
|
1185
|
+
const advent = this.model
|
1186
|
+
.filter(item => {
|
1187
|
+
const expireTime = new Date(item.f_expire_date).getTime()
|
1188
|
+
return expireTime >= nowTime && expireTime <= adventTimeLimit
|
1189
|
+
})
|
1190
|
+
.map(item => {
|
1191
|
+
const expireTime = new Date(item.f_expire_date).getTime()
|
1192
|
+
const daysLeft = Math.round((expireTime - nowTime) / (1000 * 60 * 60 * 24))
|
1193
|
+
return `${item.f_devices_type}设备还有${daysLeft >= 0 ? daysLeft : 0}天超期`
|
1194
|
+
})
|
1195
|
+
.join(',')
|
1196
|
+
if (overdue && advent) {
|
1197
|
+
this.$showMessage(`${overdue}设备已过期,${advent}`)
|
1198
|
+
} else if (advent) {
|
1199
|
+
this.$showMessage(`${advent}`)
|
1200
|
+
} else if (overdue) {
|
1201
|
+
this.$showMessage(`${overdue}设备已过期`)
|
1202
|
+
}
|
1203
|
+
this.selectArea.id = this.userinfo.addressinfo.f_residential_area_id
|
1204
|
+
this.selectPcd.id = this.userinfo.addressinfo.f_pcd_id
|
1205
|
+
this.selectPcd.f_pcd = this.userinfo.addressinfo.f_pcd
|
1206
|
+
this.selectStreet.id = this.userinfo.addressinfo.f_street_id
|
1207
|
+
this.selectStreet.f_street = this.userinfo.addressinfo.f_street
|
1208
|
+
await this.getStreetList()
|
1209
|
+
await this.getAreaList()
|
1210
|
+
this.excessive = false
|
1211
|
+
this.addressType = this.userinfo.addressinfo.f_special == 1 ? '特殊地址' : '普通地址'
|
1212
|
+
//this.userinfo.addressinfo.f_special=1
|
1213
|
+
//tag
|
1214
|
+
} catch (e) {
|
1215
|
+
this.excessive = false
|
1216
|
+
this.enable = true
|
1217
|
+
this.$showMessage('获取用户信息出错,请检查网络状况!')
|
1218
|
+
}
|
1219
|
+
new HttpResetClass().load('get', `${this.$androidUtil.getProxyUrl()}/rs/vue/UserAddress.json`, { data: {} }, {
|
1220
|
+
resolveMsg: null,
|
1221
|
+
rejectMsg: null
|
1222
|
+
}).then((addressUnit) => {
|
1223
|
+
//tag
|
1224
|
+
//tag
|
1225
|
+
//tag
|
1226
|
+
//tag
|
1227
|
+
this.userinfo.addressinfo.f_building_suffix = addressUnit.data.f_building_suffix
|
1228
|
+
this.userinfo.addressinfo.f_unit_suffix = addressUnit.data.f_unit_suffix
|
1229
|
+
this.userinfo.addressinfo.f_floor_suffix = addressUnit.data.f_floor_suffix
|
1230
|
+
this.userinfo.addressinfo.f_room_suffix = addressUnit.data.f_room_suffix
|
1231
|
+
}).catch((msg) => {
|
1232
|
+
//tag)
|
1233
|
+
})
|
1234
|
+
this.showBox = this.$appdata.getSingleValue('档案审核是否显示调压箱') == '是' ? true : false
|
1235
|
+
console.log(this.showBox)
|
1236
|
+
if (this.showBox) {
|
1237
|
+
// 获取调压箱
|
1238
|
+
new HttpResetClass().load('post', `${this.$androidUtil.getProxyUrl()}/rs/sql/adjustableboxQuery`, { data: { condition: '1 = 1' } }, {
|
1239
|
+
resolveMsg: null,
|
1240
|
+
rejectMsg: null
|
1241
|
+
}).then((res) => {
|
1242
|
+
const boxOptions = []
|
1243
|
+
for (const data of res.data) {
|
1244
|
+
const one = {
|
1245
|
+
label: data.f_adjustable_id + data.f_adjustable_name,
|
1246
|
+
value: Number(data.f_adjustable_id)
|
1247
|
+
}
|
1248
|
+
boxOptions.push(one)
|
1249
|
+
}
|
1250
|
+
this.boxOptions = JSON.parse(JSON.stringify(boxOptions))
|
1251
|
+
console.log(this.boxOptions)
|
1252
|
+
}).catch((msg) => {
|
1253
|
+
//tag)
|
1254
|
+
})
|
1255
|
+
}
|
1256
|
+
}
|
1257
|
+
}
|
1258
|
+
</script>
|
1259
|
+
<style lang="less" scoped>
|
1260
|
+
.butt3 {
|
1261
|
+
float: right;
|
1262
|
+
width: 12px;
|
1263
|
+
margin: 1% 2% 0 0;
|
1264
|
+
}
|
1265
|
+
|
1266
|
+
.rightipt {
|
1267
|
+
width: 60%;
|
1268
|
+
float: left;
|
1269
|
+
margin-left: 5%;
|
1270
|
+
}
|
1271
|
+
|
1272
|
+
.righttxt {
|
1273
|
+
border: none;
|
1274
|
+
margin-left: 5px;
|
1275
|
+
/*border-left: 5px solid #A2C2EB;*/
|
1276
|
+
float: left;
|
1277
|
+
width: 25%;
|
1278
|
+
margin-bottom: 3px;
|
1279
|
+
text-align: left;
|
1280
|
+
word-wrap: break-word;
|
1281
|
+
white-space: normal;
|
1282
|
+
}
|
1283
|
+
|
1284
|
+
.tit1 {
|
1285
|
+
background-image: url('../../assets/用户姓名.png');
|
1286
|
+
background-repeat: no-repeat;
|
1287
|
+
background-position: center;
|
1288
|
+
}
|
1289
|
+
|
1290
|
+
.spanboder {
|
1291
|
+
border-bottom: 2px solid #499edf;
|
1292
|
+
padding-bottom: 8px
|
1293
|
+
}
|
1294
|
+
|
1295
|
+
#upuserinfo_sel /deep/ ul {
|
1296
|
+
width: 100% !important;
|
1297
|
+
left: 0 !important;
|
1298
|
+
}
|
1299
|
+
|
1300
|
+
.btn-photo {
|
1301
|
+
border: 0;
|
1302
|
+
border-radius: 7px;
|
1303
|
+
background-color: #7dc1f4;
|
1304
|
+
font: 15px PingFang-SC-Bold;
|
1305
|
+
height: 20%;
|
1306
|
+
}
|
1307
|
+
|
1308
|
+
.panel-self {
|
1309
|
+
border-radius: 10px;
|
1310
|
+
border: 1px solid #499EDF;
|
1311
|
+
background-color: #F8F8F8;
|
1312
|
+
}
|
1313
|
+
|
1314
|
+
.div-photo {
|
1315
|
+
width: auto;
|
1316
|
+
height: auto;
|
1317
|
+
/* margin-top: 10px; */
|
1318
|
+
position: absolute;
|
1319
|
+
bottom: 10px;
|
1320
|
+
right: 10px;
|
1321
|
+
}
|
1322
|
+
</style>
|
1323
|
+
<style lang="less">
|
1324
|
+
#upuserinfo_sel ul {
|
1325
|
+
width: 100% !important;
|
1326
|
+
left: 0 !important;
|
1327
|
+
}
|
1328
|
+
</style>
|