apply-clients 3.3.16 → 3.3.17

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 (57) hide show
  1. package/index.html +33 -33
  2. package/package.json +1 -1
  3. package/src/AndroidApp.vue +30 -30
  4. package/src/android.js +21 -21
  5. package/src/apply.js +3 -6
  6. package/src/applyAndroid.js +35 -35
  7. package/src/components/android/AppOnetomany.vue +285 -285
  8. package/src/components/android/AppServiceView.vue +570 -570
  9. package/src/components/android/AppTakePic.vue +143 -143
  10. package/src/components/android/Function/AppFunctionServiceControl.vue +329 -329
  11. package/src/components/android/Function/AppInstallFunction.vue +327 -327
  12. package/src/components/android/Process/AppExplorationUser.vue +268 -268
  13. package/src/components/android/Process/AppServiceControl.vue +711 -686
  14. package/src/components/android/Process/Processes/AppChargeManagement.vue +468 -468
  15. package/src/components/android/Process/Processes/AppDevicesManagement.vue +490 -490
  16. package/src/components/android/Process/Processes/AppInstallationDetails.vue +466 -466
  17. package/src/components/android/Process/Processes/AppSupplementalAgreement.vue +297 -297
  18. package/src/components/android/Supervisory/AppProcessSupervisory.vue +261 -261
  19. package/src/components/android/Supervisory/AppSupervisoryCart.vue +115 -115
  20. package/src/components/product/ApplyCharge/ApplyChargeList.vue +265 -265
  21. package/src/components/product/ApplyCharge/ApplyChargeSearch.vue +30 -30
  22. package/src/components/product/Function/InstallFunction.vue +122 -122
  23. package/src/components/product/Function/InstallInfoSelect.vue +289 -289
  24. package/src/components/product/Function/Service/FunctionServiceControl.vue +254 -254
  25. package/src/components/product/Onetomany.vue +296 -296
  26. package/src/components/product/Order/OrderApply.vue +47 -47
  27. package/src/components/product/Order/OrderApplyList.vue +62 -62
  28. package/src/components/product/Order/OrderMessage.vue +237 -237
  29. package/src/components/product/Process/ExplorationSelect.vue +145 -143
  30. package/src/components/product/Process/ExplorationUser.vue +128 -128
  31. package/src/components/product/Process/Processes/InstallationDetails.vue +421 -352
  32. package/src/components/product/Process/Processes/Print/img/10101.png +0 -0
  33. package/src/components/product/Process/Processes/Print/img/1010109.png +0 -0
  34. package/src/components/product/Process/Processes/Print/img/1010110.png +0 -0
  35. package/src/components/product/Process/Processes/Print/img/1010111.png +0 -0
  36. package/src/components/product/Process/Processes/Print/img/1010112.png +0 -0
  37. package/src/components/product/Process/Processes/{printCharge.vue → Print/printCharge.vue} +139 -121
  38. package/src/components/product/Process/Processes/Print/printRefund.vue +193 -0
  39. package/src/components/product/Process/Processes/addressAndUserinfoManagement.vue +181 -181
  40. package/src/components/product/Process/Processes/chargeManagement.vue +639 -639
  41. package/src/components/product/Process/Processes/devicesManagement.vue +458 -458
  42. package/src/components/product/Process/Processes/selectApply.vue +250 -250
  43. package/src/components/product/Process/Processes/selectUserinfo.vue +182 -182
  44. package/src/components/product/Process/Processes/supplementalAgreement.vue +298 -298
  45. package/src/components/product/Process/Service/ServiceControl.vue +916 -810
  46. package/src/components/product/Process/ShowBackReason.vue +33 -33
  47. package/src/components/product/ServiceView.vue +301 -307
  48. package/src/components/product/Stop/StopApplyList.vue +254 -254
  49. package/src/components/product/Supervisory/Service/SupervisoryServiceControl.vue +512 -517
  50. package/src/components/product/Supervisory/SupervisoryControl.vue +100 -100
  51. package/src/components/product/Supervisory/SupervisoryList.vue +226 -226
  52. package/src/components/product/Supervisory/SupervisoryhCart.vue +124 -124
  53. package/src/components/product/VueUtils/ApplyUpload.vue +262 -262
  54. package/src/components/product/VueUtils/GaoPaiYi/HighMeter.vue +1090 -1090
  55. package/src/main.js +23 -23
  56. package/src/components/product/Function/Inform.vue +0 -74
  57. package/src/components/product/Function/MarketSurvey.vue +0 -80
@@ -1,458 +1,458 @@
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_devices_type"
81
- v-model="item.f_devices_type"
82
- :options="devicesType"
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
- <datepicker
91
- placeholder="生产日期"
92
- :value.sync="item.f_make_date"
93
- v-model="item.f_make_date"
94
- format="yyyy-MM-dd HH:mm:ss"
95
- @change="expireDate($index)"
96
- :disabled="mark === 1">
97
- </datepicker>
98
- </div>
99
- </div>
100
- <div class="form-group col-sm-6">
101
- <label class="col-sm-4 control-label">设备数量:</label>
102
- <div class="col-sm-8">
103
- <input class="form-control input_view" style="" type="number"
104
- placeholder="设备数量"
105
- v-model="item.f_devices_num"
106
- :value="item.f_devices_num"
107
- :readonly="mark === 1"/>
108
- </div>
109
- </div>
110
- <div class="form-group col-sm-6">
111
- <label class="col-sm-4 control-label">安&ensp;装&ensp;人:</label>
112
- <div class="col-sm-8">
113
- <input class="form-control input_view" style=""
114
- placeholder="安装人"
115
- v-model="item.f_input_person"
116
- :value="installperson"
117
- readonly/>
118
- </div>
119
- </div>
120
- <div class="form-group col-sm-6">
121
- <label class="col-sm-4 control-label">安装日期:</label>
122
- <div class="col-sm-8">
123
- <input class="form-control input_view" style=""
124
- placeholder="安装日期"
125
- v-model="item.f_input_date"
126
- :value="installdate(item.f_input_date)"
127
- readonly/>
128
- <!-- <datepicker-->
129
- <!-- placeholder="安装日期"-->
130
- <!-- :value.sync="item.f_input_date"-->
131
- <!-- v-model="item.f_input_date"-->
132
- <!-- format="yyyy-MM-dd HH:mm:ss"-->
133
- <!-- :disabled="mark === 1">-->
134
- <!-- </datepicker>-->
135
- </div>
136
- </div>
137
- <!--
138
- <div class="form-group col-sm-6">
139
- <label class="col-sm-4 control-label">设备编号:</label>
140
- <div class="col-sm-8">
141
- <input class="form-control input_view" style=""
142
- placeholder="设备编号"
143
- v-model="item.f_devices_no"
144
- :value="item.f_devices_no"
145
- :readonly="mark === 1"/>
146
- </div>
147
- </div>
148
- <div class="form-group col-sm-6">
149
- <label class="col-sm-4 control-label">设备品牌:</label>
150
- <div class="col-sm-8">
151
- <input class="form-control input_view" style=""
152
- placeholder="设备品牌"
153
- v-model="item.f_brand"
154
- :value="item.f_brand"
155
- :readonly="mark === 1"/>
156
- </div>
157
- </div>
158
- <div class="form-group col-sm-6">
159
- <label class="col-sm-4 control-label">设备型号:</label>
160
- <div class="col-sm-8">
161
- <input class="form-control input_view" style=""
162
- placeholder="设备型号"
163
- v-model="item.f_devices_model"
164
- :value="item.f_devices_model"
165
- :readonly="mark === 1"/>
166
- </div>
167
- </div>
168
- <div class="form-group col-sm-6">
169
- <label class="col-sm-4 control-label">使用年限:</label>
170
- <div class="col-sm-8">
171
- <input class="form-control input_view" style="" type="number"
172
- placeholder="使用年限"
173
- v-model="item.f_service_life"
174
- :value="item.f_service_life"
175
- @change="expireDate($index)"
176
- :readonly="mark === 1"/>
177
- </div>
178
- </div>
179
- <div class="form-group col-sm-6">
180
- <label class="col-sm-4 control-label">到期日期:</label>
181
- <div class="col-sm-8">
182
- <datepicker
183
- placeholder="到期日期"
184
- :value.sync="item.f_expire_date"
185
- v-model="item.f_expire_date"
186
- format="yyyy-MM-dd HH:mm:ss"
187
- disabled>
188
- </datepicker>
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_pipeinstall_date"
197
- v-model="item.f_pipeinstall_date"
198
- format="yyyy-MM-dd HH:mm:ss"
199
- :disabled="mark === 1">
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_pipeexpire_date"
209
- v-model="item.f_pipeexpire_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
- <input-select
219
- class="select select_list"
220
- :value.sync="item.f_pipe_type"
221
- v-model="item.f_pipe_type"
222
- :options="pipeType"
223
- :disable="mark === 1"
224
- :valueSingle="true">
225
- </input-select>
226
- </div>
227
- </div>
228
- <div class="form-group col-sm-6">
229
- <label class="col-sm-4 control-label">设备状态:</label>
230
- <div class="col-sm-8">
231
- <input-select
232
- class="select select_list"
233
- :value.sync="item.f_userinfodevices_state"
234
- v-model="item.f_userinfodevices_state"
235
- :options="userdevicestate"
236
- :disable="mark === 1"
237
- :valueSingle="true"></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.WatchPurchase"
246
- v-model="item.WatchPurchase"
247
- :options="WatchPurchases"
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.f_install_type"
258
- v-model="item.f_install_type"
259
- :options="installType"
260
- :disable="mark === 1"
261
- :valueSingle="true"></input-select>
262
- </div>
263
- </div>
264
- <div class="form-group col-sm-12">
265
- <label class="col-sm-2 control-label">备&emsp;&emsp;注:</label>
266
- <div class="col-sm-10">
267
- <textarea
268
- class="form-control input_view" rows="2" style="width: 100%;height: 100%"
269
- v-model="item.f_comments" :value="item.f_comments"
270
- :disabled="mark === 1"
271
- ></textarea>
272
- </div>
273
- </div>
274
- -->
275
- </div>
276
-
277
- </article>
278
- <footer slot="modal-footer" class="modal-footer">
279
- <template v-if="mark !== 1">
280
- <button type="button" class="btn btn-primary" @click="pushDevice()">添加设备</button>
281
- <button type="button" class="btn btn-primary" @click="addDevice()">确认</button>
282
- </template>
283
- </footer>
284
- </modal>
285
- </div>
286
- </template>
287
- <script>
288
- import {getNowDate,isEmpty} from '../../../Util'
289
- import {PagedList} from 'vue-client'
290
- import Vue from 'vue'
291
- import {HttpResetClass} from 'vue-client'
292
- // Date格式化
293
- Date.prototype.Format = function (fmt) {
294
- var o = {
295
- 'M+': this.getMonth() + 1, // 月份
296
- 'd+': this.getDate(), // 日
297
- 'H+': this.getHours(), // 小时
298
- 'm+': this.getMinutes(), // 分
299
- 's+': this.getSeconds(), // 秒
300
- 'q+': Math.floor((this.getMonth() + 3) / 3), // 季度
301
- 'S': this.getMilliseconds() // 毫秒
302
- }
303
- if (/(y+)/.test(fmt)) fmt = fmt.replace(RegExp.$1, (this.getFullYear() + '').substr(4 - RegExp.$1.length))
304
- for (var k in o) {
305
- if (new RegExp('(' + k + ')').test(fmt)) fmt = fmt.replace(RegExp.$1, (RegExp.$1.length === 1) ? (o[k]) : (('00' + o[k]).substr(('' + o[k]).length)))
306
- }
307
- return fmt
308
- }
309
-
310
- export default {
311
- title: '设备管理',
312
- props: {
313
- selectdata: {
314
- type: Object
315
- },
316
- mark: {
317
- type: Number,
318
- default: 0
319
- }
320
- },
321
- data () {
322
- return {
323
- model: {
324
- data: null
325
- },
326
- userfile: null,
327
- showDevices: false
328
- }
329
- },
330
- ready () {
331
- this.search()
332
- },
333
- methods: {
334
- deleteDevicesinfo (index) {
335
- this.userfile.devicesinfo.splice(index, 1)
336
- },
337
- async addDevice () {
338
- let data = {
339
- selectdata: this.selectdata,
340
- userfile: this.userfile,
341
- user: this.$login.f
342
- }
343
- let res = await this.$resetpost(
344
- `rs/logic/applyAddDevice`,
345
- {data: data},
346
- {resolveMsg: null, rejectMsg: '设备添加失败!!!'}
347
- )
348
-
349
- this.closeDevices()
350
- },
351
- pushDevice () {
352
- this.userfile.devicesinfo.push({})
353
- },
354
- expireDate (index) {
355
-
356
- if (isEmpty(this.userfile.devicesinfo[index].f_make_date) || isEmpty(this.userfile.devicesinfo[index].f_service_life)) {
357
- return
358
- }
359
- let f_make_date = new Date(this.userfile.devicesinfo[index].f_make_date)
360
- let year = (f_make_date.getFullYear() - 0) + (this.userfile.devicesinfo[index].f_service_life - 0)
361
- let month = (f_make_date.getMonth() - 0) + 1
362
- let day = f_make_date.getDate()
363
-
364
- Vue.set(this.userfile.devicesinfo[index], 'f_expire_date', year + '-' + (month < 10 ? '0' + month : month) + '-' + (day < 10 ? '0' + day : day))
365
- },
366
- async openDevicesModal (row) {
367
- this.userfile = row
368
-
369
- let data = {
370
- tablename: 't_devices',
371
- condition: `f_userfiles_id = '${this.userfile.f_userfiles_id}'`
372
- }
373
- let res = await this.$resetpost(
374
- `rs/sql/singleTable`,
375
- {data: data},
376
- {resolveMsg: null, rejectMsg: '设备查询失败!!!'}
377
- )
378
-
379
- Vue.set(this.userfile, 'devicesinfo', res.data)
380
-
381
- this.showDevices = true
382
- },
383
- async search () {
384
- let http = new HttpResetClass()
385
- let data = {
386
- condition: `f_userinfo_id = '${this.selectdata.f_userinfo_id}'`
387
- }
388
- let res = await http.load('POST', 'rs/sql/getUserFilesAndDevicesAmount', {data:data}, {
389
- resolveMsg: null,
390
- rejectMsg: '获取表具失败!!!'
391
- })
392
- this.model.data = res.data
393
- },
394
- // 关闭对话框
395
- closeDevices() {
396
- this.showDevices = false
397
- this.userfile = null
398
-
399
- this.search()
400
- }
401
- },
402
- events: {
403
- },
404
- computed: {
405
- // 安装人
406
- installperson() {
407
- return this.$login.f.name
408
- },
409
- installdate() {
410
- return function (f_install_date) {
411
- if (isEmpty(f_install_date)) {
412
- return new Date().Format('yyyy-MM-dd HH:mm:ss')
413
- }
414
- return f_install_date
415
- }
416
- },
417
- installType() {
418
- return this.$appdata.getParam("安装方式")
419
- },
420
- WatchPurchases() {
421
- return this.$appdata.getParam("购买方式")
422
- },
423
- userdevicestate() {
424
- return this.$appdata.getParam("用户设备状态")
425
- },
426
- pipeType() {
427
- return this.$appdata.getParam("管道类型")
428
- },
429
- devicesType() {
430
- return this.$appdata.getParam("设备类型")
431
- }
432
- },
433
- watch: {
434
- }
435
- }
436
- </script>
437
- <style scoped>
438
- .textNoLineBreak {
439
- white-space: nowrap;
440
- }
441
- .input_view{
442
- padding: 8px;
443
- background-color: #ffffff;
444
- border-radius: 2px;
445
- border: solid 1px #c7c7c7!important;
446
- color: #333333!important;
447
- font-size: 15px!important;
448
- }
449
-
450
- .input_view[readonly]{
451
- border: 1px solid #DDD!important;
452
- color:#ACA899!important;
453
- }
454
- .input_view:disabled{
455
- border: 1px solid #DDD!important;
456
- color:#ACA899!important;
457
- }
458
- </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_devices_type"
81
+ v-model="item.f_devices_type"
82
+ :options="devicesType"
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
+ <datepicker
91
+ placeholder="生产日期"
92
+ :value.sync="item.f_make_date"
93
+ v-model="item.f_make_date"
94
+ format="yyyy-MM-dd HH:mm:ss"
95
+ @change="expireDate($index)"
96
+ :disabled="mark === 1">
97
+ </datepicker>
98
+ </div>
99
+ </div>
100
+ <div class="form-group col-sm-6">
101
+ <label class="col-sm-4 control-label">设备数量:</label>
102
+ <div class="col-sm-8">
103
+ <input class="form-control input_view" style="" type="number"
104
+ placeholder="设备数量"
105
+ v-model="item.f_devices_num"
106
+ :value="item.f_devices_num"
107
+ :readonly="mark === 1"/>
108
+ </div>
109
+ </div>
110
+ <div class="form-group col-sm-6">
111
+ <label class="col-sm-4 control-label">安&ensp;装&ensp;人:</label>
112
+ <div class="col-sm-8">
113
+ <input class="form-control input_view" style=""
114
+ placeholder="安装人"
115
+ v-model="item.f_input_person"
116
+ :value="installperson"
117
+ readonly/>
118
+ </div>
119
+ </div>
120
+ <div class="form-group col-sm-6">
121
+ <label class="col-sm-4 control-label">安装日期:</label>
122
+ <div class="col-sm-8">
123
+ <input class="form-control input_view" style=""
124
+ placeholder="安装日期"
125
+ v-model="item.f_input_date"
126
+ :value="installdate(item.f_input_date)"
127
+ readonly/>
128
+ <!-- <datepicker-->
129
+ <!-- placeholder="安装日期"-->
130
+ <!-- :value.sync="item.f_input_date"-->
131
+ <!-- v-model="item.f_input_date"-->
132
+ <!-- format="yyyy-MM-dd HH:mm:ss"-->
133
+ <!-- :disabled="mark === 1">-->
134
+ <!-- </datepicker>-->
135
+ </div>
136
+ </div>
137
+ <!--
138
+ <div class="form-group col-sm-6">
139
+ <label class="col-sm-4 control-label">设备编号:</label>
140
+ <div class="col-sm-8">
141
+ <input class="form-control input_view" style=""
142
+ placeholder="设备编号"
143
+ v-model="item.f_devices_no"
144
+ :value="item.f_devices_no"
145
+ :readonly="mark === 1"/>
146
+ </div>
147
+ </div>
148
+ <div class="form-group col-sm-6">
149
+ <label class="col-sm-4 control-label">设备品牌:</label>
150
+ <div class="col-sm-8">
151
+ <input class="form-control input_view" style=""
152
+ placeholder="设备品牌"
153
+ v-model="item.f_brand"
154
+ :value="item.f_brand"
155
+ :readonly="mark === 1"/>
156
+ </div>
157
+ </div>
158
+ <div class="form-group col-sm-6">
159
+ <label class="col-sm-4 control-label">设备型号:</label>
160
+ <div class="col-sm-8">
161
+ <input class="form-control input_view" style=""
162
+ placeholder="设备型号"
163
+ v-model="item.f_devices_model"
164
+ :value="item.f_devices_model"
165
+ :readonly="mark === 1"/>
166
+ </div>
167
+ </div>
168
+ <div class="form-group col-sm-6">
169
+ <label class="col-sm-4 control-label">使用年限:</label>
170
+ <div class="col-sm-8">
171
+ <input class="form-control input_view" style="" type="number"
172
+ placeholder="使用年限"
173
+ v-model="item.f_service_life"
174
+ :value="item.f_service_life"
175
+ @change="expireDate($index)"
176
+ :readonly="mark === 1"/>
177
+ </div>
178
+ </div>
179
+ <div class="form-group col-sm-6">
180
+ <label class="col-sm-4 control-label">到期日期:</label>
181
+ <div class="col-sm-8">
182
+ <datepicker
183
+ placeholder="到期日期"
184
+ :value.sync="item.f_expire_date"
185
+ v-model="item.f_expire_date"
186
+ format="yyyy-MM-dd HH:mm:ss"
187
+ disabled>
188
+ </datepicker>
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_pipeinstall_date"
197
+ v-model="item.f_pipeinstall_date"
198
+ format="yyyy-MM-dd HH:mm:ss"
199
+ :disabled="mark === 1">
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_pipeexpire_date"
209
+ v-model="item.f_pipeexpire_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
+ <input-select
219
+ class="select select_list"
220
+ :value.sync="item.f_pipe_type"
221
+ v-model="item.f_pipe_type"
222
+ :options="pipeType"
223
+ :disable="mark === 1"
224
+ :valueSingle="true">
225
+ </input-select>
226
+ </div>
227
+ </div>
228
+ <div class="form-group col-sm-6">
229
+ <label class="col-sm-4 control-label">设备状态:</label>
230
+ <div class="col-sm-8">
231
+ <input-select
232
+ class="select select_list"
233
+ :value.sync="item.f_userinfodevices_state"
234
+ v-model="item.f_userinfodevices_state"
235
+ :options="userdevicestate"
236
+ :disable="mark === 1"
237
+ :valueSingle="true"></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.WatchPurchase"
246
+ v-model="item.WatchPurchase"
247
+ :options="WatchPurchases"
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.f_install_type"
258
+ v-model="item.f_install_type"
259
+ :options="installType"
260
+ :disable="mark === 1"
261
+ :valueSingle="true"></input-select>
262
+ </div>
263
+ </div>
264
+ <div class="form-group col-sm-12">
265
+ <label class="col-sm-2 control-label">备&emsp;&emsp;注:</label>
266
+ <div class="col-sm-10">
267
+ <textarea
268
+ class="form-control input_view" rows="2" style="width: 100%;height: 100%"
269
+ v-model="item.f_comments" :value="item.f_comments"
270
+ :disabled="mark === 1"
271
+ ></textarea>
272
+ </div>
273
+ </div>
274
+ -->
275
+ </div>
276
+
277
+ </article>
278
+ <footer slot="modal-footer" class="modal-footer">
279
+ <template v-if="mark !== 1">
280
+ <button type="button" class="btn btn-primary" @click="pushDevice()">添加设备</button>
281
+ <button type="button" class="btn btn-primary" @click="addDevice()">确认</button>
282
+ </template>
283
+ </footer>
284
+ </modal>
285
+ </div>
286
+ </template>
287
+ <script>
288
+ import {getNowDate,isEmpty} from '../../../Util'
289
+ import {PagedList} from 'vue-client'
290
+ import Vue from 'vue'
291
+ import {HttpResetClass} from 'vue-client'
292
+ // Date格式化
293
+ Date.prototype.Format = function (fmt) {
294
+ var o = {
295
+ 'M+': this.getMonth() + 1, // 月份
296
+ 'd+': this.getDate(), // 日
297
+ 'H+': this.getHours(), // 小时
298
+ 'm+': this.getMinutes(), // 分
299
+ 's+': this.getSeconds(), // 秒
300
+ 'q+': Math.floor((this.getMonth() + 3) / 3), // 季度
301
+ 'S': this.getMilliseconds() // 毫秒
302
+ }
303
+ if (/(y+)/.test(fmt)) fmt = fmt.replace(RegExp.$1, (this.getFullYear() + '').substr(4 - RegExp.$1.length))
304
+ for (var k in o) {
305
+ if (new RegExp('(' + k + ')').test(fmt)) fmt = fmt.replace(RegExp.$1, (RegExp.$1.length === 1) ? (o[k]) : (('00' + o[k]).substr(('' + o[k]).length)))
306
+ }
307
+ return fmt
308
+ }
309
+
310
+ export default {
311
+ title: '设备管理',
312
+ props: {
313
+ selectdata: {
314
+ type: Object
315
+ },
316
+ mark: {
317
+ type: Number,
318
+ default: 0
319
+ }
320
+ },
321
+ data () {
322
+ return {
323
+ model: {
324
+ data: null
325
+ },
326
+ userfile: null,
327
+ showDevices: false
328
+ }
329
+ },
330
+ ready () {
331
+ this.search()
332
+ },
333
+ methods: {
334
+ deleteDevicesinfo (index) {
335
+ this.userfile.devicesinfo.splice(index, 1)
336
+ },
337
+ async addDevice () {
338
+ let data = {
339
+ selectdata: this.selectdata,
340
+ userfile: this.userfile,
341
+ user: this.$login.f
342
+ }
343
+ let res = await this.$resetpost(
344
+ `rs/logic/applyAddDevice`,
345
+ {data: data},
346
+ {resolveMsg: null, rejectMsg: '设备添加失败!!!'}
347
+ )
348
+
349
+ this.closeDevices()
350
+ },
351
+ pushDevice () {
352
+ this.userfile.devicesinfo.push({})
353
+ },
354
+ expireDate (index) {
355
+
356
+ if (isEmpty(this.userfile.devicesinfo[index].f_make_date) || isEmpty(this.userfile.devicesinfo[index].f_service_life)) {
357
+ return
358
+ }
359
+ let f_make_date = new Date(this.userfile.devicesinfo[index].f_make_date)
360
+ let year = (f_make_date.getFullYear() - 0) + (this.userfile.devicesinfo[index].f_service_life - 0)
361
+ let month = (f_make_date.getMonth() - 0) + 1
362
+ let day = f_make_date.getDate()
363
+
364
+ Vue.set(this.userfile.devicesinfo[index], 'f_expire_date', year + '-' + (month < 10 ? '0' + month : month) + '-' + (day < 10 ? '0' + day : day))
365
+ },
366
+ async openDevicesModal (row) {
367
+ this.userfile = row
368
+
369
+ let data = {
370
+ tablename: 't_devices',
371
+ condition: `f_userfiles_id = '${this.userfile.f_userfiles_id}'`
372
+ }
373
+ let res = await this.$resetpost(
374
+ `rs/sql/singleTable`,
375
+ {data: data},
376
+ {resolveMsg: null, rejectMsg: '设备查询失败!!!'}
377
+ )
378
+
379
+ Vue.set(this.userfile, 'devicesinfo', res.data)
380
+
381
+ this.showDevices = true
382
+ },
383
+ async search () {
384
+ let http = new HttpResetClass()
385
+ let data = {
386
+ condition: `f_userinfo_id = '${this.selectdata.f_userinfo_id}'`
387
+ }
388
+ let res = await http.load('POST', 'rs/sql/getUserFilesAndDevicesAmount', {data:data}, {
389
+ resolveMsg: null,
390
+ rejectMsg: '获取表具失败!!!'
391
+ })
392
+ this.model.data = res.data
393
+ },
394
+ // 关闭对话框
395
+ closeDevices() {
396
+ this.showDevices = false
397
+ this.userfile = null
398
+
399
+ this.search()
400
+ }
401
+ },
402
+ events: {
403
+ },
404
+ computed: {
405
+ // 安装人
406
+ installperson() {
407
+ return this.$login.f.name
408
+ },
409
+ installdate() {
410
+ return function (f_install_date) {
411
+ if (isEmpty(f_install_date)) {
412
+ return new Date().Format('yyyy-MM-dd HH:mm:ss')
413
+ }
414
+ return f_install_date
415
+ }
416
+ },
417
+ installType() {
418
+ return this.$appdata.getParam("安装方式")
419
+ },
420
+ WatchPurchases() {
421
+ return this.$appdata.getParam("购买方式")
422
+ },
423
+ userdevicestate() {
424
+ return this.$appdata.getParam("用户设备状态")
425
+ },
426
+ pipeType() {
427
+ return this.$appdata.getParam("管道类型")
428
+ },
429
+ devicesType() {
430
+ return this.$appdata.getParam("设备类型")
431
+ }
432
+ },
433
+ watch: {
434
+ }
435
+ }
436
+ </script>
437
+ <style scoped>
438
+ .textNoLineBreak {
439
+ white-space: nowrap;
440
+ }
441
+ .input_view{
442
+ padding: 8px;
443
+ background-color: #ffffff;
444
+ border-radius: 2px;
445
+ border: solid 1px #c7c7c7!important;
446
+ color: #333333!important;
447
+ font-size: 15px!important;
448
+ }
449
+
450
+ .input_view[readonly]{
451
+ border: 1px solid #DDD!important;
452
+ color:#ACA899!important;
453
+ }
454
+ .input_view:disabled{
455
+ border: 1px solid #DDD!important;
456
+ color:#ACA899!important;
457
+ }
458
+ </style>