apply-clients 7.1.36-yuchuan-12 → 7.1.36-yuchuan-13
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/android.html +28 -28
- package/build/dev-server.js +28 -10
- package/index.html +39 -39
- package/package.json +3 -4
- package/src/apply.js +162 -161
- package/src/applyAndroid.js +97 -97
- package/src/components/android/AppSign.vue +235 -235
- package/src/components/android/AppUpload.vue +275 -275
- package/src/components/android/Ignition/VentilationIgnition.vue +408 -408
- package/src/components/android/Ignition/VentilationIgnitionHandle.vue +462 -462
- package/src/components/android/Process/AppExplorationUser.vue +454 -454
- package/src/components/android/Process/AppServiceControl.vue +1437 -1437
- package/src/components/android/Process/Processes/AppInstallationDetails.vue +980 -980
- package/src/components/android/Sign/AppSignTask.vue +183 -183
- package/src/components/android/Supervisory/AppProcessSupervisory.vue +344 -344
- package/src/components/android/Task/GuanXianJianShe/AppExplorationGuanXian.vue +317 -317
- package/src/components/android/Task/ShiGongXinXi/AppShowBuildUser.vue +431 -431
- package/src/components/android/Task/yiban/AppShowDone.vue +442 -442
- package/src/components/android/Task/yiban/ShowDone.vue +95 -95
- package/src/components/android/Task/yiban/satisfactionShow.vue +166 -166
- package/src/components/android/newPackage/customerServiceManager.vue +218 -218
- package/src/components/android/newPackage/projectPrice.vue +218 -218
- package/src/components/product/ApplyCharge/ApplyChargeList.vue +1 -1
- package/src/components/product/ApplyGaiXianCharge/ApplyGaiXianViewList.vue +272 -272
- package/src/components/product/ApplyGuanXian/GuanXianCaiLiao.vue +236 -236
- package/src/components/product/ApplyGuanXian/GuanXianExplorationSelect.vue +324 -324
- package/src/components/product/ApplyGuanXian/GuanXianExplorationUser.vue +144 -144
- package/src/components/product/ApplyGuanXian/GuanXianSupervisoryhCart.vue +119 -119
- package/src/components/product/ApplyMap/AMapLocation.vue +870 -0
- package/src/components/product/ApplyMap/AmapUtil.js +37 -0
- package/src/components/product/ApplyMap/ApplyDragaboutList.vue +223 -223
- package/src/components/product/ApplyMap/ApplyInputSearch.vue +212 -212
- package/src/components/product/ApplyMap/ApplyMapCom.vue +82 -82
- package/src/components/product/ApplyMap/ApplyMapInputSearch.vue +335 -335
- package/src/components/product/ApplyMap/ApplyMapLocation.vue +862 -862
- package/src/components/product/ChongZheng/ApplyChongZhengList.vue +415 -415
- package/src/components/product/Function/InstallFunction.vue +133 -133
- package/src/components/product/Function/InstallInfoSelect.vue +371 -371
- package/src/components/product/Function/Service/FunctionServiceControl.vue +586 -586
- package/src/components/product/GongJianPush/ApplyPushDispose.vue +162 -72
- package/src/components/product/GongJianPush/ApplyPushList.vue +47 -52
- package/src/components/product/GongJianPush/ApplyPushManage.vue +4 -3
- package/src/components/product/Ignition/IgnitionListManage.vue +602 -602
- package/src/components/product/Ignition/IgnitionRecord.vue +380 -380
- package/src/components/product/InsuranceApply/InsuranceReport.vue +3 -4
- package/src/components/product/List/OldShowDevices.vue +271 -271
- package/src/components/product/List/ShowAllActivity.vue +540 -540
- package/src/components/product/List/ShowDevices.vue +279 -279
- package/src/components/product/Print/BuildOrder/buildOrderList.vue +446 -446
- package/src/components/product/Process/ExplorationSelect.vue +597 -597
- package/src/components/product/Process/ExplorationUser.vue +158 -158
- package/src/components/product/Process/New1ExplorationUser.vue +201 -201
- package/src/components/product/Process/NewExplorationSelect.vue +586 -586
- package/src/components/product/Process/NewExplorationUser.vue +219 -219
- package/src/components/product/Process/Processes/InstallationDetails.vue +1159 -1159
- package/src/components/product/Process/Processes/Print/printCharge.vue +250 -250
- package/src/components/product/Process/Processes/Print/printGaiXianCharge.vue +244 -244
- package/src/components/product/Process/Processes/chargeManagement.vue +704 -704
- package/src/components/product/Process/Processes/devicesManagement.vue +393 -393
- package/src/components/product/Process/Processes/newDevicesManagement.vue +413 -413
- package/src/components/product/Process/Processes/selectChaiChuUserinfo.vue +230 -230
- package/src/components/product/Process/Processes/selectOldUserinfo.vue +241 -241
- package/src/components/product/Process/Processes/selectUserinfo.vue +234 -234
- package/src/components/product/Process/Service/ServiceControl.vue +2205 -2205
- package/src/components/product/ServiceView.vue +644 -644
- package/src/components/product/Stop/StopApplyList.vue +224 -224
- package/src/components/product/Supervisory/NewSupervisoryhCart.vue +175 -175
- package/src/components/product/Supervisory/Service/SupervisoryServiceControl.vue +592 -592
- package/src/components/product/Supervisory/SupervisoryControl.vue +116 -116
- package/src/components/product/Supervisory/SupervisoryList.vue +557 -557
- package/src/components/product/Supervisory/SupervisoryhCart.vue +119 -119
- package/src/components/product/Supervisory/YiBanSupervisoryList.vue +539 -539
- package/src/components/product/VueUtils/ApplyUpload.vue +294 -285
- package/src/components/product/records/AdjustmentRecordList.vue +162 -162
- package/src/main.js +27 -27
- package/static/marker-default.png +0 -0
- package/static/myLocationIcon.png +0 -0
|
@@ -1,1437 +1,1437 @@
|
|
|
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="isOpen" type="primary">
|
|
5
|
-
<app-service-view v-ref:serviceview :data="show_data" v-if="showview"></app-service-view>
|
|
6
|
-
</panel>
|
|
7
|
-
<panel header='地图' :is-open="!isOpen" type="primary" v-if="selectdata.defname ==='现场勘察'">
|
|
8
|
-
<div style="height: 85vh">
|
|
9
|
-
<apply-map-com :selectdata="selectdata"></apply-map-com>
|
|
10
|
-
</div>
|
|
11
|
-
</panel>
|
|
12
|
-
</accordion>
|
|
13
|
-
</div>
|
|
14
|
-
</template>
|
|
15
|
-
<script>
|
|
16
|
-
import Vue from 'vue'
|
|
17
|
-
import {HttpResetClass} from 'vue-client'
|
|
18
|
-
import {isEmpty} from '../../Util'
|
|
19
|
-
// Date格式化
|
|
20
|
-
Date.prototype.Format = function (fmt) {
|
|
21
|
-
var o = {
|
|
22
|
-
'M+': this.getMonth() + 1, // 月份
|
|
23
|
-
'd+': this.getDate(), // 日
|
|
24
|
-
'H+': this.getHours(), // 小时
|
|
25
|
-
'm+': this.getMinutes(), // 分
|
|
26
|
-
's+': this.getSeconds(), // 秒
|
|
27
|
-
'q+': Math.floor((this.getMonth() + 3) / 3), // 季度
|
|
28
|
-
'S': this.getMilliseconds() // 毫秒
|
|
29
|
-
}
|
|
30
|
-
if (/(y+)/.test(fmt)) fmt = fmt.replace(RegExp.$1, (this.getFullYear() + '').substr(4 - RegExp.$1.length))
|
|
31
|
-
for (var k in o) {
|
|
32
|
-
if (new RegExp('(' + k + ')').test(fmt)) fmt = fmt.replace(RegExp.$1, (RegExp.$1.length === 1) ? (o[k]) : (('00' + o[k]).substr(('' + o[k]).length)))
|
|
33
|
-
}
|
|
34
|
-
return fmt
|
|
35
|
-
}
|
|
36
|
-
export default {
|
|
37
|
-
title: '报建流程业务控制层',
|
|
38
|
-
props: ['selectdata', 'title'],
|
|
39
|
-
data() {
|
|
40
|
-
return {
|
|
41
|
-
json_datas: null,
|
|
42
|
-
data: null,
|
|
43
|
-
show_data: null,
|
|
44
|
-
showview: false,
|
|
45
|
-
config: {},
|
|
46
|
-
isOpen: true
|
|
47
|
-
}
|
|
48
|
-
},
|
|
49
|
-
ready() {
|
|
50
|
-
this.refurbish()
|
|
51
|
-
},
|
|
52
|
-
methods: {
|
|
53
|
-
async refurbish() {
|
|
54
|
-
this.showview = false
|
|
55
|
-
let title=this.title
|
|
56
|
-
let data = {
|
|
57
|
-
workname: this.selectdata.processname
|
|
58
|
-
}
|
|
59
|
-
|
|
60
|
-
let res = await this.$resetpost(
|
|
61
|
-
`${this.$androidUtil.getProxyUrl()}/rs/logic/ApplyGetConfigs`,
|
|
62
|
-
{data: data},
|
|
63
|
-
{resolveMsg: null, rejectMsg: '配置数据获取失败!!!'}
|
|
64
|
-
)
|
|
65
|
-
|
|
66
|
-
this.json_datas = res.data
|
|
67
|
-
|
|
68
|
-
let sum = 0
|
|
69
|
-
let jsonData = {}
|
|
70
|
-
if (!this.json_datas || !this.json_datas.activitys || this.json_datas.activitys.length === 0) {
|
|
71
|
-
this.$showMessage("网络故障,请刷新页面")
|
|
72
|
-
return
|
|
73
|
-
}
|
|
74
|
-
this.json_datas.activitys.forEach(item => {
|
|
75
|
-
if (this.selectdata.defname === '施工信息') {
|
|
76
|
-
if (item.title === '工程施工') {
|
|
77
|
-
jsonData = item // 拿到当前节点的json配置信息
|
|
78
|
-
sum++ // 节点名一样的个数
|
|
79
|
-
}
|
|
80
|
-
}else if (this.selectdata.defname === item.title) {
|
|
81
|
-
jsonData = item // 拿到当前节点的json配置信息
|
|
82
|
-
sum++ // 节点名一样的个数
|
|
83
|
-
}
|
|
84
|
-
return this.selectdata.defname === item.title // 拿到当前节点的json配置信息
|
|
85
|
-
})
|
|
86
|
-
|
|
87
|
-
if (sum === 0) {
|
|
88
|
-
this.$showMessage(`没有在JSON配置文件中找到活动名为:(${this.selectdata.defname})的节点配置`)
|
|
89
|
-
return
|
|
90
|
-
}
|
|
91
|
-
if (sum > 1) {
|
|
92
|
-
this.$showMessage(`在JSON配置文件中找到活动名为:(${this.selectdata.defname})的节点配置:${sum}个`)
|
|
93
|
-
return
|
|
94
|
-
}
|
|
95
|
-
|
|
96
|
-
this.selectdata = Object.assign({}, this.selectdata, jsonData)
|
|
97
|
-
|
|
98
|
-
// fields 字段填充值
|
|
99
|
-
for (const item of this.selectdata.fields) {
|
|
100
|
-
if (!item.value) {
|
|
101
|
-
item.value = null
|
|
102
|
-
}
|
|
103
|
-
|
|
104
|
-
if (!item.value && (item.default || item.default === 0) && item.type !== 'datepicker') {
|
|
105
|
-
if (item.eval) {
|
|
106
|
-
let user = Vue.user
|
|
107
|
-
// 将PC用户信息 替换成 APP的
|
|
108
|
-
item.value = eval(item.default.replace('this.$login.f', 'user'))
|
|
109
|
-
} else {
|
|
110
|
-
item.value = item.default
|
|
111
|
-
}
|
|
112
|
-
}
|
|
113
|
-
|
|
114
|
-
if (this.selectdata[item.field]) {
|
|
115
|
-
// 将json字符串格式化赋值给value
|
|
116
|
-
if (String(this.selectdata[item.field]).startsWith("{")) {
|
|
117
|
-
item.value = JSON.parse(this.selectdata[item.field])
|
|
118
|
-
} else {
|
|
119
|
-
item.value = this.selectdata[item.field]
|
|
120
|
-
}
|
|
121
|
-
}
|
|
122
|
-
if (this.selectdata[item.field] === 0) {
|
|
123
|
-
item.value = 0
|
|
124
|
-
}
|
|
125
|
-
|
|
126
|
-
// datepicker
|
|
127
|
-
if (item.type === 'datepicker' && !item.value && item.default) {
|
|
128
|
-
item.value = new Date().Format(`${item.format ? item.format : 'yyyy-MM-dd HH:mm:ss'}`)
|
|
129
|
-
}
|
|
130
|
-
|
|
131
|
-
// 如果配置类型为select,优先从参数列表获取options
|
|
132
|
-
if (item.type === 'select' || item.type === 'checkbox') {
|
|
133
|
-
if (item.param) {
|
|
134
|
-
let temp = this.$appdata.getParam(item.label)
|
|
135
|
-
|
|
136
|
-
if (temp && temp.length > 0) {
|
|
137
|
-
item.options = temp
|
|
138
|
-
}
|
|
139
|
-
|
|
140
|
-
if (item.paramLabel) {
|
|
141
|
-
temp = this.$appdata.getParam(item.paramLabel)
|
|
142
|
-
if (temp && temp.length > 0) {
|
|
143
|
-
item.options = temp
|
|
144
|
-
}
|
|
145
|
-
}
|
|
146
|
-
}
|
|
147
|
-
|
|
148
|
-
}
|
|
149
|
-
if (item.ready) {
|
|
150
|
-
item.options = await this[item.ready]()
|
|
151
|
-
}
|
|
152
|
-
|
|
153
|
-
if (item.type === 'checkbox') {
|
|
154
|
-
if (this.selectdata[item.field]) {
|
|
155
|
-
item.value = JSON.parse(this.selectdata[item.field])
|
|
156
|
-
} else {
|
|
157
|
-
item.value = []
|
|
158
|
-
}
|
|
159
|
-
}
|
|
160
|
-
if(this.selectdata.defname === '施工信息'||this.title === '已办信息'){
|
|
161
|
-
item.readonly = true
|
|
162
|
-
item.disabled = true
|
|
163
|
-
}
|
|
164
|
-
}
|
|
165
|
-
|
|
166
|
-
// 控制组件
|
|
167
|
-
if (this.selectdata.components) {
|
|
168
|
-
this.selectdata.components.forEach(item => {
|
|
169
|
-
if (!item.mark) {
|
|
170
|
-
item.mark = 0
|
|
171
|
-
}
|
|
172
|
-
})
|
|
173
|
-
}
|
|
174
|
-
// 控制组件
|
|
175
|
-
if(this.selectdata.defname === '施工信息') {
|
|
176
|
-
if (this.selectdata.components) {
|
|
177
|
-
this.selectdata.components.forEach(item => {
|
|
178
|
-
item.mark = 1
|
|
179
|
-
})
|
|
180
|
-
}
|
|
181
|
-
}
|
|
182
|
-
|
|
183
|
-
// 初始化onetomany
|
|
184
|
-
if (this.selectdata.onetomany) {
|
|
185
|
-
for (const item of this.selectdata.onetomany) {
|
|
186
|
-
let res = null
|
|
187
|
-
if (item.queryEvent) {
|
|
188
|
-
res = this[item.queryEvent]()
|
|
189
|
-
} else {
|
|
190
|
-
let http = new HttpResetClass()
|
|
191
|
-
let data = {
|
|
192
|
-
tablename: item.tables[0],
|
|
193
|
-
condition: `f_process_id='${this.selectdata.f_process_id}'`
|
|
194
|
-
}
|
|
195
|
-
res = await http.load(
|
|
196
|
-
'POST',
|
|
197
|
-
`${this.$androidUtil.getProxyUrl()}/rs/sql/applySingleTable`,
|
|
198
|
-
// `rs/sql/applySingleTable`,
|
|
199
|
-
{data: data},
|
|
200
|
-
{resolveMsg: null, rejectMsg: 'onetomany查询失败'}
|
|
201
|
-
)
|
|
202
|
-
}
|
|
203
|
-
|
|
204
|
-
item.rows = res.data
|
|
205
|
-
|
|
206
|
-
// 初始化onetomany中的fields
|
|
207
|
-
for (const field of item.fields) {
|
|
208
|
-
if (!field.value) {
|
|
209
|
-
if (field.value !== 0) {
|
|
210
|
-
field.value = null
|
|
211
|
-
}
|
|
212
|
-
}
|
|
213
|
-
|
|
214
|
-
if (field.default || field.default === 0) {
|
|
215
|
-
field.value = field.default
|
|
216
|
-
}
|
|
217
|
-
|
|
218
|
-
// datepicker
|
|
219
|
-
if (field.type === 'datepicker' && !field.value && field.default) {
|
|
220
|
-
field.value = new Date().Format(`${field.format ? field.format : 'yyyy-MM-dd HH:mm:ss'}`)
|
|
221
|
-
}
|
|
222
|
-
|
|
223
|
-
if (field.type === 'select') {
|
|
224
|
-
|
|
225
|
-
if (field.param) {
|
|
226
|
-
let temp = this.$appdata.getParam(field.label)
|
|
227
|
-
|
|
228
|
-
if (temp && temp.length > 0) {
|
|
229
|
-
field.options = temp
|
|
230
|
-
}
|
|
231
|
-
|
|
232
|
-
if (field.paramLabel) {
|
|
233
|
-
temp = this.$appdata.getParam(field.paramLabel)
|
|
234
|
-
if (temp && temp.length > 0) {
|
|
235
|
-
item.options = temp
|
|
236
|
-
}
|
|
237
|
-
}
|
|
238
|
-
}
|
|
239
|
-
|
|
240
|
-
}
|
|
241
|
-
}
|
|
242
|
-
if(this.selectdata.defname === '施工信息'){
|
|
243
|
-
// 隐藏所有操作
|
|
244
|
-
item.hiddenOperate = true
|
|
245
|
-
}
|
|
246
|
-
}
|
|
247
|
-
}
|
|
248
|
-
|
|
249
|
-
// 初始化 buttons_fields
|
|
250
|
-
for (const item of this.selectdata.buttons) {
|
|
251
|
-
if (item.button_name === '下发' || item.button_name === '转派') {
|
|
252
|
-
let data = {
|
|
253
|
-
source: item.source,
|
|
254
|
-
userid: Vue.user.id
|
|
255
|
-
// userid: '51953'
|
|
256
|
-
}
|
|
257
|
-
if (item.sourceMethod) {
|
|
258
|
-
data.source = this[item.sourceMethod]()
|
|
259
|
-
}
|
|
260
|
-
if (!data.source) {
|
|
261
|
-
this.$showMessage("请配置获取人员表达式")
|
|
262
|
-
return
|
|
263
|
-
}
|
|
264
|
-
let res = await this.$resetpost(
|
|
265
|
-
`${this.$androidUtil.getProxyUrl()}/rs/search`,
|
|
266
|
-
// `rs/search`,
|
|
267
|
-
{data: data},
|
|
268
|
-
{resolveMsg: null, rejectMsg: '下发人员查询失败!!!'}
|
|
269
|
-
)
|
|
270
|
-
|
|
271
|
-
let options = res.data.map(source => {
|
|
272
|
-
return {
|
|
273
|
-
"label": source.name,
|
|
274
|
-
"value": source.id
|
|
275
|
-
}
|
|
276
|
-
})
|
|
277
|
-
|
|
278
|
-
if (item.button_fields.length !== 1) {
|
|
279
|
-
this.$showMessage("下发有且只能有一个字段!!!")
|
|
280
|
-
return
|
|
281
|
-
}
|
|
282
|
-
|
|
283
|
-
item.button_fields[0].options = options
|
|
284
|
-
}
|
|
285
|
-
if (item.button_fields) {
|
|
286
|
-
item.button_fields.forEach(x => {
|
|
287
|
-
// 如果配置类型为select,优先从参数列表获取options
|
|
288
|
-
if (x.type === 'select') {
|
|
289
|
-
|
|
290
|
-
if (x.param) {
|
|
291
|
-
let temp = this.$appdata.getParam(x.label)
|
|
292
|
-
|
|
293
|
-
if (temp && temp.length > 0) {
|
|
294
|
-
x.options = temp
|
|
295
|
-
}
|
|
296
|
-
|
|
297
|
-
if (x.paramLabel) {
|
|
298
|
-
temp = this.$appdata.getParam(x.paramLabel)
|
|
299
|
-
if (temp && temp.length > 0) {
|
|
300
|
-
x.options = temp
|
|
301
|
-
}
|
|
302
|
-
}
|
|
303
|
-
}
|
|
304
|
-
|
|
305
|
-
}
|
|
306
|
-
})
|
|
307
|
-
}
|
|
308
|
-
}
|
|
309
|
-
if(this.selectdata.defname === '施工信息'||this.title=== '已办信息'){
|
|
310
|
-
this.selectdata.buttons = null
|
|
311
|
-
}
|
|
312
|
-
if (this.selectdata.f_apply_nature === '散户' && this.selectdata.defname === '现场勘察') {
|
|
313
|
-
for (const item of this.selectdata.fields) {
|
|
314
|
-
if (item.label.includes('安装户数')) {
|
|
315
|
-
item.readonly = true
|
|
316
|
-
}
|
|
317
|
-
}
|
|
318
|
-
}
|
|
319
|
-
// 消除双向绑定,避免子组件(显示层)数据更改,父组件(控制层)也更改
|
|
320
|
-
let temp = JSON.parse(JSON.stringify(this.selectdata))
|
|
321
|
-
|
|
322
|
-
this.show_data = temp
|
|
323
|
-
this.$nextTick(() => {
|
|
324
|
-
this.showview = true
|
|
325
|
-
})
|
|
326
|
-
},
|
|
327
|
-
// 金额转大写
|
|
328
|
-
smalltoBIG(n) {
|
|
329
|
-
let fraction = ['角', '分'];
|
|
330
|
-
let digit = ['零', '壹', '贰', '叁', '肆', '伍', '陆', '柒', '捌', '玖'];
|
|
331
|
-
let unit = [['元', '万', '亿'], ['', '拾', '佰', '仟']];
|
|
332
|
-
let head = n < 0 ? '欠' : '';
|
|
333
|
-
n = Math.abs(n);
|
|
334
|
-
|
|
335
|
-
let s = '';
|
|
336
|
-
|
|
337
|
-
for (var i = 0; i < fraction.length; i++) {
|
|
338
|
-
s += (digit[Math.floor(n * 10 * Math.pow(10, i)) % 10] + fraction[i]).replace(/零./, '');
|
|
339
|
-
}
|
|
340
|
-
s = s || '整';
|
|
341
|
-
n = Math.floor(n);
|
|
342
|
-
|
|
343
|
-
for (var i = 0; i < unit[0].length && n > 0; i++) {
|
|
344
|
-
let p = '';
|
|
345
|
-
for (var j = 0; j < unit[1].length && n > 0; j++) {
|
|
346
|
-
p = digit[n % 10] + unit[1][j] + p;
|
|
347
|
-
n = Math.floor(n / 10);
|
|
348
|
-
}
|
|
349
|
-
s = p.replace(/(零.)*零$/, '').replace(/^$/, '零') + unit[0][i] + s;
|
|
350
|
-
}
|
|
351
|
-
return head + s.replace(/(零.)*零元/, '元').replace(/(零.)+/g, '零').replace(/^整$/, '零元整')
|
|
352
|
-
},
|
|
353
|
-
getLableValue(label) {
|
|
354
|
-
for (const item of this.show_data.fields) {
|
|
355
|
-
if (item.label === label && item.type !== 'number') {
|
|
356
|
-
return item.value || ''
|
|
357
|
-
}
|
|
358
|
-
if (item.label === label && item.type === 'number') {
|
|
359
|
-
return item.value || 0
|
|
360
|
-
}
|
|
361
|
-
}
|
|
362
|
-
},
|
|
363
|
-
getLableOptions(label) {
|
|
364
|
-
for (const item of this.show_data.fields) {
|
|
365
|
-
if (item.label === label) {
|
|
366
|
-
return item.options
|
|
367
|
-
}
|
|
368
|
-
}
|
|
369
|
-
},
|
|
370
|
-
setLabelValue(label, value) {
|
|
371
|
-
for (const item of this.show_data.fields) {
|
|
372
|
-
if (item.label === label) {
|
|
373
|
-
item.value = value
|
|
374
|
-
this.show_data[item.field] = value
|
|
375
|
-
}
|
|
376
|
-
}
|
|
377
|
-
},
|
|
378
|
-
setLabelOptions(label, options) {
|
|
379
|
-
for (const item of this.show_data.fields) {
|
|
380
|
-
if (item.label === label) {
|
|
381
|
-
item.options = options
|
|
382
|
-
}
|
|
383
|
-
}
|
|
384
|
-
},
|
|
385
|
-
showLabels(...labels) {
|
|
386
|
-
for (const item of this.show_data.fields) {
|
|
387
|
-
if (labels.includes(item.label)) {
|
|
388
|
-
item.hidden = false
|
|
389
|
-
}
|
|
390
|
-
}
|
|
391
|
-
},
|
|
392
|
-
hideLabels(...labels) {
|
|
393
|
-
for (const item of this.show_data.fields) {
|
|
394
|
-
if (labels.includes(item.label)) {
|
|
395
|
-
item.hidden = true
|
|
396
|
-
}
|
|
397
|
-
}
|
|
398
|
-
},
|
|
399
|
-
showButtons(...buttons) {
|
|
400
|
-
for (const item of this.show_data.buttons) {
|
|
401
|
-
if (buttons.includes(item.button_name)) {
|
|
402
|
-
item.hidden = false
|
|
403
|
-
}
|
|
404
|
-
}
|
|
405
|
-
},
|
|
406
|
-
hideButtons(...buttons) {
|
|
407
|
-
for (const item of this.show_data.buttons) {
|
|
408
|
-
if (buttons.includes(item.button_name)) {
|
|
409
|
-
item.hidden = true
|
|
410
|
-
}
|
|
411
|
-
}
|
|
412
|
-
},
|
|
413
|
-
requiredLabels(...labels) {
|
|
414
|
-
for (const item of this.show_data.fields) {
|
|
415
|
-
if (labels.includes(item.label)) {
|
|
416
|
-
item.required = true
|
|
417
|
-
}
|
|
418
|
-
}
|
|
419
|
-
},
|
|
420
|
-
electiveLabels(...labels) {
|
|
421
|
-
for (const item of this.show_data.fields) {
|
|
422
|
-
if (labels.includes(item.label)) {
|
|
423
|
-
item.required = false
|
|
424
|
-
}
|
|
425
|
-
}
|
|
426
|
-
},
|
|
427
|
-
readonlyLabels(...labels) {
|
|
428
|
-
for (const item of this.show_data.fields) {
|
|
429
|
-
if (labels.includes(item.label)) {
|
|
430
|
-
item.readonly = true
|
|
431
|
-
item.disabled = true
|
|
432
|
-
}
|
|
433
|
-
}
|
|
434
|
-
},
|
|
435
|
-
readwriteLabels(...labels) {
|
|
436
|
-
for (const item of this.show_data.fields) {
|
|
437
|
-
if (labels.includes(item.label)) {
|
|
438
|
-
item.readonly = false
|
|
439
|
-
item.disabled = false
|
|
440
|
-
}
|
|
441
|
-
}
|
|
442
|
-
},
|
|
443
|
-
disabledButtons(...buttons) {
|
|
444
|
-
for (const item of this.show_data.buttons) {
|
|
445
|
-
if (buttons.includes(item.button_name)) {
|
|
446
|
-
item.disabled = true
|
|
447
|
-
}
|
|
448
|
-
}
|
|
449
|
-
},
|
|
450
|
-
enableButtons(...buttons) {
|
|
451
|
-
for (const item of this.show_data.buttons) {
|
|
452
|
-
if (buttons.includes(item.button_name)) {
|
|
453
|
-
item.disabled = false
|
|
454
|
-
}
|
|
455
|
-
}
|
|
456
|
-
},
|
|
457
|
-
showComponents(...titles) {
|
|
458
|
-
for (const item of this.show_data.components) {
|
|
459
|
-
if (titles.includes(item.title) && item.device === 'app') {
|
|
460
|
-
item.hidden = false
|
|
461
|
-
}
|
|
462
|
-
}
|
|
463
|
-
},
|
|
464
|
-
hideComponents(...titles) {
|
|
465
|
-
for (const item of this.show_data.components) {
|
|
466
|
-
if (titles.includes(item.title) && item.device === 'app') {
|
|
467
|
-
item.hidden = true
|
|
468
|
-
}
|
|
469
|
-
}
|
|
470
|
-
},
|
|
471
|
-
async checkDuplicate(index) {
|
|
472
|
-
let http = new HttpResetClass()
|
|
473
|
-
let data = {
|
|
474
|
-
tablename: 't_apply',
|
|
475
|
-
condition: `${this.show_data.fields[index].field} = '${this.show_data.fields[index].value}'`
|
|
476
|
-
}
|
|
477
|
-
let res = await http.load('POST', `${this.$androidUtil.getProxyUrl()}/rs/sql/applySingleTable`, {data: data}, {
|
|
478
|
-
resolveMsg: null,
|
|
479
|
-
rejectMsg: `${this.show_data.fields[index].label}查询失败`
|
|
480
|
-
})
|
|
481
|
-
if (res.data.length > 0) {
|
|
482
|
-
this.show_data.fields[index].value = null
|
|
483
|
-
this.$showAlert(`${this.show_data.fields[index].label}已存在!!!`, 'warning', 3000)
|
|
484
|
-
}
|
|
485
|
-
},
|
|
486
|
-
async breakControl() {
|
|
487
|
-
if (this.show_data.id) {
|
|
488
|
-
let data = {
|
|
489
|
-
condition: `u.id = ${this.show_data.id}`,
|
|
490
|
-
data: {
|
|
491
|
-
userid: Vue.user.id,
|
|
492
|
-
f_filiale: Vue.user.f_fengongsi?Vue.user.f_fengongsi:'榆林.榆川天然气'
|
|
493
|
-
}
|
|
494
|
-
}
|
|
495
|
-
let url =`${this.$androidUtil.getProxyUrl()}/rs/sql/checkuser`
|
|
496
|
-
if (this.show_data.f_apply_type === '管线建设'){
|
|
497
|
-
url =`${this.$androidUtil.getProxyUrl()}/rs/sql/getGuanXianApply`
|
|
498
|
-
}
|
|
499
|
-
let res = await this.$resetpost(
|
|
500
|
-
url,
|
|
501
|
-
{data: data},
|
|
502
|
-
{resolveMsg: null, rejectMsg: '数据更新失败,请手查询更新!!!'}
|
|
503
|
-
)
|
|
504
|
-
|
|
505
|
-
this.selectdata = res.data[0]
|
|
506
|
-
this.selectdata.f_building=this.show_data.f_building
|
|
507
|
-
this.selectdata.f_unit=this.show_data.f_unit
|
|
508
|
-
this.selectdata.f_room=this.show_data.f_room
|
|
509
|
-
this.selectdata.pageIndex=this.show_data.pageIndex
|
|
510
|
-
} else {
|
|
511
|
-
this.selectdata = servicedata
|
|
512
|
-
}
|
|
513
|
-
|
|
514
|
-
this.refurbish()
|
|
515
|
-
},
|
|
516
|
-
// ------------------------------
|
|
517
|
-
async getConstructionWorker() {
|
|
518
|
-
let data = {
|
|
519
|
-
source: 'this.getParentByType($organization$).getChildByName($建设单位$).getChildren()',
|
|
520
|
-
userid: Vue.user.id
|
|
521
|
-
}
|
|
522
|
-
|
|
523
|
-
let res = await this.$resetpost(
|
|
524
|
-
`${this.$androidUtil.getProxyUrl()}/rs/search`,
|
|
525
|
-
{data: data},
|
|
526
|
-
{resolveMsg: null, rejectMsg: '现场负责人查询失败!!!'}
|
|
527
|
-
)
|
|
528
|
-
|
|
529
|
-
return res.data.map(item => {
|
|
530
|
-
return {
|
|
531
|
-
label: item.name,
|
|
532
|
-
value: item.id
|
|
533
|
-
}
|
|
534
|
-
})
|
|
535
|
-
},
|
|
536
|
-
//获取下发人
|
|
537
|
-
getSource () {
|
|
538
|
-
return 'this.getParentByType($organization$).getChildByName($'+ Vue.user.
|
|
539
|
-
},
|
|
540
|
-
async getUserName() {
|
|
541
|
-
let data = {
|
|
542
|
-
tablename: 't_user',
|
|
543
|
-
condition: `id='${this.selectdata.f_construction_unit_id}'`
|
|
544
|
-
}
|
|
545
|
-
let res = await this.$resetpost(
|
|
546
|
-
'${this.$androidUtil.getProxyUrl()}/rs/sql/applySingleTable',
|
|
547
|
-
{data: data},
|
|
548
|
-
{resolveMsg: null, rejectMsg: null}
|
|
549
|
-
)
|
|
550
|
-
return res.data.map(item => {
|
|
551
|
-
return {
|
|
552
|
-
label: item.name,
|
|
553
|
-
value: item.id
|
|
554
|
-
}
|
|
555
|
-
})
|
|
556
|
-
},
|
|
557
|
-
// 安装单位签字人
|
|
558
|
-
async getConstructionUnitId () {
|
|
559
|
-
let data = {
|
|
560
|
-
source: '',
|
|
561
|
-
userid: Vue.user.id
|
|
562
|
-
}
|
|
563
|
-
data.source = 'this.getParentByType($organization$).getChildByName($'+ Vue.user.
|
|
564
|
-
let res = await this.$resetpost(
|
|
565
|
-
`${this.$androidUtil.getProxyUrl()}/rs/search`,
|
|
566
|
-
{data: data},
|
|
567
|
-
{resolveMsg: null, rejectMsg: '安装单位施工班组查询失败!!!'}
|
|
568
|
-
)
|
|
569
|
-
|
|
570
|
-
return res.data.map(item => {
|
|
571
|
-
return {
|
|
572
|
-
label: item.name,
|
|
573
|
-
value: item.id
|
|
574
|
-
}
|
|
575
|
-
})
|
|
576
|
-
},
|
|
577
|
-
// 安装单位负责人
|
|
578
|
-
async getConstructionUnit() {
|
|
579
|
-
let data = {
|
|
580
|
-
source: 'this.getParentByType($organization$).getChildByName($工程施工队$).getChildren()',
|
|
581
|
-
userid: Vue.user.id
|
|
582
|
-
}
|
|
583
|
-
|
|
584
|
-
let res = await this.$resetpost(
|
|
585
|
-
`${this.$androidUtil.getProxyUrl()}/rs/search`,
|
|
586
|
-
{data: data},
|
|
587
|
-
{resolveMsg: null, rejectMsg: '安装单位人员查询失败!!!'}
|
|
588
|
-
)
|
|
589
|
-
|
|
590
|
-
return res.data.map(item => {
|
|
591
|
-
return {
|
|
592
|
-
label: item.name,
|
|
593
|
-
value: item.id
|
|
594
|
-
}
|
|
595
|
-
})
|
|
596
|
-
},
|
|
597
|
-
// 建设单位
|
|
598
|
-
async getConstructOperator() {
|
|
599
|
-
let data = {
|
|
600
|
-
source: 'this.getParentByType($organization$).getChildByName($建设单位$).getChildren()',
|
|
601
|
-
userid: Vue.user.id
|
|
602
|
-
}
|
|
603
|
-
|
|
604
|
-
let res = await this.$resetpost(
|
|
605
|
-
`${this.$androidUtil.getProxyUrl()}/rs/search`,
|
|
606
|
-
{data: data},
|
|
607
|
-
{resolveMsg: null, rejectMsg: '建设单位人员查询失败!!!'}
|
|
608
|
-
)
|
|
609
|
-
|
|
610
|
-
return res.data.map(item => {
|
|
611
|
-
return {
|
|
612
|
-
label: item.name,
|
|
613
|
-
value: item.id
|
|
614
|
-
}
|
|
615
|
-
})
|
|
616
|
-
},
|
|
617
|
-
// 监理单位
|
|
618
|
-
async getSupervisorOperator() {
|
|
619
|
-
let data = {
|
|
620
|
-
source: 'this.getParentByType($organization$).getChildByName($监理单位$).getChildren()',
|
|
621
|
-
userid: Vue.user.id
|
|
622
|
-
}
|
|
623
|
-
|
|
624
|
-
let res = await this.$resetpost(
|
|
625
|
-
`${this.$androidUtil.getProxyUrl()}/rs/search`,
|
|
626
|
-
{data: data},
|
|
627
|
-
{resolveMsg: null, rejectMsg: '监理单位人员查询失败!!!'}
|
|
628
|
-
)
|
|
629
|
-
for (const item of this.selectdata.fields) {
|
|
630
|
-
if (item.label === '监理单位') {
|
|
631
|
-
item.value = res.data[0].id
|
|
632
|
-
this.selectdata[item.field] = res.data[0].id
|
|
633
|
-
}
|
|
634
|
-
}
|
|
635
|
-
return res.data.map(item => {
|
|
636
|
-
return {
|
|
637
|
-
label: item.name,
|
|
638
|
-
value: item.id
|
|
639
|
-
}
|
|
640
|
-
})
|
|
641
|
-
},
|
|
642
|
-
// 监理现场负责人
|
|
643
|
-
async getSupervisorOperatorId () {
|
|
644
|
-
let data = {
|
|
645
|
-
source: 'this.getParentByType($organization$).getChildByName($监理班组$).getChildren()',
|
|
646
|
-
userid: Vue.user.id
|
|
647
|
-
}
|
|
648
|
-
let res = await this.$resetpost(
|
|
649
|
-
`${this.$androidUtil.getProxyUrl()}/rs/search`,
|
|
650
|
-
{data: data},
|
|
651
|
-
{resolveMsg: null, rejectMsg: '监理单位人员查询失败!!!'}
|
|
652
|
-
)
|
|
653
|
-
return res.data.map(item => {
|
|
654
|
-
return {
|
|
655
|
-
label: item.name,
|
|
656
|
-
value: item.id
|
|
657
|
-
}
|
|
658
|
-
})
|
|
659
|
-
},
|
|
660
|
-
// 土建单位
|
|
661
|
-
async getEngineeringOperator() {
|
|
662
|
-
let data = {
|
|
663
|
-
source: 'this.getParentByType($organization$).getChildByName($土建单位$).getChildren()',
|
|
664
|
-
userid: Vue.user.id
|
|
665
|
-
}
|
|
666
|
-
|
|
667
|
-
let res = await this.$resetpost(
|
|
668
|
-
`${this.$androidUtil.getProxyUrl()}/rs/search`,
|
|
669
|
-
{data: data},
|
|
670
|
-
{resolveMsg: null, rejectMsg: '土建单位人员查询失败!!!'}
|
|
671
|
-
)
|
|
672
|
-
|
|
673
|
-
let result = res.data.map(item => {
|
|
674
|
-
return {
|
|
675
|
-
label: item.name,
|
|
676
|
-
value: item.id
|
|
677
|
-
}
|
|
678
|
-
})
|
|
679
|
-
result.push({label: '用户自理', value: '用户自理'})
|
|
680
|
-
result.push({label:'无',value:'无'})
|
|
681
|
-
return result
|
|
682
|
-
},
|
|
683
|
-
// 检测单位
|
|
684
|
-
async getCheckOperator() {
|
|
685
|
-
let data = {
|
|
686
|
-
source: 'this.getParentByType($organization$).getChildByName($检测单位$).getChildren()',
|
|
687
|
-
userid: Vue.user.id
|
|
688
|
-
}
|
|
689
|
-
|
|
690
|
-
let res = await this.$resetpost(
|
|
691
|
-
`${this.$androidUtil.getProxyUrl()}/rs/search`,
|
|
692
|
-
{data: data},
|
|
693
|
-
{resolveMsg: null, rejectMsg: '检测单位人员查询失败!!!'}
|
|
694
|
-
)
|
|
695
|
-
|
|
696
|
-
let result = res.data.map(item => {
|
|
697
|
-
return {
|
|
698
|
-
label: item.name,
|
|
699
|
-
value: item.id
|
|
700
|
-
}
|
|
701
|
-
})
|
|
702
|
-
result.push({label:'无',value:'无'})
|
|
703
|
-
return result
|
|
704
|
-
},
|
|
705
|
-
// 获取气表品牌
|
|
706
|
-
async getMeterBrand() {
|
|
707
|
-
let data = {}
|
|
708
|
-
|
|
709
|
-
let http = new HttpResetClass()
|
|
710
|
-
let res = await http.load(
|
|
711
|
-
'POST',
|
|
712
|
-
`${this.$androidUtil.getProxyUrl()}/rs/sql/getMeterBrand`,
|
|
713
|
-
{data: data},
|
|
714
|
-
{resolveMsg: null, rejectMsg: '气表品牌查询失败!!!'}
|
|
715
|
-
)
|
|
716
|
-
|
|
717
|
-
return res.data
|
|
718
|
-
},
|
|
719
|
-
// 获取小区
|
|
720
|
-
async getResidentialArea() {
|
|
721
|
-
let data = {
|
|
722
|
-
tablename: 't_area_address',
|
|
723
|
-
condition: `f_filiale = '${Vue.user.f_fengongsi?Vue.user.f_fengongsi:'榆林.榆川天然气'}' and f_area_status = '启用'`
|
|
724
|
-
}
|
|
725
|
-
let http = new HttpResetClass()
|
|
726
|
-
let res = await http.load(
|
|
727
|
-
'POST',
|
|
728
|
-
`${this.$androidUtil.getProxyUrl()}/rs/sql/applySingleTable`,
|
|
729
|
-
{data: data},
|
|
730
|
-
{resolveMsg: null, rejectMsg: '小区查询失败!!!'}
|
|
731
|
-
)
|
|
732
|
-
return res.data.map(item => {
|
|
733
|
-
return {
|
|
734
|
-
label: item.f_residential_area,
|
|
735
|
-
value: item.id
|
|
736
|
-
}
|
|
737
|
-
})
|
|
738
|
-
},
|
|
739
|
-
//现场勘察
|
|
740
|
-
async prospectingBefore() {
|
|
741
|
-
let data = {
|
|
742
|
-
tablename: 't_files',
|
|
743
|
-
condition: `f_blobid = '${this.selectdata.f_process_id}' and defname = '现场勘察' and fremarks = '报装手机签字文件'`
|
|
744
|
-
}
|
|
745
|
-
let http = new HttpResetClass()
|
|
746
|
-
let res = await http.load(
|
|
747
|
-
'POST',
|
|
748
|
-
`${this.$androidUtil.getProxyUrl()}/rs/sql/applySingleTable`,
|
|
749
|
-
{data: data},
|
|
750
|
-
{resolveMsg: null, rejectMsg: null}
|
|
751
|
-
)
|
|
752
|
-
if (res.data.length <= 0) {
|
|
753
|
-
this.$showAlert('现场勘察未签字,无法提交!!!', 'warning', 3000)
|
|
754
|
-
throw '现场勘察未签字,无法提交!'
|
|
755
|
-
}
|
|
756
|
-
},
|
|
757
|
-
// 施工前置
|
|
758
|
-
async constructionBefore() {
|
|
759
|
-
await this.userSignBefore()
|
|
760
|
-
if (this.show_data.f_apply_nature !== '分户挂表') {
|
|
761
|
-
let http = new HttpResetClass()
|
|
762
|
-
let data = {
|
|
763
|
-
condition: `ui.f_process_id = '${this.show_data.f_process_id}' and f_meternumber is null and f_gasbrand_id is not null `
|
|
764
|
-
}
|
|
765
|
-
let res = await http.load(
|
|
766
|
-
'POST',
|
|
767
|
-
`${this.$androidUtil.getProxyUrl()}/rs/sql/countApplyUserinfo`,
|
|
768
|
-
{data: data},
|
|
769
|
-
{
|
|
770
|
-
resolveMsg: null,
|
|
771
|
-
rejectMsg: '安装明细查询失败!!!'
|
|
772
|
-
})
|
|
773
|
-
if (res.data[0].num > 0) {
|
|
774
|
-
this.$showAlert(`还有${res.data[0].num}户未表号未录入,无法提交`, 'warning', 3000)
|
|
775
|
-
throw `还有${res.data[0].num}户未表号未录入,无法提交`
|
|
776
|
-
}
|
|
777
|
-
}
|
|
778
|
-
},
|
|
779
|
-
async userSignBefore() {
|
|
780
|
-
let http = new HttpResetClass()
|
|
781
|
-
let data = {
|
|
782
|
-
tablename: 't_files',
|
|
783
|
-
condition: `f_blobid = '${this.selectdata.f_process_id}' and defname = '${this.selectdata.defname}' and fremarks = '报装手机签字文件'`
|
|
784
|
-
}
|
|
785
|
-
let res = await http.load(
|
|
786
|
-
'POST',
|
|
787
|
-
`${this.$androidUtil.getProxyUrl()}/rs/sql/applySingleTable`,
|
|
788
|
-
{data: data},
|
|
789
|
-
{resolveMsg: null, rejectMsg: null}
|
|
790
|
-
)
|
|
791
|
-
if (res.data.length <= 0) {
|
|
792
|
-
this.$showAlert('用户未签字,无法生成签字流程!!!', 'warning', 3000)
|
|
793
|
-
throw '用户未签字,无法生成签字流程!'
|
|
794
|
-
}
|
|
795
|
-
},
|
|
796
|
-
signBefore() {
|
|
797
|
-
if (this.show_data.defname === '检测单位签字') {
|
|
798
|
-
if (isEmpty(this.show_data.f_check_sign)) {
|
|
799
|
-
this.$showAlert(`签字后才可提交!!!`, 'warning', 3000)
|
|
800
|
-
throw `签字后才可提交!!!`
|
|
801
|
-
}
|
|
802
|
-
this.show_data.f_check_operator = Vue.user.name
|
|
803
|
-
this.show_data.f_check_date = new Date().Format('yyyy-MM-dd HH:mm:ss')
|
|
804
|
-
this.show_data.employeetemplate = this.show_data.f_build_operator_id
|
|
805
|
-
}
|
|
806
|
-
if (this.show_data.defname === '安装单位签字') {
|
|
807
|
-
if (isEmpty(this.show_data.f_build_sign)) {
|
|
808
|
-
this.$showAlert(`签字后才可提交!!!`, 'warning', 3000)
|
|
809
|
-
throw `签字后才可提交!!!`
|
|
810
|
-
}
|
|
811
|
-
this.show_data.f_build_operator = Vue.user.name
|
|
812
|
-
this.show_data.f_build_date = new Date().Format('yyyy-MM-dd HH:mm:ss')
|
|
813
|
-
this.show_data.employeetemplate = this.show_data.f_engineering_operator_id
|
|
814
|
-
if (this.show_data.f_engineering_operator_id === '用户自理' || this.show_data.f_engineering_operator_id === '无') {
|
|
815
|
-
this.show_data.f_engineering_operator = this.show_data.f_engineering_operator_id
|
|
816
|
-
this.show_data.f_engineering_date = new Date().Format('yyyy-MM-dd HH:mm:ss')
|
|
817
|
-
this.show_data.employeetemplate = this.show_data.f_supervisor_operator_id
|
|
818
|
-
}
|
|
819
|
-
}
|
|
820
|
-
if (this.show_data.defname === '土建单位签字') {
|
|
821
|
-
if (isEmpty(this.show_data.f_engineering_sign)) {
|
|
822
|
-
this.$showAlert(`签字后才可提交!!!`, 'warning', 3000)
|
|
823
|
-
throw `签字后才可提交!!!`
|
|
824
|
-
}
|
|
825
|
-
this.show_data.f_engineering_operator = Vue.user.name
|
|
826
|
-
this.show_data.f_engineering_date = new Date().Format('yyyy-MM-dd HH:mm:ss')
|
|
827
|
-
this.show_data.employeetemplate = this.show_data.f_supervisor_operator_id
|
|
828
|
-
}
|
|
829
|
-
if (this.show_data.defname === '监理单位签字') {
|
|
830
|
-
if (isEmpty(this.show_data.f_supervisor_sign)) {
|
|
831
|
-
this.$showAlert(`签字后才可提交!!!`, 'warning', 3000)
|
|
832
|
-
throw `签字后才可提交!!!`
|
|
833
|
-
}
|
|
834
|
-
this.show_data.f_supervisor_operator = Vue.user.name
|
|
835
|
-
this.show_data.f_supervisor_date = new Date().Format('yyyy-MM-dd HH:mm:ss')
|
|
836
|
-
this.show_data.employeetemplate = this.show_data.f_construct_operator_id
|
|
837
|
-
}
|
|
838
|
-
if (this.show_data.defname === '建设单位签字') {
|
|
839
|
-
if (isEmpty(this.show_data.f_construct_sign)) {
|
|
840
|
-
this.$showAlert(`签字后才可提交!!!`, 'warning', 3000)
|
|
841
|
-
throw `签字后才可提交!!!`
|
|
842
|
-
}
|
|
843
|
-
this.show_data.f_construct_operator = Vue.user.name
|
|
844
|
-
this.show_data.f_construct_date = new Date().Format('yyyy-MM-dd HH:mm:ss')
|
|
845
|
-
}
|
|
846
|
-
},
|
|
847
|
-
//分户挂表生成安检单
|
|
848
|
-
async getChecklist() {
|
|
849
|
-
let http = new HttpResetClass()
|
|
850
|
-
let data = {
|
|
851
|
-
f_process_id: this.selectdata.f_process_id,
|
|
852
|
-
f_userinfo_id: this.selectdata.f_userinfo_id,
|
|
853
|
-
user: Vue.user
|
|
854
|
-
}
|
|
855
|
-
let res = await http.load(
|
|
856
|
-
'POST',
|
|
857
|
-
`${this.$androidUtil.getProxyUrl()}/rs/logic/getChecklist`,
|
|
858
|
-
{data: data},
|
|
859
|
-
{resolveMsg: null, rejectMsg: null}
|
|
860
|
-
)
|
|
861
|
-
},
|
|
862
|
-
//工商户验证表具类型是否需选择
|
|
863
|
-
async meterBrandCheck() {
|
|
864
|
-
let data = {
|
|
865
|
-
f_process_id: this.selectdata.f_process_id,
|
|
866
|
-
orgid:Vue.user.orgid
|
|
867
|
-
}
|
|
868
|
-
let http = new HttpResetClass()
|
|
869
|
-
let res = await http.load(
|
|
870
|
-
'POST',
|
|
871
|
-
`${this.$androidUtil.getProxyUrl()}/rs/sql/meterCheck`,
|
|
872
|
-
{data: data},
|
|
873
|
-
{resolveMsg: null, rejectMsg: null}
|
|
874
|
-
)
|
|
875
|
-
if (res.data[0].num > 0){
|
|
876
|
-
this.$showAlert(`还有${res.data[0].num}处未选择表具,请选择后提交!`, 'warning', 3000)
|
|
877
|
-
throw null
|
|
878
|
-
}
|
|
879
|
-
},
|
|
880
|
-
// 安装户数
|
|
881
|
-
async installCountCheck() {
|
|
882
|
-
let data = {
|
|
883
|
-
tablename: 't_userinfo',
|
|
884
|
-
condition: `f_process_id = '${this.show_data.f_process_id}' and f_user_state != '销户'`,
|
|
885
|
-
}
|
|
886
|
-
|
|
887
|
-
let http = new HttpResetClass()
|
|
888
|
-
let res = await http.load(
|
|
889
|
-
'POST',
|
|
890
|
-
`${this.$androidUtil.getProxyUrl()}/rs/sql/applySingleTable`,
|
|
891
|
-
{data: data},
|
|
892
|
-
{resolveMsg: null, rejectMsg: '用户数量查询失败'}
|
|
893
|
-
)
|
|
894
|
-
this.setLabelValue('安装户数',res.data.length)
|
|
895
|
-
},
|
|
896
|
-
async stopApply () {
|
|
897
|
-
console.log('终止报建!!!!!')
|
|
898
|
-
|
|
899
|
-
if (this.show_data.defname === '报建受理') {
|
|
900
|
-
this.show_data.f_stop_reason = this.show_data.f_accept_result
|
|
901
|
-
}
|
|
902
|
-
if (this.show_data.defname === '现场勘察') {
|
|
903
|
-
this.show_data.f_stop_reason = this.show_data.f_prospecting_result
|
|
904
|
-
}
|
|
905
|
-
|
|
906
|
-
let data = {
|
|
907
|
-
apply: this.show_data,
|
|
908
|
-
user: Vue.user
|
|
909
|
-
}
|
|
910
|
-
|
|
911
|
-
let res = await this.$resetpost(
|
|
912
|
-
`${this.$androidUtil.getProxyUrl()}/rs/logic/stopApply`,
|
|
913
|
-
{data: data},
|
|
914
|
-
{resolveMsg: null, rejectMsg: '终止报建失败!!!'}
|
|
915
|
-
)
|
|
916
|
-
|
|
917
|
-
this.$dispatch('confirm')
|
|
918
|
-
|
|
919
|
-
throw '终止报建!!!'
|
|
920
|
-
},
|
|
921
|
-
// 户内出单日期
|
|
922
|
-
getOutdoorsTime () {
|
|
923
|
-
for (const item of this.selectdata.fields) {
|
|
924
|
-
console.log('是否进入')
|
|
925
|
-
if (item.label === '户内出单日期') {
|
|
926
|
-
item.value = this.selectdata.f_release_date
|
|
927
|
-
this.selectdata[item.field] = item.value
|
|
928
|
-
console.log('当前出单时间',item.value)
|
|
929
|
-
}else if(item.label === '庭院出单日期'){
|
|
930
|
-
item.value = this.selectdata.f_release_date
|
|
931
|
-
this.selectdata[item.field] = item.value
|
|
932
|
-
}
|
|
933
|
-
}
|
|
934
|
-
},
|
|
935
|
-
getGaiXianType () {
|
|
936
|
-
return [{label: "隐患整改", value: "隐患整改"},
|
|
937
|
-
{label: "改造工程", value: "改造工程"},
|
|
938
|
-
{label: "改线工程", value: "改线工程"},
|
|
939
|
-
{label: "老旧小区", value: "老旧小区"}]
|
|
940
|
-
},
|
|
941
|
-
//获取缴费日期
|
|
942
|
-
async getChargeDate() {
|
|
943
|
-
let data = {
|
|
944
|
-
tablename: 'activityins',
|
|
945
|
-
condition: `processid = '${this.selectdata.f_process_id}' and defname = '报装缴费'`,
|
|
946
|
-
}
|
|
947
|
-
|
|
948
|
-
let http = new HttpResetClass()
|
|
949
|
-
let res = await http.load(
|
|
950
|
-
'POST',
|
|
951
|
-
`${this.$androidUtil.getProxyUrl()}/rs/sql/applySingleTable`,
|
|
952
|
-
{data: data},
|
|
953
|
-
{resolveMsg: null, rejectMsg: null}
|
|
954
|
-
)
|
|
955
|
-
for (const item of this.selectdata.fields) {
|
|
956
|
-
if (item.label === '缴费日期') {
|
|
957
|
-
item.value = res.data[0].finishtime
|
|
958
|
-
this.selectdata[item.field] = item.value
|
|
959
|
-
}
|
|
960
|
-
}
|
|
961
|
-
},
|
|
962
|
-
async getSingAct() {
|
|
963
|
-
let data = {
|
|
964
|
-
f_process_id: this.selectdata.f_process_id
|
|
965
|
-
}
|
|
966
|
-
let http = new HttpResetClass()
|
|
967
|
-
let res = await http.load(
|
|
968
|
-
'POST',
|
|
969
|
-
`${this.$androidUtil.getProxyUrl()}/rs/sql/getSingAct`,
|
|
970
|
-
{data: data},
|
|
971
|
-
{resolveMsg: null, rejectMsg: '签字状态查询失败!!!'}
|
|
972
|
-
)
|
|
973
|
-
if (res.data.length > 0) {
|
|
974
|
-
for (const item of this.selectdata.fields) {
|
|
975
|
-
if (item.label === '签字所在环节') {
|
|
976
|
-
item.value = res.data[0].defname
|
|
977
|
-
this.selectdata[item.field] = item.value
|
|
978
|
-
}
|
|
979
|
-
}
|
|
980
|
-
}
|
|
981
|
-
},
|
|
982
|
-
getYiFang() {
|
|
983
|
-
return [{label: '榆林榆川天然气', value: '榆林榆川天然气'},
|
|
984
|
-
{label: this.selectdata.f_user_name, value: this.selectdata.f_user_name},
|
|
985
|
-
{label: '无', value: '无'}]
|
|
986
|
-
},
|
|
987
|
-
async repair() {
|
|
988
|
-
let data = {
|
|
989
|
-
f_process_id: this.show_data.f_process_id
|
|
990
|
-
}
|
|
991
|
-
let http = new HttpResetClass()
|
|
992
|
-
let res = await http.load(
|
|
993
|
-
'POST',
|
|
994
|
-
`${this.$androidUtil.getProxyUrl()}/rs/logic/updateRepair`,
|
|
995
|
-
{data: data},
|
|
996
|
-
{resolveMsg: null, rejectMsg: '维修工单状态修改!!!'}
|
|
997
|
-
)
|
|
998
|
-
this.$dispatch('loadPage')
|
|
999
|
-
throw ''
|
|
1000
|
-
},
|
|
1001
|
-
changeDispatch(value){
|
|
1002
|
-
if (value === '维修安检中心'){
|
|
1003
|
-
this.hideLabels('现场项目负责人', '安装单位', '建设单位', '监理单位', '土建单位', '检测单位', '户内出单日期', '户内回单日期'
|
|
1004
|
-
, '户内施工备注', '庭院出单日期', '庭院回单日期', '庭院施工备注', '是否发起签字', '签字是否完成', '签字所在环节')
|
|
1005
|
-
this.hideButtons('签字')
|
|
1006
|
-
this.electiveLabels('现场项目负责人', '安装单位', '建设单位', '监理单位', '土建单位', '检测单位', '户内出单日期', '户内回单日期'
|
|
1007
|
-
, '户内施工备注', '庭院出单日期', '庭院回单日期', '庭院施工备注', '是否发起签字', '签字是否完成', '签字所在环节')
|
|
1008
|
-
}
|
|
1009
|
-
if (value === '施工工队'){
|
|
1010
|
-
this.showLabels('现场项目负责人', '安装单位', '建设单位', '监理单位', '土建单位', '检测单位', '户内出单日期', '户内回单日期'
|
|
1011
|
-
, '户内施工备注', '庭院出单日期', '庭院回单日期', '庭院施工备注', '是否发起签字', '签字是否完成', '签字所在环节')
|
|
1012
|
-
this.requiredLabels('现场项目负责人', '安装单位', '建设单位', '监理单位', '土建单位', '检测单位', '现场项目负责人', '是否发起签字', '签字是否完成', '签字所在环节')
|
|
1013
|
-
}
|
|
1014
|
-
},
|
|
1015
|
-
geIsOpen(){
|
|
1016
|
-
this.isOpen = false
|
|
1017
|
-
}
|
|
1018
|
-
},
|
|
1019
|
-
events: {
|
|
1020
|
-
// 强制开关阀
|
|
1021
|
-
async 'onOffValve'() {
|
|
1022
|
-
let data = {
|
|
1023
|
-
condition: `ui.f_userinfo_id = '${this.show_data.f_userinfo_id}'`
|
|
1024
|
-
}
|
|
1025
|
-
let http = new HttpResetClass()
|
|
1026
|
-
let res = await http.load(
|
|
1027
|
-
'POST',
|
|
1028
|
-
`${this.$androidUtil.getProxyUrl()}/rs/sql/getApplyUserinfo`,
|
|
1029
|
-
{data: data},
|
|
1030
|
-
{resolveMsg: null, rejectMsg: '档案获取失败!!!'}
|
|
1031
|
-
)
|
|
1032
|
-
|
|
1033
|
-
let userinfo = res.data[0]
|
|
1034
|
-
|
|
1035
|
-
data = {
|
|
1036
|
-
condition: `t_userfiles.f_meternumber = '${userinfo.f_meternumber}'`,
|
|
1037
|
-
contentData: {
|
|
1038
|
-
isOpen: this.show_data.button.button_name === '强制开阀' ? 1 : 0
|
|
1039
|
-
},
|
|
1040
|
-
inputtor: Vue.user.name,
|
|
1041
|
-
instructTitle: this.show_data.button.button_name === '强制开阀' ? '开阀' : '关阀',
|
|
1042
|
-
instructType: '阀门控制',
|
|
1043
|
-
meterBrandName: userinfo.f_alias
|
|
1044
|
-
}
|
|
1045
|
-
res = await http.load(
|
|
1046
|
-
'POST',
|
|
1047
|
-
`${this.$androidUtil.getProxyUrl()}/rs/logic/saveInstruct`,
|
|
1048
|
-
{data: data},
|
|
1049
|
-
{resolveMsg: null, rejectMsg: `${this.show_data.button.button_name}失败!!!`}
|
|
1050
|
-
)
|
|
1051
|
-
|
|
1052
|
-
data = {
|
|
1053
|
-
f_user_id: userinfo.f_user_id,
|
|
1054
|
-
f_userinfo_id: userinfo.f_userinfo_id,
|
|
1055
|
-
record: {
|
|
1056
|
-
f_filiale: Vue.user.f_fengongsi?Vue.user.f_fengongsi:'榆林.榆川天然气',
|
|
1057
|
-
f_instruct_meta_data: this.show_data.button.button_name === '退出强制状态' ? '退出强制阀控' : '进入强制阀控',
|
|
1058
|
-
f_instruct_title: this.show_data.button.button_name === '退出强制状态' ? '退出强制阀控' : '进入强制阀控',
|
|
1059
|
-
f_instruct_type: '阀门控制',
|
|
1060
|
-
f_meternumber: userinfo.f_meternumber,
|
|
1061
|
-
f_operator: Vue.user.name,
|
|
1062
|
-
f_outlets: userinfo.f_outlets,
|
|
1063
|
-
f_reason: this.show_data.button.f_reason,
|
|
1064
|
-
f_user_id: userinfo.f_user_id,
|
|
1065
|
-
f_userinfo_id: userinfo.f_userinfo_id
|
|
1066
|
-
},
|
|
1067
|
-
state: this.show_data.button.button_name === '退出强制状态' ? 0 : 1,
|
|
1068
|
-
}
|
|
1069
|
-
|
|
1070
|
-
res = await http.load(
|
|
1071
|
-
'POST',
|
|
1072
|
-
`${this.$androidUtil.getProxyUrl()}/rs/logic/updateNetWorkValve`,
|
|
1073
|
-
{data: data},
|
|
1074
|
-
{resolveMsg: '执行成功!!!', rejectMsg: `执行失败!!!`}
|
|
1075
|
-
)
|
|
1076
|
-
|
|
1077
|
-
},
|
|
1078
|
-
// 修改用户档案
|
|
1079
|
-
async 'updateUserinfoState'() {
|
|
1080
|
-
let data = {
|
|
1081
|
-
f_userinfo_id: this.show_data.f_userinfo_id
|
|
1082
|
-
}
|
|
1083
|
-
let http = new HttpResetClass()
|
|
1084
|
-
let res = await http.load(
|
|
1085
|
-
'POST',
|
|
1086
|
-
`${this.$androidUtil.getProxyUrl()}/rs/logic/updateUserinfoState`,
|
|
1087
|
-
{data: data},
|
|
1088
|
-
{resolveMsg: '该用户档案已为正常档案,可进行开关阀操作!!!', rejectMsg: '档案状态修改失败!!!'}
|
|
1089
|
-
)
|
|
1090
|
-
|
|
1091
|
-
this.showButtons('退出强制状态', '强制关阀')
|
|
1092
|
-
this.hideButtons('转正式档案')
|
|
1093
|
-
},
|
|
1094
|
-
//开始签字流程
|
|
1095
|
-
async 'startSignActivity'() {
|
|
1096
|
-
this.hideButtons('签字')
|
|
1097
|
-
|
|
1098
|
-
if(this.show_data.f_apply_type !== '管线建设'){
|
|
1099
|
-
await this.constructionBefore()
|
|
1100
|
-
}
|
|
1101
|
-
let data = {
|
|
1102
|
-
apply: this.show_data,
|
|
1103
|
-
user: Vue.user
|
|
1104
|
-
}
|
|
1105
|
-
|
|
1106
|
-
let res = await this.$resetpost(
|
|
1107
|
-
`${this.$androidUtil.getProxyUrl()}/rs/logic/startSignActivity`,
|
|
1108
|
-
{data: data},
|
|
1109
|
-
{resolveMsg: '签字流程已发起!!!', rejectMsg: '签字发起失败!!!'}
|
|
1110
|
-
)
|
|
1111
|
-
|
|
1112
|
-
this.breakControl()
|
|
1113
|
-
},
|
|
1114
|
-
// 工程施工初始化
|
|
1115
|
-
async 'buildReadyEvent'() {
|
|
1116
|
-
if (this.getLableValue('是否发起签字') === '是') {
|
|
1117
|
-
this.hideButtons('签字')
|
|
1118
|
-
}
|
|
1119
|
-
let http = new HttpResetClass()
|
|
1120
|
-
console.log("当前流程",this.show_data.f_apply_type)
|
|
1121
|
-
if (isEmpty(this.show_data.f_meter_brand)) {
|
|
1122
|
-
return
|
|
1123
|
-
}else {
|
|
1124
|
-
if (this.show_data.f_meter_brand === 'null') {
|
|
1125
|
-
this.setLabelOptions('气表型号', [{label: '无', value: 'null'}])
|
|
1126
|
-
return
|
|
1127
|
-
}
|
|
1128
|
-
let data = {
|
|
1129
|
-
f_gasbrand_id: this.show_data.f_meter_brand
|
|
1130
|
-
}
|
|
1131
|
-
let res = await http.load(
|
|
1132
|
-
'POST',
|
|
1133
|
-
`${this.$androidUtil.getProxyUrl()}/rs/sql/getGasModel`,
|
|
1134
|
-
{data: data},
|
|
1135
|
-
{resolveMsg: null, rejectMsg: '气表型号查询失败!!!'}
|
|
1136
|
-
)
|
|
1137
|
-
this.setLabelOptions('气表型号', res.data)
|
|
1138
|
-
}
|
|
1139
|
-
if (this.show_data.f_apply_type === '分户挂表') {
|
|
1140
|
-
let data = {
|
|
1141
|
-
condition: `ui.f_userinfo_id = '${this.show_data.f_userinfo_id}'`
|
|
1142
|
-
}
|
|
1143
|
-
let http = new HttpResetClass()
|
|
1144
|
-
let res = await http.load(
|
|
1145
|
-
'POST',
|
|
1146
|
-
`${this.$androidUtil.getProxyUrl()}/rs/sql/getApplyUserinfo`,
|
|
1147
|
-
{data: data},
|
|
1148
|
-
{resolveMsg: null, rejectMsg: '档案状态获取失败!!!'}
|
|
1149
|
-
)
|
|
1150
|
-
setTimeout(() => {
|
|
1151
|
-
if (res.data[0].f_meter_classify === '物联网表') {
|
|
1152
|
-
if (res.data[0].f_user_state === '正常') {
|
|
1153
|
-
this.showButtons('退出强制状态', '强制关阀')
|
|
1154
|
-
this.hideButtons('转正式档案')
|
|
1155
|
-
} else {
|
|
1156
|
-
this.showButtons('转正式档案')
|
|
1157
|
-
this.hideButtons('退出强制状态', '强制关阀')
|
|
1158
|
-
}
|
|
1159
|
-
}
|
|
1160
|
-
}, 1000)
|
|
1161
|
-
}
|
|
1162
|
-
},
|
|
1163
|
-
// 气表品牌失去焦点
|
|
1164
|
-
async 'meterBrandChenge' (index) {
|
|
1165
|
-
if (isEmpty(this.show_data.f_meter_brand)) {
|
|
1166
|
-
return
|
|
1167
|
-
}
|
|
1168
|
-
this.setLabelValue('气表型号', null)
|
|
1169
|
-
let data = {
|
|
1170
|
-
f_gasbrand_id: this.show_data.f_meter_brand
|
|
1171
|
-
}
|
|
1172
|
-
let http = new HttpResetClass()
|
|
1173
|
-
let res = await http.load(
|
|
1174
|
-
'POST',
|
|
1175
|
-
`${this.$androidUtil.getProxyUrl()}/rs/sql/getGasModel`,
|
|
1176
|
-
{data: data},
|
|
1177
|
-
{resolveMsg: null, rejectMsg: '气表型号查询失败!!!'}
|
|
1178
|
-
)
|
|
1179
|
-
|
|
1180
|
-
this.setLabelOptions('气表型号', res.data)
|
|
1181
|
-
},
|
|
1182
|
-
// 安装户数失去焦点
|
|
1183
|
-
'installCountChange'(index) {
|
|
1184
|
-
if (isEmpty(this.show_data.f_install_count)) {
|
|
1185
|
-
return
|
|
1186
|
-
}
|
|
1187
|
-
if (Number(this.show_data.f_install_count) > Number(this.show_data.f_apply_count)) {
|
|
1188
|
-
this.$showAlert('安装数已超过申请数!!!', 'warning', 3000)
|
|
1189
|
-
// this.setLabelValue('安装户数', null)
|
|
1190
|
-
// this.setLabelValue('安装点数', null)
|
|
1191
|
-
// return
|
|
1192
|
-
}
|
|
1193
|
-
|
|
1194
|
-
if (Number(this.show_data.f_install_count) <= 0) {
|
|
1195
|
-
this.$showAlert('至少有一个用户!!!', 'warning', 3000)
|
|
1196
|
-
this.setLabelValue('安装户数', null)
|
|
1197
|
-
this.setLabelValue('安装点数', null)
|
|
1198
|
-
return
|
|
1199
|
-
}
|
|
1200
|
-
},
|
|
1201
|
-
'complyInstallation'(index) {
|
|
1202
|
-
if (this.show_data.defname === '报建受理'){
|
|
1203
|
-
if (this.show_data.f_accept_install === '否') {
|
|
1204
|
-
console.log("测试")
|
|
1205
|
-
this.hideButtons('下发','提交')
|
|
1206
|
-
this.showButtons('终止')
|
|
1207
|
-
} else {
|
|
1208
|
-
this.hideButtons('终止')
|
|
1209
|
-
this.showButtons('下发','提交')
|
|
1210
|
-
}
|
|
1211
|
-
}
|
|
1212
|
-
if (this.show_data.defname === '现场勘察'){
|
|
1213
|
-
if (this.show_data.f_survey_opinion === '否') {
|
|
1214
|
-
console.log("测试")
|
|
1215
|
-
this.hideButtons('下发','提交')
|
|
1216
|
-
this.showButtons('终止')
|
|
1217
|
-
} else {
|
|
1218
|
-
this.hideButtons('终止')
|
|
1219
|
-
this.showButtons('下发','提交')
|
|
1220
|
-
}
|
|
1221
|
-
}
|
|
1222
|
-
if (this.show_data.defname === '报建受理' || this.show_data.defname === '现场勘察'){
|
|
1223
|
-
this.installCountCheck()
|
|
1224
|
-
}
|
|
1225
|
-
},
|
|
1226
|
-
//搜索小区
|
|
1227
|
-
'selectArea' (val,index) {
|
|
1228
|
-
let pcdText = `and f_residential_area like '%${val}%'`
|
|
1229
|
-
let data = {
|
|
1230
|
-
tablename: 't_area_address',
|
|
1231
|
-
condition: `f_filiale = '${Vue.user.f_fengongsi?Vue.user.f_fengongsi:'榆林.榆川天然气'}' and f_area_status = '启用' ${pcdText}`
|
|
1232
|
-
}
|
|
1233
|
-
new HttpResetClass().load("POST", `${this.$androidUtil.getProxyUrl()}/rs/sql/applySingleTable`, {data:data}, {resolveMsg: null, rejectMsg: null}).then((res)=>{
|
|
1234
|
-
console.log('请求发送完成!!!!!'+JSON.stringify(res))
|
|
1235
|
-
if(res.data.length>0){
|
|
1236
|
-
this.setLabelOptions('小区/巷道', res.data.map(item => {
|
|
1237
|
-
return {
|
|
1238
|
-
label: item.f_residential_area,
|
|
1239
|
-
value: item.id
|
|
1240
|
-
}
|
|
1241
|
-
}))
|
|
1242
|
-
}
|
|
1243
|
-
})
|
|
1244
|
-
},
|
|
1245
|
-
'changeDispatching'(index){
|
|
1246
|
-
if (this.show_data.fields[index].value === '安检维修中心'){
|
|
1247
|
-
this.hideLabels('现场项目负责人', '安装单位', '建设单位', '监理单位', '土建单位', '检测单位')
|
|
1248
|
-
this.electiveLabels('现场项目负责人', '安装单位', '建设单位', '监理单位', '土建单位', '检测单位')
|
|
1249
|
-
}else if (this.show_data.fields[index].value === '施工工队'){
|
|
1250
|
-
this.showLabels('现场项目负责人', '安装单位', '建设单位', '监理单位', '土建单位', '检测单位')
|
|
1251
|
-
this.requiredLabels('现场项目负责人', '安装单位', '建设单位', '监理单位', '土建单位', '检测单位')
|
|
1252
|
-
}
|
|
1253
|
-
},
|
|
1254
|
-
'getRefund'(index){
|
|
1255
|
-
if (this.show_data.fields[index].value === '否'){
|
|
1256
|
-
this.hideLabels('退费金额', '退款项')
|
|
1257
|
-
this.electiveLabels('退费金额', '退款项')
|
|
1258
|
-
}else if (this.show_data.fields[index].value === '是'){
|
|
1259
|
-
this.showLabels('退费金额', '退款项')
|
|
1260
|
-
this.requiredLabels('退费金额', '退款项')
|
|
1261
|
-
}
|
|
1262
|
-
},
|
|
1263
|
-
'hasTrouble'(index) {
|
|
1264
|
-
if (this.show_data.fields[index].value === '有纠纷'){
|
|
1265
|
-
this.hideButtons('提交', '签字', '图纸变更')
|
|
1266
|
-
this.showLabels('纠纷原因')
|
|
1267
|
-
}else {
|
|
1268
|
-
this.showButtons('提交', '签字', '图纸变更')
|
|
1269
|
-
this.hideLabels('纠纷原因')
|
|
1270
|
-
}
|
|
1271
|
-
},
|
|
1272
|
-
// ===========================================
|
|
1273
|
-
'initializtionView'() {
|
|
1274
|
-
if (this.show_data.f_apply_type === '民用报建' && this.show_data.f_apply_nature === '散户') {
|
|
1275
|
-
this.hideLabels('营业执照', '小区/巷道')
|
|
1276
|
-
this.electiveLabels('营业执照', '购货单位识别号', '购货单位银行账号', '购货单位地址电话', '小区/巷道')
|
|
1277
|
-
}
|
|
1278
|
-
if (this.show_data.f_apply_type === '民用报建' && this.show_data.f_apply_nature === '小区') {
|
|
1279
|
-
this.showLabels('营业执照', '小区/巷道', '小区名称')
|
|
1280
|
-
this.requiredLabels( '小区/巷道')
|
|
1281
|
-
this.hideComponents('用户花名单')
|
|
1282
|
-
}
|
|
1283
|
-
},
|
|
1284
|
-
'breakControl'() {
|
|
1285
|
-
this.breakControl()
|
|
1286
|
-
},
|
|
1287
|
-
// 检查重复
|
|
1288
|
-
'checkRepeat'(index) {
|
|
1289
|
-
this.checkDuplicate(index)
|
|
1290
|
-
},
|
|
1291
|
-
async 'button'() {
|
|
1292
|
-
if (this.show_data.button.before) {
|
|
1293
|
-
//判断当前环节
|
|
1294
|
-
if(this.show_data.defname=='现场勘察'||this.show_data.defname=='工程派工' ||this.show_data.defname=='工程施工'||this.show_data.defname=='点火通气' ||this.show_data.defname=='监理单位派工' ||this.show_data.defname=='工程队派工' ||this.show_data.defname=='检测单位签字' ||this.show_data.defname=='土建单位签字' ||this.show_data.defname=='监理单位签字' ||this.show_data.defname=='建设单位签字'){
|
|
1295
|
-
if(this.show_data.button.button_name=='提交' || this.show_data.button.button_name=='保存' || this.show_data.button.button_name=='退回'){
|
|
1296
|
-
let res = await this.$showMessage('是否需要继续此次操作')
|
|
1297
|
-
if (res === 'cancel') {
|
|
1298
|
-
return
|
|
1299
|
-
}else{
|
|
1300
|
-
await this[this.show_data.button.before]()
|
|
1301
|
-
}
|
|
1302
|
-
}
|
|
1303
|
-
}
|
|
1304
|
-
}else{
|
|
1305
|
-
//判断当前环节
|
|
1306
|
-
if(this.show_data.defname=='现场勘察'||this.show_data.defname=='工程派工' ||this.show_data.defname=='工程施工'||this.show_data.defname=='点火通气' ||this.show_data.defname=='监理单位派工' ||this.show_data.defname=='工程队派工'){
|
|
1307
|
-
if(this.show_data.button.button_name=='提交' || this.show_data.button.button_name=='保存' || this.show_data.button.button_name=='退回'){
|
|
1308
|
-
let res = await this.$showMessage('是否需要继续此次操作')
|
|
1309
|
-
if (res === 'cancel') {
|
|
1310
|
-
return
|
|
1311
|
-
}
|
|
1312
|
-
}
|
|
1313
|
-
}
|
|
1314
|
-
|
|
1315
|
-
}
|
|
1316
|
-
// 点击重置按钮就重置数据
|
|
1317
|
-
if (this.show_data.button.button_name === '重置') {
|
|
1318
|
-
this.$dispatch('breakControl', this.selectdata)
|
|
1319
|
-
return
|
|
1320
|
-
}
|
|
1321
|
-
|
|
1322
|
-
this.show_data.start_activity = this.json_datas.start_activity
|
|
1323
|
-
this.show_data.xmlfilename = this.json_datas.workflow_xmlfilename
|
|
1324
|
-
|
|
1325
|
-
let data = {
|
|
1326
|
-
apply: this.show_data,
|
|
1327
|
-
user: Vue.user
|
|
1328
|
-
}
|
|
1329
|
-
console.log("当前提交数据",this.show_data)
|
|
1330
|
-
let res = await this.$resetpost(
|
|
1331
|
-
`${this.$androidUtil.getProxyUrl()}/rs/logic/ApplyProductService`,
|
|
1332
|
-
{data: data},
|
|
1333
|
-
{resolveMsg: null, rejectMsg: '数据保存失败'}
|
|
1334
|
-
)
|
|
1335
|
-
|
|
1336
|
-
if (this.show_data.button.after) {
|
|
1337
|
-
this[this.show_data.button.after]()
|
|
1338
|
-
}
|
|
1339
|
-
// 返回上层
|
|
1340
|
-
this.$dispatch('confirm')
|
|
1341
|
-
},
|
|
1342
|
-
'locationclick' (res) {
|
|
1343
|
-
console.log('/*/*/*/*/*/*/*/*/*/*/*/*/*/**/*/*/*/*')
|
|
1344
|
-
if (res.pname){
|
|
1345
|
-
this.setLabelValue('定位地址', res.pname + res.cityname + res.adname + res.address + res.name)
|
|
1346
|
-
}else {
|
|
1347
|
-
this.setLabelValue('定位地址', res.province + res.city + res.address + res.name)
|
|
1348
|
-
}
|
|
1349
|
-
this.show_data.f_lng = res.location.lng
|
|
1350
|
-
this.show_data.f_lat = res.location.lat
|
|
1351
|
-
this.isOpen = !this.isOpen
|
|
1352
|
-
},
|
|
1353
|
-
selectSearch (val, index) {},
|
|
1354
|
-
// 失去焦点出触发事件
|
|
1355
|
-
'onchange'(index) {
|
|
1356
|
-
},
|
|
1357
|
-
'onblur'(index) {
|
|
1358
|
-
},
|
|
1359
|
-
'oninput'(index) {
|
|
1360
|
-
},
|
|
1361
|
-
async 'onchangeModal'(index, fieldIndex) {
|
|
1362
|
-
},
|
|
1363
|
-
async 'onblurModal'(index, fieldIndex) {
|
|
1364
|
-
|
|
1365
|
-
},
|
|
1366
|
-
async 'oninputModal'(index, fieldIndex) {
|
|
1367
|
-
|
|
1368
|
-
},
|
|
1369
|
-
async 'onetomanydelete'(index, rowIndex) {
|
|
1370
|
-
|
|
1371
|
-
let http = new HttpResetClass()
|
|
1372
|
-
|
|
1373
|
-
let res = await http.load(
|
|
1374
|
-
'DELETE',
|
|
1375
|
-
`${this.$androidUtil.getProxyUrl()}/rs/entity/${this.show_data.onetomany[index].tables[0]}/${this.show_data.onetomany[index].rows[rowIndex].id}`,
|
|
1376
|
-
null,
|
|
1377
|
-
{resolveMsg: null, rejectMsg: '删除失败!!!'}
|
|
1378
|
-
)
|
|
1379
|
-
res = await this.$resetpost(
|
|
1380
|
-
`${this.$androidUtil.getProxyUrl()}/rs/entity/t_apply`,
|
|
1381
|
-
this.show_data
|
|
1382
|
-
)
|
|
1383
|
-
this.breakControl()
|
|
1384
|
-
},
|
|
1385
|
-
async 'onetomanyupdate'(index, rowIndex) {
|
|
1386
|
-
let data = this.show_data.onetomany[index].rows[rowIndex]
|
|
1387
|
-
|
|
1388
|
-
this.show_data.onetomany[index].fields.forEach(item => {
|
|
1389
|
-
data[item.field] = item.value
|
|
1390
|
-
})
|
|
1391
|
-
let res = await this.$resetpost(
|
|
1392
|
-
`${this.$androidUtil.getProxyUrl()}/rs/entity/${this.show_data.onetomany[index].tables[0]}`,
|
|
1393
|
-
data
|
|
1394
|
-
)
|
|
1395
|
-
res = await this.$resetpost(
|
|
1396
|
-
`${this.$androidUtil.getProxyUrl()}/rs/entity/t_apply`,
|
|
1397
|
-
this.show_data
|
|
1398
|
-
)
|
|
1399
|
-
this.breakControl()
|
|
1400
|
-
},
|
|
1401
|
-
async 'onetomanyadd'(index) {
|
|
1402
|
-
let data = {
|
|
1403
|
-
f_process_id: this.show_data.f_process_id,
|
|
1404
|
-
f_operator_id: Vue.user.id,
|
|
1405
|
-
f_operator: Vue.user.name,
|
|
1406
|
-
f_operation_date: new Date().Format('yyyy-MM-dd HH:mm:ss'),
|
|
1407
|
-
f_orgid: Vue.user.orgid,
|
|
1408
|
-
f_orgname: Vue.user.orgs
|
|
1409
|
-
}
|
|
1410
|
-
this.show_data.onetomany[index].fields.forEach(item => {
|
|
1411
|
-
data[item.field] = item.value
|
|
1412
|
-
})
|
|
1413
|
-
let res = await this.$resetpost(
|
|
1414
|
-
`${this.$androidUtil.getProxyUrl()}/rs/entity/${this.show_data.onetomany[index].tables[0]}`,
|
|
1415
|
-
data
|
|
1416
|
-
)
|
|
1417
|
-
res = await this.$resetpost(
|
|
1418
|
-
`${this.$androidUtil.getProxyUrl()}/rs/entity/t_apply`,
|
|
1419
|
-
this.show_data
|
|
1420
|
-
)
|
|
1421
|
-
this.breakControl()
|
|
1422
|
-
},
|
|
1423
|
-
'onbutchange'(index) {
|
|
1424
|
-
|
|
1425
|
-
},
|
|
1426
|
-
'onbutblur'(index) {
|
|
1427
|
-
|
|
1428
|
-
},
|
|
1429
|
-
'onbutinput'(index) {
|
|
1430
|
-
|
|
1431
|
-
}
|
|
1432
|
-
},
|
|
1433
|
-
watch: {}
|
|
1434
|
-
}
|
|
1435
|
-
</script>
|
|
1436
|
-
<style scoped>
|
|
1437
|
-
</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="isOpen" type="primary">
|
|
5
|
+
<app-service-view v-ref:serviceview :data="show_data" v-if="showview"></app-service-view>
|
|
6
|
+
</panel>
|
|
7
|
+
<panel header='地图' :is-open="!isOpen" type="primary" v-if="selectdata.defname ==='现场勘察'">
|
|
8
|
+
<div style="height: 85vh">
|
|
9
|
+
<apply-map-com :selectdata="selectdata"></apply-map-com>
|
|
10
|
+
</div>
|
|
11
|
+
</panel>
|
|
12
|
+
</accordion>
|
|
13
|
+
</div>
|
|
14
|
+
</template>
|
|
15
|
+
<script>
|
|
16
|
+
import Vue from 'vue'
|
|
17
|
+
import {HttpResetClass} from 'vue-client'
|
|
18
|
+
import {isEmpty} from '../../Util'
|
|
19
|
+
// Date格式化
|
|
20
|
+
Date.prototype.Format = function (fmt) {
|
|
21
|
+
var o = {
|
|
22
|
+
'M+': this.getMonth() + 1, // 月份
|
|
23
|
+
'd+': this.getDate(), // 日
|
|
24
|
+
'H+': this.getHours(), // 小时
|
|
25
|
+
'm+': this.getMinutes(), // 分
|
|
26
|
+
's+': this.getSeconds(), // 秒
|
|
27
|
+
'q+': Math.floor((this.getMonth() + 3) / 3), // 季度
|
|
28
|
+
'S': this.getMilliseconds() // 毫秒
|
|
29
|
+
}
|
|
30
|
+
if (/(y+)/.test(fmt)) fmt = fmt.replace(RegExp.$1, (this.getFullYear() + '').substr(4 - RegExp.$1.length))
|
|
31
|
+
for (var k in o) {
|
|
32
|
+
if (new RegExp('(' + k + ')').test(fmt)) fmt = fmt.replace(RegExp.$1, (RegExp.$1.length === 1) ? (o[k]) : (('00' + o[k]).substr(('' + o[k]).length)))
|
|
33
|
+
}
|
|
34
|
+
return fmt
|
|
35
|
+
}
|
|
36
|
+
export default {
|
|
37
|
+
title: '报建流程业务控制层',
|
|
38
|
+
props: ['selectdata', 'title'],
|
|
39
|
+
data() {
|
|
40
|
+
return {
|
|
41
|
+
json_datas: null,
|
|
42
|
+
data: null,
|
|
43
|
+
show_data: null,
|
|
44
|
+
showview: false,
|
|
45
|
+
config: {},
|
|
46
|
+
isOpen: true
|
|
47
|
+
}
|
|
48
|
+
},
|
|
49
|
+
ready() {
|
|
50
|
+
this.refurbish()
|
|
51
|
+
},
|
|
52
|
+
methods: {
|
|
53
|
+
async refurbish() {
|
|
54
|
+
this.showview = false
|
|
55
|
+
let title=this.title
|
|
56
|
+
let data = {
|
|
57
|
+
workname: this.selectdata.processname
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
let res = await this.$resetpost(
|
|
61
|
+
`${this.$androidUtil.getProxyUrl()}/rs/logic/ApplyGetConfigs`,
|
|
62
|
+
{data: data},
|
|
63
|
+
{resolveMsg: null, rejectMsg: '配置数据获取失败!!!'}
|
|
64
|
+
)
|
|
65
|
+
|
|
66
|
+
this.json_datas = res.data
|
|
67
|
+
|
|
68
|
+
let sum = 0
|
|
69
|
+
let jsonData = {}
|
|
70
|
+
if (!this.json_datas || !this.json_datas.activitys || this.json_datas.activitys.length === 0) {
|
|
71
|
+
this.$showMessage("网络故障,请刷新页面")
|
|
72
|
+
return
|
|
73
|
+
}
|
|
74
|
+
this.json_datas.activitys.forEach(item => {
|
|
75
|
+
if (this.selectdata.defname === '施工信息') {
|
|
76
|
+
if (item.title === '工程施工') {
|
|
77
|
+
jsonData = item // 拿到当前节点的json配置信息
|
|
78
|
+
sum++ // 节点名一样的个数
|
|
79
|
+
}
|
|
80
|
+
}else if (this.selectdata.defname === item.title) {
|
|
81
|
+
jsonData = item // 拿到当前节点的json配置信息
|
|
82
|
+
sum++ // 节点名一样的个数
|
|
83
|
+
}
|
|
84
|
+
return this.selectdata.defname === item.title // 拿到当前节点的json配置信息
|
|
85
|
+
})
|
|
86
|
+
|
|
87
|
+
if (sum === 0) {
|
|
88
|
+
this.$showMessage(`没有在JSON配置文件中找到活动名为:(${this.selectdata.defname})的节点配置`)
|
|
89
|
+
return
|
|
90
|
+
}
|
|
91
|
+
if (sum > 1) {
|
|
92
|
+
this.$showMessage(`在JSON配置文件中找到活动名为:(${this.selectdata.defname})的节点配置:${sum}个`)
|
|
93
|
+
return
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
this.selectdata = Object.assign({}, this.selectdata, jsonData)
|
|
97
|
+
|
|
98
|
+
// fields 字段填充值
|
|
99
|
+
for (const item of this.selectdata.fields) {
|
|
100
|
+
if (!item.value) {
|
|
101
|
+
item.value = null
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
if (!item.value && (item.default || item.default === 0) && item.type !== 'datepicker') {
|
|
105
|
+
if (item.eval) {
|
|
106
|
+
let user = Vue.user
|
|
107
|
+
// 将PC用户信息 替换成 APP的
|
|
108
|
+
item.value = eval(item.default.replace('this.$login.f', 'user'))
|
|
109
|
+
} else {
|
|
110
|
+
item.value = item.default
|
|
111
|
+
}
|
|
112
|
+
}
|
|
113
|
+
|
|
114
|
+
if (this.selectdata[item.field]) {
|
|
115
|
+
// 将json字符串格式化赋值给value
|
|
116
|
+
if (String(this.selectdata[item.field]).startsWith("{")) {
|
|
117
|
+
item.value = JSON.parse(this.selectdata[item.field])
|
|
118
|
+
} else {
|
|
119
|
+
item.value = this.selectdata[item.field]
|
|
120
|
+
}
|
|
121
|
+
}
|
|
122
|
+
if (this.selectdata[item.field] === 0) {
|
|
123
|
+
item.value = 0
|
|
124
|
+
}
|
|
125
|
+
|
|
126
|
+
// datepicker
|
|
127
|
+
if (item.type === 'datepicker' && !item.value && item.default) {
|
|
128
|
+
item.value = new Date().Format(`${item.format ? item.format : 'yyyy-MM-dd HH:mm:ss'}`)
|
|
129
|
+
}
|
|
130
|
+
|
|
131
|
+
// 如果配置类型为select,优先从参数列表获取options
|
|
132
|
+
if (item.type === 'select' || item.type === 'checkbox') {
|
|
133
|
+
if (item.param) {
|
|
134
|
+
let temp = this.$appdata.getParam(item.label)
|
|
135
|
+
|
|
136
|
+
if (temp && temp.length > 0) {
|
|
137
|
+
item.options = temp
|
|
138
|
+
}
|
|
139
|
+
|
|
140
|
+
if (item.paramLabel) {
|
|
141
|
+
temp = this.$appdata.getParam(item.paramLabel)
|
|
142
|
+
if (temp && temp.length > 0) {
|
|
143
|
+
item.options = temp
|
|
144
|
+
}
|
|
145
|
+
}
|
|
146
|
+
}
|
|
147
|
+
|
|
148
|
+
}
|
|
149
|
+
if (item.ready) {
|
|
150
|
+
item.options = await this[item.ready]()
|
|
151
|
+
}
|
|
152
|
+
|
|
153
|
+
if (item.type === 'checkbox') {
|
|
154
|
+
if (this.selectdata[item.field]) {
|
|
155
|
+
item.value = JSON.parse(this.selectdata[item.field])
|
|
156
|
+
} else {
|
|
157
|
+
item.value = []
|
|
158
|
+
}
|
|
159
|
+
}
|
|
160
|
+
if(this.selectdata.defname === '施工信息'||this.title === '已办信息'){
|
|
161
|
+
item.readonly = true
|
|
162
|
+
item.disabled = true
|
|
163
|
+
}
|
|
164
|
+
}
|
|
165
|
+
|
|
166
|
+
// 控制组件
|
|
167
|
+
if (this.selectdata.components) {
|
|
168
|
+
this.selectdata.components.forEach(item => {
|
|
169
|
+
if (!item.mark) {
|
|
170
|
+
item.mark = 0
|
|
171
|
+
}
|
|
172
|
+
})
|
|
173
|
+
}
|
|
174
|
+
// 控制组件
|
|
175
|
+
if(this.selectdata.defname === '施工信息') {
|
|
176
|
+
if (this.selectdata.components) {
|
|
177
|
+
this.selectdata.components.forEach(item => {
|
|
178
|
+
item.mark = 1
|
|
179
|
+
})
|
|
180
|
+
}
|
|
181
|
+
}
|
|
182
|
+
|
|
183
|
+
// 初始化onetomany
|
|
184
|
+
if (this.selectdata.onetomany) {
|
|
185
|
+
for (const item of this.selectdata.onetomany) {
|
|
186
|
+
let res = null
|
|
187
|
+
if (item.queryEvent) {
|
|
188
|
+
res = this[item.queryEvent]()
|
|
189
|
+
} else {
|
|
190
|
+
let http = new HttpResetClass()
|
|
191
|
+
let data = {
|
|
192
|
+
tablename: item.tables[0],
|
|
193
|
+
condition: `f_process_id='${this.selectdata.f_process_id}'`
|
|
194
|
+
}
|
|
195
|
+
res = await http.load(
|
|
196
|
+
'POST',
|
|
197
|
+
`${this.$androidUtil.getProxyUrl()}/rs/sql/applySingleTable`,
|
|
198
|
+
// `rs/sql/applySingleTable`,
|
|
199
|
+
{data: data},
|
|
200
|
+
{resolveMsg: null, rejectMsg: 'onetomany查询失败'}
|
|
201
|
+
)
|
|
202
|
+
}
|
|
203
|
+
|
|
204
|
+
item.rows = res.data
|
|
205
|
+
|
|
206
|
+
// 初始化onetomany中的fields
|
|
207
|
+
for (const field of item.fields) {
|
|
208
|
+
if (!field.value) {
|
|
209
|
+
if (field.value !== 0) {
|
|
210
|
+
field.value = null
|
|
211
|
+
}
|
|
212
|
+
}
|
|
213
|
+
|
|
214
|
+
if (field.default || field.default === 0) {
|
|
215
|
+
field.value = field.default
|
|
216
|
+
}
|
|
217
|
+
|
|
218
|
+
// datepicker
|
|
219
|
+
if (field.type === 'datepicker' && !field.value && field.default) {
|
|
220
|
+
field.value = new Date().Format(`${field.format ? field.format : 'yyyy-MM-dd HH:mm:ss'}`)
|
|
221
|
+
}
|
|
222
|
+
|
|
223
|
+
if (field.type === 'select') {
|
|
224
|
+
|
|
225
|
+
if (field.param) {
|
|
226
|
+
let temp = this.$appdata.getParam(field.label)
|
|
227
|
+
|
|
228
|
+
if (temp && temp.length > 0) {
|
|
229
|
+
field.options = temp
|
|
230
|
+
}
|
|
231
|
+
|
|
232
|
+
if (field.paramLabel) {
|
|
233
|
+
temp = this.$appdata.getParam(field.paramLabel)
|
|
234
|
+
if (temp && temp.length > 0) {
|
|
235
|
+
item.options = temp
|
|
236
|
+
}
|
|
237
|
+
}
|
|
238
|
+
}
|
|
239
|
+
|
|
240
|
+
}
|
|
241
|
+
}
|
|
242
|
+
if(this.selectdata.defname === '施工信息'){
|
|
243
|
+
// 隐藏所有操作
|
|
244
|
+
item.hiddenOperate = true
|
|
245
|
+
}
|
|
246
|
+
}
|
|
247
|
+
}
|
|
248
|
+
|
|
249
|
+
// 初始化 buttons_fields
|
|
250
|
+
for (const item of this.selectdata.buttons) {
|
|
251
|
+
if (item.button_name === '下发' || item.button_name === '转派') {
|
|
252
|
+
let data = {
|
|
253
|
+
source: item.source,
|
|
254
|
+
userid: Vue.user.id
|
|
255
|
+
// userid: '51953'
|
|
256
|
+
}
|
|
257
|
+
if (item.sourceMethod) {
|
|
258
|
+
data.source = this[item.sourceMethod]()
|
|
259
|
+
}
|
|
260
|
+
if (!data.source) {
|
|
261
|
+
this.$showMessage("请配置获取人员表达式")
|
|
262
|
+
return
|
|
263
|
+
}
|
|
264
|
+
let res = await this.$resetpost(
|
|
265
|
+
`${this.$androidUtil.getProxyUrl()}/rs/search`,
|
|
266
|
+
// `rs/search`,
|
|
267
|
+
{data: data},
|
|
268
|
+
{resolveMsg: null, rejectMsg: '下发人员查询失败!!!'}
|
|
269
|
+
)
|
|
270
|
+
|
|
271
|
+
let options = res.data.map(source => {
|
|
272
|
+
return {
|
|
273
|
+
"label": source.name,
|
|
274
|
+
"value": source.id
|
|
275
|
+
}
|
|
276
|
+
})
|
|
277
|
+
|
|
278
|
+
if (item.button_fields.length !== 1) {
|
|
279
|
+
this.$showMessage("下发有且只能有一个字段!!!")
|
|
280
|
+
return
|
|
281
|
+
}
|
|
282
|
+
|
|
283
|
+
item.button_fields[0].options = options
|
|
284
|
+
}
|
|
285
|
+
if (item.button_fields) {
|
|
286
|
+
item.button_fields.forEach(x => {
|
|
287
|
+
// 如果配置类型为select,优先从参数列表获取options
|
|
288
|
+
if (x.type === 'select') {
|
|
289
|
+
|
|
290
|
+
if (x.param) {
|
|
291
|
+
let temp = this.$appdata.getParam(x.label)
|
|
292
|
+
|
|
293
|
+
if (temp && temp.length > 0) {
|
|
294
|
+
x.options = temp
|
|
295
|
+
}
|
|
296
|
+
|
|
297
|
+
if (x.paramLabel) {
|
|
298
|
+
temp = this.$appdata.getParam(x.paramLabel)
|
|
299
|
+
if (temp && temp.length > 0) {
|
|
300
|
+
x.options = temp
|
|
301
|
+
}
|
|
302
|
+
}
|
|
303
|
+
}
|
|
304
|
+
|
|
305
|
+
}
|
|
306
|
+
})
|
|
307
|
+
}
|
|
308
|
+
}
|
|
309
|
+
if(this.selectdata.defname === '施工信息'||this.title=== '已办信息'){
|
|
310
|
+
this.selectdata.buttons = null
|
|
311
|
+
}
|
|
312
|
+
if (this.selectdata.f_apply_nature === '散户' && this.selectdata.defname === '现场勘察') {
|
|
313
|
+
for (const item of this.selectdata.fields) {
|
|
314
|
+
if (item.label.includes('安装户数')) {
|
|
315
|
+
item.readonly = true
|
|
316
|
+
}
|
|
317
|
+
}
|
|
318
|
+
}
|
|
319
|
+
// 消除双向绑定,避免子组件(显示层)数据更改,父组件(控制层)也更改
|
|
320
|
+
let temp = JSON.parse(JSON.stringify(this.selectdata))
|
|
321
|
+
|
|
322
|
+
this.show_data = temp
|
|
323
|
+
this.$nextTick(() => {
|
|
324
|
+
this.showview = true
|
|
325
|
+
})
|
|
326
|
+
},
|
|
327
|
+
// 金额转大写
|
|
328
|
+
smalltoBIG(n) {
|
|
329
|
+
let fraction = ['角', '分'];
|
|
330
|
+
let digit = ['零', '壹', '贰', '叁', '肆', '伍', '陆', '柒', '捌', '玖'];
|
|
331
|
+
let unit = [['元', '万', '亿'], ['', '拾', '佰', '仟']];
|
|
332
|
+
let head = n < 0 ? '欠' : '';
|
|
333
|
+
n = Math.abs(n);
|
|
334
|
+
|
|
335
|
+
let s = '';
|
|
336
|
+
|
|
337
|
+
for (var i = 0; i < fraction.length; i++) {
|
|
338
|
+
s += (digit[Math.floor(n * 10 * Math.pow(10, i)) % 10] + fraction[i]).replace(/零./, '');
|
|
339
|
+
}
|
|
340
|
+
s = s || '整';
|
|
341
|
+
n = Math.floor(n);
|
|
342
|
+
|
|
343
|
+
for (var i = 0; i < unit[0].length && n > 0; i++) {
|
|
344
|
+
let p = '';
|
|
345
|
+
for (var j = 0; j < unit[1].length && n > 0; j++) {
|
|
346
|
+
p = digit[n % 10] + unit[1][j] + p;
|
|
347
|
+
n = Math.floor(n / 10);
|
|
348
|
+
}
|
|
349
|
+
s = p.replace(/(零.)*零$/, '').replace(/^$/, '零') + unit[0][i] + s;
|
|
350
|
+
}
|
|
351
|
+
return head + s.replace(/(零.)*零元/, '元').replace(/(零.)+/g, '零').replace(/^整$/, '零元整')
|
|
352
|
+
},
|
|
353
|
+
getLableValue(label) {
|
|
354
|
+
for (const item of this.show_data.fields) {
|
|
355
|
+
if (item.label === label && item.type !== 'number') {
|
|
356
|
+
return item.value || ''
|
|
357
|
+
}
|
|
358
|
+
if (item.label === label && item.type === 'number') {
|
|
359
|
+
return item.value || 0
|
|
360
|
+
}
|
|
361
|
+
}
|
|
362
|
+
},
|
|
363
|
+
getLableOptions(label) {
|
|
364
|
+
for (const item of this.show_data.fields) {
|
|
365
|
+
if (item.label === label) {
|
|
366
|
+
return item.options
|
|
367
|
+
}
|
|
368
|
+
}
|
|
369
|
+
},
|
|
370
|
+
setLabelValue(label, value) {
|
|
371
|
+
for (const item of this.show_data.fields) {
|
|
372
|
+
if (item.label === label) {
|
|
373
|
+
item.value = value
|
|
374
|
+
this.show_data[item.field] = value
|
|
375
|
+
}
|
|
376
|
+
}
|
|
377
|
+
},
|
|
378
|
+
setLabelOptions(label, options) {
|
|
379
|
+
for (const item of this.show_data.fields) {
|
|
380
|
+
if (item.label === label) {
|
|
381
|
+
item.options = options
|
|
382
|
+
}
|
|
383
|
+
}
|
|
384
|
+
},
|
|
385
|
+
showLabels(...labels) {
|
|
386
|
+
for (const item of this.show_data.fields) {
|
|
387
|
+
if (labels.includes(item.label)) {
|
|
388
|
+
item.hidden = false
|
|
389
|
+
}
|
|
390
|
+
}
|
|
391
|
+
},
|
|
392
|
+
hideLabels(...labels) {
|
|
393
|
+
for (const item of this.show_data.fields) {
|
|
394
|
+
if (labels.includes(item.label)) {
|
|
395
|
+
item.hidden = true
|
|
396
|
+
}
|
|
397
|
+
}
|
|
398
|
+
},
|
|
399
|
+
showButtons(...buttons) {
|
|
400
|
+
for (const item of this.show_data.buttons) {
|
|
401
|
+
if (buttons.includes(item.button_name)) {
|
|
402
|
+
item.hidden = false
|
|
403
|
+
}
|
|
404
|
+
}
|
|
405
|
+
},
|
|
406
|
+
hideButtons(...buttons) {
|
|
407
|
+
for (const item of this.show_data.buttons) {
|
|
408
|
+
if (buttons.includes(item.button_name)) {
|
|
409
|
+
item.hidden = true
|
|
410
|
+
}
|
|
411
|
+
}
|
|
412
|
+
},
|
|
413
|
+
requiredLabels(...labels) {
|
|
414
|
+
for (const item of this.show_data.fields) {
|
|
415
|
+
if (labels.includes(item.label)) {
|
|
416
|
+
item.required = true
|
|
417
|
+
}
|
|
418
|
+
}
|
|
419
|
+
},
|
|
420
|
+
electiveLabels(...labels) {
|
|
421
|
+
for (const item of this.show_data.fields) {
|
|
422
|
+
if (labels.includes(item.label)) {
|
|
423
|
+
item.required = false
|
|
424
|
+
}
|
|
425
|
+
}
|
|
426
|
+
},
|
|
427
|
+
readonlyLabels(...labels) {
|
|
428
|
+
for (const item of this.show_data.fields) {
|
|
429
|
+
if (labels.includes(item.label)) {
|
|
430
|
+
item.readonly = true
|
|
431
|
+
item.disabled = true
|
|
432
|
+
}
|
|
433
|
+
}
|
|
434
|
+
},
|
|
435
|
+
readwriteLabels(...labels) {
|
|
436
|
+
for (const item of this.show_data.fields) {
|
|
437
|
+
if (labels.includes(item.label)) {
|
|
438
|
+
item.readonly = false
|
|
439
|
+
item.disabled = false
|
|
440
|
+
}
|
|
441
|
+
}
|
|
442
|
+
},
|
|
443
|
+
disabledButtons(...buttons) {
|
|
444
|
+
for (const item of this.show_data.buttons) {
|
|
445
|
+
if (buttons.includes(item.button_name)) {
|
|
446
|
+
item.disabled = true
|
|
447
|
+
}
|
|
448
|
+
}
|
|
449
|
+
},
|
|
450
|
+
enableButtons(...buttons) {
|
|
451
|
+
for (const item of this.show_data.buttons) {
|
|
452
|
+
if (buttons.includes(item.button_name)) {
|
|
453
|
+
item.disabled = false
|
|
454
|
+
}
|
|
455
|
+
}
|
|
456
|
+
},
|
|
457
|
+
showComponents(...titles) {
|
|
458
|
+
for (const item of this.show_data.components) {
|
|
459
|
+
if (titles.includes(item.title) && item.device === 'app') {
|
|
460
|
+
item.hidden = false
|
|
461
|
+
}
|
|
462
|
+
}
|
|
463
|
+
},
|
|
464
|
+
hideComponents(...titles) {
|
|
465
|
+
for (const item of this.show_data.components) {
|
|
466
|
+
if (titles.includes(item.title) && item.device === 'app') {
|
|
467
|
+
item.hidden = true
|
|
468
|
+
}
|
|
469
|
+
}
|
|
470
|
+
},
|
|
471
|
+
async checkDuplicate(index) {
|
|
472
|
+
let http = new HttpResetClass()
|
|
473
|
+
let data = {
|
|
474
|
+
tablename: 't_apply',
|
|
475
|
+
condition: `${this.show_data.fields[index].field} = '${this.show_data.fields[index].value}'`
|
|
476
|
+
}
|
|
477
|
+
let res = await http.load('POST', `${this.$androidUtil.getProxyUrl()}/rs/sql/applySingleTable`, {data: data}, {
|
|
478
|
+
resolveMsg: null,
|
|
479
|
+
rejectMsg: `${this.show_data.fields[index].label}查询失败`
|
|
480
|
+
})
|
|
481
|
+
if (res.data.length > 0) {
|
|
482
|
+
this.show_data.fields[index].value = null
|
|
483
|
+
this.$showAlert(`${this.show_data.fields[index].label}已存在!!!`, 'warning', 3000)
|
|
484
|
+
}
|
|
485
|
+
},
|
|
486
|
+
async breakControl() {
|
|
487
|
+
if (this.show_data.id) {
|
|
488
|
+
let data = {
|
|
489
|
+
condition: `u.id = ${this.show_data.id}`,
|
|
490
|
+
data: {
|
|
491
|
+
userid: Vue.user.id,
|
|
492
|
+
f_filiale: Vue.user.f_fengongsi?Vue.user.f_fengongsi:'榆林.榆川天然气'
|
|
493
|
+
}
|
|
494
|
+
}
|
|
495
|
+
let url =`${this.$androidUtil.getProxyUrl()}/rs/sql/checkuser`
|
|
496
|
+
if (this.show_data.f_apply_type === '管线建设'){
|
|
497
|
+
url =`${this.$androidUtil.getProxyUrl()}/rs/sql/getGuanXianApply`
|
|
498
|
+
}
|
|
499
|
+
let res = await this.$resetpost(
|
|
500
|
+
url,
|
|
501
|
+
{data: data},
|
|
502
|
+
{resolveMsg: null, rejectMsg: '数据更新失败,请手查询更新!!!'}
|
|
503
|
+
)
|
|
504
|
+
|
|
505
|
+
this.selectdata = res.data[0]
|
|
506
|
+
this.selectdata.f_building=this.show_data.f_building
|
|
507
|
+
this.selectdata.f_unit=this.show_data.f_unit
|
|
508
|
+
this.selectdata.f_room=this.show_data.f_room
|
|
509
|
+
this.selectdata.pageIndex=this.show_data.pageIndex
|
|
510
|
+
} else {
|
|
511
|
+
this.selectdata = servicedata
|
|
512
|
+
}
|
|
513
|
+
|
|
514
|
+
this.refurbish()
|
|
515
|
+
},
|
|
516
|
+
// ------------------------------
|
|
517
|
+
async getConstructionWorker() {
|
|
518
|
+
let data = {
|
|
519
|
+
source: 'this.getParentByType($organization$).getChildByName($建设单位$).getChildren()',
|
|
520
|
+
userid: Vue.user.id
|
|
521
|
+
}
|
|
522
|
+
|
|
523
|
+
let res = await this.$resetpost(
|
|
524
|
+
`${this.$androidUtil.getProxyUrl()}/rs/search`,
|
|
525
|
+
{data: data},
|
|
526
|
+
{resolveMsg: null, rejectMsg: '现场负责人查询失败!!!'}
|
|
527
|
+
)
|
|
528
|
+
|
|
529
|
+
return res.data.map(item => {
|
|
530
|
+
return {
|
|
531
|
+
label: item.name,
|
|
532
|
+
value: item.id
|
|
533
|
+
}
|
|
534
|
+
})
|
|
535
|
+
},
|
|
536
|
+
//获取下发人
|
|
537
|
+
getSource () {
|
|
538
|
+
return 'this.getParentByType($organization$).getChildByName($'+ Vue.user.f_department_name + '$).getChildren()'
|
|
539
|
+
},
|
|
540
|
+
async getUserName() {
|
|
541
|
+
let data = {
|
|
542
|
+
tablename: 't_user',
|
|
543
|
+
condition: `id='${this.selectdata.f_construction_unit_id}'`
|
|
544
|
+
}
|
|
545
|
+
let res = await this.$resetpost(
|
|
546
|
+
'${this.$androidUtil.getProxyUrl()}/rs/sql/applySingleTable',
|
|
547
|
+
{data: data},
|
|
548
|
+
{resolveMsg: null, rejectMsg: null}
|
|
549
|
+
)
|
|
550
|
+
return res.data.map(item => {
|
|
551
|
+
return {
|
|
552
|
+
label: item.name,
|
|
553
|
+
value: item.id
|
|
554
|
+
}
|
|
555
|
+
})
|
|
556
|
+
},
|
|
557
|
+
// 安装单位签字人
|
|
558
|
+
async getConstructionUnitId () {
|
|
559
|
+
let data = {
|
|
560
|
+
source: '',
|
|
561
|
+
userid: Vue.user.id
|
|
562
|
+
}
|
|
563
|
+
data.source = 'this.getParentByType($organization$).getChildByName($'+ Vue.user.f_department_name + '$).getChildren()'
|
|
564
|
+
let res = await this.$resetpost(
|
|
565
|
+
`${this.$androidUtil.getProxyUrl()}/rs/search`,
|
|
566
|
+
{data: data},
|
|
567
|
+
{resolveMsg: null, rejectMsg: '安装单位施工班组查询失败!!!'}
|
|
568
|
+
)
|
|
569
|
+
|
|
570
|
+
return res.data.map(item => {
|
|
571
|
+
return {
|
|
572
|
+
label: item.name,
|
|
573
|
+
value: item.id
|
|
574
|
+
}
|
|
575
|
+
})
|
|
576
|
+
},
|
|
577
|
+
// 安装单位负责人
|
|
578
|
+
async getConstructionUnit() {
|
|
579
|
+
let data = {
|
|
580
|
+
source: 'this.getParentByType($organization$).getChildByName($工程施工队$).getChildren()',
|
|
581
|
+
userid: Vue.user.id
|
|
582
|
+
}
|
|
583
|
+
|
|
584
|
+
let res = await this.$resetpost(
|
|
585
|
+
`${this.$androidUtil.getProxyUrl()}/rs/search`,
|
|
586
|
+
{data: data},
|
|
587
|
+
{resolveMsg: null, rejectMsg: '安装单位人员查询失败!!!'}
|
|
588
|
+
)
|
|
589
|
+
|
|
590
|
+
return res.data.map(item => {
|
|
591
|
+
return {
|
|
592
|
+
label: item.name,
|
|
593
|
+
value: item.id
|
|
594
|
+
}
|
|
595
|
+
})
|
|
596
|
+
},
|
|
597
|
+
// 建设单位
|
|
598
|
+
async getConstructOperator() {
|
|
599
|
+
let data = {
|
|
600
|
+
source: 'this.getParentByType($organization$).getChildByName($建设单位$).getChildren()',
|
|
601
|
+
userid: Vue.user.id
|
|
602
|
+
}
|
|
603
|
+
|
|
604
|
+
let res = await this.$resetpost(
|
|
605
|
+
`${this.$androidUtil.getProxyUrl()}/rs/search`,
|
|
606
|
+
{data: data},
|
|
607
|
+
{resolveMsg: null, rejectMsg: '建设单位人员查询失败!!!'}
|
|
608
|
+
)
|
|
609
|
+
|
|
610
|
+
return res.data.map(item => {
|
|
611
|
+
return {
|
|
612
|
+
label: item.name,
|
|
613
|
+
value: item.id
|
|
614
|
+
}
|
|
615
|
+
})
|
|
616
|
+
},
|
|
617
|
+
// 监理单位
|
|
618
|
+
async getSupervisorOperator() {
|
|
619
|
+
let data = {
|
|
620
|
+
source: 'this.getParentByType($organization$).getChildByName($监理单位$).getChildren()',
|
|
621
|
+
userid: Vue.user.id
|
|
622
|
+
}
|
|
623
|
+
|
|
624
|
+
let res = await this.$resetpost(
|
|
625
|
+
`${this.$androidUtil.getProxyUrl()}/rs/search`,
|
|
626
|
+
{data: data},
|
|
627
|
+
{resolveMsg: null, rejectMsg: '监理单位人员查询失败!!!'}
|
|
628
|
+
)
|
|
629
|
+
for (const item of this.selectdata.fields) {
|
|
630
|
+
if (item.label === '监理单位') {
|
|
631
|
+
item.value = res.data[0].id
|
|
632
|
+
this.selectdata[item.field] = res.data[0].id
|
|
633
|
+
}
|
|
634
|
+
}
|
|
635
|
+
return res.data.map(item => {
|
|
636
|
+
return {
|
|
637
|
+
label: item.name,
|
|
638
|
+
value: item.id
|
|
639
|
+
}
|
|
640
|
+
})
|
|
641
|
+
},
|
|
642
|
+
// 监理现场负责人
|
|
643
|
+
async getSupervisorOperatorId () {
|
|
644
|
+
let data = {
|
|
645
|
+
source: 'this.getParentByType($organization$).getChildByName($监理班组$).getChildren()',
|
|
646
|
+
userid: Vue.user.id
|
|
647
|
+
}
|
|
648
|
+
let res = await this.$resetpost(
|
|
649
|
+
`${this.$androidUtil.getProxyUrl()}/rs/search`,
|
|
650
|
+
{data: data},
|
|
651
|
+
{resolveMsg: null, rejectMsg: '监理单位人员查询失败!!!'}
|
|
652
|
+
)
|
|
653
|
+
return res.data.map(item => {
|
|
654
|
+
return {
|
|
655
|
+
label: item.name,
|
|
656
|
+
value: item.id
|
|
657
|
+
}
|
|
658
|
+
})
|
|
659
|
+
},
|
|
660
|
+
// 土建单位
|
|
661
|
+
async getEngineeringOperator() {
|
|
662
|
+
let data = {
|
|
663
|
+
source: 'this.getParentByType($organization$).getChildByName($土建单位$).getChildren()',
|
|
664
|
+
userid: Vue.user.id
|
|
665
|
+
}
|
|
666
|
+
|
|
667
|
+
let res = await this.$resetpost(
|
|
668
|
+
`${this.$androidUtil.getProxyUrl()}/rs/search`,
|
|
669
|
+
{data: data},
|
|
670
|
+
{resolveMsg: null, rejectMsg: '土建单位人员查询失败!!!'}
|
|
671
|
+
)
|
|
672
|
+
|
|
673
|
+
let result = res.data.map(item => {
|
|
674
|
+
return {
|
|
675
|
+
label: item.name,
|
|
676
|
+
value: item.id
|
|
677
|
+
}
|
|
678
|
+
})
|
|
679
|
+
result.push({label: '用户自理', value: '用户自理'})
|
|
680
|
+
result.push({label:'无',value:'无'})
|
|
681
|
+
return result
|
|
682
|
+
},
|
|
683
|
+
// 检测单位
|
|
684
|
+
async getCheckOperator() {
|
|
685
|
+
let data = {
|
|
686
|
+
source: 'this.getParentByType($organization$).getChildByName($检测单位$).getChildren()',
|
|
687
|
+
userid: Vue.user.id
|
|
688
|
+
}
|
|
689
|
+
|
|
690
|
+
let res = await this.$resetpost(
|
|
691
|
+
`${this.$androidUtil.getProxyUrl()}/rs/search`,
|
|
692
|
+
{data: data},
|
|
693
|
+
{resolveMsg: null, rejectMsg: '检测单位人员查询失败!!!'}
|
|
694
|
+
)
|
|
695
|
+
|
|
696
|
+
let result = res.data.map(item => {
|
|
697
|
+
return {
|
|
698
|
+
label: item.name,
|
|
699
|
+
value: item.id
|
|
700
|
+
}
|
|
701
|
+
})
|
|
702
|
+
result.push({label:'无',value:'无'})
|
|
703
|
+
return result
|
|
704
|
+
},
|
|
705
|
+
// 获取气表品牌
|
|
706
|
+
async getMeterBrand() {
|
|
707
|
+
let data = {}
|
|
708
|
+
|
|
709
|
+
let http = new HttpResetClass()
|
|
710
|
+
let res = await http.load(
|
|
711
|
+
'POST',
|
|
712
|
+
`${this.$androidUtil.getProxyUrl()}/rs/sql/getMeterBrand`,
|
|
713
|
+
{data: data},
|
|
714
|
+
{resolveMsg: null, rejectMsg: '气表品牌查询失败!!!'}
|
|
715
|
+
)
|
|
716
|
+
|
|
717
|
+
return res.data
|
|
718
|
+
},
|
|
719
|
+
// 获取小区
|
|
720
|
+
async getResidentialArea() {
|
|
721
|
+
let data = {
|
|
722
|
+
tablename: 't_area_address',
|
|
723
|
+
condition: `f_filiale = '${Vue.user.f_fengongsi?Vue.user.f_fengongsi:'榆林.榆川天然气'}' and f_area_status = '启用'`
|
|
724
|
+
}
|
|
725
|
+
let http = new HttpResetClass()
|
|
726
|
+
let res = await http.load(
|
|
727
|
+
'POST',
|
|
728
|
+
`${this.$androidUtil.getProxyUrl()}/rs/sql/applySingleTable`,
|
|
729
|
+
{data: data},
|
|
730
|
+
{resolveMsg: null, rejectMsg: '小区查询失败!!!'}
|
|
731
|
+
)
|
|
732
|
+
return res.data.map(item => {
|
|
733
|
+
return {
|
|
734
|
+
label: item.f_residential_area,
|
|
735
|
+
value: item.id
|
|
736
|
+
}
|
|
737
|
+
})
|
|
738
|
+
},
|
|
739
|
+
//现场勘察
|
|
740
|
+
async prospectingBefore() {
|
|
741
|
+
let data = {
|
|
742
|
+
tablename: 't_files',
|
|
743
|
+
condition: `f_blobid = '${this.selectdata.f_process_id}' and defname = '现场勘察' and fremarks = '报装手机签字文件'`
|
|
744
|
+
}
|
|
745
|
+
let http = new HttpResetClass()
|
|
746
|
+
let res = await http.load(
|
|
747
|
+
'POST',
|
|
748
|
+
`${this.$androidUtil.getProxyUrl()}/rs/sql/applySingleTable`,
|
|
749
|
+
{data: data},
|
|
750
|
+
{resolveMsg: null, rejectMsg: null}
|
|
751
|
+
)
|
|
752
|
+
if (res.data.length <= 0) {
|
|
753
|
+
this.$showAlert('现场勘察未签字,无法提交!!!', 'warning', 3000)
|
|
754
|
+
throw '现场勘察未签字,无法提交!'
|
|
755
|
+
}
|
|
756
|
+
},
|
|
757
|
+
// 施工前置
|
|
758
|
+
async constructionBefore() {
|
|
759
|
+
await this.userSignBefore()
|
|
760
|
+
if (this.show_data.f_apply_nature !== '分户挂表') {
|
|
761
|
+
let http = new HttpResetClass()
|
|
762
|
+
let data = {
|
|
763
|
+
condition: `ui.f_process_id = '${this.show_data.f_process_id}' and f_meternumber is null and f_gasbrand_id is not null `
|
|
764
|
+
}
|
|
765
|
+
let res = await http.load(
|
|
766
|
+
'POST',
|
|
767
|
+
`${this.$androidUtil.getProxyUrl()}/rs/sql/countApplyUserinfo`,
|
|
768
|
+
{data: data},
|
|
769
|
+
{
|
|
770
|
+
resolveMsg: null,
|
|
771
|
+
rejectMsg: '安装明细查询失败!!!'
|
|
772
|
+
})
|
|
773
|
+
if (res.data[0].num > 0) {
|
|
774
|
+
this.$showAlert(`还有${res.data[0].num}户未表号未录入,无法提交`, 'warning', 3000)
|
|
775
|
+
throw `还有${res.data[0].num}户未表号未录入,无法提交`
|
|
776
|
+
}
|
|
777
|
+
}
|
|
778
|
+
},
|
|
779
|
+
async userSignBefore() {
|
|
780
|
+
let http = new HttpResetClass()
|
|
781
|
+
let data = {
|
|
782
|
+
tablename: 't_files',
|
|
783
|
+
condition: `f_blobid = '${this.selectdata.f_process_id}' and defname = '${this.selectdata.defname}' and fremarks = '报装手机签字文件'`
|
|
784
|
+
}
|
|
785
|
+
let res = await http.load(
|
|
786
|
+
'POST',
|
|
787
|
+
`${this.$androidUtil.getProxyUrl()}/rs/sql/applySingleTable`,
|
|
788
|
+
{data: data},
|
|
789
|
+
{resolveMsg: null, rejectMsg: null}
|
|
790
|
+
)
|
|
791
|
+
if (res.data.length <= 0) {
|
|
792
|
+
this.$showAlert('用户未签字,无法生成签字流程!!!', 'warning', 3000)
|
|
793
|
+
throw '用户未签字,无法生成签字流程!'
|
|
794
|
+
}
|
|
795
|
+
},
|
|
796
|
+
signBefore() {
|
|
797
|
+
if (this.show_data.defname === '检测单位签字') {
|
|
798
|
+
if (isEmpty(this.show_data.f_check_sign)) {
|
|
799
|
+
this.$showAlert(`签字后才可提交!!!`, 'warning', 3000)
|
|
800
|
+
throw `签字后才可提交!!!`
|
|
801
|
+
}
|
|
802
|
+
this.show_data.f_check_operator = Vue.user.name
|
|
803
|
+
this.show_data.f_check_date = new Date().Format('yyyy-MM-dd HH:mm:ss')
|
|
804
|
+
this.show_data.employeetemplate = this.show_data.f_build_operator_id
|
|
805
|
+
}
|
|
806
|
+
if (this.show_data.defname === '安装单位签字') {
|
|
807
|
+
if (isEmpty(this.show_data.f_build_sign)) {
|
|
808
|
+
this.$showAlert(`签字后才可提交!!!`, 'warning', 3000)
|
|
809
|
+
throw `签字后才可提交!!!`
|
|
810
|
+
}
|
|
811
|
+
this.show_data.f_build_operator = Vue.user.name
|
|
812
|
+
this.show_data.f_build_date = new Date().Format('yyyy-MM-dd HH:mm:ss')
|
|
813
|
+
this.show_data.employeetemplate = this.show_data.f_engineering_operator_id
|
|
814
|
+
if (this.show_data.f_engineering_operator_id === '用户自理' || this.show_data.f_engineering_operator_id === '无') {
|
|
815
|
+
this.show_data.f_engineering_operator = this.show_data.f_engineering_operator_id
|
|
816
|
+
this.show_data.f_engineering_date = new Date().Format('yyyy-MM-dd HH:mm:ss')
|
|
817
|
+
this.show_data.employeetemplate = this.show_data.f_supervisor_operator_id
|
|
818
|
+
}
|
|
819
|
+
}
|
|
820
|
+
if (this.show_data.defname === '土建单位签字') {
|
|
821
|
+
if (isEmpty(this.show_data.f_engineering_sign)) {
|
|
822
|
+
this.$showAlert(`签字后才可提交!!!`, 'warning', 3000)
|
|
823
|
+
throw `签字后才可提交!!!`
|
|
824
|
+
}
|
|
825
|
+
this.show_data.f_engineering_operator = Vue.user.name
|
|
826
|
+
this.show_data.f_engineering_date = new Date().Format('yyyy-MM-dd HH:mm:ss')
|
|
827
|
+
this.show_data.employeetemplate = this.show_data.f_supervisor_operator_id
|
|
828
|
+
}
|
|
829
|
+
if (this.show_data.defname === '监理单位签字') {
|
|
830
|
+
if (isEmpty(this.show_data.f_supervisor_sign)) {
|
|
831
|
+
this.$showAlert(`签字后才可提交!!!`, 'warning', 3000)
|
|
832
|
+
throw `签字后才可提交!!!`
|
|
833
|
+
}
|
|
834
|
+
this.show_data.f_supervisor_operator = Vue.user.name
|
|
835
|
+
this.show_data.f_supervisor_date = new Date().Format('yyyy-MM-dd HH:mm:ss')
|
|
836
|
+
this.show_data.employeetemplate = this.show_data.f_construct_operator_id
|
|
837
|
+
}
|
|
838
|
+
if (this.show_data.defname === '建设单位签字') {
|
|
839
|
+
if (isEmpty(this.show_data.f_construct_sign)) {
|
|
840
|
+
this.$showAlert(`签字后才可提交!!!`, 'warning', 3000)
|
|
841
|
+
throw `签字后才可提交!!!`
|
|
842
|
+
}
|
|
843
|
+
this.show_data.f_construct_operator = Vue.user.name
|
|
844
|
+
this.show_data.f_construct_date = new Date().Format('yyyy-MM-dd HH:mm:ss')
|
|
845
|
+
}
|
|
846
|
+
},
|
|
847
|
+
//分户挂表生成安检单
|
|
848
|
+
async getChecklist() {
|
|
849
|
+
let http = new HttpResetClass()
|
|
850
|
+
let data = {
|
|
851
|
+
f_process_id: this.selectdata.f_process_id,
|
|
852
|
+
f_userinfo_id: this.selectdata.f_userinfo_id,
|
|
853
|
+
user: Vue.user
|
|
854
|
+
}
|
|
855
|
+
let res = await http.load(
|
|
856
|
+
'POST',
|
|
857
|
+
`${this.$androidUtil.getProxyUrl()}/rs/logic/getChecklist`,
|
|
858
|
+
{data: data},
|
|
859
|
+
{resolveMsg: null, rejectMsg: null}
|
|
860
|
+
)
|
|
861
|
+
},
|
|
862
|
+
//工商户验证表具类型是否需选择
|
|
863
|
+
async meterBrandCheck() {
|
|
864
|
+
let data = {
|
|
865
|
+
f_process_id: this.selectdata.f_process_id,
|
|
866
|
+
orgid:Vue.user.orgid
|
|
867
|
+
}
|
|
868
|
+
let http = new HttpResetClass()
|
|
869
|
+
let res = await http.load(
|
|
870
|
+
'POST',
|
|
871
|
+
`${this.$androidUtil.getProxyUrl()}/rs/sql/meterCheck`,
|
|
872
|
+
{data: data},
|
|
873
|
+
{resolveMsg: null, rejectMsg: null}
|
|
874
|
+
)
|
|
875
|
+
if (res.data[0].num > 0){
|
|
876
|
+
this.$showAlert(`还有${res.data[0].num}处未选择表具,请选择后提交!`, 'warning', 3000)
|
|
877
|
+
throw null
|
|
878
|
+
}
|
|
879
|
+
},
|
|
880
|
+
// 安装户数
|
|
881
|
+
async installCountCheck() {
|
|
882
|
+
let data = {
|
|
883
|
+
tablename: 't_userinfo',
|
|
884
|
+
condition: `f_process_id = '${this.show_data.f_process_id}' and f_user_state != '销户'`,
|
|
885
|
+
}
|
|
886
|
+
|
|
887
|
+
let http = new HttpResetClass()
|
|
888
|
+
let res = await http.load(
|
|
889
|
+
'POST',
|
|
890
|
+
`${this.$androidUtil.getProxyUrl()}/rs/sql/applySingleTable`,
|
|
891
|
+
{data: data},
|
|
892
|
+
{resolveMsg: null, rejectMsg: '用户数量查询失败'}
|
|
893
|
+
)
|
|
894
|
+
this.setLabelValue('安装户数',res.data.length)
|
|
895
|
+
},
|
|
896
|
+
async stopApply () {
|
|
897
|
+
console.log('终止报建!!!!!')
|
|
898
|
+
|
|
899
|
+
if (this.show_data.defname === '报建受理') {
|
|
900
|
+
this.show_data.f_stop_reason = this.show_data.f_accept_result
|
|
901
|
+
}
|
|
902
|
+
if (this.show_data.defname === '现场勘察') {
|
|
903
|
+
this.show_data.f_stop_reason = this.show_data.f_prospecting_result
|
|
904
|
+
}
|
|
905
|
+
|
|
906
|
+
let data = {
|
|
907
|
+
apply: this.show_data,
|
|
908
|
+
user: Vue.user
|
|
909
|
+
}
|
|
910
|
+
|
|
911
|
+
let res = await this.$resetpost(
|
|
912
|
+
`${this.$androidUtil.getProxyUrl()}/rs/logic/stopApply`,
|
|
913
|
+
{data: data},
|
|
914
|
+
{resolveMsg: null, rejectMsg: '终止报建失败!!!'}
|
|
915
|
+
)
|
|
916
|
+
|
|
917
|
+
this.$dispatch('confirm')
|
|
918
|
+
|
|
919
|
+
throw '终止报建!!!'
|
|
920
|
+
},
|
|
921
|
+
// 户内出单日期
|
|
922
|
+
getOutdoorsTime () {
|
|
923
|
+
for (const item of this.selectdata.fields) {
|
|
924
|
+
console.log('是否进入')
|
|
925
|
+
if (item.label === '户内出单日期') {
|
|
926
|
+
item.value = this.selectdata.f_release_date
|
|
927
|
+
this.selectdata[item.field] = item.value
|
|
928
|
+
console.log('当前出单时间',item.value)
|
|
929
|
+
}else if(item.label === '庭院出单日期'){
|
|
930
|
+
item.value = this.selectdata.f_release_date
|
|
931
|
+
this.selectdata[item.field] = item.value
|
|
932
|
+
}
|
|
933
|
+
}
|
|
934
|
+
},
|
|
935
|
+
getGaiXianType () {
|
|
936
|
+
return [{label: "隐患整改", value: "隐患整改"},
|
|
937
|
+
{label: "改造工程", value: "改造工程"},
|
|
938
|
+
{label: "改线工程", value: "改线工程"},
|
|
939
|
+
{label: "老旧小区", value: "老旧小区"}]
|
|
940
|
+
},
|
|
941
|
+
//获取缴费日期
|
|
942
|
+
async getChargeDate() {
|
|
943
|
+
let data = {
|
|
944
|
+
tablename: 'activityins',
|
|
945
|
+
condition: `processid = '${this.selectdata.f_process_id}' and defname = '报装缴费'`,
|
|
946
|
+
}
|
|
947
|
+
|
|
948
|
+
let http = new HttpResetClass()
|
|
949
|
+
let res = await http.load(
|
|
950
|
+
'POST',
|
|
951
|
+
`${this.$androidUtil.getProxyUrl()}/rs/sql/applySingleTable`,
|
|
952
|
+
{data: data},
|
|
953
|
+
{resolveMsg: null, rejectMsg: null}
|
|
954
|
+
)
|
|
955
|
+
for (const item of this.selectdata.fields) {
|
|
956
|
+
if (item.label === '缴费日期') {
|
|
957
|
+
item.value = res.data[0].finishtime
|
|
958
|
+
this.selectdata[item.field] = item.value
|
|
959
|
+
}
|
|
960
|
+
}
|
|
961
|
+
},
|
|
962
|
+
async getSingAct() {
|
|
963
|
+
let data = {
|
|
964
|
+
f_process_id: this.selectdata.f_process_id
|
|
965
|
+
}
|
|
966
|
+
let http = new HttpResetClass()
|
|
967
|
+
let res = await http.load(
|
|
968
|
+
'POST',
|
|
969
|
+
`${this.$androidUtil.getProxyUrl()}/rs/sql/getSingAct`,
|
|
970
|
+
{data: data},
|
|
971
|
+
{resolveMsg: null, rejectMsg: '签字状态查询失败!!!'}
|
|
972
|
+
)
|
|
973
|
+
if (res.data.length > 0) {
|
|
974
|
+
for (const item of this.selectdata.fields) {
|
|
975
|
+
if (item.label === '签字所在环节') {
|
|
976
|
+
item.value = res.data[0].defname
|
|
977
|
+
this.selectdata[item.field] = item.value
|
|
978
|
+
}
|
|
979
|
+
}
|
|
980
|
+
}
|
|
981
|
+
},
|
|
982
|
+
getYiFang() {
|
|
983
|
+
return [{label: '榆林榆川天然气', value: '榆林榆川天然气'},
|
|
984
|
+
{label: this.selectdata.f_user_name, value: this.selectdata.f_user_name},
|
|
985
|
+
{label: '无', value: '无'}]
|
|
986
|
+
},
|
|
987
|
+
async repair() {
|
|
988
|
+
let data = {
|
|
989
|
+
f_process_id: this.show_data.f_process_id
|
|
990
|
+
}
|
|
991
|
+
let http = new HttpResetClass()
|
|
992
|
+
let res = await http.load(
|
|
993
|
+
'POST',
|
|
994
|
+
`${this.$androidUtil.getProxyUrl()}/rs/logic/updateRepair`,
|
|
995
|
+
{data: data},
|
|
996
|
+
{resolveMsg: null, rejectMsg: '维修工单状态修改!!!'}
|
|
997
|
+
)
|
|
998
|
+
this.$dispatch('loadPage')
|
|
999
|
+
throw ''
|
|
1000
|
+
},
|
|
1001
|
+
changeDispatch(value){
|
|
1002
|
+
if (value === '维修安检中心'){
|
|
1003
|
+
this.hideLabels('现场项目负责人', '安装单位', '建设单位', '监理单位', '土建单位', '检测单位', '户内出单日期', '户内回单日期'
|
|
1004
|
+
, '户内施工备注', '庭院出单日期', '庭院回单日期', '庭院施工备注', '是否发起签字', '签字是否完成', '签字所在环节')
|
|
1005
|
+
this.hideButtons('签字')
|
|
1006
|
+
this.electiveLabels('现场项目负责人', '安装单位', '建设单位', '监理单位', '土建单位', '检测单位', '户内出单日期', '户内回单日期'
|
|
1007
|
+
, '户内施工备注', '庭院出单日期', '庭院回单日期', '庭院施工备注', '是否发起签字', '签字是否完成', '签字所在环节')
|
|
1008
|
+
}
|
|
1009
|
+
if (value === '施工工队'){
|
|
1010
|
+
this.showLabels('现场项目负责人', '安装单位', '建设单位', '监理单位', '土建单位', '检测单位', '户内出单日期', '户内回单日期'
|
|
1011
|
+
, '户内施工备注', '庭院出单日期', '庭院回单日期', '庭院施工备注', '是否发起签字', '签字是否完成', '签字所在环节')
|
|
1012
|
+
this.requiredLabels('现场项目负责人', '安装单位', '建设单位', '监理单位', '土建单位', '检测单位', '现场项目负责人', '是否发起签字', '签字是否完成', '签字所在环节')
|
|
1013
|
+
}
|
|
1014
|
+
},
|
|
1015
|
+
geIsOpen(){
|
|
1016
|
+
this.isOpen = false
|
|
1017
|
+
}
|
|
1018
|
+
},
|
|
1019
|
+
events: {
|
|
1020
|
+
// 强制开关阀
|
|
1021
|
+
async 'onOffValve'() {
|
|
1022
|
+
let data = {
|
|
1023
|
+
condition: `ui.f_userinfo_id = '${this.show_data.f_userinfo_id}'`
|
|
1024
|
+
}
|
|
1025
|
+
let http = new HttpResetClass()
|
|
1026
|
+
let res = await http.load(
|
|
1027
|
+
'POST',
|
|
1028
|
+
`${this.$androidUtil.getProxyUrl()}/rs/sql/getApplyUserinfo`,
|
|
1029
|
+
{data: data},
|
|
1030
|
+
{resolveMsg: null, rejectMsg: '档案获取失败!!!'}
|
|
1031
|
+
)
|
|
1032
|
+
|
|
1033
|
+
let userinfo = res.data[0]
|
|
1034
|
+
|
|
1035
|
+
data = {
|
|
1036
|
+
condition: `t_userfiles.f_meternumber = '${userinfo.f_meternumber}'`,
|
|
1037
|
+
contentData: {
|
|
1038
|
+
isOpen: this.show_data.button.button_name === '强制开阀' ? 1 : 0
|
|
1039
|
+
},
|
|
1040
|
+
inputtor: Vue.user.name,
|
|
1041
|
+
instructTitle: this.show_data.button.button_name === '强制开阀' ? '开阀' : '关阀',
|
|
1042
|
+
instructType: '阀门控制',
|
|
1043
|
+
meterBrandName: userinfo.f_alias
|
|
1044
|
+
}
|
|
1045
|
+
res = await http.load(
|
|
1046
|
+
'POST',
|
|
1047
|
+
`${this.$androidUtil.getProxyUrl()}/rs/logic/saveInstruct`,
|
|
1048
|
+
{data: data},
|
|
1049
|
+
{resolveMsg: null, rejectMsg: `${this.show_data.button.button_name}失败!!!`}
|
|
1050
|
+
)
|
|
1051
|
+
|
|
1052
|
+
data = {
|
|
1053
|
+
f_user_id: userinfo.f_user_id,
|
|
1054
|
+
f_userinfo_id: userinfo.f_userinfo_id,
|
|
1055
|
+
record: {
|
|
1056
|
+
f_filiale: Vue.user.f_fengongsi?Vue.user.f_fengongsi:'榆林.榆川天然气',
|
|
1057
|
+
f_instruct_meta_data: this.show_data.button.button_name === '退出强制状态' ? '退出强制阀控' : '进入强制阀控',
|
|
1058
|
+
f_instruct_title: this.show_data.button.button_name === '退出强制状态' ? '退出强制阀控' : '进入强制阀控',
|
|
1059
|
+
f_instruct_type: '阀门控制',
|
|
1060
|
+
f_meternumber: userinfo.f_meternumber,
|
|
1061
|
+
f_operator: Vue.user.name,
|
|
1062
|
+
f_outlets: userinfo.f_outlets,
|
|
1063
|
+
f_reason: this.show_data.button.f_reason,
|
|
1064
|
+
f_user_id: userinfo.f_user_id,
|
|
1065
|
+
f_userinfo_id: userinfo.f_userinfo_id
|
|
1066
|
+
},
|
|
1067
|
+
state: this.show_data.button.button_name === '退出强制状态' ? 0 : 1,
|
|
1068
|
+
}
|
|
1069
|
+
|
|
1070
|
+
res = await http.load(
|
|
1071
|
+
'POST',
|
|
1072
|
+
`${this.$androidUtil.getProxyUrl()}/rs/logic/updateNetWorkValve`,
|
|
1073
|
+
{data: data},
|
|
1074
|
+
{resolveMsg: '执行成功!!!', rejectMsg: `执行失败!!!`}
|
|
1075
|
+
)
|
|
1076
|
+
|
|
1077
|
+
},
|
|
1078
|
+
// 修改用户档案
|
|
1079
|
+
async 'updateUserinfoState'() {
|
|
1080
|
+
let data = {
|
|
1081
|
+
f_userinfo_id: this.show_data.f_userinfo_id
|
|
1082
|
+
}
|
|
1083
|
+
let http = new HttpResetClass()
|
|
1084
|
+
let res = await http.load(
|
|
1085
|
+
'POST',
|
|
1086
|
+
`${this.$androidUtil.getProxyUrl()}/rs/logic/updateUserinfoState`,
|
|
1087
|
+
{data: data},
|
|
1088
|
+
{resolveMsg: '该用户档案已为正常档案,可进行开关阀操作!!!', rejectMsg: '档案状态修改失败!!!'}
|
|
1089
|
+
)
|
|
1090
|
+
|
|
1091
|
+
this.showButtons('退出强制状态', '强制关阀')
|
|
1092
|
+
this.hideButtons('转正式档案')
|
|
1093
|
+
},
|
|
1094
|
+
//开始签字流程
|
|
1095
|
+
async 'startSignActivity'() {
|
|
1096
|
+
this.hideButtons('签字')
|
|
1097
|
+
|
|
1098
|
+
if(this.show_data.f_apply_type !== '管线建设'){
|
|
1099
|
+
await this.constructionBefore()
|
|
1100
|
+
}
|
|
1101
|
+
let data = {
|
|
1102
|
+
apply: this.show_data,
|
|
1103
|
+
user: Vue.user
|
|
1104
|
+
}
|
|
1105
|
+
|
|
1106
|
+
let res = await this.$resetpost(
|
|
1107
|
+
`${this.$androidUtil.getProxyUrl()}/rs/logic/startSignActivity`,
|
|
1108
|
+
{data: data},
|
|
1109
|
+
{resolveMsg: '签字流程已发起!!!', rejectMsg: '签字发起失败!!!'}
|
|
1110
|
+
)
|
|
1111
|
+
|
|
1112
|
+
this.breakControl()
|
|
1113
|
+
},
|
|
1114
|
+
// 工程施工初始化
|
|
1115
|
+
async 'buildReadyEvent'() {
|
|
1116
|
+
if (this.getLableValue('是否发起签字') === '是') {
|
|
1117
|
+
this.hideButtons('签字')
|
|
1118
|
+
}
|
|
1119
|
+
let http = new HttpResetClass()
|
|
1120
|
+
console.log("当前流程",this.show_data.f_apply_type)
|
|
1121
|
+
if (isEmpty(this.show_data.f_meter_brand)) {
|
|
1122
|
+
return
|
|
1123
|
+
}else {
|
|
1124
|
+
if (this.show_data.f_meter_brand === 'null') {
|
|
1125
|
+
this.setLabelOptions('气表型号', [{label: '无', value: 'null'}])
|
|
1126
|
+
return
|
|
1127
|
+
}
|
|
1128
|
+
let data = {
|
|
1129
|
+
f_gasbrand_id: this.show_data.f_meter_brand
|
|
1130
|
+
}
|
|
1131
|
+
let res = await http.load(
|
|
1132
|
+
'POST',
|
|
1133
|
+
`${this.$androidUtil.getProxyUrl()}/rs/sql/getGasModel`,
|
|
1134
|
+
{data: data},
|
|
1135
|
+
{resolveMsg: null, rejectMsg: '气表型号查询失败!!!'}
|
|
1136
|
+
)
|
|
1137
|
+
this.setLabelOptions('气表型号', res.data)
|
|
1138
|
+
}
|
|
1139
|
+
if (this.show_data.f_apply_type === '分户挂表') {
|
|
1140
|
+
let data = {
|
|
1141
|
+
condition: `ui.f_userinfo_id = '${this.show_data.f_userinfo_id}'`
|
|
1142
|
+
}
|
|
1143
|
+
let http = new HttpResetClass()
|
|
1144
|
+
let res = await http.load(
|
|
1145
|
+
'POST',
|
|
1146
|
+
`${this.$androidUtil.getProxyUrl()}/rs/sql/getApplyUserinfo`,
|
|
1147
|
+
{data: data},
|
|
1148
|
+
{resolveMsg: null, rejectMsg: '档案状态获取失败!!!'}
|
|
1149
|
+
)
|
|
1150
|
+
setTimeout(() => {
|
|
1151
|
+
if (res.data[0].f_meter_classify === '物联网表') {
|
|
1152
|
+
if (res.data[0].f_user_state === '正常') {
|
|
1153
|
+
this.showButtons('退出强制状态', '强制关阀')
|
|
1154
|
+
this.hideButtons('转正式档案')
|
|
1155
|
+
} else {
|
|
1156
|
+
this.showButtons('转正式档案')
|
|
1157
|
+
this.hideButtons('退出强制状态', '强制关阀')
|
|
1158
|
+
}
|
|
1159
|
+
}
|
|
1160
|
+
}, 1000)
|
|
1161
|
+
}
|
|
1162
|
+
},
|
|
1163
|
+
// 气表品牌失去焦点
|
|
1164
|
+
async 'meterBrandChenge' (index) {
|
|
1165
|
+
if (isEmpty(this.show_data.f_meter_brand)) {
|
|
1166
|
+
return
|
|
1167
|
+
}
|
|
1168
|
+
this.setLabelValue('气表型号', null)
|
|
1169
|
+
let data = {
|
|
1170
|
+
f_gasbrand_id: this.show_data.f_meter_brand
|
|
1171
|
+
}
|
|
1172
|
+
let http = new HttpResetClass()
|
|
1173
|
+
let res = await http.load(
|
|
1174
|
+
'POST',
|
|
1175
|
+
`${this.$androidUtil.getProxyUrl()}/rs/sql/getGasModel`,
|
|
1176
|
+
{data: data},
|
|
1177
|
+
{resolveMsg: null, rejectMsg: '气表型号查询失败!!!'}
|
|
1178
|
+
)
|
|
1179
|
+
|
|
1180
|
+
this.setLabelOptions('气表型号', res.data)
|
|
1181
|
+
},
|
|
1182
|
+
// 安装户数失去焦点
|
|
1183
|
+
'installCountChange'(index) {
|
|
1184
|
+
if (isEmpty(this.show_data.f_install_count)) {
|
|
1185
|
+
return
|
|
1186
|
+
}
|
|
1187
|
+
if (Number(this.show_data.f_install_count) > Number(this.show_data.f_apply_count)) {
|
|
1188
|
+
this.$showAlert('安装数已超过申请数!!!', 'warning', 3000)
|
|
1189
|
+
// this.setLabelValue('安装户数', null)
|
|
1190
|
+
// this.setLabelValue('安装点数', null)
|
|
1191
|
+
// return
|
|
1192
|
+
}
|
|
1193
|
+
|
|
1194
|
+
if (Number(this.show_data.f_install_count) <= 0) {
|
|
1195
|
+
this.$showAlert('至少有一个用户!!!', 'warning', 3000)
|
|
1196
|
+
this.setLabelValue('安装户数', null)
|
|
1197
|
+
this.setLabelValue('安装点数', null)
|
|
1198
|
+
return
|
|
1199
|
+
}
|
|
1200
|
+
},
|
|
1201
|
+
'complyInstallation'(index) {
|
|
1202
|
+
if (this.show_data.defname === '报建受理'){
|
|
1203
|
+
if (this.show_data.f_accept_install === '否') {
|
|
1204
|
+
console.log("测试")
|
|
1205
|
+
this.hideButtons('下发','提交')
|
|
1206
|
+
this.showButtons('终止')
|
|
1207
|
+
} else {
|
|
1208
|
+
this.hideButtons('终止')
|
|
1209
|
+
this.showButtons('下发','提交')
|
|
1210
|
+
}
|
|
1211
|
+
}
|
|
1212
|
+
if (this.show_data.defname === '现场勘察'){
|
|
1213
|
+
if (this.show_data.f_survey_opinion === '否') {
|
|
1214
|
+
console.log("测试")
|
|
1215
|
+
this.hideButtons('下发','提交')
|
|
1216
|
+
this.showButtons('终止')
|
|
1217
|
+
} else {
|
|
1218
|
+
this.hideButtons('终止')
|
|
1219
|
+
this.showButtons('下发','提交')
|
|
1220
|
+
}
|
|
1221
|
+
}
|
|
1222
|
+
if (this.show_data.defname === '报建受理' || this.show_data.defname === '现场勘察'){
|
|
1223
|
+
this.installCountCheck()
|
|
1224
|
+
}
|
|
1225
|
+
},
|
|
1226
|
+
//搜索小区
|
|
1227
|
+
'selectArea' (val,index) {
|
|
1228
|
+
let pcdText = `and f_residential_area like '%${val}%'`
|
|
1229
|
+
let data = {
|
|
1230
|
+
tablename: 't_area_address',
|
|
1231
|
+
condition: `f_filiale = '${Vue.user.f_fengongsi?Vue.user.f_fengongsi:'榆林.榆川天然气'}' and f_area_status = '启用' ${pcdText}`
|
|
1232
|
+
}
|
|
1233
|
+
new HttpResetClass().load("POST", `${this.$androidUtil.getProxyUrl()}/rs/sql/applySingleTable`, {data:data}, {resolveMsg: null, rejectMsg: null}).then((res)=>{
|
|
1234
|
+
console.log('请求发送完成!!!!!'+JSON.stringify(res))
|
|
1235
|
+
if(res.data.length>0){
|
|
1236
|
+
this.setLabelOptions('小区/巷道', res.data.map(item => {
|
|
1237
|
+
return {
|
|
1238
|
+
label: item.f_residential_area,
|
|
1239
|
+
value: item.id
|
|
1240
|
+
}
|
|
1241
|
+
}))
|
|
1242
|
+
}
|
|
1243
|
+
})
|
|
1244
|
+
},
|
|
1245
|
+
'changeDispatching'(index){
|
|
1246
|
+
if (this.show_data.fields[index].value === '安检维修中心'){
|
|
1247
|
+
this.hideLabels('现场项目负责人', '安装单位', '建设单位', '监理单位', '土建单位', '检测单位')
|
|
1248
|
+
this.electiveLabels('现场项目负责人', '安装单位', '建设单位', '监理单位', '土建单位', '检测单位')
|
|
1249
|
+
}else if (this.show_data.fields[index].value === '施工工队'){
|
|
1250
|
+
this.showLabels('现场项目负责人', '安装单位', '建设单位', '监理单位', '土建单位', '检测单位')
|
|
1251
|
+
this.requiredLabels('现场项目负责人', '安装单位', '建设单位', '监理单位', '土建单位', '检测单位')
|
|
1252
|
+
}
|
|
1253
|
+
},
|
|
1254
|
+
'getRefund'(index){
|
|
1255
|
+
if (this.show_data.fields[index].value === '否'){
|
|
1256
|
+
this.hideLabels('退费金额', '退款项')
|
|
1257
|
+
this.electiveLabels('退费金额', '退款项')
|
|
1258
|
+
}else if (this.show_data.fields[index].value === '是'){
|
|
1259
|
+
this.showLabels('退费金额', '退款项')
|
|
1260
|
+
this.requiredLabels('退费金额', '退款项')
|
|
1261
|
+
}
|
|
1262
|
+
},
|
|
1263
|
+
'hasTrouble'(index) {
|
|
1264
|
+
if (this.show_data.fields[index].value === '有纠纷'){
|
|
1265
|
+
this.hideButtons('提交', '签字', '图纸变更')
|
|
1266
|
+
this.showLabels('纠纷原因')
|
|
1267
|
+
}else {
|
|
1268
|
+
this.showButtons('提交', '签字', '图纸变更')
|
|
1269
|
+
this.hideLabels('纠纷原因')
|
|
1270
|
+
}
|
|
1271
|
+
},
|
|
1272
|
+
// ===========================================
|
|
1273
|
+
'initializtionView'() {
|
|
1274
|
+
if (this.show_data.f_apply_type === '民用报建' && this.show_data.f_apply_nature === '散户') {
|
|
1275
|
+
this.hideLabels('营业执照', '小区/巷道')
|
|
1276
|
+
this.electiveLabels('营业执照', '购货单位识别号', '购货单位银行账号', '购货单位地址电话', '小区/巷道')
|
|
1277
|
+
}
|
|
1278
|
+
if (this.show_data.f_apply_type === '民用报建' && this.show_data.f_apply_nature === '小区') {
|
|
1279
|
+
this.showLabels('营业执照', '小区/巷道', '小区名称')
|
|
1280
|
+
this.requiredLabels( '小区/巷道')
|
|
1281
|
+
this.hideComponents('用户花名单')
|
|
1282
|
+
}
|
|
1283
|
+
},
|
|
1284
|
+
'breakControl'() {
|
|
1285
|
+
this.breakControl()
|
|
1286
|
+
},
|
|
1287
|
+
// 检查重复
|
|
1288
|
+
'checkRepeat'(index) {
|
|
1289
|
+
this.checkDuplicate(index)
|
|
1290
|
+
},
|
|
1291
|
+
async 'button'() {
|
|
1292
|
+
if (this.show_data.button.before) {
|
|
1293
|
+
//判断当前环节
|
|
1294
|
+
if(this.show_data.defname=='现场勘察'||this.show_data.defname=='工程派工' ||this.show_data.defname=='工程施工'||this.show_data.defname=='点火通气' ||this.show_data.defname=='监理单位派工' ||this.show_data.defname=='工程队派工' ||this.show_data.defname=='检测单位签字' ||this.show_data.defname=='土建单位签字' ||this.show_data.defname=='监理单位签字' ||this.show_data.defname=='建设单位签字'){
|
|
1295
|
+
if(this.show_data.button.button_name=='提交' || this.show_data.button.button_name=='保存' || this.show_data.button.button_name=='退回'){
|
|
1296
|
+
let res = await this.$showMessage('是否需要继续此次操作')
|
|
1297
|
+
if (res === 'cancel') {
|
|
1298
|
+
return
|
|
1299
|
+
}else{
|
|
1300
|
+
await this[this.show_data.button.before]()
|
|
1301
|
+
}
|
|
1302
|
+
}
|
|
1303
|
+
}
|
|
1304
|
+
}else{
|
|
1305
|
+
//判断当前环节
|
|
1306
|
+
if(this.show_data.defname=='现场勘察'||this.show_data.defname=='工程派工' ||this.show_data.defname=='工程施工'||this.show_data.defname=='点火通气' ||this.show_data.defname=='监理单位派工' ||this.show_data.defname=='工程队派工'){
|
|
1307
|
+
if(this.show_data.button.button_name=='提交' || this.show_data.button.button_name=='保存' || this.show_data.button.button_name=='退回'){
|
|
1308
|
+
let res = await this.$showMessage('是否需要继续此次操作')
|
|
1309
|
+
if (res === 'cancel') {
|
|
1310
|
+
return
|
|
1311
|
+
}
|
|
1312
|
+
}
|
|
1313
|
+
}
|
|
1314
|
+
|
|
1315
|
+
}
|
|
1316
|
+
// 点击重置按钮就重置数据
|
|
1317
|
+
if (this.show_data.button.button_name === '重置') {
|
|
1318
|
+
this.$dispatch('breakControl', this.selectdata)
|
|
1319
|
+
return
|
|
1320
|
+
}
|
|
1321
|
+
|
|
1322
|
+
this.show_data.start_activity = this.json_datas.start_activity
|
|
1323
|
+
this.show_data.xmlfilename = this.json_datas.workflow_xmlfilename
|
|
1324
|
+
|
|
1325
|
+
let data = {
|
|
1326
|
+
apply: this.show_data,
|
|
1327
|
+
user: Vue.user
|
|
1328
|
+
}
|
|
1329
|
+
console.log("当前提交数据",this.show_data)
|
|
1330
|
+
let res = await this.$resetpost(
|
|
1331
|
+
`${this.$androidUtil.getProxyUrl()}/rs/logic/ApplyProductService`,
|
|
1332
|
+
{data: data},
|
|
1333
|
+
{resolveMsg: null, rejectMsg: '数据保存失败'}
|
|
1334
|
+
)
|
|
1335
|
+
|
|
1336
|
+
if (this.show_data.button.after) {
|
|
1337
|
+
this[this.show_data.button.after]()
|
|
1338
|
+
}
|
|
1339
|
+
// 返回上层
|
|
1340
|
+
this.$dispatch('confirm')
|
|
1341
|
+
},
|
|
1342
|
+
'locationclick' (res) {
|
|
1343
|
+
console.log('/*/*/*/*/*/*/*/*/*/*/*/*/*/**/*/*/*/*')
|
|
1344
|
+
if (res.pname){
|
|
1345
|
+
this.setLabelValue('定位地址', res.pname + res.cityname + res.adname + res.address + res.name)
|
|
1346
|
+
}else {
|
|
1347
|
+
this.setLabelValue('定位地址', res.province + res.city + res.address + res.name)
|
|
1348
|
+
}
|
|
1349
|
+
this.show_data.f_lng = res.location.lng
|
|
1350
|
+
this.show_data.f_lat = res.location.lat
|
|
1351
|
+
this.isOpen = !this.isOpen
|
|
1352
|
+
},
|
|
1353
|
+
selectSearch (val, index) {},
|
|
1354
|
+
// 失去焦点出触发事件
|
|
1355
|
+
'onchange'(index) {
|
|
1356
|
+
},
|
|
1357
|
+
'onblur'(index) {
|
|
1358
|
+
},
|
|
1359
|
+
'oninput'(index) {
|
|
1360
|
+
},
|
|
1361
|
+
async 'onchangeModal'(index, fieldIndex) {
|
|
1362
|
+
},
|
|
1363
|
+
async 'onblurModal'(index, fieldIndex) {
|
|
1364
|
+
|
|
1365
|
+
},
|
|
1366
|
+
async 'oninputModal'(index, fieldIndex) {
|
|
1367
|
+
|
|
1368
|
+
},
|
|
1369
|
+
async 'onetomanydelete'(index, rowIndex) {
|
|
1370
|
+
|
|
1371
|
+
let http = new HttpResetClass()
|
|
1372
|
+
|
|
1373
|
+
let res = await http.load(
|
|
1374
|
+
'DELETE',
|
|
1375
|
+
`${this.$androidUtil.getProxyUrl()}/rs/entity/${this.show_data.onetomany[index].tables[0]}/${this.show_data.onetomany[index].rows[rowIndex].id}`,
|
|
1376
|
+
null,
|
|
1377
|
+
{resolveMsg: null, rejectMsg: '删除失败!!!'}
|
|
1378
|
+
)
|
|
1379
|
+
res = await this.$resetpost(
|
|
1380
|
+
`${this.$androidUtil.getProxyUrl()}/rs/entity/t_apply`,
|
|
1381
|
+
this.show_data
|
|
1382
|
+
)
|
|
1383
|
+
this.breakControl()
|
|
1384
|
+
},
|
|
1385
|
+
async 'onetomanyupdate'(index, rowIndex) {
|
|
1386
|
+
let data = this.show_data.onetomany[index].rows[rowIndex]
|
|
1387
|
+
|
|
1388
|
+
this.show_data.onetomany[index].fields.forEach(item => {
|
|
1389
|
+
data[item.field] = item.value
|
|
1390
|
+
})
|
|
1391
|
+
let res = await this.$resetpost(
|
|
1392
|
+
`${this.$androidUtil.getProxyUrl()}/rs/entity/${this.show_data.onetomany[index].tables[0]}`,
|
|
1393
|
+
data
|
|
1394
|
+
)
|
|
1395
|
+
res = await this.$resetpost(
|
|
1396
|
+
`${this.$androidUtil.getProxyUrl()}/rs/entity/t_apply`,
|
|
1397
|
+
this.show_data
|
|
1398
|
+
)
|
|
1399
|
+
this.breakControl()
|
|
1400
|
+
},
|
|
1401
|
+
async 'onetomanyadd'(index) {
|
|
1402
|
+
let data = {
|
|
1403
|
+
f_process_id: this.show_data.f_process_id,
|
|
1404
|
+
f_operator_id: Vue.user.id,
|
|
1405
|
+
f_operator: Vue.user.name,
|
|
1406
|
+
f_operation_date: new Date().Format('yyyy-MM-dd HH:mm:ss'),
|
|
1407
|
+
f_orgid: Vue.user.orgid,
|
|
1408
|
+
f_orgname: Vue.user.orgs
|
|
1409
|
+
}
|
|
1410
|
+
this.show_data.onetomany[index].fields.forEach(item => {
|
|
1411
|
+
data[item.field] = item.value
|
|
1412
|
+
})
|
|
1413
|
+
let res = await this.$resetpost(
|
|
1414
|
+
`${this.$androidUtil.getProxyUrl()}/rs/entity/${this.show_data.onetomany[index].tables[0]}`,
|
|
1415
|
+
data
|
|
1416
|
+
)
|
|
1417
|
+
res = await this.$resetpost(
|
|
1418
|
+
`${this.$androidUtil.getProxyUrl()}/rs/entity/t_apply`,
|
|
1419
|
+
this.show_data
|
|
1420
|
+
)
|
|
1421
|
+
this.breakControl()
|
|
1422
|
+
},
|
|
1423
|
+
'onbutchange'(index) {
|
|
1424
|
+
|
|
1425
|
+
},
|
|
1426
|
+
'onbutblur'(index) {
|
|
1427
|
+
|
|
1428
|
+
},
|
|
1429
|
+
'onbutinput'(index) {
|
|
1430
|
+
|
|
1431
|
+
}
|
|
1432
|
+
},
|
|
1433
|
+
watch: {}
|
|
1434
|
+
}
|
|
1435
|
+
</script>
|
|
1436
|
+
<style scoped>
|
|
1437
|
+
</style>
|