apply-clients 7.1.36-yuchuan-83 → 7.1.36-yuchuan-84

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.
Files changed (36) hide show
  1. package/build/dev-server.js +3 -6
  2. package/package.json +1 -1
  3. package/src/components/android/AppServiceView.vue +603 -603
  4. package/src/components/android/Process/AppServiceControl.vue +1434 -1434
  5. package/src/components/android/Process/Processes/AppInstallationDetails.vue +1032 -1032
  6. package/src/components/android/Process/Processes/newAppInstallationDetails.vue +671 -671
  7. package/src/components/android/SealBind.vue +426 -426
  8. package/src/components/product/ApplyCharge/ApplyChargeList.vue +1115 -1115
  9. package/src/components/product/ApplyGaiXianCharge/ApplyGaiXianChargeList.vue +211 -211
  10. package/src/components/product/ApplyGuanXian/GuanXianExplorationSelect.vue +325 -325
  11. package/src/components/product/Function/Service/FunctionServiceControl.vue +581 -581
  12. package/src/components/product/GongJianPush/ApplyPushDispose.vue +299 -299
  13. package/src/components/product/GongJianPush/ApplyPushManage.vue +92 -92
  14. package/src/components/product/Ignition/IgnitionListManage.vue +604 -604
  15. package/src/components/product/List/OldShowDevices.vue +272 -272
  16. package/src/components/product/List/ShowAllActivity.vue +540 -540
  17. package/src/components/product/Print/BuildOrder/buildOrderList.vue +446 -446
  18. package/src/components/product/Print/BuildOrder/printGaiXianOrder.vue +271 -271
  19. package/src/components/product/Print/OrderPrint/GaiXianOrder.vue +314 -314
  20. package/src/components/product/Print/OrderPrint/printChaiChuOrder.vue +266 -266
  21. package/src/components/product/Process/ExplorationSelect.vue +593 -593
  22. package/src/components/product/Process/NewExplorationSelect.vue +587 -587
  23. package/src/components/product/Process/Processes/InstallationDetails.vue +1166 -1166
  24. package/src/components/product/Process/Processes/Print/printCharge.vue +250 -250
  25. package/src/components/product/Process/Processes/Print/printGaiXianCharge.vue +244 -244
  26. package/src/components/product/Process/Processes/chargeManagement.vue +766 -766
  27. package/src/components/product/Process/Processes/newInstallationDetails.vue +683 -683
  28. package/src/components/product/Process/Processes/supplementalAgreement.vue +298 -298
  29. package/src/components/product/Process/Service/ServiceControl.vue +2232 -2232
  30. package/src/components/product/ServiceView.vue +650 -650
  31. package/src/components/product/Supervisory/ExportExcel.vue +359 -359
  32. package/src/components/product/Supervisory/Service/SupervisoryServiceControl.vue +592 -592
  33. package/src/components/product/Supervisory/SupervisoryList.vue +585 -585
  34. package/src/components/product/Supervisory/YiBanSupervisoryList.vue +543 -543
  35. package/src/components/product/VueUtils/ApplyUpload.vue +302 -302
  36. package/src/components/product/VueUtils/HighMeter.vue +208 -208
@@ -1,1032 +1,1032 @@
1
- <template>
2
- <div class="p-10">
3
- <criteria-paged :model="model" v-ref:cp>
4
- <criteria partial='criteria' @condition-changed='$parent.searchCondition' v-ref:cri>
5
- <div partial class="auto">
6
- <div class="row form-group app-input" v-if="$parent.$parent.criteriaShow">
7
- <label class="">楼&emsp;&emsp;号:</label>
8
- <div class="col-xs-8" >
9
- <input class="" v-model=model.f_building condition="ui.f_building like '{}%'" />
10
- </div>
11
- </div>
12
- <div class="row form-group app-input" v-if="$parent.$parent.criteriaShow">
13
- <label class="">单&emsp;&emsp;元:</label>
14
- <div class="col-xs-8" >
15
- <input class="" v-model=model.f_unit condition="ui.f_unit like '{}%'" />
16
- </div>
17
- </div>
18
- <div class="row form-group app-input" v-if="$parent.$parent.criteriaShow">
19
- <label class="">门&ensp;牌&ensp;号:</label>
20
- <div class="col-xs-8" >
21
- <input class="" v-model=model.f_room condition="ui.f_room like '{}%'" />
22
- </div>
23
- </div>
24
- <div class="row form-group text-right" style="">
25
- <button class="btn btn-info" @click.prevent="$parent.$parent.openModal()"
26
- :disabled="mark === 1 ||
27
- (model.rows.length >= selectdata.f_install_count && selectdata.defname === '工程施工') ||
28
- (model.rows.length >= selectdata.f_apply_count && (selectdata.defname === '报建受理')) ||
29
- selectdata.defname === '施工通气'"
30
- >添加</button>
31
- <button class="btn btn-primary" @click="search()">查询</button>
32
- <button class="btn btn-info" @click="$parent.$parent.clear()">清空</button>
33
- <button class="btn" :class="{'button_shrink_top':$parent.$parent.criteriaShow,'button_shrink_bottom':!$parent.$parent.criteriaShow}" @click="$parent.$parent.criteriaShow = !$parent.$parent.criteriaShow"></button>
34
- </div>
35
- </div>
36
- </criteria>
37
- <list :model="model" partial='list'>
38
- <div partial class="auto app-text panel">
39
- <div class="panel-body panel-self">
40
- <div class="row">
41
- <p class="col-xs-3 text-left font"><b class="control-label-justify">客户编号</b></p>
42
- <p class="col-xs-8 col-xs-offset-1 text-left input-font">{{ row.f_userinfo_id }}</p>
43
- </div>
44
- <div class="row">
45
- <p class="col-xs-3 text-left font"><b class="control-label-justify">客户名称</b></p>
46
- <p class="col-xs-8 col-xs-offset-1 text-left input-font">{{ row.f_user_name }}</p>
47
- </div>
48
- <div class="row">
49
- <p class="col-xs-3 text-left font"><b class="control-label-justify">客户电话</b></p>
50
- <p class="col-xs-8 col-xs-offset-1 text-left input-font">{{ row.f_user_phone }}</p>
51
- </div>
52
- <div class="row">
53
- <p class="col-xs-3 text-left font"><b class="control-label-justify">地址信息</b></p>
54
- <p class="col-xs-8 col-xs-offset-1 text-left input-font">{{row.f_address}}{{row.f_address_detail}}</p>
55
- </div>
56
- <div class="row">
57
- <p class="col-xs-3 text-left font"><b class="control-label-justify">表号</b></p>
58
- <p class="col-xs-8 col-xs-offset-1 text-left input-font">{{ row.f_meternumber }}</p>
59
- </div>
60
- <div class="row">
61
- <p class="col-xs-3 text-left font"><b class="control-label-justify">气表品牌</b></p>
62
- <p class="col-xs-8 col-xs-offset-1 text-left input-font">{{ row.f_meter_brand }}</p>
63
- </div>
64
- <div class="row">
65
- <p class="col-xs-3 text-left font"><b class="control-label-justify">气表型号</b></p>
66
- <p class="col-xs-8 col-xs-offset-1 text-left input-font">{{ row.f_meter_style }}</p>
67
- </div>
68
- <div class="row text-right">
69
- <button class="btn btn-danger"
70
- @click="$parent.$parent.$parent.deleteUserinfo(row)"
71
- v-if="$parent.$parent.$parent.DeleteUserInfo"
72
- :disabled="$parent.mark === 1 || row.f_user_state === '正常'">
73
- 销户
74
- </button>
75
- <button class="btn btn-info"
76
- @click.prevent="$parent.$parent.$parent.openModal(row)">
77
- {{$parent.mark === 1 ? '查看' : '修正'}}
78
- </button>
79
-
80
- </div>
81
- </div>
82
- </div>
83
- </list>
84
- </criteria-paged>
85
- </div>
86
- <div>
87
- <validator name="v">
88
- <modal v-if="showModal" :show.sync="showModal" v-ref:modal :large="true" :backdrop="false">
89
- <header slot="modal-header" class="modal-header">
90
- <button type="button" class="close" @click="closeUserFile"><span>&times;</span></button>
91
- <h4 class="modal-title">安装明细</h4>
92
- </header>
93
- <article slot="modal-body" class="modal-body clearfix">
94
- <!-- 基本信息 -->
95
- <div class="form-group col-xs-12 panel panel-info" v-if="showUserInfo">
96
- <div class="panel-heading head col-xs-12" style="background-color: #e8f4ff;margin-bottom: 10px">
97
- <div class="col-xs-6 text-left">用户信息</div>
98
- </div>
99
- <div class="form-group row vertical-center" :class="[$v.f_user_name.required ? 'has-error' : '']">
100
- <label class="col-xs-4 control-label">客户名称:</label>
101
- <div class="col-xs-8">
102
- <input class="form-control input_view" style=""
103
- v-validate:f_user_name = "['required']"
104
- v-model="userinfo.f_user_name"
105
- :value.sync="showUserInformation.f_user_name"
106
- :readonly="mark === 1"
107
- placeholder="客户名称"/>
108
- </div>
109
- </div>
110
- <div class="form-group row vertical-center">
111
- <label class="col-xs-4 control-label">客户电话:</label>
112
- <div class="col-xs-8">
113
- <input class="form-control input_view" style=""
114
- v-model="userinfo.f_user_phone"
115
- :value.sync="showUserInformation.f_user_phone"
116
- :readonly="mark === 1"
117
- placeholder="客户电话"/>
118
- </div>
119
- </div>
120
- <div class="form-group row vertical-center">
121
- <label class="col-xs-4 control-label">证件类型:</label>
122
- <div class="col-xs-8">
123
- <input-select
124
- class="select select_list"
125
- :value.sync="showUserInformation.f_credentials"
126
- v-model="userinfo.f_credentials"
127
- :options="credentialsList"
128
- :disable="mark === 1"
129
- :valueSingle="true"></input-select>
130
- </div>
131
- </div>
132
- <div class="form-group row vertical-center">
133
- <label class="col-xs-4 control-label">证件号码:</label>
134
- <div class="col-xs-8">
135
- <input class="form-control input_view" style=""
136
- placeholder="证件号码"
137
- v-model="userinfo.f_idnumber"
138
- :value="showUserInformation.f_idnumber"
139
- :readonly="mark === 1"/>
140
- </div>
141
- </div>
142
- </div>
143
- <!-- 地址信息 -->
144
- <div class="form-group col-xs-12 panel panel-info" v-if="showAddress">
145
- <div class="panel-heading head col-xs-12" style="background-color: #e8f4ff;margin-bottom: 10px">
146
- <div class="col-xs-6 text-left">地址信息</div>
147
- </div>
148
- <div class="form-group row vertical-center" :class="[$v.area.required ? 'has-error' : '']">
149
- <label class="col-xs-4 control-label">小&emsp;&emsp;区:</label>
150
- <div class="col-xs-8">
151
- <input type="text" v-show="false" v-model="area.id" :value.sync="area.id" v-validate:area = "['required']" >
152
- <input-select
153
- class="select select_list"
154
- :value.sync="area"
155
- v-model="area"
156
- :options="areaList"
157
- @change="changeArea(),addressSplicing()"
158
- @select-search = "selectArea"
159
- :disable="mark === 1 || selectdata.f_apply_nature === '小区'"
160
- :valueSingle="true"></input-select>
161
- </div>
162
- </div>
163
- <div class="form-group row vertical-center">
164
- <label class="col-xs-4 control-label">楼&emsp;&emsp;号:</label>
165
- <div class="col-xs-8">
166
- <input class="form-control input_view" placeholder="楼号"
167
- v-model="userinfo.f_building"
168
- :value="userinfo.f_building"
169
- @change="addressSplicing"
170
- :readonly="mark === 1"/>
171
- </div>
172
- </div>
173
- <div class="form-group row vertical-center">
174
- <label class="col-xs-4 control-label">单&emsp;&emsp;元:</label>
175
- <div class="col-xs-8">
176
- <input class="form-control input_view" placeholder="单元"
177
- v-model="userinfo.f_unit"
178
- :value="userinfo.f_unit"
179
- @change="addressSplicing"
180
- :readonly="mark === 1"/>
181
- </div>
182
- </div>
183
- <div class="form-group row vertical-center">
184
- <label class="col-xs-4 control-label">楼&emsp;&emsp;层:</label>
185
- <div class="col-xs-8">
186
- <input class="form-control input_view" placeholder="楼层"
187
- v-model="userinfo.f_floor"
188
- :value="userinfo.f_floor"
189
- @change="addressSplicing"
190
- :readonly="mark === 1"/>
191
- </div>
192
- </div>
193
- <div class="form-group row vertical-center" :class="[$v.f_room.required ? 'has-error' : '']">
194
- <label class="col-xs-4 control-label">门&ensp;牌&ensp;号:</label>
195
- <div class="col-xs-8">
196
- <input class="form-control input_view" placeholder="门牌号"
197
- v-validate:f_room = "['required']"
198
- v-model="userinfo.f_room"
199
- :value="userinfo.f_room"
200
- @change="addressSplicing"
201
- :readonly="mark === 1"/>
202
- </div>
203
- </div>
204
- <div class="form-group row vertical-center">
205
- <label class="col-xs-4 control-label">地&emsp;&emsp;址:</label>
206
- <div class="col-xs-8">
207
- <input class="form-control input_view"
208
- placeholder="地址"
209
- v-model="userinfo.f_address"
210
- :value.sync="userinfo.f_address"
211
- :readonly="true"/>
212
- </div>
213
- </div>
214
- </div>
215
- <!-- 表具信息 -->
216
- <div class="form-group col-xs-12 panel panel-info" v-if="showUserFile">
217
- <div class="panel-heading head col-xs-12" style="background-color: #e8f4ff;margin-bottom: 10px">
218
- <div class="col-xs-6 text-left">表具信息</div>
219
- <div class="col-xs-6 text-right">
220
- <svg @click="scanCode()" style="width: 25px;height: 25px;margin-right: 10px" t="1636095770822" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="2457" width="64" height="64">
221
- <path d="M928.016126 543.908618 95.983874 543.908618c-17.717453 0-31.994625-14.277171-31.994625-31.994625S78.26642 479.919368 95.983874 479.919368l832.032253 0c17.717453 0 31.994625 14.277171 31.994625 31.994625S945.73358 543.908618 928.016126 543.908618z" p-id="2458"></path>
222
- <path d="M832.032253 928.016126 639.892491 928.016126c-17.717453 0-31.994625-14.277171-31.994625-31.994625s14.277171-31.994625 31.994625-31.994625l191.967747 0c17.717453 0 31.994625-14.277171 31.994625-31.994625l0-159.973123c0-17.717453 14.277171-31.994625 31.994625-31.994625s31.994625 14.277171 31.994625 31.994625l0 159.973123C928.016126 884.840585 884.840585 928.016126 832.032253 928.016126z" p-id="2459"></path>
223
- <path d="M351.94087 928.016126l-159.973123 0c-52.980346 0-95.983874-43.003528-95.983874-95.983874l0-159.973123c0-17.717453 14.277171-31.994625 31.994625-31.994625S159.973123 654.341676 159.973123 672.05913l0 159.973123c0 17.717453 14.449185 31.994625 31.994625 31.994625l159.973123 0c17.717453 0 31.994625 14.277171 31.994625 31.994625C383.935495 913.738955 369.658324 928.016126 351.94087 928.016126z" p-id="2460"></path>
224
- <path d="M127.978498 383.935495c-17.717453 0-31.994625-14.277171-31.994625-31.994625l0-159.973123c0-52.980346 43.003528-95.983874 95.983874-95.983874l159.973123 0c17.717453 0 31.994625 14.277171 31.994625 31.994625S369.658324 159.973123 351.94087 159.973123l-159.973123 0c-17.545439 0-31.994625 14.449185-31.994625 31.994625l0 159.973123C159.973123 369.658324 145.695952 383.935495 127.978498 383.935495z" p-id="2461"></path>
225
- <path d="M896.021502 383.935495c-17.717453 0-31.994625-14.277171-31.994625-31.994625l0-159.973123c0-17.545439-14.277171-31.994625-31.994625-31.994625L639.892491 159.973123c-17.717453 0-31.994625-14.277171-31.994625-31.994625s14.277171-31.994625 31.994625-31.994625l191.967747 0c52.980346 0 95.983874 43.003528 95.983874 95.983874l0 159.973123C928.016126 369.658324 913.738955 383.935495 896.021502 383.935495z" p-id="2462"></path>
226
- </svg>
227
- </div>
228
- </div>
229
- <div class="form-group row vertical-center" :class="[$v.f_gasbrand_id.required ? 'has-error' : '']">
230
- <label class="col-xs-4 control-label">气表品牌:</label>
231
- <div class="col-xs-8">
232
- <input type="text" v-show="false" v-model="userfile.f_gasbrand_id" :value.sync="userfile.f_gasbrand_id" v-validate:f_gasbrand_id = "['required']" >
233
- <input-select
234
- class="select select_list"
235
- :value.sync="userfile.f_gasbrand_id"
236
- v-model="userfile.f_gasbrand_id"
237
- :options="meterBrandList"
238
- @change="gasbrandChange()"
239
- :disable="mark === 1 || gasbrandDisable"
240
- :valueSingle="true"></input-select>
241
- </div>
242
- </div>
243
- <div class="form-group row vertical-center" :class="[$v.f_gasmodel_id.required ? 'has-error' : '']">
244
- <label class="col-xs-4 control-label">气表型号:</label>
245
- <div class="col-xs-8">
246
- <input type="text" v-show="false" v-model="userfile.f_gasmodel_id" :value.sync="userfile.f_gasmodel_id" v-validate:f_gasmodel_id = "['required']" >
247
- <input-select
248
- class="select select_list"
249
- :value.sync="userfile.f_gasmodel_id"
250
- v-model="userfile.f_gasmodel_id"
251
- :options.sync="gasModelList"
252
- :disable="mark === 1 || gasbrandDisable"
253
- :valueSingle="true"></input-select>
254
- </div>
255
- </div>
256
- <template v-if="showInstall">
257
- <div class="form-group row vertical-center" :class="[$v.f_meternumber.required ? 'has-error' : '']">
258
- <label class="col-xs-4 control-label">表&emsp;&emsp;号:</label>
259
- <div class="col-xs-8">
260
- <input class="form-control input_view" style=""
261
- placeholder="表号" v-validate:f_meternumber = "['required']"
262
- v-model="userfile.f_meternumber"
263
- :value.sync="userfile.f_meternumber"
264
- @change="meternumberValidate()"
265
- :readonly="mark === 1"/>
266
- </div>
267
- </div>
268
- <div class="form-group row vertical-center">
269
- <label class="col-xs-4 control-label">表&ensp;封&ensp;号:</label>
270
- <div class="col-xs-8">
271
- <input class="form-control input_view" style=""
272
- placeholder="表封号"
273
- v-model="userfile.f_metertitles"
274
- :value="userfile.f_metertitles"
275
- :readonly="mark === 1"/>
276
- </div>
277
- </div>
278
- <div class="form-group row vertical-center">
279
- <label class="col-xs-4 control-label">表&ensp;读&ensp;数:</label>
280
- <div class="col-xs-8">
281
- <input class="form-control input_view" style=""
282
- type="number"
283
- placeholder="表读数"
284
- v-model="userfile.f_meter_base"
285
- :value="userfile.f_meter_base"
286
- :readonly="false"/>
287
- </div>
288
- </div>
289
- <div class="form-group row vertical-center" v-show="false">
290
- <label class="col-xs-4 control-label">初始底数:</label>
291
- <div class="col-xs-8">
292
- <input class="form-control input_view" style=""
293
- type="number"
294
- v-model="userfile.f_initial_base"
295
- :value="userfile.f_meter_base"
296
- placeholder="初始底数"
297
- :readonly="mark === 1"/>
298
- </div>
299
- </div>
300
- <div class="form-group row vertical-center">
301
- <label class="col-xs-4 control-label">表&emsp;&emsp;向:</label>
302
- <div class="col-xs-8">
303
- <input-select
304
- class="select select_list"
305
- :value.sync="userfile.f_aroundmeter"
306
- v-model="userfile.f_aroundmeter"
307
- :options="aroundmeters"
308
- :disable="mark === 1"
309
- :valueSingle="true"></input-select>
310
- </div>
311
- </div>
312
- <div class="form-group row vertical-center">
313
- <label class="col-xs-4 control-label">安装位置:</label>
314
- <div class="col-xs-8">
315
- <input-select
316
- class="select select_list"
317
- :value.sync="userfile.f_position"
318
- v-model="userfile.f_position"
319
- :options="positions"
320
- :disable="mark === 1"
321
- :valueSingle="true"></input-select>
322
- </div>
323
- </div>
324
- <div class="form-group row vertical-center">
325
- <label class="col-xs-4 control-label">安&ensp;装&ensp;人:</label>
326
- <div class="col-xs-8">
327
- <input class="form-control input_view" style=""
328
- v-model="userfile.f_install_person"
329
- :value.sync="installperson(userfile.f_install_person)"
330
- placeholder="安装人"
331
- readonly/>
332
- </div>
333
- </div>
334
- <div class="form-group row vertical-center">
335
- <label class="col-xs-4 control-label">安装日期:</label>
336
- <div class="col-xs-8">
337
- <input class="form-control input_view" style=""
338
- v-model="userfile.f_install_date"
339
- :value.sync="installdate(userfile.f_install_date)"
340
- placeholder="安装日期"
341
- readonly/>
342
- </div>
343
- </div>
344
- </template>
345
- </div>
346
- </article>
347
- <footer slot="modal-footer" class="modal-footer">
348
- <template v-if="mark !== 1">
349
- <button type="button" class="btn btn-primary" @click="saveUserFile" :disabled="!$v.valid">确认</button>
350
- </template>
351
- </footer>
352
- </modal>
353
- </validator>
354
- <validator name="x">
355
- <modal v-if="showDeleteModel" :show.sync="showDeleteModel" v-ref:modal :large="true" :backdrop="false">
356
- <header slot="modal-header" class="modal-header">
357
- <button type="button" class="close" @click="closeUserFile"><span>&times;</span></button>
358
- <h4 class="modal-title">销户原因</h4>
359
- </header>
360
- <article slot="modal-body" class="modal-body clearfix">
361
- <div class="form-group row vertical-center" :class="[$v.f_cancel_cause.required ? 'has-error' : '']">
362
- <label class="col-xs-2 control-label">销户原因:</label>
363
- <div class="col-xs-10">
364
- <input class="form-control input_view" style=""
365
- placeholder="销户原因"
366
- v-validate:f_cancel_cause = "['required']"
367
- v-model="userinfo.f_cancel_cause"
368
- :value.sync="userinfo.f_cancel_cause"/>
369
- </div>
370
- </div>
371
- </article>
372
- <footer slot="modal-footer" class="modal-footer">
373
- <button type="button" class="btn btn-primary" @click="deleteUser" :disabled="!$x.valid">确认</button>
374
- </footer>
375
- </modal>
376
- </validator>
377
- </div>
378
-
379
- </template>
380
- <script>
381
- import Vue from 'vue'
382
- import {PagedList} from 'vue-client'
383
- import {HttpResetClass} from 'vue-client'
384
- import {isEmpty} from '../../../Util'
385
-
386
- export default {
387
- title: '安装明细',
388
- props: {
389
- selectdata: {
390
- type: Object
391
- },
392
- mark: {
393
- type: Number,
394
- default: 0
395
- }
396
- },
397
- data () {
398
- return {
399
- showModal: false,
400
- model: new PagedList(`${this.$androidUtil.getProxyUrl()}/rs/sql/getApplyUserinfo`, 10),
401
- criteriaShow: false,
402
- areaList: [],
403
- area: {},
404
- modelCode: '',
405
- userinfo: {},
406
- userfile: {},
407
- meterBrandList: [],
408
- gasModelList: [],
409
- showUserInformation: {},
410
- scanCodeConfig: null,
411
- gasbrandDisable: false,
412
- showDeleteModel: false,
413
- DeleteUserInfo: false,
414
- }
415
- },
416
- ready () {
417
- this.copydata()
418
- this.search()
419
- this.getMeterBrand()
420
- this.getAreaList()
421
- this.getScanCodeConfig()
422
- this.showDeleteUserInfo()
423
- },
424
- methods: {
425
- showDeleteUserInfo () {
426
- if(this.selectdata.f_apply_type === '民用报建' && (this.selectdata.defname === '报建受理' || this.selectdata.defname === '现场勘察')){
427
- this.DeleteUserInfo=true
428
- }
429
- },
430
- copydata(){
431
- if(!isEmpty(this.selectdata.f_building)){
432
- this.$refs.cp.$refs.cri.model.f_building=this.selectdata.f_building
433
- }
434
- if(!isEmpty(this.selectdata.f_unit)){
435
- this.$refs.cp.$refs.cri.model.f_unit=this.selectdata.f_unit
436
- }
437
- if(!isEmpty(this.selectdata.f_room)){
438
- this.$refs.cp.$refs.cri.model.f_room= this.selectdata.f_room
439
- }
440
- },
441
-
442
- async getScanCodeConfig () {
443
- let http = new HttpResetClass()
444
- let res = await http.load(
445
- 'POST',
446
- `${this.$androidUtil.getProxyUrl()}/rs/logic/getScanCodeConfig`,
447
- null,
448
- {resolveMsg: null, rejectMsg: '扫码配置获取失败!!!'}
449
- )
450
- this.scanCodeConfig = res.data
451
- },
452
- // 查询
453
- search() {
454
- this.$refs.cp.$refs.cri.search();
455
- },
456
- searchCondition(args){
457
- if (this.selectdata.f_apply_type === '分户挂表') {
458
- args.condition += ` and ui.f_userinfo_id = '${this.selectdata.f_userinfo_id}'`
459
- }else {
460
- args.condition += ` and ui.f_process_id = '${this.selectdata.f_process_id}'`
461
- }
462
- if(!isEmpty(this.model.f_building)){
463
- args.condition += " and ui.f_building like '"+this.model.f_building+"%'"
464
- }
465
- if(!isEmpty(this.model.f_unit)){
466
- args.condition+= " and ui.f_unit like '"+this.model.f_unit+"%'"
467
- }
468
- if(!isEmpty(this.model.f_room)){
469
- args.condition += " and ui.f_room like '"+this.model.f_room+"%'"
470
- }
471
- this.model.search(args.condition, args.model);
472
- },
473
- clear () {
474
- Object.keys(this.$refs.cp.$refs.cri.model).forEach((key) => {
475
- this.$refs.cp.$refs.cri.model[key] = null
476
- })
477
- },
478
- async scanCode () {
479
- console.log('===============扫码===================')
480
- HostApp.__this__ = this,
481
- HostApp.scanCode({callback: "javascript:HostApp.__this__.getCode();"})
482
- await this.getCode()
483
- },
484
- async getCode () {
485
- let code = HostApp.getCode().data;
486
- // let code = '012199312345'
487
- console.log('===========扫码结果=============')
488
- console.log(code)
489
- if (isEmpty(code)){
490
- return
491
- }
492
- if (!/^\d{12}$/.test(code)) {
493
- this.$showAlert('表号不符合规则', 'danger', 3000)
494
- return
495
- }
496
- // 解析厂家
497
- let factory = null
498
- for (const item of this.scanCodeConfig.factory) {
499
- if (item.key === code.substring(0, 2)) {
500
- factory = item.val
501
- break
502
- }
503
- }
504
- if (isEmpty(factory)) {
505
- this.$showAlert('未知厂家!!!', 'danger', 3000)
506
- return
507
- }
508
- console.log(factory)
509
- // 解析运营商
510
- let ips = null
511
- for (const item of this.scanCodeConfig.ips) {
512
- if (item.key === code.substring(5, 6)) {
513
- ips = item.val
514
- break
515
- }
516
- }
517
- if (isEmpty(ips)) {
518
- this.$showAlert('未知运营商!!!', 'danger', 3000)
519
- return
520
- }
521
- console.log(ips)
522
- //气表品牌
523
- if (code.startsWith('01')) {
524
- var num1 = this.getMeterBrands('金卡NB物联网表')
525
- this.userfile.f_gasbrand_id = num1
526
- } else if (code.startsWith('02') || code.startsWith('22')) {
527
- var num2 = this.getMeterBrands('千嘉NB物联网表')
528
- this.userfile.f_gasbrand_id = num2
529
- } else if (code.startsWith('03')) {
530
- var num2 = this.getMeterBrands('先锋NB民用物联网表')
531
- this.userfile.f_gasbrand_id = num2
532
- }
533
- //气表型号
534
- if (code.substring(4, 5) == 7 || code.substring(4, 5) == 0) {
535
- await this.gasbrandValue('JGD1.6-NNB物联网表')
536
- const value=this.modelCode
537
- this.userfile.f_gasmodel_id = value
538
- } else if (code.substring(4, 5) == 8 ||code.substring(4, 5) == 1) {
539
-
540
- await this.gasbrandValue('JGD2.5-NNB物联网表')
541
- const value1=this.modelCode
542
- this.userfile.f_gasmodel_id =value1
543
- } else if (code.substring(4, 5) == 9 ||code.substring(4, 5) == 2) {
544
- await this.gasbrandValue('JGD4S-NNB物联网表')
545
- const value2 =this.modelCode
546
- this.userfile.f_gasmodel_id = value2
547
- }
548
- // 表向
549
- console.log(code.substring(6, 7) % 2 === 0 ? '偶数' : '奇数')
550
- console.log(code.substring(6, 7) % 2 === 0 ? '右表' : '左表')
551
- this.userfile.f_aroundmeter = code.substring(6, 7) % 2 === 0 ? '右表' : '左表'
552
- // 顺序号
553
- console.log(code.substring(7, 12))
554
- if (code.substring(7, 12) < this.scanCodeConfig.number.min || code.substring(7, 12) > this.scanCodeConfig.number.max) {
555
- this.$showAlert('顺序号超出范围!!!', 'danger', 3000)
556
- return
557
- }
558
- for (const item of this.meterBrandList) {
559
- if (item.label === factory) {
560
- // this.userfile.f_gasbrand_id = item.value
561
- // this.gasbrandChange()
562
- break
563
- }
564
- }
565
- Vue.set(this.userfile, 'f_meternumber', code)
566
- this.meternumberValidate()
567
- },
568
- async gasbrandValue (name) {
569
- let data = {
570
- f_gasbrand_id: this.userfile.f_gasbrand_id
571
- }
572
- let http = new HttpResetClass()
573
- let res = await http.load(
574
- 'POST',
575
- `${this.$androidUtil.getProxyUrl()}/rs/sql/getGasModel`,
576
- {data: data},
577
- {resolveMsg: null, rejectMsg: '气表型号查询失败!!!'}
578
- ).then(res => {
579
- for (const re of res.data) {
580
- if (re.label == name) {
581
- this.modelCode= re.value
582
- return re.value;
583
- }
584
- }
585
- return 'null'
586
- })
587
- },
588
- getMeterBrands (name) {
589
- for (const brand of this.meterBrandList) {
590
- if(brand.label==name){
591
- return brand.value
592
- }
593
- }
594
- return 'null'
595
- },
596
- async deleteUserinfo (row) {
597
- this.userinfo = row
598
- let res = await this.$showMessage('此操作不可撤回,您确定要删除这条记录吗?')
599
- if (res === 'cancel') {
600
- return
601
- }
602
- this.showDeleteModel = !this.showDeleteModel
603
- },
604
- async deleteUser () {
605
- let res = await this.$showMessage('此操作不可撤回,您确定要删除这条记录吗?')
606
- if (res === 'cancel') {
607
- return
608
- }
609
-
610
- let data = {
611
- login: Vue.user,
612
- userinfo: this.userinfo,
613
- selectdata: this.selectdata
614
- }
615
- res = await this.$resetpost(`${this.$androidUtil.getProxyUrl()}/rs/logic/applyDeleteUserinfo`, {data:data}, {
616
- resolveMsg: null,
617
- rejectMsg: '删除失败!!!'
618
- })
619
-
620
- this.$dispatch('breakControl', this.selectdata)
621
- },
622
- // 保存档案
623
- async saveUserFile() {
624
- if (this.selectdata.defname === '工程施工') {
625
- this.meternumberValidate()
626
- if( this.selectdata.f_apply_type === '民用报建'){
627
- if (this.userfile.f_meter_base - 0 === 0 || this.userfile.f_meter_base - 0 > 1.5) {
628
- this.$showAlert('表读数必须大于0小于或等于1.5!', 'warning', 3000)
629
- throw '表读数必须大于0小于或等于1.5!'
630
- }
631
- }
632
- if( this.selectdata.f_apply_type === '非民用报建'){
633
- if (this.userfile.f_meter_base - 0 === 0 || this.userfile.f_meter_base - 0 >30) {
634
- this.$showAlert('表读数必须大于0小于或等于30!', 'warning', 3000)
635
- throw '表读数必须大于0小于或等于30!'
636
- }
637
- }
638
- }
639
- if (this.userfile.f_gasbrand_id && this.userfile.f_meternumber) {
640
- let data = {
641
- f_meternumber: this.userfile.f_meternumber,
642
- f_gasbrand_id: this.userfile.f_gasbrand_id
643
- }
644
- if (this.userfile.f_user_id) {
645
- data.f_user_id = this.userfile.f_user_id
646
- }
647
- let http = new HttpResetClass()
648
- let res = await http.load("POST",`${this.$androidUtil.getProxyUrl()}/rs/logic/meterbrandsNumberValidate`, {data:data}, {
649
- resolveMsg: null,
650
- rejectMsg: '表号验证失败!!'
651
- })
652
- console.log(`查询结果${res.data}`)
653
- console.log(res.data)
654
- if (!/^\d{12}$/.test(this.userfile.f_meternumber)) {
655
- if(!/^\d{14}$/.test(this.userfile.f_meternumber)){
656
- this.$showAlert('表号不符合规则', 'danger', 3000)
657
- return
658
- }
659
- }
660
- if (res.data === '表号已存在' || res.data === '表号无效') {
661
- this.userfile.f_meternumber = ''
662
- this.$showAlert(res.data, 'danger', 3000)
663
- throw res.data
664
- }
665
- }
666
- let data = {
667
- user: Vue.user,
668
- userinfo: this.userinfo,
669
- userfile: this.userfile,
670
- selectdata: this.selectdata
671
- }
672
- let res = await this.$resetpost(`${this.$androidUtil.getProxyUrl()}/rs/logic/applyAddUserinfo`, {data:data}, {
673
- resolveMsg: null,
674
- rejectMsg: '用户档案添加失败!!!'
675
- })
676
- // this.$showMessage('用户档案添加成功!!!')
677
- this.$showAlert('用户档案添加成功!!!', 'success', 3000)
678
- // this.search() 避免分页时,点击确定后,分页返回第一页
679
- this.showModal= false
680
- console.log("分页数据",this.model)
681
- this.selectdata.f_building=this.model.model.f_building
682
- this.selectdata.f_unit=this.model.model.f_unit
683
- this.selectdata.f_room=this.model.model.f_room
684
- this.selectdata.pageIndex=this.model.pageIndex
685
- this.$dispatch('breakControl', this.selectdata)
686
- },
687
- ifDisable() {
688
- if ( this.selectdata.defname === '工程施工') {
689
- this.gasbrandDisable = true
690
- }
691
- },
692
- // 检查表号是否存在
693
- async meternumberValidate() {
694
- if (!this.userfile.f_gasbrand_id) {
695
- this.userfile.f_meternumber = ''
696
- this.$showAlert('请先选择气表品牌!!!', 'warning', 3000)
697
- return
698
- }
699
- if (this.userfile.f_gasbrand_id && this.userfile.f_meternumber) {
700
- let data = {
701
- f_meternumber: this.userfile.f_meternumber,
702
- f_gasbrand_id: this.userfile.f_gasbrand_id
703
- }
704
- if (this.userfile.f_user_id) {
705
- data.f_user_id = this.userfile.f_user_id
706
- }
707
- let http = new HttpResetClass()
708
- let res = await http.load("POST",`${this.$androidUtil.getProxyUrl()}/rs/logic/meterbrandsNumberValidate`, {data:data}, {
709
- resolveMsg: null,
710
- rejectMsg: '表号验证失败!!'
711
- })
712
- console.log(`查询结果${res.data}`)
713
- console.log(res.data)
714
- if (!/^\d{12}$/.test(this.userfile.f_meternumber)) {
715
- if(!/^\d{14}$/.test(this.userfile.f_meternumber)){
716
- this.$showAlert('表号不符合规则', 'danger', 3000)
717
- return
718
- }
719
- }
720
- if (res.data === '表号已存在' || res.data === '表号无效') {
721
- this.userfile.f_meternumber = ''
722
- this.$showAlert(res.data, 'warning', 3000)
723
- }
724
- }
725
- },
726
- // 选择气表品牌
727
- async gasbrandChange() {
728
- // 清空已保存的气表型号
729
- this.userfile.f_gasmodel_id = null
730
- if (isEmpty(this.userfile.f_gasbrand_id)) {
731
- return
732
- }
733
- if (this.userfile.f_gasbrand_id === 'null') {
734
- this.gasModelList.push({label: '无', value: 'null'})
735
- this.userfile.f_meter_classify = 'null'
736
- return
737
- }
738
- let data = {
739
- f_gasbrand_id: this.userfile.f_gasbrand_id
740
- }
741
- let http = new HttpResetClass()
742
- let res = await http.load(
743
- 'POST',
744
- `${this.$androidUtil.getProxyUrl()}/rs/sql/getGasModel`,
745
- {data: data},
746
- {resolveMsg: null, rejectMsg: '气表型号查询失败!!!'}
747
- )
748
-
749
- this.gasModelList = res.data
750
-
751
- // data = {
752
- // tablename: 't_gasbrand',
753
- // condition: `id = '${this.userfile.f_gasbrand_id}'`
754
- // }
755
- // res = await http.load(
756
- // 'POST',
757
- // `${this.$androidUtil.getProxyUrl()}/rs/sql/applySingleTable`,
758
- // {data: data},
759
- // {resolveMsg: null, rejectMsg: '表具类型查询失败!!!'}
760
- // )
761
- // this.userfile.f_meter_classify = res.data[0].f_meter_type
762
- this.userfile.f_meter_classify = '物联网表'
763
- },
764
- // 地址拼接
765
- addressSplicing () {
766
- let f_area = this.userinfo.f_area || ''
767
- let f_slice_area = this.userinfo.f_slice_area || ''
768
- let f_street = this.userinfo.f_street || ''
769
- let f_residential_area = this.userinfo.f_residential_area || ''
770
- let f_building = this.userinfo.f_building || ''
771
- let f_building_suffix = f_building ? '号楼' : ''
772
- let f_unit = this.userinfo.f_unit || ''
773
- let f_unit_suffix = f_unit ? '单元' : ''
774
- let f_floor = this.userinfo.f_floor || ''
775
- let f_floor_suffix = f_floor ? '层' : ''
776
- let f_room = this.userinfo.f_room || ''
777
- let f_room_suffix = f_room ? '室' : ''
778
-
779
- Vue.set(this.userinfo, 'f_address', f_area + f_slice_area + f_street + f_residential_area + f_building + f_building_suffix + f_unit + f_unit_suffix + f_floor + f_floor_suffix + f_room + f_room_suffix)
780
- },
781
- // 选择小区
782
- changeArea () {
783
- if (isEmpty(this.area)) {
784
- return
785
- }
786
-
787
- this.userinfo.f_area = this.area.f_area
788
- this.userinfo.f_slice_area = this.area.f_slice_area
789
- this.userinfo.f_street = this.area.f_street
790
- this.userinfo.f_residential_area = this.area.f_residential_area
791
- this.userinfo.f_residential_area_id = this.area.id
792
- },
793
- // 打开安装明细
794
- async openModal (row) {
795
- this.ifDisable()
796
- if (row) {
797
- console.log('------------------修正---------------------')
798
- this.userinfo = row
799
-
800
- if (this.userinfo.f_residential_area_id) {
801
- let data = {
802
- tablename: 't_area_address',
803
- condition: `id = '${this.userinfo.f_residential_area_id}'`
804
- }
805
- let http = new HttpResetClass()
806
- let res = await http.load(
807
- 'POST',
808
- `${this.$androidUtil.getProxyUrl()}/rs/sql/applySingleTable`,
809
- {data: data},
810
- {resolveMsg: null, rejectMsg: '小区查询失败!!!'}
811
- )
812
-
813
- this.area = res.data[0]
814
- }
815
-
816
- let data = {
817
- tablename: 't_userfiles',
818
- condition: `f_userinfo_id = ${row.f_userinfo_id}`
819
- }
820
- let http = new HttpResetClass()
821
- let res = await http.load(
822
- 'POST',
823
- `${this.$androidUtil.getProxyUrl()}/rs/sql/applySingleTable`,
824
- {data: data},
825
- {resolveMsg: null, rejectMsg: '表档案查询失败!!!'}
826
- )
827
- this.userfile = res.data[0]
828
-
829
- if (this.userfile.f_gasbrand_id === 0) {
830
- this.userfile.f_gasbrand_id = null
831
- }
832
- if (this.userfile.f_gasmodel_id === 0) {
833
- this.userfile.f_gasmodel_id = null
834
- }
835
- if(isEmpty(this.userfile.f_position)){
836
- this.userfile.f_position = '室内'
837
- }
838
- if (!isEmpty(this.userfile.f_gasbrand_id)) {
839
- let data = {
840
- f_gasbrand_id: this.userfile.f_gasbrand_id
841
- }
842
- let http = new HttpResetClass()
843
- let res = await http.load(
844
- 'POST',
845
- `${this.$androidUtil.getProxyUrl()}/rs/sql/getGasModel`,
846
- {data: data},
847
- {resolveMsg: null, rejectMsg: '气表型号查询失败!!!'}
848
- )
849
-
850
- this.gasModelList = res.data
851
- }
852
- }
853
- if (this.selectdata.f_residential_area_id) {
854
- let data = {
855
- tablename: 't_area_address',
856
- condition: `id = '${this.selectdata.f_residential_area_id}'`
857
- }
858
- let http = new HttpResetClass()
859
- let res = await http.load(
860
- 'POST',
861
- `${this.$androidUtil.getProxyUrl()}/rs/sql/applySingleTable`,
862
- {data: data},
863
- {resolveMsg: null, rejectMsg: '小区查询失败!!!'}
864
- )
865
-
866
- this.area = res.data[0]
867
- this.selectArea(this.area.f_residential_area)
868
- this.changeArea()
869
- this.addressSplicing()
870
- }
871
-
872
- // 档案回填定位信息
873
- this.userinfo.f_lng = this.selectdata.f_lng
874
- this.userinfo.f_lat = this.selectdata.f_lat
875
- this.userinfo.f_location_address = this.selectdata.f_order_address
876
- if(!row){
877
- // 档案回填用户信息
878
- this.showUserInformation.f_user_name = this.selectdata.f_user_name
879
- this.showUserInformation.f_user_phone = this.selectdata.f_phone
880
- this.showUserInformation.f_credentials = this.selectdata.f_credentials
881
- this.showUserInformation.f_idnumber = this.selectdata.f_idnumber
882
- }
883
- this.showModal = true
884
- },
885
- // 获取气表品牌
886
- async getMeterBrand () {
887
- let data = {
888
- }
889
-
890
- let http = new HttpResetClass()
891
- let res = await http.load(
892
- 'POST',
893
- `${this.$androidUtil.getProxyUrl()}/rs/sql/getMeterBrand`,
894
- {data: data},
895
- {resolveMsg: null, rejectMsg: '气表品牌查询失败!!!'}
896
- )
897
-
898
- this.meterBrandList = res.data
899
- this.meterBrandList.push({label: '无', value: 'null'})
900
- },
901
- // 获取小区
902
- async getAreaList () {
903
- let data = {
904
- tablename: 't_area_address',
905
- condition: `f_filiale like '%${"榆林."+Vue.user.orgs}%' and f_area_status = '启用'`
906
- }
907
- let http = new HttpResetClass()
908
- let res = await http.load(
909
- 'POST',
910
- `${this.$androidUtil.getProxyUrl()}/rs/sql/applySingleTable`,
911
- {data: data},
912
- {resolveMsg: null, rejectMsg: '小区查询失败!!!'}
913
- )
914
- this.areaList = res.data.map(item => {
915
- item.id = String(item.id)
916
- return {
917
- label: item.f_residential_area,
918
- value: item
919
- }
920
- })
921
- },
922
- //搜索小区
923
- selectArea (val) {
924
- let pcdText = `and f_residential_area like '%${val}%'`
925
- let data = {
926
- tablename: 't_area_address',
927
- condition: `f_filiale like '%${"榆林."+Vue.user.orgs}%' and f_area_status = '启用' ${pcdText}`
928
- }
929
- new HttpResetClass().load("POST", `${this.$androidUtil.getProxyUrl()}/rs/sql/applySingleTable`, {data:data}, {resolveMsg: null, rejectMsg: null}).then((res)=>{
930
- console.log('请求发送完成!!!!!'+JSON.stringify(res))
931
- if(res.data.length>0){
932
- this.areaList = res.data.map(item => {
933
- item.id = String(item.id)
934
- return {
935
- label: item.f_residential_area,
936
- value: item
937
- }
938
- })
939
- }
940
- })
941
- },
942
- // 关闭安装明细
943
- closeUserFile() {
944
- this.showModal = false
945
- this.area = {}
946
- this.userinfo = {}
947
- this.userfile = {}
948
- this.gasModelList = {}
949
- this.showDeleteModel = false
950
- this.search()
951
- }
952
- },
953
- events: {
954
- },
955
- computed: {
956
-
957
- showAddress () {
958
- return this.selectdata.f_apply_type === '民用报建' || this.selectdata.f_apply_type === '设备拆除'
959
- },
960
- showUserInfo () {
961
- return (this.selectdata.f_apply_type === '民用报建' && this.selectdata.f_apply_nature !== '分户挂表') || (this.selectdata.f_apply_type === '设备拆除') },
962
- showUserFile () {
963
- return (this.selectdata.f_apply_type === '民用报建' && this.selectdata.f_apply_nature !== '分户挂表' && this.selectdata.defname === '工程施工') ||
964
- this.selectdata.f_apply_type === '非民用报建' ||
965
- this.selectdata.f_apply_type === '设备变更' ||
966
- this.selectdata.f_apply_type === '设备拆除' ||
967
- this.selectdata.f_apply_type === '分户挂表'
968
- },
969
- showInstall () {
970
- return (this.showUserFile && (this.selectdata.defname === '工程施工' || this.selectdata.defname === '施工通气' ||
971
- this.selectdata.defname === '点火通气')) || (this.selectdata.f_apply_type === '设备拆除')
972
- },
973
- // 证件类型
974
- credentialsList() {
975
- return this.$appdata.getParam('证件类型')
976
- },
977
- // 安装人
978
- installperson() {
979
- return function (f_install_person) {
980
- if (isEmpty(f_install_person)) {
981
- return Vue.user.name
982
- }
983
- return f_install_person
984
- }
985
- },
986
- // 安装时间
987
- installdate() {
988
- return function (f_install_date) {
989
- if (isEmpty(f_install_date)) {
990
- return new Date().Format('yyyy-MM-dd HH:mm:ss')
991
- }
992
- return f_install_date
993
- }
994
- },
995
- // 表向
996
- aroundmeters() {
997
- return this.$appdata.getParam('左右表')
998
- },
999
- // 安装位置
1000
- positions() {
1001
- return this.$appdata.getParam('安装位置')
1002
- }
1003
- },
1004
- watch: {
1005
- }
1006
- }
1007
- </script>
1008
- <style scoped>
1009
- .panel {
1010
- margin-bottom: 8px;
1011
- }
1012
- .panel-self{
1013
- border-radius: 10px;
1014
- border:1px solid #499EDF;
1015
- padding: 8px;
1016
- }
1017
- .button_shrink_top {
1018
- width: 34px;
1019
- height: 34px;
1020
- border: solid 1px #6aa6e2;
1021
- background-size: 100%;
1022
- background-image: url("../../../../../static/newStyle/stretch_top.png")
1023
- }
1024
-
1025
- .button_shrink_bottom {
1026
- width: 34px;
1027
- height: 34px;
1028
- border: solid 1px #6aa6e2;
1029
- background-size: 100%;
1030
- background-image: url("../../../../../static/newStyle/stretch_bottom.png")
1031
- }
1032
- </style>
1
+ <template>
2
+ <div class="p-10">
3
+ <criteria-paged :model="model" v-ref:cp>
4
+ <criteria partial='criteria' @condition-changed='$parent.searchCondition' v-ref:cri>
5
+ <div partial class="auto">
6
+ <div class="row form-group app-input" v-if="$parent.$parent.criteriaShow">
7
+ <label class="">楼&emsp;&emsp;号:</label>
8
+ <div class="col-xs-8" >
9
+ <input class="" v-model=model.f_building condition="ui.f_building like '{}%'" />
10
+ </div>
11
+ </div>
12
+ <div class="row form-group app-input" v-if="$parent.$parent.criteriaShow">
13
+ <label class="">单&emsp;&emsp;元:</label>
14
+ <div class="col-xs-8" >
15
+ <input class="" v-model=model.f_unit condition="ui.f_unit like '{}%'" />
16
+ </div>
17
+ </div>
18
+ <div class="row form-group app-input" v-if="$parent.$parent.criteriaShow">
19
+ <label class="">门&ensp;牌&ensp;号:</label>
20
+ <div class="col-xs-8" >
21
+ <input class="" v-model=model.f_room condition="ui.f_room like '{}%'" />
22
+ </div>
23
+ </div>
24
+ <div class="row form-group text-right" style="">
25
+ <button class="btn btn-info" @click.prevent="$parent.$parent.openModal()"
26
+ :disabled="mark === 1 ||
27
+ (model.rows.length >= selectdata.f_install_count && selectdata.defname === '工程施工') ||
28
+ (model.rows.length >= selectdata.f_apply_count && (selectdata.defname === '报建受理')) ||
29
+ selectdata.defname === '施工通气'"
30
+ >添加</button>
31
+ <button class="btn btn-primary" @click="search()">查询</button>
32
+ <button class="btn btn-info" @click="$parent.$parent.clear()">清空</button>
33
+ <button class="btn" :class="{'button_shrink_top':$parent.$parent.criteriaShow,'button_shrink_bottom':!$parent.$parent.criteriaShow}" @click="$parent.$parent.criteriaShow = !$parent.$parent.criteriaShow"></button>
34
+ </div>
35
+ </div>
36
+ </criteria>
37
+ <list :model="model" partial='list'>
38
+ <div partial class="auto app-text panel">
39
+ <div class="panel-body panel-self">
40
+ <div class="row">
41
+ <p class="col-xs-3 text-left font"><b class="control-label-justify">客户编号</b></p>
42
+ <p class="col-xs-8 col-xs-offset-1 text-left input-font">{{ row.f_userinfo_id }}</p>
43
+ </div>
44
+ <div class="row">
45
+ <p class="col-xs-3 text-left font"><b class="control-label-justify">客户名称</b></p>
46
+ <p class="col-xs-8 col-xs-offset-1 text-left input-font">{{ row.f_user_name }}</p>
47
+ </div>
48
+ <div class="row">
49
+ <p class="col-xs-3 text-left font"><b class="control-label-justify">客户电话</b></p>
50
+ <p class="col-xs-8 col-xs-offset-1 text-left input-font">{{ row.f_user_phone }}</p>
51
+ </div>
52
+ <div class="row">
53
+ <p class="col-xs-3 text-left font"><b class="control-label-justify">地址信息</b></p>
54
+ <p class="col-xs-8 col-xs-offset-1 text-left input-font">{{row.f_address}}{{row.f_address_detail}}</p>
55
+ </div>
56
+ <div class="row">
57
+ <p class="col-xs-3 text-left font"><b class="control-label-justify">表号</b></p>
58
+ <p class="col-xs-8 col-xs-offset-1 text-left input-font">{{ row.f_meternumber }}</p>
59
+ </div>
60
+ <div class="row">
61
+ <p class="col-xs-3 text-left font"><b class="control-label-justify">气表品牌</b></p>
62
+ <p class="col-xs-8 col-xs-offset-1 text-left input-font">{{ row.f_meter_brand }}</p>
63
+ </div>
64
+ <div class="row">
65
+ <p class="col-xs-3 text-left font"><b class="control-label-justify">气表型号</b></p>
66
+ <p class="col-xs-8 col-xs-offset-1 text-left input-font">{{ row.f_meter_style }}</p>
67
+ </div>
68
+ <div class="row text-right">
69
+ <button class="btn btn-danger"
70
+ @click="$parent.$parent.$parent.deleteUserinfo(row)"
71
+ v-if="$parent.$parent.$parent.DeleteUserInfo"
72
+ :disabled="$parent.mark === 1 || row.f_user_state === '正常'">
73
+ 销户
74
+ </button>
75
+ <button class="btn btn-info"
76
+ @click.prevent="$parent.$parent.$parent.openModal(row)">
77
+ {{$parent.mark === 1 ? '查看' : '修正'}}
78
+ </button>
79
+
80
+ </div>
81
+ </div>
82
+ </div>
83
+ </list>
84
+ </criteria-paged>
85
+ </div>
86
+ <div>
87
+ <validator name="v">
88
+ <modal v-if="showModal" :show.sync="showModal" v-ref:modal :large="true" :backdrop="false">
89
+ <header slot="modal-header" class="modal-header">
90
+ <button type="button" class="close" @click="closeUserFile"><span>&times;</span></button>
91
+ <h4 class="modal-title">安装明细</h4>
92
+ </header>
93
+ <article slot="modal-body" class="modal-body clearfix">
94
+ <!-- 基本信息 -->
95
+ <div class="form-group col-xs-12 panel panel-info" v-if="showUserInfo">
96
+ <div class="panel-heading head col-xs-12" style="background-color: #e8f4ff;margin-bottom: 10px">
97
+ <div class="col-xs-6 text-left">用户信息</div>
98
+ </div>
99
+ <div class="form-group row vertical-center" :class="[$v.f_user_name.required ? 'has-error' : '']">
100
+ <label class="col-xs-4 control-label">客户名称:</label>
101
+ <div class="col-xs-8">
102
+ <input class="form-control input_view" style=""
103
+ v-validate:f_user_name = "['required']"
104
+ v-model="userinfo.f_user_name"
105
+ :value.sync="showUserInformation.f_user_name"
106
+ :readonly="mark === 1"
107
+ placeholder="客户名称"/>
108
+ </div>
109
+ </div>
110
+ <div class="form-group row vertical-center">
111
+ <label class="col-xs-4 control-label">客户电话:</label>
112
+ <div class="col-xs-8">
113
+ <input class="form-control input_view" style=""
114
+ v-model="userinfo.f_user_phone"
115
+ :value.sync="showUserInformation.f_user_phone"
116
+ :readonly="mark === 1"
117
+ placeholder="客户电话"/>
118
+ </div>
119
+ </div>
120
+ <div class="form-group row vertical-center">
121
+ <label class="col-xs-4 control-label">证件类型:</label>
122
+ <div class="col-xs-8">
123
+ <input-select
124
+ class="select select_list"
125
+ :value.sync="showUserInformation.f_credentials"
126
+ v-model="userinfo.f_credentials"
127
+ :options="credentialsList"
128
+ :disable="mark === 1"
129
+ :valueSingle="true"></input-select>
130
+ </div>
131
+ </div>
132
+ <div class="form-group row vertical-center">
133
+ <label class="col-xs-4 control-label">证件号码:</label>
134
+ <div class="col-xs-8">
135
+ <input class="form-control input_view" style=""
136
+ placeholder="证件号码"
137
+ v-model="userinfo.f_idnumber"
138
+ :value="showUserInformation.f_idnumber"
139
+ :readonly="mark === 1"/>
140
+ </div>
141
+ </div>
142
+ </div>
143
+ <!-- 地址信息 -->
144
+ <div class="form-group col-xs-12 panel panel-info" v-if="showAddress">
145
+ <div class="panel-heading head col-xs-12" style="background-color: #e8f4ff;margin-bottom: 10px">
146
+ <div class="col-xs-6 text-left">地址信息</div>
147
+ </div>
148
+ <div class="form-group row vertical-center" :class="[$v.area.required ? 'has-error' : '']">
149
+ <label class="col-xs-4 control-label">小&emsp;&emsp;区:</label>
150
+ <div class="col-xs-8">
151
+ <input type="text" v-show="false" v-model="area.id" :value.sync="area.id" v-validate:area = "['required']" >
152
+ <input-select
153
+ class="select select_list"
154
+ :value.sync="area"
155
+ v-model="area"
156
+ :options="areaList"
157
+ @change="changeArea(),addressSplicing()"
158
+ @select-search = "selectArea"
159
+ :disable="mark === 1 || selectdata.f_apply_nature === '小区'"
160
+ :valueSingle="true"></input-select>
161
+ </div>
162
+ </div>
163
+ <div class="form-group row vertical-center">
164
+ <label class="col-xs-4 control-label">楼&emsp;&emsp;号:</label>
165
+ <div class="col-xs-8">
166
+ <input class="form-control input_view" placeholder="楼号"
167
+ v-model="userinfo.f_building"
168
+ :value="userinfo.f_building"
169
+ @change="addressSplicing"
170
+ :readonly="mark === 1"/>
171
+ </div>
172
+ </div>
173
+ <div class="form-group row vertical-center">
174
+ <label class="col-xs-4 control-label">单&emsp;&emsp;元:</label>
175
+ <div class="col-xs-8">
176
+ <input class="form-control input_view" placeholder="单元"
177
+ v-model="userinfo.f_unit"
178
+ :value="userinfo.f_unit"
179
+ @change="addressSplicing"
180
+ :readonly="mark === 1"/>
181
+ </div>
182
+ </div>
183
+ <div class="form-group row vertical-center">
184
+ <label class="col-xs-4 control-label">楼&emsp;&emsp;层:</label>
185
+ <div class="col-xs-8">
186
+ <input class="form-control input_view" placeholder="楼层"
187
+ v-model="userinfo.f_floor"
188
+ :value="userinfo.f_floor"
189
+ @change="addressSplicing"
190
+ :readonly="mark === 1"/>
191
+ </div>
192
+ </div>
193
+ <div class="form-group row vertical-center" :class="[$v.f_room.required ? 'has-error' : '']">
194
+ <label class="col-xs-4 control-label">门&ensp;牌&ensp;号:</label>
195
+ <div class="col-xs-8">
196
+ <input class="form-control input_view" placeholder="门牌号"
197
+ v-validate:f_room = "['required']"
198
+ v-model="userinfo.f_room"
199
+ :value="userinfo.f_room"
200
+ @change="addressSplicing"
201
+ :readonly="mark === 1"/>
202
+ </div>
203
+ </div>
204
+ <div class="form-group row vertical-center">
205
+ <label class="col-xs-4 control-label">地&emsp;&emsp;址:</label>
206
+ <div class="col-xs-8">
207
+ <input class="form-control input_view"
208
+ placeholder="地址"
209
+ v-model="userinfo.f_address"
210
+ :value.sync="userinfo.f_address"
211
+ :readonly="true"/>
212
+ </div>
213
+ </div>
214
+ </div>
215
+ <!-- 表具信息 -->
216
+ <div class="form-group col-xs-12 panel panel-info" v-if="showUserFile">
217
+ <div class="panel-heading head col-xs-12" style="background-color: #e8f4ff;margin-bottom: 10px">
218
+ <div class="col-xs-6 text-left">表具信息</div>
219
+ <div class="col-xs-6 text-right">
220
+ <svg @click="scanCode()" style="width: 25px;height: 25px;margin-right: 10px" t="1636095770822" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="2457" width="64" height="64">
221
+ <path d="M928.016126 543.908618 95.983874 543.908618c-17.717453 0-31.994625-14.277171-31.994625-31.994625S78.26642 479.919368 95.983874 479.919368l832.032253 0c17.717453 0 31.994625 14.277171 31.994625 31.994625S945.73358 543.908618 928.016126 543.908618z" p-id="2458"></path>
222
+ <path d="M832.032253 928.016126 639.892491 928.016126c-17.717453 0-31.994625-14.277171-31.994625-31.994625s14.277171-31.994625 31.994625-31.994625l191.967747 0c17.717453 0 31.994625-14.277171 31.994625-31.994625l0-159.973123c0-17.717453 14.277171-31.994625 31.994625-31.994625s31.994625 14.277171 31.994625 31.994625l0 159.973123C928.016126 884.840585 884.840585 928.016126 832.032253 928.016126z" p-id="2459"></path>
223
+ <path d="M351.94087 928.016126l-159.973123 0c-52.980346 0-95.983874-43.003528-95.983874-95.983874l0-159.973123c0-17.717453 14.277171-31.994625 31.994625-31.994625S159.973123 654.341676 159.973123 672.05913l0 159.973123c0 17.717453 14.449185 31.994625 31.994625 31.994625l159.973123 0c17.717453 0 31.994625 14.277171 31.994625 31.994625C383.935495 913.738955 369.658324 928.016126 351.94087 928.016126z" p-id="2460"></path>
224
+ <path d="M127.978498 383.935495c-17.717453 0-31.994625-14.277171-31.994625-31.994625l0-159.973123c0-52.980346 43.003528-95.983874 95.983874-95.983874l159.973123 0c17.717453 0 31.994625 14.277171 31.994625 31.994625S369.658324 159.973123 351.94087 159.973123l-159.973123 0c-17.545439 0-31.994625 14.449185-31.994625 31.994625l0 159.973123C159.973123 369.658324 145.695952 383.935495 127.978498 383.935495z" p-id="2461"></path>
225
+ <path d="M896.021502 383.935495c-17.717453 0-31.994625-14.277171-31.994625-31.994625l0-159.973123c0-17.545439-14.277171-31.994625-31.994625-31.994625L639.892491 159.973123c-17.717453 0-31.994625-14.277171-31.994625-31.994625s14.277171-31.994625 31.994625-31.994625l191.967747 0c52.980346 0 95.983874 43.003528 95.983874 95.983874l0 159.973123C928.016126 369.658324 913.738955 383.935495 896.021502 383.935495z" p-id="2462"></path>
226
+ </svg>
227
+ </div>
228
+ </div>
229
+ <div class="form-group row vertical-center" :class="[$v.f_gasbrand_id.required ? 'has-error' : '']">
230
+ <label class="col-xs-4 control-label">气表品牌:</label>
231
+ <div class="col-xs-8">
232
+ <input type="text" v-show="false" v-model="userfile.f_gasbrand_id" :value.sync="userfile.f_gasbrand_id" v-validate:f_gasbrand_id = "['required']" >
233
+ <input-select
234
+ class="select select_list"
235
+ :value.sync="userfile.f_gasbrand_id"
236
+ v-model="userfile.f_gasbrand_id"
237
+ :options="meterBrandList"
238
+ @change="gasbrandChange()"
239
+ :disable="mark === 1 || gasbrandDisable"
240
+ :valueSingle="true"></input-select>
241
+ </div>
242
+ </div>
243
+ <div class="form-group row vertical-center" :class="[$v.f_gasmodel_id.required ? 'has-error' : '']">
244
+ <label class="col-xs-4 control-label">气表型号:</label>
245
+ <div class="col-xs-8">
246
+ <input type="text" v-show="false" v-model="userfile.f_gasmodel_id" :value.sync="userfile.f_gasmodel_id" v-validate:f_gasmodel_id = "['required']" >
247
+ <input-select
248
+ class="select select_list"
249
+ :value.sync="userfile.f_gasmodel_id"
250
+ v-model="userfile.f_gasmodel_id"
251
+ :options.sync="gasModelList"
252
+ :disable="mark === 1 || gasbrandDisable"
253
+ :valueSingle="true"></input-select>
254
+ </div>
255
+ </div>
256
+ <template v-if="showInstall">
257
+ <div class="form-group row vertical-center" :class="[$v.f_meternumber.required ? 'has-error' : '']">
258
+ <label class="col-xs-4 control-label">表&emsp;&emsp;号:</label>
259
+ <div class="col-xs-8">
260
+ <input class="form-control input_view" style=""
261
+ placeholder="表号" v-validate:f_meternumber = "['required']"
262
+ v-model="userfile.f_meternumber"
263
+ :value.sync="userfile.f_meternumber"
264
+ @change="meternumberValidate()"
265
+ :readonly="mark === 1"/>
266
+ </div>
267
+ </div>
268
+ <div class="form-group row vertical-center">
269
+ <label class="col-xs-4 control-label">表&ensp;封&ensp;号:</label>
270
+ <div class="col-xs-8">
271
+ <input class="form-control input_view" style=""
272
+ placeholder="表封号"
273
+ v-model="userfile.f_metertitles"
274
+ :value="userfile.f_metertitles"
275
+ :readonly="mark === 1"/>
276
+ </div>
277
+ </div>
278
+ <div class="form-group row vertical-center">
279
+ <label class="col-xs-4 control-label">表&ensp;读&ensp;数:</label>
280
+ <div class="col-xs-8">
281
+ <input class="form-control input_view" style=""
282
+ type="number"
283
+ placeholder="表读数"
284
+ v-model="userfile.f_meter_base"
285
+ :value="userfile.f_meter_base"
286
+ :readonly="false"/>
287
+ </div>
288
+ </div>
289
+ <div class="form-group row vertical-center" v-show="false">
290
+ <label class="col-xs-4 control-label">初始底数:</label>
291
+ <div class="col-xs-8">
292
+ <input class="form-control input_view" style=""
293
+ type="number"
294
+ v-model="userfile.f_initial_base"
295
+ :value="userfile.f_meter_base"
296
+ placeholder="初始底数"
297
+ :readonly="mark === 1"/>
298
+ </div>
299
+ </div>
300
+ <div class="form-group row vertical-center">
301
+ <label class="col-xs-4 control-label">表&emsp;&emsp;向:</label>
302
+ <div class="col-xs-8">
303
+ <input-select
304
+ class="select select_list"
305
+ :value.sync="userfile.f_aroundmeter"
306
+ v-model="userfile.f_aroundmeter"
307
+ :options="aroundmeters"
308
+ :disable="mark === 1"
309
+ :valueSingle="true"></input-select>
310
+ </div>
311
+ </div>
312
+ <div class="form-group row vertical-center">
313
+ <label class="col-xs-4 control-label">安装位置:</label>
314
+ <div class="col-xs-8">
315
+ <input-select
316
+ class="select select_list"
317
+ :value.sync="userfile.f_position"
318
+ v-model="userfile.f_position"
319
+ :options="positions"
320
+ :disable="mark === 1"
321
+ :valueSingle="true"></input-select>
322
+ </div>
323
+ </div>
324
+ <div class="form-group row vertical-center">
325
+ <label class="col-xs-4 control-label">安&ensp;装&ensp;人:</label>
326
+ <div class="col-xs-8">
327
+ <input class="form-control input_view" style=""
328
+ v-model="userfile.f_install_person"
329
+ :value.sync="installperson(userfile.f_install_person)"
330
+ placeholder="安装人"
331
+ readonly/>
332
+ </div>
333
+ </div>
334
+ <div class="form-group row vertical-center">
335
+ <label class="col-xs-4 control-label">安装日期:</label>
336
+ <div class="col-xs-8">
337
+ <input class="form-control input_view" style=""
338
+ v-model="userfile.f_install_date"
339
+ :value.sync="installdate(userfile.f_install_date)"
340
+ placeholder="安装日期"
341
+ readonly/>
342
+ </div>
343
+ </div>
344
+ </template>
345
+ </div>
346
+ </article>
347
+ <footer slot="modal-footer" class="modal-footer">
348
+ <template v-if="mark !== 1">
349
+ <button type="button" class="btn btn-primary" @click="saveUserFile" :disabled="!$v.valid">确认</button>
350
+ </template>
351
+ </footer>
352
+ </modal>
353
+ </validator>
354
+ <validator name="x">
355
+ <modal v-if="showDeleteModel" :show.sync="showDeleteModel" v-ref:modal :large="true" :backdrop="false">
356
+ <header slot="modal-header" class="modal-header">
357
+ <button type="button" class="close" @click="closeUserFile"><span>&times;</span></button>
358
+ <h4 class="modal-title">销户原因</h4>
359
+ </header>
360
+ <article slot="modal-body" class="modal-body clearfix">
361
+ <div class="form-group row vertical-center" :class="[$v.f_cancel_cause.required ? 'has-error' : '']">
362
+ <label class="col-xs-2 control-label">销户原因:</label>
363
+ <div class="col-xs-10">
364
+ <input class="form-control input_view" style=""
365
+ placeholder="销户原因"
366
+ v-validate:f_cancel_cause = "['required']"
367
+ v-model="userinfo.f_cancel_cause"
368
+ :value.sync="userinfo.f_cancel_cause"/>
369
+ </div>
370
+ </div>
371
+ </article>
372
+ <footer slot="modal-footer" class="modal-footer">
373
+ <button type="button" class="btn btn-primary" @click="deleteUser" :disabled="!$x.valid">确认</button>
374
+ </footer>
375
+ </modal>
376
+ </validator>
377
+ </div>
378
+
379
+ </template>
380
+ <script>
381
+ import Vue from 'vue'
382
+ import {PagedList} from 'vue-client'
383
+ import {HttpResetClass} from 'vue-client'
384
+ import {isEmpty} from '../../../Util'
385
+
386
+ export default {
387
+ title: '安装明细',
388
+ props: {
389
+ selectdata: {
390
+ type: Object
391
+ },
392
+ mark: {
393
+ type: Number,
394
+ default: 0
395
+ }
396
+ },
397
+ data () {
398
+ return {
399
+ showModal: false,
400
+ model: new PagedList(`${this.$androidUtil.getProxyUrl()}/rs/sql/getApplyUserinfo`, 10),
401
+ criteriaShow: false,
402
+ areaList: [],
403
+ area: {},
404
+ modelCode: '',
405
+ userinfo: {},
406
+ userfile: {},
407
+ meterBrandList: [],
408
+ gasModelList: [],
409
+ showUserInformation: {},
410
+ scanCodeConfig: null,
411
+ gasbrandDisable: false,
412
+ showDeleteModel: false,
413
+ DeleteUserInfo: false,
414
+ }
415
+ },
416
+ ready () {
417
+ this.copydata()
418
+ this.search()
419
+ this.getMeterBrand()
420
+ this.getAreaList()
421
+ this.getScanCodeConfig()
422
+ this.showDeleteUserInfo()
423
+ },
424
+ methods: {
425
+ showDeleteUserInfo () {
426
+ if(this.selectdata.f_apply_type === '民用报建' && (this.selectdata.defname === '报建受理' || this.selectdata.defname === '现场勘察')){
427
+ this.DeleteUserInfo=true
428
+ }
429
+ },
430
+ copydata(){
431
+ if(!isEmpty(this.selectdata.f_building)){
432
+ this.$refs.cp.$refs.cri.model.f_building=this.selectdata.f_building
433
+ }
434
+ if(!isEmpty(this.selectdata.f_unit)){
435
+ this.$refs.cp.$refs.cri.model.f_unit=this.selectdata.f_unit
436
+ }
437
+ if(!isEmpty(this.selectdata.f_room)){
438
+ this.$refs.cp.$refs.cri.model.f_room= this.selectdata.f_room
439
+ }
440
+ },
441
+
442
+ async getScanCodeConfig () {
443
+ let http = new HttpResetClass()
444
+ let res = await http.load(
445
+ 'POST',
446
+ `${this.$androidUtil.getProxyUrl()}/rs/logic/getScanCodeConfig`,
447
+ null,
448
+ {resolveMsg: null, rejectMsg: '扫码配置获取失败!!!'}
449
+ )
450
+ this.scanCodeConfig = res.data
451
+ },
452
+ // 查询
453
+ search() {
454
+ this.$refs.cp.$refs.cri.search();
455
+ },
456
+ searchCondition(args){
457
+ if (this.selectdata.f_apply_type === '分户挂表') {
458
+ args.condition += ` and ui.f_userinfo_id = '${this.selectdata.f_userinfo_id}'`
459
+ }else {
460
+ args.condition += ` and ui.f_process_id = '${this.selectdata.f_process_id}'`
461
+ }
462
+ if(!isEmpty(this.model.f_building)){
463
+ args.condition += " and ui.f_building like '"+this.model.f_building+"%'"
464
+ }
465
+ if(!isEmpty(this.model.f_unit)){
466
+ args.condition+= " and ui.f_unit like '"+this.model.f_unit+"%'"
467
+ }
468
+ if(!isEmpty(this.model.f_room)){
469
+ args.condition += " and ui.f_room like '"+this.model.f_room+"%'"
470
+ }
471
+ this.model.search(args.condition, args.model);
472
+ },
473
+ clear () {
474
+ Object.keys(this.$refs.cp.$refs.cri.model).forEach((key) => {
475
+ this.$refs.cp.$refs.cri.model[key] = null
476
+ })
477
+ },
478
+ async scanCode () {
479
+ console.log('===============扫码===================')
480
+ HostApp.__this__ = this,
481
+ HostApp.scanCode({callback: "javascript:HostApp.__this__.getCode();"})
482
+ await this.getCode()
483
+ },
484
+ async getCode () {
485
+ let code = HostApp.getCode().data;
486
+ // let code = '012199312345'
487
+ console.log('===========扫码结果=============')
488
+ console.log(code)
489
+ if (isEmpty(code)){
490
+ return
491
+ }
492
+ if (!/^\d{12}$/.test(code)) {
493
+ this.$showAlert('表号不符合规则', 'danger', 3000)
494
+ return
495
+ }
496
+ // 解析厂家
497
+ let factory = null
498
+ for (const item of this.scanCodeConfig.factory) {
499
+ if (item.key === code.substring(0, 2)) {
500
+ factory = item.val
501
+ break
502
+ }
503
+ }
504
+ if (isEmpty(factory)) {
505
+ this.$showAlert('未知厂家!!!', 'danger', 3000)
506
+ return
507
+ }
508
+ console.log(factory)
509
+ // 解析运营商
510
+ let ips = null
511
+ for (const item of this.scanCodeConfig.ips) {
512
+ if (item.key === code.substring(5, 6)) {
513
+ ips = item.val
514
+ break
515
+ }
516
+ }
517
+ if (isEmpty(ips)) {
518
+ this.$showAlert('未知运营商!!!', 'danger', 3000)
519
+ return
520
+ }
521
+ console.log(ips)
522
+ //气表品牌
523
+ if (code.startsWith('01')) {
524
+ var num1 = this.getMeterBrands('金卡NB物联网表')
525
+ this.userfile.f_gasbrand_id = num1
526
+ } else if (code.startsWith('02') || code.startsWith('22')) {
527
+ var num2 = this.getMeterBrands('千嘉NB物联网表')
528
+ this.userfile.f_gasbrand_id = num2
529
+ } else if (code.startsWith('03')) {
530
+ var num2 = this.getMeterBrands('先锋NB民用物联网表')
531
+ this.userfile.f_gasbrand_id = num2
532
+ }
533
+ //气表型号
534
+ if (code.substring(4, 5) == 7 || code.substring(4, 5) == 0) {
535
+ await this.gasbrandValue('JGD1.6-NNB物联网表')
536
+ const value=this.modelCode
537
+ this.userfile.f_gasmodel_id = value
538
+ } else if (code.substring(4, 5) == 8 ||code.substring(4, 5) == 1) {
539
+
540
+ await this.gasbrandValue('JGD2.5-NNB物联网表')
541
+ const value1=this.modelCode
542
+ this.userfile.f_gasmodel_id =value1
543
+ } else if (code.substring(4, 5) == 9 ||code.substring(4, 5) == 2) {
544
+ await this.gasbrandValue('JGD4S-NNB物联网表')
545
+ const value2 =this.modelCode
546
+ this.userfile.f_gasmodel_id = value2
547
+ }
548
+ // 表向
549
+ console.log(code.substring(6, 7) % 2 === 0 ? '偶数' : '奇数')
550
+ console.log(code.substring(6, 7) % 2 === 0 ? '右表' : '左表')
551
+ this.userfile.f_aroundmeter = code.substring(6, 7) % 2 === 0 ? '右表' : '左表'
552
+ // 顺序号
553
+ console.log(code.substring(7, 12))
554
+ if (code.substring(7, 12) < this.scanCodeConfig.number.min || code.substring(7, 12) > this.scanCodeConfig.number.max) {
555
+ this.$showAlert('顺序号超出范围!!!', 'danger', 3000)
556
+ return
557
+ }
558
+ for (const item of this.meterBrandList) {
559
+ if (item.label === factory) {
560
+ // this.userfile.f_gasbrand_id = item.value
561
+ // this.gasbrandChange()
562
+ break
563
+ }
564
+ }
565
+ Vue.set(this.userfile, 'f_meternumber', code)
566
+ this.meternumberValidate()
567
+ },
568
+ async gasbrandValue (name) {
569
+ let data = {
570
+ f_gasbrand_id: this.userfile.f_gasbrand_id
571
+ }
572
+ let http = new HttpResetClass()
573
+ let res = await http.load(
574
+ 'POST',
575
+ `${this.$androidUtil.getProxyUrl()}/rs/sql/getGasModel`,
576
+ {data: data},
577
+ {resolveMsg: null, rejectMsg: '气表型号查询失败!!!'}
578
+ ).then(res => {
579
+ for (const re of res.data) {
580
+ if (re.label == name) {
581
+ this.modelCode= re.value
582
+ return re.value;
583
+ }
584
+ }
585
+ return 'null'
586
+ })
587
+ },
588
+ getMeterBrands (name) {
589
+ for (const brand of this.meterBrandList) {
590
+ if(brand.label==name){
591
+ return brand.value
592
+ }
593
+ }
594
+ return 'null'
595
+ },
596
+ async deleteUserinfo (row) {
597
+ this.userinfo = row
598
+ let res = await this.$showMessage('此操作不可撤回,您确定要删除这条记录吗?')
599
+ if (res === 'cancel') {
600
+ return
601
+ }
602
+ this.showDeleteModel = !this.showDeleteModel
603
+ },
604
+ async deleteUser () {
605
+ let res = await this.$showMessage('此操作不可撤回,您确定要删除这条记录吗?')
606
+ if (res === 'cancel') {
607
+ return
608
+ }
609
+
610
+ let data = {
611
+ login: Vue.user,
612
+ userinfo: this.userinfo,
613
+ selectdata: this.selectdata
614
+ }
615
+ res = await this.$resetpost(`${this.$androidUtil.getProxyUrl()}/rs/logic/applyDeleteUserinfo`, {data:data}, {
616
+ resolveMsg: null,
617
+ rejectMsg: '删除失败!!!'
618
+ })
619
+
620
+ this.$dispatch('breakControl', this.selectdata)
621
+ },
622
+ // 保存档案
623
+ async saveUserFile() {
624
+ if (this.selectdata.defname === '工程施工') {
625
+ this.meternumberValidate()
626
+ if( this.selectdata.f_apply_type === '民用报建'){
627
+ if (this.userfile.f_meter_base - 0 === 0 || this.userfile.f_meter_base - 0 > 1.5) {
628
+ this.$showAlert('表读数必须大于0小于或等于1.5!', 'warning', 3000)
629
+ throw '表读数必须大于0小于或等于1.5!'
630
+ }
631
+ }
632
+ if( this.selectdata.f_apply_type === '非民用报建'){
633
+ if (this.userfile.f_meter_base - 0 === 0 || this.userfile.f_meter_base - 0 >30) {
634
+ this.$showAlert('表读数必须大于0小于或等于30!', 'warning', 3000)
635
+ throw '表读数必须大于0小于或等于30!'
636
+ }
637
+ }
638
+ }
639
+ if (this.userfile.f_gasbrand_id && this.userfile.f_meternumber) {
640
+ let data = {
641
+ f_meternumber: this.userfile.f_meternumber,
642
+ f_gasbrand_id: this.userfile.f_gasbrand_id
643
+ }
644
+ if (this.userfile.f_user_id) {
645
+ data.f_user_id = this.userfile.f_user_id
646
+ }
647
+ let http = new HttpResetClass()
648
+ let res = await http.load("POST",`${this.$androidUtil.getProxyUrl()}/rs/logic/meterbrandsNumberValidate`, {data:data}, {
649
+ resolveMsg: null,
650
+ rejectMsg: '表号验证失败!!'
651
+ })
652
+ console.log(`查询结果${res.data}`)
653
+ console.log(res.data)
654
+ if (!/^\d{12}$/.test(this.userfile.f_meternumber)) {
655
+ if(!/^\d{14}$/.test(this.userfile.f_meternumber)){
656
+ this.$showAlert('表号不符合规则', 'danger', 3000)
657
+ return
658
+ }
659
+ }
660
+ if (res.data === '表号已存在' || res.data === '表号无效') {
661
+ this.userfile.f_meternumber = ''
662
+ this.$showAlert(res.data, 'danger', 3000)
663
+ throw res.data
664
+ }
665
+ }
666
+ let data = {
667
+ user: Vue.user,
668
+ userinfo: this.userinfo,
669
+ userfile: this.userfile,
670
+ selectdata: this.selectdata
671
+ }
672
+ let res = await this.$resetpost(`${this.$androidUtil.getProxyUrl()}/rs/logic/applyAddUserinfo`, {data:data}, {
673
+ resolveMsg: null,
674
+ rejectMsg: '用户档案添加失败!!!'
675
+ })
676
+ // this.$showMessage('用户档案添加成功!!!')
677
+ this.$showAlert('用户档案添加成功!!!', 'success', 3000)
678
+ // this.search() 避免分页时,点击确定后,分页返回第一页
679
+ this.showModal= false
680
+ console.log("分页数据",this.model)
681
+ this.selectdata.f_building=this.model.model.f_building
682
+ this.selectdata.f_unit=this.model.model.f_unit
683
+ this.selectdata.f_room=this.model.model.f_room
684
+ this.selectdata.pageIndex=this.model.pageIndex
685
+ this.$dispatch('breakControl', this.selectdata)
686
+ },
687
+ ifDisable() {
688
+ if ( this.selectdata.defname === '工程施工') {
689
+ this.gasbrandDisable = true
690
+ }
691
+ },
692
+ // 检查表号是否存在
693
+ async meternumberValidate() {
694
+ if (!this.userfile.f_gasbrand_id) {
695
+ this.userfile.f_meternumber = ''
696
+ this.$showAlert('请先选择气表品牌!!!', 'warning', 3000)
697
+ return
698
+ }
699
+ if (this.userfile.f_gasbrand_id && this.userfile.f_meternumber) {
700
+ let data = {
701
+ f_meternumber: this.userfile.f_meternumber,
702
+ f_gasbrand_id: this.userfile.f_gasbrand_id
703
+ }
704
+ if (this.userfile.f_user_id) {
705
+ data.f_user_id = this.userfile.f_user_id
706
+ }
707
+ let http = new HttpResetClass()
708
+ let res = await http.load("POST",`${this.$androidUtil.getProxyUrl()}/rs/logic/meterbrandsNumberValidate`, {data:data}, {
709
+ resolveMsg: null,
710
+ rejectMsg: '表号验证失败!!'
711
+ })
712
+ console.log(`查询结果${res.data}`)
713
+ console.log(res.data)
714
+ if (!/^\d{12}$/.test(this.userfile.f_meternumber)) {
715
+ if(!/^\d{14}$/.test(this.userfile.f_meternumber)){
716
+ this.$showAlert('表号不符合规则', 'danger', 3000)
717
+ return
718
+ }
719
+ }
720
+ if (res.data === '表号已存在' || res.data === '表号无效') {
721
+ this.userfile.f_meternumber = ''
722
+ this.$showAlert(res.data, 'warning', 3000)
723
+ }
724
+ }
725
+ },
726
+ // 选择气表品牌
727
+ async gasbrandChange() {
728
+ // 清空已保存的气表型号
729
+ this.userfile.f_gasmodel_id = null
730
+ if (isEmpty(this.userfile.f_gasbrand_id)) {
731
+ return
732
+ }
733
+ if (this.userfile.f_gasbrand_id === 'null') {
734
+ this.gasModelList.push({label: '无', value: 'null'})
735
+ this.userfile.f_meter_classify = 'null'
736
+ return
737
+ }
738
+ let data = {
739
+ f_gasbrand_id: this.userfile.f_gasbrand_id
740
+ }
741
+ let http = new HttpResetClass()
742
+ let res = await http.load(
743
+ 'POST',
744
+ `${this.$androidUtil.getProxyUrl()}/rs/sql/getGasModel`,
745
+ {data: data},
746
+ {resolveMsg: null, rejectMsg: '气表型号查询失败!!!'}
747
+ )
748
+
749
+ this.gasModelList = res.data
750
+
751
+ // data = {
752
+ // tablename: 't_gasbrand',
753
+ // condition: `id = '${this.userfile.f_gasbrand_id}'`
754
+ // }
755
+ // res = await http.load(
756
+ // 'POST',
757
+ // `${this.$androidUtil.getProxyUrl()}/rs/sql/applySingleTable`,
758
+ // {data: data},
759
+ // {resolveMsg: null, rejectMsg: '表具类型查询失败!!!'}
760
+ // )
761
+ // this.userfile.f_meter_classify = res.data[0].f_meter_type
762
+ this.userfile.f_meter_classify = '物联网表'
763
+ },
764
+ // 地址拼接
765
+ addressSplicing () {
766
+ let f_area = this.userinfo.f_area || ''
767
+ let f_slice_area = this.userinfo.f_slice_area || ''
768
+ let f_street = this.userinfo.f_street || ''
769
+ let f_residential_area = this.userinfo.f_residential_area || ''
770
+ let f_building = this.userinfo.f_building || ''
771
+ let f_building_suffix = f_building ? '号楼' : ''
772
+ let f_unit = this.userinfo.f_unit || ''
773
+ let f_unit_suffix = f_unit ? '单元' : ''
774
+ let f_floor = this.userinfo.f_floor || ''
775
+ let f_floor_suffix = f_floor ? '层' : ''
776
+ let f_room = this.userinfo.f_room || ''
777
+ let f_room_suffix = f_room ? '室' : ''
778
+
779
+ Vue.set(this.userinfo, 'f_address', f_area + f_slice_area + f_street + f_residential_area + f_building + f_building_suffix + f_unit + f_unit_suffix + f_floor + f_floor_suffix + f_room + f_room_suffix)
780
+ },
781
+ // 选择小区
782
+ changeArea () {
783
+ if (isEmpty(this.area)) {
784
+ return
785
+ }
786
+
787
+ this.userinfo.f_area = this.area.f_area
788
+ this.userinfo.f_slice_area = this.area.f_slice_area
789
+ this.userinfo.f_street = this.area.f_street
790
+ this.userinfo.f_residential_area = this.area.f_residential_area
791
+ this.userinfo.f_residential_area_id = this.area.id
792
+ },
793
+ // 打开安装明细
794
+ async openModal (row) {
795
+ this.ifDisable()
796
+ if (row) {
797
+ console.log('------------------修正---------------------')
798
+ this.userinfo = row
799
+
800
+ if (this.userinfo.f_residential_area_id) {
801
+ let data = {
802
+ tablename: 't_area_address',
803
+ condition: `id = '${this.userinfo.f_residential_area_id}'`
804
+ }
805
+ let http = new HttpResetClass()
806
+ let res = await http.load(
807
+ 'POST',
808
+ `${this.$androidUtil.getProxyUrl()}/rs/sql/applySingleTable`,
809
+ {data: data},
810
+ {resolveMsg: null, rejectMsg: '小区查询失败!!!'}
811
+ )
812
+
813
+ this.area = res.data[0]
814
+ }
815
+
816
+ let data = {
817
+ tablename: 't_userfiles',
818
+ condition: `f_userinfo_id = ${row.f_userinfo_id}`
819
+ }
820
+ let http = new HttpResetClass()
821
+ let res = await http.load(
822
+ 'POST',
823
+ `${this.$androidUtil.getProxyUrl()}/rs/sql/applySingleTable`,
824
+ {data: data},
825
+ {resolveMsg: null, rejectMsg: '表档案查询失败!!!'}
826
+ )
827
+ this.userfile = res.data[0]
828
+
829
+ if (this.userfile.f_gasbrand_id === 0) {
830
+ this.userfile.f_gasbrand_id = null
831
+ }
832
+ if (this.userfile.f_gasmodel_id === 0) {
833
+ this.userfile.f_gasmodel_id = null
834
+ }
835
+ if(isEmpty(this.userfile.f_position)){
836
+ this.userfile.f_position = '室内'
837
+ }
838
+ if (!isEmpty(this.userfile.f_gasbrand_id)) {
839
+ let data = {
840
+ f_gasbrand_id: this.userfile.f_gasbrand_id
841
+ }
842
+ let http = new HttpResetClass()
843
+ let res = await http.load(
844
+ 'POST',
845
+ `${this.$androidUtil.getProxyUrl()}/rs/sql/getGasModel`,
846
+ {data: data},
847
+ {resolveMsg: null, rejectMsg: '气表型号查询失败!!!'}
848
+ )
849
+
850
+ this.gasModelList = res.data
851
+ }
852
+ }
853
+ if (this.selectdata.f_residential_area_id) {
854
+ let data = {
855
+ tablename: 't_area_address',
856
+ condition: `id = '${this.selectdata.f_residential_area_id}'`
857
+ }
858
+ let http = new HttpResetClass()
859
+ let res = await http.load(
860
+ 'POST',
861
+ `${this.$androidUtil.getProxyUrl()}/rs/sql/applySingleTable`,
862
+ {data: data},
863
+ {resolveMsg: null, rejectMsg: '小区查询失败!!!'}
864
+ )
865
+
866
+ this.area = res.data[0]
867
+ this.selectArea(this.area.f_residential_area)
868
+ this.changeArea()
869
+ this.addressSplicing()
870
+ }
871
+
872
+ // 档案回填定位信息
873
+ this.userinfo.f_lng = this.selectdata.f_lng
874
+ this.userinfo.f_lat = this.selectdata.f_lat
875
+ this.userinfo.f_location_address = this.selectdata.f_order_address
876
+ if(!row){
877
+ // 档案回填用户信息
878
+ this.showUserInformation.f_user_name = this.selectdata.f_user_name
879
+ this.showUserInformation.f_user_phone = this.selectdata.f_phone
880
+ this.showUserInformation.f_credentials = this.selectdata.f_credentials
881
+ this.showUserInformation.f_idnumber = this.selectdata.f_idnumber
882
+ }
883
+ this.showModal = true
884
+ },
885
+ // 获取气表品牌
886
+ async getMeterBrand () {
887
+ let data = {
888
+ }
889
+
890
+ let http = new HttpResetClass()
891
+ let res = await http.load(
892
+ 'POST',
893
+ `${this.$androidUtil.getProxyUrl()}/rs/sql/getMeterBrand`,
894
+ {data: data},
895
+ {resolveMsg: null, rejectMsg: '气表品牌查询失败!!!'}
896
+ )
897
+
898
+ this.meterBrandList = res.data
899
+ this.meterBrandList.push({label: '无', value: 'null'})
900
+ },
901
+ // 获取小区
902
+ async getAreaList () {
903
+ let data = {
904
+ tablename: 't_area_address',
905
+ condition: `f_filiale like '%${"榆林."+Vue.user.orgs}%' and f_area_status = '启用'`
906
+ }
907
+ let http = new HttpResetClass()
908
+ let res = await http.load(
909
+ 'POST',
910
+ `${this.$androidUtil.getProxyUrl()}/rs/sql/applySingleTable`,
911
+ {data: data},
912
+ {resolveMsg: null, rejectMsg: '小区查询失败!!!'}
913
+ )
914
+ this.areaList = res.data.map(item => {
915
+ item.id = String(item.id)
916
+ return {
917
+ label: item.f_residential_area,
918
+ value: item
919
+ }
920
+ })
921
+ },
922
+ //搜索小区
923
+ selectArea (val) {
924
+ let pcdText = `and f_residential_area like '%${val}%'`
925
+ let data = {
926
+ tablename: 't_area_address',
927
+ condition: `f_filiale like '%${"榆林."+Vue.user.orgs}%' and f_area_status = '启用' ${pcdText}`
928
+ }
929
+ new HttpResetClass().load("POST", `${this.$androidUtil.getProxyUrl()}/rs/sql/applySingleTable`, {data:data}, {resolveMsg: null, rejectMsg: null}).then((res)=>{
930
+ console.log('请求发送完成!!!!!'+JSON.stringify(res))
931
+ if(res.data.length>0){
932
+ this.areaList = res.data.map(item => {
933
+ item.id = String(item.id)
934
+ return {
935
+ label: item.f_residential_area,
936
+ value: item
937
+ }
938
+ })
939
+ }
940
+ })
941
+ },
942
+ // 关闭安装明细
943
+ closeUserFile() {
944
+ this.showModal = false
945
+ this.area = {}
946
+ this.userinfo = {}
947
+ this.userfile = {}
948
+ this.gasModelList = {}
949
+ this.showDeleteModel = false
950
+ this.search()
951
+ }
952
+ },
953
+ events: {
954
+ },
955
+ computed: {
956
+
957
+ showAddress () {
958
+ return this.selectdata.f_apply_type === '民用报建' || this.selectdata.f_apply_type === '设备拆除'
959
+ },
960
+ showUserInfo () {
961
+ return (this.selectdata.f_apply_type === '民用报建' && this.selectdata.f_apply_nature !== '分户挂表') || (this.selectdata.f_apply_type === '设备拆除') },
962
+ showUserFile () {
963
+ return (this.selectdata.f_apply_type === '民用报建' && this.selectdata.f_apply_nature !== '分户挂表' && this.selectdata.defname === '工程施工') ||
964
+ this.selectdata.f_apply_type === '非民用报建' ||
965
+ this.selectdata.f_apply_type === '设备变更' ||
966
+ this.selectdata.f_apply_type === '设备拆除' ||
967
+ this.selectdata.f_apply_type === '分户挂表'
968
+ },
969
+ showInstall () {
970
+ return (this.showUserFile && (this.selectdata.defname === '工程施工' || this.selectdata.defname === '施工通气' ||
971
+ this.selectdata.defname === '点火通气')) || (this.selectdata.f_apply_type === '设备拆除')
972
+ },
973
+ // 证件类型
974
+ credentialsList() {
975
+ return this.$appdata.getParam('证件类型')
976
+ },
977
+ // 安装人
978
+ installperson() {
979
+ return function (f_install_person) {
980
+ if (isEmpty(f_install_person)) {
981
+ return Vue.user.name
982
+ }
983
+ return f_install_person
984
+ }
985
+ },
986
+ // 安装时间
987
+ installdate() {
988
+ return function (f_install_date) {
989
+ if (isEmpty(f_install_date)) {
990
+ return new Date().Format('yyyy-MM-dd HH:mm:ss')
991
+ }
992
+ return f_install_date
993
+ }
994
+ },
995
+ // 表向
996
+ aroundmeters() {
997
+ return this.$appdata.getParam('左右表')
998
+ },
999
+ // 安装位置
1000
+ positions() {
1001
+ return this.$appdata.getParam('安装位置')
1002
+ }
1003
+ },
1004
+ watch: {
1005
+ }
1006
+ }
1007
+ </script>
1008
+ <style scoped>
1009
+ .panel {
1010
+ margin-bottom: 8px;
1011
+ }
1012
+ .panel-self{
1013
+ border-radius: 10px;
1014
+ border:1px solid #499EDF;
1015
+ padding: 8px;
1016
+ }
1017
+ .button_shrink_top {
1018
+ width: 34px;
1019
+ height: 34px;
1020
+ border: solid 1px #6aa6e2;
1021
+ background-size: 100%;
1022
+ background-image: url("../../../../../static/newStyle/stretch_top.png")
1023
+ }
1024
+
1025
+ .button_shrink_bottom {
1026
+ width: 34px;
1027
+ height: 34px;
1028
+ border: solid 1px #6aa6e2;
1029
+ background-size: 100%;
1030
+ background-image: url("../../../../../static/newStyle/stretch_bottom.png")
1031
+ }
1032
+ </style>