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