apply-clients 3.5.4-99 → 3.5.5-1

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