apply-clients 3.5.1 → 3.5.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (45) hide show
  1. package/build/dev-server.js +142 -133
  2. package/package.json +118 -118
  3. package/src/App.vue +26 -21
  4. package/src/applyAndroid.js +58 -58
  5. package/src/components/android/AppSign.vue +152 -152
  6. package/src/components/android/AppTakePic.vue +181 -181
  7. package/src/components/android/Process/AppChargeList.vue +224 -224
  8. package/src/components/android/Process/AppExplorationUser.vue +508 -508
  9. package/src/components/android/Process/AppOtherChargeList.vue +255 -219
  10. package/src/components/product/Install/ContractCharge.vue +210 -210
  11. package/src/filiale/fugou/android/AppChargeManagement.vue +625 -625
  12. package/src/filiale/hongda/pc/FunctionServiceControl.vue +526 -525
  13. package/src/filiale/qianneng/android/AppExplorationUser.vue +441 -441
  14. package/src/filiale/qianneng/android/AppServiceControl.vue +1608 -1608
  15. package/src/filiale/qianneng/pc/Applybatchdispatch.vue +685 -685
  16. package/src/filiale/qianneng/pc/ExplorationSelect.vue +492 -492
  17. package/src/filiale/qianneng/pc/FunctionServiceControl.vue +521 -521
  18. package/src/filiale/qianneng/pc/InstallInfoSelect.vue +392 -392
  19. package/src/filiale/qianneng/pc/InstallationDetails.vue +561 -561
  20. package/src/filiale/qianneng/pc/ServiceControl.vue +1351 -1340
  21. package/src/filiale/qianneng/pc/SupervisoryList.vue +344 -344
  22. package/src/filiale/qianneng/pc/SupervisoryServiceControl.vue +871 -871
  23. package/src/filiale/qianneng/pc/chargeManagement.vue +656 -656
  24. package/src/filiale/qianneng/pc/printactivatecard.vue +295 -295
  25. package/src/filiale/qianneng/pc/supplementalAgreement.vue +344 -344
  26. package/src/filiale/yangchunboneng/android/AppAddMaterialScience.vue +390 -390
  27. package/src/filiale/yangchunboneng/android/AppChargeManagement.vue +120 -120
  28. package/src/filiale/yangchunboneng/android/AppDevicesManagement.vue +552 -552
  29. package/src/filiale/yangchunboneng/android/AppExplorationUser.vue +507 -507
  30. package/src/filiale/yangchunboneng/android/AppInstallationDetails.vue +492 -492
  31. package/src/filiale/yangchunboneng/android/AppOtherChargeManagement.vue +116 -116
  32. package/src/filiale/yangchunboneng/android/AppServiceControl.vue +1552 -1552
  33. package/src/filiale/yangchunboneng/android/AppTakePic.vue +181 -181
  34. package/src/filiale/yangchunboneng/android/chargesList.vue +170 -170
  35. package/src/filiale/yangchunboneng/android.js +16 -16
  36. package/src/filiale/yangchunboneng/pc/ExplorationSelect.vue +496 -496
  37. package/src/filiale/yangchunboneng/pc/InstallationDetails.vue +609 -609
  38. package/src/filiale/yangchunboneng/pc/ServiceControl.vue +1782 -1782
  39. package/src/filiale/yangchunboneng/pc/ServiceView.vue +1005 -1005
  40. package/src/filiale/yangchunboneng/pc/addMaterialScience.vue +374 -374
  41. package/src/filiale/yangchunboneng/pc/chargeManagement.vue +960 -960
  42. package/src/filiale/yangchunboneng/pc/devicesManagement.vue +511 -511
  43. package/src/filiale/yangchunboneng/pc/otherchargeManagement.vue +214 -214
  44. package/src/filiale/yangchunboneng/pc.js +17 -17
  45. package/src/main.js +23 -23
@@ -1,609 +1,609 @@
1
- <template>
2
- <work-busy :is-busy="showWork" v-show="showWork"></work-busy>
3
-
4
- <div class="col-sm-12" style="margin: 20px 0px;">
5
- <criteria-paged :model="model" v-ref:cp :pager="pager">
6
- <criteria partial='criteria' @condition-changed='$parent.searchCondition' v-ref:cri>
7
- <div novalidate class="form-horizontal select-overspread container-fluid auto" partial>
8
- </div>
9
- </criteria>
10
- <data-grid :model="model" v-ref:grid partial='list' class="list_area table_sy" style="padding: 0px">
11
- <template partial='head'>
12
- <tr>
13
- <th>序号</th>
14
- <th>客户编号</th>
15
- <th>客户名称</th>
16
- <th>客户电话</th>
17
- <th>地址信息</th>
18
- <th v-if="$parent.$parent.$parent.selectdata.f_apply_type === '团购报建'">备注</th>
19
- <th>表具数量</th>
20
- <th>
21
- <template v-if="$parent.$parent.$parent.selectdata.f_apply_type === '团购报建'">
22
- <button type="button" class="btn btn-info head-but" v-if="$parent.$parent.$parent.mark === 0"
23
- @click="$parent.$parent.$parent.showFile = !$parent.$parent.$parent.showFile">导入</button>
24
- <a type="button" class="btn btn-info head-but" v-if="$parent.$parent.$parent.mark === 0"
25
- href="/apply/download/excel/安装明细.xlsx" download>模板下载</a>
26
- <export-excel :data="$parent.$parent.$parent.getCondition"
27
- :field="$parent.$parent.$parent.getfield"
28
- sqlurl="rs/logic/applyExportfile"
29
- sql-name="getInstallableAddress"
30
- template-name='可安装地址'
31
- btn-name="导出可安装"
32
- :choose-col="true"></export-excel>
33
- </template>
34
- </th>
35
- </tr>
36
- </template>
37
- <template partial='body'>
38
- <tr>
39
- <td style="text-align: center;">
40
- <nobr>{{$index+1}}</nobr>
41
- </td>
42
- <td style="text-align: center;">
43
- <nobr>{{row.f_userinfo_code}}</nobr>
44
- </td>
45
- <td style="text-align: center;">
46
- <nobr>{{row.f_user_name}}</nobr>
47
- </td>
48
- <td style="text-align: center;">
49
- <nobr>{{row.f_user_phone}}</nobr>
50
- </td>
51
- <td style="text-align: center;">
52
- <nobr>{{row.f_address}}</nobr>
53
- </td>
54
- <th v-if="$parent.$parent.$parent.selectdata.f_apply_type === '团购报建'">
55
- <nobr>{{row.f_userinfo_comments}}</nobr>
56
- </th>
57
- <td style="text-align: center;">
58
- <nobr>{{row.f_userfiles_num === null ? 0 : row.f_userfiles_num}}</nobr>
59
- </td>
60
- <td style="text-align: center;">
61
- <nobr>
62
- <button
63
- type="button" name="button" class="btn btn-link"
64
- :disabled="row.f_cumulative_payment_money < $parent.$parent.$parent.selectdata.f_price && $parent.$parent.$parent.selectdata.f_apply_type !== '开发商集体报建'"
65
- @click="$parent.$parent.$parent.showUserFileModal(row)">
66
- {{$parent.$parent.$parent.mark === 1 ? '查看' : row.f_userfiles_num > 0 ? '修正' : '添加'}}
67
- </button>
68
- </nobr>
69
- </td>
70
- </tr>
71
- </template>
72
- </data-grid>
73
- </criteria-paged>
74
- </div>
75
- <modal v-if="showFile" :show.sync="showFile" v-ref:modal :backdrop="false" title="选择文件">
76
- <header slot="modal-header" class="modal-header">
77
- <button type="button" class="close" @click="closeFile"><span>&times;</span></button>
78
- <h4 class="modal-title">选择文件</h4>
79
- </header>
80
- <article slot="modal-body" class="modal-body">
81
- <div class="form-group">
82
- <file-upload class="my-file-uploader" name="useraddressUploadFile" action="rs/file/uploadFile" tagname="确定" v-ref:file></file-upload>
83
- </div>
84
- </article>
85
- <footer slot="modal-footer" class="modal-footer"></footer>
86
- </modal>
87
-
88
- <modal v-if="showUserFile" :show.sync="showUserFile" v-ref:modal :large="true" :backdrop="false" title="安装明细">
89
- <header slot="modal-header" class="modal-header">
90
- <button type="button" class="close" @click="closeUserFile"><span>&times;</span></button>
91
- <h4 class="modal-title">安装明细</h4>
92
- </header>
93
- <article slot="modal-body" class="modal-body clearfix">
94
- <div class="form-group col-sm-12">
95
- <label class="col-sm-2 control-label">地址信息:</label>
96
- <div class="col-sm-10">
97
- <input class="form-control input_view" style=""
98
- v-model="useradders.f_address"
99
- :value="useradders.f_address"
100
- :readonly="true"/>
101
- </div>
102
- </div>
103
-
104
- <div v-for="(i, item) in userinfo.userfiles" class="form-group col-sm-12 panel panel-info">
105
- <div class="panel-heading head col-sm-12" style="background-color: #e8f4ff;margin-bottom: 10px">
106
- <div class="col-sm-6 text-left">表具{{$index+1}}信息</div>
107
- <div class="col-sm-6 text-right"><button
108
- class="button_delete button_spacing"
109
- v-if="!item.f_userfiles_id"
110
- @click.prevent="deleteUserFile(i)"
111
- >删除</button></div>
112
- </div>
113
- <div class="form-group col-sm-6" :class="[item.gasbrand ? '' : 'has-error']">
114
- <label class="col-sm-4 control-label">气表品牌:</label>
115
- <div class="col-sm-8">
116
- <input-select
117
- class="select select_list"
118
- :value.sync="item.gasbrand"
119
- v-model="item.gasbrand"
120
- :options="meterbrands"
121
- @change="gasbrandChange(i)"
122
- :disable="mark === 1"
123
- :valueSingle="true"></input-select>
124
- </div>
125
- </div>
126
- <div class="form-group col-sm-6" :class="[item.gasmodel ? '' : 'has-error']">
127
- <label class="col-sm-4 control-label">气表型号:</label>
128
- <div class="col-sm-8">
129
- <input-select
130
- class="select select_list"
131
- :value.sync="item.gasmodel"
132
- v-model="item.gasmodel"
133
- :options.sync="item.gasbrand.gasmodel"
134
- @change="gasmodelChange(i)"
135
- :disable="mark === 1"
136
- :valueSingle="true"></input-select>
137
- </div>
138
- </div>
139
- <div class="form-group col-sm-6" :class="[item.f_meternumber ? '' : 'has-error']">
140
- <label class="col-sm-4 control-label">表&emsp;&emsp;号:</label>
141
- <div class="col-sm-8">
142
- <input class="form-control input_view" style=""
143
- placeholder="表号"
144
- type="number"
145
- οnkeyup="this.value=this.value.replace(/\s+/g,'')"
146
- v-model="item.f_meternumber"
147
- :value="item.f_meternumber"
148
- @change="meternumberValidate(i)"
149
- :readonly="mark === 1"/>
150
- </div>
151
- </div>
152
- <div class="form-group col-sm-6">
153
- <label class="col-sm-4 control-label">表&ensp;封&ensp;号:</label>
154
- <div class="col-sm-8">
155
- <input class="form-control input_view" style=""
156
- placeholder="表封号"
157
- v-model="item.f_metertitles"
158
- :value="item.f_metertitles"
159
- :readonly="mark === 1"/>
160
- </div>
161
- </div>
162
- <div class="form-group col-sm-6">
163
- <label class="col-sm-4 control-label">表&ensp;读&ensp;数:</label>
164
- <div class="col-sm-8">
165
- <input class="form-control input_view" style=""
166
- type="number"
167
- placeholder="表读数"
168
- v-model="item.f_meter_base"
169
- :value="item.f_meter_base"
170
- :readonly="mark === 1"/>
171
- </div>
172
- </div>
173
- <div class="form-group col-sm-6">
174
- <label class="col-sm-4 control-label">初始底数:</label>
175
- <div class="col-sm-8">
176
- <input class="form-control input_view" style=""
177
- v-model="item.f_initial_base"
178
- :value="item.f_initial_base"
179
- placeholder="初始底数"
180
- :readonly="mark === 1"/>
181
- </div>
182
- </div>
183
- <div class="form-group col-sm-6">
184
- <label class="col-sm-4 control-label">表&emsp;&emsp;向:</label>
185
- <div class="col-sm-8">
186
- <input-select
187
- class="select select_list"
188
- :value.sync="item.f_aroundmeter"
189
- v-model="item.f_aroundmeter"
190
- :options="aroundmeters"
191
- :disable="mark === 1"
192
- :valueSingle="true"></input-select>
193
- </div>
194
- </div>
195
- <div class="form-group col-sm-6">
196
- <label class="col-sm-4 control-label">安装位置:</label>
197
- <div class="col-sm-8">
198
- <input-select
199
- class="select select_list"
200
- :value.sync="item.f_position"
201
- v-model="item.f_position"
202
- :options="positions"
203
- :disable="mark === 1"
204
- :valueSingle="true"></input-select>
205
- </div>
206
- </div>
207
- <div class="form-group col-sm-6">
208
- <label class="col-sm-4 control-label">安&ensp;装&ensp;人:</label>
209
- <div class="col-sm-8">
210
- <input class="form-control input_view" style=""
211
- v-model="item.f_install_person"
212
- :value.sync="installperson(item.f_install_person)"
213
- placeholder="安装人"
214
- readonly/>
215
- <!-- <input-select-->
216
- <!-- class="select select_list"-->
217
- <!-- :value.sync="item.f_install_person"-->
218
- <!-- v-model="item.f_install_person"-->
219
- <!-- :options="installperson"-->
220
- <!-- :disable="mark === 1"-->
221
- <!-- :valueSingle="true"></input-select>-->
222
- </div>
223
- </div>
224
- <div class="form-group col-sm-6">
225
- <label class="col-sm-4 control-label">安装日期:</label>
226
- <div class="col-sm-8">
227
- <input class="form-control input_view" style=""
228
- v-model="item.f_install_date"
229
- :value.sync="installdate(item.f_install_date)"
230
- placeholder="安装日期"
231
- readonly/>
232
- <!-- <datepicker-->
233
- <!-- placeholder="安装日期"-->
234
- <!-- :value.sync="item.f_install_date"-->
235
- <!-- v-model="item.f_install_date"-->
236
- <!-- format="yyyy-MM-dd HH:mm:ss"-->
237
- <!-- :disabled="mark === 1"-->
238
- <!-- :show-reset-button="reset">-->
239
- <!-- </datepicker>-->
240
- </div>
241
- </div>
242
- </div>
243
-
244
- </article>
245
- <footer slot="modal-footer" class="modal-footer">
246
- <template v-if="mark !== 1">
247
- <!-- 去除一户多表 -->
248
- <button type="button" class="btn btn-primary" @click="addUserFile" v-if="false">添加表具</button>
249
- <button type="button" class="btn btn-primary" @click="saveUserFile" :disabled="!$v.valid">确认</button>
250
- </template>
251
- </footer>
252
- </modal>
253
- </template>
254
- <script>
255
- import Vue from 'vue'
256
- import {PagedList} from 'vue-client'
257
- import {HttpResetClass} from 'vue-client'
258
- import {isEmpty} from '../../../components/Util'
259
- // Date格式化
260
- Date.prototype.Format = function (fmt) {
261
- var o = {
262
- 'M+': this.getMonth() + 1, // 月份
263
- 'd+': this.getDate(), // 日
264
- 'H+': this.getHours(), // 小时
265
- 'm+': this.getMinutes(), // 分
266
- 's+': this.getSeconds(), // 秒
267
- 'q+': Math.floor((this.getMonth() + 3) / 3), // 季度
268
- 'S': this.getMilliseconds() // 毫秒
269
- }
270
- if (/(y+)/.test(fmt)) fmt = fmt.replace(RegExp.$1, (this.getFullYear() + '').substr(4 - RegExp.$1.length))
271
- for (var k in o) {
272
- if (new RegExp('(' + k + ')').test(fmt)) fmt = fmt.replace(RegExp.$1, (RegExp.$1.length === 1) ? (o[k]) : (('00' + o[k]).substr(('' + o[k]).length)))
273
- }
274
- return fmt
275
- }
276
-
277
- export default {
278
- title: '安装明细',
279
- props: {
280
- selectdata: {
281
- type: Object
282
- },
283
- mark: {
284
- type: Number,
285
- default: 0
286
- }
287
- },
288
- data () {
289
- return {
290
- showFile: false,
291
- showUserFile: false,
292
- model: new PagedList('rs/sql/getAddresAndUserinfoAndUserfilesAmount', 20, null),
293
- meterbrands: [], // 气表品牌
294
- useradders: null,
295
- userinfo: {},
296
- getfield: {
297
- 'f_address': '地址',
298
- 'f_user_name': '用户姓名/单位名称',
299
- 'f_meternumber': '表号',
300
- 'f_gasbrand': '气表品牌',
301
- 'f_gasmodel': '气表型号',
302
- 'f_metertitles': '表封号',
303
- 'f_meter_base': '表读数',
304
- 'f_initial_base': '初始底数',
305
- 'f_aroundmeter': '表向',
306
- 'f_user_phone': '电话',
307
- 'f_userinfo_comments': '备注',
308
- 'f_position': '安装位置',
309
- 'f_userinfo_code': '用户编号',
310
- 'f_material_name': '材料名称',
311
- 'f_material_style': '材料型号',
312
- 'f_material_price': '材料价格',
313
- 'f_material_unit': '材料单位',
314
- 'f_material_number': '材料数量'
315
- },
316
- showWork: false
317
- }
318
- },
319
- ready () {
320
- this.search()
321
- this.getMeterbrands()
322
- if (this.selectdata.f_apply_type === '团购报建') {
323
- this.notInstalled()
324
- }
325
- },
326
- methods: {
327
- // 删除未保存的表具
328
- async deleteUserFile (index) {
329
- this.userinfo.userfiles.splice(index, 1)
330
- },
331
- // 追加表具
332
- addUserFile() {
333
- this.userinfo.userfiles.push({})
334
- },
335
- // 保存档案
336
- async saveUserFile() {
337
- // 检查必填项
338
- for (let i = 0; i < this.userinfo.userfiles.length; i++) {
339
- let userfile = this.userinfo.userfiles[i]
340
- if (userfile.f_gasbrand_id === null || userfile.f_gasbrand_id === '') {
341
- this.$showMessage(`表具${i+1}气表品牌没有选择!!!`)
342
- return
343
- }
344
- if (userfile.f_gasmodel_id === null || userfile.f_gasmodel_id === '') {
345
- this.$showMessage(`表具${i+1}气表型号没有选择!!!`)
346
- return
347
- }
348
- if (userfile.f_meternumber === null || userfile.f_meternumber === '') {
349
- this.$showMessage(`表具${i+1}表号没有填写!!!`)
350
- return
351
- }
352
- }
353
- let data = {
354
- user: this.$login.f,
355
- useradders: this.useradders,
356
- userinfo: this.userinfo,
357
- selectdata: this.selectdata
358
- }
359
- let res = await this.$resetpost('rs/logic/addInstallationDetails', {data:data}, {
360
- resolveMsg: null,
361
- rejectMsg: '表具添加失败!!!'
362
- })
363
- this.$dispatch('breakControl', this.selectdata)
364
- },
365
- // 检查表号是否存在
366
- async meternumberValidate(i) {
367
- if (!this.userinfo.userfiles[i].f_gasbrand_id) {
368
- this.userinfo.userfiles[i].f_meternumber = ''
369
- this.$showAlert('请先选择气表品牌!!!', 'warning', 3000)
370
- return
371
- }
372
- if (this.userinfo.userfiles[i].f_gasbrand_id && this.userinfo.userfiles[i].f_meternumber) {
373
- let data = {
374
- f_meternumber: this.userinfo.userfiles[i].f_meternumber,
375
- f_gasbrand_id: this.userinfo.userfiles[i].f_gasbrand_id
376
- }
377
- if (this.userinfo.userfiles[i].f_userfiles_id) {
378
- data.f_userfiles_id = this.userinfo.userfiles[i].f_userfiles_id
379
- }
380
- let res = await this.$resetpost('rs/logic/meterbrandsNumberValidate', {data:data}, {
381
- resolveMsg: null,
382
- rejectMsg: '表号验证失败!!'
383
- })
384
- if (res.data) {
385
- this.userinfo.userfiles[i].f_meternumber = ''
386
- this.$showAlert('表号已存在!!', 'warning', 3000)
387
- }
388
- }
389
- },
390
- // 选择气表型号
391
- gasmodelChange(i) {
392
- if (this.userinfo.userfiles[i].gasmodel) {
393
- this.userinfo.userfiles[i].f_gasmodel_id = this.userinfo.userfiles[i].gasmodel.id
394
- }
395
- },
396
- // 选择气表品牌
397
- gasbrandChange(i) {
398
- // 清空已保存的气表型号
399
- this.userinfo.userfiles[i].f_gasmodel_id = null
400
- this.userinfo.userfiles[i].gasmodel = null
401
-
402
- if (this.userinfo.userfiles[i].gasbrand) {
403
- // 气表品牌id
404
- this.userinfo.userfiles[i].f_gasbrand_id = this.userinfo.userfiles[i].gasbrand.id
405
- // 气表分类
406
- this.userinfo.userfiles[i].f_meter_classify = this.userinfo.userfiles[i].gasbrand.f_meter_type
407
- }
408
- },
409
- // 打开安装明细
410
- async showUserFileModal (row) {
411
- this.useradders = row
412
-
413
- let http = new HttpResetClass()
414
- let data = {
415
- condition: `f_userinfo_id = '${row.f_userinfo_id}'`
416
- }
417
- let res = await http.load('POST', 'rs/logic/getUserinfoAndUserfiles', {data:data}, {
418
- resolveMsg: null,
419
- rejectMsg: null
420
- })
421
-
422
- this.userinfo = res.data
423
-
424
- // 已有表具的 气表信息补充
425
- for (let i = 0; i < this.userinfo.userfiles.length; i++) {
426
- for (const item of this.meterbrands) {
427
- if (item.value.id === this.userinfo.userfiles[i].f_gasbrand_id) {
428
- // this.userinfo.userfiles[i].gasbrand = item.value // 防止双向绑定失败
429
- Vue.set(this.userinfo.userfiles[i], 'gasbrand', item.value)
430
- }
431
- }
432
- if (this.userinfo.userfiles[i].gasbrand) {
433
- for (const item of this.userinfo.userfiles[i].gasbrand.gasmodel) {
434
- if (item.value.id === this.userinfo.userfiles[i].f_gasmodel_id) {
435
- // this.userinfo.userfiles[i].gasmodel = item.value
436
- Vue.set(this.userinfo.userfiles[i], 'gasmodel', item.value)
437
- }
438
- }
439
- }
440
- }
441
-
442
- this.showUserFile = true
443
- },
444
- // 获取气表品牌
445
- async getMeterbrands() {
446
- let http = new HttpResetClass()
447
- let data = {
448
- f_orgid: this.$login.f.orgid
449
- }
450
- let res = await http.load('POST', 'rs/logic/getMeterbrands', {data:data}, {
451
- resolveMsg: null,
452
- rejectMsg: null
453
- })
454
- this.meterbrands = res.data
455
- },
456
- async notInstalled () {
457
- let http = new HttpResetClass()
458
- let data = {
459
- condition: `ui.f_process_id = '${this.selectdata.f_process_id}' and uf.f_table_state != '待开通'`
460
- }
461
- let res = await http.load(
462
- 'POST',
463
- 'rs/sql/countApplyUserinfo',
464
- {data: data},
465
- {
466
- resolveMsg: null,
467
- rejectMsg: '安装数量查询失败!!!'
468
- })
469
-
470
- for (const item of this.selectdata.fields) {
471
- if (item.label === '已安装户数') {
472
- item.value = this.selectdata.f_apply_count - res.data[0].num
473
- }
474
- if (item.label === '未安装户数') {
475
- item.value = res.data[0].num
476
- }
477
- }
478
- },
479
- searchCondition (args) {
480
- var tablestate=''
481
- if(this.selectdata.f_sub_state==='完工'){
482
- tablestate='正常'
483
- }else{
484
- tablestate='待开通'
485
- }
486
- if (this.selectdata.f_apply_type === '启封通气') {
487
- args.condition = args.condition + `and ui.f_userinfo_id = '${this.selectdata.f_userinfo_id}'`
488
- } else {
489
- args.condition = args.condition + `and ua.f_process_id = '${this.selectdata.f_process_id}'`
490
- }
491
- this.model.search(args.condition, args.model,tablestate)
492
- },
493
- // 查询
494
- async search () {
495
- this.$refs.cp.$refs.cri.search()
496
- },
497
- // 关闭安装明细
498
- closeUserFile() {
499
- this.showUserFile = false
500
- this.useradders = null
501
- this.userinfo = {}
502
- this.search()
503
- },
504
- // 关闭文件上传对话框
505
- closeFile() {
506
- this.showWork = false
507
- this.showFile = false
508
- // 将选的文件清空
509
- this.$refs.file.$el.querySelector('input').value = ''
510
- this.search()
511
- }
512
- },
513
- events: {
514
- 'beforeFileUpload' (file) {
515
- this.showWork = true
516
- },
517
- async 'onFileUpload'(file, result) {
518
- let data = {
519
- selectdata: this.selectdata,
520
- filepath: result.f_downloadpath,
521
- user: this.$login.f
522
- }
523
- try {
524
- let res = await this.$resetpost(`rs/logic/importAddInstallationDetails`, {data: data}, {
525
- resolveMsg: null,
526
- rejectMsg: '导入失败!!!',
527
- silent: true
528
- }, 0)
529
- } catch (e) {
530
- this.closeFile()
531
- }
532
- this.$dispatch('breakControl', this.selectdata)
533
- }
534
- },
535
- computed: {
536
- pager () {
537
- return this.selectdata.f_apply_type === '团购报建'
538
- },
539
- getCondition () {
540
- let condition = `ua.f_process_id = '${this.selectdata.f_process_id}'`
541
-
542
- return {
543
- condition: condition
544
- }
545
- },
546
- // 安装人
547
- installperson() {
548
- return function (f_install_person) {
549
- if (isEmpty(f_install_person)) {
550
- return this.$login.f.name
551
- }
552
- return f_install_person
553
- }
554
- },
555
- installdate() {
556
- return function (f_install_date) {
557
- if (isEmpty(f_install_date)) {
558
- return new Date().Format('yyyy-MM-dd HH:mm:ss')
559
- }
560
- return f_install_date
561
- }
562
- },
563
- // 表向
564
- aroundmeters() {
565
- return this.$appdata.getParam('左右表')
566
- },
567
- // 安装位置
568
- positions() {
569
- return this.$appdata.getParam('安装位置')
570
- }
571
- },
572
- watch: {
573
- }
574
- }
575
- </script>
576
- <style scoped>
577
- .head-but{
578
- margin-left: 5px;
579
- height: 34px;
580
- /*background-color: #6aa6e2;*/
581
- border-radius: 4px;
582
- font-family: PingFang;
583
- color: #ffffff;
584
- }
585
- /*清除model中的浮动*/
586
- .clearfix:after,.clearfix:before{
587
- display: table;
588
- }
589
- .clearfix:after{
590
- clear: both;
591
- }
592
- .input_view{
593
- padding: 8px;
594
- background-color: #ffffff;
595
- border-radius: 2px;
596
- border: solid 1px #c7c7c7!important;
597
- color: #333333!important;
598
- font-size: 15px!important;
599
- }
600
-
601
- .input_view[readonly]{
602
- border: 1px solid #DDD!important;
603
- color:#ACA899!important;
604
- }
605
- .input_view:disabled{
606
- border: 1px solid #DDD!important;
607
- color:#ACA899!important;
608
- }
609
- </style>
1
+ <template>
2
+ <work-busy :is-busy="showWork" v-show="showWork"></work-busy>
3
+
4
+ <div class="col-sm-12" style="margin: 20px 0px;">
5
+ <criteria-paged :model="model" v-ref:cp :pager="pager">
6
+ <criteria partial='criteria' @condition-changed='$parent.searchCondition' v-ref:cri>
7
+ <div novalidate class="form-horizontal select-overspread container-fluid auto" partial>
8
+ </div>
9
+ </criteria>
10
+ <data-grid :model="model" v-ref:grid partial='list' class="list_area table_sy" style="padding: 0px">
11
+ <template partial='head'>
12
+ <tr>
13
+ <th>序号</th>
14
+ <th>客户编号</th>
15
+ <th>客户名称</th>
16
+ <th>客户电话</th>
17
+ <th>地址信息</th>
18
+ <th v-if="$parent.$parent.$parent.selectdata.f_apply_type === '团购报建'">备注</th>
19
+ <th>表具数量</th>
20
+ <th>
21
+ <template v-if="$parent.$parent.$parent.selectdata.f_apply_type === '团购报建'">
22
+ <button type="button" class="btn btn-info head-but" v-if="$parent.$parent.$parent.mark === 0"
23
+ @click="$parent.$parent.$parent.showFile = !$parent.$parent.$parent.showFile">导入</button>
24
+ <a type="button" class="btn btn-info head-but" v-if="$parent.$parent.$parent.mark === 0"
25
+ href="/apply/download/excel/安装明细.xlsx" download>模板下载</a>
26
+ <export-excel :data="$parent.$parent.$parent.getCondition"
27
+ :field="$parent.$parent.$parent.getfield"
28
+ sqlurl="rs/logic/applyExportfile"
29
+ sql-name="getInstallableAddress"
30
+ template-name='可安装地址'
31
+ btn-name="导出可安装"
32
+ :choose-col="true"></export-excel>
33
+ </template>
34
+ </th>
35
+ </tr>
36
+ </template>
37
+ <template partial='body'>
38
+ <tr>
39
+ <td style="text-align: center;">
40
+ <nobr>{{$index+1}}</nobr>
41
+ </td>
42
+ <td style="text-align: center;">
43
+ <nobr>{{row.f_userinfo_code}}</nobr>
44
+ </td>
45
+ <td style="text-align: center;">
46
+ <nobr>{{row.f_user_name}}</nobr>
47
+ </td>
48
+ <td style="text-align: center;">
49
+ <nobr>{{row.f_user_phone}}</nobr>
50
+ </td>
51
+ <td style="text-align: center;">
52
+ <nobr>{{row.f_address}}</nobr>
53
+ </td>
54
+ <th v-if="$parent.$parent.$parent.selectdata.f_apply_type === '团购报建'">
55
+ <nobr>{{row.f_userinfo_comments}}</nobr>
56
+ </th>
57
+ <td style="text-align: center;">
58
+ <nobr>{{row.f_userfiles_num === null ? 0 : row.f_userfiles_num}}</nobr>
59
+ </td>
60
+ <td style="text-align: center;">
61
+ <nobr>
62
+ <button
63
+ type="button" name="button" class="btn btn-link"
64
+ :disabled="row.f_cumulative_payment_money < $parent.$parent.$parent.selectdata.f_price && $parent.$parent.$parent.selectdata.f_apply_type !== '开发商集体报建'"
65
+ @click="$parent.$parent.$parent.showUserFileModal(row)">
66
+ {{$parent.$parent.$parent.mark === 1 ? '查看' : row.f_userfiles_num > 0 ? '修正' : '添加'}}
67
+ </button>
68
+ </nobr>
69
+ </td>
70
+ </tr>
71
+ </template>
72
+ </data-grid>
73
+ </criteria-paged>
74
+ </div>
75
+ <modal v-if="showFile" :show.sync="showFile" v-ref:modal :backdrop="false" title="选择文件">
76
+ <header slot="modal-header" class="modal-header">
77
+ <button type="button" class="close" @click="closeFile"><span>&times;</span></button>
78
+ <h4 class="modal-title">选择文件</h4>
79
+ </header>
80
+ <article slot="modal-body" class="modal-body">
81
+ <div class="form-group">
82
+ <file-upload class="my-file-uploader" name="useraddressUploadFile" action="rs/file/uploadFile" tagname="确定" v-ref:file></file-upload>
83
+ </div>
84
+ </article>
85
+ <footer slot="modal-footer" class="modal-footer"></footer>
86
+ </modal>
87
+
88
+ <modal v-if="showUserFile" :show.sync="showUserFile" v-ref:modal :large="true" :backdrop="false" title="安装明细">
89
+ <header slot="modal-header" class="modal-header">
90
+ <button type="button" class="close" @click="closeUserFile"><span>&times;</span></button>
91
+ <h4 class="modal-title">安装明细</h4>
92
+ </header>
93
+ <article slot="modal-body" class="modal-body clearfix">
94
+ <div class="form-group col-sm-12">
95
+ <label class="col-sm-2 control-label">地址信息:</label>
96
+ <div class="col-sm-10">
97
+ <input class="form-control input_view" style=""
98
+ v-model="useradders.f_address"
99
+ :value="useradders.f_address"
100
+ :readonly="true"/>
101
+ </div>
102
+ </div>
103
+
104
+ <div v-for="(i, item) in userinfo.userfiles" class="form-group col-sm-12 panel panel-info">
105
+ <div class="panel-heading head col-sm-12" style="background-color: #e8f4ff;margin-bottom: 10px">
106
+ <div class="col-sm-6 text-left">表具{{$index+1}}信息</div>
107
+ <div class="col-sm-6 text-right"><button
108
+ class="button_delete button_spacing"
109
+ v-if="!item.f_userfiles_id"
110
+ @click.prevent="deleteUserFile(i)"
111
+ >删除</button></div>
112
+ </div>
113
+ <div class="form-group col-sm-6" :class="[item.gasbrand ? '' : 'has-error']">
114
+ <label class="col-sm-4 control-label">气表品牌:</label>
115
+ <div class="col-sm-8">
116
+ <input-select
117
+ class="select select_list"
118
+ :value.sync="item.gasbrand"
119
+ v-model="item.gasbrand"
120
+ :options="meterbrands"
121
+ @change="gasbrandChange(i)"
122
+ :disable="mark === 1"
123
+ :valueSingle="true"></input-select>
124
+ </div>
125
+ </div>
126
+ <div class="form-group col-sm-6" :class="[item.gasmodel ? '' : 'has-error']">
127
+ <label class="col-sm-4 control-label">气表型号:</label>
128
+ <div class="col-sm-8">
129
+ <input-select
130
+ class="select select_list"
131
+ :value.sync="item.gasmodel"
132
+ v-model="item.gasmodel"
133
+ :options.sync="item.gasbrand.gasmodel"
134
+ @change="gasmodelChange(i)"
135
+ :disable="mark === 1"
136
+ :valueSingle="true"></input-select>
137
+ </div>
138
+ </div>
139
+ <div class="form-group col-sm-6" :class="[item.f_meternumber ? '' : 'has-error']">
140
+ <label class="col-sm-4 control-label">表&emsp;&emsp;号:</label>
141
+ <div class="col-sm-8">
142
+ <input class="form-control input_view" style=""
143
+ placeholder="表号"
144
+ type="number"
145
+ οnkeyup="this.value=this.value.replace(/\s+/g,'')"
146
+ v-model="item.f_meternumber"
147
+ :value="item.f_meternumber"
148
+ @change="meternumberValidate(i)"
149
+ :readonly="mark === 1"/>
150
+ </div>
151
+ </div>
152
+ <div class="form-group col-sm-6">
153
+ <label class="col-sm-4 control-label">表&ensp;封&ensp;号:</label>
154
+ <div class="col-sm-8">
155
+ <input class="form-control input_view" style=""
156
+ placeholder="表封号"
157
+ v-model="item.f_metertitles"
158
+ :value="item.f_metertitles"
159
+ :readonly="mark === 1"/>
160
+ </div>
161
+ </div>
162
+ <div class="form-group col-sm-6">
163
+ <label class="col-sm-4 control-label">表&ensp;读&ensp;数:</label>
164
+ <div class="col-sm-8">
165
+ <input class="form-control input_view" style=""
166
+ type="number"
167
+ placeholder="表读数"
168
+ v-model="item.f_meter_base"
169
+ :value="item.f_meter_base"
170
+ :readonly="mark === 1"/>
171
+ </div>
172
+ </div>
173
+ <div class="form-group col-sm-6">
174
+ <label class="col-sm-4 control-label">初始底数:</label>
175
+ <div class="col-sm-8">
176
+ <input class="form-control input_view" style=""
177
+ v-model="item.f_initial_base"
178
+ :value="item.f_initial_base"
179
+ placeholder="初始底数"
180
+ :readonly="mark === 1"/>
181
+ </div>
182
+ </div>
183
+ <div class="form-group col-sm-6">
184
+ <label class="col-sm-4 control-label">表&emsp;&emsp;向:</label>
185
+ <div class="col-sm-8">
186
+ <input-select
187
+ class="select select_list"
188
+ :value.sync="item.f_aroundmeter"
189
+ v-model="item.f_aroundmeter"
190
+ :options="aroundmeters"
191
+ :disable="mark === 1"
192
+ :valueSingle="true"></input-select>
193
+ </div>
194
+ </div>
195
+ <div class="form-group col-sm-6">
196
+ <label class="col-sm-4 control-label">安装位置:</label>
197
+ <div class="col-sm-8">
198
+ <input-select
199
+ class="select select_list"
200
+ :value.sync="item.f_position"
201
+ v-model="item.f_position"
202
+ :options="positions"
203
+ :disable="mark === 1"
204
+ :valueSingle="true"></input-select>
205
+ </div>
206
+ </div>
207
+ <div class="form-group col-sm-6">
208
+ <label class="col-sm-4 control-label">安&ensp;装&ensp;人:</label>
209
+ <div class="col-sm-8">
210
+ <input class="form-control input_view" style=""
211
+ v-model="item.f_install_person"
212
+ :value.sync="installperson(item.f_install_person)"
213
+ placeholder="安装人"
214
+ readonly/>
215
+ <!-- <input-select-->
216
+ <!-- class="select select_list"-->
217
+ <!-- :value.sync="item.f_install_person"-->
218
+ <!-- v-model="item.f_install_person"-->
219
+ <!-- :options="installperson"-->
220
+ <!-- :disable="mark === 1"-->
221
+ <!-- :valueSingle="true"></input-select>-->
222
+ </div>
223
+ </div>
224
+ <div class="form-group col-sm-6">
225
+ <label class="col-sm-4 control-label">安装日期:</label>
226
+ <div class="col-sm-8">
227
+ <input class="form-control input_view" style=""
228
+ v-model="item.f_install_date"
229
+ :value.sync="installdate(item.f_install_date)"
230
+ placeholder="安装日期"
231
+ readonly/>
232
+ <!-- <datepicker-->
233
+ <!-- placeholder="安装日期"-->
234
+ <!-- :value.sync="item.f_install_date"-->
235
+ <!-- v-model="item.f_install_date"-->
236
+ <!-- format="yyyy-MM-dd HH:mm:ss"-->
237
+ <!-- :disabled="mark === 1"-->
238
+ <!-- :show-reset-button="reset">-->
239
+ <!-- </datepicker>-->
240
+ </div>
241
+ </div>
242
+ </div>
243
+
244
+ </article>
245
+ <footer slot="modal-footer" class="modal-footer">
246
+ <template v-if="mark !== 1">
247
+ <!-- 去除一户多表 -->
248
+ <button type="button" class="btn btn-primary" @click="addUserFile" v-if="false">添加表具</button>
249
+ <button type="button" class="btn btn-primary" @click="saveUserFile" :disabled="!$v.valid">确认</button>
250
+ </template>
251
+ </footer>
252
+ </modal>
253
+ </template>
254
+ <script>
255
+ import Vue from 'vue'
256
+ import {PagedList} from 'vue-client'
257
+ import {HttpResetClass} from 'vue-client'
258
+ import {isEmpty} from '../../../components/Util'
259
+ // Date格式化
260
+ Date.prototype.Format = function (fmt) {
261
+ var o = {
262
+ 'M+': this.getMonth() + 1, // 月份
263
+ 'd+': this.getDate(), // 日
264
+ 'H+': this.getHours(), // 小时
265
+ 'm+': this.getMinutes(), // 分
266
+ 's+': this.getSeconds(), // 秒
267
+ 'q+': Math.floor((this.getMonth() + 3) / 3), // 季度
268
+ 'S': this.getMilliseconds() // 毫秒
269
+ }
270
+ if (/(y+)/.test(fmt)) fmt = fmt.replace(RegExp.$1, (this.getFullYear() + '').substr(4 - RegExp.$1.length))
271
+ for (var k in o) {
272
+ if (new RegExp('(' + k + ')').test(fmt)) fmt = fmt.replace(RegExp.$1, (RegExp.$1.length === 1) ? (o[k]) : (('00' + o[k]).substr(('' + o[k]).length)))
273
+ }
274
+ return fmt
275
+ }
276
+
277
+ export default {
278
+ title: '安装明细',
279
+ props: {
280
+ selectdata: {
281
+ type: Object
282
+ },
283
+ mark: {
284
+ type: Number,
285
+ default: 0
286
+ }
287
+ },
288
+ data () {
289
+ return {
290
+ showFile: false,
291
+ showUserFile: false,
292
+ model: new PagedList('rs/sql/getAddresAndUserinfoAndUserfilesAmount', 20, null),
293
+ meterbrands: [], // 气表品牌
294
+ useradders: null,
295
+ userinfo: {},
296
+ getfield: {
297
+ 'f_address': '地址',
298
+ 'f_user_name': '用户姓名/单位名称',
299
+ 'f_meternumber': '表号',
300
+ 'f_gasbrand': '气表品牌',
301
+ 'f_gasmodel': '气表型号',
302
+ 'f_metertitles': '表封号',
303
+ 'f_meter_base': '表读数',
304
+ 'f_initial_base': '初始底数',
305
+ 'f_aroundmeter': '表向',
306
+ 'f_user_phone': '电话',
307
+ 'f_userinfo_comments': '备注',
308
+ 'f_position': '安装位置',
309
+ 'f_userinfo_code': '用户编号',
310
+ 'f_material_name': '材料名称',
311
+ 'f_material_style': '材料型号',
312
+ 'f_material_price': '材料价格',
313
+ 'f_material_unit': '材料单位',
314
+ 'f_material_number': '材料数量'
315
+ },
316
+ showWork: false
317
+ }
318
+ },
319
+ ready () {
320
+ this.search()
321
+ this.getMeterbrands()
322
+ if (this.selectdata.f_apply_type === '团购报建') {
323
+ this.notInstalled()
324
+ }
325
+ },
326
+ methods: {
327
+ // 删除未保存的表具
328
+ async deleteUserFile (index) {
329
+ this.userinfo.userfiles.splice(index, 1)
330
+ },
331
+ // 追加表具
332
+ addUserFile() {
333
+ this.userinfo.userfiles.push({})
334
+ },
335
+ // 保存档案
336
+ async saveUserFile() {
337
+ // 检查必填项
338
+ for (let i = 0; i < this.userinfo.userfiles.length; i++) {
339
+ let userfile = this.userinfo.userfiles[i]
340
+ if (userfile.f_gasbrand_id === null || userfile.f_gasbrand_id === '') {
341
+ this.$showMessage(`表具${i+1}气表品牌没有选择!!!`)
342
+ return
343
+ }
344
+ if (userfile.f_gasmodel_id === null || userfile.f_gasmodel_id === '') {
345
+ this.$showMessage(`表具${i+1}气表型号没有选择!!!`)
346
+ return
347
+ }
348
+ if (userfile.f_meternumber === null || userfile.f_meternumber === '') {
349
+ this.$showMessage(`表具${i+1}表号没有填写!!!`)
350
+ return
351
+ }
352
+ }
353
+ let data = {
354
+ user: this.$login.f,
355
+ useradders: this.useradders,
356
+ userinfo: this.userinfo,
357
+ selectdata: this.selectdata
358
+ }
359
+ let res = await this.$resetpost('rs/logic/addInstallationDetails', {data:data}, {
360
+ resolveMsg: null,
361
+ rejectMsg: '表具添加失败!!!'
362
+ })
363
+ this.$dispatch('breakControl', this.selectdata)
364
+ },
365
+ // 检查表号是否存在
366
+ async meternumberValidate(i) {
367
+ if (!this.userinfo.userfiles[i].f_gasbrand_id) {
368
+ this.userinfo.userfiles[i].f_meternumber = ''
369
+ this.$showAlert('请先选择气表品牌!!!', 'warning', 3000)
370
+ return
371
+ }
372
+ if (this.userinfo.userfiles[i].f_gasbrand_id && this.userinfo.userfiles[i].f_meternumber) {
373
+ let data = {
374
+ f_meternumber: this.userinfo.userfiles[i].f_meternumber,
375
+ f_gasbrand_id: this.userinfo.userfiles[i].f_gasbrand_id
376
+ }
377
+ if (this.userinfo.userfiles[i].f_userfiles_id) {
378
+ data.f_userfiles_id = this.userinfo.userfiles[i].f_userfiles_id
379
+ }
380
+ let res = await this.$resetpost('rs/logic/meterbrandsNumberValidate', {data:data}, {
381
+ resolveMsg: null,
382
+ rejectMsg: '表号验证失败!!'
383
+ })
384
+ if (res.data) {
385
+ this.userinfo.userfiles[i].f_meternumber = ''
386
+ this.$showAlert('表号已存在!!', 'warning', 3000)
387
+ }
388
+ }
389
+ },
390
+ // 选择气表型号
391
+ gasmodelChange(i) {
392
+ if (this.userinfo.userfiles[i].gasmodel) {
393
+ this.userinfo.userfiles[i].f_gasmodel_id = this.userinfo.userfiles[i].gasmodel.id
394
+ }
395
+ },
396
+ // 选择气表品牌
397
+ gasbrandChange(i) {
398
+ // 清空已保存的气表型号
399
+ this.userinfo.userfiles[i].f_gasmodel_id = null
400
+ this.userinfo.userfiles[i].gasmodel = null
401
+
402
+ if (this.userinfo.userfiles[i].gasbrand) {
403
+ // 气表品牌id
404
+ this.userinfo.userfiles[i].f_gasbrand_id = this.userinfo.userfiles[i].gasbrand.id
405
+ // 气表分类
406
+ this.userinfo.userfiles[i].f_meter_classify = this.userinfo.userfiles[i].gasbrand.f_meter_type
407
+ }
408
+ },
409
+ // 打开安装明细
410
+ async showUserFileModal (row) {
411
+ this.useradders = row
412
+
413
+ let http = new HttpResetClass()
414
+ let data = {
415
+ condition: `f_userinfo_id = '${row.f_userinfo_id}'`
416
+ }
417
+ let res = await http.load('POST', 'rs/logic/getUserinfoAndUserfiles', {data:data}, {
418
+ resolveMsg: null,
419
+ rejectMsg: null
420
+ })
421
+
422
+ this.userinfo = res.data
423
+
424
+ // 已有表具的 气表信息补充
425
+ for (let i = 0; i < this.userinfo.userfiles.length; i++) {
426
+ for (const item of this.meterbrands) {
427
+ if (item.value.id === this.userinfo.userfiles[i].f_gasbrand_id) {
428
+ // this.userinfo.userfiles[i].gasbrand = item.value // 防止双向绑定失败
429
+ Vue.set(this.userinfo.userfiles[i], 'gasbrand', item.value)
430
+ }
431
+ }
432
+ if (this.userinfo.userfiles[i].gasbrand) {
433
+ for (const item of this.userinfo.userfiles[i].gasbrand.gasmodel) {
434
+ if (item.value.id === this.userinfo.userfiles[i].f_gasmodel_id) {
435
+ // this.userinfo.userfiles[i].gasmodel = item.value
436
+ Vue.set(this.userinfo.userfiles[i], 'gasmodel', item.value)
437
+ }
438
+ }
439
+ }
440
+ }
441
+
442
+ this.showUserFile = true
443
+ },
444
+ // 获取气表品牌
445
+ async getMeterbrands() {
446
+ let http = new HttpResetClass()
447
+ let data = {
448
+ f_orgid: this.$login.f.orgid
449
+ }
450
+ let res = await http.load('POST', 'rs/logic/getMeterbrands', {data:data}, {
451
+ resolveMsg: null,
452
+ rejectMsg: null
453
+ })
454
+ this.meterbrands = res.data
455
+ },
456
+ async notInstalled () {
457
+ let http = new HttpResetClass()
458
+ let data = {
459
+ condition: `ui.f_process_id = '${this.selectdata.f_process_id}' and uf.f_table_state != '待开通'`
460
+ }
461
+ let res = await http.load(
462
+ 'POST',
463
+ 'rs/sql/countApplyUserinfo',
464
+ {data: data},
465
+ {
466
+ resolveMsg: null,
467
+ rejectMsg: '安装数量查询失败!!!'
468
+ })
469
+
470
+ for (const item of this.selectdata.fields) {
471
+ if (item.label === '已安装户数') {
472
+ item.value = this.selectdata.f_apply_count - res.data[0].num
473
+ }
474
+ if (item.label === '未安装户数') {
475
+ item.value = res.data[0].num
476
+ }
477
+ }
478
+ },
479
+ searchCondition (args) {
480
+ var tablestate=''
481
+ if(this.selectdata.f_sub_state==='完工'){
482
+ tablestate='正常'
483
+ }else{
484
+ tablestate='待开通'
485
+ }
486
+ if (this.selectdata.f_apply_type === '启封通气') {
487
+ args.condition = args.condition + `and ui.f_userinfo_id = '${this.selectdata.f_userinfo_id}'`
488
+ } else {
489
+ args.condition = args.condition + `and ua.f_process_id = '${this.selectdata.f_process_id}'`
490
+ }
491
+ this.model.search(args.condition, args.model,tablestate)
492
+ },
493
+ // 查询
494
+ async search () {
495
+ this.$refs.cp.$refs.cri.search()
496
+ },
497
+ // 关闭安装明细
498
+ closeUserFile() {
499
+ this.showUserFile = false
500
+ this.useradders = null
501
+ this.userinfo = {}
502
+ this.search()
503
+ },
504
+ // 关闭文件上传对话框
505
+ closeFile() {
506
+ this.showWork = false
507
+ this.showFile = false
508
+ // 将选的文件清空
509
+ this.$refs.file.$el.querySelector('input').value = ''
510
+ this.search()
511
+ }
512
+ },
513
+ events: {
514
+ 'beforeFileUpload' (file) {
515
+ this.showWork = true
516
+ },
517
+ async 'onFileUpload'(file, result) {
518
+ let data = {
519
+ selectdata: this.selectdata,
520
+ filepath: result.f_downloadpath,
521
+ user: this.$login.f
522
+ }
523
+ try {
524
+ let res = await this.$resetpost(`rs/logic/importAddInstallationDetails`, {data: data}, {
525
+ resolveMsg: null,
526
+ rejectMsg: '导入失败!!!',
527
+ silent: true
528
+ }, 0)
529
+ } catch (e) {
530
+ this.closeFile()
531
+ }
532
+ this.$dispatch('breakControl', this.selectdata)
533
+ }
534
+ },
535
+ computed: {
536
+ pager () {
537
+ return this.selectdata.f_apply_type === '团购报建'
538
+ },
539
+ getCondition () {
540
+ let condition = `ua.f_process_id = '${this.selectdata.f_process_id}'`
541
+
542
+ return {
543
+ condition: condition
544
+ }
545
+ },
546
+ // 安装人
547
+ installperson() {
548
+ return function (f_install_person) {
549
+ if (isEmpty(f_install_person)) {
550
+ return this.$login.f.name
551
+ }
552
+ return f_install_person
553
+ }
554
+ },
555
+ installdate() {
556
+ return function (f_install_date) {
557
+ if (isEmpty(f_install_date)) {
558
+ return new Date().Format('yyyy-MM-dd HH:mm:ss')
559
+ }
560
+ return f_install_date
561
+ }
562
+ },
563
+ // 表向
564
+ aroundmeters() {
565
+ return this.$appdata.getParam('左右表')
566
+ },
567
+ // 安装位置
568
+ positions() {
569
+ return this.$appdata.getParam('安装位置')
570
+ }
571
+ },
572
+ watch: {
573
+ }
574
+ }
575
+ </script>
576
+ <style scoped>
577
+ .head-but{
578
+ margin-left: 5px;
579
+ height: 34px;
580
+ /*background-color: #6aa6e2;*/
581
+ border-radius: 4px;
582
+ font-family: PingFang;
583
+ color: #ffffff;
584
+ }
585
+ /*清除model中的浮动*/
586
+ .clearfix:after,.clearfix:before{
587
+ display: table;
588
+ }
589
+ .clearfix:after{
590
+ clear: both;
591
+ }
592
+ .input_view{
593
+ padding: 8px;
594
+ background-color: #ffffff;
595
+ border-radius: 2px;
596
+ border: solid 1px #c7c7c7!important;
597
+ color: #333333!important;
598
+ font-size: 15px!important;
599
+ }
600
+
601
+ .input_view[readonly]{
602
+ border: 1px solid #DDD!important;
603
+ color:#ACA899!important;
604
+ }
605
+ .input_view:disabled{
606
+ border: 1px solid #DDD!important;
607
+ color:#ACA899!important;
608
+ }
609
+ </style>