apply-clients 6.0.3 → 6.0.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.
- package/build/dev-server.js +72 -72
- package/package.json +1 -1
- package/src/components/apply/base/rightview/InstallCardList2.vue +267 -268
- package/src/components/apply/base/rightview/carddetail/BuildFeeDetail2.vue +77 -77
- package/src/components/apply/base/rightview/carddetail/ChangeFeeDetail2.vue +116 -116
- package/src/components/apply/base/rightview/carddetail/ReduceFeeDetail2.vue +1 -1
- package/src/components/build/Install/InstallFee/AddContract.vue +257 -257
- package/src/components/build/Install/InstallFee/InstallFee.vue +929 -929
- package/src/components/build/Install/InstallFee/PreparationFee.vue +223 -223
- package/src/components/build/Install/InstallFee/PrestoreFee.vue +630 -630
- package/src/components/build/Install/Process/CustomerBuildingMessage.vue +251 -251
- package/src/components/build/Install/Process/CustomerEquipmentMessage.vue +172 -172
- package/src/components/build/Install/Process/CustomerFile.vue +423 -423
- package/src/components/build/Install/Process/CustomerMaterialMessage.vue +414 -414
- package/src/components/build/Install/Process/CustomerRecordMessage.vue +749 -749
- package/src/components/build/Install/Process/FeeNormeAndContratSigne.vue +376 -376
- package/src/components/build/Install/Process/MeterType.vue +379 -379
- package/src/components/build/Install/Process/PlaceControler.vue +304 -304
- package/src/components/build/Install/Process/zhongran/ZR_Construction.vue +388 -388
- package/src/components/build/Install/Process/zhongran/ZR_MaterialPlan.vue +259 -259
- package/src/components/build/Install/Process/zhongran/ZR_MaterialPlanExamine.vue +243 -243
- package/src/components/build/Install/Process/zhongran/ZR_PlaceControler.vue +426 -426
- package/src/components/build/Install/Process/zhongran/ZR_TestDesign.vue +441 -441
- package/src/components/build/Install/ProcessInfo/ApplyRecordCancel.vue +135 -135
- package/src/components/build/Install/bill/BillGZKMakeInfo.vue +58 -58
- package/src/components/build/Install/bill/BillQRKMakeInfo.vue +79 -79
- package/src/components/build/Install/bill/BillXSDMakeInfo.vue +206 -206
- package/src/main.js +25 -25
|
@@ -1,749 +1,749 @@
|
|
|
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
|
-
<nobr>{{row[item]? row[item]:0}}</nobr>
|
|
52
|
-
</td>
|
|
53
|
-
<td class="flex-around" v-show="$parent.$parent.$parent.edit">
|
|
54
|
-
<button type="button" name="button" class="btn btn-link"
|
|
55
|
-
@click.stop="$parent.$parent.$parent.modifyParam(row)" >修改
|
|
56
|
-
</button>
|
|
57
|
-
<button type="button" name="button" class="btn btn-link"
|
|
58
|
-
@click.stop="$parent.$parent.$parent.deleteItem(row)">删除
|
|
59
|
-
</button>
|
|
60
|
-
</td>
|
|
61
|
-
</template>
|
|
62
|
-
</data-grid>
|
|
63
|
-
</partial-view>
|
|
64
|
-
</div>
|
|
65
|
-
<!--表档案管理组件-->
|
|
66
|
-
<div class="col-sm-12 span recordTable" style="margin-top: 10px;min-height: 500px" v-if="key == '表档案管理'">
|
|
67
|
-
<partial-view v-ref:single-load>
|
|
68
|
-
<data-grid :model="model" v-ref:grid>
|
|
69
|
-
<template partial='head'>
|
|
70
|
-
<tr>
|
|
71
|
-
<th>序号</th>
|
|
72
|
-
<th v-for="item in $parent.$parent.$parent.surHeadData">
|
|
73
|
-
<nobr>{{item}}</nobr>
|
|
74
|
-
</th>
|
|
75
|
-
<th v-show="$parent.$parent.$parent.edit">操作</th>
|
|
76
|
-
</tr>
|
|
77
|
-
</template>
|
|
78
|
-
<template partial='body'>
|
|
79
|
-
<td>{{$index+1}}</td>
|
|
80
|
-
<td style="text-align: center;" v-for="item in $parent.$parent.$parent.surBodyData">
|
|
81
|
-
<nobr>{{row[item]? row[item]:0}}</nobr>
|
|
82
|
-
</td>
|
|
83
|
-
<td class="flex-around" v-show="$parent.$parent.$parent.edit">
|
|
84
|
-
<button type="button" name="button" class="btn btn-link"
|
|
85
|
-
@click.stop="$parent.$parent.$parent.deleteItem(row)">删除
|
|
86
|
-
</button>
|
|
87
|
-
</td>
|
|
88
|
-
</template>
|
|
89
|
-
</data-grid>
|
|
90
|
-
</partial-view>
|
|
91
|
-
</div>
|
|
92
|
-
</div>
|
|
93
|
-
<modal :show.sync="show" v-ref:modal backdrop="false">
|
|
94
|
-
<header slot="modal-header" class="modal-header">
|
|
95
|
-
<button type="button" class="close" @click="close"><span>×</span></button>
|
|
96
|
-
<h4 class="modal-title">配置</h4>
|
|
97
|
-
</header>
|
|
98
|
-
<!--户档案新增-->
|
|
99
|
-
<article slot="modal-body" class="modal-body" v-if="key == '户档案管理'">
|
|
100
|
-
<div class="from-group">
|
|
101
|
-
<label>用户姓名</label>
|
|
102
|
-
<input type="text" class="form-control" v-model="selectItem.f_user_name"/>
|
|
103
|
-
</div>
|
|
104
|
-
<div class="from-group">
|
|
105
|
-
<label>用户电话</label>
|
|
106
|
-
<input type="text" class="form-control" v-model="selectItem.f_user_phone">
|
|
107
|
-
</div>
|
|
108
|
-
<div class="from-group">
|
|
109
|
-
<label>区</label>
|
|
110
|
-
<input type="text" class="form-control" v-model="selectItem.f_area">
|
|
111
|
-
</div>
|
|
112
|
-
<div class="from-group">
|
|
113
|
-
<label>片区</label>
|
|
114
|
-
<input type="text" class="form-control" v-model="selectItem.f_slice_area">
|
|
115
|
-
</div>
|
|
116
|
-
<div class="from-group">
|
|
117
|
-
<label>街道名称</label>
|
|
118
|
-
<input type="text" class="form-control" v-model="selectItem.f_street">
|
|
119
|
-
</div>
|
|
120
|
-
<div class="from-group">
|
|
121
|
-
<label>小区名称</label>
|
|
122
|
-
<input type="text" class="form-control" v-model="selectItem.f_residential_area">
|
|
123
|
-
</div>
|
|
124
|
-
<div class="from-group">
|
|
125
|
-
<label>楼号</label>
|
|
126
|
-
<input type="text" class="form-control" v-model="selectItem.f_building">
|
|
127
|
-
</div>
|
|
128
|
-
<div class="from-group">
|
|
129
|
-
<label>单元号</label>
|
|
130
|
-
<input type="text" class="form-control" v-model="selectItem.f_unit">
|
|
131
|
-
</div>
|
|
132
|
-
<div class="from-group">
|
|
133
|
-
<label>楼层</label>
|
|
134
|
-
<input type="text" class="form-control" v-model="selectItem.f_floor">
|
|
135
|
-
</div>
|
|
136
|
-
<div class="from-group">
|
|
137
|
-
<label>门牌号</label>
|
|
138
|
-
<input type="text" class="form-control" v-model="selectItem.f_room">
|
|
139
|
-
</div>
|
|
140
|
-
<div class="from-group" v-if="!this.$login.f.f_fengongsi.includes('西昌')">
|
|
141
|
-
<label>用户类型</label>
|
|
142
|
-
<input type="text" class="form-control" v-model="selectItem.f_user_type" options='usertypes'>
|
|
143
|
-
</div>
|
|
144
|
-
<div class="from-group">
|
|
145
|
-
<label>用气性质</label>
|
|
146
|
-
<input type="text" class="form-control" v-model="selectItem.f_gasproperties" options='gasproperties'>
|
|
147
|
-
</div>
|
|
148
|
-
<div class="from-group">
|
|
149
|
-
<label>用户状态</label>
|
|
150
|
-
<input type="text" class="form-control" v-model="selectItem.f_user_state" options='userstates'>
|
|
151
|
-
</div>
|
|
152
|
-
</article>
|
|
153
|
-
<!--表档案新增-->
|
|
154
|
-
<article slot="modal-body" class="modal-body" v-if="key == '表档案管理'">
|
|
155
|
-
<div class="from-group">
|
|
156
|
-
<label>户档案编号</label>
|
|
157
|
-
<input type="text" class="form-control" v-model="selectItem.f_userinfo_id"/>
|
|
158
|
-
</div>
|
|
159
|
-
<div class="from-group">
|
|
160
|
-
<label>气表品牌</label>
|
|
161
|
-
<input type="text" class="form-control" v-model="selectItem.f_meter_brand">
|
|
162
|
-
</div>
|
|
163
|
-
<div class="from-group">
|
|
164
|
-
<label>表型号</label>
|
|
165
|
-
<input type="text" class="form-control" v-model="selectItem.f_meter_style">
|
|
166
|
-
</div>
|
|
167
|
-
<div class="from-group">
|
|
168
|
-
<label>表号</label>
|
|
169
|
-
<input type="text" class="form-control" v-model="selectItem.f_meternumber">
|
|
170
|
-
</div>
|
|
171
|
-
</article>
|
|
172
|
-
<footer slot="modal-footer" class="modal-footer">
|
|
173
|
-
<button v-show="show" type="button" class="btn btn-default" @click='close'>取消</button>
|
|
174
|
-
<button v-show="show" type="button" class="btn btn-success" @click='confirm'>确认</button>
|
|
175
|
-
</footer>
|
|
176
|
-
</modal>
|
|
177
|
-
<modal :show.sync="showFile" v-ref:modal backdrop="false">
|
|
178
|
-
<header slot="modal-header" class="modal-header">
|
|
179
|
-
<button type="button" class="close" @click="closeFile"><span>×</span></button>
|
|
180
|
-
<h4 class="modal-title">档案导入</h4>
|
|
181
|
-
</header>
|
|
182
|
-
<article slot="modal-body" class="modal-body">
|
|
183
|
-
<div class="form-group">
|
|
184
|
-
<file-upload class="my-file-uploader" :name="key+Math.random()"
|
|
185
|
-
action="rs/file/uploadFile" tagname="文件导入" :headers="headers" v-ref:file></file-upload>
|
|
186
|
-
</div>
|
|
187
|
-
</article>
|
|
188
|
-
<footer slot="modal-footer" class="modal-footer"></footer>
|
|
189
|
-
</modal>
|
|
190
|
-
|
|
191
|
-
</template>
|
|
192
|
-
|
|
193
|
-
<script>
|
|
194
|
-
import {HttpResetClass} from 'vue-client'
|
|
195
|
-
|
|
196
|
-
export default {
|
|
197
|
-
title: '档案信息',
|
|
198
|
-
props: ['selectdata', 'key','edit'],
|
|
199
|
-
data() {
|
|
200
|
-
return {
|
|
201
|
-
headers: {'username': this.$login.f.name, 'blodid': this.selectdata.f_process_id, 'fusetype': '报建execl导入用户档案'},
|
|
202
|
-
//户档案表头
|
|
203
|
-
userHeadData: ['档案编号', '用户姓名', '用户电话', '区', '片区', '街道名称', '小区名称', '楼号', '单元号', '楼层', '门牌号', '用气性质', '用户状态'],
|
|
204
|
-
//户档案内容
|
|
205
|
-
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'],
|
|
206
|
-
//表档案表头
|
|
207
|
-
surHeadData: ['户档案编号', '表号', '气表品牌', '表型号'],
|
|
208
|
-
//表档案内容
|
|
209
|
-
surBodyData: ['f_userinfo_id', 'f_meternumber', 'f_meter_brand', 'f_meter_style'],
|
|
210
|
-
//设备表头
|
|
211
|
-
eqHeadData: ['户档案编号', '设备编号', '设备类型', '设备品牌','设备型号','设备数量'],
|
|
212
|
-
//设备内容
|
|
213
|
-
eqBodyData: ['f_userinfo_id', 'f_devices_no', 'f_devices_type', 'f_brand','f_devices_model','f_devices_num'],
|
|
214
|
-
params: null,
|
|
215
|
-
record: {},
|
|
216
|
-
selectItem: {},
|
|
217
|
-
model: {
|
|
218
|
-
rows: []
|
|
219
|
-
},
|
|
220
|
-
params: { // 选择的具体内容
|
|
221
|
-
rows: []
|
|
222
|
-
},
|
|
223
|
-
condition: '',
|
|
224
|
-
show: false,
|
|
225
|
-
showFile: false,
|
|
226
|
-
ischecked: false,
|
|
227
|
-
getfield: {},
|
|
228
|
-
checked: [],
|
|
229
|
-
}
|
|
230
|
-
},
|
|
231
|
-
ready() {
|
|
232
|
-
|
|
233
|
-
},
|
|
234
|
-
watch: {
|
|
235
|
-
'selectdata'() {
|
|
236
|
-
this.headers.blodid = this.selectdata.f_process_id
|
|
237
|
-
this.load()
|
|
238
|
-
}
|
|
239
|
-
},
|
|
240
|
-
computed: {
|
|
241
|
-
funit() {
|
|
242
|
-
return AppData.getParam('小区类型')
|
|
243
|
-
},
|
|
244
|
-
ffloor() {
|
|
245
|
-
return AppData.getParam('房屋类型')
|
|
246
|
-
},
|
|
247
|
-
usertypes() {
|
|
248
|
-
return AppData.getParam('用户类型')
|
|
249
|
-
},
|
|
250
|
-
credentials() {
|
|
251
|
-
return AppData.getParam('证件类型')
|
|
252
|
-
},
|
|
253
|
-
costtypes() {
|
|
254
|
-
return AppData.getParam('缴费类型')
|
|
255
|
-
},
|
|
256
|
-
gasproperties() {
|
|
257
|
-
let rs = []
|
|
258
|
-
if (this.record.f_user_type.length === 1) {
|
|
259
|
-
rs = AppData.getParam(this.record.f_user_type[0])
|
|
260
|
-
}
|
|
261
|
-
return rs
|
|
262
|
-
},
|
|
263
|
-
userstates() {
|
|
264
|
-
return AppData.getParam('用户状态')
|
|
265
|
-
},
|
|
266
|
-
address() {
|
|
267
|
-
let strAddress = `${this.record.f_area ? this.record.f_area
|
|
268
|
-
+ '-' : ''}${this.record.f_street ? this.record.f_street
|
|
269
|
-
+ '-' : ''}${this.record.f_residential_area ? this.record.f_residential_area
|
|
270
|
-
+ '' : ''}${this.record.f_building ? this.record.f_building
|
|
271
|
-
+ '号楼' : ''}${this.record.f_unit ? this.record.f_unit
|
|
272
|
-
+ '单元' : ''}${this.record.f_floor ? this.record.f_floor
|
|
273
|
-
+ '层' : ''}${this.record.f_room ? this.record.f_room
|
|
274
|
-
+ '室' : ''}`
|
|
275
|
-
this.record.f_address = strAddress
|
|
276
|
-
return strAddress
|
|
277
|
-
},
|
|
278
|
-
getfield() {
|
|
279
|
-
let data = {}
|
|
280
|
-
this.userBodyData.forEach((value, index) => {
|
|
281
|
-
data[this.userBodyData[index]] = this.userHeadData[index]
|
|
282
|
-
})
|
|
283
|
-
|
|
284
|
-
console.log('data', data)
|
|
285
|
-
return data
|
|
286
|
-
}
|
|
287
|
-
},
|
|
288
|
-
methods: {
|
|
289
|
-
selected (val) {
|
|
290
|
-
this.selectItem = {"q":"q"}
|
|
291
|
-
},
|
|
292
|
-
//选择需要转银收的户档案
|
|
293
|
-
chooseOne(e, row, rows) {
|
|
294
|
-
console.log('row', row)
|
|
295
|
-
console.log('e', e)
|
|
296
|
-
this.ischecked = e.target.checked
|
|
297
|
-
console.log("state", e.target.checked)
|
|
298
|
-
//判断当前行是否被选中
|
|
299
|
-
if (this.ischecked) {
|
|
300
|
-
this.checked.push(row)
|
|
301
|
-
}
|
|
302
|
-
},
|
|
303
|
-
//修改选中的数据状态
|
|
304
|
-
changeState() {
|
|
305
|
-
if (this.checked.length > 0) {
|
|
306
|
-
let http = new HttpResetClass()
|
|
307
|
-
http.load('POST', 'rs/logic/updateUserState', {data: {rows: this.checked}}).then((res) => {
|
|
308
|
-
this.show = false
|
|
309
|
-
this.ischecked = false
|
|
310
|
-
// 如果没有id,需要在数组中添加
|
|
311
|
-
this.load()
|
|
312
|
-
this.checked = []
|
|
313
|
-
})
|
|
314
|
-
}
|
|
315
|
-
},
|
|
316
|
-
// 父组件更新子组件属性
|
|
317
|
-
updateData(val) {
|
|
318
|
-
this.headers.blodid = val.f_process_id
|
|
319
|
-
this.selectdata = val
|
|
320
|
-
},
|
|
321
|
-
async load() {
|
|
322
|
-
if (!this.selectdata)
|
|
323
|
-
return
|
|
324
|
-
let data = {
|
|
325
|
-
tablename: 't_userinfo',
|
|
326
|
-
condition: 'f_process_id=' + '\'' + this.selectdata.f_process_id + '\''
|
|
327
|
-
}
|
|
328
|
-
let self = this
|
|
329
|
-
let http = new HttpResetClass()
|
|
330
|
-
let res = await http.load('POST', 'rs/sql/
|
|
331
|
-
resolveMsg: null,
|
|
332
|
-
rejectMsg: '获取户档案信息失败'
|
|
333
|
-
})
|
|
334
|
-
self.model.rows = []
|
|
335
|
-
if (self.key == '户档案管理') {
|
|
336
|
-
self.model.rows = res.data
|
|
337
|
-
self.params = res.data
|
|
338
|
-
// 备份用于查询
|
|
339
|
-
} else if (self.key == '表档案管理') {
|
|
340
|
-
for (var i = 0; i < res.data.length; i++) {
|
|
341
|
-
// row.f_userinfo_id 户编号
|
|
342
|
-
data = {
|
|
343
|
-
tablename: 't_userfiles',
|
|
344
|
-
condition: `f_userinfo_id=${res.data[i].f_userinfo_id}`
|
|
345
|
-
}
|
|
346
|
-
http = new HttpResetClass()
|
|
347
|
-
let resUserfiles = await http.load('POST', 'rs/sql/
|
|
348
|
-
resolveMsg: null,
|
|
349
|
-
rejectMsg: '获取表档案信息失败'
|
|
350
|
-
})
|
|
351
|
-
if (resUserfiles.data.length == 0) {
|
|
352
|
-
continue
|
|
353
|
-
}
|
|
354
|
-
for (let i = 0; i < resUserfiles.data.length; i++) {
|
|
355
|
-
data = {
|
|
356
|
-
tablename: 't_gasbrand',
|
|
357
|
-
condition: `id=${resUserfiles.data[i].f_gasbrand_id}`
|
|
358
|
-
}
|
|
359
|
-
http = new HttpResetClass()
|
|
360
|
-
let resGasbrand = await http.load('POST', 'rs/sql/
|
|
361
|
-
resolveMsg: null,
|
|
362
|
-
rejectMsg: '获取档案信息失败'
|
|
363
|
-
})
|
|
364
|
-
|
|
365
|
-
data = {
|
|
366
|
-
tablename: 't_gasmodel',
|
|
367
|
-
condition: `id=${resUserfiles.data[i].f_gasmodel_id}`
|
|
368
|
-
}
|
|
369
|
-
http = new HttpResetClass()
|
|
370
|
-
let resModel = await http.load('POST', 'rs/sql/
|
|
371
|
-
resolveMsg: null,
|
|
372
|
-
rejectMsg: '获取档案信息失败'
|
|
373
|
-
})
|
|
374
|
-
self.model.rows.push({
|
|
375
|
-
f_user_id: resUserfiles.data[i].f_user_id,
|
|
376
|
-
f_userinfo_id: resUserfiles.data[i].f_userinfo_id,
|
|
377
|
-
f_meternumber: resUserfiles.data[i].f_meternumber,
|
|
378
|
-
f_meter_brand: resGasbrand.data[0].f_meter_brand,
|
|
379
|
-
f_meter_style: resModel.data[0].f_meter_style
|
|
380
|
-
})
|
|
381
|
-
self.params = self.model.rows
|
|
382
|
-
}
|
|
383
|
-
}
|
|
384
|
-
}else if (self.key == '设备管理') {
|
|
385
|
-
for (var i = 0; i < res.data.length; i++) {
|
|
386
|
-
data = {
|
|
387
|
-
tablename: 't_devices',
|
|
388
|
-
condition: 'f_process_id=' + '\'' + String(this.selectdata.f_process_id) + '\''
|
|
389
|
-
}// eqBodyData: ['f_userinfo_id', 'f_devices_no', 'f_devices_type', 'f_brand','f_devices_model','f_devices_num'],
|
|
390
|
-
this.$resetpost('rs/sql/
|
|
391
|
-
.then((dev) => {
|
|
392
|
-
self.model.rows.push({
|
|
393
|
-
f_userinfo_id: res.data[i].f_userinfo_id,
|
|
394
|
-
f_devices_no: dev.data[0].f_devices_no,
|
|
395
|
-
f_devices_type: dev.data[0].f_devices_type,
|
|
396
|
-
f_brand: dev.data[0].f_brand,
|
|
397
|
-
f_devices_model: dev.data[0].f_devices_model,
|
|
398
|
-
f_devices_num: dev.data[0].f_devices_num,
|
|
399
|
-
})
|
|
400
|
-
//self.model.rows = dev.data
|
|
401
|
-
})
|
|
402
|
-
}
|
|
403
|
-
}
|
|
404
|
-
},
|
|
405
|
-
impexcel() {
|
|
406
|
-
this.showFile = true
|
|
407
|
-
},
|
|
408
|
-
closeFile() {
|
|
409
|
-
this.showFile = false
|
|
410
|
-
// 将选的文件清空
|
|
411
|
-
this.$refs.file.$el.querySelector('input').value = ''
|
|
412
|
-
},
|
|
413
|
-
async deleteItem(row) {
|
|
414
|
-
if (this.key == '户档案管理') {
|
|
415
|
-
this.$showMessage('删除后不可恢复,确认删除吗?', ['confirm', 'cancel']).then((res) => {
|
|
416
|
-
if (res === 'confirm') {
|
|
417
|
-
let http = new HttpResetClass()
|
|
418
|
-
http.load('DELETE', `rs/entity/t_userinfo/${row.f_userinfo_id}`).then((ress) => {
|
|
419
|
-
this.load()
|
|
420
|
-
})
|
|
421
|
-
}
|
|
422
|
-
})
|
|
423
|
-
} else {
|
|
424
|
-
this.$showMessage('删除后不可恢复,确认删除吗?', ['confirm', 'cancel']).then((res) => {
|
|
425
|
-
if (res === 'confirm') {
|
|
426
|
-
let http = new HttpResetClass()
|
|
427
|
-
http.load('DELETE', `rs/entity/t_userfiles/${row.f_user_id}`).then((ress) => {
|
|
428
|
-
this.load()
|
|
429
|
-
})
|
|
430
|
-
}
|
|
431
|
-
})
|
|
432
|
-
}
|
|
433
|
-
},
|
|
434
|
-
//户档案查询
|
|
435
|
-
filterParams(param) {
|
|
436
|
-
if (param && param !== "") {
|
|
437
|
-
let temp = []
|
|
438
|
-
for (var i = 0; i < this.model.rows.length; i++) {
|
|
439
|
-
if (this.model.rows[i].f_user_name.includes(param)) {
|
|
440
|
-
temp.push(this.model.rows[i])
|
|
441
|
-
}
|
|
442
|
-
}
|
|
443
|
-
this.model.rows = temp
|
|
444
|
-
} else {
|
|
445
|
-
this.model.rows = this.params
|
|
446
|
-
}
|
|
447
|
-
},
|
|
448
|
-
//表档案查询
|
|
449
|
-
filterParam(param) {
|
|
450
|
-
if (param && param !== "") {
|
|
451
|
-
let temp = []
|
|
452
|
-
for (var i = 0; i < this.model.rows.length; i++) {
|
|
453
|
-
if (this.model.rows[i].f_meter_brand.includes(param)) {
|
|
454
|
-
temp.push(this.model.rows[i])
|
|
455
|
-
}
|
|
456
|
-
}
|
|
457
|
-
this.model.rows = temp
|
|
458
|
-
} else {
|
|
459
|
-
this.model.rows = this.params
|
|
460
|
-
}
|
|
461
|
-
},
|
|
462
|
-
//设备列表查询
|
|
463
|
-
findEq(param) {
|
|
464
|
-
if (param && param !== "") {
|
|
465
|
-
let temp = []
|
|
466
|
-
for (var i = 0; i < this.model.rows.length; i++) {
|
|
467
|
-
if (this.model.rows[i].f_meter_brand.includes(param)) {
|
|
468
|
-
temp.push(this.model.rows[i])
|
|
469
|
-
}
|
|
470
|
-
}
|
|
471
|
-
this.model.rows = temp
|
|
472
|
-
} else {
|
|
473
|
-
this.model.rows = this.params
|
|
474
|
-
}
|
|
475
|
-
},
|
|
476
|
-
add() {
|
|
477
|
-
this.show = true
|
|
478
|
-
console.log("点击了添加")
|
|
479
|
-
},
|
|
480
|
-
// 修改按钮
|
|
481
|
-
modifyParam(row) {
|
|
482
|
-
this.$set('selectItem.f_userinfo_id', row.f_userinfo_id)
|
|
483
|
-
this.$set('selectItem.f_user_name', row.f_user_name)
|
|
484
|
-
this.$set('selectItem.f_user_phone', row.f_user_phone)
|
|
485
|
-
this.$set('selectItem.f_area', row.f_area)
|
|
486
|
-
this.$set('selectItem.f_slice_area', row.f_slice_area)
|
|
487
|
-
this.$set('selectItem.f_street', row.f_street)
|
|
488
|
-
this.$set('selectItem.f_residential_area', row.f_residential_area)
|
|
489
|
-
this.$set('selectItem.f_building', row.f_building)
|
|
490
|
-
this.$set('selectItem.f_unit', row.f_unit)
|
|
491
|
-
this.$set('selectItem.f_floor', row.f_floor)
|
|
492
|
-
this.$set('selectItem.f_room', row.f_room)
|
|
493
|
-
this.$set('selectItem.f_user_type', row.f_user_type)
|
|
494
|
-
this.$set('selectItem.f_gasproperties', row.f_gasproperties)
|
|
495
|
-
this.$set('selectItem.f_user_state', row.f_user_state)
|
|
496
|
-
this.$set('selectItem.version', row.version)
|
|
497
|
-
this.$set('selectItem.f_user_state', row.f_user_state)
|
|
498
|
-
this.show = true
|
|
499
|
-
},
|
|
500
|
-
//获取当前用户表档案信息
|
|
501
|
-
/* getUserFiles(row) {
|
|
502
|
-
this.isShowFiles = true
|
|
503
|
-
console.log('获取户档案信息')
|
|
504
|
-
|
|
505
|
-
data = {
|
|
506
|
-
tablename: 't_userfiles',
|
|
507
|
-
condition: `f_userinfo_id=${row.f_userinfo_id}`
|
|
508
|
-
}
|
|
509
|
-
http = new HttpResetClass()
|
|
510
|
-
let resGasbrand = http.load('POST', 'rs/sql/
|
|
511
|
-
resolveMsg: null,
|
|
512
|
-
rejectMsg: '获取档案信息失败'
|
|
513
|
-
})
|
|
514
|
-
self.model.rows = []
|
|
515
|
-
self.model.rows = res.data
|
|
516
|
-
},*/
|
|
517
|
-
//表档案修改
|
|
518
|
-
filesModify(row) {
|
|
519
|
-
this.$set('selectItem.f_userinfo_id', row.f_userinfo_id)
|
|
520
|
-
this.$set('selectItem.f_user_id', row.f_user_id)
|
|
521
|
-
this.$set('selectItem.f_meter_brand', row.f_meter_brand)
|
|
522
|
-
this.$set('selectItem.f_meter_style', row.f_meter_style)
|
|
523
|
-
this.$set('selectItem.f_meternumber', row.f_meternumber)
|
|
524
|
-
this.show = true
|
|
525
|
-
},
|
|
526
|
-
//新增修改或删除提交
|
|
527
|
-
async confirm() {
|
|
528
|
-
var _this = this
|
|
529
|
-
if (this.key == '户档案管理') {
|
|
530
|
-
// 无主键为插入
|
|
531
|
-
if (!this.selectItem.f_userinfo_id) {
|
|
532
|
-
this.selectItem.version = 1
|
|
533
|
-
this.selectItem.f_user_state = '报建'
|
|
534
|
-
this.selectItem.f_process_id = this.selectdata.f_process_id
|
|
535
|
-
let data = {
|
|
536
|
-
tablename: 't_userinfo',
|
|
537
|
-
parameters: this.selectItem
|
|
538
|
-
}
|
|
539
|
-
let http = new HttpResetClass()
|
|
540
|
-
await http.load('POST', 'rs/entity/t_userinfo', this.selectItem).then((res) => {
|
|
541
|
-
this.show = false
|
|
542
|
-
// 如果没有id,需要在数组中添加
|
|
543
|
-
this.load()
|
|
544
|
-
this.selectItem = {}
|
|
545
|
-
})
|
|
546
|
-
} else { // 有主键为更新
|
|
547
|
-
let data = {
|
|
548
|
-
tablename: 't_userinfo',
|
|
549
|
-
parameters: this.selectItem
|
|
550
|
-
}
|
|
551
|
-
let http = new HttpResetClass()
|
|
552
|
-
await http.load('POST', 'rs/entity/t_userinfo', this.selectItem).then((res) => {
|
|
553
|
-
this.show = false
|
|
554
|
-
// 如果没有id,需要在数组中添加
|
|
555
|
-
this.load()
|
|
556
|
-
this.selectItem = {}
|
|
557
|
-
})
|
|
558
|
-
}
|
|
559
|
-
} else if (this.key == '表档案管理') {
|
|
560
|
-
if (!this.selectItem.f_user_id) {
|
|
561
|
-
//新增
|
|
562
|
-
//根据户档案编号查询户档案
|
|
563
|
-
let http = new HttpResetClass()
|
|
564
|
-
await http.load('POST', 'rs/sql/findUserInfo', {
|
|
565
|
-
data: {
|
|
566
|
-
f_userinfo_id: this.selectItem.f_userinfo_id,
|
|
567
|
-
process_id: this.selectdata.f_process_id
|
|
568
|
-
}
|
|
569
|
-
}).then((res) => {
|
|
570
|
-
if (res.data != null && res.data.length > 0) {
|
|
571
|
-
//判断重复
|
|
572
|
-
http = new HttpResetClass()
|
|
573
|
-
http.load('POST', 'rs/sql/findFilesByUserId', {data: {f_userinfo_id: _this.selectItem.f_userinfo_id}}).then((res) => {
|
|
574
|
-
if (res.data.length > 0) {
|
|
575
|
-
this.$showMessage("该户档案编号的表档案已存在!")
|
|
576
|
-
return
|
|
577
|
-
}
|
|
578
|
-
//根据提交的气表品牌、表型号分别查询对应的表具信息
|
|
579
|
-
let data = {
|
|
580
|
-
tablename: 't_gasbrand',
|
|
581
|
-
condition: `f_meter_brand= '${_this.selectItem.f_meter_brand}'`
|
|
582
|
-
}
|
|
583
|
-
http = new HttpResetClass()
|
|
584
|
-
http.load('POST', 'rs/sql/
|
|
585
|
-
if (res.data.length > 0) {
|
|
586
|
-
//表型号
|
|
587
|
-
data = {
|
|
588
|
-
tablename: 't_gasmodel',
|
|
589
|
-
condition: `f_meter_style= '${_this.selectItem.f_meter_style}'`
|
|
590
|
-
}
|
|
591
|
-
http = new HttpResetClass()
|
|
592
|
-
http.load('POST', 'rs/sql/
|
|
593
|
-
if (re.data.length > 0) {
|
|
594
|
-
this.selectItem.version = 1
|
|
595
|
-
this.selectItem.f_table_state = '正常'
|
|
596
|
-
this.selectItem.f_gasbrand_id = res.data[0].id
|
|
597
|
-
this.selectItem.f_gasmodel_id = re.data[0].id
|
|
598
|
-
data = {
|
|
599
|
-
tablename: 't_userfiles',
|
|
600
|
-
parameters: this.selectItem
|
|
601
|
-
}
|
|
602
|
-
http = new HttpResetClass()
|
|
603
|
-
http.load('POST', 'rs/entity/t_userfiles', _this.selectItem, {
|
|
604
|
-
resolveMsg: null,
|
|
605
|
-
rejectMsg: null,
|
|
606
|
-
}).then((res) => {
|
|
607
|
-
this.show = false
|
|
608
|
-
// 如果没有id,需要在数组中添加
|
|
609
|
-
this.load()
|
|
610
|
-
this.selectItem = {}
|
|
611
|
-
})
|
|
612
|
-
}
|
|
613
|
-
})
|
|
614
|
-
} else {
|
|
615
|
-
this.$showMessage("表品牌信息错误!")
|
|
616
|
-
return
|
|
617
|
-
}
|
|
618
|
-
})
|
|
619
|
-
})
|
|
620
|
-
} else {
|
|
621
|
-
this.$showMessage("该编号户档案不存在,请先添加户档案")
|
|
622
|
-
return
|
|
623
|
-
}
|
|
624
|
-
})
|
|
625
|
-
} else {
|
|
626
|
-
//根据提交的气表品牌、表型号分别查询对应的表具信息
|
|
627
|
-
let data = {
|
|
628
|
-
tablename: 't_gasbrand',
|
|
629
|
-
condition: `f_meter_brand= '${this.selectItem.f_meter_brand}'`
|
|
630
|
-
}
|
|
631
|
-
let http = new HttpResetClass()
|
|
632
|
-
http.load('POST', 'rs/sql/
|
|
633
|
-
if (res.data.length > 0) {
|
|
634
|
-
//表型号
|
|
635
|
-
data = {
|
|
636
|
-
tablename: 't_gasmodel',
|
|
637
|
-
condition: `f_meter_style= '${this.selectItem.f_meter_style}'`
|
|
638
|
-
}
|
|
639
|
-
http = new HttpResetClass()
|
|
640
|
-
http.load('POST', 'rs/sql/
|
|
641
|
-
if (re.data.length > 0) {
|
|
642
|
-
this.selectItem.f_gasbrand_id = res.data[0].id
|
|
643
|
-
this.selectItem.f_gasmodel_id = re.data[0].id
|
|
644
|
-
data = {
|
|
645
|
-
tablename: 't_userfiles',
|
|
646
|
-
parameters: this.selectItem
|
|
647
|
-
}
|
|
648
|
-
let http = new HttpResetClass()
|
|
649
|
-
http.load('POST', 'rs/entity/t_userfiles', this.selectItem, {
|
|
650
|
-
resolveMsg: null,
|
|
651
|
-
rejectMsg: null,
|
|
652
|
-
}).then((res) => {
|
|
653
|
-
this.show = false
|
|
654
|
-
// 如果没有id,需要在数组中添加
|
|
655
|
-
this.load()
|
|
656
|
-
this.selectItem = {}
|
|
657
|
-
})
|
|
658
|
-
}
|
|
659
|
-
})
|
|
660
|
-
} else {
|
|
661
|
-
this.$showMessage("表品牌信息错误!")
|
|
662
|
-
return
|
|
663
|
-
}
|
|
664
|
-
})
|
|
665
|
-
}
|
|
666
|
-
}
|
|
667
|
-
},
|
|
668
|
-
|
|
669
|
-
// 关闭模态框
|
|
670
|
-
close() {
|
|
671
|
-
this.show = false
|
|
672
|
-
this.selectItem = {}
|
|
673
|
-
},
|
|
674
|
-
},
|
|
675
|
-
events: {
|
|
676
|
-
async onFileUpload(file, res) {
|
|
677
|
-
if (!this.selectdata.f_process_id) {
|
|
678
|
-
this.$showMessage("数据异常,导入失败")
|
|
679
|
-
return
|
|
680
|
-
}
|
|
681
|
-
//户档案导入
|
|
682
|
-
if (this.key == '户档案管理') {
|
|
683
|
-
let data = {
|
|
684
|
-
tablename: 't_userinfo',
|
|
685
|
-
filepath: res.f_downloadpath,
|
|
686
|
-
f_process_id: this.selectdata.f_process_id,
|
|
687
|
-
f_key: this.$login.f.f_orgids,
|
|
688
|
-
f_operator: this.$login.f.name,
|
|
689
|
-
f_filiale: this.$login.f.f_fengongsi,
|
|
690
|
-
f_outlets: this.$login.f.f_parentname,
|
|
691
|
-
f_orgstr: this.$login.f.orgpathstr,
|
|
692
|
-
f_filialeids: this.$login.f.f_orgids,
|
|
693
|
-
f_filialeid: this.$login.f.f_orgids.split('.')[this.$login.f.f_orgids.split('.').length - 2] + '.'
|
|
694
|
-
}
|
|
695
|
-
let http2 = new HttpResetClass()
|
|
696
|
-
await http2.load('POST', 'rs/logic/recordImport', data, {
|
|
697
|
-
resolveMsg: "导入成功!",
|
|
698
|
-
rejectMsg: "导入失败!",
|
|
699
|
-
}).then((res) => {
|
|
700
|
-
this.load()
|
|
701
|
-
this.closeFile()
|
|
702
|
-
})
|
|
703
|
-
}
|
|
704
|
-
//表档案导入
|
|
705
|
-
if (this.key == '表档案管理') {
|
|
706
|
-
let data = {
|
|
707
|
-
tablename: 't_userfiles',
|
|
708
|
-
filepath: res.f_downloadpath,
|
|
709
|
-
f_process_id: this.selectdata.f_process_id,
|
|
710
|
-
f_key: this.$login.f.f_orgids,
|
|
711
|
-
f_operator: this.$login.f.name,
|
|
712
|
-
f_filiale: this.$login.f.f_fengongsi,
|
|
713
|
-
f_outlets: this.$login.f.f_parentname,
|
|
714
|
-
f_orgstr: this.$login.f.orgpathstr,
|
|
715
|
-
f_filialeids: this.$login.f.f_orgids,
|
|
716
|
-
f_filialeid: this.$login.f.f_orgids.split('.')[this.$login.f.f_orgids.split('.').length - 2] + '.'
|
|
717
|
-
}
|
|
718
|
-
let http2 = new HttpResetClass()
|
|
719
|
-
await http2.load('POST', 'rs/logic/grandImport', data, {
|
|
720
|
-
resolveMsg: null,
|
|
721
|
-
rejectMsg: '上传失败'
|
|
722
|
-
}).then((res) => {
|
|
723
|
-
console.log(">>>>>>>>>>>", res)
|
|
724
|
-
this.load()
|
|
725
|
-
this.closeFile()
|
|
726
|
-
if (res.data.msg != null && res.data.msg != "") {
|
|
727
|
-
this.$showMessage(res.data.msg)
|
|
728
|
-
} else if (res.data.userIds.length > 0) {
|
|
729
|
-
this.$showMessage("以下编号的户档案不存在,请先添加户档案再添加表档案:" + res.data.userIds.toString())
|
|
730
|
-
} else if (res.data.reuserIds.length > 0) {
|
|
731
|
-
this.$showMessage("以下户档案编号的表档案已存在,请删除后重新导入:" + res.data.reuserIds.toString())
|
|
732
|
-
} else {
|
|
733
|
-
this.$showMessage("导入成功!")
|
|
734
|
-
}
|
|
735
|
-
})
|
|
736
|
-
}
|
|
737
|
-
}
|
|
738
|
-
}
|
|
739
|
-
}
|
|
740
|
-
</script>
|
|
741
|
-
<style>
|
|
742
|
-
.recordTable table tr th {
|
|
743
|
-
font-weight: bold;
|
|
744
|
-
}
|
|
745
|
-
|
|
746
|
-
.recordTable table tr:hover {
|
|
747
|
-
background-color: rgb(230, 230, 230);
|
|
748
|
-
}
|
|
749
|
-
</style>
|
|
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
|
+
<nobr>{{row[item]? row[item]:0}}</nobr>
|
|
52
|
+
</td>
|
|
53
|
+
<td class="flex-around" v-show="$parent.$parent.$parent.edit">
|
|
54
|
+
<button type="button" name="button" class="btn btn-link"
|
|
55
|
+
@click.stop="$parent.$parent.$parent.modifyParam(row)" >修改
|
|
56
|
+
</button>
|
|
57
|
+
<button type="button" name="button" class="btn btn-link"
|
|
58
|
+
@click.stop="$parent.$parent.$parent.deleteItem(row)">删除
|
|
59
|
+
</button>
|
|
60
|
+
</td>
|
|
61
|
+
</template>
|
|
62
|
+
</data-grid>
|
|
63
|
+
</partial-view>
|
|
64
|
+
</div>
|
|
65
|
+
<!--表档案管理组件-->
|
|
66
|
+
<div class="col-sm-12 span recordTable" style="margin-top: 10px;min-height: 500px" v-if="key == '表档案管理'">
|
|
67
|
+
<partial-view v-ref:single-load>
|
|
68
|
+
<data-grid :model="model" v-ref:grid>
|
|
69
|
+
<template partial='head'>
|
|
70
|
+
<tr>
|
|
71
|
+
<th>序号</th>
|
|
72
|
+
<th v-for="item in $parent.$parent.$parent.surHeadData">
|
|
73
|
+
<nobr>{{item}}</nobr>
|
|
74
|
+
</th>
|
|
75
|
+
<th v-show="$parent.$parent.$parent.edit">操作</th>
|
|
76
|
+
</tr>
|
|
77
|
+
</template>
|
|
78
|
+
<template partial='body'>
|
|
79
|
+
<td>{{$index+1}}</td>
|
|
80
|
+
<td style="text-align: center;" v-for="item in $parent.$parent.$parent.surBodyData">
|
|
81
|
+
<nobr>{{row[item]? row[item]:0}}</nobr>
|
|
82
|
+
</td>
|
|
83
|
+
<td class="flex-around" v-show="$parent.$parent.$parent.edit">
|
|
84
|
+
<button type="button" name="button" class="btn btn-link"
|
|
85
|
+
@click.stop="$parent.$parent.$parent.deleteItem(row)">删除
|
|
86
|
+
</button>
|
|
87
|
+
</td>
|
|
88
|
+
</template>
|
|
89
|
+
</data-grid>
|
|
90
|
+
</partial-view>
|
|
91
|
+
</div>
|
|
92
|
+
</div>
|
|
93
|
+
<modal :show.sync="show" v-ref:modal backdrop="false">
|
|
94
|
+
<header slot="modal-header" class="modal-header">
|
|
95
|
+
<button type="button" class="close" @click="close"><span>×</span></button>
|
|
96
|
+
<h4 class="modal-title">配置</h4>
|
|
97
|
+
</header>
|
|
98
|
+
<!--户档案新增-->
|
|
99
|
+
<article slot="modal-body" class="modal-body" v-if="key == '户档案管理'">
|
|
100
|
+
<div class="from-group">
|
|
101
|
+
<label>用户姓名</label>
|
|
102
|
+
<input type="text" class="form-control" v-model="selectItem.f_user_name"/>
|
|
103
|
+
</div>
|
|
104
|
+
<div class="from-group">
|
|
105
|
+
<label>用户电话</label>
|
|
106
|
+
<input type="text" class="form-control" v-model="selectItem.f_user_phone">
|
|
107
|
+
</div>
|
|
108
|
+
<div class="from-group">
|
|
109
|
+
<label>区</label>
|
|
110
|
+
<input type="text" class="form-control" v-model="selectItem.f_area">
|
|
111
|
+
</div>
|
|
112
|
+
<div class="from-group">
|
|
113
|
+
<label>片区</label>
|
|
114
|
+
<input type="text" class="form-control" v-model="selectItem.f_slice_area">
|
|
115
|
+
</div>
|
|
116
|
+
<div class="from-group">
|
|
117
|
+
<label>街道名称</label>
|
|
118
|
+
<input type="text" class="form-control" v-model="selectItem.f_street">
|
|
119
|
+
</div>
|
|
120
|
+
<div class="from-group">
|
|
121
|
+
<label>小区名称</label>
|
|
122
|
+
<input type="text" class="form-control" v-model="selectItem.f_residential_area">
|
|
123
|
+
</div>
|
|
124
|
+
<div class="from-group">
|
|
125
|
+
<label>楼号</label>
|
|
126
|
+
<input type="text" class="form-control" v-model="selectItem.f_building">
|
|
127
|
+
</div>
|
|
128
|
+
<div class="from-group">
|
|
129
|
+
<label>单元号</label>
|
|
130
|
+
<input type="text" class="form-control" v-model="selectItem.f_unit">
|
|
131
|
+
</div>
|
|
132
|
+
<div class="from-group">
|
|
133
|
+
<label>楼层</label>
|
|
134
|
+
<input type="text" class="form-control" v-model="selectItem.f_floor">
|
|
135
|
+
</div>
|
|
136
|
+
<div class="from-group">
|
|
137
|
+
<label>门牌号</label>
|
|
138
|
+
<input type="text" class="form-control" v-model="selectItem.f_room">
|
|
139
|
+
</div>
|
|
140
|
+
<div class="from-group" v-if="!this.$login.f.f_fengongsi.includes('西昌')">
|
|
141
|
+
<label>用户类型</label>
|
|
142
|
+
<input type="text" class="form-control" v-model="selectItem.f_user_type" options='usertypes'>
|
|
143
|
+
</div>
|
|
144
|
+
<div class="from-group">
|
|
145
|
+
<label>用气性质</label>
|
|
146
|
+
<input type="text" class="form-control" v-model="selectItem.f_gasproperties" options='gasproperties'>
|
|
147
|
+
</div>
|
|
148
|
+
<div class="from-group">
|
|
149
|
+
<label>用户状态</label>
|
|
150
|
+
<input type="text" class="form-control" v-model="selectItem.f_user_state" options='userstates'>
|
|
151
|
+
</div>
|
|
152
|
+
</article>
|
|
153
|
+
<!--表档案新增-->
|
|
154
|
+
<article slot="modal-body" class="modal-body" v-if="key == '表档案管理'">
|
|
155
|
+
<div class="from-group">
|
|
156
|
+
<label>户档案编号</label>
|
|
157
|
+
<input type="text" class="form-control" v-model="selectItem.f_userinfo_id"/>
|
|
158
|
+
</div>
|
|
159
|
+
<div class="from-group">
|
|
160
|
+
<label>气表品牌</label>
|
|
161
|
+
<input type="text" class="form-control" v-model="selectItem.f_meter_brand">
|
|
162
|
+
</div>
|
|
163
|
+
<div class="from-group">
|
|
164
|
+
<label>表型号</label>
|
|
165
|
+
<input type="text" class="form-control" v-model="selectItem.f_meter_style">
|
|
166
|
+
</div>
|
|
167
|
+
<div class="from-group">
|
|
168
|
+
<label>表号</label>
|
|
169
|
+
<input type="text" class="form-control" v-model="selectItem.f_meternumber">
|
|
170
|
+
</div>
|
|
171
|
+
</article>
|
|
172
|
+
<footer slot="modal-footer" class="modal-footer">
|
|
173
|
+
<button v-show="show" type="button" class="btn btn-default" @click='close'>取消</button>
|
|
174
|
+
<button v-show="show" type="button" class="btn btn-success" @click='confirm'>确认</button>
|
|
175
|
+
</footer>
|
|
176
|
+
</modal>
|
|
177
|
+
<modal :show.sync="showFile" v-ref:modal backdrop="false">
|
|
178
|
+
<header slot="modal-header" class="modal-header">
|
|
179
|
+
<button type="button" class="close" @click="closeFile"><span>×</span></button>
|
|
180
|
+
<h4 class="modal-title">档案导入</h4>
|
|
181
|
+
</header>
|
|
182
|
+
<article slot="modal-body" class="modal-body">
|
|
183
|
+
<div class="form-group">
|
|
184
|
+
<file-upload class="my-file-uploader" :name="key+Math.random()"
|
|
185
|
+
action="rs/file/uploadFile" tagname="文件导入" :headers="headers" v-ref:file></file-upload>
|
|
186
|
+
</div>
|
|
187
|
+
</article>
|
|
188
|
+
<footer slot="modal-footer" class="modal-footer"></footer>
|
|
189
|
+
</modal>
|
|
190
|
+
|
|
191
|
+
</template>
|
|
192
|
+
|
|
193
|
+
<script>
|
|
194
|
+
import {HttpResetClass} from 'vue-client'
|
|
195
|
+
|
|
196
|
+
export default {
|
|
197
|
+
title: '档案信息',
|
|
198
|
+
props: ['selectdata', 'key','edit'],
|
|
199
|
+
data() {
|
|
200
|
+
return {
|
|
201
|
+
headers: {'username': this.$login.f.name, 'blodid': this.selectdata.f_process_id, 'fusetype': '报建execl导入用户档案'},
|
|
202
|
+
//户档案表头
|
|
203
|
+
userHeadData: ['档案编号', '用户姓名', '用户电话', '区', '片区', '街道名称', '小区名称', '楼号', '单元号', '楼层', '门牌号', '用气性质', '用户状态'],
|
|
204
|
+
//户档案内容
|
|
205
|
+
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'],
|
|
206
|
+
//表档案表头
|
|
207
|
+
surHeadData: ['户档案编号', '表号', '气表品牌', '表型号'],
|
|
208
|
+
//表档案内容
|
|
209
|
+
surBodyData: ['f_userinfo_id', 'f_meternumber', 'f_meter_brand', 'f_meter_style'],
|
|
210
|
+
//设备表头
|
|
211
|
+
eqHeadData: ['户档案编号', '设备编号', '设备类型', '设备品牌','设备型号','设备数量'],
|
|
212
|
+
//设备内容
|
|
213
|
+
eqBodyData: ['f_userinfo_id', 'f_devices_no', 'f_devices_type', 'f_brand','f_devices_model','f_devices_num'],
|
|
214
|
+
params: null,
|
|
215
|
+
record: {},
|
|
216
|
+
selectItem: {},
|
|
217
|
+
model: {
|
|
218
|
+
rows: []
|
|
219
|
+
},
|
|
220
|
+
params: { // 选择的具体内容
|
|
221
|
+
rows: []
|
|
222
|
+
},
|
|
223
|
+
condition: '',
|
|
224
|
+
show: false,
|
|
225
|
+
showFile: false,
|
|
226
|
+
ischecked: false,
|
|
227
|
+
getfield: {},
|
|
228
|
+
checked: [],
|
|
229
|
+
}
|
|
230
|
+
},
|
|
231
|
+
ready() {
|
|
232
|
+
|
|
233
|
+
},
|
|
234
|
+
watch: {
|
|
235
|
+
'selectdata'() {
|
|
236
|
+
this.headers.blodid = this.selectdata.f_process_id
|
|
237
|
+
this.load()
|
|
238
|
+
}
|
|
239
|
+
},
|
|
240
|
+
computed: {
|
|
241
|
+
funit() {
|
|
242
|
+
return AppData.getParam('小区类型')
|
|
243
|
+
},
|
|
244
|
+
ffloor() {
|
|
245
|
+
return AppData.getParam('房屋类型')
|
|
246
|
+
},
|
|
247
|
+
usertypes() {
|
|
248
|
+
return AppData.getParam('用户类型')
|
|
249
|
+
},
|
|
250
|
+
credentials() {
|
|
251
|
+
return AppData.getParam('证件类型')
|
|
252
|
+
},
|
|
253
|
+
costtypes() {
|
|
254
|
+
return AppData.getParam('缴费类型')
|
|
255
|
+
},
|
|
256
|
+
gasproperties() {
|
|
257
|
+
let rs = []
|
|
258
|
+
if (this.record.f_user_type.length === 1) {
|
|
259
|
+
rs = AppData.getParam(this.record.f_user_type[0])
|
|
260
|
+
}
|
|
261
|
+
return rs
|
|
262
|
+
},
|
|
263
|
+
userstates() {
|
|
264
|
+
return AppData.getParam('用户状态')
|
|
265
|
+
},
|
|
266
|
+
address() {
|
|
267
|
+
let strAddress = `${this.record.f_area ? this.record.f_area
|
|
268
|
+
+ '-' : ''}${this.record.f_street ? this.record.f_street
|
|
269
|
+
+ '-' : ''}${this.record.f_residential_area ? this.record.f_residential_area
|
|
270
|
+
+ '' : ''}${this.record.f_building ? this.record.f_building
|
|
271
|
+
+ '号楼' : ''}${this.record.f_unit ? this.record.f_unit
|
|
272
|
+
+ '单元' : ''}${this.record.f_floor ? this.record.f_floor
|
|
273
|
+
+ '层' : ''}${this.record.f_room ? this.record.f_room
|
|
274
|
+
+ '室' : ''}`
|
|
275
|
+
this.record.f_address = strAddress
|
|
276
|
+
return strAddress
|
|
277
|
+
},
|
|
278
|
+
getfield() {
|
|
279
|
+
let data = {}
|
|
280
|
+
this.userBodyData.forEach((value, index) => {
|
|
281
|
+
data[this.userBodyData[index]] = this.userHeadData[index]
|
|
282
|
+
})
|
|
283
|
+
|
|
284
|
+
console.log('data', data)
|
|
285
|
+
return data
|
|
286
|
+
}
|
|
287
|
+
},
|
|
288
|
+
methods: {
|
|
289
|
+
selected (val) {
|
|
290
|
+
this.selectItem = {"q":"q"}
|
|
291
|
+
},
|
|
292
|
+
//选择需要转银收的户档案
|
|
293
|
+
chooseOne(e, row, rows) {
|
|
294
|
+
console.log('row', row)
|
|
295
|
+
console.log('e', e)
|
|
296
|
+
this.ischecked = e.target.checked
|
|
297
|
+
console.log("state", e.target.checked)
|
|
298
|
+
//判断当前行是否被选中
|
|
299
|
+
if (this.ischecked) {
|
|
300
|
+
this.checked.push(row)
|
|
301
|
+
}
|
|
302
|
+
},
|
|
303
|
+
//修改选中的数据状态
|
|
304
|
+
changeState() {
|
|
305
|
+
if (this.checked.length > 0) {
|
|
306
|
+
let http = new HttpResetClass()
|
|
307
|
+
http.load('POST', 'rs/logic/updateUserState', {data: {rows: this.checked}}).then((res) => {
|
|
308
|
+
this.show = false
|
|
309
|
+
this.ischecked = false
|
|
310
|
+
// 如果没有id,需要在数组中添加
|
|
311
|
+
this.load()
|
|
312
|
+
this.checked = []
|
|
313
|
+
})
|
|
314
|
+
}
|
|
315
|
+
},
|
|
316
|
+
// 父组件更新子组件属性
|
|
317
|
+
updateData(val) {
|
|
318
|
+
this.headers.blodid = val.f_process_id
|
|
319
|
+
this.selectdata = val
|
|
320
|
+
},
|
|
321
|
+
async load() {
|
|
322
|
+
if (!this.selectdata)
|
|
323
|
+
return
|
|
324
|
+
let data = {
|
|
325
|
+
tablename: 't_userinfo',
|
|
326
|
+
condition: 'f_process_id=' + '\'' + this.selectdata.f_process_id + '\''
|
|
327
|
+
}
|
|
328
|
+
let self = this
|
|
329
|
+
let http = new HttpResetClass()
|
|
330
|
+
let res = await http.load('POST', 'rs/sql/applysingleTable', {data: data}, {
|
|
331
|
+
resolveMsg: null,
|
|
332
|
+
rejectMsg: '获取户档案信息失败'
|
|
333
|
+
})
|
|
334
|
+
self.model.rows = []
|
|
335
|
+
if (self.key == '户档案管理') {
|
|
336
|
+
self.model.rows = res.data
|
|
337
|
+
self.params = res.data
|
|
338
|
+
// 备份用于查询
|
|
339
|
+
} else if (self.key == '表档案管理') {
|
|
340
|
+
for (var i = 0; i < res.data.length; i++) {
|
|
341
|
+
// row.f_userinfo_id 户编号
|
|
342
|
+
data = {
|
|
343
|
+
tablename: 't_userfiles',
|
|
344
|
+
condition: `f_userinfo_id=${res.data[i].f_userinfo_id}`
|
|
345
|
+
}
|
|
346
|
+
http = new HttpResetClass()
|
|
347
|
+
let resUserfiles = await http.load('POST', 'rs/sql/applysingleTable', {data: data}, {
|
|
348
|
+
resolveMsg: null,
|
|
349
|
+
rejectMsg: '获取表档案信息失败'
|
|
350
|
+
})
|
|
351
|
+
if (resUserfiles.data.length == 0) {
|
|
352
|
+
continue
|
|
353
|
+
}
|
|
354
|
+
for (let i = 0; i < resUserfiles.data.length; i++) {
|
|
355
|
+
data = {
|
|
356
|
+
tablename: 't_gasbrand',
|
|
357
|
+
condition: `id=${resUserfiles.data[i].f_gasbrand_id}`
|
|
358
|
+
}
|
|
359
|
+
http = new HttpResetClass()
|
|
360
|
+
let resGasbrand = await http.load('POST', 'rs/sql/applysingleTable', {data: data}, {
|
|
361
|
+
resolveMsg: null,
|
|
362
|
+
rejectMsg: '获取档案信息失败'
|
|
363
|
+
})
|
|
364
|
+
|
|
365
|
+
data = {
|
|
366
|
+
tablename: 't_gasmodel',
|
|
367
|
+
condition: `id=${resUserfiles.data[i].f_gasmodel_id}`
|
|
368
|
+
}
|
|
369
|
+
http = new HttpResetClass()
|
|
370
|
+
let resModel = await http.load('POST', 'rs/sql/applysingleTable', {data: data}, {
|
|
371
|
+
resolveMsg: null,
|
|
372
|
+
rejectMsg: '获取档案信息失败'
|
|
373
|
+
})
|
|
374
|
+
self.model.rows.push({
|
|
375
|
+
f_user_id: resUserfiles.data[i].f_user_id,
|
|
376
|
+
f_userinfo_id: resUserfiles.data[i].f_userinfo_id,
|
|
377
|
+
f_meternumber: resUserfiles.data[i].f_meternumber,
|
|
378
|
+
f_meter_brand: resGasbrand.data[0].f_meter_brand,
|
|
379
|
+
f_meter_style: resModel.data[0].f_meter_style
|
|
380
|
+
})
|
|
381
|
+
self.params = self.model.rows
|
|
382
|
+
}
|
|
383
|
+
}
|
|
384
|
+
}else if (self.key == '设备管理') {
|
|
385
|
+
for (var i = 0; i < res.data.length; i++) {
|
|
386
|
+
data = {
|
|
387
|
+
tablename: 't_devices',
|
|
388
|
+
condition: 'f_process_id=' + '\'' + String(this.selectdata.f_process_id) + '\''
|
|
389
|
+
}// eqBodyData: ['f_userinfo_id', 'f_devices_no', 'f_devices_type', 'f_brand','f_devices_model','f_devices_num'],
|
|
390
|
+
this.$resetpost('rs/sql/applysingleTable', {data: data}, {resolveMsg: null, rejectMsg: '查询失败'})
|
|
391
|
+
.then((dev) => {
|
|
392
|
+
self.model.rows.push({
|
|
393
|
+
f_userinfo_id: res.data[i].f_userinfo_id,
|
|
394
|
+
f_devices_no: dev.data[0].f_devices_no,
|
|
395
|
+
f_devices_type: dev.data[0].f_devices_type,
|
|
396
|
+
f_brand: dev.data[0].f_brand,
|
|
397
|
+
f_devices_model: dev.data[0].f_devices_model,
|
|
398
|
+
f_devices_num: dev.data[0].f_devices_num,
|
|
399
|
+
})
|
|
400
|
+
//self.model.rows = dev.data
|
|
401
|
+
})
|
|
402
|
+
}
|
|
403
|
+
}
|
|
404
|
+
},
|
|
405
|
+
impexcel() {
|
|
406
|
+
this.showFile = true
|
|
407
|
+
},
|
|
408
|
+
closeFile() {
|
|
409
|
+
this.showFile = false
|
|
410
|
+
// 将选的文件清空
|
|
411
|
+
this.$refs.file.$el.querySelector('input').value = ''
|
|
412
|
+
},
|
|
413
|
+
async deleteItem(row) {
|
|
414
|
+
if (this.key == '户档案管理') {
|
|
415
|
+
this.$showMessage('删除后不可恢复,确认删除吗?', ['confirm', 'cancel']).then((res) => {
|
|
416
|
+
if (res === 'confirm') {
|
|
417
|
+
let http = new HttpResetClass()
|
|
418
|
+
http.load('DELETE', `rs/entity/t_userinfo/${row.f_userinfo_id}`).then((ress) => {
|
|
419
|
+
this.load()
|
|
420
|
+
})
|
|
421
|
+
}
|
|
422
|
+
})
|
|
423
|
+
} else {
|
|
424
|
+
this.$showMessage('删除后不可恢复,确认删除吗?', ['confirm', 'cancel']).then((res) => {
|
|
425
|
+
if (res === 'confirm') {
|
|
426
|
+
let http = new HttpResetClass()
|
|
427
|
+
http.load('DELETE', `rs/entity/t_userfiles/${row.f_user_id}`).then((ress) => {
|
|
428
|
+
this.load()
|
|
429
|
+
})
|
|
430
|
+
}
|
|
431
|
+
})
|
|
432
|
+
}
|
|
433
|
+
},
|
|
434
|
+
//户档案查询
|
|
435
|
+
filterParams(param) {
|
|
436
|
+
if (param && param !== "") {
|
|
437
|
+
let temp = []
|
|
438
|
+
for (var i = 0; i < this.model.rows.length; i++) {
|
|
439
|
+
if (this.model.rows[i].f_user_name.includes(param)) {
|
|
440
|
+
temp.push(this.model.rows[i])
|
|
441
|
+
}
|
|
442
|
+
}
|
|
443
|
+
this.model.rows = temp
|
|
444
|
+
} else {
|
|
445
|
+
this.model.rows = this.params
|
|
446
|
+
}
|
|
447
|
+
},
|
|
448
|
+
//表档案查询
|
|
449
|
+
filterParam(param) {
|
|
450
|
+
if (param && param !== "") {
|
|
451
|
+
let temp = []
|
|
452
|
+
for (var i = 0; i < this.model.rows.length; i++) {
|
|
453
|
+
if (this.model.rows[i].f_meter_brand.includes(param)) {
|
|
454
|
+
temp.push(this.model.rows[i])
|
|
455
|
+
}
|
|
456
|
+
}
|
|
457
|
+
this.model.rows = temp
|
|
458
|
+
} else {
|
|
459
|
+
this.model.rows = this.params
|
|
460
|
+
}
|
|
461
|
+
},
|
|
462
|
+
//设备列表查询
|
|
463
|
+
findEq(param) {
|
|
464
|
+
if (param && param !== "") {
|
|
465
|
+
let temp = []
|
|
466
|
+
for (var i = 0; i < this.model.rows.length; i++) {
|
|
467
|
+
if (this.model.rows[i].f_meter_brand.includes(param)) {
|
|
468
|
+
temp.push(this.model.rows[i])
|
|
469
|
+
}
|
|
470
|
+
}
|
|
471
|
+
this.model.rows = temp
|
|
472
|
+
} else {
|
|
473
|
+
this.model.rows = this.params
|
|
474
|
+
}
|
|
475
|
+
},
|
|
476
|
+
add() {
|
|
477
|
+
this.show = true
|
|
478
|
+
console.log("点击了添加")
|
|
479
|
+
},
|
|
480
|
+
// 修改按钮
|
|
481
|
+
modifyParam(row) {
|
|
482
|
+
this.$set('selectItem.f_userinfo_id', row.f_userinfo_id)
|
|
483
|
+
this.$set('selectItem.f_user_name', row.f_user_name)
|
|
484
|
+
this.$set('selectItem.f_user_phone', row.f_user_phone)
|
|
485
|
+
this.$set('selectItem.f_area', row.f_area)
|
|
486
|
+
this.$set('selectItem.f_slice_area', row.f_slice_area)
|
|
487
|
+
this.$set('selectItem.f_street', row.f_street)
|
|
488
|
+
this.$set('selectItem.f_residential_area', row.f_residential_area)
|
|
489
|
+
this.$set('selectItem.f_building', row.f_building)
|
|
490
|
+
this.$set('selectItem.f_unit', row.f_unit)
|
|
491
|
+
this.$set('selectItem.f_floor', row.f_floor)
|
|
492
|
+
this.$set('selectItem.f_room', row.f_room)
|
|
493
|
+
this.$set('selectItem.f_user_type', row.f_user_type)
|
|
494
|
+
this.$set('selectItem.f_gasproperties', row.f_gasproperties)
|
|
495
|
+
this.$set('selectItem.f_user_state', row.f_user_state)
|
|
496
|
+
this.$set('selectItem.version', row.version)
|
|
497
|
+
this.$set('selectItem.f_user_state', row.f_user_state)
|
|
498
|
+
this.show = true
|
|
499
|
+
},
|
|
500
|
+
//获取当前用户表档案信息
|
|
501
|
+
/* getUserFiles(row) {
|
|
502
|
+
this.isShowFiles = true
|
|
503
|
+
console.log('获取户档案信息')
|
|
504
|
+
|
|
505
|
+
data = {
|
|
506
|
+
tablename: 't_userfiles',
|
|
507
|
+
condition: `f_userinfo_id=${row.f_userinfo_id}`
|
|
508
|
+
}
|
|
509
|
+
http = new HttpResetClass()
|
|
510
|
+
let resGasbrand = http.load('POST', 'rs/sql/applysingleTable', {data: data}, {
|
|
511
|
+
resolveMsg: null,
|
|
512
|
+
rejectMsg: '获取档案信息失败'
|
|
513
|
+
})
|
|
514
|
+
self.model.rows = []
|
|
515
|
+
self.model.rows = res.data
|
|
516
|
+
},*/
|
|
517
|
+
//表档案修改
|
|
518
|
+
filesModify(row) {
|
|
519
|
+
this.$set('selectItem.f_userinfo_id', row.f_userinfo_id)
|
|
520
|
+
this.$set('selectItem.f_user_id', row.f_user_id)
|
|
521
|
+
this.$set('selectItem.f_meter_brand', row.f_meter_brand)
|
|
522
|
+
this.$set('selectItem.f_meter_style', row.f_meter_style)
|
|
523
|
+
this.$set('selectItem.f_meternumber', row.f_meternumber)
|
|
524
|
+
this.show = true
|
|
525
|
+
},
|
|
526
|
+
//新增修改或删除提交
|
|
527
|
+
async confirm() {
|
|
528
|
+
var _this = this
|
|
529
|
+
if (this.key == '户档案管理') {
|
|
530
|
+
// 无主键为插入
|
|
531
|
+
if (!this.selectItem.f_userinfo_id) {
|
|
532
|
+
this.selectItem.version = 1
|
|
533
|
+
this.selectItem.f_user_state = '报建'
|
|
534
|
+
this.selectItem.f_process_id = this.selectdata.f_process_id
|
|
535
|
+
let data = {
|
|
536
|
+
tablename: 't_userinfo',
|
|
537
|
+
parameters: this.selectItem
|
|
538
|
+
}
|
|
539
|
+
let http = new HttpResetClass()
|
|
540
|
+
await http.load('POST', 'rs/entity/t_userinfo', this.selectItem).then((res) => {
|
|
541
|
+
this.show = false
|
|
542
|
+
// 如果没有id,需要在数组中添加
|
|
543
|
+
this.load()
|
|
544
|
+
this.selectItem = {}
|
|
545
|
+
})
|
|
546
|
+
} else { // 有主键为更新
|
|
547
|
+
let data = {
|
|
548
|
+
tablename: 't_userinfo',
|
|
549
|
+
parameters: this.selectItem
|
|
550
|
+
}
|
|
551
|
+
let http = new HttpResetClass()
|
|
552
|
+
await http.load('POST', 'rs/entity/t_userinfo', this.selectItem).then((res) => {
|
|
553
|
+
this.show = false
|
|
554
|
+
// 如果没有id,需要在数组中添加
|
|
555
|
+
this.load()
|
|
556
|
+
this.selectItem = {}
|
|
557
|
+
})
|
|
558
|
+
}
|
|
559
|
+
} else if (this.key == '表档案管理') {
|
|
560
|
+
if (!this.selectItem.f_user_id) {
|
|
561
|
+
//新增
|
|
562
|
+
//根据户档案编号查询户档案
|
|
563
|
+
let http = new HttpResetClass()
|
|
564
|
+
await http.load('POST', 'rs/sql/findUserInfo', {
|
|
565
|
+
data: {
|
|
566
|
+
f_userinfo_id: this.selectItem.f_userinfo_id,
|
|
567
|
+
process_id: this.selectdata.f_process_id
|
|
568
|
+
}
|
|
569
|
+
}).then((res) => {
|
|
570
|
+
if (res.data != null && res.data.length > 0) {
|
|
571
|
+
//判断重复
|
|
572
|
+
http = new HttpResetClass()
|
|
573
|
+
http.load('POST', 'rs/sql/findFilesByUserId', {data: {f_userinfo_id: _this.selectItem.f_userinfo_id}}).then((res) => {
|
|
574
|
+
if (res.data.length > 0) {
|
|
575
|
+
this.$showMessage("该户档案编号的表档案已存在!")
|
|
576
|
+
return
|
|
577
|
+
}
|
|
578
|
+
//根据提交的气表品牌、表型号分别查询对应的表具信息
|
|
579
|
+
let data = {
|
|
580
|
+
tablename: 't_gasbrand',
|
|
581
|
+
condition: `f_meter_brand= '${_this.selectItem.f_meter_brand}'`
|
|
582
|
+
}
|
|
583
|
+
http = new HttpResetClass()
|
|
584
|
+
http.load('POST', 'rs/sql/applysingleTable', {data: data}).then((res) => {
|
|
585
|
+
if (res.data.length > 0) {
|
|
586
|
+
//表型号
|
|
587
|
+
data = {
|
|
588
|
+
tablename: 't_gasmodel',
|
|
589
|
+
condition: `f_meter_style= '${_this.selectItem.f_meter_style}'`
|
|
590
|
+
}
|
|
591
|
+
http = new HttpResetClass()
|
|
592
|
+
http.load('POST', 'rs/sql/applysingleTable', {data: data}).then((re) => {
|
|
593
|
+
if (re.data.length > 0) {
|
|
594
|
+
this.selectItem.version = 1
|
|
595
|
+
this.selectItem.f_table_state = '正常'
|
|
596
|
+
this.selectItem.f_gasbrand_id = res.data[0].id
|
|
597
|
+
this.selectItem.f_gasmodel_id = re.data[0].id
|
|
598
|
+
data = {
|
|
599
|
+
tablename: 't_userfiles',
|
|
600
|
+
parameters: this.selectItem
|
|
601
|
+
}
|
|
602
|
+
http = new HttpResetClass()
|
|
603
|
+
http.load('POST', 'rs/entity/t_userfiles', _this.selectItem, {
|
|
604
|
+
resolveMsg: null,
|
|
605
|
+
rejectMsg: null,
|
|
606
|
+
}).then((res) => {
|
|
607
|
+
this.show = false
|
|
608
|
+
// 如果没有id,需要在数组中添加
|
|
609
|
+
this.load()
|
|
610
|
+
this.selectItem = {}
|
|
611
|
+
})
|
|
612
|
+
}
|
|
613
|
+
})
|
|
614
|
+
} else {
|
|
615
|
+
this.$showMessage("表品牌信息错误!")
|
|
616
|
+
return
|
|
617
|
+
}
|
|
618
|
+
})
|
|
619
|
+
})
|
|
620
|
+
} else {
|
|
621
|
+
this.$showMessage("该编号户档案不存在,请先添加户档案")
|
|
622
|
+
return
|
|
623
|
+
}
|
|
624
|
+
})
|
|
625
|
+
} else {
|
|
626
|
+
//根据提交的气表品牌、表型号分别查询对应的表具信息
|
|
627
|
+
let data = {
|
|
628
|
+
tablename: 't_gasbrand',
|
|
629
|
+
condition: `f_meter_brand= '${this.selectItem.f_meter_brand}'`
|
|
630
|
+
}
|
|
631
|
+
let http = new HttpResetClass()
|
|
632
|
+
http.load('POST', 'rs/sql/applysingleTable', {data: data}).then((res) => {
|
|
633
|
+
if (res.data.length > 0) {
|
|
634
|
+
//表型号
|
|
635
|
+
data = {
|
|
636
|
+
tablename: 't_gasmodel',
|
|
637
|
+
condition: `f_meter_style= '${this.selectItem.f_meter_style}'`
|
|
638
|
+
}
|
|
639
|
+
http = new HttpResetClass()
|
|
640
|
+
http.load('POST', 'rs/sql/applysingleTable', {data: data}).then((re) => {
|
|
641
|
+
if (re.data.length > 0) {
|
|
642
|
+
this.selectItem.f_gasbrand_id = res.data[0].id
|
|
643
|
+
this.selectItem.f_gasmodel_id = re.data[0].id
|
|
644
|
+
data = {
|
|
645
|
+
tablename: 't_userfiles',
|
|
646
|
+
parameters: this.selectItem
|
|
647
|
+
}
|
|
648
|
+
let http = new HttpResetClass()
|
|
649
|
+
http.load('POST', 'rs/entity/t_userfiles', this.selectItem, {
|
|
650
|
+
resolveMsg: null,
|
|
651
|
+
rejectMsg: null,
|
|
652
|
+
}).then((res) => {
|
|
653
|
+
this.show = false
|
|
654
|
+
// 如果没有id,需要在数组中添加
|
|
655
|
+
this.load()
|
|
656
|
+
this.selectItem = {}
|
|
657
|
+
})
|
|
658
|
+
}
|
|
659
|
+
})
|
|
660
|
+
} else {
|
|
661
|
+
this.$showMessage("表品牌信息错误!")
|
|
662
|
+
return
|
|
663
|
+
}
|
|
664
|
+
})
|
|
665
|
+
}
|
|
666
|
+
}
|
|
667
|
+
},
|
|
668
|
+
|
|
669
|
+
// 关闭模态框
|
|
670
|
+
close() {
|
|
671
|
+
this.show = false
|
|
672
|
+
this.selectItem = {}
|
|
673
|
+
},
|
|
674
|
+
},
|
|
675
|
+
events: {
|
|
676
|
+
async onFileUpload(file, res) {
|
|
677
|
+
if (!this.selectdata.f_process_id) {
|
|
678
|
+
this.$showMessage("数据异常,导入失败")
|
|
679
|
+
return
|
|
680
|
+
}
|
|
681
|
+
//户档案导入
|
|
682
|
+
if (this.key == '户档案管理') {
|
|
683
|
+
let data = {
|
|
684
|
+
tablename: 't_userinfo',
|
|
685
|
+
filepath: res.f_downloadpath,
|
|
686
|
+
f_process_id: this.selectdata.f_process_id,
|
|
687
|
+
f_key: this.$login.f.f_orgids,
|
|
688
|
+
f_operator: this.$login.f.name,
|
|
689
|
+
f_filiale: this.$login.f.f_fengongsi,
|
|
690
|
+
f_outlets: this.$login.f.f_parentname,
|
|
691
|
+
f_orgstr: this.$login.f.orgpathstr,
|
|
692
|
+
f_filialeids: this.$login.f.f_orgids,
|
|
693
|
+
f_filialeid: this.$login.f.f_orgids.split('.')[this.$login.f.f_orgids.split('.').length - 2] + '.'
|
|
694
|
+
}
|
|
695
|
+
let http2 = new HttpResetClass()
|
|
696
|
+
await http2.load('POST', 'rs/logic/recordImport', data, {
|
|
697
|
+
resolveMsg: "导入成功!",
|
|
698
|
+
rejectMsg: "导入失败!",
|
|
699
|
+
}).then((res) => {
|
|
700
|
+
this.load()
|
|
701
|
+
this.closeFile()
|
|
702
|
+
})
|
|
703
|
+
}
|
|
704
|
+
//表档案导入
|
|
705
|
+
if (this.key == '表档案管理') {
|
|
706
|
+
let data = {
|
|
707
|
+
tablename: 't_userfiles',
|
|
708
|
+
filepath: res.f_downloadpath,
|
|
709
|
+
f_process_id: this.selectdata.f_process_id,
|
|
710
|
+
f_key: this.$login.f.f_orgids,
|
|
711
|
+
f_operator: this.$login.f.name,
|
|
712
|
+
f_filiale: this.$login.f.f_fengongsi,
|
|
713
|
+
f_outlets: this.$login.f.f_parentname,
|
|
714
|
+
f_orgstr: this.$login.f.orgpathstr,
|
|
715
|
+
f_filialeids: this.$login.f.f_orgids,
|
|
716
|
+
f_filialeid: this.$login.f.f_orgids.split('.')[this.$login.f.f_orgids.split('.').length - 2] + '.'
|
|
717
|
+
}
|
|
718
|
+
let http2 = new HttpResetClass()
|
|
719
|
+
await http2.load('POST', 'rs/logic/grandImport', data, {
|
|
720
|
+
resolveMsg: null,
|
|
721
|
+
rejectMsg: '上传失败'
|
|
722
|
+
}).then((res) => {
|
|
723
|
+
console.log(">>>>>>>>>>>", res)
|
|
724
|
+
this.load()
|
|
725
|
+
this.closeFile()
|
|
726
|
+
if (res.data.msg != null && res.data.msg != "") {
|
|
727
|
+
this.$showMessage(res.data.msg)
|
|
728
|
+
} else if (res.data.userIds.length > 0) {
|
|
729
|
+
this.$showMessage("以下编号的户档案不存在,请先添加户档案再添加表档案:" + res.data.userIds.toString())
|
|
730
|
+
} else if (res.data.reuserIds.length > 0) {
|
|
731
|
+
this.$showMessage("以下户档案编号的表档案已存在,请删除后重新导入:" + res.data.reuserIds.toString())
|
|
732
|
+
} else {
|
|
733
|
+
this.$showMessage("导入成功!")
|
|
734
|
+
}
|
|
735
|
+
})
|
|
736
|
+
}
|
|
737
|
+
}
|
|
738
|
+
}
|
|
739
|
+
}
|
|
740
|
+
</script>
|
|
741
|
+
<style>
|
|
742
|
+
.recordTable table tr th {
|
|
743
|
+
font-weight: bold;
|
|
744
|
+
}
|
|
745
|
+
|
|
746
|
+
.recordTable table tr:hover {
|
|
747
|
+
background-color: rgb(230, 230, 230);
|
|
748
|
+
}
|
|
749
|
+
</style>
|