apply-clients 3.4.39 → 3.4.51

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 (58) hide show
  1. package/build/dev-server.js +2 -2
  2. package/package.json +1 -1
  3. package/src/android.js +21 -21
  4. package/src/apply.js +113 -113
  5. package/src/applyAndroid.js +53 -53
  6. package/src/components/android/AppServiceView.vue +745 -745
  7. package/src/components/android/AppSign.vue +154 -154
  8. package/src/components/android/Process/AppExplorationUser.vue +507 -507
  9. package/src/components/android/Process/AppServiceControl.vue +1708 -1708
  10. package/src/components/android/Process/Processes/AppAddMaterialScience.vue +477 -477
  11. package/src/components/android/Process/Processes/AppDevicesManagement.vue +519 -519
  12. package/src/components/android/Process/Processes/AppInstallationDetails.vue +482 -482
  13. package/src/components/android/Supervisory/AppSupervisoryCart.vue +156 -156
  14. package/src/components/product/Business/BusinessApply.vue +269 -269
  15. package/src/components/product/Business/CivilApply.vue +269 -269
  16. package/src/components/product/GroupByApply/ApplyGroupByList.vue +253 -253
  17. package/src/components/product/GroupByApply/ApplyGroupByMain.vue +53 -53
  18. package/src/components/product/GroupByApply/ApplyGroupByPaper.vue +376 -376
  19. package/src/components/product/Material/MaterialDetailed.vue +262 -262
  20. package/src/components/product/OldApply/Monitor/MonitorApply.vue +360 -360
  21. package/src/components/product/Print/BuildOrder/printBuildOrder.vue +157 -157
  22. package/src/components/product/Print/IgnitionBill/IgnitionBill.vue +259 -259
  23. package/src/components/product/Print/IgnitionBill/printIgnitionBill.vue +168 -168
  24. package/src/components/product/Process/ExplorationSelect.vue +495 -495
  25. package/src/components/product/Process/ExplorationUser.vue +189 -189
  26. package/src/components/product/Process/Processes/InstallationDetails.vue +610 -610
  27. package/src/components/product/Process/Processes/Print/printCharge.vue +166 -166
  28. package/src/components/product/Process/Processes/addMaterialScience.vue +454 -454
  29. package/src/components/product/Process/Processes/addressAndUserinfoManagement.vue +211 -211
  30. package/src/components/product/Process/Processes/chargeManagement.vue +656 -656
  31. package/src/components/product/Process/Processes/devicesManagement.vue +484 -484
  32. package/src/components/product/Process/Service/ServiceControl.vue +1918 -1920
  33. package/src/components/product/ServiceView.vue +981 -981
  34. package/src/components/product/Supervisory/SupervisoryControl.vue +137 -137
  35. package/src/components/product/Supervisory/SupervisoryList.vue +404 -404
  36. package/src/components/product/VueUtils/ApplyUpload.vue +275 -280
  37. package/src/filiale/gehua/pc/ExplorationSelect.vue +483 -483
  38. package/src/filiale/gehua/pc/ServiceControl.vue +1929 -1929
  39. package/src/filiale/gehua/pc/SupervisoryControl.vue +137 -137
  40. package/src/filiale/gehua/pc/SupervisoryServiceControl.vue +890 -890
  41. package/src/filiale/gehua/pc/buildOrderList.vue +339 -0
  42. package/src/filiale/gehua/pc/printBuildOrder.vue +243 -0
  43. package/src/filiale/gehua/pc.js +3 -2
  44. package/src/filiale/guangxi/android/Process/AppExplorationUser.vue +503 -503
  45. package/src/filiale/guangxi/android/Process/Processes/AppAddMaterialScience.vue +470 -470
  46. package/src/filiale/guangxi/android/Process/Processes/AppDevicesManagement.vue +519 -519
  47. package/src/filiale/guangxi/android/Process/Processes/AppInstallationDetails.vue +482 -482
  48. package/src/filiale/guangxi/android/Process/Processes/AppServiceControl.vue +1708 -1708
  49. package/src/filiale/guangxi/android/Process/Processes/AppServiceView.vue +766 -766
  50. package/src/filiale/guangxi/android.js +9 -9
  51. package/src/filiale/guangxi/pc/ApplyCharge/ApplyChargeList.vue +470 -470
  52. package/src/filiale/guangxi/pc/ApplyCharge/chargeManagement.vue +702 -702
  53. package/src/filiale/guangxi/pc/Process/ExplorationSelect.vue +538 -538
  54. package/src/filiale/guangxi/pc/Process/Service/ServiceControl.vue +1922 -1922
  55. package/src/filiale/guangxi/pc/Process/Service/SupervisoryServiceControl.vue +891 -891
  56. package/src/filiale/guangxi/pc/Process/Service/addMaterialScience.vue +482 -482
  57. package/src/filiale/guangxi/pc.js +15 -15
  58. package/src/main.js +1 -4
@@ -1,484 +1,484 @@
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 {getNowDate,isEmpty} from '../../../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
- let data = {
351
- selectdata: this.selectdata,
352
- userfile: this.userfile,
353
- user: this.$login.f
354
- }
355
- let res = await this.$resetpost(
356
- `rs/logic/applyAddDevice`,
357
- {data: data},
358
- {resolveMsg: null, rejectMsg: '设备添加失败!!!'}
359
- )
360
-
361
- this.closeDevices()
362
- },
363
- pushDevice () {
364
- this.userfile.devicesinfo.push({})
365
- },
366
- expireDate (index) {
367
-
368
- if (isEmpty(this.userfile.devicesinfo[index].f_make_date) || isEmpty(this.userfile.devicesinfo[index].f_service_life)) {
369
- return
370
- }
371
- let f_make_date = new Date(this.userfile.devicesinfo[index].f_make_date)
372
- let year = (f_make_date.getFullYear() - 0) + (this.userfile.devicesinfo[index].f_service_life - 0)
373
- let month = (f_make_date.getMonth() - 0) + 1
374
- let day = f_make_date.getDate()
375
-
376
- Vue.set(this.userfile.devicesinfo[index], 'f_expire_date', year + '-' + (month < 10 ? '0' + month : month) + '-' + (day < 10 ? '0' + day : day))
377
- },
378
- async openDevicesModal (row) {
379
- this.userfile = row
380
-
381
- let data = {
382
- tablename: 't_devices',
383
- condition: `f_userfiles_id = '${this.userfile.f_userfiles_id}'`
384
- }
385
- let res = await this.$resetpost(
386
- `rs/sql/singleTable`,
387
- {data: data},
388
- {resolveMsg: null, rejectMsg: '设备查询失败!!!'}
389
- )
390
-
391
- Vue.set(this.userfile, 'devicesinfo', res.data)
392
-
393
- this.showDevices = true
394
- },
395
- async search () {
396
- let http = new HttpResetClass()
397
- var condition1=''
398
- if(this.selectdata.f_sub_state ==='完工'){
399
- condition1=`f_userinfo_id = '${this.selectdata.f_userinfo_id}' and f_table_state='正常'`
400
- }else{
401
- condition1=`f_userinfo_id = '${this.selectdata.f_userinfo_id}' and f_table_state='待开通'`
402
- }
403
- let data = {
404
- condition: condition1
405
- }
406
- let res = await http.load('POST', 'rs/sql/getUserFilesAndDevicesAmount', {data:data}, {
407
- resolveMsg: null,
408
- rejectMsg: '获取表具失败!!!'
409
- })
410
- this.model.data = res.data
411
- },
412
- // 关闭对话框
413
- closeDevices() {
414
- this.showDevices = false
415
- this.userfile = null
416
-
417
- this.search()
418
- }
419
- },
420
- events: {
421
- },
422
- computed: {
423
- // 安装人
424
- installperson() {
425
- return function (f_input_person) {
426
- if (isEmpty(f_input_person)) {
427
- return this.$login.f.name
428
- }
429
- return f_input_person
430
- }
431
- },
432
- installdate() {
433
- return function (f_install_date) {
434
- if (isEmpty(f_install_date)) {
435
- return new Date().Format('yyyy-MM-dd HH:mm:ss')
436
- }
437
- return f_install_date
438
- }
439
- },
440
- installType() {
441
- return this.$appdata.getParam("安装方式")
442
- },
443
- WatchPurchases() {
444
- return this.$appdata.getParam("购买方式")
445
- },
446
- userdevicestate() {
447
- return this.$appdata.getParam("用户设备状态")
448
- },
449
- pipeType() {
450
- return this.$appdata.getParam("管道类型")
451
- },
452
- devicesType() {
453
- return this.$appdata.getParam("设备类型")
454
- },
455
- brandList() {
456
- return this.$appdata.getParam("设备品牌")
457
- }
458
- },
459
- watch: {
460
- }
461
- }
462
- </script>
463
- <style scoped>
464
- .textNoLineBreak {
465
- white-space: nowrap;
466
- }
467
- .input_view{
468
- padding: 8px;
469
- background-color: #ffffff;
470
- border-radius: 2px;
471
- border: solid 1px #c7c7c7!important;
472
- color: #333333!important;
473
- font-size: 15px!important;
474
- }
475
-
476
- .input_view[readonly]{
477
- border: 1px solid #DDD!important;
478
- color:#ACA899!important;
479
- }
480
- .input_view:disabled{
481
- border: 1px solid #DDD!important;
482
- color:#ACA899!important;
483
- }
484
- </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 {getNowDate,isEmpty} from '../../../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
+ let data = {
351
+ selectdata: this.selectdata,
352
+ userfile: this.userfile,
353
+ user: this.$login.f
354
+ }
355
+ let res = await this.$resetpost(
356
+ `rs/logic/applyAddDevice`,
357
+ {data: data},
358
+ {resolveMsg: null, rejectMsg: '设备添加失败!!!'}
359
+ )
360
+
361
+ this.closeDevices()
362
+ },
363
+ pushDevice () {
364
+ this.userfile.devicesinfo.push({})
365
+ },
366
+ expireDate (index) {
367
+
368
+ if (isEmpty(this.userfile.devicesinfo[index].f_make_date) || isEmpty(this.userfile.devicesinfo[index].f_service_life)) {
369
+ return
370
+ }
371
+ let f_make_date = new Date(this.userfile.devicesinfo[index].f_make_date)
372
+ let year = (f_make_date.getFullYear() - 0) + (this.userfile.devicesinfo[index].f_service_life - 0)
373
+ let month = (f_make_date.getMonth() - 0) + 1
374
+ let day = f_make_date.getDate()
375
+
376
+ Vue.set(this.userfile.devicesinfo[index], 'f_expire_date', year + '-' + (month < 10 ? '0' + month : month) + '-' + (day < 10 ? '0' + day : day))
377
+ },
378
+ async openDevicesModal (row) {
379
+ this.userfile = row
380
+
381
+ let data = {
382
+ tablename: 't_devices',
383
+ condition: `f_userfiles_id = '${this.userfile.f_userfiles_id}'`
384
+ }
385
+ let res = await this.$resetpost(
386
+ `rs/sql/singleTable`,
387
+ {data: data},
388
+ {resolveMsg: null, rejectMsg: '设备查询失败!!!'}
389
+ )
390
+
391
+ Vue.set(this.userfile, 'devicesinfo', res.data)
392
+
393
+ this.showDevices = true
394
+ },
395
+ async search () {
396
+ let http = new HttpResetClass()
397
+ var condition1=''
398
+ if(this.selectdata.f_sub_state ==='完工'){
399
+ condition1=`f_userinfo_id = '${this.selectdata.f_userinfo_id}' and f_table_state='正常'`
400
+ }else{
401
+ condition1=`f_userinfo_id = '${this.selectdata.f_userinfo_id}' and f_table_state='待开通'`
402
+ }
403
+ let data = {
404
+ condition: condition1
405
+ }
406
+ let res = await http.load('POST', 'rs/sql/getUserFilesAndDevicesAmount', {data:data}, {
407
+ resolveMsg: null,
408
+ rejectMsg: '获取表具失败!!!'
409
+ })
410
+ this.model.data = res.data
411
+ },
412
+ // 关闭对话框
413
+ closeDevices() {
414
+ this.showDevices = false
415
+ this.userfile = null
416
+
417
+ this.search()
418
+ }
419
+ },
420
+ events: {
421
+ },
422
+ computed: {
423
+ // 安装人
424
+ installperson() {
425
+ return function (f_input_person) {
426
+ if (isEmpty(f_input_person)) {
427
+ return this.$login.f.name
428
+ }
429
+ return f_input_person
430
+ }
431
+ },
432
+ installdate() {
433
+ return function (f_install_date) {
434
+ if (isEmpty(f_install_date)) {
435
+ return new Date().Format('yyyy-MM-dd HH:mm:ss')
436
+ }
437
+ return f_install_date
438
+ }
439
+ },
440
+ installType() {
441
+ return this.$appdata.getParam("安装方式")
442
+ },
443
+ WatchPurchases() {
444
+ return this.$appdata.getParam("购买方式")
445
+ },
446
+ userdevicestate() {
447
+ return this.$appdata.getParam("用户设备状态")
448
+ },
449
+ pipeType() {
450
+ return this.$appdata.getParam("管道类型")
451
+ },
452
+ devicesType() {
453
+ return this.$appdata.getParam("设备类型")
454
+ },
455
+ brandList() {
456
+ return this.$appdata.getParam("设备品牌")
457
+ }
458
+ },
459
+ watch: {
460
+ }
461
+ }
462
+ </script>
463
+ <style scoped>
464
+ .textNoLineBreak {
465
+ white-space: nowrap;
466
+ }
467
+ .input_view{
468
+ padding: 8px;
469
+ background-color: #ffffff;
470
+ border-radius: 2px;
471
+ border: solid 1px #c7c7c7!important;
472
+ color: #333333!important;
473
+ font-size: 15px!important;
474
+ }
475
+
476
+ .input_view[readonly]{
477
+ border: 1px solid #DDD!important;
478
+ color:#ACA899!important;
479
+ }
480
+ .input_view:disabled{
481
+ border: 1px solid #DDD!important;
482
+ color:#ACA899!important;
483
+ }
484
+ </style>