apply-clients 3.3.203 → 3.3.207
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.
- package/package.json +1 -1
- package/src/App.vue +20 -20
- package/src/apply.js +90 -89
- package/src/components/android/AppTakePic.vue +143 -143
- package/src/components/android/Function/AppInstallFunction.vue +5 -2
- package/src/components/android/Process/AppExplorationUser.vue +5 -3
- package/src/components/android/Supervisory/AppProcessSupervisory.vue +262 -261
- package/src/components/product/Function/InstallFunction.vue +122 -122
- package/src/components/product/Order/OrderApplyList.vue +8 -2
- package/src/components/product/Order/OrderMessage.vue +2 -2
- package/src/components/product/Process/ExplorationUser.vue +128 -128
- package/src/components/product/Process/Service/ServiceControl.vue +883 -883
- package/src/components/product/ServiceView.vue +741 -741
- package/src/components/product/Supervisory/Service/printChargeNode.vue +873 -0
- package/src/components/product/Supervisory/SupervisoryControl.vue +108 -100
|
@@ -1,883 +1,883 @@
|
|
|
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
|
-
</template>
|
|
9
|
-
<script>
|
|
10
|
-
import Vue from 'vue'
|
|
11
|
-
import {HttpResetClass} from 'vue-client'
|
|
12
|
-
import {isEmpty} from "../../../Util";
|
|
13
|
-
|
|
14
|
-
// Date格式化
|
|
15
|
-
Date.prototype.Format = function (fmt) {
|
|
16
|
-
var o = {
|
|
17
|
-
"M+": this.getMonth() + 1, //月份
|
|
18
|
-
"d+": this.getDate(), //日
|
|
19
|
-
"H+": this.getHours(), //小时
|
|
20
|
-
"m+": this.getMinutes(), //分
|
|
21
|
-
"s+": this.getSeconds(), //秒
|
|
22
|
-
"q+": Math.floor((this.getMonth() + 3) / 3), //季度
|
|
23
|
-
"S": this.getMilliseconds() //毫秒
|
|
24
|
-
};
|
|
25
|
-
if (/(y+)/.test(fmt)) fmt = fmt.replace(RegExp.$1, (this.getFullYear() + "").substr(4 - RegExp.$1.length));
|
|
26
|
-
for (var k in o)
|
|
27
|
-
if (new RegExp("(" + k + ")").test(fmt)) fmt = fmt.replace(RegExp.$1, (RegExp.$1.length == 1) ? (o[k]) : (("00" + o[k]).substr(("" + o[k]).length)));
|
|
28
|
-
return fmt;
|
|
29
|
-
}
|
|
30
|
-
|
|
31
|
-
export default {
|
|
32
|
-
title: '报建流程业务控制层',
|
|
33
|
-
props: ['selectdata'],
|
|
34
|
-
data () {
|
|
35
|
-
return {
|
|
36
|
-
data: null, // 数据库数据,json配置文件数据的数据集合
|
|
37
|
-
json_datas: null, // Json配置文件集合
|
|
38
|
-
showview: false, // 控制显示service-view组件
|
|
39
|
-
show_data: null, // 给view层显示的数据
|
|
40
|
-
config: {}
|
|
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.value && (item.default || item.default === 0) && item.type !== 'datepicker') {
|
|
82
|
-
if (item.eval) {
|
|
83
|
-
item.value = eval(item.default)
|
|
84
|
-
} else {
|
|
85
|
-
item.value = item.default
|
|
86
|
-
}
|
|
87
|
-
}
|
|
88
|
-
|
|
89
|
-
if (this.selectdata[item.field]) {
|
|
90
|
-
// 将json字符串格式化赋值给value
|
|
91
|
-
if (String(this.selectdata[item.field]).startsWith("{")) {
|
|
92
|
-
item.value = JSON.parse(this.selectdata[item.field])
|
|
93
|
-
} else {
|
|
94
|
-
item.value = this.selectdata[item.field]
|
|
95
|
-
}
|
|
96
|
-
}
|
|
97
|
-
if (this.selectdata[item.field] === 0) {
|
|
98
|
-
item.value = 0
|
|
99
|
-
}
|
|
100
|
-
|
|
101
|
-
// datepicker
|
|
102
|
-
if (item.type === 'datepicker' && !item.value && item.default) {
|
|
103
|
-
item.value = new Date().Format(`${item.format ? item.format : 'yyyy-MM-dd HH:mm:ss'}`)
|
|
104
|
-
}
|
|
105
|
-
|
|
106
|
-
// 如果配置类型为select,优先从参数列表获取options
|
|
107
|
-
if (item.type === 'select' || item.type === 'checkbox') {
|
|
108
|
-
if (item.param) {
|
|
109
|
-
let temp = this.$appdata.getParam(item.label)
|
|
110
|
-
|
|
111
|
-
if (temp && temp.length > 0) {
|
|
112
|
-
item.options = temp
|
|
113
|
-
}
|
|
114
|
-
|
|
115
|
-
if (item.paramLabel) {
|
|
116
|
-
temp = this.$appdata.getParam(item.paramLabel)
|
|
117
|
-
if (temp && temp.length > 0) {
|
|
118
|
-
item.options = temp
|
|
119
|
-
}
|
|
120
|
-
}
|
|
121
|
-
}
|
|
122
|
-
//
|
|
123
|
-
if (item.ready) {
|
|
124
|
-
item.options = await this[item.ready]()
|
|
125
|
-
}
|
|
126
|
-
}
|
|
127
|
-
|
|
128
|
-
if (item.type === 'checkbox') {
|
|
129
|
-
if (this.selectdata[item.field]) {
|
|
130
|
-
item.value = JSON.parse(this.selectdata[item.field])
|
|
131
|
-
} else {
|
|
132
|
-
item.value = []
|
|
133
|
-
}
|
|
134
|
-
}
|
|
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
|
-
|
|
203
|
-
// 初始化 buttons_fields
|
|
204
|
-
for (const item of this.selectdata.buttons) {
|
|
205
|
-
if (item.button_name === '下发') {
|
|
206
|
-
|
|
207
|
-
let data = {
|
|
208
|
-
source: item.source,
|
|
209
|
-
userid: this.$login.f.id
|
|
210
|
-
}
|
|
211
|
-
if (item.sourceMethod) {
|
|
212
|
-
data.source = this[item.sourceMethod]()
|
|
213
|
-
}
|
|
214
|
-
if (!data.source) {
|
|
215
|
-
this.$showMessage("请配置获取人员表达式")
|
|
216
|
-
return
|
|
217
|
-
}
|
|
218
|
-
|
|
219
|
-
let res = await this.$resetpost(
|
|
220
|
-
'rs/search',
|
|
221
|
-
{data: data},
|
|
222
|
-
{resolveMsg: null, rejectMsg: '下发人员查询失败!!!'}
|
|
223
|
-
)
|
|
224
|
-
|
|
225
|
-
let options = res.data.map(source => {
|
|
226
|
-
return {
|
|
227
|
-
"label": source.name,
|
|
228
|
-
"value": source.id
|
|
229
|
-
}
|
|
230
|
-
})
|
|
231
|
-
|
|
232
|
-
if (item.button_fields.length !== 1) {
|
|
233
|
-
this.$showMessage("下发有且只能有一个字段!!!")
|
|
234
|
-
return
|
|
235
|
-
}
|
|
236
|
-
|
|
237
|
-
item.button_fields[0].options = options
|
|
238
|
-
}
|
|
239
|
-
if (item.button_fields) {
|
|
240
|
-
item.button_fields.forEach(x => {
|
|
241
|
-
// 如果配置类型为select,优先从参数列表获取options
|
|
242
|
-
if (x.type === 'select') {
|
|
243
|
-
|
|
244
|
-
if (x.param) {
|
|
245
|
-
let temp = this.$appdata.getParam(x.label)
|
|
246
|
-
|
|
247
|
-
if (temp && temp.length > 0) {
|
|
248
|
-
x.options = temp
|
|
249
|
-
}
|
|
250
|
-
|
|
251
|
-
if (x.paramLabel) {
|
|
252
|
-
temp = this.$appdata.getParam(x.paramLabel)
|
|
253
|
-
if (temp && temp.length > 0) {
|
|
254
|
-
x.options = temp
|
|
255
|
-
}
|
|
256
|
-
}
|
|
257
|
-
}
|
|
258
|
-
|
|
259
|
-
}
|
|
260
|
-
})
|
|
261
|
-
}
|
|
262
|
-
}
|
|
263
|
-
|
|
264
|
-
// 消除双向绑定,避免子组件(显示层)数据更改,父组件(控制层)也更改
|
|
265
|
-
let temp = JSON.parse(JSON.stringify(this.selectdata))
|
|
266
|
-
|
|
267
|
-
this.show_data = temp
|
|
268
|
-
this.$nextTick(() => {
|
|
269
|
-
this.showview = true
|
|
270
|
-
})
|
|
271
|
-
},
|
|
272
|
-
// 金额转大写
|
|
273
|
-
smalltoBIG(n) {
|
|
274
|
-
let fraction = ['角', '分'];
|
|
275
|
-
let digit = ['零', '壹', '贰', '叁', '肆', '伍', '陆', '柒', '捌', '玖'];
|
|
276
|
-
let unit = [['元', '万', '亿'], ['', '拾', '佰', '仟']];
|
|
277
|
-
let head = n < 0 ? '欠' : '';
|
|
278
|
-
n = Math.abs(n);
|
|
279
|
-
|
|
280
|
-
let s = '';
|
|
281
|
-
|
|
282
|
-
for (var i = 0; i < fraction.length; i++) {
|
|
283
|
-
s += (digit[Math.floor(n * 10 * Math.pow(10, i)) % 10] + fraction[i]).replace(/零./, '');
|
|
284
|
-
}
|
|
285
|
-
s = s || '整';
|
|
286
|
-
n = Math.floor(n);
|
|
287
|
-
|
|
288
|
-
for (var i = 0; i < unit[0].length && n > 0; i++) {
|
|
289
|
-
let p = '';
|
|
290
|
-
for (var j = 0; j < unit[1].length && n > 0; j++) {
|
|
291
|
-
p = digit[n % 10] + unit[1][j] + p;
|
|
292
|
-
n = Math.floor(n / 10);
|
|
293
|
-
}
|
|
294
|
-
s = p.replace(/(零.)*零$/, '').replace(/^$/, '零') + unit[0][i] + s;
|
|
295
|
-
}
|
|
296
|
-
return head + s.replace(/(零.)*零元/, '元').replace(/(零.)+/g, '零').replace(/^整$/, '零元整')
|
|
297
|
-
},
|
|
298
|
-
getLableValue(label) {
|
|
299
|
-
for (const item of this.show_data.fields) {
|
|
300
|
-
if (item.label === label && item.type !== 'number') {
|
|
301
|
-
return item.value || ''
|
|
302
|
-
}
|
|
303
|
-
if (item.label === label && item.type === 'number') {
|
|
304
|
-
return item.value || 0
|
|
305
|
-
}
|
|
306
|
-
}
|
|
307
|
-
},
|
|
308
|
-
getLableOptions(label) {
|
|
309
|
-
for (const item of this.show_data.fields) {
|
|
310
|
-
if (item.label === label) {
|
|
311
|
-
return item.options
|
|
312
|
-
}
|
|
313
|
-
}
|
|
314
|
-
},
|
|
315
|
-
setLabelValue(label, value) {
|
|
316
|
-
for (const item of this.show_data.fields) {
|
|
317
|
-
if (item.label === label) {
|
|
318
|
-
item.value = value
|
|
319
|
-
this.show_data[item.field] = value
|
|
320
|
-
}
|
|
321
|
-
}
|
|
322
|
-
},
|
|
323
|
-
setLabelOptions(label, options) {
|
|
324
|
-
for (const item of this.show_data.fields) {
|
|
325
|
-
if (item.label === label) {
|
|
326
|
-
item.options = options
|
|
327
|
-
}
|
|
328
|
-
}
|
|
329
|
-
},
|
|
330
|
-
async checkDuplicate(index) {
|
|
331
|
-
let http = new HttpResetClass()
|
|
332
|
-
let data = {
|
|
333
|
-
tablename: 't_apply',
|
|
334
|
-
condition: `${this.show_data.fields[index].field} = '${this.show_data.fields[index].value}'`
|
|
335
|
-
}
|
|
336
|
-
let res = await http.load('POST', 'rs/sql/singleTable', {data: data}, {
|
|
337
|
-
resolveMsg: null,
|
|
338
|
-
rejectMsg: `${this.show_data.fields[index].label}查询失败`
|
|
339
|
-
})
|
|
340
|
-
if (res.data.length > 0) {
|
|
341
|
-
this.show_data.fields[index].value = null
|
|
342
|
-
this.$showAlert(`${this.show_data.fields[index].label}已存在!!!`, 'warning', 3000)
|
|
343
|
-
}
|
|
344
|
-
},
|
|
345
|
-
// 获取区县
|
|
346
|
-
async getPcd () {
|
|
347
|
-
let data = {
|
|
348
|
-
tablename: 't_pcd',
|
|
349
|
-
condition: `f_filialeid = '${this.$login.f.orgid}'`
|
|
350
|
-
}
|
|
351
|
-
let http = new HttpResetClass()
|
|
352
|
-
let res = await http.load(
|
|
353
|
-
'POST',
|
|
354
|
-
`rs/sql/singleTable`,
|
|
355
|
-
{data: data},
|
|
356
|
-
{resolveMsg: null, rejectMsg: '区县查询失败!!!'}
|
|
357
|
-
)
|
|
358
|
-
|
|
359
|
-
return res.data.map(item => {
|
|
360
|
-
return {
|
|
361
|
-
label: item.f_pcd,
|
|
362
|
-
value: item.f_pcd
|
|
363
|
-
}
|
|
364
|
-
})
|
|
365
|
-
},
|
|
366
|
-
// 缴费前置
|
|
367
|
-
chargeBefore () {
|
|
368
|
-
if (Number(this.show_data.f_due_money) > Number(this.show_data.f_cumulative_payment_money) || Number(this.show_data.f_surplus_money) > 0) {
|
|
369
|
-
this.$showAlert('费用未结清!!!', 'warning', 3000)
|
|
370
|
-
throw null
|
|
371
|
-
}
|
|
372
|
-
},
|
|
373
|
-
// 施工前置
|
|
374
|
-
async constructionBefore () {
|
|
375
|
-
let http = new HttpResetClass()
|
|
376
|
-
let data = {
|
|
377
|
-
condition: `ui.f_process_id = '${this.show_data.f_process_id}' and uf.f_table_state = '待开通'`
|
|
378
|
-
}
|
|
379
|
-
let res = await http.load(
|
|
380
|
-
'POST',
|
|
381
|
-
'rs/sql/countApplyUserinfo',
|
|
382
|
-
{data: data},
|
|
383
|
-
{
|
|
384
|
-
resolveMsg: null,
|
|
385
|
-
rejectMsg: '安装明细查询失败!!!'
|
|
386
|
-
})
|
|
387
|
-
// if (res.data[0].num > 0) {
|
|
388
|
-
// this.$showAlert(`还有${res.data[0].num}户未安装,无法提交`, 'warning', 3000)
|
|
389
|
-
// throw `还有${res.data[0].num}户未安装,无法提交`
|
|
390
|
-
// }
|
|
391
|
-
},
|
|
392
|
-
changePipeBuild () {
|
|
393
|
-
if (this.selectdata.f_process_dep === '工程部') {
|
|
394
|
-
return 'this.getParentByType($organization$).getChildByName($工程部报装$).getChildren()'
|
|
395
|
-
}
|
|
396
|
-
if (this.selectdata.f_process_dep === '运营部') {
|
|
397
|
-
return 'this.getParentByType($organization$).getChildByName($运营部报装$).getChildren()'
|
|
398
|
-
}
|
|
399
|
-
},
|
|
400
|
-
async getDevInfo () {
|
|
401
|
-
let data = {
|
|
402
|
-
tablename: 't_dev_info',
|
|
403
|
-
condition: `f_orgid = '${this.$login.f.orgid}'`
|
|
404
|
-
}
|
|
405
|
-
let res = await this.$resetpost(
|
|
406
|
-
`rs/sql/singleTable`,
|
|
407
|
-
{data: data},
|
|
408
|
-
{resolveMsg: null, rejectMsg: '公司查询失败!!!'}
|
|
409
|
-
)
|
|
410
|
-
|
|
411
|
-
return res.data.map(item => {
|
|
412
|
-
return {
|
|
413
|
-
label: item.f_dev_name,
|
|
414
|
-
value: item.f_dev_name
|
|
415
|
-
}
|
|
416
|
-
})
|
|
417
|
-
}
|
|
418
|
-
},
|
|
419
|
-
events: {
|
|
420
|
-
// 选择开发商
|
|
421
|
-
async 'devInfoChange' (index) {
|
|
422
|
-
if (isEmpty(this.show_data.f_company_name)) {
|
|
423
|
-
return
|
|
424
|
-
}
|
|
425
|
-
let data = {
|
|
426
|
-
tablename: 't_dev_info',
|
|
427
|
-
condition: `f_orgid = '${this.$login.f.orgid}' and f_dev_name = '${this.show_data.f_company_name}'`
|
|
428
|
-
}
|
|
429
|
-
let res = await this.$resetpost(
|
|
430
|
-
`rs/sql/singleTable`,
|
|
431
|
-
{data: data},
|
|
432
|
-
{resolveMsg: null, rejectMsg: '公司查询失败!!!'}
|
|
433
|
-
)
|
|
434
|
-
this.show_data.f_dev_id = res.data[0].id
|
|
435
|
-
this.setLabelValue('法人名称', res.data[0].f_legal_person)
|
|
436
|
-
this.setLabelValue('身份证', res.data[0].f_idnumber)
|
|
437
|
-
this.setLabelValue('营业执照', res.data[0].f_business_license)
|
|
438
|
-
},
|
|
439
|
-
// 退款金额
|
|
440
|
-
'refundMoneyChange' (index) {
|
|
441
|
-
let f_cumulative_payment_money = this.show_data.f_cumulative_payment_money
|
|
442
|
-
let f_refund_money = this.show_data.fields[index].value
|
|
443
|
-
|
|
444
|
-
if (f_refund_money > f_cumulative_payment_money) {
|
|
445
|
-
this.$showAlert('退款金额不能大于累计缴费金额!!!', 'warning', 3000)
|
|
446
|
-
this.show_data.fields[index].value = null
|
|
447
|
-
}
|
|
448
|
-
},
|
|
449
|
-
// 检查重复
|
|
450
|
-
'checkRepeat' (index) {
|
|
451
|
-
this.checkDuplicate(index)
|
|
452
|
-
},
|
|
453
|
-
// 选择报建项目
|
|
454
|
-
'selectApply' (row) {
|
|
455
|
-
this.setLabelValue('工程名称', row.f_entry_name)
|
|
456
|
-
this.setLabelValue('工程编号', row.f_apply_num)
|
|
457
|
-
this.setLabelValue('报建类型', row.f_apply_type)
|
|
458
|
-
this.setLabelValue('用户名称', row.f_user_name)
|
|
459
|
-
this.setLabelValue('用户电话', row.f_phone)
|
|
460
|
-
this.setLabelValue('证件类型', row.f_credentials)
|
|
461
|
-
this.setLabelValue('证件号码', row.f_idnumber)
|
|
462
|
-
this.setLabelValue('地址', row.f_address)
|
|
463
|
-
this.setLabelValue('累计缴费金额', row.f_cumulative_payment_money)
|
|
464
|
-
|
|
465
|
-
this.show_data.parentApply = JSON.parse(JSON.stringify(row))
|
|
466
|
-
|
|
467
|
-
delete row.id
|
|
468
|
-
delete row.actid
|
|
469
|
-
delete row.defid
|
|
470
|
-
delete row.defname
|
|
471
|
-
delete row.version
|
|
472
|
-
delete row.f_apply_num
|
|
473
|
-
delete row.f_sub_state
|
|
474
|
-
delete row.f_apply_type
|
|
475
|
-
delete row.f_process_id
|
|
476
|
-
|
|
477
|
-
this.show_data = Object.assign({}, this.show_data, row)
|
|
478
|
-
|
|
479
|
-
this.show_data.f_parent_process_id = this.show_data.parentApply.f_process_id
|
|
480
|
-
},
|
|
481
|
-
// 是否终止
|
|
482
|
-
'isStopChange' (index) {
|
|
483
|
-
let f_is_stop = this.show_data.f_is_stop
|
|
484
|
-
|
|
485
|
-
for (const item of this.show_data.fields) {
|
|
486
|
-
if (f_is_stop === '是') {
|
|
487
|
-
if (item.label === '终止原因') {
|
|
488
|
-
item.hidden = false
|
|
489
|
-
item.required = true
|
|
490
|
-
}
|
|
491
|
-
} else {
|
|
492
|
-
if (item.label === '终止原因') {
|
|
493
|
-
item.hidden = true
|
|
494
|
-
item.required = false
|
|
495
|
-
}
|
|
496
|
-
}
|
|
497
|
-
}
|
|
498
|
-
},
|
|
499
|
-
async 'stopApplyReadyEvent' () {
|
|
500
|
-
|
|
501
|
-
let f_is_stop = this.getLableValue('是否终止')
|
|
502
|
-
|
|
503
|
-
for (const item of this.show_data.fields) {
|
|
504
|
-
if (f_is_stop === '是') {
|
|
505
|
-
if (item.label === '终止原因') {
|
|
506
|
-
item.hidden = false
|
|
507
|
-
item.required = true
|
|
508
|
-
}
|
|
509
|
-
} else {
|
|
510
|
-
if (item.label === '终止原因') {
|
|
511
|
-
item.hidden = true
|
|
512
|
-
item.required = false
|
|
513
|
-
}
|
|
514
|
-
}
|
|
515
|
-
}
|
|
516
|
-
|
|
517
|
-
if (isEmpty(this.show_data.f_parent_process_id)) {
|
|
518
|
-
return
|
|
519
|
-
}
|
|
520
|
-
let data = {
|
|
521
|
-
condition: `f_process_id = '${this.show_data.f_parent_process_id}'`,
|
|
522
|
-
data: {
|
|
523
|
-
id: this.$login.f.id,
|
|
524
|
-
orgid: this.$login.f.orgid
|
|
525
|
-
}
|
|
526
|
-
}
|
|
527
|
-
let res = await this.$resetpost(
|
|
528
|
-
`rs/sql/supervisory`,
|
|
529
|
-
{data: data},
|
|
530
|
-
{resolveMsg: null, rejectMsg: '项目查询失败!!!'}
|
|
531
|
-
)
|
|
532
|
-
this.show_data.parentApply = res.data[0]
|
|
533
|
-
},
|
|
534
|
-
// 选择用户档案信息
|
|
535
|
-
'selectUserinfo' (row) {
|
|
536
|
-
this.setLabelValue('用户编号', row.f_userinfo_code)
|
|
537
|
-
this.setLabelValue('用户名称', row.f_user_name)
|
|
538
|
-
this.setLabelValue('用户电话', row.f_user_phone)
|
|
539
|
-
this.setLabelValue('证件类型', row.f_credentials)
|
|
540
|
-
this.setLabelValue('证件号码', row.f_idnumber)
|
|
541
|
-
this.setLabelValue('地址', row.f_address)
|
|
542
|
-
|
|
543
|
-
this.show_data.f_userinfo_id = row.f_userinfo_id
|
|
544
|
-
this.show_data.f_userinfo_code = row.f_userinfo_code
|
|
545
|
-
},
|
|
546
|
-
// 合同金额失去焦点
|
|
547
|
-
async 'contractMoneyChange' (index) {
|
|
548
|
-
let data = {
|
|
549
|
-
operator: '+',
|
|
550
|
-
num1: this.show_data.f_contract_money || 0,
|
|
551
|
-
num2: this.getLableValue('追加金额') || 0
|
|
552
|
-
}
|
|
553
|
-
let res = await this.$resetpost(
|
|
554
|
-
`rs/logic/compute`,
|
|
555
|
-
{data: data},
|
|
556
|
-
{resolveMsg: null, rejectMsg: '金额计算失败!!!'}
|
|
557
|
-
)
|
|
558
|
-
|
|
559
|
-
this.setLabelValue('应交金额', res.data)
|
|
560
|
-
},
|
|
561
|
-
|
|
562
|
-
// 区县失去焦点
|
|
563
|
-
async 'pcdChange' (index) {
|
|
564
|
-
if (isEmpty(this.show_data.f_pcd)) {
|
|
565
|
-
return
|
|
566
|
-
}
|
|
567
|
-
|
|
568
|
-
this.setLabelValue('街道', null)
|
|
569
|
-
|
|
570
|
-
let data = {
|
|
571
|
-
tablename: 't_street',
|
|
572
|
-
condition: `f_filialeid = '${this.$login.f.orgid}' and f_pcd = '${this.show_data.f_pcd}'`
|
|
573
|
-
}
|
|
574
|
-
let res = await this.$resetpost(
|
|
575
|
-
`rs/sql/singleTable`,
|
|
576
|
-
{data: data},
|
|
577
|
-
{resolveMsg: null, rejectMsg: '街道查询失败!!!'}
|
|
578
|
-
)
|
|
579
|
-
|
|
580
|
-
this.setLabelOptions('街道', res.data.map(item => {
|
|
581
|
-
return {
|
|
582
|
-
label: item.f_street,
|
|
583
|
-
value: item.f_street
|
|
584
|
-
}
|
|
585
|
-
}))
|
|
586
|
-
},
|
|
587
|
-
// 街道失去焦点
|
|
588
|
-
async 'streetChange' (index) {
|
|
589
|
-
if (isEmpty(this.show_data.f_street)) {
|
|
590
|
-
return
|
|
591
|
-
}
|
|
592
|
-
|
|
593
|
-
this.setLabelValue('小区', null)
|
|
594
|
-
|
|
595
|
-
let data = {
|
|
596
|
-
tablename: 't_area',
|
|
597
|
-
condition: `f_filialeid = '${this.$login.f.orgid}' and f_street = '${this.show_data.f_street}'`
|
|
598
|
-
}
|
|
599
|
-
let http = new HttpResetClass()
|
|
600
|
-
let res = await http.load(
|
|
601
|
-
'POST',
|
|
602
|
-
`rs/sql/singleTable`,
|
|
603
|
-
{data: data},
|
|
604
|
-
{resolveMsg: null, rejectMsg: '小区查询失败!!!'}
|
|
605
|
-
)
|
|
606
|
-
|
|
607
|
-
this.setLabelOptions('小区', res.data.map(item => {
|
|
608
|
-
return {
|
|
609
|
-
label: item.f_residential_area,
|
|
610
|
-
value: item.f_residential_area
|
|
611
|
-
}
|
|
612
|
-
}))
|
|
613
|
-
},
|
|
614
|
-
// 地址类型失去焦点
|
|
615
|
-
'addressTypeChange' (index) {
|
|
616
|
-
let f_address_type = this.show_data.f_address_type
|
|
617
|
-
for (const item of this.show_data.fields) {
|
|
618
|
-
if (f_address_type === '民用地址') {
|
|
619
|
-
if (item.label === '区域' || item.label === '街道' || item.label === '小区' ||item.label === '楼号' || item.label === '单元' || item.label === '楼层' || item.label === '门牌号') {
|
|
620
|
-
item.hidden = false
|
|
621
|
-
item.required = true
|
|
622
|
-
item.value = null
|
|
623
|
-
}
|
|
624
|
-
}
|
|
625
|
-
if (f_address_type === '特殊地址') {
|
|
626
|
-
if (item.label === '区域') {
|
|
627
|
-
item.hidden = false
|
|
628
|
-
item.required = true
|
|
629
|
-
item.value = null
|
|
630
|
-
}
|
|
631
|
-
if(item.label === '街道' || item.label === '小区' ||item.label === '楼号' || item.label === '单元' || item.label === '楼层' || item.label === '门牌号'){
|
|
632
|
-
item.hidden = true
|
|
633
|
-
item.required = false
|
|
634
|
-
item.value = null
|
|
635
|
-
}
|
|
636
|
-
}
|
|
637
|
-
if (item.label === '地址') {
|
|
638
|
-
item.value = null
|
|
639
|
-
}
|
|
640
|
-
}
|
|
641
|
-
},
|
|
642
|
-
// 申请节点初始化
|
|
643
|
-
'applyReadyEvent' () {
|
|
644
|
-
this.$getConfig(this, 'UserAddress')
|
|
645
|
-
|
|
646
|
-
let f_address_type = this.show_data.f_address_type
|
|
647
|
-
|
|
648
|
-
for (const item of this.show_data.fields) {
|
|
649
|
-
if (f_address_type === '民用地址') {
|
|
650
|
-
if (item.label === '区域' || item.label === '街道' || item.label === '小区' ||item.label === '楼号' || item.label === '单元' || item.label === '楼层' || item.label === '门牌号') {
|
|
651
|
-
item.hidden = false
|
|
652
|
-
item.required = true
|
|
653
|
-
item.value = null
|
|
654
|
-
}
|
|
655
|
-
}
|
|
656
|
-
if (f_address_type === '特殊地址') {
|
|
657
|
-
if (item.label === '区域') {
|
|
658
|
-
item.hidden = false
|
|
659
|
-
item.required = false
|
|
660
|
-
item.value = null
|
|
661
|
-
}
|
|
662
|
-
}
|
|
663
|
-
|
|
664
|
-
if (this.show_data.f_apply_source === '线下发起' && item.label === '地址') {
|
|
665
|
-
item.hidden = true
|
|
666
|
-
}
|
|
667
|
-
}
|
|
668
|
-
},
|
|
669
|
-
// ===========================================
|
|
670
|
-
async 'button'() {
|
|
671
|
-
if (this.show_data.button.before) {
|
|
672
|
-
await this[this.show_data.button.before]()
|
|
673
|
-
}
|
|
674
|
-
// 点击重置按钮就重置数据
|
|
675
|
-
if (this.show_data.button.button_name === '重置') {
|
|
676
|
-
this.$dispatch('breakControl', this.selectdata)
|
|
677
|
-
return
|
|
678
|
-
}
|
|
679
|
-
|
|
680
|
-
this.show_data.user = this.$login.f
|
|
681
|
-
this.show_data.start_activity = this.$workflow_vue.start_activity
|
|
682
|
-
this.show_data.xmlfilename = this.$workflow_vue.workflow_xmlfilename
|
|
683
|
-
|
|
684
|
-
let res = await this.$resetpost(
|
|
685
|
-
`rs/logic/ApplyProductService`,
|
|
686
|
-
{data: this.show_data},
|
|
687
|
-
{resolveMsg: null, rejectMsg: '数据保存失败'}
|
|
688
|
-
)
|
|
689
|
-
|
|
690
|
-
if (this.show_data.button.after) {
|
|
691
|
-
this[this.show_data.button.after]()
|
|
692
|
-
}
|
|
693
|
-
|
|
694
|
-
|
|
695
|
-
|
|
696
|
-
this.$dispatch('search')
|
|
697
|
-
},
|
|
698
|
-
// 失去焦点出触发事件
|
|
699
|
-
'onchange' (index) {
|
|
700
|
-
|
|
701
|
-
if(this.show_data.defname === '方案确定' && this.$refs.serviceview.model.parentname == '经理部'){
|
|
702
|
-
if(this.show_data.f_budget_no ===''){
|
|
703
|
-
for (const button of this.show_data.buttons) {
|
|
704
|
-
if(button.button_name === '跳过') {
|
|
705
|
-
button.hidden = true
|
|
706
|
-
}}}
|
|
707
|
-
if(this.show_data.fields[index].label==='是否跳过预算'){
|
|
708
|
-
for (const button of this.show_data.buttons) {
|
|
709
|
-
if( (this.show_data.fields[index].value === '否' || this.show_data.fields[index].value ==='') && button.button_name === '跳过') {
|
|
710
|
-
button.hidden = true
|
|
711
|
-
} else {
|
|
712
|
-
button.hidden = false
|
|
713
|
-
}
|
|
714
|
-
}
|
|
715
|
-
}
|
|
716
|
-
}
|
|
717
|
-
if(this.show_data.defname === '合同签订' && this.$refs.serviceview.model.parentname === '经理部'){
|
|
718
|
-
if(this.show_data.f_toll_no ===''){
|
|
719
|
-
for (const button of this.show_data.buttons) {
|
|
720
|
-
if(button.button_name === '跳过') {
|
|
721
|
-
button.hidden = true
|
|
722
|
-
}}}
|
|
723
|
-
if(this.show_data.fields[index].label==='是否跳过收费'){
|
|
724
|
-
for (const button of this.show_data.buttons) {
|
|
725
|
-
if ((this.show_data.fields[index].value === '否' || this.show_data.fields[index].value ==='') && button.button_name === '跳过') {
|
|
726
|
-
button.hidden = true
|
|
727
|
-
} else {
|
|
728
|
-
button.hidden = false
|
|
729
|
-
}
|
|
730
|
-
}
|
|
731
|
-
}
|
|
732
|
-
}
|
|
733
|
-
if(this.show_data.defname === '发起施工' && this.$refs.serviceview.model.parentname === '经理部'){
|
|
734
|
-
if(this.show_data.f_drawing_issuance_no === ''){
|
|
735
|
-
for (const button of this.show_data.buttons) {
|
|
736
|
-
if(button.button_name === '跳过') {
|
|
737
|
-
button.hidden = true
|
|
738
|
-
}}}
|
|
739
|
-
if(this.show_data.fields[index].label==='是否跳过图纸下发'){
|
|
740
|
-
for (const button of this.show_data.buttons) {
|
|
741
|
-
if ((this.show_data.fields[index].value === '否' || this.show_data.fields[index].value ==='') && button.button_name === '跳过') {
|
|
742
|
-
button.hidden = true
|
|
743
|
-
} else {
|
|
744
|
-
button.hidden = false
|
|
745
|
-
}
|
|
746
|
-
}
|
|
747
|
-
}
|
|
748
|
-
}
|
|
749
|
-
|
|
750
|
-
if ((this.show_data.f_apply_type==='工商户报建' ||this.show_data.f_apply_type==='开发商集体报建'||this.show_data.f_apply_type==='预埋管报建')&&this.show_data.defname === '用户受理') {
|
|
751
|
-
if (
|
|
752
|
-
this.show_data.fields[index].label === '街道' ||
|
|
753
|
-
this.show_data.fields[index].label === '区域'
|
|
754
|
-
) {
|
|
755
|
-
|
|
756
|
-
let f_street = this.getLableValue('街道')
|
|
757
|
-
let f_pcd = this.getLableValue('区域')
|
|
758
|
-
|
|
759
|
-
let f_address = null
|
|
760
|
-
|
|
761
|
-
f_address = f_pcd + f_street
|
|
762
|
-
this.setLabelValue('地址',f_address)
|
|
763
|
-
|
|
764
|
-
}
|
|
765
|
-
}
|
|
766
|
-
if(this.show_data.f_apply_type==='散户报建'&& this.show_data.f_address_type==='民用地址' && this.show_data.defname === '用户受理'){
|
|
767
|
-
if (
|
|
768
|
-
this.show_data.fields[index].label === '区域' ||
|
|
769
|
-
this.show_data.fields[index].label === '街道'||
|
|
770
|
-
this.show_data.fields[index].label === '小区'||
|
|
771
|
-
this.show_data.fields[index].label === '楼号' ||
|
|
772
|
-
this.show_data.fields[index].label === '单元'||
|
|
773
|
-
this.show_data.fields[index].label === '楼层' ||
|
|
774
|
-
this.show_data.fields[index].label === '门牌号'
|
|
775
|
-
){
|
|
776
|
-
let f_pcd = this.getLableValue('区域')
|
|
777
|
-
let f_street = this.getLableValue('街道')
|
|
778
|
-
let f_residential_area = this.getLableValue('小区')
|
|
779
|
-
let f_building = this.getLableValue('楼号')
|
|
780
|
-
let f_unit = this.getLableValue('单元')
|
|
781
|
-
let f_floor = this.getLableValue('楼层')
|
|
782
|
-
let f_room = this.getLableValue('门牌号')
|
|
783
|
-
|
|
784
|
-
let f_address = null
|
|
785
|
-
|
|
786
|
-
f_address = f_pcd + f_street + f_residential_area + f_building + f_unit + f_floor + f_room
|
|
787
|
-
this.setLabelValue('地址',f_address)
|
|
788
|
-
}
|
|
789
|
-
}
|
|
790
|
-
if(this.show_data.f_apply_type==='散户报建'&& this.show_data.f_address_type==='特殊地址' && this.show_data.defname === '用户受理'){
|
|
791
|
-
if (
|
|
792
|
-
this.show_data.fields[index].label === '区域'
|
|
793
|
-
){
|
|
794
|
-
let f_pcd = this.getLableValue('区域')
|
|
795
|
-
|
|
796
|
-
let f_address = null
|
|
797
|
-
|
|
798
|
-
f_address = f_pcd
|
|
799
|
-
this.setLabelValue('地址',f_address)
|
|
800
|
-
}
|
|
801
|
-
}
|
|
802
|
-
|
|
803
|
-
|
|
804
|
-
|
|
805
|
-
},
|
|
806
|
-
'onblur' (index) {},
|
|
807
|
-
'oninput' (index) {},
|
|
808
|
-
'initializtionView' () {},
|
|
809
|
-
async 'onchangeModal' (index, fieldIndex) {
|
|
810
|
-
},
|
|
811
|
-
async 'onblurModal' (index, fieldIndex) {
|
|
812
|
-
|
|
813
|
-
},
|
|
814
|
-
async 'oninputModal' (index, fieldIndex) {
|
|
815
|
-
|
|
816
|
-
},
|
|
817
|
-
async 'onetomanydelete' (index, rowIndex) {
|
|
818
|
-
|
|
819
|
-
let http = new HttpResetClass()
|
|
820
|
-
|
|
821
|
-
let res = await http.load(
|
|
822
|
-
'DELETE',
|
|
823
|
-
`rs/entity/${this.show_data.onetomany[index].tables[0]}/${this.show_data.onetomany[index].rows[rowIndex].id}`,
|
|
824
|
-
null,
|
|
825
|
-
{resolveMsg: null, rejectMsg: '删除失败!!!'}
|
|
826
|
-
)
|
|
827
|
-
|
|
828
|
-
this.$dispatch('breakControl', this.show_data)
|
|
829
|
-
},
|
|
830
|
-
async 'onetomanyupdate' (index, rowIndex) {
|
|
831
|
-
let data = this.show_data.onetomany[index].rows[rowIndex]
|
|
832
|
-
|
|
833
|
-
this.show_data.onetomany[index].fields.forEach(item => {
|
|
834
|
-
data[item.field] = item.value
|
|
835
|
-
})
|
|
836
|
-
let res = await this.$resetpost(
|
|
837
|
-
`rs/entity/${this.show_data.onetomany[index].tables[0]}`,
|
|
838
|
-
data
|
|
839
|
-
)
|
|
840
|
-
|
|
841
|
-
this.$dispatch('breakControl', this.show_data)
|
|
842
|
-
},
|
|
843
|
-
async 'onetomanyadd' (index) {
|
|
844
|
-
let data = {
|
|
845
|
-
f_process_id : this.show_data.f_process_id,
|
|
846
|
-
f_operator_id: this.$login.f.id,
|
|
847
|
-
f_operator: this.$login.f.name,
|
|
848
|
-
f_operation_date: new Date(),
|
|
849
|
-
f_orgid: this.$login.f.orgid,
|
|
850
|
-
f_orgname: this.$login.f.orgs
|
|
851
|
-
}
|
|
852
|
-
this.show_data.onetomany[index].fields.forEach(item => {
|
|
853
|
-
data[item.field] = item.value
|
|
854
|
-
})
|
|
855
|
-
let res = await this.$resetpost(
|
|
856
|
-
`rs/entity/${this.show_data.onetomany[index].tables[0]}`,
|
|
857
|
-
data
|
|
858
|
-
)
|
|
859
|
-
this.$dispatch('breakControl', this.show_data)
|
|
860
|
-
},
|
|
861
|
-
'onbutchange' (index) {
|
|
862
|
-
|
|
863
|
-
},
|
|
864
|
-
'onbutblur' (index) {
|
|
865
|
-
|
|
866
|
-
},
|
|
867
|
-
'onbutinput' (index) {
|
|
868
|
-
|
|
869
|
-
}
|
|
870
|
-
},
|
|
871
|
-
watch: {
|
|
872
|
-
}
|
|
873
|
-
}
|
|
874
|
-
</script>
|
|
875
|
-
<style scoped>
|
|
876
|
-
/*清除model中的浮动*/
|
|
877
|
-
.clearfix:after,.clearfix:before{
|
|
878
|
-
display: table;
|
|
879
|
-
}
|
|
880
|
-
.clearfix:after{
|
|
881
|
-
clear: both;
|
|
882
|
-
}
|
|
883
|
-
</style>
|
|
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
|
+
</template>
|
|
9
|
+
<script>
|
|
10
|
+
import Vue from 'vue'
|
|
11
|
+
import {HttpResetClass} from 'vue-client'
|
|
12
|
+
import {isEmpty} from "../../../Util";
|
|
13
|
+
|
|
14
|
+
// Date格式化
|
|
15
|
+
Date.prototype.Format = function (fmt) {
|
|
16
|
+
var o = {
|
|
17
|
+
"M+": this.getMonth() + 1, //月份
|
|
18
|
+
"d+": this.getDate(), //日
|
|
19
|
+
"H+": this.getHours(), //小时
|
|
20
|
+
"m+": this.getMinutes(), //分
|
|
21
|
+
"s+": this.getSeconds(), //秒
|
|
22
|
+
"q+": Math.floor((this.getMonth() + 3) / 3), //季度
|
|
23
|
+
"S": this.getMilliseconds() //毫秒
|
|
24
|
+
};
|
|
25
|
+
if (/(y+)/.test(fmt)) fmt = fmt.replace(RegExp.$1, (this.getFullYear() + "").substr(4 - RegExp.$1.length));
|
|
26
|
+
for (var k in o)
|
|
27
|
+
if (new RegExp("(" + k + ")").test(fmt)) fmt = fmt.replace(RegExp.$1, (RegExp.$1.length == 1) ? (o[k]) : (("00" + o[k]).substr(("" + o[k]).length)));
|
|
28
|
+
return fmt;
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
export default {
|
|
32
|
+
title: '报建流程业务控制层',
|
|
33
|
+
props: ['selectdata'],
|
|
34
|
+
data () {
|
|
35
|
+
return {
|
|
36
|
+
data: null, // 数据库数据,json配置文件数据的数据集合
|
|
37
|
+
json_datas: null, // Json配置文件集合
|
|
38
|
+
showview: false, // 控制显示service-view组件
|
|
39
|
+
show_data: null, // 给view层显示的数据
|
|
40
|
+
config: {}
|
|
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.value && (item.default || item.default === 0) && item.type !== 'datepicker') {
|
|
82
|
+
if (item.eval) {
|
|
83
|
+
item.value = eval(item.default)
|
|
84
|
+
} else {
|
|
85
|
+
item.value = item.default
|
|
86
|
+
}
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
if (this.selectdata[item.field]) {
|
|
90
|
+
// 将json字符串格式化赋值给value
|
|
91
|
+
if (String(this.selectdata[item.field]).startsWith("{")) {
|
|
92
|
+
item.value = JSON.parse(this.selectdata[item.field])
|
|
93
|
+
} else {
|
|
94
|
+
item.value = this.selectdata[item.field]
|
|
95
|
+
}
|
|
96
|
+
}
|
|
97
|
+
if (this.selectdata[item.field] === 0) {
|
|
98
|
+
item.value = 0
|
|
99
|
+
}
|
|
100
|
+
|
|
101
|
+
// datepicker
|
|
102
|
+
if (item.type === 'datepicker' && !item.value && item.default) {
|
|
103
|
+
item.value = new Date().Format(`${item.format ? item.format : 'yyyy-MM-dd HH:mm:ss'}`)
|
|
104
|
+
}
|
|
105
|
+
|
|
106
|
+
// 如果配置类型为select,优先从参数列表获取options
|
|
107
|
+
if (item.type === 'select' || item.type === 'checkbox') {
|
|
108
|
+
if (item.param) {
|
|
109
|
+
let temp = this.$appdata.getParam(item.label)
|
|
110
|
+
|
|
111
|
+
if (temp && temp.length > 0) {
|
|
112
|
+
item.options = temp
|
|
113
|
+
}
|
|
114
|
+
|
|
115
|
+
if (item.paramLabel) {
|
|
116
|
+
temp = this.$appdata.getParam(item.paramLabel)
|
|
117
|
+
if (temp && temp.length > 0) {
|
|
118
|
+
item.options = temp
|
|
119
|
+
}
|
|
120
|
+
}
|
|
121
|
+
}
|
|
122
|
+
//
|
|
123
|
+
if (item.ready) {
|
|
124
|
+
item.options = await this[item.ready]()
|
|
125
|
+
}
|
|
126
|
+
}
|
|
127
|
+
|
|
128
|
+
if (item.type === 'checkbox') {
|
|
129
|
+
if (this.selectdata[item.field]) {
|
|
130
|
+
item.value = JSON.parse(this.selectdata[item.field])
|
|
131
|
+
} else {
|
|
132
|
+
item.value = []
|
|
133
|
+
}
|
|
134
|
+
}
|
|
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
|
+
|
|
203
|
+
// 初始化 buttons_fields
|
|
204
|
+
for (const item of this.selectdata.buttons) {
|
|
205
|
+
if (item.button_name === '下发') {
|
|
206
|
+
|
|
207
|
+
let data = {
|
|
208
|
+
source: item.source,
|
|
209
|
+
userid: this.$login.f.id
|
|
210
|
+
}
|
|
211
|
+
if (item.sourceMethod) {
|
|
212
|
+
data.source = this[item.sourceMethod]()
|
|
213
|
+
}
|
|
214
|
+
if (!data.source) {
|
|
215
|
+
this.$showMessage("请配置获取人员表达式")
|
|
216
|
+
return
|
|
217
|
+
}
|
|
218
|
+
|
|
219
|
+
let res = await this.$resetpost(
|
|
220
|
+
'rs/search',
|
|
221
|
+
{data: data},
|
|
222
|
+
{resolveMsg: null, rejectMsg: '下发人员查询失败!!!'}
|
|
223
|
+
)
|
|
224
|
+
|
|
225
|
+
let options = res.data.map(source => {
|
|
226
|
+
return {
|
|
227
|
+
"label": source.name,
|
|
228
|
+
"value": source.id
|
|
229
|
+
}
|
|
230
|
+
})
|
|
231
|
+
|
|
232
|
+
if (item.button_fields.length !== 1) {
|
|
233
|
+
this.$showMessage("下发有且只能有一个字段!!!")
|
|
234
|
+
return
|
|
235
|
+
}
|
|
236
|
+
|
|
237
|
+
item.button_fields[0].options = options
|
|
238
|
+
}
|
|
239
|
+
if (item.button_fields) {
|
|
240
|
+
item.button_fields.forEach(x => {
|
|
241
|
+
// 如果配置类型为select,优先从参数列表获取options
|
|
242
|
+
if (x.type === 'select') {
|
|
243
|
+
|
|
244
|
+
if (x.param) {
|
|
245
|
+
let temp = this.$appdata.getParam(x.label)
|
|
246
|
+
|
|
247
|
+
if (temp && temp.length > 0) {
|
|
248
|
+
x.options = temp
|
|
249
|
+
}
|
|
250
|
+
|
|
251
|
+
if (x.paramLabel) {
|
|
252
|
+
temp = this.$appdata.getParam(x.paramLabel)
|
|
253
|
+
if (temp && temp.length > 0) {
|
|
254
|
+
x.options = temp
|
|
255
|
+
}
|
|
256
|
+
}
|
|
257
|
+
}
|
|
258
|
+
|
|
259
|
+
}
|
|
260
|
+
})
|
|
261
|
+
}
|
|
262
|
+
}
|
|
263
|
+
|
|
264
|
+
// 消除双向绑定,避免子组件(显示层)数据更改,父组件(控制层)也更改
|
|
265
|
+
let temp = JSON.parse(JSON.stringify(this.selectdata))
|
|
266
|
+
|
|
267
|
+
this.show_data = temp
|
|
268
|
+
this.$nextTick(() => {
|
|
269
|
+
this.showview = true
|
|
270
|
+
})
|
|
271
|
+
},
|
|
272
|
+
// 金额转大写
|
|
273
|
+
smalltoBIG(n) {
|
|
274
|
+
let fraction = ['角', '分'];
|
|
275
|
+
let digit = ['零', '壹', '贰', '叁', '肆', '伍', '陆', '柒', '捌', '玖'];
|
|
276
|
+
let unit = [['元', '万', '亿'], ['', '拾', '佰', '仟']];
|
|
277
|
+
let head = n < 0 ? '欠' : '';
|
|
278
|
+
n = Math.abs(n);
|
|
279
|
+
|
|
280
|
+
let s = '';
|
|
281
|
+
|
|
282
|
+
for (var i = 0; i < fraction.length; i++) {
|
|
283
|
+
s += (digit[Math.floor(n * 10 * Math.pow(10, i)) % 10] + fraction[i]).replace(/零./, '');
|
|
284
|
+
}
|
|
285
|
+
s = s || '整';
|
|
286
|
+
n = Math.floor(n);
|
|
287
|
+
|
|
288
|
+
for (var i = 0; i < unit[0].length && n > 0; i++) {
|
|
289
|
+
let p = '';
|
|
290
|
+
for (var j = 0; j < unit[1].length && n > 0; j++) {
|
|
291
|
+
p = digit[n % 10] + unit[1][j] + p;
|
|
292
|
+
n = Math.floor(n / 10);
|
|
293
|
+
}
|
|
294
|
+
s = p.replace(/(零.)*零$/, '').replace(/^$/, '零') + unit[0][i] + s;
|
|
295
|
+
}
|
|
296
|
+
return head + s.replace(/(零.)*零元/, '元').replace(/(零.)+/g, '零').replace(/^整$/, '零元整')
|
|
297
|
+
},
|
|
298
|
+
getLableValue(label) {
|
|
299
|
+
for (const item of this.show_data.fields) {
|
|
300
|
+
if (item.label === label && item.type !== 'number') {
|
|
301
|
+
return item.value || ''
|
|
302
|
+
}
|
|
303
|
+
if (item.label === label && item.type === 'number') {
|
|
304
|
+
return item.value || 0
|
|
305
|
+
}
|
|
306
|
+
}
|
|
307
|
+
},
|
|
308
|
+
getLableOptions(label) {
|
|
309
|
+
for (const item of this.show_data.fields) {
|
|
310
|
+
if (item.label === label) {
|
|
311
|
+
return item.options
|
|
312
|
+
}
|
|
313
|
+
}
|
|
314
|
+
},
|
|
315
|
+
setLabelValue(label, value) {
|
|
316
|
+
for (const item of this.show_data.fields) {
|
|
317
|
+
if (item.label === label) {
|
|
318
|
+
item.value = value
|
|
319
|
+
this.show_data[item.field] = value
|
|
320
|
+
}
|
|
321
|
+
}
|
|
322
|
+
},
|
|
323
|
+
setLabelOptions(label, options) {
|
|
324
|
+
for (const item of this.show_data.fields) {
|
|
325
|
+
if (item.label === label) {
|
|
326
|
+
item.options = options
|
|
327
|
+
}
|
|
328
|
+
}
|
|
329
|
+
},
|
|
330
|
+
async checkDuplicate(index) {
|
|
331
|
+
let http = new HttpResetClass()
|
|
332
|
+
let data = {
|
|
333
|
+
tablename: 't_apply',
|
|
334
|
+
condition: `${this.show_data.fields[index].field} = '${this.show_data.fields[index].value}'`
|
|
335
|
+
}
|
|
336
|
+
let res = await http.load('POST', 'rs/sql/singleTable', {data: data}, {
|
|
337
|
+
resolveMsg: null,
|
|
338
|
+
rejectMsg: `${this.show_data.fields[index].label}查询失败`
|
|
339
|
+
})
|
|
340
|
+
if (res.data.length > 0) {
|
|
341
|
+
this.show_data.fields[index].value = null
|
|
342
|
+
this.$showAlert(`${this.show_data.fields[index].label}已存在!!!`, 'warning', 3000)
|
|
343
|
+
}
|
|
344
|
+
},
|
|
345
|
+
// 获取区县
|
|
346
|
+
async getPcd () {
|
|
347
|
+
let data = {
|
|
348
|
+
tablename: 't_pcd',
|
|
349
|
+
condition: `f_filialeid = '${this.$login.f.orgid}'`
|
|
350
|
+
}
|
|
351
|
+
let http = new HttpResetClass()
|
|
352
|
+
let res = await http.load(
|
|
353
|
+
'POST',
|
|
354
|
+
`rs/sql/singleTable`,
|
|
355
|
+
{data: data},
|
|
356
|
+
{resolveMsg: null, rejectMsg: '区县查询失败!!!'}
|
|
357
|
+
)
|
|
358
|
+
|
|
359
|
+
return res.data.map(item => {
|
|
360
|
+
return {
|
|
361
|
+
label: item.f_pcd,
|
|
362
|
+
value: item.f_pcd
|
|
363
|
+
}
|
|
364
|
+
})
|
|
365
|
+
},
|
|
366
|
+
// 缴费前置
|
|
367
|
+
chargeBefore () {
|
|
368
|
+
if (Number(this.show_data.f_due_money) > Number(this.show_data.f_cumulative_payment_money) || Number(this.show_data.f_surplus_money) > 0) {
|
|
369
|
+
this.$showAlert('费用未结清!!!', 'warning', 3000)
|
|
370
|
+
throw null
|
|
371
|
+
}
|
|
372
|
+
},
|
|
373
|
+
// 施工前置
|
|
374
|
+
async constructionBefore () {
|
|
375
|
+
let http = new HttpResetClass()
|
|
376
|
+
let data = {
|
|
377
|
+
condition: `ui.f_process_id = '${this.show_data.f_process_id}' and uf.f_table_state = '待开通'`
|
|
378
|
+
}
|
|
379
|
+
let res = await http.load(
|
|
380
|
+
'POST',
|
|
381
|
+
'rs/sql/countApplyUserinfo',
|
|
382
|
+
{data: data},
|
|
383
|
+
{
|
|
384
|
+
resolveMsg: null,
|
|
385
|
+
rejectMsg: '安装明细查询失败!!!'
|
|
386
|
+
})
|
|
387
|
+
// if (res.data[0].num > 0) {
|
|
388
|
+
// this.$showAlert(`还有${res.data[0].num}户未安装,无法提交`, 'warning', 3000)
|
|
389
|
+
// throw `还有${res.data[0].num}户未安装,无法提交`
|
|
390
|
+
// }
|
|
391
|
+
},
|
|
392
|
+
changePipeBuild () {
|
|
393
|
+
if (this.selectdata.f_process_dep === '工程部') {
|
|
394
|
+
return 'this.getParentByType($organization$).getChildByName($工程部报装$).getChildren()'
|
|
395
|
+
}
|
|
396
|
+
if (this.selectdata.f_process_dep === '运营部') {
|
|
397
|
+
return 'this.getParentByType($organization$).getChildByName($运营部报装$).getChildren()'
|
|
398
|
+
}
|
|
399
|
+
},
|
|
400
|
+
async getDevInfo () {
|
|
401
|
+
let data = {
|
|
402
|
+
tablename: 't_dev_info',
|
|
403
|
+
condition: `f_orgid = '${this.$login.f.orgid}'`
|
|
404
|
+
}
|
|
405
|
+
let res = await this.$resetpost(
|
|
406
|
+
`rs/sql/singleTable`,
|
|
407
|
+
{data: data},
|
|
408
|
+
{resolveMsg: null, rejectMsg: '公司查询失败!!!'}
|
|
409
|
+
)
|
|
410
|
+
|
|
411
|
+
return res.data.map(item => {
|
|
412
|
+
return {
|
|
413
|
+
label: item.f_dev_name,
|
|
414
|
+
value: item.f_dev_name
|
|
415
|
+
}
|
|
416
|
+
})
|
|
417
|
+
}
|
|
418
|
+
},
|
|
419
|
+
events: {
|
|
420
|
+
// 选择开发商
|
|
421
|
+
async 'devInfoChange' (index) {
|
|
422
|
+
if (isEmpty(this.show_data.f_company_name)) {
|
|
423
|
+
return
|
|
424
|
+
}
|
|
425
|
+
let data = {
|
|
426
|
+
tablename: 't_dev_info',
|
|
427
|
+
condition: `f_orgid = '${this.$login.f.orgid}' and f_dev_name = '${this.show_data.f_company_name}'`
|
|
428
|
+
}
|
|
429
|
+
let res = await this.$resetpost(
|
|
430
|
+
`rs/sql/singleTable`,
|
|
431
|
+
{data: data},
|
|
432
|
+
{resolveMsg: null, rejectMsg: '公司查询失败!!!'}
|
|
433
|
+
)
|
|
434
|
+
this.show_data.f_dev_id = res.data[0].id
|
|
435
|
+
this.setLabelValue('法人名称', res.data[0].f_legal_person)
|
|
436
|
+
this.setLabelValue('身份证', res.data[0].f_idnumber)
|
|
437
|
+
this.setLabelValue('营业执照', res.data[0].f_business_license)
|
|
438
|
+
},
|
|
439
|
+
// 退款金额
|
|
440
|
+
'refundMoneyChange' (index) {
|
|
441
|
+
let f_cumulative_payment_money = this.show_data.f_cumulative_payment_money
|
|
442
|
+
let f_refund_money = this.show_data.fields[index].value
|
|
443
|
+
|
|
444
|
+
if (f_refund_money > f_cumulative_payment_money) {
|
|
445
|
+
this.$showAlert('退款金额不能大于累计缴费金额!!!', 'warning', 3000)
|
|
446
|
+
this.show_data.fields[index].value = null
|
|
447
|
+
}
|
|
448
|
+
},
|
|
449
|
+
// 检查重复
|
|
450
|
+
'checkRepeat' (index) {
|
|
451
|
+
this.checkDuplicate(index)
|
|
452
|
+
},
|
|
453
|
+
// 选择报建项目
|
|
454
|
+
'selectApply' (row) {
|
|
455
|
+
this.setLabelValue('工程名称', row.f_entry_name)
|
|
456
|
+
this.setLabelValue('工程编号', row.f_apply_num)
|
|
457
|
+
this.setLabelValue('报建类型', row.f_apply_type)
|
|
458
|
+
this.setLabelValue('用户名称', row.f_user_name)
|
|
459
|
+
this.setLabelValue('用户电话', row.f_phone)
|
|
460
|
+
this.setLabelValue('证件类型', row.f_credentials)
|
|
461
|
+
this.setLabelValue('证件号码', row.f_idnumber)
|
|
462
|
+
this.setLabelValue('地址', row.f_address)
|
|
463
|
+
this.setLabelValue('累计缴费金额', row.f_cumulative_payment_money)
|
|
464
|
+
|
|
465
|
+
this.show_data.parentApply = JSON.parse(JSON.stringify(row))
|
|
466
|
+
|
|
467
|
+
delete row.id
|
|
468
|
+
delete row.actid
|
|
469
|
+
delete row.defid
|
|
470
|
+
delete row.defname
|
|
471
|
+
delete row.version
|
|
472
|
+
delete row.f_apply_num
|
|
473
|
+
delete row.f_sub_state
|
|
474
|
+
delete row.f_apply_type
|
|
475
|
+
delete row.f_process_id
|
|
476
|
+
|
|
477
|
+
this.show_data = Object.assign({}, this.show_data, row)
|
|
478
|
+
|
|
479
|
+
this.show_data.f_parent_process_id = this.show_data.parentApply.f_process_id
|
|
480
|
+
},
|
|
481
|
+
// 是否终止
|
|
482
|
+
'isStopChange' (index) {
|
|
483
|
+
let f_is_stop = this.show_data.f_is_stop
|
|
484
|
+
|
|
485
|
+
for (const item of this.show_data.fields) {
|
|
486
|
+
if (f_is_stop === '是') {
|
|
487
|
+
if (item.label === '终止原因') {
|
|
488
|
+
item.hidden = false
|
|
489
|
+
item.required = true
|
|
490
|
+
}
|
|
491
|
+
} else {
|
|
492
|
+
if (item.label === '终止原因') {
|
|
493
|
+
item.hidden = true
|
|
494
|
+
item.required = false
|
|
495
|
+
}
|
|
496
|
+
}
|
|
497
|
+
}
|
|
498
|
+
},
|
|
499
|
+
async 'stopApplyReadyEvent' () {
|
|
500
|
+
|
|
501
|
+
let f_is_stop = this.getLableValue('是否终止')
|
|
502
|
+
|
|
503
|
+
for (const item of this.show_data.fields) {
|
|
504
|
+
if (f_is_stop === '是') {
|
|
505
|
+
if (item.label === '终止原因') {
|
|
506
|
+
item.hidden = false
|
|
507
|
+
item.required = true
|
|
508
|
+
}
|
|
509
|
+
} else {
|
|
510
|
+
if (item.label === '终止原因') {
|
|
511
|
+
item.hidden = true
|
|
512
|
+
item.required = false
|
|
513
|
+
}
|
|
514
|
+
}
|
|
515
|
+
}
|
|
516
|
+
|
|
517
|
+
if (isEmpty(this.show_data.f_parent_process_id)) {
|
|
518
|
+
return
|
|
519
|
+
}
|
|
520
|
+
let data = {
|
|
521
|
+
condition: `f_process_id = '${this.show_data.f_parent_process_id}'`,
|
|
522
|
+
data: {
|
|
523
|
+
id: this.$login.f.id,
|
|
524
|
+
orgid: this.$login.f.orgid
|
|
525
|
+
}
|
|
526
|
+
}
|
|
527
|
+
let res = await this.$resetpost(
|
|
528
|
+
`rs/sql/supervisory`,
|
|
529
|
+
{data: data},
|
|
530
|
+
{resolveMsg: null, rejectMsg: '项目查询失败!!!'}
|
|
531
|
+
)
|
|
532
|
+
this.show_data.parentApply = res.data[0]
|
|
533
|
+
},
|
|
534
|
+
// 选择用户档案信息
|
|
535
|
+
'selectUserinfo' (row) {
|
|
536
|
+
this.setLabelValue('用户编号', row.f_userinfo_code)
|
|
537
|
+
this.setLabelValue('用户名称', row.f_user_name)
|
|
538
|
+
this.setLabelValue('用户电话', row.f_user_phone)
|
|
539
|
+
this.setLabelValue('证件类型', row.f_credentials)
|
|
540
|
+
this.setLabelValue('证件号码', row.f_idnumber)
|
|
541
|
+
this.setLabelValue('地址', row.f_address)
|
|
542
|
+
|
|
543
|
+
this.show_data.f_userinfo_id = row.f_userinfo_id
|
|
544
|
+
this.show_data.f_userinfo_code = row.f_userinfo_code
|
|
545
|
+
},
|
|
546
|
+
// 合同金额失去焦点
|
|
547
|
+
async 'contractMoneyChange' (index) {
|
|
548
|
+
let data = {
|
|
549
|
+
operator: '+',
|
|
550
|
+
num1: this.show_data.f_contract_money || 0,
|
|
551
|
+
num2: this.getLableValue('追加金额') || 0
|
|
552
|
+
}
|
|
553
|
+
let res = await this.$resetpost(
|
|
554
|
+
`rs/logic/compute`,
|
|
555
|
+
{data: data},
|
|
556
|
+
{resolveMsg: null, rejectMsg: '金额计算失败!!!'}
|
|
557
|
+
)
|
|
558
|
+
|
|
559
|
+
this.setLabelValue('应交金额', res.data)
|
|
560
|
+
},
|
|
561
|
+
|
|
562
|
+
// 区县失去焦点
|
|
563
|
+
async 'pcdChange' (index) {
|
|
564
|
+
if (isEmpty(this.show_data.f_pcd)) {
|
|
565
|
+
return
|
|
566
|
+
}
|
|
567
|
+
|
|
568
|
+
this.setLabelValue('街道', null)
|
|
569
|
+
|
|
570
|
+
let data = {
|
|
571
|
+
tablename: 't_street',
|
|
572
|
+
condition: `f_filialeid = '${this.$login.f.orgid}' and f_pcd = '${this.show_data.f_pcd}'`
|
|
573
|
+
}
|
|
574
|
+
let res = await this.$resetpost(
|
|
575
|
+
`rs/sql/singleTable`,
|
|
576
|
+
{data: data},
|
|
577
|
+
{resolveMsg: null, rejectMsg: '街道查询失败!!!'}
|
|
578
|
+
)
|
|
579
|
+
|
|
580
|
+
this.setLabelOptions('街道', res.data.map(item => {
|
|
581
|
+
return {
|
|
582
|
+
label: item.f_street,
|
|
583
|
+
value: item.f_street
|
|
584
|
+
}
|
|
585
|
+
}))
|
|
586
|
+
},
|
|
587
|
+
// 街道失去焦点
|
|
588
|
+
async 'streetChange' (index) {
|
|
589
|
+
if (isEmpty(this.show_data.f_street)) {
|
|
590
|
+
return
|
|
591
|
+
}
|
|
592
|
+
|
|
593
|
+
this.setLabelValue('小区', null)
|
|
594
|
+
|
|
595
|
+
let data = {
|
|
596
|
+
tablename: 't_area',
|
|
597
|
+
condition: `f_filialeid = '${this.$login.f.orgid}' and f_street = '${this.show_data.f_street}'`
|
|
598
|
+
}
|
|
599
|
+
let http = new HttpResetClass()
|
|
600
|
+
let res = await http.load(
|
|
601
|
+
'POST',
|
|
602
|
+
`rs/sql/singleTable`,
|
|
603
|
+
{data: data},
|
|
604
|
+
{resolveMsg: null, rejectMsg: '小区查询失败!!!'}
|
|
605
|
+
)
|
|
606
|
+
|
|
607
|
+
this.setLabelOptions('小区', res.data.map(item => {
|
|
608
|
+
return {
|
|
609
|
+
label: item.f_residential_area,
|
|
610
|
+
value: item.f_residential_area
|
|
611
|
+
}
|
|
612
|
+
}))
|
|
613
|
+
},
|
|
614
|
+
// 地址类型失去焦点
|
|
615
|
+
'addressTypeChange' (index) {
|
|
616
|
+
let f_address_type = this.show_data.f_address_type
|
|
617
|
+
for (const item of this.show_data.fields) {
|
|
618
|
+
if (f_address_type === '民用地址') {
|
|
619
|
+
if (item.label === '区域' || item.label === '街道' || item.label === '小区' ||item.label === '楼号' || item.label === '单元' || item.label === '楼层' || item.label === '门牌号') {
|
|
620
|
+
item.hidden = false
|
|
621
|
+
item.required = true
|
|
622
|
+
item.value = null
|
|
623
|
+
}
|
|
624
|
+
}
|
|
625
|
+
if (f_address_type === '特殊地址') {
|
|
626
|
+
if (item.label === '区域') {
|
|
627
|
+
item.hidden = false
|
|
628
|
+
item.required = true
|
|
629
|
+
item.value = null
|
|
630
|
+
}
|
|
631
|
+
if(item.label === '街道' || item.label === '小区' ||item.label === '楼号' || item.label === '单元' || item.label === '楼层' || item.label === '门牌号'){
|
|
632
|
+
item.hidden = true
|
|
633
|
+
item.required = false
|
|
634
|
+
item.value = null
|
|
635
|
+
}
|
|
636
|
+
}
|
|
637
|
+
if (item.label === '地址') {
|
|
638
|
+
item.value = null
|
|
639
|
+
}
|
|
640
|
+
}
|
|
641
|
+
},
|
|
642
|
+
// 申请节点初始化
|
|
643
|
+
'applyReadyEvent' () {
|
|
644
|
+
this.$getConfig(this, 'UserAddress')
|
|
645
|
+
|
|
646
|
+
let f_address_type = this.show_data.f_address_type
|
|
647
|
+
|
|
648
|
+
for (const item of this.show_data.fields) {
|
|
649
|
+
if (f_address_type === '民用地址') {
|
|
650
|
+
if (item.label === '区域' || item.label === '街道' || item.label === '小区' ||item.label === '楼号' || item.label === '单元' || item.label === '楼层' || item.label === '门牌号') {
|
|
651
|
+
item.hidden = false
|
|
652
|
+
item.required = true
|
|
653
|
+
item.value = null
|
|
654
|
+
}
|
|
655
|
+
}
|
|
656
|
+
if (f_address_type === '特殊地址') {
|
|
657
|
+
if (item.label === '区域') {
|
|
658
|
+
item.hidden = false
|
|
659
|
+
item.required = false
|
|
660
|
+
item.value = null
|
|
661
|
+
}
|
|
662
|
+
}
|
|
663
|
+
|
|
664
|
+
if (this.show_data.f_apply_source === '线下发起' && item.label === '地址') {
|
|
665
|
+
item.hidden = true
|
|
666
|
+
}
|
|
667
|
+
}
|
|
668
|
+
},
|
|
669
|
+
// ===========================================
|
|
670
|
+
async 'button'() {
|
|
671
|
+
if (this.show_data.button.before) {
|
|
672
|
+
await this[this.show_data.button.before]()
|
|
673
|
+
}
|
|
674
|
+
// 点击重置按钮就重置数据
|
|
675
|
+
if (this.show_data.button.button_name === '重置') {
|
|
676
|
+
this.$dispatch('breakControl', this.selectdata)
|
|
677
|
+
return
|
|
678
|
+
}
|
|
679
|
+
|
|
680
|
+
this.show_data.user = this.$login.f
|
|
681
|
+
this.show_data.start_activity = this.$workflow_vue.start_activity
|
|
682
|
+
this.show_data.xmlfilename = this.$workflow_vue.workflow_xmlfilename
|
|
683
|
+
|
|
684
|
+
let res = await this.$resetpost(
|
|
685
|
+
`rs/logic/ApplyProductService`,
|
|
686
|
+
{data: this.show_data},
|
|
687
|
+
{resolveMsg: null, rejectMsg: '数据保存失败'}
|
|
688
|
+
)
|
|
689
|
+
|
|
690
|
+
if (this.show_data.button.after) {
|
|
691
|
+
this[this.show_data.button.after]()
|
|
692
|
+
}
|
|
693
|
+
|
|
694
|
+
|
|
695
|
+
|
|
696
|
+
this.$dispatch('search')
|
|
697
|
+
},
|
|
698
|
+
// 失去焦点出触发事件
|
|
699
|
+
'onchange' (index) {
|
|
700
|
+
|
|
701
|
+
if(this.show_data.defname === '方案确定' && this.$refs.serviceview.model.parentname == '经理部'){
|
|
702
|
+
if(this.show_data.f_budget_no ===''){
|
|
703
|
+
for (const button of this.show_data.buttons) {
|
|
704
|
+
if(button.button_name === '跳过') {
|
|
705
|
+
button.hidden = true
|
|
706
|
+
}}}
|
|
707
|
+
if(this.show_data.fields[index].label==='是否跳过预算'){
|
|
708
|
+
for (const button of this.show_data.buttons) {
|
|
709
|
+
if( (this.show_data.fields[index].value === '否' || this.show_data.fields[index].value ==='') && button.button_name === '跳过') {
|
|
710
|
+
button.hidden = true
|
|
711
|
+
} else {
|
|
712
|
+
button.hidden = false
|
|
713
|
+
}
|
|
714
|
+
}
|
|
715
|
+
}
|
|
716
|
+
}
|
|
717
|
+
if(this.show_data.defname === '合同签订' && this.$refs.serviceview.model.parentname === '经理部'){
|
|
718
|
+
if(this.show_data.f_toll_no ===''){
|
|
719
|
+
for (const button of this.show_data.buttons) {
|
|
720
|
+
if(button.button_name === '跳过') {
|
|
721
|
+
button.hidden = true
|
|
722
|
+
}}}
|
|
723
|
+
if(this.show_data.fields[index].label==='是否跳过收费'){
|
|
724
|
+
for (const button of this.show_data.buttons) {
|
|
725
|
+
if ((this.show_data.fields[index].value === '否' || this.show_data.fields[index].value ==='') && button.button_name === '跳过') {
|
|
726
|
+
button.hidden = true
|
|
727
|
+
} else {
|
|
728
|
+
button.hidden = false
|
|
729
|
+
}
|
|
730
|
+
}
|
|
731
|
+
}
|
|
732
|
+
}
|
|
733
|
+
if(this.show_data.defname === '发起施工' && this.$refs.serviceview.model.parentname === '经理部'){
|
|
734
|
+
if(this.show_data.f_drawing_issuance_no === ''){
|
|
735
|
+
for (const button of this.show_data.buttons) {
|
|
736
|
+
if(button.button_name === '跳过') {
|
|
737
|
+
button.hidden = true
|
|
738
|
+
}}}
|
|
739
|
+
if(this.show_data.fields[index].label==='是否跳过图纸下发'){
|
|
740
|
+
for (const button of this.show_data.buttons) {
|
|
741
|
+
if ((this.show_data.fields[index].value === '否' || this.show_data.fields[index].value ==='') && button.button_name === '跳过') {
|
|
742
|
+
button.hidden = true
|
|
743
|
+
} else {
|
|
744
|
+
button.hidden = false
|
|
745
|
+
}
|
|
746
|
+
}
|
|
747
|
+
}
|
|
748
|
+
}
|
|
749
|
+
|
|
750
|
+
if ((this.show_data.f_apply_type==='工商户报建' ||this.show_data.f_apply_type==='开发商集体报建'||this.show_data.f_apply_type==='预埋管报建')&&this.show_data.defname === '用户受理') {
|
|
751
|
+
if (
|
|
752
|
+
this.show_data.fields[index].label === '街道' ||
|
|
753
|
+
this.show_data.fields[index].label === '区域'
|
|
754
|
+
) {
|
|
755
|
+
|
|
756
|
+
let f_street = this.getLableValue('街道')
|
|
757
|
+
let f_pcd = this.getLableValue('区域')
|
|
758
|
+
|
|
759
|
+
let f_address = null
|
|
760
|
+
|
|
761
|
+
f_address = f_pcd + f_street
|
|
762
|
+
this.setLabelValue('地址',f_address)
|
|
763
|
+
|
|
764
|
+
}
|
|
765
|
+
}
|
|
766
|
+
if(this.show_data.f_apply_type==='散户报建'&& this.show_data.f_address_type==='民用地址' && this.show_data.defname === '用户受理'){
|
|
767
|
+
if (
|
|
768
|
+
this.show_data.fields[index].label === '区域' ||
|
|
769
|
+
this.show_data.fields[index].label === '街道'||
|
|
770
|
+
this.show_data.fields[index].label === '小区'||
|
|
771
|
+
this.show_data.fields[index].label === '楼号' ||
|
|
772
|
+
this.show_data.fields[index].label === '单元'||
|
|
773
|
+
this.show_data.fields[index].label === '楼层' ||
|
|
774
|
+
this.show_data.fields[index].label === '门牌号'
|
|
775
|
+
){
|
|
776
|
+
let f_pcd = this.getLableValue('区域')
|
|
777
|
+
let f_street = this.getLableValue('街道')
|
|
778
|
+
let f_residential_area = this.getLableValue('小区')
|
|
779
|
+
let f_building = this.getLableValue('楼号')
|
|
780
|
+
let f_unit = this.getLableValue('单元')
|
|
781
|
+
let f_floor = this.getLableValue('楼层')
|
|
782
|
+
let f_room = this.getLableValue('门牌号')
|
|
783
|
+
|
|
784
|
+
let f_address = null
|
|
785
|
+
|
|
786
|
+
f_address = f_pcd + f_street + f_residential_area + f_building + f_unit + f_floor + f_room
|
|
787
|
+
this.setLabelValue('地址',f_address)
|
|
788
|
+
}
|
|
789
|
+
}
|
|
790
|
+
if(this.show_data.f_apply_type==='散户报建'&& this.show_data.f_address_type==='特殊地址' && this.show_data.defname === '用户受理'){
|
|
791
|
+
if (
|
|
792
|
+
this.show_data.fields[index].label === '区域'
|
|
793
|
+
){
|
|
794
|
+
let f_pcd = this.getLableValue('区域')
|
|
795
|
+
|
|
796
|
+
let f_address = null
|
|
797
|
+
|
|
798
|
+
f_address = f_pcd
|
|
799
|
+
this.setLabelValue('地址',f_address)
|
|
800
|
+
}
|
|
801
|
+
}
|
|
802
|
+
|
|
803
|
+
|
|
804
|
+
|
|
805
|
+
},
|
|
806
|
+
'onblur' (index) {},
|
|
807
|
+
'oninput' (index) {},
|
|
808
|
+
'initializtionView' () {},
|
|
809
|
+
async 'onchangeModal' (index, fieldIndex) {
|
|
810
|
+
},
|
|
811
|
+
async 'onblurModal' (index, fieldIndex) {
|
|
812
|
+
|
|
813
|
+
},
|
|
814
|
+
async 'oninputModal' (index, fieldIndex) {
|
|
815
|
+
|
|
816
|
+
},
|
|
817
|
+
async 'onetomanydelete' (index, rowIndex) {
|
|
818
|
+
|
|
819
|
+
let http = new HttpResetClass()
|
|
820
|
+
|
|
821
|
+
let res = await http.load(
|
|
822
|
+
'DELETE',
|
|
823
|
+
`rs/entity/${this.show_data.onetomany[index].tables[0]}/${this.show_data.onetomany[index].rows[rowIndex].id}`,
|
|
824
|
+
null,
|
|
825
|
+
{resolveMsg: null, rejectMsg: '删除失败!!!'}
|
|
826
|
+
)
|
|
827
|
+
|
|
828
|
+
this.$dispatch('breakControl', this.show_data)
|
|
829
|
+
},
|
|
830
|
+
async 'onetomanyupdate' (index, rowIndex) {
|
|
831
|
+
let data = this.show_data.onetomany[index].rows[rowIndex]
|
|
832
|
+
|
|
833
|
+
this.show_data.onetomany[index].fields.forEach(item => {
|
|
834
|
+
data[item.field] = item.value
|
|
835
|
+
})
|
|
836
|
+
let res = await this.$resetpost(
|
|
837
|
+
`rs/entity/${this.show_data.onetomany[index].tables[0]}`,
|
|
838
|
+
data
|
|
839
|
+
)
|
|
840
|
+
|
|
841
|
+
this.$dispatch('breakControl', this.show_data)
|
|
842
|
+
},
|
|
843
|
+
async 'onetomanyadd' (index) {
|
|
844
|
+
let data = {
|
|
845
|
+
f_process_id : this.show_data.f_process_id,
|
|
846
|
+
f_operator_id: this.$login.f.id,
|
|
847
|
+
f_operator: this.$login.f.name,
|
|
848
|
+
f_operation_date: new Date(),
|
|
849
|
+
f_orgid: this.$login.f.orgid,
|
|
850
|
+
f_orgname: this.$login.f.orgs
|
|
851
|
+
}
|
|
852
|
+
this.show_data.onetomany[index].fields.forEach(item => {
|
|
853
|
+
data[item.field] = item.value
|
|
854
|
+
})
|
|
855
|
+
let res = await this.$resetpost(
|
|
856
|
+
`rs/entity/${this.show_data.onetomany[index].tables[0]}`,
|
|
857
|
+
data
|
|
858
|
+
)
|
|
859
|
+
this.$dispatch('breakControl', this.show_data)
|
|
860
|
+
},
|
|
861
|
+
'onbutchange' (index) {
|
|
862
|
+
|
|
863
|
+
},
|
|
864
|
+
'onbutblur' (index) {
|
|
865
|
+
|
|
866
|
+
},
|
|
867
|
+
'onbutinput' (index) {
|
|
868
|
+
|
|
869
|
+
}
|
|
870
|
+
},
|
|
871
|
+
watch: {
|
|
872
|
+
}
|
|
873
|
+
}
|
|
874
|
+
</script>
|
|
875
|
+
<style scoped>
|
|
876
|
+
/*清除model中的浮动*/
|
|
877
|
+
.clearfix:after,.clearfix:before{
|
|
878
|
+
display: table;
|
|
879
|
+
}
|
|
880
|
+
.clearfix:after{
|
|
881
|
+
clear: both;
|
|
882
|
+
}
|
|
883
|
+
</style>
|