apply-clients 7.1.36-yuchuan-2 → 7.1.36-yuchuan-3

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 (61) hide show
  1. package/build/dev-server.js +7 -3
  2. package/package.json +3 -3
  3. package/src/AndroidApp.vue +35 -35
  4. package/src/apply.js +12 -1
  5. package/src/applyAndroid.js +87 -83
  6. package/src/components/android/AppUpload.vue +15 -0
  7. package/src/components/android/Ignition/VentilationIgnition.vue +1 -1
  8. package/src/components/android/Process/AppExplorationUser.vue +2 -2
  9. package/src/components/android/Process/AppServiceControl.vue +1410 -1397
  10. package/src/components/android/Supervisory/AppProcessSupervisory.vue +334 -334
  11. package/src/components/android/Task/Build/BuildTsak.vue +7 -4
  12. package/src/components/android/Task/GuanXianJianShe/AppExplorationGuanXian.vue +317 -432
  13. package/src/components/android/Task/GuanXianJianShe/AppGuanXianCaiLiao.vue +237 -0
  14. package/src/components/android/Task/ShenHe/BuZhangShenHe.vue +64 -64
  15. package/src/components/android/Task/ShenHe/JingLiShenHe.vue +64 -64
  16. package/src/components/android/Task/ShiGongXinXi/AppShowBuildUser.vue +11 -7
  17. package/src/components/android/Task/UpBuild/UpBuildDui.vue +5 -2
  18. package/src/components/android/Task/UpBuild/UpBuildTsak.vue +5 -2
  19. package/src/components/android/Task/UpBuild/UpJianLi.vue +98 -98
  20. package/src/components/product/ApplyCharge/ApplyChargeList.vue +943 -606
  21. package/src/components/product/ApplyGaiXianCharge/ApplyGaiXianChargeList.vue +8 -7
  22. package/src/components/product/ApplyGuanXian/GuanXianCaiLiao.vue +236 -235
  23. package/src/components/product/ApplyGuanXian/GuanXianExplorationSelect.vue +324 -323
  24. package/src/components/product/ChongZheng/ApplyChongZhengList.vue +10 -9
  25. package/src/components/product/Function/InstallInfoSelect.vue +371 -370
  26. package/src/components/product/Function/Service/FunctionServiceControl.vue +475 -475
  27. package/src/components/product/Ignition/IgnitionList.vue +236 -236
  28. package/src/components/product/Ignition/IgnitionListManage.vue +403 -204
  29. package/src/components/product/Ignition/IgnitionRecord.vue +14 -13
  30. package/src/components/product/List/ShowAllActivity.vue +455 -0
  31. package/src/components/product/List/ShowDevices.vue +279 -279
  32. package/src/components/product/Print/BuildOrder/buildOrderList.vue +9 -8
  33. package/src/components/product/Print/BuildOrder/printBuildOrder.vue +6 -0
  34. package/src/components/product/Process/ExplorationSelect.vue +591 -581
  35. package/src/components/product/Process/ExplorationUser.vue +158 -158
  36. package/src/components/product/Process/New1ExplorationUser.vue +201 -0
  37. package/src/components/product/Process/New2ExplorationUser.vue +163 -0
  38. package/src/components/product/Process/NewExplorationSelect.vue +586 -0
  39. package/src/components/product/Process/NewExplorationUser.vue +219 -184
  40. package/src/components/product/Process/Processes/ApplyChaiChuInfo.vue +587 -587
  41. package/src/components/product/Process/Processes/InstallationDetails.vue +80 -7
  42. package/src/components/product/Process/Processes/Print/printPaymentApproval.vue +224 -224
  43. package/src/components/product/Process/Processes/newDevicesManagement.vue +26 -1
  44. package/src/components/product/Process/Processes/newInstallationDetails.vue +1 -36
  45. package/src/components/product/Process/Processes/selectOldUserinfo.vue +241 -241
  46. package/src/components/product/Process/Service/ServiceControl.vue +2166 -2162
  47. package/src/components/product/Report/ReportItems.vue +85 -79
  48. package/src/components/product/Report/apply-stair-kaifa.vue +0 -1
  49. package/src/components/product/Report/gongchengbu.vue +199 -0
  50. package/src/components/product/ServiceView.vue +644 -644
  51. package/src/components/product/Stop/StopApplyList.vue +8 -8
  52. package/src/components/product/Supervisory/Service/SupervisoryServiceControl.vue +594 -594
  53. package/src/components/product/Supervisory/SupervisoryList.vue +539 -537
  54. package/src/components/product/Supervisory/YiBanSupervisoryControl.vue +114 -0
  55. package/src/components/product/Supervisory/YiBanSupervisoryList.vue +541 -0
  56. package/src/main.js +27 -27
  57. package/dist-android.7z +0 -0
  58. package/dist.7z +0 -0
  59. package/rebel.xml +0 -16
  60. package/src/components/product/Process/Processes/addressAndUserinfoManagement.vue +0 -207
  61. package/yarn-error.log +0 -9976
@@ -1,475 +1,475 @@
1
- <template>
2
- <service-view v-ref:serviceview :data="show_data" v-if="showview"></service-view>
3
- </template>
4
- <script>
5
- import {HttpResetClass} from 'vue-client'
6
- import Vue from 'vue'
7
- export default {
8
- title: '报建功能业务控制层',
9
- props: ['selectdata'],
10
- data () {
11
- return {
12
- show_data: null, // 给通用页面显示的数据
13
- showview: false // 控制通用页面
14
- }
15
- },
16
- ready () {
17
- this.refurbish()
18
- },
19
- methods: {
20
- async refurbish () {
21
- // fields 字段填充值
22
- for (const item of this.selectdata.fields) {
23
- if (!item.value) {
24
- item.value = null
25
- }
26
-
27
- if (!item.value && (item.default || item.default === 0) && item.type !== 'datepicker') {
28
- if (item.eval) {
29
- item.value = eval(item.default)
30
- } else {
31
- item.value = item.default
32
- }
33
- }
34
-
35
- if (this.selectdata[item.field]) {
36
- // 将json字符串格式化赋值给value
37
- if (String(this.selectdata[item.field]).startsWith("{")) {
38
- item.value = JSON.parse(this.selectdata[item.field])
39
- } else {
40
- item.value = this.selectdata[item.field]
41
- }
42
- }
43
- if (this.selectdata[item.field] === 0) {
44
- item.value = 0
45
- }
46
-
47
- // datepicker
48
- if (item.type === 'datepicker' && !item.value && item.default) {
49
- item.value = new Date().Format(`${item.format ? item.format : 'yyyy-MM-dd HH:mm:ss'}`)
50
- }
51
-
52
- // 如果配置类型为select,优先从参数列表获取options
53
- if (item.type === 'select' || item.type === 'checkbox') {
54
- if (item.param) {
55
- let temp = this.$appdata.getParam(item.label)
56
-
57
- if (temp && temp.length > 0) {
58
- item.options = temp
59
- }
60
-
61
- if (item.paramLabel) {
62
- temp = this.$appdata.getParam(item.paramLabel)
63
- if (temp && temp.length > 0) {
64
- item.options = temp
65
- }
66
- }
67
- }
68
-
69
- if (item.ready) {
70
- item.options = await this[item.ready]()
71
- }
72
- }
73
-
74
-
75
- if (item.type === 'checkbox') {
76
- if (this.selectdata[item.field]) {
77
- item.value = JSON.parse(this.selectdata[item.field])
78
- } else {
79
- item.value = []
80
- }
81
- }
82
- }
83
-
84
- // 控制组件
85
- if (this.selectdata.components) {
86
- this.selectdata.components.forEach(item => {
87
- item.mark = 2
88
- })
89
- }
90
-
91
- // 初始化onetomany
92
- if (this.selectdata.onetomany) {
93
- for (const item of this.selectdata.onetomany) {
94
- let res = null
95
- if (item.queryEvent) {
96
- res = this[item.queryEvent]()
97
- } else {
98
- let data = {
99
- tablename: item.tables[0],
100
- condition: `f_process_id='${this.selectdata.f_process_id}'`
101
- }
102
- res = await this.$resetpost(
103
- 'rs/sql/applySingleTable',
104
- {data: data},
105
- {resolveMsg: null, rejectMsg: 'onetomany查询失败'}
106
- )
107
- }
108
-
109
- item.rows = res.data
110
-
111
- // 初始化onetomany中的fields
112
- for (const field of item.fields) {
113
- if (!field.value) {
114
- if (field.value !== 0) {
115
- field.value = null
116
- }
117
- }
118
-
119
- if (field.default || field.default === 0) {
120
- field.value = field.default
121
- }
122
-
123
- // datepicker
124
- if (field.type === 'datepicker' && !field.value && field.default) {
125
- field.value = new Date().Format(`${field.format ? field.format : 'yyyy-MM-dd HH:mm:ss'}`)
126
- }
127
-
128
- if (field.type === 'select') {
129
- let temp = this.$appdata.getParam(field.label)
130
-
131
- if (temp && temp.length > 0) {
132
- field.options = temp
133
- }
134
-
135
- if (field.paramLabel) {
136
- temp = this.$appdata.getParam(field.paramLabel)
137
- if (temp && temp.length > 0) {
138
- item.options = temp
139
- }
140
- }
141
- }
142
- }
143
- }
144
- }
145
-
146
- // 消除双向绑定,避免子组件(显示层)数据更改,父组件(控制层)也更改
147
- let temp = JSON.parse(JSON.stringify(this.selectdata))
148
-
149
- this.show_data = temp
150
- this.$nextTick(() => {
151
- this.showview = true
152
- })
153
- },
154
- // 金额转大写
155
- smalltoBIG(n) {
156
- let fraction = ['角', '分'];
157
- let digit = ['零', '壹', '贰', '叁', '肆', '伍', '陆', '柒', '捌', '玖'];
158
- let unit = [['元', '万', '亿'], ['', '拾', '佰', '仟']];
159
- let head = n < 0 ? '欠' : '';
160
- n = Math.abs(n);
161
-
162
- let s = '';
163
-
164
- for (var i = 0; i < fraction.length; i++) {
165
- s += (digit[Math.floor(n * 10 * Math.pow(10, i)) % 10] + fraction[i]).replace(/零./, '');
166
- }
167
- s = s || '整';
168
- n = Math.floor(n);
169
-
170
- for (var i = 0; i < unit[0].length && n > 0; i++) {
171
- let p = '';
172
- for (var j = 0; j < unit[1].length && n > 0; j++) {
173
- p = digit[n % 10] + unit[1][j] + p;
174
- n = Math.floor(n / 10);
175
- }
176
- s = p.replace(/(零.)*零$/, '').replace(/^$/, '零') + unit[0][i] + s;
177
- }
178
- return head + s.replace(/(零.)*零元/, '元').replace(/(零.)+/g, '零').replace(/^整$/, '零元整')
179
- },
180
- getLableValue(label) {
181
- for (const item of this.show_data.fields) {
182
- if (item.label === label && item.type !== 'number') {
183
- return item.value || ''
184
- }
185
- if (item.label === label && item.type === 'number') {
186
- return item.value || 0
187
- }
188
- }
189
- },
190
- getLableOptions(label) {
191
- for (const item of this.show_data.fields) {
192
- if (item.label === label) {
193
- return item.options
194
- }
195
- }
196
- },
197
- setLabelValue(label, value) {
198
- for (const item of this.show_data.fields) {
199
- if (item.label === label) {
200
- item.value = value
201
- this.show_data[item.field] = value
202
- }
203
- }
204
- },
205
- setLabelOptions(label, options) {
206
- for (const item of this.show_data.fields) {
207
- if (item.label === label) {
208
- item.options = options
209
- }
210
- }
211
- },
212
- showLabels(...labels) {
213
- for (const item of this.show_data.fields) {
214
- if (labels.includes(item.label)) {
215
- item.hidden = false
216
- }
217
- }
218
- },
219
- hideLabels(...labels) {
220
- for (const item of this.show_data.fields) {
221
- if (labels.includes(item.label)) {
222
- item.hidden = true
223
- }
224
- }
225
- },
226
- showButtons(...buttons) {
227
- for (const item of this.show_data.buttons) {
228
- if (buttons.includes(item.button_name)) {
229
- item.hidden = false
230
- }
231
- }
232
- },
233
- hideButtons(...buttons) {
234
- for (const item of this.show_data.buttons) {
235
- if (buttons.includes(item.button_name)) {
236
- item.hidden = true
237
- }
238
- }
239
- },
240
- requiredLabels(...labels) {
241
- for (const item of this.show_data.fields) {
242
- if (labels.includes(item.label)) {
243
- item.required = true
244
- }
245
- }
246
- },
247
- electiveLabels(...labels) {
248
- for (const item of this.show_data.fields) {
249
- if (labels.includes(item.label)) {
250
- item.required = false
251
- }
252
- }
253
- },
254
- readonlyLabels(...labels) {
255
- for (const item of this.show_data.fields) {
256
- if (labels.includes(item.label)) {
257
- item.readonly = true
258
- item.disabled = true
259
- }
260
- }
261
- },
262
- readwriteLabels(...labels) {
263
- for (const item of this.show_data.fields) {
264
- if (labels.includes(item.label)) {
265
- item.readonly = false
266
- item.disabled = false
267
- }
268
- }
269
- },
270
- disabledButtons(...buttons) {
271
- for (const item of this.show_data.buttons) {
272
- if (buttons.includes(item.button_name)) {
273
- item.disabled = true
274
- }
275
- }
276
- },
277
- enableButtons(...buttons) {
278
- for (const item of this.show_data.buttons) {
279
- if (buttons.includes(item.button_name)) {
280
- item.disabled = false
281
- }
282
- }
283
- },
284
- async checkDuplicate(index) {
285
- let http = new HttpResetClass()
286
- let data = {
287
- tablename: 't_apply',
288
- condition: `${this.show_data.fields[index].field} = '${this.show_data.fields[index].value}'`
289
- }
290
- let res = await http.load('POST', 'rs/sql/applySingleTable', {data: data}, {
291
- resolveMsg: null,
292
- rejectMsg: `${this.show_data.fields[index].label}查询失败`
293
- })
294
- if (res.data.length > 0) {
295
- this.show_data.fields[index].value = null
296
- this.$showAlert(`${this.show_data.fields[index].label}已存在!!!`, 'warning', 3000)
297
- }
298
- }
299
- },
300
- events: {
301
- async 'stopApply' () {
302
-
303
- let data = {
304
- apply: this.show_data,
305
- user: this.$login.f
306
- }
307
-
308
- let res = await this.$resetpost(
309
- `rs/logic/stopApply`,
310
- {data: data},
311
- {resolveMsg: null, rejectMsg: '终止报建失败!!!'}
312
- )
313
-
314
- this.$dispatch('loadPage')
315
- },
316
- async 'pauseApply' () {
317
-
318
- let data = {
319
- apply: this.show_data,
320
- user: this.$login.f
321
- }
322
-
323
- let res = await this.$resetpost(
324
- `rs/logic/pauseApply`,
325
- {data: data},
326
- {resolveMsg: null, rejectMsg: '暂停报建失败!!!'}
327
- )
328
-
329
- this.$dispatch('loadPage')
330
- },
331
- async 'modifyInfo'() {
332
- if(this.selectdata.title === '费用修改'){
333
- let data = {
334
- tablename: 't_charge_record',
335
- condition: `f_process_id='${this.selectdata.f_process_id}'`
336
- }
337
- res = await this.$resetpost(
338
- 'rs/sql/applySingleTable',
339
- {data: data},
340
- {resolveMsg: null, rejectMsg: '收费信息查看'}
341
- )
342
- if (res.data.length > 0){
343
- this.$showMessage('用户已缴费,无法修改!!!', ['confirm']).then((res) => {
344
- if (res === 'confirm') {
345
- this.$dispatch('loadPage')
346
- }
347
- })
348
- throw '用户已缴费,无法修改!!!'
349
- }
350
- }
351
- console.log("保存数据")
352
- let res = await this.$resetpost(
353
- `rs/entity/t_apply`,
354
- this.show_data,
355
- {resolveMsg: null, rejectMsg: '数据保存失败!!!'}
356
- )
357
-
358
- this.$dispatch('loadPage')
359
- },
360
- //身份证号码校验
361
- 'checkIdnumber' (index) {
362
- if(this.show_data.f_credentials === '身份证'){
363
- var verify = /^[1-9]\d{5}(18|19|20|21)\d{2}((0[1-9])|(1[0-2]))(([0-2][1-9])|10|20|30|31)\d{3}[0-9Xx]$/
364
- if (!verify.test(this.show_data.fields[index].value)){
365
- this.show_data.fields[index].value = null
366
- this.$showAlert('身份证号码格式错误请重新输入!!!', 'warning', 3000)
367
- }
368
- }
369
- },
370
- //电话号码校验
371
- 'checkPhone' (index) {
372
- var verify = /^([1][0-9]{10})$/
373
- if (!verify.test(this.show_data.fields[index].value)){
374
- this.show_data.fields[index].value = null
375
- this.$showAlert('电话号码格式错误请重新输入!!!', 'warning', 3000)
376
- }
377
- },
378
- 'applyPaperChange' (index) {
379
- console.log("测试是否进入")
380
- if (this.show_data.f_paper_type === '专票') {
381
- this.requiredLabels('购货单位名称','购货单位识别号', '购货单位银行账号', '购货单位地址电话')
382
- }else {
383
- this.electiveLabels( '购货单位识别号', '购货单位银行账号', '购货单位地址电话')
384
- }
385
- },
386
- // 获取view层button事件
387
- async 'button' (){
388
- console.log("保存数据")
389
- let res = await this.$resetpost(
390
- `rs/entity/t_apply`,
391
- this.show_data,
392
- {resolveMsg: null, rejectMsg: '数据保存失败!!!'}
393
- )
394
-
395
- this.$dispatch('loadPage')
396
- },
397
- // 失去焦点出触发事件
398
- 'onchange' (index) {
399
- },
400
- 'onblur' (index) {},
401
- 'oninput' (index) {},
402
- 'initializtionView' () {},
403
- async 'onchangeModal' (index, fieldIndex) {
404
- },
405
- async 'onblurModal' (index, fieldIndex) {
406
-
407
- },
408
- async 'oninputModal' (index, fieldIndex) {
409
-
410
- },
411
- async 'onetomanydelete' (index, rowIndex) {
412
-
413
- let http = new HttpResetClass()
414
-
415
- let res = await http.load(
416
- 'DELETE',
417
- `rs/entity/${this.show_data.onetomany[index].tables[0]}/${this.show_data.onetomany[index].rows[rowIndex].id}`,
418
- null,
419
- {resolveMsg: null, rejectMsg: '删除失败!!!'}
420
- )
421
-
422
- res = await this.$resetpost(
423
- 'rs/entity/t_apply',
424
- this.show_data
425
- )
426
-
427
- this.$dispatch('breakControl', this.show_data)
428
- },
429
- async 'onetomanyupdate' (index, rowIndex) {
430
- let data = this.show_data.onetomany[index].rows[rowIndex]
431
-
432
- this.show_data.onetomany[index].fields.forEach(item => {
433
- data[item.field] = item.value
434
- })
435
- let res = await this.$resetpost(
436
- `rs/entity/${this.show_data.onetomany[index].tables[0]}`,
437
- data
438
- )
439
-
440
- res = await this.$resetpost(
441
- 'rs/entity/t_apply',
442
- this.show_data
443
- )
444
-
445
- this.$dispatch('breakControl', this.show_data)
446
- },
447
- async 'onetomanyadd' (index) {
448
- let data = {
449
- f_process_id : this.show_data.f_process_id,
450
- f_operator_id: this.$login.f.id,
451
- f_operator: this.$login.f.name,
452
- f_operation_date: new Date().Format('yyyy-MM-dd HH:mm:ss'),
453
- f_orgid: this.$login.f.orgid,
454
- f_orgname: this.$login.f.orgs
455
- }
456
- this.show_data.onetomany[index].fields.forEach(item => {
457
- data[item.field] = item.value
458
- })
459
- let res = await this.$resetpost(
460
- `rs/entity/${this.show_data.onetomany[index].tables[0]}`,
461
- data
462
- )
463
-
464
- res = await this.$resetpost(
465
- 'rs/entity/t_apply',
466
- this.show_data
467
- )
468
-
469
- this.$dispatch('breakControl', this.show_data)
470
- }
471
- },
472
- watch:{
473
- }
474
- }
475
- </script>
1
+ <template>
2
+ <service-view v-ref:serviceview :data="show_data" v-if="showview"></service-view>
3
+ </template>
4
+ <script>
5
+ import {HttpResetClass} from 'vue-client'
6
+ import Vue from 'vue'
7
+ export default {
8
+ title: '报建功能业务控制层',
9
+ props: ['selectdata'],
10
+ data () {
11
+ return {
12
+ show_data: null, // 给通用页面显示的数据
13
+ showview: false // 控制通用页面
14
+ }
15
+ },
16
+ ready () {
17
+ this.refurbish()
18
+ },
19
+ methods: {
20
+ async refurbish () {
21
+ // fields 字段填充值
22
+ for (const item of this.selectdata.fields) {
23
+ if (!item.value) {
24
+ item.value = null
25
+ }
26
+
27
+ if (!item.value && (item.default || item.default === 0) && item.type !== 'datepicker') {
28
+ if (item.eval) {
29
+ item.value = eval(item.default)
30
+ } else {
31
+ item.value = item.default
32
+ }
33
+ }
34
+
35
+ if (this.selectdata[item.field]) {
36
+ // 将json字符串格式化赋值给value
37
+ if (String(this.selectdata[item.field]).startsWith("{")) {
38
+ item.value = JSON.parse(this.selectdata[item.field])
39
+ } else {
40
+ item.value = this.selectdata[item.field]
41
+ }
42
+ }
43
+ if (this.selectdata[item.field] === 0) {
44
+ item.value = 0
45
+ }
46
+
47
+ // datepicker
48
+ if (item.type === 'datepicker' && !item.value && item.default) {
49
+ item.value = new Date().Format(`${item.format ? item.format : 'yyyy-MM-dd HH:mm:ss'}`)
50
+ }
51
+
52
+ // 如果配置类型为select,优先从参数列表获取options
53
+ if (item.type === 'select' || item.type === 'checkbox') {
54
+ if (item.param) {
55
+ let temp = this.$appdata.getParam(item.label)
56
+
57
+ if (temp && temp.length > 0) {
58
+ item.options = temp
59
+ }
60
+
61
+ if (item.paramLabel) {
62
+ temp = this.$appdata.getParam(item.paramLabel)
63
+ if (temp && temp.length > 0) {
64
+ item.options = temp
65
+ }
66
+ }
67
+ }
68
+
69
+ if (item.ready) {
70
+ item.options = await this[item.ready]()
71
+ }
72
+ }
73
+
74
+
75
+ if (item.type === 'checkbox') {
76
+ if (this.selectdata[item.field]) {
77
+ item.value = JSON.parse(this.selectdata[item.field])
78
+ } else {
79
+ item.value = []
80
+ }
81
+ }
82
+ }
83
+
84
+ // 控制组件
85
+ if (this.selectdata.components) {
86
+ this.selectdata.components.forEach(item => {
87
+ item.mark = 2
88
+ })
89
+ }
90
+
91
+ // 初始化onetomany
92
+ if (this.selectdata.onetomany) {
93
+ for (const item of this.selectdata.onetomany) {
94
+ let res = null
95
+ if (item.queryEvent) {
96
+ res = this[item.queryEvent]()
97
+ } else {
98
+ let data = {
99
+ tablename: item.tables[0],
100
+ condition: `f_process_id='${this.selectdata.f_process_id}'`
101
+ }
102
+ res = await this.$resetpost(
103
+ 'rs/sql/applySingleTable',
104
+ {data: data},
105
+ {resolveMsg: null, rejectMsg: 'onetomany查询失败'}
106
+ )
107
+ }
108
+
109
+ item.rows = res.data
110
+
111
+ // 初始化onetomany中的fields
112
+ for (const field of item.fields) {
113
+ if (!field.value) {
114
+ if (field.value !== 0) {
115
+ field.value = null
116
+ }
117
+ }
118
+
119
+ if (field.default || field.default === 0) {
120
+ field.value = field.default
121
+ }
122
+
123
+ // datepicker
124
+ if (field.type === 'datepicker' && !field.value && field.default) {
125
+ field.value = new Date().Format(`${field.format ? field.format : 'yyyy-MM-dd HH:mm:ss'}`)
126
+ }
127
+
128
+ if (field.type === 'select') {
129
+ let temp = this.$appdata.getParam(field.label)
130
+
131
+ if (temp && temp.length > 0) {
132
+ field.options = temp
133
+ }
134
+
135
+ if (field.paramLabel) {
136
+ temp = this.$appdata.getParam(field.paramLabel)
137
+ if (temp && temp.length > 0) {
138
+ item.options = temp
139
+ }
140
+ }
141
+ }
142
+ }
143
+ }
144
+ }
145
+
146
+ // 消除双向绑定,避免子组件(显示层)数据更改,父组件(控制层)也更改
147
+ let temp = JSON.parse(JSON.stringify(this.selectdata))
148
+
149
+ this.show_data = temp
150
+ this.$nextTick(() => {
151
+ this.showview = true
152
+ })
153
+ },
154
+ // 金额转大写
155
+ smalltoBIG(n) {
156
+ let fraction = ['角', '分'];
157
+ let digit = ['零', '壹', '贰', '叁', '肆', '伍', '陆', '柒', '捌', '玖'];
158
+ let unit = [['元', '万', '亿'], ['', '拾', '佰', '仟']];
159
+ let head = n < 0 ? '欠' : '';
160
+ n = Math.abs(n);
161
+
162
+ let s = '';
163
+
164
+ for (var i = 0; i < fraction.length; i++) {
165
+ s += (digit[Math.floor(n * 10 * Math.pow(10, i)) % 10] + fraction[i]).replace(/零./, '');
166
+ }
167
+ s = s || '整';
168
+ n = Math.floor(n);
169
+
170
+ for (var i = 0; i < unit[0].length && n > 0; i++) {
171
+ let p = '';
172
+ for (var j = 0; j < unit[1].length && n > 0; j++) {
173
+ p = digit[n % 10] + unit[1][j] + p;
174
+ n = Math.floor(n / 10);
175
+ }
176
+ s = p.replace(/(零.)*零$/, '').replace(/^$/, '零') + unit[0][i] + s;
177
+ }
178
+ return head + s.replace(/(零.)*零元/, '元').replace(/(零.)+/g, '零').replace(/^整$/, '零元整')
179
+ },
180
+ getLableValue(label) {
181
+ for (const item of this.show_data.fields) {
182
+ if (item.label === label && item.type !== 'number') {
183
+ return item.value || ''
184
+ }
185
+ if (item.label === label && item.type === 'number') {
186
+ return item.value || 0
187
+ }
188
+ }
189
+ },
190
+ getLableOptions(label) {
191
+ for (const item of this.show_data.fields) {
192
+ if (item.label === label) {
193
+ return item.options
194
+ }
195
+ }
196
+ },
197
+ setLabelValue(label, value) {
198
+ for (const item of this.show_data.fields) {
199
+ if (item.label === label) {
200
+ item.value = value
201
+ this.show_data[item.field] = value
202
+ }
203
+ }
204
+ },
205
+ setLabelOptions(label, options) {
206
+ for (const item of this.show_data.fields) {
207
+ if (item.label === label) {
208
+ item.options = options
209
+ }
210
+ }
211
+ },
212
+ showLabels(...labels) {
213
+ for (const item of this.show_data.fields) {
214
+ if (labels.includes(item.label)) {
215
+ item.hidden = false
216
+ }
217
+ }
218
+ },
219
+ hideLabels(...labels) {
220
+ for (const item of this.show_data.fields) {
221
+ if (labels.includes(item.label)) {
222
+ item.hidden = true
223
+ }
224
+ }
225
+ },
226
+ showButtons(...buttons) {
227
+ for (const item of this.show_data.buttons) {
228
+ if (buttons.includes(item.button_name)) {
229
+ item.hidden = false
230
+ }
231
+ }
232
+ },
233
+ hideButtons(...buttons) {
234
+ for (const item of this.show_data.buttons) {
235
+ if (buttons.includes(item.button_name)) {
236
+ item.hidden = true
237
+ }
238
+ }
239
+ },
240
+ requiredLabels(...labels) {
241
+ for (const item of this.show_data.fields) {
242
+ if (labels.includes(item.label)) {
243
+ item.required = true
244
+ }
245
+ }
246
+ },
247
+ electiveLabels(...labels) {
248
+ for (const item of this.show_data.fields) {
249
+ if (labels.includes(item.label)) {
250
+ item.required = false
251
+ }
252
+ }
253
+ },
254
+ readonlyLabels(...labels) {
255
+ for (const item of this.show_data.fields) {
256
+ if (labels.includes(item.label)) {
257
+ item.readonly = true
258
+ item.disabled = true
259
+ }
260
+ }
261
+ },
262
+ readwriteLabels(...labels) {
263
+ for (const item of this.show_data.fields) {
264
+ if (labels.includes(item.label)) {
265
+ item.readonly = false
266
+ item.disabled = false
267
+ }
268
+ }
269
+ },
270
+ disabledButtons(...buttons) {
271
+ for (const item of this.show_data.buttons) {
272
+ if (buttons.includes(item.button_name)) {
273
+ item.disabled = true
274
+ }
275
+ }
276
+ },
277
+ enableButtons(...buttons) {
278
+ for (const item of this.show_data.buttons) {
279
+ if (buttons.includes(item.button_name)) {
280
+ item.disabled = false
281
+ }
282
+ }
283
+ },
284
+ async checkDuplicate(index) {
285
+ let http = new HttpResetClass()
286
+ let data = {
287
+ tablename: 't_apply',
288
+ condition: `${this.show_data.fields[index].field} = '${this.show_data.fields[index].value}'`
289
+ }
290
+ let res = await http.load('POST', 'rs/sql/applySingleTable', {data: data}, {
291
+ resolveMsg: null,
292
+ rejectMsg: `${this.show_data.fields[index].label}查询失败`
293
+ })
294
+ if (res.data.length > 0) {
295
+ this.show_data.fields[index].value = null
296
+ this.$showAlert(`${this.show_data.fields[index].label}已存在!!!`, 'warning', 3000)
297
+ }
298
+ }
299
+ },
300
+ events: {
301
+ async 'stopApply' () {
302
+
303
+ let data = {
304
+ apply: this.show_data,
305
+ user: this.$login.f
306
+ }
307
+
308
+ let res = await this.$resetpost(
309
+ `rs/logic/stopApply`,
310
+ {data: data},
311
+ {resolveMsg: null, rejectMsg: '终止报建失败!!!'}
312
+ )
313
+
314
+ this.$dispatch('loadPage')
315
+ },
316
+ async 'pauseApply' () {
317
+
318
+ let data = {
319
+ apply: this.show_data,
320
+ user: this.$login.f
321
+ }
322
+
323
+ let res = await this.$resetpost(
324
+ `rs/logic/pauseApply`,
325
+ {data: data},
326
+ {resolveMsg: null, rejectMsg: '暂停报建失败!!!'}
327
+ )
328
+
329
+ this.$dispatch('loadPage')
330
+ },
331
+ async 'modifyInfo'() {
332
+ if(this.selectdata.title === '费用修改'){
333
+ let data = {
334
+ tablename: 't_charge_record',
335
+ condition: `f_process_id='${this.selectdata.f_process_id}'`
336
+ }
337
+ res = await this.$resetpost(
338
+ 'rs/sql/applySingleTable',
339
+ {data: data},
340
+ {resolveMsg: null, rejectMsg: '收费信息查看'}
341
+ )
342
+ if (res.data.length > 0){
343
+ this.$showMessage('用户已缴费,无法修改!!!', ['confirm']).then((res) => {
344
+ if (res === 'confirm') {
345
+ this.$dispatch('loadPage')
346
+ }
347
+ })
348
+ throw '用户已缴费,无法修改!!!'
349
+ }
350
+ }
351
+ console.log("保存数据")
352
+ let res = await this.$resetpost(
353
+ `rs/entity/t_apply`,
354
+ this.show_data,
355
+ {resolveMsg: null, rejectMsg: '数据保存失败!!!'}
356
+ )
357
+
358
+ this.$dispatch('loadPage')
359
+ },
360
+ //身份证号码校验
361
+ 'checkIdnumber' (index) {
362
+ if(this.show_data.f_credentials === '身份证'){
363
+ var verify = /^[1-9]\d{5}(18|19|20|21)\d{2}((0[1-9])|(1[0-2]))(([0-2][1-9])|10|20|30|31)\d{3}[0-9Xx]$/
364
+ if (!verify.test(this.show_data.fields[index].value)){
365
+ this.show_data.fields[index].value = null
366
+ this.$showAlert('身份证号码格式错误请重新输入!!!', 'warning', 3000)
367
+ }
368
+ }
369
+ },
370
+ //电话号码校验
371
+ 'checkPhone' (index) {
372
+ var verify = /^([1][0-9]{10})$/
373
+ if (!verify.test(this.show_data.fields[index].value)){
374
+ this.show_data.fields[index].value = null
375
+ this.$showAlert('电话号码格式错误请重新输入!!!', 'warning', 3000)
376
+ }
377
+ },
378
+ 'applyPaperChange' (index) {
379
+ console.log("测试是否进入")
380
+ if (this.show_data.f_paper_type === '专票') {
381
+ this.requiredLabels('购货单位名称','购货单位识别号', '购货单位银行账号', '购货单位地址电话')
382
+ }else {
383
+ this.electiveLabels( '购货单位识别号', '购货单位银行账号', '购货单位地址电话')
384
+ }
385
+ },
386
+ // 获取view层button事件
387
+ async 'button' (){
388
+ console.log("保存数据")
389
+ let res = await this.$resetpost(
390
+ `rs/entity/t_apply`,
391
+ this.show_data,
392
+ {resolveMsg: null, rejectMsg: '数据保存失败!!!'}
393
+ )
394
+
395
+ this.$dispatch('loadPage')
396
+ },
397
+ // 失去焦点出触发事件
398
+ 'onchange' (index) {
399
+ },
400
+ 'onblur' (index) {},
401
+ 'oninput' (index) {},
402
+ 'initializtionView' () {},
403
+ async 'onchangeModal' (index, fieldIndex) {
404
+ },
405
+ async 'onblurModal' (index, fieldIndex) {
406
+
407
+ },
408
+ async 'oninputModal' (index, fieldIndex) {
409
+
410
+ },
411
+ async 'onetomanydelete' (index, rowIndex) {
412
+
413
+ let http = new HttpResetClass()
414
+
415
+ let res = await http.load(
416
+ 'DELETE',
417
+ `rs/entity/${this.show_data.onetomany[index].tables[0]}/${this.show_data.onetomany[index].rows[rowIndex].id}`,
418
+ null,
419
+ {resolveMsg: null, rejectMsg: '删除失败!!!'}
420
+ )
421
+
422
+ res = await this.$resetpost(
423
+ 'rs/entity/t_apply',
424
+ this.show_data
425
+ )
426
+
427
+ this.$dispatch('breakControl', this.show_data)
428
+ },
429
+ async 'onetomanyupdate' (index, rowIndex) {
430
+ let data = this.show_data.onetomany[index].rows[rowIndex]
431
+
432
+ this.show_data.onetomany[index].fields.forEach(item => {
433
+ data[item.field] = item.value
434
+ })
435
+ let res = await this.$resetpost(
436
+ `rs/entity/${this.show_data.onetomany[index].tables[0]}`,
437
+ data
438
+ )
439
+
440
+ res = await this.$resetpost(
441
+ 'rs/entity/t_apply',
442
+ this.show_data
443
+ )
444
+
445
+ this.$dispatch('breakControl', this.show_data)
446
+ },
447
+ async 'onetomanyadd' (index) {
448
+ let data = {
449
+ f_process_id : this.show_data.f_process_id,
450
+ f_operator_id: this.$login.f.id,
451
+ f_operator: this.$login.f.name,
452
+ f_operation_date: new Date().Format('yyyy-MM-dd HH:mm:ss'),
453
+ f_orgid: this.$login.f.orgid,
454
+ f_orgname: this.$login.f.orgs
455
+ }
456
+ this.show_data.onetomany[index].fields.forEach(item => {
457
+ data[item.field] = item.value
458
+ })
459
+ let res = await this.$resetpost(
460
+ `rs/entity/${this.show_data.onetomany[index].tables[0]}`,
461
+ data
462
+ )
463
+
464
+ res = await this.$resetpost(
465
+ 'rs/entity/t_apply',
466
+ this.show_data
467
+ )
468
+
469
+ this.$dispatch('breakControl', this.show_data)
470
+ }
471
+ },
472
+ watch:{
473
+ }
474
+ }
475
+ </script>