apply-clients 3.5.1 → 3.5.2

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