apply-clients 3.5.4-81 → 3.5.4-83

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