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,511 +1,511 @@
1
- <template>
2
- <div class="col-sm-12" style="margin: 20px 0px;">
3
- <data-grid :model="model" v-ref:grid class="list_area table_sy" style="padding: 0px">
4
- <template partial='head'>
5
- <tr>
6
- <th class="textNoLineBreak">序号</th>
7
- <th class="textNoLineBreak">表号</th>
8
- <th class="textNoLineBreak">气表品牌</th>
9
- <th class="textNoLineBreak">气表型号</th>
10
- <th class="textNoLineBreak">安装位置</th>
11
- <th class="textNoLineBreak">安装人</th>
12
- <th class="textNoLineBreak">安装时间</th>
13
- <th class="textNoLineBreak">设备数</th>
14
- <th class="textNoLineBreak">操作</th>
15
- </tr>
16
- </template>
17
- <template partial='body'>
18
- <tr>
19
- <td style="text-align: center;">
20
- <nobr>{{$index+1}}</nobr>
21
- </td>
22
- <td style="text-align: center;">
23
- <nobr>{{row.f_meternumber}}</nobr>
24
- </td>
25
- <td style="text-align: center;">
26
- <nobr>{{row.f_gasbrand}}</nobr>
27
- </td>
28
- <td style="text-align: center;">
29
- <nobr>{{row.f_gasmodel}}</nobr>
30
- </td>
31
- <td style="text-align: center;">
32
- <nobr>{{row.f_position}}</nobr>
33
- </td>
34
- <td style="text-align: center;">
35
- <nobr>{{row.f_install_person}}</nobr>
36
- </td>
37
- <td style="text-align: center;">
38
- <nobr>{{row.f_install_date}}</nobr>
39
- </td>
40
- <td style="text-align: center;">
41
- <nobr>{{row.amount}}</nobr>
42
- </td>
43
- <td style="text-align: center;">
44
- <nobr>
45
- <button
46
- type="button"
47
- name="button"
48
- class="btn btn-link"
49
- @click="$parent.$parent.openDevicesModal(row)"
50
- >
51
- {{$parent.$parent.mark === 1 ? '查看' : '添加设备'}}
52
- </button>
53
- </nobr>
54
- </td>
55
- </tr>
56
- </template>
57
- </data-grid>
58
-
59
-
60
- <modal v-if="showDevices" :show.sync="showDevices" v-ref:modal :large="true" :backdrop="false" title="表具设备信息">
61
- <header slot="modal-header" class="modal-header">
62
- <button type="button" class="close" @click="closeDevices"><span>&times;</span></button>
63
- <h4 class="modal-title">表具设备信息</h4>
64
- </header>
65
- <article slot="modal-body" class="modal-body clearfix">
66
- <div v-for="(i, item) in userfile.devicesinfo" class="form-group col-sm-12 panel panel-info">
67
- <div class="panel-heading head col-sm-12" style="background-color: #e8f4ff;margin-bottom: 10px">
68
- <div class="col-sm-6 text-left">设备{{$index+1}}信息</div>
69
- <div class="col-sm-6 text-right"><button
70
- class="button_delete button_spacing"
71
- v-if="!item.id"
72
- @click.prevent="deleteDevicesinfo(i)"
73
- >删除</button></div>
74
- </div>
75
- <div class="form-group col-sm-6">
76
- <label class="col-sm-4 control-label">设备类型:</label>
77
- <div class="col-sm-8">
78
- <input-select
79
- class="select select_list"
80
- :value.sync="item.f_devices_type"
81
- v-model="item.f_devices_type"
82
- :options="devicesType"
83
- :disable="mark === 1"
84
- :valueSingle="true"></input-select>
85
- </div>
86
- </div>
87
- <div class="form-group col-sm-6">
88
- <label class="col-sm-4 control-label">规格型号:</label>
89
- <div class="col-sm-8">
90
- <input-select
91
- class="select select_list"
92
- :value.sync="item.f_brand"
93
- v-model="item.f_brand"
94
- :options="brandList"
95
- :disable="mark === 1"
96
- :valueSingle="true"></input-select>
97
- </div>
98
- </div>
99
- <div class="form-group col-sm-6">
100
- <label class="col-sm-4 control-label">生产厂家:</label>
101
- <div class="col-sm-8">
102
- <input class="form-control input_view" style=""
103
- placeholder="生产厂家"
104
- v-model="item.f_manufactor"
105
- :value.sync="item.f_manufactor"
106
- />
107
- </div>
108
- </div>
109
- <div class="form-group col-sm-6">
110
- <label class="col-sm-4 control-label">通气状态:</label>
111
- <div class="col-sm-8">
112
- <input-select
113
- class="select select_list"
114
- placeholder="通气状态"
115
- :value.sync="item.f_userinfodevices_state"
116
- v-model="item.f_userinfodevices_state"
117
- :options="userinfodevicesstates"
118
- :disable="mark === 1"
119
- :valueSingle="true"></input-select>
120
- </div>
121
- </div>
122
- <!-- <div class="form-group col-sm-6">
123
- <label class="col-sm-4 control-label">生产日期:</label>
124
- <div class="col-sm-8">
125
- <datepicker
126
- placeholder="生产日期"
127
- :value.sync="item.f_make_date"
128
- v-model="item.f_make_date"
129
- format="yyyy-MM-dd HH:mm:ss"
130
- @change="expireDate($index)"
131
- :disabled="mark === 1">
132
- </datepicker>
133
- </div>
134
- </div>-->
135
- <div class="form-group col-sm-6">
136
- <label class="col-sm-4 control-label">设备数量:</label>
137
- <div class="col-sm-8">
138
- <input class="form-control input_view" style="" type="number"
139
- placeholder="设备数量"
140
- v-model="item.f_devices_num"
141
- :value="item.f_devices_num"
142
- :readonly="mark === 1"/>
143
- </div>
144
- </div>
145
- <div class="form-group col-sm-6">
146
- <label class="col-sm-4 control-label">安装位置:</label>
147
- <div class="col-sm-8">
148
- <input class="form-control input_view" style=""
149
- placeholder="安装位置"
150
- v-model="item.f_install_position"
151
- :value.sync="item.f_install_position"
152
- />
153
- </div>
154
- </div>
155
- <div class="form-group col-sm-6">
156
- <label class="col-sm-4 control-label">安&ensp;装&ensp;人:</label>
157
- <div class="col-sm-8">
158
- <input class="form-control input_view" style=""
159
- placeholder="安装人"
160
- v-model="item.f_input_person"
161
- :value.sync="installperson(item.f_input_person)"
162
- readonly/>
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
- placeholder="安装日期"
170
- v-model="item.f_input_date"
171
- :value="installdate(item.f_input_date)"
172
- readonly/>
173
- </div>
174
- </div>
175
- <!--
176
- <div class="form-group col-sm-6">
177
- <label class="col-sm-4 control-label">设备编号:</label>
178
- <div class="col-sm-8">
179
- <input class="form-control input_view" style=""
180
- placeholder="设备编号"
181
- v-model="item.f_devices_no"
182
- :value="item.f_devices_no"
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
- placeholder="设备品牌"
191
- v-model="item.f_brand"
192
- :value="item.f_brand"
193
- :readonly="mark === 1"/>
194
- </div>
195
- </div>
196
- <div class="form-group col-sm-6">
197
- <label class="col-sm-4 control-label">设备型号:</label>
198
- <div class="col-sm-8">
199
- <input class="form-control input_view" style=""
200
- placeholder="设备型号"
201
- v-model="item.f_devices_model"
202
- :value="item.f_devices_model"
203
- :readonly="mark === 1"/>
204
- </div>
205
- </div>
206
- <div class="form-group col-sm-6">
207
- <label class="col-sm-4 control-label">使用年限:</label>
208
- <div class="col-sm-8">
209
- <input class="form-control input_view" style="" type="number"
210
- placeholder="使用年限"
211
- v-model="item.f_service_life"
212
- :value="item.f_service_life"
213
- @change="expireDate($index)"
214
- :readonly="mark === 1"/>
215
- </div>
216
- </div>
217
- <div class="form-group col-sm-6">
218
- <label class="col-sm-4 control-label">到期日期:</label>
219
- <div class="col-sm-8">
220
- <datepicker
221
- placeholder="到期日期"
222
- :value.sync="item.f_expire_date"
223
- v-model="item.f_expire_date"
224
- format="yyyy-MM-dd HH:mm:ss"
225
- disabled>
226
- </datepicker>
227
- </div>
228
- </div>
229
- <div class="form-group col-sm-6">
230
- <label class="col-sm-4 control-label">安装日期:</label>
231
- <div class="col-sm-8">
232
- <datepicker
233
- placeholder="连接管安装日期"
234
- :value.sync="item.f_pipeinstall_date"
235
- v-model="item.f_pipeinstall_date"
236
- format="yyyy-MM-dd HH:mm:ss"
237
- :disabled="mark === 1">
238
- </datepicker>
239
- </div>
240
- </div>
241
- <div class="form-group col-sm-6">
242
- <label class="col-sm-4 control-label">到期日期:</label>
243
- <div class="col-sm-8">
244
- <datepicker
245
- placeholder="连接管到期日期"
246
- :value.sync="item.f_pipeexpire_date"
247
- v-model="item.f_pipeexpire_date"
248
- format="yyyy-MM-dd HH:mm:ss"
249
- :disabled="mark === 1">
250
- </datepicker>
251
- </div>
252
- </div>
253
- <div class="form-group col-sm-6">
254
- <label class="col-sm-4 control-label">管道类型:</label>
255
- <div class="col-sm-8">
256
- <input-select
257
- class="select select_list"
258
- :value.sync="item.f_pipe_type"
259
- v-model="item.f_pipe_type"
260
- :options="pipeType"
261
- :disable="mark === 1"
262
- :valueSingle="true">
263
- </input-select>
264
- </div>
265
- </div>
266
- <div class="form-group col-sm-6">
267
- <label class="col-sm-4 control-label">设备状态:</label>
268
- <div class="col-sm-8">
269
- <input-select
270
- class="select select_list"
271
- :value.sync="item.f_userinfodevices_state"
272
- v-model="item.f_userinfodevices_state"
273
- :options="userdevicestate"
274
- :disable="mark === 1"
275
- :valueSingle="true"></input-select>
276
- </div>
277
- </div>
278
- <div class="form-group col-sm-6">
279
- <label class="col-sm-4 control-label">购买方式:</label>
280
- <div class="col-sm-8">
281
- <input-select
282
- class="select select_list"
283
- :value.sync="item.WatchPurchase"
284
- v-model="item.WatchPurchase"
285
- :options="WatchPurchases"
286
- :disable="mark === 1"
287
- :valueSingle="true"></input-select>
288
- </div>
289
- </div>
290
- <div class="form-group col-sm-6">
291
- <label class="col-sm-4 control-label">安装方式:</label>
292
- <div class="col-sm-8">
293
- <input-select
294
- class="select select_list"
295
- :value.sync="item.f_install_type"
296
- v-model="item.f_install_type"
297
- :options="installType"
298
- :disable="mark === 1"
299
- :valueSingle="true"></input-select>
300
- </div>
301
- </div>
302
- <div class="form-group col-sm-12">
303
- <label class="col-sm-2 control-label">备&emsp;&emsp;注:</label>
304
- <div class="col-sm-10">
305
- <textarea
306
- class="form-control input_view" rows="2" style="width: 100%;height: 100%"
307
- v-model="item.f_comments" :value="item.f_comments"
308
- :disabled="mark === 1"
309
- ></textarea>
310
- </div>
311
- </div>
312
- -->
313
- </div>
314
-
315
- </article>
316
- <footer slot="modal-footer" class="modal-footer">
317
- <template v-if="mark !== 1">
318
- <button type="button" class="btn btn-primary" @click="pushDevice()">添加设备</button>
319
- <button type="button" class="btn btn-primary" @click="addDevice()">确认</button>
320
- </template>
321
- </footer>
322
- </modal>
323
- </div>
324
- </template>
325
- <script>
326
- import {getNowDate,isEmpty} from '../../../components/Util'
327
- import {PagedList} from 'vue-client'
328
- import Vue from 'vue'
329
- import {HttpResetClass} from 'vue-client'
330
- // Date格式化
331
- Date.prototype.Format = function (fmt) {
332
- var o = {
333
- 'M+': this.getMonth() + 1, // 月份
334
- 'd+': this.getDate(), // 日
335
- 'H+': this.getHours(), // 小时
336
- 'm+': this.getMinutes(), // 分
337
- 's+': this.getSeconds(), // 秒
338
- 'q+': Math.floor((this.getMonth() + 3) / 3), // 季度
339
- 'S': this.getMilliseconds() // 毫秒
340
- }
341
- if (/(y+)/.test(fmt)) fmt = fmt.replace(RegExp.$1, (this.getFullYear() + '').substr(4 - RegExp.$1.length))
342
- for (var k in o) {
343
- if (new RegExp('(' + k + ')').test(fmt)) fmt = fmt.replace(RegExp.$1, (RegExp.$1.length === 1) ? (o[k]) : (('00' + o[k]).substr(('' + o[k]).length)))
344
- }
345
- return fmt
346
- }
347
-
348
- export default {
349
- title: '设备管理',
350
- props: {
351
- selectdata: {
352
- type: Object
353
- },
354
- mark: {
355
- type: Number,
356
- default: 0
357
- }
358
- },
359
- data () {
360
- return {
361
- model: {
362
- data: null
363
- },
364
- userfile: null,
365
- showDevices: false,
366
- userinfodevicesstates:[{label:'已通气',value:'已通气'},{label:'未通气',value:'未通气'}]
367
- }
368
- },
369
- ready () {
370
- this.search()
371
- },
372
- methods: {
373
- deleteDevicesinfo (index) {
374
- this.userfile.devicesinfo.splice(index, 1)
375
- },
376
- async addDevice () {
377
- let data = {
378
- selectdata: this.selectdata,
379
- userfile: this.userfile,
380
- user: this.$login.f
381
- }
382
- let res = await this.$resetpost(
383
- `rs/logic/applyAddDevice`,
384
- {data: data},
385
- {resolveMsg: null, rejectMsg: '设备添加失败!!!'}
386
- )
387
-
388
- this.closeDevices()
389
- },
390
- pushDevice () {
391
- this.userfile.devicesinfo.push({})
392
- },
393
- expireDate (index) {
394
-
395
- if (isEmpty(this.userfile.devicesinfo[index].f_make_date) || isEmpty(this.userfile.devicesinfo[index].f_service_life)) {
396
- return
397
- }
398
- let f_make_date = new Date(this.userfile.devicesinfo[index].f_make_date)
399
- let year = (f_make_date.getFullYear() - 0) + (this.userfile.devicesinfo[index].f_service_life - 0)
400
- let month = (f_make_date.getMonth() - 0) + 1
401
- let day = f_make_date.getDate()
402
-
403
- Vue.set(this.userfile.devicesinfo[index], 'f_expire_date', year + '-' + (month < 10 ? '0' + month : month) + '-' + (day < 10 ? '0' + day : day))
404
- },
405
- async openDevicesModal (row) {
406
- this.userfile = row
407
-
408
- let data = {
409
- tablename: 't_devices',
410
- condition: `f_userfiles_id = '${this.userfile.f_userfiles_id}'`
411
- }
412
- let res = await this.$resetpost(
413
- `rs/sql/apply_singleTable`,
414
- {data: data},
415
- {resolveMsg: null, rejectMsg: '设备查询失败!!!'}
416
- )
417
-
418
- Vue.set(this.userfile, 'devicesinfo', res.data)
419
-
420
- this.showDevices = true
421
- },
422
- async search () {
423
- let http = new HttpResetClass()
424
- var condition1=''
425
- if(this.selectdata.f_sub_state ==='完工'){
426
- condition1=`f_userinfo_id = '${this.selectdata.f_userinfo_id}' and f_table_state='正常'`
427
- }else{
428
- condition1=`f_userinfo_id = '${this.selectdata.f_userinfo_id}' and f_table_state='待开通'`
429
- }
430
- let data = {
431
- condition: condition1
432
- }
433
- let res = await http.load('POST', 'rs/sql/getUserFilesAndDevicesAmount', {data:data}, {
434
- resolveMsg: null,
435
- rejectMsg: '获取表具失败!!!'
436
- })
437
- this.model.data = res.data
438
- },
439
- // 关闭对话框
440
- closeDevices() {
441
- this.showDevices = false
442
- this.userfile = null
443
-
444
- this.search()
445
- }
446
- },
447
- events: {
448
- },
449
- computed: {
450
- // 安装人
451
- installperson() {
452
- return function (f_input_person) {
453
- if (isEmpty(f_input_person)) {
454
- return this.$login.f.name
455
- }
456
- return f_input_person
457
- }
458
- },
459
- installdate() {
460
- return function (f_install_date) {
461
- if (isEmpty(f_install_date)) {
462
- return new Date().Format('yyyy-MM-dd HH:mm:ss')
463
- }
464
- return f_install_date
465
- }
466
- },
467
- installType() {
468
- return this.$appdata.getParam("安装方式")
469
- },
470
- WatchPurchases() {
471
- return this.$appdata.getParam("购买方式")
472
- },
473
- userdevicestate() {
474
- return this.$appdata.getParam("用户设备状态")
475
- },
476
- pipeType() {
477
- return this.$appdata.getParam("管道类型")
478
- },
479
- devicesType() {
480
- return this.$appdata.getParam("设备类型")
481
- },
482
- brandList() {
483
- return this.$appdata.getParam("规格型号")
484
- }
485
- },
486
- watch: {
487
- }
488
- }
489
- </script>
490
- <style scoped>
491
- .textNoLineBreak {
492
- white-space: nowrap;
493
- }
494
- .input_view{
495
- padding: 8px;
496
- background-color: #ffffff;
497
- border-radius: 2px;
498
- border: solid 1px #c7c7c7!important;
499
- color: #333333!important;
500
- font-size: 15px!important;
501
- }
502
-
503
- .input_view[readonly]{
504
- border: 1px solid #DDD!important;
505
- color:#ACA899!important;
506
- }
507
- .input_view:disabled{
508
- border: 1px solid #DDD!important;
509
- color:#ACA899!important;
510
- }
511
- </style>
1
+ <template>
2
+ <div class="col-sm-12" style="margin: 20px 0px;">
3
+ <data-grid :model="model" v-ref:grid class="list_area table_sy" style="padding: 0px">
4
+ <template partial='head'>
5
+ <tr>
6
+ <th class="textNoLineBreak">序号</th>
7
+ <th class="textNoLineBreak">表号</th>
8
+ <th class="textNoLineBreak">气表品牌</th>
9
+ <th class="textNoLineBreak">气表型号</th>
10
+ <th class="textNoLineBreak">安装位置</th>
11
+ <th class="textNoLineBreak">安装人</th>
12
+ <th class="textNoLineBreak">安装时间</th>
13
+ <th class="textNoLineBreak">设备数</th>
14
+ <th class="textNoLineBreak">操作</th>
15
+ </tr>
16
+ </template>
17
+ <template partial='body'>
18
+ <tr>
19
+ <td style="text-align: center;">
20
+ <nobr>{{$index+1}}</nobr>
21
+ </td>
22
+ <td style="text-align: center;">
23
+ <nobr>{{row.f_meternumber}}</nobr>
24
+ </td>
25
+ <td style="text-align: center;">
26
+ <nobr>{{row.f_gasbrand}}</nobr>
27
+ </td>
28
+ <td style="text-align: center;">
29
+ <nobr>{{row.f_gasmodel}}</nobr>
30
+ </td>
31
+ <td style="text-align: center;">
32
+ <nobr>{{row.f_position}}</nobr>
33
+ </td>
34
+ <td style="text-align: center;">
35
+ <nobr>{{row.f_install_person}}</nobr>
36
+ </td>
37
+ <td style="text-align: center;">
38
+ <nobr>{{row.f_install_date}}</nobr>
39
+ </td>
40
+ <td style="text-align: center;">
41
+ <nobr>{{row.amount}}</nobr>
42
+ </td>
43
+ <td style="text-align: center;">
44
+ <nobr>
45
+ <button
46
+ type="button"
47
+ name="button"
48
+ class="btn btn-link"
49
+ @click="$parent.$parent.openDevicesModal(row)"
50
+ >
51
+ {{$parent.$parent.mark === 1 ? '查看' : '添加设备'}}
52
+ </button>
53
+ </nobr>
54
+ </td>
55
+ </tr>
56
+ </template>
57
+ </data-grid>
58
+
59
+
60
+ <modal v-if="showDevices" :show.sync="showDevices" v-ref:modal :large="true" :backdrop="false" title="表具设备信息">
61
+ <header slot="modal-header" class="modal-header">
62
+ <button type="button" class="close" @click="closeDevices"><span>&times;</span></button>
63
+ <h4 class="modal-title">表具设备信息</h4>
64
+ </header>
65
+ <article slot="modal-body" class="modal-body clearfix">
66
+ <div v-for="(i, item) in userfile.devicesinfo" class="form-group col-sm-12 panel panel-info">
67
+ <div class="panel-heading head col-sm-12" style="background-color: #e8f4ff;margin-bottom: 10px">
68
+ <div class="col-sm-6 text-left">设备{{$index+1}}信息</div>
69
+ <div class="col-sm-6 text-right"><button
70
+ class="button_delete button_spacing"
71
+ v-if="!item.id"
72
+ @click.prevent="deleteDevicesinfo(i)"
73
+ >删除</button></div>
74
+ </div>
75
+ <div class="form-group col-sm-6">
76
+ <label class="col-sm-4 control-label">设备类型:</label>
77
+ <div class="col-sm-8">
78
+ <input-select
79
+ class="select select_list"
80
+ :value.sync="item.f_devices_type"
81
+ v-model="item.f_devices_type"
82
+ :options="devicesType"
83
+ :disable="mark === 1"
84
+ :valueSingle="true"></input-select>
85
+ </div>
86
+ </div>
87
+ <div class="form-group col-sm-6">
88
+ <label class="col-sm-4 control-label">规格型号:</label>
89
+ <div class="col-sm-8">
90
+ <input-select
91
+ class="select select_list"
92
+ :value.sync="item.f_brand"
93
+ v-model="item.f_brand"
94
+ :options="brandList"
95
+ :disable="mark === 1"
96
+ :valueSingle="true"></input-select>
97
+ </div>
98
+ </div>
99
+ <div class="form-group col-sm-6">
100
+ <label class="col-sm-4 control-label">生产厂家:</label>
101
+ <div class="col-sm-8">
102
+ <input class="form-control input_view" style=""
103
+ placeholder="生产厂家"
104
+ v-model="item.f_manufactor"
105
+ :value.sync="item.f_manufactor"
106
+ />
107
+ </div>
108
+ </div>
109
+ <div class="form-group col-sm-6">
110
+ <label class="col-sm-4 control-label">通气状态:</label>
111
+ <div class="col-sm-8">
112
+ <input-select
113
+ class="select select_list"
114
+ placeholder="通气状态"
115
+ :value.sync="item.f_userinfodevices_state"
116
+ v-model="item.f_userinfodevices_state"
117
+ :options="userinfodevicesstates"
118
+ :disable="mark === 1"
119
+ :valueSingle="true"></input-select>
120
+ </div>
121
+ </div>
122
+ <!-- <div class="form-group col-sm-6">
123
+ <label class="col-sm-4 control-label">生产日期:</label>
124
+ <div class="col-sm-8">
125
+ <datepicker
126
+ placeholder="生产日期"
127
+ :value.sync="item.f_make_date"
128
+ v-model="item.f_make_date"
129
+ format="yyyy-MM-dd HH:mm:ss"
130
+ @change="expireDate($index)"
131
+ :disabled="mark === 1">
132
+ </datepicker>
133
+ </div>
134
+ </div>-->
135
+ <div class="form-group col-sm-6">
136
+ <label class="col-sm-4 control-label">设备数量:</label>
137
+ <div class="col-sm-8">
138
+ <input class="form-control input_view" style="" type="number"
139
+ placeholder="设备数量"
140
+ v-model="item.f_devices_num"
141
+ :value="item.f_devices_num"
142
+ :readonly="mark === 1"/>
143
+ </div>
144
+ </div>
145
+ <div class="form-group col-sm-6">
146
+ <label class="col-sm-4 control-label">安装位置:</label>
147
+ <div class="col-sm-8">
148
+ <input class="form-control input_view" style=""
149
+ placeholder="安装位置"
150
+ v-model="item.f_install_position"
151
+ :value.sync="item.f_install_position"
152
+ />
153
+ </div>
154
+ </div>
155
+ <div class="form-group col-sm-6">
156
+ <label class="col-sm-4 control-label">安&ensp;装&ensp;人:</label>
157
+ <div class="col-sm-8">
158
+ <input class="form-control input_view" style=""
159
+ placeholder="安装人"
160
+ v-model="item.f_input_person"
161
+ :value.sync="installperson(item.f_input_person)"
162
+ readonly/>
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
+ placeholder="安装日期"
170
+ v-model="item.f_input_date"
171
+ :value="installdate(item.f_input_date)"
172
+ readonly/>
173
+ </div>
174
+ </div>
175
+ <!--
176
+ <div class="form-group col-sm-6">
177
+ <label class="col-sm-4 control-label">设备编号:</label>
178
+ <div class="col-sm-8">
179
+ <input class="form-control input_view" style=""
180
+ placeholder="设备编号"
181
+ v-model="item.f_devices_no"
182
+ :value="item.f_devices_no"
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
+ placeholder="设备品牌"
191
+ v-model="item.f_brand"
192
+ :value="item.f_brand"
193
+ :readonly="mark === 1"/>
194
+ </div>
195
+ </div>
196
+ <div class="form-group col-sm-6">
197
+ <label class="col-sm-4 control-label">设备型号:</label>
198
+ <div class="col-sm-8">
199
+ <input class="form-control input_view" style=""
200
+ placeholder="设备型号"
201
+ v-model="item.f_devices_model"
202
+ :value="item.f_devices_model"
203
+ :readonly="mark === 1"/>
204
+ </div>
205
+ </div>
206
+ <div class="form-group col-sm-6">
207
+ <label class="col-sm-4 control-label">使用年限:</label>
208
+ <div class="col-sm-8">
209
+ <input class="form-control input_view" style="" type="number"
210
+ placeholder="使用年限"
211
+ v-model="item.f_service_life"
212
+ :value="item.f_service_life"
213
+ @change="expireDate($index)"
214
+ :readonly="mark === 1"/>
215
+ </div>
216
+ </div>
217
+ <div class="form-group col-sm-6">
218
+ <label class="col-sm-4 control-label">到期日期:</label>
219
+ <div class="col-sm-8">
220
+ <datepicker
221
+ placeholder="到期日期"
222
+ :value.sync="item.f_expire_date"
223
+ v-model="item.f_expire_date"
224
+ format="yyyy-MM-dd HH:mm:ss"
225
+ disabled>
226
+ </datepicker>
227
+ </div>
228
+ </div>
229
+ <div class="form-group col-sm-6">
230
+ <label class="col-sm-4 control-label">安装日期:</label>
231
+ <div class="col-sm-8">
232
+ <datepicker
233
+ placeholder="连接管安装日期"
234
+ :value.sync="item.f_pipeinstall_date"
235
+ v-model="item.f_pipeinstall_date"
236
+ format="yyyy-MM-dd HH:mm:ss"
237
+ :disabled="mark === 1">
238
+ </datepicker>
239
+ </div>
240
+ </div>
241
+ <div class="form-group col-sm-6">
242
+ <label class="col-sm-4 control-label">到期日期:</label>
243
+ <div class="col-sm-8">
244
+ <datepicker
245
+ placeholder="连接管到期日期"
246
+ :value.sync="item.f_pipeexpire_date"
247
+ v-model="item.f_pipeexpire_date"
248
+ format="yyyy-MM-dd HH:mm:ss"
249
+ :disabled="mark === 1">
250
+ </datepicker>
251
+ </div>
252
+ </div>
253
+ <div class="form-group col-sm-6">
254
+ <label class="col-sm-4 control-label">管道类型:</label>
255
+ <div class="col-sm-8">
256
+ <input-select
257
+ class="select select_list"
258
+ :value.sync="item.f_pipe_type"
259
+ v-model="item.f_pipe_type"
260
+ :options="pipeType"
261
+ :disable="mark === 1"
262
+ :valueSingle="true">
263
+ </input-select>
264
+ </div>
265
+ </div>
266
+ <div class="form-group col-sm-6">
267
+ <label class="col-sm-4 control-label">设备状态:</label>
268
+ <div class="col-sm-8">
269
+ <input-select
270
+ class="select select_list"
271
+ :value.sync="item.f_userinfodevices_state"
272
+ v-model="item.f_userinfodevices_state"
273
+ :options="userdevicestate"
274
+ :disable="mark === 1"
275
+ :valueSingle="true"></input-select>
276
+ </div>
277
+ </div>
278
+ <div class="form-group col-sm-6">
279
+ <label class="col-sm-4 control-label">购买方式:</label>
280
+ <div class="col-sm-8">
281
+ <input-select
282
+ class="select select_list"
283
+ :value.sync="item.WatchPurchase"
284
+ v-model="item.WatchPurchase"
285
+ :options="WatchPurchases"
286
+ :disable="mark === 1"
287
+ :valueSingle="true"></input-select>
288
+ </div>
289
+ </div>
290
+ <div class="form-group col-sm-6">
291
+ <label class="col-sm-4 control-label">安装方式:</label>
292
+ <div class="col-sm-8">
293
+ <input-select
294
+ class="select select_list"
295
+ :value.sync="item.f_install_type"
296
+ v-model="item.f_install_type"
297
+ :options="installType"
298
+ :disable="mark === 1"
299
+ :valueSingle="true"></input-select>
300
+ </div>
301
+ </div>
302
+ <div class="form-group col-sm-12">
303
+ <label class="col-sm-2 control-label">备&emsp;&emsp;注:</label>
304
+ <div class="col-sm-10">
305
+ <textarea
306
+ class="form-control input_view" rows="2" style="width: 100%;height: 100%"
307
+ v-model="item.f_comments" :value="item.f_comments"
308
+ :disabled="mark === 1"
309
+ ></textarea>
310
+ </div>
311
+ </div>
312
+ -->
313
+ </div>
314
+
315
+ </article>
316
+ <footer slot="modal-footer" class="modal-footer">
317
+ <template v-if="mark !== 1">
318
+ <button type="button" class="btn btn-primary" @click="pushDevice()">添加设备</button>
319
+ <button type="button" class="btn btn-primary" @click="addDevice()">确认</button>
320
+ </template>
321
+ </footer>
322
+ </modal>
323
+ </div>
324
+ </template>
325
+ <script>
326
+ import {getNowDate,isEmpty} from '../../../components/Util'
327
+ import {PagedList} from 'vue-client'
328
+ import Vue from 'vue'
329
+ import {HttpResetClass} from 'vue-client'
330
+ // Date格式化
331
+ Date.prototype.Format = function (fmt) {
332
+ var o = {
333
+ 'M+': this.getMonth() + 1, // 月份
334
+ 'd+': this.getDate(), // 日
335
+ 'H+': this.getHours(), // 小时
336
+ 'm+': this.getMinutes(), // 分
337
+ 's+': this.getSeconds(), // 秒
338
+ 'q+': Math.floor((this.getMonth() + 3) / 3), // 季度
339
+ 'S': this.getMilliseconds() // 毫秒
340
+ }
341
+ if (/(y+)/.test(fmt)) fmt = fmt.replace(RegExp.$1, (this.getFullYear() + '').substr(4 - RegExp.$1.length))
342
+ for (var k in o) {
343
+ if (new RegExp('(' + k + ')').test(fmt)) fmt = fmt.replace(RegExp.$1, (RegExp.$1.length === 1) ? (o[k]) : (('00' + o[k]).substr(('' + o[k]).length)))
344
+ }
345
+ return fmt
346
+ }
347
+
348
+ export default {
349
+ title: '设备管理',
350
+ props: {
351
+ selectdata: {
352
+ type: Object
353
+ },
354
+ mark: {
355
+ type: Number,
356
+ default: 0
357
+ }
358
+ },
359
+ data () {
360
+ return {
361
+ model: {
362
+ data: null
363
+ },
364
+ userfile: null,
365
+ showDevices: false,
366
+ userinfodevicesstates:[{label:'已通气',value:'已通气'},{label:'未通气',value:'未通气'}]
367
+ }
368
+ },
369
+ ready () {
370
+ this.search()
371
+ },
372
+ methods: {
373
+ deleteDevicesinfo (index) {
374
+ this.userfile.devicesinfo.splice(index, 1)
375
+ },
376
+ async addDevice () {
377
+ let data = {
378
+ selectdata: this.selectdata,
379
+ userfile: this.userfile,
380
+ user: this.$login.f
381
+ }
382
+ let res = await this.$resetpost(
383
+ `rs/logic/applyAddDevice`,
384
+ {data: data},
385
+ {resolveMsg: null, rejectMsg: '设备添加失败!!!'}
386
+ )
387
+
388
+ this.closeDevices()
389
+ },
390
+ pushDevice () {
391
+ this.userfile.devicesinfo.push({})
392
+ },
393
+ expireDate (index) {
394
+
395
+ if (isEmpty(this.userfile.devicesinfo[index].f_make_date) || isEmpty(this.userfile.devicesinfo[index].f_service_life)) {
396
+ return
397
+ }
398
+ let f_make_date = new Date(this.userfile.devicesinfo[index].f_make_date)
399
+ let year = (f_make_date.getFullYear() - 0) + (this.userfile.devicesinfo[index].f_service_life - 0)
400
+ let month = (f_make_date.getMonth() - 0) + 1
401
+ let day = f_make_date.getDate()
402
+
403
+ Vue.set(this.userfile.devicesinfo[index], 'f_expire_date', year + '-' + (month < 10 ? '0' + month : month) + '-' + (day < 10 ? '0' + day : day))
404
+ },
405
+ async openDevicesModal (row) {
406
+ this.userfile = row
407
+
408
+ let data = {
409
+ tablename: 't_devices',
410
+ condition: `f_userfiles_id = '${this.userfile.f_userfiles_id}'`
411
+ }
412
+ let res = await this.$resetpost(
413
+ `rs/sql/apply_singleTable`,
414
+ {data: data},
415
+ {resolveMsg: null, rejectMsg: '设备查询失败!!!'}
416
+ )
417
+
418
+ Vue.set(this.userfile, 'devicesinfo', res.data)
419
+
420
+ this.showDevices = true
421
+ },
422
+ async search () {
423
+ let http = new HttpResetClass()
424
+ var condition1=''
425
+ if(this.selectdata.f_sub_state ==='完工'){
426
+ condition1=`f_userinfo_id = '${this.selectdata.f_userinfo_id}' and f_table_state='正常'`
427
+ }else{
428
+ condition1=`f_userinfo_id = '${this.selectdata.f_userinfo_id}' and f_table_state='待开通'`
429
+ }
430
+ let data = {
431
+ condition: condition1
432
+ }
433
+ let res = await http.load('POST', 'rs/sql/getUserFilesAndDevicesAmount', {data:data}, {
434
+ resolveMsg: null,
435
+ rejectMsg: '获取表具失败!!!'
436
+ })
437
+ this.model.data = res.data
438
+ },
439
+ // 关闭对话框
440
+ closeDevices() {
441
+ this.showDevices = false
442
+ this.userfile = null
443
+
444
+ this.search()
445
+ }
446
+ },
447
+ events: {
448
+ },
449
+ computed: {
450
+ // 安装人
451
+ installperson() {
452
+ return function (f_input_person) {
453
+ if (isEmpty(f_input_person)) {
454
+ return this.$login.f.name
455
+ }
456
+ return f_input_person
457
+ }
458
+ },
459
+ installdate() {
460
+ return function (f_install_date) {
461
+ if (isEmpty(f_install_date)) {
462
+ return new Date().Format('yyyy-MM-dd HH:mm:ss')
463
+ }
464
+ return f_install_date
465
+ }
466
+ },
467
+ installType() {
468
+ return this.$appdata.getParam("安装方式")
469
+ },
470
+ WatchPurchases() {
471
+ return this.$appdata.getParam("购买方式")
472
+ },
473
+ userdevicestate() {
474
+ return this.$appdata.getParam("用户设备状态")
475
+ },
476
+ pipeType() {
477
+ return this.$appdata.getParam("管道类型")
478
+ },
479
+ devicesType() {
480
+ return this.$appdata.getParam("设备类型")
481
+ },
482
+ brandList() {
483
+ return this.$appdata.getParam("规格型号")
484
+ }
485
+ },
486
+ watch: {
487
+ }
488
+ }
489
+ </script>
490
+ <style scoped>
491
+ .textNoLineBreak {
492
+ white-space: nowrap;
493
+ }
494
+ .input_view{
495
+ padding: 8px;
496
+ background-color: #ffffff;
497
+ border-radius: 2px;
498
+ border: solid 1px #c7c7c7!important;
499
+ color: #333333!important;
500
+ font-size: 15px!important;
501
+ }
502
+
503
+ .input_view[readonly]{
504
+ border: 1px solid #DDD!important;
505
+ color:#ACA899!important;
506
+ }
507
+ .input_view:disabled{
508
+ border: 1px solid #DDD!important;
509
+ color:#ACA899!important;
510
+ }
511
+ </style>