apply-clients 7.1.34 → 7.1.35
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/index.html +30 -30
- package/package.json +1 -1
- package/src/apply.js +69 -69
- package/src/components/product/Function/InstallFunction.vue +147 -147
- package/src/components/product/Function/InstallInfoSelect.vue +281 -281
- package/src/components/product/Process/ExplorationSelect.vue +347 -347
- package/src/components/product/Process/ExplorationUser.vue +4 -1
- package/src/components/product/Process/Processes/InstallationDetails.vue +484 -484
- package/src/components/product/Process/Processes/addressAndUserinfoManagement.vue +261 -249
- package/src/components/product/Process/Processes/chargeManagement.vue +562 -562
- package/src/components/product/Process/Service/ServiceControl.vue +856 -856
- package/src/components/product/ReportForm/GasIgnitionSummary.vue +352 -352
- package/src/components/product/ServiceView.vue +755 -755
- package/src/components/product/Supervisory/SupervisoryControl.vue +121 -121
- package/src/components/product/Supervisory/SupervisoryList.vue +208 -208
- package/src/components/product/Supervisory/SupervisoryhCart.vue +103 -103
|
@@ -1,484 +1,484 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<div class="col-sm-12" style="margin: 20px 0px;">
|
|
3
|
-
|
|
4
|
-
<data-grid :model="model" v-ref:grid class="list_area table_sy" style="padding: 0px">
|
|
5
|
-
<template partial='head'>
|
|
6
|
-
<tr>
|
|
7
|
-
<th>序号</th>
|
|
8
|
-
<th>客户编号</th>
|
|
9
|
-
<th>客户名称</th>
|
|
10
|
-
<th>客户电话</th>
|
|
11
|
-
<th>地址信息</th>
|
|
12
|
-
<th>表具数量</th>
|
|
13
|
-
<!-- <th v-if="$parent.$parent.selectdata.f_apply_type === '散户集体报建' || $parent.$parent.selectdata.f_apply_type === '煤改气报建'">单价(户)</th>-->
|
|
14
|
-
<!-- <th v-if="$parent.$parent.selectdata.f_apply_type === '散户集体报建' || $parent.$parent.selectdata.f_apply_type === '煤改气报建'">累计缴费</th>-->
|
|
15
|
-
<th>
|
|
16
|
-
<button type="button" class="btn btn-info head-but"
|
|
17
|
-
:disabled="$parent.$parent.mark === 1"
|
|
18
|
-
@click="$parent.$parent.showFile = !$parent.$parent.showFile">导入</button>
|
|
19
|
-
<a type="button" class="btn btn-info head-but"
|
|
20
|
-
href="/applyinstall/Excel/v3报装表具批量导入.xlsx" download>模板下载</a>
|
|
21
|
-
操作
|
|
22
|
-
</th>
|
|
23
|
-
</tr>
|
|
24
|
-
</template>
|
|
25
|
-
<template partial='body'>
|
|
26
|
-
<tr>
|
|
27
|
-
<td style="text-align: center;">
|
|
28
|
-
<nobr>{{$index+1}}</nobr>
|
|
29
|
-
</td>
|
|
30
|
-
<td style="text-align: center;">
|
|
31
|
-
<nobr>{{row.f_userinfo_code}}</nobr>
|
|
32
|
-
</td>
|
|
33
|
-
<td style="text-align: center;">
|
|
34
|
-
<nobr>{{row.f_user_name}}</nobr>
|
|
35
|
-
</td>
|
|
36
|
-
<td style="text-align: center;">
|
|
37
|
-
<nobr>{{row.f_user_phone}}</nobr>
|
|
38
|
-
</td>
|
|
39
|
-
<td style="text-align: center;">
|
|
40
|
-
<nobr>{{row.f_address}}</nobr>
|
|
41
|
-
</td>
|
|
42
|
-
<td style="text-align: center;">
|
|
43
|
-
<nobr>{{row.f_userfiles_num === null ? 0 : row.f_userfiles_num}}</nobr>
|
|
44
|
-
</td>
|
|
45
|
-
<!-- <td style="text-align: center;"-->
|
|
46
|
-
<!-- v-if="$parent.$parent.selectdata.f_apply_type === '散户集体报建' || $parent.$parent.selectdata.f_apply_type === '煤改气报建'"-->
|
|
47
|
-
<!-- >-->
|
|
48
|
-
<!-- <nobr>{{$parent.$parent.selectdata.f_price}}</nobr>-->
|
|
49
|
-
<!-- </td>-->
|
|
50
|
-
<!-- <td style="text-align: center;"-->
|
|
51
|
-
<!-- v-if="$parent.$parent.selectdata.f_apply_type === '散户集体报建' || $parent.$parent.selectdata.f_apply_type === '煤改气报建'"-->
|
|
52
|
-
<!-- >-->
|
|
53
|
-
<!-- <nobr>{{row.f_cumulative_payment_money}}</nobr>-->
|
|
54
|
-
<!-- </td>-->
|
|
55
|
-
<td style="text-align: center;">
|
|
56
|
-
<nobr>
|
|
57
|
-
<button
|
|
58
|
-
type="button"
|
|
59
|
-
name="button"
|
|
60
|
-
class="btn btn-link"
|
|
61
|
-
:disabled="(row.f_cumulative_payment_money < $parent.$parent.selectdata.f_price && ($parent.$parent.selectdata.f_apply_type === '散户集体报建' || $parent.$parent.selectdata.f_apply_type === '煤改气报建')) || $parent.$parent.mark === 1"
|
|
62
|
-
@click="$parent.$parent.showUserFileModal(row)">
|
|
63
|
-
{{row.f_userfiles_num > 0 ? '修正' : '添加'}}
|
|
64
|
-
</button>
|
|
65
|
-
</nobr>
|
|
66
|
-
</td>
|
|
67
|
-
</tr>
|
|
68
|
-
</template>
|
|
69
|
-
</data-grid>
|
|
70
|
-
</div>
|
|
71
|
-
<modal v-if="showFile" :show.sync="showFile" v-ref:modal :backdrop="false" title="选择文件">
|
|
72
|
-
<header slot="modal-header" class="modal-header">
|
|
73
|
-
<button type="button" class="close" @click="closeFile"><span>×</span></button>
|
|
74
|
-
<h4 class="modal-title">选择文件</h4>
|
|
75
|
-
</header>
|
|
76
|
-
<article slot="modal-body" class="modal-body">
|
|
77
|
-
<div class="form-group">
|
|
78
|
-
<file-upload class="my-file-uploader" name="useraddressUploadFile" action="rs/file/uploadFile" tagname="确定" multiple v-ref:file></file-upload>
|
|
79
|
-
</div>
|
|
80
|
-
</article>
|
|
81
|
-
<footer slot="modal-footer" class="modal-footer"></footer>
|
|
82
|
-
</modal>
|
|
83
|
-
|
|
84
|
-
<modal v-if="showUserFile" :show.sync="showUserFile" v-ref:modal :large="true" :backdrop="false" title="安装明细">
|
|
85
|
-
<header slot="modal-header" class="modal-header">
|
|
86
|
-
<button type="button" class="close" @click="closeUserFile"><span>×</span></button>
|
|
87
|
-
<h4 class="modal-title">安装明细</h4>
|
|
88
|
-
</header>
|
|
89
|
-
<article slot="modal-body" class="modal-body clearfix">
|
|
90
|
-
<div class="form-group col-sm-12">
|
|
91
|
-
<label class="col-sm-2 control-label">地址信息:</label>
|
|
92
|
-
<div class="col-sm-10">
|
|
93
|
-
<input class="form-control input_view" style=""
|
|
94
|
-
v-model="useradders.f_address"
|
|
95
|
-
:value="useradders.f_address"
|
|
96
|
-
:readonly="true"/>
|
|
97
|
-
</div>
|
|
98
|
-
</div>
|
|
99
|
-
|
|
100
|
-
<div v-for="(i, item) in userinfo.userfiles" class="form-group col-sm-12 panel panel-info">
|
|
101
|
-
<div class="panel-heading head" style="background-color: #e8f4ff;margin-bottom: 10px">表具{{$index+1}}信息</div>
|
|
102
|
-
<div class="form-group col-sm-6" :class="item.f_gasbrand_id ? '':'has-error'">
|
|
103
|
-
<label class="col-sm-4 control-label">气表品牌:</label>
|
|
104
|
-
<div class="col-sm-8">
|
|
105
|
-
<input-select
|
|
106
|
-
class="select select_list"
|
|
107
|
-
:value.sync="item.gasbrand"
|
|
108
|
-
v-model="item.gasbrand"
|
|
109
|
-
:options="meterbrands"
|
|
110
|
-
@change="gasbrandChange(i)"
|
|
111
|
-
:valueSingle="true"></input-select>
|
|
112
|
-
</div>
|
|
113
|
-
</div>
|
|
114
|
-
<div class="form-group col-sm-6" :class="item.f_gasmodel_id ? '':'has-error'">
|
|
115
|
-
<label class="col-sm-4 control-label">气表型号:</label>
|
|
116
|
-
<div class="col-sm-8">
|
|
117
|
-
<input-select
|
|
118
|
-
class="select select_list"
|
|
119
|
-
:value.sync="item.gasmodel"
|
|
120
|
-
v-model="item.gasmodel"
|
|
121
|
-
:options="item.gasbrand.gasmodel"
|
|
122
|
-
@change="gasmodelChange(i)"
|
|
123
|
-
:valueSingle="true"></input-select>
|
|
124
|
-
</div>
|
|
125
|
-
</div>
|
|
126
|
-
<div class="form-group col-sm-6" :class="item.f_meternumber ? '':'has-error'">
|
|
127
|
-
<label class="col-sm-4 control-label">表号:</label>
|
|
128
|
-
<div class="col-sm-8">
|
|
129
|
-
<input class="form-control input_view" style=""
|
|
130
|
-
placeholder="表号"
|
|
131
|
-
v-model="item.f_meternumber"
|
|
132
|
-
:value="item.f_meternumber"
|
|
133
|
-
@change="meternumberValidate(i)"
|
|
134
|
-
:readonly="false"/>
|
|
135
|
-
</div>
|
|
136
|
-
</div>
|
|
137
|
-
<div class="form-group col-sm-6">
|
|
138
|
-
<label class="col-sm-4 control-label">表封号:</label>
|
|
139
|
-
<div class="col-sm-8">
|
|
140
|
-
<input class="form-control input_view" style=""
|
|
141
|
-
placeholder="表封号"
|
|
142
|
-
v-model="item.f_metertitles"
|
|
143
|
-
:value="item.f_metertitles"
|
|
144
|
-
:readonly="false"/>
|
|
145
|
-
</div>
|
|
146
|
-
</div>
|
|
147
|
-
<div class="form-group col-sm-6">
|
|
148
|
-
<label class="col-sm-4 control-label">表读数:</label>
|
|
149
|
-
<div class="col-sm-8">
|
|
150
|
-
<input class="form-control input_view" style=""
|
|
151
|
-
type="number"
|
|
152
|
-
placeholder="表读数"
|
|
153
|
-
v-model="item.f_meter_base"
|
|
154
|
-
:value="item.f_meter_base"
|
|
155
|
-
:readonly="false"/>
|
|
156
|
-
</div>
|
|
157
|
-
</div>
|
|
158
|
-
<div class="form-group col-sm-6">
|
|
159
|
-
<label class="col-sm-4 control-label">初始底数:</label>
|
|
160
|
-
<div class="col-sm-8">
|
|
161
|
-
<input class="form-control input_view" style=""
|
|
162
|
-
type="number"
|
|
163
|
-
v-model="item.f_initial_base"
|
|
164
|
-
:value="item.f_initial_base"
|
|
165
|
-
placeholder="初始底数"
|
|
166
|
-
:readonly="false"/>
|
|
167
|
-
</div>
|
|
168
|
-
</div>
|
|
169
|
-
<div class="form-group col-sm-6">
|
|
170
|
-
<label class="col-sm-4 control-label">表向:</label>
|
|
171
|
-
<div class="col-sm-8">
|
|
172
|
-
<input-select
|
|
173
|
-
class="select select_list"
|
|
174
|
-
:value.sync="item.f_aroundmeter"
|
|
175
|
-
v-model="item.f_aroundmeter"
|
|
176
|
-
:options="aroundmeters"
|
|
177
|
-
:valueSingle="true"></input-select>
|
|
178
|
-
</div>
|
|
179
|
-
</div>
|
|
180
|
-
<div class="form-group col-sm-6">
|
|
181
|
-
<label class="col-sm-4 control-label">安装位置:</label>
|
|
182
|
-
<div class="col-sm-8">
|
|
183
|
-
<input-select
|
|
184
|
-
class="select select_list"
|
|
185
|
-
:value.sync="item.f_position"
|
|
186
|
-
v-model="item.f_position"
|
|
187
|
-
:options="positions"
|
|
188
|
-
:valueSingle="true"></input-select>
|
|
189
|
-
</div>
|
|
190
|
-
</div>
|
|
191
|
-
<div class="form-group col-sm-6">
|
|
192
|
-
<label class="col-sm-4 control-label">安装人:</label>
|
|
193
|
-
<div class="col-sm-8">
|
|
194
|
-
<input-select
|
|
195
|
-
class="select select_list"
|
|
196
|
-
:value.sync="item.f_install_person"
|
|
197
|
-
v-model="item.f_install_person"
|
|
198
|
-
:options="installperson"
|
|
199
|
-
:valueSingle="true"></input-select>
|
|
200
|
-
</div>
|
|
201
|
-
</div>
|
|
202
|
-
<div class="form-group col-sm-6">
|
|
203
|
-
<label class="col-sm-4 control-label">安装日期:</label>
|
|
204
|
-
<div class="col-sm-8">
|
|
205
|
-
<datepicker
|
|
206
|
-
placeholder="安装日期"
|
|
207
|
-
:value.sync="item.f_install_date"
|
|
208
|
-
v-model="item.f_install_date"
|
|
209
|
-
format="yyyy-MM-dd HH:mm:ss"
|
|
210
|
-
:show-reset-button="reset">
|
|
211
|
-
</datepicker>
|
|
212
|
-
</div>
|
|
213
|
-
</div>
|
|
214
|
-
</div>
|
|
215
|
-
|
|
216
|
-
</article>
|
|
217
|
-
<footer slot="modal-footer" class="modal-footer">
|
|
218
|
-
<!-- 去除一户多表 -->
|
|
219
|
-
<button type="button" class="btn btn-primary" @click="addUserFile" v-if="false">添加表具</button>
|
|
220
|
-
<button type="button" class="btn btn-primary" @click="saveUserFile">确认</button>
|
|
221
|
-
</footer>
|
|
222
|
-
</modal>
|
|
223
|
-
</template>
|
|
224
|
-
<script>
|
|
225
|
-
import Vue from 'vue'
|
|
226
|
-
import {PagedList} from 'vue-client'
|
|
227
|
-
import {HttpResetClass} from 'vue-client'
|
|
228
|
-
import {isEmpty} from '../../../Util'
|
|
229
|
-
|
|
230
|
-
export default {
|
|
231
|
-
title: '安装明细',
|
|
232
|
-
props: {
|
|
233
|
-
selectdata: {
|
|
234
|
-
type: Object
|
|
235
|
-
},
|
|
236
|
-
mark: {
|
|
237
|
-
type: Number,
|
|
238
|
-
default: 0
|
|
239
|
-
}
|
|
240
|
-
},
|
|
241
|
-
data () {
|
|
242
|
-
return {
|
|
243
|
-
showFile: false,
|
|
244
|
-
showUserFile: false,
|
|
245
|
-
model: {
|
|
246
|
-
data: null
|
|
247
|
-
},
|
|
248
|
-
meterbrands: [], // 气表品牌
|
|
249
|
-
useradders: null,
|
|
250
|
-
userinfo: {}
|
|
251
|
-
}
|
|
252
|
-
},
|
|
253
|
-
ready () {
|
|
254
|
-
this.search()
|
|
255
|
-
this.getMeterbrands()
|
|
256
|
-
},
|
|
257
|
-
methods: {
|
|
258
|
-
// 保存档案
|
|
259
|
-
async saveUserFile() {
|
|
260
|
-
if (this.userinfo.userfiles.length > 1) {
|
|
261
|
-
this.$showAlert('该地址下已有表具信息,暂不支持一户多表!!!', 'warning', 3000)
|
|
262
|
-
return
|
|
263
|
-
}
|
|
264
|
-
// 检查必填项
|
|
265
|
-
for (let i = 0; i < this.userinfo.userfiles.length; i++) {
|
|
266
|
-
let userfile = this.userinfo.userfiles[i]
|
|
267
|
-
if (userfile.f_gasbrand_id === null || userfile.f_gasbrand_id === '') {
|
|
268
|
-
this.$showAlert(`表具${i+1}气表品牌没有选择!!!`, 'warning', 3000)
|
|
269
|
-
return
|
|
270
|
-
}
|
|
271
|
-
if (userfile.f_gasmodel_id === null || userfile.f_gasmodel_id === '') {
|
|
272
|
-
this.$showAlert(`表具${i+1}气表型号没有选择!!!`, 'warning', 3000)
|
|
273
|
-
return
|
|
274
|
-
}
|
|
275
|
-
if (userfile.f_meternumber === null || userfile.f_meternumber === '') {
|
|
276
|
-
this.$showAlert(`表具${i+1}表号没有填写!!!`, 'warning', 3000)
|
|
277
|
-
return
|
|
278
|
-
}
|
|
279
|
-
}
|
|
280
|
-
let data = {
|
|
281
|
-
user: this.$login.f,
|
|
282
|
-
useradders: this.useradders,
|
|
283
|
-
userinfo: this.userinfo,
|
|
284
|
-
selectdata: this.selectdata
|
|
285
|
-
}
|
|
286
|
-
let res = await this.$resetpost('rs/logic/addInstallationDetails', {data:data}, {
|
|
287
|
-
resolveMsg: null,
|
|
288
|
-
rejectMsg: '表具添加失败!!!'
|
|
289
|
-
})
|
|
290
|
-
this.$dispatch('breakControl', this.selectdata)
|
|
291
|
-
},
|
|
292
|
-
// 检查表号是否存在
|
|
293
|
-
async meternumberValidate(i) {
|
|
294
|
-
if (!this.userinfo.userfiles[i].f_gasbrand_id) {
|
|
295
|
-
this.userinfo.userfiles[i].f_meternumber = ''
|
|
296
|
-
this.$showAlert('请先选择气表品牌!!!', 'warning', 3000)
|
|
297
|
-
return
|
|
298
|
-
}
|
|
299
|
-
if (this.userinfo.userfiles[i].f_gasbrand_id && this.userinfo.userfiles[i].f_meternumber) {
|
|
300
|
-
let data = {
|
|
301
|
-
f_meternumber: this.userinfo.userfiles[i].f_meternumber,
|
|
302
|
-
f_gasbrand_id: this.userinfo.userfiles[i].f_gasbrand_id
|
|
303
|
-
}
|
|
304
|
-
if (this.userinfo.userfiles[i].f_userfiles_id) {
|
|
305
|
-
data.f_userfiles_id = this.userinfo.userfiles[i].f_userfiles_id
|
|
306
|
-
}
|
|
307
|
-
let res = await this.$resetpost('rs/logic/meterbrandsNumberValidate', {data:data}, {
|
|
308
|
-
resolveMsg: null,
|
|
309
|
-
rejectMsg: '表号验证失败!!'
|
|
310
|
-
})
|
|
311
|
-
if (res.data) {
|
|
312
|
-
this.userinfo.userfiles[i].f_meternumber = ''
|
|
313
|
-
this.$showAlert('表号已存在!!', 'warning', 3000)
|
|
314
|
-
}
|
|
315
|
-
}
|
|
316
|
-
},
|
|
317
|
-
// 选择气表型号
|
|
318
|
-
gasmodelChange(i) {
|
|
319
|
-
if (this.userinfo.userfiles[i].gasmodel) {
|
|
320
|
-
this.userinfo.userfiles[i].f_gasmodel_id = this.userinfo.userfiles[i].gasmodel.id
|
|
321
|
-
}
|
|
322
|
-
},
|
|
323
|
-
// 选择气表品牌
|
|
324
|
-
gasbrandChange(i) {
|
|
325
|
-
// 清空已保存的气表型号
|
|
326
|
-
this.userinfo.userfiles[i].f_gasmodel_id = null
|
|
327
|
-
this.userinfo.userfiles[i].gasmodel = null
|
|
328
|
-
if (this.userinfo.userfiles[i].gasbrand) {
|
|
329
|
-
// 气表品牌id
|
|
330
|
-
this.userinfo.userfiles[i].f_gasbrand_id = this.userinfo.userfiles[i].gasbrand.id
|
|
331
|
-
// 气表分类
|
|
332
|
-
this.userinfo.userfiles[i].f_meter_classify = this.userinfo.userfiles[i].gasbrand.f_meter_type
|
|
333
|
-
}
|
|
334
|
-
},
|
|
335
|
-
// 追加表具
|
|
336
|
-
addUserFile() {
|
|
337
|
-
this.userinfo.userfiles.push({})
|
|
338
|
-
},
|
|
339
|
-
// 打开安装明细
|
|
340
|
-
async showUserFileModal (row) {
|
|
341
|
-
this.useradders = row
|
|
342
|
-
|
|
343
|
-
let http = new HttpResetClass()
|
|
344
|
-
let data = {
|
|
345
|
-
condition: `f_userinfo_id='${row.f_userinfo_id}'`
|
|
346
|
-
}
|
|
347
|
-
let res = await http.load('POST', 'rs/logic/getUserinfoAndUserfiles', {data:data}, {
|
|
348
|
-
resolveMsg: null,
|
|
349
|
-
rejectMsg: null
|
|
350
|
-
})
|
|
351
|
-
|
|
352
|
-
this.userinfo = res.data
|
|
353
|
-
|
|
354
|
-
// 已有表具的 气表信息补充
|
|
355
|
-
for (const userfile of this.userinfo.userfiles) {
|
|
356
|
-
for (const item of this.meterbrands) {
|
|
357
|
-
if (item.value.id === userfile.f_gasbrand_id) {
|
|
358
|
-
userfile.gasbrand = item.value
|
|
359
|
-
}
|
|
360
|
-
}
|
|
361
|
-
if (userfile.gasbrand) {
|
|
362
|
-
for (const item of userfile.gasbrand.gasmodel) {
|
|
363
|
-
if (item.value.id === userfile.f_gasmodel_id) {
|
|
364
|
-
userfile.gasmodel = item.value
|
|
365
|
-
}
|
|
366
|
-
}
|
|
367
|
-
}
|
|
368
|
-
}
|
|
369
|
-
|
|
370
|
-
this.showUserFile = true
|
|
371
|
-
},
|
|
372
|
-
// 获取气表品牌
|
|
373
|
-
async getMeterbrands() {
|
|
374
|
-
let http = new HttpResetClass()
|
|
375
|
-
let data = {
|
|
376
|
-
f_filialeid: this.$login.f.f_orgids
|
|
377
|
-
}
|
|
378
|
-
let res = await http.load('POST', 'rs/logic/getMeterbrands', {data:data}, {
|
|
379
|
-
resolveMsg: null,
|
|
380
|
-
rejectMsg: null
|
|
381
|
-
})
|
|
382
|
-
this.meterbrands = res.data
|
|
383
|
-
},
|
|
384
|
-
// 查询
|
|
385
|
-
async search () {
|
|
386
|
-
let http = new HttpResetClass()
|
|
387
|
-
let data = {
|
|
388
|
-
condition: " 1=1",
|
|
389
|
-
f_process_id: this.selectdata.f_process_id
|
|
390
|
-
}
|
|
391
|
-
let res = await http.load('POST', 'rs/sql/getAddresAndUserinfoAndUserfilesAmount', {data:data}, {
|
|
392
|
-
resolveMsg: null,
|
|
393
|
-
rejectMsg: null
|
|
394
|
-
})
|
|
395
|
-
this.model.data = res.data
|
|
396
|
-
if (this.selectdata.f_apply_type === '开发商集体报建' || this.selectdata.f_apply_type === '散户集体报建' || this.selectdata.f_apply_type === '煤改气报建') {
|
|
397
|
-
let f_installed_households = 0
|
|
398
|
-
for (const item of res.data) {
|
|
399
|
-
if (item.f_userfiles_num > 0) {
|
|
400
|
-
f_installed_households++
|
|
401
|
-
}
|
|
402
|
-
}
|
|
403
|
-
let f_uninstalled_households = this.selectdata.f_apply_count - f_installed_households
|
|
404
|
-
for (const item of this.selectdata.fields) {
|
|
405
|
-
if (item.label === '已安装户数') {
|
|
406
|
-
item.value = f_installed_households
|
|
407
|
-
}
|
|
408
|
-
if (item.label === '未安装户数') {
|
|
409
|
-
item.value = f_uninstalled_households
|
|
410
|
-
}
|
|
411
|
-
}
|
|
412
|
-
}
|
|
413
|
-
},
|
|
414
|
-
// 关闭安装明细
|
|
415
|
-
closeUserFile() {
|
|
416
|
-
this.showUserFile = false
|
|
417
|
-
this.useradders = null
|
|
418
|
-
this.userinfo = null
|
|
419
|
-
this.search()
|
|
420
|
-
},
|
|
421
|
-
// 关闭文件上传对话框
|
|
422
|
-
closeFile() {
|
|
423
|
-
this.showFile = false
|
|
424
|
-
// 将选的文件清空
|
|
425
|
-
this.$refs.file.$el.querySelector('input').value = ''
|
|
426
|
-
this.search()
|
|
427
|
-
}
|
|
428
|
-
},
|
|
429
|
-
events: {
|
|
430
|
-
async 'onFileUpload'(file, result) {
|
|
431
|
-
let data = {
|
|
432
|
-
selectdata: this.selectdata,
|
|
433
|
-
filepath: result.f_downloadpath,
|
|
434
|
-
user: this.$login.f
|
|
435
|
-
}
|
|
436
|
-
let res = await this.$resetpost(`rs/logic/importAddInstallationDetails`, {data:data}, {resolveMsg: null, rejectMsg: '导入失败', silent: true}, 0)
|
|
437
|
-
if(res.data.type === "success"){
|
|
438
|
-
this.$showAlert("导入信息:"+res.data.msg, res.data.type, 2000);
|
|
439
|
-
}else{
|
|
440
|
-
this.$showMessage(res.data.msg);
|
|
441
|
-
}
|
|
442
|
-
this.$dispatch('breakControl', this.selectdata)
|
|
443
|
-
}
|
|
444
|
-
},
|
|
445
|
-
computed: {
|
|
446
|
-
// 安装人
|
|
447
|
-
installperson() {
|
|
448
|
-
return this.$login.f.f_installman.map(item => {
|
|
449
|
-
return {
|
|
450
|
-
label: item.name,
|
|
451
|
-
value: item.name
|
|
452
|
-
}
|
|
453
|
-
})
|
|
454
|
-
},
|
|
455
|
-
// 表向
|
|
456
|
-
aroundmeters() {
|
|
457
|
-
return this.$appdata.getParam('左右表')
|
|
458
|
-
},
|
|
459
|
-
// 安装位置
|
|
460
|
-
positions() {
|
|
461
|
-
return this.$appdata.getParam('安装位置')
|
|
462
|
-
}
|
|
463
|
-
},
|
|
464
|
-
watch: {
|
|
465
|
-
}
|
|
466
|
-
}
|
|
467
|
-
</script>
|
|
468
|
-
<style scoped>
|
|
469
|
-
.head-but{
|
|
470
|
-
margin-left: 5px;
|
|
471
|
-
height: 34px;
|
|
472
|
-
/*background-color: #6aa6e2;*/
|
|
473
|
-
border-radius: 4px;
|
|
474
|
-
font-family: PingFang;
|
|
475
|
-
color: #ffffff;
|
|
476
|
-
}
|
|
477
|
-
/*清除model中的浮动*/
|
|
478
|
-
.clearfix:after,.clearfix:before{
|
|
479
|
-
display: table;
|
|
480
|
-
}
|
|
481
|
-
.clearfix:after{
|
|
482
|
-
clear: both;
|
|
483
|
-
}
|
|
484
|
-
</style>
|
|
1
|
+
<template>
|
|
2
|
+
<div class="col-sm-12" style="margin: 20px 0px;">
|
|
3
|
+
|
|
4
|
+
<data-grid :model="model" v-ref:grid class="list_area table_sy" style="padding: 0px">
|
|
5
|
+
<template partial='head'>
|
|
6
|
+
<tr>
|
|
7
|
+
<th>序号</th>
|
|
8
|
+
<th>客户编号</th>
|
|
9
|
+
<th>客户名称</th>
|
|
10
|
+
<th>客户电话</th>
|
|
11
|
+
<th>地址信息</th>
|
|
12
|
+
<th>表具数量</th>
|
|
13
|
+
<!-- <th v-if="$parent.$parent.selectdata.f_apply_type === '散户集体报建' || $parent.$parent.selectdata.f_apply_type === '煤改气报建'">单价(户)</th>-->
|
|
14
|
+
<!-- <th v-if="$parent.$parent.selectdata.f_apply_type === '散户集体报建' || $parent.$parent.selectdata.f_apply_type === '煤改气报建'">累计缴费</th>-->
|
|
15
|
+
<th>
|
|
16
|
+
<button type="button" class="btn btn-info head-but"
|
|
17
|
+
:disabled="$parent.$parent.mark === 1"
|
|
18
|
+
@click="$parent.$parent.showFile = !$parent.$parent.showFile">导入</button>
|
|
19
|
+
<a type="button" class="btn btn-info head-but"
|
|
20
|
+
href="/applyinstall/Excel/v3报装表具批量导入.xlsx" download>模板下载</a>
|
|
21
|
+
操作
|
|
22
|
+
</th>
|
|
23
|
+
</tr>
|
|
24
|
+
</template>
|
|
25
|
+
<template partial='body'>
|
|
26
|
+
<tr>
|
|
27
|
+
<td style="text-align: center;">
|
|
28
|
+
<nobr>{{$index+1}}</nobr>
|
|
29
|
+
</td>
|
|
30
|
+
<td style="text-align: center;">
|
|
31
|
+
<nobr>{{row.f_userinfo_code}}</nobr>
|
|
32
|
+
</td>
|
|
33
|
+
<td style="text-align: center;">
|
|
34
|
+
<nobr>{{row.f_user_name}}</nobr>
|
|
35
|
+
</td>
|
|
36
|
+
<td style="text-align: center;">
|
|
37
|
+
<nobr>{{row.f_user_phone}}</nobr>
|
|
38
|
+
</td>
|
|
39
|
+
<td style="text-align: center;">
|
|
40
|
+
<nobr>{{row.f_address}}</nobr>
|
|
41
|
+
</td>
|
|
42
|
+
<td style="text-align: center;">
|
|
43
|
+
<nobr>{{row.f_userfiles_num === null ? 0 : row.f_userfiles_num}}</nobr>
|
|
44
|
+
</td>
|
|
45
|
+
<!-- <td style="text-align: center;"-->
|
|
46
|
+
<!-- v-if="$parent.$parent.selectdata.f_apply_type === '散户集体报建' || $parent.$parent.selectdata.f_apply_type === '煤改气报建'"-->
|
|
47
|
+
<!-- >-->
|
|
48
|
+
<!-- <nobr>{{$parent.$parent.selectdata.f_price}}</nobr>-->
|
|
49
|
+
<!-- </td>-->
|
|
50
|
+
<!-- <td style="text-align: center;"-->
|
|
51
|
+
<!-- v-if="$parent.$parent.selectdata.f_apply_type === '散户集体报建' || $parent.$parent.selectdata.f_apply_type === '煤改气报建'"-->
|
|
52
|
+
<!-- >-->
|
|
53
|
+
<!-- <nobr>{{row.f_cumulative_payment_money}}</nobr>-->
|
|
54
|
+
<!-- </td>-->
|
|
55
|
+
<td style="text-align: center;">
|
|
56
|
+
<nobr>
|
|
57
|
+
<button
|
|
58
|
+
type="button"
|
|
59
|
+
name="button"
|
|
60
|
+
class="btn btn-link"
|
|
61
|
+
:disabled="(row.f_cumulative_payment_money < $parent.$parent.selectdata.f_price && ($parent.$parent.selectdata.f_apply_type === '散户集体报建' || $parent.$parent.selectdata.f_apply_type === '煤改气报建')) || $parent.$parent.mark === 1"
|
|
62
|
+
@click="$parent.$parent.showUserFileModal(row)">
|
|
63
|
+
{{row.f_userfiles_num > 0 ? '修正' : '添加'}}
|
|
64
|
+
</button>
|
|
65
|
+
</nobr>
|
|
66
|
+
</td>
|
|
67
|
+
</tr>
|
|
68
|
+
</template>
|
|
69
|
+
</data-grid>
|
|
70
|
+
</div>
|
|
71
|
+
<modal v-if="showFile" :show.sync="showFile" v-ref:modal :backdrop="false" title="选择文件">
|
|
72
|
+
<header slot="modal-header" class="modal-header">
|
|
73
|
+
<button type="button" class="close" @click="closeFile"><span>×</span></button>
|
|
74
|
+
<h4 class="modal-title">选择文件</h4>
|
|
75
|
+
</header>
|
|
76
|
+
<article slot="modal-body" class="modal-body">
|
|
77
|
+
<div class="form-group">
|
|
78
|
+
<file-upload class="my-file-uploader" name="useraddressUploadFile" action="rs/file/uploadFile" tagname="确定" multiple v-ref:file></file-upload>
|
|
79
|
+
</div>
|
|
80
|
+
</article>
|
|
81
|
+
<footer slot="modal-footer" class="modal-footer"></footer>
|
|
82
|
+
</modal>
|
|
83
|
+
|
|
84
|
+
<modal v-if="showUserFile" :show.sync="showUserFile" v-ref:modal :large="true" :backdrop="false" title="安装明细">
|
|
85
|
+
<header slot="modal-header" class="modal-header">
|
|
86
|
+
<button type="button" class="close" @click="closeUserFile"><span>×</span></button>
|
|
87
|
+
<h4 class="modal-title">安装明细</h4>
|
|
88
|
+
</header>
|
|
89
|
+
<article slot="modal-body" class="modal-body clearfix">
|
|
90
|
+
<div class="form-group col-sm-12">
|
|
91
|
+
<label class="col-sm-2 control-label">地址信息:</label>
|
|
92
|
+
<div class="col-sm-10">
|
|
93
|
+
<input class="form-control input_view" style=""
|
|
94
|
+
v-model="useradders.f_address"
|
|
95
|
+
:value="useradders.f_address"
|
|
96
|
+
:readonly="true"/>
|
|
97
|
+
</div>
|
|
98
|
+
</div>
|
|
99
|
+
|
|
100
|
+
<div v-for="(i, item) in userinfo.userfiles" class="form-group col-sm-12 panel panel-info">
|
|
101
|
+
<div class="panel-heading head" style="background-color: #e8f4ff;margin-bottom: 10px">表具{{$index+1}}信息</div>
|
|
102
|
+
<div class="form-group col-sm-6" :class="item.f_gasbrand_id ? '':'has-error'">
|
|
103
|
+
<label class="col-sm-4 control-label">气表品牌:</label>
|
|
104
|
+
<div class="col-sm-8">
|
|
105
|
+
<input-select
|
|
106
|
+
class="select select_list"
|
|
107
|
+
:value.sync="item.gasbrand"
|
|
108
|
+
v-model="item.gasbrand"
|
|
109
|
+
:options="meterbrands"
|
|
110
|
+
@change="gasbrandChange(i)"
|
|
111
|
+
:valueSingle="true"></input-select>
|
|
112
|
+
</div>
|
|
113
|
+
</div>
|
|
114
|
+
<div class="form-group col-sm-6" :class="item.f_gasmodel_id ? '':'has-error'">
|
|
115
|
+
<label class="col-sm-4 control-label">气表型号:</label>
|
|
116
|
+
<div class="col-sm-8">
|
|
117
|
+
<input-select
|
|
118
|
+
class="select select_list"
|
|
119
|
+
:value.sync="item.gasmodel"
|
|
120
|
+
v-model="item.gasmodel"
|
|
121
|
+
:options="item.gasbrand.gasmodel"
|
|
122
|
+
@change="gasmodelChange(i)"
|
|
123
|
+
:valueSingle="true"></input-select>
|
|
124
|
+
</div>
|
|
125
|
+
</div>
|
|
126
|
+
<div class="form-group col-sm-6" :class="item.f_meternumber ? '':'has-error'">
|
|
127
|
+
<label class="col-sm-4 control-label">表号:</label>
|
|
128
|
+
<div class="col-sm-8">
|
|
129
|
+
<input class="form-control input_view" style=""
|
|
130
|
+
placeholder="表号"
|
|
131
|
+
v-model="item.f_meternumber"
|
|
132
|
+
:value="item.f_meternumber"
|
|
133
|
+
@change="meternumberValidate(i)"
|
|
134
|
+
:readonly="false"/>
|
|
135
|
+
</div>
|
|
136
|
+
</div>
|
|
137
|
+
<div class="form-group col-sm-6">
|
|
138
|
+
<label class="col-sm-4 control-label">表封号:</label>
|
|
139
|
+
<div class="col-sm-8">
|
|
140
|
+
<input class="form-control input_view" style=""
|
|
141
|
+
placeholder="表封号"
|
|
142
|
+
v-model="item.f_metertitles"
|
|
143
|
+
:value="item.f_metertitles"
|
|
144
|
+
:readonly="false"/>
|
|
145
|
+
</div>
|
|
146
|
+
</div>
|
|
147
|
+
<div class="form-group col-sm-6">
|
|
148
|
+
<label class="col-sm-4 control-label">表读数:</label>
|
|
149
|
+
<div class="col-sm-8">
|
|
150
|
+
<input class="form-control input_view" style=""
|
|
151
|
+
type="number"
|
|
152
|
+
placeholder="表读数"
|
|
153
|
+
v-model="item.f_meter_base"
|
|
154
|
+
:value="item.f_meter_base"
|
|
155
|
+
:readonly="false"/>
|
|
156
|
+
</div>
|
|
157
|
+
</div>
|
|
158
|
+
<div class="form-group col-sm-6">
|
|
159
|
+
<label class="col-sm-4 control-label">初始底数:</label>
|
|
160
|
+
<div class="col-sm-8">
|
|
161
|
+
<input class="form-control input_view" style=""
|
|
162
|
+
type="number"
|
|
163
|
+
v-model="item.f_initial_base"
|
|
164
|
+
:value="item.f_initial_base"
|
|
165
|
+
placeholder="初始底数"
|
|
166
|
+
:readonly="false"/>
|
|
167
|
+
</div>
|
|
168
|
+
</div>
|
|
169
|
+
<div class="form-group col-sm-6">
|
|
170
|
+
<label class="col-sm-4 control-label">表向:</label>
|
|
171
|
+
<div class="col-sm-8">
|
|
172
|
+
<input-select
|
|
173
|
+
class="select select_list"
|
|
174
|
+
:value.sync="item.f_aroundmeter"
|
|
175
|
+
v-model="item.f_aroundmeter"
|
|
176
|
+
:options="aroundmeters"
|
|
177
|
+
:valueSingle="true"></input-select>
|
|
178
|
+
</div>
|
|
179
|
+
</div>
|
|
180
|
+
<div class="form-group col-sm-6">
|
|
181
|
+
<label class="col-sm-4 control-label">安装位置:</label>
|
|
182
|
+
<div class="col-sm-8">
|
|
183
|
+
<input-select
|
|
184
|
+
class="select select_list"
|
|
185
|
+
:value.sync="item.f_position"
|
|
186
|
+
v-model="item.f_position"
|
|
187
|
+
:options="positions"
|
|
188
|
+
:valueSingle="true"></input-select>
|
|
189
|
+
</div>
|
|
190
|
+
</div>
|
|
191
|
+
<div class="form-group col-sm-6">
|
|
192
|
+
<label class="col-sm-4 control-label">安装人:</label>
|
|
193
|
+
<div class="col-sm-8">
|
|
194
|
+
<input-select
|
|
195
|
+
class="select select_list"
|
|
196
|
+
:value.sync="item.f_install_person"
|
|
197
|
+
v-model="item.f_install_person"
|
|
198
|
+
:options="installperson"
|
|
199
|
+
:valueSingle="true"></input-select>
|
|
200
|
+
</div>
|
|
201
|
+
</div>
|
|
202
|
+
<div class="form-group col-sm-6">
|
|
203
|
+
<label class="col-sm-4 control-label">安装日期:</label>
|
|
204
|
+
<div class="col-sm-8">
|
|
205
|
+
<datepicker
|
|
206
|
+
placeholder="安装日期"
|
|
207
|
+
:value.sync="item.f_install_date"
|
|
208
|
+
v-model="item.f_install_date"
|
|
209
|
+
format="yyyy-MM-dd HH:mm:ss"
|
|
210
|
+
:show-reset-button="reset">
|
|
211
|
+
</datepicker>
|
|
212
|
+
</div>
|
|
213
|
+
</div>
|
|
214
|
+
</div>
|
|
215
|
+
|
|
216
|
+
</article>
|
|
217
|
+
<footer slot="modal-footer" class="modal-footer">
|
|
218
|
+
<!-- 去除一户多表 -->
|
|
219
|
+
<button type="button" class="btn btn-primary" @click="addUserFile" v-if="false">添加表具</button>
|
|
220
|
+
<button type="button" class="btn btn-primary" @click="saveUserFile">确认</button>
|
|
221
|
+
</footer>
|
|
222
|
+
</modal>
|
|
223
|
+
</template>
|
|
224
|
+
<script>
|
|
225
|
+
import Vue from 'vue'
|
|
226
|
+
import {PagedList} from 'vue-client'
|
|
227
|
+
import {HttpResetClass} from 'vue-client'
|
|
228
|
+
import {isEmpty} from '../../../Util'
|
|
229
|
+
|
|
230
|
+
export default {
|
|
231
|
+
title: '安装明细',
|
|
232
|
+
props: {
|
|
233
|
+
selectdata: {
|
|
234
|
+
type: Object
|
|
235
|
+
},
|
|
236
|
+
mark: {
|
|
237
|
+
type: Number,
|
|
238
|
+
default: 0
|
|
239
|
+
}
|
|
240
|
+
},
|
|
241
|
+
data () {
|
|
242
|
+
return {
|
|
243
|
+
showFile: false,
|
|
244
|
+
showUserFile: false,
|
|
245
|
+
model: {
|
|
246
|
+
data: null
|
|
247
|
+
},
|
|
248
|
+
meterbrands: [], // 气表品牌
|
|
249
|
+
useradders: null,
|
|
250
|
+
userinfo: {}
|
|
251
|
+
}
|
|
252
|
+
},
|
|
253
|
+
ready () {
|
|
254
|
+
this.search()
|
|
255
|
+
this.getMeterbrands()
|
|
256
|
+
},
|
|
257
|
+
methods: {
|
|
258
|
+
// 保存档案
|
|
259
|
+
async saveUserFile() {
|
|
260
|
+
if (this.userinfo.userfiles.length > 1) {
|
|
261
|
+
this.$showAlert('该地址下已有表具信息,暂不支持一户多表!!!', 'warning', 3000)
|
|
262
|
+
return
|
|
263
|
+
}
|
|
264
|
+
// 检查必填项
|
|
265
|
+
for (let i = 0; i < this.userinfo.userfiles.length; i++) {
|
|
266
|
+
let userfile = this.userinfo.userfiles[i]
|
|
267
|
+
if (userfile.f_gasbrand_id === null || userfile.f_gasbrand_id === '') {
|
|
268
|
+
this.$showAlert(`表具${i+1}气表品牌没有选择!!!`, 'warning', 3000)
|
|
269
|
+
return
|
|
270
|
+
}
|
|
271
|
+
if (userfile.f_gasmodel_id === null || userfile.f_gasmodel_id === '') {
|
|
272
|
+
this.$showAlert(`表具${i+1}气表型号没有选择!!!`, 'warning', 3000)
|
|
273
|
+
return
|
|
274
|
+
}
|
|
275
|
+
if (userfile.f_meternumber === null || userfile.f_meternumber === '') {
|
|
276
|
+
this.$showAlert(`表具${i+1}表号没有填写!!!`, 'warning', 3000)
|
|
277
|
+
return
|
|
278
|
+
}
|
|
279
|
+
}
|
|
280
|
+
let data = {
|
|
281
|
+
user: this.$login.f,
|
|
282
|
+
useradders: this.useradders,
|
|
283
|
+
userinfo: this.userinfo,
|
|
284
|
+
selectdata: this.selectdata
|
|
285
|
+
}
|
|
286
|
+
let res = await this.$resetpost('rs/logic/addInstallationDetails', {data:data}, {
|
|
287
|
+
resolveMsg: null,
|
|
288
|
+
rejectMsg: '表具添加失败!!!'
|
|
289
|
+
})
|
|
290
|
+
this.$dispatch('breakControl', this.selectdata)
|
|
291
|
+
},
|
|
292
|
+
// 检查表号是否存在
|
|
293
|
+
async meternumberValidate(i) {
|
|
294
|
+
if (!this.userinfo.userfiles[i].f_gasbrand_id) {
|
|
295
|
+
this.userinfo.userfiles[i].f_meternumber = ''
|
|
296
|
+
this.$showAlert('请先选择气表品牌!!!', 'warning', 3000)
|
|
297
|
+
return
|
|
298
|
+
}
|
|
299
|
+
if (this.userinfo.userfiles[i].f_gasbrand_id && this.userinfo.userfiles[i].f_meternumber) {
|
|
300
|
+
let data = {
|
|
301
|
+
f_meternumber: this.userinfo.userfiles[i].f_meternumber,
|
|
302
|
+
f_gasbrand_id: this.userinfo.userfiles[i].f_gasbrand_id
|
|
303
|
+
}
|
|
304
|
+
if (this.userinfo.userfiles[i].f_userfiles_id) {
|
|
305
|
+
data.f_userfiles_id = this.userinfo.userfiles[i].f_userfiles_id
|
|
306
|
+
}
|
|
307
|
+
let res = await this.$resetpost('rs/logic/meterbrandsNumberValidate', {data:data}, {
|
|
308
|
+
resolveMsg: null,
|
|
309
|
+
rejectMsg: '表号验证失败!!'
|
|
310
|
+
})
|
|
311
|
+
if (res.data) {
|
|
312
|
+
this.userinfo.userfiles[i].f_meternumber = ''
|
|
313
|
+
this.$showAlert('表号已存在!!', 'warning', 3000)
|
|
314
|
+
}
|
|
315
|
+
}
|
|
316
|
+
},
|
|
317
|
+
// 选择气表型号
|
|
318
|
+
gasmodelChange(i) {
|
|
319
|
+
if (this.userinfo.userfiles[i].gasmodel) {
|
|
320
|
+
this.userinfo.userfiles[i].f_gasmodel_id = this.userinfo.userfiles[i].gasmodel.id
|
|
321
|
+
}
|
|
322
|
+
},
|
|
323
|
+
// 选择气表品牌
|
|
324
|
+
gasbrandChange(i) {
|
|
325
|
+
// 清空已保存的气表型号
|
|
326
|
+
this.userinfo.userfiles[i].f_gasmodel_id = null
|
|
327
|
+
this.userinfo.userfiles[i].gasmodel = null
|
|
328
|
+
if (this.userinfo.userfiles[i].gasbrand) {
|
|
329
|
+
// 气表品牌id
|
|
330
|
+
this.userinfo.userfiles[i].f_gasbrand_id = this.userinfo.userfiles[i].gasbrand.id
|
|
331
|
+
// 气表分类
|
|
332
|
+
this.userinfo.userfiles[i].f_meter_classify = this.userinfo.userfiles[i].gasbrand.f_meter_type
|
|
333
|
+
}
|
|
334
|
+
},
|
|
335
|
+
// 追加表具
|
|
336
|
+
addUserFile() {
|
|
337
|
+
this.userinfo.userfiles.push({})
|
|
338
|
+
},
|
|
339
|
+
// 打开安装明细
|
|
340
|
+
async showUserFileModal (row) {
|
|
341
|
+
this.useradders = row
|
|
342
|
+
|
|
343
|
+
let http = new HttpResetClass()
|
|
344
|
+
let data = {
|
|
345
|
+
condition: `f_userinfo_id='${row.f_userinfo_id}'`
|
|
346
|
+
}
|
|
347
|
+
let res = await http.load('POST', 'rs/logic/getUserinfoAndUserfiles', {data:data}, {
|
|
348
|
+
resolveMsg: null,
|
|
349
|
+
rejectMsg: null
|
|
350
|
+
})
|
|
351
|
+
|
|
352
|
+
this.userinfo = res.data
|
|
353
|
+
|
|
354
|
+
// 已有表具的 气表信息补充
|
|
355
|
+
for (const userfile of this.userinfo.userfiles) {
|
|
356
|
+
for (const item of this.meterbrands) {
|
|
357
|
+
if (item.value.id === userfile.f_gasbrand_id) {
|
|
358
|
+
userfile.gasbrand = item.value
|
|
359
|
+
}
|
|
360
|
+
}
|
|
361
|
+
if (userfile.gasbrand) {
|
|
362
|
+
for (const item of userfile.gasbrand.gasmodel) {
|
|
363
|
+
if (item.value.id === userfile.f_gasmodel_id) {
|
|
364
|
+
userfile.gasmodel = item.value
|
|
365
|
+
}
|
|
366
|
+
}
|
|
367
|
+
}
|
|
368
|
+
}
|
|
369
|
+
|
|
370
|
+
this.showUserFile = true
|
|
371
|
+
},
|
|
372
|
+
// 获取气表品牌
|
|
373
|
+
async getMeterbrands() {
|
|
374
|
+
let http = new HttpResetClass()
|
|
375
|
+
let data = {
|
|
376
|
+
f_filialeid: this.$login.f.f_orgids
|
|
377
|
+
}
|
|
378
|
+
let res = await http.load('POST', 'rs/logic/getMeterbrands', {data:data}, {
|
|
379
|
+
resolveMsg: null,
|
|
380
|
+
rejectMsg: null
|
|
381
|
+
})
|
|
382
|
+
this.meterbrands = res.data
|
|
383
|
+
},
|
|
384
|
+
// 查询
|
|
385
|
+
async search () {
|
|
386
|
+
let http = new HttpResetClass()
|
|
387
|
+
let data = {
|
|
388
|
+
condition: " 1=1",
|
|
389
|
+
f_process_id: this.selectdata.f_process_id
|
|
390
|
+
}
|
|
391
|
+
let res = await http.load('POST', 'rs/sql/getAddresAndUserinfoAndUserfilesAmount', {data:data}, {
|
|
392
|
+
resolveMsg: null,
|
|
393
|
+
rejectMsg: null
|
|
394
|
+
})
|
|
395
|
+
this.model.data = res.data
|
|
396
|
+
if (this.selectdata.f_apply_type === '开发商集体报建' || this.selectdata.f_apply_type === '散户集体报建' || this.selectdata.f_apply_type === '煤改气报建') {
|
|
397
|
+
let f_installed_households = 0
|
|
398
|
+
for (const item of res.data) {
|
|
399
|
+
if (item.f_userfiles_num > 0) {
|
|
400
|
+
f_installed_households++
|
|
401
|
+
}
|
|
402
|
+
}
|
|
403
|
+
let f_uninstalled_households = this.selectdata.f_apply_count - f_installed_households
|
|
404
|
+
for (const item of this.selectdata.fields) {
|
|
405
|
+
if (item.label === '已安装户数') {
|
|
406
|
+
item.value = f_installed_households
|
|
407
|
+
}
|
|
408
|
+
if (item.label === '未安装户数') {
|
|
409
|
+
item.value = f_uninstalled_households
|
|
410
|
+
}
|
|
411
|
+
}
|
|
412
|
+
}
|
|
413
|
+
},
|
|
414
|
+
// 关闭安装明细
|
|
415
|
+
closeUserFile() {
|
|
416
|
+
this.showUserFile = false
|
|
417
|
+
this.useradders = null
|
|
418
|
+
this.userinfo = null
|
|
419
|
+
this.search()
|
|
420
|
+
},
|
|
421
|
+
// 关闭文件上传对话框
|
|
422
|
+
closeFile() {
|
|
423
|
+
this.showFile = false
|
|
424
|
+
// 将选的文件清空
|
|
425
|
+
this.$refs.file.$el.querySelector('input').value = ''
|
|
426
|
+
this.search()
|
|
427
|
+
}
|
|
428
|
+
},
|
|
429
|
+
events: {
|
|
430
|
+
async 'onFileUpload'(file, result) {
|
|
431
|
+
let data = {
|
|
432
|
+
selectdata: this.selectdata,
|
|
433
|
+
filepath: result.f_downloadpath,
|
|
434
|
+
user: this.$login.f
|
|
435
|
+
}
|
|
436
|
+
let res = await this.$resetpost(`rs/logic/importAddInstallationDetails`, {data:data}, {resolveMsg: null, rejectMsg: '导入失败', silent: true}, 0)
|
|
437
|
+
if(res.data.type === "success"){
|
|
438
|
+
this.$showAlert("导入信息:"+res.data.msg, res.data.type, 2000);
|
|
439
|
+
}else{
|
|
440
|
+
this.$showMessage(res.data.msg);
|
|
441
|
+
}
|
|
442
|
+
this.$dispatch('breakControl', this.selectdata)
|
|
443
|
+
}
|
|
444
|
+
},
|
|
445
|
+
computed: {
|
|
446
|
+
// 安装人
|
|
447
|
+
installperson() {
|
|
448
|
+
return this.$login.f.f_installman.map(item => {
|
|
449
|
+
return {
|
|
450
|
+
label: item.name,
|
|
451
|
+
value: item.name
|
|
452
|
+
}
|
|
453
|
+
})
|
|
454
|
+
},
|
|
455
|
+
// 表向
|
|
456
|
+
aroundmeters() {
|
|
457
|
+
return this.$appdata.getParam('左右表')
|
|
458
|
+
},
|
|
459
|
+
// 安装位置
|
|
460
|
+
positions() {
|
|
461
|
+
return this.$appdata.getParam('安装位置')
|
|
462
|
+
}
|
|
463
|
+
},
|
|
464
|
+
watch: {
|
|
465
|
+
}
|
|
466
|
+
}
|
|
467
|
+
</script>
|
|
468
|
+
<style scoped>
|
|
469
|
+
.head-but{
|
|
470
|
+
margin-left: 5px;
|
|
471
|
+
height: 34px;
|
|
472
|
+
/*background-color: #6aa6e2;*/
|
|
473
|
+
border-radius: 4px;
|
|
474
|
+
font-family: PingFang;
|
|
475
|
+
color: #ffffff;
|
|
476
|
+
}
|
|
477
|
+
/*清除model中的浮动*/
|
|
478
|
+
.clearfix:after,.clearfix:before{
|
|
479
|
+
display: table;
|
|
480
|
+
}
|
|
481
|
+
.clearfix:after{
|
|
482
|
+
clear: both;
|
|
483
|
+
}
|
|
484
|
+
</style>
|