apply-clients 3.5.5-7 → 3.5.5-8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json
CHANGED
|
@@ -149,28 +149,6 @@
|
|
|
149
149
|
v-model.sync="userRecord.f_contact_phone" />
|
|
150
150
|
</div>
|
|
151
151
|
</div>
|
|
152
|
-
<div class="form-group col-sm-12">
|
|
153
|
-
<label class="col-sm-2 control-label">甲方单位(盖章):</label>
|
|
154
|
-
<div class="col-sm-10">
|
|
155
|
-
<input type="text"
|
|
156
|
-
class="form-control input_view"
|
|
157
|
-
style="width: 100%"
|
|
158
|
-
placeholder="请输入"
|
|
159
|
-
:value.sync="userRecord.f_unit"
|
|
160
|
-
v-model.sync="userRecord.f_unit" />
|
|
161
|
-
</div>
|
|
162
|
-
</div>
|
|
163
|
-
<div class="form-group col-sm-12">
|
|
164
|
-
<label class="col-sm-2 control-label">甲方法定代表人或授权代表:</label>
|
|
165
|
-
<div class="col-sm-10">
|
|
166
|
-
<input type="text"
|
|
167
|
-
class="form-control input_view"
|
|
168
|
-
style="width: 100%"
|
|
169
|
-
placeholder="请输入"
|
|
170
|
-
:value.sync="userRecord.f_representative"
|
|
171
|
-
v-model.sync="userRecord.f_representative" />
|
|
172
|
-
</div>
|
|
173
|
-
</div>
|
|
174
152
|
</div>
|
|
175
153
|
</article>
|
|
176
154
|
<footer slot="modal-footer" class="modal-footer">
|
|
@@ -245,10 +223,6 @@ export default {
|
|
|
245
223
|
f_personnel: "",
|
|
246
224
|
//联系电话
|
|
247
225
|
f_contact_phone: "",
|
|
248
|
-
//甲方单位(盖章)
|
|
249
|
-
f_unit: "",
|
|
250
|
-
//甲方法定代表人或授权代表
|
|
251
|
-
f_representative: ""
|
|
252
226
|
},
|
|
253
227
|
loginInfo: {
|
|
254
228
|
f_operatorid: this.$login.f.id,
|
|
@@ -397,11 +371,7 @@ export default {
|
|
|
397
371
|
//指定人员
|
|
398
372
|
f_personnel: "",
|
|
399
373
|
//联系电话
|
|
400
|
-
f_contact_phone: ""
|
|
401
|
-
//甲方单位(盖章)
|
|
402
|
-
f_unit: "",
|
|
403
|
-
//甲方法定代表人或授权代表
|
|
404
|
-
f_representative: "",
|
|
374
|
+
f_contact_phone: ""
|
|
405
375
|
},
|
|
406
376
|
this.selectList=false
|
|
407
377
|
this.showselect = false
|
|
@@ -0,0 +1,881 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<div class="auto clearfix">
|
|
3
|
+
<show-back-reason :selectdata="show_data"></show-back-reason>
|
|
4
|
+
</div>
|
|
5
|
+
<service-view v-ref:service_show :data="show_data" v-if="showview"></service-view>
|
|
6
|
+
</template>
|
|
7
|
+
<script>
|
|
8
|
+
import Vue from 'vue'
|
|
9
|
+
import {HttpResetClass} from 'vue-client'
|
|
10
|
+
import {isEmpty} from "../../../components/Util";
|
|
11
|
+
// Date格式化
|
|
12
|
+
Date.prototype.Format = function (fmt) {
|
|
13
|
+
var o = {
|
|
14
|
+
'M+': this.getMonth() + 1, // 月份
|
|
15
|
+
'd+': this.getDate(), // 日
|
|
16
|
+
'H+': this.getHours(), // 小时
|
|
17
|
+
'm+': this.getMinutes(), // 分
|
|
18
|
+
's+': this.getSeconds(), // 秒
|
|
19
|
+
'q+': Math.floor((this.getMonth() + 3) / 3), // 季度
|
|
20
|
+
'S': this.getMilliseconds() // 毫秒
|
|
21
|
+
}
|
|
22
|
+
if (/(y+)/.test(fmt)) fmt = fmt.replace(RegExp.$1, (this.getFullYear() + '').substr(4 - RegExp.$1.length))
|
|
23
|
+
for (var k in o) {
|
|
24
|
+
if (new RegExp('(' + k + ')').test(fmt)) fmt = fmt.replace(RegExp.$1, (RegExp.$1.length === 1) ? (o[k]) : (('00' + o[k]).substr(('' + o[k]).length)))
|
|
25
|
+
}
|
|
26
|
+
return fmt
|
|
27
|
+
}
|
|
28
|
+
export default {
|
|
29
|
+
title: '报建监控控制层',
|
|
30
|
+
props: {
|
|
31
|
+
selectdata: {
|
|
32
|
+
type: Object
|
|
33
|
+
},
|
|
34
|
+
nodeSnapshot: {
|
|
35
|
+
type: Boolean,
|
|
36
|
+
default: false
|
|
37
|
+
}
|
|
38
|
+
},
|
|
39
|
+
data() {
|
|
40
|
+
return {
|
|
41
|
+
data: null, // 展示的数据
|
|
42
|
+
json_datas: null, // json配置数据结构
|
|
43
|
+
showview: false, // 控制显示层显示
|
|
44
|
+
show_data: null,
|
|
45
|
+
config: {}
|
|
46
|
+
}
|
|
47
|
+
},
|
|
48
|
+
created () {
|
|
49
|
+
this.refurbish()
|
|
50
|
+
},
|
|
51
|
+
methods: {
|
|
52
|
+
// 初始化模块
|
|
53
|
+
async refurbish() {
|
|
54
|
+
this.json_datas = this.$workflow_vue
|
|
55
|
+
let sum = 0
|
|
56
|
+
let jsonData = {}
|
|
57
|
+
if (!this.json_datas || !this.json_datas.activitys || this.json_datas.activitys.length === 0) {
|
|
58
|
+
this.$showMessage("网络故障,请刷新页面")
|
|
59
|
+
return
|
|
60
|
+
}
|
|
61
|
+
this.json_datas.activitys.forEach(item => {
|
|
62
|
+
if (this.selectdata.defname === item.title) {
|
|
63
|
+
jsonData = item // 拿到当前节点的json配置信息
|
|
64
|
+
sum++ // 节点名一样的个数
|
|
65
|
+
}
|
|
66
|
+
return this.selectdata.defname === item.title // 拿到当前节点的json配置信息
|
|
67
|
+
})
|
|
68
|
+
|
|
69
|
+
if (sum === 0) {
|
|
70
|
+
this.$showMessage(`没有在JSON配置文件中找到活动名为:(${this.selectdata.defname})的节点配置`)
|
|
71
|
+
return
|
|
72
|
+
}
|
|
73
|
+
if (sum > 1) {
|
|
74
|
+
this.$showMessage(`在JSON配置文件中找到活动名为:(${this.selectdata.defname})的节点配置:${sum}个`)
|
|
75
|
+
return
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
this.selectdata = Object.assign({}, this.selectdata, jsonData)
|
|
79
|
+
|
|
80
|
+
// fields 字段填充值
|
|
81
|
+
for (const item of this.selectdata.fields) {
|
|
82
|
+
if (!item.value) {
|
|
83
|
+
item.value = null
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
if (!item.value && (item.default || item.default === 0) && item.type !== 'datepicker') {
|
|
87
|
+
if (item.eval) {
|
|
88
|
+
item.value = eval(item.default)
|
|
89
|
+
} else {
|
|
90
|
+
item.value = item.default
|
|
91
|
+
}
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
if (this.selectdata[item.field]) {
|
|
95
|
+
// 将json字符串格式化赋值给value
|
|
96
|
+
if (String(this.selectdata[item.field]).startsWith("{")) {
|
|
97
|
+
item.value = JSON.parse(this.selectdata[item.field])
|
|
98
|
+
} else {
|
|
99
|
+
item.value = this.selectdata[item.field]
|
|
100
|
+
}
|
|
101
|
+
}
|
|
102
|
+
if (this.selectdata[item.field] === 0) {
|
|
103
|
+
item.value = 0
|
|
104
|
+
}
|
|
105
|
+
|
|
106
|
+
// datepicker
|
|
107
|
+
if (item.type === 'datepicker' && !item.value && item.default) {
|
|
108
|
+
item.value = new Date().Format(`${item.format ? item.format : 'yyyy-MM-dd HH:mm:ss'}`)
|
|
109
|
+
}
|
|
110
|
+
|
|
111
|
+
// 如果配置类型为select,优先从参数列表获取options
|
|
112
|
+
if (item.type === 'select' || item.type === 'checkbox') {
|
|
113
|
+
if (item.param) {
|
|
114
|
+
let temp = this.$appdata.getParam(item.label)
|
|
115
|
+
|
|
116
|
+
if (temp && temp.length > 0) {
|
|
117
|
+
item.options = temp
|
|
118
|
+
}
|
|
119
|
+
|
|
120
|
+
if (item.paramLabel) {
|
|
121
|
+
temp = this.$appdata.getParam(item.paramLabel)
|
|
122
|
+
if (temp && temp.length > 0) {
|
|
123
|
+
item.options = temp
|
|
124
|
+
}
|
|
125
|
+
}
|
|
126
|
+
}
|
|
127
|
+
|
|
128
|
+
if (item.ready) {
|
|
129
|
+
item.options = await this[item.ready]()
|
|
130
|
+
}
|
|
131
|
+
}
|
|
132
|
+
|
|
133
|
+
|
|
134
|
+
if (item.type === 'checkbox') {
|
|
135
|
+
if (this.selectdata[item.field]) {
|
|
136
|
+
item.value = JSON.parse(this.selectdata[item.field])
|
|
137
|
+
} else {
|
|
138
|
+
item.value = []
|
|
139
|
+
}
|
|
140
|
+
}
|
|
141
|
+
|
|
142
|
+
this.selectdata[item.field] = item.value
|
|
143
|
+
|
|
144
|
+
item.readonly = true
|
|
145
|
+
item.disabled = true
|
|
146
|
+
}
|
|
147
|
+
|
|
148
|
+
// 控制组件
|
|
149
|
+
if (this.selectdata.components) {
|
|
150
|
+
this.selectdata.components.forEach(item => {
|
|
151
|
+
item.mark = 1
|
|
152
|
+
if (item.supervisory && this[item.supervisory]()) {
|
|
153
|
+
item.mark = 0
|
|
154
|
+
}
|
|
155
|
+
})
|
|
156
|
+
}
|
|
157
|
+
|
|
158
|
+
// 初始化onetomany
|
|
159
|
+
if (this.selectdata.onetomany) {
|
|
160
|
+
for (const item of this.selectdata.onetomany) {
|
|
161
|
+
let res = null
|
|
162
|
+
if (item.queryEvent) {
|
|
163
|
+
res = this[item.queryEvent]()
|
|
164
|
+
} else {
|
|
165
|
+
let data = {
|
|
166
|
+
tablename: item.tables[0],
|
|
167
|
+
condition: `f_process_id='${this.selectdata.f_process_id}'`
|
|
168
|
+
}
|
|
169
|
+
res = await this.$resetpost(
|
|
170
|
+
'rs/sql/apply_singleTable',
|
|
171
|
+
{data: data},
|
|
172
|
+
{resolveMsg: null, rejectMsg: 'onetomany查询失败'}
|
|
173
|
+
)
|
|
174
|
+
}
|
|
175
|
+
|
|
176
|
+
item.rows = res.data
|
|
177
|
+
|
|
178
|
+
// 初始化onetomany中的fields
|
|
179
|
+
for (const field of item.fields) {
|
|
180
|
+
if (!field.value) {
|
|
181
|
+
if (field.value !== 0) {
|
|
182
|
+
field.value = null
|
|
183
|
+
}
|
|
184
|
+
}
|
|
185
|
+
|
|
186
|
+
if (field.default || field.default === 0) {
|
|
187
|
+
field.value = field.default
|
|
188
|
+
}
|
|
189
|
+
|
|
190
|
+
// datepicker
|
|
191
|
+
if (field.type === 'datepicker' && !field.value && field.default) {
|
|
192
|
+
field.value = new Date().Format(`${field.format ? field.format : 'yyyy-MM-dd HH:mm:ss'}`)
|
|
193
|
+
}
|
|
194
|
+
|
|
195
|
+
if (field.type === 'select') {
|
|
196
|
+
|
|
197
|
+
let temp = this.$appdata.getParam(field.label)
|
|
198
|
+
|
|
199
|
+
if (temp && temp.length > 0) {
|
|
200
|
+
field.options = temp
|
|
201
|
+
}
|
|
202
|
+
|
|
203
|
+
if (field.paramLabel) {
|
|
204
|
+
temp = this.$appdata.getParam(field.paramLabel)
|
|
205
|
+
if (temp && temp.length > 0) {
|
|
206
|
+
item.options = temp
|
|
207
|
+
}
|
|
208
|
+
}
|
|
209
|
+
|
|
210
|
+
}
|
|
211
|
+
}
|
|
212
|
+
|
|
213
|
+
// 隐藏所有操作
|
|
214
|
+
item.hiddenOperate = true
|
|
215
|
+
if (item.supervisory && this[item.supervisory]()) {
|
|
216
|
+
item.hiddenOperate = false
|
|
217
|
+
}
|
|
218
|
+
}
|
|
219
|
+
}
|
|
220
|
+
|
|
221
|
+
// 去除button
|
|
222
|
+
this.selectdata.buttons = null
|
|
223
|
+
|
|
224
|
+
// 完成时间和完成人,部门,分公司
|
|
225
|
+
if (this.selectdata.state === '结束') {
|
|
226
|
+
let http = new HttpResetClass()
|
|
227
|
+
let res = await http.load('POST', 'rs/search', {
|
|
228
|
+
source: 'this.getInfo()',
|
|
229
|
+
userid: this.selectdata.userid
|
|
230
|
+
}, {resolveMsg: null, rejectMsg: '处理人员获取失败!!!'})
|
|
231
|
+
let user = res.data
|
|
232
|
+
this.selectdata.operate_date = new Date(this.selectdata.finishtime).Format('yyyy-MM-dd')
|
|
233
|
+
this.selectdata.operator = this.selectdata.person
|
|
234
|
+
this.selectdata.orgs = user.orgs
|
|
235
|
+
this.selectdata.parentname = user.deps
|
|
236
|
+
}
|
|
237
|
+
|
|
238
|
+
// 未结束且是下发查看指定人员
|
|
239
|
+
if (this.selectdata.state !== '结束' && this.selectdata.actorexpression !== null && this.selectdata.actorexpression.indexOf('PI') === 0) {
|
|
240
|
+
let http = new HttpResetClass()
|
|
241
|
+
let res = await http.load('POST', 'rs/search', {
|
|
242
|
+
source: 'this',
|
|
243
|
+
userid: this.selectdata.actorexpression.substring(3, this.selectdata.actorexpression.length-1)
|
|
244
|
+
}, {resolveMsg: null, rejectMsg: '处理人员获取失败!!!'})
|
|
245
|
+
let user = res.data
|
|
246
|
+
this.selectdata.operate_date = new Date().Format('yyyy-MM-dd')
|
|
247
|
+
this.selectdata.operator = user.name
|
|
248
|
+
this.selectdata.orgs = user.orgs
|
|
249
|
+
this.selectdata.parentname = user.f_department_name
|
|
250
|
+
}
|
|
251
|
+
|
|
252
|
+
// 消除双向绑定,避免子组件(显示层)数据更改,父组件(控制层)也更改
|
|
253
|
+
let temp = JSON.parse(JSON.stringify(this.selectdata))
|
|
254
|
+
|
|
255
|
+
this.show_data = temp
|
|
256
|
+
for (const item of this.show_data.fields) {
|
|
257
|
+
if(item.label==='气价名称'){
|
|
258
|
+
item.value=this.show_data.f_price_name
|
|
259
|
+
}
|
|
260
|
+
}
|
|
261
|
+
this.$nextTick(() => {
|
|
262
|
+
this.showview = true
|
|
263
|
+
})
|
|
264
|
+
},
|
|
265
|
+
// 金额转大写
|
|
266
|
+
smalltoBIG(n) {
|
|
267
|
+
let fraction = ['角', '分'];
|
|
268
|
+
let digit = ['零', '壹', '贰', '叁', '肆', '伍', '陆', '柒', '捌', '玖'];
|
|
269
|
+
let unit = [['元', '万', '亿'], ['', '拾', '佰', '仟']];
|
|
270
|
+
let head = n < 0 ? '欠' : '';
|
|
271
|
+
n = Math.abs(n);
|
|
272
|
+
|
|
273
|
+
let s = '';
|
|
274
|
+
|
|
275
|
+
for (var i = 0; i < fraction.length; i++) {
|
|
276
|
+
s += (digit[Math.floor(n * 10 * Math.pow(10, i)) % 10] + fraction[i]).replace(/零./, '');
|
|
277
|
+
}
|
|
278
|
+
s = s || '整';
|
|
279
|
+
n = Math.floor(n);
|
|
280
|
+
|
|
281
|
+
for (var i = 0; i < unit[0].length && n > 0; i++) {
|
|
282
|
+
let p = '';
|
|
283
|
+
for (var j = 0; j < unit[1].length && n > 0; j++) {
|
|
284
|
+
p = digit[n % 10] + unit[1][j] + p;
|
|
285
|
+
n = Math.floor(n / 10);
|
|
286
|
+
}
|
|
287
|
+
s = p.replace(/(零.)*零$/, '').replace(/^$/, '零') + unit[0][i] + s;
|
|
288
|
+
}
|
|
289
|
+
return head + s.replace(/(零.)*零元/, '元').replace(/(零.)+/g, '零').replace(/^整$/, '零元整')
|
|
290
|
+
},
|
|
291
|
+
getLableValue(label) {
|
|
292
|
+
for (const item of this.show_data.fields) {
|
|
293
|
+
if (item.label === label && item.type !== 'number') {
|
|
294
|
+
return item.value || ''
|
|
295
|
+
}
|
|
296
|
+
if (item.label === label && item.type === 'number') {
|
|
297
|
+
return item.value || 0
|
|
298
|
+
}
|
|
299
|
+
}
|
|
300
|
+
},
|
|
301
|
+
getLableOptions(label) {
|
|
302
|
+
for (const item of this.show_data.fields) {
|
|
303
|
+
if (item.label === label) {
|
|
304
|
+
return item.options
|
|
305
|
+
}
|
|
306
|
+
}
|
|
307
|
+
},
|
|
308
|
+
setLabelValue(label, value) {
|
|
309
|
+
for (const item of this.show_data.fields) {
|
|
310
|
+
if (item.label === label) {
|
|
311
|
+
item.value = value
|
|
312
|
+
this.show_data[item.field] = value
|
|
313
|
+
}
|
|
314
|
+
}
|
|
315
|
+
},
|
|
316
|
+
setLabelOptions(label, options) {
|
|
317
|
+
for (const item of this.show_data.fields) {
|
|
318
|
+
if (item.label === label) {
|
|
319
|
+
item.options = options
|
|
320
|
+
}
|
|
321
|
+
}
|
|
322
|
+
},
|
|
323
|
+
showLabels(...labels) {
|
|
324
|
+
for (const item of this.show_data.fields) {
|
|
325
|
+
if (labels.includes(item.label)) {
|
|
326
|
+
item.hidden = false
|
|
327
|
+
}
|
|
328
|
+
}
|
|
329
|
+
},
|
|
330
|
+
hideLabels(...labels) {
|
|
331
|
+
for (const item of this.show_data.fields) {
|
|
332
|
+
if (labels.includes(item.label)) {
|
|
333
|
+
item.hidden = true
|
|
334
|
+
}
|
|
335
|
+
}
|
|
336
|
+
},
|
|
337
|
+
requiredLabels(...labels) {
|
|
338
|
+
for (const item of this.show_data.fields) {
|
|
339
|
+
if (labels.includes(item.label)) {
|
|
340
|
+
item.required = true
|
|
341
|
+
}
|
|
342
|
+
}
|
|
343
|
+
},
|
|
344
|
+
electiveLabels(...labels) {
|
|
345
|
+
for (const item of this.show_data.fields) {
|
|
346
|
+
if (labels.includes(item.label)) {
|
|
347
|
+
item.required = false
|
|
348
|
+
}
|
|
349
|
+
}
|
|
350
|
+
},
|
|
351
|
+
readonlyLabels(...labels) {
|
|
352
|
+
for (const item of this.show_data.fields) {
|
|
353
|
+
if (labels.includes(item.label)) {
|
|
354
|
+
item.readonly = true
|
|
355
|
+
item.disabled = true
|
|
356
|
+
}
|
|
357
|
+
}
|
|
358
|
+
},
|
|
359
|
+
readwriteLabels(...labels) {
|
|
360
|
+
for (const item of this.show_data.fields) {
|
|
361
|
+
if (labels.includes(item.label)) {
|
|
362
|
+
item.readonly = false
|
|
363
|
+
item.disabled = false
|
|
364
|
+
}
|
|
365
|
+
}
|
|
366
|
+
},
|
|
367
|
+
disabledButtons(...buttons) {
|
|
368
|
+
for (const item of this.show_data.buttons) {
|
|
369
|
+
if (buttons.includes(item.button_name)) {
|
|
370
|
+
item.disabled = true
|
|
371
|
+
}
|
|
372
|
+
}
|
|
373
|
+
},
|
|
374
|
+
enableButtons(...buttons) {
|
|
375
|
+
for (const item of this.show_data.buttons) {
|
|
376
|
+
if (buttons.includes(item.button_name)) {
|
|
377
|
+
item.disabled = false
|
|
378
|
+
}
|
|
379
|
+
}
|
|
380
|
+
},
|
|
381
|
+
showButtons(...buttons) {
|
|
382
|
+
for (const item of this.show_data.buttons) {
|
|
383
|
+
if (buttons.includes(item.button_name)) {
|
|
384
|
+
item.hidden = false
|
|
385
|
+
}
|
|
386
|
+
}
|
|
387
|
+
},
|
|
388
|
+
hideButtons(...buttons) {
|
|
389
|
+
for (const item of this.show_data.buttons) {
|
|
390
|
+
if (buttons.includes(item.button_name)) {
|
|
391
|
+
item.hidden = true
|
|
392
|
+
}
|
|
393
|
+
}
|
|
394
|
+
},
|
|
395
|
+
async checkDuplicate(index) {
|
|
396
|
+
let http = new HttpResetClass()
|
|
397
|
+
let data = {
|
|
398
|
+
tablename: 't_apply',
|
|
399
|
+
condition: `${this.show_data.fields[index].field} = '${this.show_data.fields[index].value}'`
|
|
400
|
+
}
|
|
401
|
+
let res = await http.load('POST', 'rs/sql/apply_singleTable', {data: data}, {
|
|
402
|
+
resolveMsg: null,
|
|
403
|
+
rejectMsg: `${this.show_data.fields[index].label}查询失败`
|
|
404
|
+
})
|
|
405
|
+
if (res.data.length > 0) {
|
|
406
|
+
this.show_data.fields[index].value = null
|
|
407
|
+
this.$showAlert(`${this.show_data.fields[index].label}已存在!!!`, 'warning', 3000)
|
|
408
|
+
}
|
|
409
|
+
},
|
|
410
|
+
// 获取片区/
|
|
411
|
+
async getSliceArea () {
|
|
412
|
+
let data = {
|
|
413
|
+
tablename: 't_community',
|
|
414
|
+
condition: `f_filialeid = '${this.$login.f.orgid}'`
|
|
415
|
+
}
|
|
416
|
+
let http = new HttpResetClass()
|
|
417
|
+
let res = await http.load(
|
|
418
|
+
'POST',
|
|
419
|
+
`rs/sql/apply_singleTable`,
|
|
420
|
+
{data: data},
|
|
421
|
+
{resolveMsg: null, rejectMsg: '区县查询失败!!!'}
|
|
422
|
+
)
|
|
423
|
+
return res.data.map(item => {
|
|
424
|
+
return {
|
|
425
|
+
label: item.f_community_name,
|
|
426
|
+
value: item.f_community_name
|
|
427
|
+
}
|
|
428
|
+
})
|
|
429
|
+
},
|
|
430
|
+
// 获取区县
|
|
431
|
+
async getPcd () {
|
|
432
|
+
let data = {
|
|
433
|
+
tablename: 't_pcd',
|
|
434
|
+
condition: `f_filialeid = '${this.$login.f.orgid}'`
|
|
435
|
+
}
|
|
436
|
+
let res = await this.$resetpost(
|
|
437
|
+
`rs/sql/apply_singleTable`,
|
|
438
|
+
{data: data},
|
|
439
|
+
{resolveMsg: null, rejectMsg: '区县查询失败!!!'}
|
|
440
|
+
)
|
|
441
|
+
|
|
442
|
+
return res.data.map(item => {
|
|
443
|
+
return {
|
|
444
|
+
label: item.f_pcd,
|
|
445
|
+
value: item.f_pcd
|
|
446
|
+
}
|
|
447
|
+
})
|
|
448
|
+
},
|
|
449
|
+
// 缴费前置
|
|
450
|
+
chargeBefore () {
|
|
451
|
+
if (Number(this.show_data.f_due_money) > Number(this.show_data.f_cumulative_payment_money) || Number(this.show_data.f_surplus_money) > 0) {
|
|
452
|
+
this.$showAlert('费用未结清!!!', 'warning', 3000)
|
|
453
|
+
throw null
|
|
454
|
+
}
|
|
455
|
+
},
|
|
456
|
+
// 施工前置
|
|
457
|
+
async constructionBefore () {
|
|
458
|
+
let http = new HttpResetClass()
|
|
459
|
+
let data = {
|
|
460
|
+
condition: `ui.f_process_id = '${this.show_data.f_process_id}' and uf.f_table_state = '待开通'`
|
|
461
|
+
}
|
|
462
|
+
let res = await http.load(
|
|
463
|
+
'POST',
|
|
464
|
+
'rs/sql/countApplyUserinfo',
|
|
465
|
+
{data: data},
|
|
466
|
+
{
|
|
467
|
+
resolveMsg: null,
|
|
468
|
+
rejectMsg: '安装明细查询失败!!!'
|
|
469
|
+
})
|
|
470
|
+
if (res.data[0].num > 0) {
|
|
471
|
+
this.$showAlert(`还有${res.data[0].num}户未安装,无法提交`, 'warning', 3000)
|
|
472
|
+
throw `还有${res.data[0].num}户未安装,无法提交`
|
|
473
|
+
}
|
|
474
|
+
},
|
|
475
|
+
changePipeBuild () {
|
|
476
|
+
if (this.selectdata.f_process_dep === '工程部') {
|
|
477
|
+
return 'this.getParentByType($organization$).getChildByName($工程部报装$).getChildren()'
|
|
478
|
+
}
|
|
479
|
+
if (this.selectdata.f_process_dep === '运营部') {
|
|
480
|
+
return 'this.getParentByType($organization$).getChildByName($运营部报装$).getChildren()'
|
|
481
|
+
}
|
|
482
|
+
},
|
|
483
|
+
async getDevInfo () {
|
|
484
|
+
let data = {
|
|
485
|
+
tablename: 't_dev_info',
|
|
486
|
+
condition: `f_orgid = '${this.$login.f.orgid}'`
|
|
487
|
+
}
|
|
488
|
+
let res = await this.$resetpost(
|
|
489
|
+
`rs/sql/apply_singleTable`,
|
|
490
|
+
{data: data},
|
|
491
|
+
{resolveMsg: null, rejectMsg: '公司查询失败!!!'}
|
|
492
|
+
)
|
|
493
|
+
|
|
494
|
+
return res.data.map(item => {
|
|
495
|
+
return {
|
|
496
|
+
label: item.f_dev_name,
|
|
497
|
+
value: item.f_dev_name
|
|
498
|
+
}
|
|
499
|
+
})
|
|
500
|
+
},
|
|
501
|
+
async getPrice (f_price_id) {
|
|
502
|
+
/* console.log('=======================')
|
|
503
|
+
console.log(f_price_id)
|
|
504
|
+
|
|
505
|
+
let data = {
|
|
506
|
+
condition: `sp.f_orgid = '${this.$login.f.orgid}'`
|
|
507
|
+
}
|
|
508
|
+
|
|
509
|
+
if (!isEmpty(f_price_id)) {
|
|
510
|
+
data.condition = `sp.f_orgid = '${this.$login.f.orgid}' and sp.f_price_id = ${f_price_id}`
|
|
511
|
+
}
|
|
512
|
+
let http = new HttpResetClass()
|
|
513
|
+
let res = await http.load(
|
|
514
|
+
'POST',
|
|
515
|
+
`rs/sql/applyGetPrice`,
|
|
516
|
+
{data: data},
|
|
517
|
+
{resolveMsg: null, rejectMsg: '气价查询失败!!!'}
|
|
518
|
+
)
|
|
519
|
+
|
|
520
|
+
return res.data.map(item => {
|
|
521
|
+
return {
|
|
522
|
+
label: item.f_price_name,
|
|
523
|
+
value: item
|
|
524
|
+
}
|
|
525
|
+
})*/
|
|
526
|
+
},
|
|
527
|
+
materialSupervisory () {
|
|
528
|
+
if (this.selectdata.userid === this.$login.f.id) {
|
|
529
|
+
return true
|
|
530
|
+
}
|
|
531
|
+
return false
|
|
532
|
+
},
|
|
533
|
+
async getDesignerPeople () {
|
|
534
|
+
let data = {
|
|
535
|
+
source: 'this.getParentByType($organization$).getChildByName($设计部报装$).getChildren()',
|
|
536
|
+
userid: this.$login.f.id
|
|
537
|
+
}
|
|
538
|
+
|
|
539
|
+
let http = new HttpResetClass()
|
|
540
|
+
let res = await http.load(
|
|
541
|
+
'POST',
|
|
542
|
+
`rs/search`,
|
|
543
|
+
{data: data},
|
|
544
|
+
{resolveMsg: null, rejectMsg: '设计人员查询失败!!!'}
|
|
545
|
+
)
|
|
546
|
+
|
|
547
|
+
return res.data.map(item => {
|
|
548
|
+
return {
|
|
549
|
+
label: item.name,
|
|
550
|
+
value: item.id
|
|
551
|
+
}
|
|
552
|
+
})
|
|
553
|
+
},
|
|
554
|
+
// 获取区县
|
|
555
|
+
async getArea () {
|
|
556
|
+
let data = {
|
|
557
|
+
tablename: 't_area',
|
|
558
|
+
condition: `f_filialeid = '${this.$login.f.orgid}'`
|
|
559
|
+
}
|
|
560
|
+
let http = new HttpResetClass()
|
|
561
|
+
let res = await http.load(
|
|
562
|
+
'POST',
|
|
563
|
+
`rs/sql/apply_singleTable`,
|
|
564
|
+
{data: data},
|
|
565
|
+
{resolveMsg: null, rejectMsg: '集收单位查询失败!!!'}
|
|
566
|
+
)
|
|
567
|
+
|
|
568
|
+
return res.data.map(item => {
|
|
569
|
+
return {
|
|
570
|
+
label: item.f_residential_area,
|
|
571
|
+
value: item.f_residential_area
|
|
572
|
+
}
|
|
573
|
+
})
|
|
574
|
+
}
|
|
575
|
+
},
|
|
576
|
+
events:{
|
|
577
|
+
'complyInstallation' (index) {
|
|
578
|
+
},
|
|
579
|
+
// 选择材料
|
|
580
|
+
async materialNameChenge (index, fieldIndex) {
|
|
581
|
+
let material = this.show_data.onetomany[index].fields[fieldIndex].value
|
|
582
|
+
|
|
583
|
+
this.show_data.onetomany[index].fields.forEach(item => {
|
|
584
|
+
if (material[item.field]) {
|
|
585
|
+
item.value = material[item.field]
|
|
586
|
+
}
|
|
587
|
+
})
|
|
588
|
+
},
|
|
589
|
+
// 打开模态框获取材料
|
|
590
|
+
async 'getMaterialName' (index) {
|
|
591
|
+
let data = {
|
|
592
|
+
condition: `1=1`
|
|
593
|
+
}
|
|
594
|
+
let http = new HttpResetClass()
|
|
595
|
+
let res = await http.load(
|
|
596
|
+
'POST',
|
|
597
|
+
`rs/sql/getStockMaterial`,
|
|
598
|
+
{data: data},
|
|
599
|
+
{resolveMsg: null, rejectMsg: '材料查询失败!!!'}
|
|
600
|
+
)
|
|
601
|
+
|
|
602
|
+
this.show_data.onetomany[index].fields.forEach(field => {
|
|
603
|
+
if (field.label === '选择材料') {
|
|
604
|
+
field.options = res.data.map(item => {
|
|
605
|
+
return {
|
|
606
|
+
'label': `${item.f_material_name}--${item.f_material_style}--${item.f_material_unit}`,
|
|
607
|
+
'value': item
|
|
608
|
+
}
|
|
609
|
+
})
|
|
610
|
+
}
|
|
611
|
+
})
|
|
612
|
+
},
|
|
613
|
+
// 终止报建初始化·
|
|
614
|
+
async 'stopApplyReadyEvent' () {
|
|
615
|
+
|
|
616
|
+
let f_is_stop = this.getLableValue('是否终止')
|
|
617
|
+
|
|
618
|
+
for (const item of this.show_data.fields) {
|
|
619
|
+
if (f_is_stop === '是') {
|
|
620
|
+
if (item.label === '终止原因') {
|
|
621
|
+
item.hidden = false
|
|
622
|
+
item.required = true
|
|
623
|
+
}
|
|
624
|
+
} else {
|
|
625
|
+
if (item.label === '终止原因') {
|
|
626
|
+
item.hidden = true
|
|
627
|
+
item.required = false
|
|
628
|
+
}
|
|
629
|
+
}
|
|
630
|
+
}
|
|
631
|
+
|
|
632
|
+
if (isEmpty(this.show_data.f_parent_process_id)) {
|
|
633
|
+
return
|
|
634
|
+
}
|
|
635
|
+
let data = {
|
|
636
|
+
condition: `f_process_id = '${this.show_data.f_parent_process_id}'`,
|
|
637
|
+
data: {
|
|
638
|
+
id: this.$login.f.id,
|
|
639
|
+
orgid: this.$login.f.orgid
|
|
640
|
+
}
|
|
641
|
+
}
|
|
642
|
+
let res = await this.$resetpost(
|
|
643
|
+
`rs/sql/supervisory`,
|
|
644
|
+
{data: data},
|
|
645
|
+
{resolveMsg: null, rejectMsg: '项目查询失败!!!'}
|
|
646
|
+
)
|
|
647
|
+
this.show_data.parentApply = res.data[0]
|
|
648
|
+
},
|
|
649
|
+
// 通气点火初始化
|
|
650
|
+
async 'gasReadyEvent' () {
|
|
651
|
+
/*if (!isEmpty(this.show_data.f_price_id)) {
|
|
652
|
+
let priceList = await this.getPrice(this.show_data.f_price_id)
|
|
653
|
+
this.setLabelValue('气价名称', priceList[0].value)
|
|
654
|
+
}*/
|
|
655
|
+
|
|
656
|
+
|
|
657
|
+
// 保险初始化显示内容
|
|
658
|
+
let f_is_insure = this.getLableValue('是否购买保险')
|
|
659
|
+
for (const item of this.show_data.fields) {
|
|
660
|
+
if (f_is_insure === '是') {
|
|
661
|
+
if (item.label === '保费开始日期' || item.label === '保费结束日期' || item.label === '险种' || item.label === '保费金额') {
|
|
662
|
+
item.hidden = false
|
|
663
|
+
item.required = true
|
|
664
|
+
}
|
|
665
|
+
if (item.label === '保险备注') {
|
|
666
|
+
item.hidden = false
|
|
667
|
+
}
|
|
668
|
+
} else {
|
|
669
|
+
if (item.label === '保费开始日期' || item.label === '保费结束日期' || item.label === '险种' || item.label === '保费金额') {
|
|
670
|
+
item.hidden = true
|
|
671
|
+
item.required = false
|
|
672
|
+
}
|
|
673
|
+
if (item.label === '保险备注') {
|
|
674
|
+
item.hidden = true
|
|
675
|
+
}
|
|
676
|
+
}
|
|
677
|
+
}
|
|
678
|
+
},
|
|
679
|
+
// 申请节点初始化
|
|
680
|
+
'applyReadyEvent' () {
|
|
681
|
+
this.$getConfig(this, 'UserAddress')
|
|
682
|
+
|
|
683
|
+
let f_address_type = this.show_data.f_address_type
|
|
684
|
+
|
|
685
|
+
for (const item of this.show_data.fields) {
|
|
686
|
+
if (f_address_type === '民用市区') {
|
|
687
|
+
if (item.label === '区/县' || item.label === '街道/乡镇' || item.label === '集收单位' || item.label === '门牌号') {
|
|
688
|
+
item.hidden = false
|
|
689
|
+
item.required = true
|
|
690
|
+
}
|
|
691
|
+
if (item.label === '楼号/组' || item.label === '单元/排' || item.label === '楼层') {
|
|
692
|
+
item.hidden = false
|
|
693
|
+
item.required = false
|
|
694
|
+
}
|
|
695
|
+
if (item.label === '地址') {
|
|
696
|
+
item.readonly = true
|
|
697
|
+
}
|
|
698
|
+
}
|
|
699
|
+
if (f_address_type === '民用乡镇') {
|
|
700
|
+
if (item.label === '区/县' || item.label === '街道/乡镇' || item.label === '集收单位' || item.label === '门牌号') {
|
|
701
|
+
item.hidden = false
|
|
702
|
+
item.required = true
|
|
703
|
+
}
|
|
704
|
+
if (item.label === '楼号/组' || item.label === '单元/排' || item.label === '楼层') {
|
|
705
|
+
item.hidden = false
|
|
706
|
+
item.required = false
|
|
707
|
+
}
|
|
708
|
+
if (item.label === '楼层') {
|
|
709
|
+
item.hidden = true
|
|
710
|
+
item.required = false
|
|
711
|
+
}
|
|
712
|
+
if (item.label === '地址') {
|
|
713
|
+
item.readonly = true
|
|
714
|
+
}
|
|
715
|
+
}
|
|
716
|
+
if (f_address_type === '特殊地址') {
|
|
717
|
+
if (item.label === '区/县' || item.label === '街道/乡镇') {
|
|
718
|
+
item.hidden = false
|
|
719
|
+
item.required = true
|
|
720
|
+
}
|
|
721
|
+
if (item.label === '集收单位') {
|
|
722
|
+
item.hidden = false
|
|
723
|
+
item.required = false
|
|
724
|
+
}
|
|
725
|
+
if (item.label === '楼号/组' || item.label === '单元/排' || item.label === '楼层' || item.label === '门牌号') {
|
|
726
|
+
item.hidden = true
|
|
727
|
+
item.required = false
|
|
728
|
+
}
|
|
729
|
+
if (item.label === '地址') {
|
|
730
|
+
item.readonly = false
|
|
731
|
+
}
|
|
732
|
+
}
|
|
733
|
+
|
|
734
|
+
if (this.show_data.f_apply_source === '线下发起' && item.label === '预约地址') {
|
|
735
|
+
item.hidden = true
|
|
736
|
+
}
|
|
737
|
+
}
|
|
738
|
+
},
|
|
739
|
+
// 失去焦点出触发事件
|
|
740
|
+
'onchange' (index) {
|
|
741
|
+
if (this.show_data.defname === '报装申请' || this.show_data.defname === '信息确认') {
|
|
742
|
+
if (
|
|
743
|
+
this.show_data.fields[index].label === '区/县' ||
|
|
744
|
+
this.show_data.fields[index].label === '街道/乡镇' ||
|
|
745
|
+
this.show_data.fields[index].label === '集收单位' ||
|
|
746
|
+
this.show_data.fields[index].label === '楼号/组' ||
|
|
747
|
+
this.show_data.fields[index].label === '单元/排' ||
|
|
748
|
+
this.show_data.fields[index].label === '楼层' ||
|
|
749
|
+
this.show_data.fields[index].label === '门牌号'
|
|
750
|
+
) {
|
|
751
|
+
|
|
752
|
+
let f_pcd = this.getLableValue('区/县') || ''
|
|
753
|
+
let f_street = this.getLableValue('街道/乡镇') || ''
|
|
754
|
+
let f_residential_area = this.getLableValue('集收单位') || ''
|
|
755
|
+
let f_building = this.getLableValue('楼号/组') || ''
|
|
756
|
+
let f_building_suffix = f_building ? this.config.f_building_suffix : ''
|
|
757
|
+
let f_unit = this.getLableValue('单元/排') || ''
|
|
758
|
+
let f_unit_suffix = f_unit ? this.config.f_unit_suffix : ''
|
|
759
|
+
let f_floor = this.getLableValue('楼层') || ''
|
|
760
|
+
let f_floor_suffix = f_floor ? this.config.f_floor_suffix : ''
|
|
761
|
+
let f_room = this.getLableValue('门牌号') || ''
|
|
762
|
+
let f_room_suffix = f_room ? this.config.f_room_suffix : ''
|
|
763
|
+
|
|
764
|
+
let f_address = f_pcd + f_street + f_residential_area + f_building + f_building_suffix + f_unit + f_unit_suffix + f_floor + f_floor_suffix + f_room + f_room_suffix
|
|
765
|
+
this.setLabelValue("地址", f_address)
|
|
766
|
+
}
|
|
767
|
+
}
|
|
768
|
+
},
|
|
769
|
+
// =============================
|
|
770
|
+
selectSearch (val, index) {},
|
|
771
|
+
'onblur' (index) {},
|
|
772
|
+
'oninput' (index) {},
|
|
773
|
+
'initializtionView' () {},
|
|
774
|
+
async 'onchangeModal' (index, fieldIndex) {
|
|
775
|
+
},
|
|
776
|
+
async 'onblurModal' (index, fieldIndex) {
|
|
777
|
+
|
|
778
|
+
},
|
|
779
|
+
async 'oninputModal' (index, fieldIndex) {
|
|
780
|
+
|
|
781
|
+
},
|
|
782
|
+
async 'onetomanydelete' (index, rowIndex) {
|
|
783
|
+
|
|
784
|
+
let http = new HttpResetClass()
|
|
785
|
+
|
|
786
|
+
let res = await http.load(
|
|
787
|
+
'DELETE',
|
|
788
|
+
`rs/entity/${this.show_data.onetomany[index].tables[0]}/${this.show_data.onetomany[index].rows[rowIndex].id}`,
|
|
789
|
+
null,
|
|
790
|
+
{resolveMsg: null, rejectMsg: '删除失败!!!'}
|
|
791
|
+
)
|
|
792
|
+
|
|
793
|
+
res = await this.$resetpost(
|
|
794
|
+
'rs/entity/t_apply',
|
|
795
|
+
this.show_data
|
|
796
|
+
)
|
|
797
|
+
|
|
798
|
+
this.$dispatch('breakControl', this.show_data)
|
|
799
|
+
},
|
|
800
|
+
async 'onetomanyupdate' (index, rowIndex) {
|
|
801
|
+
let data = this.show_data.onetomany[index].rows[rowIndex]
|
|
802
|
+
|
|
803
|
+
this.show_data.onetomany[index].fields.forEach(item => {
|
|
804
|
+
data[item.field] = item.value
|
|
805
|
+
})
|
|
806
|
+
let res = await this.$resetpost(
|
|
807
|
+
`rs/entity/${this.show_data.onetomany[index].tables[0]}`,
|
|
808
|
+
data
|
|
809
|
+
)
|
|
810
|
+
|
|
811
|
+
res = await this.$resetpost(
|
|
812
|
+
'rs/entity/t_apply',
|
|
813
|
+
this.show_data
|
|
814
|
+
)
|
|
815
|
+
|
|
816
|
+
this.$dispatch('breakControl', this.show_data)
|
|
817
|
+
},
|
|
818
|
+
async 'onetomanyadd' (index) {
|
|
819
|
+
let data = {
|
|
820
|
+
f_process_id : this.show_data.f_process_id,
|
|
821
|
+
f_operator_id: this.$login.f.id,
|
|
822
|
+
f_operator: this.$login.f.name,
|
|
823
|
+
f_operation_date: new Date().Format('yyyy-MM-dd HH:mm:ss'),
|
|
824
|
+
f_orgid: this.$login.f.orgid,
|
|
825
|
+
f_orgname: this.$login.f.orgs
|
|
826
|
+
}
|
|
827
|
+
this.show_data.onetomany[index].fields.forEach(item => {
|
|
828
|
+
data[item.field] = item.value
|
|
829
|
+
})
|
|
830
|
+
let res = await this.$resetpost(
|
|
831
|
+
`rs/entity/${this.show_data.onetomany[index].tables[0]}`,
|
|
832
|
+
data
|
|
833
|
+
)
|
|
834
|
+
|
|
835
|
+
res = await this.$resetpost(
|
|
836
|
+
'rs/entity/t_apply',
|
|
837
|
+
this.show_data
|
|
838
|
+
)
|
|
839
|
+
|
|
840
|
+
this.$dispatch('breakControl', this.show_data)
|
|
841
|
+
},
|
|
842
|
+
async 'importEvent' (index, table, configName, filepath) {
|
|
843
|
+
let data = {
|
|
844
|
+
selectdata: this.show_data,
|
|
845
|
+
table: table,
|
|
846
|
+
filepath: filepath,
|
|
847
|
+
configName: configName,
|
|
848
|
+
user: this.$login.f
|
|
849
|
+
}
|
|
850
|
+
|
|
851
|
+
let res = await this.$resetpost(
|
|
852
|
+
`rs/logic/importEvent`,
|
|
853
|
+
data
|
|
854
|
+
)
|
|
855
|
+
|
|
856
|
+
this.$dispatch('breakControl', this.show_data)
|
|
857
|
+
},
|
|
858
|
+
'onbutchange' (index) {
|
|
859
|
+
|
|
860
|
+
},
|
|
861
|
+
'onbutblur' (index) {
|
|
862
|
+
|
|
863
|
+
},
|
|
864
|
+
'onbutinput' (index) {
|
|
865
|
+
|
|
866
|
+
}
|
|
867
|
+
},
|
|
868
|
+
watch: {
|
|
869
|
+
deep: true
|
|
870
|
+
}
|
|
871
|
+
}
|
|
872
|
+
</script>
|
|
873
|
+
<style scoped>
|
|
874
|
+
/*清除model中的浮动*/
|
|
875
|
+
.clearfix:after,.clearfix:before{
|
|
876
|
+
display: table;
|
|
877
|
+
}
|
|
878
|
+
.clearfix:after{
|
|
879
|
+
clear: both;
|
|
880
|
+
}
|
|
881
|
+
</style>
|
package/src/filiale/fugou/pc.js
CHANGED
|
@@ -11,6 +11,7 @@ let specialComp = {
|
|
|
11
11
|
'apply-charge-report': (resolve) => { require(['./pc/chargeReport'], resolve) },
|
|
12
12
|
'service-view': (resolve) => { require(['./pc/serviceview'], resolve) },
|
|
13
13
|
'apply-charge-list': (resolve) => { require(['./pc/ApplyChargeList'], resolve) },
|
|
14
|
-
'apply-print-chargepc': (resolve) => { require(['./pc/printChargepc'], resolve) }
|
|
14
|
+
'apply-print-chargepc': (resolve) => { require(['./pc/printChargepc'], resolve) },
|
|
15
|
+
'supervisory-service-control': (resolve) => { require(['./pc/SupervisoryServiceControl'], resolve) }
|
|
15
16
|
}
|
|
16
17
|
exports.specialComp = specialComp
|