apply-clients 7.1.36-yuchuan-51 → 7.1.36-yuchuan-53

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 (67) hide show
  1. package/android.html +27 -27
  2. package/package.json +1 -1
  3. package/src/apply.js +163 -163
  4. package/src/applyAndroid.js +98 -98
  5. package/src/components/android/AppSign.vue +232 -232
  6. package/src/components/android/Ignition/VentilationIgnition.vue +441 -408
  7. package/src/components/android/Ignition/VentilationIgnitionHandle.vue +472 -472
  8. package/src/components/android/Process/AppExplorationUser.vue +454 -454
  9. package/src/components/android/Process/AppServiceControl.vue +1434 -1434
  10. package/src/components/android/Process/Processes/AppInstallationDetails.vue +1026 -1026
  11. package/src/components/android/Process/Processes/newAppInstallationDetails.vue +671 -671
  12. package/src/components/android/SealBind.vue +390 -376
  13. package/src/components/android/SealManage.vue +278 -278
  14. package/src/components/android/Sign/AppSignTask.vue +183 -183
  15. package/src/components/android/Supervisory/AppProcessSupervisory.vue +344 -344
  16. package/src/components/android/Task/Build/BuildTsak.vue +117 -117
  17. package/src/components/android/Task/BuildIgnition/BuildIgnition.vue +114 -114
  18. package/src/components/android/Task/GuanXianJianShe/AppExplorationGuanXian.vue +317 -317
  19. package/src/components/android/Task/RepairFromSend/RepairFrom.vue +124 -124
  20. package/src/components/android/Task/RepairFromSend/RepairSend.vue +124 -124
  21. package/src/components/android/Task/ShiGongXinXi/AppShowBuildUser.vue +431 -431
  22. package/src/components/android/Task/Survey/SurveyTsak.vue +141 -141
  23. package/src/components/android/Task/yiban/AppShowDone.vue +442 -442
  24. package/src/components/android/newPackage/customerServiceManager.vue +218 -218
  25. package/src/components/android/newPackage/projectPrice.vue +218 -218
  26. package/src/components/product/ApplyCharge/ApplyChargeList.vue +1101 -1101
  27. package/src/components/product/ApplyGuanXian/GuanXianExplorationSelect.vue +325 -325
  28. package/src/components/product/ApplyGuanXian/GuanXianExplorationUser.vue +142 -142
  29. package/src/components/product/ApplyGuanXian/GuanXianSupervisoryhCart.vue +119 -119
  30. package/src/components/product/ApplyMap/AppMapLocation.vue +829 -829
  31. package/src/components/product/ApplyMap/ApplyMapInputSearch.vue +335 -335
  32. package/src/components/product/ChongZheng/ApplyChongZhengList.vue +417 -415
  33. package/src/components/product/Function/InstallFunction.vue +132 -132
  34. package/src/components/product/Function/InstallInfoSelect.vue +374 -374
  35. package/src/components/product/Ignition/IgnitionDispatch.vue +90 -90
  36. package/src/components/product/Ignition/IgnitionListManage.vue +604 -604
  37. package/src/components/product/Ignition/IgnitionRecord.vue +380 -380
  38. package/src/components/product/InsuranceApply/InsuranceReport.vue +188 -188
  39. package/src/components/product/List/OldShowDevices.vue +1 -2
  40. package/src/components/product/List/ShowAllActivity.vue +541 -541
  41. package/src/components/product/List/ShowDevices.vue +279 -279
  42. package/src/components/product/Print/BuildOrder/buildOrderList.vue +446 -446
  43. package/src/components/product/Process/ExplorationSelect.vue +593 -593
  44. package/src/components/product/Process/ExplorationUser.vue +154 -154
  45. package/src/components/product/Process/New1ExplorationUser.vue +196 -196
  46. package/src/components/product/Process/NewExplorationSelect.vue +587 -587
  47. package/src/components/product/Process/NewExplorationUser.vue +216 -216
  48. package/src/components/product/Process/Processes/Print/printCharge.vue +250 -250
  49. package/src/components/product/Process/Processes/Print/printGaiXianCharge.vue +244 -244
  50. package/src/components/product/Process/Processes/chargeManagement.vue +713 -713
  51. package/src/components/product/Process/Processes/selectApply.vue +250 -250
  52. package/src/components/product/Process/Processes/selectChaiChuUserinfo.vue +230 -230
  53. package/src/components/product/Process/Processes/selectOldUserinfo.vue +241 -241
  54. package/src/components/product/Process/Processes/selectUserinfo.vue +234 -234
  55. package/src/components/product/Process/Service/ServiceControl.vue +2223 -2223
  56. package/src/components/product/Process/Service/ShowBackReason.vue +33 -33
  57. package/src/components/product/ServiceView.vue +644 -644
  58. package/src/components/product/Stop/StopApplyList.vue +224 -224
  59. package/src/components/product/Supervisory/NewSupervisoryhCart.vue +175 -175
  60. package/src/components/product/Supervisory/Service/SupervisoryServiceControl.vue +593 -593
  61. package/src/components/product/Supervisory/SupervisoryControl.vue +114 -114
  62. package/src/components/product/Supervisory/SupervisoryList.vue +586 -580
  63. package/src/components/product/Supervisory/SupervisoryhCart.vue +120 -120
  64. package/src/components/product/Supervisory/YiBanSupervisoryControl.vue +111 -111
  65. package/src/components/product/Supervisory/YiBanSupervisoryList.vue +539 -539
  66. package/src/components/product/VueUtils/ApplyUpload.vue +303 -303
  67. package/src/main.js +27 -27
@@ -1,1026 +1,1026 @@
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 (!/^\d{12}$/.test(code)) {
490
- this.$showAlert('表号不符合规则', 'danger', 3000)
491
- return
492
- }
493
- // 解析厂家
494
- let factory = null
495
- for (const item of this.scanCodeConfig.factory) {
496
- if (item.key === code.substring(0, 2)) {
497
- factory = item.val
498
- break
499
- }
500
- }
501
- if (isEmpty(factory)) {
502
- this.$showAlert('未知厂家!!!', 'danger', 3000)
503
- return
504
- }
505
- console.log(factory)
506
- // 解析运营商
507
- let ips = null
508
- for (const item of this.scanCodeConfig.ips) {
509
- if (item.key === code.substring(5, 6)) {
510
- ips = item.val
511
- break
512
- }
513
- }
514
- if (isEmpty(ips)) {
515
- this.$showAlert('未知运营商!!!', 'danger', 3000)
516
- return
517
- }
518
- console.log(ips)
519
- //气表品牌
520
- if (code.startsWith('01')) {
521
- var num1 = this.getMeterBrands('金卡NB物联网表')
522
- this.userfile.f_gasbrand_id = num1
523
- } else if (code.startsWith('02') || code.startsWith('22')) {
524
- var num2 = this.getMeterBrands('千嘉NB物联网表')
525
- this.userfile.f_gasbrand_id = num2
526
- }
527
- //气表型号
528
- if (code.substring(4, 5) == 7) {
529
- await this.gasbrandValue('JGD1.6-NNB物联网表')
530
- const value=this.modelCode
531
- this.userfile.f_gasmodel_id = value
532
- } else if (code.substring(4, 5) == 8) {
533
-
534
- await this.gasbrandValue('JGD2.5-NNB物联网表')
535
- const value1=this.modelCode
536
- this.userfile.f_gasmodel_id =value1
537
- } else if (code.substring(4, 5) == 9) {
538
- await this.gasbrandValue('JGD4S-NNB物联网表')
539
- const value2 =this.modelCode
540
- this.userfile.f_gasmodel_id = value2
541
- }
542
- // 表向
543
- console.log(code.substring(6, 7) % 2 === 0 ? '偶数' : '奇数')
544
- console.log(code.substring(6, 7) % 2 === 0 ? '右表' : '左表')
545
- this.userfile.f_aroundmeter = code.substring(6, 7) % 2 === 0 ? '右表' : '左表'
546
- // 顺序号
547
- console.log(code.substring(7, 12))
548
- if (code.substring(7, 12) < this.scanCodeConfig.number.min || code.substring(7, 12) > this.scanCodeConfig.number.max) {
549
- this.$showAlert('顺序号超出范围!!!', 'danger', 3000)
550
- return
551
- }
552
- for (const item of this.meterBrandList) {
553
- if (item.label === factory) {
554
- // this.userfile.f_gasbrand_id = item.value
555
- // this.gasbrandChange()
556
- break
557
- }
558
- }
559
- Vue.set(this.userfile, 'f_meternumber', code)
560
- this.meternumberValidate()
561
- },
562
- async gasbrandValue (name) {
563
- let data = {
564
- f_gasbrand_id: this.userfile.f_gasbrand_id
565
- }
566
- let http = new HttpResetClass()
567
- let res = await http.load(
568
- 'POST',
569
- `${this.$androidUtil.getProxyUrl()}/rs/sql/getGasModel`,
570
- {data: data},
571
- {resolveMsg: null, rejectMsg: '气表型号查询失败!!!'}
572
- ).then(res => {
573
- for (const re of res.data) {
574
- if (re.label == name) {
575
- this.modelCode= re.value
576
- return re.value;
577
- }
578
- }
579
- return 'null'
580
- })
581
- },
582
- getMeterBrands (name) {
583
- for (const brand of this.meterBrandList) {
584
- if(brand.label==name){
585
- return brand.value
586
- }
587
- }
588
- return 'null'
589
- },
590
- async deleteUserinfo (row) {
591
- this.userinfo = row
592
- let res = await this.$showMessage('此操作不可撤回,您确定要删除这条记录吗?')
593
- if (res === 'cancel') {
594
- return
595
- }
596
- this.showDeleteModel = !this.showDeleteModel
597
- },
598
- async deleteUser () {
599
- let res = await this.$showMessage('此操作不可撤回,您确定要删除这条记录吗?')
600
- if (res === 'cancel') {
601
- return
602
- }
603
-
604
- let data = {
605
- login: Vue.user,
606
- userinfo: this.userinfo,
607
- selectdata: this.selectdata
608
- }
609
- res = await this.$resetpost(`${this.$androidUtil.getProxyUrl()}/rs/logic/applyDeleteUserinfo`, {data:data}, {
610
- resolveMsg: null,
611
- rejectMsg: '删除失败!!!'
612
- })
613
-
614
- this.$dispatch('breakControl', this.selectdata)
615
- },
616
- // 保存档案
617
- async saveUserFile() {
618
- if (this.selectdata.defname === '工程施工') {
619
- this.meternumberValidate()
620
- if( this.selectdata.f_apply_type === '民用报建'){
621
- if (this.userfile.f_meter_base - 0 === 0 || this.userfile.f_meter_base - 0 > 1.5) {
622
- this.$showAlert('表读数必须大于0小于或等于1.5!', 'warning', 3000)
623
- throw '表读数必须大于0小于或等于1.5!'
624
- }
625
- }
626
- if( this.selectdata.f_apply_type === '非民用报建'){
627
- if (this.userfile.f_meter_base - 0 === 0 || this.userfile.f_meter_base - 0 >30) {
628
- this.$showAlert('表读数必须大于0小于或等于30!', 'warning', 3000)
629
- throw '表读数必须大于0小于或等于30!'
630
- }
631
- }
632
- }
633
- if (this.userfile.f_gasbrand_id && this.userfile.f_meternumber) {
634
- let data = {
635
- f_meternumber: this.userfile.f_meternumber,
636
- f_gasbrand_id: this.userfile.f_gasbrand_id
637
- }
638
- if (this.userfile.f_user_id) {
639
- data.f_user_id = this.userfile.f_user_id
640
- }
641
- let http = new HttpResetClass()
642
- let res = await http.load("POST",`${this.$androidUtil.getProxyUrl()}/rs/logic/meterbrandsNumberValidate`, {data:data}, {
643
- resolveMsg: null,
644
- rejectMsg: '表号验证失败!!'
645
- })
646
- console.log(`查询结果${res.data}`)
647
- console.log(res.data)
648
- if (!/^\d{12}$/.test(this.userfile.f_meternumber)) {
649
- if(!/^\d{14}$/.test(this.userfile.f_meternumber)){
650
- this.$showAlert('表号不符合规则', 'danger', 3000)
651
- return
652
- }
653
- }
654
- if (res.data === '表号已存在' || res.data === '表号无效') {
655
- this.userfile.f_meternumber = ''
656
- this.$showAlert(res.data, 'warning', 3000)
657
- return
658
- }
659
- }
660
- let data = {
661
- user: Vue.user,
662
- userinfo: this.userinfo,
663
- userfile: this.userfile,
664
- selectdata: this.selectdata
665
- }
666
- let res = await this.$resetpost(`${this.$androidUtil.getProxyUrl()}/rs/logic/applyAddUserinfo`, {data:data}, {
667
- resolveMsg: null,
668
- rejectMsg: '用户档案添加失败!!!'
669
- })
670
- // this.$showMessage('用户档案添加成功!!!')
671
- this.$showAlert('用户档案添加成功!!!', 'success', 3000)
672
- // this.search() 避免分页时,点击确定后,分页返回第一页
673
- this.showModal= false
674
- console.log("分页数据",this.model)
675
- this.selectdata.f_building=this.model.model.f_building
676
- this.selectdata.f_unit=this.model.model.f_unit
677
- this.selectdata.f_room=this.model.model.f_room
678
- this.selectdata.pageIndex=this.model.pageIndex
679
- this.$dispatch('breakControl', this.selectdata)
680
- },
681
- ifDisable() {
682
- if ( this.selectdata.defname === '工程施工') {
683
- this.gasbrandDisable = true
684
- }
685
- },
686
- // 检查表号是否存在
687
- async meternumberValidate() {
688
- if (!this.userfile.f_gasbrand_id) {
689
- this.userfile.f_meternumber = ''
690
- this.$showAlert('请先选择气表品牌!!!', 'warning', 3000)
691
- return
692
- }
693
- if (this.userfile.f_gasbrand_id && this.userfile.f_meternumber) {
694
- let data = {
695
- f_meternumber: this.userfile.f_meternumber,
696
- f_gasbrand_id: this.userfile.f_gasbrand_id
697
- }
698
- if (this.userfile.f_user_id) {
699
- data.f_user_id = this.userfile.f_user_id
700
- }
701
- let http = new HttpResetClass()
702
- let res = await http.load("POST",`${this.$androidUtil.getProxyUrl()}/rs/logic/meterbrandsNumberValidate`, {data:data}, {
703
- resolveMsg: null,
704
- rejectMsg: '表号验证失败!!'
705
- })
706
- console.log(`查询结果${res.data}`)
707
- console.log(res.data)
708
- if (!/^\d{12}$/.test(this.userfile.f_meternumber)) {
709
- if(!/^\d{14}$/.test(this.userfile.f_meternumber)){
710
- this.$showAlert('表号不符合规则', 'danger', 3000)
711
- return
712
- }
713
- }
714
- if (res.data === '表号已存在' || res.data === '表号无效') {
715
- this.userfile.f_meternumber = ''
716
- this.$showAlert(res.data, 'warning', 3000)
717
- }
718
- }
719
- },
720
- // 选择气表品牌
721
- async gasbrandChange() {
722
- // 清空已保存的气表型号
723
- this.userfile.f_gasmodel_id = null
724
- if (isEmpty(this.userfile.f_gasbrand_id)) {
725
- return
726
- }
727
- if (this.userfile.f_gasbrand_id === 'null') {
728
- this.gasModelList.push({label: '无', value: 'null'})
729
- this.userfile.f_meter_classify = 'null'
730
- return
731
- }
732
- let data = {
733
- f_gasbrand_id: this.userfile.f_gasbrand_id
734
- }
735
- let http = new HttpResetClass()
736
- let res = await http.load(
737
- 'POST',
738
- `${this.$androidUtil.getProxyUrl()}/rs/sql/getGasModel`,
739
- {data: data},
740
- {resolveMsg: null, rejectMsg: '气表型号查询失败!!!'}
741
- )
742
-
743
- this.gasModelList = res.data
744
-
745
- // data = {
746
- // tablename: 't_gasbrand',
747
- // condition: `id = '${this.userfile.f_gasbrand_id}'`
748
- // }
749
- // res = await http.load(
750
- // 'POST',
751
- // `${this.$androidUtil.getProxyUrl()}/rs/sql/applySingleTable`,
752
- // {data: data},
753
- // {resolveMsg: null, rejectMsg: '表具类型查询失败!!!'}
754
- // )
755
- // this.userfile.f_meter_classify = res.data[0].f_meter_type
756
- this.userfile.f_meter_classify = '物联网表'
757
- },
758
- // 地址拼接
759
- addressSplicing () {
760
- let f_area = this.userinfo.f_area || ''
761
- let f_slice_area = this.userinfo.f_slice_area || ''
762
- let f_street = this.userinfo.f_street || ''
763
- let f_residential_area = this.userinfo.f_residential_area || ''
764
- let f_building = this.userinfo.f_building || ''
765
- let f_building_suffix = f_building ? '号楼' : ''
766
- let f_unit = this.userinfo.f_unit || ''
767
- let f_unit_suffix = f_unit ? '单元' : ''
768
- let f_floor = this.userinfo.f_floor || ''
769
- let f_floor_suffix = f_floor ? '层' : ''
770
- let f_room = this.userinfo.f_room || ''
771
- let f_room_suffix = f_room ? '室' : ''
772
-
773
- 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)
774
- },
775
- // 选择小区
776
- changeArea () {
777
- if (isEmpty(this.area)) {
778
- return
779
- }
780
-
781
- this.userinfo.f_area = this.area.f_area
782
- this.userinfo.f_slice_area = this.area.f_slice_area
783
- this.userinfo.f_street = this.area.f_street
784
- this.userinfo.f_residential_area = this.area.f_residential_area
785
- this.userinfo.f_residential_area_id = this.area.id
786
- },
787
- // 打开安装明细
788
- async openModal (row) {
789
- this.ifDisable()
790
- if (row) {
791
- console.log('------------------修正---------------------')
792
- this.userinfo = row
793
-
794
- if (this.userinfo.f_residential_area_id) {
795
- let data = {
796
- tablename: 't_area_address',
797
- condition: `id = '${this.userinfo.f_residential_area_id}'`
798
- }
799
- let http = new HttpResetClass()
800
- let res = await http.load(
801
- 'POST',
802
- `${this.$androidUtil.getProxyUrl()}/rs/sql/applySingleTable`,
803
- {data: data},
804
- {resolveMsg: null, rejectMsg: '小区查询失败!!!'}
805
- )
806
-
807
- this.area = res.data[0]
808
- }
809
-
810
- let data = {
811
- tablename: 't_userfiles',
812
- condition: `f_userinfo_id = ${row.f_userinfo_id}`
813
- }
814
- let http = new HttpResetClass()
815
- let res = await http.load(
816
- 'POST',
817
- `${this.$androidUtil.getProxyUrl()}/rs/sql/applySingleTable`,
818
- {data: data},
819
- {resolveMsg: null, rejectMsg: '表档案查询失败!!!'}
820
- )
821
- this.userfile = res.data[0]
822
-
823
- if (this.userfile.f_gasbrand_id === 0) {
824
- this.userfile.f_gasbrand_id = null
825
- }
826
- if (this.userfile.f_gasmodel_id === 0) {
827
- this.userfile.f_gasmodel_id = null
828
- }
829
- if(isEmpty(this.userfile.f_position)){
830
- this.userfile.f_position = '室内'
831
- }
832
- if (!isEmpty(this.userfile.f_gasbrand_id)) {
833
- let data = {
834
- f_gasbrand_id: this.userfile.f_gasbrand_id
835
- }
836
- let http = new HttpResetClass()
837
- let res = await http.load(
838
- 'POST',
839
- `${this.$androidUtil.getProxyUrl()}/rs/sql/getGasModel`,
840
- {data: data},
841
- {resolveMsg: null, rejectMsg: '气表型号查询失败!!!'}
842
- )
843
-
844
- this.gasModelList = res.data
845
- }
846
- }
847
- if (this.selectdata.f_residential_area_id) {
848
- let data = {
849
- tablename: 't_area_address',
850
- condition: `id = '${this.selectdata.f_residential_area_id}'`
851
- }
852
- let http = new HttpResetClass()
853
- let res = await http.load(
854
- 'POST',
855
- `${this.$androidUtil.getProxyUrl()}/rs/sql/applySingleTable`,
856
- {data: data},
857
- {resolveMsg: null, rejectMsg: '小区查询失败!!!'}
858
- )
859
-
860
- this.area = res.data[0]
861
- this.selectArea(this.area.f_residential_area)
862
- this.changeArea()
863
- this.addressSplicing()
864
- }
865
-
866
- // 档案回填定位信息
867
- this.userinfo.f_lng = this.selectdata.f_lng
868
- this.userinfo.f_lat = this.selectdata.f_lat
869
- this.userinfo.f_location_address = this.selectdata.f_order_address
870
- if(!row){
871
- // 档案回填用户信息
872
- this.showUserInformation.f_user_name = this.selectdata.f_user_name
873
- this.showUserInformation.f_user_phone = this.selectdata.f_phone
874
- this.showUserInformation.f_credentials = this.selectdata.f_credentials
875
- this.showUserInformation.f_idnumber = this.selectdata.f_idnumber
876
- }
877
- this.showModal = true
878
- },
879
- // 获取气表品牌
880
- async getMeterBrand () {
881
- let data = {
882
- }
883
-
884
- let http = new HttpResetClass()
885
- let res = await http.load(
886
- 'POST',
887
- `${this.$androidUtil.getProxyUrl()}/rs/sql/getMeterBrand`,
888
- {data: data},
889
- {resolveMsg: null, rejectMsg: '气表品牌查询失败!!!'}
890
- )
891
-
892
- this.meterBrandList = res.data
893
- this.meterBrandList.push({label: '无', value: 'null'})
894
- },
895
- // 获取小区
896
- async getAreaList () {
897
- let data = {
898
- tablename: 't_area_address',
899
- condition: `f_filiale like '%${"榆林."+Vue.user.orgs}%' and f_area_status = '启用'`
900
- }
901
- let http = new HttpResetClass()
902
- let res = await http.load(
903
- 'POST',
904
- `${this.$androidUtil.getProxyUrl()}/rs/sql/applySingleTable`,
905
- {data: data},
906
- {resolveMsg: null, rejectMsg: '小区查询失败!!!'}
907
- )
908
- this.areaList = res.data.map(item => {
909
- item.id = String(item.id)
910
- return {
911
- label: item.f_residential_area,
912
- value: item
913
- }
914
- })
915
- },
916
- //搜索小区
917
- selectArea (val) {
918
- let pcdText = `and f_residential_area like '%${val}%'`
919
- let data = {
920
- tablename: 't_area_address',
921
- condition: `f_filiale like '%${"榆林."+Vue.user.orgs}%' and f_area_status = '启用' ${pcdText}`
922
- }
923
- new HttpResetClass().load("POST", `${this.$androidUtil.getProxyUrl()}/rs/sql/applySingleTable`, {data:data}, {resolveMsg: null, rejectMsg: null}).then((res)=>{
924
- console.log('请求发送完成!!!!!'+JSON.stringify(res))
925
- if(res.data.length>0){
926
- this.areaList = res.data.map(item => {
927
- item.id = String(item.id)
928
- return {
929
- label: item.f_residential_area,
930
- value: item
931
- }
932
- })
933
- }
934
- })
935
- },
936
- // 关闭安装明细
937
- closeUserFile() {
938
- this.showModal = false
939
- this.area = {}
940
- this.userinfo = {}
941
- this.userfile = {}
942
- this.gasModelList = {}
943
- this.showDeleteModel = false
944
- this.search()
945
- }
946
- },
947
- events: {
948
- },
949
- computed: {
950
-
951
- showAddress () {
952
- return this.selectdata.f_apply_type === '民用报建' || this.selectdata.f_apply_type === '设备拆除'
953
- },
954
- showUserInfo () {
955
- return (this.selectdata.f_apply_type === '民用报建' && this.selectdata.f_apply_nature !== '分户挂表') || (this.selectdata.f_apply_type === '设备拆除') },
956
- showUserFile () {
957
- return (this.selectdata.f_apply_type === '民用报建' && this.selectdata.f_apply_nature !== '分户挂表' && this.selectdata.defname === '工程施工') ||
958
- this.selectdata.f_apply_type === '非民用报建' ||
959
- this.selectdata.f_apply_type === '设备变更' ||
960
- this.selectdata.f_apply_type === '设备拆除' ||
961
- this.selectdata.f_apply_type === '分户挂表'
962
- },
963
- showInstall () {
964
- return (this.showUserFile && (this.selectdata.defname === '工程施工' || this.selectdata.defname === '施工通气' ||
965
- this.selectdata.defname === '点火通气')) || (this.selectdata.f_apply_type === '设备拆除')
966
- },
967
- // 证件类型
968
- credentialsList() {
969
- return this.$appdata.getParam('证件类型')
970
- },
971
- // 安装人
972
- installperson() {
973
- return function (f_install_person) {
974
- if (isEmpty(f_install_person)) {
975
- return Vue.user.name
976
- }
977
- return f_install_person
978
- }
979
- },
980
- // 安装时间
981
- installdate() {
982
- return function (f_install_date) {
983
- if (isEmpty(f_install_date)) {
984
- return new Date().Format('yyyy-MM-dd HH:mm:ss')
985
- }
986
- return f_install_date
987
- }
988
- },
989
- // 表向
990
- aroundmeters() {
991
- return this.$appdata.getParam('左右表')
992
- },
993
- // 安装位置
994
- positions() {
995
- return this.$appdata.getParam('安装位置')
996
- }
997
- },
998
- watch: {
999
- }
1000
- }
1001
- </script>
1002
- <style scoped>
1003
- .panel {
1004
- margin-bottom: 8px;
1005
- }
1006
- .panel-self{
1007
- border-radius: 10px;
1008
- border:1px solid #499EDF;
1009
- padding: 8px;
1010
- }
1011
- .button_shrink_top {
1012
- width: 34px;
1013
- height: 34px;
1014
- border: solid 1px #6aa6e2;
1015
- background-size: 100%;
1016
- background-image: url("../../../../../static/newStyle/stretch_top.png")
1017
- }
1018
-
1019
- .button_shrink_bottom {
1020
- width: 34px;
1021
- height: 34px;
1022
- border: solid 1px #6aa6e2;
1023
- background-size: 100%;
1024
- background-image: url("../../../../../static/newStyle/stretch_bottom.png")
1025
- }
1026
- </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 (!/^\d{12}$/.test(code)) {
490
+ this.$showAlert('表号不符合规则', 'danger', 3000)
491
+ return
492
+ }
493
+ // 解析厂家
494
+ let factory = null
495
+ for (const item of this.scanCodeConfig.factory) {
496
+ if (item.key === code.substring(0, 2)) {
497
+ factory = item.val
498
+ break
499
+ }
500
+ }
501
+ if (isEmpty(factory)) {
502
+ this.$showAlert('未知厂家!!!', 'danger', 3000)
503
+ return
504
+ }
505
+ console.log(factory)
506
+ // 解析运营商
507
+ let ips = null
508
+ for (const item of this.scanCodeConfig.ips) {
509
+ if (item.key === code.substring(5, 6)) {
510
+ ips = item.val
511
+ break
512
+ }
513
+ }
514
+ if (isEmpty(ips)) {
515
+ this.$showAlert('未知运营商!!!', 'danger', 3000)
516
+ return
517
+ }
518
+ console.log(ips)
519
+ //气表品牌
520
+ if (code.startsWith('01')) {
521
+ var num1 = this.getMeterBrands('金卡NB物联网表')
522
+ this.userfile.f_gasbrand_id = num1
523
+ } else if (code.startsWith('02') || code.startsWith('22')) {
524
+ var num2 = this.getMeterBrands('千嘉NB物联网表')
525
+ this.userfile.f_gasbrand_id = num2
526
+ }
527
+ //气表型号
528
+ if (code.substring(4, 5) == 7) {
529
+ await this.gasbrandValue('JGD1.6-NNB物联网表')
530
+ const value=this.modelCode
531
+ this.userfile.f_gasmodel_id = value
532
+ } else if (code.substring(4, 5) == 8) {
533
+
534
+ await this.gasbrandValue('JGD2.5-NNB物联网表')
535
+ const value1=this.modelCode
536
+ this.userfile.f_gasmodel_id =value1
537
+ } else if (code.substring(4, 5) == 9) {
538
+ await this.gasbrandValue('JGD4S-NNB物联网表')
539
+ const value2 =this.modelCode
540
+ this.userfile.f_gasmodel_id = value2
541
+ }
542
+ // 表向
543
+ console.log(code.substring(6, 7) % 2 === 0 ? '偶数' : '奇数')
544
+ console.log(code.substring(6, 7) % 2 === 0 ? '右表' : '左表')
545
+ this.userfile.f_aroundmeter = code.substring(6, 7) % 2 === 0 ? '右表' : '左表'
546
+ // 顺序号
547
+ console.log(code.substring(7, 12))
548
+ if (code.substring(7, 12) < this.scanCodeConfig.number.min || code.substring(7, 12) > this.scanCodeConfig.number.max) {
549
+ this.$showAlert('顺序号超出范围!!!', 'danger', 3000)
550
+ return
551
+ }
552
+ for (const item of this.meterBrandList) {
553
+ if (item.label === factory) {
554
+ // this.userfile.f_gasbrand_id = item.value
555
+ // this.gasbrandChange()
556
+ break
557
+ }
558
+ }
559
+ Vue.set(this.userfile, 'f_meternumber', code)
560
+ this.meternumberValidate()
561
+ },
562
+ async gasbrandValue (name) {
563
+ let data = {
564
+ f_gasbrand_id: this.userfile.f_gasbrand_id
565
+ }
566
+ let http = new HttpResetClass()
567
+ let res = await http.load(
568
+ 'POST',
569
+ `${this.$androidUtil.getProxyUrl()}/rs/sql/getGasModel`,
570
+ {data: data},
571
+ {resolveMsg: null, rejectMsg: '气表型号查询失败!!!'}
572
+ ).then(res => {
573
+ for (const re of res.data) {
574
+ if (re.label == name) {
575
+ this.modelCode= re.value
576
+ return re.value;
577
+ }
578
+ }
579
+ return 'null'
580
+ })
581
+ },
582
+ getMeterBrands (name) {
583
+ for (const brand of this.meterBrandList) {
584
+ if(brand.label==name){
585
+ return brand.value
586
+ }
587
+ }
588
+ return 'null'
589
+ },
590
+ async deleteUserinfo (row) {
591
+ this.userinfo = row
592
+ let res = await this.$showMessage('此操作不可撤回,您确定要删除这条记录吗?')
593
+ if (res === 'cancel') {
594
+ return
595
+ }
596
+ this.showDeleteModel = !this.showDeleteModel
597
+ },
598
+ async deleteUser () {
599
+ let res = await this.$showMessage('此操作不可撤回,您确定要删除这条记录吗?')
600
+ if (res === 'cancel') {
601
+ return
602
+ }
603
+
604
+ let data = {
605
+ login: Vue.user,
606
+ userinfo: this.userinfo,
607
+ selectdata: this.selectdata
608
+ }
609
+ res = await this.$resetpost(`${this.$androidUtil.getProxyUrl()}/rs/logic/applyDeleteUserinfo`, {data:data}, {
610
+ resolveMsg: null,
611
+ rejectMsg: '删除失败!!!'
612
+ })
613
+
614
+ this.$dispatch('breakControl', this.selectdata)
615
+ },
616
+ // 保存档案
617
+ async saveUserFile() {
618
+ if (this.selectdata.defname === '工程施工') {
619
+ this.meternumberValidate()
620
+ if( this.selectdata.f_apply_type === '民用报建'){
621
+ if (this.userfile.f_meter_base - 0 === 0 || this.userfile.f_meter_base - 0 > 1.5) {
622
+ this.$showAlert('表读数必须大于0小于或等于1.5!', 'warning', 3000)
623
+ throw '表读数必须大于0小于或等于1.5!'
624
+ }
625
+ }
626
+ if( this.selectdata.f_apply_type === '非民用报建'){
627
+ if (this.userfile.f_meter_base - 0 === 0 || this.userfile.f_meter_base - 0 >30) {
628
+ this.$showAlert('表读数必须大于0小于或等于30!', 'warning', 3000)
629
+ throw '表读数必须大于0小于或等于30!'
630
+ }
631
+ }
632
+ }
633
+ if (this.userfile.f_gasbrand_id && this.userfile.f_meternumber) {
634
+ let data = {
635
+ f_meternumber: this.userfile.f_meternumber,
636
+ f_gasbrand_id: this.userfile.f_gasbrand_id
637
+ }
638
+ if (this.userfile.f_user_id) {
639
+ data.f_user_id = this.userfile.f_user_id
640
+ }
641
+ let http = new HttpResetClass()
642
+ let res = await http.load("POST",`${this.$androidUtil.getProxyUrl()}/rs/logic/meterbrandsNumberValidate`, {data:data}, {
643
+ resolveMsg: null,
644
+ rejectMsg: '表号验证失败!!'
645
+ })
646
+ console.log(`查询结果${res.data}`)
647
+ console.log(res.data)
648
+ if (!/^\d{12}$/.test(this.userfile.f_meternumber)) {
649
+ if(!/^\d{14}$/.test(this.userfile.f_meternumber)){
650
+ this.$showAlert('表号不符合规则', 'danger', 3000)
651
+ return
652
+ }
653
+ }
654
+ if (res.data === '表号已存在' || res.data === '表号无效') {
655
+ this.userfile.f_meternumber = ''
656
+ this.$showAlert(res.data, 'warning', 3000)
657
+ return
658
+ }
659
+ }
660
+ let data = {
661
+ user: Vue.user,
662
+ userinfo: this.userinfo,
663
+ userfile: this.userfile,
664
+ selectdata: this.selectdata
665
+ }
666
+ let res = await this.$resetpost(`${this.$androidUtil.getProxyUrl()}/rs/logic/applyAddUserinfo`, {data:data}, {
667
+ resolveMsg: null,
668
+ rejectMsg: '用户档案添加失败!!!'
669
+ })
670
+ // this.$showMessage('用户档案添加成功!!!')
671
+ this.$showAlert('用户档案添加成功!!!', 'success', 3000)
672
+ // this.search() 避免分页时,点击确定后,分页返回第一页
673
+ this.showModal= false
674
+ console.log("分页数据",this.model)
675
+ this.selectdata.f_building=this.model.model.f_building
676
+ this.selectdata.f_unit=this.model.model.f_unit
677
+ this.selectdata.f_room=this.model.model.f_room
678
+ this.selectdata.pageIndex=this.model.pageIndex
679
+ this.$dispatch('breakControl', this.selectdata)
680
+ },
681
+ ifDisable() {
682
+ if ( this.selectdata.defname === '工程施工') {
683
+ this.gasbrandDisable = true
684
+ }
685
+ },
686
+ // 检查表号是否存在
687
+ async meternumberValidate() {
688
+ if (!this.userfile.f_gasbrand_id) {
689
+ this.userfile.f_meternumber = ''
690
+ this.$showAlert('请先选择气表品牌!!!', 'warning', 3000)
691
+ return
692
+ }
693
+ if (this.userfile.f_gasbrand_id && this.userfile.f_meternumber) {
694
+ let data = {
695
+ f_meternumber: this.userfile.f_meternumber,
696
+ f_gasbrand_id: this.userfile.f_gasbrand_id
697
+ }
698
+ if (this.userfile.f_user_id) {
699
+ data.f_user_id = this.userfile.f_user_id
700
+ }
701
+ let http = new HttpResetClass()
702
+ let res = await http.load("POST",`${this.$androidUtil.getProxyUrl()}/rs/logic/meterbrandsNumberValidate`, {data:data}, {
703
+ resolveMsg: null,
704
+ rejectMsg: '表号验证失败!!'
705
+ })
706
+ console.log(`查询结果${res.data}`)
707
+ console.log(res.data)
708
+ if (!/^\d{12}$/.test(this.userfile.f_meternumber)) {
709
+ if(!/^\d{14}$/.test(this.userfile.f_meternumber)){
710
+ this.$showAlert('表号不符合规则', 'danger', 3000)
711
+ return
712
+ }
713
+ }
714
+ if (res.data === '表号已存在' || res.data === '表号无效') {
715
+ this.userfile.f_meternumber = ''
716
+ this.$showAlert(res.data, 'warning', 3000)
717
+ }
718
+ }
719
+ },
720
+ // 选择气表品牌
721
+ async gasbrandChange() {
722
+ // 清空已保存的气表型号
723
+ this.userfile.f_gasmodel_id = null
724
+ if (isEmpty(this.userfile.f_gasbrand_id)) {
725
+ return
726
+ }
727
+ if (this.userfile.f_gasbrand_id === 'null') {
728
+ this.gasModelList.push({label: '无', value: 'null'})
729
+ this.userfile.f_meter_classify = 'null'
730
+ return
731
+ }
732
+ let data = {
733
+ f_gasbrand_id: this.userfile.f_gasbrand_id
734
+ }
735
+ let http = new HttpResetClass()
736
+ let res = await http.load(
737
+ 'POST',
738
+ `${this.$androidUtil.getProxyUrl()}/rs/sql/getGasModel`,
739
+ {data: data},
740
+ {resolveMsg: null, rejectMsg: '气表型号查询失败!!!'}
741
+ )
742
+
743
+ this.gasModelList = res.data
744
+
745
+ // data = {
746
+ // tablename: 't_gasbrand',
747
+ // condition: `id = '${this.userfile.f_gasbrand_id}'`
748
+ // }
749
+ // res = await http.load(
750
+ // 'POST',
751
+ // `${this.$androidUtil.getProxyUrl()}/rs/sql/applySingleTable`,
752
+ // {data: data},
753
+ // {resolveMsg: null, rejectMsg: '表具类型查询失败!!!'}
754
+ // )
755
+ // this.userfile.f_meter_classify = res.data[0].f_meter_type
756
+ this.userfile.f_meter_classify = '物联网表'
757
+ },
758
+ // 地址拼接
759
+ addressSplicing () {
760
+ let f_area = this.userinfo.f_area || ''
761
+ let f_slice_area = this.userinfo.f_slice_area || ''
762
+ let f_street = this.userinfo.f_street || ''
763
+ let f_residential_area = this.userinfo.f_residential_area || ''
764
+ let f_building = this.userinfo.f_building || ''
765
+ let f_building_suffix = f_building ? '号楼' : ''
766
+ let f_unit = this.userinfo.f_unit || ''
767
+ let f_unit_suffix = f_unit ? '单元' : ''
768
+ let f_floor = this.userinfo.f_floor || ''
769
+ let f_floor_suffix = f_floor ? '层' : ''
770
+ let f_room = this.userinfo.f_room || ''
771
+ let f_room_suffix = f_room ? '室' : ''
772
+
773
+ 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)
774
+ },
775
+ // 选择小区
776
+ changeArea () {
777
+ if (isEmpty(this.area)) {
778
+ return
779
+ }
780
+
781
+ this.userinfo.f_area = this.area.f_area
782
+ this.userinfo.f_slice_area = this.area.f_slice_area
783
+ this.userinfo.f_street = this.area.f_street
784
+ this.userinfo.f_residential_area = this.area.f_residential_area
785
+ this.userinfo.f_residential_area_id = this.area.id
786
+ },
787
+ // 打开安装明细
788
+ async openModal (row) {
789
+ this.ifDisable()
790
+ if (row) {
791
+ console.log('------------------修正---------------------')
792
+ this.userinfo = row
793
+
794
+ if (this.userinfo.f_residential_area_id) {
795
+ let data = {
796
+ tablename: 't_area_address',
797
+ condition: `id = '${this.userinfo.f_residential_area_id}'`
798
+ }
799
+ let http = new HttpResetClass()
800
+ let res = await http.load(
801
+ 'POST',
802
+ `${this.$androidUtil.getProxyUrl()}/rs/sql/applySingleTable`,
803
+ {data: data},
804
+ {resolveMsg: null, rejectMsg: '小区查询失败!!!'}
805
+ )
806
+
807
+ this.area = res.data[0]
808
+ }
809
+
810
+ let data = {
811
+ tablename: 't_userfiles',
812
+ condition: `f_userinfo_id = ${row.f_userinfo_id}`
813
+ }
814
+ let http = new HttpResetClass()
815
+ let res = await http.load(
816
+ 'POST',
817
+ `${this.$androidUtil.getProxyUrl()}/rs/sql/applySingleTable`,
818
+ {data: data},
819
+ {resolveMsg: null, rejectMsg: '表档案查询失败!!!'}
820
+ )
821
+ this.userfile = res.data[0]
822
+
823
+ if (this.userfile.f_gasbrand_id === 0) {
824
+ this.userfile.f_gasbrand_id = null
825
+ }
826
+ if (this.userfile.f_gasmodel_id === 0) {
827
+ this.userfile.f_gasmodel_id = null
828
+ }
829
+ if(isEmpty(this.userfile.f_position)){
830
+ this.userfile.f_position = '室内'
831
+ }
832
+ if (!isEmpty(this.userfile.f_gasbrand_id)) {
833
+ let data = {
834
+ f_gasbrand_id: this.userfile.f_gasbrand_id
835
+ }
836
+ let http = new HttpResetClass()
837
+ let res = await http.load(
838
+ 'POST',
839
+ `${this.$androidUtil.getProxyUrl()}/rs/sql/getGasModel`,
840
+ {data: data},
841
+ {resolveMsg: null, rejectMsg: '气表型号查询失败!!!'}
842
+ )
843
+
844
+ this.gasModelList = res.data
845
+ }
846
+ }
847
+ if (this.selectdata.f_residential_area_id) {
848
+ let data = {
849
+ tablename: 't_area_address',
850
+ condition: `id = '${this.selectdata.f_residential_area_id}'`
851
+ }
852
+ let http = new HttpResetClass()
853
+ let res = await http.load(
854
+ 'POST',
855
+ `${this.$androidUtil.getProxyUrl()}/rs/sql/applySingleTable`,
856
+ {data: data},
857
+ {resolveMsg: null, rejectMsg: '小区查询失败!!!'}
858
+ )
859
+
860
+ this.area = res.data[0]
861
+ this.selectArea(this.area.f_residential_area)
862
+ this.changeArea()
863
+ this.addressSplicing()
864
+ }
865
+
866
+ // 档案回填定位信息
867
+ this.userinfo.f_lng = this.selectdata.f_lng
868
+ this.userinfo.f_lat = this.selectdata.f_lat
869
+ this.userinfo.f_location_address = this.selectdata.f_order_address
870
+ if(!row){
871
+ // 档案回填用户信息
872
+ this.showUserInformation.f_user_name = this.selectdata.f_user_name
873
+ this.showUserInformation.f_user_phone = this.selectdata.f_phone
874
+ this.showUserInformation.f_credentials = this.selectdata.f_credentials
875
+ this.showUserInformation.f_idnumber = this.selectdata.f_idnumber
876
+ }
877
+ this.showModal = true
878
+ },
879
+ // 获取气表品牌
880
+ async getMeterBrand () {
881
+ let data = {
882
+ }
883
+
884
+ let http = new HttpResetClass()
885
+ let res = await http.load(
886
+ 'POST',
887
+ `${this.$androidUtil.getProxyUrl()}/rs/sql/getMeterBrand`,
888
+ {data: data},
889
+ {resolveMsg: null, rejectMsg: '气表品牌查询失败!!!'}
890
+ )
891
+
892
+ this.meterBrandList = res.data
893
+ this.meterBrandList.push({label: '无', value: 'null'})
894
+ },
895
+ // 获取小区
896
+ async getAreaList () {
897
+ let data = {
898
+ tablename: 't_area_address',
899
+ condition: `f_filiale like '%${"榆林."+Vue.user.orgs}%' and f_area_status = '启用'`
900
+ }
901
+ let http = new HttpResetClass()
902
+ let res = await http.load(
903
+ 'POST',
904
+ `${this.$androidUtil.getProxyUrl()}/rs/sql/applySingleTable`,
905
+ {data: data},
906
+ {resolveMsg: null, rejectMsg: '小区查询失败!!!'}
907
+ )
908
+ this.areaList = res.data.map(item => {
909
+ item.id = String(item.id)
910
+ return {
911
+ label: item.f_residential_area,
912
+ value: item
913
+ }
914
+ })
915
+ },
916
+ //搜索小区
917
+ selectArea (val) {
918
+ let pcdText = `and f_residential_area like '%${val}%'`
919
+ let data = {
920
+ tablename: 't_area_address',
921
+ condition: `f_filiale like '%${"榆林."+Vue.user.orgs}%' and f_area_status = '启用' ${pcdText}`
922
+ }
923
+ new HttpResetClass().load("POST", `${this.$androidUtil.getProxyUrl()}/rs/sql/applySingleTable`, {data:data}, {resolveMsg: null, rejectMsg: null}).then((res)=>{
924
+ console.log('请求发送完成!!!!!'+JSON.stringify(res))
925
+ if(res.data.length>0){
926
+ this.areaList = res.data.map(item => {
927
+ item.id = String(item.id)
928
+ return {
929
+ label: item.f_residential_area,
930
+ value: item
931
+ }
932
+ })
933
+ }
934
+ })
935
+ },
936
+ // 关闭安装明细
937
+ closeUserFile() {
938
+ this.showModal = false
939
+ this.area = {}
940
+ this.userinfo = {}
941
+ this.userfile = {}
942
+ this.gasModelList = {}
943
+ this.showDeleteModel = false
944
+ this.search()
945
+ }
946
+ },
947
+ events: {
948
+ },
949
+ computed: {
950
+
951
+ showAddress () {
952
+ return this.selectdata.f_apply_type === '民用报建' || this.selectdata.f_apply_type === '设备拆除'
953
+ },
954
+ showUserInfo () {
955
+ return (this.selectdata.f_apply_type === '民用报建' && this.selectdata.f_apply_nature !== '分户挂表') || (this.selectdata.f_apply_type === '设备拆除') },
956
+ showUserFile () {
957
+ return (this.selectdata.f_apply_type === '民用报建' && this.selectdata.f_apply_nature !== '分户挂表' && this.selectdata.defname === '工程施工') ||
958
+ this.selectdata.f_apply_type === '非民用报建' ||
959
+ this.selectdata.f_apply_type === '设备变更' ||
960
+ this.selectdata.f_apply_type === '设备拆除' ||
961
+ this.selectdata.f_apply_type === '分户挂表'
962
+ },
963
+ showInstall () {
964
+ return (this.showUserFile && (this.selectdata.defname === '工程施工' || this.selectdata.defname === '施工通气' ||
965
+ this.selectdata.defname === '点火通气')) || (this.selectdata.f_apply_type === '设备拆除')
966
+ },
967
+ // 证件类型
968
+ credentialsList() {
969
+ return this.$appdata.getParam('证件类型')
970
+ },
971
+ // 安装人
972
+ installperson() {
973
+ return function (f_install_person) {
974
+ if (isEmpty(f_install_person)) {
975
+ return Vue.user.name
976
+ }
977
+ return f_install_person
978
+ }
979
+ },
980
+ // 安装时间
981
+ installdate() {
982
+ return function (f_install_date) {
983
+ if (isEmpty(f_install_date)) {
984
+ return new Date().Format('yyyy-MM-dd HH:mm:ss')
985
+ }
986
+ return f_install_date
987
+ }
988
+ },
989
+ // 表向
990
+ aroundmeters() {
991
+ return this.$appdata.getParam('左右表')
992
+ },
993
+ // 安装位置
994
+ positions() {
995
+ return this.$appdata.getParam('安装位置')
996
+ }
997
+ },
998
+ watch: {
999
+ }
1000
+ }
1001
+ </script>
1002
+ <style scoped>
1003
+ .panel {
1004
+ margin-bottom: 8px;
1005
+ }
1006
+ .panel-self{
1007
+ border-radius: 10px;
1008
+ border:1px solid #499EDF;
1009
+ padding: 8px;
1010
+ }
1011
+ .button_shrink_top {
1012
+ width: 34px;
1013
+ height: 34px;
1014
+ border: solid 1px #6aa6e2;
1015
+ background-size: 100%;
1016
+ background-image: url("../../../../../static/newStyle/stretch_top.png")
1017
+ }
1018
+
1019
+ .button_shrink_bottom {
1020
+ width: 34px;
1021
+ height: 34px;
1022
+ border: solid 1px #6aa6e2;
1023
+ background-size: 100%;
1024
+ background-image: url("../../../../../static/newStyle/stretch_bottom.png")
1025
+ }
1026
+ </style>