apply-clients 7.1.36-yuchuan-41 → 7.1.36-yuchuan-42

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 (68) hide show
  1. package/android.html +27 -27
  2. package/build/dev-server.js +172 -192
  3. package/package.json +119 -119
  4. package/src/apply.js +163 -163
  5. package/src/applyAndroid.js +98 -98
  6. package/src/components/android/AppSign.vue +232 -232
  7. package/src/components/android/Ignition/VentilationIgnition.vue +408 -408
  8. package/src/components/android/Ignition/VentilationIgnitionHandle.vue +472 -472
  9. package/src/components/android/Process/AppExplorationUser.vue +454 -454
  10. package/src/components/android/Process/AppServiceControl.vue +1434 -1434
  11. package/src/components/android/Process/Processes/AppInstallationDetails.vue +1018 -1018
  12. package/src/components/android/Process/Processes/newAppInstallationDetails.vue +671 -671
  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/Function/InstallFunction.vue +132 -132
  33. package/src/components/product/Function/InstallInfoSelect.vue +374 -374
  34. package/src/components/product/GongJianPush/ApplyPushDispose.vue +12 -10
  35. package/src/components/product/GongJianPush/ApplyPushManage.vue +91 -91
  36. package/src/components/product/Ignition/IgnitionDispatch.vue +90 -90
  37. package/src/components/product/Ignition/IgnitionListManage.vue +604 -604
  38. package/src/components/product/Ignition/IgnitionRecord.vue +380 -380
  39. package/src/components/product/InsuranceApply/InsuranceReport.vue +188 -188
  40. package/src/components/product/List/OldShowDevices.vue +271 -271
  41. package/src/components/product/List/ShowAllActivity.vue +541 -541
  42. package/src/components/product/List/ShowDevices.vue +279 -279
  43. package/src/components/product/Print/BuildOrder/buildOrderList.vue +446 -446
  44. package/src/components/product/Process/ExplorationSelect.vue +593 -593
  45. package/src/components/product/Process/ExplorationUser.vue +154 -154
  46. package/src/components/product/Process/New1ExplorationUser.vue +196 -196
  47. package/src/components/product/Process/NewExplorationSelect.vue +587 -587
  48. package/src/components/product/Process/NewExplorationUser.vue +216 -216
  49. package/src/components/product/Process/Processes/InstallationDetails.vue +1159 -1159
  50. package/src/components/product/Process/Processes/Print/printCharge.vue +250 -250
  51. package/src/components/product/Process/Processes/Print/printGaiXianCharge.vue +244 -244
  52. package/src/components/product/Process/Processes/chargeManagement.vue +703 -703
  53. package/src/components/product/Process/Processes/selectApply.vue +250 -250
  54. package/src/components/product/Process/Processes/selectChaiChuUserinfo.vue +230 -230
  55. package/src/components/product/Process/Processes/selectOldUserinfo.vue +241 -241
  56. package/src/components/product/Process/Processes/selectUserinfo.vue +234 -234
  57. package/src/components/product/Process/Service/ServiceControl.vue +2216 -2216
  58. package/src/components/product/ServiceView.vue +644 -644
  59. package/src/components/product/Stop/StopApplyList.vue +224 -224
  60. package/src/components/product/Supervisory/NewSupervisoryhCart.vue +175 -175
  61. package/src/components/product/Supervisory/Service/SupervisoryServiceControl.vue +593 -593
  62. package/src/components/product/Supervisory/SupervisoryControl.vue +114 -114
  63. package/src/components/product/Supervisory/SupervisoryList.vue +580 -580
  64. package/src/components/product/Supervisory/SupervisoryhCart.vue +120 -120
  65. package/src/components/product/Supervisory/YiBanSupervisoryControl.vue +111 -111
  66. package/src/components/product/Supervisory/YiBanSupervisoryList.vue +539 -539
  67. package/src/components/product/VueUtils/ApplyUpload.vue +303 -303
  68. package/src/main.js +27 -27
@@ -1,1018 +1,1018 @@
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.userfile.f_meter_base - 0 === 0 || this.userfile.f_meter_base - 0 > 1.5) {
621
- this.$showAlert('表读数必须大于0小于或等于1.5!', 'warning', 3000)
622
- throw '表读数必须大于0小于或等于1.5!'
623
- }
624
- }
625
- if (this.userfile.f_gasbrand_id && this.userfile.f_meternumber) {
626
- let data = {
627
- f_meternumber: this.userfile.f_meternumber,
628
- f_gasbrand_id: this.userfile.f_gasbrand_id
629
- }
630
- if (this.userfile.f_user_id) {
631
- data.f_user_id = this.userfile.f_user_id
632
- }
633
- let http = new HttpResetClass()
634
- let res = await http.load("POST",`${this.$androidUtil.getProxyUrl()}/rs/logic/meterbrandsNumberValidate`, {data:data}, {
635
- resolveMsg: null,
636
- rejectMsg: '表号验证失败!!'
637
- })
638
- console.log(`查询结果${res.data}`)
639
- console.log(res.data)
640
- if (!/^\d{12}$/.test(this.userfile.f_meternumber)) {
641
- if(!/^\d{14}$/.test(this.userfile.f_meternumber)){
642
- this.$showAlert('表号不符合规则', 'danger', 3000)
643
- return
644
- }
645
- }
646
- if (res.data === '表号已存在' || res.data === '表号无效') {
647
- this.userfile.f_meternumber = ''
648
- this.$showAlert(res.data, 'warning', 3000)
649
- return
650
- }
651
- }
652
- let data = {
653
- user: Vue.user,
654
- userinfo: this.userinfo,
655
- userfile: this.userfile,
656
- selectdata: this.selectdata
657
- }
658
- let res = await this.$resetpost(`${this.$androidUtil.getProxyUrl()}/rs/logic/applyAddUserinfo`, {data:data}, {
659
- resolveMsg: null,
660
- rejectMsg: '用户档案添加失败!!!'
661
- })
662
- // this.$showMessage('用户档案添加成功!!!')
663
- this.$showAlert('用户档案添加成功!!!', 'success', 3000)
664
- // this.search() 避免分页时,点击确定后,分页返回第一页
665
- this.showModal= false
666
- console.log("分页数据",this.model)
667
- this.selectdata.f_building=this.model.model.f_building
668
- this.selectdata.f_unit=this.model.model.f_unit
669
- this.selectdata.f_room=this.model.model.f_room
670
- this.selectdata.pageIndex=this.model.pageIndex
671
- this.$dispatch('breakControl', this.selectdata)
672
- },
673
- ifDisable() {
674
- if ( this.selectdata.defname === '工程施工') {
675
- this.gasbrandDisable = true
676
- }
677
- },
678
- // 检查表号是否存在
679
- async meternumberValidate() {
680
- if (!this.userfile.f_gasbrand_id) {
681
- this.userfile.f_meternumber = ''
682
- this.$showAlert('请先选择气表品牌!!!', 'warning', 3000)
683
- return
684
- }
685
- if (this.userfile.f_gasbrand_id && this.userfile.f_meternumber) {
686
- let data = {
687
- f_meternumber: this.userfile.f_meternumber,
688
- f_gasbrand_id: this.userfile.f_gasbrand_id
689
- }
690
- if (this.userfile.f_user_id) {
691
- data.f_user_id = this.userfile.f_user_id
692
- }
693
- let http = new HttpResetClass()
694
- let res = await http.load("POST",`${this.$androidUtil.getProxyUrl()}/rs/logic/meterbrandsNumberValidate`, {data:data}, {
695
- resolveMsg: null,
696
- rejectMsg: '表号验证失败!!'
697
- })
698
- console.log(`查询结果${res.data}`)
699
- console.log(res.data)
700
- if (!/^\d{12}$/.test(this.userfile.f_meternumber)) {
701
- if(!/^\d{14}$/.test(this.userfile.f_meternumber)){
702
- this.$showAlert('表号不符合规则', 'danger', 3000)
703
- return
704
- }
705
- }
706
- if (res.data === '表号已存在' || res.data === '表号无效') {
707
- this.userfile.f_meternumber = ''
708
- this.$showAlert(res.data, 'warning', 3000)
709
- }
710
- }
711
- },
712
- // 选择气表品牌
713
- async gasbrandChange() {
714
- // 清空已保存的气表型号
715
- this.userfile.f_gasmodel_id = null
716
- if (isEmpty(this.userfile.f_gasbrand_id)) {
717
- return
718
- }
719
- if (this.userfile.f_gasbrand_id === 'null') {
720
- this.gasModelList.push({label: '无', value: 'null'})
721
- this.userfile.f_meter_classify = 'null'
722
- return
723
- }
724
- let data = {
725
- f_gasbrand_id: this.userfile.f_gasbrand_id
726
- }
727
- let http = new HttpResetClass()
728
- let res = await http.load(
729
- 'POST',
730
- `${this.$androidUtil.getProxyUrl()}/rs/sql/getGasModel`,
731
- {data: data},
732
- {resolveMsg: null, rejectMsg: '气表型号查询失败!!!'}
733
- )
734
-
735
- this.gasModelList = res.data
736
-
737
- // data = {
738
- // tablename: 't_gasbrand',
739
- // condition: `id = '${this.userfile.f_gasbrand_id}'`
740
- // }
741
- // res = await http.load(
742
- // 'POST',
743
- // `${this.$androidUtil.getProxyUrl()}/rs/sql/applySingleTable`,
744
- // {data: data},
745
- // {resolveMsg: null, rejectMsg: '表具类型查询失败!!!'}
746
- // )
747
- // this.userfile.f_meter_classify = res.data[0].f_meter_type
748
- this.userfile.f_meter_classify = '物联网表'
749
- },
750
- // 地址拼接
751
- addressSplicing () {
752
- let f_area = this.userinfo.f_area || ''
753
- let f_slice_area = this.userinfo.f_slice_area || ''
754
- let f_street = this.userinfo.f_street || ''
755
- let f_residential_area = this.userinfo.f_residential_area || ''
756
- let f_building = this.userinfo.f_building || ''
757
- let f_building_suffix = f_building ? '号楼' : ''
758
- let f_unit = this.userinfo.f_unit || ''
759
- let f_unit_suffix = f_unit ? '单元' : ''
760
- let f_floor = this.userinfo.f_floor || ''
761
- let f_floor_suffix = f_floor ? '层' : ''
762
- let f_room = this.userinfo.f_room || ''
763
- let f_room_suffix = f_room ? '室' : ''
764
-
765
- 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)
766
- },
767
- // 选择小区
768
- changeArea () {
769
- if (isEmpty(this.area)) {
770
- return
771
- }
772
-
773
- this.userinfo.f_area = this.area.f_area
774
- this.userinfo.f_slice_area = this.area.f_slice_area
775
- this.userinfo.f_street = this.area.f_street
776
- this.userinfo.f_residential_area = this.area.f_residential_area
777
- this.userinfo.f_residential_area_id = this.area.id
778
- },
779
- // 打开安装明细
780
- async openModal (row) {
781
- this.ifDisable()
782
- if (row) {
783
- console.log('------------------修正---------------------')
784
- this.userinfo = row
785
-
786
- if (this.userinfo.f_residential_area_id) {
787
- let data = {
788
- tablename: 't_area_address',
789
- condition: `id = '${this.userinfo.f_residential_area_id}'`
790
- }
791
- let http = new HttpResetClass()
792
- let res = await http.load(
793
- 'POST',
794
- `${this.$androidUtil.getProxyUrl()}/rs/sql/applySingleTable`,
795
- {data: data},
796
- {resolveMsg: null, rejectMsg: '小区查询失败!!!'}
797
- )
798
-
799
- this.area = res.data[0]
800
- }
801
-
802
- let data = {
803
- tablename: 't_userfiles',
804
- condition: `f_userinfo_id = ${row.f_userinfo_id}`
805
- }
806
- let http = new HttpResetClass()
807
- let res = await http.load(
808
- 'POST',
809
- `${this.$androidUtil.getProxyUrl()}/rs/sql/applySingleTable`,
810
- {data: data},
811
- {resolveMsg: null, rejectMsg: '表档案查询失败!!!'}
812
- )
813
- this.userfile = res.data[0]
814
-
815
- if (this.userfile.f_gasbrand_id === 0) {
816
- this.userfile.f_gasbrand_id = null
817
- }
818
- if (this.userfile.f_gasmodel_id === 0) {
819
- this.userfile.f_gasmodel_id = null
820
- }
821
- if(isEmpty(this.userfile.f_position)){
822
- this.userfile.f_position = '室内'
823
- }
824
- if (!isEmpty(this.userfile.f_gasbrand_id)) {
825
- let data = {
826
- f_gasbrand_id: this.userfile.f_gasbrand_id
827
- }
828
- let http = new HttpResetClass()
829
- let res = await http.load(
830
- 'POST',
831
- `${this.$androidUtil.getProxyUrl()}/rs/sql/getGasModel`,
832
- {data: data},
833
- {resolveMsg: null, rejectMsg: '气表型号查询失败!!!'}
834
- )
835
-
836
- this.gasModelList = res.data
837
- }
838
- }
839
- if (this.selectdata.f_residential_area_id) {
840
- let data = {
841
- tablename: 't_area_address',
842
- condition: `id = '${this.selectdata.f_residential_area_id}'`
843
- }
844
- let http = new HttpResetClass()
845
- let res = await http.load(
846
- 'POST',
847
- `${this.$androidUtil.getProxyUrl()}/rs/sql/applySingleTable`,
848
- {data: data},
849
- {resolveMsg: null, rejectMsg: '小区查询失败!!!'}
850
- )
851
-
852
- this.area = res.data[0]
853
- this.selectArea(this.area.f_residential_area)
854
- this.changeArea()
855
- this.addressSplicing()
856
- }
857
-
858
- // 档案回填定位信息
859
- this.userinfo.f_lng = this.selectdata.f_lng
860
- this.userinfo.f_lat = this.selectdata.f_lat
861
- this.userinfo.f_location_address = this.selectdata.f_order_address
862
- if(!row){
863
- // 档案回填用户信息
864
- this.showUserInformation.f_user_name = this.selectdata.f_user_name
865
- this.showUserInformation.f_user_phone = this.selectdata.f_phone
866
- this.showUserInformation.f_credentials = this.selectdata.f_credentials
867
- this.showUserInformation.f_idnumber = this.selectdata.f_idnumber
868
- }
869
- this.showModal = true
870
- },
871
- // 获取气表品牌
872
- async getMeterBrand () {
873
- let data = {
874
- }
875
-
876
- let http = new HttpResetClass()
877
- let res = await http.load(
878
- 'POST',
879
- `${this.$androidUtil.getProxyUrl()}/rs/sql/getMeterBrand`,
880
- {data: data},
881
- {resolveMsg: null, rejectMsg: '气表品牌查询失败!!!'}
882
- )
883
-
884
- this.meterBrandList = res.data
885
- this.meterBrandList.push({label: '无', value: 'null'})
886
- },
887
- // 获取小区
888
- async getAreaList () {
889
- let data = {
890
- tablename: 't_area_address',
891
- condition: `f_filiale like '%${"榆林."+Vue.user.orgs}%' and f_area_status = '启用'`
892
- }
893
- let http = new HttpResetClass()
894
- let res = await http.load(
895
- 'POST',
896
- `${this.$androidUtil.getProxyUrl()}/rs/sql/applySingleTable`,
897
- {data: data},
898
- {resolveMsg: null, rejectMsg: '小区查询失败!!!'}
899
- )
900
- this.areaList = res.data.map(item => {
901
- item.id = String(item.id)
902
- return {
903
- label: item.f_residential_area,
904
- value: item
905
- }
906
- })
907
- },
908
- //搜索小区
909
- selectArea (val) {
910
- let pcdText = `and f_residential_area like '%${val}%'`
911
- let data = {
912
- tablename: 't_area_address',
913
- condition: `f_filiale like '%${"榆林."+Vue.user.orgs}%' and f_area_status = '启用' ${pcdText}`
914
- }
915
- new HttpResetClass().load("POST", `${this.$androidUtil.getProxyUrl()}/rs/sql/applySingleTable`, {data:data}, {resolveMsg: null, rejectMsg: null}).then((res)=>{
916
- console.log('请求发送完成!!!!!'+JSON.stringify(res))
917
- if(res.data.length>0){
918
- this.areaList = res.data.map(item => {
919
- item.id = String(item.id)
920
- return {
921
- label: item.f_residential_area,
922
- value: item
923
- }
924
- })
925
- }
926
- })
927
- },
928
- // 关闭安装明细
929
- closeUserFile() {
930
- this.showModal = false
931
- this.area = {}
932
- this.userinfo = {}
933
- this.userfile = {}
934
- this.gasModelList = {}
935
- this.showDeleteModel = false
936
- this.search()
937
- }
938
- },
939
- events: {
940
- },
941
- computed: {
942
-
943
- showAddress () {
944
- return this.selectdata.f_apply_type === '民用报建' || this.selectdata.f_apply_type === '设备拆除'
945
- },
946
- showUserInfo () {
947
- return (this.selectdata.f_apply_type === '民用报建' && this.selectdata.f_apply_nature !== '分户挂表') || (this.selectdata.f_apply_type === '设备拆除') },
948
- showUserFile () {
949
- return (this.selectdata.f_apply_type === '民用报建' && this.selectdata.f_apply_nature !== '分户挂表' && this.selectdata.defname === '工程施工') ||
950
- this.selectdata.f_apply_type === '非民用报建' ||
951
- this.selectdata.f_apply_type === '设备变更' ||
952
- this.selectdata.f_apply_type === '设备拆除' ||
953
- this.selectdata.f_apply_type === '分户挂表'
954
- },
955
- showInstall () {
956
- return (this.showUserFile && (this.selectdata.defname === '工程施工' || this.selectdata.defname === '施工通气' ||
957
- this.selectdata.defname === '点火通气')) || (this.selectdata.f_apply_type === '设备拆除')
958
- },
959
- // 证件类型
960
- credentialsList() {
961
- return this.$appdata.getParam('证件类型')
962
- },
963
- // 安装人
964
- installperson() {
965
- return function (f_install_person) {
966
- if (isEmpty(f_install_person)) {
967
- return Vue.user.name
968
- }
969
- return f_install_person
970
- }
971
- },
972
- // 安装时间
973
- installdate() {
974
- return function (f_install_date) {
975
- if (isEmpty(f_install_date)) {
976
- return new Date().Format('yyyy-MM-dd HH:mm:ss')
977
- }
978
- return f_install_date
979
- }
980
- },
981
- // 表向
982
- aroundmeters() {
983
- return this.$appdata.getParam('左右表')
984
- },
985
- // 安装位置
986
- positions() {
987
- return this.$appdata.getParam('安装位置')
988
- }
989
- },
990
- watch: {
991
- }
992
- }
993
- </script>
994
- <style scoped>
995
- .panel {
996
- margin-bottom: 8px;
997
- }
998
- .panel-self{
999
- border-radius: 10px;
1000
- border:1px solid #499EDF;
1001
- padding: 8px;
1002
- }
1003
- .button_shrink_top {
1004
- width: 34px;
1005
- height: 34px;
1006
- border: solid 1px #6aa6e2;
1007
- background-size: 100%;
1008
- background-image: url("../../../../../static/newStyle/stretch_top.png")
1009
- }
1010
-
1011
- .button_shrink_bottom {
1012
- width: 34px;
1013
- height: 34px;
1014
- border: solid 1px #6aa6e2;
1015
- background-size: 100%;
1016
- background-image: url("../../../../../static/newStyle/stretch_bottom.png")
1017
- }
1018
- </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.userfile.f_meter_base - 0 === 0 || this.userfile.f_meter_base - 0 > 1.5) {
621
+ this.$showAlert('表读数必须大于0小于或等于1.5!', 'warning', 3000)
622
+ throw '表读数必须大于0小于或等于1.5!'
623
+ }
624
+ }
625
+ if (this.userfile.f_gasbrand_id && this.userfile.f_meternumber) {
626
+ let data = {
627
+ f_meternumber: this.userfile.f_meternumber,
628
+ f_gasbrand_id: this.userfile.f_gasbrand_id
629
+ }
630
+ if (this.userfile.f_user_id) {
631
+ data.f_user_id = this.userfile.f_user_id
632
+ }
633
+ let http = new HttpResetClass()
634
+ let res = await http.load("POST",`${this.$androidUtil.getProxyUrl()}/rs/logic/meterbrandsNumberValidate`, {data:data}, {
635
+ resolveMsg: null,
636
+ rejectMsg: '表号验证失败!!'
637
+ })
638
+ console.log(`查询结果${res.data}`)
639
+ console.log(res.data)
640
+ if (!/^\d{12}$/.test(this.userfile.f_meternumber)) {
641
+ if(!/^\d{14}$/.test(this.userfile.f_meternumber)){
642
+ this.$showAlert('表号不符合规则', 'danger', 3000)
643
+ return
644
+ }
645
+ }
646
+ if (res.data === '表号已存在' || res.data === '表号无效') {
647
+ this.userfile.f_meternumber = ''
648
+ this.$showAlert(res.data, 'warning', 3000)
649
+ return
650
+ }
651
+ }
652
+ let data = {
653
+ user: Vue.user,
654
+ userinfo: this.userinfo,
655
+ userfile: this.userfile,
656
+ selectdata: this.selectdata
657
+ }
658
+ let res = await this.$resetpost(`${this.$androidUtil.getProxyUrl()}/rs/logic/applyAddUserinfo`, {data:data}, {
659
+ resolveMsg: null,
660
+ rejectMsg: '用户档案添加失败!!!'
661
+ })
662
+ // this.$showMessage('用户档案添加成功!!!')
663
+ this.$showAlert('用户档案添加成功!!!', 'success', 3000)
664
+ // this.search() 避免分页时,点击确定后,分页返回第一页
665
+ this.showModal= false
666
+ console.log("分页数据",this.model)
667
+ this.selectdata.f_building=this.model.model.f_building
668
+ this.selectdata.f_unit=this.model.model.f_unit
669
+ this.selectdata.f_room=this.model.model.f_room
670
+ this.selectdata.pageIndex=this.model.pageIndex
671
+ this.$dispatch('breakControl', this.selectdata)
672
+ },
673
+ ifDisable() {
674
+ if ( this.selectdata.defname === '工程施工') {
675
+ this.gasbrandDisable = true
676
+ }
677
+ },
678
+ // 检查表号是否存在
679
+ async meternumberValidate() {
680
+ if (!this.userfile.f_gasbrand_id) {
681
+ this.userfile.f_meternumber = ''
682
+ this.$showAlert('请先选择气表品牌!!!', 'warning', 3000)
683
+ return
684
+ }
685
+ if (this.userfile.f_gasbrand_id && this.userfile.f_meternumber) {
686
+ let data = {
687
+ f_meternumber: this.userfile.f_meternumber,
688
+ f_gasbrand_id: this.userfile.f_gasbrand_id
689
+ }
690
+ if (this.userfile.f_user_id) {
691
+ data.f_user_id = this.userfile.f_user_id
692
+ }
693
+ let http = new HttpResetClass()
694
+ let res = await http.load("POST",`${this.$androidUtil.getProxyUrl()}/rs/logic/meterbrandsNumberValidate`, {data:data}, {
695
+ resolveMsg: null,
696
+ rejectMsg: '表号验证失败!!'
697
+ })
698
+ console.log(`查询结果${res.data}`)
699
+ console.log(res.data)
700
+ if (!/^\d{12}$/.test(this.userfile.f_meternumber)) {
701
+ if(!/^\d{14}$/.test(this.userfile.f_meternumber)){
702
+ this.$showAlert('表号不符合规则', 'danger', 3000)
703
+ return
704
+ }
705
+ }
706
+ if (res.data === '表号已存在' || res.data === '表号无效') {
707
+ this.userfile.f_meternumber = ''
708
+ this.$showAlert(res.data, 'warning', 3000)
709
+ }
710
+ }
711
+ },
712
+ // 选择气表品牌
713
+ async gasbrandChange() {
714
+ // 清空已保存的气表型号
715
+ this.userfile.f_gasmodel_id = null
716
+ if (isEmpty(this.userfile.f_gasbrand_id)) {
717
+ return
718
+ }
719
+ if (this.userfile.f_gasbrand_id === 'null') {
720
+ this.gasModelList.push({label: '无', value: 'null'})
721
+ this.userfile.f_meter_classify = 'null'
722
+ return
723
+ }
724
+ let data = {
725
+ f_gasbrand_id: this.userfile.f_gasbrand_id
726
+ }
727
+ let http = new HttpResetClass()
728
+ let res = await http.load(
729
+ 'POST',
730
+ `${this.$androidUtil.getProxyUrl()}/rs/sql/getGasModel`,
731
+ {data: data},
732
+ {resolveMsg: null, rejectMsg: '气表型号查询失败!!!'}
733
+ )
734
+
735
+ this.gasModelList = res.data
736
+
737
+ // data = {
738
+ // tablename: 't_gasbrand',
739
+ // condition: `id = '${this.userfile.f_gasbrand_id}'`
740
+ // }
741
+ // res = await http.load(
742
+ // 'POST',
743
+ // `${this.$androidUtil.getProxyUrl()}/rs/sql/applySingleTable`,
744
+ // {data: data},
745
+ // {resolveMsg: null, rejectMsg: '表具类型查询失败!!!'}
746
+ // )
747
+ // this.userfile.f_meter_classify = res.data[0].f_meter_type
748
+ this.userfile.f_meter_classify = '物联网表'
749
+ },
750
+ // 地址拼接
751
+ addressSplicing () {
752
+ let f_area = this.userinfo.f_area || ''
753
+ let f_slice_area = this.userinfo.f_slice_area || ''
754
+ let f_street = this.userinfo.f_street || ''
755
+ let f_residential_area = this.userinfo.f_residential_area || ''
756
+ let f_building = this.userinfo.f_building || ''
757
+ let f_building_suffix = f_building ? '号楼' : ''
758
+ let f_unit = this.userinfo.f_unit || ''
759
+ let f_unit_suffix = f_unit ? '单元' : ''
760
+ let f_floor = this.userinfo.f_floor || ''
761
+ let f_floor_suffix = f_floor ? '层' : ''
762
+ let f_room = this.userinfo.f_room || ''
763
+ let f_room_suffix = f_room ? '室' : ''
764
+
765
+ 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)
766
+ },
767
+ // 选择小区
768
+ changeArea () {
769
+ if (isEmpty(this.area)) {
770
+ return
771
+ }
772
+
773
+ this.userinfo.f_area = this.area.f_area
774
+ this.userinfo.f_slice_area = this.area.f_slice_area
775
+ this.userinfo.f_street = this.area.f_street
776
+ this.userinfo.f_residential_area = this.area.f_residential_area
777
+ this.userinfo.f_residential_area_id = this.area.id
778
+ },
779
+ // 打开安装明细
780
+ async openModal (row) {
781
+ this.ifDisable()
782
+ if (row) {
783
+ console.log('------------------修正---------------------')
784
+ this.userinfo = row
785
+
786
+ if (this.userinfo.f_residential_area_id) {
787
+ let data = {
788
+ tablename: 't_area_address',
789
+ condition: `id = '${this.userinfo.f_residential_area_id}'`
790
+ }
791
+ let http = new HttpResetClass()
792
+ let res = await http.load(
793
+ 'POST',
794
+ `${this.$androidUtil.getProxyUrl()}/rs/sql/applySingleTable`,
795
+ {data: data},
796
+ {resolveMsg: null, rejectMsg: '小区查询失败!!!'}
797
+ )
798
+
799
+ this.area = res.data[0]
800
+ }
801
+
802
+ let data = {
803
+ tablename: 't_userfiles',
804
+ condition: `f_userinfo_id = ${row.f_userinfo_id}`
805
+ }
806
+ let http = new HttpResetClass()
807
+ let res = await http.load(
808
+ 'POST',
809
+ `${this.$androidUtil.getProxyUrl()}/rs/sql/applySingleTable`,
810
+ {data: data},
811
+ {resolveMsg: null, rejectMsg: '表档案查询失败!!!'}
812
+ )
813
+ this.userfile = res.data[0]
814
+
815
+ if (this.userfile.f_gasbrand_id === 0) {
816
+ this.userfile.f_gasbrand_id = null
817
+ }
818
+ if (this.userfile.f_gasmodel_id === 0) {
819
+ this.userfile.f_gasmodel_id = null
820
+ }
821
+ if(isEmpty(this.userfile.f_position)){
822
+ this.userfile.f_position = '室内'
823
+ }
824
+ if (!isEmpty(this.userfile.f_gasbrand_id)) {
825
+ let data = {
826
+ f_gasbrand_id: this.userfile.f_gasbrand_id
827
+ }
828
+ let http = new HttpResetClass()
829
+ let res = await http.load(
830
+ 'POST',
831
+ `${this.$androidUtil.getProxyUrl()}/rs/sql/getGasModel`,
832
+ {data: data},
833
+ {resolveMsg: null, rejectMsg: '气表型号查询失败!!!'}
834
+ )
835
+
836
+ this.gasModelList = res.data
837
+ }
838
+ }
839
+ if (this.selectdata.f_residential_area_id) {
840
+ let data = {
841
+ tablename: 't_area_address',
842
+ condition: `id = '${this.selectdata.f_residential_area_id}'`
843
+ }
844
+ let http = new HttpResetClass()
845
+ let res = await http.load(
846
+ 'POST',
847
+ `${this.$androidUtil.getProxyUrl()}/rs/sql/applySingleTable`,
848
+ {data: data},
849
+ {resolveMsg: null, rejectMsg: '小区查询失败!!!'}
850
+ )
851
+
852
+ this.area = res.data[0]
853
+ this.selectArea(this.area.f_residential_area)
854
+ this.changeArea()
855
+ this.addressSplicing()
856
+ }
857
+
858
+ // 档案回填定位信息
859
+ this.userinfo.f_lng = this.selectdata.f_lng
860
+ this.userinfo.f_lat = this.selectdata.f_lat
861
+ this.userinfo.f_location_address = this.selectdata.f_order_address
862
+ if(!row){
863
+ // 档案回填用户信息
864
+ this.showUserInformation.f_user_name = this.selectdata.f_user_name
865
+ this.showUserInformation.f_user_phone = this.selectdata.f_phone
866
+ this.showUserInformation.f_credentials = this.selectdata.f_credentials
867
+ this.showUserInformation.f_idnumber = this.selectdata.f_idnumber
868
+ }
869
+ this.showModal = true
870
+ },
871
+ // 获取气表品牌
872
+ async getMeterBrand () {
873
+ let data = {
874
+ }
875
+
876
+ let http = new HttpResetClass()
877
+ let res = await http.load(
878
+ 'POST',
879
+ `${this.$androidUtil.getProxyUrl()}/rs/sql/getMeterBrand`,
880
+ {data: data},
881
+ {resolveMsg: null, rejectMsg: '气表品牌查询失败!!!'}
882
+ )
883
+
884
+ this.meterBrandList = res.data
885
+ this.meterBrandList.push({label: '无', value: 'null'})
886
+ },
887
+ // 获取小区
888
+ async getAreaList () {
889
+ let data = {
890
+ tablename: 't_area_address',
891
+ condition: `f_filiale like '%${"榆林."+Vue.user.orgs}%' and f_area_status = '启用'`
892
+ }
893
+ let http = new HttpResetClass()
894
+ let res = await http.load(
895
+ 'POST',
896
+ `${this.$androidUtil.getProxyUrl()}/rs/sql/applySingleTable`,
897
+ {data: data},
898
+ {resolveMsg: null, rejectMsg: '小区查询失败!!!'}
899
+ )
900
+ this.areaList = res.data.map(item => {
901
+ item.id = String(item.id)
902
+ return {
903
+ label: item.f_residential_area,
904
+ value: item
905
+ }
906
+ })
907
+ },
908
+ //搜索小区
909
+ selectArea (val) {
910
+ let pcdText = `and f_residential_area like '%${val}%'`
911
+ let data = {
912
+ tablename: 't_area_address',
913
+ condition: `f_filiale like '%${"榆林."+Vue.user.orgs}%' and f_area_status = '启用' ${pcdText}`
914
+ }
915
+ new HttpResetClass().load("POST", `${this.$androidUtil.getProxyUrl()}/rs/sql/applySingleTable`, {data:data}, {resolveMsg: null, rejectMsg: null}).then((res)=>{
916
+ console.log('请求发送完成!!!!!'+JSON.stringify(res))
917
+ if(res.data.length>0){
918
+ this.areaList = res.data.map(item => {
919
+ item.id = String(item.id)
920
+ return {
921
+ label: item.f_residential_area,
922
+ value: item
923
+ }
924
+ })
925
+ }
926
+ })
927
+ },
928
+ // 关闭安装明细
929
+ closeUserFile() {
930
+ this.showModal = false
931
+ this.area = {}
932
+ this.userinfo = {}
933
+ this.userfile = {}
934
+ this.gasModelList = {}
935
+ this.showDeleteModel = false
936
+ this.search()
937
+ }
938
+ },
939
+ events: {
940
+ },
941
+ computed: {
942
+
943
+ showAddress () {
944
+ return this.selectdata.f_apply_type === '民用报建' || this.selectdata.f_apply_type === '设备拆除'
945
+ },
946
+ showUserInfo () {
947
+ return (this.selectdata.f_apply_type === '民用报建' && this.selectdata.f_apply_nature !== '分户挂表') || (this.selectdata.f_apply_type === '设备拆除') },
948
+ showUserFile () {
949
+ return (this.selectdata.f_apply_type === '民用报建' && this.selectdata.f_apply_nature !== '分户挂表' && this.selectdata.defname === '工程施工') ||
950
+ this.selectdata.f_apply_type === '非民用报建' ||
951
+ this.selectdata.f_apply_type === '设备变更' ||
952
+ this.selectdata.f_apply_type === '设备拆除' ||
953
+ this.selectdata.f_apply_type === '分户挂表'
954
+ },
955
+ showInstall () {
956
+ return (this.showUserFile && (this.selectdata.defname === '工程施工' || this.selectdata.defname === '施工通气' ||
957
+ this.selectdata.defname === '点火通气')) || (this.selectdata.f_apply_type === '设备拆除')
958
+ },
959
+ // 证件类型
960
+ credentialsList() {
961
+ return this.$appdata.getParam('证件类型')
962
+ },
963
+ // 安装人
964
+ installperson() {
965
+ return function (f_install_person) {
966
+ if (isEmpty(f_install_person)) {
967
+ return Vue.user.name
968
+ }
969
+ return f_install_person
970
+ }
971
+ },
972
+ // 安装时间
973
+ installdate() {
974
+ return function (f_install_date) {
975
+ if (isEmpty(f_install_date)) {
976
+ return new Date().Format('yyyy-MM-dd HH:mm:ss')
977
+ }
978
+ return f_install_date
979
+ }
980
+ },
981
+ // 表向
982
+ aroundmeters() {
983
+ return this.$appdata.getParam('左右表')
984
+ },
985
+ // 安装位置
986
+ positions() {
987
+ return this.$appdata.getParam('安装位置')
988
+ }
989
+ },
990
+ watch: {
991
+ }
992
+ }
993
+ </script>
994
+ <style scoped>
995
+ .panel {
996
+ margin-bottom: 8px;
997
+ }
998
+ .panel-self{
999
+ border-radius: 10px;
1000
+ border:1px solid #499EDF;
1001
+ padding: 8px;
1002
+ }
1003
+ .button_shrink_top {
1004
+ width: 34px;
1005
+ height: 34px;
1006
+ border: solid 1px #6aa6e2;
1007
+ background-size: 100%;
1008
+ background-image: url("../../../../../static/newStyle/stretch_top.png")
1009
+ }
1010
+
1011
+ .button_shrink_bottom {
1012
+ width: 34px;
1013
+ height: 34px;
1014
+ border: solid 1px #6aa6e2;
1015
+ background-size: 100%;
1016
+ background-image: url("../../../../../static/newStyle/stretch_bottom.png")
1017
+ }
1018
+ </style>