apply-clients 7.1.36-yuchuan-12 → 7.1.36-yuchuan-13

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