apply-clients 3.5.6-2 → 3.5.6-21
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/build/dev-server.js +4 -4
- package/package.json +1 -1
- package/src/filiale/dingcheng/android/AppInstallationDetails.vue +477 -478
- package/src/filiale/dingcheng/pc/InstallationDetails.vue +607 -608
- package/src/filiale/fugou/android/AppDevicesManagement.vue +516 -521
- package/src/filiale/fugou/android/AppInstallationDetails.vue +541 -542
- package/src/filiale/fugou/pc/ServiceControl.vue +9 -0
- package/src/filiale/gongyi/pc/chargeManagement.vue +765 -765
- package/src/filiale/jinhuang/pc/Applybatchdispatch.vue +770 -0
- package/src/filiale/jinhuang/pc/ContractList.vue +222 -220
- package/src/filiale/jinhuang/pc/ServiceControl.vue +2016 -2016
- package/src/filiale/jinhuang/pc/SupervisoryList.vue +478 -459
- package/src/filiale/jinhuang/pc.js +2 -1
- package/src/filiale/shexian/android/AppServiceControl.vue +18 -1
- package/src/filiale/yangchunboneng/android/AppChargeManagement.vue +1 -1
- package/src/filiale/yangchunboneng/android/AppInstallationMaterial.vue +1 -1
- package/src/filiale/yangchunboneng/android/AppOtherChargeList.vue +281 -0
- package/src/filiale/yangchunboneng/android/AppServiceControl.vue +4 -0
- package/src/filiale/yangchunboneng/android.js +2 -1
- package/src/filiale/yangchunboneng/pc/ExplorationSelect.vue +622 -612
- package/src/filiale/yangchunboneng/pc/InstallInfoSelect.vue +400 -365
- package/src/filiale/yangchunboneng/pc/ServiceControl.vue +4 -0
- package/src/filiale/yangchunboneng/pc/SupervisoryList.vue +30 -3
- package/src/filiale/yangchunboneng/pc/chargeManagement.vue +9 -6
- package/src/main.js +1 -1
|
@@ -1,2016 +1,2016 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<div class="" v-if="showview">
|
|
3
|
-
<show-back-reason :selectdata="show_data"></show-back-reason>
|
|
4
|
-
<service-view v-ref:serviceview :data="show_data"></service-view>
|
|
5
|
-
</div>
|
|
6
|
-
</template>
|
|
7
|
-
<script>
|
|
8
|
-
import Vue from 'vue'
|
|
9
|
-
import {HttpResetClass} from 'vue-client'
|
|
10
|
-
import {isEmpty} from "../../../components/Util";
|
|
11
|
-
|
|
12
|
-
// Date格式化
|
|
13
|
-
Date.prototype.Format = function (fmt) {
|
|
14
|
-
var o = {
|
|
15
|
-
"M+": this.getMonth() + 1, //月份
|
|
16
|
-
"d+": this.getDate(), //日
|
|
17
|
-
"H+": this.getHours(), //小时
|
|
18
|
-
"m+": this.getMinutes(), //分
|
|
19
|
-
"s+": this.getSeconds(), //秒
|
|
20
|
-
"q+": Math.floor((this.getMonth() + 3) / 3), //季度
|
|
21
|
-
"S": this.getMilliseconds() //毫秒
|
|
22
|
-
};
|
|
23
|
-
if (/(y+)/.test(fmt)) fmt = fmt.replace(RegExp.$1, (this.getFullYear() + "").substr(4 - RegExp.$1.length));
|
|
24
|
-
for (var k in o)
|
|
25
|
-
if (new RegExp("(" + k + ")").test(fmt)) fmt = fmt.replace(RegExp.$1, (RegExp.$1.length == 1) ? (o[k]) : (("00" + o[k]).substr(("" + o[k]).length)));
|
|
26
|
-
return fmt;
|
|
27
|
-
}
|
|
28
|
-
|
|
29
|
-
export default {
|
|
30
|
-
title: '报建流程业务控制层',
|
|
31
|
-
props: ['selectdata'],
|
|
32
|
-
data () {
|
|
33
|
-
return {
|
|
34
|
-
data: null, // 数据库数据,json配置文件数据的数据集合
|
|
35
|
-
json_datas: null, // Json配置文件集合
|
|
36
|
-
showview: false, // 控制显示service-view组件
|
|
37
|
-
show_data: null, // 给view层显示的数据
|
|
38
|
-
config: {},
|
|
39
|
-
Pricetype:''
|
|
40
|
-
}
|
|
41
|
-
},
|
|
42
|
-
ready () {
|
|
43
|
-
this.refurbish()
|
|
44
|
-
},
|
|
45
|
-
methods: {
|
|
46
|
-
async servicer(){
|
|
47
|
-
let data = {
|
|
48
|
-
tablename: 't_user',
|
|
49
|
-
condition: `1=1`
|
|
50
|
-
}
|
|
51
|
-
let http = new HttpResetClass()
|
|
52
|
-
let res = await http.load(
|
|
53
|
-
'POST',
|
|
54
|
-
`rs/sql/apply_singleTable`,
|
|
55
|
-
{data: data},
|
|
56
|
-
{resolveMsg: null, rejectMsg: '服务人查询失败!!!'}
|
|
57
|
-
)
|
|
58
|
-
this.setLabelOptions('服务人', res.data.map(item => {
|
|
59
|
-
return {
|
|
60
|
-
label: item.name,
|
|
61
|
-
value: item.name
|
|
62
|
-
}
|
|
63
|
-
}))
|
|
64
|
-
},
|
|
65
|
-
async ceshi(){
|
|
66
|
-
for (let i = 0; i < this.show_data.fields.length; i++) {
|
|
67
|
-
if (this.show_data.defname==='报装申请' && this.show_data.fields[i].label === '合同编号') {
|
|
68
|
-
let http2 = new HttpResetClass()
|
|
69
|
-
let applyNum = await http2.load('POST', 'rs/logic/getProjectNo', {
|
|
70
|
-
data: {
|
|
71
|
-
f_filiale: this.$login.f.orgs,
|
|
72
|
-
f_order_id: this.selectdata.f_order_id
|
|
73
|
-
}
|
|
74
|
-
}, {resolveMsg: null, rejectMsg: null})
|
|
75
|
-
console.log("生成的合同编号为:" + applyNum.data)
|
|
76
|
-
this.show_data.fields[i].value = applyNum.data
|
|
77
|
-
}
|
|
78
|
-
}
|
|
79
|
-
},
|
|
80
|
-
|
|
81
|
-
// 组件初始化操作
|
|
82
|
-
async refurbish() {
|
|
83
|
-
this.json_datas = this.$workflow_vue
|
|
84
|
-
let sum = 0
|
|
85
|
-
let jsonData = {}
|
|
86
|
-
if (!this.json_datas || !this.json_datas.activitys || this.json_datas.activitys.length === 0) {
|
|
87
|
-
this.$showMessage("网络故障,请刷新页面")
|
|
88
|
-
return
|
|
89
|
-
}
|
|
90
|
-
this.json_datas.activitys.forEach(item => {
|
|
91
|
-
if (this.selectdata.defname === item.title) {
|
|
92
|
-
jsonData = item // 拿到当前节点的json配置信息
|
|
93
|
-
sum++ // 节点名一样的个数
|
|
94
|
-
}
|
|
95
|
-
return this.selectdata.defname === item.title // 拿到当前节点的json配置信息
|
|
96
|
-
})
|
|
97
|
-
|
|
98
|
-
if (sum === 0) {
|
|
99
|
-
this.$showMessage(`没有在JSON配置文件中找到活动名为:(${this.selectdata.defname})的节点配置`)
|
|
100
|
-
return
|
|
101
|
-
}
|
|
102
|
-
if (sum > 1) {
|
|
103
|
-
this.$showMessage(`在JSON配置文件中找到活动名为:(${this.selectdata.defname})的节点配置:${sum}个`)
|
|
104
|
-
return
|
|
105
|
-
}
|
|
106
|
-
|
|
107
|
-
this.selectdata = Object.assign({}, this.selectdata, jsonData)
|
|
108
|
-
|
|
109
|
-
// fields 字段填充值
|
|
110
|
-
for (const item of this.selectdata.fields) {
|
|
111
|
-
if (!item.value) {
|
|
112
|
-
item.value = null
|
|
113
|
-
}
|
|
114
|
-
if(this.selectdata.f_apply_type === '集体报建' && this.selectdata.defname === '报装缴费'){
|
|
115
|
-
if(item.label === '未结总金额'){
|
|
116
|
-
item.value = this.selectdata.f_due_money - this.selectdata.f_cumulative_payment_money
|
|
117
|
-
}
|
|
118
|
-
if(item.label === '付款比例'){
|
|
119
|
-
item.value = (this.selectdata.f_cumulative_payment_money/this.selectdata.f_due_money * 100) + '%'
|
|
120
|
-
}
|
|
121
|
-
}
|
|
122
|
-
if (!item.value && (item.default || item.default === 0) && item.type !== 'datepicker') {
|
|
123
|
-
if (item.eval) {
|
|
124
|
-
item.value = eval(item.default)
|
|
125
|
-
} else {
|
|
126
|
-
item.value = item.default
|
|
127
|
-
}
|
|
128
|
-
}
|
|
129
|
-
|
|
130
|
-
if (this.selectdata[item.field]) {
|
|
131
|
-
// 将json字符串格式化赋值给value
|
|
132
|
-
if (String(this.selectdata[item.field]).startsWith("{")) {
|
|
133
|
-
item.value = JSON.parse(this.selectdata[item.field])
|
|
134
|
-
} else {
|
|
135
|
-
item.value = this.selectdata[item.field]
|
|
136
|
-
}
|
|
137
|
-
}
|
|
138
|
-
if (this.selectdata[item.field] === 0) {
|
|
139
|
-
item.value = 0
|
|
140
|
-
}
|
|
141
|
-
|
|
142
|
-
// datepicker
|
|
143
|
-
if (item.type === 'datepicker' && !item.value && item.default) {
|
|
144
|
-
item.value = new Date().Format(`${item.format ? item.format : 'yyyy-MM-dd HH:mm:ss'}`)
|
|
145
|
-
}
|
|
146
|
-
// 如果配置类型为select,优先从参数列表获取options
|
|
147
|
-
if (item.type === 'select' || item.type === 'checkbox') {
|
|
148
|
-
if (item.param) {
|
|
149
|
-
let temp = this.$appdata.getParam(item.label)
|
|
150
|
-
|
|
151
|
-
if (temp && temp.length > 0) {
|
|
152
|
-
item.options = temp
|
|
153
|
-
}
|
|
154
|
-
|
|
155
|
-
if (item.paramLabel) {
|
|
156
|
-
temp = this.$appdata.getParam(item.paramLabel)
|
|
157
|
-
if (temp && temp.length > 0) {
|
|
158
|
-
item.options = temp
|
|
159
|
-
}
|
|
160
|
-
}
|
|
161
|
-
}
|
|
162
|
-
|
|
163
|
-
if (item.ready) {
|
|
164
|
-
console.log(item.ready)
|
|
165
|
-
item.options = await this[item.ready]()
|
|
166
|
-
|
|
167
|
-
}
|
|
168
|
-
}
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
if (item.type === 'checkbox') {
|
|
172
|
-
if (this.selectdata[item.field]) {
|
|
173
|
-
item.value = JSON.parse(this.selectdata[item.field])
|
|
174
|
-
} else {
|
|
175
|
-
item.value = []
|
|
176
|
-
}
|
|
177
|
-
}
|
|
178
|
-
|
|
179
|
-
this.selectdata[item.field] = item.value
|
|
180
|
-
}
|
|
181
|
-
|
|
182
|
-
// 控制组件
|
|
183
|
-
if (this.selectdata.components) {
|
|
184
|
-
this.selectdata.components.forEach(item => {
|
|
185
|
-
if (!item.mark) {
|
|
186
|
-
item.mark = 0
|
|
187
|
-
}
|
|
188
|
-
})
|
|
189
|
-
}
|
|
190
|
-
// 初始化onetomany
|
|
191
|
-
if (this.selectdata.onetomany) {
|
|
192
|
-
for (const item of this.selectdata.onetomany) {
|
|
193
|
-
let res = null
|
|
194
|
-
if (item.queryEvent) {
|
|
195
|
-
res = this[item.queryEvent]()
|
|
196
|
-
} else {
|
|
197
|
-
let data = {
|
|
198
|
-
tablename: item.tables[0],
|
|
199
|
-
condition: `f_process_id='${this.selectdata.f_process_id}'`
|
|
200
|
-
}
|
|
201
|
-
res = await this.$resetpost(
|
|
202
|
-
'rs/sql/apply_singleTable',
|
|
203
|
-
{data: data},
|
|
204
|
-
{resolveMsg: null, rejectMsg: 'onetomany查询失败'}
|
|
205
|
-
)
|
|
206
|
-
}
|
|
207
|
-
|
|
208
|
-
item.rows = res.data
|
|
209
|
-
|
|
210
|
-
// 初始化onetomany中的fields
|
|
211
|
-
for (const field of item.fields) {
|
|
212
|
-
if (!field.value) {
|
|
213
|
-
if (field.value !== 0) {
|
|
214
|
-
field.value = null
|
|
215
|
-
}
|
|
216
|
-
}
|
|
217
|
-
|
|
218
|
-
if (field.default || field.default === 0) {
|
|
219
|
-
field.value = field.default
|
|
220
|
-
}
|
|
221
|
-
|
|
222
|
-
// datepicker
|
|
223
|
-
if (field.type === 'datepicker' && !field.value && field.default) {
|
|
224
|
-
field.value = new Date().Format(`${field.format ? field.format : 'yyyy-MM-dd HH:mm:ss'}`)
|
|
225
|
-
}
|
|
226
|
-
|
|
227
|
-
if (field.type === 'select') {
|
|
228
|
-
|
|
229
|
-
let temp = this.$appdata.getParam(field.label)
|
|
230
|
-
|
|
231
|
-
if (temp && temp.length > 0) {
|
|
232
|
-
field.options = temp
|
|
233
|
-
}
|
|
234
|
-
|
|
235
|
-
if (field.paramLabel) {
|
|
236
|
-
temp = this.$appdata.getParam(field.paramLabel)
|
|
237
|
-
if (temp && temp.length > 0) {
|
|
238
|
-
item.options = temp
|
|
239
|
-
}
|
|
240
|
-
}
|
|
241
|
-
}
|
|
242
|
-
}
|
|
243
|
-
}
|
|
244
|
-
}
|
|
245
|
-
// 初始化 buttons_fields
|
|
246
|
-
for (const item of this.selectdata.buttons) {
|
|
247
|
-
if (item.button_name === '下发') {
|
|
248
|
-
|
|
249
|
-
let data = {
|
|
250
|
-
source: item.source,
|
|
251
|
-
userid: this.$login.f.id
|
|
252
|
-
}
|
|
253
|
-
if (item.sourceMethod) {
|
|
254
|
-
data.source = this[item.sourceMethod]()
|
|
255
|
-
}
|
|
256
|
-
if (!data.source) {
|
|
257
|
-
this.$showMessage("请配置获取人员表达式")
|
|
258
|
-
return
|
|
259
|
-
}
|
|
260
|
-
|
|
261
|
-
let res = await this.$resetpost(
|
|
262
|
-
'rs/search',
|
|
263
|
-
{data: data},
|
|
264
|
-
{resolveMsg: null, rejectMsg: '下发人员查询失败!!!'}
|
|
265
|
-
)
|
|
266
|
-
|
|
267
|
-
let options = res.data.map(source => {
|
|
268
|
-
return {
|
|
269
|
-
"label": source.name,
|
|
270
|
-
"value": source.id
|
|
271
|
-
}
|
|
272
|
-
})
|
|
273
|
-
|
|
274
|
-
if (item.button_fields.length !== 1) {
|
|
275
|
-
this.$showMessage("下发有且只能有一个字段!!!")
|
|
276
|
-
return
|
|
277
|
-
}
|
|
278
|
-
|
|
279
|
-
item.button_fields[0].options = options
|
|
280
|
-
}
|
|
281
|
-
if (item.button_fields) {
|
|
282
|
-
item.button_fields.forEach(x => {
|
|
283
|
-
// 如果配置类型为select,优先从参数列表获取options
|
|
284
|
-
if (x.type === 'select') {
|
|
285
|
-
|
|
286
|
-
if (x.param) {
|
|
287
|
-
let temp = this.$appdata.getParam(x.label)
|
|
288
|
-
|
|
289
|
-
if (temp && temp.length > 0) {
|
|
290
|
-
x.options = temp
|
|
291
|
-
}
|
|
292
|
-
|
|
293
|
-
if (x.paramLabel) {
|
|
294
|
-
temp = this.$appdata.getParam(x.paramLabel)
|
|
295
|
-
if (temp && temp.length > 0) {
|
|
296
|
-
x.options = temp
|
|
297
|
-
}
|
|
298
|
-
}
|
|
299
|
-
}
|
|
300
|
-
|
|
301
|
-
}
|
|
302
|
-
})
|
|
303
|
-
}
|
|
304
|
-
}
|
|
305
|
-
// 消除双向绑定,避免子组件(显示层)数据更改,父组件(控制层)也更改
|
|
306
|
-
let temp = JSON.parse(JSON.stringify(this.selectdata))
|
|
307
|
-
console.log('打印下temp',temp)
|
|
308
|
-
this.show_data = temp
|
|
309
|
-
for (const item of this.show_data.fields) {
|
|
310
|
-
if(item.label=='气价名称' && !isEmpty(this.show_data.f_price_name)){
|
|
311
|
-
if(item.label==='气价名称'){
|
|
312
|
-
item.value=this.show_data.f_price_name
|
|
313
|
-
}
|
|
314
|
-
}
|
|
315
|
-
}
|
|
316
|
-
this.$nextTick(() => {
|
|
317
|
-
this.showview = true
|
|
318
|
-
})
|
|
319
|
-
},
|
|
320
|
-
// 金额转大写
|
|
321
|
-
smalltoBIG(n) {
|
|
322
|
-
let fraction = ['角', '分'];
|
|
323
|
-
let digit = ['零', '壹', '贰', '叁', '肆', '伍', '陆', '柒', '捌', '玖'];
|
|
324
|
-
let unit = [['元', '万', '亿'], ['', '拾', '佰', '仟']];
|
|
325
|
-
let head = n < 0 ? '欠' : '';
|
|
326
|
-
n = Math.abs(n);
|
|
327
|
-
|
|
328
|
-
let s = '';
|
|
329
|
-
|
|
330
|
-
for (var i = 0; i < fraction.length; i++) {
|
|
331
|
-
s += (digit[Math.floor(n * 10 * Math.pow(10, i)) % 10] + fraction[i]).replace(/零./, '');
|
|
332
|
-
}
|
|
333
|
-
s = s || '整';
|
|
334
|
-
n = Math.floor(n);
|
|
335
|
-
|
|
336
|
-
for (var i = 0; i < unit[0].length && n > 0; i++) {
|
|
337
|
-
let p = '';
|
|
338
|
-
for (var j = 0; j < unit[1].length && n > 0; j++) {
|
|
339
|
-
p = digit[n % 10] + unit[1][j] + p;
|
|
340
|
-
n = Math.floor(n / 10);
|
|
341
|
-
}
|
|
342
|
-
s = p.replace(/(零.)*零$/, '').replace(/^$/, '零') + unit[0][i] + s;
|
|
343
|
-
}
|
|
344
|
-
return head + s.replace(/(零.)*零元/, '元').replace(/(零.)+/g, '零').replace(/^整$/, '零元整')
|
|
345
|
-
},
|
|
346
|
-
getLableValue(label) {
|
|
347
|
-
for (const item of this.show_data.fields) {
|
|
348
|
-
if (item.label === label && item.type !== 'number') {
|
|
349
|
-
return item.value || ''
|
|
350
|
-
}
|
|
351
|
-
if (item.label === label && item.type === 'number') {
|
|
352
|
-
return item.value || 0
|
|
353
|
-
}
|
|
354
|
-
}
|
|
355
|
-
},
|
|
356
|
-
getLableOptions(label) {
|
|
357
|
-
for (const item of this.show_data.fields) {
|
|
358
|
-
if (item.label === label) {
|
|
359
|
-
return item.options
|
|
360
|
-
}
|
|
361
|
-
}
|
|
362
|
-
},
|
|
363
|
-
setLabelValue(label, value) {
|
|
364
|
-
for (const item of this.show_data.fields) {
|
|
365
|
-
if (item.label === label) {
|
|
366
|
-
item.value = value
|
|
367
|
-
this.show_data[item.field] = value
|
|
368
|
-
}
|
|
369
|
-
}
|
|
370
|
-
},
|
|
371
|
-
setLabelOptions(label, options) {
|
|
372
|
-
for (const item of this.show_data.fields) {
|
|
373
|
-
if (item.label === label) {
|
|
374
|
-
item.options = options
|
|
375
|
-
}
|
|
376
|
-
}
|
|
377
|
-
},
|
|
378
|
-
showLabels(...labels) {
|
|
379
|
-
for (const item of this.show_data.fields) {
|
|
380
|
-
if (labels.includes(item.label)) {
|
|
381
|
-
item.hidden = false
|
|
382
|
-
}
|
|
383
|
-
}
|
|
384
|
-
},
|
|
385
|
-
hideLabels(...labels) {
|
|
386
|
-
for (const item of this.show_data.fields) {
|
|
387
|
-
if (labels.includes(item.label)) {
|
|
388
|
-
item.hidden = true
|
|
389
|
-
}
|
|
390
|
-
}
|
|
391
|
-
},
|
|
392
|
-
requiredLabels(...labels) {
|
|
393
|
-
for (const item of this.show_data.fields) {
|
|
394
|
-
if (labels.includes(item.label)) {
|
|
395
|
-
item.required = true
|
|
396
|
-
}
|
|
397
|
-
}
|
|
398
|
-
},
|
|
399
|
-
electiveLabels(...labels) {
|
|
400
|
-
for (const item of this.show_data.fields) {
|
|
401
|
-
if (labels.includes(item.label)) {
|
|
402
|
-
item.required = false
|
|
403
|
-
}
|
|
404
|
-
}
|
|
405
|
-
},
|
|
406
|
-
readonlyLabels(...labels) {
|
|
407
|
-
for (const item of this.show_data.fields) {
|
|
408
|
-
if (labels.includes(item.label)) {
|
|
409
|
-
item.readonly = true
|
|
410
|
-
item.disabled = true
|
|
411
|
-
}
|
|
412
|
-
}
|
|
413
|
-
},
|
|
414
|
-
readwriteLabels(...labels) {
|
|
415
|
-
for (const item of this.show_data.fields) {
|
|
416
|
-
if (labels.includes(item.label)) {
|
|
417
|
-
item.readonly = false
|
|
418
|
-
item.disabled = false
|
|
419
|
-
}
|
|
420
|
-
}
|
|
421
|
-
},
|
|
422
|
-
disabledButtons(...buttons) {
|
|
423
|
-
for (const item of this.show_data.buttons) {
|
|
424
|
-
if (buttons.includes(item.button_name)) {
|
|
425
|
-
item.disabled = true
|
|
426
|
-
}
|
|
427
|
-
}
|
|
428
|
-
},
|
|
429
|
-
enableButtons(...buttons) {
|
|
430
|
-
for (const item of this.show_data.buttons) {
|
|
431
|
-
if (buttons.includes(item.button_name)) {
|
|
432
|
-
item.disabled = false
|
|
433
|
-
}
|
|
434
|
-
}
|
|
435
|
-
},
|
|
436
|
-
showButtons(...buttons) {
|
|
437
|
-
for (const item of this.show_data.buttons) {
|
|
438
|
-
if (buttons.includes(item.button_name)) {
|
|
439
|
-
item.hidden = false
|
|
440
|
-
}
|
|
441
|
-
}
|
|
442
|
-
},
|
|
443
|
-
hideButtons(...buttons) {
|
|
444
|
-
for (const item of this.show_data.buttons) {
|
|
445
|
-
if (buttons.includes(item.button_name)) {
|
|
446
|
-
item.hidden = true
|
|
447
|
-
}
|
|
448
|
-
}
|
|
449
|
-
},
|
|
450
|
-
async checkDuplicate(index) {
|
|
451
|
-
let http = new HttpResetClass()
|
|
452
|
-
let data = {
|
|
453
|
-
tablename: 't_apply',
|
|
454
|
-
condition: `${this.show_data.fields[index].field} = '${this.show_data.fields[index].value}'`
|
|
455
|
-
}
|
|
456
|
-
let res = await http.load('POST', 'rs/sql/apply_singleTable', {data: data}, {
|
|
457
|
-
resolveMsg: null,
|
|
458
|
-
rejectMsg: `${this.show_data.fields[index].label}查询失败`
|
|
459
|
-
})
|
|
460
|
-
if (res.data.length > 0) {
|
|
461
|
-
this.show_data.fields[index].value = null
|
|
462
|
-
this.$showAlert(`${this.show_data.fields[index].label}已存在!!!`, 'warning', 3000)
|
|
463
|
-
}
|
|
464
|
-
},
|
|
465
|
-
// 获取片区
|
|
466
|
-
async getSliceArea () {
|
|
467
|
-
let data = {
|
|
468
|
-
tablename: 't_zone',
|
|
469
|
-
condition: `f_orgid = '${this.$login.f.orgid}'`
|
|
470
|
-
}
|
|
471
|
-
let http = new HttpResetClass()
|
|
472
|
-
let res = await http.load(
|
|
473
|
-
'POST',
|
|
474
|
-
`rs/sql/apply_singleTable`,
|
|
475
|
-
{data: data},
|
|
476
|
-
{resolveMsg: null, rejectMsg: '片区查询失败!!!'}
|
|
477
|
-
)
|
|
478
|
-
|
|
479
|
-
return res.data.map(item => {
|
|
480
|
-
return {
|
|
481
|
-
label: item.name,
|
|
482
|
-
value: item.name
|
|
483
|
-
}
|
|
484
|
-
})
|
|
485
|
-
},
|
|
486
|
-
// 获取区县
|
|
487
|
-
async getPcd () {
|
|
488
|
-
let data = {
|
|
489
|
-
tablename: 't_pcd',
|
|
490
|
-
condition: `f_orgid = '${this.$login.f.orgid}'`
|
|
491
|
-
}
|
|
492
|
-
let http = new HttpResetClass()
|
|
493
|
-
let res = await http.load(
|
|
494
|
-
'POST',
|
|
495
|
-
`rs/sql/apply_singleTable`,
|
|
496
|
-
{data: data},
|
|
497
|
-
{resolveMsg: null, rejectMsg: '区县查询失败!!!'}
|
|
498
|
-
)
|
|
499
|
-
|
|
500
|
-
return res.data.map(item => {
|
|
501
|
-
return {
|
|
502
|
-
label: item.f_pcd,
|
|
503
|
-
value: item.f_pcd
|
|
504
|
-
}
|
|
505
|
-
})
|
|
506
|
-
},
|
|
507
|
-
// 获取集收单位
|
|
508
|
-
async getArea () {
|
|
509
|
-
let data = {
|
|
510
|
-
tablename: 't_area',
|
|
511
|
-
condition: `f_orgid = '${this.$login.f.orgid}'`
|
|
512
|
-
}
|
|
513
|
-
let http = new HttpResetClass()
|
|
514
|
-
let res = await http.load(
|
|
515
|
-
'POST',
|
|
516
|
-
`rs/sql/apply_singleTable`,
|
|
517
|
-
{data: data},
|
|
518
|
-
{resolveMsg: null, rejectMsg: '集收单位查询失败!!!'}
|
|
519
|
-
)
|
|
520
|
-
|
|
521
|
-
return res.data.map(item => {
|
|
522
|
-
return {
|
|
523
|
-
label: item.f_residential_area,
|
|
524
|
-
value: item.f_residential_area
|
|
525
|
-
}
|
|
526
|
-
})
|
|
527
|
-
},
|
|
528
|
-
async getAreaNew () {
|
|
529
|
-
let data = {
|
|
530
|
-
tablename: 't_area',
|
|
531
|
-
condition: `f_orgid = '${this.$login.f.orgid}'`
|
|
532
|
-
}
|
|
533
|
-
let http = new HttpResetClass()
|
|
534
|
-
let res = await http.load(
|
|
535
|
-
'POST',
|
|
536
|
-
`rs/sql/apply_singleTable`,
|
|
537
|
-
{data: data},
|
|
538
|
-
{resolveMsg: null, rejectMsg: '集收单位查询失败!!!'}
|
|
539
|
-
)
|
|
540
|
-
let area=[]
|
|
541
|
-
for (const item of res.data) {
|
|
542
|
-
area.push({
|
|
543
|
-
label: item.f_residential_area,
|
|
544
|
-
value: item.f_residential_area
|
|
545
|
-
})
|
|
546
|
-
}
|
|
547
|
-
for (const item of this.show_data.fields) {
|
|
548
|
-
if (item.label ==='集收单位') {
|
|
549
|
-
item.options = area
|
|
550
|
-
}
|
|
551
|
-
}
|
|
552
|
-
},
|
|
553
|
-
// 缴费前置
|
|
554
|
-
chargeBefore () {
|
|
555
|
-
if (Number(this.show_data.f_due_money) > Number(this.show_data.f_cumulative_payment_money) || Number(this.show_data.f_surplus_money) > 0) {
|
|
556
|
-
this.$showAlert('费用未结清!!!', 'warning', 3000)
|
|
557
|
-
throw null
|
|
558
|
-
}
|
|
559
|
-
},
|
|
560
|
-
// 施工前置 加表具后状态是待开通 提交后是正常 所以这里的判断条件需改正 (and uf.f_meter_classify is null and f_meternumber is null)
|
|
561
|
-
async constructionBefore () {
|
|
562
|
-
let http = new HttpResetClass()
|
|
563
|
-
let data = {
|
|
564
|
-
condition: `ui.f_process_id = '${this.show_data.f_process_id}' and uf.f_meter_classify is null and f_meternumber is null`
|
|
565
|
-
}
|
|
566
|
-
let res = await http.load(
|
|
567
|
-
'POST',
|
|
568
|
-
'rs/sql/countApplyUserinfo',
|
|
569
|
-
{data: data},
|
|
570
|
-
{
|
|
571
|
-
resolveMsg: null,
|
|
572
|
-
rejectMsg: '安装明细查询失败!!!'
|
|
573
|
-
})
|
|
574
|
-
if (res.data[0].num > 0) {
|
|
575
|
-
this.$showAlert(`还有${res.data[0].num}户未安装,无法提交`, 'warning', 3000)
|
|
576
|
-
throw `还有${res.data[0].num}户未安装,无法提交`
|
|
577
|
-
}
|
|
578
|
-
},
|
|
579
|
-
changePipeBuild () {
|
|
580
|
-
if (this.selectdata.f_process_dep === '工程部') {
|
|
581
|
-
return 'this.getParentByType($organization$).getChildByName($工程部报装$).getChildren()'
|
|
582
|
-
}
|
|
583
|
-
if (this.selectdata.f_process_dep === '运营部') {
|
|
584
|
-
return 'this.getParentByType($organization$).getChildByName($运营部报装$).getChildren()'
|
|
585
|
-
}
|
|
586
|
-
return 'this.getParentByType($organization$).getChildByName($工程部报装$).getChildren()'
|
|
587
|
-
},
|
|
588
|
-
// async getDevInfo () {
|
|
589
|
-
// let data = {
|
|
590
|
-
// tablename: 't_dev_info',
|
|
591
|
-
// condition: `f_orgid = '${this.$login.f.orgid}'`
|
|
592
|
-
// }
|
|
593
|
-
// let http = new HttpResetClass()
|
|
594
|
-
// let res = await http.load(
|
|
595
|
-
// 'POST',
|
|
596
|
-
// `rs/sql/apply_singleTable`,
|
|
597
|
-
// {data: data},
|
|
598
|
-
// {resolveMsg: null, rejectMsg: '公司查询失败!!!'}
|
|
599
|
-
// )
|
|
600
|
-
//
|
|
601
|
-
// return res.data.map(item => {
|
|
602
|
-
// return {
|
|
603
|
-
// label: item.f_dev_name,
|
|
604
|
-
// value: item.f_dev_name
|
|
605
|
-
// }
|
|
606
|
-
// })
|
|
607
|
-
// },
|
|
608
|
-
async getPrice (f_price_id) {
|
|
609
|
-
console.log('=======================')
|
|
610
|
-
console.log(f_price_id)
|
|
611
|
-
|
|
612
|
-
let data = {
|
|
613
|
-
condition: `sp.f_filialeid = '${this.$login.f.orgid}'`
|
|
614
|
-
}
|
|
615
|
-
// if(this.Pricetype==='机表'){
|
|
616
|
-
// data.condition=`sp.f_custom = '机表'`
|
|
617
|
-
// }
|
|
618
|
-
// if(this.Pricetype==='非机表'){
|
|
619
|
-
// data.condition=`sp.f_custom = '非机表'`
|
|
620
|
-
// }
|
|
621
|
-
|
|
622
|
-
if (!isEmpty(f_price_id)) {
|
|
623
|
-
data.condition = `sp.f_filialeid = '${this.$login.f.orgid}' and sp.f_price_id = ${f_price_id}`
|
|
624
|
-
}
|
|
625
|
-
let http = new HttpResetClass()
|
|
626
|
-
let res = await http.load(
|
|
627
|
-
'POST',
|
|
628
|
-
`rs/sql/applyGetPrice`,
|
|
629
|
-
{data: data},
|
|
630
|
-
{resolveMsg: null, rejectMsg: '气价查询失败!!!'}
|
|
631
|
-
)
|
|
632
|
-
|
|
633
|
-
let a= res.data.map(item => {
|
|
634
|
-
return {
|
|
635
|
-
label: item.f_price_name,
|
|
636
|
-
value: item
|
|
637
|
-
}
|
|
638
|
-
})
|
|
639
|
-
this.selectdata.fields.forEach(field => {
|
|
640
|
-
if (field.label === '气价名称') {
|
|
641
|
-
field.options = a}
|
|
642
|
-
})
|
|
643
|
-
return a
|
|
644
|
-
},
|
|
645
|
-
addressInitialization () {
|
|
646
|
-
this.$getConfig(this, 'UserAddress')
|
|
647
|
-
|
|
648
|
-
let f_address_type = this.show_data.f_address_type
|
|
649
|
-
|
|
650
|
-
for (const item of this.show_data.fields) {
|
|
651
|
-
if (f_address_type === '民用市区') {
|
|
652
|
-
if (item.label === '区/县' || item.label === '街道/乡镇' || item.label === '集收单位' || item.label === '门牌号') {
|
|
653
|
-
item.hidden = false
|
|
654
|
-
item.required = true
|
|
655
|
-
}
|
|
656
|
-
if (item.label === '楼号/组' || item.label === '单元/排' || item.label === '楼层') {
|
|
657
|
-
item.hidden = false
|
|
658
|
-
item.required = false
|
|
659
|
-
}
|
|
660
|
-
if (item.label === '地址') {
|
|
661
|
-
item.readonly = true
|
|
662
|
-
}
|
|
663
|
-
}
|
|
664
|
-
if (f_address_type === '民用乡镇') {
|
|
665
|
-
if (item.label === '区/县' || item.label === '街道/乡镇' || item.label === '集收单位' || item.label === '门牌号') {
|
|
666
|
-
item.hidden = false
|
|
667
|
-
item.required = true
|
|
668
|
-
}
|
|
669
|
-
if (item.label === '楼号/组' || item.label === '单元/排' || item.label === '楼层') {
|
|
670
|
-
item.hidden = false
|
|
671
|
-
item.required = false
|
|
672
|
-
}
|
|
673
|
-
if (item.label === '楼层') {
|
|
674
|
-
item.hidden = true
|
|
675
|
-
item.required = false
|
|
676
|
-
}
|
|
677
|
-
if (item.label === '地址') {
|
|
678
|
-
item.readonly = true
|
|
679
|
-
}
|
|
680
|
-
}
|
|
681
|
-
if (f_address_type === '特殊地址') {
|
|
682
|
-
if (item.label === '区/县' || item.label === '街道/乡镇') {
|
|
683
|
-
item.hidden = false
|
|
684
|
-
item.required = true
|
|
685
|
-
}
|
|
686
|
-
if (item.label === '集收单位') {
|
|
687
|
-
item.hidden = false
|
|
688
|
-
if (this.show_data.f_apply_type === '工商户报建'){
|
|
689
|
-
item.required = false
|
|
690
|
-
} else {
|
|
691
|
-
item.required = false
|
|
692
|
-
}
|
|
693
|
-
|
|
694
|
-
}
|
|
695
|
-
if (item.label === '楼号/组' || item.label === '单元/排' || item.label === '楼层' || item.label === '门牌号') {
|
|
696
|
-
item.hidden = true
|
|
697
|
-
item.required = false
|
|
698
|
-
}
|
|
699
|
-
if (item.label === '地址') {
|
|
700
|
-
item.readonly = false
|
|
701
|
-
}
|
|
702
|
-
}
|
|
703
|
-
|
|
704
|
-
if (this.show_data.f_apply_source === '线下发起' && item.label === '预约地址') {
|
|
705
|
-
item.hidden = true
|
|
706
|
-
}
|
|
707
|
-
}
|
|
708
|
-
},
|
|
709
|
-
async streetChange () {
|
|
710
|
-
if (isEmpty(this.show_data.f_street)) {
|
|
711
|
-
return
|
|
712
|
-
}
|
|
713
|
-
|
|
714
|
-
let data = {
|
|
715
|
-
tablename: 't_area',
|
|
716
|
-
condition: `f_filialeid = '${this.$login.f.orgid}' and f_street = '${this.show_data.f_street}'`
|
|
717
|
-
}
|
|
718
|
-
let http = new HttpResetClass()
|
|
719
|
-
let res = await http.load(
|
|
720
|
-
'POST',
|
|
721
|
-
`rs/sql/apply_singleTable`,
|
|
722
|
-
{data: data},
|
|
723
|
-
{resolveMsg: null, rejectMsg: '集收单位查询失败!!!'}
|
|
724
|
-
)
|
|
725
|
-
|
|
726
|
-
this.setLabelOptions('集收单位', res.data.map(item => {
|
|
727
|
-
return {
|
|
728
|
-
label: item.f_residential_area,
|
|
729
|
-
value: item.f_residential_area
|
|
730
|
-
}
|
|
731
|
-
}))
|
|
732
|
-
},
|
|
733
|
-
async areaChange () {
|
|
734
|
-
if (isEmpty(this.show_data.f_residential_area)) {
|
|
735
|
-
return
|
|
736
|
-
}
|
|
737
|
-
|
|
738
|
-
let data = {
|
|
739
|
-
tablename: 't_area',
|
|
740
|
-
condition: `f_filialeid = '${this.$login.f.orgid}' and f_residential_area = '${this.show_data.f_residential_area}'`
|
|
741
|
-
}
|
|
742
|
-
let http = new HttpResetClass()
|
|
743
|
-
let res = await http.load(
|
|
744
|
-
'POST',
|
|
745
|
-
`rs/sql/apply_singleTable`,
|
|
746
|
-
{data: data},
|
|
747
|
-
{resolveMsg: null, rejectMsg: '集收单位查询失败!!!'}
|
|
748
|
-
)
|
|
749
|
-
if(res.data.length>0){
|
|
750
|
-
this.setLabelValue('街道/乡镇', res.data[0].f_street)
|
|
751
|
-
this.setLabelValue('区/县', res.data[0].f_pcd)
|
|
752
|
-
this.setLabelValue('片区', res.data[0].f_slice_area)
|
|
753
|
-
}
|
|
754
|
-
},
|
|
755
|
-
async pcdChange () {
|
|
756
|
-
if (isEmpty(this.show_data.f_pcd)) {
|
|
757
|
-
return
|
|
758
|
-
}
|
|
759
|
-
|
|
760
|
-
let data = {
|
|
761
|
-
tablename: 't_street',
|
|
762
|
-
condition: `f_orgid = '${this.$login.f.orgid}' and f_pcd = '${this.show_data.f_pcd}'`
|
|
763
|
-
}
|
|
764
|
-
let f_address_type = this.getLableValue('地址类型')
|
|
765
|
-
|
|
766
|
-
if (f_address_type === '民用市区') {
|
|
767
|
-
data.condition = `f_orgid = '${this.$login.f.orgid}' and f_pcd = '${this.show_data.f_pcd}' and f_iscity = '市区'`
|
|
768
|
-
}
|
|
769
|
-
if (f_address_type === '民用乡镇') {
|
|
770
|
-
data.condition = `f_orgid = '${this.$login.f.orgid}' and f_pcd = '${this.show_data.f_pcd}' and f_iscity = '乡镇'`
|
|
771
|
-
}
|
|
772
|
-
|
|
773
|
-
let http = new HttpResetClass()
|
|
774
|
-
let res = await http.load(
|
|
775
|
-
'POST',
|
|
776
|
-
`rs/sql/apply_singleTable`,
|
|
777
|
-
{data: data},
|
|
778
|
-
{resolveMsg: null, rejectMsg: '街道/乡镇查询失败!!!'}
|
|
779
|
-
)
|
|
780
|
-
|
|
781
|
-
this.setLabelOptions('街道/乡镇', res.data.map(item => {
|
|
782
|
-
return {
|
|
783
|
-
label: item.f_street,
|
|
784
|
-
value: item.f_street
|
|
785
|
-
}
|
|
786
|
-
}))
|
|
787
|
-
},
|
|
788
|
-
async addressTips () {
|
|
789
|
-
// console.log('======================='+this.show_data.f_apply_type)
|
|
790
|
-
let res = ''
|
|
791
|
-
if (this.show_data.f_apply_type === '报警器报建' || this.show_data.f_apply_type === '工商业报警器报建') {
|
|
792
|
-
res = await this.$showMessage('报警器报建下单后将不能修改用户信息,请确认用户信息地址等是否正确,如不完善可在档案中进行修正!!!')
|
|
793
|
-
}else{
|
|
794
|
-
res = await this.$showMessage('增容改管下单后将不能修改用户信息,请确认用户信息地址等是否正确,如不完善可在档案中进行修正!!!')
|
|
795
|
-
}
|
|
796
|
-
if (res == 'confirm') {
|
|
797
|
-
return
|
|
798
|
-
}
|
|
799
|
-
throw '用户信息确认!!!'
|
|
800
|
-
},
|
|
801
|
-
async getDesignerPeople () {
|
|
802
|
-
let data = {
|
|
803
|
-
source: 'this.getParentByType($organization$).getChildByName($设计部报装$).getChildren()',
|
|
804
|
-
userid: this.$login.f.id
|
|
805
|
-
}
|
|
806
|
-
|
|
807
|
-
let http = new HttpResetClass()
|
|
808
|
-
let res = await http.load(
|
|
809
|
-
'POST',
|
|
810
|
-
`rs/search`,
|
|
811
|
-
{data: data},
|
|
812
|
-
{resolveMsg: null, rejectMsg: '设计人员查询失败!!!'}
|
|
813
|
-
)
|
|
814
|
-
|
|
815
|
-
return res.data.map(item => {
|
|
816
|
-
return {
|
|
817
|
-
label: item.name,
|
|
818
|
-
value: item.id
|
|
819
|
-
}
|
|
820
|
-
})
|
|
821
|
-
},
|
|
822
|
-
async surveyStopApply () {
|
|
823
|
-
console.log('终止报建!!!!!')
|
|
824
|
-
|
|
825
|
-
this.show_data.f_stop_reason = '现场勘察不符合报装条件'
|
|
826
|
-
|
|
827
|
-
let data = {
|
|
828
|
-
data: this.show_data,
|
|
829
|
-
user: this.$login.f
|
|
830
|
-
}
|
|
831
|
-
|
|
832
|
-
let res = await this.$resetpost(
|
|
833
|
-
`rs/logic/surveyStopApply`,
|
|
834
|
-
{data: data},
|
|
835
|
-
{resolveMsg: null, rejectMsg: '终止报建失败!!!'}
|
|
836
|
-
)
|
|
837
|
-
|
|
838
|
-
this.$dispatch('loadPage')
|
|
839
|
-
|
|
840
|
-
throw '终止报建!!!'
|
|
841
|
-
},
|
|
842
|
-
async contract_number() {
|
|
843
|
-
console.log("进入编号合同编号生成",this.$login.f.orgs)
|
|
844
|
-
let f_contract_number = ''
|
|
845
|
-
const nowDate = new Date();
|
|
846
|
-
const date = {
|
|
847
|
-
year: nowDate.getFullYear(),
|
|
848
|
-
month: nowDate.getMonth() + 1,
|
|
849
|
-
day: nowDate.getDate()
|
|
850
|
-
}
|
|
851
|
-
|
|
852
|
-
function upperCaseChars(dir) {
|
|
853
|
-
let string = '';
|
|
854
|
-
switch (dir){
|
|
855
|
-
case '周口市天然气有限公司':
|
|
856
|
-
string = 'ZK' // 当表达式的结果等于 房产 时,则执行该代码
|
|
857
|
-
break;
|
|
858
|
-
case '项城市天然气有限公司':
|
|
859
|
-
string = "XC" // 当表达式的结果等于 自建房 时,则执行该代码
|
|
860
|
-
break;
|
|
861
|
-
case '西华县天然气有限公司':
|
|
862
|
-
string = 'XH' // 当表达式的结果等于 商业 时,则执行该代码
|
|
863
|
-
break;
|
|
864
|
-
case '鹿邑县天然气有限公司':
|
|
865
|
-
string = 'LY' // 当表达式的结果等于 工业 时,则执行该代码
|
|
866
|
-
break;
|
|
867
|
-
case '郸城县天然气有限公司':
|
|
868
|
-
string = 'DC' // 当表达式的结果等于 中压 时,则执行该代码
|
|
869
|
-
break;
|
|
870
|
-
case '测试公司(一)':
|
|
871
|
-
string = 'CS' // 当表达式的结果等于 中压 时,则执行该代码
|
|
872
|
-
break;
|
|
873
|
-
case '甘泉县丰源天然气有限责任公司':
|
|
874
|
-
string = 'GQ' // 当表达式的结果等于 中压 时,则执行该代码
|
|
875
|
-
break;
|
|
876
|
-
default : 'HT'
|
|
877
|
-
break; // 如果没有与表达式相同的公司,则执行该代码
|
|
878
|
-
}
|
|
879
|
-
return string;
|
|
880
|
-
}
|
|
881
|
-
|
|
882
|
-
const dir = upperCaseChars(this.$login.f.orgs) //分公司
|
|
883
|
-
|
|
884
|
-
let type = 0 //类型
|
|
885
|
-
|
|
886
|
-
switch (this.show_data.f_entry_type){
|
|
887
|
-
case '城区/县城':
|
|
888
|
-
type = 1 // 当表达式的结果等于 城区 时,则执行该代码
|
|
889
|
-
break;
|
|
890
|
-
case '新农村':
|
|
891
|
-
type = 2 // 当表达式的结果等于 新农村 时,则执行该代码
|
|
892
|
-
break;
|
|
893
|
-
case '测试':
|
|
894
|
-
type = 3 // 当表达式的结果等于 新农村 时,则执行该代码
|
|
895
|
-
break;
|
|
896
|
-
default :
|
|
897
|
-
break; // 如果没有与表达式相同的值,则执行该代码
|
|
898
|
-
}
|
|
899
|
-
|
|
900
|
-
let nature = 0 // 性质
|
|
901
|
-
switch (this.show_data.f_apply_nature){
|
|
902
|
-
case '楼房':
|
|
903
|
-
nature = 1 // 当表达式的结果等于 楼房 时,则执行该代码
|
|
904
|
-
break;
|
|
905
|
-
case '房产':
|
|
906
|
-
nature = 1 // 当表达式的结果等于 房产 时,则执行该代码
|
|
907
|
-
break;
|
|
908
|
-
case '自建房':
|
|
909
|
-
nature = 2 // 当表达式的结果等于 自建房 时,则执行该代码
|
|
910
|
-
break;
|
|
911
|
-
case '商业':
|
|
912
|
-
nature = 3 // 当表达式的结果等于 商业 时,则执行该代码
|
|
913
|
-
break;
|
|
914
|
-
case '学校':
|
|
915
|
-
nature = 3 // 当表达式的结果等于 学校 时,则执行该代码
|
|
916
|
-
break;
|
|
917
|
-
case '福利机构':
|
|
918
|
-
nature = 3 // 当表达式的结果等于 福利机构 时,则执行该代码
|
|
919
|
-
break;
|
|
920
|
-
case '其他':
|
|
921
|
-
nature = 3 // 当表达式的结果等于 其他 时,则执行该代码
|
|
922
|
-
break;
|
|
923
|
-
case '工业':
|
|
924
|
-
nature = 4 // 当表达式的结果等于 工业 时,则执行该代码
|
|
925
|
-
break;
|
|
926
|
-
case '中压':
|
|
927
|
-
nature = 5 // 当表达式的结果等于 中压 时,则执行该代码
|
|
928
|
-
break;
|
|
929
|
-
case '测试':
|
|
930
|
-
nature = 6 // 当表达式的结果等于 中压 时,则执行该代码
|
|
931
|
-
break;
|
|
932
|
-
default :
|
|
933
|
-
break; // 如果没有与表达式相同的值,则执行该代码
|
|
934
|
-
}
|
|
935
|
-
|
|
936
|
-
const newMonth = date.month >= 10 ? date.month : '0' + date.month //月份
|
|
937
|
-
const dataYm = date.year + '-01-01'
|
|
938
|
-
const newYear = date.year + 1
|
|
939
|
-
const year = date.year.toString().substring(2,4) //年份
|
|
940
|
-
|
|
941
|
-
let data = {
|
|
942
|
-
orgid: this.$login.f.orgid
|
|
943
|
-
}
|
|
944
|
-
|
|
945
|
-
let http = new HttpResetClass()
|
|
946
|
-
let res = await http.load('POST', 'rs/sql/contractCount', {data:data}, {
|
|
947
|
-
resolveMsg: null,
|
|
948
|
-
rejectMsg: null
|
|
949
|
-
})
|
|
950
|
-
let oldDate
|
|
951
|
-
for (const item of res.data) {
|
|
952
|
-
if (item.name === '合同编号最后更新日期'){
|
|
953
|
-
oldDate = item.value
|
|
954
|
-
}
|
|
955
|
-
}
|
|
956
|
-
for (const item of res.data){
|
|
957
|
-
if (item.name === '合同编号'){
|
|
958
|
-
if (item.value === 0 || Date.parse(oldDate) < Date.parse(dataYm)) {
|
|
959
|
-
f_contract_number = dir + type + nature + year + newMonth + '001'
|
|
960
|
-
console.log("触发if", f_contract_number)
|
|
961
|
-
} else {
|
|
962
|
-
let count = item.value
|
|
963
|
-
f_contract_number = dir + type + nature + year + newMonth + this.PrefixInteger(count, 3)
|
|
964
|
-
console.log("触发else", f_contract_number)
|
|
965
|
-
}
|
|
966
|
-
}
|
|
967
|
-
}
|
|
968
|
-
this.selectdata.f_contract_number = f_contract_number
|
|
969
|
-
this.show_data.f_contract_number = f_contract_number
|
|
970
|
-
return f_contract_number
|
|
971
|
-
},
|
|
972
|
-
PrefixInteger(num, n) {
|
|
973
|
-
return (Array(n).join(0) + num).slice(-n);
|
|
974
|
-
},
|
|
975
|
-
// 单价失去焦点
|
|
976
|
-
async priceSum () {
|
|
977
|
-
if (isEmpty(this.show_data.f_price)) {
|
|
978
|
-
return
|
|
979
|
-
}
|
|
980
|
-
let data = {
|
|
981
|
-
operator: '乘',
|
|
982
|
-
num1: this.show_data.f_price,
|
|
983
|
-
num2: this.show_data.f_install_count
|
|
984
|
-
}
|
|
985
|
-
let http = new HttpResetClass()
|
|
986
|
-
let res = await http.load(
|
|
987
|
-
'POST',
|
|
988
|
-
`rs/logic/compute`,
|
|
989
|
-
{data: data},
|
|
990
|
-
{resolveMsg: null, rejectMsg: '工程材料费计算失败!!!'}
|
|
991
|
-
)
|
|
992
|
-
|
|
993
|
-
this.setLabelValue('工程材料费', res.data)
|
|
994
|
-
},
|
|
995
|
-
},
|
|
996
|
-
events: {
|
|
997
|
-
'priceType'(index){
|
|
998
|
-
this.Pricetype = this.getLableValue('所属类型')
|
|
999
|
-
console.log('打印方法值',this.getPrice(this.show_data.f_price_id))
|
|
1000
|
-
for (const item of this.show_data.fields) {
|
|
1001
|
-
if (this.show_data.f_sprice_type !=null && this.show_data.f_sprice_type !='') {
|
|
1002
|
-
if(item.label==='气价名称'){
|
|
1003
|
-
this.getPrice().then(value =>{
|
|
1004
|
-
item.options=value
|
|
1005
|
-
})
|
|
1006
|
-
console.log('最终',item.options)
|
|
1007
|
-
}
|
|
1008
|
-
}
|
|
1009
|
-
}
|
|
1010
|
-
},
|
|
1011
|
-
'complyInstallation' (index) {
|
|
1012
|
-
if (this.show_data.f_is_have === '否') {
|
|
1013
|
-
this.hideButtons('提交', '出图', '缴费')
|
|
1014
|
-
this.showButtons('终止')
|
|
1015
|
-
}
|
|
1016
|
-
if (this.show_data.f_is_have === '是') {
|
|
1017
|
-
this.hideButtons('终止')
|
|
1018
|
-
this.showButtons('提交', '出图', '缴费')
|
|
1019
|
-
}
|
|
1020
|
-
},
|
|
1021
|
-
async 'igniteDispatchReadyEvent' () {
|
|
1022
|
-
let data = {
|
|
1023
|
-
tablename: 'activityins',
|
|
1024
|
-
condition: `processid = '${this.show_data.f_process_id}' and defname = '工程施工' and state = '结束'`
|
|
1025
|
-
}
|
|
1026
|
-
let http = new HttpResetClass()
|
|
1027
|
-
let res = await http.load(
|
|
1028
|
-
'POST',
|
|
1029
|
-
`rs/sql/apply_singleTable`,
|
|
1030
|
-
{data: data},
|
|
1031
|
-
{resolveMsg: null, rejectMsg: '查询失败!!!'}
|
|
1032
|
-
)
|
|
1033
|
-
if (res.data.length <= 0) {
|
|
1034
|
-
console.log('+++++++++++++++++++++++++++++')
|
|
1035
|
-
console.log('没有施工,不能退回')
|
|
1036
|
-
this.hideButtons('退回')
|
|
1037
|
-
}
|
|
1038
|
-
},
|
|
1039
|
-
'buildReadyEvent' () {
|
|
1040
|
-
this.setLabelValue('施工单位', this.$login.f.name)
|
|
1041
|
-
this.setLabelValue('施工安装时间', new Date().Format('yyyy-MM-dd HH:mm:ss'))
|
|
1042
|
-
},
|
|
1043
|
-
// 选择材料
|
|
1044
|
-
async materialNameChenge (index, fieldIndex) {
|
|
1045
|
-
let material = this.show_data.onetomany[index].fields[fieldIndex].value
|
|
1046
|
-
|
|
1047
|
-
this.show_data.onetomany[index].fields.forEach(item => {
|
|
1048
|
-
if (material[item.field]) {
|
|
1049
|
-
item.value = material[item.field]
|
|
1050
|
-
}
|
|
1051
|
-
})
|
|
1052
|
-
},
|
|
1053
|
-
// 打开模态框获取材料
|
|
1054
|
-
async 'getMaterialName' (index) {
|
|
1055
|
-
let data = {
|
|
1056
|
-
condition: `1=1`
|
|
1057
|
-
}
|
|
1058
|
-
let http = new HttpResetClass()
|
|
1059
|
-
let res = await http.load(
|
|
1060
|
-
'POST',
|
|
1061
|
-
`rs/sql/getStockMaterial`,
|
|
1062
|
-
{data: data},
|
|
1063
|
-
{resolveMsg: null, rejectMsg: '材料查询失败!!!'}
|
|
1064
|
-
)
|
|
1065
|
-
|
|
1066
|
-
this.show_data.onetomany[index].fields.forEach(field => {
|
|
1067
|
-
if (field.label === '选择材料') {
|
|
1068
|
-
field.options = res.data.map(item => {
|
|
1069
|
-
return {
|
|
1070
|
-
'label': `${item.f_material_name}--${item.f_material_style}--${item.f_material_unit}`,
|
|
1071
|
-
'value': item
|
|
1072
|
-
}
|
|
1073
|
-
})
|
|
1074
|
-
}
|
|
1075
|
-
})
|
|
1076
|
-
},
|
|
1077
|
-
// 搜索小区
|
|
1078
|
-
async 'searchArea' (area, index) {
|
|
1079
|
-
let data = {
|
|
1080
|
-
tablename: 't_area',
|
|
1081
|
-
condition: `f_filialeid = '${this.$login.f.orgid}' and f_street = '${this.show_data.f_street}' and f_residential_area like '%${area}%'`
|
|
1082
|
-
}
|
|
1083
|
-
let http = new HttpResetClass()
|
|
1084
|
-
let res = await http.load(
|
|
1085
|
-
'POST',
|
|
1086
|
-
`rs/sql/apply_singleTable`,
|
|
1087
|
-
{data: data},
|
|
1088
|
-
{resolveMsg: null, rejectMsg: '集收单位查询失败!!!'}
|
|
1089
|
-
)
|
|
1090
|
-
|
|
1091
|
-
if (res.data.length === 0) {
|
|
1092
|
-
return
|
|
1093
|
-
}
|
|
1094
|
-
|
|
1095
|
-
this.setLabelOptions('集收单位', res.data.map(item => {
|
|
1096
|
-
return {
|
|
1097
|
-
label: item.f_residential_area,
|
|
1098
|
-
value: item.f_residential_area
|
|
1099
|
-
}
|
|
1100
|
-
}))
|
|
1101
|
-
},
|
|
1102
|
-
// 搜索小区
|
|
1103
|
-
async 'searchAreaCollective' (area, index) {
|
|
1104
|
-
let data = {
|
|
1105
|
-
tablename: 't_area',
|
|
1106
|
-
condition: `f_filialeid = '${this.$login.f.orgid}' and f_residential_area like '%${area}%'`
|
|
1107
|
-
}
|
|
1108
|
-
let http = new HttpResetClass()
|
|
1109
|
-
let res = await http.load(
|
|
1110
|
-
'POST',
|
|
1111
|
-
`rs/sql/apply_singleTable`,
|
|
1112
|
-
{data: data},
|
|
1113
|
-
{resolveMsg: null, rejectMsg: '集收单位查询失败!!!'}
|
|
1114
|
-
)
|
|
1115
|
-
|
|
1116
|
-
if (res.data.length === 0) {
|
|
1117
|
-
return
|
|
1118
|
-
}
|
|
1119
|
-
|
|
1120
|
-
this.setLabelOptions('集收单位', res.data.map(item => {
|
|
1121
|
-
return {
|
|
1122
|
-
label: item.f_residential_area,
|
|
1123
|
-
value: item.f_residential_area
|
|
1124
|
-
}
|
|
1125
|
-
}))
|
|
1126
|
-
},
|
|
1127
|
-
// 选择气价
|
|
1128
|
-
'priceChange' (index) {
|
|
1129
|
-
if (isEmpty(this.show_data.stairPrice)) {
|
|
1130
|
-
return
|
|
1131
|
-
}
|
|
1132
|
-
|
|
1133
|
-
let stairPrice = this.getLableValue('气价名称')
|
|
1134
|
-
|
|
1135
|
-
this.setLabelValue('气价类型', stairPrice.f_price_type)
|
|
1136
|
-
this.setLabelValue('用气性质', stairPrice.f_gasproperties)
|
|
1137
|
-
this.setLabelValue('价格', stairPrice.f_price)
|
|
1138
|
-
this.setLabelValue('客户类型', stairPrice.f_user_type)
|
|
1139
|
-
this.show_data.f_price_id = stairPrice.id
|
|
1140
|
-
this.show_data.f_price_name = stairPrice.f_price_name
|
|
1141
|
-
},
|
|
1142
|
-
// 选择开发商
|
|
1143
|
-
// async 'devInfoChange' (index) {
|
|
1144
|
-
// if (isEmpty(this.show_data.f_company_name)) {
|
|
1145
|
-
// return
|
|
1146
|
-
// }
|
|
1147
|
-
// let data = {
|
|
1148
|
-
// tablename: 't_dev_info',
|
|
1149
|
-
// condition: `f_orgid = '${this.$login.f.orgid}' and f_dev_name = '${this.show_data.f_company_name}'`
|
|
1150
|
-
// }
|
|
1151
|
-
// let res = await this.$resetpost(
|
|
1152
|
-
// `rs/sql/apply_singleTable`,
|
|
1153
|
-
// {data: data},
|
|
1154
|
-
// {resolveMsg: null, rejectMsg: '公司查询失败!!!'}
|
|
1155
|
-
// )
|
|
1156
|
-
// this.show_data.f_dev_id = res.data[0].id
|
|
1157
|
-
// this.show_data.f_dev_code = res.data[0].f_dev_code
|
|
1158
|
-
// this.setLabelValue('法人名称', res.data[0].f_legal_person)
|
|
1159
|
-
// this.setLabelValue('身份证', res.data[0].f_idnumber)
|
|
1160
|
-
// this.setLabelValue('营业执照', res.data[0].f_license_num)
|
|
1161
|
-
// },
|
|
1162
|
-
// 退款金额
|
|
1163
|
-
'refundMoneyChange' (index) {
|
|
1164
|
-
let f_cumulative_payment_money = this.show_data.f_cumulative_payment_money
|
|
1165
|
-
let f_refund_money = this.show_data.fields[index].value
|
|
1166
|
-
|
|
1167
|
-
if (f_refund_money > f_cumulative_payment_money) {
|
|
1168
|
-
this.$showAlert('退款金额不能大于累计缴费金额!!!', 'warning', 3000)
|
|
1169
|
-
this.show_data.fields[index].value = null
|
|
1170
|
-
}
|
|
1171
|
-
},
|
|
1172
|
-
// 检查重复
|
|
1173
|
-
'checkRepeat' (index) {
|
|
1174
|
-
this.checkDuplicate(index)
|
|
1175
|
-
},
|
|
1176
|
-
// 选择报建项目
|
|
1177
|
-
'selectApply' (row) {
|
|
1178
|
-
this.setLabelValue('工程名称', row.f_entry_name)
|
|
1179
|
-
this.setLabelValue('工程编号', row.f_apply_num)
|
|
1180
|
-
this.setLabelValue('报建类型', row.f_apply_type)
|
|
1181
|
-
this.setLabelValue('用户名称', row.f_user_name)
|
|
1182
|
-
this.setLabelValue('用户电话', row.f_phone)
|
|
1183
|
-
this.setLabelValue('证件类型', row.f_credentials)
|
|
1184
|
-
this.setLabelValue('证件号码', row.f_idnumber)
|
|
1185
|
-
this.setLabelValue('地址', row.f_address)
|
|
1186
|
-
this.setLabelValue('累计缴费金额', row.f_cumulative_payment_money)
|
|
1187
|
-
|
|
1188
|
-
this.show_data.parentApply = JSON.parse(JSON.stringify(row))
|
|
1189
|
-
|
|
1190
|
-
delete row.id
|
|
1191
|
-
delete row.actid
|
|
1192
|
-
delete row.defid
|
|
1193
|
-
delete row.defname
|
|
1194
|
-
delete row.version
|
|
1195
|
-
delete row.f_apply_num
|
|
1196
|
-
delete row.f_sub_state
|
|
1197
|
-
delete row.f_apply_type
|
|
1198
|
-
delete row.f_process_id
|
|
1199
|
-
|
|
1200
|
-
this.show_data = Object.assign({}, this.show_data, row)
|
|
1201
|
-
|
|
1202
|
-
this.show_data.f_parent_process_id = this.show_data.parentApply.f_process_id
|
|
1203
|
-
},
|
|
1204
|
-
// 是否终止
|
|
1205
|
-
'isStopChange' (index) {
|
|
1206
|
-
let f_is_stop = this.show_data.f_is_stop
|
|
1207
|
-
|
|
1208
|
-
for (const item of this.show_data.fields) {
|
|
1209
|
-
if (f_is_stop === '是') {
|
|
1210
|
-
if (item.label === '终止原因') {
|
|
1211
|
-
item.hidden = false
|
|
1212
|
-
item.required = true
|
|
1213
|
-
}
|
|
1214
|
-
} else {
|
|
1215
|
-
if (item.label === '终止原因') {
|
|
1216
|
-
item.hidden = true
|
|
1217
|
-
item.required = false
|
|
1218
|
-
}
|
|
1219
|
-
}
|
|
1220
|
-
}
|
|
1221
|
-
},
|
|
1222
|
-
// 终止报建初始化
|
|
1223
|
-
async 'stopApplyReadyEvent' () {
|
|
1224
|
-
|
|
1225
|
-
let f_is_stop = this.getLableValue('是否终止')
|
|
1226
|
-
|
|
1227
|
-
for (const item of this.show_data.fields) {
|
|
1228
|
-
if (f_is_stop === '是') {
|
|
1229
|
-
if (item.label === '终止原因') {
|
|
1230
|
-
item.hidden = false
|
|
1231
|
-
item.required = true
|
|
1232
|
-
}
|
|
1233
|
-
} else {
|
|
1234
|
-
if (item.label === '终止原因') {
|
|
1235
|
-
item.hidden = true
|
|
1236
|
-
item.required = false
|
|
1237
|
-
}
|
|
1238
|
-
}
|
|
1239
|
-
}
|
|
1240
|
-
|
|
1241
|
-
if (isEmpty(this.show_data.f_parent_process_id)) {
|
|
1242
|
-
return
|
|
1243
|
-
}
|
|
1244
|
-
let data = {
|
|
1245
|
-
condition: `f_process_id = '${this.show_data.f_parent_process_id}'`,
|
|
1246
|
-
data: {
|
|
1247
|
-
id: this.$login.f.id,
|
|
1248
|
-
orgid: this.$login.f.orgid
|
|
1249
|
-
}
|
|
1250
|
-
}
|
|
1251
|
-
let res = await this.$resetpost(
|
|
1252
|
-
`rs/sql/supervisory`,
|
|
1253
|
-
{data: data},
|
|
1254
|
-
{resolveMsg: null, rejectMsg: '项目查询失败!!!'}
|
|
1255
|
-
)
|
|
1256
|
-
this.show_data.parentApply = res.data[0]
|
|
1257
|
-
},
|
|
1258
|
-
// 选择用户档案信息
|
|
1259
|
-
'selectUserinfo' (row) {
|
|
1260
|
-
this.setLabelValue('用户编号', row.f_userinfo_code)
|
|
1261
|
-
this.setLabelValue('用户名称', row.f_user_name)
|
|
1262
|
-
this.setLabelValue('用户电话', row.f_user_phone)
|
|
1263
|
-
this.setLabelValue('证件类型', row.f_credentials)
|
|
1264
|
-
this.setLabelValue('证件号码', row.f_idnumber)
|
|
1265
|
-
this.setLabelValue('地址', row.f_address)
|
|
1266
|
-
|
|
1267
|
-
this.show_data.f_userinfo_id = row.f_userinfo_id
|
|
1268
|
-
this.show_data.f_userinfo_code = row.f_userinfo_code
|
|
1269
|
-
},
|
|
1270
|
-
// 是否购买保险
|
|
1271
|
-
async 'isInsureChange' (index) {
|
|
1272
|
-
if (!this.show_data.f_is_insure) {
|
|
1273
|
-
return
|
|
1274
|
-
}
|
|
1275
|
-
let f_is_insure = this.show_data.f_is_insure
|
|
1276
|
-
for (const item of this.show_data.fields) {
|
|
1277
|
-
if (f_is_insure === '是') {
|
|
1278
|
-
if (item.label === '保费开始日期' || item.label === '保费结束日期' || item.label === '险种' || item.label === '保费金额') {
|
|
1279
|
-
item.hidden = false
|
|
1280
|
-
item.required = true
|
|
1281
|
-
}
|
|
1282
|
-
if (item.label === '保险备注') {
|
|
1283
|
-
item.hidden = false
|
|
1284
|
-
}
|
|
1285
|
-
} else {
|
|
1286
|
-
if (item.label === '保费开始日期' || item.label === '保费结束日期' || item.label === '险种' || item.label === '保费金额' || item.label === '保险备注') {
|
|
1287
|
-
item.hidden = true
|
|
1288
|
-
item.required = false
|
|
1289
|
-
}
|
|
1290
|
-
}
|
|
1291
|
-
}
|
|
1292
|
-
},
|
|
1293
|
-
// 通气点火初始化
|
|
1294
|
-
async 'gasReadyEvent' () {
|
|
1295
|
-
// 是否有气价信息
|
|
1296
|
-
if (!isEmpty(this.show_data.f_price_id)) {
|
|
1297
|
-
let priceList = await this.getPrice(this.show_data.f_price_id)
|
|
1298
|
-
this.setLabelValue('气价名称', priceList[0].value)
|
|
1299
|
-
}
|
|
1300
|
-
|
|
1301
|
-
let data = {
|
|
1302
|
-
tablename: 't_userfees',
|
|
1303
|
-
condition: `f_orgid = '${this.$login.f.orgid}' and f_userinfo_id = '${this.show_data.f_userinfo_id}' and f_state = '待执行'`
|
|
1304
|
-
}
|
|
1305
|
-
let http = new HttpResetClass()
|
|
1306
|
-
let res = await http.load(
|
|
1307
|
-
'POST',
|
|
1308
|
-
`rs/sql/apply_singleTable`,
|
|
1309
|
-
{data: data},
|
|
1310
|
-
{resolveMsg: null, rejectMsg: '保险查询失败!!!'}
|
|
1311
|
-
)
|
|
1312
|
-
if (res.data.length > 0) {
|
|
1313
|
-
this.setLabelValue('待执行保险', '是')
|
|
1314
|
-
for (const item of this.show_data.fields) {
|
|
1315
|
-
if (item.label === '保费开始日期' || item.label === '是否购买保险' || item.label === '保费结束日期' || item.label === '险种' || item.label === '保费金额' || item.label === '保险备注') {
|
|
1316
|
-
item.hidden = true
|
|
1317
|
-
item.required = false
|
|
1318
|
-
item.value = null
|
|
1319
|
-
}
|
|
1320
|
-
}
|
|
1321
|
-
} else {
|
|
1322
|
-
this.setLabelValue('待执行保险', '否')
|
|
1323
|
-
for (const item of this.show_data.fields) {
|
|
1324
|
-
if (item.label === '是否购买保险' || item.label === '保费开始日期' || item.label === '保费结束日期' || item.label === '险种' || item.label === '保费金额' || item.label === '保险备注') {
|
|
1325
|
-
item.hidden = false
|
|
1326
|
-
item.required = true
|
|
1327
|
-
}
|
|
1328
|
-
}
|
|
1329
|
-
}
|
|
1330
|
-
|
|
1331
|
-
// 保险初始化显示内容
|
|
1332
|
-
let f_is_insure = this.getLableValue('是否购买保险')
|
|
1333
|
-
for (const item of this.show_data.fields) {
|
|
1334
|
-
if (f_is_insure === '是') {
|
|
1335
|
-
if (item.label === '保费开始日期' || item.label === '保费结束日期' || item.label === '险种' || item.label === '保费金额') {
|
|
1336
|
-
item.hidden = false
|
|
1337
|
-
item.required = true
|
|
1338
|
-
}
|
|
1339
|
-
if (item.label === '保险备注') {
|
|
1340
|
-
item.hidden = false
|
|
1341
|
-
}
|
|
1342
|
-
// 本期保费到期时间默认一年
|
|
1343
|
-
if (isEmpty(this.selectdata.f_ins_expiration_date)) {
|
|
1344
|
-
let f_ins_expiration_date = new Date().setFullYear(new Date().getFullYear() + 1)
|
|
1345
|
-
this.setLabelValue("保费结束日期", new Date(f_ins_expiration_date).Format('yyyy-MM-dd'))
|
|
1346
|
-
}
|
|
1347
|
-
}
|
|
1348
|
-
if (f_is_insure === '否') {
|
|
1349
|
-
if (item.label === '保费开始日期' || item.label === '保费结束日期' || item.label === '险种' || item.label === '保费金额' || item.label === '保险备注') {
|
|
1350
|
-
item.hidden = true
|
|
1351
|
-
item.required = false
|
|
1352
|
-
}
|
|
1353
|
-
}
|
|
1354
|
-
}
|
|
1355
|
-
},
|
|
1356
|
-
// 合同金额失去焦点
|
|
1357
|
-
async 'contractMoneyChange' (index) {
|
|
1358
|
-
let data = {
|
|
1359
|
-
operator: '加',
|
|
1360
|
-
num1: this.show_data.f_contract_money || 0,
|
|
1361
|
-
num2: this.getLableValue('追加金额') || 0
|
|
1362
|
-
}
|
|
1363
|
-
let res = await this.$resetpost(
|
|
1364
|
-
`rs/logic/compute`,
|
|
1365
|
-
{data: data},
|
|
1366
|
-
{resolveMsg: null, rejectMsg: '金额计算失败!!!'}
|
|
1367
|
-
)
|
|
1368
|
-
|
|
1369
|
-
this.setLabelValue('应交金额', res.data)
|
|
1370
|
-
},
|
|
1371
|
-
// 街道失去焦点
|
|
1372
|
-
async 'streetChange' (index) {
|
|
1373
|
-
if (isEmpty(this.show_data.f_street)) {
|
|
1374
|
-
return
|
|
1375
|
-
}
|
|
1376
|
-
|
|
1377
|
-
this.setLabelValue('集收单位', null)
|
|
1378
|
-
|
|
1379
|
-
let data = {
|
|
1380
|
-
tablename: 't_area',
|
|
1381
|
-
condition: `f_orgid = '${this.$login.f.orgid}' and f_street = '${this.show_data.f_street}'`
|
|
1382
|
-
}
|
|
1383
|
-
let http = new HttpResetClass()
|
|
1384
|
-
let res = await http.load(
|
|
1385
|
-
'POST',
|
|
1386
|
-
`rs/sql/apply_singleTable`,
|
|
1387
|
-
{data: data},
|
|
1388
|
-
{resolveMsg: null, rejectMsg: '集收单位查询失败!!!'}
|
|
1389
|
-
)
|
|
1390
|
-
|
|
1391
|
-
this.setLabelOptions('集收单位', res.data.map(item => {
|
|
1392
|
-
return {
|
|
1393
|
-
label: item.f_residential_area,
|
|
1394
|
-
value: item.f_residential_area
|
|
1395
|
-
}
|
|
1396
|
-
}))
|
|
1397
|
-
},
|
|
1398
|
-
async 'areaChange' () {
|
|
1399
|
-
if (isEmpty(this.show_data.f_residential_area)) {
|
|
1400
|
-
return
|
|
1401
|
-
}
|
|
1402
|
-
|
|
1403
|
-
let data = {
|
|
1404
|
-
tablename: 't_area',
|
|
1405
|
-
condition: `
|
|
1406
|
-
}
|
|
1407
|
-
let http = new HttpResetClass()
|
|
1408
|
-
let res = await http.load(
|
|
1409
|
-
'POST',
|
|
1410
|
-
`rs/sql/apply_singleTable`,
|
|
1411
|
-
{data: data},
|
|
1412
|
-
{resolveMsg: null, rejectMsg: '集收单位查询失败!!!'}
|
|
1413
|
-
)
|
|
1414
|
-
if(res.data.length>0){
|
|
1415
|
-
this.setLabelValue('街道/乡镇', res.data[0].f_street)
|
|
1416
|
-
this.setLabelValue('区/县', res.data[0].f_pcd)
|
|
1417
|
-
this.setLabelValue('片区', res.data[0].f_slice_area)
|
|
1418
|
-
}
|
|
1419
|
-
},
|
|
1420
|
-
// 区县失去焦点
|
|
1421
|
-
async 'pcdChange' (index) {
|
|
1422
|
-
if (isEmpty(this.show_data.f_pcd)) {
|
|
1423
|
-
return
|
|
1424
|
-
}
|
|
1425
|
-
|
|
1426
|
-
this.setLabelValue('街道/乡镇', null)
|
|
1427
|
-
this.setLabelValue('集收单位', null)
|
|
1428
|
-
|
|
1429
|
-
|
|
1430
|
-
|
|
1431
|
-
let data = {
|
|
1432
|
-
tablename: 't_street',
|
|
1433
|
-
condition: `f_orgid= '${this.$login.f.orgid}' and f_pcd = '${this.show_data.f_pcd}'`
|
|
1434
|
-
}
|
|
1435
|
-
let f_address_type = this.getLableValue('地址类型')
|
|
1436
|
-
|
|
1437
|
-
if (f_address_type === '民用市区') {
|
|
1438
|
-
data.condition = `f_orgid= '${this.$login.f.orgid}' and f_pcd = '${this.show_data.f_pcd}' and f_iscity = '市区'`
|
|
1439
|
-
}
|
|
1440
|
-
if (f_address_type === '民用乡镇') {
|
|
1441
|
-
data.condition = `f_orgid= '${this.$login.f.orgid}' and f_pcd = '${this.show_data.f_pcd}' and f_iscity = '乡镇'`
|
|
1442
|
-
}
|
|
1443
|
-
|
|
1444
|
-
let http = new HttpResetClass()
|
|
1445
|
-
let res = await http.load(
|
|
1446
|
-
'POST',
|
|
1447
|
-
`rs/sql/apply_singleTable`,
|
|
1448
|
-
{data: data},
|
|
1449
|
-
{resolveMsg: null, rejectMsg: '街道/乡镇查询失败!!!'}
|
|
1450
|
-
)
|
|
1451
|
-
|
|
1452
|
-
this.setLabelOptions('街道/乡镇', res.data.map(item => {
|
|
1453
|
-
return {
|
|
1454
|
-
label: item.f_street,
|
|
1455
|
-
value: item.f_street
|
|
1456
|
-
}
|
|
1457
|
-
}))
|
|
1458
|
-
},
|
|
1459
|
-
// 地址类型失去焦点
|
|
1460
|
-
'addressTypeChange' (index) {
|
|
1461
|
-
this.setLabelValue('街道/乡镇', null)
|
|
1462
|
-
this.setLabelValue('集收单位', null)
|
|
1463
|
-
this.getAreaNew()
|
|
1464
|
-
let f_address_type = this.show_data.fields[index].value
|
|
1465
|
-
for (const item of this.show_data.fields) {
|
|
1466
|
-
if (f_address_type === '民用市区') {
|
|
1467
|
-
if (item.label === '区/县' || item.label === '街道/乡镇' || item.label === '集收单位' || item.label === '门牌号') {
|
|
1468
|
-
item.hidden = false
|
|
1469
|
-
item.required = true
|
|
1470
|
-
item.value = null
|
|
1471
|
-
}
|
|
1472
|
-
if (item.label === '楼号/组' || item.label === '单元/排' || item.label === '楼层') {
|
|
1473
|
-
item.hidden = false
|
|
1474
|
-
item.required = false
|
|
1475
|
-
item.value = null
|
|
1476
|
-
}
|
|
1477
|
-
if (item.label === '地址') {
|
|
1478
|
-
item.readonly = true
|
|
1479
|
-
item.value = null
|
|
1480
|
-
}
|
|
1481
|
-
}
|
|
1482
|
-
if (f_address_type === '民用乡镇') {
|
|
1483
|
-
if (item.label === '区/县' || item.label === '街道/乡镇' || item.label === '集收单位' || item.label === '门牌号') {
|
|
1484
|
-
item.hidden = false
|
|
1485
|
-
item.required = true
|
|
1486
|
-
item.value = null
|
|
1487
|
-
}
|
|
1488
|
-
if (item.label === '楼号/组' || item.label === '单元/排' || item.label === '楼层') {
|
|
1489
|
-
item.hidden = false
|
|
1490
|
-
item.required = false
|
|
1491
|
-
item.value = null
|
|
1492
|
-
}
|
|
1493
|
-
if (item.label === '楼层') {
|
|
1494
|
-
item.hidden = true
|
|
1495
|
-
item.required = false
|
|
1496
|
-
item.value = null
|
|
1497
|
-
}
|
|
1498
|
-
if (item.label === '地址') {
|
|
1499
|
-
item.readonly = true
|
|
1500
|
-
item.value = null
|
|
1501
|
-
}
|
|
1502
|
-
}
|
|
1503
|
-
if (f_address_type === '特殊地址') {
|
|
1504
|
-
if (item.label === '区/县' || item.label === '街道/乡镇') {
|
|
1505
|
-
item.hidden = false
|
|
1506
|
-
item.required = true
|
|
1507
|
-
item.value = null
|
|
1508
|
-
}
|
|
1509
|
-
if (item.label === '集收单位') {
|
|
1510
|
-
item.hidden = false
|
|
1511
|
-
item.required = false
|
|
1512
|
-
item.value = null
|
|
1513
|
-
}
|
|
1514
|
-
if (item.label === '楼号/组' || item.label === '单元/排' || item.label === '楼层' || item.label === '门牌号') {
|
|
1515
|
-
item.hidden = true
|
|
1516
|
-
item.required = false
|
|
1517
|
-
item.value = null
|
|
1518
|
-
}
|
|
1519
|
-
if (item.label === '地址') {
|
|
1520
|
-
item.readonly = false
|
|
1521
|
-
item.value = null
|
|
1522
|
-
}
|
|
1523
|
-
}
|
|
1524
|
-
}
|
|
1525
|
-
},
|
|
1526
|
-
// 团购转散户初始化
|
|
1527
|
-
'apply2ReadyEvent' () {
|
|
1528
|
-
if (this.show_data.f_apply_source === '线下发起') {
|
|
1529
|
-
this.addressInitialization()
|
|
1530
|
-
this.hideLabels('用户编号')
|
|
1531
|
-
this.electiveLabels('用户编号')
|
|
1532
|
-
this.showLabels('片区', '地址类型')
|
|
1533
|
-
this.requiredLabels('片区', '地址类型')
|
|
1534
|
-
}
|
|
1535
|
-
if (this.show_data.f_apply_source === '自动发起') {
|
|
1536
|
-
this.hideLabels('片区', '地址类型')
|
|
1537
|
-
this.electiveLabels('片区', '地址类型',)
|
|
1538
|
-
}
|
|
1539
|
-
},
|
|
1540
|
-
// 申请节点初始化
|
|
1541
|
-
'applyReadyEvent' () {
|
|
1542
|
-
this.addressInitialization()
|
|
1543
|
-
this.pcdChange()
|
|
1544
|
-
this.streetChange()
|
|
1545
|
-
this.areaChange()
|
|
1546
|
-
},
|
|
1547
|
-
// ===========================================
|
|
1548
|
-
async 'button'() {
|
|
1549
|
-
if (this.show_data.button.before) {
|
|
1550
|
-
await this[this.show_data.button.before]()
|
|
1551
|
-
}
|
|
1552
|
-
// 点击重置按钮就重置数据
|
|
1553
|
-
if (this.show_data.button.button_name === '重置') {
|
|
1554
|
-
this.$dispatch('breakControl', this.selectdata)
|
|
1555
|
-
return
|
|
1556
|
-
}
|
|
1557
|
-
|
|
1558
|
-
this.show_data.user = this.$login.f
|
|
1559
|
-
this.show_data.start_activity = this.$workflow_vue.start_activity
|
|
1560
|
-
this.show_data.xmlfilename = this.$workflow_vue.workflow_xmlfilename
|
|
1561
|
-
|
|
1562
|
-
if ((this.show_data.f_apply_type === '报警器报建' || this.show_data.f_apply_type === '工商业报警器报建') && this.show_data.defname === '工程施工' && this.show_data.f_sub_state !='完工' && this.show_data.button.button_name === '完工'){
|
|
1563
|
-
//判断是否添加报警器材料
|
|
1564
|
-
let bjqlag = false
|
|
1565
|
-
let datatemp = {
|
|
1566
|
-
'bjqid':"",
|
|
1567
|
-
'fprocessid':"",
|
|
1568
|
-
'sqvalue':"",
|
|
1569
|
-
'f_bjq_sid':"",
|
|
1570
|
-
'f_material_code':"",
|
|
1571
|
-
'f_bjq_baidu_lng':"",
|
|
1572
|
-
'f_bjq_baidu_lat':"",
|
|
1573
|
-
'f_bjq_gaode_lng':"",
|
|
1574
|
-
'f_bjq_gaode_lat':""
|
|
1575
|
-
}
|
|
1576
|
-
|
|
1577
|
-
let bjqststedata = {
|
|
1578
|
-
"sid":"",
|
|
1579
|
-
"bjqtype":"",
|
|
1580
|
-
"f_process_id":"",
|
|
1581
|
-
"bjqstate":"",
|
|
1582
|
-
"f_userinfo_code":""
|
|
1583
|
-
}
|
|
1584
|
-
let numOne = [];
|
|
1585
|
-
|
|
1586
|
-
let http = new HttpResetClass()
|
|
1587
|
-
let data = {
|
|
1588
|
-
tablename: `t_material_apply`,
|
|
1589
|
-
condition: `f_process_id='${this.show_data.f_process_id}'`
|
|
1590
|
-
}
|
|
1591
|
-
let res = await http.load(
|
|
1592
|
-
'POST',
|
|
1593
|
-
`rs/sql/apply_singleTable`,
|
|
1594
|
-
{data: data},
|
|
1595
|
-
{resolveMsg: null, rejectMsg: 'onetomany查询失败'}
|
|
1596
|
-
)
|
|
1597
|
-
res.data.forEach(item => {
|
|
1598
|
-
if (item.f_material_name.substr(0,3) === '报警器'){
|
|
1599
|
-
var bjname = item.f_material_name.split("-")
|
|
1600
|
-
bjqststedata.sid = item.f_bjq_sid
|
|
1601
|
-
bjqststedata.f_process_id = item.f_process_id
|
|
1602
|
-
bjqststedata.bjqtype = bjname[1]
|
|
1603
|
-
//====================================
|
|
1604
|
-
bjqlag = true
|
|
1605
|
-
datatemp.bjqid = item.id
|
|
1606
|
-
datatemp.fprocessid = item.f_process_id
|
|
1607
|
-
datatemp.f_bjq_sid = item.f_bjq_sid
|
|
1608
|
-
datatemp.f_material_code = item.f_material_code
|
|
1609
|
-
datatemp.f_bjq_lng = item.f_bjq_lng
|
|
1610
|
-
datatemp.f_bjq_lat = item.f_bjq_lat
|
|
1611
|
-
datatemp.f_bjq_gaode_lng = item.f_bjq_gaode_lng
|
|
1612
|
-
datatemp.f_bjq_gaode_lat = item.f_bjq_gaode_lng
|
|
1613
|
-
datatemp.f_bjq_baidu_lng = item.f_bjq_baidu_lng
|
|
1614
|
-
datatemp.f_bjq_baidu_lat = item.f_bjq_baidu_lat
|
|
1615
|
-
numOne.push(item.f_bjq_sid)
|
|
1616
|
-
}
|
|
1617
|
-
})
|
|
1618
|
-
|
|
1619
|
-
// this.show_data.onetomany.forEach(item=>{
|
|
1620
|
-
// console.log("查看报警器材料",item)
|
|
1621
|
-
// item.rows.forEach(i=>{
|
|
1622
|
-
// if (i.f_material_name.substr(0,3) === '报警器'){
|
|
1623
|
-
// var bjname = i.f_material_name.split("-")
|
|
1624
|
-
// bjqststedata.sid = i.f_bjq_sid
|
|
1625
|
-
// bjqststedata.f_process_id = i.f_process_id
|
|
1626
|
-
// bjqststedata.bjqtype = bjname[1]
|
|
1627
|
-
// //====================================
|
|
1628
|
-
// bjqlag = true
|
|
1629
|
-
// datatemp.bjqid = i.id
|
|
1630
|
-
// datatemp.fprocessid = i.f_process_id
|
|
1631
|
-
// datatemp.f_bjq_sid = i.f_bjq_sid
|
|
1632
|
-
// datatemp.f_material_code = i.f_material_code
|
|
1633
|
-
// numOne.push(i.f_bjq_sid)
|
|
1634
|
-
// }
|
|
1635
|
-
// })
|
|
1636
|
-
// })
|
|
1637
|
-
if (!bjqlag){
|
|
1638
|
-
this.$showMessage('请添加报警器物料信息!!!')
|
|
1639
|
-
return
|
|
1640
|
-
}
|
|
1641
|
-
if (numOne.length > 1){
|
|
1642
|
-
this.$showMessage("暂时支持单个报警器物料安装!!!")
|
|
1643
|
-
return
|
|
1644
|
-
}
|
|
1645
|
-
datatemp.sqvalue = this.show_data.areaData.sqvalue
|
|
1646
|
-
datatemp.f_bjq_baidu_lng = this.show_data.templatlng.baidutemplng
|
|
1647
|
-
datatemp.f_bjq_baidu_lat = this.show_data.templatlng.baidutemplat
|
|
1648
|
-
datatemp.f_bjq_gaode_lng = this.show_data.templatlng.gaodetemplng
|
|
1649
|
-
datatemp.f_bjq_gaode_lat = this.show_data.templatlng.gaodetemplat
|
|
1650
|
-
datatemp.f_bjq_lng = this.show_data.templatlng.baidutemplng
|
|
1651
|
-
datatemp.f_bjq_lat = this.show_data.templatlng.baidutemplat
|
|
1652
|
-
|
|
1653
|
-
bjqststedata.f_userinfo_code = this.show_data.f_userinfo_code
|
|
1654
|
-
|
|
1655
|
-
//判断是否推送 及推送的状态
|
|
1656
|
-
//查询是否存在, 以型号及厂家判断
|
|
1657
|
-
let bjqres = await this.$resetpost(
|
|
1658
|
-
`rs/logic/getbjqsyncinfo`,
|
|
1659
|
-
bjqststedata
|
|
1660
|
-
)
|
|
1661
|
-
if (bjqres.data.bjqstate != "成功"){
|
|
1662
|
-
//区域地址存入材料记录表
|
|
1663
|
-
let areares = await this.$resetpost(
|
|
1664
|
-
`rs/logic/saveArea`,
|
|
1665
|
-
{data: datatemp},
|
|
1666
|
-
{resolveMsg: null, rejectMsg: '区域地址保存失败'}
|
|
1667
|
-
)
|
|
1668
|
-
|
|
1669
|
-
//完工之后推送数据到汉威
|
|
1670
|
-
let adddata = {
|
|
1671
|
-
f_bjq_sid : datatemp.f_bjq_sid,
|
|
1672
|
-
f_material_code : datatemp.f_material_code,
|
|
1673
|
-
f_bjq_address: this.show_data.areaData.sqvalue,
|
|
1674
|
-
f_user_name: this.show_data.f_user_name,
|
|
1675
|
-
f_address: this.show_data.f_address,
|
|
1676
|
-
f_user_phone: this.show_data.f_phone,
|
|
1677
|
-
f_userinfo_code: this.show_data.f_userinfo_code,
|
|
1678
|
-
installtime: this.show_data.f_construction_date,
|
|
1679
|
-
f_orgid : this.show_data.f_orgid,
|
|
1680
|
-
f_bjq_lng: datatemp.f_bjq_baidu_lng,
|
|
1681
|
-
f_bjq_lat: datatemp.f_bjq_baidu_lat
|
|
1682
|
-
}
|
|
1683
|
-
let res = await this.$resetpost(
|
|
1684
|
-
`ncc/rs/logic/bjqadduser`,
|
|
1685
|
-
// `rs/logic/bjqadduser`,
|
|
1686
|
-
adddata
|
|
1687
|
-
)
|
|
1688
|
-
if (res.data.code != 200){
|
|
1689
|
-
if (bjqres.data.bjqstate.length == 0){
|
|
1690
|
-
bjqststedata.bjqstate = "失败"
|
|
1691
|
-
let bjqres3 = await this.$resetpost(
|
|
1692
|
-
`rs/logic/addbjqsyncinfo`,
|
|
1693
|
-
bjqststedata
|
|
1694
|
-
)
|
|
1695
|
-
}
|
|
1696
|
-
this.$showMessage(res.data.msg)
|
|
1697
|
-
return
|
|
1698
|
-
}
|
|
1699
|
-
//更改记录表状态
|
|
1700
|
-
if (bjqres.data.bjqstate === "失败"){
|
|
1701
|
-
bjqststedata.bjqstate = "成功"
|
|
1702
|
-
let bjqres1 = await this.$resetpost(
|
|
1703
|
-
`rs/logic/updatebjqsyncinfo`,
|
|
1704
|
-
bjqststedata
|
|
1705
|
-
)
|
|
1706
|
-
}else{
|
|
1707
|
-
bjqststedata.bjqstate = "成功"
|
|
1708
|
-
let bjqres2 = await this.$resetpost(
|
|
1709
|
-
`rs/logic/addbjqsyncinfo`,
|
|
1710
|
-
bjqststedata
|
|
1711
|
-
)
|
|
1712
|
-
}
|
|
1713
|
-
}
|
|
1714
|
-
}
|
|
1715
|
-
if ((this.show_data.f_apply_type === '工商户报建' || this.show_data.f_apply_type === '团购报建')
|
|
1716
|
-
&& (this.show_data.defname === '报装申请') && this.show_data.button.button_name === '提交'){
|
|
1717
|
-
await this.contract_number()
|
|
1718
|
-
}
|
|
1719
|
-
// if(this.show_data.f_apply_type === '散户报建' && this.show_data.defname === '合同签订' && (this.show_data.button.button_name === '保存'||this.show_data.button.button_name === '提交')){
|
|
1720
|
-
// let dataz = {
|
|
1721
|
-
// condition: `u.id = ${this.show_data.id}`,
|
|
1722
|
-
// data: {
|
|
1723
|
-
// id: this.$login.f.id,
|
|
1724
|
-
// orgid: this.$login.f.orgid
|
|
1725
|
-
// }
|
|
1726
|
-
// }
|
|
1727
|
-
// let http = new HttpResetClass()
|
|
1728
|
-
// let restpz = await http.load(
|
|
1729
|
-
// 'POST',
|
|
1730
|
-
// `rs/sql/checkuser`,
|
|
1731
|
-
// {data: dataz},
|
|
1732
|
-
// {resolveMsg: null, rejectMsg: '报建数据查询失败!!!'}
|
|
1733
|
-
// )
|
|
1734
|
-
// this.show_data.actid=restpz.data[0].actid
|
|
1735
|
-
// }
|
|
1736
|
-
let res = await this.$resetpost(
|
|
1737
|
-
`rs/logic/ApplyProductService`,
|
|
1738
|
-
{data: this.show_data},
|
|
1739
|
-
{resolveMsg: null, rejectMsg: '数据保存失败'}
|
|
1740
|
-
)
|
|
1741
|
-
|
|
1742
|
-
|
|
1743
|
-
if (this.show_data.button.after) {
|
|
1744
|
-
this[this.show_data.button.after]()
|
|
1745
|
-
}
|
|
1746
|
-
// // 改管报建 增容报建 优化
|
|
1747
|
-
// if((this.show_data.f_apply_type === '改管报建'||this.show_data.f_apply_type === '增容报建') && this.show_data.defname === '报装申请' && this.show_data.button.button_name === '缴费'){
|
|
1748
|
-
// let datagg = {
|
|
1749
|
-
// condition: `t.f_process_id='${this.show_data.f_process_id}'`,
|
|
1750
|
-
// }
|
|
1751
|
-
// let http = new HttpResetClass()
|
|
1752
|
-
// let restgg = await http.load(
|
|
1753
|
-
// 'POST',
|
|
1754
|
-
// `rs/sql/checkusertwo`,
|
|
1755
|
-
// {data: datagg},
|
|
1756
|
-
// {resolveMsg: null, rejectMsg: '报建数据查询失败!!!'}
|
|
1757
|
-
// )
|
|
1758
|
-
// debugger
|
|
1759
|
-
// if(this.show_data.f_apply_type === '改管报建'){
|
|
1760
|
-
// restgg.data[0].processname = '改管报建流程'
|
|
1761
|
-
// restgg.data[0].defname = '报装缴费'
|
|
1762
|
-
// }else{
|
|
1763
|
-
// restgg.data[0].processname = '增容报建流程'
|
|
1764
|
-
// restgg.data[0].defname = '报装缴费'
|
|
1765
|
-
// }
|
|
1766
|
-
// restgg.data[0].actid = restgg.data[0].actid + 1
|
|
1767
|
-
// this.$dispatch('apply',restgg.data[0])
|
|
1768
|
-
//
|
|
1769
|
-
// }
|
|
1770
|
-
//
|
|
1771
|
-
// // 退款报建 优化
|
|
1772
|
-
// if(this.show_data.f_apply_type === '退款报建' && this.show_data.defname === '终止报建' && this.show_data.button.button_name === '提交'){
|
|
1773
|
-
// let datatk = {
|
|
1774
|
-
// condition: `t.f_process_id='${this.show_data.f_process_id}'`,
|
|
1775
|
-
// }
|
|
1776
|
-
// let http = new HttpResetClass()
|
|
1777
|
-
// let resttk = await http.load(
|
|
1778
|
-
// 'POST',
|
|
1779
|
-
// `rs/sql/checkusertwo`,
|
|
1780
|
-
// {data: datatk},
|
|
1781
|
-
// {resolveMsg: null, rejectMsg: '报建数据查询失败!!!'}
|
|
1782
|
-
// )
|
|
1783
|
-
// debugger
|
|
1784
|
-
// resttk.data[0].processname = '退款报建流程'
|
|
1785
|
-
// resttk.data[0].defname = '退款'
|
|
1786
|
-
// this.$dispatch('apply',resttk.data[0])
|
|
1787
|
-
//
|
|
1788
|
-
// }
|
|
1789
|
-
//
|
|
1790
|
-
//
|
|
1791
|
-
// if(this.show_data.f_apply_type === '散户报建' && this.show_data.defname === '报装申请' && this.show_data.button.button_name === '合同'){
|
|
1792
|
-
// let data = {
|
|
1793
|
-
// tablename: 't_apply',
|
|
1794
|
-
// condition: `f_process_id='${this.show_data.f_process_id}'`
|
|
1795
|
-
// }
|
|
1796
|
-
// let http = new HttpResetClass()
|
|
1797
|
-
// let restp = await http.load(
|
|
1798
|
-
// 'POST',
|
|
1799
|
-
// `rs/sql/apply_singleTable`,
|
|
1800
|
-
// {data: data},
|
|
1801
|
-
// {resolveMsg: null, rejectMsg: '报建数据查询失败!!!'}
|
|
1802
|
-
// )
|
|
1803
|
-
// debugger
|
|
1804
|
-
// restp.data[0].processname = '散户报建流程'
|
|
1805
|
-
// restp.data[0].defname = '合同签订'
|
|
1806
|
-
// this.$dispatch('apply',restp.data[0])
|
|
1807
|
-
//
|
|
1808
|
-
// } else if(this.show_data.f_apply_type === '散户报建' && this.show_data.defname === '合同签订' && this.show_data.button.button_name === '提交'){
|
|
1809
|
-
// let data2 = {
|
|
1810
|
-
// condition: `u.id = ${this.show_data.id}`,
|
|
1811
|
-
// data: {
|
|
1812
|
-
// id: this.$login.f.id,
|
|
1813
|
-
// orgid: this.$login.f.orgid
|
|
1814
|
-
// }
|
|
1815
|
-
// }
|
|
1816
|
-
// let http = new HttpResetClass()
|
|
1817
|
-
// let restp1 = await http.load(
|
|
1818
|
-
// 'POST',
|
|
1819
|
-
// `rs/sql/checkuser`,
|
|
1820
|
-
// {data: data2},
|
|
1821
|
-
// {resolveMsg: null, rejectMsg: '报建数据查询失败!!!'}
|
|
1822
|
-
// )
|
|
1823
|
-
// debugger
|
|
1824
|
-
// console.log('有没有发请求打印查询的内容restp1',restp1)
|
|
1825
|
-
// // restp1.data[0].processname = '散户报建流程'
|
|
1826
|
-
// // restp1.data[0].defname = '报装缴费'
|
|
1827
|
-
// this.$dispatch('apply',restp1.data[0])
|
|
1828
|
-
// }else if(this.show_data.f_apply_type === '散户报建' && this.show_data.defname === '报装缴费' && this.show_data.button.button_name === '提交'){
|
|
1829
|
-
// let data3 = {
|
|
1830
|
-
// condition: `u.id = ${this.show_data.id}`,
|
|
1831
|
-
// data: {
|
|
1832
|
-
// id: this.$login.f.id,
|
|
1833
|
-
// orgid: this.$login.f.orgid
|
|
1834
|
-
// }
|
|
1835
|
-
// }
|
|
1836
|
-
// let http = new HttpResetClass()
|
|
1837
|
-
// let restp2 = await http.load(
|
|
1838
|
-
// 'POST',
|
|
1839
|
-
// `rs/sql/checkuser`,
|
|
1840
|
-
// {data: data3},
|
|
1841
|
-
// {resolveMsg: null, rejectMsg: '报建数据查询失败!!!'}
|
|
1842
|
-
// )
|
|
1843
|
-
// debugger
|
|
1844
|
-
// console.log('打印查询的内容',restp2)
|
|
1845
|
-
// if(restp2.length>0){
|
|
1846
|
-
// this.$dispatch('apply',restp2.data[0])
|
|
1847
|
-
// }else{
|
|
1848
|
-
// debugger
|
|
1849
|
-
// this.$dispatch('loadPage')
|
|
1850
|
-
// }
|
|
1851
|
-
// }
|
|
1852
|
-
// else{
|
|
1853
|
-
// this.$dispatch('loadPage')
|
|
1854
|
-
// }
|
|
1855
|
-
this.$dispatch('loadPage')
|
|
1856
|
-
},
|
|
1857
|
-
// 失去焦点出触发事件
|
|
1858
|
-
'onchange' (index) {
|
|
1859
|
-
if (this.show_data.defname === '报装申请' || this.show_data.defname === '信息确认') {
|
|
1860
|
-
|
|
1861
|
-
if (
|
|
1862
|
-
this.show_data.fields[index].label === '区/县' ||
|
|
1863
|
-
this.show_data.fields[index].label === '街道/乡镇' ||
|
|
1864
|
-
this.show_data.fields[index].label === '集收单位' ||
|
|
1865
|
-
this.show_data.fields[index].label === '楼号/组' ||
|
|
1866
|
-
this.show_data.fields[index].label === '单元/排' ||
|
|
1867
|
-
this.show_data.fields[index].label === '楼层' ||
|
|
1868
|
-
this.show_data.fields[index].label === '门牌号'
|
|
1869
|
-
) {
|
|
1870
|
-
|
|
1871
|
-
let f_pcd = this.getLableValue('区/县') || ''
|
|
1872
|
-
let f_street = this.getLableValue('街道/乡镇') || ''
|
|
1873
|
-
let f_residential_area = this.getLableValue('集收单位') || ''
|
|
1874
|
-
let f_building = this.getLableValue('楼号/组') || ''
|
|
1875
|
-
let f_building_suffix = f_building ? '栋' : ''
|
|
1876
|
-
let f_unit = this.getLableValue('单元/排') || ''
|
|
1877
|
-
// let f_unit_suffix = f_unit ? this.config.f_unit_suffix : ''
|
|
1878
|
-
let f_unit_suffix = f_unit ? '单元' : ''
|
|
1879
|
-
let f_floor = this.getLableValue('楼层') || ''
|
|
1880
|
-
// let f_floor_suffix = f_floor ? this.config.f_floor_suffix : ''
|
|
1881
|
-
let f_floor_suffix = f_floor ? '层' : ''
|
|
1882
|
-
let f_room = this.getLableValue('门牌号') || ''
|
|
1883
|
-
// let f_room_suffix = f_room ? this.config.f_room_suffix : ''
|
|
1884
|
-
let f_room_suffix = f_room ? '室' : ''
|
|
1885
|
-
|
|
1886
|
-
let f_address = f_street + f_residential_area + f_building + f_building_suffix + f_unit + f_unit_suffix + f_floor + f_floor_suffix + f_room + f_room_suffix
|
|
1887
|
-
this.setLabelValue("地址", f_address)
|
|
1888
|
-
}
|
|
1889
|
-
}
|
|
1890
|
-
if(this.show_data.fields[index].label === '是否老居民首次开发'){
|
|
1891
|
-
if( this.getLableValue('是否老居民首次开发')==='是'){
|
|
1892
|
-
this.showLabels('开户比例')
|
|
1893
|
-
this.hideLabels('立管架空')
|
|
1894
|
-
this.setLabelValue("立管架空", '')
|
|
1895
|
-
}else if(this.getLableValue('是否老居民首次开发')==='否'){
|
|
1896
|
-
this.showLabels('立管架空')
|
|
1897
|
-
this.hideLabels('开户比例')
|
|
1898
|
-
this.setLabelValue("开户比例", '')
|
|
1899
|
-
}
|
|
1900
|
-
|
|
1901
|
-
}
|
|
1902
|
-
},
|
|
1903
|
-
selectSearch (val, index) {},
|
|
1904
|
-
'onblur' (index) {
|
|
1905
|
-
},
|
|
1906
|
-
'oninput' (index) {
|
|
1907
|
-
},
|
|
1908
|
-
'initializtionView' () {},
|
|
1909
|
-
async 'onchangeModal' (index, fieldIndex) {
|
|
1910
|
-
},
|
|
1911
|
-
async 'onblurModal' (index, fieldIndex) {
|
|
1912
|
-
|
|
1913
|
-
},
|
|
1914
|
-
async 'oninputModal' (index, fieldIndex) {
|
|
1915
|
-
|
|
1916
|
-
},
|
|
1917
|
-
async 'onetomanydelete' (index, rowIndex) {
|
|
1918
|
-
|
|
1919
|
-
let http = new HttpResetClass()
|
|
1920
|
-
|
|
1921
|
-
let res = await http.load(
|
|
1922
|
-
'DELETE',
|
|
1923
|
-
`rs/entity/${this.show_data.onetomany[index].tables[0]}/${this.show_data.onetomany[index].rows[rowIndex].id}`,
|
|
1924
|
-
null,
|
|
1925
|
-
{resolveMsg: null, rejectMsg: '删除失败!!!'}
|
|
1926
|
-
)
|
|
1927
|
-
|
|
1928
|
-
res = await this.$resetpost(
|
|
1929
|
-
'rs/entity/t_apply',
|
|
1930
|
-
this.show_data
|
|
1931
|
-
)
|
|
1932
|
-
|
|
1933
|
-
this.$dispatch('breakControl', this.show_data)
|
|
1934
|
-
},
|
|
1935
|
-
async 'onetomanyupdate' (index, rowIndex) {
|
|
1936
|
-
let data = this.show_data.onetomany[index].rows[rowIndex]
|
|
1937
|
-
|
|
1938
|
-
this.show_data.onetomany[index].fields.forEach(item => {
|
|
1939
|
-
data[item.field] = item.value
|
|
1940
|
-
})
|
|
1941
|
-
let res = await this.$resetpost(
|
|
1942
|
-
`rs/entity/${this.show_data.onetomany[index].tables[0]}`,
|
|
1943
|
-
data
|
|
1944
|
-
)
|
|
1945
|
-
|
|
1946
|
-
res = await this.$resetpost(
|
|
1947
|
-
'rs/entity/t_apply',
|
|
1948
|
-
this.show_data
|
|
1949
|
-
)
|
|
1950
|
-
|
|
1951
|
-
this.$dispatch('breakControl', this.show_data)
|
|
1952
|
-
},
|
|
1953
|
-
async 'onetomanyadd' (index) {
|
|
1954
|
-
let data = {
|
|
1955
|
-
f_process_id : this.show_data.f_process_id,
|
|
1956
|
-
f_operator_id: this.$login.f.id,
|
|
1957
|
-
f_operator: this.$login.f.name,
|
|
1958
|
-
f_operation_date: new Date().Format('yyyy-MM-dd HH:mm:ss'),
|
|
1959
|
-
f_orgid: this.$login.f.orgid,
|
|
1960
|
-
f_orgname: this.$login.f.orgs
|
|
1961
|
-
}
|
|
1962
|
-
this.show_data.onetomany[index].fields.forEach(item => {
|
|
1963
|
-
data[item.field] = item.value
|
|
1964
|
-
})
|
|
1965
|
-
let res = await this.$resetpost(
|
|
1966
|
-
`rs/entity/${this.show_data.onetomany[index].tables[0]}`,
|
|
1967
|
-
data
|
|
1968
|
-
)
|
|
1969
|
-
|
|
1970
|
-
res = await this.$resetpost(
|
|
1971
|
-
'rs/entity/t_apply',
|
|
1972
|
-
this.show_data
|
|
1973
|
-
)
|
|
1974
|
-
|
|
1975
|
-
this.$dispatch('breakControl', this.show_data)
|
|
1976
|
-
},
|
|
1977
|
-
async 'importEvent' (index, table, configName, filepath) {
|
|
1978
|
-
let data = {
|
|
1979
|
-
selectdata: this.show_data,
|
|
1980
|
-
table: table,
|
|
1981
|
-
filepath: filepath,
|
|
1982
|
-
configName: configName,
|
|
1983
|
-
user: this.$login.f
|
|
1984
|
-
}
|
|
1985
|
-
|
|
1986
|
-
let res = await this.$resetpost(
|
|
1987
|
-
`rs/logic/importEvent`,
|
|
1988
|
-
data
|
|
1989
|
-
)
|
|
1990
|
-
|
|
1991
|
-
this.$dispatch('breakControl', this.show_data)
|
|
1992
|
-
},
|
|
1993
|
-
'onbutchange' (index) {
|
|
1994
|
-
|
|
1995
|
-
},
|
|
1996
|
-
'onbutblur' (index) {
|
|
1997
|
-
|
|
1998
|
-
},
|
|
1999
|
-
'onbutinput' (index) {
|
|
2000
|
-
|
|
2001
|
-
|
|
2002
|
-
}
|
|
2003
|
-
},
|
|
2004
|
-
watch: {
|
|
2005
|
-
}
|
|
2006
|
-
}
|
|
2007
|
-
</script>
|
|
2008
|
-
<style scoped>
|
|
2009
|
-
/*清除model中的浮动*/
|
|
2010
|
-
.clearfix:after,.clearfix:before{
|
|
2011
|
-
display: table;
|
|
2012
|
-
}
|
|
2013
|
-
.clearfix:after{
|
|
2014
|
-
clear: both;
|
|
2015
|
-
}
|
|
2016
|
-
</style>
|
|
1
|
+
<template>
|
|
2
|
+
<div class="" v-if="showview">
|
|
3
|
+
<show-back-reason :selectdata="show_data"></show-back-reason>
|
|
4
|
+
<service-view v-ref:serviceview :data="show_data"></service-view>
|
|
5
|
+
</div>
|
|
6
|
+
</template>
|
|
7
|
+
<script>
|
|
8
|
+
import Vue from 'vue'
|
|
9
|
+
import {HttpResetClass} from 'vue-client'
|
|
10
|
+
import {isEmpty} from "../../../components/Util";
|
|
11
|
+
|
|
12
|
+
// Date格式化
|
|
13
|
+
Date.prototype.Format = function (fmt) {
|
|
14
|
+
var o = {
|
|
15
|
+
"M+": this.getMonth() + 1, //月份
|
|
16
|
+
"d+": this.getDate(), //日
|
|
17
|
+
"H+": this.getHours(), //小时
|
|
18
|
+
"m+": this.getMinutes(), //分
|
|
19
|
+
"s+": this.getSeconds(), //秒
|
|
20
|
+
"q+": Math.floor((this.getMonth() + 3) / 3), //季度
|
|
21
|
+
"S": this.getMilliseconds() //毫秒
|
|
22
|
+
};
|
|
23
|
+
if (/(y+)/.test(fmt)) fmt = fmt.replace(RegExp.$1, (this.getFullYear() + "").substr(4 - RegExp.$1.length));
|
|
24
|
+
for (var k in o)
|
|
25
|
+
if (new RegExp("(" + k + ")").test(fmt)) fmt = fmt.replace(RegExp.$1, (RegExp.$1.length == 1) ? (o[k]) : (("00" + o[k]).substr(("" + o[k]).length)));
|
|
26
|
+
return fmt;
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
export default {
|
|
30
|
+
title: '报建流程业务控制层',
|
|
31
|
+
props: ['selectdata'],
|
|
32
|
+
data () {
|
|
33
|
+
return {
|
|
34
|
+
data: null, // 数据库数据,json配置文件数据的数据集合
|
|
35
|
+
json_datas: null, // Json配置文件集合
|
|
36
|
+
showview: false, // 控制显示service-view组件
|
|
37
|
+
show_data: null, // 给view层显示的数据
|
|
38
|
+
config: {},
|
|
39
|
+
Pricetype:''
|
|
40
|
+
}
|
|
41
|
+
},
|
|
42
|
+
ready () {
|
|
43
|
+
this.refurbish()
|
|
44
|
+
},
|
|
45
|
+
methods: {
|
|
46
|
+
async servicer(){
|
|
47
|
+
let data = {
|
|
48
|
+
tablename: 't_user',
|
|
49
|
+
condition: `1=1`
|
|
50
|
+
}
|
|
51
|
+
let http = new HttpResetClass()
|
|
52
|
+
let res = await http.load(
|
|
53
|
+
'POST',
|
|
54
|
+
`rs/sql/apply_singleTable`,
|
|
55
|
+
{data: data},
|
|
56
|
+
{resolveMsg: null, rejectMsg: '服务人查询失败!!!'}
|
|
57
|
+
)
|
|
58
|
+
this.setLabelOptions('服务人', res.data.map(item => {
|
|
59
|
+
return {
|
|
60
|
+
label: item.name,
|
|
61
|
+
value: item.name
|
|
62
|
+
}
|
|
63
|
+
}))
|
|
64
|
+
},
|
|
65
|
+
async ceshi(){
|
|
66
|
+
for (let i = 0; i < this.show_data.fields.length; i++) {
|
|
67
|
+
if (this.show_data.defname==='报装申请' && this.show_data.fields[i].label === '合同编号') {
|
|
68
|
+
let http2 = new HttpResetClass()
|
|
69
|
+
let applyNum = await http2.load('POST', 'rs/logic/getProjectNo', {
|
|
70
|
+
data: {
|
|
71
|
+
f_filiale: this.$login.f.orgs,
|
|
72
|
+
f_order_id: this.selectdata.f_order_id
|
|
73
|
+
}
|
|
74
|
+
}, {resolveMsg: null, rejectMsg: null})
|
|
75
|
+
console.log("生成的合同编号为:" + applyNum.data)
|
|
76
|
+
this.show_data.fields[i].value = applyNum.data
|
|
77
|
+
}
|
|
78
|
+
}
|
|
79
|
+
},
|
|
80
|
+
|
|
81
|
+
// 组件初始化操作
|
|
82
|
+
async refurbish() {
|
|
83
|
+
this.json_datas = this.$workflow_vue
|
|
84
|
+
let sum = 0
|
|
85
|
+
let jsonData = {}
|
|
86
|
+
if (!this.json_datas || !this.json_datas.activitys || this.json_datas.activitys.length === 0) {
|
|
87
|
+
this.$showMessage("网络故障,请刷新页面")
|
|
88
|
+
return
|
|
89
|
+
}
|
|
90
|
+
this.json_datas.activitys.forEach(item => {
|
|
91
|
+
if (this.selectdata.defname === item.title) {
|
|
92
|
+
jsonData = item // 拿到当前节点的json配置信息
|
|
93
|
+
sum++ // 节点名一样的个数
|
|
94
|
+
}
|
|
95
|
+
return this.selectdata.defname === item.title // 拿到当前节点的json配置信息
|
|
96
|
+
})
|
|
97
|
+
|
|
98
|
+
if (sum === 0) {
|
|
99
|
+
this.$showMessage(`没有在JSON配置文件中找到活动名为:(${this.selectdata.defname})的节点配置`)
|
|
100
|
+
return
|
|
101
|
+
}
|
|
102
|
+
if (sum > 1) {
|
|
103
|
+
this.$showMessage(`在JSON配置文件中找到活动名为:(${this.selectdata.defname})的节点配置:${sum}个`)
|
|
104
|
+
return
|
|
105
|
+
}
|
|
106
|
+
|
|
107
|
+
this.selectdata = Object.assign({}, this.selectdata, jsonData)
|
|
108
|
+
|
|
109
|
+
// fields 字段填充值
|
|
110
|
+
for (const item of this.selectdata.fields) {
|
|
111
|
+
if (!item.value) {
|
|
112
|
+
item.value = null
|
|
113
|
+
}
|
|
114
|
+
if(this.selectdata.f_apply_type === '集体报建' && this.selectdata.defname === '报装缴费'){
|
|
115
|
+
if(item.label === '未结总金额'){
|
|
116
|
+
item.value = this.selectdata.f_due_money - this.selectdata.f_cumulative_payment_money
|
|
117
|
+
}
|
|
118
|
+
if(item.label === '付款比例'){
|
|
119
|
+
item.value = (this.selectdata.f_cumulative_payment_money/this.selectdata.f_due_money * 100) + '%'
|
|
120
|
+
}
|
|
121
|
+
}
|
|
122
|
+
if (!item.value && (item.default || item.default === 0) && item.type !== 'datepicker') {
|
|
123
|
+
if (item.eval) {
|
|
124
|
+
item.value = eval(item.default)
|
|
125
|
+
} else {
|
|
126
|
+
item.value = item.default
|
|
127
|
+
}
|
|
128
|
+
}
|
|
129
|
+
|
|
130
|
+
if (this.selectdata[item.field]) {
|
|
131
|
+
// 将json字符串格式化赋值给value
|
|
132
|
+
if (String(this.selectdata[item.field]).startsWith("{")) {
|
|
133
|
+
item.value = JSON.parse(this.selectdata[item.field])
|
|
134
|
+
} else {
|
|
135
|
+
item.value = this.selectdata[item.field]
|
|
136
|
+
}
|
|
137
|
+
}
|
|
138
|
+
if (this.selectdata[item.field] === 0) {
|
|
139
|
+
item.value = 0
|
|
140
|
+
}
|
|
141
|
+
|
|
142
|
+
// datepicker
|
|
143
|
+
if (item.type === 'datepicker' && !item.value && item.default) {
|
|
144
|
+
item.value = new Date().Format(`${item.format ? item.format : 'yyyy-MM-dd HH:mm:ss'}`)
|
|
145
|
+
}
|
|
146
|
+
// 如果配置类型为select,优先从参数列表获取options
|
|
147
|
+
if (item.type === 'select' || item.type === 'checkbox') {
|
|
148
|
+
if (item.param) {
|
|
149
|
+
let temp = this.$appdata.getParam(item.label)
|
|
150
|
+
|
|
151
|
+
if (temp && temp.length > 0) {
|
|
152
|
+
item.options = temp
|
|
153
|
+
}
|
|
154
|
+
|
|
155
|
+
if (item.paramLabel) {
|
|
156
|
+
temp = this.$appdata.getParam(item.paramLabel)
|
|
157
|
+
if (temp && temp.length > 0) {
|
|
158
|
+
item.options = temp
|
|
159
|
+
}
|
|
160
|
+
}
|
|
161
|
+
}
|
|
162
|
+
|
|
163
|
+
if (item.ready) {
|
|
164
|
+
console.log(item.ready)
|
|
165
|
+
item.options = await this[item.ready]()
|
|
166
|
+
|
|
167
|
+
}
|
|
168
|
+
}
|
|
169
|
+
|
|
170
|
+
|
|
171
|
+
if (item.type === 'checkbox') {
|
|
172
|
+
if (this.selectdata[item.field]) {
|
|
173
|
+
item.value = JSON.parse(this.selectdata[item.field])
|
|
174
|
+
} else {
|
|
175
|
+
item.value = []
|
|
176
|
+
}
|
|
177
|
+
}
|
|
178
|
+
|
|
179
|
+
this.selectdata[item.field] = item.value
|
|
180
|
+
}
|
|
181
|
+
|
|
182
|
+
// 控制组件
|
|
183
|
+
if (this.selectdata.components) {
|
|
184
|
+
this.selectdata.components.forEach(item => {
|
|
185
|
+
if (!item.mark) {
|
|
186
|
+
item.mark = 0
|
|
187
|
+
}
|
|
188
|
+
})
|
|
189
|
+
}
|
|
190
|
+
// 初始化onetomany
|
|
191
|
+
if (this.selectdata.onetomany) {
|
|
192
|
+
for (const item of this.selectdata.onetomany) {
|
|
193
|
+
let res = null
|
|
194
|
+
if (item.queryEvent) {
|
|
195
|
+
res = this[item.queryEvent]()
|
|
196
|
+
} else {
|
|
197
|
+
let data = {
|
|
198
|
+
tablename: item.tables[0],
|
|
199
|
+
condition: `f_process_id='${this.selectdata.f_process_id}'`
|
|
200
|
+
}
|
|
201
|
+
res = await this.$resetpost(
|
|
202
|
+
'rs/sql/apply_singleTable',
|
|
203
|
+
{data: data},
|
|
204
|
+
{resolveMsg: null, rejectMsg: 'onetomany查询失败'}
|
|
205
|
+
)
|
|
206
|
+
}
|
|
207
|
+
|
|
208
|
+
item.rows = res.data
|
|
209
|
+
|
|
210
|
+
// 初始化onetomany中的fields
|
|
211
|
+
for (const field of item.fields) {
|
|
212
|
+
if (!field.value) {
|
|
213
|
+
if (field.value !== 0) {
|
|
214
|
+
field.value = null
|
|
215
|
+
}
|
|
216
|
+
}
|
|
217
|
+
|
|
218
|
+
if (field.default || field.default === 0) {
|
|
219
|
+
field.value = field.default
|
|
220
|
+
}
|
|
221
|
+
|
|
222
|
+
// datepicker
|
|
223
|
+
if (field.type === 'datepicker' && !field.value && field.default) {
|
|
224
|
+
field.value = new Date().Format(`${field.format ? field.format : 'yyyy-MM-dd HH:mm:ss'}`)
|
|
225
|
+
}
|
|
226
|
+
|
|
227
|
+
if (field.type === 'select') {
|
|
228
|
+
|
|
229
|
+
let temp = this.$appdata.getParam(field.label)
|
|
230
|
+
|
|
231
|
+
if (temp && temp.length > 0) {
|
|
232
|
+
field.options = temp
|
|
233
|
+
}
|
|
234
|
+
|
|
235
|
+
if (field.paramLabel) {
|
|
236
|
+
temp = this.$appdata.getParam(field.paramLabel)
|
|
237
|
+
if (temp && temp.length > 0) {
|
|
238
|
+
item.options = temp
|
|
239
|
+
}
|
|
240
|
+
}
|
|
241
|
+
}
|
|
242
|
+
}
|
|
243
|
+
}
|
|
244
|
+
}
|
|
245
|
+
// 初始化 buttons_fields
|
|
246
|
+
for (const item of this.selectdata.buttons) {
|
|
247
|
+
if (item.button_name === '下发') {
|
|
248
|
+
|
|
249
|
+
let data = {
|
|
250
|
+
source: item.source,
|
|
251
|
+
userid: this.$login.f.id
|
|
252
|
+
}
|
|
253
|
+
if (item.sourceMethod) {
|
|
254
|
+
data.source = this[item.sourceMethod]()
|
|
255
|
+
}
|
|
256
|
+
if (!data.source) {
|
|
257
|
+
this.$showMessage("请配置获取人员表达式")
|
|
258
|
+
return
|
|
259
|
+
}
|
|
260
|
+
|
|
261
|
+
let res = await this.$resetpost(
|
|
262
|
+
'rs/search',
|
|
263
|
+
{data: data},
|
|
264
|
+
{resolveMsg: null, rejectMsg: '下发人员查询失败!!!'}
|
|
265
|
+
)
|
|
266
|
+
|
|
267
|
+
let options = res.data.map(source => {
|
|
268
|
+
return {
|
|
269
|
+
"label": source.name,
|
|
270
|
+
"value": source.id
|
|
271
|
+
}
|
|
272
|
+
})
|
|
273
|
+
|
|
274
|
+
if (item.button_fields.length !== 1) {
|
|
275
|
+
this.$showMessage("下发有且只能有一个字段!!!")
|
|
276
|
+
return
|
|
277
|
+
}
|
|
278
|
+
|
|
279
|
+
item.button_fields[0].options = options
|
|
280
|
+
}
|
|
281
|
+
if (item.button_fields) {
|
|
282
|
+
item.button_fields.forEach(x => {
|
|
283
|
+
// 如果配置类型为select,优先从参数列表获取options
|
|
284
|
+
if (x.type === 'select') {
|
|
285
|
+
|
|
286
|
+
if (x.param) {
|
|
287
|
+
let temp = this.$appdata.getParam(x.label)
|
|
288
|
+
|
|
289
|
+
if (temp && temp.length > 0) {
|
|
290
|
+
x.options = temp
|
|
291
|
+
}
|
|
292
|
+
|
|
293
|
+
if (x.paramLabel) {
|
|
294
|
+
temp = this.$appdata.getParam(x.paramLabel)
|
|
295
|
+
if (temp && temp.length > 0) {
|
|
296
|
+
x.options = temp
|
|
297
|
+
}
|
|
298
|
+
}
|
|
299
|
+
}
|
|
300
|
+
|
|
301
|
+
}
|
|
302
|
+
})
|
|
303
|
+
}
|
|
304
|
+
}
|
|
305
|
+
// 消除双向绑定,避免子组件(显示层)数据更改,父组件(控制层)也更改
|
|
306
|
+
let temp = JSON.parse(JSON.stringify(this.selectdata))
|
|
307
|
+
console.log('打印下temp',temp)
|
|
308
|
+
this.show_data = temp
|
|
309
|
+
for (const item of this.show_data.fields) {
|
|
310
|
+
if(item.label=='气价名称' && !isEmpty(this.show_data.f_price_name)){
|
|
311
|
+
if(item.label==='气价名称'){
|
|
312
|
+
item.value=this.show_data.f_price_name
|
|
313
|
+
}
|
|
314
|
+
}
|
|
315
|
+
}
|
|
316
|
+
this.$nextTick(() => {
|
|
317
|
+
this.showview = true
|
|
318
|
+
})
|
|
319
|
+
},
|
|
320
|
+
// 金额转大写
|
|
321
|
+
smalltoBIG(n) {
|
|
322
|
+
let fraction = ['角', '分'];
|
|
323
|
+
let digit = ['零', '壹', '贰', '叁', '肆', '伍', '陆', '柒', '捌', '玖'];
|
|
324
|
+
let unit = [['元', '万', '亿'], ['', '拾', '佰', '仟']];
|
|
325
|
+
let head = n < 0 ? '欠' : '';
|
|
326
|
+
n = Math.abs(n);
|
|
327
|
+
|
|
328
|
+
let s = '';
|
|
329
|
+
|
|
330
|
+
for (var i = 0; i < fraction.length; i++) {
|
|
331
|
+
s += (digit[Math.floor(n * 10 * Math.pow(10, i)) % 10] + fraction[i]).replace(/零./, '');
|
|
332
|
+
}
|
|
333
|
+
s = s || '整';
|
|
334
|
+
n = Math.floor(n);
|
|
335
|
+
|
|
336
|
+
for (var i = 0; i < unit[0].length && n > 0; i++) {
|
|
337
|
+
let p = '';
|
|
338
|
+
for (var j = 0; j < unit[1].length && n > 0; j++) {
|
|
339
|
+
p = digit[n % 10] + unit[1][j] + p;
|
|
340
|
+
n = Math.floor(n / 10);
|
|
341
|
+
}
|
|
342
|
+
s = p.replace(/(零.)*零$/, '').replace(/^$/, '零') + unit[0][i] + s;
|
|
343
|
+
}
|
|
344
|
+
return head + s.replace(/(零.)*零元/, '元').replace(/(零.)+/g, '零').replace(/^整$/, '零元整')
|
|
345
|
+
},
|
|
346
|
+
getLableValue(label) {
|
|
347
|
+
for (const item of this.show_data.fields) {
|
|
348
|
+
if (item.label === label && item.type !== 'number') {
|
|
349
|
+
return item.value || ''
|
|
350
|
+
}
|
|
351
|
+
if (item.label === label && item.type === 'number') {
|
|
352
|
+
return item.value || 0
|
|
353
|
+
}
|
|
354
|
+
}
|
|
355
|
+
},
|
|
356
|
+
getLableOptions(label) {
|
|
357
|
+
for (const item of this.show_data.fields) {
|
|
358
|
+
if (item.label === label) {
|
|
359
|
+
return item.options
|
|
360
|
+
}
|
|
361
|
+
}
|
|
362
|
+
},
|
|
363
|
+
setLabelValue(label, value) {
|
|
364
|
+
for (const item of this.show_data.fields) {
|
|
365
|
+
if (item.label === label) {
|
|
366
|
+
item.value = value
|
|
367
|
+
this.show_data[item.field] = value
|
|
368
|
+
}
|
|
369
|
+
}
|
|
370
|
+
},
|
|
371
|
+
setLabelOptions(label, options) {
|
|
372
|
+
for (const item of this.show_data.fields) {
|
|
373
|
+
if (item.label === label) {
|
|
374
|
+
item.options = options
|
|
375
|
+
}
|
|
376
|
+
}
|
|
377
|
+
},
|
|
378
|
+
showLabels(...labels) {
|
|
379
|
+
for (const item of this.show_data.fields) {
|
|
380
|
+
if (labels.includes(item.label)) {
|
|
381
|
+
item.hidden = false
|
|
382
|
+
}
|
|
383
|
+
}
|
|
384
|
+
},
|
|
385
|
+
hideLabels(...labels) {
|
|
386
|
+
for (const item of this.show_data.fields) {
|
|
387
|
+
if (labels.includes(item.label)) {
|
|
388
|
+
item.hidden = true
|
|
389
|
+
}
|
|
390
|
+
}
|
|
391
|
+
},
|
|
392
|
+
requiredLabels(...labels) {
|
|
393
|
+
for (const item of this.show_data.fields) {
|
|
394
|
+
if (labels.includes(item.label)) {
|
|
395
|
+
item.required = true
|
|
396
|
+
}
|
|
397
|
+
}
|
|
398
|
+
},
|
|
399
|
+
electiveLabels(...labels) {
|
|
400
|
+
for (const item of this.show_data.fields) {
|
|
401
|
+
if (labels.includes(item.label)) {
|
|
402
|
+
item.required = false
|
|
403
|
+
}
|
|
404
|
+
}
|
|
405
|
+
},
|
|
406
|
+
readonlyLabels(...labels) {
|
|
407
|
+
for (const item of this.show_data.fields) {
|
|
408
|
+
if (labels.includes(item.label)) {
|
|
409
|
+
item.readonly = true
|
|
410
|
+
item.disabled = true
|
|
411
|
+
}
|
|
412
|
+
}
|
|
413
|
+
},
|
|
414
|
+
readwriteLabels(...labels) {
|
|
415
|
+
for (const item of this.show_data.fields) {
|
|
416
|
+
if (labels.includes(item.label)) {
|
|
417
|
+
item.readonly = false
|
|
418
|
+
item.disabled = false
|
|
419
|
+
}
|
|
420
|
+
}
|
|
421
|
+
},
|
|
422
|
+
disabledButtons(...buttons) {
|
|
423
|
+
for (const item of this.show_data.buttons) {
|
|
424
|
+
if (buttons.includes(item.button_name)) {
|
|
425
|
+
item.disabled = true
|
|
426
|
+
}
|
|
427
|
+
}
|
|
428
|
+
},
|
|
429
|
+
enableButtons(...buttons) {
|
|
430
|
+
for (const item of this.show_data.buttons) {
|
|
431
|
+
if (buttons.includes(item.button_name)) {
|
|
432
|
+
item.disabled = false
|
|
433
|
+
}
|
|
434
|
+
}
|
|
435
|
+
},
|
|
436
|
+
showButtons(...buttons) {
|
|
437
|
+
for (const item of this.show_data.buttons) {
|
|
438
|
+
if (buttons.includes(item.button_name)) {
|
|
439
|
+
item.hidden = false
|
|
440
|
+
}
|
|
441
|
+
}
|
|
442
|
+
},
|
|
443
|
+
hideButtons(...buttons) {
|
|
444
|
+
for (const item of this.show_data.buttons) {
|
|
445
|
+
if (buttons.includes(item.button_name)) {
|
|
446
|
+
item.hidden = true
|
|
447
|
+
}
|
|
448
|
+
}
|
|
449
|
+
},
|
|
450
|
+
async checkDuplicate(index) {
|
|
451
|
+
let http = new HttpResetClass()
|
|
452
|
+
let data = {
|
|
453
|
+
tablename: 't_apply',
|
|
454
|
+
condition: `${this.show_data.fields[index].field} = '${this.show_data.fields[index].value}'`
|
|
455
|
+
}
|
|
456
|
+
let res = await http.load('POST', 'rs/sql/apply_singleTable', {data: data}, {
|
|
457
|
+
resolveMsg: null,
|
|
458
|
+
rejectMsg: `${this.show_data.fields[index].label}查询失败`
|
|
459
|
+
})
|
|
460
|
+
if (res.data.length > 0) {
|
|
461
|
+
this.show_data.fields[index].value = null
|
|
462
|
+
this.$showAlert(`${this.show_data.fields[index].label}已存在!!!`, 'warning', 3000)
|
|
463
|
+
}
|
|
464
|
+
},
|
|
465
|
+
// 获取片区
|
|
466
|
+
async getSliceArea () {
|
|
467
|
+
let data = {
|
|
468
|
+
tablename: 't_zone',
|
|
469
|
+
condition: `f_orgid = '${this.$login.f.orgid}'`
|
|
470
|
+
}
|
|
471
|
+
let http = new HttpResetClass()
|
|
472
|
+
let res = await http.load(
|
|
473
|
+
'POST',
|
|
474
|
+
`rs/sql/apply_singleTable`,
|
|
475
|
+
{data: data},
|
|
476
|
+
{resolveMsg: null, rejectMsg: '片区查询失败!!!'}
|
|
477
|
+
)
|
|
478
|
+
|
|
479
|
+
return res.data.map(item => {
|
|
480
|
+
return {
|
|
481
|
+
label: item.name,
|
|
482
|
+
value: item.name
|
|
483
|
+
}
|
|
484
|
+
})
|
|
485
|
+
},
|
|
486
|
+
// 获取区县
|
|
487
|
+
async getPcd () {
|
|
488
|
+
let data = {
|
|
489
|
+
tablename: 't_pcd',
|
|
490
|
+
condition: `f_orgid = '${this.$login.f.orgid}'`
|
|
491
|
+
}
|
|
492
|
+
let http = new HttpResetClass()
|
|
493
|
+
let res = await http.load(
|
|
494
|
+
'POST',
|
|
495
|
+
`rs/sql/apply_singleTable`,
|
|
496
|
+
{data: data},
|
|
497
|
+
{resolveMsg: null, rejectMsg: '区县查询失败!!!'}
|
|
498
|
+
)
|
|
499
|
+
|
|
500
|
+
return res.data.map(item => {
|
|
501
|
+
return {
|
|
502
|
+
label: item.f_pcd,
|
|
503
|
+
value: item.f_pcd
|
|
504
|
+
}
|
|
505
|
+
})
|
|
506
|
+
},
|
|
507
|
+
// 获取集收单位
|
|
508
|
+
async getArea () {
|
|
509
|
+
let data = {
|
|
510
|
+
tablename: 't_area',
|
|
511
|
+
condition: `f_orgid = '${this.$login.f.orgid}'`
|
|
512
|
+
}
|
|
513
|
+
let http = new HttpResetClass()
|
|
514
|
+
let res = await http.load(
|
|
515
|
+
'POST',
|
|
516
|
+
`rs/sql/apply_singleTable`,
|
|
517
|
+
{data: data},
|
|
518
|
+
{resolveMsg: null, rejectMsg: '集收单位查询失败!!!'}
|
|
519
|
+
)
|
|
520
|
+
|
|
521
|
+
return res.data.map(item => {
|
|
522
|
+
return {
|
|
523
|
+
label: item.f_residential_area,
|
|
524
|
+
value: item.f_residential_area
|
|
525
|
+
}
|
|
526
|
+
})
|
|
527
|
+
},
|
|
528
|
+
async getAreaNew () {
|
|
529
|
+
let data = {
|
|
530
|
+
tablename: 't_area',
|
|
531
|
+
condition: `f_orgid = '${this.$login.f.orgid}'`
|
|
532
|
+
}
|
|
533
|
+
let http = new HttpResetClass()
|
|
534
|
+
let res = await http.load(
|
|
535
|
+
'POST',
|
|
536
|
+
`rs/sql/apply_singleTable`,
|
|
537
|
+
{data: data},
|
|
538
|
+
{resolveMsg: null, rejectMsg: '集收单位查询失败!!!'}
|
|
539
|
+
)
|
|
540
|
+
let area=[]
|
|
541
|
+
for (const item of res.data) {
|
|
542
|
+
area.push({
|
|
543
|
+
label: item.f_residential_area,
|
|
544
|
+
value: item.f_residential_area
|
|
545
|
+
})
|
|
546
|
+
}
|
|
547
|
+
for (const item of this.show_data.fields) {
|
|
548
|
+
if (item.label ==='集收单位') {
|
|
549
|
+
item.options = area
|
|
550
|
+
}
|
|
551
|
+
}
|
|
552
|
+
},
|
|
553
|
+
// 缴费前置
|
|
554
|
+
chargeBefore () {
|
|
555
|
+
if (Number(this.show_data.f_due_money) > Number(this.show_data.f_cumulative_payment_money) || Number(this.show_data.f_surplus_money) > 0) {
|
|
556
|
+
this.$showAlert('费用未结清!!!', 'warning', 3000)
|
|
557
|
+
throw null
|
|
558
|
+
}
|
|
559
|
+
},
|
|
560
|
+
// 施工前置 加表具后状态是待开通 提交后是正常 所以这里的判断条件需改正 (and uf.f_meter_classify is null and f_meternumber is null)
|
|
561
|
+
async constructionBefore () {
|
|
562
|
+
let http = new HttpResetClass()
|
|
563
|
+
let data = {
|
|
564
|
+
condition: `ui.f_process_id = '${this.show_data.f_process_id}' and uf.f_meter_classify is null and f_meternumber is null`
|
|
565
|
+
}
|
|
566
|
+
let res = await http.load(
|
|
567
|
+
'POST',
|
|
568
|
+
'rs/sql/countApplyUserinfo',
|
|
569
|
+
{data: data},
|
|
570
|
+
{
|
|
571
|
+
resolveMsg: null,
|
|
572
|
+
rejectMsg: '安装明细查询失败!!!'
|
|
573
|
+
})
|
|
574
|
+
if (res.data[0].num > 0) {
|
|
575
|
+
this.$showAlert(`还有${res.data[0].num}户未安装,无法提交`, 'warning', 3000)
|
|
576
|
+
throw `还有${res.data[0].num}户未安装,无法提交`
|
|
577
|
+
}
|
|
578
|
+
},
|
|
579
|
+
changePipeBuild () {
|
|
580
|
+
if (this.selectdata.f_process_dep === '工程部') {
|
|
581
|
+
return 'this.getParentByType($organization$).getChildByName($工程部报装$).getChildren()'
|
|
582
|
+
}
|
|
583
|
+
if (this.selectdata.f_process_dep === '运营部') {
|
|
584
|
+
return 'this.getParentByType($organization$).getChildByName($运营部报装$).getChildren()'
|
|
585
|
+
}
|
|
586
|
+
return 'this.getParentByType($organization$).getChildByName($工程部报装$).getChildren()'
|
|
587
|
+
},
|
|
588
|
+
// async getDevInfo () {
|
|
589
|
+
// let data = {
|
|
590
|
+
// tablename: 't_dev_info',
|
|
591
|
+
// condition: `f_orgid = '${this.$login.f.orgid}'`
|
|
592
|
+
// }
|
|
593
|
+
// let http = new HttpResetClass()
|
|
594
|
+
// let res = await http.load(
|
|
595
|
+
// 'POST',
|
|
596
|
+
// `rs/sql/apply_singleTable`,
|
|
597
|
+
// {data: data},
|
|
598
|
+
// {resolveMsg: null, rejectMsg: '公司查询失败!!!'}
|
|
599
|
+
// )
|
|
600
|
+
//
|
|
601
|
+
// return res.data.map(item => {
|
|
602
|
+
// return {
|
|
603
|
+
// label: item.f_dev_name,
|
|
604
|
+
// value: item.f_dev_name
|
|
605
|
+
// }
|
|
606
|
+
// })
|
|
607
|
+
// },
|
|
608
|
+
async getPrice (f_price_id) {
|
|
609
|
+
console.log('=======================')
|
|
610
|
+
console.log(f_price_id)
|
|
611
|
+
|
|
612
|
+
let data = {
|
|
613
|
+
condition: `sp.f_filialeid = '${this.$login.f.orgid}'`
|
|
614
|
+
}
|
|
615
|
+
// if(this.Pricetype==='机表'){
|
|
616
|
+
// data.condition=`sp.f_custom = '机表'`
|
|
617
|
+
// }
|
|
618
|
+
// if(this.Pricetype==='非机表'){
|
|
619
|
+
// data.condition=`sp.f_custom = '非机表'`
|
|
620
|
+
// }
|
|
621
|
+
|
|
622
|
+
if (!isEmpty(f_price_id)) {
|
|
623
|
+
data.condition = `sp.f_filialeid = '${this.$login.f.orgid}' and sp.f_price_id = ${f_price_id}`
|
|
624
|
+
}
|
|
625
|
+
let http = new HttpResetClass()
|
|
626
|
+
let res = await http.load(
|
|
627
|
+
'POST',
|
|
628
|
+
`rs/sql/applyGetPrice`,
|
|
629
|
+
{data: data},
|
|
630
|
+
{resolveMsg: null, rejectMsg: '气价查询失败!!!'}
|
|
631
|
+
)
|
|
632
|
+
|
|
633
|
+
let a= res.data.map(item => {
|
|
634
|
+
return {
|
|
635
|
+
label: item.f_price_name,
|
|
636
|
+
value: item
|
|
637
|
+
}
|
|
638
|
+
})
|
|
639
|
+
this.selectdata.fields.forEach(field => {
|
|
640
|
+
if (field.label === '气价名称') {
|
|
641
|
+
field.options = a}
|
|
642
|
+
})
|
|
643
|
+
return a
|
|
644
|
+
},
|
|
645
|
+
addressInitialization () {
|
|
646
|
+
this.$getConfig(this, 'UserAddress')
|
|
647
|
+
|
|
648
|
+
let f_address_type = this.show_data.f_address_type
|
|
649
|
+
|
|
650
|
+
for (const item of this.show_data.fields) {
|
|
651
|
+
if (f_address_type === '民用市区') {
|
|
652
|
+
if (item.label === '区/县' || item.label === '街道/乡镇' || item.label === '集收单位' || item.label === '门牌号') {
|
|
653
|
+
item.hidden = false
|
|
654
|
+
item.required = true
|
|
655
|
+
}
|
|
656
|
+
if (item.label === '楼号/组' || item.label === '单元/排' || item.label === '楼层') {
|
|
657
|
+
item.hidden = false
|
|
658
|
+
item.required = false
|
|
659
|
+
}
|
|
660
|
+
if (item.label === '地址') {
|
|
661
|
+
item.readonly = true
|
|
662
|
+
}
|
|
663
|
+
}
|
|
664
|
+
if (f_address_type === '民用乡镇') {
|
|
665
|
+
if (item.label === '区/县' || item.label === '街道/乡镇' || item.label === '集收单位' || item.label === '门牌号') {
|
|
666
|
+
item.hidden = false
|
|
667
|
+
item.required = true
|
|
668
|
+
}
|
|
669
|
+
if (item.label === '楼号/组' || item.label === '单元/排' || item.label === '楼层') {
|
|
670
|
+
item.hidden = false
|
|
671
|
+
item.required = false
|
|
672
|
+
}
|
|
673
|
+
if (item.label === '楼层') {
|
|
674
|
+
item.hidden = true
|
|
675
|
+
item.required = false
|
|
676
|
+
}
|
|
677
|
+
if (item.label === '地址') {
|
|
678
|
+
item.readonly = true
|
|
679
|
+
}
|
|
680
|
+
}
|
|
681
|
+
if (f_address_type === '特殊地址') {
|
|
682
|
+
if (item.label === '区/县' || item.label === '街道/乡镇') {
|
|
683
|
+
item.hidden = false
|
|
684
|
+
item.required = true
|
|
685
|
+
}
|
|
686
|
+
if (item.label === '集收单位') {
|
|
687
|
+
item.hidden = false
|
|
688
|
+
if (this.show_data.f_apply_type === '工商户报建'){
|
|
689
|
+
item.required = false
|
|
690
|
+
} else {
|
|
691
|
+
item.required = false
|
|
692
|
+
}
|
|
693
|
+
|
|
694
|
+
}
|
|
695
|
+
if (item.label === '楼号/组' || item.label === '单元/排' || item.label === '楼层' || item.label === '门牌号') {
|
|
696
|
+
item.hidden = true
|
|
697
|
+
item.required = false
|
|
698
|
+
}
|
|
699
|
+
if (item.label === '地址') {
|
|
700
|
+
item.readonly = false
|
|
701
|
+
}
|
|
702
|
+
}
|
|
703
|
+
|
|
704
|
+
if (this.show_data.f_apply_source === '线下发起' && item.label === '预约地址') {
|
|
705
|
+
item.hidden = true
|
|
706
|
+
}
|
|
707
|
+
}
|
|
708
|
+
},
|
|
709
|
+
async streetChange () {
|
|
710
|
+
if (isEmpty(this.show_data.f_street)) {
|
|
711
|
+
return
|
|
712
|
+
}
|
|
713
|
+
|
|
714
|
+
let data = {
|
|
715
|
+
tablename: 't_area',
|
|
716
|
+
condition: `f_filialeid = '${this.$login.f.orgid}' and f_street = '${this.show_data.f_street}'`
|
|
717
|
+
}
|
|
718
|
+
let http = new HttpResetClass()
|
|
719
|
+
let res = await http.load(
|
|
720
|
+
'POST',
|
|
721
|
+
`rs/sql/apply_singleTable`,
|
|
722
|
+
{data: data},
|
|
723
|
+
{resolveMsg: null, rejectMsg: '集收单位查询失败!!!'}
|
|
724
|
+
)
|
|
725
|
+
|
|
726
|
+
this.setLabelOptions('集收单位', res.data.map(item => {
|
|
727
|
+
return {
|
|
728
|
+
label: item.f_residential_area,
|
|
729
|
+
value: item.f_residential_area
|
|
730
|
+
}
|
|
731
|
+
}))
|
|
732
|
+
},
|
|
733
|
+
async areaChange () {
|
|
734
|
+
if (isEmpty(this.show_data.f_residential_area)) {
|
|
735
|
+
return
|
|
736
|
+
}
|
|
737
|
+
|
|
738
|
+
let data = {
|
|
739
|
+
tablename: 't_area',
|
|
740
|
+
condition: `f_filialeid = '${this.$login.f.orgid}' and f_residential_area = '${this.show_data.f_residential_area}'`
|
|
741
|
+
}
|
|
742
|
+
let http = new HttpResetClass()
|
|
743
|
+
let res = await http.load(
|
|
744
|
+
'POST',
|
|
745
|
+
`rs/sql/apply_singleTable`,
|
|
746
|
+
{data: data},
|
|
747
|
+
{resolveMsg: null, rejectMsg: '集收单位查询失败!!!'}
|
|
748
|
+
)
|
|
749
|
+
if(res.data.length>0){
|
|
750
|
+
this.setLabelValue('街道/乡镇', res.data[0].f_street)
|
|
751
|
+
this.setLabelValue('区/县', res.data[0].f_pcd)
|
|
752
|
+
this.setLabelValue('片区', res.data[0].f_slice_area)
|
|
753
|
+
}
|
|
754
|
+
},
|
|
755
|
+
async pcdChange () {
|
|
756
|
+
if (isEmpty(this.show_data.f_pcd)) {
|
|
757
|
+
return
|
|
758
|
+
}
|
|
759
|
+
|
|
760
|
+
let data = {
|
|
761
|
+
tablename: 't_street',
|
|
762
|
+
condition: `f_orgid = '${this.$login.f.orgid}' and f_pcd = '${this.show_data.f_pcd}'`
|
|
763
|
+
}
|
|
764
|
+
let f_address_type = this.getLableValue('地址类型')
|
|
765
|
+
|
|
766
|
+
if (f_address_type === '民用市区') {
|
|
767
|
+
data.condition = `f_orgid = '${this.$login.f.orgid}' and f_pcd = '${this.show_data.f_pcd}' and f_iscity = '市区'`
|
|
768
|
+
}
|
|
769
|
+
if (f_address_type === '民用乡镇') {
|
|
770
|
+
data.condition = `f_orgid = '${this.$login.f.orgid}' and f_pcd = '${this.show_data.f_pcd}' and f_iscity = '乡镇'`
|
|
771
|
+
}
|
|
772
|
+
|
|
773
|
+
let http = new HttpResetClass()
|
|
774
|
+
let res = await http.load(
|
|
775
|
+
'POST',
|
|
776
|
+
`rs/sql/apply_singleTable`,
|
|
777
|
+
{data: data},
|
|
778
|
+
{resolveMsg: null, rejectMsg: '街道/乡镇查询失败!!!'}
|
|
779
|
+
)
|
|
780
|
+
|
|
781
|
+
this.setLabelOptions('街道/乡镇', res.data.map(item => {
|
|
782
|
+
return {
|
|
783
|
+
label: item.f_street,
|
|
784
|
+
value: item.f_street
|
|
785
|
+
}
|
|
786
|
+
}))
|
|
787
|
+
},
|
|
788
|
+
async addressTips () {
|
|
789
|
+
// console.log('======================='+this.show_data.f_apply_type)
|
|
790
|
+
let res = ''
|
|
791
|
+
if (this.show_data.f_apply_type === '报警器报建' || this.show_data.f_apply_type === '工商业报警器报建') {
|
|
792
|
+
res = await this.$showMessage('报警器报建下单后将不能修改用户信息,请确认用户信息地址等是否正确,如不完善可在档案中进行修正!!!')
|
|
793
|
+
}else{
|
|
794
|
+
res = await this.$showMessage('增容改管下单后将不能修改用户信息,请确认用户信息地址等是否正确,如不完善可在档案中进行修正!!!')
|
|
795
|
+
}
|
|
796
|
+
if (res == 'confirm') {
|
|
797
|
+
return
|
|
798
|
+
}
|
|
799
|
+
throw '用户信息确认!!!'
|
|
800
|
+
},
|
|
801
|
+
async getDesignerPeople () {
|
|
802
|
+
let data = {
|
|
803
|
+
source: 'this.getParentByType($organization$).getChildByName($设计部报装$).getChildren()',
|
|
804
|
+
userid: this.$login.f.id
|
|
805
|
+
}
|
|
806
|
+
|
|
807
|
+
let http = new HttpResetClass()
|
|
808
|
+
let res = await http.load(
|
|
809
|
+
'POST',
|
|
810
|
+
`rs/search`,
|
|
811
|
+
{data: data},
|
|
812
|
+
{resolveMsg: null, rejectMsg: '设计人员查询失败!!!'}
|
|
813
|
+
)
|
|
814
|
+
|
|
815
|
+
return res.data.map(item => {
|
|
816
|
+
return {
|
|
817
|
+
label: item.name,
|
|
818
|
+
value: item.id
|
|
819
|
+
}
|
|
820
|
+
})
|
|
821
|
+
},
|
|
822
|
+
async surveyStopApply () {
|
|
823
|
+
console.log('终止报建!!!!!')
|
|
824
|
+
|
|
825
|
+
this.show_data.f_stop_reason = '现场勘察不符合报装条件'
|
|
826
|
+
|
|
827
|
+
let data = {
|
|
828
|
+
data: this.show_data,
|
|
829
|
+
user: this.$login.f
|
|
830
|
+
}
|
|
831
|
+
|
|
832
|
+
let res = await this.$resetpost(
|
|
833
|
+
`rs/logic/surveyStopApply`,
|
|
834
|
+
{data: data},
|
|
835
|
+
{resolveMsg: null, rejectMsg: '终止报建失败!!!'}
|
|
836
|
+
)
|
|
837
|
+
|
|
838
|
+
this.$dispatch('loadPage')
|
|
839
|
+
|
|
840
|
+
throw '终止报建!!!'
|
|
841
|
+
},
|
|
842
|
+
async contract_number() {
|
|
843
|
+
console.log("进入编号合同编号生成",this.$login.f.orgs)
|
|
844
|
+
let f_contract_number = ''
|
|
845
|
+
const nowDate = new Date();
|
|
846
|
+
const date = {
|
|
847
|
+
year: nowDate.getFullYear(),
|
|
848
|
+
month: nowDate.getMonth() + 1,
|
|
849
|
+
day: nowDate.getDate()
|
|
850
|
+
}
|
|
851
|
+
|
|
852
|
+
function upperCaseChars(dir) {
|
|
853
|
+
let string = '';
|
|
854
|
+
switch (dir){
|
|
855
|
+
case '周口市天然气有限公司':
|
|
856
|
+
string = 'ZK' // 当表达式的结果等于 房产 时,则执行该代码
|
|
857
|
+
break;
|
|
858
|
+
case '项城市天然气有限公司':
|
|
859
|
+
string = "XC" // 当表达式的结果等于 自建房 时,则执行该代码
|
|
860
|
+
break;
|
|
861
|
+
case '西华县天然气有限公司':
|
|
862
|
+
string = 'XH' // 当表达式的结果等于 商业 时,则执行该代码
|
|
863
|
+
break;
|
|
864
|
+
case '鹿邑县天然气有限公司':
|
|
865
|
+
string = 'LY' // 当表达式的结果等于 工业 时,则执行该代码
|
|
866
|
+
break;
|
|
867
|
+
case '郸城县天然气有限公司':
|
|
868
|
+
string = 'DC' // 当表达式的结果等于 中压 时,则执行该代码
|
|
869
|
+
break;
|
|
870
|
+
case '测试公司(一)':
|
|
871
|
+
string = 'CS' // 当表达式的结果等于 中压 时,则执行该代码
|
|
872
|
+
break;
|
|
873
|
+
case '甘泉县丰源天然气有限责任公司':
|
|
874
|
+
string = 'GQ' // 当表达式的结果等于 中压 时,则执行该代码
|
|
875
|
+
break;
|
|
876
|
+
default : 'HT'
|
|
877
|
+
break; // 如果没有与表达式相同的公司,则执行该代码
|
|
878
|
+
}
|
|
879
|
+
return string;
|
|
880
|
+
}
|
|
881
|
+
|
|
882
|
+
const dir = upperCaseChars(this.$login.f.orgs) //分公司
|
|
883
|
+
|
|
884
|
+
let type = 0 //类型
|
|
885
|
+
|
|
886
|
+
switch (this.show_data.f_entry_type){
|
|
887
|
+
case '城区/县城':
|
|
888
|
+
type = 1 // 当表达式的结果等于 城区 时,则执行该代码
|
|
889
|
+
break;
|
|
890
|
+
case '新农村':
|
|
891
|
+
type = 2 // 当表达式的结果等于 新农村 时,则执行该代码
|
|
892
|
+
break;
|
|
893
|
+
case '测试':
|
|
894
|
+
type = 3 // 当表达式的结果等于 新农村 时,则执行该代码
|
|
895
|
+
break;
|
|
896
|
+
default :
|
|
897
|
+
break; // 如果没有与表达式相同的值,则执行该代码
|
|
898
|
+
}
|
|
899
|
+
|
|
900
|
+
let nature = 0 // 性质
|
|
901
|
+
switch (this.show_data.f_apply_nature){
|
|
902
|
+
case '楼房':
|
|
903
|
+
nature = 1 // 当表达式的结果等于 楼房 时,则执行该代码
|
|
904
|
+
break;
|
|
905
|
+
case '房产':
|
|
906
|
+
nature = 1 // 当表达式的结果等于 房产 时,则执行该代码
|
|
907
|
+
break;
|
|
908
|
+
case '自建房':
|
|
909
|
+
nature = 2 // 当表达式的结果等于 自建房 时,则执行该代码
|
|
910
|
+
break;
|
|
911
|
+
case '商业':
|
|
912
|
+
nature = 3 // 当表达式的结果等于 商业 时,则执行该代码
|
|
913
|
+
break;
|
|
914
|
+
case '学校':
|
|
915
|
+
nature = 3 // 当表达式的结果等于 学校 时,则执行该代码
|
|
916
|
+
break;
|
|
917
|
+
case '福利机构':
|
|
918
|
+
nature = 3 // 当表达式的结果等于 福利机构 时,则执行该代码
|
|
919
|
+
break;
|
|
920
|
+
case '其他':
|
|
921
|
+
nature = 3 // 当表达式的结果等于 其他 时,则执行该代码
|
|
922
|
+
break;
|
|
923
|
+
case '工业':
|
|
924
|
+
nature = 4 // 当表达式的结果等于 工业 时,则执行该代码
|
|
925
|
+
break;
|
|
926
|
+
case '中压':
|
|
927
|
+
nature = 5 // 当表达式的结果等于 中压 时,则执行该代码
|
|
928
|
+
break;
|
|
929
|
+
case '测试':
|
|
930
|
+
nature = 6 // 当表达式的结果等于 中压 时,则执行该代码
|
|
931
|
+
break;
|
|
932
|
+
default :
|
|
933
|
+
break; // 如果没有与表达式相同的值,则执行该代码
|
|
934
|
+
}
|
|
935
|
+
|
|
936
|
+
const newMonth = date.month >= 10 ? date.month : '0' + date.month //月份
|
|
937
|
+
const dataYm = date.year + '-01-01'
|
|
938
|
+
const newYear = date.year + 1
|
|
939
|
+
const year = date.year.toString().substring(2,4) //年份
|
|
940
|
+
|
|
941
|
+
let data = {
|
|
942
|
+
orgid: this.$login.f.orgid
|
|
943
|
+
}
|
|
944
|
+
|
|
945
|
+
let http = new HttpResetClass()
|
|
946
|
+
let res = await http.load('POST', 'rs/sql/contractCount', {data:data}, {
|
|
947
|
+
resolveMsg: null,
|
|
948
|
+
rejectMsg: null
|
|
949
|
+
})
|
|
950
|
+
let oldDate
|
|
951
|
+
for (const item of res.data) {
|
|
952
|
+
if (item.name === '合同编号最后更新日期'){
|
|
953
|
+
oldDate = item.value
|
|
954
|
+
}
|
|
955
|
+
}
|
|
956
|
+
for (const item of res.data){
|
|
957
|
+
if (item.name === '合同编号'){
|
|
958
|
+
if (item.value === 0 || Date.parse(oldDate) < Date.parse(dataYm)) {
|
|
959
|
+
f_contract_number = dir + type + nature + year + newMonth + '001'
|
|
960
|
+
console.log("触发if", f_contract_number)
|
|
961
|
+
} else {
|
|
962
|
+
let count = item.value
|
|
963
|
+
f_contract_number = dir + type + nature + year + newMonth + this.PrefixInteger(count, 3)
|
|
964
|
+
console.log("触发else", f_contract_number)
|
|
965
|
+
}
|
|
966
|
+
}
|
|
967
|
+
}
|
|
968
|
+
this.selectdata.f_contract_number = f_contract_number
|
|
969
|
+
this.show_data.f_contract_number = f_contract_number
|
|
970
|
+
return f_contract_number
|
|
971
|
+
},
|
|
972
|
+
PrefixInteger(num, n) {
|
|
973
|
+
return (Array(n).join(0) + num).slice(-n);
|
|
974
|
+
},
|
|
975
|
+
// 单价失去焦点
|
|
976
|
+
async priceSum () {
|
|
977
|
+
if (isEmpty(this.show_data.f_price)) {
|
|
978
|
+
return
|
|
979
|
+
}
|
|
980
|
+
let data = {
|
|
981
|
+
operator: '乘',
|
|
982
|
+
num1: this.show_data.f_price,
|
|
983
|
+
num2: this.show_data.f_install_count
|
|
984
|
+
}
|
|
985
|
+
let http = new HttpResetClass()
|
|
986
|
+
let res = await http.load(
|
|
987
|
+
'POST',
|
|
988
|
+
`rs/logic/compute`,
|
|
989
|
+
{data: data},
|
|
990
|
+
{resolveMsg: null, rejectMsg: '工程材料费计算失败!!!'}
|
|
991
|
+
)
|
|
992
|
+
|
|
993
|
+
this.setLabelValue('工程材料费', res.data)
|
|
994
|
+
},
|
|
995
|
+
},
|
|
996
|
+
events: {
|
|
997
|
+
'priceType'(index){
|
|
998
|
+
this.Pricetype = this.getLableValue('所属类型')
|
|
999
|
+
console.log('打印方法值',this.getPrice(this.show_data.f_price_id))
|
|
1000
|
+
for (const item of this.show_data.fields) {
|
|
1001
|
+
if (this.show_data.f_sprice_type !=null && this.show_data.f_sprice_type !='') {
|
|
1002
|
+
if(item.label==='气价名称'){
|
|
1003
|
+
this.getPrice().then(value =>{
|
|
1004
|
+
item.options=value
|
|
1005
|
+
})
|
|
1006
|
+
console.log('最终',item.options)
|
|
1007
|
+
}
|
|
1008
|
+
}
|
|
1009
|
+
}
|
|
1010
|
+
},
|
|
1011
|
+
'complyInstallation' (index) {
|
|
1012
|
+
if (this.show_data.f_is_have === '否') {
|
|
1013
|
+
this.hideButtons('提交', '出图', '缴费')
|
|
1014
|
+
this.showButtons('终止')
|
|
1015
|
+
}
|
|
1016
|
+
if (this.show_data.f_is_have === '是') {
|
|
1017
|
+
this.hideButtons('终止')
|
|
1018
|
+
this.showButtons('提交', '出图', '缴费')
|
|
1019
|
+
}
|
|
1020
|
+
},
|
|
1021
|
+
async 'igniteDispatchReadyEvent' () {
|
|
1022
|
+
let data = {
|
|
1023
|
+
tablename: 'activityins',
|
|
1024
|
+
condition: `processid = '${this.show_data.f_process_id}' and defname = '工程施工' and state = '结束'`
|
|
1025
|
+
}
|
|
1026
|
+
let http = new HttpResetClass()
|
|
1027
|
+
let res = await http.load(
|
|
1028
|
+
'POST',
|
|
1029
|
+
`rs/sql/apply_singleTable`,
|
|
1030
|
+
{data: data},
|
|
1031
|
+
{resolveMsg: null, rejectMsg: '查询失败!!!'}
|
|
1032
|
+
)
|
|
1033
|
+
if (res.data.length <= 0) {
|
|
1034
|
+
console.log('+++++++++++++++++++++++++++++')
|
|
1035
|
+
console.log('没有施工,不能退回')
|
|
1036
|
+
this.hideButtons('退回')
|
|
1037
|
+
}
|
|
1038
|
+
},
|
|
1039
|
+
'buildReadyEvent' () {
|
|
1040
|
+
this.setLabelValue('施工单位', this.$login.f.name)
|
|
1041
|
+
this.setLabelValue('施工安装时间', new Date().Format('yyyy-MM-dd HH:mm:ss'))
|
|
1042
|
+
},
|
|
1043
|
+
// 选择材料
|
|
1044
|
+
async materialNameChenge (index, fieldIndex) {
|
|
1045
|
+
let material = this.show_data.onetomany[index].fields[fieldIndex].value
|
|
1046
|
+
|
|
1047
|
+
this.show_data.onetomany[index].fields.forEach(item => {
|
|
1048
|
+
if (material[item.field]) {
|
|
1049
|
+
item.value = material[item.field]
|
|
1050
|
+
}
|
|
1051
|
+
})
|
|
1052
|
+
},
|
|
1053
|
+
// 打开模态框获取材料
|
|
1054
|
+
async 'getMaterialName' (index) {
|
|
1055
|
+
let data = {
|
|
1056
|
+
condition: `1=1`
|
|
1057
|
+
}
|
|
1058
|
+
let http = new HttpResetClass()
|
|
1059
|
+
let res = await http.load(
|
|
1060
|
+
'POST',
|
|
1061
|
+
`rs/sql/getStockMaterial`,
|
|
1062
|
+
{data: data},
|
|
1063
|
+
{resolveMsg: null, rejectMsg: '材料查询失败!!!'}
|
|
1064
|
+
)
|
|
1065
|
+
|
|
1066
|
+
this.show_data.onetomany[index].fields.forEach(field => {
|
|
1067
|
+
if (field.label === '选择材料') {
|
|
1068
|
+
field.options = res.data.map(item => {
|
|
1069
|
+
return {
|
|
1070
|
+
'label': `${item.f_material_name}--${item.f_material_style}--${item.f_material_unit}`,
|
|
1071
|
+
'value': item
|
|
1072
|
+
}
|
|
1073
|
+
})
|
|
1074
|
+
}
|
|
1075
|
+
})
|
|
1076
|
+
},
|
|
1077
|
+
// 搜索小区
|
|
1078
|
+
async 'searchArea' (area, index) {
|
|
1079
|
+
let data = {
|
|
1080
|
+
tablename: 't_area',
|
|
1081
|
+
condition: `f_filialeid = '${this.$login.f.orgid}' and f_street = '${this.show_data.f_street}' and f_residential_area like '%${area}%'`
|
|
1082
|
+
}
|
|
1083
|
+
let http = new HttpResetClass()
|
|
1084
|
+
let res = await http.load(
|
|
1085
|
+
'POST',
|
|
1086
|
+
`rs/sql/apply_singleTable`,
|
|
1087
|
+
{data: data},
|
|
1088
|
+
{resolveMsg: null, rejectMsg: '集收单位查询失败!!!'}
|
|
1089
|
+
)
|
|
1090
|
+
|
|
1091
|
+
if (res.data.length === 0) {
|
|
1092
|
+
return
|
|
1093
|
+
}
|
|
1094
|
+
|
|
1095
|
+
this.setLabelOptions('集收单位', res.data.map(item => {
|
|
1096
|
+
return {
|
|
1097
|
+
label: item.f_residential_area,
|
|
1098
|
+
value: item.f_residential_area
|
|
1099
|
+
}
|
|
1100
|
+
}))
|
|
1101
|
+
},
|
|
1102
|
+
// 搜索小区
|
|
1103
|
+
async 'searchAreaCollective' (area, index) {
|
|
1104
|
+
let data = {
|
|
1105
|
+
tablename: 't_area',
|
|
1106
|
+
condition: `f_filialeid = '${this.$login.f.orgid}' and f_residential_area like '%${area}%'`
|
|
1107
|
+
}
|
|
1108
|
+
let http = new HttpResetClass()
|
|
1109
|
+
let res = await http.load(
|
|
1110
|
+
'POST',
|
|
1111
|
+
`rs/sql/apply_singleTable`,
|
|
1112
|
+
{data: data},
|
|
1113
|
+
{resolveMsg: null, rejectMsg: '集收单位查询失败!!!'}
|
|
1114
|
+
)
|
|
1115
|
+
|
|
1116
|
+
if (res.data.length === 0) {
|
|
1117
|
+
return
|
|
1118
|
+
}
|
|
1119
|
+
|
|
1120
|
+
this.setLabelOptions('集收单位', res.data.map(item => {
|
|
1121
|
+
return {
|
|
1122
|
+
label: item.f_residential_area,
|
|
1123
|
+
value: item.f_residential_area
|
|
1124
|
+
}
|
|
1125
|
+
}))
|
|
1126
|
+
},
|
|
1127
|
+
// 选择气价
|
|
1128
|
+
'priceChange' (index) {
|
|
1129
|
+
if (isEmpty(this.show_data.stairPrice)) {
|
|
1130
|
+
return
|
|
1131
|
+
}
|
|
1132
|
+
|
|
1133
|
+
let stairPrice = this.getLableValue('气价名称')
|
|
1134
|
+
|
|
1135
|
+
this.setLabelValue('气价类型', stairPrice.f_price_type)
|
|
1136
|
+
this.setLabelValue('用气性质', stairPrice.f_gasproperties)
|
|
1137
|
+
this.setLabelValue('价格', stairPrice.f_price)
|
|
1138
|
+
this.setLabelValue('客户类型', stairPrice.f_user_type)
|
|
1139
|
+
this.show_data.f_price_id = stairPrice.id
|
|
1140
|
+
this.show_data.f_price_name = stairPrice.f_price_name
|
|
1141
|
+
},
|
|
1142
|
+
// 选择开发商
|
|
1143
|
+
// async 'devInfoChange' (index) {
|
|
1144
|
+
// if (isEmpty(this.show_data.f_company_name)) {
|
|
1145
|
+
// return
|
|
1146
|
+
// }
|
|
1147
|
+
// let data = {
|
|
1148
|
+
// tablename: 't_dev_info',
|
|
1149
|
+
// condition: `f_orgid = '${this.$login.f.orgid}' and f_dev_name = '${this.show_data.f_company_name}'`
|
|
1150
|
+
// }
|
|
1151
|
+
// let res = await this.$resetpost(
|
|
1152
|
+
// `rs/sql/apply_singleTable`,
|
|
1153
|
+
// {data: data},
|
|
1154
|
+
// {resolveMsg: null, rejectMsg: '公司查询失败!!!'}
|
|
1155
|
+
// )
|
|
1156
|
+
// this.show_data.f_dev_id = res.data[0].id
|
|
1157
|
+
// this.show_data.f_dev_code = res.data[0].f_dev_code
|
|
1158
|
+
// this.setLabelValue('法人名称', res.data[0].f_legal_person)
|
|
1159
|
+
// this.setLabelValue('身份证', res.data[0].f_idnumber)
|
|
1160
|
+
// this.setLabelValue('营业执照', res.data[0].f_license_num)
|
|
1161
|
+
// },
|
|
1162
|
+
// 退款金额
|
|
1163
|
+
'refundMoneyChange' (index) {
|
|
1164
|
+
let f_cumulative_payment_money = this.show_data.f_cumulative_payment_money
|
|
1165
|
+
let f_refund_money = this.show_data.fields[index].value
|
|
1166
|
+
|
|
1167
|
+
if (f_refund_money > f_cumulative_payment_money) {
|
|
1168
|
+
this.$showAlert('退款金额不能大于累计缴费金额!!!', 'warning', 3000)
|
|
1169
|
+
this.show_data.fields[index].value = null
|
|
1170
|
+
}
|
|
1171
|
+
},
|
|
1172
|
+
// 检查重复
|
|
1173
|
+
'checkRepeat' (index) {
|
|
1174
|
+
this.checkDuplicate(index)
|
|
1175
|
+
},
|
|
1176
|
+
// 选择报建项目
|
|
1177
|
+
'selectApply' (row) {
|
|
1178
|
+
this.setLabelValue('工程名称', row.f_entry_name)
|
|
1179
|
+
this.setLabelValue('工程编号', row.f_apply_num)
|
|
1180
|
+
this.setLabelValue('报建类型', row.f_apply_type)
|
|
1181
|
+
this.setLabelValue('用户名称', row.f_user_name)
|
|
1182
|
+
this.setLabelValue('用户电话', row.f_phone)
|
|
1183
|
+
this.setLabelValue('证件类型', row.f_credentials)
|
|
1184
|
+
this.setLabelValue('证件号码', row.f_idnumber)
|
|
1185
|
+
this.setLabelValue('地址', row.f_address)
|
|
1186
|
+
this.setLabelValue('累计缴费金额', row.f_cumulative_payment_money)
|
|
1187
|
+
|
|
1188
|
+
this.show_data.parentApply = JSON.parse(JSON.stringify(row))
|
|
1189
|
+
|
|
1190
|
+
delete row.id
|
|
1191
|
+
delete row.actid
|
|
1192
|
+
delete row.defid
|
|
1193
|
+
delete row.defname
|
|
1194
|
+
delete row.version
|
|
1195
|
+
delete row.f_apply_num
|
|
1196
|
+
delete row.f_sub_state
|
|
1197
|
+
delete row.f_apply_type
|
|
1198
|
+
delete row.f_process_id
|
|
1199
|
+
|
|
1200
|
+
this.show_data = Object.assign({}, this.show_data, row)
|
|
1201
|
+
|
|
1202
|
+
this.show_data.f_parent_process_id = this.show_data.parentApply.f_process_id
|
|
1203
|
+
},
|
|
1204
|
+
// 是否终止
|
|
1205
|
+
'isStopChange' (index) {
|
|
1206
|
+
let f_is_stop = this.show_data.f_is_stop
|
|
1207
|
+
|
|
1208
|
+
for (const item of this.show_data.fields) {
|
|
1209
|
+
if (f_is_stop === '是') {
|
|
1210
|
+
if (item.label === '终止原因') {
|
|
1211
|
+
item.hidden = false
|
|
1212
|
+
item.required = true
|
|
1213
|
+
}
|
|
1214
|
+
} else {
|
|
1215
|
+
if (item.label === '终止原因') {
|
|
1216
|
+
item.hidden = true
|
|
1217
|
+
item.required = false
|
|
1218
|
+
}
|
|
1219
|
+
}
|
|
1220
|
+
}
|
|
1221
|
+
},
|
|
1222
|
+
// 终止报建初始化
|
|
1223
|
+
async 'stopApplyReadyEvent' () {
|
|
1224
|
+
|
|
1225
|
+
let f_is_stop = this.getLableValue('是否终止')
|
|
1226
|
+
|
|
1227
|
+
for (const item of this.show_data.fields) {
|
|
1228
|
+
if (f_is_stop === '是') {
|
|
1229
|
+
if (item.label === '终止原因') {
|
|
1230
|
+
item.hidden = false
|
|
1231
|
+
item.required = true
|
|
1232
|
+
}
|
|
1233
|
+
} else {
|
|
1234
|
+
if (item.label === '终止原因') {
|
|
1235
|
+
item.hidden = true
|
|
1236
|
+
item.required = false
|
|
1237
|
+
}
|
|
1238
|
+
}
|
|
1239
|
+
}
|
|
1240
|
+
|
|
1241
|
+
if (isEmpty(this.show_data.f_parent_process_id)) {
|
|
1242
|
+
return
|
|
1243
|
+
}
|
|
1244
|
+
let data = {
|
|
1245
|
+
condition: `f_process_id = '${this.show_data.f_parent_process_id}'`,
|
|
1246
|
+
data: {
|
|
1247
|
+
id: this.$login.f.id,
|
|
1248
|
+
orgid: this.$login.f.orgid
|
|
1249
|
+
}
|
|
1250
|
+
}
|
|
1251
|
+
let res = await this.$resetpost(
|
|
1252
|
+
`rs/sql/supervisory`,
|
|
1253
|
+
{data: data},
|
|
1254
|
+
{resolveMsg: null, rejectMsg: '项目查询失败!!!'}
|
|
1255
|
+
)
|
|
1256
|
+
this.show_data.parentApply = res.data[0]
|
|
1257
|
+
},
|
|
1258
|
+
// 选择用户档案信息
|
|
1259
|
+
'selectUserinfo' (row) {
|
|
1260
|
+
this.setLabelValue('用户编号', row.f_userinfo_code)
|
|
1261
|
+
this.setLabelValue('用户名称', row.f_user_name)
|
|
1262
|
+
this.setLabelValue('用户电话', row.f_user_phone)
|
|
1263
|
+
this.setLabelValue('证件类型', row.f_credentials)
|
|
1264
|
+
this.setLabelValue('证件号码', row.f_idnumber)
|
|
1265
|
+
this.setLabelValue('地址', row.f_address)
|
|
1266
|
+
|
|
1267
|
+
this.show_data.f_userinfo_id = row.f_userinfo_id
|
|
1268
|
+
this.show_data.f_userinfo_code = row.f_userinfo_code
|
|
1269
|
+
},
|
|
1270
|
+
// 是否购买保险
|
|
1271
|
+
async 'isInsureChange' (index) {
|
|
1272
|
+
if (!this.show_data.f_is_insure) {
|
|
1273
|
+
return
|
|
1274
|
+
}
|
|
1275
|
+
let f_is_insure = this.show_data.f_is_insure
|
|
1276
|
+
for (const item of this.show_data.fields) {
|
|
1277
|
+
if (f_is_insure === '是') {
|
|
1278
|
+
if (item.label === '保费开始日期' || item.label === '保费结束日期' || item.label === '险种' || item.label === '保费金额') {
|
|
1279
|
+
item.hidden = false
|
|
1280
|
+
item.required = true
|
|
1281
|
+
}
|
|
1282
|
+
if (item.label === '保险备注') {
|
|
1283
|
+
item.hidden = false
|
|
1284
|
+
}
|
|
1285
|
+
} else {
|
|
1286
|
+
if (item.label === '保费开始日期' || item.label === '保费结束日期' || item.label === '险种' || item.label === '保费金额' || item.label === '保险备注') {
|
|
1287
|
+
item.hidden = true
|
|
1288
|
+
item.required = false
|
|
1289
|
+
}
|
|
1290
|
+
}
|
|
1291
|
+
}
|
|
1292
|
+
},
|
|
1293
|
+
// 通气点火初始化
|
|
1294
|
+
async 'gasReadyEvent' () {
|
|
1295
|
+
// 是否有气价信息
|
|
1296
|
+
if (!isEmpty(this.show_data.f_price_id)) {
|
|
1297
|
+
let priceList = await this.getPrice(this.show_data.f_price_id)
|
|
1298
|
+
this.setLabelValue('气价名称', priceList[0].value)
|
|
1299
|
+
}
|
|
1300
|
+
|
|
1301
|
+
let data = {
|
|
1302
|
+
tablename: 't_userfees',
|
|
1303
|
+
condition: `f_orgid = '${this.$login.f.orgid}' and f_userinfo_id = '${this.show_data.f_userinfo_id}' and f_state = '待执行'`
|
|
1304
|
+
}
|
|
1305
|
+
let http = new HttpResetClass()
|
|
1306
|
+
let res = await http.load(
|
|
1307
|
+
'POST',
|
|
1308
|
+
`rs/sql/apply_singleTable`,
|
|
1309
|
+
{data: data},
|
|
1310
|
+
{resolveMsg: null, rejectMsg: '保险查询失败!!!'}
|
|
1311
|
+
)
|
|
1312
|
+
if (res.data.length > 0) {
|
|
1313
|
+
this.setLabelValue('待执行保险', '是')
|
|
1314
|
+
for (const item of this.show_data.fields) {
|
|
1315
|
+
if (item.label === '保费开始日期' || item.label === '是否购买保险' || item.label === '保费结束日期' || item.label === '险种' || item.label === '保费金额' || item.label === '保险备注') {
|
|
1316
|
+
item.hidden = true
|
|
1317
|
+
item.required = false
|
|
1318
|
+
item.value = null
|
|
1319
|
+
}
|
|
1320
|
+
}
|
|
1321
|
+
} else {
|
|
1322
|
+
this.setLabelValue('待执行保险', '否')
|
|
1323
|
+
for (const item of this.show_data.fields) {
|
|
1324
|
+
if (item.label === '是否购买保险' || item.label === '保费开始日期' || item.label === '保费结束日期' || item.label === '险种' || item.label === '保费金额' || item.label === '保险备注') {
|
|
1325
|
+
item.hidden = false
|
|
1326
|
+
item.required = true
|
|
1327
|
+
}
|
|
1328
|
+
}
|
|
1329
|
+
}
|
|
1330
|
+
|
|
1331
|
+
// 保险初始化显示内容
|
|
1332
|
+
let f_is_insure = this.getLableValue('是否购买保险')
|
|
1333
|
+
for (const item of this.show_data.fields) {
|
|
1334
|
+
if (f_is_insure === '是') {
|
|
1335
|
+
if (item.label === '保费开始日期' || item.label === '保费结束日期' || item.label === '险种' || item.label === '保费金额') {
|
|
1336
|
+
item.hidden = false
|
|
1337
|
+
item.required = true
|
|
1338
|
+
}
|
|
1339
|
+
if (item.label === '保险备注') {
|
|
1340
|
+
item.hidden = false
|
|
1341
|
+
}
|
|
1342
|
+
// 本期保费到期时间默认一年
|
|
1343
|
+
if (isEmpty(this.selectdata.f_ins_expiration_date)) {
|
|
1344
|
+
let f_ins_expiration_date = new Date().setFullYear(new Date().getFullYear() + 1)
|
|
1345
|
+
this.setLabelValue("保费结束日期", new Date(f_ins_expiration_date).Format('yyyy-MM-dd'))
|
|
1346
|
+
}
|
|
1347
|
+
}
|
|
1348
|
+
if (f_is_insure === '否') {
|
|
1349
|
+
if (item.label === '保费开始日期' || item.label === '保费结束日期' || item.label === '险种' || item.label === '保费金额' || item.label === '保险备注') {
|
|
1350
|
+
item.hidden = true
|
|
1351
|
+
item.required = false
|
|
1352
|
+
}
|
|
1353
|
+
}
|
|
1354
|
+
}
|
|
1355
|
+
},
|
|
1356
|
+
// 合同金额失去焦点
|
|
1357
|
+
async 'contractMoneyChange' (index) {
|
|
1358
|
+
let data = {
|
|
1359
|
+
operator: '加',
|
|
1360
|
+
num1: this.show_data.f_contract_money || 0,
|
|
1361
|
+
num2: this.getLableValue('追加金额') || 0
|
|
1362
|
+
}
|
|
1363
|
+
let res = await this.$resetpost(
|
|
1364
|
+
`rs/logic/compute`,
|
|
1365
|
+
{data: data},
|
|
1366
|
+
{resolveMsg: null, rejectMsg: '金额计算失败!!!'}
|
|
1367
|
+
)
|
|
1368
|
+
|
|
1369
|
+
this.setLabelValue('应交金额', res.data)
|
|
1370
|
+
},
|
|
1371
|
+
// 街道失去焦点
|
|
1372
|
+
async 'streetChange' (index) {
|
|
1373
|
+
if (isEmpty(this.show_data.f_street)) {
|
|
1374
|
+
return
|
|
1375
|
+
}
|
|
1376
|
+
|
|
1377
|
+
this.setLabelValue('集收单位', null)
|
|
1378
|
+
|
|
1379
|
+
let data = {
|
|
1380
|
+
tablename: 't_area',
|
|
1381
|
+
condition: `f_orgid = '${this.$login.f.orgid}' and f_street = '${this.show_data.f_street}'`
|
|
1382
|
+
}
|
|
1383
|
+
let http = new HttpResetClass()
|
|
1384
|
+
let res = await http.load(
|
|
1385
|
+
'POST',
|
|
1386
|
+
`rs/sql/apply_singleTable`,
|
|
1387
|
+
{data: data},
|
|
1388
|
+
{resolveMsg: null, rejectMsg: '集收单位查询失败!!!'}
|
|
1389
|
+
)
|
|
1390
|
+
|
|
1391
|
+
this.setLabelOptions('集收单位', res.data.map(item => {
|
|
1392
|
+
return {
|
|
1393
|
+
label: item.f_residential_area,
|
|
1394
|
+
value: item.f_residential_area
|
|
1395
|
+
}
|
|
1396
|
+
}))
|
|
1397
|
+
},
|
|
1398
|
+
async 'areaChange' () {
|
|
1399
|
+
if (isEmpty(this.show_data.f_residential_area)) {
|
|
1400
|
+
return
|
|
1401
|
+
}
|
|
1402
|
+
|
|
1403
|
+
let data = {
|
|
1404
|
+
tablename: 't_area',
|
|
1405
|
+
condition: `f_orgid = '${this.$login.f.orgid}' and f_residential_area = '${this.show_data.f_residential_area}'`
|
|
1406
|
+
}
|
|
1407
|
+
let http = new HttpResetClass()
|
|
1408
|
+
let res = await http.load(
|
|
1409
|
+
'POST',
|
|
1410
|
+
`rs/sql/apply_singleTable`,
|
|
1411
|
+
{data: data},
|
|
1412
|
+
{resolveMsg: null, rejectMsg: '集收单位查询失败!!!'}
|
|
1413
|
+
)
|
|
1414
|
+
if(res.data.length>0){
|
|
1415
|
+
this.setLabelValue('街道/乡镇', res.data[0].f_street)
|
|
1416
|
+
this.setLabelValue('区/县', res.data[0].f_pcd)
|
|
1417
|
+
this.setLabelValue('片区', res.data[0].f_slice_area)
|
|
1418
|
+
}
|
|
1419
|
+
},
|
|
1420
|
+
// 区县失去焦点
|
|
1421
|
+
async 'pcdChange' (index) {
|
|
1422
|
+
if (isEmpty(this.show_data.f_pcd)) {
|
|
1423
|
+
return
|
|
1424
|
+
}
|
|
1425
|
+
|
|
1426
|
+
this.setLabelValue('街道/乡镇', null)
|
|
1427
|
+
this.setLabelValue('集收单位', null)
|
|
1428
|
+
|
|
1429
|
+
|
|
1430
|
+
|
|
1431
|
+
let data = {
|
|
1432
|
+
tablename: 't_street',
|
|
1433
|
+
condition: `f_orgid= '${this.$login.f.orgid}' and f_pcd = '${this.show_data.f_pcd}'`
|
|
1434
|
+
}
|
|
1435
|
+
let f_address_type = this.getLableValue('地址类型')
|
|
1436
|
+
|
|
1437
|
+
if (f_address_type === '民用市区') {
|
|
1438
|
+
data.condition = `f_orgid= '${this.$login.f.orgid}' and f_pcd = '${this.show_data.f_pcd}' and f_iscity = '市区'`
|
|
1439
|
+
}
|
|
1440
|
+
if (f_address_type === '民用乡镇') {
|
|
1441
|
+
data.condition = `f_orgid= '${this.$login.f.orgid}' and f_pcd = '${this.show_data.f_pcd}' and f_iscity = '乡镇'`
|
|
1442
|
+
}
|
|
1443
|
+
|
|
1444
|
+
let http = new HttpResetClass()
|
|
1445
|
+
let res = await http.load(
|
|
1446
|
+
'POST',
|
|
1447
|
+
`rs/sql/apply_singleTable`,
|
|
1448
|
+
{data: data},
|
|
1449
|
+
{resolveMsg: null, rejectMsg: '街道/乡镇查询失败!!!'}
|
|
1450
|
+
)
|
|
1451
|
+
|
|
1452
|
+
this.setLabelOptions('街道/乡镇', res.data.map(item => {
|
|
1453
|
+
return {
|
|
1454
|
+
label: item.f_street,
|
|
1455
|
+
value: item.f_street
|
|
1456
|
+
}
|
|
1457
|
+
}))
|
|
1458
|
+
},
|
|
1459
|
+
// 地址类型失去焦点
|
|
1460
|
+
'addressTypeChange' (index) {
|
|
1461
|
+
this.setLabelValue('街道/乡镇', null)
|
|
1462
|
+
this.setLabelValue('集收单位', null)
|
|
1463
|
+
this.getAreaNew()
|
|
1464
|
+
let f_address_type = this.show_data.fields[index].value
|
|
1465
|
+
for (const item of this.show_data.fields) {
|
|
1466
|
+
if (f_address_type === '民用市区') {
|
|
1467
|
+
if (item.label === '区/县' || item.label === '街道/乡镇' || item.label === '集收单位' || item.label === '门牌号') {
|
|
1468
|
+
item.hidden = false
|
|
1469
|
+
item.required = true
|
|
1470
|
+
item.value = null
|
|
1471
|
+
}
|
|
1472
|
+
if (item.label === '楼号/组' || item.label === '单元/排' || item.label === '楼层') {
|
|
1473
|
+
item.hidden = false
|
|
1474
|
+
item.required = false
|
|
1475
|
+
item.value = null
|
|
1476
|
+
}
|
|
1477
|
+
if (item.label === '地址') {
|
|
1478
|
+
item.readonly = true
|
|
1479
|
+
item.value = null
|
|
1480
|
+
}
|
|
1481
|
+
}
|
|
1482
|
+
if (f_address_type === '民用乡镇') {
|
|
1483
|
+
if (item.label === '区/县' || item.label === '街道/乡镇' || item.label === '集收单位' || item.label === '门牌号') {
|
|
1484
|
+
item.hidden = false
|
|
1485
|
+
item.required = true
|
|
1486
|
+
item.value = null
|
|
1487
|
+
}
|
|
1488
|
+
if (item.label === '楼号/组' || item.label === '单元/排' || item.label === '楼层') {
|
|
1489
|
+
item.hidden = false
|
|
1490
|
+
item.required = false
|
|
1491
|
+
item.value = null
|
|
1492
|
+
}
|
|
1493
|
+
if (item.label === '楼层') {
|
|
1494
|
+
item.hidden = true
|
|
1495
|
+
item.required = false
|
|
1496
|
+
item.value = null
|
|
1497
|
+
}
|
|
1498
|
+
if (item.label === '地址') {
|
|
1499
|
+
item.readonly = true
|
|
1500
|
+
item.value = null
|
|
1501
|
+
}
|
|
1502
|
+
}
|
|
1503
|
+
if (f_address_type === '特殊地址') {
|
|
1504
|
+
if (item.label === '区/县' || item.label === '街道/乡镇') {
|
|
1505
|
+
item.hidden = false
|
|
1506
|
+
item.required = true
|
|
1507
|
+
item.value = null
|
|
1508
|
+
}
|
|
1509
|
+
if (item.label === '集收单位') {
|
|
1510
|
+
item.hidden = false
|
|
1511
|
+
item.required = false
|
|
1512
|
+
item.value = null
|
|
1513
|
+
}
|
|
1514
|
+
if (item.label === '楼号/组' || item.label === '单元/排' || item.label === '楼层' || item.label === '门牌号') {
|
|
1515
|
+
item.hidden = true
|
|
1516
|
+
item.required = false
|
|
1517
|
+
item.value = null
|
|
1518
|
+
}
|
|
1519
|
+
if (item.label === '地址') {
|
|
1520
|
+
item.readonly = false
|
|
1521
|
+
item.value = null
|
|
1522
|
+
}
|
|
1523
|
+
}
|
|
1524
|
+
}
|
|
1525
|
+
},
|
|
1526
|
+
// 团购转散户初始化
|
|
1527
|
+
'apply2ReadyEvent' () {
|
|
1528
|
+
if (this.show_data.f_apply_source === '线下发起') {
|
|
1529
|
+
this.addressInitialization()
|
|
1530
|
+
this.hideLabels('用户编号')
|
|
1531
|
+
this.electiveLabels('用户编号')
|
|
1532
|
+
this.showLabels('片区', '地址类型')
|
|
1533
|
+
this.requiredLabels('片区', '地址类型')
|
|
1534
|
+
}
|
|
1535
|
+
if (this.show_data.f_apply_source === '自动发起') {
|
|
1536
|
+
this.hideLabels('片区', '地址类型')
|
|
1537
|
+
this.electiveLabels('片区', '地址类型',)
|
|
1538
|
+
}
|
|
1539
|
+
},
|
|
1540
|
+
// 申请节点初始化
|
|
1541
|
+
'applyReadyEvent' () {
|
|
1542
|
+
this.addressInitialization()
|
|
1543
|
+
this.pcdChange()
|
|
1544
|
+
this.streetChange()
|
|
1545
|
+
this.areaChange()
|
|
1546
|
+
},
|
|
1547
|
+
// ===========================================
|
|
1548
|
+
async 'button'() {
|
|
1549
|
+
if (this.show_data.button.before) {
|
|
1550
|
+
await this[this.show_data.button.before]()
|
|
1551
|
+
}
|
|
1552
|
+
// 点击重置按钮就重置数据
|
|
1553
|
+
if (this.show_data.button.button_name === '重置') {
|
|
1554
|
+
this.$dispatch('breakControl', this.selectdata)
|
|
1555
|
+
return
|
|
1556
|
+
}
|
|
1557
|
+
|
|
1558
|
+
this.show_data.user = this.$login.f
|
|
1559
|
+
this.show_data.start_activity = this.$workflow_vue.start_activity
|
|
1560
|
+
this.show_data.xmlfilename = this.$workflow_vue.workflow_xmlfilename
|
|
1561
|
+
|
|
1562
|
+
if ((this.show_data.f_apply_type === '报警器报建' || this.show_data.f_apply_type === '工商业报警器报建') && this.show_data.defname === '工程施工' && this.show_data.f_sub_state !='完工' && this.show_data.button.button_name === '完工'){
|
|
1563
|
+
//判断是否添加报警器材料
|
|
1564
|
+
let bjqlag = false
|
|
1565
|
+
let datatemp = {
|
|
1566
|
+
'bjqid':"",
|
|
1567
|
+
'fprocessid':"",
|
|
1568
|
+
'sqvalue':"",
|
|
1569
|
+
'f_bjq_sid':"",
|
|
1570
|
+
'f_material_code':"",
|
|
1571
|
+
'f_bjq_baidu_lng':"",
|
|
1572
|
+
'f_bjq_baidu_lat':"",
|
|
1573
|
+
'f_bjq_gaode_lng':"",
|
|
1574
|
+
'f_bjq_gaode_lat':""
|
|
1575
|
+
}
|
|
1576
|
+
|
|
1577
|
+
let bjqststedata = {
|
|
1578
|
+
"sid":"",
|
|
1579
|
+
"bjqtype":"",
|
|
1580
|
+
"f_process_id":"",
|
|
1581
|
+
"bjqstate":"",
|
|
1582
|
+
"f_userinfo_code":""
|
|
1583
|
+
}
|
|
1584
|
+
let numOne = [];
|
|
1585
|
+
|
|
1586
|
+
let http = new HttpResetClass()
|
|
1587
|
+
let data = {
|
|
1588
|
+
tablename: `t_material_apply`,
|
|
1589
|
+
condition: `f_process_id='${this.show_data.f_process_id}'`
|
|
1590
|
+
}
|
|
1591
|
+
let res = await http.load(
|
|
1592
|
+
'POST',
|
|
1593
|
+
`rs/sql/apply_singleTable`,
|
|
1594
|
+
{data: data},
|
|
1595
|
+
{resolveMsg: null, rejectMsg: 'onetomany查询失败'}
|
|
1596
|
+
)
|
|
1597
|
+
res.data.forEach(item => {
|
|
1598
|
+
if (item.f_material_name.substr(0,3) === '报警器'){
|
|
1599
|
+
var bjname = item.f_material_name.split("-")
|
|
1600
|
+
bjqststedata.sid = item.f_bjq_sid
|
|
1601
|
+
bjqststedata.f_process_id = item.f_process_id
|
|
1602
|
+
bjqststedata.bjqtype = bjname[1]
|
|
1603
|
+
//====================================
|
|
1604
|
+
bjqlag = true
|
|
1605
|
+
datatemp.bjqid = item.id
|
|
1606
|
+
datatemp.fprocessid = item.f_process_id
|
|
1607
|
+
datatemp.f_bjq_sid = item.f_bjq_sid
|
|
1608
|
+
datatemp.f_material_code = item.f_material_code
|
|
1609
|
+
datatemp.f_bjq_lng = item.f_bjq_lng
|
|
1610
|
+
datatemp.f_bjq_lat = item.f_bjq_lat
|
|
1611
|
+
datatemp.f_bjq_gaode_lng = item.f_bjq_gaode_lng
|
|
1612
|
+
datatemp.f_bjq_gaode_lat = item.f_bjq_gaode_lng
|
|
1613
|
+
datatemp.f_bjq_baidu_lng = item.f_bjq_baidu_lng
|
|
1614
|
+
datatemp.f_bjq_baidu_lat = item.f_bjq_baidu_lat
|
|
1615
|
+
numOne.push(item.f_bjq_sid)
|
|
1616
|
+
}
|
|
1617
|
+
})
|
|
1618
|
+
|
|
1619
|
+
// this.show_data.onetomany.forEach(item=>{
|
|
1620
|
+
// console.log("查看报警器材料",item)
|
|
1621
|
+
// item.rows.forEach(i=>{
|
|
1622
|
+
// if (i.f_material_name.substr(0,3) === '报警器'){
|
|
1623
|
+
// var bjname = i.f_material_name.split("-")
|
|
1624
|
+
// bjqststedata.sid = i.f_bjq_sid
|
|
1625
|
+
// bjqststedata.f_process_id = i.f_process_id
|
|
1626
|
+
// bjqststedata.bjqtype = bjname[1]
|
|
1627
|
+
// //====================================
|
|
1628
|
+
// bjqlag = true
|
|
1629
|
+
// datatemp.bjqid = i.id
|
|
1630
|
+
// datatemp.fprocessid = i.f_process_id
|
|
1631
|
+
// datatemp.f_bjq_sid = i.f_bjq_sid
|
|
1632
|
+
// datatemp.f_material_code = i.f_material_code
|
|
1633
|
+
// numOne.push(i.f_bjq_sid)
|
|
1634
|
+
// }
|
|
1635
|
+
// })
|
|
1636
|
+
// })
|
|
1637
|
+
if (!bjqlag){
|
|
1638
|
+
this.$showMessage('请添加报警器物料信息!!!')
|
|
1639
|
+
return
|
|
1640
|
+
}
|
|
1641
|
+
if (numOne.length > 1){
|
|
1642
|
+
this.$showMessage("暂时支持单个报警器物料安装!!!")
|
|
1643
|
+
return
|
|
1644
|
+
}
|
|
1645
|
+
datatemp.sqvalue = this.show_data.areaData.sqvalue
|
|
1646
|
+
datatemp.f_bjq_baidu_lng = this.show_data.templatlng.baidutemplng
|
|
1647
|
+
datatemp.f_bjq_baidu_lat = this.show_data.templatlng.baidutemplat
|
|
1648
|
+
datatemp.f_bjq_gaode_lng = this.show_data.templatlng.gaodetemplng
|
|
1649
|
+
datatemp.f_bjq_gaode_lat = this.show_data.templatlng.gaodetemplat
|
|
1650
|
+
datatemp.f_bjq_lng = this.show_data.templatlng.baidutemplng
|
|
1651
|
+
datatemp.f_bjq_lat = this.show_data.templatlng.baidutemplat
|
|
1652
|
+
|
|
1653
|
+
bjqststedata.f_userinfo_code = this.show_data.f_userinfo_code
|
|
1654
|
+
|
|
1655
|
+
//判断是否推送 及推送的状态
|
|
1656
|
+
//查询是否存在, 以型号及厂家判断
|
|
1657
|
+
let bjqres = await this.$resetpost(
|
|
1658
|
+
`rs/logic/getbjqsyncinfo`,
|
|
1659
|
+
bjqststedata
|
|
1660
|
+
)
|
|
1661
|
+
if (bjqres.data.bjqstate != "成功"){
|
|
1662
|
+
//区域地址存入材料记录表
|
|
1663
|
+
let areares = await this.$resetpost(
|
|
1664
|
+
`rs/logic/saveArea`,
|
|
1665
|
+
{data: datatemp},
|
|
1666
|
+
{resolveMsg: null, rejectMsg: '区域地址保存失败'}
|
|
1667
|
+
)
|
|
1668
|
+
|
|
1669
|
+
//完工之后推送数据到汉威
|
|
1670
|
+
let adddata = {
|
|
1671
|
+
f_bjq_sid : datatemp.f_bjq_sid,
|
|
1672
|
+
f_material_code : datatemp.f_material_code,
|
|
1673
|
+
f_bjq_address: this.show_data.areaData.sqvalue,
|
|
1674
|
+
f_user_name: this.show_data.f_user_name,
|
|
1675
|
+
f_address: this.show_data.f_address,
|
|
1676
|
+
f_user_phone: this.show_data.f_phone,
|
|
1677
|
+
f_userinfo_code: this.show_data.f_userinfo_code,
|
|
1678
|
+
installtime: this.show_data.f_construction_date,
|
|
1679
|
+
f_orgid : this.show_data.f_orgid,
|
|
1680
|
+
f_bjq_lng: datatemp.f_bjq_baidu_lng,
|
|
1681
|
+
f_bjq_lat: datatemp.f_bjq_baidu_lat
|
|
1682
|
+
}
|
|
1683
|
+
let res = await this.$resetpost(
|
|
1684
|
+
`ncc/rs/logic/bjqadduser`,
|
|
1685
|
+
// `rs/logic/bjqadduser`,
|
|
1686
|
+
adddata
|
|
1687
|
+
)
|
|
1688
|
+
if (res.data.code != 200){
|
|
1689
|
+
if (bjqres.data.bjqstate.length == 0){
|
|
1690
|
+
bjqststedata.bjqstate = "失败"
|
|
1691
|
+
let bjqres3 = await this.$resetpost(
|
|
1692
|
+
`rs/logic/addbjqsyncinfo`,
|
|
1693
|
+
bjqststedata
|
|
1694
|
+
)
|
|
1695
|
+
}
|
|
1696
|
+
this.$showMessage(res.data.msg)
|
|
1697
|
+
return
|
|
1698
|
+
}
|
|
1699
|
+
//更改记录表状态
|
|
1700
|
+
if (bjqres.data.bjqstate === "失败"){
|
|
1701
|
+
bjqststedata.bjqstate = "成功"
|
|
1702
|
+
let bjqres1 = await this.$resetpost(
|
|
1703
|
+
`rs/logic/updatebjqsyncinfo`,
|
|
1704
|
+
bjqststedata
|
|
1705
|
+
)
|
|
1706
|
+
}else{
|
|
1707
|
+
bjqststedata.bjqstate = "成功"
|
|
1708
|
+
let bjqres2 = await this.$resetpost(
|
|
1709
|
+
`rs/logic/addbjqsyncinfo`,
|
|
1710
|
+
bjqststedata
|
|
1711
|
+
)
|
|
1712
|
+
}
|
|
1713
|
+
}
|
|
1714
|
+
}
|
|
1715
|
+
if ((this.show_data.f_apply_type === '工商户报建' || this.show_data.f_apply_type === '团购报建')
|
|
1716
|
+
&& (this.show_data.defname === '报装申请') && this.show_data.button.button_name === '提交'){
|
|
1717
|
+
await this.contract_number()
|
|
1718
|
+
}
|
|
1719
|
+
// if(this.show_data.f_apply_type === '散户报建' && this.show_data.defname === '合同签订' && (this.show_data.button.button_name === '保存'||this.show_data.button.button_name === '提交')){
|
|
1720
|
+
// let dataz = {
|
|
1721
|
+
// condition: `u.id = ${this.show_data.id}`,
|
|
1722
|
+
// data: {
|
|
1723
|
+
// id: this.$login.f.id,
|
|
1724
|
+
// orgid: this.$login.f.orgid
|
|
1725
|
+
// }
|
|
1726
|
+
// }
|
|
1727
|
+
// let http = new HttpResetClass()
|
|
1728
|
+
// let restpz = await http.load(
|
|
1729
|
+
// 'POST',
|
|
1730
|
+
// `rs/sql/checkuser`,
|
|
1731
|
+
// {data: dataz},
|
|
1732
|
+
// {resolveMsg: null, rejectMsg: '报建数据查询失败!!!'}
|
|
1733
|
+
// )
|
|
1734
|
+
// this.show_data.actid=restpz.data[0].actid
|
|
1735
|
+
// }
|
|
1736
|
+
let res = await this.$resetpost(
|
|
1737
|
+
`rs/logic/ApplyProductService`,
|
|
1738
|
+
{data: this.show_data},
|
|
1739
|
+
{resolveMsg: null, rejectMsg: '数据保存失败'}
|
|
1740
|
+
)
|
|
1741
|
+
|
|
1742
|
+
|
|
1743
|
+
if (this.show_data.button.after) {
|
|
1744
|
+
this[this.show_data.button.after]()
|
|
1745
|
+
}
|
|
1746
|
+
// // 改管报建 增容报建 优化
|
|
1747
|
+
// if((this.show_data.f_apply_type === '改管报建'||this.show_data.f_apply_type === '增容报建') && this.show_data.defname === '报装申请' && this.show_data.button.button_name === '缴费'){
|
|
1748
|
+
// let datagg = {
|
|
1749
|
+
// condition: `t.f_process_id='${this.show_data.f_process_id}'`,
|
|
1750
|
+
// }
|
|
1751
|
+
// let http = new HttpResetClass()
|
|
1752
|
+
// let restgg = await http.load(
|
|
1753
|
+
// 'POST',
|
|
1754
|
+
// `rs/sql/checkusertwo`,
|
|
1755
|
+
// {data: datagg},
|
|
1756
|
+
// {resolveMsg: null, rejectMsg: '报建数据查询失败!!!'}
|
|
1757
|
+
// )
|
|
1758
|
+
// debugger
|
|
1759
|
+
// if(this.show_data.f_apply_type === '改管报建'){
|
|
1760
|
+
// restgg.data[0].processname = '改管报建流程'
|
|
1761
|
+
// restgg.data[0].defname = '报装缴费'
|
|
1762
|
+
// }else{
|
|
1763
|
+
// restgg.data[0].processname = '增容报建流程'
|
|
1764
|
+
// restgg.data[0].defname = '报装缴费'
|
|
1765
|
+
// }
|
|
1766
|
+
// restgg.data[0].actid = restgg.data[0].actid + 1
|
|
1767
|
+
// this.$dispatch('apply',restgg.data[0])
|
|
1768
|
+
//
|
|
1769
|
+
// }
|
|
1770
|
+
//
|
|
1771
|
+
// // 退款报建 优化
|
|
1772
|
+
// if(this.show_data.f_apply_type === '退款报建' && this.show_data.defname === '终止报建' && this.show_data.button.button_name === '提交'){
|
|
1773
|
+
// let datatk = {
|
|
1774
|
+
// condition: `t.f_process_id='${this.show_data.f_process_id}'`,
|
|
1775
|
+
// }
|
|
1776
|
+
// let http = new HttpResetClass()
|
|
1777
|
+
// let resttk = await http.load(
|
|
1778
|
+
// 'POST',
|
|
1779
|
+
// `rs/sql/checkusertwo`,
|
|
1780
|
+
// {data: datatk},
|
|
1781
|
+
// {resolveMsg: null, rejectMsg: '报建数据查询失败!!!'}
|
|
1782
|
+
// )
|
|
1783
|
+
// debugger
|
|
1784
|
+
// resttk.data[0].processname = '退款报建流程'
|
|
1785
|
+
// resttk.data[0].defname = '退款'
|
|
1786
|
+
// this.$dispatch('apply',resttk.data[0])
|
|
1787
|
+
//
|
|
1788
|
+
// }
|
|
1789
|
+
//
|
|
1790
|
+
//
|
|
1791
|
+
// if(this.show_data.f_apply_type === '散户报建' && this.show_data.defname === '报装申请' && this.show_data.button.button_name === '合同'){
|
|
1792
|
+
// let data = {
|
|
1793
|
+
// tablename: 't_apply',
|
|
1794
|
+
// condition: `f_process_id='${this.show_data.f_process_id}'`
|
|
1795
|
+
// }
|
|
1796
|
+
// let http = new HttpResetClass()
|
|
1797
|
+
// let restp = await http.load(
|
|
1798
|
+
// 'POST',
|
|
1799
|
+
// `rs/sql/apply_singleTable`,
|
|
1800
|
+
// {data: data},
|
|
1801
|
+
// {resolveMsg: null, rejectMsg: '报建数据查询失败!!!'}
|
|
1802
|
+
// )
|
|
1803
|
+
// debugger
|
|
1804
|
+
// restp.data[0].processname = '散户报建流程'
|
|
1805
|
+
// restp.data[0].defname = '合同签订'
|
|
1806
|
+
// this.$dispatch('apply',restp.data[0])
|
|
1807
|
+
//
|
|
1808
|
+
// } else if(this.show_data.f_apply_type === '散户报建' && this.show_data.defname === '合同签订' && this.show_data.button.button_name === '提交'){
|
|
1809
|
+
// let data2 = {
|
|
1810
|
+
// condition: `u.id = ${this.show_data.id}`,
|
|
1811
|
+
// data: {
|
|
1812
|
+
// id: this.$login.f.id,
|
|
1813
|
+
// orgid: this.$login.f.orgid
|
|
1814
|
+
// }
|
|
1815
|
+
// }
|
|
1816
|
+
// let http = new HttpResetClass()
|
|
1817
|
+
// let restp1 = await http.load(
|
|
1818
|
+
// 'POST',
|
|
1819
|
+
// `rs/sql/checkuser`,
|
|
1820
|
+
// {data: data2},
|
|
1821
|
+
// {resolveMsg: null, rejectMsg: '报建数据查询失败!!!'}
|
|
1822
|
+
// )
|
|
1823
|
+
// debugger
|
|
1824
|
+
// console.log('有没有发请求打印查询的内容restp1',restp1)
|
|
1825
|
+
// // restp1.data[0].processname = '散户报建流程'
|
|
1826
|
+
// // restp1.data[0].defname = '报装缴费'
|
|
1827
|
+
// this.$dispatch('apply',restp1.data[0])
|
|
1828
|
+
// }else if(this.show_data.f_apply_type === '散户报建' && this.show_data.defname === '报装缴费' && this.show_data.button.button_name === '提交'){
|
|
1829
|
+
// let data3 = {
|
|
1830
|
+
// condition: `u.id = ${this.show_data.id}`,
|
|
1831
|
+
// data: {
|
|
1832
|
+
// id: this.$login.f.id,
|
|
1833
|
+
// orgid: this.$login.f.orgid
|
|
1834
|
+
// }
|
|
1835
|
+
// }
|
|
1836
|
+
// let http = new HttpResetClass()
|
|
1837
|
+
// let restp2 = await http.load(
|
|
1838
|
+
// 'POST',
|
|
1839
|
+
// `rs/sql/checkuser`,
|
|
1840
|
+
// {data: data3},
|
|
1841
|
+
// {resolveMsg: null, rejectMsg: '报建数据查询失败!!!'}
|
|
1842
|
+
// )
|
|
1843
|
+
// debugger
|
|
1844
|
+
// console.log('打印查询的内容',restp2)
|
|
1845
|
+
// if(restp2.length>0){
|
|
1846
|
+
// this.$dispatch('apply',restp2.data[0])
|
|
1847
|
+
// }else{
|
|
1848
|
+
// debugger
|
|
1849
|
+
// this.$dispatch('loadPage')
|
|
1850
|
+
// }
|
|
1851
|
+
// }
|
|
1852
|
+
// else{
|
|
1853
|
+
// this.$dispatch('loadPage')
|
|
1854
|
+
// }
|
|
1855
|
+
this.$dispatch('loadPage')
|
|
1856
|
+
},
|
|
1857
|
+
// 失去焦点出触发事件
|
|
1858
|
+
'onchange' (index) {
|
|
1859
|
+
if (this.show_data.defname === '报装申请' || this.show_data.defname === '信息确认') {
|
|
1860
|
+
|
|
1861
|
+
if (
|
|
1862
|
+
this.show_data.fields[index].label === '区/县' ||
|
|
1863
|
+
this.show_data.fields[index].label === '街道/乡镇' ||
|
|
1864
|
+
this.show_data.fields[index].label === '集收单位' ||
|
|
1865
|
+
this.show_data.fields[index].label === '楼号/组' ||
|
|
1866
|
+
this.show_data.fields[index].label === '单元/排' ||
|
|
1867
|
+
this.show_data.fields[index].label === '楼层' ||
|
|
1868
|
+
this.show_data.fields[index].label === '门牌号'
|
|
1869
|
+
) {
|
|
1870
|
+
|
|
1871
|
+
let f_pcd = this.getLableValue('区/县') || ''
|
|
1872
|
+
let f_street = this.getLableValue('街道/乡镇') || ''
|
|
1873
|
+
let f_residential_area = this.getLableValue('集收单位') || ''
|
|
1874
|
+
let f_building = this.getLableValue('楼号/组') || ''
|
|
1875
|
+
let f_building_suffix = f_building ? '栋' : ''
|
|
1876
|
+
let f_unit = this.getLableValue('单元/排') || ''
|
|
1877
|
+
// let f_unit_suffix = f_unit ? this.config.f_unit_suffix : ''
|
|
1878
|
+
let f_unit_suffix = f_unit ? '单元' : ''
|
|
1879
|
+
let f_floor = this.getLableValue('楼层') || ''
|
|
1880
|
+
// let f_floor_suffix = f_floor ? this.config.f_floor_suffix : ''
|
|
1881
|
+
let f_floor_suffix = f_floor ? '层' : ''
|
|
1882
|
+
let f_room = this.getLableValue('门牌号') || ''
|
|
1883
|
+
// let f_room_suffix = f_room ? this.config.f_room_suffix : ''
|
|
1884
|
+
let f_room_suffix = f_room ? '室' : ''
|
|
1885
|
+
|
|
1886
|
+
let f_address = f_street + f_residential_area + f_building + f_building_suffix + f_unit + f_unit_suffix + f_floor + f_floor_suffix + f_room + f_room_suffix
|
|
1887
|
+
this.setLabelValue("地址", f_address)
|
|
1888
|
+
}
|
|
1889
|
+
}
|
|
1890
|
+
if(this.show_data.fields[index].label === '是否老居民首次开发'){
|
|
1891
|
+
if( this.getLableValue('是否老居民首次开发')==='是'){
|
|
1892
|
+
this.showLabels('开户比例')
|
|
1893
|
+
this.hideLabels('立管架空')
|
|
1894
|
+
this.setLabelValue("立管架空", '')
|
|
1895
|
+
}else if(this.getLableValue('是否老居民首次开发')==='否'){
|
|
1896
|
+
this.showLabels('立管架空')
|
|
1897
|
+
this.hideLabels('开户比例')
|
|
1898
|
+
this.setLabelValue("开户比例", '')
|
|
1899
|
+
}
|
|
1900
|
+
|
|
1901
|
+
}
|
|
1902
|
+
},
|
|
1903
|
+
selectSearch (val, index) {},
|
|
1904
|
+
'onblur' (index) {
|
|
1905
|
+
},
|
|
1906
|
+
'oninput' (index) {
|
|
1907
|
+
},
|
|
1908
|
+
'initializtionView' () {},
|
|
1909
|
+
async 'onchangeModal' (index, fieldIndex) {
|
|
1910
|
+
},
|
|
1911
|
+
async 'onblurModal' (index, fieldIndex) {
|
|
1912
|
+
|
|
1913
|
+
},
|
|
1914
|
+
async 'oninputModal' (index, fieldIndex) {
|
|
1915
|
+
|
|
1916
|
+
},
|
|
1917
|
+
async 'onetomanydelete' (index, rowIndex) {
|
|
1918
|
+
|
|
1919
|
+
let http = new HttpResetClass()
|
|
1920
|
+
|
|
1921
|
+
let res = await http.load(
|
|
1922
|
+
'DELETE',
|
|
1923
|
+
`rs/entity/${this.show_data.onetomany[index].tables[0]}/${this.show_data.onetomany[index].rows[rowIndex].id}`,
|
|
1924
|
+
null,
|
|
1925
|
+
{resolveMsg: null, rejectMsg: '删除失败!!!'}
|
|
1926
|
+
)
|
|
1927
|
+
|
|
1928
|
+
res = await this.$resetpost(
|
|
1929
|
+
'rs/entity/t_apply',
|
|
1930
|
+
this.show_data
|
|
1931
|
+
)
|
|
1932
|
+
|
|
1933
|
+
this.$dispatch('breakControl', this.show_data)
|
|
1934
|
+
},
|
|
1935
|
+
async 'onetomanyupdate' (index, rowIndex) {
|
|
1936
|
+
let data = this.show_data.onetomany[index].rows[rowIndex]
|
|
1937
|
+
|
|
1938
|
+
this.show_data.onetomany[index].fields.forEach(item => {
|
|
1939
|
+
data[item.field] = item.value
|
|
1940
|
+
})
|
|
1941
|
+
let res = await this.$resetpost(
|
|
1942
|
+
`rs/entity/${this.show_data.onetomany[index].tables[0]}`,
|
|
1943
|
+
data
|
|
1944
|
+
)
|
|
1945
|
+
|
|
1946
|
+
res = await this.$resetpost(
|
|
1947
|
+
'rs/entity/t_apply',
|
|
1948
|
+
this.show_data
|
|
1949
|
+
)
|
|
1950
|
+
|
|
1951
|
+
this.$dispatch('breakControl', this.show_data)
|
|
1952
|
+
},
|
|
1953
|
+
async 'onetomanyadd' (index) {
|
|
1954
|
+
let data = {
|
|
1955
|
+
f_process_id : this.show_data.f_process_id,
|
|
1956
|
+
f_operator_id: this.$login.f.id,
|
|
1957
|
+
f_operator: this.$login.f.name,
|
|
1958
|
+
f_operation_date: new Date().Format('yyyy-MM-dd HH:mm:ss'),
|
|
1959
|
+
f_orgid: this.$login.f.orgid,
|
|
1960
|
+
f_orgname: this.$login.f.orgs
|
|
1961
|
+
}
|
|
1962
|
+
this.show_data.onetomany[index].fields.forEach(item => {
|
|
1963
|
+
data[item.field] = item.value
|
|
1964
|
+
})
|
|
1965
|
+
let res = await this.$resetpost(
|
|
1966
|
+
`rs/entity/${this.show_data.onetomany[index].tables[0]}`,
|
|
1967
|
+
data
|
|
1968
|
+
)
|
|
1969
|
+
|
|
1970
|
+
res = await this.$resetpost(
|
|
1971
|
+
'rs/entity/t_apply',
|
|
1972
|
+
this.show_data
|
|
1973
|
+
)
|
|
1974
|
+
|
|
1975
|
+
this.$dispatch('breakControl', this.show_data)
|
|
1976
|
+
},
|
|
1977
|
+
async 'importEvent' (index, table, configName, filepath) {
|
|
1978
|
+
let data = {
|
|
1979
|
+
selectdata: this.show_data,
|
|
1980
|
+
table: table,
|
|
1981
|
+
filepath: filepath,
|
|
1982
|
+
configName: configName,
|
|
1983
|
+
user: this.$login.f
|
|
1984
|
+
}
|
|
1985
|
+
|
|
1986
|
+
let res = await this.$resetpost(
|
|
1987
|
+
`rs/logic/importEvent`,
|
|
1988
|
+
data
|
|
1989
|
+
)
|
|
1990
|
+
|
|
1991
|
+
this.$dispatch('breakControl', this.show_data)
|
|
1992
|
+
},
|
|
1993
|
+
'onbutchange' (index) {
|
|
1994
|
+
|
|
1995
|
+
},
|
|
1996
|
+
'onbutblur' (index) {
|
|
1997
|
+
|
|
1998
|
+
},
|
|
1999
|
+
'onbutinput' (index) {
|
|
2000
|
+
|
|
2001
|
+
|
|
2002
|
+
}
|
|
2003
|
+
},
|
|
2004
|
+
watch: {
|
|
2005
|
+
}
|
|
2006
|
+
}
|
|
2007
|
+
</script>
|
|
2008
|
+
<style scoped>
|
|
2009
|
+
/*清除model中的浮动*/
|
|
2010
|
+
.clearfix:after,.clearfix:before{
|
|
2011
|
+
display: table;
|
|
2012
|
+
}
|
|
2013
|
+
.clearfix:after{
|
|
2014
|
+
clear: both;
|
|
2015
|
+
}
|
|
2016
|
+
</style>
|