apply-clients 3.3.216 → 3.4.1

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 (96) hide show
  1. package/android.html +23 -23
  2. package/index.html +33 -33
  3. package/package.json +3 -3
  4. package/src/AndroidApp.vue +35 -30
  5. package/src/App.vue +20 -20
  6. package/src/android.js +21 -21
  7. package/src/apply.js +81 -90
  8. package/src/applyAndroid.js +1 -23
  9. package/src/components/android/AppOnetomany.vue +301 -285
  10. package/src/components/android/AppServiceView.vue +566 -570
  11. package/src/components/android/AppSign.vue +142 -142
  12. package/src/components/android/AppTakePic.vue +143 -144
  13. package/src/components/android/Process/AppExplorationUser.vue +320 -270
  14. package/src/components/android/Process/AppServiceControl.vue +757 -686
  15. package/src/components/android/Process/Processes/AppInstallationDetails.vue +456 -466
  16. package/src/components/android/ProgressReport/ProgressReportDetail.vue +64 -0
  17. package/src/components/android/ProgressReport/ProgressReportList.vue +209 -0
  18. package/src/components/android/Supervisory/AppProcessSupervisory.vue +73 -152
  19. package/src/components/android/Supervisory/AppSupervisoryCart.vue +121 -115
  20. package/src/components/android/TaskGraph.vue +125 -0
  21. package/src/components/product/ApplyCharge/ApplyChargeList.vue +36 -50
  22. package/src/components/product/ApplyCharge/ApplyChargeSearch.vue +3 -3
  23. package/src/components/product/Function/InstallFunction.vue +125 -122
  24. package/src/components/product/Function/InstallInfoSelect.vue +292 -318
  25. package/src/components/product/Function/Service/FunctionServiceControl.vue +222 -254
  26. package/src/components/product/Function/StopApplyCrrdList.vue +176 -0
  27. package/src/components/product/Function/functions/ApplyRecordCancel.vue +102 -0
  28. package/src/components/product/Function/functions/StopInstall.vue +106 -0
  29. package/src/components/product/Onetomany.vue +377 -296
  30. package/src/components/product/Order/OrderApply.vue +30 -30
  31. package/src/components/product/Order/OrderApplyList.vue +78 -67
  32. package/src/components/product/Order/OrderMessage.vue +11 -87
  33. package/src/components/product/Process/ExplorationSelect.vue +410 -369
  34. package/src/components/product/Process/ExplorationUser.vue +138 -128
  35. package/src/components/product/Process/Processes/InstallationDetails.vue +592 -504
  36. package/src/components/product/Process/Processes/Print/img/10101.png +0 -0
  37. package/src/components/product/Process/Processes/Print/img/1010109.png +0 -0
  38. package/src/components/product/Process/Processes/Print/img/1010110.png +0 -0
  39. package/src/components/product/Process/Processes/Print/img/1010111.png +0 -0
  40. package/src/components/product/Process/Processes/Print/img/1010112.png +0 -0
  41. package/src/components/product/Process/Processes/Print/printCharge.vue +142 -0
  42. package/src/components/product/Process/Processes/addressAndUserinfoManagement.vue +207 -181
  43. package/src/components/product/Process/Processes/chargeManagement.vue +639 -638
  44. package/src/components/product/Process/Processes/devicesManagement.vue +22 -2
  45. package/src/components/product/Process/Processes/selectApply.vue +1 -1
  46. package/src/components/product/Process/Service/ServiceControl.vue +1254 -883
  47. package/src/components/product/Process/Service/ShowBackReason.vue +33 -0
  48. package/src/components/product/ServiceView.vue +631 -741
  49. package/src/components/product/Stop/StopApply.vue +103 -103
  50. package/src/components/product/Stop/StopApplyList.vue +269 -254
  51. package/src/components/product/Supervisory/Service/SupervisoryServiceControl.vue +186 -517
  52. package/src/components/product/Supervisory/SupervisoryControl.vue +100 -108
  53. package/src/components/product/Supervisory/SupervisoryList.vue +233 -253
  54. package/src/components/product/Supervisory/SupervisoryhCart.vue +107 -124
  55. package/src/components/product/VueUtils/ApplyUpload.vue +273 -264
  56. package/src/components/product/VueUtils/HighMeter.vue +208 -0
  57. package/src/expandcssAndroid.less +1034 -517
  58. package/src/filiale/yuchuan/android/Process/AppServiceControl.vue +548 -414
  59. package/src/filiale/yuchuan/android/Process/Processes/AppInstallationDetails.vue +754 -456
  60. package/src/filiale/yuchuan/android/Task/Survey/SurveyTsak.vue +60 -0
  61. package/src/filiale/yuchuan/android.js +7 -8
  62. package/src/filiale/yuchuan/pc/Order/OrderApply.vue +528 -517
  63. package/src/filiale/yuchuan/pc/Order/OrderApplyList.vue +343 -343
  64. package/src/filiale/yuchuan/pc/Process/ExplorationSelect.vue +270 -231
  65. package/src/filiale/yuchuan/pc/Process/ExplorationUser.vue +147 -131
  66. package/src/filiale/yuchuan/pc/Process/Processes/ApplyMapCom.vue +66 -0
  67. package/src/filiale/yuchuan/pc/Process/Processes/InstallationDetails.vue +759 -0
  68. package/src/filiale/yuchuan/pc/Process/Processes/chargeManagement.vue +470 -0
  69. package/src/filiale/yuchuan/pc/Process/Service/ServiceControl.vue +879 -517
  70. package/src/filiale/yuchuan/pc.js +11 -13
  71. package/src/main.js +23 -23
  72. package/src/components/android/Function/AppFunctionServiceControl.vue +0 -329
  73. package/src/components/android/Function/AppInstallFunction.vue +0 -330
  74. package/src/components/android/Process/Processes/AppBuildSign.vue +0 -47
  75. package/src/components/android/Process/Processes/AppChargeManagement.vue +0 -468
  76. package/src/components/android/Process/Processes/AppDevicesManagement.vue +0 -490
  77. package/src/components/android/Process/Processes/AppSupplementalAgreement.vue +0 -297
  78. package/src/components/android/Process/Processes/AppjiaSign.vue +0 -47
  79. package/src/components/android/Process/Processes/AppjiafangSign.vue +0 -47
  80. package/src/components/android/Process/Processes/ApptechnologySign.vue +0 -47
  81. package/src/components/image/dwg.jpg +0 -0
  82. package/src/components/image/yasuobao.jpg +0 -0
  83. package/src/components/product/Function/Inform.vue +0 -73
  84. package/src/components/product/Function/MarketSurvey.vue +0 -81
  85. package/src/components/product/Process/Processes/printCharge.vue +0 -121
  86. package/src/components/product/Process/ShowBackReason.vue +0 -33
  87. package/src/components/product/Supervisory/Service/printChargeNode.vue +0 -873
  88. package/src/components/product/VueUtils/GaoPaiYi/HighMeter.vue +0 -1090
  89. package/src/components/product/VueUtils/ToolsPage.vue +0 -51
  90. package/src/components/product/VueUtils/Tree.vue +0 -330
  91. package/src/filiale/wuan/android.js +0 -0
  92. package/src/filiale/wuan/pc.js +0 -4
  93. package/src/filiale/yuchuan/android/AppServiceView.vue +0 -599
  94. package/src/filiale/yuchuan/android/Reserve/ApplyReserve.vue +0 -200
  95. package/src/filiale/yuchuan/android/SiteSurvey/TaskGraph.vue +0 -137
  96. package/src/filiale/yuchuan/pc/Process/Processes/MapCom.vue +0 -51
@@ -1,517 +1,879 @@
1
- <template>
2
-
3
- <div class="auto clearfix">
4
- <show-back-reason :selectdata="show_data"></show-back-reason>
5
- </div>
6
-
7
- <service-view v-ref:serviceview :data="show_data" v-if="showview"></service-view>
8
-
9
- </template>
10
- <script>
11
- import Vue from 'vue'
12
- import {HttpResetClass} from 'vue-client'
13
- import {isEmpty} from '../../../../../components/Util'
14
-
15
- // Date格式化
16
- Date.prototype.Format = function (fmt) {
17
- var o = {
18
- "M+": this.getMonth() + 1, //月份
19
- "d+": this.getDate(), //日
20
- "H+": this.getHours(), //小时
21
- "m+": this.getMinutes(), //分
22
- "s+": this.getSeconds(), //秒
23
- "q+": Math.floor((this.getMonth() + 3) / 3), //季度
24
- "S": this.getMilliseconds() //毫秒
25
- };
26
- if (/(y+)/.test(fmt)) fmt = fmt.replace(RegExp.$1, (this.getFullYear() + "").substr(4 - RegExp.$1.length));
27
- for (var k in o)
28
- if (new RegExp("(" + k + ")").test(fmt)) fmt = fmt.replace(RegExp.$1, (RegExp.$1.length == 1) ? (o[k]) : (("00" + o[k]).substr(("" + o[k]).length)));
29
- return fmt;
30
- }
31
-
32
- export default {
33
- title: '报建流程业务控制层',
34
- props: ['selectdata'],
35
- data () {
36
- return {
37
- data: null, // 数据库数据,json配置文件数据的数据集合
38
- json_datas: null, // Json配置文件集合
39
- showview: false, // 控制显示service-view组件
40
- show_data: null // 给view层显示的数据
41
- }
42
- },
43
- ready () {
44
- this.refurbish()
45
- },
46
- methods: {
47
- // 组件初始化操作
48
- async refurbish() {
49
- this.json_datas = this.$workflow_vue
50
- let sum = 0
51
- let jsonData = {}
52
- if (!this.json_datas || !this.json_datas.activitys || this.json_datas.activitys.length === 0) {
53
- this.$showMessage("网络故障,请刷新页面")
54
- return
55
- }
56
- this.json_datas.activitys.forEach(item => {
57
- if (this.selectdata.defname === item.title) {
58
- jsonData = item // 拿到当前节点的json配置信息
59
- sum++ // 节点名一样的个数
60
- }
61
- return this.selectdata.defname === item.title // 拿到当前节点的json配置信息
62
- })
63
-
64
- if (sum === 0) {
65
- this.$showMessage(`没有在JSON配置文件中找到活动名为:(${this.selectdata.defname})的节点配置`)
66
- return
67
- }
68
- if (sum > 1) {
69
- this.$showMessage(`在JSON配置文件中找到活动名为:(${this.selectdata.defname})的节点配置:${sum}个`)
70
- return
71
- }
72
-
73
- this.selectdata = Object.assign({}, this.selectdata, jsonData)
74
-
75
- // fields 字段填充值
76
- for (const item of this.selectdata.fields) {
77
- if (!item.value) {
78
- item.value = null
79
- }
80
-
81
- if (item.default || item.default === 0) {
82
- item.value = item.default
83
- }
84
-
85
- if (this.selectdata[item.field]) {
86
- // 将json字符串格式化赋值给value
87
- if (String(this.selectdata[item.field]).startsWith("{")) {
88
- item.value = JSON.parse(this.selectdata[item.field])
89
- this.selectdata[item.field] = JSON.parse(this.selectdata[item.field])
90
- } else {
91
- item.value = this.selectdata[item.field]
92
- }
93
- }
94
- if (this.selectdata[item.field] === 0) {
95
- item.value = 0
96
- }
97
-
98
- // datepicker
99
- if (item.type === 'datepicker' && !item.value && item.default) {
100
- item.value = new Date().Format(`${item.format ? item.format : 'yyyy-MM-dd HH:mm:ss'}`)
101
- }
102
-
103
- // 如果配置类型为select,优先从参数列表获取options
104
- if (item.type === 'select') {
105
-
106
- let temp = this.$appdata.getParam(item.label)
107
-
108
- if (temp && temp.length > 0) {
109
- item.options = temp
110
- }
111
-
112
- if (item.paramLabel) {
113
- temp = this.$appdata.getParam(item.paramLabel)
114
- if (temp && temp.length > 0) {
115
- item.options = temp
116
- }
117
- }
118
-
119
- if (item.ready) {
120
- item.options = await this[item.ready]()
121
- }
122
- }
123
- }
124
-
125
- // 控制组件
126
- if (this.selectdata.components) {
127
- this.selectdata.components.forEach(item => {
128
- item.mark = 0
129
- })
130
- }
131
-
132
- // 初始化onetomany
133
- if (this.selectdata.onetomany) {
134
- for (const item of this.selectdata.onetomany) {
135
- let res = null
136
- if (item.queryEvent) {
137
- res = this[item.queryEvent]()
138
- } else {
139
- let data = {
140
- tablename: item.tables[0],
141
- condition: `f_process_id='${this.selectdata.f_process_id}'`
142
- }
143
- res = await this.$resetpost(
144
- 'rs/sql/singleTable',
145
- {data: data},
146
- {resolveMsg: null, rejectMsg: 'onetomany查询失败'}
147
- )
148
- }
149
-
150
- item.rows = res.data
151
-
152
- // 初始化onetomany中的fields
153
- for (const field of item.fields) {
154
- if (!field.value) {
155
- if (field.value !== 0) {
156
- field.value = null
157
- }
158
- }
159
-
160
- if (field.default || field.default === 0) {
161
- field.value = field.default
162
- }
163
-
164
- // datepicker
165
- if (field.type === 'datepicker' && !field.value && field.default) {
166
- field.value = new Date().Format(`${field.format ? field.format : 'yyyy-MM-dd HH:mm:ss'}`)
167
- }
168
-
169
- if (field.type === 'select') {
170
- let temp = this.$appdata.getParam(field.label)
171
-
172
- if (temp && temp.length > 0) {
173
- field.options = temp
174
- }
175
-
176
- if (field.paramLabel) {
177
- temp = this.$appdata.getParam(field.paramLabel)
178
- if (temp && temp.length > 0) {
179
- item.options = temp
180
- }
181
- }
182
- }
183
- }
184
- }
185
- }
186
-
187
- // 初始化 buttons_fields
188
- for (const item of this.selectdata.buttons) {
189
- if (item.button_name === '下发') {
190
- if (!item.source) {
191
- this.$showMessage("请配置获取人员表达式")
192
- return
193
- }
194
- let data = {
195
- source: item.source,
196
- userid: this.$login.f.id
197
- }
198
- let res = await this.$resetpost(
199
- 'rs/search',
200
- {data: data},
201
- {resolveMsg: null, rejectMsg: '下发人员查询失败!!!'}
202
- )
203
-
204
- let options = res.data.map(source => {
205
- return {
206
- "label": source.name,
207
- "value": source.id
208
- }
209
- })
210
-
211
- item.options = options
212
-
213
- }
214
- if (item.button_fields) {
215
- item.button_fields.forEach(x => {
216
- // 如果配置类型为select,优先从参数列表获取options
217
- if (x.type === 'select') {
218
- let temp = this.$appdata.getParam(x.label)
219
-
220
- if (temp && temp.length > 0) {
221
- x.options = temp
222
- }
223
-
224
- if (x.paramLabel) {
225
- temp = this.$appdata.getParam(x.paramLabel)
226
- if (temp && temp.length > 0) {
227
- x.options = temp
228
- }
229
- }
230
- }
231
- })
232
- }
233
- }
234
-
235
- // 消除双向绑定,避免子组件(显示层)数据更改,父组件(控制层)也更改
236
- let temp = JSON.parse(JSON.stringify(this.selectdata))
237
-
238
- this.show_data = temp
239
- this.$nextTick(() => {
240
- this.showview = true
241
- })
242
- },
243
- // 金额转大写
244
- smalltoBIG(n) {
245
- let fraction = ['角', '分'];
246
- let digit = ['零', '壹', '贰', '叁', '肆', '伍', '陆', '柒', '捌', '玖'];
247
- let unit = [['元', '万', '亿'], ['', '拾', '佰', '仟']];
248
- let head = n < 0 ? '欠' : '';
249
- n = Math.abs(n);
250
-
251
- let s = '';
252
-
253
- for (var i = 0; i < fraction.length; i++) {
254
- s += (digit[Math.floor(n * 10 * Math.pow(10, i)) % 10] + fraction[i]).replace(/零./, '');
255
- }
256
- s = s || '整';
257
- n = Math.floor(n);
258
-
259
- for (var i = 0; i < unit[0].length && n > 0; i++) {
260
- let p = '';
261
- for (var j = 0; j < unit[1].length && n > 0; j++) {
262
- p = digit[n % 10] + unit[1][j] + p;
263
- n = Math.floor(n / 10);
264
- }
265
- s = p.replace(/(零.)*零$/, '').replace(/^$/, '零') + unit[0][i] + s;
266
- }
267
- return head + s.replace(/(零.)*零元/, '元').replace(/(零.)+/g, '零').replace(/^整$/, '零元整')
268
- },
269
- getLableValue(label) {
270
- for (const item of this.show_data.fields) {
271
- if (item.label === label && item.type !== 'number') {
272
- return item.value || ''
273
- }
274
- if (item.label === label && item.type === 'number') {
275
- return item.value || 0
276
- }
277
- }
278
- },
279
- setLabelValue(label, value) {
280
- for (const item of this.show_data.fields) {
281
- if (item.label === label) {
282
- item.value = value
283
- }
284
- }
285
- },
286
- setLabelOptions(label, options) {
287
- for (const item of this.show_data.fields) {
288
- if (item.label === label) {
289
- item.options = options
290
- }
291
- }
292
- },
293
- // 获取片区
294
- async getSliceArea () {
295
- let data = {
296
- source: 'this.getParentByType($organization$).getAllChildrens().where(row.getType() == $zone$)',
297
- userid: this.$login.f.id
298
- }
299
-
300
- let res = await this.$resetpost(
301
- `rs/search`,
302
- {data: data},
303
- {resolveMsg: null, rejectMsg: '片区查询失败!!!'}
304
- )
305
-
306
- return res.data.map(item => {
307
- return {
308
- label: item.name,
309
- value: item.name
310
- }
311
- })
312
- },
313
- // 获取省市区
314
- async getPcd () {
315
- let data = {
316
- tablename: 't_pcd',
317
- condition: `f_filialeid = '${this.$login.f.orgid}'`
318
- }
319
- let res = await this.$resetpost(
320
- `rs/sql/singleTable`,
321
- {data: data},
322
- {resolveMsg: null, rejectMsg: '省市区查询失败!!!'}
323
- )
324
- return res.data.map(item => {
325
- return {
326
- label: item.f_pcd,
327
- value: {
328
- id: item.id,
329
- f_pcd: item.f_pcd
330
- }
331
- }
332
- })
333
- },
334
- },
335
- events: {
336
- // 小区失去焦点
337
- async 'areaChange' (index) {
338
- if (isEmpty(this.show_data.f_residential_area)) {
339
- return
340
- }
341
- let area = this.show_data.f_residential_area
342
-
343
- this.show_data.f_residential_area = area.f_residential_area
344
- this.show_data.f_residential_area_id = area.id
345
- },
346
- // 街道失去焦点
347
- async 'streetChange' (index) {
348
- if (isEmpty(this.show_data.f_street)) {
349
- return
350
- }
351
- let street = this.show_data.f_street
352
-
353
- this.show_data.f_street = street.f_street
354
- this.show_data.f_street_id = street.id
355
-
356
- let data = {
357
- tablename: 't_area',
358
- condition: `f_filialeid = '${this.$login.f.orgid}' and f_street_id = ${this.show_data.f_street_id}`
359
- }
360
- let res = await this.$resetpost(
361
- `rs/sql/singleTable`,
362
- {data: data},
363
- {resolveMsg: null, rejectMsg: '小区查询失败!!!'}
364
- )
365
-
366
- this.setLabelOptions('小区', res.data.map(item => {
367
- return {
368
- label: item.f_residential_area,
369
- value: {
370
- id: item.id,
371
- f_residential_area: item.f_residential_area
372
- }
373
- }
374
- }))
375
- },
376
- // 省市区失去焦点
377
- async 'pcdChange' (index) {
378
- if (isEmpty(this.show_data.f_pcd)) {
379
- return
380
- }
381
- let pcd = this.show_data.f_pcd
382
-
383
- this.show_data.f_pcd = pcd.f_pcd
384
- this.show_data.f_pcd_id = pcd.id
385
-
386
- let data = {
387
- tablename: 't_street',
388
- condition: `f_filialeid = '${this.$login.f.orgid}' and f_pcd_id = ${this.show_data.f_pcd_id}`
389
- }
390
- let res = await this.$resetpost(
391
- `rs/sql/singleTable`,
392
- {data: data},
393
- {resolveMsg: null, rejectMsg: '街道查询失败!!!'}
394
- )
395
-
396
- this.setLabelOptions('街道', res.data.map(item => {
397
- return {
398
- label: item.f_street,
399
- value: {
400
- id: item.id,
401
- f_street: item.f_street
402
- }
403
- }
404
- }))
405
- },
406
- async 'button'() {
407
- // 点击重置按钮就重置数据
408
- if (this.show_data.button.button_name === '重置') {
409
- this.$dispatch('breakControl', this.selectdata)
410
- return
411
- }
412
-
413
- this.show_data.user = this.$login.f
414
- this.show_data.start_activity = this.$workflow_vue.start_activity
415
- this.show_data.xmlfilename = this.$workflow_vue.workflow_xmlfilename
416
-
417
- let res = await this.$resetpost(
418
- `rs/logic/ApplyProductService`,
419
- {data: this.show_data},
420
- {resolveMsg: null, rejectMsg: '数据保存失败'}
421
- )
422
-
423
- this.$dispatch('search')
424
- },
425
- // 失去焦点出触发事件
426
- 'onchange' (index) {
427
- if (
428
- this.show_data.fields[index].label === '街道' ||
429
- this.show_data.fields[index].label === '小区' ||
430
- this.show_data.fields[index].label === '楼号' ||
431
- this.show_data.fields[index].label === '单元' ||
432
- this.show_data.fields[index].label === '楼层' ||
433
- this.show_data.fields[index].label === '门牌号'
434
- ) {
435
- let f_address = this.show_data.f_street + this.show_data.f_residential_area +
436
- (isEmpty(this.show_data.f_building) ? '' : this.show_data.f_building + '号楼') +
437
- (isEmpty(this.show_data.f_unit) ? '' : this.show_data.f_unit + '单元') +
438
- (isEmpty(this.show_data.f_floor) ? '' : this.show_data.f_floor + '层') +
439
- (isEmpty(this.show_data.f_room) ? '' : this.show_data.f_room + '室')
440
- this.setLabelValue('地址', f_address)
441
- this.show_data.f_address = f_address
442
- }
443
- },
444
- 'onblur' (index) {},
445
- 'oninput' (index) {},
446
- 'initializtionView' () {},
447
- async 'onchangeModal' (index, fieldIndex) {
448
- console.log('----Model----onchange----')
449
- },
450
- async 'onblurModal' (index, fieldIndex) {
451
-
452
- },
453
- async 'oninputModal' (index, fieldIndex) {
454
-
455
- },
456
- async 'onetomanydelete' (index, rowIndex) {
457
-
458
- let http = new HttpResetClass()
459
-
460
- let res = await http.load(
461
- 'DELETE',
462
- `rs/entity/${this.show_data.onetomany[index].tables[0]}/${this.show_data.onetomany[index].rows[rowIndex].id}`,
463
- null,
464
- {resolveMsg: null, rejectMsg: '删除失败!!!'}
465
- )
466
-
467
- this.$dispatch('breakControl', this.show_data)
468
- },
469
- async 'onetomanyupdate' (index, rowIndex) {
470
- let data = this.show_data.onetomany[index].rows[rowIndex]
471
-
472
- this.show_data.onetomany[index].fields.forEach(item => {
473
- data[item.field] = item.value
474
- })
475
- let res = await this.$resetpost(
476
- `rs/entity/${this.show_data.onetomany[index].tables[0]}`,
477
- data
478
- )
479
-
480
- this.$dispatch('breakControl', this.show_data)
481
- },
482
- async 'onetomanyadd' (index) {
483
- let data = {
484
- f_process_id : this.show_data.f_process_id
485
- }
486
- this.show_data.onetomany[index].fields.forEach(item => {
487
- data[item.field] = item.value
488
- })
489
- let res = await this.$resetpost(
490
- `rs/entity/${this.show_data.onetomany[index].tables[0]}`,
491
- data
492
- )
493
- this.$dispatch('breakControl', this.show_data)
494
- },
495
- 'onbutchange' (index) {
496
-
497
- },
498
- 'onbutblur' (index) {
499
-
500
- },
501
- 'onbutinput' (index) {
502
-
503
- }
504
- },
505
- watch: {
506
- }
507
- }
508
- </script>
509
- <style scoped>
510
- /*清除model中的浮动*/
511
- .clearfix:after,.clearfix:before{
512
- display: table;
513
- }
514
- .clearfix:after{
515
- clear: both;
516
- }
517
- </style>
1
+ <template>
2
+ <div class="" v-if="showview">
3
+ <show-back-reason :selectdata="show_data"></show-back-reason>
4
+ <service-view v-ref:serviceview :data="show_data"></service-view>
5
+ </div>
6
+ </template>
7
+ <script>
8
+ import Vue from 'vue'
9
+ import {HttpResetClass} from 'vue-client'
10
+ import {isEmpty} from '../../../../../components/Util'
11
+
12
+ // Date格式化
13
+ Date.prototype.Format = function (fmt) {
14
+ var o = {
15
+ "M+": this.getMonth() + 1, //月份
16
+ "d+": this.getDate(), //日
17
+ "H+": this.getHours(), //小时
18
+ "m+": this.getMinutes(), //分
19
+ "s+": this.getSeconds(), //秒
20
+ "q+": Math.floor((this.getMonth() + 3) / 3), //季度
21
+ "S": this.getMilliseconds() //毫秒
22
+ };
23
+ if (/(y+)/.test(fmt)) fmt = fmt.replace(RegExp.$1, (this.getFullYear() + "").substr(4 - RegExp.$1.length));
24
+ for (var k in o)
25
+ if (new RegExp("(" + k + ")").test(fmt)) fmt = fmt.replace(RegExp.$1, (RegExp.$1.length == 1) ? (o[k]) : (("00" + o[k]).substr(("" + o[k]).length)));
26
+ return fmt;
27
+ }
28
+
29
+ export default {
30
+ title: '报建流程业务控制层',
31
+ props: ['selectdata'],
32
+ data () {
33
+ return {
34
+ data: null, // 数据库数据,json配置文件数据的数据集合
35
+ json_datas: null, // Json配置文件集合
36
+ showview: false, // 控制显示service-view组件
37
+ show_data: null, // 给view层显示的数据
38
+ config: {}
39
+ }
40
+ },
41
+ ready () {
42
+ this.refurbish()
43
+ },
44
+ methods: {
45
+ // 组件初始化操作
46
+ async refurbish() {
47
+ this.json_datas = this.$workflow_vue
48
+ let sum = 0
49
+ let jsonData = {}
50
+ if (!this.json_datas || !this.json_datas.activitys || this.json_datas.activitys.length === 0) {
51
+ this.$showMessage("网络故障,请刷新页面")
52
+ return
53
+ }
54
+ this.json_datas.activitys.forEach(item => {
55
+ if (this.selectdata.defname === item.title) {
56
+ jsonData = item // 拿到当前节点的json配置信息
57
+ sum++ // 节点名一样的个数
58
+ }
59
+ return this.selectdata.defname === item.title // 拿到当前节点的json配置信息
60
+ })
61
+
62
+ if (sum === 0) {
63
+ this.$showMessage(`没有在JSON配置文件中找到活动名为:(${this.selectdata.defname})的节点配置`)
64
+ return
65
+ }
66
+ if (sum > 1) {
67
+ this.$showMessage(`在JSON配置文件中找到活动名为:(${this.selectdata.defname})的节点配置:${sum}个`)
68
+ return
69
+ }
70
+
71
+ this.selectdata = Object.assign({}, this.selectdata, jsonData)
72
+
73
+ // fields 字段填充值
74
+ for (const item of this.selectdata.fields) {
75
+ if (!item.value) {
76
+ item.value = null
77
+ }
78
+
79
+ if (!item.value && (item.default || item.default === 0) && item.type !== 'datepicker') {
80
+ if (item.eval) {
81
+ item.value = eval(item.default)
82
+ } else {
83
+ item.value = item.default
84
+ }
85
+ }
86
+
87
+ if (this.selectdata[item.field]) {
88
+ // 将json字符串格式化赋值给value
89
+ if (String(this.selectdata[item.field]).startsWith("{")) {
90
+ item.value = JSON.parse(this.selectdata[item.field])
91
+ } else {
92
+ item.value = this.selectdata[item.field]
93
+ }
94
+ }
95
+ if (this.selectdata[item.field] === 0) {
96
+ item.value = 0
97
+ }
98
+
99
+ // datepicker
100
+ if (item.type === 'datepicker' && !item.value && item.default) {
101
+ item.value = new Date().Format(`${item.format ? item.format : 'yyyy-MM-dd HH:mm:ss'}`)
102
+ }
103
+
104
+ // 如果配置类型为select,优先从参数列表获取options
105
+ if (item.type === 'select' || item.type === 'checkbox') {
106
+ if (item.param) {
107
+ let temp = this.$appdata.getParam(item.label)
108
+
109
+ if (temp && temp.length > 0) {
110
+ item.options = temp
111
+ }
112
+
113
+ if (item.paramLabel) {
114
+ temp = this.$appdata.getParam(item.paramLabel)
115
+ if (temp && temp.length > 0) {
116
+ item.options = temp
117
+ }
118
+ }
119
+ }
120
+ if (item.ready) {
121
+ item.options = await this[item.ready]()
122
+ }
123
+ }
124
+
125
+
126
+ if (item.type === 'checkbox') {
127
+ if (this.selectdata[item.field]) {
128
+ item.value = JSON.parse(this.selectdata[item.field])
129
+ } else {
130
+ item.value = []
131
+ }
132
+ }
133
+
134
+ this.selectdata[item.field] = item.value
135
+ }
136
+
137
+ // 控制组件
138
+ if (this.selectdata.components) {
139
+ this.selectdata.components.forEach(item => {
140
+ if (!item.mark) {
141
+ item.mark = 0
142
+ }
143
+ })
144
+ }
145
+
146
+ // 初始化onetomany
147
+ if (this.selectdata.onetomany) {
148
+ for (const item of this.selectdata.onetomany) {
149
+ let res = null
150
+ if (item.queryEvent) {
151
+ res = this[item.queryEvent]()
152
+ } else {
153
+ let data = {
154
+ tablename: item.tables[0],
155
+ condition: `f_process_id='${this.selectdata.f_process_id}'`
156
+ }
157
+ res = await this.$resetpost(
158
+ 'rs/sql/singleTable',
159
+ {data: data},
160
+ {resolveMsg: null, rejectMsg: 'onetomany查询失败'}
161
+ )
162
+ }
163
+
164
+ item.rows = res.data
165
+
166
+ // 初始化onetomany中的fields
167
+ for (const field of item.fields) {
168
+ if (!field.value) {
169
+ if (field.value !== 0) {
170
+ field.value = null
171
+ }
172
+ }
173
+
174
+ if (field.default || field.default === 0) {
175
+ field.value = field.default
176
+ }
177
+
178
+ // datepicker
179
+ if (field.type === 'datepicker' && !field.value && field.default) {
180
+ field.value = new Date().Format(`${field.format ? field.format : 'yyyy-MM-dd HH:mm:ss'}`)
181
+ }
182
+
183
+ if (field.type === 'select') {
184
+
185
+ let temp = this.$appdata.getParam(field.label)
186
+
187
+ if (temp && temp.length > 0) {
188
+ field.options = temp
189
+ }
190
+
191
+ if (field.paramLabel) {
192
+ temp = this.$appdata.getParam(field.paramLabel)
193
+ if (temp && temp.length > 0) {
194
+ item.options = temp
195
+ }
196
+ }
197
+ }
198
+ }
199
+ }
200
+ }
201
+
202
+ // 初始化 buttons_fields
203
+ for (const item of this.selectdata.buttons) {
204
+ if (item.button_name === '下发') {
205
+
206
+ let data = {
207
+ source: item.source,
208
+ userid: this.$login.f.id
209
+ }
210
+ if (item.sourceMethod) {
211
+ data.source = this[item.sourceMethod]()
212
+ }
213
+ if (!data.source) {
214
+ this.$showMessage("请配置获取人员表达式")
215
+ return
216
+ }
217
+
218
+ let res = await this.$resetpost(
219
+ 'rs/search',
220
+ {data: data},
221
+ {resolveMsg: null, rejectMsg: '下发人员查询失败!!!'}
222
+ )
223
+
224
+ let options = res.data.map(source => {
225
+ return {
226
+ "label": source.name,
227
+ "value": source.id
228
+ }
229
+ })
230
+
231
+ if (item.button_fields.length !== 1) {
232
+ this.$showMessage("下发有且只能有一个字段!!!")
233
+ return
234
+ }
235
+
236
+ item.button_fields[0].options = options
237
+ }
238
+ if (item.button_fields) {
239
+ item.button_fields.forEach(x => {
240
+ // 如果配置类型为select,优先从参数列表获取options
241
+ if (x.type === 'select') {
242
+
243
+ if (x.param) {
244
+ let temp = this.$appdata.getParam(x.label)
245
+
246
+ if (temp && temp.length > 0) {
247
+ x.options = temp
248
+ }
249
+
250
+ if (x.paramLabel) {
251
+ temp = this.$appdata.getParam(x.paramLabel)
252
+ if (temp && temp.length > 0) {
253
+ x.options = temp
254
+ }
255
+ }
256
+ }
257
+
258
+ }
259
+ })
260
+ }
261
+ }
262
+
263
+ // 消除双向绑定,避免子组件(显示层)数据更改,父组件(控制层)也更改
264
+ let temp = JSON.parse(JSON.stringify(this.selectdata))
265
+
266
+ this.show_data = temp
267
+ this.$nextTick(() => {
268
+ this.showview = true
269
+ })
270
+ },
271
+ // 金额转大写
272
+ smalltoBIG(n) {
273
+ let fraction = ['角', '分'];
274
+ let digit = ['零', '壹', '贰', '叁', '', '伍', '陆', '柒', '捌', '玖'];
275
+ let unit = [['元', '万', '亿'], ['', '拾', '佰', '仟']];
276
+ let head = n < 0 ? '欠' : '';
277
+ n = Math.abs(n);
278
+
279
+ let s = '';
280
+
281
+ for (var i = 0; i < fraction.length; i++) {
282
+ s += (digit[Math.floor(n * 10 * Math.pow(10, i)) % 10] + fraction[i]).replace(/零./, '');
283
+ }
284
+ s = s || '整';
285
+ n = Math.floor(n);
286
+
287
+ for (var i = 0; i < unit[0].length && n > 0; i++) {
288
+ let p = '';
289
+ for (var j = 0; j < unit[1].length && n > 0; j++) {
290
+ p = digit[n % 10] + unit[1][j] + p;
291
+ n = Math.floor(n / 10);
292
+ }
293
+ s = p.replace(/(零.)*零$/, '').replace(/^$/, '零') + unit[0][i] + s;
294
+ }
295
+ return head + s.replace(/(零.)*零元/, '元').replace(/(零.)+/g, '零').replace(/^整$/, '零元整')
296
+ },
297
+ getLableValue(label) {
298
+ for (const item of this.show_data.fields) {
299
+ if (item.label === label && item.type !== 'number') {
300
+ return item.value || ''
301
+ }
302
+ if (item.label === label && item.type === 'number') {
303
+ return item.value || 0
304
+ }
305
+ }
306
+ },
307
+ getLableOptions(label) {
308
+ for (const item of this.show_data.fields) {
309
+ if (item.label === label) {
310
+ return item.options
311
+ }
312
+ }
313
+ },
314
+ setLabelValue(label, value) {
315
+ for (const item of this.show_data.fields) {
316
+ if (item.label === label) {
317
+ item.value = value
318
+ this.show_data[item.field] = value
319
+ }
320
+ }
321
+ },
322
+ setLabelOptions(label, options) {
323
+ for (const item of this.show_data.fields) {
324
+ if (item.label === label) {
325
+ item.options = options
326
+ }
327
+ }
328
+ },
329
+ showLabels(...labels) {
330
+ for (const item of this.show_data.fields) {
331
+ if (labels.includes(item.label)) {
332
+ item.hidden = false
333
+ }
334
+ }
335
+ },
336
+ hideLabels(...labels) {
337
+ for (const item of this.show_data.fields) {
338
+ if (labels.includes(item.label)) {
339
+ item.hidden = true
340
+ }
341
+ }
342
+ },
343
+ requiredLabels(...labels) {
344
+ for (const item of this.show_data.fields) {
345
+ if (labels.includes(item.label)) {
346
+ item.required = true
347
+ }
348
+ }
349
+ },
350
+ electiveLabels(...labels) {
351
+ for (const item of this.show_data.fields) {
352
+ if (labels.includes(item.label)) {
353
+ item.required = false
354
+ }
355
+ }
356
+ },
357
+ readonlyLabels(...labels) {
358
+ for (const item of this.show_data.fields) {
359
+ if (labels.includes(item.label)) {
360
+ item.readonly = true
361
+ item.disabled = true
362
+ }
363
+ }
364
+ },
365
+ readwriteLabels(...labels) {
366
+ for (const item of this.show_data.fields) {
367
+ if (labels.includes(item.label)) {
368
+ item.readonly = false
369
+ item.disabled = false
370
+ }
371
+ }
372
+ },
373
+ async checkDuplicate(index) {
374
+ let http = new HttpResetClass()
375
+ let data = {
376
+ tablename: 't_apply',
377
+ condition: `${this.show_data.fields[index].field} = '${this.show_data.fields[index].value}'`
378
+ }
379
+ let res = await http.load('POST', 'rs/sql/singleTable', {data: data}, {
380
+ resolveMsg: null,
381
+ rejectMsg: `${this.show_data.fields[index].label}查询失败`
382
+ })
383
+ if (res.data.length > 0) {
384
+ this.show_data.fields[index].value = null
385
+ this.$showAlert(`${this.show_data.fields[index].label}已存在!!!`, 'warning', 3000)
386
+ }
387
+ },
388
+ // 获取片区
389
+ async getSliceArea () {
390
+ let data = {
391
+ source: 'this.getParentByType($organization$).getAllChildrens().where(row.getType() == $zone$)',
392
+ userid: this.$login.f.id
393
+ }
394
+
395
+ let http = new HttpResetClass()
396
+ let res = await http.load(
397
+ 'POST',
398
+ `rs/search`,
399
+ {data: data},
400
+ {resolveMsg: null, rejectMsg: '片区查询失败!!!'}
401
+ )
402
+
403
+ return res.data.map(item => {
404
+ return {
405
+ label: item.name,
406
+ value: item.name
407
+ }
408
+ })
409
+ },
410
+ // 获取区县
411
+ async getPcd () {
412
+ let data = {
413
+ tablename: 't_pcd',
414
+ condition: `f_filialeid = '${this.$login.f.orgid}'`
415
+ }
416
+ let http = new HttpResetClass()
417
+ let res = await http.load(
418
+ 'POST',
419
+ `rs/sql/singleTable`,
420
+ {data: data},
421
+ {resolveMsg: null, rejectMsg: '区县查询失败!!!'}
422
+ )
423
+
424
+ return res.data.map(item => {
425
+ return {
426
+ label: item.f_pcd,
427
+ value: item.f_pcd
428
+ }
429
+ })
430
+ },
431
+ // 缴费前置
432
+ chargeBefore () {
433
+ if (Number(this.show_data.f_due_money) > Number(this.show_data.f_cumulative_payment_money) || Number(this.show_data.f_surplus_money) > 0) {
434
+ this.$showAlert('费用未结清!!!', 'warning', 3000)
435
+ throw null
436
+ }
437
+ },
438
+ // 施工前置
439
+ async constructionBefore () {
440
+ let http = new HttpResetClass()
441
+ let data = {
442
+ condition: `ui.f_process_id = '${this.show_data.f_process_id}' and uf.f_table_state = '待开通'`
443
+ }
444
+ let res = await http.load(
445
+ 'POST',
446
+ 'rs/sql/countApplyUserinfo',
447
+ {data: data},
448
+ {
449
+ resolveMsg: null,
450
+ rejectMsg: '安装明细查询失败!!!'
451
+ })
452
+ if (res.data[0].num > 0) {
453
+ this.$showAlert(`还有${res.data[0].num}户未安装,无法提交`, 'warning', 3000)
454
+ throw `还有${res.data[0].num}户未安装,无法提交`
455
+ }
456
+ },
457
+ async getPrice (f_price_id) {
458
+ console.log('=======================')
459
+ console.log(f_price_id)
460
+
461
+ let data = {
462
+ condition: `sp.f_orgid = '${this.$login.f.orgid}'`
463
+ }
464
+
465
+ if (!isEmpty(f_price_id)) {
466
+ data.condition = `sp.f_orgid = '${this.$login.f.orgid}' and sp.f_price_id = ${f_price_id}`
467
+ }
468
+ let http = new HttpResetClass()
469
+ let res = await http.load(
470
+ 'POST',
471
+ `rs/sql/applyGetPrice`,
472
+ {data: data},
473
+ {resolveMsg: null, rejectMsg: '气价查询失败!!!'}
474
+ )
475
+
476
+ return res.data.map(item => {
477
+ return {
478
+ label: item.f_price_name,
479
+ value: item
480
+ }
481
+ })
482
+ },
483
+ addressInitialization () {
484
+ this.$getConfig(this, 'UserAddress')
485
+
486
+ let f_address_type = this.show_data.f_address_type
487
+
488
+ for (const item of this.show_data.fields) {
489
+ if (f_address_type === '民用市区') {
490
+ if (item.label === '区/县' || item.label === '街道/乡镇' || item.label === '集收单位' || item.label === '门牌号') {
491
+ item.hidden = false
492
+ item.required = true
493
+ }
494
+ if (item.label === '楼号/组' || item.label === '单元/排' || item.label === '楼层') {
495
+ item.hidden = false
496
+ item.required = false
497
+ }
498
+ if (item.label === '地址') {
499
+ item.readonly = true
500
+ }
501
+ }
502
+ if (f_address_type === '民用乡镇') {
503
+ if (item.label === '区/县' || item.label === '街道/乡镇' || item.label === '集收单位' || item.label === '门牌号') {
504
+ item.hidden = false
505
+ item.required = true
506
+ }
507
+ if (item.label === '楼号/组' || item.label === '单元/排' || item.label === '楼层') {
508
+ item.hidden = false
509
+ item.required = false
510
+ }
511
+ if (item.label === '楼层') {
512
+ item.hidden = true
513
+ item.required = false
514
+ }
515
+ if (item.label === '地址') {
516
+ item.readonly = true
517
+ }
518
+ }
519
+ if (f_address_type === '特殊地址') {
520
+ if (item.label === '区/县' || item.label === '街道/乡镇') {
521
+ item.hidden = false
522
+ item.required = true
523
+ }
524
+ if (item.label === '集收单位') {
525
+ item.hidden = false
526
+ item.required = false
527
+ }
528
+ if (item.label === '楼号/组' || item.label === '单元/排' || item.label === '楼层' || item.label === '门牌号') {
529
+ item.hidden = true
530
+ item.required = false
531
+ }
532
+ if (item.label === '地址') {
533
+ item.readonly = false
534
+ }
535
+ }
536
+
537
+ if (this.show_data.f_apply_source === '线下发起' && item.label === '预约地址') {
538
+ item.hidden = true
539
+ }
540
+ }
541
+ },
542
+ async streetChange () {
543
+ if (isEmpty(this.show_data.f_street)) {
544
+ return
545
+ }
546
+
547
+ let data = {
548
+ tablename: 't_area',
549
+ condition: `f_filialeid = '${this.$login.f.orgid}' and f_street = '${this.show_data.f_street}'`
550
+ }
551
+ let http = new HttpResetClass()
552
+ let res = await http.load(
553
+ 'POST',
554
+ `rs/sql/singleTable`,
555
+ {data: data},
556
+ {resolveMsg: null, rejectMsg: '集收单位查询失败!!!'}
557
+ )
558
+
559
+ this.setLabelOptions('集收单位', res.data.map(item => {
560
+ return {
561
+ label: item.f_residential_area,
562
+ value: item.f_residential_area
563
+ }
564
+ }))
565
+ },
566
+ async pcdChange () {
567
+ if (isEmpty(this.show_data.f_pcd)) {
568
+ return
569
+ }
570
+
571
+ let data = {
572
+ tablename: 't_street',
573
+ condition: `f_filialeid = '${this.$login.f.orgid}' and f_pcd = '${this.show_data.f_pcd}'`
574
+ }
575
+ let f_address_type = this.getLableValue('地址类型')
576
+
577
+ if (f_address_type === '民用市区') {
578
+ data.condition = `f_filialeid = '${this.$login.f.orgid}' and f_pcd = '${this.show_data.f_pcd}' and f_iscity = '市区'`
579
+ }
580
+ if (f_address_type === '民用乡镇') {
581
+ data.condition = `f_filialeid = '${this.$login.f.orgid}' and f_pcd = '${this.show_data.f_pcd}' and f_iscity = '乡镇'`
582
+ }
583
+
584
+ let http = new HttpResetClass()
585
+ let res = await http.load(
586
+ 'POST',
587
+ `rs/sql/singleTable`,
588
+ {data: data},
589
+ {resolveMsg: null, rejectMsg: '街道/乡镇查询失败!!!'}
590
+ )
591
+
592
+ this.setLabelOptions('街道/乡镇', res.data.map(item => {
593
+ return {
594
+ label: item.f_street,
595
+ value: item.f_street
596
+ }
597
+ }))
598
+ },
599
+ async getMeterBrand () {
600
+ let data = {
601
+ f_orgid: this.$login.f.orgid
602
+ }
603
+
604
+ let http = new HttpResetClass()
605
+ let res = await http.load(
606
+ 'POST',
607
+ `rs/sql/getMeterBrand`,
608
+ {data: data},
609
+ {resolveMsg: null, rejectMsg: '气表品牌查询失败!!!'}
610
+ )
611
+
612
+ return res.data
613
+ }
614
+ },
615
+ events: {
616
+ async meterBrandChenge (index) {
617
+ if (isEmpty(this.show_data.f_meter_brand)) {
618
+ return
619
+ }
620
+ this.setLabelValue('气表型号', null)
621
+ let data = {
622
+ f_meter_brand: this.show_data.f_meter_brand,
623
+ f_orgid: this.$login.f.orgid
624
+ }
625
+ let http = new HttpResetClass()
626
+ let res = await http.load(
627
+ 'POST',
628
+ `rs/sql/getGasModel`,
629
+ {data: data},
630
+ {resolveMsg: null, rejectMsg: '气表型号查询失败!!!'}
631
+ )
632
+
633
+ this.setLabelOptions('气表型号', res.data)
634
+ },
635
+ // 单价失去焦点
636
+ async 'priceChange' (index) {
637
+ if (isEmpty(this.show_data.f_price)) {
638
+ return
639
+ }
640
+ let data = {
641
+ operator: '*',
642
+ num1: this.show_data.f_price,
643
+ num2: this.show_data.f_install_count
644
+ }
645
+ let http = new HttpResetClass()
646
+ let res = await http.load(
647
+ 'POST',
648
+ `rs/logic/compute`,
649
+ {data: data},
650
+ {resolveMsg: null, rejectMsg: '工程材料费计算失败!!!'}
651
+ )
652
+
653
+ this.setLabelValue('工程材料费', res.data)
654
+ },
655
+ // 安装户数失去焦点
656
+ 'installCountChange' (index) {
657
+ if (isEmpty(this.show_data.f_install_count)) {
658
+ return
659
+ }
660
+ if (Number(this.show_data.f_install_count) > Number(this.show_data.f_apply_count)) {
661
+ this.$showAlert('安装户数不能超过申请户数!!!', 'warning', 3000)
662
+ this.setLabelValue('安装户数', null)
663
+ return
664
+ }
665
+
666
+ if (Number(this.show_data.f_install_count) <= 0) {
667
+ this.$showAlert('至少有一户安装!!!', 'warning', 3000)
668
+ this.setLabelValue('安装户数', null)
669
+ return
670
+ }
671
+ },
672
+ // 街道失去焦点
673
+ async 'streetChange' (index) {
674
+ if (isEmpty(this.show_data.f_street)) {
675
+ return
676
+ }
677
+
678
+ let data = {
679
+ tablename: 't_area',
680
+ condition: `f_filialeid = '${this.$login.f.orgid}' and f_street = '${this.show_data.f_street}'`
681
+ }
682
+ let http = new HttpResetClass()
683
+ let res = await http.load(
684
+ 'POST',
685
+ `rs/sql/singleTable`,
686
+ {data: data},
687
+ {resolveMsg: null, rejectMsg: '小区查询失败!!!'}
688
+ )
689
+
690
+ this.setLabelOptions('小区', res.data.map(item => {
691
+ return {
692
+ label: item.f_residential_area,
693
+ value: item.f_residential_area
694
+ }
695
+ }))
696
+ },
697
+ // 省市区失去焦点
698
+ async 'pcdChange' (index) {
699
+ if (isEmpty(this.show_data.f_pcd)) {
700
+ return
701
+ }
702
+
703
+ let data = {
704
+ tablename: 't_street',
705
+ condition: `f_filialeid = '${this.$login.f.orgid}' and f_pcd = '${this.show_data.f_pcd}'`
706
+ }
707
+
708
+ let http = new HttpResetClass()
709
+ let res = await http.load(
710
+ 'POST',
711
+ `rs/sql/singleTable`,
712
+ {data: data},
713
+ {resolveMsg: null, rejectMsg: '街道查询失败!!!'}
714
+ )
715
+
716
+ this.setLabelOptions('街道', res.data.map(item => {
717
+ return {
718
+ label: item.f_street,
719
+ value: item.f_street
720
+ }
721
+ }))
722
+ },
723
+ // 报建性质失去焦点
724
+ 'applyNatureChange' (index) {
725
+ if (isEmpty(this.show_data.f_apply_nature)) {
726
+ return
727
+ }
728
+ if (this.show_data.f_apply_nature === '小区') {
729
+ this.showLabels('片区','省市区','街道','小区')
730
+ this.requiredLabels('片区','省市区','街道','小区')
731
+ } else {
732
+ this.hideLabels('片区','省市区','街道','小区')
733
+ this.electiveLabels('片区','省市区','街道','小区')
734
+ }
735
+ },
736
+ // ===========================================
737
+ // 检查重复
738
+ 'checkRepeat' (index) {
739
+ this.checkDuplicate(index)
740
+ },
741
+ async 'button'() {
742
+ if (this.show_data.button.before) {
743
+ await this[this.show_data.button.before]()
744
+ }
745
+ // 点击重置按钮就重置数据
746
+ if (this.show_data.button.button_name === '重置') {
747
+ this.$dispatch('breakControl', this.selectdata)
748
+ return
749
+ }
750
+
751
+ this.show_data.user = this.$login.f
752
+ this.show_data.start_activity = this.$workflow_vue.start_activity
753
+ this.show_data.xmlfilename = this.$workflow_vue.workflow_xmlfilename
754
+
755
+ let res = await this.$resetpost(
756
+ `rs/logic/ApplyProductService`,
757
+ {data: this.show_data},
758
+ {resolveMsg: null, rejectMsg: '数据保存失败'}
759
+ )
760
+
761
+ if (this.show_data.button.after) {
762
+ this[this.show_data.button.after]()
763
+ }
764
+ this.$dispatch('loadPage')
765
+ },
766
+ // 失去焦点出触发事件
767
+ 'onchange' (index) {
768
+ },
769
+ selectSearch (val, index) {},
770
+ 'onblur' (index) {},
771
+ 'oninput' (index) {},
772
+ 'initializtionView' () {},
773
+ async 'onchangeModal' (index, fieldIndex) {
774
+ },
775
+ async 'onblurModal' (index, fieldIndex) {
776
+
777
+ },
778
+ async 'oninputModal' (index, fieldIndex) {
779
+
780
+ },
781
+ async 'onetomanydelete' (index, rowIndex) {
782
+
783
+ let http = new HttpResetClass()
784
+
785
+ let res = await http.load(
786
+ 'DELETE',
787
+ `rs/entity/${this.show_data.onetomany[index].tables[0]}/${this.show_data.onetomany[index].rows[rowIndex].id}`,
788
+ null,
789
+ {resolveMsg: null, rejectMsg: '删除失败!!!'}
790
+ )
791
+
792
+ res = await this.$resetpost(
793
+ 'rs/entity/t_apply',
794
+ this.show_data
795
+ )
796
+
797
+ this.$dispatch('breakControl', this.show_data)
798
+ },
799
+ async 'onetomanyupdate' (index, rowIndex) {
800
+ let data = this.show_data.onetomany[index].rows[rowIndex]
801
+
802
+ this.show_data.onetomany[index].fields.forEach(item => {
803
+ data[item.field] = item.value
804
+ })
805
+ let res = await this.$resetpost(
806
+ `rs/entity/${this.show_data.onetomany[index].tables[0]}`,
807
+ data
808
+ )
809
+
810
+ res = await this.$resetpost(
811
+ 'rs/entity/t_apply',
812
+ this.show_data
813
+ )
814
+
815
+ this.$dispatch('breakControl', this.show_data)
816
+ },
817
+ async 'onetomanyadd' (index) {
818
+ let data = {
819
+ f_process_id : this.show_data.f_process_id,
820
+ f_operator_id: this.$login.f.id,
821
+ f_operator: this.$login.f.name,
822
+ f_operation_date: new Date().Format('yyyy-MM-dd HH:mm:ss'),
823
+ f_orgid: this.$login.f.orgid,
824
+ f_orgname: this.$login.f.orgs
825
+ }
826
+ this.show_data.onetomany[index].fields.forEach(item => {
827
+ data[item.field] = item.value
828
+ })
829
+ let res = await this.$resetpost(
830
+ `rs/entity/${this.show_data.onetomany[index].tables[0]}`,
831
+ data
832
+ )
833
+
834
+ res = await this.$resetpost(
835
+ 'rs/entity/t_apply',
836
+ this.show_data
837
+ )
838
+
839
+ this.$dispatch('breakControl', this.show_data)
840
+ },
841
+ async 'importEvent' (index, table, configName, filepath) {
842
+ let data = {
843
+ selectdata: this.show_data,
844
+ table: table,
845
+ filepath: filepath,
846
+ configName: configName,
847
+ user: this.$login.f
848
+ }
849
+
850
+ let res = await this.$resetpost(
851
+ `rs/logic/importEvent`,
852
+ data
853
+ )
854
+
855
+ this.$dispatch('breakControl', this.show_data)
856
+ },
857
+ 'onbutchange' (index) {
858
+
859
+ },
860
+ 'onbutblur' (index) {
861
+
862
+ },
863
+ 'onbutinput' (index) {
864
+
865
+ }
866
+ },
867
+ watch: {
868
+ }
869
+ }
870
+ </script>
871
+ <style scoped>
872
+ /*清除model中的浮动*/
873
+ .clearfix:after,.clearfix:before{
874
+ display: table;
875
+ }
876
+ .clearfix:after{
877
+ clear: both;
878
+ }
879
+ </style>