apply-clients 3.4.63 → 3.4.64

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 (94) hide show
  1. package/build/dev-server.js +119 -119
  2. package/dist-android/static/18.js +2 -2
  3. package/dist-android/static/18.js.map +1 -1
  4. package/dist-android/static/19.js +2 -2
  5. package/dist-android/static/19.js.map +1 -1
  6. package/dist-android/static/24.js +2 -2
  7. package/dist-android/static/24.js.map +1 -1
  8. package/dist-android/static/25.js +2 -2
  9. package/dist-android/static/25.js.map +1 -1
  10. package/dist-android/static/26.js +2 -2
  11. package/dist-android/static/26.js.map +1 -1
  12. package/dist-android/static/28.js +2 -2
  13. package/dist-android/static/28.js.map +1 -1
  14. package/dist-android/static/30.js +2 -2
  15. package/dist-android/static/30.js.map +1 -1
  16. package/dist-android/static/34.js +2 -2
  17. package/dist-android/static/34.js.map +1 -1
  18. package/dist-android/static/43.js +2 -2
  19. package/dist-android/static/43.js.map +1 -1
  20. package/dist-android/static/47.js +2 -2
  21. package/dist-android/static/47.js.map +1 -1
  22. package/dist-android/static/50.js +2 -2
  23. package/dist-android/static/50.js.map +1 -1
  24. package/dist-android/static/52.js +2 -2
  25. package/dist-android/static/52.js.map +1 -1
  26. package/dist-android/static/53.js +2 -2
  27. package/dist-android/static/53.js.map +1 -1
  28. package/dist-android/static/54.js +2 -2
  29. package/dist-android/static/54.js.map +1 -1
  30. package/dist-android/static/60.js +2 -2
  31. package/dist-android/static/60.js.map +1 -1
  32. package/dist-android/static/63.js +2 -2
  33. package/dist-android/static/63.js.map +1 -1
  34. package/dist-android/static/64.js +2 -2
  35. package/dist-android/static/64.js.map +1 -1
  36. package/dist-android/static/78.js +2 -2
  37. package/dist-android/static/78.js.map +1 -1
  38. package/dist-android/static/83.js +2 -2
  39. package/dist-android/static/83.js.map +1 -1
  40. package/dist-android/static/84.js +2 -2
  41. package/dist-android/static/84.js.map +1 -1
  42. package/dist-android/static/86.js +2 -2
  43. package/dist-android/static/86.js.map +1 -1
  44. package/dist-android/static/87.js +2 -2
  45. package/dist-android/static/87.js.map +1 -1
  46. package/dist-android/static/89.js +2 -2
  47. package/dist-android/static/89.js.map +1 -1
  48. package/dist-android/static/97.js +2 -2
  49. package/dist-android/static/97.js.map +1 -1
  50. package/dist-android/static/app.js +80 -80
  51. package/dist-android/static/app.js.map +1 -1
  52. package/dist.7z +0 -0
  53. package/package.json +1 -1
  54. package/src/components/android/AppSign.vue +154 -154
  55. package/src/components/android/AppTakePic.vue +143 -143
  56. package/src/components/android/Function/AppFunctionServiceControl.vue +344 -344
  57. package/src/components/android/Process/AppServiceControl.vue +1708 -1708
  58. package/src/components/android/Process/Processes/AppAddMaterialScience.vue +477 -477
  59. package/src/components/android/Process/Processes/AppDevicesManagement.vue +519 -519
  60. package/src/components/android/Process/Processes/AppSupplementalAgreement.vue +298 -298
  61. package/src/components/android/Supervisory/AppSupervisoryCart.vue +156 -156
  62. package/src/components/build/Install/Process/zhongran/ZR_Design.vue +537 -537
  63. package/src/components/product/ApplyCharge/ApplyChargeList.vue +470 -470
  64. package/src/components/product/Function/Service/FunctionServiceControl.vue +445 -445
  65. package/src/components/product/Process/Processes/addMaterialScience.vue +454 -454
  66. package/src/components/product/Process/Processes/chargeManagement.vue +656 -656
  67. package/src/components/product/Process/Processes/devicesManagement.vue +484 -484
  68. package/src/components/product/Process/Processes/supplementalAgreement.vue +298 -298
  69. package/src/components/product/Process/Service/ServiceControl.vue +18 -41
  70. package/src/components/product/Process/Service/ShowBackReason.vue +33 -33
  71. package/src/components/product/Process/ShowBackReason.vue +33 -33
  72. package/src/components/product/Supervisory/Service/SupervisoryServiceControl.vue +882 -882
  73. package/src/components/product/VueUtils/ApplyUpload.vue +287 -287
  74. package/src/filiale/gehua/pc/ServiceControl.vue +1938 -1938
  75. package/src/filiale/gehua/pc/SupervisoryServiceControl.vue +890 -890
  76. package/src/filiale/guangxi/android/Process/Processes/AppAddMaterialScience.vue +520 -520
  77. package/src/filiale/guangxi/android/Process/Processes/AppDevicesManagement.vue +519 -519
  78. package/src/filiale/guangxi/android/Process/Processes/AppServiceControl.vue +1708 -1708
  79. package/src/filiale/guangxi/android/Process/Processes/AppSupplementalAgreement.vue +298 -298
  80. package/src/filiale/guangxi/pc/ApplyCharge/ApplyChargeList.vue +470 -470
  81. package/src/filiale/guangxi/pc/ApplyCharge/chargeManagement.vue +724 -724
  82. package/src/filiale/guangxi/pc/Process/Service/ServiceControl.vue +1922 -1922
  83. package/src/filiale/guangxi/pc/Process/Service/ShowBackReason.vue +33 -33
  84. package/src/filiale/guangxi/pc/Process/Service/SupervisoryServiceControl.vue +891 -891
  85. package/src/filiale/guangxi/pc/Process/Service/addMaterialScience.vue +517 -517
  86. package/src/filiale/guangxi/pc/Process/ShowBackReason.vue +33 -33
  87. package/src/filiale/yuchuan/android/Process/AppServiceControl.vue +735 -735
  88. package/src/filiale/yuchuan/android/Process/Processes/AppInstallationDetails.vue +824 -824
  89. package/src/filiale/yuchuan/android/Process/Processes/AppInstallationDetailsCivil.vue +650 -650
  90. package/src/filiale/yuchuan/pc/Order/OrderApply.vue +528 -528
  91. package/src/filiale/yuchuan/pc/Process/Processes/InstallationDetails.vue +809 -809
  92. package/src/filiale/yuchuan/pc/Process/Processes/InstallationDetailsCivil.vue +595 -595
  93. package/src/filiale/yuchuan/pc/Process/Processes/chargeManagement.vue +621 -621
  94. package/src/filiale/yuchuan/pc/Process/Service/ServiceControl.vue +1108 -1108
@@ -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/apply_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>