apply-clients 7.1.36-yuchuan-12 → 7.1.36-yuchuan-14

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 (72) hide show
  1. package/android.html +28 -28
  2. package/build/dev-server.js +25 -10
  3. package/index.html +39 -39
  4. package/package.json +1 -1
  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 +871 -0
  30. package/src/components/product/ApplyMap/ApplyDragaboutList.vue +223 -223
  31. package/src/components/product/ApplyMap/ApplyInputSearch.vue +212 -212
  32. package/src/components/product/ApplyMap/ApplyMapCom.vue +82 -82
  33. package/src/components/product/ApplyMap/ApplyMapInputSearch.vue +335 -335
  34. package/src/components/product/ApplyMap/ApplyMapLocation.vue +862 -862
  35. package/src/components/product/ChongZheng/ApplyChongZhengList.vue +415 -415
  36. package/src/components/product/Function/InstallFunction.vue +133 -133
  37. package/src/components/product/Function/InstallInfoSelect.vue +371 -371
  38. package/src/components/product/Function/Service/FunctionServiceControl.vue +586 -586
  39. package/src/components/product/GongJianPush/ApplyPushManage.vue +90 -90
  40. package/src/components/product/Ignition/IgnitionListManage.vue +602 -602
  41. package/src/components/product/Ignition/IgnitionRecord.vue +380 -380
  42. package/src/components/product/InsuranceApply/InsuranceReport.vue +1 -2
  43. package/src/components/product/List/OldShowDevices.vue +271 -271
  44. package/src/components/product/List/ShowAllActivity.vue +540 -540
  45. package/src/components/product/List/ShowDevices.vue +279 -279
  46. package/src/components/product/Print/BuildOrder/buildOrderList.vue +446 -446
  47. package/src/components/product/Process/ExplorationSelect.vue +597 -597
  48. package/src/components/product/Process/ExplorationUser.vue +158 -158
  49. package/src/components/product/Process/New1ExplorationUser.vue +201 -201
  50. package/src/components/product/Process/NewExplorationSelect.vue +586 -586
  51. package/src/components/product/Process/NewExplorationUser.vue +219 -219
  52. package/src/components/product/Process/Processes/InstallationDetails.vue +1159 -1159
  53. package/src/components/product/Process/Processes/Print/printCharge.vue +250 -250
  54. package/src/components/product/Process/Processes/Print/printGaiXianCharge.vue +244 -244
  55. package/src/components/product/Process/Processes/chargeManagement.vue +704 -704
  56. package/src/components/product/Process/Processes/devicesManagement.vue +393 -393
  57. package/src/components/product/Process/Processes/newDevicesManagement.vue +413 -413
  58. package/src/components/product/Process/Processes/selectChaiChuUserinfo.vue +230 -230
  59. package/src/components/product/Process/Processes/selectOldUserinfo.vue +241 -241
  60. package/src/components/product/Process/Processes/selectUserinfo.vue +234 -234
  61. package/src/components/product/Process/Service/ServiceControl.vue +2205 -2205
  62. package/src/components/product/ServiceView.vue +644 -644
  63. package/src/components/product/Stop/StopApplyList.vue +224 -224
  64. package/src/components/product/Supervisory/NewSupervisoryhCart.vue +175 -175
  65. package/src/components/product/Supervisory/Service/SupervisoryServiceControl.vue +592 -592
  66. package/src/components/product/Supervisory/SupervisoryControl.vue +116 -116
  67. package/src/components/product/Supervisory/SupervisoryList.vue +557 -557
  68. package/src/components/product/Supervisory/SupervisoryhCart.vue +119 -119
  69. package/src/components/product/Supervisory/YiBanSupervisoryList.vue +539 -539
  70. package/src/components/product/VueUtils/ApplyUpload.vue +285 -285
  71. package/src/components/product/records/AdjustmentRecordList.vue +162 -162
  72. package/src/main.js +27 -27
@@ -1,592 +1,592 @@
1
- <template>
2
- <div class="auto clearfix">
3
- <show-back-reason :selectdata="show_data"></show-back-reason>
4
- </div>
5
- <service-view v-ref:service_show :data="show_data" v-if="showview"></service-view>
6
- </template>
7
- <script>
8
- import Vue from 'vue'
9
- import {HttpResetClass} from 'vue-client'
10
- import {isEmpty} from "../../../Util";
11
- // Date格式化
12
- Date.prototype.Format = function (fmt) {
13
- var o = {
14
- 'M+': this.getMonth() + 1, // 月份
15
- 'd+': this.getDate(), // 日
16
- 'H+': this.getHours(), // 小时
17
- 'm+': this.getMinutes(), // 分
18
- 's+': this.getSeconds(), // 秒
19
- 'q+': Math.floor((this.getMonth() + 3) / 3), // 季度
20
- 'S': this.getMilliseconds() // 毫秒
21
- }
22
- if (/(y+)/.test(fmt)) fmt = fmt.replace(RegExp.$1, (this.getFullYear() + '').substr(4 - RegExp.$1.length))
23
- for (var k in o) {
24
- if (new RegExp('(' + k + ')').test(fmt)) fmt = fmt.replace(RegExp.$1, (RegExp.$1.length === 1) ? (o[k]) : (('00' + o[k]).substr(('' + o[k]).length)))
25
- }
26
- return fmt
27
- }
28
- export default {
29
- title: '报建监控控制层',
30
- props: {
31
- selectdata: {
32
- type: Object
33
- },
34
- nodeSnapshot: {
35
- type: Boolean,
36
- default: false
37
- }
38
- },
39
- data() {
40
- return {
41
- data: null, // 展示的数据
42
- json_datas: null, // json配置数据结构
43
- showview: false, // 控制显示层显示
44
- show_data: null
45
- }
46
- },
47
- created () {
48
- this.refurbish()
49
- },
50
- methods: {
51
- // 初始化模块
52
- async refurbish() {
53
- this.json_datas = this.$workflow_vue
54
- let sum = 0
55
- let jsonData = {}
56
- if (!this.json_datas || !this.json_datas.activitys || this.json_datas.activitys.length === 0) {
57
- this.$showMessage("网络故障,请刷新页面")
58
- return
59
- }
60
- this.json_datas.activitys.forEach(item => {
61
- if (this.selectdata.defname === item.title) {
62
- jsonData = item // 拿到当前节点的json配置信息
63
- sum++ // 节点名一样的个数
64
- }
65
- return this.selectdata.defname === item.title // 拿到当前节点的json配置信息
66
- })
67
- if (sum === 0) {
68
- this.$showMessage(`没有在JSON配置文件中找到活动名为:(${this.selectdata.defname})的节点配置`)
69
- return
70
- }
71
- if (sum > 1) {
72
- this.$showMessage(`在JSON配置文件中找到活动名为:(${this.selectdata.defname})的节点配置:${sum}个`)
73
- return
74
- }
75
-
76
- this.data = null
77
- this.data = jsonData
78
- this.data = Object.assign({}, this.data, this.selectdata)
79
-
80
- // fields 字段填充值
81
- for (const item of this.data.fields) {
82
- if (this.selectdata[item.field]) {
83
- item.value = this.selectdata[item.field]
84
- }
85
- if (this.selectdata[item.field] === 0) {
86
- item.value = 0
87
- }
88
- item.readonly = true
89
- item.disabled = true
90
- if (item.logo) {
91
- if (item.ready) {
92
- item.options = await this[item.ready]()
93
- }
94
- }
95
- if (item.param) {
96
- let temp = this.$appdata.getParam(item.label)
97
-
98
- if (temp && temp.length > 0) {
99
- item.options = temp
100
- }
101
-
102
- if (item.paramLabel) {
103
- temp = this.$appdata.getParam(item.paramLabel)
104
- if (temp && temp.length > 0) {
105
- item.options = temp
106
- }
107
- }
108
- }
109
- }
110
-
111
- // 控制组件
112
- if (this.data.components) {
113
- this.data.components.forEach(item => {
114
- item.mark = 1
115
- })
116
- }
117
-
118
- // onetomany 数据获取
119
- if (this.data.onetomany) {
120
- for (const item of this.data.onetomany) {
121
- let res = null
122
- if (item.queryEvent) {
123
- res = this[item.queryEvent]()
124
- } else {
125
- let data = {
126
- tablename: item.tables[0],
127
- condition: `f_process_id='${this.selectdata.f_process_id}'`
128
- }
129
- res = await this.$resetpost(
130
- 'rs/sql/applySingleTable',
131
- {data: data},
132
- {resolveMsg: null, rejectMsg: 'onetomany查询失败'}
133
- )
134
- }
135
-
136
- item.rows = res.data
137
-
138
- // 隐藏所有操作
139
- item.hiddenOperate = true
140
- }
141
- }
142
-
143
- // 去除button
144
- this.data.buttons = null
145
-
146
- // 完成时间和完成人,部门,分公司
147
- if (this.selectdata.state === '结束') {
148
- this.data.operate_date = new Date(this.selectdata.finishtime).Format('yyyy-MM-dd')
149
- this.data.operator = this.selectdata.person
150
-
151
- let http = new HttpResetClass()
152
- try {
153
- let res = await http.load('POST', 'rs/search', {
154
- source: 'this.getInfo()',
155
- userid: this.selectdata.userid
156
- }, {resolveMsg: null, rejectMsg: null})
157
- let user = res.data
158
- this.data.orgs = user.orgs
159
- this.data.parentname = user.deps
160
- } catch (e) {
161
- this.data.orgs = this.$login.f.orgs
162
- this.data.parentname = this.$login.f.deps
163
- }
164
- }
165
- if (this.selectdata.f_apply_nature === '散户') {
166
- this.hideLabels('营业执照', '小区')
167
- this.electiveLabels('营业执照', '购货单位识别号', '购货单位银行账号', '购货单位地址电话', '小区')
168
- }
169
- if (this.selectdata.f_apply_nature === '小区') {
170
- this.showLabels('营业执照', '小区', '小区名称')
171
- this.requiredLabels( '小区')
172
- }
173
- if (this.selectdata.f_dispatching_type === '施工工队') {
174
- this.showLabels('现场项目负责人', '安装单位', '建设单位', '监理单位', '土建单位', '检测单位')
175
- this.requiredLabels( '小区')
176
- }
177
- // 消除双向绑定,避免子组件(显示层)数据更改,父组件(控制层)也更改
178
- let temp = JSON.parse(JSON.stringify(this.data))
179
-
180
- this.show_data = temp
181
- this.$nextTick(() => {
182
- if ((this.show_data.defname==='报装缴费' || this.show_data.defname==='收费标准') && !(this.$login.f.rolesnames.includes('营业厅报装')||this.$login.f.rolesnames.includes('市场部报装'))){
183
- this.showview = false
184
- this.$showMessage("对不起,您没有查看此节点的权限!")
185
- }else {
186
- this.showview = true
187
- }
188
- })
189
- },
190
- // json配置数据处理
191
- async initializtion() {
192
- // 查询是否有当前节点快照信息,如果有使用快照数据,没有则展示最新数据
193
- if (this.nodeSnapshot && this.data.nodeSnapshot) {
194
- let http = new HttpResetClass()
195
- let data = {
196
- tablename: 't_node_snapshot',
197
- condition: `actid = '${this.selectdata.actid}' and f_process_id='${this.selectdata.f_process_id}'`
198
- }
199
- let res = await http.load('POST', 'rs/sql/applySingleTable', {data: data}, {
200
- resolveMsg: null,
201
- rejectMsg: null
202
- })
203
- if (res.data.length > 0) {
204
- data = JSON.parse(res.data[0].f_node_data)
205
-
206
- this.data.fields = data.fields
207
- this.data.onetomany = data.onetomany
208
- this.data.title = data.title
209
- }
210
- }
211
- },
212
- hideLabels(...labels) {
213
- console.log('报建性质1')
214
- for (const item of this.data.fields) {
215
- if (labels.includes(item.label)) {
216
- item.hidden = true
217
- }
218
- }
219
- },
220
- electiveLabels(...labels) {
221
- console.log('报建性质2')
222
- for (const item of this.data.fields) {
223
- if (labels.includes(item.label)) {
224
- item.required = false
225
- }
226
- }
227
- },
228
- showLabels(...labels) {
229
- console.log('报建性质3')
230
- for (const item of this.data.fields) {
231
- if (labels.includes(item.label)) {
232
- item.hidden = false
233
- }
234
- }
235
- },
236
- requiredLabels(...labels) {
237
- console.log('报建性质4')
238
- for (const item of this.data.fields) {
239
- if (labels.includes(item.label)) {
240
- item.required = true
241
- }
242
- }
243
- },
244
- setLabelOptions(label, options) {
245
- for (const item of this.show_data.fields) {
246
- if (item.label === label) {
247
- item.options = options
248
- }
249
- }
250
- },
251
- // 获取小区
252
- async getResidentialArea () {
253
- let data = {
254
- tablename: 't_area_address',
255
- condition: `f_filiale = '${this.$login.f.f_fengongsi?this.$login.f.f_fengongsi:'榆林.榆川天然气'}' and f_area_status = '启用'`
256
- }
257
- let http = new HttpResetClass()
258
- let res = await http.load(
259
- 'POST',
260
- `rs/sql/applySingleTable`,
261
- {data: data},
262
- {resolveMsg: null, rejectMsg: '小区查询失败!!!'}
263
- )
264
- return res.data.map(item => {
265
- return {
266
- label: item.f_residential_area,
267
- value: item.id
268
- }
269
- })
270
- },
271
- // 获取气表品牌
272
- async getMeterBrand () {
273
- let data = {
274
- }
275
-
276
- let http = new HttpResetClass()
277
- let res = await http.load(
278
- 'POST',
279
- `rs/sql/getMeterBrand1`,
280
- {data: data},
281
- {resolveMsg: null, rejectMsg: '气表品牌查询失败!!!'}
282
- )
283
-
284
- return res.data
285
- },
286
- async meterBrandChenge (index) {
287
- if (isEmpty(this.selectdata.f_meter_brand)) {
288
- console.log("测试无表具")
289
- return
290
- }
291
- let data = {
292
- f_gasbrand_id: this.selectdata.f_meter_brand
293
- }
294
- let http = new HttpResetClass()
295
- let res = await http.load(
296
- 'POST',
297
- `rs/sql/getGasModel`,
298
- {data: data},
299
- {resolveMsg: null, rejectMsg: '气表型号查询失败!!!'}
300
- )
301
- console.log("测试有表具",res.data)
302
- return res.data
303
- },
304
- async getUserName() {
305
- console.log('用户姓名查询')
306
- if(this.selectdata.f_construction_unit_id){
307
- let data = {
308
- tablename: 't_user',
309
- condition: `id='${this.selectdata.f_construction_unit_id}'`
310
- }
311
- let res = await this.$resetpost(
312
- 'rs/sql/applySingleTable',
313
- {data: data},
314
- {resolveMsg: null, rejectMsg: null}
315
- )
316
- return res.data.map(item => {
317
- return {
318
- label: item.name,
319
- value: item.id
320
- }
321
- })
322
- }
323
- return
324
- },
325
- async getConstructionWorker(){
326
- let data = {
327
- source: 'this.getParentByType($organization$).getChildByName($建设单位$).getChildren()',
328
- userid: this.$login.f.id
329
- }
330
-
331
- let res = await this.$resetpost(
332
- `rs/search`,
333
- {data: data},
334
- {resolveMsg: null, rejectMsg: '现场负责人查询失败!!!'}
335
- )
336
-
337
- return res.data.map(item => {
338
- return {
339
- label: item.name,
340
- value: item.id
341
- }
342
- })
343
- },
344
- // 安装单位签字人
345
- async getConstructionUnitId () {
346
- if (this.selectdata.f_construction_unit_id){
347
- let data = {
348
- tablename: 't_user',
349
- condition: `id='${this.selectdata.f_construction_unit_id}'`
350
- }
351
- let res = await this.$resetpost(
352
- 'rs/sql/applySingleTable',
353
- {data: data},
354
- {resolveMsg: null, rejectMsg: null}
355
- )
356
- return res.data.map(item => {
357
- return {
358
- label: item.name,
359
- value: item.id
360
- }
361
- })
362
- }
363
- },
364
- // 安装单位负责人
365
- async getConstructionUnit () {
366
- let data = {
367
- source: 'this.getParentByType($organization$).getChildByName($工程施工队$).getChildren()',
368
- userid: this.$login.f.id
369
- }
370
-
371
- let res = await this.$resetpost(
372
- 'rs/search',
373
- {data: data},
374
- {resolveMsg: null, rejectMsg: '安装单位负责人查询失败!!!'}
375
- )
376
-
377
- return res.data.map(item => {
378
- return {
379
- label: item.name,
380
- value: item.id
381
- }
382
- })
383
- },
384
- // 建设单位
385
- async getConstructOperator () {
386
- let data = {
387
- source: 'this.getParentByType($organization$).getChildByName($建设单位$).getChildren()',
388
- userid: this.$login.f.id
389
- }
390
-
391
- let res = await this.$resetpost(
392
- 'rs/search',
393
- {data: data},
394
- {resolveMsg: null, rejectMsg: '建设单位人员查询失败!!!'}
395
- )
396
-
397
- return res.data.map(item => {
398
- return {
399
- label: item.name,
400
- value: item.id
401
- }
402
- })
403
- },
404
- // 监理单位
405
- async getSupervisorOperator () {
406
- let data = {
407
- source: 'this.getParentByType($organization$).getChildByName($监理单位$).getChildren()',
408
- userid: this.$login.f.id
409
- }
410
-
411
- let res = await this.$resetpost(
412
- 'rs/search',
413
- {data: data},
414
- {resolveMsg: null, rejectMsg: '监理单位人员查询失败!!!'}
415
- )
416
- return res.data.map(item => {
417
- return {
418
- label: item.name,
419
- value: item.id
420
- }
421
- })
422
- },
423
- // 监理现场负责人
424
- async getSupervisorOperatorId () {
425
- let data = {
426
- source: 'this.getParentByType($organization$).getChildByName($监理班组$).getChildren()',
427
- userid: this.$login.f.id
428
- }
429
- let res = await this.$resetpost(
430
- 'rs/search',
431
- {data: data},
432
- {resolveMsg: null, rejectMsg: '监理单位人员查询失败!!!'}
433
- )
434
- return res.data.map(item => {
435
- return {
436
- label: item.name,
437
- value: item.id
438
- }
439
- })
440
- },
441
- // 土建单位
442
- async getEngineeringOperator () {
443
- let data = {
444
- source: 'this.getParentByType($organization$).getChildByName($土建单位$).getChildren()',
445
- userid: this.$login.f.id
446
- }
447
-
448
- let res = await this.$resetpost(
449
- 'rs/search',
450
- {data: data},
451
- {resolveMsg: null, rejectMsg: '土建单位人员查询失败!!!'}
452
- )
453
- let result = res.data.map(item => {
454
- return {
455
- label: item.name,
456
- value: item.id
457
- }
458
- })
459
- result.push({label:'用户自理',value:'用户自理'})
460
- result.push({label:'无',value:'无'})
461
- return result
462
- },
463
- // 检测单位
464
- async getCheckOperator () {
465
- let data = {
466
- source: 'this.getParentByType($organization$).getChildByName($检测单位$).getChildren()',
467
- userid: this.$login.f.id
468
- }
469
-
470
- let res = await this.$resetpost(
471
- 'rs/search',
472
- {data: data},
473
- {resolveMsg: null, rejectMsg: '检测单位人员查询失败!!!'}
474
- )
475
-
476
- let result = res.data.map(item => {
477
- return {
478
- label: item.name,
479
- value: item.id
480
- }
481
- })
482
- result.push({label:'无',value:'无'})
483
- return result
484
- },
485
- // 户内出单日期
486
- async getOutdoorsTime () {
487
- for (const item of this.data.fields) {
488
- if (item.label === '户内出单日期') {
489
- item.value = this.data.f_release_date
490
- this.data[item.field] = item.value
491
- }else if(item.label === '庭院出单日期'){
492
- item.value = this.data.f_release_date
493
- this.data[item.field] = item.value
494
- }
495
- }
496
- },
497
- async getChargeDate() {
498
- let data = {
499
- tablename: 'activityins',
500
- condition: `processid = '${this.data.f_process_id}' and defname = '报装缴费'`,
501
- }
502
-
503
- let http = new HttpResetClass()
504
- let res = await http.load(
505
- 'POST',
506
- `rs/sql/applySingleTable`,
507
- {data: data},
508
- {resolveMsg: null, rejectMsg: null}
509
- )
510
- if (res.data[0]){
511
- for (const item of this.data.fields) {
512
- if (item.label === '缴费日期') {
513
- item.value = res.data[0].finishtime
514
- this.data[item.field] = item.value
515
- }
516
- }
517
- }
518
- },
519
- async getSingAct() {
520
- let data = {
521
- f_process_id: this.data.f_process_id
522
- }
523
- let http = new HttpResetClass()
524
- let res = await http.load(
525
- 'POST',
526
- `rs/sql/getSingAct`,
527
- {data: data},
528
- {resolveMsg: null, rejectMsg: '签字状态查询失败!!!'}
529
- )
530
- if (res.data.length > 0) {
531
- for (const item of this.data.fields) {
532
- if (item.label === '签字所在环节') {
533
- item.value = res.data[0].defname
534
- this.data[item.field] = item.value
535
- }
536
- }
537
- }
538
- }
539
- },
540
- events:{
541
- // 工程派工初始化
542
- async 'dispatchReadyEvent' () {
543
- console.log("cscc")
544
- if (isEmpty(this.show_data.f_meter_brand)) {
545
- return
546
- }
547
- let data = {
548
- f_gasbrand_id: this.show_data.f_meter_brand
549
- }
550
- let http = new HttpResetClass()
551
- let res = await http.load(
552
- 'POST',
553
- `rs/sql/getGasModel`,
554
- {data: data},
555
- {resolveMsg: null, rejectMsg: '气表型号查询失败!!!'}
556
- )
557
-
558
- this.setLabelOptions('气表型号', res.data)
559
- },
560
- async 'buildReadyEvent' () {
561
- console.log("cscc")
562
- if (isEmpty(this.show_data.f_meter_brand)) {
563
- return
564
- }
565
- let data = {
566
- f_gasbrand_id: this.show_data.f_meter_brand
567
- }
568
- let http = new HttpResetClass()
569
- let res = await http.load(
570
- 'POST',
571
- `rs/sql/getGasModel`,
572
- {data: data},
573
- {resolveMsg: null, rejectMsg: '气表型号查询失败!!!'}
574
- )
575
-
576
- this.setLabelOptions('气表型号', res.data)
577
- }
578
- },
579
- watch: {
580
- deep: true
581
- }
582
- }
583
- </script>
584
- <style scoped>
585
- /*清除model中的浮动*/
586
- .clearfix:after,.clearfix:before{
587
- display: table;
588
- }
589
- .clearfix:after{
590
- clear: both;
591
- }
592
- </style>
1
+ <template>
2
+ <div class="auto clearfix">
3
+ <show-back-reason :selectdata="show_data"></show-back-reason>
4
+ </div>
5
+ <service-view v-ref:service_show :data="show_data" v-if="showview"></service-view>
6
+ </template>
7
+ <script>
8
+ import Vue from 'vue'
9
+ import {HttpResetClass} from 'vue-client'
10
+ import {isEmpty} from "../../../Util";
11
+ // Date格式化
12
+ Date.prototype.Format = function (fmt) {
13
+ var o = {
14
+ 'M+': this.getMonth() + 1, // 月份
15
+ 'd+': this.getDate(), // 日
16
+ 'H+': this.getHours(), // 小时
17
+ 'm+': this.getMinutes(), // 分
18
+ 's+': this.getSeconds(), // 秒
19
+ 'q+': Math.floor((this.getMonth() + 3) / 3), // 季度
20
+ 'S': this.getMilliseconds() // 毫秒
21
+ }
22
+ if (/(y+)/.test(fmt)) fmt = fmt.replace(RegExp.$1, (this.getFullYear() + '').substr(4 - RegExp.$1.length))
23
+ for (var k in o) {
24
+ if (new RegExp('(' + k + ')').test(fmt)) fmt = fmt.replace(RegExp.$1, (RegExp.$1.length === 1) ? (o[k]) : (('00' + o[k]).substr(('' + o[k]).length)))
25
+ }
26
+ return fmt
27
+ }
28
+ export default {
29
+ title: '报建监控控制层',
30
+ props: {
31
+ selectdata: {
32
+ type: Object
33
+ },
34
+ nodeSnapshot: {
35
+ type: Boolean,
36
+ default: false
37
+ }
38
+ },
39
+ data() {
40
+ return {
41
+ data: null, // 展示的数据
42
+ json_datas: null, // json配置数据结构
43
+ showview: false, // 控制显示层显示
44
+ show_data: null
45
+ }
46
+ },
47
+ created () {
48
+ this.refurbish()
49
+ },
50
+ methods: {
51
+ // 初始化模块
52
+ async refurbish() {
53
+ this.json_datas = this.$workflow_vue
54
+ let sum = 0
55
+ let jsonData = {}
56
+ if (!this.json_datas || !this.json_datas.activitys || this.json_datas.activitys.length === 0) {
57
+ this.$showMessage("网络故障,请刷新页面")
58
+ return
59
+ }
60
+ this.json_datas.activitys.forEach(item => {
61
+ if (this.selectdata.defname === item.title) {
62
+ jsonData = item // 拿到当前节点的json配置信息
63
+ sum++ // 节点名一样的个数
64
+ }
65
+ return this.selectdata.defname === item.title // 拿到当前节点的json配置信息
66
+ })
67
+ if (sum === 0) {
68
+ this.$showMessage(`没有在JSON配置文件中找到活动名为:(${this.selectdata.defname})的节点配置`)
69
+ return
70
+ }
71
+ if (sum > 1) {
72
+ this.$showMessage(`在JSON配置文件中找到活动名为:(${this.selectdata.defname})的节点配置:${sum}个`)
73
+ return
74
+ }
75
+
76
+ this.data = null
77
+ this.data = jsonData
78
+ this.data = Object.assign({}, this.data, this.selectdata)
79
+
80
+ // fields 字段填充值
81
+ for (const item of this.data.fields) {
82
+ if (this.selectdata[item.field]) {
83
+ item.value = this.selectdata[item.field]
84
+ }
85
+ if (this.selectdata[item.field] === 0) {
86
+ item.value = 0
87
+ }
88
+ item.readonly = true
89
+ item.disabled = true
90
+ if (item.logo) {
91
+ if (item.ready) {
92
+ item.options = await this[item.ready]()
93
+ }
94
+ }
95
+ if (item.param) {
96
+ let temp = this.$appdata.getParam(item.label)
97
+
98
+ if (temp && temp.length > 0) {
99
+ item.options = temp
100
+ }
101
+
102
+ if (item.paramLabel) {
103
+ temp = this.$appdata.getParam(item.paramLabel)
104
+ if (temp && temp.length > 0) {
105
+ item.options = temp
106
+ }
107
+ }
108
+ }
109
+ }
110
+
111
+ // 控制组件
112
+ if (this.data.components) {
113
+ this.data.components.forEach(item => {
114
+ item.mark = 1
115
+ })
116
+ }
117
+
118
+ // onetomany 数据获取
119
+ if (this.data.onetomany) {
120
+ for (const item of this.data.onetomany) {
121
+ let res = null
122
+ if (item.queryEvent) {
123
+ res = this[item.queryEvent]()
124
+ } else {
125
+ let data = {
126
+ tablename: item.tables[0],
127
+ condition: `f_process_id='${this.selectdata.f_process_id}'`
128
+ }
129
+ res = await this.$resetpost(
130
+ 'rs/sql/applySingleTable',
131
+ {data: data},
132
+ {resolveMsg: null, rejectMsg: 'onetomany查询失败'}
133
+ )
134
+ }
135
+
136
+ item.rows = res.data
137
+
138
+ // 隐藏所有操作
139
+ item.hiddenOperate = true
140
+ }
141
+ }
142
+
143
+ // 去除button
144
+ this.data.buttons = null
145
+
146
+ // 完成时间和完成人,部门,分公司
147
+ if (this.selectdata.state === '结束') {
148
+ this.data.operate_date = new Date(this.selectdata.finishtime).Format('yyyy-MM-dd')
149
+ this.data.operator = this.selectdata.person
150
+
151
+ let http = new HttpResetClass()
152
+ try {
153
+ let res = await http.load('POST', 'rs/search', {
154
+ source: 'this.getInfo()',
155
+ userid: this.selectdata.userid
156
+ }, {resolveMsg: null, rejectMsg: null})
157
+ let user = res.data
158
+ this.data.orgs = user.orgs
159
+ this.data.parentname = user.deps
160
+ } catch (e) {
161
+ this.data.orgs = this.$login.f.orgs
162
+ this.data.parentname = this.$login.f.deps
163
+ }
164
+ }
165
+ if (this.selectdata.f_apply_nature === '散户') {
166
+ this.hideLabels('营业执照', '小区')
167
+ this.electiveLabels('营业执照', '购货单位识别号', '购货单位银行账号', '购货单位地址电话', '小区')
168
+ }
169
+ if (this.selectdata.f_apply_nature === '小区') {
170
+ this.showLabels('营业执照', '小区', '小区名称')
171
+ this.requiredLabels( '小区')
172
+ }
173
+ if (this.selectdata.f_dispatching_type === '施工工队') {
174
+ this.showLabels('现场项目负责人', '安装单位', '建设单位', '监理单位', '土建单位', '检测单位')
175
+ this.requiredLabels( '小区')
176
+ }
177
+ // 消除双向绑定,避免子组件(显示层)数据更改,父组件(控制层)也更改
178
+ let temp = JSON.parse(JSON.stringify(this.data))
179
+
180
+ this.show_data = temp
181
+ this.$nextTick(() => {
182
+ if ((this.show_data.defname==='报装缴费' || this.show_data.defname==='收费标准') && !(this.$login.f.rolesnames.includes('营业厅报装')||this.$login.f.rolesnames.includes('市场部报装'))){
183
+ this.showview = false
184
+ this.$showMessage("对不起,您没有查看此节点的权限!")
185
+ }else {
186
+ this.showview = true
187
+ }
188
+ })
189
+ },
190
+ // json配置数据处理
191
+ async initializtion() {
192
+ // 查询是否有当前节点快照信息,如果有使用快照数据,没有则展示最新数据
193
+ if (this.nodeSnapshot && this.data.nodeSnapshot) {
194
+ let http = new HttpResetClass()
195
+ let data = {
196
+ tablename: 't_node_snapshot',
197
+ condition: `actid = '${this.selectdata.actid}' and f_process_id='${this.selectdata.f_process_id}'`
198
+ }
199
+ let res = await http.load('POST', 'rs/sql/applySingleTable', {data: data}, {
200
+ resolveMsg: null,
201
+ rejectMsg: null
202
+ })
203
+ if (res.data.length > 0) {
204
+ data = JSON.parse(res.data[0].f_node_data)
205
+
206
+ this.data.fields = data.fields
207
+ this.data.onetomany = data.onetomany
208
+ this.data.title = data.title
209
+ }
210
+ }
211
+ },
212
+ hideLabels(...labels) {
213
+ console.log('报建性质1')
214
+ for (const item of this.data.fields) {
215
+ if (labels.includes(item.label)) {
216
+ item.hidden = true
217
+ }
218
+ }
219
+ },
220
+ electiveLabels(...labels) {
221
+ console.log('报建性质2')
222
+ for (const item of this.data.fields) {
223
+ if (labels.includes(item.label)) {
224
+ item.required = false
225
+ }
226
+ }
227
+ },
228
+ showLabels(...labels) {
229
+ console.log('报建性质3')
230
+ for (const item of this.data.fields) {
231
+ if (labels.includes(item.label)) {
232
+ item.hidden = false
233
+ }
234
+ }
235
+ },
236
+ requiredLabels(...labels) {
237
+ console.log('报建性质4')
238
+ for (const item of this.data.fields) {
239
+ if (labels.includes(item.label)) {
240
+ item.required = true
241
+ }
242
+ }
243
+ },
244
+ setLabelOptions(label, options) {
245
+ for (const item of this.show_data.fields) {
246
+ if (item.label === label) {
247
+ item.options = options
248
+ }
249
+ }
250
+ },
251
+ // 获取小区
252
+ async getResidentialArea () {
253
+ let data = {
254
+ tablename: 't_area_address',
255
+ condition: `f_filiale = '${this.$login.f.f_fengongsi?this.$login.f.f_fengongsi:'榆林.榆川天然气'}' and f_area_status = '启用'`
256
+ }
257
+ let http = new HttpResetClass()
258
+ let res = await http.load(
259
+ 'POST',
260
+ `rs/sql/applySingleTable`,
261
+ {data: data},
262
+ {resolveMsg: null, rejectMsg: '小区查询失败!!!'}
263
+ )
264
+ return res.data.map(item => {
265
+ return {
266
+ label: item.f_residential_area,
267
+ value: item.id
268
+ }
269
+ })
270
+ },
271
+ // 获取气表品牌
272
+ async getMeterBrand () {
273
+ let data = {
274
+ }
275
+
276
+ let http = new HttpResetClass()
277
+ let res = await http.load(
278
+ 'POST',
279
+ `rs/sql/getMeterBrand1`,
280
+ {data: data},
281
+ {resolveMsg: null, rejectMsg: '气表品牌查询失败!!!'}
282
+ )
283
+
284
+ return res.data
285
+ },
286
+ async meterBrandChenge (index) {
287
+ if (isEmpty(this.selectdata.f_meter_brand)) {
288
+ console.log("测试无表具")
289
+ return
290
+ }
291
+ let data = {
292
+ f_gasbrand_id: this.selectdata.f_meter_brand
293
+ }
294
+ let http = new HttpResetClass()
295
+ let res = await http.load(
296
+ 'POST',
297
+ `rs/sql/getGasModel`,
298
+ {data: data},
299
+ {resolveMsg: null, rejectMsg: '气表型号查询失败!!!'}
300
+ )
301
+ console.log("测试有表具",res.data)
302
+ return res.data
303
+ },
304
+ async getUserName() {
305
+ console.log('用户姓名查询')
306
+ if(this.selectdata.f_construction_unit_id){
307
+ let data = {
308
+ tablename: 't_user',
309
+ condition: `id='${this.selectdata.f_construction_unit_id}'`
310
+ }
311
+ let res = await this.$resetpost(
312
+ 'rs/sql/applySingleTable',
313
+ {data: data},
314
+ {resolveMsg: null, rejectMsg: null}
315
+ )
316
+ return res.data.map(item => {
317
+ return {
318
+ label: item.name,
319
+ value: item.id
320
+ }
321
+ })
322
+ }
323
+ return
324
+ },
325
+ async getConstructionWorker(){
326
+ let data = {
327
+ source: 'this.getParentByType($organization$).getChildByName($建设单位$).getChildren()',
328
+ userid: this.$login.f.id
329
+ }
330
+
331
+ let res = await this.$resetpost(
332
+ `rs/search`,
333
+ {data: data},
334
+ {resolveMsg: null, rejectMsg: '现场负责人查询失败!!!'}
335
+ )
336
+
337
+ return res.data.map(item => {
338
+ return {
339
+ label: item.name,
340
+ value: item.id
341
+ }
342
+ })
343
+ },
344
+ // 安装单位签字人
345
+ async getConstructionUnitId () {
346
+ if (this.selectdata.f_construction_unit_id){
347
+ let data = {
348
+ tablename: 't_user',
349
+ condition: `id='${this.selectdata.f_construction_unit_id}'`
350
+ }
351
+ let res = await this.$resetpost(
352
+ 'rs/sql/applySingleTable',
353
+ {data: data},
354
+ {resolveMsg: null, rejectMsg: null}
355
+ )
356
+ return res.data.map(item => {
357
+ return {
358
+ label: item.name,
359
+ value: item.id
360
+ }
361
+ })
362
+ }
363
+ },
364
+ // 安装单位负责人
365
+ async getConstructionUnit () {
366
+ let data = {
367
+ source: 'this.getParentByType($organization$).getChildByName($工程施工队$).getChildren()',
368
+ userid: this.$login.f.id
369
+ }
370
+
371
+ let res = await this.$resetpost(
372
+ 'rs/search',
373
+ {data: data},
374
+ {resolveMsg: null, rejectMsg: '安装单位负责人查询失败!!!'}
375
+ )
376
+
377
+ return res.data.map(item => {
378
+ return {
379
+ label: item.name,
380
+ value: item.id
381
+ }
382
+ })
383
+ },
384
+ // 建设单位
385
+ async getConstructOperator () {
386
+ let data = {
387
+ source: 'this.getParentByType($organization$).getChildByName($建设单位$).getChildren()',
388
+ userid: this.$login.f.id
389
+ }
390
+
391
+ let res = await this.$resetpost(
392
+ 'rs/search',
393
+ {data: data},
394
+ {resolveMsg: null, rejectMsg: '建设单位人员查询失败!!!'}
395
+ )
396
+
397
+ return res.data.map(item => {
398
+ return {
399
+ label: item.name,
400
+ value: item.id
401
+ }
402
+ })
403
+ },
404
+ // 监理单位
405
+ async getSupervisorOperator () {
406
+ let data = {
407
+ source: 'this.getParentByType($organization$).getChildByName($监理单位$).getChildren()',
408
+ userid: this.$login.f.id
409
+ }
410
+
411
+ let res = await this.$resetpost(
412
+ 'rs/search',
413
+ {data: data},
414
+ {resolveMsg: null, rejectMsg: '监理单位人员查询失败!!!'}
415
+ )
416
+ return res.data.map(item => {
417
+ return {
418
+ label: item.name,
419
+ value: item.id
420
+ }
421
+ })
422
+ },
423
+ // 监理现场负责人
424
+ async getSupervisorOperatorId () {
425
+ let data = {
426
+ source: 'this.getParentByType($organization$).getChildByName($监理班组$).getChildren()',
427
+ userid: this.$login.f.id
428
+ }
429
+ let res = await this.$resetpost(
430
+ 'rs/search',
431
+ {data: data},
432
+ {resolveMsg: null, rejectMsg: '监理单位人员查询失败!!!'}
433
+ )
434
+ return res.data.map(item => {
435
+ return {
436
+ label: item.name,
437
+ value: item.id
438
+ }
439
+ })
440
+ },
441
+ // 土建单位
442
+ async getEngineeringOperator () {
443
+ let data = {
444
+ source: 'this.getParentByType($organization$).getChildByName($土建单位$).getChildren()',
445
+ userid: this.$login.f.id
446
+ }
447
+
448
+ let res = await this.$resetpost(
449
+ 'rs/search',
450
+ {data: data},
451
+ {resolveMsg: null, rejectMsg: '土建单位人员查询失败!!!'}
452
+ )
453
+ let result = res.data.map(item => {
454
+ return {
455
+ label: item.name,
456
+ value: item.id
457
+ }
458
+ })
459
+ result.push({label:'用户自理',value:'用户自理'})
460
+ result.push({label:'无',value:'无'})
461
+ return result
462
+ },
463
+ // 检测单位
464
+ async getCheckOperator () {
465
+ let data = {
466
+ source: 'this.getParentByType($organization$).getChildByName($检测单位$).getChildren()',
467
+ userid: this.$login.f.id
468
+ }
469
+
470
+ let res = await this.$resetpost(
471
+ 'rs/search',
472
+ {data: data},
473
+ {resolveMsg: null, rejectMsg: '检测单位人员查询失败!!!'}
474
+ )
475
+
476
+ let result = res.data.map(item => {
477
+ return {
478
+ label: item.name,
479
+ value: item.id
480
+ }
481
+ })
482
+ result.push({label:'无',value:'无'})
483
+ return result
484
+ },
485
+ // 户内出单日期
486
+ async getOutdoorsTime () {
487
+ for (const item of this.data.fields) {
488
+ if (item.label === '户内出单日期') {
489
+ item.value = this.data.f_release_date
490
+ this.data[item.field] = item.value
491
+ }else if(item.label === '庭院出单日期'){
492
+ item.value = this.data.f_release_date
493
+ this.data[item.field] = item.value
494
+ }
495
+ }
496
+ },
497
+ async getChargeDate() {
498
+ let data = {
499
+ tablename: 'activityins',
500
+ condition: `processid = '${this.data.f_process_id}' and defname = '报装缴费'`,
501
+ }
502
+
503
+ let http = new HttpResetClass()
504
+ let res = await http.load(
505
+ 'POST',
506
+ `rs/sql/applySingleTable`,
507
+ {data: data},
508
+ {resolveMsg: null, rejectMsg: null}
509
+ )
510
+ if (res.data[0]){
511
+ for (const item of this.data.fields) {
512
+ if (item.label === '缴费日期') {
513
+ item.value = res.data[0].finishtime
514
+ this.data[item.field] = item.value
515
+ }
516
+ }
517
+ }
518
+ },
519
+ async getSingAct() {
520
+ let data = {
521
+ f_process_id: this.data.f_process_id
522
+ }
523
+ let http = new HttpResetClass()
524
+ let res = await http.load(
525
+ 'POST',
526
+ `rs/sql/getSingAct`,
527
+ {data: data},
528
+ {resolveMsg: null, rejectMsg: '签字状态查询失败!!!'}
529
+ )
530
+ if (res.data.length > 0) {
531
+ for (const item of this.data.fields) {
532
+ if (item.label === '签字所在环节') {
533
+ item.value = res.data[0].defname
534
+ this.data[item.field] = item.value
535
+ }
536
+ }
537
+ }
538
+ }
539
+ },
540
+ events:{
541
+ // 工程派工初始化
542
+ async 'dispatchReadyEvent' () {
543
+ console.log("cscc")
544
+ if (isEmpty(this.show_data.f_meter_brand)) {
545
+ return
546
+ }
547
+ let data = {
548
+ f_gasbrand_id: this.show_data.f_meter_brand
549
+ }
550
+ let http = new HttpResetClass()
551
+ let res = await http.load(
552
+ 'POST',
553
+ `rs/sql/getGasModel`,
554
+ {data: data},
555
+ {resolveMsg: null, rejectMsg: '气表型号查询失败!!!'}
556
+ )
557
+
558
+ this.setLabelOptions('气表型号', res.data)
559
+ },
560
+ async 'buildReadyEvent' () {
561
+ console.log("cscc")
562
+ if (isEmpty(this.show_data.f_meter_brand)) {
563
+ return
564
+ }
565
+ let data = {
566
+ f_gasbrand_id: this.show_data.f_meter_brand
567
+ }
568
+ let http = new HttpResetClass()
569
+ let res = await http.load(
570
+ 'POST',
571
+ `rs/sql/getGasModel`,
572
+ {data: data},
573
+ {resolveMsg: null, rejectMsg: '气表型号查询失败!!!'}
574
+ )
575
+
576
+ this.setLabelOptions('气表型号', res.data)
577
+ }
578
+ },
579
+ watch: {
580
+ deep: true
581
+ }
582
+ }
583
+ </script>
584
+ <style scoped>
585
+ /*清除model中的浮动*/
586
+ .clearfix:after,.clearfix:before{
587
+ display: table;
588
+ }
589
+ .clearfix:after{
590
+ clear: both;
591
+ }
592
+ </style>