apply-clients 3.4.91 → 3.4.93

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 +133 -133
  2. package/package.json +117 -117
  3. package/src/App.vue +26 -21
  4. package/src/components/android/Ignition/VentilationIgnition.vue +312 -312
  5. package/src/components/android/Ignition/VentilationIgnitionHandle.vue +353 -353
  6. package/src/components/product/ApplyCharge/ApplyChargeList.vue +476 -476
  7. package/src/components/product/Function/InstallInfoSelect.vue +326 -326
  8. package/src/components/product/Ignition/IgnitionListManage.vue +420 -420
  9. package/src/components/product/Material/MaterialDetailed.vue +268 -268
  10. package/src/components/product/Material/Materiallist.vue +74 -74
  11. package/src/components/product/Material/Materialmanger.vue +58 -58
  12. package/src/components/product/Process/ExplorationSelect.vue +491 -491
  13. package/src/components/product/Process/Processes/addressAndUserinfoManagement.vue +203 -203
  14. package/src/components/product/Process/ShowBackReason.vue +40 -40
  15. package/src/components/product/Stop/StopApplyList.vue +278 -278
  16. package/src/components/product/Supervisory/SupervisoryControl.vue +140 -140
  17. package/src/filiale/hongda/pc/printChargepc.vue +114 -114
  18. package/src/filiale/hongda/pc/printactivatecard.vue +151 -151
  19. package/src/filiale/linzhou/pc/ApplyChargeList.vue +486 -486
  20. package/src/filiale/linzhou/pc/ServiceControl.vue +1968 -1968
  21. package/src/filiale/linzhou/pc/devicesManagement.vue +494 -494
  22. package/src/filiale/linzhou/pc.js +10 -10
  23. package/src/filiale/qianneng/android/AppAddMaterialScience.vue +477 -477
  24. package/src/filiale/qianneng/android/AppExplorationUser.vue +447 -447
  25. package/src/filiale/qianneng/android/AppServiceControl.vue +1608 -1608
  26. package/src/filiale/qianneng/android/AppServiceView.vue +761 -761
  27. package/src/filiale/qianneng/android/AppSign.vue +152 -152
  28. package/src/filiale/qianneng/android/AppTakePic.vue +140 -140
  29. package/src/filiale/qianneng/android.js +12 -12
  30. package/src/filiale/qianneng/pc/ApplyUpload.vue +290 -290
  31. package/src/filiale/qianneng/pc/Applybatchdispatch.vue +685 -685
  32. package/src/filiale/qianneng/pc/ExplorationUser.vue +189 -189
  33. package/src/filiale/qianneng/pc/InstallationDetails.vue +561 -561
  34. package/src/filiale/qianneng/pc/ServiceView.vue +1118 -1121
  35. package/src/filiale/qianneng/pc/SupervisoryList.vue +344 -344
  36. package/src/filiale/qianneng/pc/SupervisoryhCart.vue +127 -127
  37. package/src/filiale/qianneng/pc/addMaterialScience.vue +464 -464
  38. package/src/filiale/qianneng/pc/addressAndUserinfoManagement.vue +389 -389
  39. package/src/filiale/qianneng/pc/devicesManagement.vue +484 -484
  40. package/src/filiale/qianneng/pc/printactivatecard.vue +295 -295
  41. package/src/filiale/qianneng/pc.js +26 -26
  42. package/src/filiale/yangchunboneng/pc/ApplyChargeList.vue +516 -0
  43. package/src/filiale/yangchunboneng/pc.js +13 -12
  44. package/src/main.js +23 -23
@@ -1,494 +1,494 @@
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_brand"
81
- v-model="item.f_brand"
82
- :options="brandList"
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_devices_type"
93
- v-model="item.f_devices_type"
94
- :options="devicesType"
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="" type="text"
103
- placeholder="设备型号"
104
- v-model="item.f_devices_model"
105
- :value="item.f_devices_model"
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
- <datepicker
113
- placeholder="生产日期"
114
- :value.sync="item.f_make_date"
115
- v-model="item.f_make_date"
116
- format="yyyy-MM-dd HH:mm:ss"
117
- @change="expireDate($index)"
118
- :disabled="mark === 1">
119
- </datepicker>
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
- <input class="form-control input_view" style="" type="number"
126
- placeholder="设备数量"
127
- v-model="item.f_devices_num"
128
- :value="item.f_devices_num"
129
- :readonly="mark === 1"/>
130
- </div>
131
- </div>
132
- <div class="form-group col-sm-6">
133
- <label class="col-sm-4 control-label">安&ensp;装&ensp;人:</label>
134
- <div class="col-sm-8">
135
- <input class="form-control input_view" style=""
136
- placeholder="安装人"
137
- v-model="item.f_input_person"
138
- :value.sync="installperson(item.f_input_person)"
139
- readonly/>
140
- </div>
141
- </div>
142
- <div class="form-group col-sm-6">
143
- <label class="col-sm-4 control-label">安装日期:</label>
144
- <div class="col-sm-8">
145
- <input class="form-control input_view" style=""
146
- placeholder="安装日期"
147
- v-model="item.f_input_date"
148
- :value="installdate(item.f_input_date)"
149
- readonly/>
150
- <!-- <datepicker-->
151
- <!-- placeholder="安装日期"-->
152
- <!-- :value.sync="item.f_input_date"-->
153
- <!-- v-model="item.f_input_date"-->
154
- <!-- format="yyyy-MM-dd HH:mm:ss"-->
155
- <!-- :disabled="mark === 1">-->
156
- <!-- </datepicker>-->
157
- </div>
158
- </div>
159
- <!--
160
- <div class="form-group col-sm-6">
161
- <label class="col-sm-4 control-label">设备编号:</label>
162
- <div class="col-sm-8">
163
- <input class="form-control input_view" style=""
164
- placeholder="设备编号"
165
- v-model="item.f_devices_no"
166
- :value="item.f_devices_no"
167
- :readonly="mark === 1"/>
168
- </div>
169
- </div>
170
- <div class="form-group col-sm-6">
171
- <label class="col-sm-4 control-label">设备品牌:</label>
172
- <div class="col-sm-8">
173
- <input class="form-control input_view" style=""
174
- placeholder="设备品牌"
175
- v-model="item.f_brand"
176
- :value="item.f_brand"
177
- :readonly="mark === 1"/>
178
- </div>
179
- </div>
180
- <div class="form-group col-sm-6">
181
- <label class="col-sm-4 control-label">设备型号:</label>
182
- <div class="col-sm-8">
183
- <input class="form-control input_view" style=""
184
- placeholder="设备型号"
185
- v-model="item.f_devices_model"
186
- :value="item.f_devices_model"
187
- :readonly="mark === 1"/>
188
- </div>
189
- </div>
190
- <div class="form-group col-sm-6">
191
- <label class="col-sm-4 control-label">使用年限:</label>
192
- <div class="col-sm-8">
193
- <input class="form-control input_view" style="" type="number"
194
- placeholder="使用年限"
195
- v-model="item.f_service_life"
196
- :value="item.f_service_life"
197
- @change="expireDate($index)"
198
- :readonly="mark === 1"/>
199
- </div>
200
- </div>
201
- <div class="form-group col-sm-6">
202
- <label class="col-sm-4 control-label">到期日期:</label>
203
- <div class="col-sm-8">
204
- <datepicker
205
- placeholder="到期日期"
206
- :value.sync="item.f_expire_date"
207
- v-model="item.f_expire_date"
208
- format="yyyy-MM-dd HH:mm:ss"
209
- disabled>
210
- </datepicker>
211
- </div>
212
- </div>
213
- <div class="form-group col-sm-6">
214
- <label class="col-sm-4 control-label">安装日期:</label>
215
- <div class="col-sm-8">
216
- <datepicker
217
- placeholder="连接管安装日期"
218
- :value.sync="item.f_pipeinstall_date"
219
- v-model="item.f_pipeinstall_date"
220
- format="yyyy-MM-dd HH:mm:ss"
221
- :disabled="mark === 1">
222
- </datepicker>
223
- </div>
224
- </div>
225
- <div class="form-group col-sm-6">
226
- <label class="col-sm-4 control-label">到期日期:</label>
227
- <div class="col-sm-8">
228
- <datepicker
229
- placeholder="连接管到期日期"
230
- :value.sync="item.f_pipeexpire_date"
231
- v-model="item.f_pipeexpire_date"
232
- format="yyyy-MM-dd HH:mm:ss"
233
- :disabled="mark === 1">
234
- </datepicker>
235
- </div>
236
- </div>
237
- <div class="form-group col-sm-6">
238
- <label class="col-sm-4 control-label">管道类型:</label>
239
- <div class="col-sm-8">
240
- <input-select
241
- class="select select_list"
242
- :value.sync="item.f_pipe_type"
243
- v-model="item.f_pipe_type"
244
- :options="pipeType"
245
- :disable="mark === 1"
246
- :valueSingle="true">
247
- </input-select>
248
- </div>
249
- </div>
250
- <div class="form-group col-sm-6">
251
- <label class="col-sm-4 control-label">设备状态:</label>
252
- <div class="col-sm-8">
253
- <input-select
254
- class="select select_list"
255
- :value.sync="item.f_userinfodevices_state"
256
- v-model="item.f_userinfodevices_state"
257
- :options="userdevicestate"
258
- :disable="mark === 1"
259
- :valueSingle="true"></input-select>
260
- </div>
261
- </div>
262
- <div class="form-group col-sm-6">
263
- <label class="col-sm-4 control-label">购买方式:</label>
264
- <div class="col-sm-8">
265
- <input-select
266
- class="select select_list"
267
- :value.sync="item.WatchPurchase"
268
- v-model="item.WatchPurchase"
269
- :options="WatchPurchases"
270
- :disable="mark === 1"
271
- :valueSingle="true"></input-select>
272
- </div>
273
- </div>
274
- <div class="form-group col-sm-6">
275
- <label class="col-sm-4 control-label">安装方式:</label>
276
- <div class="col-sm-8">
277
- <input-select
278
- class="select select_list"
279
- :value.sync="item.f_install_type"
280
- v-model="item.f_install_type"
281
- :options="installType"
282
- :disable="mark === 1"
283
- :valueSingle="true"></input-select>
284
- </div>
285
- </div>
286
- <div class="form-group col-sm-12">
287
- <label class="col-sm-2 control-label">备&emsp;&emsp;注:</label>
288
- <div class="col-sm-10">
289
- <textarea
290
- class="form-control input_view" rows="2" style="width: 100%;height: 100%"
291
- v-model="item.f_comments" :value="item.f_comments"
292
- :disabled="mark === 1"
293
- ></textarea>
294
- </div>
295
- </div>
296
- -->
297
- </div>
298
-
299
- </article>
300
- <footer slot="modal-footer" class="modal-footer">
301
- <template v-if="mark !== 1">
302
- <button type="button" class="btn btn-primary" @click="pushDevice()">添加设备</button>
303
- <button type="button" class="btn btn-primary" @click="addDevice()">确认</button>
304
- </template>
305
- </footer>
306
- </modal>
307
- </div>
308
- </template>
309
- <script>
310
- import {getNowDate,isEmpty} from '../../../components/Util'
311
- import {PagedList} from 'vue-client'
312
- import Vue from 'vue'
313
- import {HttpResetClass} from 'vue-client'
314
- // Date格式化
315
- Date.prototype.Format = function (fmt) {
316
- var o = {
317
- 'M+': this.getMonth() + 1, // 月份
318
- 'd+': this.getDate(), // 日
319
- 'H+': this.getHours(), // 小时
320
- 'm+': this.getMinutes(), // 分
321
- 's+': this.getSeconds(), // 秒
322
- 'q+': Math.floor((this.getMonth() + 3) / 3), // 季度
323
- 'S': this.getMilliseconds() // 毫秒
324
- }
325
- if (/(y+)/.test(fmt)) fmt = fmt.replace(RegExp.$1, (this.getFullYear() + '').substr(4 - RegExp.$1.length))
326
- for (var k in o) {
327
- if (new RegExp('(' + k + ')').test(fmt)) fmt = fmt.replace(RegExp.$1, (RegExp.$1.length === 1) ? (o[k]) : (('00' + o[k]).substr(('' + o[k]).length)))
328
- }
329
- return fmt
330
- }
331
-
332
- export default {
333
- title: '设备管理',
334
- props: {
335
- selectdata: {
336
- type: Object
337
- },
338
- mark: {
339
- type: Number,
340
- default: 0
341
- }
342
- },
343
- data () {
344
- return {
345
- model: {
346
- data: null
347
- },
348
- userfile: null,
349
- showDevices: false
350
- }
351
- },
352
- ready () {
353
- this.search()
354
- },
355
- methods: {
356
- deleteDevicesinfo (index) {
357
- this.userfile.devicesinfo.splice(index, 1)
358
- },
359
- async addDevice () {
360
- let data = {
361
- selectdata: this.selectdata,
362
- userfile: this.userfile,
363
- user: this.$login.f
364
- }
365
- let res = await this.$resetpost(
366
- `rs/logic/applyAddDevice`,
367
- {data: data},
368
- {resolveMsg: null, rejectMsg: '设备添加失败!!!'}
369
- )
370
-
371
- this.closeDevices()
372
- },
373
- pushDevice () {
374
- this.userfile.devicesinfo.push({})
375
- },
376
- expireDate (index) {
377
-
378
- if (isEmpty(this.userfile.devicesinfo[index].f_make_date) || isEmpty(this.userfile.devicesinfo[index].f_service_life)) {
379
- return
380
- }
381
- let f_make_date = new Date(this.userfile.devicesinfo[index].f_make_date)
382
- let year = (f_make_date.getFullYear() - 0) + (this.userfile.devicesinfo[index].f_service_life - 0)
383
- let month = (f_make_date.getMonth() - 0) + 1
384
- let day = f_make_date.getDate()
385
-
386
- Vue.set(this.userfile.devicesinfo[index], 'f_expire_date', year + '-' + (month < 10 ? '0' + month : month) + '-' + (day < 10 ? '0' + day : day))
387
- },
388
- async openDevicesModal (row) {
389
- this.userfile = row
390
-
391
- let data = {
392
- tablename: 't_devices',
393
- condition: `f_userfiles_id = '${this.userfile.f_userfiles_id}'`
394
- }
395
- let res = await this.$resetpost(
396
- `rs/sql/apply_singleTable`,
397
- {data: data},
398
- {resolveMsg: null, rejectMsg: '设备查询失败!!!'}
399
- )
400
-
401
- Vue.set(this.userfile, 'devicesinfo', res.data)
402
-
403
- this.showDevices = true
404
- },
405
- async search () {
406
- let http = new HttpResetClass()
407
- var condition1=''
408
- if(this.selectdata.f_sub_state ==='完工'){
409
- condition1=`f_userinfo_id = '${this.selectdata.f_userinfo_id}' and f_table_state='正常'`
410
- }else{
411
- condition1=`f_userinfo_id = '${this.selectdata.f_userinfo_id}' and f_table_state='待开通'`
412
- }
413
- let data = {
414
- condition: condition1
415
- }
416
- let res = await http.load('POST', 'rs/sql/getUserFilesAndDevicesAmount', {data:data}, {
417
- resolveMsg: null,
418
- rejectMsg: '获取表具失败!!!'
419
- })
420
- this.model.data = res.data
421
- },
422
- // 关闭对话框
423
- closeDevices() {
424
- this.showDevices = false
425
- this.userfile = null
426
-
427
- this.search()
428
- }
429
- },
430
- events: {
431
- },
432
- computed: {
433
- // 安装人
434
- installperson() {
435
- return function (f_input_person) {
436
- if (isEmpty(f_input_person)) {
437
- return this.$login.f.name
438
- }
439
- return f_input_person
440
- }
441
- },
442
- installdate() {
443
- return function (f_install_date) {
444
- if (isEmpty(f_install_date)) {
445
- return new Date().Format('yyyy-MM-dd HH:mm:ss')
446
- }
447
- return f_install_date
448
- }
449
- },
450
- installType() {
451
- return this.$appdata.getParam("安装方式")
452
- },
453
- WatchPurchases() {
454
- return this.$appdata.getParam("购买方式")
455
- },
456
- userdevicestate() {
457
- return this.$appdata.getParam("用户设备状态")
458
- },
459
- pipeType() {
460
- return this.$appdata.getParam("管道类型")
461
- },
462
- devicesType() {
463
- return this.$appdata.getParam("设备类型")
464
- },
465
- brandList() {
466
- return this.$appdata.getParam("设备品牌")
467
- }
468
- },
469
- watch: {
470
- }
471
- }
472
- </script>
473
- <style scoped>
474
- .textNoLineBreak {
475
- white-space: nowrap;
476
- }
477
- .input_view{
478
- padding: 8px;
479
- background-color: #ffffff;
480
- border-radius: 2px;
481
- border: solid 1px #c7c7c7!important;
482
- color: #333333!important;
483
- font-size: 15px!important;
484
- }
485
-
486
- .input_view[readonly]{
487
- border: 1px solid #DDD!important;
488
- color:#ACA899!important;
489
- }
490
- .input_view:disabled{
491
- border: 1px solid #DDD!important;
492
- color:#ACA899!important;
493
- }
494
- </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_brand"
81
+ v-model="item.f_brand"
82
+ :options="brandList"
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_devices_type"
93
+ v-model="item.f_devices_type"
94
+ :options="devicesType"
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="" type="text"
103
+ placeholder="设备型号"
104
+ v-model="item.f_devices_model"
105
+ :value="item.f_devices_model"
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
+ <datepicker
113
+ placeholder="生产日期"
114
+ :value.sync="item.f_make_date"
115
+ v-model="item.f_make_date"
116
+ format="yyyy-MM-dd HH:mm:ss"
117
+ @change="expireDate($index)"
118
+ :disabled="mark === 1">
119
+ </datepicker>
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
+ <input class="form-control input_view" style="" type="number"
126
+ placeholder="设备数量"
127
+ v-model="item.f_devices_num"
128
+ :value="item.f_devices_num"
129
+ :readonly="mark === 1"/>
130
+ </div>
131
+ </div>
132
+ <div class="form-group col-sm-6">
133
+ <label class="col-sm-4 control-label">安&ensp;装&ensp;人:</label>
134
+ <div class="col-sm-8">
135
+ <input class="form-control input_view" style=""
136
+ placeholder="安装人"
137
+ v-model="item.f_input_person"
138
+ :value.sync="installperson(item.f_input_person)"
139
+ readonly/>
140
+ </div>
141
+ </div>
142
+ <div class="form-group col-sm-6">
143
+ <label class="col-sm-4 control-label">安装日期:</label>
144
+ <div class="col-sm-8">
145
+ <input class="form-control input_view" style=""
146
+ placeholder="安装日期"
147
+ v-model="item.f_input_date"
148
+ :value="installdate(item.f_input_date)"
149
+ readonly/>
150
+ <!-- <datepicker-->
151
+ <!-- placeholder="安装日期"-->
152
+ <!-- :value.sync="item.f_input_date"-->
153
+ <!-- v-model="item.f_input_date"-->
154
+ <!-- format="yyyy-MM-dd HH:mm:ss"-->
155
+ <!-- :disabled="mark === 1">-->
156
+ <!-- </datepicker>-->
157
+ </div>
158
+ </div>
159
+ <!--
160
+ <div class="form-group col-sm-6">
161
+ <label class="col-sm-4 control-label">设备编号:</label>
162
+ <div class="col-sm-8">
163
+ <input class="form-control input_view" style=""
164
+ placeholder="设备编号"
165
+ v-model="item.f_devices_no"
166
+ :value="item.f_devices_no"
167
+ :readonly="mark === 1"/>
168
+ </div>
169
+ </div>
170
+ <div class="form-group col-sm-6">
171
+ <label class="col-sm-4 control-label">设备品牌:</label>
172
+ <div class="col-sm-8">
173
+ <input class="form-control input_view" style=""
174
+ placeholder="设备品牌"
175
+ v-model="item.f_brand"
176
+ :value="item.f_brand"
177
+ :readonly="mark === 1"/>
178
+ </div>
179
+ </div>
180
+ <div class="form-group col-sm-6">
181
+ <label class="col-sm-4 control-label">设备型号:</label>
182
+ <div class="col-sm-8">
183
+ <input class="form-control input_view" style=""
184
+ placeholder="设备型号"
185
+ v-model="item.f_devices_model"
186
+ :value="item.f_devices_model"
187
+ :readonly="mark === 1"/>
188
+ </div>
189
+ </div>
190
+ <div class="form-group col-sm-6">
191
+ <label class="col-sm-4 control-label">使用年限:</label>
192
+ <div class="col-sm-8">
193
+ <input class="form-control input_view" style="" type="number"
194
+ placeholder="使用年限"
195
+ v-model="item.f_service_life"
196
+ :value="item.f_service_life"
197
+ @change="expireDate($index)"
198
+ :readonly="mark === 1"/>
199
+ </div>
200
+ </div>
201
+ <div class="form-group col-sm-6">
202
+ <label class="col-sm-4 control-label">到期日期:</label>
203
+ <div class="col-sm-8">
204
+ <datepicker
205
+ placeholder="到期日期"
206
+ :value.sync="item.f_expire_date"
207
+ v-model="item.f_expire_date"
208
+ format="yyyy-MM-dd HH:mm:ss"
209
+ disabled>
210
+ </datepicker>
211
+ </div>
212
+ </div>
213
+ <div class="form-group col-sm-6">
214
+ <label class="col-sm-4 control-label">安装日期:</label>
215
+ <div class="col-sm-8">
216
+ <datepicker
217
+ placeholder="连接管安装日期"
218
+ :value.sync="item.f_pipeinstall_date"
219
+ v-model="item.f_pipeinstall_date"
220
+ format="yyyy-MM-dd HH:mm:ss"
221
+ :disabled="mark === 1">
222
+ </datepicker>
223
+ </div>
224
+ </div>
225
+ <div class="form-group col-sm-6">
226
+ <label class="col-sm-4 control-label">到期日期:</label>
227
+ <div class="col-sm-8">
228
+ <datepicker
229
+ placeholder="连接管到期日期"
230
+ :value.sync="item.f_pipeexpire_date"
231
+ v-model="item.f_pipeexpire_date"
232
+ format="yyyy-MM-dd HH:mm:ss"
233
+ :disabled="mark === 1">
234
+ </datepicker>
235
+ </div>
236
+ </div>
237
+ <div class="form-group col-sm-6">
238
+ <label class="col-sm-4 control-label">管道类型:</label>
239
+ <div class="col-sm-8">
240
+ <input-select
241
+ class="select select_list"
242
+ :value.sync="item.f_pipe_type"
243
+ v-model="item.f_pipe_type"
244
+ :options="pipeType"
245
+ :disable="mark === 1"
246
+ :valueSingle="true">
247
+ </input-select>
248
+ </div>
249
+ </div>
250
+ <div class="form-group col-sm-6">
251
+ <label class="col-sm-4 control-label">设备状态:</label>
252
+ <div class="col-sm-8">
253
+ <input-select
254
+ class="select select_list"
255
+ :value.sync="item.f_userinfodevices_state"
256
+ v-model="item.f_userinfodevices_state"
257
+ :options="userdevicestate"
258
+ :disable="mark === 1"
259
+ :valueSingle="true"></input-select>
260
+ </div>
261
+ </div>
262
+ <div class="form-group col-sm-6">
263
+ <label class="col-sm-4 control-label">购买方式:</label>
264
+ <div class="col-sm-8">
265
+ <input-select
266
+ class="select select_list"
267
+ :value.sync="item.WatchPurchase"
268
+ v-model="item.WatchPurchase"
269
+ :options="WatchPurchases"
270
+ :disable="mark === 1"
271
+ :valueSingle="true"></input-select>
272
+ </div>
273
+ </div>
274
+ <div class="form-group col-sm-6">
275
+ <label class="col-sm-4 control-label">安装方式:</label>
276
+ <div class="col-sm-8">
277
+ <input-select
278
+ class="select select_list"
279
+ :value.sync="item.f_install_type"
280
+ v-model="item.f_install_type"
281
+ :options="installType"
282
+ :disable="mark === 1"
283
+ :valueSingle="true"></input-select>
284
+ </div>
285
+ </div>
286
+ <div class="form-group col-sm-12">
287
+ <label class="col-sm-2 control-label">备&emsp;&emsp;注:</label>
288
+ <div class="col-sm-10">
289
+ <textarea
290
+ class="form-control input_view" rows="2" style="width: 100%;height: 100%"
291
+ v-model="item.f_comments" :value="item.f_comments"
292
+ :disabled="mark === 1"
293
+ ></textarea>
294
+ </div>
295
+ </div>
296
+ -->
297
+ </div>
298
+
299
+ </article>
300
+ <footer slot="modal-footer" class="modal-footer">
301
+ <template v-if="mark !== 1">
302
+ <button type="button" class="btn btn-primary" @click="pushDevice()">添加设备</button>
303
+ <button type="button" class="btn btn-primary" @click="addDevice()">确认</button>
304
+ </template>
305
+ </footer>
306
+ </modal>
307
+ </div>
308
+ </template>
309
+ <script>
310
+ import {getNowDate,isEmpty} from '../../../components/Util'
311
+ import {PagedList} from 'vue-client'
312
+ import Vue from 'vue'
313
+ import {HttpResetClass} from 'vue-client'
314
+ // Date格式化
315
+ Date.prototype.Format = function (fmt) {
316
+ var o = {
317
+ 'M+': this.getMonth() + 1, // 月份
318
+ 'd+': this.getDate(), // 日
319
+ 'H+': this.getHours(), // 小时
320
+ 'm+': this.getMinutes(), // 分
321
+ 's+': this.getSeconds(), // 秒
322
+ 'q+': Math.floor((this.getMonth() + 3) / 3), // 季度
323
+ 'S': this.getMilliseconds() // 毫秒
324
+ }
325
+ if (/(y+)/.test(fmt)) fmt = fmt.replace(RegExp.$1, (this.getFullYear() + '').substr(4 - RegExp.$1.length))
326
+ for (var k in o) {
327
+ if (new RegExp('(' + k + ')').test(fmt)) fmt = fmt.replace(RegExp.$1, (RegExp.$1.length === 1) ? (o[k]) : (('00' + o[k]).substr(('' + o[k]).length)))
328
+ }
329
+ return fmt
330
+ }
331
+
332
+ export default {
333
+ title: '设备管理',
334
+ props: {
335
+ selectdata: {
336
+ type: Object
337
+ },
338
+ mark: {
339
+ type: Number,
340
+ default: 0
341
+ }
342
+ },
343
+ data () {
344
+ return {
345
+ model: {
346
+ data: null
347
+ },
348
+ userfile: null,
349
+ showDevices: false
350
+ }
351
+ },
352
+ ready () {
353
+ this.search()
354
+ },
355
+ methods: {
356
+ deleteDevicesinfo (index) {
357
+ this.userfile.devicesinfo.splice(index, 1)
358
+ },
359
+ async addDevice () {
360
+ let data = {
361
+ selectdata: this.selectdata,
362
+ userfile: this.userfile,
363
+ user: this.$login.f
364
+ }
365
+ let res = await this.$resetpost(
366
+ `rs/logic/applyAddDevice`,
367
+ {data: data},
368
+ {resolveMsg: null, rejectMsg: '设备添加失败!!!'}
369
+ )
370
+
371
+ this.closeDevices()
372
+ },
373
+ pushDevice () {
374
+ this.userfile.devicesinfo.push({})
375
+ },
376
+ expireDate (index) {
377
+
378
+ if (isEmpty(this.userfile.devicesinfo[index].f_make_date) || isEmpty(this.userfile.devicesinfo[index].f_service_life)) {
379
+ return
380
+ }
381
+ let f_make_date = new Date(this.userfile.devicesinfo[index].f_make_date)
382
+ let year = (f_make_date.getFullYear() - 0) + (this.userfile.devicesinfo[index].f_service_life - 0)
383
+ let month = (f_make_date.getMonth() - 0) + 1
384
+ let day = f_make_date.getDate()
385
+
386
+ Vue.set(this.userfile.devicesinfo[index], 'f_expire_date', year + '-' + (month < 10 ? '0' + month : month) + '-' + (day < 10 ? '0' + day : day))
387
+ },
388
+ async openDevicesModal (row) {
389
+ this.userfile = row
390
+
391
+ let data = {
392
+ tablename: 't_devices',
393
+ condition: `f_userfiles_id = '${this.userfile.f_userfiles_id}'`
394
+ }
395
+ let res = await this.$resetpost(
396
+ `rs/sql/apply_singleTable`,
397
+ {data: data},
398
+ {resolveMsg: null, rejectMsg: '设备查询失败!!!'}
399
+ )
400
+
401
+ Vue.set(this.userfile, 'devicesinfo', res.data)
402
+
403
+ this.showDevices = true
404
+ },
405
+ async search () {
406
+ let http = new HttpResetClass()
407
+ var condition1=''
408
+ if(this.selectdata.f_sub_state ==='完工'){
409
+ condition1=`f_userinfo_id = '${this.selectdata.f_userinfo_id}' and f_table_state='正常'`
410
+ }else{
411
+ condition1=`f_userinfo_id = '${this.selectdata.f_userinfo_id}' and f_table_state='待开通'`
412
+ }
413
+ let data = {
414
+ condition: condition1
415
+ }
416
+ let res = await http.load('POST', 'rs/sql/getUserFilesAndDevicesAmount', {data:data}, {
417
+ resolveMsg: null,
418
+ rejectMsg: '获取表具失败!!!'
419
+ })
420
+ this.model.data = res.data
421
+ },
422
+ // 关闭对话框
423
+ closeDevices() {
424
+ this.showDevices = false
425
+ this.userfile = null
426
+
427
+ this.search()
428
+ }
429
+ },
430
+ events: {
431
+ },
432
+ computed: {
433
+ // 安装人
434
+ installperson() {
435
+ return function (f_input_person) {
436
+ if (isEmpty(f_input_person)) {
437
+ return this.$login.f.name
438
+ }
439
+ return f_input_person
440
+ }
441
+ },
442
+ installdate() {
443
+ return function (f_install_date) {
444
+ if (isEmpty(f_install_date)) {
445
+ return new Date().Format('yyyy-MM-dd HH:mm:ss')
446
+ }
447
+ return f_install_date
448
+ }
449
+ },
450
+ installType() {
451
+ return this.$appdata.getParam("安装方式")
452
+ },
453
+ WatchPurchases() {
454
+ return this.$appdata.getParam("购买方式")
455
+ },
456
+ userdevicestate() {
457
+ return this.$appdata.getParam("用户设备状态")
458
+ },
459
+ pipeType() {
460
+ return this.$appdata.getParam("管道类型")
461
+ },
462
+ devicesType() {
463
+ return this.$appdata.getParam("设备类型")
464
+ },
465
+ brandList() {
466
+ return this.$appdata.getParam("设备品牌")
467
+ }
468
+ },
469
+ watch: {
470
+ }
471
+ }
472
+ </script>
473
+ <style scoped>
474
+ .textNoLineBreak {
475
+ white-space: nowrap;
476
+ }
477
+ .input_view{
478
+ padding: 8px;
479
+ background-color: #ffffff;
480
+ border-radius: 2px;
481
+ border: solid 1px #c7c7c7!important;
482
+ color: #333333!important;
483
+ font-size: 15px!important;
484
+ }
485
+
486
+ .input_view[readonly]{
487
+ border: 1px solid #DDD!important;
488
+ color:#ACA899!important;
489
+ }
490
+ .input_view:disabled{
491
+ border: 1px solid #DDD!important;
492
+ color:#ACA899!important;
493
+ }
494
+ </style>