apply-clients 7.1.36-yuchuan-40 → 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 -199
  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,671 +1,671 @@
1
- <template>
2
- <div>
3
- <div class="col-xs-12 col-xs-12">
4
- <list :model="model" partial='list'>
5
- <div partial class="panel">
6
- <div class="panel-self">
7
- <div class="row">
8
- <p class="col-xs-3 text-left font"><b class="control-label-justify">客户编号</b></p>
9
- <p class="col-xs-8 col-xs-offset-1 text-left input-font">{{ row.f_userinfo_id }}</p>
10
- </div>
11
- <div class="row">
12
- <p class="col-xs-3 text-left font"><b class="control-label-justify">客户名称</b></p>
13
- <p class="col-xs-8 col-xs-offset-1 text-left input-font">{{ row.f_user_name }}</p>
14
- </div>
15
- <div class="row">
16
- <p class="col-xs-3 text-left font"><b class="control-label-justify">客户电话</b></p>
17
- <p class="col-xs-8 col-xs-offset-1 text-left input-font">{{ row.f_user_phone }}</p>
18
- </div>
19
- <div class="row">
20
- <p class="col-xs-3 text-left font"><b class="control-label-justify">地址信息</b></p>
21
- <p class="col-xs-8 col-xs-offset-1 text-left input-font">{{row.f_address}}{{row.f_address_detail}}</p>
22
- </div>
23
- <div class="row">
24
- <p class="col-xs-3 text-left font"><b class="control-label-justify">表号</b></p>
25
- <p class="col-xs-8 col-xs-offset-1 text-left input-font">{{ row.f_meternumber }}</p>
26
- </div>
27
- <div class="row">
28
- <p class="col-xs-3 text-left font"><b class="control-label-justify">气表品牌</b></p>
29
- <p class="col-xs-8 col-xs-offset-1 text-left input-font">{{ row.f_meter_brand }}</p>
30
- </div>
31
- <div class="row">
32
- <p class="col-xs-3 text-left font"><b class="control-label-justify">气表型号</b></p>
33
- <p class="col-xs-8 col-xs-offset-1 text-left input-font">{{ row.f_meter_style }}</p>
34
- </div>
35
- <div class="row text-right">
36
- <button class="btn btn-info"
37
- @click.prevent="$parent.$parent.openModal(row)">
38
- {{$parent.$parent.mark === 1 ? '查看' : '修正'}}
39
- </button>
40
- </div>
41
- </div>
42
- </div>
43
- </list>
44
- </div>
45
-
46
- <validator name="v">
47
- <modal v-if="showModal" :show.sync="showModal" v-ref:modal :large="true" :backdrop="false">
48
- <header slot="modal-header" class="modal-header">
49
- <button type="button" class="close" @click="closeUserFile"><span>&times;</span></button>
50
- <h4 class="modal-title">安装明细</h4>
51
- </header>
52
- <article slot="modal-body" class="modal-body clearfix">
53
- <!-- 表具信息 -->
54
- <div class="form-group col-xs-12 panel panel-info" v-if="showUserFile">
55
- <div class="panel-heading head col-xs-12" style="background-color: #e8f4ff;margin-bottom: 10px">
56
- <div class="col-xs-6 text-left">旧表具信息</div>
57
- </div>
58
- <div class="form-group row vertical-center" :class="[$v.f_gasbrand_id.required ? 'has-error' : '']">
59
- <label class="col-xs-4 control-label">气表品牌:</label>
60
- <div class="col-xs-8">
61
- <input type="text" v-show="false" v-model="userfile.f_gasbrand_id" :value.sync="userfile.f_gasbrand_id" v-validate:f_gasbrand_id = "['required']" >
62
- <input-select
63
- class="select select_list"
64
- :value.sync="userfile.f_gasbrand_id"
65
- v-model="userfile.f_gasbrand_id"
66
- :options="meterBrandList"
67
- @change="gasbrandChange()"
68
- :disable="mark === 1 || userinfo.f_user_state === '正常' || gasbrandDisable"
69
- :valueSingle="true"></input-select>
70
- </div>
71
- </div>
72
- <div class="form-group row vertical-center" :class="[$v.f_gasmodel_id.required ? 'has-error' : '']">
73
- <label class="col-xs-4 control-label">气表型号:</label>
74
- <div class="col-xs-8">
75
- <input type="text" v-show="false" v-model="userfile.f_gasmodel_id" :value.sync="userfile.f_gasmodel_id" v-validate:f_gasmodel_id = "['required']" >
76
- <input-select
77
- class="select select_list"
78
- :value.sync="userfile.f_gasmodel_id"
79
- v-model="userfile.f_gasmodel_id"
80
- :options.sync="gasModelList"
81
- :disable="mark === 1 || userinfo.f_user_state === '正常' || gasbrandDisable"
82
- :valueSingle="true"></input-select>
83
- </div>
84
- </div>
85
- <div class="form-group row vertical-center" :class="[$v.f_meternumber.required ? 'has-error' : '']">
86
- <label class="col-xs-4 control-label">表&emsp;&emsp;号:</label>
87
- <div class="col-xs-8">
88
- <input class="form-control input_view" style=""
89
- placeholder="表号" v-validate:f_meternumber = "['required']"
90
- v-model="newUserfile.f_meternumber"
91
- :value.sync="userfile.f_meternumber"
92
- @change="meternumberValidate()"
93
- :readonly="mark === 1 || userinfo.f_user_state === '正常'"/>
94
- </div>
95
- </div>
96
- <div class="form-group row vertical-center">
97
- <label class="col-xs-4 control-label">表&ensp;封&ensp;号:</label>
98
- <div class="col-xs-8">
99
- <input class="form-control input_view" style=""
100
- placeholder="表封号"
101
- v-model="newUserfile.f_metertitles"
102
- :value="userfile.f_metertitles"
103
- :readonly="mark === 1 || userinfo.f_user_state === '正常'"/>
104
- </div>
105
- </div>
106
- <div class="form-group row vertical-center">
107
- <label class="col-xs-4 control-label">表&ensp;读&ensp;数:</label>
108
- <div class="col-xs-8">
109
- <input class="form-control input_view" style=""
110
- type="number"
111
- placeholder="表读数"
112
- v-model="newUserfile.f_meter_base"
113
- :value="userfile.f_meter_base"
114
- :readonly="mark === 1 || userinfo.f_user_state === '正常'"/>
115
- </div>
116
- </div>
117
- <div class="form-group row vertical-center">
118
- <label class="col-xs-4 control-label">初始底数:</label>
119
- <div class="col-xs-8">
120
- <input class="form-control input_view" style=""
121
- type="number"
122
- v-model="newUserfile.f_initial_base"
123
- :value="userfile.f_initial_base"
124
- placeholder="初始底数"
125
- :readonly="mark === 1 || userinfo.f_user_state === '正常'"/>
126
- </div>
127
- </div>
128
- <div class="form-group row vertical-center">
129
- <label class="col-xs-4 control-label">表&emsp;&emsp;向:</label>
130
- <div class="col-xs-8">
131
- <input-select
132
- class="select select_list"
133
- :value.sync="userfile.f_aroundmeter"
134
- v-model="newUserfile.f_aroundmeter"
135
- :options="aroundmeters"
136
- :disable="mark === 1 || userinfo.f_user_state === '正常'"
137
- :valueSingle="true"></input-select>
138
- </div>
139
- </div>
140
- <div class="form-group row vertical-center">
141
- <label class="col-xs-4 control-label">安装位置:</label>
142
- <div class="col-xs-8">
143
- <input-select
144
- class="select select_list"
145
- :value.sync="userfile.f_position"
146
- v-model="newUserfile.f_position"
147
- :options="positions"
148
- :disable="mark === 1 || userinfo.f_user_state === '正常'"
149
- :valueSingle="true"></input-select>
150
- </div>
151
- </div>
152
- <div class="form-group row vertical-center">
153
- <label class="col-xs-4 control-label">安&ensp;装&ensp;人:</label>
154
- <div class="col-xs-8">
155
- <input class="form-control input_view" style=""
156
- v-model="newUserfile.f_install_person"
157
- :value.sync="installperson(userfile.f_install_person)"
158
- placeholder="安装人"
159
- readonly/>
160
- </div>
161
- </div>
162
- <div class="form-group row vertical-center">
163
- <label class="col-xs-4 control-label">安装日期:</label>
164
- <div class="col-xs-8">
165
- <input class="form-control input_view" style=""
166
- v-model="newUserfile.f_install_date"
167
- :value.sync="installdate(userfile.f_install_date)"
168
- placeholder="安装日期"
169
- readonly/>
170
- </div>
171
- </div>
172
- <div class="form-group row vertical-center">
173
- <button type="button" class="btn btn-primary" @click="showNewUserFile = !showNewUserFile">换表</button>
174
- </div>
175
- <div class="form-group col-xs-12 panel panel-info" v-if="showNewUserFile">
176
- <div class="panel-heading head col-xs-12" style="background-color: #e8f4ff;margin-bottom: 10px">
177
- <div class="col-xs-6 text-left">新表具信息</div>
178
- <div class="col-xs-6 text-right">
179
- <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">
180
- <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>
181
- <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>
182
- <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>
183
- <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>
184
- <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>
185
- </svg>
186
- </div>
187
- </div>
188
- <div class="form-group row vertical-center" :class="[$v.f_gasbrand_id.required ? 'has-error' : '']">
189
- <label class="col-xs-4 control-label">新气表品牌:</label>
190
- <div class="col-xs-8">
191
- <input type="text" v-show="false" v-model="newUserfile.f_new_gasbrand_id" :value.sync="newUserfile.f_new_gasbrand_id" >
192
- <input-select
193
- class="select select_list"
194
- :value.sync="newUserfile.f_new_gasbrand_id"
195
- v-model="newUserfile.f_new_gasbrand_id"
196
- :options="meterBrandList"
197
- @change="gasbrandChange()"
198
- :disable="mark === 1 || gasbrandDisable"
199
- :valueSingle="true"></input-select>
200
- </div>
201
- </div>
202
- <div class="form-group row vertical-center" :class="[$v.f_gasmodel_id.required ? 'has-error' : '']">
203
- <label class="col-xs-4 control-label">新气表型号:</label>
204
- <div class="col-xs-8">
205
- <input type="text" v-show="false" v-model="newUserfile.f_new_gasmodel_id"
206
- :value.sync="newUserfile.f_new_gasmodel_id" >
207
- <input-select
208
- class="select select_list"
209
- :value.sync="newUserfile.f_new_gasmodel_id"
210
- v-model="newUserfile.f_new_gasmodel_id"
211
- :options.sync="newgasModelList"
212
- :disable="mark === 1 || gasbrandDisable"
213
- :valueSingle="true"></input-select>
214
- </div>
215
- </div>
216
- <div class="form-group row vertical-center" :class="[$v.f_meternumber.required ? 'has-error' : '']">
217
- <label class="col-xs-4 control-label">新&ensp;表&ensp;号:</label>
218
- <div class="col-xs-8">
219
- <input class="form-control input_view" style=""
220
- placeholder="表号"
221
- v-model="newUserfile.f_new_meternumber"
222
- :value.sync="newUserfile.f_new_meternumber"
223
- @change="meternumberValidate()"
224
- :readonly="mark === 1"/>
225
- </div>
226
- </div>
227
- <div class="form-group row vertical-center">
228
- <label class="col-xs-4 control-label">新表封号:</label>
229
- <div class="col-xs-8">
230
- <input class="form-control input_view" style=""
231
- placeholder="新表封号"
232
- v-model="newUserfile.f_new_metertitles"
233
- :value="newUserfile.f_new_metertitles"
234
- :readonly="mark === 1"/>
235
- </div>
236
- </div>
237
- <div class="form-group row vertical-center">
238
- <label class="col-xs-4 control-label">新表读数:</label>
239
- <div class="col-xs-8">
240
- <input class="form-control input_view" style=""
241
- type="number"
242
- placeholder="新表读数"
243
- v-model="newUserfile.f_new_meter_base"
244
- :value="newUserfile.f_new_meter_base"
245
- :readonly="mark === 1"/>
246
- </div>
247
- </div>
248
- <div class="form-group row vertical-center">
249
- <label class="col-xs-4 control-label">新初始底数:</label>
250
- <div class="col-xs-8">
251
- <input class="form-control input_view" style=""
252
- type="number"
253
- v-model="newUserfile.f_new_initial_base"
254
- :value="newUserfile.f_new_initial_base"
255
- placeholder="新初始底数"
256
- :readonly="mark === 1"/>
257
- </div>
258
- </div>
259
- <div class="form-group row vertical-center">
260
- <label class="col-xs-4 control-label">新&ensp;表&ensp;向:</label>
261
- <div class="col-xs-8">
262
- <input-select
263
- class="select select_list"
264
- :value.sync="newUserfile.f_new_aroundmeter"
265
- v-model="newUserfile.f_new_aroundmeter"
266
- :options="aroundmeters"
267
- :disable="mark === 1"
268
- :valueSingle="true"></input-select>
269
- </div>
270
- </div>
271
- <div class="form-group row vertical-center">
272
- <label class="col-xs-4 control-label">新安装位置:</label>
273
- <div class="col-xs-8">
274
- <input-select
275
- class="select select_list"
276
- :value.sync="newUserfile.f_new_position"
277
- v-model="newUserfile.f_new_position"
278
- :options="positions"
279
- :disable="mark === 1"
280
- :valueSingle="true"></input-select>
281
- </div>
282
- </div>
283
- </div>
284
- </div>
285
- </article>
286
- <footer slot="modal-footer" class="modal-footer">
287
- <template v-if="mark !== 1">
288
- <button type="button" class="btn btn-primary" @click="saveUserFile" :disabled="!$v.valid">确认</button>
289
- </template>
290
- </footer>
291
- </modal>
292
- </validator>
293
- </div>
294
-
295
- </template>
296
- <script>
297
- import Vue from 'vue'
298
- import {PagedList} from 'vue-client'
299
- import {HttpResetClass} from 'vue-client'
300
- import {isEmpty} from '../../../Util'
301
-
302
- export default {
303
- title: '安装明细',
304
- props: {
305
- selectdata: {
306
- type: Object
307
- },
308
- mark: {
309
- type: Number,
310
- default: 0
311
- }
312
- },
313
- data () {
314
- return {
315
- showModal: false,
316
- model: {
317
- rows: null
318
- },
319
- areaList: [],
320
- area: {},
321
- userinfo: {},
322
- userfile: {},
323
- meterBrandList: [],
324
- gasModelList: [],
325
- scanCodeConfig: null,
326
- gasbrandDisable: false,
327
- showNewUserFile: false,
328
- newUserfile: {},
329
- newgasModelList: []
330
- }
331
- },
332
- ready () {
333
- this.search()
334
- this.getMeterBrand()
335
-
336
- this.getScanCodeConfig()
337
- },
338
- methods: {
339
- async getScanCodeConfig () {
340
- let http = new HttpResetClass()
341
- let res = await http.load(
342
- 'POST',
343
- `${this.$androidUtil.getProxyUrl()}/rs/logic/getScanCodeConfig`,
344
- null,
345
- {resolveMsg: null, rejectMsg: '扫码配置获取失败!!!'}
346
- )
347
-
348
- this.scanCodeConfig = res.data
349
- },
350
- scanCode () {
351
- console.log('===============扫码===================')
352
- HostApp.__this__=this,
353
- HostApp.scanCode({callback:"javascript:HostApp.__this__.getCode();"})
354
-
355
- this.getCode()
356
- },
357
- getCode() {
358
- let code = HostApp.getCode().data;
359
- // let code = '012199312345'
360
- console.log('===========扫码结果=============')
361
- console.log(code)
362
- if (!/^\d{12}$/.test(this.userfile.f_meternumber)) {
363
- if(!/^\d{14}$/.test(this.userfile.f_meternumber)){
364
- this.$showAlert('表号不符合规则', 'danger', 3000)
365
- return
366
- }
367
- }
368
-
369
- // 解析厂家
370
- let factory = null
371
- for (const item of this.scanCodeConfig.factory) {
372
- if (item.key === code.substring(0, 2)) {
373
- factory = item.val
374
- break
375
- }
376
- }
377
- if (isEmpty(factory)) {
378
- this.$showAlert('未知厂家!!!', 'danger', 3000)
379
- return
380
- }
381
- console.log(factory)
382
-
383
- // 解析运营商
384
- let ips = null
385
- for (const item of this.scanCodeConfig.ips) {
386
- if (item.key === code.substring(5, 6)) {
387
- ips = item.val
388
- break
389
- }
390
- }
391
- if (isEmpty(ips)) {
392
- this.$showAlert('未知运营商!!!', 'danger', 3000)
393
- return
394
- }
395
- console.log(ips)
396
-
397
- // 表向
398
- console.log(code.substring(6, 7) % 2 === 0 ? '偶数' : '奇数')
399
- console.log(code.substring(6, 7) % 2 === 0 ? '右表' : '左表')
400
- this.userfile.f_aroundmeter = code.substring(6, 7) % 2 === 0 ? '右表' : '左表'
401
-
402
- // 顺序号
403
- console.log(code.substring(7, 12))
404
- if (code.substring(7, 12) < this.scanCodeConfig.number.min || code.substring(7, 12) > this.scanCodeConfig.number.max) {
405
- this.$showAlert('顺序号超出范围!!!', 'danger', 3000)
406
- return
407
- }
408
-
409
- for (const item of this.meterBrandList) {
410
- if (item.label === factory) {
411
- // this.userfile.f_gasbrand_id = item.value
412
- // this.gasbrandChange()
413
- break
414
- }
415
- }
416
-
417
- Vue.set(this.userfile, 'f_meternumber', code)
418
-
419
- this.meternumberValidate()
420
- },
421
- // 保存档案
422
- async saveUserFile() {
423
- let data = {
424
- user: Vue.user,
425
- userinfo: this.userinfo,
426
- userfile: this.userfile,
427
- newUserfile: this.newUserfile,
428
- selectdata: this.selectdata
429
- }
430
- let res = await this.$resetpost(`${this.$androidUtil.getProxyUrl()}/rs/logic/ApplyAddNweUserfiles`, {data:data}, {
431
- resolveMsg: null,
432
- rejectMsg: '用户档案添加失败!!!'
433
- })
434
- this.$dispatch('breakControl', this.selectdata)
435
- },
436
- ifDisable() {
437
- if (this.selectdata.f_apply_type === '非民用报建' && this.selectdata.defname === '工程施工') {
438
- this.gasbrandDisable = true
439
- }
440
- },
441
- // 检查表号是否存在
442
- async meternumberValidate() {
443
- if (!this.newUserfile.f_gasbrand_id) {
444
- this.newUserfile.f_meternumber = ''
445
- this.$showAlert('请先选择气表品牌!!!', 'warning', 3000)
446
- return
447
- }
448
- if (this.newUserfile.f_new_gasbrand_id && this.newUserfile.f_new_meternumber) {
449
- let data = {
450
- f_meternumber: this.newUserfile.f_new_meternumber,
451
- f_gasbrand_id: this.newUserfile.f_new_gasbrand_id
452
- }
453
- if (this.newUserfile.f_user_id) {
454
- data.f_user_id = this.newUserfile.f_user_id
455
- }
456
- let res = await this.$resetpost(`${this.$androidUtil.getProxyUrl()}/rs/logic/meterbrandsNumberValidate`, {data:data}, {
457
- resolveMsg: null,
458
- rejectMsg: '表号验证失败!!'
459
- })
460
- console.log(`查询结果${res.data}`)
461
- console.log(res.data)
462
- if (res.data === '表号已存在' || res.data === '表号无效') {
463
- this.newUserfile.f_meternumber = ''
464
- this.$showAlert(res.data, 'warning', 3000)
465
- }
466
- }
467
- },
468
- // 选择气表品牌
469
- async gasbrandChange() {
470
- // 清空已保存的气表型号
471
- // this.newUserfile.f_new_gasbrand_id = null
472
- if (isEmpty(newUserfile.f_new_gasbrand_id)) {
473
- return
474
- }
475
- let data = {
476
- f_gasbrand_id: newUserfile.f_new_gasbrand_id
477
- }
478
- let http = new HttpResetClass()
479
- let res = await http.load(
480
- 'POST',
481
- `${this.$androidUtil.getProxyUrl()}/rs/sql/getGasModel`,
482
- {data: data},
483
- {resolveMsg: null, rejectMsg: '气表型号查询失败!!!'}
484
- )
485
-
486
- this.newgasModelList = res.data
487
-
488
- data = {
489
- tablename: 't_gasbrand',
490
- condition: `id = '${this.newUserfile.f_new_gasbrand_id}'`
491
- }
492
- res = await http.load(
493
- 'POST',
494
- `${this.$androidUtil.getProxyUrl()}/rs/sql/applySingleTable`,
495
- {data: data},
496
- {resolveMsg: null, rejectMsg: '表具类型查询失败!!!'}
497
- )
498
- this.newUserfile.f_new_meter_classify = res.data[0].f_meter_type
499
- },
500
- // 打开安装明细
501
- async openModal (row) {
502
- this.ifDisable()
503
- if (row) {
504
- console.log('------------------修正---------------------')
505
- this.userinfo = row
506
-
507
-
508
- let data = {
509
- tablename: 't_userfiles',
510
- condition: `f_userinfo_id = ${row.f_userinfo_id}`
511
- }
512
- let http = new HttpResetClass()
513
- let res = await http.load(
514
- 'POST',
515
- `${this.$androidUtil.getProxyUrl()}/rs/sql/applySingleTable`,
516
- {data: data},
517
- {resolveMsg: null, rejectMsg: '表档案查询失败!!!'}
518
- )
519
- this.userfile = res.data[0]
520
-
521
- let newdata = {
522
- tablename: 't_userfiles_modify',
523
- condition: `f_userinfo_id = ${row.f_userinfo_id}`
524
- }
525
- let newRes = await http.load(
526
- 'POST',
527
- `${this.$androidUtil.getProxyUrl()}/rs/sql/applySingleTable`,
528
- {data: newdata},
529
- {resolveMsg: null, rejectMsg: '表档案查询失败!!!'}
530
- )
531
- if (newRes.data.length > 0) {
532
-
533
- this.newUserfile = newRes.data[0]
534
- if (!isEmpty(this.newUserfile.f_new_gasbrand_id)) {
535
- let data = {
536
- f_gasbrand_id: this.newUserfile.f_new_gasbrand_id
537
- }
538
- let res = await http.load(
539
- 'POST',
540
- `${this.$androidUtil.getProxyUrl()}/rs/sql/getGasModel`,
541
- {data: data},
542
- {resolveMsg: null, rejectMsg: '气表型号查询失败!!!'}
543
- )
544
- this.newgasModelList = res.data
545
- }
546
- }
547
-
548
-
549
- if (!isEmpty(this.userfile.f_gasbrand_id)) {
550
- let data = {
551
- f_gasbrand_id: this.userfile.f_gasbrand_id
552
- }
553
- let http = new HttpResetClass()
554
- let res = await http.load(
555
- 'POST',
556
- `${this.$androidUtil.getProxyUrl()}/rs/sql/getGasModel`,
557
- {data: data},
558
- {resolveMsg: null, rejectMsg: '气表型号查询失败!!!'}
559
- )
560
-
561
- this.gasModelList = res.data
562
- }
563
- }
564
- this.showModal = true
565
- },
566
- // 获取气表品牌
567
- async getMeterBrand () {
568
- let data = {
569
- }
570
-
571
- let http = new HttpResetClass()
572
- let res = await http.load(
573
- 'POST',
574
- `${this.$androidUtil.getProxyUrl()}/rs/sql/getMeterBrand`,
575
- {data: data},
576
- {resolveMsg: null, rejectMsg: '气表品牌查询失败!!!'}
577
- )
578
-
579
- this.meterBrandList = res.data
580
- this.meterBrandList.push({label: '无', value: 'null'})
581
- },
582
- // 查询
583
- async search () {
584
- let http = new HttpResetClass()
585
- let data = {
586
- condition: `ui.f_userinfo_id = '${this.selectdata.f_userinfo_id}'`
587
- }
588
-
589
- let res = await http.load('POST',
590
- `${this.$androidUtil.getProxyUrl()}/rs/sql/getApplyUserinfo`,
591
- {data:data}, {
592
- resolveMsg: null,
593
- rejectMsg: '获取档案失败!!!'
594
- })
595
- this.model.rows = res.data
596
- },
597
- // 关闭安装明细
598
- closeUserFile() {
599
- this.showModal = false
600
- this.area = {}
601
- this.userinfo = {}
602
- this.userfile = {}
603
- this.gasModelList = {}
604
- this.newgasModelList = {}
605
- this.newUserfile = {}
606
- this.search()
607
- }
608
- },
609
- events: {
610
- },
611
- computed: {
612
- showAddress () {
613
- return this.selectdata.f_apply_type === '民用报建'
614
- },
615
- showUserInfo () {
616
- return this.selectdata.f_apply_type === '民用报建' && this.selectdata.f_apply_nature !== '分户挂表'
617
- },
618
- showUserFile () {
619
- return (this.selectdata.f_apply_type === '民用报建' && this.selectdata.f_apply_nature !== '分户挂表' && this.selectdata.defname === '工程施工') ||
620
- this.selectdata.f_apply_type === '非民用报建' ||
621
- this.selectdata.f_apply_type === '设备变更' ||
622
- this.selectdata.f_apply_type === '分户挂表'
623
- },
624
- showInstall () {
625
- return this.showUserFile && (this.selectdata.defname === '工程施工' || this.selectdata.defname === '施工通气' || this.selectdata.defname === '点火通气')
626
- },
627
- // 证件类型
628
- credentialsList() {
629
- return this.$appdata.getParam('证件类型')
630
- },
631
- // 安装人
632
- installperson() {
633
- return function (f_install_person) {
634
- if (isEmpty(f_install_person)) {
635
- return Vue.user.name
636
- }
637
- return f_install_person
638
- }
639
- },
640
- // 安装时间
641
- installdate() {
642
- return function (f_install_date) {
643
- if (isEmpty(f_install_date)) {
644
- return new Date().Format('yyyy-MM-dd HH:mm:ss')
645
- }
646
- return f_install_date
647
- }
648
- },
649
- // 表向
650
- aroundmeters() {
651
- return this.$appdata.getParam('左右表')
652
- },
653
- // 安装位置
654
- positions() {
655
- return this.$appdata.getParam('安装位置')
656
- }
657
- },
658
- watch: {
659
- }
660
- }
661
- </script>
662
- <style scoped>
663
- .panel {
664
- margin-bottom: 8px;
665
- }
666
- .panel-self{
667
- border-radius: 10px;
668
- border:1px solid #499EDF;
669
- padding: 8px;
670
- }
671
- </style>
1
+ <template>
2
+ <div>
3
+ <div class="col-xs-12 col-xs-12">
4
+ <list :model="model" partial='list'>
5
+ <div partial class="panel">
6
+ <div class="panel-self">
7
+ <div class="row">
8
+ <p class="col-xs-3 text-left font"><b class="control-label-justify">客户编号</b></p>
9
+ <p class="col-xs-8 col-xs-offset-1 text-left input-font">{{ row.f_userinfo_id }}</p>
10
+ </div>
11
+ <div class="row">
12
+ <p class="col-xs-3 text-left font"><b class="control-label-justify">客户名称</b></p>
13
+ <p class="col-xs-8 col-xs-offset-1 text-left input-font">{{ row.f_user_name }}</p>
14
+ </div>
15
+ <div class="row">
16
+ <p class="col-xs-3 text-left font"><b class="control-label-justify">客户电话</b></p>
17
+ <p class="col-xs-8 col-xs-offset-1 text-left input-font">{{ row.f_user_phone }}</p>
18
+ </div>
19
+ <div class="row">
20
+ <p class="col-xs-3 text-left font"><b class="control-label-justify">地址信息</b></p>
21
+ <p class="col-xs-8 col-xs-offset-1 text-left input-font">{{row.f_address}}{{row.f_address_detail}}</p>
22
+ </div>
23
+ <div class="row">
24
+ <p class="col-xs-3 text-left font"><b class="control-label-justify">表号</b></p>
25
+ <p class="col-xs-8 col-xs-offset-1 text-left input-font">{{ row.f_meternumber }}</p>
26
+ </div>
27
+ <div class="row">
28
+ <p class="col-xs-3 text-left font"><b class="control-label-justify">气表品牌</b></p>
29
+ <p class="col-xs-8 col-xs-offset-1 text-left input-font">{{ row.f_meter_brand }}</p>
30
+ </div>
31
+ <div class="row">
32
+ <p class="col-xs-3 text-left font"><b class="control-label-justify">气表型号</b></p>
33
+ <p class="col-xs-8 col-xs-offset-1 text-left input-font">{{ row.f_meter_style }}</p>
34
+ </div>
35
+ <div class="row text-right">
36
+ <button class="btn btn-info"
37
+ @click.prevent="$parent.$parent.openModal(row)">
38
+ {{$parent.$parent.mark === 1 ? '查看' : '修正'}}
39
+ </button>
40
+ </div>
41
+ </div>
42
+ </div>
43
+ </list>
44
+ </div>
45
+
46
+ <validator name="v">
47
+ <modal v-if="showModal" :show.sync="showModal" v-ref:modal :large="true" :backdrop="false">
48
+ <header slot="modal-header" class="modal-header">
49
+ <button type="button" class="close" @click="closeUserFile"><span>&times;</span></button>
50
+ <h4 class="modal-title">安装明细</h4>
51
+ </header>
52
+ <article slot="modal-body" class="modal-body clearfix">
53
+ <!-- 表具信息 -->
54
+ <div class="form-group col-xs-12 panel panel-info" v-if="showUserFile">
55
+ <div class="panel-heading head col-xs-12" style="background-color: #e8f4ff;margin-bottom: 10px">
56
+ <div class="col-xs-6 text-left">旧表具信息</div>
57
+ </div>
58
+ <div class="form-group row vertical-center" :class="[$v.f_gasbrand_id.required ? 'has-error' : '']">
59
+ <label class="col-xs-4 control-label">气表品牌:</label>
60
+ <div class="col-xs-8">
61
+ <input type="text" v-show="false" v-model="userfile.f_gasbrand_id" :value.sync="userfile.f_gasbrand_id" v-validate:f_gasbrand_id = "['required']" >
62
+ <input-select
63
+ class="select select_list"
64
+ :value.sync="userfile.f_gasbrand_id"
65
+ v-model="userfile.f_gasbrand_id"
66
+ :options="meterBrandList"
67
+ @change="gasbrandChange()"
68
+ :disable="mark === 1 || userinfo.f_user_state === '正常' || gasbrandDisable"
69
+ :valueSingle="true"></input-select>
70
+ </div>
71
+ </div>
72
+ <div class="form-group row vertical-center" :class="[$v.f_gasmodel_id.required ? 'has-error' : '']">
73
+ <label class="col-xs-4 control-label">气表型号:</label>
74
+ <div class="col-xs-8">
75
+ <input type="text" v-show="false" v-model="userfile.f_gasmodel_id" :value.sync="userfile.f_gasmodel_id" v-validate:f_gasmodel_id = "['required']" >
76
+ <input-select
77
+ class="select select_list"
78
+ :value.sync="userfile.f_gasmodel_id"
79
+ v-model="userfile.f_gasmodel_id"
80
+ :options.sync="gasModelList"
81
+ :disable="mark === 1 || userinfo.f_user_state === '正常' || gasbrandDisable"
82
+ :valueSingle="true"></input-select>
83
+ </div>
84
+ </div>
85
+ <div class="form-group row vertical-center" :class="[$v.f_meternumber.required ? 'has-error' : '']">
86
+ <label class="col-xs-4 control-label">表&emsp;&emsp;号:</label>
87
+ <div class="col-xs-8">
88
+ <input class="form-control input_view" style=""
89
+ placeholder="表号" v-validate:f_meternumber = "['required']"
90
+ v-model="newUserfile.f_meternumber"
91
+ :value.sync="userfile.f_meternumber"
92
+ @change="meternumberValidate()"
93
+ :readonly="mark === 1 || userinfo.f_user_state === '正常'"/>
94
+ </div>
95
+ </div>
96
+ <div class="form-group row vertical-center">
97
+ <label class="col-xs-4 control-label">表&ensp;封&ensp;号:</label>
98
+ <div class="col-xs-8">
99
+ <input class="form-control input_view" style=""
100
+ placeholder="表封号"
101
+ v-model="newUserfile.f_metertitles"
102
+ :value="userfile.f_metertitles"
103
+ :readonly="mark === 1 || userinfo.f_user_state === '正常'"/>
104
+ </div>
105
+ </div>
106
+ <div class="form-group row vertical-center">
107
+ <label class="col-xs-4 control-label">表&ensp;读&ensp;数:</label>
108
+ <div class="col-xs-8">
109
+ <input class="form-control input_view" style=""
110
+ type="number"
111
+ placeholder="表读数"
112
+ v-model="newUserfile.f_meter_base"
113
+ :value="userfile.f_meter_base"
114
+ :readonly="mark === 1 || userinfo.f_user_state === '正常'"/>
115
+ </div>
116
+ </div>
117
+ <div class="form-group row vertical-center">
118
+ <label class="col-xs-4 control-label">初始底数:</label>
119
+ <div class="col-xs-8">
120
+ <input class="form-control input_view" style=""
121
+ type="number"
122
+ v-model="newUserfile.f_initial_base"
123
+ :value="userfile.f_initial_base"
124
+ placeholder="初始底数"
125
+ :readonly="mark === 1 || userinfo.f_user_state === '正常'"/>
126
+ </div>
127
+ </div>
128
+ <div class="form-group row vertical-center">
129
+ <label class="col-xs-4 control-label">表&emsp;&emsp;向:</label>
130
+ <div class="col-xs-8">
131
+ <input-select
132
+ class="select select_list"
133
+ :value.sync="userfile.f_aroundmeter"
134
+ v-model="newUserfile.f_aroundmeter"
135
+ :options="aroundmeters"
136
+ :disable="mark === 1 || userinfo.f_user_state === '正常'"
137
+ :valueSingle="true"></input-select>
138
+ </div>
139
+ </div>
140
+ <div class="form-group row vertical-center">
141
+ <label class="col-xs-4 control-label">安装位置:</label>
142
+ <div class="col-xs-8">
143
+ <input-select
144
+ class="select select_list"
145
+ :value.sync="userfile.f_position"
146
+ v-model="newUserfile.f_position"
147
+ :options="positions"
148
+ :disable="mark === 1 || userinfo.f_user_state === '正常'"
149
+ :valueSingle="true"></input-select>
150
+ </div>
151
+ </div>
152
+ <div class="form-group row vertical-center">
153
+ <label class="col-xs-4 control-label">安&ensp;装&ensp;人:</label>
154
+ <div class="col-xs-8">
155
+ <input class="form-control input_view" style=""
156
+ v-model="newUserfile.f_install_person"
157
+ :value.sync="installperson(userfile.f_install_person)"
158
+ placeholder="安装人"
159
+ readonly/>
160
+ </div>
161
+ </div>
162
+ <div class="form-group row vertical-center">
163
+ <label class="col-xs-4 control-label">安装日期:</label>
164
+ <div class="col-xs-8">
165
+ <input class="form-control input_view" style=""
166
+ v-model="newUserfile.f_install_date"
167
+ :value.sync="installdate(userfile.f_install_date)"
168
+ placeholder="安装日期"
169
+ readonly/>
170
+ </div>
171
+ </div>
172
+ <div class="form-group row vertical-center">
173
+ <button type="button" class="btn btn-primary" @click="showNewUserFile = !showNewUserFile">换表</button>
174
+ </div>
175
+ <div class="form-group col-xs-12 panel panel-info" v-if="showNewUserFile">
176
+ <div class="panel-heading head col-xs-12" style="background-color: #e8f4ff;margin-bottom: 10px">
177
+ <div class="col-xs-6 text-left">新表具信息</div>
178
+ <div class="col-xs-6 text-right">
179
+ <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">
180
+ <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>
181
+ <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>
182
+ <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>
183
+ <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>
184
+ <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>
185
+ </svg>
186
+ </div>
187
+ </div>
188
+ <div class="form-group row vertical-center" :class="[$v.f_gasbrand_id.required ? 'has-error' : '']">
189
+ <label class="col-xs-4 control-label">新气表品牌:</label>
190
+ <div class="col-xs-8">
191
+ <input type="text" v-show="false" v-model="newUserfile.f_new_gasbrand_id" :value.sync="newUserfile.f_new_gasbrand_id" >
192
+ <input-select
193
+ class="select select_list"
194
+ :value.sync="newUserfile.f_new_gasbrand_id"
195
+ v-model="newUserfile.f_new_gasbrand_id"
196
+ :options="meterBrandList"
197
+ @change="gasbrandChange()"
198
+ :disable="mark === 1 || gasbrandDisable"
199
+ :valueSingle="true"></input-select>
200
+ </div>
201
+ </div>
202
+ <div class="form-group row vertical-center" :class="[$v.f_gasmodel_id.required ? 'has-error' : '']">
203
+ <label class="col-xs-4 control-label">新气表型号:</label>
204
+ <div class="col-xs-8">
205
+ <input type="text" v-show="false" v-model="newUserfile.f_new_gasmodel_id"
206
+ :value.sync="newUserfile.f_new_gasmodel_id" >
207
+ <input-select
208
+ class="select select_list"
209
+ :value.sync="newUserfile.f_new_gasmodel_id"
210
+ v-model="newUserfile.f_new_gasmodel_id"
211
+ :options.sync="newgasModelList"
212
+ :disable="mark === 1 || gasbrandDisable"
213
+ :valueSingle="true"></input-select>
214
+ </div>
215
+ </div>
216
+ <div class="form-group row vertical-center" :class="[$v.f_meternumber.required ? 'has-error' : '']">
217
+ <label class="col-xs-4 control-label">新&ensp;表&ensp;号:</label>
218
+ <div class="col-xs-8">
219
+ <input class="form-control input_view" style=""
220
+ placeholder="表号"
221
+ v-model="newUserfile.f_new_meternumber"
222
+ :value.sync="newUserfile.f_new_meternumber"
223
+ @change="meternumberValidate()"
224
+ :readonly="mark === 1"/>
225
+ </div>
226
+ </div>
227
+ <div class="form-group row vertical-center">
228
+ <label class="col-xs-4 control-label">新表封号:</label>
229
+ <div class="col-xs-8">
230
+ <input class="form-control input_view" style=""
231
+ placeholder="新表封号"
232
+ v-model="newUserfile.f_new_metertitles"
233
+ :value="newUserfile.f_new_metertitles"
234
+ :readonly="mark === 1"/>
235
+ </div>
236
+ </div>
237
+ <div class="form-group row vertical-center">
238
+ <label class="col-xs-4 control-label">新表读数:</label>
239
+ <div class="col-xs-8">
240
+ <input class="form-control input_view" style=""
241
+ type="number"
242
+ placeholder="新表读数"
243
+ v-model="newUserfile.f_new_meter_base"
244
+ :value="newUserfile.f_new_meter_base"
245
+ :readonly="mark === 1"/>
246
+ </div>
247
+ </div>
248
+ <div class="form-group row vertical-center">
249
+ <label class="col-xs-4 control-label">新初始底数:</label>
250
+ <div class="col-xs-8">
251
+ <input class="form-control input_view" style=""
252
+ type="number"
253
+ v-model="newUserfile.f_new_initial_base"
254
+ :value="newUserfile.f_new_initial_base"
255
+ placeholder="新初始底数"
256
+ :readonly="mark === 1"/>
257
+ </div>
258
+ </div>
259
+ <div class="form-group row vertical-center">
260
+ <label class="col-xs-4 control-label">新&ensp;表&ensp;向:</label>
261
+ <div class="col-xs-8">
262
+ <input-select
263
+ class="select select_list"
264
+ :value.sync="newUserfile.f_new_aroundmeter"
265
+ v-model="newUserfile.f_new_aroundmeter"
266
+ :options="aroundmeters"
267
+ :disable="mark === 1"
268
+ :valueSingle="true"></input-select>
269
+ </div>
270
+ </div>
271
+ <div class="form-group row vertical-center">
272
+ <label class="col-xs-4 control-label">新安装位置:</label>
273
+ <div class="col-xs-8">
274
+ <input-select
275
+ class="select select_list"
276
+ :value.sync="newUserfile.f_new_position"
277
+ v-model="newUserfile.f_new_position"
278
+ :options="positions"
279
+ :disable="mark === 1"
280
+ :valueSingle="true"></input-select>
281
+ </div>
282
+ </div>
283
+ </div>
284
+ </div>
285
+ </article>
286
+ <footer slot="modal-footer" class="modal-footer">
287
+ <template v-if="mark !== 1">
288
+ <button type="button" class="btn btn-primary" @click="saveUserFile" :disabled="!$v.valid">确认</button>
289
+ </template>
290
+ </footer>
291
+ </modal>
292
+ </validator>
293
+ </div>
294
+
295
+ </template>
296
+ <script>
297
+ import Vue from 'vue'
298
+ import {PagedList} from 'vue-client'
299
+ import {HttpResetClass} from 'vue-client'
300
+ import {isEmpty} from '../../../Util'
301
+
302
+ export default {
303
+ title: '安装明细',
304
+ props: {
305
+ selectdata: {
306
+ type: Object
307
+ },
308
+ mark: {
309
+ type: Number,
310
+ default: 0
311
+ }
312
+ },
313
+ data () {
314
+ return {
315
+ showModal: false,
316
+ model: {
317
+ rows: null
318
+ },
319
+ areaList: [],
320
+ area: {},
321
+ userinfo: {},
322
+ userfile: {},
323
+ meterBrandList: [],
324
+ gasModelList: [],
325
+ scanCodeConfig: null,
326
+ gasbrandDisable: false,
327
+ showNewUserFile: false,
328
+ newUserfile: {},
329
+ newgasModelList: []
330
+ }
331
+ },
332
+ ready () {
333
+ this.search()
334
+ this.getMeterBrand()
335
+
336
+ this.getScanCodeConfig()
337
+ },
338
+ methods: {
339
+ async getScanCodeConfig () {
340
+ let http = new HttpResetClass()
341
+ let res = await http.load(
342
+ 'POST',
343
+ `${this.$androidUtil.getProxyUrl()}/rs/logic/getScanCodeConfig`,
344
+ null,
345
+ {resolveMsg: null, rejectMsg: '扫码配置获取失败!!!'}
346
+ )
347
+
348
+ this.scanCodeConfig = res.data
349
+ },
350
+ scanCode () {
351
+ console.log('===============扫码===================')
352
+ HostApp.__this__=this,
353
+ HostApp.scanCode({callback:"javascript:HostApp.__this__.getCode();"})
354
+
355
+ this.getCode()
356
+ },
357
+ getCode() {
358
+ let code = HostApp.getCode().data;
359
+ // let code = '012199312345'
360
+ console.log('===========扫码结果=============')
361
+ console.log(code)
362
+ if (!/^\d{12}$/.test(this.userfile.f_meternumber)) {
363
+ if(!/^\d{14}$/.test(this.userfile.f_meternumber)){
364
+ this.$showAlert('表号不符合规则', 'danger', 3000)
365
+ return
366
+ }
367
+ }
368
+
369
+ // 解析厂家
370
+ let factory = null
371
+ for (const item of this.scanCodeConfig.factory) {
372
+ if (item.key === code.substring(0, 2)) {
373
+ factory = item.val
374
+ break
375
+ }
376
+ }
377
+ if (isEmpty(factory)) {
378
+ this.$showAlert('未知厂家!!!', 'danger', 3000)
379
+ return
380
+ }
381
+ console.log(factory)
382
+
383
+ // 解析运营商
384
+ let ips = null
385
+ for (const item of this.scanCodeConfig.ips) {
386
+ if (item.key === code.substring(5, 6)) {
387
+ ips = item.val
388
+ break
389
+ }
390
+ }
391
+ if (isEmpty(ips)) {
392
+ this.$showAlert('未知运营商!!!', 'danger', 3000)
393
+ return
394
+ }
395
+ console.log(ips)
396
+
397
+ // 表向
398
+ console.log(code.substring(6, 7) % 2 === 0 ? '偶数' : '奇数')
399
+ console.log(code.substring(6, 7) % 2 === 0 ? '右表' : '左表')
400
+ this.userfile.f_aroundmeter = code.substring(6, 7) % 2 === 0 ? '右表' : '左表'
401
+
402
+ // 顺序号
403
+ console.log(code.substring(7, 12))
404
+ if (code.substring(7, 12) < this.scanCodeConfig.number.min || code.substring(7, 12) > this.scanCodeConfig.number.max) {
405
+ this.$showAlert('顺序号超出范围!!!', 'danger', 3000)
406
+ return
407
+ }
408
+
409
+ for (const item of this.meterBrandList) {
410
+ if (item.label === factory) {
411
+ // this.userfile.f_gasbrand_id = item.value
412
+ // this.gasbrandChange()
413
+ break
414
+ }
415
+ }
416
+
417
+ Vue.set(this.userfile, 'f_meternumber', code)
418
+
419
+ this.meternumberValidate()
420
+ },
421
+ // 保存档案
422
+ async saveUserFile() {
423
+ let data = {
424
+ user: Vue.user,
425
+ userinfo: this.userinfo,
426
+ userfile: this.userfile,
427
+ newUserfile: this.newUserfile,
428
+ selectdata: this.selectdata
429
+ }
430
+ let res = await this.$resetpost(`${this.$androidUtil.getProxyUrl()}/rs/logic/ApplyAddNweUserfiles`, {data:data}, {
431
+ resolveMsg: null,
432
+ rejectMsg: '用户档案添加失败!!!'
433
+ })
434
+ this.$dispatch('breakControl', this.selectdata)
435
+ },
436
+ ifDisable() {
437
+ if (this.selectdata.f_apply_type === '非民用报建' && this.selectdata.defname === '工程施工') {
438
+ this.gasbrandDisable = true
439
+ }
440
+ },
441
+ // 检查表号是否存在
442
+ async meternumberValidate() {
443
+ if (!this.newUserfile.f_gasbrand_id) {
444
+ this.newUserfile.f_meternumber = ''
445
+ this.$showAlert('请先选择气表品牌!!!', 'warning', 3000)
446
+ return
447
+ }
448
+ if (this.newUserfile.f_new_gasbrand_id && this.newUserfile.f_new_meternumber) {
449
+ let data = {
450
+ f_meternumber: this.newUserfile.f_new_meternumber,
451
+ f_gasbrand_id: this.newUserfile.f_new_gasbrand_id
452
+ }
453
+ if (this.newUserfile.f_user_id) {
454
+ data.f_user_id = this.newUserfile.f_user_id
455
+ }
456
+ let res = await this.$resetpost(`${this.$androidUtil.getProxyUrl()}/rs/logic/meterbrandsNumberValidate`, {data:data}, {
457
+ resolveMsg: null,
458
+ rejectMsg: '表号验证失败!!'
459
+ })
460
+ console.log(`查询结果${res.data}`)
461
+ console.log(res.data)
462
+ if (res.data === '表号已存在' || res.data === '表号无效') {
463
+ this.newUserfile.f_meternumber = ''
464
+ this.$showAlert(res.data, 'warning', 3000)
465
+ }
466
+ }
467
+ },
468
+ // 选择气表品牌
469
+ async gasbrandChange() {
470
+ // 清空已保存的气表型号
471
+ // this.newUserfile.f_new_gasbrand_id = null
472
+ if (isEmpty(newUserfile.f_new_gasbrand_id)) {
473
+ return
474
+ }
475
+ let data = {
476
+ f_gasbrand_id: newUserfile.f_new_gasbrand_id
477
+ }
478
+ let http = new HttpResetClass()
479
+ let res = await http.load(
480
+ 'POST',
481
+ `${this.$androidUtil.getProxyUrl()}/rs/sql/getGasModel`,
482
+ {data: data},
483
+ {resolveMsg: null, rejectMsg: '气表型号查询失败!!!'}
484
+ )
485
+
486
+ this.newgasModelList = res.data
487
+
488
+ data = {
489
+ tablename: 't_gasbrand',
490
+ condition: `id = '${this.newUserfile.f_new_gasbrand_id}'`
491
+ }
492
+ res = await http.load(
493
+ 'POST',
494
+ `${this.$androidUtil.getProxyUrl()}/rs/sql/applySingleTable`,
495
+ {data: data},
496
+ {resolveMsg: null, rejectMsg: '表具类型查询失败!!!'}
497
+ )
498
+ this.newUserfile.f_new_meter_classify = res.data[0].f_meter_type
499
+ },
500
+ // 打开安装明细
501
+ async openModal (row) {
502
+ this.ifDisable()
503
+ if (row) {
504
+ console.log('------------------修正---------------------')
505
+ this.userinfo = row
506
+
507
+
508
+ let data = {
509
+ tablename: 't_userfiles',
510
+ condition: `f_userinfo_id = ${row.f_userinfo_id}`
511
+ }
512
+ let http = new HttpResetClass()
513
+ let res = await http.load(
514
+ 'POST',
515
+ `${this.$androidUtil.getProxyUrl()}/rs/sql/applySingleTable`,
516
+ {data: data},
517
+ {resolveMsg: null, rejectMsg: '表档案查询失败!!!'}
518
+ )
519
+ this.userfile = res.data[0]
520
+
521
+ let newdata = {
522
+ tablename: 't_userfiles_modify',
523
+ condition: `f_userinfo_id = ${row.f_userinfo_id}`
524
+ }
525
+ let newRes = await http.load(
526
+ 'POST',
527
+ `${this.$androidUtil.getProxyUrl()}/rs/sql/applySingleTable`,
528
+ {data: newdata},
529
+ {resolveMsg: null, rejectMsg: '表档案查询失败!!!'}
530
+ )
531
+ if (newRes.data.length > 0) {
532
+
533
+ this.newUserfile = newRes.data[0]
534
+ if (!isEmpty(this.newUserfile.f_new_gasbrand_id)) {
535
+ let data = {
536
+ f_gasbrand_id: this.newUserfile.f_new_gasbrand_id
537
+ }
538
+ let res = await http.load(
539
+ 'POST',
540
+ `${this.$androidUtil.getProxyUrl()}/rs/sql/getGasModel`,
541
+ {data: data},
542
+ {resolveMsg: null, rejectMsg: '气表型号查询失败!!!'}
543
+ )
544
+ this.newgasModelList = res.data
545
+ }
546
+ }
547
+
548
+
549
+ if (!isEmpty(this.userfile.f_gasbrand_id)) {
550
+ let data = {
551
+ f_gasbrand_id: this.userfile.f_gasbrand_id
552
+ }
553
+ let http = new HttpResetClass()
554
+ let res = await http.load(
555
+ 'POST',
556
+ `${this.$androidUtil.getProxyUrl()}/rs/sql/getGasModel`,
557
+ {data: data},
558
+ {resolveMsg: null, rejectMsg: '气表型号查询失败!!!'}
559
+ )
560
+
561
+ this.gasModelList = res.data
562
+ }
563
+ }
564
+ this.showModal = true
565
+ },
566
+ // 获取气表品牌
567
+ async getMeterBrand () {
568
+ let data = {
569
+ }
570
+
571
+ let http = new HttpResetClass()
572
+ let res = await http.load(
573
+ 'POST',
574
+ `${this.$androidUtil.getProxyUrl()}/rs/sql/getMeterBrand`,
575
+ {data: data},
576
+ {resolveMsg: null, rejectMsg: '气表品牌查询失败!!!'}
577
+ )
578
+
579
+ this.meterBrandList = res.data
580
+ this.meterBrandList.push({label: '无', value: 'null'})
581
+ },
582
+ // 查询
583
+ async search () {
584
+ let http = new HttpResetClass()
585
+ let data = {
586
+ condition: `ui.f_userinfo_id = '${this.selectdata.f_userinfo_id}'`
587
+ }
588
+
589
+ let res = await http.load('POST',
590
+ `${this.$androidUtil.getProxyUrl()}/rs/sql/getApplyUserinfo`,
591
+ {data:data}, {
592
+ resolveMsg: null,
593
+ rejectMsg: '获取档案失败!!!'
594
+ })
595
+ this.model.rows = res.data
596
+ },
597
+ // 关闭安装明细
598
+ closeUserFile() {
599
+ this.showModal = false
600
+ this.area = {}
601
+ this.userinfo = {}
602
+ this.userfile = {}
603
+ this.gasModelList = {}
604
+ this.newgasModelList = {}
605
+ this.newUserfile = {}
606
+ this.search()
607
+ }
608
+ },
609
+ events: {
610
+ },
611
+ computed: {
612
+ showAddress () {
613
+ return this.selectdata.f_apply_type === '民用报建'
614
+ },
615
+ showUserInfo () {
616
+ return this.selectdata.f_apply_type === '民用报建' && this.selectdata.f_apply_nature !== '分户挂表'
617
+ },
618
+ showUserFile () {
619
+ return (this.selectdata.f_apply_type === '民用报建' && this.selectdata.f_apply_nature !== '分户挂表' && this.selectdata.defname === '工程施工') ||
620
+ this.selectdata.f_apply_type === '非民用报建' ||
621
+ this.selectdata.f_apply_type === '设备变更' ||
622
+ this.selectdata.f_apply_type === '分户挂表'
623
+ },
624
+ showInstall () {
625
+ return this.showUserFile && (this.selectdata.defname === '工程施工' || this.selectdata.defname === '施工通气' || this.selectdata.defname === '点火通气')
626
+ },
627
+ // 证件类型
628
+ credentialsList() {
629
+ return this.$appdata.getParam('证件类型')
630
+ },
631
+ // 安装人
632
+ installperson() {
633
+ return function (f_install_person) {
634
+ if (isEmpty(f_install_person)) {
635
+ return Vue.user.name
636
+ }
637
+ return f_install_person
638
+ }
639
+ },
640
+ // 安装时间
641
+ installdate() {
642
+ return function (f_install_date) {
643
+ if (isEmpty(f_install_date)) {
644
+ return new Date().Format('yyyy-MM-dd HH:mm:ss')
645
+ }
646
+ return f_install_date
647
+ }
648
+ },
649
+ // 表向
650
+ aroundmeters() {
651
+ return this.$appdata.getParam('左右表')
652
+ },
653
+ // 安装位置
654
+ positions() {
655
+ return this.$appdata.getParam('安装位置')
656
+ }
657
+ },
658
+ watch: {
659
+ }
660
+ }
661
+ </script>
662
+ <style scoped>
663
+ .panel {
664
+ margin-bottom: 8px;
665
+ }
666
+ .panel-self{
667
+ border-radius: 10px;
668
+ border:1px solid #499EDF;
669
+ padding: 8px;
670
+ }
671
+ </style>