apply-clients 7.1.36-yuchuan-12 → 7.1.36-yuchuan-13

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 (77) hide show
  1. package/android.html +28 -28
  2. package/build/dev-server.js +28 -10
  3. package/index.html +39 -39
  4. package/package.json +3 -4
  5. package/src/apply.js +162 -161
  6. package/src/applyAndroid.js +97 -97
  7. package/src/components/android/AppSign.vue +235 -235
  8. package/src/components/android/AppUpload.vue +275 -275
  9. package/src/components/android/Ignition/VentilationIgnition.vue +408 -408
  10. package/src/components/android/Ignition/VentilationIgnitionHandle.vue +462 -462
  11. package/src/components/android/Process/AppExplorationUser.vue +454 -454
  12. package/src/components/android/Process/AppServiceControl.vue +1437 -1437
  13. package/src/components/android/Process/Processes/AppInstallationDetails.vue +980 -980
  14. package/src/components/android/Sign/AppSignTask.vue +183 -183
  15. package/src/components/android/Supervisory/AppProcessSupervisory.vue +344 -344
  16. package/src/components/android/Task/GuanXianJianShe/AppExplorationGuanXian.vue +317 -317
  17. package/src/components/android/Task/ShiGongXinXi/AppShowBuildUser.vue +431 -431
  18. package/src/components/android/Task/yiban/AppShowDone.vue +442 -442
  19. package/src/components/android/Task/yiban/ShowDone.vue +95 -95
  20. package/src/components/android/Task/yiban/satisfactionShow.vue +166 -166
  21. package/src/components/android/newPackage/customerServiceManager.vue +218 -218
  22. package/src/components/android/newPackage/projectPrice.vue +218 -218
  23. package/src/components/product/ApplyCharge/ApplyChargeList.vue +1 -1
  24. package/src/components/product/ApplyGaiXianCharge/ApplyGaiXianViewList.vue +272 -272
  25. package/src/components/product/ApplyGuanXian/GuanXianCaiLiao.vue +236 -236
  26. package/src/components/product/ApplyGuanXian/GuanXianExplorationSelect.vue +324 -324
  27. package/src/components/product/ApplyGuanXian/GuanXianExplorationUser.vue +144 -144
  28. package/src/components/product/ApplyGuanXian/GuanXianSupervisoryhCart.vue +119 -119
  29. package/src/components/product/ApplyMap/AMapLocation.vue +870 -0
  30. package/src/components/product/ApplyMap/AmapUtil.js +37 -0
  31. package/src/components/product/ApplyMap/ApplyDragaboutList.vue +223 -223
  32. package/src/components/product/ApplyMap/ApplyInputSearch.vue +212 -212
  33. package/src/components/product/ApplyMap/ApplyMapCom.vue +82 -82
  34. package/src/components/product/ApplyMap/ApplyMapInputSearch.vue +335 -335
  35. package/src/components/product/ApplyMap/ApplyMapLocation.vue +862 -862
  36. package/src/components/product/ChongZheng/ApplyChongZhengList.vue +415 -415
  37. package/src/components/product/Function/InstallFunction.vue +133 -133
  38. package/src/components/product/Function/InstallInfoSelect.vue +371 -371
  39. package/src/components/product/Function/Service/FunctionServiceControl.vue +586 -586
  40. package/src/components/product/GongJianPush/ApplyPushDispose.vue +162 -72
  41. package/src/components/product/GongJianPush/ApplyPushList.vue +47 -52
  42. package/src/components/product/GongJianPush/ApplyPushManage.vue +4 -3
  43. package/src/components/product/Ignition/IgnitionListManage.vue +602 -602
  44. package/src/components/product/Ignition/IgnitionRecord.vue +380 -380
  45. package/src/components/product/InsuranceApply/InsuranceReport.vue +3 -4
  46. package/src/components/product/List/OldShowDevices.vue +271 -271
  47. package/src/components/product/List/ShowAllActivity.vue +540 -540
  48. package/src/components/product/List/ShowDevices.vue +279 -279
  49. package/src/components/product/Print/BuildOrder/buildOrderList.vue +446 -446
  50. package/src/components/product/Process/ExplorationSelect.vue +597 -597
  51. package/src/components/product/Process/ExplorationUser.vue +158 -158
  52. package/src/components/product/Process/New1ExplorationUser.vue +201 -201
  53. package/src/components/product/Process/NewExplorationSelect.vue +586 -586
  54. package/src/components/product/Process/NewExplorationUser.vue +219 -219
  55. package/src/components/product/Process/Processes/InstallationDetails.vue +1159 -1159
  56. package/src/components/product/Process/Processes/Print/printCharge.vue +250 -250
  57. package/src/components/product/Process/Processes/Print/printGaiXianCharge.vue +244 -244
  58. package/src/components/product/Process/Processes/chargeManagement.vue +704 -704
  59. package/src/components/product/Process/Processes/devicesManagement.vue +393 -393
  60. package/src/components/product/Process/Processes/newDevicesManagement.vue +413 -413
  61. package/src/components/product/Process/Processes/selectChaiChuUserinfo.vue +230 -230
  62. package/src/components/product/Process/Processes/selectOldUserinfo.vue +241 -241
  63. package/src/components/product/Process/Processes/selectUserinfo.vue +234 -234
  64. package/src/components/product/Process/Service/ServiceControl.vue +2205 -2205
  65. package/src/components/product/ServiceView.vue +644 -644
  66. package/src/components/product/Stop/StopApplyList.vue +224 -224
  67. package/src/components/product/Supervisory/NewSupervisoryhCart.vue +175 -175
  68. package/src/components/product/Supervisory/Service/SupervisoryServiceControl.vue +592 -592
  69. package/src/components/product/Supervisory/SupervisoryControl.vue +116 -116
  70. package/src/components/product/Supervisory/SupervisoryList.vue +557 -557
  71. package/src/components/product/Supervisory/SupervisoryhCart.vue +119 -119
  72. package/src/components/product/Supervisory/YiBanSupervisoryList.vue +539 -539
  73. package/src/components/product/VueUtils/ApplyUpload.vue +294 -285
  74. package/src/components/product/records/AdjustmentRecordList.vue +162 -162
  75. package/src/main.js +27 -27
  76. package/static/marker-default.png +0 -0
  77. package/static/myLocationIcon.png +0 -0
@@ -1,413 +1,413 @@
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">
10
- <button
11
- type="button"
12
- class="btn btn-info head-but"
13
- @click="$parent.$parent.openDevicesModal()"
14
- v-if="false"
15
- :disabled="$parent.$parent.mark === 1"
16
- >添加</button>
17
- </th>
18
- </tr>
19
- </template>
20
- <template partial='body'>
21
- <tr>
22
- <td style="text-align: center;">
23
- <nobr>{{$index+1}}</nobr>
24
- </td>
25
- <td style="text-align: center;">
26
- <nobr>{{row.f_userinfo_id}}</nobr>
27
- </td>
28
- <td style="text-align: center;">
29
- <nobr>{{row.amount}}</nobr>
30
- </td>
31
- <td style="text-align: center;">
32
- <nobr>
33
- <button
34
- type="button"
35
- name="button"
36
- class="btn btn-link"
37
- @click="$parent.$parent.openDevicesModal(row)"
38
- >
39
- {{$parent.$parent.mark === 1 ? '查看' : '修正'}}
40
- </button>
41
- <button
42
- type="button" name="button" class="btn btn-link"
43
- @click="$parent.$parent.deleteUserinfo(row)"
44
- v-if="$parent.$parent.showDeleteUserInfo"
45
- :disabled="$parent.$parent.mark === 1"
46
- >
47
- 删除
48
- </button>
49
- </nobr>
50
- </td>
51
- </tr>
52
- </template>
53
- </data-grid>
54
-
55
-
56
- <modal v-if="showDevices" :show.sync="showDevices" v-ref:modal :large="true" :backdrop="false" title="表具设备信息">
57
- <header slot="modal-header" class="modal-header">
58
- <button type="button" class="close" @click="closeDevices"><span>&times;</span></button>
59
- <h4 class="modal-title">表具设备信息</h4>
60
- </header>
61
- <article slot="modal-body" class="modal-body clearfix">
62
- <div v-for="(i, item) in devicesinfo" class="form-group col-sm-12 panel panel-info">
63
- <div class="panel-heading head col-sm-12" style="background-color: #e8f4ff;margin-bottom: 10px">
64
- <div class="col-sm-6 text-left">设备{{$index+1}}信息</div>
65
- <div class="col-sm-6 text-right"><button
66
- class="button_delete button_spacing"
67
- v-if="!item.id && mark !== 1"
68
- @click.prevent="deleteDevicesinfo(i)"
69
- >删除</button></div>
70
- <div class="col-sm-6 text-right"><button
71
- class="button_delete button_spacing"
72
- v-if="item.id && mark !== 1 && item.f_operate_state === 1"
73
- @click.prevent="deleteDevices(item.id)"
74
- >删除</button></div>
75
- <div class="col-sm-6 text-right"><button
76
- class="button_delete button_spacing"
77
- v-if="item.id && mark !== 1 && item.f_operate_state === 0"
78
- @click.prevent="quChuDevices(item.id, '减少')"
79
- >减少</button></div>
80
- <div class="col-sm-6 text-right"><button
81
- class="button_delete button_spacing"
82
- v-if="item.id && mark !== 1 && item.f_operate_state === 2"
83
- @click.prevent="quChuDevices(item.id, '恢复')"
84
- >恢复</button></div>
85
- <div class="col-sm-6 text-right">
86
- <label class="col-sm-4 control-label" v-if="item.f_operate_state === 0">旧设备</label>
87
- </div>
88
- <div class="col-sm-6 text-right">
89
- <label class="col-sm-4 control-label" v-if="item.f_operate_state === 1">新设备</label>
90
- </div>
91
- <div class="col-sm-6 text-right">
92
- <label class="col-sm-4 control-label" v-if="item.f_operate_state === 2">标记减少设备</label>
93
- </div>
94
- </div>
95
- <div class="form-group col-sm-6" :class="[!item.f_devices_type ? 'has-error' : '']">
96
- <label class="col-sm-4 control-label">设备类型:</label>
97
- <div class="col-sm-8">
98
- <input-select
99
- class="select select_list"
100
- :value.sync="item.f_devices_type"
101
- v-model="item.f_devices_type"
102
- :options="devicesType"
103
- :disable="mark === 1 || item.f_operate_state === 0"
104
- :valueSingle="true"></input-select>
105
- </div>
106
- </div>
107
- <div class="form-group col-sm-6">
108
- <label class="col-sm-4 control-label">设备编号:</label>
109
- <div class="col-sm-8">
110
- <input class="form-control input_view" style=""
111
- placeholder="设备编号"
112
- v-model="item.f_devices_no"
113
- :value="item.f_devices_no"
114
- :readonly="mark === 1 || item.f_operate_state === 0"/>
115
- </div>
116
- </div>
117
- <div class="form-group col-sm-6">
118
- <label class="col-sm-4 control-label">设备品牌:</label>
119
- <div class="col-sm-8">
120
- <input class="form-control input_view" style=""
121
- placeholder="设备品牌"
122
- v-model="item.f_brand"
123
- :value="item.f_brand"
124
- :readonly="mark === 1 || item.f_operate_state === 0"/>
125
- </div>
126
- </div>
127
- <div class="form-group col-sm-6">
128
- <label class="col-sm-4 control-label">设备型号:</label>
129
- <div class="col-sm-8">
130
- <input class="form-control input_view" style=""
131
- placeholder="设备型号"
132
- v-model="item.f_devices_model"
133
- :value="item.f_devices_model"
134
- :readonly="mark === 1 || item.f_operate_state === 0"/>
135
- </div>
136
- </div>
137
- <div class="form-group col-sm-6" :class="[!item.f_devices_num ? 'has-error' : '']">
138
- <label class="col-sm-4 control-label">设备数量:</label>
139
- <div class="col-sm-8">
140
- <input class="form-control input_view" style="" type="number"
141
- placeholder="设备数量"
142
- v-model="item.f_devices_num"
143
- :value="item.f_devices_num"
144
- :readonly="mark === 1 || item.f_operate_state === 0"/>
145
- </div>
146
- </div>
147
- <div class="form-group col-sm-6">
148
- <label class="col-sm-4 control-label">设备功率:</label>
149
- <div class="col-sm-8">
150
- <input class="form-control input_view" style=""
151
- placeholder="设备功率"
152
- type="number"
153
- v-model="item.f_devices_tonnage"
154
- :value="item.f_devices_tonnage"
155
- :readonly="mark === 1 || item.f_operate_state === 0"/>
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_install_date"
164
- :value="installdate(item.f_install_date)"
165
- :readonly="mark === 1 || item.f_operate_state === 0"/>
166
- </div>
167
- </div>
168
- <div class="form-group col-sm-6" :class="[item.f_devices_tonnage && !item.f_devices_tonnage_unit ? 'has-error' : '']">
169
- <label class="col-sm-4 control-label">功率单位:</label>
170
- <div class="col-sm-8">
171
- <input class="form-control input_view" style=""
172
- placeholder="功率单位"
173
- v-model="item.f_devices_tonnage_unit"
174
- :value="item.f_devices_tonnage_unit"
175
- :readonly="mark === 1 || item.f_operate_state === 0"/>
176
- </div>
177
- </div>
178
- </div>
179
-
180
- </article>
181
- <footer slot="modal-footer" class="modal-footer">
182
- <template v-if="mark !== 1">
183
- <button type="button" class="btn btn-primary" @click="pushDevice()">添加设备</button>
184
- <button type="button" class="btn btn-primary" @click="addDevice(device)" :disabled="disabledBut">确认</button>
185
- </template>
186
- </footer>
187
- </modal>
188
- </div>
189
- </template>
190
- <script>
191
- import {getNowDate,isEmpty} from '../../../Util'
192
- import {PagedList} from 'vue-client'
193
- import Vue from 'vue'
194
- import {HttpResetClass} from 'vue-client'
195
- // Date格式化
196
- Date.prototype.Format = function (fmt) {
197
- var o = {
198
- 'M+': this.getMonth() + 1, // 月份
199
- 'd+': this.getDate(), // 日
200
- 'H+': this.getHours(), // 小时
201
- 'm+': this.getMinutes(), // 分
202
- 's+': this.getSeconds(), // 秒
203
- 'q+': Math.floor((this.getMonth() + 3) / 3), // 季度
204
- 'S': this.getMilliseconds() // 毫秒
205
- }
206
- if (/(y+)/.test(fmt)) fmt = fmt.replace(RegExp.$1, (this.getFullYear() + '').substr(4 - RegExp.$1.length))
207
- for (var k in o) {
208
- if (new RegExp('(' + k + ')').test(fmt)) fmt = fmt.replace(RegExp.$1, (RegExp.$1.length === 1) ? (o[k]) : (('00' + o[k]).substr(('' + o[k]).length)))
209
- }
210
- return fmt
211
- }
212
-
213
- export default {
214
- title: '设备管理',
215
- props: {
216
- selectdata: {
217
- type: Object
218
- },
219
- mark: {
220
- type: Number,
221
- default: 0
222
- }
223
- },
224
- data () {
225
- return {
226
- model: {
227
- data: null
228
- },
229
- devicesinfo: [],
230
- device: '',
231
- showDevices: false
232
- }
233
- },
234
- ready () {
235
- this.search()
236
- },
237
- methods: {
238
- async deleteUserinfo (row) {
239
- let res = await this.$showMessage('此操作不可撤回,您确定要删除这条记录吗?')
240
- if (res === 'cancel') {
241
- return
242
- }
243
- let data = {
244
- userinfo: row,
245
- selectdata: this.selectdata
246
- }
247
- res = await this.$resetpost('rs/logic/applyDeleteNewUserinfo', {data:data}, {
248
- resolveMsg: null,
249
- rejectMsg: '删除失败!!!'
250
- })
251
-
252
- this.$dispatch('breakControl', this.selectdata)
253
- },
254
- deleteDevices(index){
255
- this.$resetdelete(`rs/entity/t_middle_devices`, {id: index}, {resolveMsg: '删除成功', rejectMsg: '删除失败'}).then(async (res) => {
256
- //发送请求
257
- let data = {
258
- old_id: index
259
- }
260
- let res1 = await this.$resetpost(
261
- `rs/logic/applydeleteDevice`,
262
- {data: data},
263
- {resolveMsg: null, rejectMsg: '设备添加失败!!!'}
264
- )
265
- this.$dispatch('breakControl', this.selectdata)
266
- })
267
- },
268
- async quChuDevices(index, val) {
269
- let data = {
270
- id:index,
271
- state: val,
272
- selectdata: this.selectdata
273
- }
274
- await this.$resetpost('rs/logic/applyQuChuDevice', {data: data}, {
275
- resolveMsg: null,
276
- rejectMsg: '修改设备状态失败!!!'
277
- })
278
- this.$dispatch('breakControl', this.selectdata)
279
- },
280
- deleteDevicesinfo (index) {
281
- this.devicesinfo.splice(index, 1)
282
- },
283
- async addDevice (row) {
284
- if(this.devicesinfo.length > 0) {
285
- let data = {
286
- selectdata: this.selectdata,
287
- devicesinfo: this.devicesinfo,
288
- user: this.$login.f,
289
- f_userinfo_id: row ? row.f_userinfo_id : ''
290
- }
291
- let res = await this.$resetpost(
292
- `rs/logic/applyNewAddDevice`,
293
- {data: data},
294
- {resolveMsg: null, rejectMsg: '设备添加失败!!!'}
295
- )
296
- }
297
- this.$dispatch('breakControl', this.selectdata)
298
- },
299
- pushDevice () {
300
- this.devicesinfo.push({})
301
- },
302
- async openDevicesModal (row) {
303
- this.device = ''
304
- if (row) {
305
- this.device = row
306
- let data = {
307
- tablename: 't_middle_devices',
308
- condition: `f_userinfo_id = '${row.f_userinfo_id}'`
309
- }
310
- let http = new HttpResetClass()
311
- let res = await http.load(
312
- 'POST',
313
- `rs/sql/applySingleTable`,
314
- {data: data},
315
- {resolveMsg: null, rejectMsg: '设备查询失败!!!'}
316
- )
317
- this.devicesinfo = res.data
318
- } else {
319
- this.pushDevice()
320
- }
321
-
322
- this.showDevices = true
323
- },
324
- async search () {
325
- let http = new HttpResetClass()
326
- let data = {
327
- condition: `ui.f_userinfo_id = '${this.selectdata.f_userinfo_id}'`
328
- }
329
- let res = await http.load('POST', 'rs/sql/getChangeDevices', {data:data}, {
330
- resolveMsg: null,
331
- rejectMsg: '获取设备失败!!!'
332
- })
333
- this.model.data = res.data
334
-
335
- // 更改安装处数
336
- for (const item of this.selectdata.fields) {
337
- if (item.label === '安装处数') {
338
- item.value = this.model.data.length
339
- this.selectdata[item.field] = this.model.data.length
340
- }
341
- }
342
- },
343
- // 关闭对话框
344
- closeDevices() {
345
- this.showDevices = false
346
- this.devicesinfo = []
347
-
348
- this.search()
349
- }
350
- },
351
- events: {
352
- },
353
- computed: {
354
- showDeleteUserInfo () {
355
- return this.selectdata.f_apply_type === '非民用报建' &&
356
- (this.selectdata.defname === '报建受理' || this.selectdata.defname === '现场勘察')
357
- },
358
- disabledBut () {
359
- let disabledBut = true
360
- disabledBut = this.devicesinfo.every(item => {
361
- if (isEmpty(item.f_devices_tonnage)) {
362
- return !isEmpty(item.f_devices_type) && !isEmpty(item.f_devices_num)
363
- }
364
- return !isEmpty(item.f_devices_type) && !isEmpty(item.f_devices_num) && !isEmpty(item.f_devices_tonnage) && !isEmpty(item.f_devices_tonnage_unit)
365
- })
366
- return !disabledBut
367
- },
368
- // 安装人
369
- installperson () {
370
- return function (f_input_person) {
371
- if (isEmpty(f_input_person)) {
372
- return this.$login.f.name
373
- }
374
- return f_input_person
375
- }
376
- },
377
- installdate() {
378
- return function (f_install_date) {
379
- if (isEmpty(f_install_date)) {
380
- return new Date().Format('yyyy-MM-dd HH:mm:ss')
381
- }
382
- return f_install_date
383
- }
384
- },
385
- devicesType() {
386
- return this.$appdata.getParam("设备类型")
387
- }
388
- },
389
- watch: {
390
- }
391
- }
392
- </script>
393
- <style scoped>
394
- .textNoLineBreak {
395
- white-space: nowrap;
396
- }
397
- .input_view{
398
- background-color: #ffffff;
399
- border-radius: 2px;
400
- border: solid 1px #c7c7c7!important;
401
- color: #333333!important;
402
- font-size: 15px!important;
403
- }
404
-
405
- .input_view[readonly]{
406
- border: 1px solid #DDD!important;
407
- color:#ACA899!important;
408
- }
409
- .input_view:disabled{
410
- border: 1px solid #DDD!important;
411
- color:#ACA899!important;
412
- }
413
- </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">
10
+ <button
11
+ type="button"
12
+ class="btn btn-info head-but"
13
+ @click="$parent.$parent.openDevicesModal()"
14
+ v-if="false"
15
+ :disabled="$parent.$parent.mark === 1"
16
+ >添加</button>
17
+ </th>
18
+ </tr>
19
+ </template>
20
+ <template partial='body'>
21
+ <tr>
22
+ <td style="text-align: center;">
23
+ <nobr>{{$index+1}}</nobr>
24
+ </td>
25
+ <td style="text-align: center;">
26
+ <nobr>{{row.f_userinfo_id}}</nobr>
27
+ </td>
28
+ <td style="text-align: center;">
29
+ <nobr>{{row.amount}}</nobr>
30
+ </td>
31
+ <td style="text-align: center;">
32
+ <nobr>
33
+ <button
34
+ type="button"
35
+ name="button"
36
+ class="btn btn-link"
37
+ @click="$parent.$parent.openDevicesModal(row)"
38
+ >
39
+ {{$parent.$parent.mark === 1 ? '查看' : '修正'}}
40
+ </button>
41
+ <button
42
+ type="button" name="button" class="btn btn-link"
43
+ @click="$parent.$parent.deleteUserinfo(row)"
44
+ v-if="$parent.$parent.showDeleteUserInfo"
45
+ :disabled="$parent.$parent.mark === 1"
46
+ >
47
+ 删除
48
+ </button>
49
+ </nobr>
50
+ </td>
51
+ </tr>
52
+ </template>
53
+ </data-grid>
54
+
55
+
56
+ <modal v-if="showDevices" :show.sync="showDevices" v-ref:modal :large="true" :backdrop="false" title="表具设备信息">
57
+ <header slot="modal-header" class="modal-header">
58
+ <button type="button" class="close" @click="closeDevices"><span>&times;</span></button>
59
+ <h4 class="modal-title">表具设备信息</h4>
60
+ </header>
61
+ <article slot="modal-body" class="modal-body clearfix">
62
+ <div v-for="(i, item) in devicesinfo" class="form-group col-sm-12 panel panel-info">
63
+ <div class="panel-heading head col-sm-12" style="background-color: #e8f4ff;margin-bottom: 10px">
64
+ <div class="col-sm-6 text-left">设备{{$index+1}}信息</div>
65
+ <div class="col-sm-6 text-right"><button
66
+ class="button_delete button_spacing"
67
+ v-if="!item.id && mark !== 1"
68
+ @click.prevent="deleteDevicesinfo(i)"
69
+ >删除</button></div>
70
+ <div class="col-sm-6 text-right"><button
71
+ class="button_delete button_spacing"
72
+ v-if="item.id && mark !== 1 && item.f_operate_state === 1"
73
+ @click.prevent="deleteDevices(item.id)"
74
+ >删除</button></div>
75
+ <div class="col-sm-6 text-right"><button
76
+ class="button_delete button_spacing"
77
+ v-if="item.id && mark !== 1 && item.f_operate_state === 0"
78
+ @click.prevent="quChuDevices(item.id, '减少')"
79
+ >减少</button></div>
80
+ <div class="col-sm-6 text-right"><button
81
+ class="button_delete button_spacing"
82
+ v-if="item.id && mark !== 1 && item.f_operate_state === 2"
83
+ @click.prevent="quChuDevices(item.id, '恢复')"
84
+ >恢复</button></div>
85
+ <div class="col-sm-6 text-right">
86
+ <label class="col-sm-4 control-label" v-if="item.f_operate_state === 0">旧设备</label>
87
+ </div>
88
+ <div class="col-sm-6 text-right">
89
+ <label class="col-sm-4 control-label" v-if="item.f_operate_state === 1">新设备</label>
90
+ </div>
91
+ <div class="col-sm-6 text-right">
92
+ <label class="col-sm-4 control-label" v-if="item.f_operate_state === 2">标记减少设备</label>
93
+ </div>
94
+ </div>
95
+ <div class="form-group col-sm-6" :class="[!item.f_devices_type ? 'has-error' : '']">
96
+ <label class="col-sm-4 control-label">设备类型:</label>
97
+ <div class="col-sm-8">
98
+ <input-select
99
+ class="select select_list"
100
+ :value.sync="item.f_devices_type"
101
+ v-model="item.f_devices_type"
102
+ :options="devicesType"
103
+ :disable="mark === 1 || item.f_operate_state === 0"
104
+ :valueSingle="true"></input-select>
105
+ </div>
106
+ </div>
107
+ <div class="form-group col-sm-6">
108
+ <label class="col-sm-4 control-label">设备编号:</label>
109
+ <div class="col-sm-8">
110
+ <input class="form-control input_view" style=""
111
+ placeholder="设备编号"
112
+ v-model="item.f_devices_no"
113
+ :value="item.f_devices_no"
114
+ :readonly="mark === 1 || item.f_operate_state === 0"/>
115
+ </div>
116
+ </div>
117
+ <div class="form-group col-sm-6">
118
+ <label class="col-sm-4 control-label">设备品牌:</label>
119
+ <div class="col-sm-8">
120
+ <input class="form-control input_view" style=""
121
+ placeholder="设备品牌"
122
+ v-model="item.f_brand"
123
+ :value="item.f_brand"
124
+ :readonly="mark === 1 || item.f_operate_state === 0"/>
125
+ </div>
126
+ </div>
127
+ <div class="form-group col-sm-6">
128
+ <label class="col-sm-4 control-label">设备型号:</label>
129
+ <div class="col-sm-8">
130
+ <input class="form-control input_view" style=""
131
+ placeholder="设备型号"
132
+ v-model="item.f_devices_model"
133
+ :value="item.f_devices_model"
134
+ :readonly="mark === 1 || item.f_operate_state === 0"/>
135
+ </div>
136
+ </div>
137
+ <div class="form-group col-sm-6" :class="[!item.f_devices_num ? 'has-error' : '']">
138
+ <label class="col-sm-4 control-label">设备数量:</label>
139
+ <div class="col-sm-8">
140
+ <input class="form-control input_view" style="" type="number"
141
+ placeholder="设备数量"
142
+ v-model="item.f_devices_num"
143
+ :value="item.f_devices_num"
144
+ :readonly="mark === 1 || item.f_operate_state === 0"/>
145
+ </div>
146
+ </div>
147
+ <div class="form-group col-sm-6">
148
+ <label class="col-sm-4 control-label">设备功率:</label>
149
+ <div class="col-sm-8">
150
+ <input class="form-control input_view" style=""
151
+ placeholder="设备功率"
152
+ type="number"
153
+ v-model="item.f_devices_tonnage"
154
+ :value="item.f_devices_tonnage"
155
+ :readonly="mark === 1 || item.f_operate_state === 0"/>
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_install_date"
164
+ :value="installdate(item.f_install_date)"
165
+ :readonly="mark === 1 || item.f_operate_state === 0"/>
166
+ </div>
167
+ </div>
168
+ <div class="form-group col-sm-6" :class="[item.f_devices_tonnage && !item.f_devices_tonnage_unit ? 'has-error' : '']">
169
+ <label class="col-sm-4 control-label">功率单位:</label>
170
+ <div class="col-sm-8">
171
+ <input class="form-control input_view" style=""
172
+ placeholder="功率单位"
173
+ v-model="item.f_devices_tonnage_unit"
174
+ :value="item.f_devices_tonnage_unit"
175
+ :readonly="mark === 1 || item.f_operate_state === 0"/>
176
+ </div>
177
+ </div>
178
+ </div>
179
+
180
+ </article>
181
+ <footer slot="modal-footer" class="modal-footer">
182
+ <template v-if="mark !== 1">
183
+ <button type="button" class="btn btn-primary" @click="pushDevice()">添加设备</button>
184
+ <button type="button" class="btn btn-primary" @click="addDevice(device)" :disabled="disabledBut">确认</button>
185
+ </template>
186
+ </footer>
187
+ </modal>
188
+ </div>
189
+ </template>
190
+ <script>
191
+ import {getNowDate,isEmpty} from '../../../Util'
192
+ import {PagedList} from 'vue-client'
193
+ import Vue from 'vue'
194
+ import {HttpResetClass} from 'vue-client'
195
+ // Date格式化
196
+ Date.prototype.Format = function (fmt) {
197
+ var o = {
198
+ 'M+': this.getMonth() + 1, // 月份
199
+ 'd+': this.getDate(), // 日
200
+ 'H+': this.getHours(), // 小时
201
+ 'm+': this.getMinutes(), // 分
202
+ 's+': this.getSeconds(), // 秒
203
+ 'q+': Math.floor((this.getMonth() + 3) / 3), // 季度
204
+ 'S': this.getMilliseconds() // 毫秒
205
+ }
206
+ if (/(y+)/.test(fmt)) fmt = fmt.replace(RegExp.$1, (this.getFullYear() + '').substr(4 - RegExp.$1.length))
207
+ for (var k in o) {
208
+ if (new RegExp('(' + k + ')').test(fmt)) fmt = fmt.replace(RegExp.$1, (RegExp.$1.length === 1) ? (o[k]) : (('00' + o[k]).substr(('' + o[k]).length)))
209
+ }
210
+ return fmt
211
+ }
212
+
213
+ export default {
214
+ title: '设备管理',
215
+ props: {
216
+ selectdata: {
217
+ type: Object
218
+ },
219
+ mark: {
220
+ type: Number,
221
+ default: 0
222
+ }
223
+ },
224
+ data () {
225
+ return {
226
+ model: {
227
+ data: null
228
+ },
229
+ devicesinfo: [],
230
+ device: '',
231
+ showDevices: false
232
+ }
233
+ },
234
+ ready () {
235
+ this.search()
236
+ },
237
+ methods: {
238
+ async deleteUserinfo (row) {
239
+ let res = await this.$showMessage('此操作不可撤回,您确定要删除这条记录吗?')
240
+ if (res === 'cancel') {
241
+ return
242
+ }
243
+ let data = {
244
+ userinfo: row,
245
+ selectdata: this.selectdata
246
+ }
247
+ res = await this.$resetpost('rs/logic/applyDeleteNewUserinfo', {data:data}, {
248
+ resolveMsg: null,
249
+ rejectMsg: '删除失败!!!'
250
+ })
251
+
252
+ this.$dispatch('breakControl', this.selectdata)
253
+ },
254
+ deleteDevices(index){
255
+ this.$resetdelete(`rs/entity/t_middle_devices`, {id: index}, {resolveMsg: '删除成功', rejectMsg: '删除失败'}).then(async (res) => {
256
+ //发送请求
257
+ let data = {
258
+ old_id: index
259
+ }
260
+ let res1 = await this.$resetpost(
261
+ `rs/logic/applydeleteDevice`,
262
+ {data: data},
263
+ {resolveMsg: null, rejectMsg: '设备添加失败!!!'}
264
+ )
265
+ this.$dispatch('breakControl', this.selectdata)
266
+ })
267
+ },
268
+ async quChuDevices(index, val) {
269
+ let data = {
270
+ id:index,
271
+ state: val,
272
+ selectdata: this.selectdata
273
+ }
274
+ await this.$resetpost('rs/logic/applyQuChuDevice', {data: data}, {
275
+ resolveMsg: null,
276
+ rejectMsg: '修改设备状态失败!!!'
277
+ })
278
+ this.$dispatch('breakControl', this.selectdata)
279
+ },
280
+ deleteDevicesinfo (index) {
281
+ this.devicesinfo.splice(index, 1)
282
+ },
283
+ async addDevice (row) {
284
+ if(this.devicesinfo.length > 0) {
285
+ let data = {
286
+ selectdata: this.selectdata,
287
+ devicesinfo: this.devicesinfo,
288
+ user: this.$login.f,
289
+ f_userinfo_id: row ? row.f_userinfo_id : ''
290
+ }
291
+ let res = await this.$resetpost(
292
+ `rs/logic/applyNewAddDevice`,
293
+ {data: data},
294
+ {resolveMsg: null, rejectMsg: '设备添加失败!!!'}
295
+ )
296
+ }
297
+ this.$dispatch('breakControl', this.selectdata)
298
+ },
299
+ pushDevice () {
300
+ this.devicesinfo.push({})
301
+ },
302
+ async openDevicesModal (row) {
303
+ this.device = ''
304
+ if (row) {
305
+ this.device = row
306
+ let data = {
307
+ tablename: 't_middle_devices',
308
+ condition: `f_userinfo_id = '${row.f_userinfo_id}'`
309
+ }
310
+ let http = new HttpResetClass()
311
+ let res = await http.load(
312
+ 'POST',
313
+ `rs/sql/applySingleTable`,
314
+ {data: data},
315
+ {resolveMsg: null, rejectMsg: '设备查询失败!!!'}
316
+ )
317
+ this.devicesinfo = res.data
318
+ } else {
319
+ this.pushDevice()
320
+ }
321
+
322
+ this.showDevices = true
323
+ },
324
+ async search () {
325
+ let http = new HttpResetClass()
326
+ let data = {
327
+ condition: `ui.f_userinfo_id = '${this.selectdata.f_userinfo_id}'`
328
+ }
329
+ let res = await http.load('POST', 'rs/sql/getChangeDevices', {data:data}, {
330
+ resolveMsg: null,
331
+ rejectMsg: '获取设备失败!!!'
332
+ })
333
+ this.model.data = res.data
334
+
335
+ // 更改安装处数
336
+ for (const item of this.selectdata.fields) {
337
+ if (item.label === '安装处数') {
338
+ item.value = this.model.data.length
339
+ this.selectdata[item.field] = this.model.data.length
340
+ }
341
+ }
342
+ },
343
+ // 关闭对话框
344
+ closeDevices() {
345
+ this.showDevices = false
346
+ this.devicesinfo = []
347
+
348
+ this.search()
349
+ }
350
+ },
351
+ events: {
352
+ },
353
+ computed: {
354
+ showDeleteUserInfo () {
355
+ return this.selectdata.f_apply_type === '非民用报建' &&
356
+ (this.selectdata.defname === '报建受理' || this.selectdata.defname === '现场勘察')
357
+ },
358
+ disabledBut () {
359
+ let disabledBut = true
360
+ disabledBut = this.devicesinfo.every(item => {
361
+ if (isEmpty(item.f_devices_tonnage)) {
362
+ return !isEmpty(item.f_devices_type) && !isEmpty(item.f_devices_num)
363
+ }
364
+ return !isEmpty(item.f_devices_type) && !isEmpty(item.f_devices_num) && !isEmpty(item.f_devices_tonnage) && !isEmpty(item.f_devices_tonnage_unit)
365
+ })
366
+ return !disabledBut
367
+ },
368
+ // 安装人
369
+ installperson () {
370
+ return function (f_input_person) {
371
+ if (isEmpty(f_input_person)) {
372
+ return this.$login.f.name
373
+ }
374
+ return f_input_person
375
+ }
376
+ },
377
+ installdate() {
378
+ return function (f_install_date) {
379
+ if (isEmpty(f_install_date)) {
380
+ return new Date().Format('yyyy-MM-dd HH:mm:ss')
381
+ }
382
+ return f_install_date
383
+ }
384
+ },
385
+ devicesType() {
386
+ return this.$appdata.getParam("设备类型")
387
+ }
388
+ },
389
+ watch: {
390
+ }
391
+ }
392
+ </script>
393
+ <style scoped>
394
+ .textNoLineBreak {
395
+ white-space: nowrap;
396
+ }
397
+ .input_view{
398
+ background-color: #ffffff;
399
+ border-radius: 2px;
400
+ border: solid 1px #c7c7c7!important;
401
+ color: #333333!important;
402
+ font-size: 15px!important;
403
+ }
404
+
405
+ .input_view[readonly]{
406
+ border: 1px solid #DDD!important;
407
+ color:#ACA899!important;
408
+ }
409
+ .input_view:disabled{
410
+ border: 1px solid #DDD!important;
411
+ color:#ACA899!important;
412
+ }
413
+ </style>