apply-clients 3.1.36 → 3.1.37

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.
@@ -1,1409 +1,1409 @@
1
- <template>
2
- <div class="flex col-sm-12" style="margin-top:0px;">
3
- <div class="auto" style="overflow:auto;margin: 15px 0 0 15px;">
4
- <div class="form-inline auto col-sm-12">
5
- <div class="row col-sm-12">
6
- <div class="form-group col-sm-3">
7
- <label class=" control-label" >客户姓名</label>
8
- <input type="text" class="input_search" placeholder='客户姓名' v-model="model.f_user_name"
9
- @keyup.enter="filterParams(param)" >
10
- </div>
11
- <div class="form-group col-sm-3">
12
- <label class=" control-label" >客户电话</label>
13
- <input type="text" class="input_search" placeholder='客户电话' v-model="model.f_user_phone"
14
- @keyup.enter="filterParams(param)" >
15
- </div>
16
- <div class="form-group col-sm-5" >
17
- <button type="button" class="btn btn-default" @click="filterParams(param),this.user_search()">查询</button>
18
- <button style="margin-left:10px;" type="button" class="btn btn-success" @click="impexcel()" v-show="edit">导入工料费</button>
19
- <button style="margin-left:10px;" type="button" class="btn btn-success" @click="impexcel1()" v-show="edit">导入增值产品</button>
20
- <button style="margin-left:10px;" type="button" class="btn btn-success" v-show="edit">
21
- <a href="https://cncncloud.com/s/x4A4Sj" target="_blank" style="color: white; margin-right:10px">工料费模板</a>
22
- <a href="https://cncncloud.com/s/Dx3WUV" target="_blank" style="color: white">增值产品模板</a>
23
- </button>
24
- <!-- <button style="margin-left:10px;" type="button" class="btn btn-success" @click="impexcel1()" v-show="this.selectdata.defname == '安装施工'">气表模板下载</button>-->
25
- </div>
26
- </div>
27
- <div class="row col-sm-12">
28
- <div class="form-group col-sm-3">
29
- </div>
30
- <div class="form-group col-sm-3">
31
- </div>
32
- <div class="form-group col-sm-5" style="margin-left: 59px;">
33
- <button style="margin-left:10px;" type="button" class="btn btn-success" @click="meterUpload()" v-show="this.selectdata.defname == '安装施工'">气表模板下载</button>
34
- </div>
35
- </div>
36
- </div>
37
- </div>
38
- <!--户档案管理组件-->
39
- <div class="col-sm-12 span recordTable" style="margin-top: 10px;height:70vh;">
40
-
41
- <partial-view v-ref:single-load>
42
- <data-grid :model="model" v-ref:grid>
43
- <template partial='head'>
44
- <tr>
45
- <th>档案编号</th>
46
- <th>用户编号</th>
47
- <th>用户姓名</th>
48
- <th>用户电话</th>
49
- <th>地址</th>
50
- <th>用户状态</th>
51
- <th >操作</th>
52
- </tr>
53
- </template>
54
- <template partial='body' >
55
- <td style="text-align: center">{{row.f_userinfo_id}}</td>
56
- <td style="text-align: center">{{row.f_userinfo_code}}</td>
57
- <td style="text-align: center">{{row.f_user_name}}</td>
58
- <td style="text-align: center">{{row.f_user_phone}}</td>
59
- <td style="text-align: center">{{row.f_address}}</td>
60
- <td style="text-align: center">{{row.f_user_state}}</td>
61
- <td v-show="edit"><input type="checkbox" v-model="row.f_pay" @click="$parent.$parent.$parent.paychange(row)"/></td>
62
- <td class="" style="text-align: center">
63
- <button type="button" name="button" class="btn btn-link"
64
- @click.stop="$parent.$parent.$parent.modifyParam(row)" >修改
65
- </button>
66
- <!-- <button type="button" name="button" class="btn btn-link"-->
67
- <!-- @click.stop="$parent.$parent.$parent.delete(row)">删除-->
68
- <!-- </button>-->
69
- </td>
70
- </template>
71
- </data-grid>
72
-
73
- </partial-view>
74
- </div>
75
-
76
- <div class="col-sm-12 span recordTable" style="margin-top: -154px;height:auto;" v-if="isShowdetail" >
77
- <p class="text-center" style="padding: 8px;font-size: 20px">表档案列表
78
-
79
- <button type="button" class="close" @click="isShowdetail=false" aria-hidden="true">&times;</button>
80
- </p>
81
- <partial-view v-ref:single-load>
82
- <data-grid :model="batchmodel" v-ref:batchgrid>
83
- <template partial='head'>
84
- <tr>
85
- <th>序号</th>
86
- <th>户档案编号</th>
87
- <th>表档案编号</th>
88
- <th>表号</th>
89
- <!-- <th>表箱号</th>-->
90
- <th>气表品牌</th>
91
- <th>气表型号</th>
92
- <!-- <th>气表类型</th>-->
93
- <th>通气人</th>
94
- <th>通气时间</th>
95
- <th>操作</th>
96
- </tr>
97
- </template>
98
- <template partial='body'>
99
- <td style="text-align: center">{{$index+1}}</td>
100
- <td style="text-align: center">{{row.f_userinfo_id}}</td>
101
- <td style="text-align: center">{{row.f_userfiles_id}}</td>
102
- <td style="text-align: center">{{row.f_meternumber}}</td>
103
- <!-- <td style="text-align: center">{{row.f_metertitles}}</td>-->
104
- <td style="text-align: center">{{row.f_meter_brand}}</td>
105
- <td style="text-align: center">{{row.f_meter_style}}</td>
106
- <!-- <td style="text-align: center">{{row.f_meter_type}}</td>-->
107
- <td style="text-align: center">{{row.f_gas_person}}</td>
108
- <td style="text-align: center">{{row.f_gas_date}}</td>
109
- <!--<td>{{row.f_remarks}}</td>-->
110
- <td class="" style="text-align: center">
111
- <button type="button" name="button" class="btn btn-link"
112
- @click.stop="$parent.$parent.$parent.filesModify(row)" >修改
113
- </button>
114
- <button type="button" name="button" class="btn btn-link"
115
- @click.stop="$parent.$parent.$parent.deleteItem(row)">删除
116
- </button>
117
- <!-- <button type="button" name="button" class="btn btn-link"
118
- @click.stop="$parent.$parent.$parent.deleteItem(row)" >删除
119
- </button>-->
120
- </td>
121
- </template>
122
- </data-grid>
123
-
124
-
125
-
126
-
127
- </partial-view>
128
- </div>
129
-
130
- </div>
131
- <modal :show.sync="show" v-ref:modal backdrop="false">
132
- <header slot="modal-header" class="modal-header">
133
- <button type="button" class="close" @click="close"><span>&times;</span></button>
134
- <h4 class="modal-title">配置</h4>
135
- </header>
136
- <!--户档案修改-->
137
- <article slot="modal-body" class="modal-body" >
138
- <div class="from-group" style="width: 100%">
139
- <label style="width: 15%;float: left">用户姓名</label>
140
- <input type="text" class="form-control" readonly="readonly" v-model="selectItem.f_user_name" style="width: 80%;float: left"/>
141
- </div>
142
- <div class="from-group" style="width: 100%">
143
- <label style="width: 15%;float: left">用户电话</label>
144
- <input type="text" class="form-control" readonly="readonly" v-model="selectItem.f_user_phone" style="width: 80%;float: left">
145
- </div>
146
- <!-- <div class="from-group" style="width: 100%">-->
147
- <!-- <label style="width: 15%;float: left">区/县</label>-->
148
- <!-- <input type="text" class="form-control" v-model="selectItem.f_pcd" style="width: 80%;float: left">-->
149
- <!-- </div>-->
150
- <!-- <div class="from-group" style="width: 100%">-->
151
- <!-- <label style="width: 15%;float: left">片区</label>-->
152
- <!-- <input type="text" class="form-control" v-model="selectItem.f_slice_area" style="width: 80%;float: left">-->
153
- <!-- </div>-->
154
- <div class="from-group" style="width: 100%">
155
- <label style="width: 15%;float: left">街道</label>
156
- <input type="text" class="form-control" v-model="selectItem.f_street" style="width: 80%;float: left">
157
- </div>
158
- <div class="from-group" style="width: 100%">
159
- <label style="width: 15%;float: left">小区</label>
160
- <input type="text" class="form-control" v-model="selectItem.f_residential_area" style="width: 80%;float: left">
161
- </div>
162
- <div class="from-group" style="width: 100%">
163
- <label style="width: 15%;float: left">楼号</label>
164
- <input type="text" class="form-control" v-model="selectItem.f_building" style="width: 80%;float: left">
165
- </div>
166
- <div class="from-group" style="width: 100%">
167
- <label style="width: 15%;float: left">单元号</label>
168
- <input type="text" class="form-control" v-model="selectItem.f_unit" style="width: 80%;float: left">
169
- </div>
170
- <div class="from-group" style="width: 100%">
171
- <label style="width: 15%;float: left">楼层</label>
172
- <input type="text" class="form-control" v-model="selectItem.f_floor" style="width: 80%;float: left">
173
- </div>
174
- <div class="from-group" style="width: 100%">
175
- <label style="width: 15%;float: left">门牌号</label>
176
- <input type="text" class="form-control" v-model="selectItem.f_room" style="width: 80%;float: left">
177
- </div>
178
- <!-- <div class="from-group" style="width: 100%">-->
179
- <!-- <label style="width: 15%;float: left">人口数</label>-->
180
- <!-- <input type="number" class="form-control" v-model="selectItem.f_people_num" style="width: 80%;float: left">-->
181
- <!-- </div>-->
182
- <div class="from-group" style="width: 100%">
183
- <label style="width: 15%;float: left">用户状态</label>
184
- <v-select :value.sync="selectItem.f_user_state" v-model="selectItem.f_user_state"
185
- :options='userstate' placeholder='请选择' style="width: 80%;float: left" :width="'80%'"
186
- close-on-select >
187
- </v-select>
188
- </div>
189
- </article>
190
-
191
-
192
- <footer slot="modal-footer" class="modal-footer">
193
- <div class="from-group" style="width: 100%;float: left">
194
- <button v-show="show" type="button" class="btn btn-default" @click='close'>取消</button>
195
- <button v-show="show" type="button" class="btn btn-success" @click='confirm'>确认</button>
196
- </div>
197
- </footer>
198
- </modal>
199
-
200
-
201
- <modal :show.sync="addshow" v-ref:modal backdrop="false">
202
- <header slot="modal-header" class="modal-header">
203
- <button type="button" class="close" @click="addclose"><span>&times;</span></button>
204
- <h4 class="modal-title">配置</h4>
205
- </header>
206
- <!--表档案修改-->
207
- <article slot="modal-body" class="modal-body" >
208
- <div class="from-group">
209
- <label style="width: 20%;float: left">表号</label>
210
- <input type="text" style="width: 80%;float: left" class="form-control" v-model="selectItem.f_meternumber"/>
211
- </div>
212
-
213
- <!-- <div class="from-group">-->
214
- <!-- <label style="width: 20%;float: left">表箱号</label>-->
215
- <!-- <input type="text" style="width: 80%;float: left" class="form-control" v-model="selectItem.f_metertitles"/>-->
216
- <!-- </div>-->
217
- <div class="from-group" v-if="this.selectdata.defname != '通气'">
218
- <label style="width: 20%;float: left">气表品牌</label>
219
- <v-select :value.sync="selectItem.f_meter_brand" v-model="selectItem.f_meter_brand"
220
- :options='meterbrand' placeholder='请选择' style="width: 80%;float: left" :width="'80%'"
221
- close-on-select search="">
222
- </v-select>
223
- </div>
224
- <!-- 通气时显示 -->
225
- <div class="from-group" v-if="this.selectdata.defname == '通气'">
226
- <label style="width: 20%;float: left">气表品牌</label>
227
- <input type="text" style="width: 80%;float: left" class="form-control" v-model="selectItem.f_meter_brand"/>
228
- </div>
229
-
230
- <div class="from-group" v-if="this.selectdata.defname != '通气'">
231
- <label style="width: 20%;float: left">气表型号</label>
232
- <v-select :value.sync="selectItem.f_meter_style" v-model="selectItem.f_meter_style"
233
- :options='meterstyle' placeholder='请选择' style="width: 80%;float: left" :width="'80%'"
234
- close-on-select >
235
- </v-select>
236
- </div>
237
- <!-- 通气时显示 -->
238
- <div class="from-group" v-if="this.selectdata.defname == '通气'">
239
- <label style="width: 20%;float: left">气表型号</label>
240
- <input type="text" style="width: 80%;float: left" class="form-control" v-model="selectItem.f_meter_style"/>
241
- </div>
242
-
243
- <div class="from-group" v-if="this.selectdata.defname != '通气'">
244
- <label style="width: 20%;float: left">左右表</label>
245
- <v-select :value.sync="selectItem.f_aroundmeter" v-model="selectItem.f_aroundmeter"
246
- :options='aroundmeter' placeholder='请选择' style="width: 80%;float: left" :width="'80%'"
247
- close-on-select >
248
- </v-select>
249
- </div>
250
- <!-- 通气时显示 -->
251
- <div class="from-group" v-if="this.selectdata.defname == '通气'">
252
- <label style="width: 20%;float: left">左右表</label>
253
- <input type="text" style="width: 80%;float: left" class="form-control" v-model="selectItem.f_aroundmeter"/>
254
- </div>
255
-
256
- <!-- <div class="from-group">-->
257
- <!-- <label style="width: 20%;float: left">表状态</label>-->
258
- <!-- <input type="text" style="width: 80%;float: left" class="form-control" v-model="selectItem.f_table_state"/>-->
259
- <!-- </div>-->
260
- <div class="from-group" v-if="this.selectdata.defname == '通气'">
261
- <label style="width: 20%;float: left">气价名称</label>
262
- <v-select :value.sync="selectItem.f_price_name" v-model="selectItem.f_price_name"
263
- :options='pricename' placeholder='请选择' style="width: 80%;float: left" :width="'80%'" @change="priceChange"
264
- close-on-select >
265
- </v-select>
266
- </div>
267
- <!-- <div class="from-group">-->
268
- <!-- <label style="width: 20%;float: left">客户类型</label>-->
269
- <!-- <v-select :value.sync="selectItem.f_user_type" v-model="selectItem.f_user_type" :width="'80%'"-->
270
- <!-- :options='usertypes' placeholder='请选择' style="width: 80%;float: left"-->
271
- <!-- close-on-select >-->
272
- <!-- </v-select>-->
273
- <!-- </div>-->
274
- <div class="from-group" v-if="this.selectdata.defname == '通气'">
275
- <label style="width: 20%;float: left">客户类型</label>
276
- <input type="text" style="width: 80%;float: left" class="form-control" v-model="selectItem.f_user_type" />
277
- </div>
278
- <!-- <div class="from-group">-->
279
- <!-- <label style="width: 20%;float: left">用气性质</label>-->
280
- <!-- <v-select :value.sync="selectItem.f_gasproperties" v-model="selectItem.f_gasproperties"-->
281
- <!-- :options='gasproperties' placeholder='请选择' style="width: 80%;float: left" :width="'80%'"-->
282
- <!-- close-on-select >-->
283
- <!-- </v-select>-->
284
- <!-- </div>-->
285
- <div class="from-group" v-if="this.selectdata.defname == '通气'">
286
- <label style="width: 20%;float: left">用气性质</label>
287
- <input type="text" style="width: 80%;float: left" class="form-control" v-model="selectItem.f_gasproperties"/>
288
- </div>
289
- <div class="from-group" v-if="this.selectdata.defname == '通气'">
290
- <label style="width: 20%;float: left">价格</label>
291
- <input type="text" style="width: 80%;float: left" class="form-control" v-model="selectItem.f_price"/>
292
- </div>
293
- <div class="from-group" v-if="this.selectdata.defname == '通气'">
294
- <label style="width: 20%;float: left">气价类型</label>
295
- <input type="text" style="width: 80%;float: left" class="form-control" v-model="selectItem.f_price_type"/>
296
- </div>
297
- <!-- <div class="from-group">-->
298
- <!-- <label style="width: 20%;float: left">气价类型</label>-->
299
- <!-- <v-select :value.sync="selectItem.f_price_type" v-model="selectItem.f_price_type"-->
300
- <!-- :options='pricetype' placeholder='请选择' style="width: 80%;float: left" :width="'80%'"-->
301
- <!-- close-on-select >-->
302
- <!-- </v-select>-->
303
- <!-- </div>-->
304
- <div class="from-group" v-if="this.selectdata.defname == '通气'">
305
- <label style="width: 20%;float: left">气表类型</label>
306
- <v-select :value.sync="selectItem.f_meter_classify" v-model="selectItem.f_meter_classify"
307
- :options='meterclassify' placeholder='请选择' style="width: 80%;float: left" :width="'80%'"
308
- close-on-select >
309
- </v-select>
310
- </div>
311
- <!-- <div class="from-group" v-if="this.selectdata.defname == '通气'">-->
312
- <!-- <label style="width: 20%;float: left">安装位置</label>-->
313
- <!-- <v-select :value.sync="selectItem.f_position" v-model="selectItem.f_position"-->
314
- <!-- :options='position' placeholder='请选择' style="width: 80%;float: left" :width="'80%'"-->
315
- <!-- close-on-select >-->
316
- <!-- </v-select>-->
317
- <!-- </div>-->
318
- <!-- <div class="from-group" v-if="this.selectdata.defname == '通气'">-->
319
- <!-- <label style="width: 20%;float: left">抄表员</label>-->
320
- <!-- <v-select :value.sync="selectItem.f_inputtor" v-model="selectItem.f_inputtor"-->
321
- <!-- :options='inputtor' placeholder='请选择' style="width: 80%;float: left" :width="'80%'"-->
322
- <!-- close-on-select >-->
323
- <!-- </v-select>-->
324
- <!-- </div>-->
325
- <div class="from-group" v-if="this.selectdata.defname == '通气' && this.super_book">
326
- <label style="width: 20%;float: left">抄表本</label>
327
- <v-select :value.sync="selectItem.f_super_book" v-model="selectItem.f_super_book"
328
- :options='super_book_array' placeholder='请选择' style="width: 80%;float: left" :width="'80%'"
329
- close-on-select >
330
- </v-select>
331
- </div>
332
- <div class="from-group" v-if="this.selectdata.defname == '通气'">
333
- <label style="width: 20%;float: left">通气人</label>
334
- <input type="text" style="width: 80%;float: left" class="form-control" v-model="selectItem.f_gas_person"/>
335
- </div>
336
- <div class="from-group" v-if="this.selectdata.defname == '通气'">
337
- <label style="width: 20%;float: left">通气时间</label>
338
- <datepicker style="width: 80%;float: left" :width="'80%'"
339
- :value.sync="selectItem.f_gas_date"
340
- :format="'yyyy-MM-dd HH:mm:ss'"
341
- v-model="selectItem.f_gas_date"
342
- :readonly="true"
343
- :show-reset-button="reset">
344
- </datepicker>
345
- </div>
346
- <!-- <div class="from-group">-->
347
- <!-- <label style="width: 20%;float: left">通气表号</label>-->
348
- <!-- <input type="text" style="width: 80%;float: left" class="form-control" v-model="selectItem.f_gas_meternumber"/>-->
349
- <!-- </div>-->
350
- <!--<div class="from-group">
351
- <label style="width: 20%;float: left">输损率</label>
352
- <input type="number" style="width: 80%;float: left" class="form-control" v-model="selectItem.f_lossrate" v-validate:f_lossrate='{dctest: [1, "<" ] }'/>
353
- </div>-->
354
-
355
- </article>
356
- <footer slot="modal-footer" class="modal-footer">
357
- <button type="button" class="btn btn-default" @click='addclose'>取消</button>
358
- <button type="button" class="btn btn-success" v-if="showqueren" @click='addconfirm'>确认</button>
359
- <button type="button" class="btn btn-success" v-else>提交中</button>
360
- </footer>
361
- </modal>
362
-
363
- <modal :show.sync="updateshow" v-ref:modal backdrop="false">
364
- <header slot="modal-header" class="modal-header">
365
- <button type="button" class="close" @click="updateclose"><span>&times;</span></button>
366
- <h4 class="modal-title">配置</h4>
367
- </header>
368
- <!--户档案修改-->
369
- <article slot="modal-body" class="modal-body" >
370
- <div class="from-group">
371
- <label style="width: 20%;float: left">表号</label>
372
- <input type="text" style="width: 80%;float: left" class="form-control" v-model="selectItem.f_meternumber"/>
373
- </div>
374
- <div class="from-group">
375
- <label style="width: 20%;float: left">气表品牌</label>
376
- <v-select :value.sync="selectItem.f_meter_brand" v-model="selectItem.f_meter_brand"
377
- :options='meterbrand' placeholder='请选择' style="width: 80%;float: left"
378
- close-on-select search="">
379
- </v-select>
380
- </div>
381
- <div class="from-group">
382
- <label style="width: 20%;float: left">表型号</label>
383
- <v-select :value.sync="selectItem.f_meter_style" v-model="selectItem.f_meter_style"
384
- :options='meterstyle' placeholder='请选择' style="width: 80%;float: left"
385
- close-on-select >
386
- </v-select>
387
- </div>
388
- </article>
389
- <footer slot="modal-footer" class="modal-footer">
390
- <button type="button" class="btn btn-default" @click='updateclose'>取消</button>
391
- <button type="button" class="btn btn-success" @click='updateconfirm'>确认</button>
392
- </footer>
393
- </modal>
394
-
395
-
396
- <modal :show.sync="showFile" v-ref:modal backdrop="false">
397
- <header slot="modal-header" class="modal-header">
398
- <button type="button" class="close" @click="closeFile"><span>&times;</span></button>
399
- <h4 class="modal-title">档案及工料费导入</h4>
400
- </header>
401
- <article slot="modal-body" class="modal-body">
402
- <div class="form-group">
403
- <file-upload class="my-file-uploader" :name="key+(Math.random()+3)+8882" :id="key+(Math.random()+3)+8882"
404
- action="rs/file/uploadFile" tagname="文件导入" :headers="headers" v-ref:file></file-upload>
405
- </div>
406
- </article>
407
- <footer slot="modal-footer" class="modal-footer"></footer>
408
- </modal>
409
- <modal :show.sync="showInfo" v-ref:modal backdrop="false">
410
- <header slot="modal-header" class="modal-header">
411
- <button type="button" class="close" @click="closeFile1"><span>&times;</span></button>
412
- <h4 class="modal-title">增值产品导入</h4>
413
- </header>
414
- <article slot="modal-body" class="modal-body">
415
- <div class="form-group">
416
- <file-upload class="my-file-uploader" :name="key+(Math.random()+3)+8883" :id="key+(Math.random()+3)+8883"
417
- action="rs/file/uploadFile" tagname="文件导入" :headers="headers" v-ref:file_one></file-upload>
418
- </div>
419
- </article>
420
- <footer slot="modal-footer" class="modal-footer"></footer>
421
- </modal>
422
- <!-- 建档花名册下载 -->
423
- <!-- <modal :show.sync="upload_meter" backdrop="false">-->
424
- <!-- <header slot="modal-header" class="modal-header">-->
425
- <!-- <h4 class="modal-title">建档花名册下载</h4>-->
426
- <!-- </header>-->
427
- <!-- <article slot="modal-body" class="modal-body">-->
428
- <!-- <div class="col-sm-12 span recordTable" style="margin-top: 10px;height:70vh;">-->
429
- <!-- <upload v-ref:file :blodid = "selectdata.f_process_id" :isusetype = "true" :isremark = "true" :defname="selectdata.defname"></upload>&ndash;&gt;-->
430
- <!-- &lt;!&ndash;<customer-file v-ref:file :selectdata="selectdata"></customer-file>&ndash;&gt;-->
431
- <!-- </div>-->
432
- <!-- </article>-->
433
- <!-- <footer slot="modal-footer" class="modal-footer">-->
434
- <!-- <div class="from-group" style="width: 100%;float: left">-->
435
- <!-- <button v-show="upload_meter" type="button" class="btn btn-default" @click='upload_meter_close'>关闭</button>-->
436
- <!--&lt;!&ndash; <button v-show="upload_meter" type="button" class="btn btn-success" @click='showClose'>&ndash;&gt;-->
437
- <!--&lt;!&ndash; 确认&ndash;&gt;-->
438
- <!--&lt;!&ndash; </button>&ndash;&gt;-->
439
- <!-- </div>-->
440
- <!-- </footer>-->
441
- <!-- </modal>-->
442
- <work-busy :is-busy="iswork" v-show="iswork"></work-busy>
443
- </template>
444
-
445
- <script>
446
- import {HttpResetClass} from 'vue-client'
447
- // import axios from 'axios'
448
- import Vue from 'vue'
449
- export default {
450
- title: '档案信息',
451
- props: ['selectdata', 'key','edit'],
452
- data() {
453
- return {
454
- iswork:false,
455
- headers: {'username': this.$login.f.name, 'blodid': this.selectdata.f_process_id, 'fusetype': '报建execl导入用户档案'},
456
- //户档案表头
457
- userHeadData: ['档案编号', '用户姓名', '用户电话', '区', '片区', '街道名称', '小区名称', '楼号', '单元号', '楼层', '门牌号', '用气性质', '用户状态'],
458
- //户档案内容
459
- userBodyData: ['f_userinfo_id', 'f_user_name', 'f_user_phone', 'f_area', 'f_slice_area', 'f_street', 'f_residential_area', 'f_building', 'f_unit', 'f_floor', 'f_room', 'f_gasproperties', 'f_user_state'],
460
- //表档案表头
461
- surHeadData: ['户档案编号', '表号', '气表品牌', '表型号','通气表号','通气人','通气时间','被修改表号'],
462
- //表档案内容
463
- surBodyData: ['f_userinfo_id', 'f_meternumber', 'f_meter_brand', 'f_meter_style','f_gas_meternumber','f_gas_person','f_gas_date','f_gas_meternumber'],
464
- //设备表头
465
- eqHeadData: ['户档案编号', '设备编号', '设备类型', '设备品牌','设备型号','设备数量'],
466
- //设备内容
467
- eqBodyData: ['f_userinfo_id', 'f_devices_no', 'f_devices_type', 'f_brand','f_devices_model','f_devices_num'],
468
- params: null,
469
- record: {},
470
- selectItem: {
471
- 'f_meternumber': null,
472
- 'f_meter_brand': null,
473
- 'f_meter_style': null,
474
- 'f_aroundmeter': null,
475
- 'f_price_name': null,
476
- 'f_price_type': null,
477
- 'f_price': null,
478
- 'f_gasproperties': null,
479
- 'f_user_type': null,
480
- 'f_meter_classify': null,
481
- 'f_position': null,
482
- 'f_inputtor': null,
483
- 'f_gas_person': null,
484
- 'f_gas_date': null,
485
- 'f_super_book': null
486
- },
487
- pricetype:[],
488
- pricename:[],
489
- model: {
490
- rows: []
491
- },
492
- batchmodel :{
493
- rows: []
494
- },
495
- params: { // 选择的具体内容
496
- rows: []
497
- },
498
- condition: '',
499
- show: false,
500
- showFile: false,
501
- showInfo: false,// 表信息导入
502
- showCon: false,
503
- ischecked: false,
504
- getfield: {},
505
- checked: [],
506
- isShowdetail:false,
507
- userinfo_id: null,
508
- addshow:false,
509
- meterstyle:[],
510
- meterbrand:[],
511
- styletype:[],
512
- updateshow:false,
513
- importtype:null,
514
- showqueren:true,
515
- userstate:this.$appdata.getParam('用户状态'),
516
- checker:this.$appdata.getParam('安全员'),
517
- coststate:this.$appdata.getParam('结算状态'),
518
- costtype:this.$appdata.getParam('缴费类型'),
519
- aroundmeter:this.$appdata.getParam('左右表'),
520
- // gasproperties:this.$appdata.getParam('用气性质'),
521
- // usertypes:this.$appdata.getParam('用户类型'),
522
- // tablestate:this.$appdata.getParam('表状态'),
523
- meterclassify:this.$appdata.getParam('气表类型'),
524
- whetherhairpin:this.$appdata.getParam('是否发卡'),
525
- // position:this.$appdata.getParam('安装位置'),
526
- inputtor:null,
527
- viewPage: false,
528
- userinfo_array: [],
529
- super_book: false,
530
- super_book_array: [],
531
- upload_meter: false
532
- }
533
- },
534
- ready() {
535
- // 获取抄表员
536
- // let data = []
537
- // let array = []
538
- // data = this.$login.f.f_gasman.map(item => {
539
- // return item.name;
540
- // })
541
- // for (let q = 0; q < data.length; q++) {
542
- // let arraydata = {
543
- // 'label': data[q],
544
- // 'value': data[q]
545
- // }
546
- // if (array.length != 0) {
547
- // for (let w = 0; w < array.length; w++) {
548
- // if (array[w].label == data[q]) {
549
- // break
550
- // }
551
- // while (w == array.length - 1) {
552
- // array.push(arraydata)
553
- // break
554
- // }
555
- // }
556
- // } else {
557
- // array.push(arraydata)
558
- // }
559
- // }
560
- // this.inputtor = array
561
- this.load()
562
- this.getitem()
563
-
564
- if (this.selectdata.defname == '通气') {
565
- this.getPriceInfo()
566
- // this.getMeterBook()
567
- }
568
- },
569
- watch: {
570
- 'selectdata'() {
571
- this.headers.blodid = this.selectdata.f_process_id
572
- this.load()
573
- },
574
- // 'selectItem.f_meter_classify[0]'(val) {
575
- // if (val == '机表') {
576
- // this.super_book = true
577
- // this.getMeterBook()
578
- // }else {
579
- // this.super_book = false
580
- // }
581
- // },
582
- 'selectItem.f_meter_brand[0]'(val) {
583
- console.log('选择的品牌改变了',val)
584
- if (!val){
585
- return
586
- }
587
- this.$resetpost('rs/logic/getMeterStyle', {data:{f_meter_brand :val, f_orgid: this.$login.f.orgid}} ,{resolveMsg: null, rejectMsg: null}).then((res) => {
588
- console.log('获取的选项',res)
589
- let house2 = []
590
- for (let row of res.data){
591
- house2.push({label: row.f_meter_style,value: row.f_meter_style})
592
- }
593
- this.meterstyle = house2
594
- })
595
- },
596
- // 'selectItem.f_meternumber'() {
597
- // if (this.selectItem.hasOwnProperty("f_meternumber")) {
598
- // if (this.selectItem.f_meternumber == null || this.selectItem.f_meternumber == undefined || this.selectItem.f_meternumber == '' || this.selectItem.f_meternumber.trim().length == 0){
599
- // this.$set('selectItem.f_table_state', "待安装")
600
- // }else {
601
- // this.$set('selectItem.f_table_state', "已安装")
602
- // }
603
- // }
604
- //
605
- // }
606
- },
607
-
608
- computed: {
609
- address() {
610
- let strAddress = `${this.record.f_area ? this.record.f_area
611
- + '-' : ''}${this.record.f_street ? this.record.f_street
612
- + '-' : ''}${this.record.f_residential_area ? this.record.f_residential_area
613
- + '' : ''}${this.record.f_building ? this.record.f_building
614
- + '号楼' : ''}${this.record.f_unit ? this.record.f_unit
615
- + '单元' : ''}${this.record.f_floor ? this.record.f_floor
616
- + '层' : ''}${this.record.f_room ? this.record.f_room
617
- + '室' : ''}`
618
- this.record.f_address = strAddress
619
- return strAddress
620
- },
621
- getfield() {
622
- let data = {}
623
- this.userBodyData.forEach((value, index) => {
624
- data[this.userBodyData[index]] = this.userHeadData[index]
625
- })
626
-
627
- console.log('data', data)
628
- return data
629
- }
630
- },
631
- methods: {
632
- // 获取气价信息
633
- async getPriceInfo() {
634
- console.log('开始获取气价信息')
635
- let http = new HttpResetClass()
636
- let condition = "f_orgid = '" + this.$login.f.orgid + "'"
637
- let res = await http.load('POST','rs/sql/applysingleTable',{data:{tablename:'t_stairprice',condition:condition}}, {resolveMsg: null, rejectMsg: null})
638
- let data = []
639
- let array = []
640
- data = res.data.map(item => {
641
- return item.f_price_name;
642
- })
643
- for (let q = 0; q < data.length; q++) {
644
- let arraydata = {
645
- 'label': data[q],
646
- 'value': data[q]
647
- }
648
- if (array.length != 0) {
649
- for (let w = 0; w < array.length; w++) {
650
- if (array[w].label == data[q]) {
651
- break
652
- }
653
- while (w == array.length - 1) {
654
- array.push(arraydata)
655
- break
656
- }
657
- }
658
- } else {
659
- array.push(arraydata)
660
- }
661
- }
662
- this.pricename = array
663
- },
664
- // 获取抄表册
665
- // async getMeterBook() {
666
- // let http = new HttpResetClass()
667
- // let condition = " f_orgname = '" + this.$login.f.orgs + "'"
668
- // let res = await http.load('POST','rs/sql/applysingleTable',{data:{tablename: 't_meter_book', condition: condition}}, {resolveMsg: null, rejectMsg: "获取抄表本失败"})
669
- // let data = []
670
- // let array = []
671
- // data = res.data.map(item => {
672
- // return item.f_book_name;
673
- // })
674
- // for (let q = 0; q < data.length; q++) {
675
- // let arraydata = {
676
- // 'label': data[q],
677
- // 'value': data[q]
678
- // }
679
- // if (array.length != 0) {
680
- // for (let w = 0; w < array.length; w++) {
681
- // if (array[w].label == data[q]) {
682
- // break
683
- // }
684
- // while (w == array.length - 1) {
685
- // array.push(arraydata)
686
- // break
687
- // }
688
- // }
689
- // } else {
690
- // array.push(arraydata)
691
- // }
692
- // }
693
- // this.super_book_array = array
694
- //
695
- // },
696
- // 根据气价名称获取其他相对应数据
697
- priceChange(val) {
698
- console.log("被选中的数据:" + val)
699
- this.getData(val)
700
- },
701
- async getData(val) {
702
- let http2 = new HttpResetClass()
703
- let condition2 = "s.f_orgid = '" + this.$login.f.orgid + "'" + " and s.f_price_name = '" + val + "'"
704
- http2.load('POST','rs/sql/searchGasPrice',{data:{condition:condition2}}, {resolveMsg: null, rejectMsg: null}).then((res2)=>{
705
- console.log("气价数据:" + JSON.stringify(res2.data))
706
- // for (let j = 0; j < this.$refs.service_show.data.fields.length; j++) {
707
- // if (this.$refs.service_show.data.fields[j].label == '气价类型') {
708
- // console.log("气价类型:" + res2.data[0])
709
- // console.log("气价类型1:" + res2.data[0].f_price_type)
710
- // Vue.set(this.selectItem,'f_price_type',res2.data[0].f_price_type)
711
- // this.selectItem.f_price_type = res2.data[0].f_price_type
712
- // console.log("气价类型2:" + this.$refs.service_show.data.fields[j].value)
713
- // }
714
- //气价拼接
715
- // if (this.$refs.service_show.data.fields[j].label == '价格') {
716
- let p = 1
717
- let resultPrice = ''
718
- for(let l = 0; l < res2.data.length; l++){
719
- resultPrice = resultPrice + res2.data[l].price + ' |'
720
- if (p == 3) {
721
- break
722
- }
723
- p++
724
- }
725
- console.log("拼接的价格:" + resultPrice)
726
- //this.selectItem.f_price = resultPrice
727
- this.$set('selectItem.f_price',resultPrice)
728
- this.$set('selectItem.f_gasproperties',res2.data[0].f_gasproperties)
729
- this.$set('selectItem.f_user_type',res2.data[0].f_user_type)
730
- this.$set('selectItem.f_price_type',res2.data[0].f_price_type)
731
- // }
732
- // if (this.$refs.service_show.data.fields[j].label == '用气性质') {
733
- // this.$set(this.selectItem,'f_gasproperties',res2.data[0].f_gasproperties)
734
- //this.selectItem.f_gasproperties = res2.data[0].f_gasproperties
735
- // }
736
- // if (this.$refs.service_show.data.fields[j].label == '客户类型') {
737
- //this.selectItem.f_user_type = res2.data[0].f_user_type
738
- // }
739
- // }
740
- })
741
-
742
- },
743
- getitem(){
744
- console.log('开始获取品牌')
745
- let condition = '1=1'
746
- let http = new HttpResetClass()
747
- let data = {
748
- condition: condition,
749
- f_orgid: this.$login.f.orgid
750
- }
751
- http.load('POST','rs/logic/getRecordItem', {data: data}, {resolveMsg: null, rejectMsg: null}).then((res) => {
752
- console.log('获取的选项',res)
753
- let house2 = []
754
- for (let row of res.data.meterbrand){
755
- house2.push({label: row.f_meter_brand,value: row.f_meter_brand})
756
- }
757
- this.meterbrand = house2
758
- })
759
- },
760
- upload_meter_close(){
761
- this.upload_meter = false
762
- },
763
- addDetailed(){
764
- this.importtype='2'
765
- this.showFile = true
766
- },
767
- addclose(){
768
- this.addshow = false
769
- this.selectItem = {}
770
- },
771
-
772
- updateclose(){
773
- this.updateshow = false
774
- this.selectItem = {}
775
- },
776
- showdetail(val) {
777
-
778
- console.log(val)
779
- this.userinfo_id = val
780
- this.isShowdetail=true
781
- this.loadfiles()
782
- },
783
- async loadfiles() {
784
- if (!this.selectdata)
785
- return
786
- let data = {
787
- tablename: 't_userfiles',
788
- condition: 'a.f_userinfo_id=' + '\'' + this.userinfo_id + '\''
789
- }
790
-
791
- let self = this
792
- let http = new HttpResetClass()
793
- let res = await http.load('POST', 'rs/sql/getUserfiles', {data: data}, {
794
- resolveMsg: null,
795
- rejectMsg: '获取表档案信息失败'
796
- })
797
- self.batchmodel.rows = []
798
-
799
- self.batchmodel.rows = res.data
800
- },
801
- selected (val) {
802
- this.selectItem = {"q":"q"}
803
- },
804
- //选择需要转银收的户档案
805
- chooseOne(e, row, rows) {
806
- console.log('row', row)
807
- console.log('e', e)
808
- this.ischecked = e.target.checked
809
- console.log("state", e.target.checked)
810
- //判断当前行是否被选中
811
- if (this.ischecked) {
812
- this.checked.push(row)
813
- }
814
- },
815
- //修改选中的数据状态
816
- changeState() {
817
- if (this.checked.length > 0) {
818
- let http = new HttpResetClass()
819
- http.load('POST', 'rs/logic/updateUserState', {data: {rows: this.checked}}).then((res) => {
820
- this.show = false
821
- this.ischecked = false
822
- // 如果没有id,需要在数组中添加
823
- this.load()
824
- this.checked = []
825
- })
826
- }
827
- },
828
- // 父组件更新子组件属性
829
- updateData(val) {
830
- this.headers.blodid = val.f_process_id
831
- this.selectdata = val
832
- },
833
- async load() {
834
- if (!this.selectdata)
835
- return
836
- let data = {
837
- f_process_id: this.selectdata.f_process_id
838
- }
839
- let self = this
840
- let http = new HttpResetClass()
841
- let res = await http.load('POST', 'rs/sql/getUserArchives', {data: data}, {
842
- resolveMsg: null,
843
- rejectMsg: '获取户档案信息失败'
844
- })
845
- self.model.rows = []
846
- self.model.rows = res.data
847
- self.params = res.data
848
-
849
-
850
- },
851
- impexcel() {
852
- this.importtype='1'
853
- this.showFile = true
854
- },
855
- meterUpload() {
856
- this.importtype='1'
857
- this.upload_meter = true
858
- },
859
- impexcel1() {
860
- this.importtype='1'
861
- for (let i = 0; i < this.model.rows.length; i++) {
862
- this.userinfo_array.push(this.model.rows[i].f_userinfo_id)
863
- }
864
- this.showInfo = true
865
- // this.showCon = true
866
- },
867
- showClose() {
868
- this.showCon = false
869
- },
870
- closeFile() {
871
- this.showFile = false
872
- this.showInfo = false
873
- // 将选的文件清空
874
- this.$refs.file.$el.querySelector('input').value = ''
875
- },
876
- closeFile1() {
877
- this.showFile = false
878
- this.showInfo = false
879
- // 将选的文件清空
880
- this.$refs.file_one.$el.querySelector('input').value = ''
881
- },
882
- delete(row){
883
- console.log('开始删除')
884
- let http = new HttpResetClass()
885
- http.load('POST', 'rs/logic/deleteUserinfo', {data: {f_userinfo_id: row.f_userinfo_id}}, {resolveMsg: null, rejectMsg: null}).then((res) => {
886
- console.log('返回的数据:',res)
887
- if (res.data != null && res.data != "") {
888
- this.$showMessage(res.data)
889
- }else {
890
- this.$showMessage("删除成功!")
891
- this.load()
892
- }
893
- })
894
- },
895
-
896
- deleteItem(row) {
897
-
898
-
899
- /* this.$showMessage('删除后不可恢复,确认删除吗?', ['confirm', 'cancel']).then((res) => {
900
- if (res === 'confirm') {
901
- let http = new HttpResetClass()
902
- http.load('DELETE', `rs/entity/t_userinfo/${row.f_userinfo_id}`).then((res) => {
903
- this.load()
904
- })
905
- }
906
- })*/
907
-
908
- this.$showMessage('删除后不可恢复,确认删除吗?', ['confirm', 'cancel']).then((res) => {
909
- if (res === 'confirm') {
910
- let http = new HttpResetClass()
911
- console.log("用户id:" + row.f_userfiles_id)
912
- http.load('DELETE', `rs/entity/t_userfiles/${row.f_userfiles_id}`).then((res) => {
913
- this.loadfiles()
914
- })
915
- }
916
- })
917
-
918
- },
919
- //户档案查询
920
- filterParams(param) {
921
- this.isShowdetail=false
922
- if (param && param !== "") {
923
- let temp = []
924
- for (var i = 0; i < this.model.rows.length; i++) {
925
- if (this.model.rows[i].f_user_name.includes(param)) {
926
- temp.push(this.model.rows[i])
927
- }
928
- }
929
- this.model.rows = temp
930
- } else {
931
- this.model.rows = this.params
932
- }
933
- },
934
- //表档案查询
935
- filterParam(param) {
936
- if (param && param !== "") {
937
- let temp = []
938
- for (var i = 0; i < this.model.rows.length; i++) {
939
- if (this.model.rows[i].f_meter_brand.includes(param)) {
940
- temp.push(this.model.rows[i])
941
- }
942
- }
943
- this.model.rows = temp
944
- } else {
945
- this.model.rows = this.params
946
- }
947
- },
948
- //设备列表查询
949
- findEq(param) {
950
- if (param && param !== "") {
951
- let temp = []
952
- for (var i = 0; i < this.model.rows.length; i++) {
953
- if (this.model.rows[i].f_meter_brand.includes(param)) {
954
- temp.push(this.model.rows[i])
955
- }
956
- }
957
- this.model.rows = temp
958
- } else {
959
- this.model.rows = this.params
960
- }
961
- },
962
- add() {
963
- this.show = true
964
- console.log("点击了添加")
965
- },
966
- async user_search() {
967
- if (!this.selectdata)
968
- return
969
- let data = {
970
- condition: ' 1 = 1'
971
- }
972
- if (this.model.f_user_name != null && this.model.f_user_name != undefined && this.model.f_user_name != '') {
973
- data.condition = ' u.f_user_name = ' + '\'' + this.model.f_user_name + '\''
974
- }else if (this.model.f_user_phone != null && this.model.f_user_phone != undefined && this.model.f_user_phone != '') {
975
- data.condition = ' u.f_user_phone = ' + '\'' + this.model.f_user_phone + '\''
976
- }else if (this.model.f_user_name != undefined && this.model.f_user_phone != undefined) {
977
- data.condition = ' u.f_user_phone = ' + '\'' + this.model.f_user_phone + '\'' + ' and u.f_user_name = ' + '\'' + this.model.f_user_name + '\''
978
- }
979
- let self = this
980
- let http = new HttpResetClass()
981
- let res = await http.load('POST', 'rs/sql/reportFormUser', {data: data}, {
982
- resolveMsg: null,
983
- rejectMsg: '获取户档案信息失败'
984
- })
985
- self.model.rows = []
986
- self.model.rows = res.data
987
- if (res.data.length == 0) {
988
- this.$showMessage("该用户无数据")
989
- }
990
- },
991
- // 修改按钮
992
- modifyParam(row) {
993
- this.$set('selectItem.f_userinfo_id', row.f_userinfo_id)
994
- this.$set('selectItem.f_user_name', row.f_user_name)
995
- this.$set('selectItem.f_user_phone', row.f_user_phone)
996
- // this.$set('selectItem.f_pcd', row.f_pcd)
997
- // this.$set('selectItem.f_slice_area', row.f_slice_area)
998
- this.$set('selectItem.f_area', row.f_area)
999
- this.$set('selectItem.f_street', row.f_street)
1000
- this.$set('selectItem.f_residential_area', row.f_residential_area)
1001
- this.$set('selectItem.f_building', row.f_building)
1002
- this.$set('selectItem.f_unit', row.f_unit)
1003
- this.$set('selectItem.f_floor', row.f_floor)
1004
- this.$set('selectItem.f_room', row.f_room)
1005
- // this.selectItem.f_cost_type= [row.f_cost_type]
1006
- // this.selectItem.f_cost_state=[row.f_cost_state]
1007
- // this.$set('selectItem.f_people_num', row.f_people_num)
1008
- // this.selectItem.f_checker=[row.f_checker]
1009
- this.selectItem.f_user_state= [row.f_user_state]
1010
- this.$set('selectItem.version', row.version)
1011
- this.show = true
1012
- },
1013
-
1014
- //获取当前用户表档案信息
1015
- getUserFiles(row) {
1016
- this.isShowFiles = true
1017
- console.log('获取户档案信息')
1018
-
1019
- let data = {
1020
- tablename: 't_userfiles',
1021
- condition: `f_userinfo_id=${row.f_userinfo_id}`
1022
- }
1023
- let http = new HttpResetClass()
1024
- let resGasbrand = http.load('POST', 'rs/sql/singleTable', {data: data}, {
1025
- resolveMsg: null,
1026
- rejectMsg: '获取档案信息失败'
1027
- })
1028
- self.model.rows = []
1029
- self.model.rows = res.data
1030
- },
1031
- //表档案修改
1032
- filesModify(row) {
1033
- console.log('表档案数据',row)
1034
- this.$set('selectItem.f_userinfo_id', row.f_userinfo_id)
1035
- this.$set('selectItem.f_user_id', row.f_user_id)
1036
- // 表号
1037
- this.$set('selectItem.f_meternumber', row.f_meternumber)
1038
- // 表箱号
1039
- // this.$set('selectItem.f_metertitles', row.f_metertitles)
1040
- // 气表品牌
1041
- // let data1 = row.f_meter_brand
1042
- // let array1 = []
1043
- // let arraydata1 = {
1044
- // 'label': data1,
1045
- // 'value': data1
1046
- // }
1047
- // array1.push(arraydata1)
1048
- this.$set('selectItem.f_meter_brand', row.f_meter_brand)
1049
- // 气表型号
1050
- // let data2 = row.f_meter_style
1051
- // let array2 = []
1052
- // let arraydata2 = {
1053
- // 'label': data2,
1054
- // 'value': data2
1055
- // }
1056
- // array2.push(arraydata2)
1057
- this.$set('selectItem.f_meter_style', row.f_meter_style)
1058
- // 左右表
1059
- // let data3 = row.f_aroundmeter
1060
- // let array3 = []
1061
- // let arraydata3 = {
1062
- // 'label': data3,
1063
- // 'value': data3
1064
- // }
1065
- // array3.push(arraydata3)
1066
- this.$set('selectItem.f_aroundmeter', row.f_aroundmeter)
1067
- // 表状态
1068
- // console.log("表状态:" + row.f_table_state)
1069
- // let data4 = row.f_table_state
1070
- // let array4 = []
1071
- // let arraydata4 = {
1072
- // 'label': data4,
1073
- // 'value': data4
1074
- // }
1075
- // array4.push(arraydata4)
1076
- // this.$set('selectItem.f_table_state', array4)
1077
- // 气价名称
1078
- // let data5 = row.f_price_name
1079
- // let array5 = []
1080
- // let arraydata5 = {
1081
- // 'label': data5,
1082
- // 'value': data5
1083
- // }
1084
- // array5.push(arraydata5)
1085
- this.$set('selectItem.f_price_name', row.f_price_name)
1086
- // 客户类型
1087
- this.$set('selectItem.f_user_type', row.f_user_type)
1088
- // 用气性质
1089
- this.$set('selectItem.f_gasproperties', row.f_gasproperties)
1090
- // 价格
1091
- this.$set('selectItem.f_price', row.f_price)
1092
- // 气价类型
1093
- this.$set('selectItem.f_price_type', row.f_price_type)
1094
- // 气表类型
1095
- // let data6 = row.f_meter_classify
1096
- // let array6 = []
1097
- // let arraydata6 = {
1098
- // 'label': data6,
1099
- // 'value': data6
1100
- // }
1101
- // array6.push(arraydata6)
1102
- this.$set('selectItem.f_meter_classify', row.f_meter_classify)
1103
- // 安装位置
1104
- // let data7 = row.f_position
1105
- // let array7 = []
1106
- // let arraydata7 = {
1107
- // 'label': data7,
1108
- // 'value': data7
1109
- // }
1110
- // array7.push(arraydata7)
1111
- this.$set('selectItem.f_position', row.f_position)
1112
- // 抄表员
1113
- // let data8 = row.f_inputtor
1114
- // let array8 = []
1115
- // let arraydata8 = {
1116
- // 'label': data8,
1117
- // 'value': data8
1118
- // }
1119
- // array8.push(arraydata8)
1120
- // this.$set('selectItem.f_inputtor', row.f_inputtor)
1121
- // 通气人
1122
- this.$set('selectItem.f_gas_person', row.f_gas_person)
1123
- // 通气时间
1124
- this.$set('selectItem.f_gas_date', row.f_gas_date)
1125
- console.log("气表品牌:" + row.f_meter_brand,"气表型号:" + row.f_meter_style)
1126
- this.$set('selectItem.version', row.version)
1127
- // this.$set('selectItem.f_meter_base', row.f_meter_base)
1128
- // this.$set('selectItem.f_heater_gas', row.f_heater_gas)
1129
- // this.$set('selectItem.f_whether_hairpin', row.f_whether_hairpin)
1130
- // this.$set('selectItem.f_lossrate', row.f_lossrate)
1131
- this.addshow = true
1132
- this.getpricetype()
1133
-
1134
- },
1135
- getpricetype(){
1136
- // console.log('开始获取气价类别')
1137
- // let condition =`f_user_type = '${this.selectItem.f_user_type}' and f_filiale = '${this.$login.f.f_fengongsi}'
1138
- // and f_gasproperties = '${this.selectItem.f_gasproperties}'`
1139
- // this.$resetpost('rs/logic/getRecordItem', {condition}, {resolveMsg: null, rejectMsg: null}).then((res) => {
1140
- // console.log('获取的选项',res)
1141
- // let house2 = []
1142
- // for (let row of res.data.pricetype){
1143
- // house2.push({label: row.f_price_type,value: row.f_price_type})
1144
- // }
1145
- // // this.pricetype = house2
1146
- // let house = []
1147
- // for (let row of res.data.meterbrand){
1148
- // house.push({label: row.f_meter_brand,value: row.f_meter_brand})
1149
- // }
1150
- // this.meterbrand = house
1151
- // let house3 = []
1152
- // for (let row of res.data.pricename){
1153
- // house3.push({label: row.f_price_name,value: row.f_price_name})
1154
- // }
1155
- // //this.pricename = house3
1156
- // })
1157
- },
1158
- //新增修改或删除提交
1159
- async confirm() {
1160
- let http = new HttpResetClass()
1161
- await http.load('POST', 'rs/logic/recordSave', this.selectItem).then((res) => {
1162
- this.show = false
1163
- // 如果没有id,需要在数组中添加
1164
- this.load()
1165
- this.selectItem = {}
1166
- })
1167
-
1168
- },
1169
-
1170
- async addconfirm() {
1171
- if (this.selectItem.f_meternumber == null || this.selectItem.f_meternumber == undefined || this.selectItem.f_meternumber.trim().length == 0){
1172
- this.$showAlert("表号不能为空","warning", 3000)
1173
- return
1174
- }
1175
- // if (this.selectItem.f_metertitles == null || this.selectItem.f_metertitles == undefined || this.selectItem.f_metertitles.trim().length == 0){
1176
- // this.$showAlert("表箱号不能为空","warning", 3000)
1177
- // return
1178
- // }
1179
- // console.log("==========+++++++++=============:" + this.selectItem,"okk:" + JSON.stringify(this.selectItem))
1180
- if (this.selectItem.f_meter_brand != null){
1181
- if (this.selectItem.f_meter_brand[0] == null || this.selectItem.f_meter_brand[0] == undefined || this.selectItem.f_meter_brand[0].trim().length == 0){
1182
- this.$showAlert("气表品牌不能为空","warning", 3000)
1183
- return
1184
- }
1185
- }else {
1186
- this.$showAlert("气表品牌不能为空","warning", 3000)
1187
- return
1188
- }
1189
- // 气表型号不能为空
1190
- if (this.selectItem.f_meter_style != null){
1191
- if (this.selectItem.f_meter_style[0] == null || this.selectItem.f_meter_style[0] == undefined || this.selectItem.f_meter_style[0].trim().length == 0){
1192
- this.$showAlert("气表型号不能为空","warning", 3000)
1193
- return
1194
- }
1195
- }else {
1196
- this.$showAlert("气表型号不能为空","warning", 3000)
1197
- return
1198
- }
1199
- // 左右表不能为空
1200
- if (this.selectItem.f_aroundmeter != null){
1201
- if (this.selectItem.f_aroundmeter[0] == null || this.selectItem.f_aroundmeter[0] == undefined || this.selectItem.f_aroundmeter[0].trim().length == 0){
1202
- this.$showAlert("左右表不能为空","warning", 3000)
1203
- return
1204
- }
1205
- }else {
1206
- this.$showAlert("左右表不能为空","warning", 3000)
1207
- return
1208
- }
1209
-
1210
-
1211
- this.showqueren = false
1212
- let http = new HttpResetClass()
1213
- this.$set('selectItem.f_userinfo_id', this.userinfo_id)
1214
- this.selectItem.f_filiale = this.$login.f.orgs
1215
- this.selectItem.orgid = this.$login.f.orgid
1216
- this.selectItem.defname = this.selectdata.defname
1217
- await http.load('POST', 'rs/logic/addmeterrecord', this.selectItem).then((res) => {
1218
- this.addshow = false
1219
- // 如果没有id,需要在数组中添加
1220
- this.loadfiles()
1221
- this.selectItem = {}
1222
- if (res.data.msg != null && res.data.msg != "") {
1223
- this.$showMessage(res.data.msg)
1224
- }else {
1225
- this.$showMessage("修改成功!")
1226
- }
1227
- })
1228
- this.showqueren = true
1229
- },
1230
- async updateconfirm(){
1231
- let http = new HttpResetClass()
1232
-
1233
- await http.load('POST', 'rs/logic/updatemetrecord', this.selectItem,{resolveMsg: null, rejectMsg: '修改失败'}).then((res) => {
1234
- this.updateshow = false
1235
- // 如果没有id,需要在数组中添加
1236
- this.loadfiles()
1237
- this.selectItem = {}
1238
-
1239
- })
1240
- },
1241
- userinfoArray(val) {
1242
- console.log("1213---------------" + val)
1243
- if (val == null || val == undefined || val.length == 0) {
1244
- for (let i = 0; i < this.userinfo_array.length; i++) {
1245
- if (this.userinfo_array[i] != val) {
1246
- this.userinfo_array.delete(row.f_userinfo_id)
1247
- }
1248
- }
1249
- }else {
1250
- for (let i = 0; i < this.userinfo_array.length; i++) {
1251
- if (this.userinfo_array[i] != val) {
1252
- this.userinfo_array.push(val)
1253
- }
1254
- }
1255
-
1256
- }
1257
-
1258
- },
1259
-
1260
- // 关闭模态框
1261
- close() {
1262
- this.show = false
1263
- this.selectItem = {}
1264
- },
1265
- },
1266
- events: {
1267
- async onFileUpload(file, res) {
1268
- if (!this.selectdata.f_process_id) {
1269
- this.$showMessage("数据异常,导入失败")
1270
- return
1271
- }
1272
- if (this.showFile) {
1273
- this.iswork = true;
1274
- //档案导入
1275
- let data = {
1276
- tablename: 't_userinfo',
1277
- filepath: res.f_downloadpath,
1278
- f_area:this.selectdata.f_area,
1279
- f_slice_area:this.selectdata.f_slice_area,
1280
- f_street:this.selectdata.f_street,
1281
- f_residential_area:this.selectdata.f_residential_area,
1282
- f_process_id: this.selectdata.f_process_id,
1283
- f_user_type: this.selectdata.f_user_type,
1284
- f_key: this.$login.f.f_orgids,
1285
- f_operator: this.$login.f.name,
1286
- f_orgid: this.$login.f.orgid,
1287
- f_operatorid:this.$login.f.id,
1288
- f_orgname:this.$login.f.orgs,
1289
- f_depid: this.$login.f.depids,
1290
- f_depname: this.$login.f.deps,
1291
- f_gasproperties: this.selectdata.f_gasproperties,
1292
- f_date: new Date().Format("yyyy-MM-dd HH:mm:ss")
1293
- };
1294
- console.log('即将转发的数据',data);
1295
- // try{
1296
- // await axios.post('rs/logic/recordImport',
1297
- // data).then((res)=>{
1298
- // if(res.data){
1299
- // this.iswork=false;
1300
- // this.load();
1301
- // this.closeFile();
1302
- // let mm = '';
1303
- // for(var i=0;i<res.data.msg.length;i++){
1304
- // mm+= `${res.data.msg[i].msg}`
1305
- // }
1306
- // let msg = `共导入${res.data.alllength}条,失败${res.data.errorlen}条,失败信息:${mm}`
1307
- // this.$showMessage(msg)
1308
- // }
1309
- // })
1310
- let http = new HttpResetClass()
1311
- await http.load('POST', 'rs/logic/recordImport', data, {
1312
- resolveMsg: null,
1313
- rejectMsg: '导入失败'
1314
- }).then((res) => {
1315
- if(res.data){
1316
- this.iswork=false;
1317
- this.load();
1318
- this.closeFile();
1319
- let mm = '';
1320
- for(var i=0;i<res.data.msg.length;i++){
1321
- mm+= `${res.data.msg[i].msg}`
1322
- }
1323
- let msg = `共导入${res.data.alllength}条,失败${res.data.errorlen}条,失败信息:${mm}`
1324
- if (res.data.code == 500) {
1325
- this.iswork=false;
1326
- msg = res.data.msg
1327
- }
1328
- console.log("返回的数据:" + JSON.stringify(res.data))
1329
- this.$showMessage(msg)
1330
- }
1331
- })
1332
- // }catch(e){
1333
- //
1334
- // this.$showAlert('导入出错,请检查导入文件模板格式!','danger',2000);
1335
- // }
1336
- }
1337
- // 表信息
1338
- if (this.showInfo) {
1339
- this.iswork = true;
1340
- //表信息导入
1341
- let data = {
1342
- tablename: 't_standing_book',
1343
- filepath: res.f_downloadpath,
1344
- f_process_id: this.selectdata.f_process_id,
1345
- f_key: this.$login.f.f_orgids,
1346
- f_operator: this.$login.f.name,
1347
- f_orgid: this.$login.f.orgid,
1348
- f_operatorid:this.$login.f.id,
1349
- f_orgname:this.$login.f.orgs,
1350
- f_depid: this.$login.f.depids,
1351
- f_depname: this.$login.f.deps,
1352
- userinfo_array: this.userinfo_array
1353
- };
1354
- console.log('即将转发的数据',data);
1355
- let http = new HttpResetClass()
1356
- await http.load('POST', 'rs/logic/incrementImport', data, {
1357
- resolveMsg: null,
1358
- rejectMsg: '导入失败'
1359
- }).then((res) => {
1360
- if(res.data){
1361
- this.iswork=false;
1362
- this.load();
1363
- this.closeFile();
1364
- let mm = '';
1365
- for(var i=0;i<res.data.msg.length;i++){
1366
- mm+= `${res.data.msg[i].msg}`
1367
- }
1368
- let msg = `共导入${res.data.alllength}条,失败${res.data.errorlen}条,失败信息:${mm}`
1369
- if (res.data.code == 500) {
1370
- this.iswork=false;
1371
- msg = res.data.msg
1372
- }
1373
- console.log("返回的数据:" + JSON.stringify(res.data))
1374
- this.$showMessage(msg)
1375
- }
1376
- })
1377
- // try{
1378
- // await axios.post('rs/logic/incrementImport',
1379
- // data).then((res)=>{
1380
- // if(res.data){
1381
- // this.iswork=false;
1382
- // this.load();
1383
- // this.closeFile1();
1384
- // let mm = '';
1385
- // for(var i=0;i<res.data.msg.length;i++){
1386
- // mm+= `${res.data.msg[i].msg}`
1387
- // }
1388
- // let msg = `共导入${res.data.alllength}条,失败${res.data.errorlen}条,失败信息:${mm}`
1389
- // this.$showMessage(msg)
1390
- // }
1391
- // })
1392
- // }catch(e){
1393
- // this.iswork=false;
1394
- // this.$showAlert('导入出错,请检查导入文件模板格式!','danger',2000);
1395
- // }
1396
- }
1397
- }
1398
- }
1399
- }
1400
- </script>
1401
- <style>
1402
- .recordTable table tr th {
1403
- font-weight: bold;
1404
- }
1405
-
1406
- .recordTable table tr:hover {
1407
- background-color: rgb(230, 230, 230);
1408
- }
1409
- </style>
1
+ <template>
2
+ <div class="flex col-sm-12" style="margin-top:0px;">
3
+ <div class="auto" style="overflow:auto;margin: 15px 0 0 15px;">
4
+ <div class="form-inline auto col-sm-12">
5
+ <div class="row col-sm-12">
6
+ <div class="form-group col-sm-3">
7
+ <label class=" control-label" >客户姓名</label>
8
+ <input type="text" class="input_search" placeholder='客户姓名' v-model="model.f_user_name"
9
+ @keyup.enter="filterParams(param)" >
10
+ </div>
11
+ <div class="form-group col-sm-3">
12
+ <label class=" control-label" >客户电话</label>
13
+ <input type="text" class="input_search" placeholder='客户电话' v-model="model.f_user_phone"
14
+ @keyup.enter="filterParams(param)" >
15
+ </div>
16
+ <div class="form-group col-sm-5" >
17
+ <button type="button" class="btn btn-default" @click="filterParams(param),this.user_search()">查询</button>
18
+ <button style="margin-left:10px;" type="button" class="btn btn-success" @click="impexcel()" v-show="edit">导入工料费</button>
19
+ <button style="margin-left:10px;" type="button" class="btn btn-success" @click="impexcel1()" v-show="edit">导入增值产品</button>
20
+ <button style="margin-left:10px;" type="button" class="btn btn-success" v-show="edit">
21
+ <a href="https://cncncloud.com/s/x4A4Sj" target="_blank" style="color: white; margin-right:10px">工料费模板</a>
22
+ <a href="https://cncncloud.com/s/Dx3WUV" target="_blank" style="color: white">增值产品模板</a>
23
+ </button>
24
+ <!-- <button style="margin-left:10px;" type="button" class="btn btn-success" @click="impexcel1()" v-show="this.selectdata.defname == '安装施工'">气表模板下载</button>-->
25
+ </div>
26
+ </div>
27
+ <div class="row col-sm-12">
28
+ <div class="form-group col-sm-3">
29
+ </div>
30
+ <div class="form-group col-sm-3">
31
+ </div>
32
+ <div class="form-group col-sm-5" style="margin-left: 59px;">
33
+ <button style="margin-left:10px;" type="button" class="btn btn-success" @click="meterUpload()" v-show="this.selectdata.defname == '安装施工'">气表模板下载</button>
34
+ </div>
35
+ </div>
36
+ </div>
37
+ </div>
38
+ <!--户档案管理组件-->
39
+ <div class="col-sm-12 span recordTable" style="margin-top: 10px;height:70vh;">
40
+
41
+ <partial-view v-ref:single-load>
42
+ <data-grid :model="model" v-ref:grid>
43
+ <template partial='head'>
44
+ <tr>
45
+ <th>档案编号</th>
46
+ <th>用户编号</th>
47
+ <th>用户姓名</th>
48
+ <th>用户电话</th>
49
+ <th>地址</th>
50
+ <th>用户状态</th>
51
+ <th >操作</th>
52
+ </tr>
53
+ </template>
54
+ <template partial='body' >
55
+ <td style="text-align: center">{{row.f_userinfo_id}}</td>
56
+ <td style="text-align: center">{{row.f_userinfo_code}}</td>
57
+ <td style="text-align: center">{{row.f_user_name}}</td>
58
+ <td style="text-align: center">{{row.f_user_phone}}</td>
59
+ <td style="text-align: center">{{row.f_address}}</td>
60
+ <td style="text-align: center">{{row.f_user_state}}</td>
61
+ <td v-show="edit"><input type="checkbox" v-model="row.f_pay" @click="$parent.$parent.$parent.paychange(row)"/></td>
62
+ <td class="" style="text-align: center">
63
+ <button type="button" name="button" class="btn btn-link"
64
+ @click.stop="$parent.$parent.$parent.modifyParam(row)" >修改
65
+ </button>
66
+ <!-- <button type="button" name="button" class="btn btn-link"-->
67
+ <!-- @click.stop="$parent.$parent.$parent.delete(row)">删除-->
68
+ <!-- </button>-->
69
+ </td>
70
+ </template>
71
+ </data-grid>
72
+
73
+ </partial-view>
74
+ </div>
75
+
76
+ <div class="col-sm-12 span recordTable" style="margin-top: -154px;height:auto;" v-if="isShowdetail" >
77
+ <p class="text-center" style="padding: 8px;font-size: 20px">表档案列表
78
+
79
+ <button type="button" class="close" @click="isShowdetail=false" aria-hidden="true">&times;</button>
80
+ </p>
81
+ <partial-view v-ref:single-load>
82
+ <data-grid :model="batchmodel" v-ref:batchgrid>
83
+ <template partial='head'>
84
+ <tr>
85
+ <th>序号</th>
86
+ <th>户档案编号</th>
87
+ <th>表档案编号</th>
88
+ <th>表号</th>
89
+ <!-- <th>表箱号</th>-->
90
+ <th>气表品牌</th>
91
+ <th>气表型号</th>
92
+ <!-- <th>气表类型</th>-->
93
+ <th>通气人</th>
94
+ <th>通气时间</th>
95
+ <th>操作</th>
96
+ </tr>
97
+ </template>
98
+ <template partial='body'>
99
+ <td style="text-align: center">{{$index+1}}</td>
100
+ <td style="text-align: center">{{row.f_userinfo_id}}</td>
101
+ <td style="text-align: center">{{row.f_userfiles_id}}</td>
102
+ <td style="text-align: center">{{row.f_meternumber}}</td>
103
+ <!-- <td style="text-align: center">{{row.f_metertitles}}</td>-->
104
+ <td style="text-align: center">{{row.f_meter_brand}}</td>
105
+ <td style="text-align: center">{{row.f_meter_style}}</td>
106
+ <!-- <td style="text-align: center">{{row.f_meter_type}}</td>-->
107
+ <td style="text-align: center">{{row.f_gas_person}}</td>
108
+ <td style="text-align: center">{{row.f_gas_date}}</td>
109
+ <!--<td>{{row.f_remarks}}</td>-->
110
+ <td class="" style="text-align: center">
111
+ <button type="button" name="button" class="btn btn-link"
112
+ @click.stop="$parent.$parent.$parent.filesModify(row)" >修改
113
+ </button>
114
+ <button type="button" name="button" class="btn btn-link"
115
+ @click.stop="$parent.$parent.$parent.deleteItem(row)">删除
116
+ </button>
117
+ <!-- <button type="button" name="button" class="btn btn-link"
118
+ @click.stop="$parent.$parent.$parent.deleteItem(row)" >删除
119
+ </button>-->
120
+ </td>
121
+ </template>
122
+ </data-grid>
123
+
124
+
125
+
126
+
127
+ </partial-view>
128
+ </div>
129
+
130
+ </div>
131
+ <modal :show.sync="show" v-ref:modal backdrop="false">
132
+ <header slot="modal-header" class="modal-header">
133
+ <button type="button" class="close" @click="close"><span>&times;</span></button>
134
+ <h4 class="modal-title">配置</h4>
135
+ </header>
136
+ <!--户档案修改-->
137
+ <article slot="modal-body" class="modal-body" >
138
+ <div class="from-group" style="width: 100%">
139
+ <label style="width: 15%;float: left">用户姓名</label>
140
+ <input type="text" class="form-control" readonly="readonly" v-model="selectItem.f_user_name" style="width: 80%;float: left"/>
141
+ </div>
142
+ <div class="from-group" style="width: 100%">
143
+ <label style="width: 15%;float: left">用户电话</label>
144
+ <input type="text" class="form-control" readonly="readonly" v-model="selectItem.f_user_phone" style="width: 80%;float: left">
145
+ </div>
146
+ <!-- <div class="from-group" style="width: 100%">-->
147
+ <!-- <label style="width: 15%;float: left">区/县</label>-->
148
+ <!-- <input type="text" class="form-control" v-model="selectItem.f_pcd" style="width: 80%;float: left">-->
149
+ <!-- </div>-->
150
+ <!-- <div class="from-group" style="width: 100%">-->
151
+ <!-- <label style="width: 15%;float: left">片区</label>-->
152
+ <!-- <input type="text" class="form-control" v-model="selectItem.f_slice_area" style="width: 80%;float: left">-->
153
+ <!-- </div>-->
154
+ <div class="from-group" style="width: 100%">
155
+ <label style="width: 15%;float: left">街道</label>
156
+ <input type="text" class="form-control" v-model="selectItem.f_street" style="width: 80%;float: left">
157
+ </div>
158
+ <div class="from-group" style="width: 100%">
159
+ <label style="width: 15%;float: left">小区</label>
160
+ <input type="text" class="form-control" v-model="selectItem.f_residential_area" style="width: 80%;float: left">
161
+ </div>
162
+ <div class="from-group" style="width: 100%">
163
+ <label style="width: 15%;float: left">楼号</label>
164
+ <input type="text" class="form-control" v-model="selectItem.f_building" style="width: 80%;float: left">
165
+ </div>
166
+ <div class="from-group" style="width: 100%">
167
+ <label style="width: 15%;float: left">单元号</label>
168
+ <input type="text" class="form-control" v-model="selectItem.f_unit" style="width: 80%;float: left">
169
+ </div>
170
+ <div class="from-group" style="width: 100%">
171
+ <label style="width: 15%;float: left">楼层</label>
172
+ <input type="text" class="form-control" v-model="selectItem.f_floor" style="width: 80%;float: left">
173
+ </div>
174
+ <div class="from-group" style="width: 100%">
175
+ <label style="width: 15%;float: left">门牌号</label>
176
+ <input type="text" class="form-control" v-model="selectItem.f_room" style="width: 80%;float: left">
177
+ </div>
178
+ <!-- <div class="from-group" style="width: 100%">-->
179
+ <!-- <label style="width: 15%;float: left">人口数</label>-->
180
+ <!-- <input type="number" class="form-control" v-model="selectItem.f_people_num" style="width: 80%;float: left">-->
181
+ <!-- </div>-->
182
+ <div class="from-group" style="width: 100%">
183
+ <label style="width: 15%;float: left">用户状态</label>
184
+ <v-select :value.sync="selectItem.f_user_state" v-model="selectItem.f_user_state"
185
+ :options='userstate' placeholder='请选择' style="width: 80%;float: left" :width="'80%'"
186
+ close-on-select >
187
+ </v-select>
188
+ </div>
189
+ </article>
190
+
191
+
192
+ <footer slot="modal-footer" class="modal-footer">
193
+ <div class="from-group" style="width: 100%;float: left">
194
+ <button v-show="show" type="button" class="btn btn-default" @click='close'>取消</button>
195
+ <button v-show="show" type="button" class="btn btn-success" @click='confirm'>确认</button>
196
+ </div>
197
+ </footer>
198
+ </modal>
199
+
200
+
201
+ <modal :show.sync="addshow" v-ref:modal backdrop="false">
202
+ <header slot="modal-header" class="modal-header">
203
+ <button type="button" class="close" @click="addclose"><span>&times;</span></button>
204
+ <h4 class="modal-title">配置</h4>
205
+ </header>
206
+ <!--表档案修改-->
207
+ <article slot="modal-body" class="modal-body" >
208
+ <div class="from-group">
209
+ <label style="width: 20%;float: left">表号</label>
210
+ <input type="text" style="width: 80%;float: left" class="form-control" v-model="selectItem.f_meternumber"/>
211
+ </div>
212
+
213
+ <!-- <div class="from-group">-->
214
+ <!-- <label style="width: 20%;float: left">表箱号</label>-->
215
+ <!-- <input type="text" style="width: 80%;float: left" class="form-control" v-model="selectItem.f_metertitles"/>-->
216
+ <!-- </div>-->
217
+ <div class="from-group" v-if="this.selectdata.defname != '通气'">
218
+ <label style="width: 20%;float: left">气表品牌</label>
219
+ <v-select :value.sync="selectItem.f_meter_brand" v-model="selectItem.f_meter_brand"
220
+ :options='meterbrand' placeholder='请选择' style="width: 80%;float: left" :width="'80%'"
221
+ close-on-select search="">
222
+ </v-select>
223
+ </div>
224
+ <!-- 通气时显示 -->
225
+ <div class="from-group" v-if="this.selectdata.defname == '通气'">
226
+ <label style="width: 20%;float: left">气表品牌</label>
227
+ <input type="text" style="width: 80%;float: left" class="form-control" v-model="selectItem.f_meter_brand"/>
228
+ </div>
229
+
230
+ <div class="from-group" v-if="this.selectdata.defname != '通气'">
231
+ <label style="width: 20%;float: left">气表型号</label>
232
+ <v-select :value.sync="selectItem.f_meter_style" v-model="selectItem.f_meter_style"
233
+ :options='meterstyle' placeholder='请选择' style="width: 80%;float: left" :width="'80%'"
234
+ close-on-select >
235
+ </v-select>
236
+ </div>
237
+ <!-- 通气时显示 -->
238
+ <div class="from-group" v-if="this.selectdata.defname == '通气'">
239
+ <label style="width: 20%;float: left">气表型号</label>
240
+ <input type="text" style="width: 80%;float: left" class="form-control" v-model="selectItem.f_meter_style"/>
241
+ </div>
242
+
243
+ <div class="from-group" v-if="this.selectdata.defname != '通气'">
244
+ <label style="width: 20%;float: left">左右表</label>
245
+ <v-select :value.sync="selectItem.f_aroundmeter" v-model="selectItem.f_aroundmeter"
246
+ :options='aroundmeter' placeholder='请选择' style="width: 80%;float: left" :width="'80%'"
247
+ close-on-select >
248
+ </v-select>
249
+ </div>
250
+ <!-- 通气时显示 -->
251
+ <div class="from-group" v-if="this.selectdata.defname == '通气'">
252
+ <label style="width: 20%;float: left">左右表</label>
253
+ <input type="text" style="width: 80%;float: left" class="form-control" v-model="selectItem.f_aroundmeter"/>
254
+ </div>
255
+
256
+ <!-- <div class="from-group">-->
257
+ <!-- <label style="width: 20%;float: left">表状态</label>-->
258
+ <!-- <input type="text" style="width: 80%;float: left" class="form-control" v-model="selectItem.f_table_state"/>-->
259
+ <!-- </div>-->
260
+ <div class="from-group" v-if="this.selectdata.defname == '通气'">
261
+ <label style="width: 20%;float: left">气价名称</label>
262
+ <v-select :value.sync="selectItem.f_price_name" v-model="selectItem.f_price_name"
263
+ :options='pricename' placeholder='请选择' style="width: 80%;float: left" :width="'80%'" @change="priceChange"
264
+ close-on-select >
265
+ </v-select>
266
+ </div>
267
+ <!-- <div class="from-group">-->
268
+ <!-- <label style="width: 20%;float: left">客户类型</label>-->
269
+ <!-- <v-select :value.sync="selectItem.f_user_type" v-model="selectItem.f_user_type" :width="'80%'"-->
270
+ <!-- :options='usertypes' placeholder='请选择' style="width: 80%;float: left"-->
271
+ <!-- close-on-select >-->
272
+ <!-- </v-select>-->
273
+ <!-- </div>-->
274
+ <div class="from-group" v-if="this.selectdata.defname == '通气'">
275
+ <label style="width: 20%;float: left">客户类型</label>
276
+ <input type="text" style="width: 80%;float: left" class="form-control" v-model="selectItem.f_user_type" />
277
+ </div>
278
+ <!-- <div class="from-group">-->
279
+ <!-- <label style="width: 20%;float: left">用气性质</label>-->
280
+ <!-- <v-select :value.sync="selectItem.f_gasproperties" v-model="selectItem.f_gasproperties"-->
281
+ <!-- :options='gasproperties' placeholder='请选择' style="width: 80%;float: left" :width="'80%'"-->
282
+ <!-- close-on-select >-->
283
+ <!-- </v-select>-->
284
+ <!-- </div>-->
285
+ <div class="from-group" v-if="this.selectdata.defname == '通气'">
286
+ <label style="width: 20%;float: left">用气性质</label>
287
+ <input type="text" style="width: 80%;float: left" class="form-control" v-model="selectItem.f_gasproperties"/>
288
+ </div>
289
+ <div class="from-group" v-if="this.selectdata.defname == '通气'">
290
+ <label style="width: 20%;float: left">价格</label>
291
+ <input type="text" style="width: 80%;float: left" class="form-control" v-model="selectItem.f_price"/>
292
+ </div>
293
+ <div class="from-group" v-if="this.selectdata.defname == '通气'">
294
+ <label style="width: 20%;float: left">气价类型</label>
295
+ <input type="text" style="width: 80%;float: left" class="form-control" v-model="selectItem.f_price_type"/>
296
+ </div>
297
+ <!-- <div class="from-group">-->
298
+ <!-- <label style="width: 20%;float: left">气价类型</label>-->
299
+ <!-- <v-select :value.sync="selectItem.f_price_type" v-model="selectItem.f_price_type"-->
300
+ <!-- :options='pricetype' placeholder='请选择' style="width: 80%;float: left" :width="'80%'"-->
301
+ <!-- close-on-select >-->
302
+ <!-- </v-select>-->
303
+ <!-- </div>-->
304
+ <div class="from-group" v-if="this.selectdata.defname == '通气'">
305
+ <label style="width: 20%;float: left">气表类型</label>
306
+ <v-select :value.sync="selectItem.f_meter_classify" v-model="selectItem.f_meter_classify"
307
+ :options='meterclassify' placeholder='请选择' style="width: 80%;float: left" :width="'80%'"
308
+ close-on-select >
309
+ </v-select>
310
+ </div>
311
+ <!-- <div class="from-group" v-if="this.selectdata.defname == '通气'">-->
312
+ <!-- <label style="width: 20%;float: left">安装位置</label>-->
313
+ <!-- <v-select :value.sync="selectItem.f_position" v-model="selectItem.f_position"-->
314
+ <!-- :options='position' placeholder='请选择' style="width: 80%;float: left" :width="'80%'"-->
315
+ <!-- close-on-select >-->
316
+ <!-- </v-select>-->
317
+ <!-- </div>-->
318
+ <!-- <div class="from-group" v-if="this.selectdata.defname == '通气'">-->
319
+ <!-- <label style="width: 20%;float: left">抄表员</label>-->
320
+ <!-- <v-select :value.sync="selectItem.f_inputtor" v-model="selectItem.f_inputtor"-->
321
+ <!-- :options='inputtor' placeholder='请选择' style="width: 80%;float: left" :width="'80%'"-->
322
+ <!-- close-on-select >-->
323
+ <!-- </v-select>-->
324
+ <!-- </div>-->
325
+ <div class="from-group" v-if="this.selectdata.defname == '通气' && this.super_book">
326
+ <label style="width: 20%;float: left">抄表本</label>
327
+ <v-select :value.sync="selectItem.f_super_book" v-model="selectItem.f_super_book"
328
+ :options='super_book_array' placeholder='请选择' style="width: 80%;float: left" :width="'80%'"
329
+ close-on-select >
330
+ </v-select>
331
+ </div>
332
+ <div class="from-group" v-if="this.selectdata.defname == '通气'">
333
+ <label style="width: 20%;float: left">通气人</label>
334
+ <input type="text" style="width: 80%;float: left" class="form-control" v-model="selectItem.f_gas_person"/>
335
+ </div>
336
+ <div class="from-group" v-if="this.selectdata.defname == '通气'">
337
+ <label style="width: 20%;float: left">通气时间</label>
338
+ <datepicker style="width: 80%;float: left" :width="'80%'"
339
+ :value.sync="selectItem.f_gas_date"
340
+ :format="'yyyy-MM-dd HH:mm:ss'"
341
+ v-model="selectItem.f_gas_date"
342
+ :readonly="true"
343
+ :show-reset-button="reset">
344
+ </datepicker>
345
+ </div>
346
+ <!-- <div class="from-group">-->
347
+ <!-- <label style="width: 20%;float: left">通气表号</label>-->
348
+ <!-- <input type="text" style="width: 80%;float: left" class="form-control" v-model="selectItem.f_gas_meternumber"/>-->
349
+ <!-- </div>-->
350
+ <!--<div class="from-group">
351
+ <label style="width: 20%;float: left">输损率</label>
352
+ <input type="number" style="width: 80%;float: left" class="form-control" v-model="selectItem.f_lossrate" v-validate:f_lossrate='{dctest: [1, "<" ] }'/>
353
+ </div>-->
354
+
355
+ </article>
356
+ <footer slot="modal-footer" class="modal-footer">
357
+ <button type="button" class="btn btn-default" @click='addclose'>取消</button>
358
+ <button type="button" class="btn btn-success" v-if="showqueren" @click='addconfirm'>确认</button>
359
+ <button type="button" class="btn btn-success" v-else>提交中</button>
360
+ </footer>
361
+ </modal>
362
+
363
+ <modal :show.sync="updateshow" v-ref:modal backdrop="false">
364
+ <header slot="modal-header" class="modal-header">
365
+ <button type="button" class="close" @click="updateclose"><span>&times;</span></button>
366
+ <h4 class="modal-title">配置</h4>
367
+ </header>
368
+ <!--户档案修改-->
369
+ <article slot="modal-body" class="modal-body" >
370
+ <div class="from-group">
371
+ <label style="width: 20%;float: left">表号</label>
372
+ <input type="text" style="width: 80%;float: left" class="form-control" v-model="selectItem.f_meternumber"/>
373
+ </div>
374
+ <div class="from-group">
375
+ <label style="width: 20%;float: left">气表品牌</label>
376
+ <v-select :value.sync="selectItem.f_meter_brand" v-model="selectItem.f_meter_brand"
377
+ :options='meterbrand' placeholder='请选择' style="width: 80%;float: left"
378
+ close-on-select search="">
379
+ </v-select>
380
+ </div>
381
+ <div class="from-group">
382
+ <label style="width: 20%;float: left">表型号</label>
383
+ <v-select :value.sync="selectItem.f_meter_style" v-model="selectItem.f_meter_style"
384
+ :options='meterstyle' placeholder='请选择' style="width: 80%;float: left"
385
+ close-on-select >
386
+ </v-select>
387
+ </div>
388
+ </article>
389
+ <footer slot="modal-footer" class="modal-footer">
390
+ <button type="button" class="btn btn-default" @click='updateclose'>取消</button>
391
+ <button type="button" class="btn btn-success" @click='updateconfirm'>确认</button>
392
+ </footer>
393
+ </modal>
394
+
395
+
396
+ <modal :show.sync="showFile" v-ref:modal backdrop="false">
397
+ <header slot="modal-header" class="modal-header">
398
+ <button type="button" class="close" @click="closeFile"><span>&times;</span></button>
399
+ <h4 class="modal-title">档案及工料费导入</h4>
400
+ </header>
401
+ <article slot="modal-body" class="modal-body">
402
+ <div class="form-group">
403
+ <file-upload class="my-file-uploader" :name="key+(Math.random()+3)+8882" :id="key+(Math.random()+3)+8882"
404
+ action="rs/file/uploadFile" tagname="文件导入" :headers="headers" v-ref:file></file-upload>
405
+ </div>
406
+ </article>
407
+ <footer slot="modal-footer" class="modal-footer"></footer>
408
+ </modal>
409
+ <modal :show.sync="showInfo" v-ref:modal backdrop="false">
410
+ <header slot="modal-header" class="modal-header">
411
+ <button type="button" class="close" @click="closeFile1"><span>&times;</span></button>
412
+ <h4 class="modal-title">增值产品导入</h4>
413
+ </header>
414
+ <article slot="modal-body" class="modal-body">
415
+ <div class="form-group">
416
+ <file-upload class="my-file-uploader" :name="key+(Math.random()+3)+8883" :id="key+(Math.random()+3)+8883"
417
+ action="rs/file/uploadFile" tagname="文件导入" :headers="headers" v-ref:file_one></file-upload>
418
+ </div>
419
+ </article>
420
+ <footer slot="modal-footer" class="modal-footer"></footer>
421
+ </modal>
422
+ <!-- 建档花名册下载 -->
423
+ <!-- <modal :show.sync="upload_meter" backdrop="false">-->
424
+ <!-- <header slot="modal-header" class="modal-header">-->
425
+ <!-- <h4 class="modal-title">建档花名册下载</h4>-->
426
+ <!-- </header>-->
427
+ <!-- <article slot="modal-body" class="modal-body">-->
428
+ <!-- <div class="col-sm-12 span recordTable" style="margin-top: 10px;height:70vh;">-->
429
+ <!-- <upload v-ref:file :blodid = "selectdata.f_process_id" :isusetype = "true" :isremark = "true" :defname="selectdata.defname"></upload>&ndash;&gt;-->
430
+ <!-- &lt;!&ndash;<customer-file v-ref:file :selectdata="selectdata"></customer-file>&ndash;&gt;-->
431
+ <!-- </div>-->
432
+ <!-- </article>-->
433
+ <!-- <footer slot="modal-footer" class="modal-footer">-->
434
+ <!-- <div class="from-group" style="width: 100%;float: left">-->
435
+ <!-- <button v-show="upload_meter" type="button" class="btn btn-default" @click='upload_meter_close'>关闭</button>-->
436
+ <!--&lt;!&ndash; <button v-show="upload_meter" type="button" class="btn btn-success" @click='showClose'>&ndash;&gt;-->
437
+ <!--&lt;!&ndash; 确认&ndash;&gt;-->
438
+ <!--&lt;!&ndash; </button>&ndash;&gt;-->
439
+ <!-- </div>-->
440
+ <!-- </footer>-->
441
+ <!-- </modal>-->
442
+ <work-busy :is-busy="iswork" v-show="iswork"></work-busy>
443
+ </template>
444
+
445
+ <script>
446
+ import {HttpResetClass} from 'vue-client'
447
+ // import axios from 'axios'
448
+ import Vue from 'vue'
449
+ export default {
450
+ title: '档案信息',
451
+ props: ['selectdata', 'key','edit'],
452
+ data() {
453
+ return {
454
+ iswork:false,
455
+ headers: {'username': this.$login.f.name, 'blodid': this.selectdata.f_process_id, 'fusetype': '报建execl导入用户档案'},
456
+ //户档案表头
457
+ userHeadData: ['档案编号', '用户姓名', '用户电话', '区', '片区', '街道名称', '小区名称', '楼号', '单元号', '楼层', '门牌号', '用气性质', '用户状态'],
458
+ //户档案内容
459
+ userBodyData: ['f_userinfo_id', 'f_user_name', 'f_user_phone', 'f_area', 'f_slice_area', 'f_street', 'f_residential_area', 'f_building', 'f_unit', 'f_floor', 'f_room', 'f_gasproperties', 'f_user_state'],
460
+ //表档案表头
461
+ surHeadData: ['户档案编号', '表号', '气表品牌', '表型号','通气表号','通气人','通气时间','被修改表号'],
462
+ //表档案内容
463
+ surBodyData: ['f_userinfo_id', 'f_meternumber', 'f_meter_brand', 'f_meter_style','f_gas_meternumber','f_gas_person','f_gas_date','f_gas_meternumber'],
464
+ //设备表头
465
+ eqHeadData: ['户档案编号', '设备编号', '设备类型', '设备品牌','设备型号','设备数量'],
466
+ //设备内容
467
+ eqBodyData: ['f_userinfo_id', 'f_devices_no', 'f_devices_type', 'f_brand','f_devices_model','f_devices_num'],
468
+ params: null,
469
+ record: {},
470
+ selectItem: {
471
+ 'f_meternumber': null,
472
+ 'f_meter_brand': null,
473
+ 'f_meter_style': null,
474
+ 'f_aroundmeter': null,
475
+ 'f_price_name': null,
476
+ 'f_price_type': null,
477
+ 'f_price': null,
478
+ 'f_gasproperties': null,
479
+ 'f_user_type': null,
480
+ 'f_meter_classify': null,
481
+ 'f_position': null,
482
+ 'f_inputtor': null,
483
+ 'f_gas_person': null,
484
+ 'f_gas_date': null,
485
+ 'f_super_book': null
486
+ },
487
+ pricetype:[],
488
+ pricename:[],
489
+ model: {
490
+ rows: []
491
+ },
492
+ batchmodel :{
493
+ rows: []
494
+ },
495
+ params: { // 选择的具体内容
496
+ rows: []
497
+ },
498
+ condition: '',
499
+ show: false,
500
+ showFile: false,
501
+ showInfo: false,// 表信息导入
502
+ showCon: false,
503
+ ischecked: false,
504
+ getfield: {},
505
+ checked: [],
506
+ isShowdetail:false,
507
+ userinfo_id: null,
508
+ addshow:false,
509
+ meterstyle:[],
510
+ meterbrand:[],
511
+ styletype:[],
512
+ updateshow:false,
513
+ importtype:null,
514
+ showqueren:true,
515
+ userstate:this.$appdata.getParam('用户状态'),
516
+ checker:this.$appdata.getParam('安全员'),
517
+ coststate:this.$appdata.getParam('结算状态'),
518
+ costtype:this.$appdata.getParam('缴费类型'),
519
+ aroundmeter:this.$appdata.getParam('左右表'),
520
+ // gasproperties:this.$appdata.getParam('用气性质'),
521
+ // usertypes:this.$appdata.getParam('用户类型'),
522
+ // tablestate:this.$appdata.getParam('表状态'),
523
+ meterclassify:this.$appdata.getParam('气表类型'),
524
+ whetherhairpin:this.$appdata.getParam('是否发卡'),
525
+ // position:this.$appdata.getParam('安装位置'),
526
+ inputtor:null,
527
+ viewPage: false,
528
+ userinfo_array: [],
529
+ super_book: false,
530
+ super_book_array: [],
531
+ upload_meter: false
532
+ }
533
+ },
534
+ ready() {
535
+ // 获取抄表员
536
+ // let data = []
537
+ // let array = []
538
+ // data = this.$login.f.f_gasman.map(item => {
539
+ // return item.name;
540
+ // })
541
+ // for (let q = 0; q < data.length; q++) {
542
+ // let arraydata = {
543
+ // 'label': data[q],
544
+ // 'value': data[q]
545
+ // }
546
+ // if (array.length != 0) {
547
+ // for (let w = 0; w < array.length; w++) {
548
+ // if (array[w].label == data[q]) {
549
+ // break
550
+ // }
551
+ // while (w == array.length - 1) {
552
+ // array.push(arraydata)
553
+ // break
554
+ // }
555
+ // }
556
+ // } else {
557
+ // array.push(arraydata)
558
+ // }
559
+ // }
560
+ // this.inputtor = array
561
+ this.load()
562
+ this.getitem()
563
+
564
+ if (this.selectdata.defname == '通气') {
565
+ this.getPriceInfo()
566
+ // this.getMeterBook()
567
+ }
568
+ },
569
+ watch: {
570
+ 'selectdata'() {
571
+ this.headers.blodid = this.selectdata.f_process_id
572
+ this.load()
573
+ },
574
+ // 'selectItem.f_meter_classify[0]'(val) {
575
+ // if (val == '机表') {
576
+ // this.super_book = true
577
+ // this.getMeterBook()
578
+ // }else {
579
+ // this.super_book = false
580
+ // }
581
+ // },
582
+ 'selectItem.f_meter_brand[0]'(val) {
583
+ console.log('选择的品牌改变了',val)
584
+ if (!val){
585
+ return
586
+ }
587
+ this.$resetpost('rs/logic/getMeterStyle', {data:{f_meter_brand :val, f_orgid: this.$login.f.orgid}} ,{resolveMsg: null, rejectMsg: null}).then((res) => {
588
+ console.log('获取的选项',res)
589
+ let house2 = []
590
+ for (let row of res.data){
591
+ house2.push({label: row.f_meter_style,value: row.f_meter_style})
592
+ }
593
+ this.meterstyle = house2
594
+ })
595
+ },
596
+ // 'selectItem.f_meternumber'() {
597
+ // if (this.selectItem.hasOwnProperty("f_meternumber")) {
598
+ // if (this.selectItem.f_meternumber == null || this.selectItem.f_meternumber == undefined || this.selectItem.f_meternumber == '' || this.selectItem.f_meternumber.trim().length == 0){
599
+ // this.$set('selectItem.f_table_state', "待安装")
600
+ // }else {
601
+ // this.$set('selectItem.f_table_state', "已安装")
602
+ // }
603
+ // }
604
+ //
605
+ // }
606
+ },
607
+
608
+ computed: {
609
+ address() {
610
+ let strAddress = `${this.record.f_area ? this.record.f_area
611
+ + '-' : ''}${this.record.f_street ? this.record.f_street
612
+ + '-' : ''}${this.record.f_residential_area ? this.record.f_residential_area
613
+ + '' : ''}${this.record.f_building ? this.record.f_building
614
+ + '号楼' : ''}${this.record.f_unit ? this.record.f_unit
615
+ + '单元' : ''}${this.record.f_floor ? this.record.f_floor
616
+ + '层' : ''}${this.record.f_room ? this.record.f_room
617
+ + '室' : ''}`
618
+ this.record.f_address = strAddress
619
+ return strAddress
620
+ },
621
+ getfield() {
622
+ let data = {}
623
+ this.userBodyData.forEach((value, index) => {
624
+ data[this.userBodyData[index]] = this.userHeadData[index]
625
+ })
626
+
627
+ console.log('data', data)
628
+ return data
629
+ }
630
+ },
631
+ methods: {
632
+ // 获取气价信息
633
+ async getPriceInfo() {
634
+ console.log('开始获取气价信息')
635
+ let http = new HttpResetClass()
636
+ let condition = "f_orgid = '" + this.$login.f.orgid + "'"
637
+ let res = await http.load('POST','rs/sql/applysingleTable',{data:{tablename:'t_stairprice',condition:condition}}, {resolveMsg: null, rejectMsg: null})
638
+ let data = []
639
+ let array = []
640
+ data = res.data.map(item => {
641
+ return item.f_price_name;
642
+ })
643
+ for (let q = 0; q < data.length; q++) {
644
+ let arraydata = {
645
+ 'label': data[q],
646
+ 'value': data[q]
647
+ }
648
+ if (array.length != 0) {
649
+ for (let w = 0; w < array.length; w++) {
650
+ if (array[w].label == data[q]) {
651
+ break
652
+ }
653
+ while (w == array.length - 1) {
654
+ array.push(arraydata)
655
+ break
656
+ }
657
+ }
658
+ } else {
659
+ array.push(arraydata)
660
+ }
661
+ }
662
+ this.pricename = array
663
+ },
664
+ // 获取抄表册
665
+ // async getMeterBook() {
666
+ // let http = new HttpResetClass()
667
+ // let condition = " f_orgname = '" + this.$login.f.orgs + "'"
668
+ // let res = await http.load('POST','rs/sql/applysingleTable',{data:{tablename: 't_meter_book', condition: condition}}, {resolveMsg: null, rejectMsg: "获取抄表本失败"})
669
+ // let data = []
670
+ // let array = []
671
+ // data = res.data.map(item => {
672
+ // return item.f_book_name;
673
+ // })
674
+ // for (let q = 0; q < data.length; q++) {
675
+ // let arraydata = {
676
+ // 'label': data[q],
677
+ // 'value': data[q]
678
+ // }
679
+ // if (array.length != 0) {
680
+ // for (let w = 0; w < array.length; w++) {
681
+ // if (array[w].label == data[q]) {
682
+ // break
683
+ // }
684
+ // while (w == array.length - 1) {
685
+ // array.push(arraydata)
686
+ // break
687
+ // }
688
+ // }
689
+ // } else {
690
+ // array.push(arraydata)
691
+ // }
692
+ // }
693
+ // this.super_book_array = array
694
+ //
695
+ // },
696
+ // 根据气价名称获取其他相对应数据
697
+ priceChange(val) {
698
+ console.log("被选中的数据:" + val)
699
+ this.getData(val)
700
+ },
701
+ async getData(val) {
702
+ let http2 = new HttpResetClass()
703
+ let condition2 = "s.f_orgid = '" + this.$login.f.orgid + "'" + " and s.f_price_name = '" + val + "'"
704
+ http2.load('POST','rs/sql/searchGasPrice',{data:{condition:condition2}}, {resolveMsg: null, rejectMsg: null}).then((res2)=>{
705
+ console.log("气价数据:" + JSON.stringify(res2.data))
706
+ // for (let j = 0; j < this.$refs.service_show.data.fields.length; j++) {
707
+ // if (this.$refs.service_show.data.fields[j].label == '气价类型') {
708
+ // console.log("气价类型:" + res2.data[0])
709
+ // console.log("气价类型1:" + res2.data[0].f_price_type)
710
+ // Vue.set(this.selectItem,'f_price_type',res2.data[0].f_price_type)
711
+ // this.selectItem.f_price_type = res2.data[0].f_price_type
712
+ // console.log("气价类型2:" + this.$refs.service_show.data.fields[j].value)
713
+ // }
714
+ //气价拼接
715
+ // if (this.$refs.service_show.data.fields[j].label == '价格') {
716
+ let p = 1
717
+ let resultPrice = ''
718
+ for(let l = 0; l < res2.data.length; l++){
719
+ resultPrice = resultPrice + res2.data[l].price + ' |'
720
+ if (p == 3) {
721
+ break
722
+ }
723
+ p++
724
+ }
725
+ console.log("拼接的价格:" + resultPrice)
726
+ //this.selectItem.f_price = resultPrice
727
+ this.$set('selectItem.f_price',resultPrice)
728
+ this.$set('selectItem.f_gasproperties',res2.data[0].f_gasproperties)
729
+ this.$set('selectItem.f_user_type',res2.data[0].f_user_type)
730
+ this.$set('selectItem.f_price_type',res2.data[0].f_price_type)
731
+ // }
732
+ // if (this.$refs.service_show.data.fields[j].label == '用气性质') {
733
+ // this.$set(this.selectItem,'f_gasproperties',res2.data[0].f_gasproperties)
734
+ //this.selectItem.f_gasproperties = res2.data[0].f_gasproperties
735
+ // }
736
+ // if (this.$refs.service_show.data.fields[j].label == '客户类型') {
737
+ //this.selectItem.f_user_type = res2.data[0].f_user_type
738
+ // }
739
+ // }
740
+ })
741
+
742
+ },
743
+ getitem(){
744
+ console.log('开始获取品牌')
745
+ let condition = '1=1'
746
+ let http = new HttpResetClass()
747
+ let data = {
748
+ condition: condition,
749
+ f_orgid: this.$login.f.orgid
750
+ }
751
+ http.load('POST','rs/logic/getRecordItem', {data: data}, {resolveMsg: null, rejectMsg: null}).then((res) => {
752
+ console.log('获取的选项',res)
753
+ let house2 = []
754
+ for (let row of res.data.meterbrand){
755
+ house2.push({label: row.f_meter_brand,value: row.f_meter_brand})
756
+ }
757
+ this.meterbrand = house2
758
+ })
759
+ },
760
+ upload_meter_close(){
761
+ this.upload_meter = false
762
+ },
763
+ addDetailed(){
764
+ this.importtype='2'
765
+ this.showFile = true
766
+ },
767
+ addclose(){
768
+ this.addshow = false
769
+ this.selectItem = {}
770
+ },
771
+
772
+ updateclose(){
773
+ this.updateshow = false
774
+ this.selectItem = {}
775
+ },
776
+ showdetail(val) {
777
+
778
+ console.log(val)
779
+ this.userinfo_id = val
780
+ this.isShowdetail=true
781
+ this.loadfiles()
782
+ },
783
+ async loadfiles() {
784
+ if (!this.selectdata)
785
+ return
786
+ let data = {
787
+ tablename: 't_userfiles',
788
+ condition: 'a.f_userinfo_id=' + '\'' + this.userinfo_id + '\''
789
+ }
790
+
791
+ let self = this
792
+ let http = new HttpResetClass()
793
+ let res = await http.load('POST', 'rs/sql/getUserfiles', {data: data}, {
794
+ resolveMsg: null,
795
+ rejectMsg: '获取表档案信息失败'
796
+ })
797
+ self.batchmodel.rows = []
798
+
799
+ self.batchmodel.rows = res.data
800
+ },
801
+ selected (val) {
802
+ this.selectItem = {"q":"q"}
803
+ },
804
+ //选择需要转银收的户档案
805
+ chooseOne(e, row, rows) {
806
+ console.log('row', row)
807
+ console.log('e', e)
808
+ this.ischecked = e.target.checked
809
+ console.log("state", e.target.checked)
810
+ //判断当前行是否被选中
811
+ if (this.ischecked) {
812
+ this.checked.push(row)
813
+ }
814
+ },
815
+ //修改选中的数据状态
816
+ changeState() {
817
+ if (this.checked.length > 0) {
818
+ let http = new HttpResetClass()
819
+ http.load('POST', 'rs/logic/updateUserState', {data: {rows: this.checked}}).then((res) => {
820
+ this.show = false
821
+ this.ischecked = false
822
+ // 如果没有id,需要在数组中添加
823
+ this.load()
824
+ this.checked = []
825
+ })
826
+ }
827
+ },
828
+ // 父组件更新子组件属性
829
+ updateData(val) {
830
+ this.headers.blodid = val.f_process_id
831
+ this.selectdata = val
832
+ },
833
+ async load() {
834
+ if (!this.selectdata)
835
+ return
836
+ let data = {
837
+ f_process_id: this.selectdata.f_process_id
838
+ }
839
+ let self = this
840
+ let http = new HttpResetClass()
841
+ let res = await http.load('POST', 'rs/sql/getUserArchives', {data: data}, {
842
+ resolveMsg: null,
843
+ rejectMsg: '获取户档案信息失败'
844
+ })
845
+ self.model.rows = []
846
+ self.model.rows = res.data
847
+ self.params = res.data
848
+
849
+
850
+ },
851
+ impexcel() {
852
+ this.importtype='1'
853
+ this.showFile = true
854
+ },
855
+ meterUpload() {
856
+ this.importtype='1'
857
+ this.upload_meter = true
858
+ },
859
+ impexcel1() {
860
+ this.importtype='1'
861
+ for (let i = 0; i < this.model.rows.length; i++) {
862
+ this.userinfo_array.push(this.model.rows[i].f_userinfo_id)
863
+ }
864
+ this.showInfo = true
865
+ // this.showCon = true
866
+ },
867
+ showClose() {
868
+ this.showCon = false
869
+ },
870
+ closeFile() {
871
+ this.showFile = false
872
+ this.showInfo = false
873
+ // 将选的文件清空
874
+ this.$refs.file.$el.querySelector('input').value = ''
875
+ },
876
+ closeFile1() {
877
+ this.showFile = false
878
+ this.showInfo = false
879
+ // 将选的文件清空
880
+ this.$refs.file_one.$el.querySelector('input').value = ''
881
+ },
882
+ delete(row){
883
+ console.log('开始删除')
884
+ let http = new HttpResetClass()
885
+ http.load('POST', 'rs/logic/deleteUserinfo', {data: {f_userinfo_id: row.f_userinfo_id}}, {resolveMsg: null, rejectMsg: null}).then((res) => {
886
+ console.log('返回的数据:',res)
887
+ if (res.data != null && res.data != "") {
888
+ this.$showMessage(res.data)
889
+ }else {
890
+ this.$showMessage("删除成功!")
891
+ this.load()
892
+ }
893
+ })
894
+ },
895
+
896
+ deleteItem(row) {
897
+
898
+
899
+ /* this.$showMessage('删除后不可恢复,确认删除吗?', ['confirm', 'cancel']).then((res) => {
900
+ if (res === 'confirm') {
901
+ let http = new HttpResetClass()
902
+ http.load('DELETE', `rs/entity/t_userinfo/${row.f_userinfo_id}`).then((res) => {
903
+ this.load()
904
+ })
905
+ }
906
+ })*/
907
+
908
+ this.$showMessage('删除后不可恢复,确认删除吗?', ['confirm', 'cancel']).then((res) => {
909
+ if (res === 'confirm') {
910
+ let http = new HttpResetClass()
911
+ console.log("用户id:" + row.f_userfiles_id)
912
+ http.load('DELETE', `rs/entity/t_userfiles/${row.f_userfiles_id}`).then((res) => {
913
+ this.loadfiles()
914
+ })
915
+ }
916
+ })
917
+
918
+ },
919
+ //户档案查询
920
+ filterParams(param) {
921
+ this.isShowdetail=false
922
+ if (param && param !== "") {
923
+ let temp = []
924
+ for (var i = 0; i < this.model.rows.length; i++) {
925
+ if (this.model.rows[i].f_user_name.includes(param)) {
926
+ temp.push(this.model.rows[i])
927
+ }
928
+ }
929
+ this.model.rows = temp
930
+ } else {
931
+ this.model.rows = this.params
932
+ }
933
+ },
934
+ //表档案查询
935
+ filterParam(param) {
936
+ if (param && param !== "") {
937
+ let temp = []
938
+ for (var i = 0; i < this.model.rows.length; i++) {
939
+ if (this.model.rows[i].f_meter_brand.includes(param)) {
940
+ temp.push(this.model.rows[i])
941
+ }
942
+ }
943
+ this.model.rows = temp
944
+ } else {
945
+ this.model.rows = this.params
946
+ }
947
+ },
948
+ //设备列表查询
949
+ findEq(param) {
950
+ if (param && param !== "") {
951
+ let temp = []
952
+ for (var i = 0; i < this.model.rows.length; i++) {
953
+ if (this.model.rows[i].f_meter_brand.includes(param)) {
954
+ temp.push(this.model.rows[i])
955
+ }
956
+ }
957
+ this.model.rows = temp
958
+ } else {
959
+ this.model.rows = this.params
960
+ }
961
+ },
962
+ add() {
963
+ this.show = true
964
+ console.log("点击了添加")
965
+ },
966
+ async user_search() {
967
+ if (!this.selectdata)
968
+ return
969
+ let data = {
970
+ condition: ' 1 = 1'
971
+ }
972
+ if (this.model.f_user_name != null && this.model.f_user_name != undefined && this.model.f_user_name != '') {
973
+ data.condition = ' u.f_user_name = ' + '\'' + this.model.f_user_name + '\''
974
+ }else if (this.model.f_user_phone != null && this.model.f_user_phone != undefined && this.model.f_user_phone != '') {
975
+ data.condition = ' u.f_user_phone = ' + '\'' + this.model.f_user_phone + '\''
976
+ }else if (this.model.f_user_name != undefined && this.model.f_user_phone != undefined) {
977
+ data.condition = ' u.f_user_phone = ' + '\'' + this.model.f_user_phone + '\'' + ' and u.f_user_name = ' + '\'' + this.model.f_user_name + '\''
978
+ }
979
+ let self = this
980
+ let http = new HttpResetClass()
981
+ let res = await http.load('POST', 'rs/sql/reportFormUser', {data: data}, {
982
+ resolveMsg: null,
983
+ rejectMsg: '获取户档案信息失败'
984
+ })
985
+ self.model.rows = []
986
+ self.model.rows = res.data
987
+ if (res.data.length == 0) {
988
+ this.$showMessage("该用户无数据")
989
+ }
990
+ },
991
+ // 修改按钮
992
+ modifyParam(row) {
993
+ this.$set('selectItem.f_userinfo_id', row.f_userinfo_id)
994
+ this.$set('selectItem.f_user_name', row.f_user_name)
995
+ this.$set('selectItem.f_user_phone', row.f_user_phone)
996
+ // this.$set('selectItem.f_pcd', row.f_pcd)
997
+ // this.$set('selectItem.f_slice_area', row.f_slice_area)
998
+ this.$set('selectItem.f_area', row.f_area)
999
+ this.$set('selectItem.f_street', row.f_street)
1000
+ this.$set('selectItem.f_residential_area', row.f_residential_area)
1001
+ this.$set('selectItem.f_building', row.f_building)
1002
+ this.$set('selectItem.f_unit', row.f_unit)
1003
+ this.$set('selectItem.f_floor', row.f_floor)
1004
+ this.$set('selectItem.f_room', row.f_room)
1005
+ // this.selectItem.f_cost_type= [row.f_cost_type]
1006
+ // this.selectItem.f_cost_state=[row.f_cost_state]
1007
+ // this.$set('selectItem.f_people_num', row.f_people_num)
1008
+ // this.selectItem.f_checker=[row.f_checker]
1009
+ this.selectItem.f_user_state= [row.f_user_state]
1010
+ this.$set('selectItem.version', row.version)
1011
+ this.show = true
1012
+ },
1013
+
1014
+ //获取当前用户表档案信息
1015
+ getUserFiles(row) {
1016
+ this.isShowFiles = true
1017
+ console.log('获取户档案信息')
1018
+
1019
+ let data = {
1020
+ tablename: 't_userfiles',
1021
+ condition: `f_userinfo_id=${row.f_userinfo_id}`
1022
+ }
1023
+ let http = new HttpResetClass()
1024
+ let resGasbrand = http.load('POST', 'rs/sql/singleTable', {data: data}, {
1025
+ resolveMsg: null,
1026
+ rejectMsg: '获取档案信息失败'
1027
+ })
1028
+ self.model.rows = []
1029
+ self.model.rows = res.data
1030
+ },
1031
+ //表档案修改
1032
+ filesModify(row) {
1033
+ console.log('表档案数据',row)
1034
+ this.$set('selectItem.f_userinfo_id', row.f_userinfo_id)
1035
+ this.$set('selectItem.f_user_id', row.f_user_id)
1036
+ // 表号
1037
+ this.$set('selectItem.f_meternumber', row.f_meternumber)
1038
+ // 表箱号
1039
+ // this.$set('selectItem.f_metertitles', row.f_metertitles)
1040
+ // 气表品牌
1041
+ // let data1 = row.f_meter_brand
1042
+ // let array1 = []
1043
+ // let arraydata1 = {
1044
+ // 'label': data1,
1045
+ // 'value': data1
1046
+ // }
1047
+ // array1.push(arraydata1)
1048
+ this.$set('selectItem.f_meter_brand', row.f_meter_brand)
1049
+ // 气表型号
1050
+ // let data2 = row.f_meter_style
1051
+ // let array2 = []
1052
+ // let arraydata2 = {
1053
+ // 'label': data2,
1054
+ // 'value': data2
1055
+ // }
1056
+ // array2.push(arraydata2)
1057
+ this.$set('selectItem.f_meter_style', row.f_meter_style)
1058
+ // 左右表
1059
+ // let data3 = row.f_aroundmeter
1060
+ // let array3 = []
1061
+ // let arraydata3 = {
1062
+ // 'label': data3,
1063
+ // 'value': data3
1064
+ // }
1065
+ // array3.push(arraydata3)
1066
+ this.$set('selectItem.f_aroundmeter', row.f_aroundmeter)
1067
+ // 表状态
1068
+ // console.log("表状态:" + row.f_table_state)
1069
+ // let data4 = row.f_table_state
1070
+ // let array4 = []
1071
+ // let arraydata4 = {
1072
+ // 'label': data4,
1073
+ // 'value': data4
1074
+ // }
1075
+ // array4.push(arraydata4)
1076
+ // this.$set('selectItem.f_table_state', array4)
1077
+ // 气价名称
1078
+ // let data5 = row.f_price_name
1079
+ // let array5 = []
1080
+ // let arraydata5 = {
1081
+ // 'label': data5,
1082
+ // 'value': data5
1083
+ // }
1084
+ // array5.push(arraydata5)
1085
+ this.$set('selectItem.f_price_name', row.f_price_name)
1086
+ // 客户类型
1087
+ this.$set('selectItem.f_user_type', row.f_user_type)
1088
+ // 用气性质
1089
+ this.$set('selectItem.f_gasproperties', row.f_gasproperties)
1090
+ // 价格
1091
+ this.$set('selectItem.f_price', row.f_price)
1092
+ // 气价类型
1093
+ this.$set('selectItem.f_price_type', row.f_price_type)
1094
+ // 气表类型
1095
+ // let data6 = row.f_meter_classify
1096
+ // let array6 = []
1097
+ // let arraydata6 = {
1098
+ // 'label': data6,
1099
+ // 'value': data6
1100
+ // }
1101
+ // array6.push(arraydata6)
1102
+ this.$set('selectItem.f_meter_classify', row.f_meter_classify)
1103
+ // 安装位置
1104
+ // let data7 = row.f_position
1105
+ // let array7 = []
1106
+ // let arraydata7 = {
1107
+ // 'label': data7,
1108
+ // 'value': data7
1109
+ // }
1110
+ // array7.push(arraydata7)
1111
+ this.$set('selectItem.f_position', row.f_position)
1112
+ // 抄表员
1113
+ // let data8 = row.f_inputtor
1114
+ // let array8 = []
1115
+ // let arraydata8 = {
1116
+ // 'label': data8,
1117
+ // 'value': data8
1118
+ // }
1119
+ // array8.push(arraydata8)
1120
+ // this.$set('selectItem.f_inputtor', row.f_inputtor)
1121
+ // 通气人
1122
+ this.$set('selectItem.f_gas_person', row.f_gas_person)
1123
+ // 通气时间
1124
+ this.$set('selectItem.f_gas_date', row.f_gas_date)
1125
+ console.log("气表品牌:" + row.f_meter_brand,"气表型号:" + row.f_meter_style)
1126
+ this.$set('selectItem.version', row.version)
1127
+ // this.$set('selectItem.f_meter_base', row.f_meter_base)
1128
+ // this.$set('selectItem.f_heater_gas', row.f_heater_gas)
1129
+ // this.$set('selectItem.f_whether_hairpin', row.f_whether_hairpin)
1130
+ // this.$set('selectItem.f_lossrate', row.f_lossrate)
1131
+ this.addshow = true
1132
+ this.getpricetype()
1133
+
1134
+ },
1135
+ getpricetype(){
1136
+ // console.log('开始获取气价类别')
1137
+ // let condition =`f_user_type = '${this.selectItem.f_user_type}' and f_filiale = '${this.$login.f.f_fengongsi}'
1138
+ // and f_gasproperties = '${this.selectItem.f_gasproperties}'`
1139
+ // this.$resetpost('rs/logic/getRecordItem', {condition}, {resolveMsg: null, rejectMsg: null}).then((res) => {
1140
+ // console.log('获取的选项',res)
1141
+ // let house2 = []
1142
+ // for (let row of res.data.pricetype){
1143
+ // house2.push({label: row.f_price_type,value: row.f_price_type})
1144
+ // }
1145
+ // // this.pricetype = house2
1146
+ // let house = []
1147
+ // for (let row of res.data.meterbrand){
1148
+ // house.push({label: row.f_meter_brand,value: row.f_meter_brand})
1149
+ // }
1150
+ // this.meterbrand = house
1151
+ // let house3 = []
1152
+ // for (let row of res.data.pricename){
1153
+ // house3.push({label: row.f_price_name,value: row.f_price_name})
1154
+ // }
1155
+ // //this.pricename = house3
1156
+ // })
1157
+ },
1158
+ //新增修改或删除提交
1159
+ async confirm() {
1160
+ let http = new HttpResetClass()
1161
+ await http.load('POST', 'rs/logic/recordSave', this.selectItem).then((res) => {
1162
+ this.show = false
1163
+ // 如果没有id,需要在数组中添加
1164
+ this.load()
1165
+ this.selectItem = {}
1166
+ })
1167
+
1168
+ },
1169
+
1170
+ async addconfirm() {
1171
+ if (this.selectItem.f_meternumber == null || this.selectItem.f_meternumber == undefined || this.selectItem.f_meternumber.trim().length == 0){
1172
+ this.$showAlert("表号不能为空","warning", 3000)
1173
+ return
1174
+ }
1175
+ // if (this.selectItem.f_metertitles == null || this.selectItem.f_metertitles == undefined || this.selectItem.f_metertitles.trim().length == 0){
1176
+ // this.$showAlert("表箱号不能为空","warning", 3000)
1177
+ // return
1178
+ // }
1179
+ // console.log("==========+++++++++=============:" + this.selectItem,"okk:" + JSON.stringify(this.selectItem))
1180
+ if (this.selectItem.f_meter_brand != null){
1181
+ if (this.selectItem.f_meter_brand[0] == null || this.selectItem.f_meter_brand[0] == undefined || this.selectItem.f_meter_brand[0].trim().length == 0){
1182
+ this.$showAlert("气表品牌不能为空","warning", 3000)
1183
+ return
1184
+ }
1185
+ }else {
1186
+ this.$showAlert("气表品牌不能为空","warning", 3000)
1187
+ return
1188
+ }
1189
+ // 气表型号不能为空
1190
+ if (this.selectItem.f_meter_style != null){
1191
+ if (this.selectItem.f_meter_style[0] == null || this.selectItem.f_meter_style[0] == undefined || this.selectItem.f_meter_style[0].trim().length == 0){
1192
+ this.$showAlert("气表型号不能为空","warning", 3000)
1193
+ return
1194
+ }
1195
+ }else {
1196
+ this.$showAlert("气表型号不能为空","warning", 3000)
1197
+ return
1198
+ }
1199
+ // 左右表不能为空
1200
+ if (this.selectItem.f_aroundmeter != null){
1201
+ if (this.selectItem.f_aroundmeter[0] == null || this.selectItem.f_aroundmeter[0] == undefined || this.selectItem.f_aroundmeter[0].trim().length == 0){
1202
+ this.$showAlert("左右表不能为空","warning", 3000)
1203
+ return
1204
+ }
1205
+ }else {
1206
+ this.$showAlert("左右表不能为空","warning", 3000)
1207
+ return
1208
+ }
1209
+
1210
+
1211
+ this.showqueren = false
1212
+ let http = new HttpResetClass()
1213
+ this.$set('selectItem.f_userinfo_id', this.userinfo_id)
1214
+ this.selectItem.f_filiale = this.$login.f.orgs
1215
+ this.selectItem.orgid = this.$login.f.orgid
1216
+ this.selectItem.defname = this.selectdata.defname
1217
+ await http.load('POST', 'rs/logic/addmeterrecord', this.selectItem).then((res) => {
1218
+ this.addshow = false
1219
+ // 如果没有id,需要在数组中添加
1220
+ this.loadfiles()
1221
+ this.selectItem = {}
1222
+ if (res.data.msg != null && res.data.msg != "") {
1223
+ this.$showMessage(res.data.msg)
1224
+ }else {
1225
+ this.$showMessage("修改成功!")
1226
+ }
1227
+ })
1228
+ this.showqueren = true
1229
+ },
1230
+ async updateconfirm(){
1231
+ let http = new HttpResetClass()
1232
+
1233
+ await http.load('POST', 'rs/logic/updatemetrecord', this.selectItem,{resolveMsg: null, rejectMsg: '修改失败'}).then((res) => {
1234
+ this.updateshow = false
1235
+ // 如果没有id,需要在数组中添加
1236
+ this.loadfiles()
1237
+ this.selectItem = {}
1238
+
1239
+ })
1240
+ },
1241
+ userinfoArray(val) {
1242
+ console.log("1213---------------" + val)
1243
+ if (val == null || val == undefined || val.length == 0) {
1244
+ for (let i = 0; i < this.userinfo_array.length; i++) {
1245
+ if (this.userinfo_array[i] != val) {
1246
+ this.userinfo_array.delete(row.f_userinfo_id)
1247
+ }
1248
+ }
1249
+ }else {
1250
+ for (let i = 0; i < this.userinfo_array.length; i++) {
1251
+ if (this.userinfo_array[i] != val) {
1252
+ this.userinfo_array.push(val)
1253
+ }
1254
+ }
1255
+
1256
+ }
1257
+
1258
+ },
1259
+
1260
+ // 关闭模态框
1261
+ close() {
1262
+ this.show = false
1263
+ this.selectItem = {}
1264
+ },
1265
+ },
1266
+ events: {
1267
+ async onFileUpload(file, res) {
1268
+ if (!this.selectdata.f_process_id) {
1269
+ this.$showMessage("数据异常,导入失败")
1270
+ return
1271
+ }
1272
+ if (this.showFile) {
1273
+ this.iswork = true;
1274
+ //档案导入
1275
+ let data = {
1276
+ tablename: 't_userinfo',
1277
+ filepath: res.f_downloadpath,
1278
+ f_area:this.selectdata.f_area,
1279
+ f_slice_area:this.selectdata.f_slice_area,
1280
+ f_street:this.selectdata.f_street,
1281
+ f_residential_area:this.selectdata.f_residential_area,
1282
+ f_process_id: this.selectdata.f_process_id,
1283
+ f_user_type: this.selectdata.f_user_type,
1284
+ f_key: this.$login.f.f_orgids,
1285
+ f_operator: this.$login.f.name,
1286
+ f_orgid: this.$login.f.orgid,
1287
+ f_operatorid:this.$login.f.id,
1288
+ f_orgname:this.$login.f.orgs,
1289
+ f_depid: this.$login.f.depids,
1290
+ f_depname: this.$login.f.deps,
1291
+ f_gasproperties: this.selectdata.f_gasproperties,
1292
+ f_date: new Date().Format("yyyy-MM-dd HH:mm:ss")
1293
+ };
1294
+ console.log('即将转发的数据',data);
1295
+ // try{
1296
+ // await axios.post('rs/logic/recordImport',
1297
+ // data).then((res)=>{
1298
+ // if(res.data){
1299
+ // this.iswork=false;
1300
+ // this.load();
1301
+ // this.closeFile();
1302
+ // let mm = '';
1303
+ // for(var i=0;i<res.data.msg.length;i++){
1304
+ // mm+= `${res.data.msg[i].msg}`
1305
+ // }
1306
+ // let msg = `共导入${res.data.alllength}条,失败${res.data.errorlen}条,失败信息:${mm}`
1307
+ // this.$showMessage(msg)
1308
+ // }
1309
+ // })
1310
+ let http = new HttpResetClass()
1311
+ await http.load('POST', 'rs/logic/recordImport', data, {
1312
+ resolveMsg: null,
1313
+ rejectMsg: '导入失败'
1314
+ }).then((res) => {
1315
+ if(res.data){
1316
+ this.iswork=false;
1317
+ this.load();
1318
+ this.closeFile();
1319
+ let mm = '';
1320
+ for(var i=0;i<res.data.msg.length;i++){
1321
+ mm+= `${res.data.msg[i].msg}`
1322
+ }
1323
+ let msg = `共导入${res.data.alllength}条,失败${res.data.errorlen}条,失败信息:${mm}`
1324
+ if (res.data.code == 500) {
1325
+ this.iswork=false;
1326
+ msg = res.data.msg
1327
+ }
1328
+ console.log("返回的数据:" + JSON.stringify(res.data))
1329
+ this.$showMessage(msg)
1330
+ }
1331
+ })
1332
+ // }catch(e){
1333
+ //
1334
+ // this.$showAlert('导入出错,请检查导入文件模板格式!','danger',2000);
1335
+ // }
1336
+ }
1337
+ // 表信息
1338
+ if (this.showInfo) {
1339
+ this.iswork = true;
1340
+ //表信息导入
1341
+ let data = {
1342
+ tablename: 't_standing_book',
1343
+ filepath: res.f_downloadpath,
1344
+ f_process_id: this.selectdata.f_process_id,
1345
+ f_key: this.$login.f.f_orgids,
1346
+ f_operator: this.$login.f.name,
1347
+ f_orgid: this.$login.f.orgid,
1348
+ f_operatorid:this.$login.f.id,
1349
+ f_orgname:this.$login.f.orgs,
1350
+ f_depid: this.$login.f.depids,
1351
+ f_depname: this.$login.f.deps,
1352
+ userinfo_array: this.userinfo_array
1353
+ };
1354
+ console.log('即将转发的数据',data);
1355
+ let http = new HttpResetClass()
1356
+ await http.load('POST', 'rs/logic/incrementImport', data, {
1357
+ resolveMsg: null,
1358
+ rejectMsg: '导入失败'
1359
+ }).then((res) => {
1360
+ if(res.data){
1361
+ this.iswork=false;
1362
+ this.load();
1363
+ this.closeFile();
1364
+ let mm = '';
1365
+ for(var i=0;i<res.data.msg.length;i++){
1366
+ mm+= `${res.data.msg[i].msg}`
1367
+ }
1368
+ let msg = `共导入${res.data.alllength}条,失败${res.data.errorlen}条,失败信息:${mm}`
1369
+ if (res.data.code == 500) {
1370
+ this.iswork=false;
1371
+ msg = res.data.msg
1372
+ }
1373
+ console.log("返回的数据:" + JSON.stringify(res.data))
1374
+ this.$showMessage(msg)
1375
+ }
1376
+ })
1377
+ // try{
1378
+ // await axios.post('rs/logic/incrementImport',
1379
+ // data).then((res)=>{
1380
+ // if(res.data){
1381
+ // this.iswork=false;
1382
+ // this.load();
1383
+ // this.closeFile1();
1384
+ // let mm = '';
1385
+ // for(var i=0;i<res.data.msg.length;i++){
1386
+ // mm+= `${res.data.msg[i].msg}`
1387
+ // }
1388
+ // let msg = `共导入${res.data.alllength}条,失败${res.data.errorlen}条,失败信息:${mm}`
1389
+ // this.$showMessage(msg)
1390
+ // }
1391
+ // })
1392
+ // }catch(e){
1393
+ // this.iswork=false;
1394
+ // this.$showAlert('导入出错,请检查导入文件模板格式!','danger',2000);
1395
+ // }
1396
+ }
1397
+ }
1398
+ }
1399
+ }
1400
+ </script>
1401
+ <style>
1402
+ .recordTable table tr th {
1403
+ font-weight: bold;
1404
+ }
1405
+
1406
+ .recordTable table tr:hover {
1407
+ background-color: rgb(230, 230, 230);
1408
+ }
1409
+ </style>