apply-clients 3.4.1 → 3.4.2-FuGu-4

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 (83) hide show
  1. package/android.html +23 -23
  2. package/build/css-loaders.js +34 -0
  3. package/build/dev-android.js +101 -0
  4. package/build/dev-client.js +8 -0
  5. package/build/dev-server-app.js +76 -0
  6. package/build/dev-server.js +119 -0
  7. package/build/example-server.js +80 -0
  8. package/build/release.sh +28 -0
  9. package/build/utils.js +80 -0
  10. package/build/webpack.base.conf.js +85 -0
  11. package/build/webpack.baseandroid.conf.js +84 -0
  12. package/build/webpack.dev.conf.js +51 -0
  13. package/build/webpack.devandroid.conf.js +34 -0
  14. package/build/webpack.example.conf.js +49 -0
  15. package/build/webpack.prod.conf.js +60 -0
  16. package/build/webpack.prodandroid.conf.js +60 -0
  17. package/build/webpack.test.conf.js +31 -0
  18. package/dingding.html +23 -0
  19. package/index.html +33 -33
  20. package/package.json +2 -1
  21. package/src/AndroidApp.vue +35 -35
  22. package/src/DingDingApp.vue +51 -0
  23. package/src/android.js +21 -21
  24. package/src/apply.js +2 -8
  25. package/src/applyAndroid.js +2 -8
  26. package/src/applyDingDing.js +12 -0
  27. package/src/components/android/AppOnetomany.vue +301 -301
  28. package/src/components/android/AppServiceView.vue +566 -566
  29. package/src/components/android/AppSign.vue +142 -142
  30. package/src/components/android/AppTakePic.vue +143 -143
  31. package/src/components/android/Process/AppExplorationUser.vue +320 -320
  32. package/src/components/android/Process/AppServiceControl.vue +757 -757
  33. package/src/components/android/Process/Processes/AppInstallationDetails.vue +456 -456
  34. package/src/components/android/ProgressReport/ProgressReportDetail.vue +64 -64
  35. package/src/components/android/Supervisory/AppSupervisoryCart.vue +121 -121
  36. package/src/components/android/TaskGraph.vue +125 -125
  37. package/src/components/build/Install/ExplorationUser.vue +304 -0
  38. package/src/components/build/Install/Process/zhongran/ZR_Design.vue +537 -0
  39. package/src/components/product/{Process/Processes/Print → ApplyCharge}/printCharge.vue +2 -2
  40. package/src/components/product/Function/InstallFunction.vue +131 -125
  41. package/src/components/product/Function/InstallInfoSelect.vue +300 -292
  42. package/src/components/product/Function/Service/FunctionServiceControl.vue +420 -222
  43. package/src/components/product/Onetomany.vue +377 -377
  44. package/src/components/product/Process/ExplorationSelect.vue +11 -20
  45. package/src/components/product/Process/ExplorationUser.vue +138 -138
  46. package/src/components/product/Process/Processes/InstallationDetails.vue +592 -592
  47. package/src/components/product/Process/Processes/addressAndUserinfoManagement.vue +207 -207
  48. package/src/components/product/Process/Processes/chargeManagement.vue +23 -28
  49. package/src/components/product/Process/Service/ServiceControl.vue +50 -63
  50. package/src/components/product/Process/Service/ShowBackReason.vue +33 -33
  51. package/src/components/product/ServiceView.vue +631 -631
  52. package/src/components/product/Stop/StopApply.vue +105 -103
  53. package/src/components/product/Stop/StopApplyList.vue +269 -269
  54. package/src/components/product/Supervisory/Service/SupervisoryServiceControl.vue +186 -186
  55. package/src/components/product/Supervisory/SupervisoryControl.vue +100 -100
  56. package/src/components/product/Supervisory/SupervisoryList.vue +233 -233
  57. package/src/components/product/Supervisory/SupervisoryhCart.vue +14 -11
  58. package/src/components/product/VueUtils/ApplyUpload.vue +3 -3
  59. package/src/components/product/VueUtils/HighMeter.vue +208 -208
  60. package/src/dingding.js +20 -0
  61. package/src/expandcssAndroid.less +1034 -1034
  62. package/src/main.js +23 -23
  63. package/src/components/product/Function/StopApplyCrrdList.vue +0 -176
  64. package/src/components/product/Function/functions/ApplyRecordCancel.vue +0 -102
  65. package/src/components/product/Function/functions/StopInstall.vue +0 -106
  66. package/src/components/product/Process/Processes/Print/img/10101.png +0 -0
  67. package/src/components/product/Process/Processes/Print/img/1010109.png +0 -0
  68. package/src/components/product/Process/Processes/Print/img/1010110.png +0 -0
  69. package/src/components/product/Process/Processes/Print/img/1010111.png +0 -0
  70. package/src/components/product/Process/Processes/Print/img/1010112.png +0 -0
  71. package/src/filiale/yuchuan/android/Process/AppServiceControl.vue +0 -548
  72. package/src/filiale/yuchuan/android/Process/Processes/AppInstallationDetails.vue +0 -754
  73. package/src/filiale/yuchuan/android/Task/Survey/SurveyTsak.vue +0 -60
  74. package/src/filiale/yuchuan/android.js +0 -7
  75. package/src/filiale/yuchuan/pc/Order/OrderApply.vue +0 -528
  76. package/src/filiale/yuchuan/pc/Order/OrderApplyList.vue +0 -343
  77. package/src/filiale/yuchuan/pc/Process/ExplorationSelect.vue +0 -395
  78. package/src/filiale/yuchuan/pc/Process/ExplorationUser.vue +0 -147
  79. package/src/filiale/yuchuan/pc/Process/Processes/ApplyMapCom.vue +0 -66
  80. package/src/filiale/yuchuan/pc/Process/Processes/InstallationDetails.vue +0 -759
  81. package/src/filiale/yuchuan/pc/Process/Processes/chargeManagement.vue +0 -470
  82. package/src/filiale/yuchuan/pc/Process/Service/ServiceControl.vue +0 -879
  83. package/src/filiale/yuchuan/pc.js +0 -11
@@ -1,879 +0,0 @@
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>