apply-clients 3.5.4-99 → 3.5.5-10

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