apply-clients 3.4.2-FuGu-25 → 3.4.2-FuGu-28

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (72) hide show
  1. package/build/dev-server.js +2 -2
  2. package/package.json +2 -2
  3. package/src/apply.js +77 -77
  4. package/src/components/android/AppTakePic.vue +143 -143
  5. package/src/components/android/Process/AppExplorationUser.vue +301 -301
  6. package/src/components/android/Process/AppServiceControl.vue +46 -28
  7. package/src/components/android/Process/Processes/AppInstallationDetails.vue +10 -8
  8. package/src/components/product/Function/InstallInfoSelect.vue +300 -300
  9. package/src/components/product/Function/Service/FunctionServiceControl.vue +443 -443
  10. package/src/components/product/Process/ExplorationSelect.vue +386 -386
  11. package/src/components/product/Process/Print/dispatchlist.vue +139 -139
  12. package/src/components/product/Process/Print/printCharge.vue +142 -142
  13. package/src/components/product/Process/Processes/dispatchdetails.vue +123 -123
  14. package/src/components/product/Process/Service/ServiceControl.vue +15 -4
  15. package/src/components/product/Stop/StopApplyList.vue +269 -269
  16. package/src/components/product/Supervisory/Service/SupervisoryServiceControl.vue +193 -193
  17. package/src/components/product/Supervisory/SupervisoryControl.vue +110 -110
  18. package/src/components/product/Supervisory/SupervisoryList.vue +237 -237
  19. package/src/components/product/VueUtils/ApplyUpload.vue +273 -273
  20. package/src/dingding.js +20 -20
  21. package/dist-android/static/doc.jpg +0 -0
  22. package/dist-android/static/images/lefticon//345/215/241/346/234/215/345/212/241/347/256/241/347/220/206.png +0 -0
  23. package/dist-android/static/images/lefticon//345/221/274/345/217/253/347/263/273/347/273/237.png +0 -0
  24. package/dist-android/static/images/lefticon//345/224/256/346/260/224/346/224/266/350/264/271.png +0 -0
  25. package/dist-android/static/images/lefticon//345/233/276/345/261/2023/346/213/267/350/264/2354.png +0 -0
  26. package/dist-android/static/images/lefticon//345/233/276/345/261/202577.png +0 -0
  27. package/dist-android/static/images/lefticon//345/233/276/345/261/2028/346/213/267/350/264/23513.png +0 -0
  28. package/dist-android/static/images/lefticon//345/256/211/346/243/200/346/237/245/347/234/213.png +0 -0
  29. package/dist-android/static/images/lefticon//345/256/211/346/243/200/350/256/241/345/210/222.png +0 -0
  30. package/dist-android/static/images/lefticon//345/276/256/344/277/241/346/234/215/345/212/241.png +0 -0
  31. package/dist-android/static/images/lefticon//346/212/245/345/273/272/347/263/273/347/273/237.png +0 -0
  32. package/dist-android/static/images/lefticon//346/212/245/350/241/250/346/237/245/350/257/242.png +0 -0
  33. package/dist-android/static/images/lefticon//346/227/245/345/270/270/347/256/241/347/220/206.png +0 -0
  34. package/dist-android/static/images/lefticon//346/234/272/350/241/250/347/256/241/347/220/206.png +0 -0
  35. package/dist-android/static/images/lefticon//346/237/245/350/257/242/345/210/227/350/241/250.png +0 -0
  36. package/dist-android/static/images/lefticon//346/241/243/346/241/210/347/256/241/347/220/206.png +0 -0
  37. package/dist-android/static/images/lefticon//347/211/251/350/201/224/347/275/221/350/241/250.png +0 -0
  38. package/dist-android/static/images/lefticon//347/263/273/347/273/237/347/256/241/347/220/206.png +0 -0
  39. package/dist-android/static/images/lefticon//347/263/273/347/273/237/350/256/276/347/275/256.png +0 -0
  40. package/dist-android/static/images/lefticon//347/273/217/350/220/245/347/256/241/346/216/247.png +0 -0
  41. package/dist-android/static/images/lefticon//347/273/274/345/220/210/344/270/232/345/212/241.png +0 -0
  42. package/dist-android/static/images/lefticon//347/273/274/345/220/210/346/237/245/350/257/242.png +0 -0
  43. package/dist-android/static/images/lefticon//350/217/234/345/215/225/344/274/270/347/274/251.png +0 -0
  44. package/dist-android/static/images/lefticon//351/200/200/345/207/272/347/263/273/347/273/237.png +0 -0
  45. package/dist-android/static/imgerror.jpg +0 -0
  46. package/dist-android/static/newStyle/clear.png +0 -0
  47. package/dist-android/static/newStyle/fife.png +0 -0
  48. package/dist-android/static/newStyle/hidden.png +0 -0
  49. package/dist-android/static/newStyle/label-clear.png +0 -0
  50. package/dist-android/static/newStyle/left-img.png +0 -0
  51. package/dist-android/static/newStyle/list_ok.png +0 -0
  52. package/dist-android/static/newStyle/login-check.png +0 -0
  53. package/dist-android/static/newStyle/login-con.png +0 -0
  54. package/dist-android/static/newStyle/login-do.gif +0 -0
  55. package/dist-android/static/newStyle/login-f.png +0 -0
  56. package/dist-android/static/newStyle/login-info.png +0 -0
  57. package/dist-android/static/newStyle/login-left.png +0 -0
  58. package/dist-android/static/newStyle/login-org.png +0 -0
  59. package/dist-android/static/newStyle/login-pwd.png +0 -0
  60. package/dist-android/static/newStyle/login-user.png +0 -0
  61. package/dist-android/static/newStyle/loginbg.gif +0 -0
  62. package/dist-android/static/newStyle/loginbg1280.gif +0 -0
  63. package/dist-android/static/newStyle/loginbg1366.gif +0 -0
  64. package/dist-android/static/newStyle/setting.png +0 -0
  65. package/dist-android/static/newStyle/setting1.png +0 -0
  66. package/dist-android/static/newStyle/shirk.png +0 -0
  67. package/dist-android/static/newStyle/stretch_bottom.png +0 -0
  68. package/dist-android/static/newStyle/stretch_left.png +0 -0
  69. package/dist-android/static/newStyle/stretch_right.png +0 -0
  70. package/dist-android/static/newStyle/stretch_top.png +0 -0
  71. package/dist-android/static/newStyle/system-off.png +0 -0
  72. package/dist-android/static/pdf.jpg +0 -0
@@ -1,443 +1,443 @@
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/singleTable',
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/singleTable', {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
- // 获取view层button事件
332
- async 'button' (){
333
- if(this.show_data.f_contract_money < this.show_data.f_due_money){
334
- if(this.show_data.f_surplus_money >= (this.show_data.f_due_money - this.show_data.f_contract_money)){
335
- this.show_data.f_surplus_money = this.show_data.f_surplus_money - (this.show_data.f_due_money - this.show_data.f_contract_money)
336
- this.show_data.f_due_money = this.show_data.f_contract_money
337
- }else {
338
- this.$showMessage("未缴纳金额小于工程安装费减少量,请重新输入!")
339
- return
340
- }
341
- }else if (this.show_data.f_contract_money > this.show_data.f_due_money) {
342
- this.show_data.f_surplus_money = this.show_data.f_surplus_money + (this.show_data.f_contract_money - this.show_data.f_due_money)
343
- this.show_data.f_due_money = this.show_data.f_contract_money
344
- }
345
-
346
- let data = {
347
- apply: this.show_data
348
- }
349
-
350
- let res1 = await this.$resetpost(
351
- `rs/logic/countMoney`,
352
- {data: data},
353
- {resolveMsg: null, rejectMsg: null}
354
- )
355
- this.show_data.f_payment_ratio = res1.data
356
-
357
- let res = await this.$resetpost(
358
- `rs/entity/t_apply`,
359
- this.show_data,
360
- {resolveMsg: null, rejectMsg: '数据保存失败!!!'}
361
- )
362
-
363
- this.$dispatch('loadPage')
364
- },
365
- // 失去焦点出触发事件
366
- 'onchange' (index) {
367
- },
368
- 'onblur' (index) {},
369
- 'oninput' (index) {},
370
- 'initializtionView' () {},
371
- async 'onchangeModal' (index, fieldIndex) {
372
- },
373
- async 'onblurModal' (index, fieldIndex) {
374
-
375
- },
376
- async 'oninputModal' (index, fieldIndex) {
377
-
378
- },
379
- async 'onetomanydelete' (index, rowIndex) {
380
-
381
- let http = new HttpResetClass()
382
-
383
- let res = await http.load(
384
- 'DELETE',
385
- `rs/entity/${this.show_data.onetomany[index].tables[0]}/${this.show_data.onetomany[index].rows[rowIndex].id}`,
386
- null,
387
- {resolveMsg: null, rejectMsg: '删除失败!!!'}
388
- )
389
-
390
- res = await this.$resetpost(
391
- 'rs/entity/t_apply',
392
- this.show_data
393
- )
394
-
395
- this.$dispatch('breakControl', this.show_data)
396
- },
397
- async 'onetomanyupdate' (index, rowIndex) {
398
- let data = this.show_data.onetomany[index].rows[rowIndex]
399
-
400
- this.show_data.onetomany[index].fields.forEach(item => {
401
- data[item.field] = item.value
402
- })
403
- let res = await this.$resetpost(
404
- `rs/entity/${this.show_data.onetomany[index].tables[0]}`,
405
- data
406
- )
407
-
408
- res = await this.$resetpost(
409
- 'rs/entity/t_apply',
410
- this.show_data
411
- )
412
-
413
- this.$dispatch('breakControl', this.show_data)
414
- },
415
- async 'onetomanyadd' (index) {
416
- let data = {
417
- f_process_id : this.show_data.f_process_id,
418
- f_operator_id: this.$login.f.id,
419
- f_operator: this.$login.f.name,
420
- f_operation_date: new Date().Format('yyyy-MM-dd HH:mm:ss'),
421
- f_orgid: this.$login.f.orgid,
422
- f_orgname: this.$login.f.orgs
423
- }
424
- this.show_data.onetomany[index].fields.forEach(item => {
425
- data[item.field] = item.value
426
- })
427
- let res = await this.$resetpost(
428
- `rs/entity/${this.show_data.onetomany[index].tables[0]}`,
429
- data
430
- )
431
-
432
- res = await this.$resetpost(
433
- 'rs/entity/t_apply',
434
- this.show_data
435
- )
436
-
437
- this.$dispatch('breakControl', this.show_data)
438
- }
439
- },
440
- watch:{
441
- }
442
- }
443
- </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/singleTable',
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/singleTable', {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
+ // 获取view层button事件
332
+ async 'button' (){
333
+ if(this.show_data.f_contract_money < this.show_data.f_due_money){
334
+ if(this.show_data.f_surplus_money >= (this.show_data.f_due_money - this.show_data.f_contract_money)){
335
+ this.show_data.f_surplus_money = this.show_data.f_surplus_money - (this.show_data.f_due_money - this.show_data.f_contract_money)
336
+ this.show_data.f_due_money = this.show_data.f_contract_money
337
+ }else {
338
+ this.$showMessage("未缴纳金额小于工程安装费减少量,请重新输入!")
339
+ return
340
+ }
341
+ }else if (this.show_data.f_contract_money > this.show_data.f_due_money) {
342
+ this.show_data.f_surplus_money = this.show_data.f_surplus_money + (this.show_data.f_contract_money - this.show_data.f_due_money)
343
+ this.show_data.f_due_money = this.show_data.f_contract_money
344
+ }
345
+
346
+ let data = {
347
+ apply: this.show_data
348
+ }
349
+
350
+ let res1 = await this.$resetpost(
351
+ `rs/logic/countMoney`,
352
+ {data: data},
353
+ {resolveMsg: null, rejectMsg: null}
354
+ )
355
+ this.show_data.f_payment_ratio = res1.data
356
+
357
+ let res = await this.$resetpost(
358
+ `rs/entity/t_apply`,
359
+ this.show_data,
360
+ {resolveMsg: null, rejectMsg: '数据保存失败!!!'}
361
+ )
362
+
363
+ this.$dispatch('loadPage')
364
+ },
365
+ // 失去焦点出触发事件
366
+ 'onchange' (index) {
367
+ },
368
+ 'onblur' (index) {},
369
+ 'oninput' (index) {},
370
+ 'initializtionView' () {},
371
+ async 'onchangeModal' (index, fieldIndex) {
372
+ },
373
+ async 'onblurModal' (index, fieldIndex) {
374
+
375
+ },
376
+ async 'oninputModal' (index, fieldIndex) {
377
+
378
+ },
379
+ async 'onetomanydelete' (index, rowIndex) {
380
+
381
+ let http = new HttpResetClass()
382
+
383
+ let res = await http.load(
384
+ 'DELETE',
385
+ `rs/entity/${this.show_data.onetomany[index].tables[0]}/${this.show_data.onetomany[index].rows[rowIndex].id}`,
386
+ null,
387
+ {resolveMsg: null, rejectMsg: '删除失败!!!'}
388
+ )
389
+
390
+ res = await this.$resetpost(
391
+ 'rs/entity/t_apply',
392
+ this.show_data
393
+ )
394
+
395
+ this.$dispatch('breakControl', this.show_data)
396
+ },
397
+ async 'onetomanyupdate' (index, rowIndex) {
398
+ let data = this.show_data.onetomany[index].rows[rowIndex]
399
+
400
+ this.show_data.onetomany[index].fields.forEach(item => {
401
+ data[item.field] = item.value
402
+ })
403
+ let res = await this.$resetpost(
404
+ `rs/entity/${this.show_data.onetomany[index].tables[0]}`,
405
+ data
406
+ )
407
+
408
+ res = await this.$resetpost(
409
+ 'rs/entity/t_apply',
410
+ this.show_data
411
+ )
412
+
413
+ this.$dispatch('breakControl', this.show_data)
414
+ },
415
+ async 'onetomanyadd' (index) {
416
+ let data = {
417
+ f_process_id : this.show_data.f_process_id,
418
+ f_operator_id: this.$login.f.id,
419
+ f_operator: this.$login.f.name,
420
+ f_operation_date: new Date().Format('yyyy-MM-dd HH:mm:ss'),
421
+ f_orgid: this.$login.f.orgid,
422
+ f_orgname: this.$login.f.orgs
423
+ }
424
+ this.show_data.onetomany[index].fields.forEach(item => {
425
+ data[item.field] = item.value
426
+ })
427
+ let res = await this.$resetpost(
428
+ `rs/entity/${this.show_data.onetomany[index].tables[0]}`,
429
+ data
430
+ )
431
+
432
+ res = await this.$resetpost(
433
+ 'rs/entity/t_apply',
434
+ this.show_data
435
+ )
436
+
437
+ this.$dispatch('breakControl', this.show_data)
438
+ }
439
+ },
440
+ watch:{
441
+ }
442
+ }
443
+ </script>