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