apply-clients 3.0.4 → 3.0.5-4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (64) hide show
  1. package/index.html +1 -1
  2. package/package.json +4 -3
  3. package/src/App.vue +126 -15
  4. package/src/apply.js +152 -134
  5. package/src/bootstrap/fonts/PingFangSC-Regular.ttf +0 -0
  6. package/src/bootstrap/less/bootstrap.less +1 -2
  7. package/src/bootstrap/less/standard.less +208 -0
  8. package/src/components/Util.js +4 -0
  9. package/src/components/app_apply/FieldExploration.vue +2 -2
  10. package/src/components/app_apply/Ventilation.vue +2 -2
  11. package/src/components/image/doc.jpg +0 -0
  12. package/src/components/image/excel.jpg +0 -0
  13. package/src/components/image/pdf.jpg +0 -0
  14. package/src/components/image//345/233/276/345/261/20212.png +0 -0
  15. package/src/components/image//345/233/276/345/261/20213.png +0 -0
  16. package/src/components/image//345/233/276/345/261/20216.png +0 -0
  17. package/src/components/image//345/244/232/350/276/271/345/275/2422.png +0 -0
  18. package/src/components/image//345/244/232/350/276/271/345/275/2422/346/213/267/350/264/235.png +0 -0
  19. package/src/components/image//346/244/255/345/234/2062.png +0 -0
  20. package/src/components/image//346/244/255/345/234/2065.png +0 -0
  21. package/src/components/image//346/244/255/345/234/2065/346/213/267/350/264/235.png +0 -0
  22. package/src/components/image//346/244/255/345/234/2065/346/213/267/350/264/2352.png +0 -0
  23. package/src/components/image//346/244/255/345/234/2065/346/213/267/350/264/2353.png +0 -0
  24. package/src/components/image//347/273/2044.png +0 -0
  25. package/src/components/image//347/273/2045.png +0 -0
  26. package/src/components/image//347/273/2046.png +0 -0
  27. package/src/components/image//350/257/235/345/212/241/347/273/237/350/256/241/346/225/260/346/215/256/345/261/225/347/244/272.png +0 -0
  28. package/src/components/product/Function/InstallFunction.vue +9 -5
  29. package/src/components/product/Function/InstallInfoSelect.vue +98 -69
  30. package/src/components/product/Function/Service/FunctionServiceControl.vue +47 -4
  31. package/src/components/product/Function/functions/AddContract.vue +161 -139
  32. package/src/components/product/Function/functions/BuyerMessage.vue +285 -137
  33. package/src/components/product/Function/functions/InstallFee.vue +1117 -912
  34. package/src/components/product/MaterialBatchList.vue +109 -0
  35. package/src/components/product/MaterialBatchManage.vue +34 -0
  36. package/src/components/product/Procedures/ProceduresDataGrid.vue +1022 -0
  37. package/src/components/product/Process/ExplorationSelect.vue +213 -73
  38. package/src/components/product/Process/ExplorationUser.vue +94 -39
  39. package/src/components/product/Process/MaterialUseList.vue +159 -0
  40. package/src/components/product/Process/ModifyUserFiles.vue +15 -5
  41. package/src/components/product/Process/ProcessInfo/history_control.vue +35 -6
  42. package/src/components/product/Process/Processes/ApplyUpload.vue +287 -0
  43. package/src/components/product/Process/Processes/CustomerCostPlan.vue +214 -0
  44. package/src/components/product/Process/Processes/CustomerMaterialMessage.vue +499 -210
  45. package/src/components/product/Process/Processes/CustomerRecordMessage.vue +949 -753
  46. package/src/components/product/Process/Processes/ProjectSettlement.vue +535 -24
  47. package/src/components/product/Process/Processes/ReceiveBatch.vue +301 -121
  48. package/src/components/product/Process/Processes/Service/ApplyChangeHistory.vue +105 -0
  49. package/src/components/product/Process/Processes/Service/ApplyChargeSearch.vue +27 -14
  50. package/src/components/product/Process/Processes/Service/ServiceControl.vue +2561 -1104
  51. package/src/components/product/Process/Processes/Upload.vue +532 -0
  52. package/src/components/product/Process/ShowBackReason.vue +1 -1
  53. package/src/components/product/ServiceView.vue +825 -583
  54. package/src/components/product/Statistics/ApplyStatisticsROOT.vue +27 -0
  55. package/src/components/product/Supervisory/Service/SupervisoryServiceControl.vue +212 -23
  56. package/src/components/product/Supervisory/SupervisoryControl.vue +79 -26
  57. package/src/components/product/Supervisory/SupervisoryList.vue +182 -41
  58. package/src/components/product/Supervisory/SupervisoryhCart.vue +4 -2
  59. package/src/components/product/VueUtils/Tree.vue +330 -0
  60. package/src/components/product/VueUtils/rightview/InstallCardList2.vue +29 -38
  61. package/src/stores/ApplyLoadParams.js +1 -1
  62. package/src/stores/PagedListLogic.js +173 -0
  63. package/.npmignore +0 -12
  64. package/yarn.lock +0 -9008
@@ -1,753 +1,949 @@
1
- <template>
2
- <div class="flex">
3
- <div class="form-inline auto" style="margin-bottom: 5px;">
4
- <label v-if="key == '户档案管理'">用户查找:</label>
5
- <label v-if="key == '表档案管理'">表信息查找:</label>
6
- <input type="text" class="form-control" placeholder='请输入查找的用户姓名' v-model="param"
7
- @keyup.enter="filterParams(param)" v-if="key == '户档案管理'">
8
- <input type="text" class="form-control" placeholder='请输入表品牌' v-model="param"
9
- @keyup.enter="filterParam(param)" v-else>
10
- <button v-if="key == '户档案管理'" type="button" class="btn btn-primary" @click="filterParams(param)">查询</button>
11
- <button v-else type="button" class="btn btn-primary" @click="filterParam(param)">查询</button>
12
- <button type="button" class="btn btn-warning" @click="add()" v-show="edit">新增</button>
13
- <div class="form-inline" style="float: right;margin-left: 1%" v-if="key == '户档案管理' && edit == true">
14
- <export-excel :data="{condition: ` 1=1 and f_process_id = '${selectdata.f_process_id}'`}"
15
- :field="getfield"
16
- sqlurl="rs/logic/fileExport" sql-name="singleTableUser" template-name='报建户档案导出'
17
- :choose-col="false"></export-excel>
18
- </div>
19
- <div class="form-inline" style="float: right; margin-left: 1%"
20
- v-if="$login.f.f_fengongsi.includes('中燃') && key == '表档案管理'">
21
- <button type="button" class="btn btn-warning add-postition" @click="impexcel()" v-show="edit">导入表档案</button>
22
- </div>
23
- <div class="form-inline" style="float: right" v-if="key == '户档案管理'">
24
- <button type="button" class="btn btn-warning add-postition" @click="impexcel()" v-show="edit">导入户档案</button>
25
- </div>
26
- <div class="form-inline" style="float: right; margin-right: 1%" v-if="key == '户档案管理'">
27
- <button type="button" class="btn btn-primary add-postition" @click="changeState()" v-show="edit">户档案转营收</button>
28
- </div>
29
- </div>
30
- <!--户档案管理组件-->
31
- <div class="col-sm-12 span recordTable" style="margin-top: 10px;min-height: 500px" v-if="key == '户档案管理'">
32
- <partial-view v-ref:single-load>
33
- <data-grid :model="model" v-ref:params @select-changed="selected">
34
- <template partial='head'>
35
- <tr>
36
- <th></th>
37
- <th>序号</th>
38
- <th v-for="item in $parent.$parent.$parent.userHeadData">
39
- <nobr>{{item}}</nobr>
40
- </th>
41
- <th v-show="$parent.$parent.$parent.edit">操作</th>
42
- </tr>
43
- </template>
44
- <template partial='body'>
45
- <td>
46
- <input v-bind:disabled="row.f_user_state == '正常'" type="checkbox" name="checkbox"
47
- @change="$parent.$parent.$parent.chooseOne($event,row,model.rows)">
48
- </td>
49
- <td>{{$index+1}}</td>
50
- <td style="text-align: center;" v-for="item in $parent.$parent.$parent.userBodyData">
51
- <button v-if="item == 'f_userinfo_id' " type="button" class="btn btn-link"
52
- v-on:click="getUserFiles(row)">{{row[item]? row[item]:0}}
53
- </button>
54
- <nobr v-if="item != 'f_userinfo_id' ">{{row[item]? row[item]:0}}</nobr>
55
- </td>
56
- <td class="flex-around" v-show="$parent.$parent.$parent.edit">
57
- <button type="button" name="button" class="btn btn-link"
58
- @click.stop="$parent.$parent.$parent.modifyParam(row)" >修改
59
- </button>
60
- <button type="button" name="button" class="btn btn-link"
61
- @click.stop="$parent.$parent.$parent.deleteItem(row)">删除
62
- </button>
63
- </td>
64
- </template>
65
- </data-grid>
66
- </partial-view>
67
- </div>
68
- <!--表档案管理组件-->
69
- <div class="col-sm-12 span recordTable" style="margin-top: 10px;min-height: 500px" v-if="key == '表档案管理'">
70
- <partial-view v-ref:single-load>
71
- <data-grid :model="model" v-ref:grid>
72
- <template partial='head'>
73
- <tr>
74
- <th>序号</th>
75
- <th v-for="item in $parent.$parent.$parent.surHeadData">
76
- <nobr>{{item}}</nobr>
77
- </th>
78
- <th v-show="$parent.$parent.$parent.edit">操作</th>
79
- </tr>
80
- </template>
81
- <template partial='body'>
82
- <td>{{$index+1}}</td>
83
- <td style="text-align: center;" v-for="item in $parent.$parent.$parent.surBodyData">
84
- <nobr>{{row[item]? row[item]:0}}</nobr>
85
- </td>
86
- <td class="flex-around" v-show="$parent.$parent.$parent.edit">
87
- <button type="button" name="button" class="btn btn-link"
88
- @click.stop="$parent.$parent.$parent.deleteItem(row)">删除
89
- </button>
90
- </td>
91
- </template>
92
- </data-grid>
93
- </partial-view>
94
- </div>
95
- </div>
96
- <modal :show.sync="show" v-ref:modal backdrop="false">
97
- <header slot="modal-header" class="modal-header">
98
- <button type="button" class="close" @click="close"><span>&times;</span></button>
99
- <h4 class="modal-title">配置</h4>
100
- </header>
101
- <!--户档案新增-->
102
- <article slot="modal-body" class="modal-body" v-if="key == '户档案管理'">
103
- <div class="from-group">
104
- <label>用户姓名</label>
105
- <input type="text" class="form-control" v-model="selectItem.f_user_name"/>
106
- </div>
107
- <div class="from-group">
108
- <label>用户电话</label>
109
- <input type="text" class="form-control" v-model="selectItem.f_user_phone">
110
- </div>
111
- <div class="from-group">
112
- <label>区</label>
113
- <input type="text" class="form-control" v-model="selectItem.f_area">
114
- </div>
115
- <div class="from-group">
116
- <label>片区</label>
117
- <input type="text" class="form-control" v-model="selectItem.f_slice_area">
118
- </div>
119
- <div class="from-group">
120
- <label>街道名称</label>
121
- <input type="text" class="form-control" v-model="selectItem.f_street">
122
- </div>
123
- <div class="from-group">
124
- <label>小区名称</label>
125
- <input type="text" class="form-control" v-model="selectItem.f_residential_area">
126
- </div>
127
- <div class="from-group">
128
- <label>楼号</label>
129
- <input type="text" class="form-control" v-model="selectItem.f_building">
130
- </div>
131
- <div class="from-group">
132
- <label>单元号</label>
133
- <input type="text" class="form-control" v-model="selectItem.f_unit">
134
- </div>
135
- <div class="from-group">
136
- <label>楼层</label>
137
- <input type="text" class="form-control" v-model="selectItem.f_floor">
138
- </div>
139
- <div class="from-group">
140
- <label>门牌号</label>
141
- <input type="text" class="form-control" v-model="selectItem.f_room">
142
- </div>
143
- <div class="from-group" v-if="!this.$login.f.f_fengongsi.includes('中燃')">
144
- <label>用户类型</label>
145
- <input type="text" class="form-control" v-model="selectItem.f_user_type" options='usertypes'>
146
- </div>
147
- <div class="from-group">
148
- <label>用气性质</label>
149
- <input type="text" class="form-control" v-model="selectItem.f_gasproperties" options='gasproperties'>
150
- </div>
151
- <div class="from-group">
152
- <label>用户状态</label>
153
- <input type="text" class="form-control" v-model="selectItem.f_user_state" options='userstates'>
154
- </div>
155
- </article>
156
- <!--表档案新增-->
157
- <article slot="modal-body" class="modal-body" v-if="key == '表档案管理'">
158
- <div class="from-group">
159
- <label>户档案编号</label>
160
- <input type="text" class="form-control" v-model="selectItem.f_userinfo_id"/>
161
- </div>
162
- <div class="from-group">
163
- <label>气表品牌</label>
164
- <input type="text" class="form-control" v-model="selectItem.f_meter_brand">
165
- </div>
166
- <div class="from-group">
167
- <label>表型号</label>
168
- <input type="text" class="form-control" v-model="selectItem.f_meter_style">
169
- </div>
170
- <div class="from-group">
171
- <label>表号</label>
172
- <input type="text" class="form-control" v-model="selectItem.f_meternumber">
173
- </div>
174
- </article>
175
- <footer slot="modal-footer" class="modal-footer">
176
- <button v-show="show" type="button" class="btn btn-default" @click='close'>取消</button>
177
- <button v-show="show" type="button" class="btn btn-success" @click='confirm'>确认</button>
178
- </footer>
179
- </modal>
180
- <modal :show.sync="showFile" v-ref:modal backdrop="false">
181
- <header slot="modal-header" class="modal-header">
182
- <button type="button" class="close" @click="closeFile"><span>&times;</span></button>
183
- <h4 class="modal-title">档案导入</h4>
184
- </header>
185
- <article slot="modal-body" class="modal-body">
186
- <div class="form-group">
187
- <file-upload class="my-file-uploader" :name="key+Math.random()"
188
- action="rs/file/uploadFile" tagname="文件导入" :headers="headers" v-ref:file></file-upload>
189
- </div>
190
- </article>
191
- <footer slot="modal-footer" class="modal-footer"></footer>
192
- </modal>
193
-
194
- </template>
195
-
196
- <script>
197
- import {HttpResetClass} from 'vue-client'
198
-
199
- export default {
200
- title: '档案信息',
201
- props: ['selectdata', 'key','edit'],
202
- data() {
203
- return {
204
- headers: {'username': this.$login.f.name, 'blodid': this.selectdata.f_process_id, 'fusetype': '报建execl导入用户档案'},
205
- //户档案表头
206
- userHeadData: ['档案编号', '用户姓名', '用户电话', '区', '片区', '街道名称', '小区名称', '楼号', '单元号', '楼层', '门牌号', '用气性质', '用户状态'],
207
- //户档案内容
208
- 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'],
209
- //表档案表头
210
- surHeadData: ['户档案编号', '表号', '气表品牌', '表型号'],
211
- //表档案内容
212
- surBodyData: ['f_userinfo_id', 'f_meternumber', 'f_meter_brand', 'f_meter_style'],
213
- //设备表头
214
- eqHeadData: ['户档案编号', '设备编号', '设备类型', '设备品牌','设备型号','设备数量'],
215
- //设备内容
216
- eqBodyData: ['f_userinfo_id', 'f_devices_no', 'f_devices_type', 'f_brand','f_devices_model','f_devices_num'],
217
- params: null,
218
- record: {},
219
- selectItem: {},
220
- model: {
221
- rows: []
222
- },
223
- params: { // 选择的具体内容
224
- rows: []
225
- },
226
- condition: '',
227
- show: false,
228
- showFile: false,
229
- ischecked: false,
230
- getfield: {},
231
- checked: [],
232
- }
233
- },
234
- ready() {
235
-
236
- },
237
- watch: {
238
- 'selectdata'() {
239
- this.headers.blodid = this.selectdata.f_process_id
240
- this.load()
241
- }
242
- },
243
- computed: {
244
- funit() {
245
- return AppData.getParam('小区类型')
246
- },
247
- ffloor() {
248
- return AppData.getParam('房屋类型')
249
- },
250
- usertypes() {
251
- return AppData.getParam('用户类型')
252
- },
253
- credentials() {
254
- return AppData.getParam('证件类型')
255
- },
256
- costtypes() {
257
- return AppData.getParam('缴费类型')
258
- },
259
- gasproperties() {
260
- let rs = []
261
- if (this.record.f_user_type.length === 1) {
262
- rs = AppData.getParam(this.record.f_user_type[0])
263
- }
264
- return rs
265
- },
266
- userstates() {
267
- return AppData.getParam('用户状态')
268
- },
269
- address() {
270
- let strAddress = `${this.record.f_area ? this.record.f_area
271
- + '-' : ''}${this.record.f_street ? this.record.f_street
272
- + '-' : ''}${this.record.f_residential_area ? this.record.f_residential_area
273
- + '' : ''}${this.record.f_building ? this.record.f_building
274
- + '号楼' : ''}${this.record.f_unit ? this.record.f_unit
275
- + '单元' : ''}${this.record.f_floor ? this.record.f_floor
276
- + '层' : ''}${this.record.f_room ? this.record.f_room
277
- + '室' : ''}`
278
- this.record.f_address = strAddress
279
- return strAddress
280
- },
281
- getfield() {
282
- let data = {}
283
- this.userBodyData.forEach((value, index) => {
284
- data[this.userBodyData[index]] = this.userHeadData[index]
285
- })
286
-
287
- console.log('data', data)
288
- return data
289
- }
290
- },
291
- methods: {
292
- selected (val) {
293
- this.selectItem = {"q":"q"}
294
- },
295
- //选择需要转银收的户档案
296
- chooseOne(e, row, rows) {
297
- console.log('row', row)
298
- console.log('e', e)
299
- this.ischecked = e.target.checked
300
- console.log("state", e.target.checked)
301
- //判断当前行是否被选中
302
- if (this.ischecked) {
303
- this.checked.push(row)
304
- }
305
- },
306
- //修改选中的数据状态
307
- changeState() {
308
- if (this.checked.length > 0) {
309
- let http = new HttpResetClass()
310
- http.load('POST', 'rs/logic/updateUserState', {data: {rows: this.checked}}).then((res) => {
311
- this.show = false
312
- this.ischecked = false
313
- // 如果没有id,需要在数组中添加
314
- this.load()
315
- this.checked = []
316
- })
317
- }
318
- },
319
- // 父组件更新子组件属性
320
- updateData(val) {
321
- this.headers.blodid = val.f_process_id
322
- this.selectdata = val
323
- },
324
- async load() {
325
- if (!this.selectdata)
326
- return
327
- let data = {
328
- tablename: 't_userinfo',
329
- condition: 'f_process_id=' + '\'' + this.selectdata.f_process_id + '\''
330
- }
331
- let self = this
332
- let http = new HttpResetClass()
333
- let res = await http.load('POST', 'rs/sql/singleTable', {data: data}, {
334
- resolveMsg: null,
335
- rejectMsg: '获取户档案信息失败'
336
- })
337
- self.model.rows = []
338
- if (self.key == '户档案管理') {
339
- self.model.rows = res.data
340
- self.params = res.data
341
- // 备份用于查询
342
- } else if (self.key == '表档案管理') {
343
- for (var i = 0; i < res.data.length; i++) {
344
- // row.f_userinfo_id 户编号
345
- data = {
346
- tablename: 't_userfiles',
347
- condition: `f_userinfo_id=${res.data[i].f_userinfo_id}`
348
- }
349
- http = new HttpResetClass()
350
- let resUserfiles = await http.load('POST', 'rs/sql/singleTable', {data: data}, {
351
- resolveMsg: null,
352
- rejectMsg: '获取表档案信息失败'
353
- })
354
- if (resUserfiles.data.length == 0) {
355
- continue
356
- }
357
- for (let i = 0; i < resUserfiles.data.length; i++) {
358
- data = {
359
- tablename: 't_gasbrand',
360
- condition: `id=${resUserfiles.data[i].f_gasbrand_id}`
361
- }
362
- http = new HttpResetClass()
363
- let resGasbrand = await http.load('POST', 'rs/sql/singleTable', {data: data}, {
364
- resolveMsg: null,
365
- rejectMsg: '获取档案信息失败'
366
- })
367
-
368
- data = {
369
- tablename: 't_gasmodel',
370
- condition: `id=${resUserfiles.data[i].f_gasmodel_id}`
371
- }
372
- http = new HttpResetClass()
373
- let resModel = await http.load('POST', 'rs/sql/singleTable', {data: data}, {
374
- resolveMsg: null,
375
- rejectMsg: '获取档案信息失败'
376
- })
377
- self.model.rows.push({
378
- f_user_id: resUserfiles.data[i].f_user_id,
379
- f_userinfo_id: resUserfiles.data[i].f_userinfo_id,
380
- f_meternumber: resUserfiles.data[i].f_meternumber,
381
- f_meter_brand: resGasbrand.data[0].f_meter_brand,
382
- f_meter_style: resModel.data[0].f_meter_style
383
- })
384
- self.params = self.model.rows
385
- }
386
- }
387
- }else if (self.key == '设备管理') {
388
- debugger
389
- for (var i = 0; i < res.data.length; i++) {
390
- data = {
391
- tablename: 't_devices',
392
- condition: 'f_process_id=' + '\'' + String(this.selectdata.f_process_id) + '\''
393
- }// eqBodyData: ['f_userinfo_id', 'f_devices_no', 'f_devices_type', 'f_brand','f_devices_model','f_devices_num'],
394
- this.$resetpost('rs/sql/singleTable', {data: data}, {resolveMsg: null, rejectMsg: '查询失败'})
395
- .then((dev) => {
396
- self.model.rows.push({
397
- f_userinfo_id: res.data[i].f_userinfo_id,
398
- f_devices_no: dev.data[0].f_devices_no,
399
- f_devices_type: dev.data[0].f_devices_type,
400
- f_brand: dev.data[0].f_brand,
401
- f_devices_model: dev.data[0].f_devices_model,
402
- f_devices_num: dev.data[0].f_devices_num,
403
- })
404
- //self.model.rows = dev.data
405
- })
406
- }
407
- }
408
- },
409
- impexcel() {
410
- this.showFile = true
411
- },
412
- closeFile() {
413
- this.showFile = false
414
- // 将选的文件清空
415
- this.$refs.file.$el.querySelector('input').value = ''
416
- },
417
- deleteItem(row) {
418
- debugger
419
- if (this.key == '户档案管理') {
420
- this.$showMessage('删除后不可恢复,确认删除吗?', ['confirm', 'cancel']).then((res) => {
421
- if (res === 'confirm') {
422
- let http = new HttpResetClass()
423
- http.load('DELETE', `rs/entity/t_userinfo/${row.f_userinfo_id}`).then((res) => {
424
- this.load()
425
- })
426
- }
427
- })
428
- } else {
429
- this.$showMessage('删除后不可恢复,确认删除吗?', ['confirm', 'cancel']).then((res) => {
430
- if (res === 'confirm') {
431
- let http = new HttpResetClass()
432
- http.load('DELETE', `rs/entity/t_userfiles/${row.f_user_id}`).then((res) => {
433
- this.load()
434
- })
435
- }
436
- })
437
- }
438
- },
439
- //户档案查询
440
- filterParams(param) {
441
- debugger
442
- if (param && param !== "") {
443
- let temp = []
444
- for (var i = 0; i < this.model.rows.length; i++) {
445
- if (this.model.rows[i].f_user_name.includes(param)) {
446
- temp.push(this.model.rows[i])
447
- }
448
- }
449
- this.model.rows = temp
450
- } else {
451
- this.model.rows = this.params
452
- }
453
- },
454
- //表档案查询
455
- filterParam(param) {
456
- if (param && param !== "") {
457
- let temp = []
458
- for (var i = 0; i < this.model.rows.length; i++) {
459
- if (this.model.rows[i].f_meter_brand.includes(param)) {
460
- temp.push(this.model.rows[i])
461
- }
462
- }
463
- this.model.rows = temp
464
- } else {
465
- this.model.rows = this.params
466
- }
467
- },
468
- //设备列表查询
469
- findEq(param) {
470
- debugger
471
- if (param && param !== "") {
472
- let temp = []
473
- for (var i = 0; i < this.model.rows.length; i++) {
474
- if (this.model.rows[i].f_meter_brand.includes(param)) {
475
- temp.push(this.model.rows[i])
476
- }
477
- }
478
- this.model.rows = temp
479
- } else {
480
- this.model.rows = this.params
481
- }
482
- },
483
- add() {
484
- this.show = true
485
- console.log("点击了添加")
486
- },
487
- // 修改按钮
488
- modifyParam(row) {
489
- this.$set('selectItem.f_userinfo_id', row.f_userinfo_id)
490
- this.$set('selectItem.f_user_name', row.f_user_name)
491
- this.$set('selectItem.f_user_phone', row.f_user_phone)
492
- this.$set('selectItem.f_area', row.f_area)
493
- this.$set('selectItem.f_slice_area', row.f_slice_area)
494
- this.$set('selectItem.f_street', row.f_street)
495
- this.$set('selectItem.f_residential_area', row.f_residential_area)
496
- this.$set('selectItem.f_building', row.f_building)
497
- this.$set('selectItem.f_unit', row.f_unit)
498
- this.$set('selectItem.f_floor', row.f_floor)
499
- this.$set('selectItem.f_room', row.f_room)
500
- this.$set('selectItem.f_user_type', row.f_user_type)
501
- this.$set('selectItem.f_gasproperties', row.f_gasproperties)
502
- this.$set('selectItem.f_user_state', row.f_user_state)
503
- this.$set('selectItem.version', row.version)
504
- this.$set('selectItem.f_user_state', row.f_user_state)
505
- this.show = true
506
- },
507
- //获取当前用户表档案信息
508
- getUserFiles(row) {
509
- this.isShowFiles = true
510
- console.log('获取户档案信息')
511
-
512
- data = {
513
- tablename: 't_userfiles',
514
- condition: `f_userinfo_id=${row.f_userinfo_id}`
515
- }
516
- http = new HttpResetClass()
517
- let resGasbrand = http.load('POST', 'rs/sql/singleTable', {data: data}, {
518
- resolveMsg: null,
519
- rejectMsg: '获取档案信息失败'
520
- })
521
- self.model.rows = []
522
- self.model.rows = res.data
523
- },
524
- //表档案修改
525
- filesModify(row) {
526
- this.$set('selectItem.f_userinfo_id', row.f_userinfo_id)
527
- this.$set('selectItem.f_user_id', row.f_user_id)
528
- this.$set('selectItem.f_meter_brand', row.f_meter_brand)
529
- this.$set('selectItem.f_meter_style', row.f_meter_style)
530
- this.$set('selectItem.f_meternumber', row.f_meternumber)
531
- this.show = true
532
- },
533
- //新增修改或删除提交
534
- async confirm() {
535
- if (this.key == '户档案管理') {
536
- // 无主键为插入
537
- if (!this.selectItem.f_userinfo_id) {
538
- this.selectItem.version = 1
539
- this.selectItem.f_user_state = '报建'
540
- this.selectItem.f_process_id = this.selectdata.f_process_id
541
- let data = {
542
- tablename: 't_userinfo',
543
- parameters: this.selectItem
544
- }
545
- let http = new HttpResetClass()
546
- await http.load('POST', 'rs/entity/t_userinfo', this.selectItem).then((res) => {
547
- this.show = false
548
- // 如果没有id,需要在数组中添加
549
- this.load()
550
- this.selectItem = {}
551
- })
552
- } else { // 有主键为更新
553
- let data = {
554
- tablename: 't_userinfo',
555
- parameters: this.selectItem
556
- }
557
- let http = new HttpResetClass()
558
- await http.load('POST', 'rs/entity/t_userinfo', this.selectItem).then((res) => {
559
- this.show = false
560
- // 如果没有id,需要在数组中添加
561
- this.load()
562
- this.selectItem = {}
563
- })
564
- }
565
- } else if (this.key == '表档案管理') {
566
- if (!this.selectItem.f_user_id) {
567
- //新增
568
- //根据户档案编号查询户档案
569
- this.$resetpost('rs/sql/findUserInfo', {
570
- data: {
571
- f_userinfo_id: this.selectItem.f_userinfo_id,
572
- process_id: this.selectdata.f_process_id
573
- }
574
- }).then((res) => {
575
- if (res.data != null && res.data.length > 0) {
576
- //判断重复
577
- this.$resetpost('rs/sql/findFilesByUserId', {data: {f_userinfo_id: this.selectItem.f_userinfo_id}}).then((res) => {
578
- if (res.data.length > 0) {
579
- this.$showMessage("该户档案编号的表档案已存在!")
580
- return
581
- }
582
- //根据提交的气表品牌、表型号分别查询对应的表具信息
583
- let data = {
584
- tablename: 't_gasbrand',
585
- condition: `f_meter_brand= '${this.selectItem.f_meter_brand}'`
586
- }
587
- let http = new HttpResetClass()
588
- http.load('POST', 'rs/sql/singleTable', {data: data}).then((res) => {
589
- if (res.data.length > 0) {
590
- //表型号
591
- data = {
592
- tablename: 't_gasmodel',
593
- condition: `f_meter_style= '${this.selectItem.f_meter_style}'`
594
- }
595
- http = new HttpResetClass()
596
- http.load('POST', 'rs/sql/singleTable', {data: data}).then((re) => {
597
- if (re.data.length > 0) {
598
- this.selectItem.version = 1
599
- this.selectItem.f_table_state = '正常'
600
- this.selectItem.f_gasbrand_id = res.data[0].id
601
- this.selectItem.f_gasmodel_id = re.data[0].id
602
- data = {
603
- tablename: 't_userfiles',
604
- parameters: this.selectItem
605
- }
606
- let http = new HttpResetClass()
607
- http.load('POST', 'rs/entity/t_userfiles', this.selectItem, {
608
- resolveMsg: null,
609
- rejectMsg: null,
610
- }).then((res) => {
611
- this.show = false
612
- // 如果没有id,需要在数组中添加
613
- this.load()
614
- this.selectItem = {}
615
- })
616
- }
617
- })
618
- } else {
619
- this.$showMessage("表品牌信息错误!")
620
- return
621
- }
622
- })
623
- })
624
- } else {
625
- this.$showMessage("该编号户档案不存在,请先添加户档案")
626
- return
627
- }
628
- })
629
- } else {
630
- //根据提交的气表品牌、表型号分别查询对应的表具信息
631
- let data = {
632
- tablename: 't_gasbrand',
633
- condition: `f_meter_brand= '${this.selectItem.f_meter_brand}'`
634
- }
635
- let http = new HttpResetClass()
636
- http.load('POST', 'rs/sql/singleTable', {data: data}).then((res) => {
637
- if (res.data.length > 0) {
638
- //表型号
639
- data = {
640
- tablename: 't_gasmodel',
641
- condition: `f_meter_style= '${this.selectItem.f_meter_style}'`
642
- }
643
- http = new HttpResetClass()
644
- http.load('POST', 'rs/sql/singleTable', {data: data}).then((re) => {
645
- if (re.data.length > 0) {
646
- this.selectItem.f_gasbrand_id = res.data[0].id
647
- this.selectItem.f_gasmodel_id = re.data[0].id
648
- data = {
649
- tablename: 't_userfiles',
650
- parameters: this.selectItem
651
- }
652
- let http = new HttpResetClass()
653
- http.load('POST', 'rs/entity/t_userfiles', this.selectItem, {
654
- resolveMsg: null,
655
- rejectMsg: null,
656
- }).then((res) => {
657
- this.show = false
658
- // 如果没有id,需要在数组中添加
659
- this.load()
660
- this.selectItem = {}
661
- })
662
- }
663
- })
664
- } else {
665
- this.$showMessage("表品牌信息错误!")
666
- return
667
- }
668
- })
669
- }
670
- }
671
- },
672
-
673
- // 关闭模态框
674
- close() {
675
- this.show = false
676
- this.selectItem = {}
677
- },
678
- },
679
- events: {
680
- async onFileUpload(file, res) {
681
- if (!this.selectdata.f_process_id) {
682
- this.$showMessage("数据异常,导入失败")
683
- return
684
- }
685
- //户档案导入
686
- if (this.key == '户档案管理') {
687
- let data = {
688
- tablename: 't_userinfo',
689
- filepath: res.f_downloadpath,
690
- f_process_id: this.selectdata.f_process_id,
691
- f_key: this.$login.f.f_orgids,
692
- f_operator: this.$login.f.name,
693
- f_filiale: this.$login.f.f_fengongsi,
694
- f_outlets: this.$login.f.f_parentname,
695
- f_orgstr: this.$login.f.orgpathstr,
696
- f_filialeids: this.$login.f.f_orgids,
697
- f_filialeid: this.$login.f.f_orgids.split('.')[this.$login.f.f_orgids.split('.').length - 2] + '.'
698
- }
699
- let http2 = new HttpResetClass()
700
- await http2.load('POST', 'rs/logic/recordImport', data, {
701
- resolveMsg: "导入成功!",
702
- rejectMsg: "导入失败!",
703
- }).then((res) => {
704
- this.load()
705
- this.closeFile()
706
- })
707
- }
708
- //表档案导入
709
- if (this.key == '表档案管理') {
710
- let data = {
711
- tablename: 't_userfiles',
712
- filepath: res.f_downloadpath,
713
- f_process_id: this.selectdata.f_process_id,
714
- f_key: this.$login.f.f_orgids,
715
- f_operator: this.$login.f.name,
716
- f_filiale: this.$login.f.f_fengongsi,
717
- f_outlets: this.$login.f.f_parentname,
718
- f_orgstr: this.$login.f.orgpathstr,
719
- f_filialeids: this.$login.f.f_orgids,
720
- f_filialeid: this.$login.f.f_orgids.split('.')[this.$login.f.f_orgids.split('.').length - 2] + '.'
721
- }
722
- let http2 = new HttpResetClass()
723
- await http2.load('POST', 'rs/logic/grandImport', data, {
724
- resolveMsg: null,
725
- rejectMsg: '上传失败'
726
- }).then((res) => {
727
- console.log(">>>>>>>>>>>", res)
728
- this.load()
729
- this.closeFile()
730
- if (res.data.msg != null && res.data.msg != "") {
731
- this.$showMessage(res.data.msg)
732
- } else if (res.data.userIds.length > 0) {
733
- this.$showMessage("以下编号的户档案不存在,请先添加户档案再添加表档案:" + res.data.userIds.toString())
734
- } else if (res.data.reuserIds.length > 0) {
735
- this.$showMessage("以下户档案编号的表档案已存在,请删除后重新导入:" + res.data.reuserIds.toString())
736
- } else {
737
- this.$showMessage("导入成功!")
738
- }
739
- })
740
- }
741
- }
742
- }
743
- }
744
- </script>
745
- <style>
746
- .recordTable table tr th {
747
- font-weight: bold;
748
- }
749
-
750
- .recordTable table tr:hover {
751
- background-color: rgb(230, 230, 230);
752
- }
753
- </style>
1
+ <template>
2
+ <div class="flex col-sm-12">
3
+ <div class="form-inline auto" style="margin-bottom: 5px;">
4
+ <label >用户查找:</label>
5
+ <input type="text" class="form-control" placeholder='请输入查找的用户姓名' v-model="param"
6
+ @keyup.enter="filterParams(param)" >
7
+ <button type="button" class="btn btn-primary" @click="filterParams(param)">查询</button>
8
+ <!--<div class="form-inline" style="float: right;margin-left: 1%" v-if="key == '户档案管理' && edit == true">
9
+ <export-excel :data="{condition: ` 1=1 and f_process_id = '${selectdata.f_process_id}'`}"
10
+ :field="getfield"
11
+ sqlurl="rs/logic/fileExport" sql-name="singleTableUser" template-name='报建户档案导出'
12
+ :choose-col="false"></export-excel>
13
+ </div>-->
14
+
15
+ <div class="form-inline" style="float: right" >
16
+ <button type="button" class="btn btn-warning add-postition" @click="impexcel()" v-show="edit">导入档案</button>
17
+ </div>
18
+
19
+ </div>
20
+
21
+
22
+
23
+
24
+ <!--户档案管理组件-->
25
+ <div class="col-sm-12 span recordTable" style="margin-top: 10px;height:70vh;">
26
+
27
+ <partial-view v-ref:single-load>
28
+ <data-grid :model="model" v-ref:grid>
29
+ <template partial='head'>
30
+ <tr>
31
+ <th>档案编号</th>
32
+ <th>用户姓名</th>
33
+ <th>用户电话</th>
34
+ <th>地址</th>
35
+ <th>安全员</th>
36
+ <th>缴费类型</th>
37
+ <th>结算状态</th>
38
+ <th>人口数</th>
39
+ <th>用户状态</th>
40
+ <th >操作</th>
41
+ </tr>
42
+ </template>
43
+ <template partial='body' >
44
+ <td @click="$parent.$parent.$parent.showdetail(row.f_userinfo_id)" style="text-align: center">{{row.f_userinfo_id}}</td>
45
+ <td @click="$parent.$parent.$parent.showdetail(row.f_userinfo_id)" style="text-align: center">{{row.f_user_name}}</td>
46
+ <td @click="$parent.$parent.$parent.showdetail(row.f_userinfo_id)" style="text-align: center">{{row.f_user_phone}}</td>
47
+ <td @click="$parent.$parent.$parent.showdetail(row.f_userinfo_id)" style="text-align: center">{{row.f_address}}</td>
48
+ <td @click="$parent.$parent.$parent.showdetail(row.f_userinfo_id)" style="text-align: center">{{row.f_checker}}</td>
49
+ <td @click="$parent.$parent.$parent.showdetail(row.f_userinfo_id)" style="text-align: center">{{row.f_cost_type}}</td>
50
+ <td @click="$parent.$parent.$parent.showdetail(row.f_userinfo_id)" style="text-align: center">{{row.f_cost_state}}</td>
51
+ <td @click="$parent.$parent.$parent.showdetail(row.f_userinfo_id)" style="text-align: center">{{row.f_people_num}}</td>
52
+ <td @click="$parent.$parent.$parent.showdetail(row.f_userinfo_id)" style="text-align: center">{{row.f_user_state}}</td>
53
+ <!--<td>{{row.f_remarks}}</td>-->
54
+ <td v-show="edit"><input type="checkbox" v-model="row.f_pay" @click="$parent.$parent.$parent.paychange(row)"/></td>
55
+ <td class="" style="text-align: center">
56
+ <button type="button" name="button" class="btn btn-link"
57
+ @click.stop="$parent.$parent.$parent.modifyParam(row)" >修改
58
+ </button>
59
+ <button type="button" name="button" class="btn btn-link"
60
+ @click.stop="$parent.$parent.$parent.delete(row)">删除
61
+ </button>
62
+ <!--<button type="button" name="button" class="btn btn-link"-->
63
+ <!--@click.stop="$parent.$parent.$parent.deleteItem(row)">删除-->
64
+ <!--</button>-->
65
+ </td>
66
+ </template>
67
+ </data-grid>
68
+
69
+ </partial-view>
70
+ </div>
71
+
72
+ <div class="col-sm-12 span recordTable" style="margin-top: 10px;height:auto;" v-if="isShowdetail" >
73
+ <p class="text-center" style="padding: 8px;font-size: 20px">表档案列表
74
+
75
+ <button type="button" class="close" @click="isShowdetail=false" aria-hidden="true">&times;</button>
76
+ </p>
77
+ <partial-view v-ref:single-load>
78
+ <data-grid :model="batchmodel" v-ref:batchgrid>
79
+ <template partial='head'>
80
+ <tr>
81
+ <th>序号</th>
82
+ <th>户档案编号</th>
83
+ <th>表档案编号</th>
84
+ <th>表号</th>
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
+ </tr>
94
+ </template>
95
+ <template partial='body'>
96
+ <td style="text-align: center">{{$index+1}}</td>
97
+ <td style="text-align: center">{{row.f_userinfo_id}}</td>
98
+ <td style="text-align: center">{{row.f_user_id}}</td>
99
+ <td style="text-align: center">{{row.f_meternumber}}</td>
100
+ <td style="text-align: center">{{row.f_meter_brand}}</td>
101
+ <td style="text-align: center">{{row.f_meter_style}}</td>
102
+ <td style="text-align: center">{{row.f_user_type}}</td>
103
+ <td style="text-align: center">{{row.f_gas_meternumber}}</td>
104
+ <td style="text-align: center">{{row.f_gas_person}}</td>
105
+ <td style="text-align: center">{{row.f_gas_date}}</td>
106
+ <td style="text-align: center">{{row.f_gas_meternumber_back}}</td>
107
+ <!--<td>{{row.f_remarks}}</td>-->
108
+ <td class="" style="text-align: center">
109
+ <button type="button" name="button" class="btn btn-link"
110
+ @click.stop="$parent.$parent.$parent.filesModify(row)" >修改
111
+ </button>
112
+ <button type="button" name="button" class="btn btn-link"
113
+ @click.stop="$parent.$parent.$parent.deleteItem(row)">删除
114
+ </button>
115
+ <!-- <button type="button" name="button" class="btn btn-link"
116
+ @click.stop="$parent.$parent.$parent.deleteItem(row)" >删除
117
+ </button>-->
118
+ </td>
119
+ </template>
120
+ </data-grid>
121
+
122
+
123
+
124
+
125
+ </partial-view>
126
+ </div>
127
+
128
+ </div>
129
+ <modal :show.sync="show" v-ref:modal backdrop="false">
130
+ <header slot="modal-header" class="modal-header">
131
+ <button type="button" class="close" @click="close"><span>&times;</span></button>
132
+ <h4 class="modal-title">配置</h4>
133
+ </header>
134
+ <!--户档案修改-->
135
+ <article slot="modal-body" class="modal-body" >
136
+ <div class="from-group" style="width: 100%">
137
+ <label style="width: 15%;float: left">用户姓名</label>
138
+ <input type="text" class="form-control" v-model="selectItem.f_user_name" style="width: 80%;float: left"/>
139
+ </div>
140
+ <div class="from-group" style="width: 100%">
141
+ <label style="width: 15%;float: left">用户电话</label>
142
+ <input type="text" class="form-control" v-model="selectItem.f_user_phone" style="width: 80%;float: left">
143
+ </div>
144
+ <div class="from-group" style="width: 100%">
145
+ <label style="width: 15%;float: left">楼号</label>
146
+ <input type="text" class="form-control" v-model="selectItem.f_building" style="width: 80%;float: left">
147
+ </div>
148
+ <div class="from-group" style="width: 100%">
149
+ <label style="width: 15%;float: left">单元号</label>
150
+ <input type="text" class="form-control" v-model="selectItem.f_unit" style="width: 80%;float: left">
151
+ </div>
152
+ <div class="from-group" style="width: 100%">
153
+ <label style="width: 15%;float: left">楼层</label>
154
+ <input type="text" class="form-control" v-model="selectItem.f_floor" style="width: 80%;float: left">
155
+ </div>
156
+ <div class="from-group" style="width: 100%">
157
+ <label style="width: 15%;float: left">门牌号</label>
158
+ <input type="text" class="form-control" v-model="selectItem.f_room" style="width: 80%;float: left">
159
+ </div>
160
+ <div class="from-group" style="width: 100%">
161
+ <label style="width: 15%;float: left">人口数</label>
162
+ <input type="number" class="form-control" v-model="selectItem.f_people_num" style="width: 80%;float: left">
163
+ </div>
164
+ <div class="from-group" style="width: 100%">
165
+ <label style="width: 15%;float: left">缴费类型</label>
166
+ <v-select :value.sync="selectItem.f_cost_type" v-model="selectItem.f_cost_type"
167
+ :options='costtype' placeholder='请选择' style="width: 80%;float: left" :width="'80%'"
168
+ close-on-select >
169
+ </v-select>
170
+ </div>
171
+ <div class="from-group" style="width: 100%">
172
+ <label style="width: 15%;float: left">结算状态</label>
173
+ <v-select :value.sync="selectItem.f_cost_state" v-model="selectItem.f_cost_state" :width="'80%'"
174
+ :options='coststate' placeholder='请选择' style="width: 80%;float: left"
175
+ close-on-select >
176
+ </v-select>
177
+ </div>
178
+
179
+ <div class="from-group" style="width: 100%">
180
+ <label style="width: 15%;float: left">安全员</label>
181
+ <v-select :value.sync="selectItem.f_checker" v-model="selectItem.f_checker" :width="'80%'"
182
+ :options='checker' placeholder='请选择' style="width: 80%;float: left"
183
+ close-on-select >
184
+ </v-select>
185
+ </div>
186
+ <div class="from-group" style="width: 100%">
187
+ <label style="width: 15%;float: left">用户状态</label>
188
+ <v-select :value.sync="selectItem.f_user_state" v-model="selectItem.f_user_state"
189
+ :options='userstate' placeholder='请选择' style="width: 80%;float: left" :width="'80%'"
190
+ close-on-select >
191
+ </v-select>
192
+ </div>
193
+ </article>
194
+
195
+
196
+ <footer slot="modal-footer" class="modal-footer">
197
+ <div class="from-group" style="width: 100%;float: left">
198
+ <button v-show="show" type="button" class="btn btn-default" @click='close'>取消</button>
199
+ <button v-show="show" type="button" class="btn btn-success" @click='confirm'>确认</button>
200
+ </div>
201
+ </footer>
202
+ </modal>
203
+
204
+
205
+ <modal :show.sync="addshow" v-ref:modal backdrop="false">
206
+ <header slot="modal-header" class="modal-header">
207
+ <button type="button" class="close" @click="addclose"><span>&times;</span></button>
208
+ <h4 class="modal-title">配置</h4>
209
+ </header>
210
+ <!--户档案修改-->
211
+ <article slot="modal-body" class="modal-body" >
212
+ <div class="from-group">
213
+ <label style="width: 20%;float: left">表号</label>
214
+ <input type="text" style="width: 80%;float: left" readonly class="form-control" v-model="selectItem.f_meternumber"/>
215
+ </div>
216
+ <div class="from-group">
217
+ <label style="width: 20%;float: left">用户类型</label>
218
+ <v-select :value.sync="selectItem.f_user_type" v-model="selectItem.f_user_type" :width="'80%'"
219
+ :options='usertypes' placeholder='请选择' style="width: 80%;float: left"
220
+ close-on-select >
221
+ </v-select>
222
+ </div>
223
+ <div class="from-group">
224
+ <label style="width: 20%;float: left">用气性质</label>
225
+ <v-select :value.sync="selectItem.f_gasproperties" v-model="selectItem.f_gasproperties"
226
+ :options='gasproperties' placeholder='请选择' style="width: 80%;float: left" :width="'80%'"
227
+ close-on-select >
228
+ </v-select>
229
+ </div>
230
+ <div class="from-group">
231
+ <label style="width: 20%;float: left">表底数</label>
232
+ <input type="text" style="width: 80%;float: left" class="form-control" v-model="selectItem.f_meter_base"/>
233
+ </div>
234
+ <div class="from-group">
235
+ <label style="width: 20%;float: left">气表品牌</label>
236
+ <v-select :value.sync="selectItem.f_meter_brand" v-model="selectItem.f_meter_brand"
237
+ :options='meterbrand' placeholder='请选择' style="width: 80%;float: left" :width="'80%'"
238
+ close-on-select search="">
239
+ </v-select>
240
+ </div>
241
+ <div class="from-group">
242
+ <label style="width: 20%;float: left">表型号</label>
243
+ <v-select :value.sync="selectItem.f_meter_style" v-model="selectItem.f_meter_style"
244
+ :options='meterstyle' placeholder='请选择' style="width: 80%;float: left" :width="'80%'"
245
+ close-on-select >
246
+ </v-select>
247
+ </div>
248
+ <div class="from-group">
249
+ <label style="width: 20%;float: left">左右表</label>
250
+ <v-select :value.sync="selectItem.f_aroundmeter" v-model="selectItem.f_aroundmeter"
251
+ :options='aroundmeter' placeholder='请选择' style="width: 80%;float: left" :width="'80%'"
252
+ close-on-select >
253
+ </v-select>
254
+ </div>
255
+ <div class="from-group">
256
+ <label style="width: 20%;float: left">气价类型</label>
257
+ <v-select :value.sync="selectItem.f_price_type" v-model="selectItem.f_price_type"
258
+ :options='pricetype' placeholder='请选择' style="width: 80%;float: left" :width="'80%'"
259
+ close-on-select >
260
+ </v-select>
261
+ </div>
262
+ <div class="from-group">
263
+ <label style="width: 20%;float: left">气价名称</label>
264
+ <v-select :value.sync="selectItem.f_price_name" v-model="selectItem.f_price_name"
265
+ :options='pricename' placeholder='请选择' style="width: 80%;float: left" :width="'80%'"
266
+ close-on-select >
267
+ </v-select>
268
+ </div>
269
+ <div class="from-group">
270
+ <label style="width: 20%;float: left">剩余气量</label>
271
+ <input type="text" style="width: 80%;float: left" class="form-control" v-model="selectItem.f_heater_gas"/>
272
+ </div>
273
+ <div class="from-group">
274
+ <label style="width: 20%;float: left">表状态</label>
275
+ <v-select :value.sync="selectItem.f_table_state" v-model="selectItem.f_table_state"
276
+ :options='tablestate' placeholder='请选择' style="width: 80%;float: left" :width="'80%'"
277
+ close-on-select >
278
+ </v-select>
279
+ </div>
280
+ <div class="from-group">
281
+ <label style="width: 20%;float: left">气表类型</label>
282
+ <v-select :value.sync="selectItem.f_meter_classify" v-model="selectItem.f_meter_classify"
283
+ :options='meterclassify' placeholder='请选择' style="width: 80%;float: left" :width="'80%'"
284
+ close-on-select >
285
+ </v-select>
286
+ </div>
287
+ <div class="from-group">
288
+ <label style="width: 20%;float: left">是否发卡</label>
289
+ <v-select :value.sync="selectItem.f_whether_hairpin" v-model="selectItem.f_whether_hairpin"
290
+ :options='whetherhairpin' placeholder='请选择' style="width: 80%;float: left" :width="'80%'"
291
+ close-on-select >
292
+ </v-select>
293
+ </div>
294
+ <div class="from-group">
295
+ <label style="width: 20%;float: left">安装位置</label>
296
+ <v-select :value.sync="selectItem.f_position" v-model="selectItem.f_position"
297
+ :options='position' placeholder='请选择' style="width: 80%;float: left" :width="'80%'"
298
+ close-on-select >
299
+ </v-select>
300
+ </div>
301
+ <div class="from-group">
302
+ <label style="width: 20%;float: left">抄表员</label>
303
+ <v-select :value.sync="selectItem.f_inputtor" v-model="selectItem.f_inputtor"
304
+ :options='inputtor' placeholder='请选择' style="width: 80%;float: left" :width="'80%'"
305
+ close-on-select >
306
+ </v-select>
307
+ </div>
308
+ <div class="from-group">
309
+ <label style="width: 20%;float: left">通气人</label>
310
+ <input type="text" style="width: 80%;float: left" class="form-control" v-model="selectItem.f_gas_person"/>
311
+ </div>
312
+ <div class="from-group">
313
+ <label style="width: 20%;float: left">通气时间</label>
314
+ <datepicker style="width: 80%;float: left" :width="'80%'"
315
+ :value.sync="selectItem.f_gas_date"
316
+ :format="'yyyy-MM-dd HH:mm:ss'"
317
+ v-model="selectItem.f_gas_date"
318
+ :readonly="true"
319
+ :show-reset-button="reset">
320
+ </datepicker>
321
+ </div>
322
+ <div class="from-group">
323
+ <label style="width: 20%;float: left">通气表号</label>
324
+ <input type="text" style="width: 80%;float: left" class="form-control" v-model="selectItem.f_gas_meternumber"/>
325
+ </div>
326
+ <!--<div class="from-group">
327
+ <label style="width: 20%;float: left">输损率</label>
328
+ <input type="number" style="width: 80%;float: left" class="form-control" v-model="selectItem.f_lossrate" v-validate:f_lossrate='{dctest: [1, "<" ] }'/>
329
+ </div>-->
330
+
331
+ </article>
332
+ <footer slot="modal-footer" class="modal-footer">
333
+ <button type="button" class="btn btn-default" @click='addclose'>取消</button>
334
+ <button type="button" class="btn btn-success" v-if="showqueren" @click='addconfirm'>确认</button>
335
+ <button type="button" class="btn btn-success" v-else>提交中</button>
336
+ </footer>
337
+ </modal>
338
+
339
+ <modal :show.sync="updateshow" v-ref:modal backdrop="false">
340
+ <header slot="modal-header" class="modal-header">
341
+ <button type="button" class="close" @click="updateclose"><span>&times;</span></button>
342
+ <h4 class="modal-title">配置</h4>
343
+ </header>
344
+ <!--户档案修改-->
345
+ <article slot="modal-body" class="modal-body" >
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_meternumber"/>
349
+ </div>
350
+ <div class="from-group">
351
+ <label style="width: 20%;float: left">气表品牌</label>
352
+ <v-select :value.sync="selectItem.f_meter_brand" v-model="selectItem.f_meter_brand"
353
+ :options='meterbrand' placeholder='请选择' style="width: 80%;float: left"
354
+ close-on-select search="">
355
+ </v-select>
356
+ </div>
357
+ <div class="from-group">
358
+ <label style="width: 20%;float: left">表型号</label>
359
+ <v-select :value.sync="selectItem.f_meter_style" v-model="selectItem.f_meter_style"
360
+ :options='meterstyle' placeholder='请选择' style="width: 80%;float: left"
361
+ close-on-select >
362
+ </v-select>
363
+ </div>
364
+ </article>
365
+ <footer slot="modal-footer" class="modal-footer">
366
+ <button type="button" class="btn btn-default" @click='updateclose'>取消</button>
367
+ <button type="button" class="btn btn-success" @click='updateconfirm'>确认</button>
368
+ </footer>
369
+ </modal>
370
+
371
+
372
+ <modal :show.sync="showFile" v-ref:modal backdrop="false">
373
+ <header slot="modal-header" class="modal-header">
374
+ <button type="button" class="close" @click="closeFile"><span>&times;</span></button>
375
+ <h4 class="modal-title">档案导入</h4>
376
+ </header>
377
+ <article slot="modal-body" class="modal-body">
378
+ <div class="form-group">
379
+ <file-upload class="my-file-uploader" :name="key+(Math.random()+3)+8882" :id="key+(Math.random()+3)+8882"
380
+ action="rs/file/uploadFile" tagname="文件导入" :headers="headers" v-ref:file></file-upload>
381
+ </div>
382
+ </article>
383
+ <footer slot="modal-footer" class="modal-footer"></footer>
384
+ </modal>
385
+
386
+ </template>
387
+
388
+ <script>
389
+ import {HttpResetClass} from 'vue-client'
390
+
391
+ export default {
392
+ title: '档案信息',
393
+ props: ['selectdata', 'key','edit'],
394
+ data() {
395
+ return {
396
+ headers: {'username': this.$login.f.name, 'blodid': this.selectdata.f_process_id, 'fusetype': '报建execl导入用户档案'},
397
+ //户档案表头
398
+ userHeadData: ['档案编号', '用户姓名', '用户电话', '区', '片区', '街道名称', '小区名称', '楼号', '单元号', '楼层', '门牌号', '用气性质', '用户状态'],
399
+ //户档案内容
400
+ 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'],
401
+ //表档案表头
402
+ surHeadData: ['户档案编号', '表号', '气表品牌', '表型号','通气表号','通气人','通气时间','被修改表号'],
403
+ //表档案内容
404
+ surBodyData: ['f_userinfo_id', 'f_meternumber', 'f_meter_brand', 'f_meter_style','f_gas_meternumber','f_gas_person','f_gas_date','f_gas_meternumber'],
405
+ //设备表头
406
+ eqHeadData: ['户档案编号', '设备编号', '设备类型', '设备品牌','设备型号','设备数量'],
407
+ //设备内容
408
+ eqBodyData: ['f_userinfo_id', 'f_devices_no', 'f_devices_type', 'f_brand','f_devices_model','f_devices_num'],
409
+ params: null,
410
+ record: {},
411
+ selectItem: {},
412
+ pricetype:[],
413
+ pricename:[],
414
+ model: {
415
+ rows: []
416
+ },
417
+ batchmodel :{
418
+ rows: []
419
+ },
420
+ params: { // 选择的具体内容
421
+ rows: []
422
+ },
423
+ condition: '',
424
+ show: false,
425
+ showFile: false,
426
+ ischecked: false,
427
+ getfield: {},
428
+ checked: [],
429
+ isShowdetail:false,
430
+ userinfo_id: null,
431
+ addshow:false,
432
+ meterstyle:[],
433
+ meterbrand:[],
434
+ updateshow:false,
435
+ importtype:null,
436
+ showqueren:true,
437
+ userstate:this.$appdata.getParam('用户状态'),
438
+ checker:this.$appdata.getParam('安全员'),
439
+ coststate:this.$appdata.getParam('结算状态'),
440
+ costtype:this.$appdata.getParam('缴费类型'),
441
+ aroundmeter:this.$appdata.getParam('左右表'),
442
+ gasproperties:this.$appdata.getParam('用气性质'),
443
+ usertypes:this.$appdata.getParam('用户类型'),
444
+ tablestate:this.$appdata.getParam('表状态'),
445
+ meterclassify:this.$appdata.getParam('气表类型'),
446
+ whetherhairpin:this.$appdata.getParam('是否发卡'),
447
+ position:this.$appdata.getParam('安装位置'),
448
+ inputtor:this.$appdata.getParam('抄表员')
449
+ }
450
+ },
451
+ ready() {
452
+ this.load()
453
+ this.getitem()
454
+ },
455
+ watch: {
456
+ 'selectdata'() {
457
+ this.headers.blodid = this.selectdata.f_process_id
458
+ this.load()
459
+ },
460
+
461
+ 'selectItem.f_meter_brand[0]'(val) {
462
+ console.log('选择的品牌改变了',val)
463
+ if (!val){
464
+ return
465
+ }
466
+ this.$resetpost('rs/logic/getMeterStyle', {data:{f_meter_brand :val}} ,{resolveMsg: null, rejectMsg: null}).then((res) => {
467
+ console.log('获取的选项',res)
468
+ let house2 = []
469
+ for (let row of res.data){
470
+ house2.push({label: row.f_meter_style,value: row.f_meter_style})
471
+ }
472
+ this.meterstyle = house2
473
+ })
474
+ },
475
+ 'selectItem.f_user_type[0]'(val) {
476
+ let condition =`f_user_type = '${val}' and f_filiale = '${this.$login.f.f_fengongsi}'
477
+ and f_gasproperties = '${this.selectItem.f_gasproperties}'`
478
+ this.$resetpost('rs/logic/getRecordItem', {condition}, {resolveMsg: null, rejectMsg: null}).then((res) => {
479
+ console.log('获取的选项',res)
480
+ let house2 = []
481
+ for (let row of res.data.pricetype){
482
+ house2.push({label: row.f_price_type,value: row.f_price_type})
483
+ }
484
+ this.pricetype = house2
485
+ })
486
+ },
487
+ 'selectItem.f_gasproperties[0]'(val) {
488
+ let condition =`f_user_type = '${this.selectItem.f_user_type}' and f_filiale = '${this.$login.f.f_fengongsi}'
489
+ and f_gasproperties = '${val}'`
490
+ this.$resetpost('rs/logic/getRecordItem', {condition}, {resolveMsg: null, rejectMsg: null}).then((res) => {
491
+ console.log('获取的选项',res)
492
+ let house2 = []
493
+ for (let row of res.data.pricetype){
494
+ house2.push({label: row.f_price_type,value: row.f_price_type})
495
+ }
496
+ this.pricetype = house2
497
+ })
498
+ },
499
+ 'selectItem.f_price_type[0]'(val) {
500
+ console.log('选择的品牌改变了',val)
501
+ if (!val){
502
+ return
503
+ }
504
+ let condition =`f_user_type = '${this.selectItem.f_user_type}' and f_filiale = '${this.$login.f.f_fengongsi}'
505
+ and f_gasproperties = '${this.selectItem.f_gasproperties}'
506
+ and f_price_type = '${val}'`
507
+ this.$resetpost('rs/logic/getRecordItem', {condition}, {resolveMsg: null, rejectMsg: null}).then((res) => {
508
+ console.log('获取的选项',res)
509
+ let house2 = []
510
+ for (let row of res.data.pricename){
511
+ house2.push({label: row.f_price_name,value: row.f_price_name})
512
+ }
513
+ this.pricename = house2
514
+ })
515
+
516
+ }
517
+ },
518
+
519
+ computed: {
520
+ address() {
521
+ let strAddress = `${this.record.f_area ? this.record.f_area
522
+ + '-' : ''}${this.record.f_street ? this.record.f_street
523
+ + '-' : ''}${this.record.f_residential_area ? this.record.f_residential_area
524
+ + '' : ''}${this.record.f_building ? this.record.f_building
525
+ + '号楼' : ''}${this.record.f_unit ? this.record.f_unit
526
+ + '单元' : ''}${this.record.f_floor ? this.record.f_floor
527
+ + '层' : ''}${this.record.f_room ? this.record.f_room
528
+ + '室' : ''}`
529
+ this.record.f_address = strAddress
530
+ return strAddress
531
+ },
532
+ getfield() {
533
+ let data = {}
534
+ this.userBodyData.forEach((value, index) => {
535
+ data[this.userBodyData[index]] = this.userHeadData[index]
536
+ })
537
+
538
+ console.log('data', data)
539
+ return data
540
+ }
541
+ },
542
+ methods: {
543
+ getitem(){
544
+ console.log('开始获取品牌')
545
+ let condition =` 1=1 `
546
+ this.$resetpost('rs/logic/getRecordItem', {condition}, {resolveMsg: null, rejectMsg: null}).then((res) => {
547
+ console.log('获取的选项',res)
548
+ let house2 = []
549
+ for (let row of res.data.meterbrand){
550
+ house2.push({label: row.f_meter_brand,value: row.f_meter_brand})
551
+ }
552
+ this.meterbrand = house2
553
+ })
554
+ },
555
+ addDetailed(){
556
+ this.importtype='2'
557
+ this.showFile = true
558
+ },
559
+ addclose(){
560
+ this.addshow = false
561
+ this.selectItem = {}
562
+ },
563
+
564
+ updateclose(){
565
+ this.updateshow = false
566
+ this.selectItem = {}
567
+ },
568
+ showdetail(val) {
569
+
570
+ console.log(val)
571
+ this.userinfo_id = val
572
+ this.isShowdetail=true
573
+ this.loadfiles()
574
+ },
575
+ async loadfiles() {
576
+ if (!this.selectdata)
577
+ return
578
+ let data = {
579
+ tablename: 't_userfiles',
580
+ condition: 'a.f_userinfo_id=' + '\'' + this.userinfo_id + '\''
581
+ }
582
+
583
+ let self = this
584
+ let http = new HttpResetClass()
585
+ let res = await http.load('POST', 'rs/sql/getUserfiles', {data: data}, {
586
+ resolveMsg: null,
587
+ rejectMsg: '获取表档案信息失败'
588
+ })
589
+ self.batchmodel.rows = []
590
+
591
+ self.batchmodel.rows = res.data
592
+ },
593
+ selected (val) {
594
+ this.selectItem = {"q":"q"}
595
+ },
596
+ //选择需要转银收的户档案
597
+ chooseOne(e, row, rows) {
598
+ console.log('row', row)
599
+ console.log('e', e)
600
+ this.ischecked = e.target.checked
601
+ console.log("state", e.target.checked)
602
+ //判断当前行是否被选中
603
+ if (this.ischecked) {
604
+ this.checked.push(row)
605
+ }
606
+ },
607
+ //修改选中的数据状态
608
+ changeState() {
609
+ if (this.checked.length > 0) {
610
+ let http = new HttpResetClass()
611
+ http.load('POST', 'rs/logic/updateUserState', {data: {rows: this.checked}}).then((res) => {
612
+ this.show = false
613
+ this.ischecked = false
614
+ // 如果没有id,需要在数组中添加
615
+ this.load()
616
+ this.checked = []
617
+ })
618
+ }
619
+ },
620
+ // 父组件更新子组件属性
621
+ updateData(val) {
622
+ this.headers.blodid = val.f_process_id
623
+ this.selectdata = val
624
+ },
625
+ async load() {
626
+ if (!this.selectdata)
627
+ return
628
+ let data = {
629
+ tablename: 't_userinfo',
630
+ condition: 'f_process_id=' + '\'' + this.selectdata.f_process_id + '\''
631
+ }
632
+ let self = this
633
+ let http = new HttpResetClass()
634
+ let res = await http.load('POST', 'rs/sql/singleTable', {data: data}, {
635
+ resolveMsg: null,
636
+ rejectMsg: '获取户档案信息失败'
637
+ })
638
+ self.model.rows = []
639
+
640
+ self.model.rows = res.data
641
+ self.params = res.data
642
+
643
+
644
+ },
645
+ impexcel() {
646
+ this.importtype='1'
647
+ this.showFile = true
648
+ },
649
+ closeFile() {
650
+ this.showFile = false
651
+ // 将选的文件清空
652
+ this.$refs.file.$el.querySelector('input').value = ''
653
+ },
654
+ delete(row){
655
+ console.log('开始删除')
656
+ let http = new HttpResetClass()
657
+ http.load('POST', 'rs/logic/deleteUserinfo', {data: {f_userinfo_id: row.f_userinfo_id}}, {resolveMsg: null, rejectMsg: null}).then((res) => {
658
+ console.log('返回的数据:',res)
659
+ if (res.data != null && res.data != "") {
660
+ this.$showMessage(res.data)
661
+ }else {
662
+ this.$showMessage("删除成功!")
663
+ this.load()
664
+ }
665
+ })
666
+ },
667
+
668
+ deleteItem(row) {
669
+
670
+
671
+ /* this.$showMessage('删除后不可恢复,确认删除吗?', ['confirm', 'cancel']).then((res) => {
672
+ if (res === 'confirm') {
673
+ let http = new HttpResetClass()
674
+ http.load('DELETE', `rs/entity/t_userinfo/${row.f_userinfo_id}`).then((res) => {
675
+ this.load()
676
+ })
677
+ }
678
+ })*/
679
+
680
+ this.$showMessage('删除后不可恢复,确认删除吗?', ['confirm', 'cancel']).then((res) => {
681
+ if (res === 'confirm') {
682
+ let http = new HttpResetClass()
683
+ http.load('DELETE', `rs/entity/t_userfiles/${row.f_user_id}`).then((res) => {
684
+ this.loadfiles()
685
+ })
686
+ }
687
+ })
688
+
689
+ },
690
+ //户档案查询
691
+ filterParams(param) {
692
+ this.isShowdetail=false
693
+ if (param && param !== "") {
694
+ let temp = []
695
+ for (var i = 0; i < this.model.rows.length; i++) {
696
+ if (this.model.rows[i].f_user_name.includes(param)) {
697
+ temp.push(this.model.rows[i])
698
+ }
699
+ }
700
+ this.model.rows = temp
701
+ } else {
702
+ this.model.rows = this.params
703
+ }
704
+ },
705
+ //表档案查询
706
+ filterParam(param) {
707
+ if (param && param !== "") {
708
+ let temp = []
709
+ for (var i = 0; i < this.model.rows.length; i++) {
710
+ if (this.model.rows[i].f_meter_brand.includes(param)) {
711
+ temp.push(this.model.rows[i])
712
+ }
713
+ }
714
+ this.model.rows = temp
715
+ } else {
716
+ this.model.rows = this.params
717
+ }
718
+ },
719
+ //设备列表查询
720
+ findEq(param) {
721
+ if (param && param !== "") {
722
+ let temp = []
723
+ for (var i = 0; i < this.model.rows.length; i++) {
724
+ if (this.model.rows[i].f_meter_brand.includes(param)) {
725
+ temp.push(this.model.rows[i])
726
+ }
727
+ }
728
+ this.model.rows = temp
729
+ } else {
730
+ this.model.rows = this.params
731
+ }
732
+ },
733
+ add() {
734
+ this.show = true
735
+ console.log("点击了添加")
736
+ },
737
+ // 修改按钮
738
+ modifyParam(row) {
739
+ this.$set('selectItem.f_userinfo_id', row.f_userinfo_id)
740
+ this.$set('selectItem.f_user_name', row.f_user_name)
741
+ this.$set('selectItem.f_user_phone', row.f_user_phone)
742
+ this.$set('selectItem.f_area', row.f_area)
743
+ this.$set('selectItem.f_slice_area', row.f_slice_area)
744
+ this.$set('selectItem.f_street', row.f_street)
745
+ this.$set('selectItem.f_residential_area', row.f_residential_area)
746
+ this.$set('selectItem.f_building', row.f_building)
747
+ this.$set('selectItem.f_unit', row.f_unit)
748
+ this.$set('selectItem.f_floor', row.f_floor)
749
+ this.$set('selectItem.f_room', row.f_room)
750
+ this.selectItem.f_cost_type= [row.f_cost_type]
751
+ this.selectItem.f_cost_state=[row.f_cost_state]
752
+ this.$set('selectItem.f_people_num', row.f_people_num)
753
+ this.selectItem.f_checker=[row.f_checker]
754
+ this.selectItem.f_user_state= [row.f_user_state]
755
+ this.$set('selectItem.version', row.version)
756
+ this.show = true
757
+ },
758
+
759
+ //获取当前用户表档案信息
760
+ getUserFiles(row) {
761
+ this.isShowFiles = true
762
+ console.log('获取户档案信息')
763
+
764
+ data = {
765
+ tablename: 't_userfiles',
766
+ condition: `f_userinfo_id=${row.f_userinfo_id}`
767
+ }
768
+ http = new HttpResetClass()
769
+ let resGasbrand = http.load('POST', 'rs/sql/singleTable', {data: data}, {
770
+ resolveMsg: null,
771
+ rejectMsg: '获取档案信息失败'
772
+ })
773
+ self.model.rows = []
774
+ self.model.rows = res.data
775
+ },
776
+ //表档案修改
777
+ filesModify(row) {
778
+ console.log('表档案数据',row)
779
+ this.$set('selectItem.f_userinfo_id', row.f_userinfo_id)
780
+ this.$set('selectItem.f_user_id', row.f_user_id)
781
+ this.$set('selectItem.f_meternumber', row.f_meternumber)
782
+ this.selectItem.version = row.version
783
+ this.selectItem.f_user_type = [row.f_user_type]
784
+ this.selectItem.f_gasproperties = [row.f_gasproperties]
785
+ this.$set('selectItem.f_meter_base', row.f_meter_base)
786
+ this.selectItem.f_meter_brand = [row.f_meter_brand]
787
+ this.selectItem.f_meter_style = [row.f_meter_style]
788
+ this.selectItem.f_aroundmeter = [row.f_aroundmeter]
789
+ this.selectItem.f_price_type = [row.f_price_type]
790
+ this.selectItem.f_price_name = [row.f_price_name]
791
+ this.$set('selectItem.f_heater_gas', row.f_heater_gas)
792
+ this.selectItem.f_table_state = [row.f_table_state]
793
+ this.selectItem.f_meter_classify = [row.f_meter_classify]
794
+ this.selectItem.f_whether_hairpin = [row.f_whether_hairpin]
795
+ this.selectItem.f_position=[row.f_position]
796
+ this.selectItem.f_inputtor=[row.f_inputtor]
797
+ this.$set('selectItem.f_lossrate', row.f_lossrate)
798
+ this.addshow = true
799
+ this.getpricetype()
800
+
801
+ },
802
+ getpricetype(){
803
+ console.log('开始获取气价类别')
804
+ let condition =`f_user_type = '${this.selectItem.f_user_type}' and f_filiale = '${this.$login.f.f_fengongsi}'
805
+ and f_gasproperties = '${this.selectItem.f_gasproperties}'`
806
+ this.$resetpost('rs/logic/getRecordItem', {condition}, {resolveMsg: null, rejectMsg: null}).then((res) => {
807
+ console.log('获取的选项',res)
808
+ let house2 = []
809
+ for (let row of res.data.pricetype){
810
+ house2.push({label: row.f_price_type,value: row.f_price_type})
811
+ }
812
+ this.pricetype = house2
813
+ let house = []
814
+ for (let row of res.data.meterbrand){
815
+ house.push({label: row.f_meter_brand,value: row.f_meter_brand})
816
+ }
817
+ this.meterbrand = house
818
+ let house3 = []
819
+ for (let row of res.data.pricename){
820
+ house3.push({label: row.f_price_name,value: row.f_price_name})
821
+ }
822
+ this.pricename = house3
823
+ })
824
+ },
825
+ //新增修改或删除提交
826
+ async confirm() {
827
+ let http = new HttpResetClass()
828
+ await http.load('POST', 'rs/logic/recordSave', this.selectItem).then((res) => {
829
+ this.show = false
830
+ // 如果没有id,需要在数组中添加
831
+ this.load()
832
+ this.selectItem = {}
833
+ })
834
+
835
+ },
836
+
837
+ async addconfirm() {
838
+ if (!this.selectItem.f_price_type[0]){
839
+ this.$showAlert("气价类型不能为空","warning", 1500)
840
+ return
841
+ }
842
+ if (!this.selectItem.f_price_name[0]){
843
+ this.$showAlert("气价名称不能为空","warning", 1500)
844
+ return
845
+ }
846
+ if (this.selectItem.f_gas_meternumber != this.selectItem.f_meternumber) {
847
+ let res = await this.$showMessage(`通气表号和安装表号不一致请确认是否修改安装表号`, ['confirm', 'cancel'])
848
+ if (res === 'confirm') {
849
+ this.$set('selectItem.f_gas_meternumber_back', this.selectItem.f_meternumber)
850
+ this.selectItem.f_meternumber = this.selectItem.f_gas_meternumber
851
+ } else {
852
+ return
853
+ }
854
+ }
855
+ this.showqueren = false
856
+ let http = new HttpResetClass()
857
+ this.$set('selectItem.f_userinfo_id', this.userinfo_id)
858
+ this.selectItem.f_filiale=this.$login.f.f_fengongsi
859
+ await http.load('POST', 'rs/logic/addmeterrecord', this.selectItem).then((res) => {
860
+ this.addshow = false
861
+ // 如果没有id,需要在数组中添加
862
+ this.loadfiles()
863
+ this.selectItem = {}
864
+ if (res.data.msg != null && res.data.msg != "") {
865
+ this.$showMessage(res.data.msg)
866
+ }else {
867
+ this.$showMessage("修改成功!")
868
+ }
869
+ })
870
+ this.showqueren = true
871
+ },
872
+ async updateconfirm(){
873
+ let http = new HttpResetClass()
874
+
875
+ await http.load('POST', 'rs/logic/updatemetrecord', this.selectItem,{resolveMsg: null, rejectMsg: '修改失败'}).then((res) => {
876
+ this.updateshow = false
877
+ // 如果没有id,需要在数组中添加
878
+ this.loadfiles()
879
+ this.selectItem = {}
880
+
881
+ })
882
+ },
883
+
884
+
885
+ // 关闭模态框
886
+ close() {
887
+ this.show = false
888
+ this.selectItem = {}
889
+ },
890
+ },
891
+ events: {
892
+ async onFileUpload(file, res) {
893
+ if (!this.selectdata.f_process_id) {
894
+ this.$showMessage("数据异常,导入失败")
895
+ return
896
+ }
897
+ if (this.importtype ==='1') {
898
+ //户档案导入
899
+ let data = {
900
+ tablename: 't_userinfo',
901
+ filepath: res.f_downloadpath,
902
+ f_area:this.selectdata.f_area,
903
+ f_slice_area:this.selectdata.f_slice_area,
904
+ f_street:this.selectdata.f_street,
905
+ f_residential_area:this.selectdata.f_residential_area,
906
+ f_process_id: this.selectdata.f_process_id,
907
+ f_user_type: this.selectdata.f_user_type,
908
+ f_key: this.$login.f.f_orgids,
909
+ f_operator: this.$login.f.name,
910
+ f_filiale: this.$login.f.f_fengongsi,
911
+ f_outlets: this.$login.f.f_parentname,
912
+ f_orgstr: this.$login.f.orgpathstr,
913
+ f_filialeids: this.$login.f.f_orgids,
914
+ f_filialeid: this.$login.f.f_orgids.split('.')[this.$login.f.f_orgids.split('.').length - 2] + '.'
915
+ }
916
+ let http2 = new HttpResetClass()
917
+ console.log('即将转发的数据',data)
918
+ await http2.load('POST', 'rs/logic/recordImport', data, {
919
+ resolveMsg: "",
920
+ rejectMsg: "导入失败!",
921
+ }).then((res) => {
922
+ console.log('返回信息',res)
923
+ this.load()
924
+ this.closeFile()
925
+ if (res.data.msg != null && res.data.msg != "") {
926
+ this.$showMessage(res.data.msg)
927
+ } else if (res.data.userIds.length > 0) {
928
+ this.$showMessage("以下编号的户档案不存在,请先添加户档案再添加表档案:" + res.data.userIds.toString())
929
+ } else if (res.data.reuserIds.length > 0) {
930
+ this.$showMessage("以下户档案编号的表档案已存在,请删除后重新导入:" + res.data.reuserIds.toString())
931
+ } else {
932
+ this.$showMessage("导入成功!")
933
+ }
934
+ })
935
+ }
936
+
937
+ }
938
+ }
939
+ }
940
+ </script>
941
+ <style>
942
+ .recordTable table tr th {
943
+ font-weight: bold;
944
+ }
945
+
946
+ .recordTable table tr:hover {
947
+ background-color: rgb(230, 230, 230);
948
+ }
949
+ </style>