apply-clients 3.2.36 → 3.2.38

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "apply-clients",
3
- "version": "3.2.36",
3
+ "version": "3.2.38",
4
4
  "description": "报建前端模块",
5
5
  "main": "src/index.js",
6
6
  "directories": {
@@ -1,515 +1,515 @@
1
- <template>
2
- <div class="col-sm-12" style="margin: 20px 0px;">
3
- <criteria-paged :model="model" v-ref:cp>
4
- <!--criteria无实际意义-->
5
- <criteria partial='criteria' @condition-changed='search' v-ref:cri v-show="false">
6
- <div novalidate class="form-horizontal select-overspread container-fluid auto" partial>
7
- <div class="row">
8
- <div class="form-group col-sm-4">
9
- <label class="font_normal_body">地址:</label>
10
- <input type="text" class="input_search" v-model="model.f_address"
11
- v-on:keyup.enter="$parent.$parent.search()" condition="ua.f_address like '%{}%'" placeholder='地址'>
12
- </div>
13
- </div>
14
- </div>
15
- </criteria>
16
- <data-grid :model="model" v-ref:grid partial='list' class="list_area table_sy" style="padding: 0px">
17
- <template partial='head'>
18
- <tr>
19
- <th style="white-space: nowrap;">序号</th>
20
- <th style="white-space: nowrap;">客户编号</th>
21
- <th style="white-space: nowrap;">客户名称</th>
22
- <th style="white-space: nowrap;">客户电话</th>
23
- <th style="white-space: nowrap;">地址信息</th>
24
- <!-- <th style="white-space: nowrap;">表具数量</th>-->
25
- <th style="white-space: nowrap;" v-if="$parent.$parent.$parent.selectdata.f_apply_type === '散户集体报建' || $parent.$parent.selectdata.f_apply_type === '煤改气报建'">单价(户)</th>
26
- <th style="white-space: nowrap;" v-if="$parent.$parent.$parent.selectdata.f_apply_type === '散户集体报建' || $parent.$parent.selectdata.f_apply_type === '煤改气报建'">累计缴费</th>
27
- <th style="white-space: nowrap;">
28
- <button type="button" class="btn btn-info head-but"
29
- :disabled="$parent.$parent.$parent.mark === 1"
30
- @click="$parent.$parent.$parent.showFile = !$parent.$parent.$parent.showFile">导入</button>
31
- <a v-if="$parent.$parent.$parent.selectdata.f_apply_type === '开发商集体报建'" type="button" class="btn btn-info head-but"
32
- href="/apply/download/excel/批量导入地址及安装明细.xlsx" download>模板下载</a>
33
- <a v-else type="button" class="btn btn-info head-but"
34
- href="/apply/download/excel/安装明细.xlsx" download>模板下载</a>
35
- </th>
36
- </tr>
37
- </template>
38
- <template partial='body'>
39
- <tr>
40
- <td style="text-align: center;">
41
- <nobr>{{$index+1}}</nobr>
42
- </td>
43
- <td style="text-align: center;">
44
- <nobr>{{row.f_userinfo_code}}</nobr>
45
- </td>
46
- <td style="text-align: center;">
47
- <nobr>{{row.f_user_name}}</nobr>
48
- </td>
49
- <td style="text-align: center;">
50
- <nobr>{{row.f_user_phone}}</nobr>
51
- </td>
52
- <td style="text-align: center;">
53
- <nobr>{{row.f_address}}</nobr>
54
- </td>
55
- <!-- <td style="text-align: center;">-->
56
- <!-- <nobr>{{row.f_userfiles_num === null ? 0 : row.f_userfiles_num}}</nobr>-->
57
- <!-- </td>-->
58
- <td style="text-align: center;"
59
- v-if="$parent.$parent.$parent.selectdata.f_apply_type === '散户集体报建' || $parent.$parent.$parent.selectdata.f_apply_type === '煤改气报建'"
60
- >
61
- <nobr>{{$parent.$parent.$parent.selectdata.f_price}}</nobr>
62
- </td>
63
- <td style="text-align: center;"
64
- v-if="$parent.$parent.$parent.selectdata.f_apply_type === '散户集体报建' || $parent.$parent.$parent.selectdata.f_apply_type === '煤改气报建'"
65
- >
66
- <nobr>{{row.f_cumulative_payment_money}}</nobr>
67
- </td>
68
- <td style="text-align: center;">
69
- <nobr>
70
- <button
71
- type="button"
72
- name="button"
73
- class="btn btn-link"
74
- :disabled="(row.f_cumulative_payment_money < $parent.$parent.$parent.selectdata.f_price && ($parent.$parent.$parent.selectdata.f_apply_type === '散户集体报建' || $parent.$parent.$parent.selectdata.f_apply_type === '煤改气报建'))"
75
- @click="$parent.$parent.$parent.showUserFileModal(row)">
76
- {{$parent.$parent.$parent.mark===1 ? '查看': row.f_userfiles_num > 0 ? '修正' : '添加'}}
77
- </button>
78
- </nobr>
79
- </td>
80
- </tr>
81
- </template>
82
- </data-grid>
83
- </criteria-paged>
84
- </div>
85
- <modal v-if="showFile" :show.sync="showFile" v-ref:modal :backdrop="false" title="选择文件">
86
- <header slot="modal-header" class="modal-header">
87
- <button type="button" class="close" @click="closeFile"><span>&times;</span></button>
88
- <h4 class="modal-title">选择文件</h4>
89
- </header>
90
- <article slot="modal-body" class="modal-body">
91
- <div class="form-group">
92
- <file-upload class="my-file-uploader" name="useraddressUploadFile" action="rs/file/uploadFile" tagname="确定" multiple v-ref:file></file-upload>
93
- </div>
94
- </article>
95
- <footer slot="modal-footer" class="modal-footer"></footer>
96
- </modal>
97
-
98
- <modal v-if="showUserFile" :show.sync="showUserFile" v-ref:modal :large="true" :backdrop="false" title="安装明细">
99
- <header slot="modal-header" class="modal-header">
100
- <button type="button" class="close" @click="closeUserFile"><span>&times;</span></button>
101
- <h4 class="modal-title">安装明细</h4>
102
- </header>
103
- <article slot="modal-body" class="modal-body clearfix">
104
- <div class="form-group col-sm-12">
105
- <label class="col-sm-2 control-label">地址信息:</label>
106
- <div class="col-sm-10">
107
- <input class="form-control input_view" style=""
108
- v-model="useradders.f_address"
109
- :value="useradders.f_address"
110
- :readonly="true"/>
111
- </div>
112
- </div>
113
-
114
- <div v-for="(i, item) in userinfo.userfiles" class="form-group col-sm-12 panel panel-info">
115
- <div class="panel-heading head" style="background-color: #e8f4ff;margin-bottom: 10px">表具{{$index+1}}信息</div>
116
- <div class="form-group col-sm-6" :class="item.f_gasbrand_id ? '':'has-error'">
117
- <label class="col-sm-4 control-label">气表品牌:</label>
118
- <div class="col-sm-8">
119
- <input-select
120
- class="select select_list"
121
- :value.sync="item.gasbrand"
122
- v-model="item.gasbrand"
123
- :options="meterbrands"
124
- :disable="mark===1"
125
- @change="gasbrandChange(i)"
126
- :valueSingle="true"></input-select>
127
- </div>
128
- </div>
129
- <div class="form-group col-sm-6" :class="item.f_gasmodel_id ? '':'has-error'">
130
- <label class="col-sm-4 control-label">气表型号:</label>
131
- <div class="col-sm-8">
132
- <input-select
133
- class="select select_list"
134
- :value.sync="item.gasmodel"
135
- v-model="item.gasmodel"
136
- :options="item.gasbrand.gasmodel"
137
- :disable="mark===1"
138
- @change="gasmodelChange(i)"
139
- :valueSingle="true"></input-select>
140
- </div>
141
- </div>
142
- <div class="form-group col-sm-6" :class="item.f_meternumber ? '':'has-error'">
143
- <label class="col-sm-4 control-label">表号:</label>
144
- <div class="col-sm-8">
145
- <input class="form-control input_view" style=""
146
- placeholder="表号"
147
- v-model="item.f_meternumber"
148
- :value="item.f_meternumber"
149
- :disable="mark===1"
150
- @change="meternumberValidate(i)"
151
- :readonly="mark===1"/>
152
- </div>
153
- </div>
154
- <div class="form-group col-sm-6">
155
- <label class="col-sm-4 control-label">表封号:</label>
156
- <div class="col-sm-8">
157
- <input class="form-control input_view" style=""
158
- placeholder="表封号"
159
- v-model="item.f_metertitles"
160
- :value="item.f_metertitles"
161
- :disable="mark===1"
162
- :readonly="mark===1"/>
163
- </div>
164
- </div>
165
- <div class="form-group col-sm-6">
166
- <label class="col-sm-4 control-label">表读数:</label>
167
- <div class="col-sm-8">
168
- <input class="form-control input_view" style=""
169
- type="number"
170
- placeholder="表读数"
171
- v-model="item.f_meter_base"
172
- :value="item.f_meter_base"
173
- :disable="mark===1"
174
- :readonly="mark===1"/>
175
- </div>
176
- </div>
177
- <div class="form-group col-sm-6">
178
- <label class="col-sm-4 control-label">初始底数:</label>
179
- <div class="col-sm-8">
180
- <input class="form-control input_view" style=""
181
- type="number"
182
- v-model="item.f_initial_base"
183
- :value="item.f_initial_base"
184
- :disable="mark===1"
185
- placeholder="初始底数"
186
- :readonly="mark===1"/>
187
- </div>
188
- </div>
189
- <div class="form-group col-sm-6">
190
- <label class="col-sm-4 control-label">表向:</label>
191
- <div class="col-sm-8">
192
- <input-select
193
- class="select select_list"
194
- :value.sync="item.f_aroundmeter"
195
- v-model="item.f_aroundmeter"
196
- :disable="mark===1"
197
- :options="aroundmeters"
198
- :valueSingle="true"></input-select>
199
- </div>
200
- </div>
201
- <div class="form-group col-sm-6">
202
- <label class="col-sm-4 control-label">安装位置:</label>
203
- <div class="col-sm-8">
204
- <input-select
205
- class="select select_list"
206
- :value.sync="item.f_position"
207
- v-model="item.f_position"
208
- :disable="mark===1"
209
- :options="positions"
210
- :valueSingle="true"></input-select>
211
- </div>
212
- </div>
213
- <div class="form-group col-sm-6">
214
- <label class="col-sm-4 control-label">安装人:</label>
215
- <div class="col-sm-8">
216
- <input-select
217
- class="select select_list"
218
- :value.sync="item.f_install_person"
219
- v-model="item.f_install_person"
220
- :disable="mark===1"
221
- :options="installperson"
222
- :valueSingle="true"></input-select>
223
- </div>
224
- </div>
225
- <div class="form-group col-sm-6">
226
- <label class="col-sm-4 control-label">安装日期:</label>
227
- <div class="col-sm-8">
228
- <datepicker
229
- placeholder="安装日期"
230
- :value.sync="item.f_install_date"
231
- v-model="item.f_install_date"
232
- format="yyyy-MM-dd HH:mm:ss"
233
- :disable="mark===1"
234
- :show-reset-button="reset">
235
- </datepicker>
236
- </div>
237
- </div>
238
- </div>
239
-
240
- </article>
241
- <footer slot="modal-footer" class="modal-footer">
242
- <!-- 去除一户多表 -->
243
- <button type="button" class="btn btn-primary" @click="addUserFile" v-if="false">添加表具</button>
244
- <button type="button" class="btn btn-primary" @click="saveUserFile">确认</button>
245
- </footer>
246
- </modal>
247
- </template>
248
- <script>
249
- import Vue from 'vue'
250
- import {PagedList} from 'vue-client'
251
- import {HttpResetClass} from 'vue-client'
252
- import {isEmpty} from '../../../Util'
253
-
254
- export default {
255
- title: '安装明细',
256
- props: {
257
- selectdata: {
258
- type: Object
259
- },
260
- mark: {
261
- type: Number,
262
- default: 0
263
- }
264
- },
265
- data () {
266
- return {
267
- showFile: false,
268
- showUserFile: false,
269
- model: new PagedList('rs/sql/getAddresAndUserinfoAndUserfilesAmount', 30, {
270
- data: {
271
- f_process_id: this.selectdata.f_process_id
272
- }
273
- }),
274
- meterbrands: [], // 气表品牌
275
- useradders: null,
276
- userinfo: {}
277
- }
278
- },
279
- ready () {
280
- this.search()
281
- this.getMeterbrands()
282
- this.notInstalled()
283
- },
284
- methods: {
285
- async notInstalled () {
286
- let http = new HttpResetClass()
287
- let data = {
288
- condition: null
289
- }
290
- if (this.selectdata.f_apply_type === '开发商集体报建') {
291
- data.condition = `ui.f_process_id = '${this.selectdata.f_process_id}'`
292
- } else {
293
- data.condition = `ui.f_process_id = '${this.selectdata.f_process_id}' and uf.f_table_state = '正常'`
294
- }
295
-
296
- let res = await http.load('POST', 'rs/sql/notInstalled', {data: data}, {resolveMsg: null, rejectMsg: null})
297
-
298
-
299
- for (const item of this.selectdata.fields) {
300
- if (item.label === '已安装户数') {
301
- item.value = res.data[0].num
302
- }
303
- if (item.label === '未安装户数') {
304
- item.value = this.selectdata.f_apply_count - res.data[0].num
305
- }
306
- }
307
- },
308
- // 保存档案
309
- async saveUserFile() {
310
- if (this.userinfo.userfiles.length > 1) {
311
- this.$showAlert('该地址下已有表具信息,暂不支持一户多表!!!', 'warning', 3000)
312
- return
313
- }
314
- // 检查必填项
315
- for (let i = 0; i < this.userinfo.userfiles.length; i++) {
316
- let userfile = this.userinfo.userfiles[i]
317
- if (userfile.f_gasbrand_id === null || userfile.f_gasbrand_id === '') {
318
- this.$showAlert(`表具${i+1}气表品牌没有选择!!!`, 'warning', 3000)
319
- return
320
- }
321
- if (userfile.f_gasmodel_id === null || userfile.f_gasmodel_id === '') {
322
- this.$showAlert(`表具${i+1}气表型号没有选择!!!`, 'warning', 3000)
323
- return
324
- }
325
- if (userfile.f_meternumber === null || userfile.f_meternumber === '') {
326
- this.$showAlert(`表具${i+1}表号没有填写!!!`, 'warning', 3000)
327
- return
328
- }
329
- }
330
- let data = {
331
- user: this.$login.f,
332
- useradders: this.useradders,
333
- userinfo: this.userinfo,
334
- selectdata: this.selectdata
335
- }
336
- let res = await this.$resetpost('rs/logic/addInstallationDetails', {data:data}, {
337
- resolveMsg: null,
338
- rejectMsg: '表具添加失败!!!'
339
- })
340
- this.$dispatch('breakControl', this.selectdata)
341
- },
342
- // 检查表号是否存在
343
- async meternumberValidate(i) {
344
- if (!this.userinfo.userfiles[i].f_gasbrand_id) {
345
- this.userinfo.userfiles[i].f_meternumber = ''
346
- this.$showAlert('请先选择气表品牌!!!', 'warning', 3000)
347
- return
348
- }
349
- if (this.userinfo.userfiles[i].f_gasbrand_id && this.userinfo.userfiles[i].f_meternumber) {
350
- let data = {
351
- f_meternumber: this.userinfo.userfiles[i].f_meternumber,
352
- f_gasbrand_id: this.userinfo.userfiles[i].f_gasbrand_id
353
- }
354
- if (this.userinfo.userfiles[i].f_userfiles_id) {
355
- data.f_userfiles_id = this.userinfo.userfiles[i].f_userfiles_id
356
- }
357
- let res = await this.$resetpost('rs/logic/meterbrandsNumberValidate', {data:data}, {
358
- resolveMsg: null,
359
- rejectMsg: '表号验证失败!!'
360
- })
361
- if (res.data) {
362
- this.userinfo.userfiles[i].f_meternumber = ''
363
- this.$showAlert('表号已存在!!', 'warning', 3000)
364
- }
365
- }
366
- },
367
- // 选择气表型号
368
- gasmodelChange(i) {
369
- if (this.userinfo.userfiles[i].gasmodel) {
370
- this.userinfo.userfiles[i].f_gasmodel_id = this.userinfo.userfiles[i].gasmodel.id
371
- }
372
- },
373
- // 选择气表品牌
374
- gasbrandChange(i) {
375
- // 清空已保存的气表型号
376
- this.userinfo.userfiles[i].f_gasmodel_id = null
377
- this.userinfo.userfiles[i].gasmodel = null
378
- if (this.userinfo.userfiles[i].gasbrand) {
379
- // 气表品牌id
380
- this.userinfo.userfiles[i].f_gasbrand_id = this.userinfo.userfiles[i].gasbrand.id
381
- // 气表分类
382
- this.userinfo.userfiles[i].f_meter_classify = this.userinfo.userfiles[i].gasbrand.f_meter_type
383
- }
384
- },
385
- // 追加表具
386
- addUserFile() {
387
- this.userinfo.userfiles.push({})
388
- },
389
- // 打开安装明细
390
- async showUserFileModal (row) {
391
- this.useradders = row
392
-
393
- let http = new HttpResetClass()
394
- let data = {
395
- condition: `f_userinfo_id='${row.f_userinfo_id}'`
396
- }
397
- let res = await http.load('POST', 'rs/logic/getUserinfoAndUserfiles', {data:data}, {
398
- resolveMsg: null,
399
- rejectMsg: null
400
- })
401
-
402
- this.userinfo = res.data
403
-
404
- // 已有表具的 气表信息补充
405
- for (const userfile of this.userinfo.userfiles) {
406
- for (const item of this.meterbrands) {
407
- if (item.value.id === userfile.f_gasbrand_id) {
408
- userfile.gasbrand = item.value
409
- }
410
- }
411
- if (userfile.gasbrand) {
412
- for (const item of userfile.gasbrand.gasmodel) {
413
- if (item.value.id === userfile.f_gasmodel_id) {
414
- userfile.gasmodel = item.value
415
- }
416
- }
417
- }
418
- }
419
-
420
- this.showUserFile = true
421
- },
422
- // 获取气表品牌
423
- async getMeterbrands() {
424
- let http = new HttpResetClass()
425
- let data = {
426
- f_filialeid: this.$login.f.orgid
427
- }
428
- let res = await http.load('POST', 'rs/logic/getMeterbrands', {data:data}, {
429
- resolveMsg: null,
430
- rejectMsg: null
431
- })
432
- this.meterbrands = res.data
433
- },
434
- // 查询
435
- async search () {
436
- this.$refs.cp.$refs.cri.search()
437
- },
438
- // 关闭安装明细
439
- closeUserFile() {
440
- this.showUserFile = false
441
- this.useradders = null
442
- this.userinfo = null
443
- this.search()
444
- },
445
- // 关闭文件上传对话框
446
- closeFile() {
447
- this.showFile = false
448
- // 将选的文件清空
449
- this.$refs.file.$el.querySelector('input').value = ''
450
- this.search()
451
- }
452
- },
453
- events: {
454
- async 'onFileUpload'(file, result) {
455
- let data = {
456
- selectdata: this.selectdata,
457
- filepath: result.f_downloadpath,
458
- user: this.$login.f
459
- }
460
- let url = null
461
- if (this.selectdata.f_apply_type === '开发商集体报建') {
462
- url = 'rs/logic/importAddressUserFiles'
463
- } else {
464
- url = 'rs/logic/importAddInstallationDetails'
465
- }
466
-
467
- let res = await this.$resetpost(url, {data:data}, {resolveMsg: null, rejectMsg: '导入失败', silent: true}, 0)
468
- if(res.data.type === "success"){
469
- this.$showAlert("导入信息:"+res.data.msg, res.data.type, 2000);
470
- }else{
471
- this.$showMessage(res.data.msg);
472
- }
473
- this.$dispatch('breakControl', this.selectdata)
474
- }
475
- },
476
- computed: {
477
- // 安装人
478
- installperson() {
479
- return this.$login.f.f_installman.map(item => {
480
- return {
481
- label: item.name,
482
- value: item.name
483
- }
484
- })
485
- },
486
- // 表向
487
- aroundmeters() {
488
- return this.$appdata.getParam('左右表')
489
- },
490
- // 安装位置
491
- positions() {
492
- return this.$appdata.getParam('安装位置')
493
- }
494
- },
495
- watch: {
496
- }
497
- }
498
- </script>
499
- <style scoped>
500
- .head-but{
501
- margin-left: 5px;
502
- height: 34px;
503
- /*background-color: #6aa6e2;*/
504
- border-radius: 4px;
505
- font-family: PingFang;
506
- color: #ffffff;
507
- }
508
- /*清除model中的浮动*/
509
- .clearfix:after,.clearfix:before{
510
- display: table;
511
- }
512
- .clearfix:after{
513
- clear: both;
514
- }
515
- </style>
1
+ <template>
2
+ <div class="col-sm-12" style="margin: 20px 0px;">
3
+ <criteria-paged :model="model" v-ref:cp>
4
+ <!--criteria无实际意义-->
5
+ <criteria partial='criteria' @condition-changed='search' v-ref:cri v-show="false">
6
+ <div novalidate class="form-horizontal select-overspread container-fluid auto" partial>
7
+ <div class="row">
8
+ <div class="form-group col-sm-4">
9
+ <label class="font_normal_body">地址:</label>
10
+ <input type="text" class="input_search" v-model="model.f_address"
11
+ v-on:keyup.enter="$parent.$parent.search()" condition="ua.f_address like '%{}%'" placeholder='地址'>
12
+ </div>
13
+ </div>
14
+ </div>
15
+ </criteria>
16
+ <data-grid :model="model" v-ref:grid partial='list' class="list_area table_sy" style="padding: 0px">
17
+ <template partial='head'>
18
+ <tr>
19
+ <th style="white-space: nowrap;">序号</th>
20
+ <th style="white-space: nowrap;">客户编号</th>
21
+ <th style="white-space: nowrap;">客户名称</th>
22
+ <th style="white-space: nowrap;">客户电话</th>
23
+ <th style="white-space: nowrap;">地址信息</th>
24
+ <!-- <th style="white-space: nowrap;">表具数量</th>-->
25
+ <th style="white-space: nowrap;" v-if="$parent.$parent.$parent.selectdata.f_apply_type === '散户集体报建' || $parent.$parent.selectdata.f_apply_type === '煤改气报建'">单价(户)</th>
26
+ <th style="white-space: nowrap;" v-if="$parent.$parent.$parent.selectdata.f_apply_type === '散户集体报建' || $parent.$parent.selectdata.f_apply_type === '煤改气报建'">累计缴费</th>
27
+ <th style="white-space: nowrap;">
28
+ <button type="button" class="btn btn-info head-but"
29
+ :disabled="$parent.$parent.$parent.mark === 1"
30
+ @click="$parent.$parent.$parent.showFile = !$parent.$parent.$parent.showFile">导入</button>
31
+ <a v-if="$parent.$parent.$parent.selectdata.f_apply_type === '开发商集体报建'" type="button" class="btn btn-info head-but"
32
+ href="/apply/download/excel/批量导入地址及安装明细.xlsx" download>模板下载</a>
33
+ <a v-else type="button" class="btn btn-info head-but"
34
+ href="/apply/download/excel/安装明细.xlsx" download>模板下载</a>
35
+ </th>
36
+ </tr>
37
+ </template>
38
+ <template partial='body'>
39
+ <tr>
40
+ <td style="text-align: center;">
41
+ <nobr>{{$index+1}}</nobr>
42
+ </td>
43
+ <td style="text-align: center;">
44
+ <nobr>{{row.f_userinfo_code}}</nobr>
45
+ </td>
46
+ <td style="text-align: center;">
47
+ <nobr>{{row.f_user_name}}</nobr>
48
+ </td>
49
+ <td style="text-align: center;">
50
+ <nobr>{{row.f_user_phone}}</nobr>
51
+ </td>
52
+ <td style="text-align: center;">
53
+ <nobr>{{row.f_address}}</nobr>
54
+ </td>
55
+ <!-- <td style="text-align: center;">-->
56
+ <!-- <nobr>{{row.f_userfiles_num === null ? 0 : row.f_userfiles_num}}</nobr>-->
57
+ <!-- </td>-->
58
+ <td style="text-align: center;"
59
+ v-if="$parent.$parent.$parent.selectdata.f_apply_type === '散户集体报建' || $parent.$parent.$parent.selectdata.f_apply_type === '煤改气报建'"
60
+ >
61
+ <nobr>{{$parent.$parent.$parent.selectdata.f_price}}</nobr>
62
+ </td>
63
+ <td style="text-align: center;"
64
+ v-if="$parent.$parent.$parent.selectdata.f_apply_type === '散户集体报建' || $parent.$parent.$parent.selectdata.f_apply_type === '煤改气报建'"
65
+ >
66
+ <nobr>{{row.f_cumulative_payment_money}}</nobr>
67
+ </td>
68
+ <td style="text-align: center;">
69
+ <nobr>
70
+ <button
71
+ type="button"
72
+ name="button"
73
+ class="btn btn-link"
74
+ :disabled="(row.f_cumulative_payment_money < $parent.$parent.$parent.selectdata.f_price && ($parent.$parent.$parent.selectdata.f_apply_type === '散户集体报建' || $parent.$parent.$parent.selectdata.f_apply_type === '煤改气报建'))"
75
+ @click="$parent.$parent.$parent.showUserFileModal(row)">
76
+ {{$parent.$parent.$parent.mark===1 ? '查看': row.f_userfiles_num > 0 ? '修正' : '添加'}}
77
+ </button>
78
+ </nobr>
79
+ </td>
80
+ </tr>
81
+ </template>
82
+ </data-grid>
83
+ </criteria-paged>
84
+ </div>
85
+ <modal v-if="showFile" :show.sync="showFile" v-ref:modal :backdrop="false" title="选择文件">
86
+ <header slot="modal-header" class="modal-header">
87
+ <button type="button" class="close" @click="closeFile"><span>&times;</span></button>
88
+ <h4 class="modal-title">选择文件</h4>
89
+ </header>
90
+ <article slot="modal-body" class="modal-body">
91
+ <div class="form-group">
92
+ <file-upload class="my-file-uploader" name="useraddressUploadFile" action="rs/file/uploadFile" tagname="确定" multiple v-ref:file></file-upload>
93
+ </div>
94
+ </article>
95
+ <footer slot="modal-footer" class="modal-footer"></footer>
96
+ </modal>
97
+
98
+ <modal v-if="showUserFile" :show.sync="showUserFile" v-ref:modal :large="true" :backdrop="false" title="安装明细">
99
+ <header slot="modal-header" class="modal-header">
100
+ <button type="button" class="close" @click="closeUserFile"><span>&times;</span></button>
101
+ <h4 class="modal-title">安装明细</h4>
102
+ </header>
103
+ <article slot="modal-body" class="modal-body clearfix">
104
+ <div class="form-group col-sm-12">
105
+ <label class="col-sm-2 control-label">地址信息:</label>
106
+ <div class="col-sm-10">
107
+ <input class="form-control input_view" style=""
108
+ v-model="useradders.f_address"
109
+ :value="useradders.f_address"
110
+ :readonly="true"/>
111
+ </div>
112
+ </div>
113
+
114
+ <div v-for="(i, item) in userinfo.userfiles" class="form-group col-sm-12 panel panel-info">
115
+ <div class="panel-heading head" style="background-color: #e8f4ff;margin-bottom: 10px">表具{{$index+1}}信息</div>
116
+ <div class="form-group col-sm-6" :class="item.f_gasbrand_id ? '':'has-error'">
117
+ <label class="col-sm-4 control-label">气表品牌:</label>
118
+ <div class="col-sm-8">
119
+ <input-select
120
+ class="select select_list"
121
+ :value.sync="item.gasbrand"
122
+ v-model="item.gasbrand"
123
+ :options="meterbrands"
124
+ :disable="mark===1"
125
+ @change="gasbrandChange(i)"
126
+ :valueSingle="true"></input-select>
127
+ </div>
128
+ </div>
129
+ <div class="form-group col-sm-6" :class="item.f_gasmodel_id ? '':'has-error'">
130
+ <label class="col-sm-4 control-label">气表型号:</label>
131
+ <div class="col-sm-8">
132
+ <input-select
133
+ class="select select_list"
134
+ :value.sync="item.gasmodel"
135
+ v-model="item.gasmodel"
136
+ :options="item.gasbrand.gasmodel"
137
+ :disable="mark===1"
138
+ @change="gasmodelChange(i)"
139
+ :valueSingle="true"></input-select>
140
+ </div>
141
+ </div>
142
+ <div class="form-group col-sm-6" :class="item.f_meternumber ? '':'has-error'">
143
+ <label class="col-sm-4 control-label">表号:</label>
144
+ <div class="col-sm-8">
145
+ <input class="form-control input_view" style=""
146
+ placeholder="表号"
147
+ v-model="item.f_meternumber"
148
+ :value="item.f_meternumber"
149
+ :disable="mark===1"
150
+ @change="meternumberValidate(i)"
151
+ :readonly="mark===1"/>
152
+ </div>
153
+ </div>
154
+ <div class="form-group col-sm-6">
155
+ <label class="col-sm-4 control-label">表封号:</label>
156
+ <div class="col-sm-8">
157
+ <input class="form-control input_view" style=""
158
+ placeholder="表封号"
159
+ v-model="item.f_metertitles"
160
+ :value="item.f_metertitles"
161
+ :disable="mark===1"
162
+ :readonly="mark===1"/>
163
+ </div>
164
+ </div>
165
+ <div class="form-group col-sm-6">
166
+ <label class="col-sm-4 control-label">表读数:</label>
167
+ <div class="col-sm-8">
168
+ <input class="form-control input_view" style=""
169
+ type="number"
170
+ placeholder="表读数"
171
+ v-model="item.f_meter_base"
172
+ :value="item.f_meter_base"
173
+ :disable="mark===1"
174
+ :readonly="mark===1"/>
175
+ </div>
176
+ </div>
177
+ <div class="form-group col-sm-6">
178
+ <label class="col-sm-4 control-label">初始底数:</label>
179
+ <div class="col-sm-8">
180
+ <input class="form-control input_view" style=""
181
+ type="number"
182
+ v-model="item.f_initial_base"
183
+ :value="item.f_initial_base"
184
+ :disable="mark===1"
185
+ placeholder="初始底数"
186
+ :readonly="mark===1"/>
187
+ </div>
188
+ </div>
189
+ <div class="form-group col-sm-6">
190
+ <label class="col-sm-4 control-label">表向:</label>
191
+ <div class="col-sm-8">
192
+ <input-select
193
+ class="select select_list"
194
+ :value.sync="item.f_aroundmeter"
195
+ v-model="item.f_aroundmeter"
196
+ :disable="mark===1"
197
+ :options="aroundmeters"
198
+ :valueSingle="true"></input-select>
199
+ </div>
200
+ </div>
201
+ <div class="form-group col-sm-6">
202
+ <label class="col-sm-4 control-label">安装位置:</label>
203
+ <div class="col-sm-8">
204
+ <input-select
205
+ class="select select_list"
206
+ :value.sync="item.f_position"
207
+ v-model="item.f_position"
208
+ :disable="mark===1"
209
+ :options="positions"
210
+ :valueSingle="true"></input-select>
211
+ </div>
212
+ </div>
213
+ <div class="form-group col-sm-6">
214
+ <label class="col-sm-4 control-label">安装人:</label>
215
+ <div class="col-sm-8">
216
+ <input-select
217
+ class="select select_list"
218
+ :value.sync="item.f_install_person"
219
+ v-model="item.f_install_person"
220
+ :disable="mark===1"
221
+ :options="installperson"
222
+ :valueSingle="true"></input-select>
223
+ </div>
224
+ </div>
225
+ <div class="form-group col-sm-6">
226
+ <label class="col-sm-4 control-label">安装日期:</label>
227
+ <div class="col-sm-8">
228
+ <datepicker
229
+ placeholder="安装日期"
230
+ :value.sync="item.f_install_date"
231
+ v-model="item.f_install_date"
232
+ format="yyyy-MM-dd HH:mm:ss"
233
+ :disable="mark===1"
234
+ :show-reset-button="reset">
235
+ </datepicker>
236
+ </div>
237
+ </div>
238
+ </div>
239
+
240
+ </article>
241
+ <footer slot="modal-footer" class="modal-footer">
242
+ <!-- 去除一户多表 -->
243
+ <button type="button" class="btn btn-primary" @click="addUserFile" v-if="false">添加表具</button>
244
+ <button type="button" class="btn btn-primary" @click="saveUserFile">确认</button>
245
+ </footer>
246
+ </modal>
247
+ </template>
248
+ <script>
249
+ import Vue from 'vue'
250
+ import {PagedList} from 'vue-client'
251
+ import {HttpResetClass} from 'vue-client'
252
+ import {isEmpty} from '../../../Util'
253
+
254
+ export default {
255
+ title: '安装明细',
256
+ props: {
257
+ selectdata: {
258
+ type: Object
259
+ },
260
+ mark: {
261
+ type: Number,
262
+ default: 0
263
+ }
264
+ },
265
+ data () {
266
+ return {
267
+ showFile: false,
268
+ showUserFile: false,
269
+ model: new PagedList('rs/sql/getAddresAndUserinfoAndUserfilesAmount', 30, {
270
+ data: {
271
+ f_process_id: this.selectdata.f_process_id
272
+ }
273
+ }),
274
+ meterbrands: [], // 气表品牌
275
+ useradders: null,
276
+ userinfo: {}
277
+ }
278
+ },
279
+ ready () {
280
+ this.search()
281
+ this.getMeterbrands()
282
+ this.notInstalled()
283
+ },
284
+ methods: {
285
+ async notInstalled () {
286
+ let http = new HttpResetClass()
287
+ let data = {
288
+ condition: null
289
+ }
290
+ if (this.selectdata.f_apply_type === '开发商集体报建') {
291
+ data.condition = `ui.f_process_id = '${this.selectdata.f_process_id}'`
292
+ } else {
293
+ data.condition = `ui.f_process_id = '${this.selectdata.f_process_id}' and uf.f_table_state != '无效'`
294
+ }
295
+
296
+ let res = await http.load('POST', 'rs/sql/notInstalled', {data: data}, {resolveMsg: null, rejectMsg: null})
297
+
298
+
299
+ for (const item of this.selectdata.fields) {
300
+ if (item.label === '已安装户数') {
301
+ item.value = res.data[0].num
302
+ }
303
+ if (item.label === '未安装户数') {
304
+ item.value = this.selectdata.f_apply_count - res.data[0].num
305
+ }
306
+ }
307
+ },
308
+ // 保存档案
309
+ async saveUserFile() {
310
+ if (this.userinfo.userfiles.length > 1) {
311
+ this.$showAlert('该地址下已有表具信息,暂不支持一户多表!!!', 'warning', 3000)
312
+ return
313
+ }
314
+ // 检查必填项
315
+ for (let i = 0; i < this.userinfo.userfiles.length; i++) {
316
+ let userfile = this.userinfo.userfiles[i]
317
+ if (userfile.f_gasbrand_id === null || userfile.f_gasbrand_id === '') {
318
+ this.$showAlert(`表具${i+1}气表品牌没有选择!!!`, 'warning', 3000)
319
+ return
320
+ }
321
+ if (userfile.f_gasmodel_id === null || userfile.f_gasmodel_id === '') {
322
+ this.$showAlert(`表具${i+1}气表型号没有选择!!!`, 'warning', 3000)
323
+ return
324
+ }
325
+ if (userfile.f_meternumber === null || userfile.f_meternumber === '') {
326
+ this.$showAlert(`表具${i+1}表号没有填写!!!`, 'warning', 3000)
327
+ return
328
+ }
329
+ }
330
+ let data = {
331
+ user: this.$login.f,
332
+ useradders: this.useradders,
333
+ userinfo: this.userinfo,
334
+ selectdata: this.selectdata
335
+ }
336
+ let res = await this.$resetpost('rs/logic/addInstallationDetails', {data:data}, {
337
+ resolveMsg: null,
338
+ rejectMsg: '表具添加失败!!!'
339
+ })
340
+ this.$dispatch('breakControl', this.selectdata)
341
+ },
342
+ // 检查表号是否存在
343
+ async meternumberValidate(i) {
344
+ if (!this.userinfo.userfiles[i].f_gasbrand_id) {
345
+ this.userinfo.userfiles[i].f_meternumber = ''
346
+ this.$showAlert('请先选择气表品牌!!!', 'warning', 3000)
347
+ return
348
+ }
349
+ if (this.userinfo.userfiles[i].f_gasbrand_id && this.userinfo.userfiles[i].f_meternumber) {
350
+ let data = {
351
+ f_meternumber: this.userinfo.userfiles[i].f_meternumber,
352
+ f_gasbrand_id: this.userinfo.userfiles[i].f_gasbrand_id
353
+ }
354
+ if (this.userinfo.userfiles[i].f_userfiles_id) {
355
+ data.f_userfiles_id = this.userinfo.userfiles[i].f_userfiles_id
356
+ }
357
+ let res = await this.$resetpost('rs/logic/meterbrandsNumberValidate', {data:data}, {
358
+ resolveMsg: null,
359
+ rejectMsg: '表号验证失败!!'
360
+ })
361
+ if (res.data) {
362
+ this.userinfo.userfiles[i].f_meternumber = ''
363
+ this.$showAlert('表号已存在!!', 'warning', 3000)
364
+ }
365
+ }
366
+ },
367
+ // 选择气表型号
368
+ gasmodelChange(i) {
369
+ if (this.userinfo.userfiles[i].gasmodel) {
370
+ this.userinfo.userfiles[i].f_gasmodel_id = this.userinfo.userfiles[i].gasmodel.id
371
+ }
372
+ },
373
+ // 选择气表品牌
374
+ gasbrandChange(i) {
375
+ // 清空已保存的气表型号
376
+ this.userinfo.userfiles[i].f_gasmodel_id = null
377
+ this.userinfo.userfiles[i].gasmodel = null
378
+ if (this.userinfo.userfiles[i].gasbrand) {
379
+ // 气表品牌id
380
+ this.userinfo.userfiles[i].f_gasbrand_id = this.userinfo.userfiles[i].gasbrand.id
381
+ // 气表分类
382
+ this.userinfo.userfiles[i].f_meter_classify = this.userinfo.userfiles[i].gasbrand.f_meter_type
383
+ }
384
+ },
385
+ // 追加表具
386
+ addUserFile() {
387
+ this.userinfo.userfiles.push({})
388
+ },
389
+ // 打开安装明细
390
+ async showUserFileModal (row) {
391
+ this.useradders = row
392
+
393
+ let http = new HttpResetClass()
394
+ let data = {
395
+ condition: `f_userinfo_id='${row.f_userinfo_id}'`
396
+ }
397
+ let res = await http.load('POST', 'rs/logic/getUserinfoAndUserfiles', {data:data}, {
398
+ resolveMsg: null,
399
+ rejectMsg: null
400
+ })
401
+
402
+ this.userinfo = res.data
403
+
404
+ // 已有表具的 气表信息补充
405
+ for (const userfile of this.userinfo.userfiles) {
406
+ for (const item of this.meterbrands) {
407
+ if (item.value.id === userfile.f_gasbrand_id) {
408
+ userfile.gasbrand = item.value
409
+ }
410
+ }
411
+ if (userfile.gasbrand) {
412
+ for (const item of userfile.gasbrand.gasmodel) {
413
+ if (item.value.id === userfile.f_gasmodel_id) {
414
+ userfile.gasmodel = item.value
415
+ }
416
+ }
417
+ }
418
+ }
419
+
420
+ this.showUserFile = true
421
+ },
422
+ // 获取气表品牌
423
+ async getMeterbrands() {
424
+ let http = new HttpResetClass()
425
+ let data = {
426
+ f_filialeid: this.$login.f.orgid
427
+ }
428
+ let res = await http.load('POST', 'rs/logic/getMeterbrands', {data:data}, {
429
+ resolveMsg: null,
430
+ rejectMsg: null
431
+ })
432
+ this.meterbrands = res.data
433
+ },
434
+ // 查询
435
+ async search () {
436
+ this.$refs.cp.$refs.cri.search()
437
+ },
438
+ // 关闭安装明细
439
+ closeUserFile() {
440
+ this.showUserFile = false
441
+ this.useradders = null
442
+ this.userinfo = null
443
+ this.search()
444
+ },
445
+ // 关闭文件上传对话框
446
+ closeFile() {
447
+ this.showFile = false
448
+ // 将选的文件清空
449
+ this.$refs.file.$el.querySelector('input').value = ''
450
+ this.search()
451
+ }
452
+ },
453
+ events: {
454
+ async 'onFileUpload'(file, result) {
455
+ let data = {
456
+ selectdata: this.selectdata,
457
+ filepath: result.f_downloadpath,
458
+ user: this.$login.f
459
+ }
460
+ let url = null
461
+ if (this.selectdata.f_apply_type === '开发商集体报建' || this.selectdata.f_apply_type === '散户集体报建') {
462
+ url = 'rs/logic/importAddressUserFiles'
463
+ } else {
464
+ url = 'rs/logic/importAddInstallationDetails'
465
+ }
466
+
467
+ let res = await this.$resetpost(url, {data:data}, {resolveMsg: null, rejectMsg: '导入失败', silent: true}, 0)
468
+ if(res.data.type === "success"){
469
+ this.$showAlert("导入信息:"+res.data.msg, res.data.type, 2000);
470
+ }else{
471
+ this.$showMessage(res.data.msg);
472
+ }
473
+ this.$dispatch('breakControl', this.selectdata)
474
+ }
475
+ },
476
+ computed: {
477
+ // 安装人
478
+ installperson() {
479
+ return this.$login.f.f_installman.map(item => {
480
+ return {
481
+ label: item.name,
482
+ value: item.name
483
+ }
484
+ })
485
+ },
486
+ // 表向
487
+ aroundmeters() {
488
+ return this.$appdata.getParam('左右表')
489
+ },
490
+ // 安装位置
491
+ positions() {
492
+ return this.$appdata.getParam('安装位置')
493
+ }
494
+ },
495
+ watch: {
496
+ }
497
+ }
498
+ </script>
499
+ <style scoped>
500
+ .head-but{
501
+ margin-left: 5px;
502
+ height: 34px;
503
+ /*background-color: #6aa6e2;*/
504
+ border-radius: 4px;
505
+ font-family: PingFang;
506
+ color: #ffffff;
507
+ }
508
+ /*清除model中的浮动*/
509
+ .clearfix:after,.clearfix:before{
510
+ display: table;
511
+ }
512
+ .clearfix:after{
513
+ clear: both;
514
+ }
515
+ </style>
@@ -1,133 +1,133 @@
1
- <template>
2
- <style id="style">
3
- td{
4
- height: 30px;
5
- /*width: 30px;*/
6
- text-align: center;
7
- }
8
- table{
9
- margin: auto;
10
- width: 100%;
11
- border-collapse:collapse;
12
- border: 1px solid black;
13
- }
14
- h1,h2,h3,h4,h5,h6 {
15
- text-align: center;
16
- }
17
- .date{
18
- float: left;
19
- padding-left: 30px;
20
- }
21
- .number{
22
- float: right;
23
- padding-right: 30px;
24
- }
25
- .rescue{
26
- float: left;
27
- padding: 0 30px 0 40px;
28
- }
29
- .service{
30
- float: left;
31
- }
32
- .payee{
33
- float: right;
34
- padding-right: 30px;
35
- }
36
- </style>
37
- <div id="print">
38
- <h4>武安明星天然气有限公司收费单</h4>
39
- <span>
40
- <p class="date">{{new Date().Format('yyyy-MM-dd HH:mm:ss')}}</p>
41
- <p class="number">缴费编号:{{ charge.f_charge_number }}</p>
42
- </span>
43
- <table border="1">
44
- <tr>
45
- <td>用户姓名</td>
46
- <td colspan="2">{{ f_user_name }}</td>
47
- <td>联系电话</td>
48
- <td>{{ f_user_phone }}</td>
49
- </tr>
50
- <tr>
51
- <td>地&emsp;&emsp;址</td>
52
- <td colspan="4">{{ f_useraddress }}</td>
53
- </tr>
54
- <tr>
55
- <td>收费项目</td>
56
- <td colspan="2">工程费</td>
57
- <td>收费方式</td>
58
- <td>{{ charge.f_payment_method }}</td>
59
- </tr>
60
- <tr>
61
- <td>收费金额</td>
62
- <td>{{ charge.f_charge_money }}</td>
63
- <td>大&emsp;&emsp;写</td>
64
- <td colspan="2">{{ charge.f_amount_words }}</td>
65
- </tr>
66
- <tr>
67
- <td>备&emsp;&emsp;注</td>
68
- <td colspan="4">
69
- <input v-if="showInput" type="text" style="text-align: center;border: 0px;width: 100%" v-model="charge.remark" placeholder="请输入备注信息">
70
- <span v-if="!showInput" >{{charge.remark}}</span>
71
- </td>
72
- </tr>
73
- </table>
74
- <span>
75
- <p class="rescue">抢险电话:5835588</p>
76
- <p class="service">服务电话:3718002</p>
77
- <p class="payee">收款人:{{ charge.f_charge_collectors }}</p>
78
- </span>
79
- </div>
80
-
81
- <print-element v-show="false" v-ref:print id='print' styleid='style'
82
- top='40' left='60' width='100%' height='100%'>
83
- </print-element>
84
- </template>
85
-
86
- <script>
87
- import { isEmpty } from '../../../Util'
88
- Date.prototype.Format = function (fmt) {
89
- var o = {
90
- "M+": this.getMonth() + 1, //月份
91
- "d+": this.getDate(), //日
92
- "H+": this.getHours(), //小时
93
- "m+": this.getMinutes(), //分
94
- "s+": this.getSeconds(), //秒
95
- "q+": Math.floor((this.getMonth() + 3) / 3), //季度
96
- "S": this.getMilliseconds() //毫秒
97
- };
98
- if (/(y+)/.test(fmt)) fmt = fmt.replace(RegExp.$1, (this.getFullYear() + "").substr(4 - RegExp.$1.length));
99
- for (var k in o)
100
- if (new RegExp("(" + k + ")").test(fmt)) fmt = fmt.replace(RegExp.$1, (RegExp.$1.length == 1) ? (o[k]) : (("00" + o[k]).substr(("" + o[k]).length)));
101
- return fmt;
102
- }
103
- export default {
104
- title: '打印收费票据',
105
- props: ['selectdata', 'charge'],
106
- data () {
107
- return {
108
- showInput: true
109
- }
110
- },
111
- ready () {
112
- console.log('------------------打印-------------------')
113
- console.log()
114
- },
115
- computed: {
116
- f_user_name () {
117
- return isEmpty(this.charge.f_user_name) ? this.selectdata.f_contact : this.charge.f_user_name
118
- },
119
- f_user_phone () {
120
- return isEmpty(this.charge.f_user_phone) ? this.selectdata.f_phone : this.charge.f_user_phone
121
- },
122
- f_useraddress () {
123
- return isEmpty(this.charge.f_useraddress) ? `武安市${this.selectdata.f_street}${this.selectdata.f_residential_area}` : `武安市${this.charge.f_useraddress}`
124
- }
125
- }
126
- }
127
- </script>
128
-
129
- <style scoped>
130
- input::placeholder {
131
- color: red;
132
- }
133
- </style>
1
+ <template>
2
+ <style id="style">
3
+ td{
4
+ height: 30px;
5
+ /*width: 30px;*/
6
+ text-align: center;
7
+ }
8
+ table{
9
+ margin: auto;
10
+ width: 100%;
11
+ border-collapse:collapse;
12
+ border: 1px solid black;
13
+ }
14
+ h1,h2,h3,h4,h5,h6 {
15
+ text-align: center;
16
+ }
17
+ .date{
18
+ float: left;
19
+ padding-left: 30px;
20
+ }
21
+ .number{
22
+ float: right;
23
+ padding-right: 30px;
24
+ }
25
+ .rescue{
26
+ float: left;
27
+ padding: 0 30px 0 40px;
28
+ }
29
+ .service{
30
+ float: left;
31
+ }
32
+ .payee{
33
+ float: right;
34
+ padding-right: 30px;
35
+ }
36
+ </style>
37
+ <div id="print">
38
+ <h4>武安明星天然气有限公司收费单</h4>
39
+ <span>
40
+ <p class="date">{{new Date().Format('yyyy-MM-dd HH:mm:ss')}}</p>
41
+ <p class="number">缴费编号:{{ charge.f_charge_number }}</p>
42
+ </span>
43
+ <table border="1">
44
+ <tr>
45
+ <td>用户姓名</td>
46
+ <td colspan="2">{{ f_user_name }}</td>
47
+ <td>联系电话</td>
48
+ <td>{{ f_user_phone }}</td>
49
+ </tr>
50
+ <tr>
51
+ <td>地&emsp;&emsp;址</td>
52
+ <td colspan="4">{{ f_useraddress }}</td>
53
+ </tr>
54
+ <tr>
55
+ <td>收费项目</td>
56
+ <td colspan="2">工程费</td>
57
+ <td>收费方式</td>
58
+ <td>{{ charge.f_payment_method }}</td>
59
+ </tr>
60
+ <tr>
61
+ <td>收费金额</td>
62
+ <td>{{ charge.f_charge_money }}</td>
63
+ <td>大&emsp;&emsp;写</td>
64
+ <td colspan="2">{{ charge.f_amount_words }}</td>
65
+ </tr>
66
+ <tr>
67
+ <td>备&emsp;&emsp;注</td>
68
+ <td colspan="4">
69
+ <input v-if="showInput" type="text" style="text-align: center;border: 0px;width: 100%" v-model="charge.remark" placeholder="请输入备注信息">
70
+ <span v-if="!showInput" >{{charge.remark}}</span>
71
+ </td>
72
+ </tr>
73
+ </table>
74
+ <span>
75
+ <p class="rescue">抢险电话:5835588</p>
76
+ <p class="service">服务电话:3718002</p>
77
+ <p class="payee">收款人:{{ charge.f_charge_collectors }}</p>
78
+ </span>
79
+ </div>
80
+
81
+ <print-element v-show="false" v-ref:print id='print' styleid='style'
82
+ top='40' left='60' width='100%' height='100%'>
83
+ </print-element>
84
+ </template>
85
+
86
+ <script>
87
+ import { isEmpty } from '../../../Util'
88
+ Date.prototype.Format = function (fmt) {
89
+ var o = {
90
+ "M+": this.getMonth() + 1, //月份
91
+ "d+": this.getDate(), //日
92
+ "H+": this.getHours(), //小时
93
+ "m+": this.getMinutes(), //分
94
+ "s+": this.getSeconds(), //秒
95
+ "q+": Math.floor((this.getMonth() + 3) / 3), //季度
96
+ "S": this.getMilliseconds() //毫秒
97
+ };
98
+ if (/(y+)/.test(fmt)) fmt = fmt.replace(RegExp.$1, (this.getFullYear() + "").substr(4 - RegExp.$1.length));
99
+ for (var k in o)
100
+ if (new RegExp("(" + k + ")").test(fmt)) fmt = fmt.replace(RegExp.$1, (RegExp.$1.length == 1) ? (o[k]) : (("00" + o[k]).substr(("" + o[k]).length)));
101
+ return fmt;
102
+ }
103
+ export default {
104
+ title: '打印收费票据',
105
+ props: ['selectdata', 'charge'],
106
+ data () {
107
+ return {
108
+ showInput: true
109
+ }
110
+ },
111
+ ready () {
112
+ console.log('------------------打印-------------------')
113
+ console.log()
114
+ },
115
+ computed: {
116
+ f_user_name () {
117
+ return isEmpty(this.charge.f_user_name) ? this.selectdata.f_contact : this.charge.f_user_name
118
+ },
119
+ f_user_phone () {
120
+ return isEmpty(this.charge.f_user_phone) ? this.selectdata.f_phone : this.charge.f_user_phone
121
+ },
122
+ f_useraddress () {
123
+ return isEmpty(this.charge.f_useraddress) ? `武安市${this.selectdata.f_street}${this.selectdata.f_residential_area}` : `武安市${this.charge.f_useraddress}`
124
+ }
125
+ }
126
+ }
127
+ </script>
128
+
129
+ <style scoped>
130
+ input::placeholder {
131
+ color: red;
132
+ }
133
+ </style>