apply-clients 7.1.36-yuchuan-61 → 7.1.36-yuchuan-63
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/build/dev-server.js +187 -187
- package/package.json +1 -1
- package/src/components/android/Process/Processes/AppInstallationDetails.vue +7 -4
- package/src/components/android/Process/Processes/newAppInstallationDetails.vue +2 -2
- package/src/components/android/SealBind.vue +13 -3
- package/src/components/product/ApplyCharge/ApplyChargeList.vue +1103 -1101
- package/src/components/product/Function/Service/FunctionServiceControl.vue +581 -581
- package/src/components/product/List/OldShowDevices.vue +272 -272
- 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 +716 -714
- package/src/components/product/Process/Service/ServiceControl.vue +2223 -2223
- package/src/components/product/ServiceView.vue +650 -648
- package/src/components/product/Supervisory/YiBanSupervisoryList.vue +543 -543
|
@@ -1,581 +1,581 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<service-view v-ref:serviceview :data="show_data" v-if="showview"></service-view>
|
|
3
|
-
</template>
|
|
4
|
-
<script>
|
|
5
|
-
import {HttpResetClass} from 'vue-client'
|
|
6
|
-
import Vue from 'vue'
|
|
7
|
-
export default {
|
|
8
|
-
title: '报建功能业务控制层',
|
|
9
|
-
props: ['selectdata'],
|
|
10
|
-
data () {
|
|
11
|
-
return {
|
|
12
|
-
show_data: null, // 给通用页面显示的数据
|
|
13
|
-
showview: false, // 控制通用页面
|
|
14
|
-
recording: 0, // 是否有缴费记录
|
|
15
|
-
}
|
|
16
|
-
},
|
|
17
|
-
ready () {
|
|
18
|
-
this.refurbish()
|
|
19
|
-
},
|
|
20
|
-
methods: {
|
|
21
|
-
// 判断是否有缴费记录
|
|
22
|
-
getCheckPayRecording () {
|
|
23
|
-
let http = new HttpResetClass()
|
|
24
|
-
let data = {
|
|
25
|
-
f_process_id: this.selectdata.f_process_id,
|
|
26
|
-
user: this.$login.f,
|
|
27
|
-
paynum:'',
|
|
28
|
-
}
|
|
29
|
-
let res = http.load('POST', 'rs/logic/getCheckPay', {data:data}, {
|
|
30
|
-
resolveMsg: null,
|
|
31
|
-
rejectMsg: '缴费记录查询失败!!!'
|
|
32
|
-
})
|
|
33
|
-
// 有缴费记录
|
|
34
|
-
if (res.data> 0) {
|
|
35
|
-
this.recording = 1
|
|
36
|
-
|
|
37
|
-
}
|
|
38
|
-
},
|
|
39
|
-
modifData(fields,falg){
|
|
40
|
-
fields.forEach(item => {
|
|
41
|
-
if((item.label=='工程费单价'||item.label=='应交总金额'|| item.label=='未结总金额')&&falg==1){
|
|
42
|
-
this.readwriteLabels(item.label)
|
|
43
|
-
}
|
|
44
|
-
if((item.label=='工程费单价'||item.label=='应交总金额'|| item.label=='未结总金额')&&falg==0){
|
|
45
|
-
this.readonlyLabels(item.label)
|
|
46
|
-
}
|
|
47
|
-
})
|
|
48
|
-
},
|
|
49
|
-
//根据缴费记录判断是否可编辑
|
|
50
|
-
async getCheckPay (fields, defname,type) {
|
|
51
|
-
console.log(fields)
|
|
52
|
-
let http = new HttpResetClass()
|
|
53
|
-
let data = {
|
|
54
|
-
f_process_id: this.selectdata.f_process_id,
|
|
55
|
-
user: this.$login.f,
|
|
56
|
-
paynum:'',
|
|
57
|
-
}
|
|
58
|
-
let res = await http.load('POST', 'rs/logic/getCheckPay', {data:data}, {
|
|
59
|
-
resolveMsg: null,
|
|
60
|
-
rejectMsg: '缴费记录查询失败!!!'
|
|
61
|
-
})
|
|
62
|
-
// 有缴费记录
|
|
63
|
-
if (res.data> 0) {
|
|
64
|
-
if(type=='非民用报建'||type=='设备变更'){
|
|
65
|
-
if(defname=='报装缴费'){
|
|
66
|
-
fields.forEach(item => {
|
|
67
|
-
if(item.label=='收费标准备注'){
|
|
68
|
-
this.showLabels(item.label)
|
|
69
|
-
}
|
|
70
|
-
})
|
|
71
|
-
}
|
|
72
|
-
}
|
|
73
|
-
//使用foreach遍历fields
|
|
74
|
-
if(defname=='报装缴费'){
|
|
75
|
-
fields.forEach(item => {
|
|
76
|
-
if(item.label=='收费标准备注'||item.label=='票据类型'||item.label=='报警器'||item.label=='购货单位识别号'||item.label=='购货单位名称'||item.label=='购货单位开户'||item.label=='购货单位地址电话'||item.label=='购货单位银行账号'){
|
|
77
|
-
this.readonlyLabels(item.label)
|
|
78
|
-
}
|
|
79
|
-
})
|
|
80
|
-
}
|
|
81
|
-
}else{ //无缴费记录
|
|
82
|
-
if(type=='非民用报建'||type=='设备变更'){
|
|
83
|
-
if(defname=='报装缴费'){
|
|
84
|
-
fields.forEach(item => {
|
|
85
|
-
if(item.label=='收费标准备注'){
|
|
86
|
-
this.showLabels(item.label)
|
|
87
|
-
}
|
|
88
|
-
})
|
|
89
|
-
}
|
|
90
|
-
}
|
|
91
|
-
if(defname=='报装缴费'){
|
|
92
|
-
fields.forEach(item => {
|
|
93
|
-
if(item.label=='收费标准备注'||item.label=='票据类型'||item.label=='报警器'||item.label=='购货单位识别号'||item.label=='购货单位名称'||item.label=='购货单位开户'||item.label=='购货单位地址电话'||item.label=='购货单位银行账号'){
|
|
94
|
-
this.readwriteLabels(item.label)
|
|
95
|
-
}
|
|
96
|
-
})
|
|
97
|
-
}
|
|
98
|
-
}
|
|
99
|
-
},
|
|
100
|
-
async refurbish () {
|
|
101
|
-
// fields 字段填充值
|
|
102
|
-
for (const item of this.selectdata.fields) {
|
|
103
|
-
if (!item.value) {
|
|
104
|
-
item.value = null
|
|
105
|
-
}
|
|
106
|
-
if (!item.value && (item.default || item.default === 0) && item.type !== 'datepicker') {
|
|
107
|
-
if (item.eval) {
|
|
108
|
-
item.value = eval(item.default)
|
|
109
|
-
} else {
|
|
110
|
-
item.value = item.default
|
|
111
|
-
}
|
|
112
|
-
}
|
|
113
|
-
if (this.selectdata[item.field]) {
|
|
114
|
-
// 将json字符串格式化赋值给value
|
|
115
|
-
if (String(this.selectdata[item.field]).startsWith("{")) {
|
|
116
|
-
item.value = JSON.parse(this.selectdata[item.field])
|
|
117
|
-
} else {
|
|
118
|
-
item.value = this.selectdata[item.field]
|
|
119
|
-
}
|
|
120
|
-
}
|
|
121
|
-
if (this.selectdata[item.field] === 0) {
|
|
122
|
-
item.value = 0
|
|
123
|
-
}
|
|
124
|
-
|
|
125
|
-
// datepicker
|
|
126
|
-
if (item.type === 'datepicker' && !item.value && item.default) {
|
|
127
|
-
item.value = new Date().Format(`${item.format ? item.format : 'yyyy-MM-dd HH:mm:ss'}`)
|
|
128
|
-
}
|
|
129
|
-
|
|
130
|
-
// 如果配置类型为select,优先从参数列表获取options
|
|
131
|
-
if (item.type === 'select' || item.type === 'checkbox') {
|
|
132
|
-
if (item.param) {
|
|
133
|
-
let temp = this.$appdata.getParam(item.label)
|
|
134
|
-
|
|
135
|
-
if (temp && temp.length > 0) {
|
|
136
|
-
item.options = temp
|
|
137
|
-
}
|
|
138
|
-
if (item.paramLabel) {
|
|
139
|
-
temp = this.$appdata.getParam(item.paramLabel)
|
|
140
|
-
if (temp && temp.length > 0) {
|
|
141
|
-
item.options = temp
|
|
142
|
-
}
|
|
143
|
-
}
|
|
144
|
-
}
|
|
145
|
-
if (item.ready) {
|
|
146
|
-
item.options = await this[item.ready]()
|
|
147
|
-
}
|
|
148
|
-
}
|
|
149
|
-
if (item.type === 'checkbox') {
|
|
150
|
-
if (this.selectdata[item.field]) {
|
|
151
|
-
item.value = JSON.parse(this.selectdata[item.field])
|
|
152
|
-
} else {
|
|
153
|
-
item.value = []
|
|
154
|
-
}
|
|
155
|
-
}
|
|
156
|
-
}
|
|
157
|
-
// 控制组件
|
|
158
|
-
if (this.selectdata.components) {
|
|
159
|
-
this.selectdata.components.forEach(item => {
|
|
160
|
-
item.mark = 2
|
|
161
|
-
})
|
|
162
|
-
}
|
|
163
|
-
// 初始化onetomany
|
|
164
|
-
if (this.selectdata.onetomany) {
|
|
165
|
-
for (const item of this.selectdata.onetomany) {
|
|
166
|
-
let res = null
|
|
167
|
-
if (item.queryEvent) {
|
|
168
|
-
res = this[item.queryEvent]()
|
|
169
|
-
} else {
|
|
170
|
-
let data = {
|
|
171
|
-
tablename: item.tables[0],
|
|
172
|
-
condition: `f_process_id='${this.selectdata.f_process_id}'`
|
|
173
|
-
}
|
|
174
|
-
res = await this.$resetpost(
|
|
175
|
-
'rs/sql/applySingleTable',
|
|
176
|
-
{data: data},
|
|
177
|
-
{resolveMsg: null, rejectMsg: 'onetomany查询失败'}
|
|
178
|
-
)
|
|
179
|
-
}
|
|
180
|
-
item.rows = res.data
|
|
181
|
-
// 初始化onetomany中的fields
|
|
182
|
-
for (const field of item.fields) {
|
|
183
|
-
if (!field.value) {
|
|
184
|
-
if (field.value !== 0) {
|
|
185
|
-
field.value = null
|
|
186
|
-
}
|
|
187
|
-
}
|
|
188
|
-
|
|
189
|
-
if (field.default || field.default === 0) {
|
|
190
|
-
field.value = field.default
|
|
191
|
-
}
|
|
192
|
-
|
|
193
|
-
// datepicker
|
|
194
|
-
if (field.type === 'datepicker' && !field.value && field.default) {
|
|
195
|
-
field.value = new Date().Format(`${field.format ? field.format : 'yyyy-MM-dd HH:mm:ss'}`)
|
|
196
|
-
}
|
|
197
|
-
|
|
198
|
-
if (field.type === 'select') {
|
|
199
|
-
let temp = this.$appdata.getParam(field.label)
|
|
200
|
-
|
|
201
|
-
if (temp && temp.length > 0) {
|
|
202
|
-
field.options = temp
|
|
203
|
-
}
|
|
204
|
-
|
|
205
|
-
if (field.paramLabel) {
|
|
206
|
-
temp = this.$appdata.getParam(field.paramLabel)
|
|
207
|
-
if (temp && temp.length > 0) {
|
|
208
|
-
item.options = temp
|
|
209
|
-
}
|
|
210
|
-
}
|
|
211
|
-
}
|
|
212
|
-
}
|
|
213
|
-
}
|
|
214
|
-
}
|
|
215
|
-
// 消除双向绑定,避免子组件(显示层)数据更改,父组件(控制层)也更改
|
|
216
|
-
let temp = JSON.parse(JSON.stringify(this.selectdata))
|
|
217
|
-
this.show_data = temp
|
|
218
|
-
this.$nextTick(() => {
|
|
219
|
-
this.showview = true
|
|
220
|
-
})
|
|
221
|
-
const defname = this.selectdata.defname
|
|
222
|
-
const type = this.selectdata.f_apply_type
|
|
223
|
-
const title=this.selectdata.title
|
|
224
|
-
if(title=='信息修改' ||title=='信息变更'){
|
|
225
|
-
this.getCheckPay(this.selectdata.fields, defname, type)
|
|
226
|
-
}
|
|
227
|
-
if( type=='非民用报建' && title=='费用调整'){
|
|
228
|
-
if(defname=='报装缴费'){
|
|
229
|
-
this.getCheckPayRecording()
|
|
230
|
-
if(this.recording ==1){ //收费了
|
|
231
|
-
this.modifData(this.selectdata.fields,0)
|
|
232
|
-
}
|
|
233
|
-
if(this.recording ==0){ //没收费
|
|
234
|
-
this.modifData(this.selectdata.fields,1)
|
|
235
|
-
}
|
|
236
|
-
}
|
|
237
|
-
}
|
|
238
|
-
},
|
|
239
|
-
// 金额转大写
|
|
240
|
-
smalltoBIG(n) {
|
|
241
|
-
let fraction = ['角', '分'];
|
|
242
|
-
let digit = ['零', '壹', '贰', '叁', '肆', '伍', '陆', '柒', '捌', '玖'];
|
|
243
|
-
let unit = [['元', '万', '亿'], ['', '拾', '佰', '仟']];
|
|
244
|
-
let head = n < 0 ? '欠' : '';
|
|
245
|
-
n = Math.abs(n);
|
|
246
|
-
|
|
247
|
-
let s = '';
|
|
248
|
-
|
|
249
|
-
for (var i = 0; i < fraction.length; i++) {
|
|
250
|
-
s += (digit[Math.floor(n * 10 * Math.pow(10, i)) % 10] + fraction[i]).replace(/零./, '');
|
|
251
|
-
}
|
|
252
|
-
s = s || '整';
|
|
253
|
-
n = Math.floor(n);
|
|
254
|
-
|
|
255
|
-
for (var i = 0; i < unit[0].length && n > 0; i++) {
|
|
256
|
-
let p = '';
|
|
257
|
-
for (var j = 0; j < unit[1].length && n > 0; j++) {
|
|
258
|
-
p = digit[n % 10] + unit[1][j] + p;
|
|
259
|
-
n = Math.floor(n / 10);
|
|
260
|
-
}
|
|
261
|
-
s = p.replace(/(零.)*零$/, '').replace(/^$/, '零') + unit[0][i] + s;
|
|
262
|
-
}
|
|
263
|
-
return head + s.replace(/(零.)*零元/, '元').replace(/(零.)+/g, '零').replace(/^整$/, '零元整')
|
|
264
|
-
},
|
|
265
|
-
getLableValue(label) {
|
|
266
|
-
for (const item of this.show_data.fields) {
|
|
267
|
-
if (item.label === label && item.type !== 'number') {
|
|
268
|
-
return item.value || ''
|
|
269
|
-
}
|
|
270
|
-
if (item.label === label && item.type === 'number') {
|
|
271
|
-
return item.value || 0
|
|
272
|
-
}
|
|
273
|
-
}
|
|
274
|
-
},
|
|
275
|
-
getLableOptions(label) {
|
|
276
|
-
for (const item of this.show_data.fields) {
|
|
277
|
-
if (item.label === label) {
|
|
278
|
-
return item.options
|
|
279
|
-
}
|
|
280
|
-
}
|
|
281
|
-
},
|
|
282
|
-
setLabelValue(label, value) {
|
|
283
|
-
for (const item of this.show_data.fields) {
|
|
284
|
-
if (item.label === label) {
|
|
285
|
-
item.value = value
|
|
286
|
-
this.show_data[item.field] = value
|
|
287
|
-
}
|
|
288
|
-
}
|
|
289
|
-
},
|
|
290
|
-
setLabelOptions(label, options) {
|
|
291
|
-
for (const item of this.show_data.fields) {
|
|
292
|
-
if (item.label === label) {
|
|
293
|
-
item.options = options
|
|
294
|
-
}
|
|
295
|
-
}
|
|
296
|
-
},
|
|
297
|
-
showLabels(...labels) {
|
|
298
|
-
for (const item of this.show_data.fields) {
|
|
299
|
-
if (labels.includes(item.label)) {
|
|
300
|
-
item.hidden = false
|
|
301
|
-
}
|
|
302
|
-
}
|
|
303
|
-
},
|
|
304
|
-
hideLabels(...labels) {
|
|
305
|
-
for (const item of this.show_data.fields) {
|
|
306
|
-
if (labels.includes(item.label)) {
|
|
307
|
-
item.hidden = true
|
|
308
|
-
}
|
|
309
|
-
}
|
|
310
|
-
},
|
|
311
|
-
showButtons(...buttons) {
|
|
312
|
-
for (const item of this.show_data.buttons) {
|
|
313
|
-
if (buttons.includes(item.button_name)) {
|
|
314
|
-
item.hidden = false
|
|
315
|
-
}
|
|
316
|
-
}
|
|
317
|
-
},
|
|
318
|
-
hideButtons(...buttons) {
|
|
319
|
-
for (const item of this.show_data.buttons) {
|
|
320
|
-
if (buttons.includes(item.button_name)) {
|
|
321
|
-
item.hidden = true
|
|
322
|
-
}
|
|
323
|
-
}
|
|
324
|
-
},
|
|
325
|
-
requiredLabels(...labels) {
|
|
326
|
-
for (const item of this.show_data.fields) {
|
|
327
|
-
if (labels.includes(item.label)) {
|
|
328
|
-
item.required = true
|
|
329
|
-
}
|
|
330
|
-
}
|
|
331
|
-
},
|
|
332
|
-
electiveLabels(...labels) {
|
|
333
|
-
for (const item of this.show_data.fields) {
|
|
334
|
-
if (labels.includes(item.label)) {
|
|
335
|
-
item.required = false
|
|
336
|
-
}
|
|
337
|
-
}
|
|
338
|
-
},
|
|
339
|
-
readonlyLabels(...labels) {
|
|
340
|
-
for (const item of this.show_data.fields) {
|
|
341
|
-
if (labels.includes(item.label)) {
|
|
342
|
-
item.readonly = true
|
|
343
|
-
item.disabled = true
|
|
344
|
-
}
|
|
345
|
-
}
|
|
346
|
-
},
|
|
347
|
-
readwriteLabels(...labels) {
|
|
348
|
-
for (const item of this.show_data.fields) {
|
|
349
|
-
if (labels.includes(item.label)) {
|
|
350
|
-
item.readonly = false
|
|
351
|
-
item.disabled = false
|
|
352
|
-
}
|
|
353
|
-
}
|
|
354
|
-
},
|
|
355
|
-
disabledButtons(...buttons) {
|
|
356
|
-
for (const item of this.show_data.buttons) {
|
|
357
|
-
if (buttons.includes(item.button_name)) {
|
|
358
|
-
item.disabled = true
|
|
359
|
-
}
|
|
360
|
-
}
|
|
361
|
-
},
|
|
362
|
-
enableButtons(...buttons) {
|
|
363
|
-
for (const item of this.show_data.buttons) {
|
|
364
|
-
if (buttons.includes(item.button_name)) {
|
|
365
|
-
item.disabled = false
|
|
366
|
-
}
|
|
367
|
-
}
|
|
368
|
-
},
|
|
369
|
-
async checkDuplicate(index) {
|
|
370
|
-
let http = new HttpResetClass()
|
|
371
|
-
let data = {
|
|
372
|
-
tablename: 't_apply',
|
|
373
|
-
condition: `${this.show_data.fields[index].field} = '${this.show_data.fields[index].value}'`
|
|
374
|
-
}
|
|
375
|
-
let res = await http.load('POST', 'rs/sql/applySingleTable', {data: data}, {
|
|
376
|
-
resolveMsg: null,
|
|
377
|
-
rejectMsg: `${this.show_data.fields[index].label}查询失败`
|
|
378
|
-
})
|
|
379
|
-
if (res.data.length > 0) {
|
|
380
|
-
this.show_data.fields[index].value = null
|
|
381
|
-
this.$showAlert(`${this.show_data.fields[index].label}已存在!!!`, 'warning', 3000)
|
|
382
|
-
}
|
|
383
|
-
}
|
|
384
|
-
},
|
|
385
|
-
events: {
|
|
386
|
-
async 'stopApply' () {
|
|
387
|
-
|
|
388
|
-
let data = {
|
|
389
|
-
apply: this.show_data,
|
|
390
|
-
user: this.$login.f
|
|
391
|
-
}
|
|
392
|
-
|
|
393
|
-
let res = await this.$resetpost(
|
|
394
|
-
`rs/logic/stopApply`,
|
|
395
|
-
{data: data},
|
|
396
|
-
{resolveMsg: null, rejectMsg: '终止报建失败!!!'}
|
|
397
|
-
)
|
|
398
|
-
|
|
399
|
-
this.$dispatch('loadPage')
|
|
400
|
-
},
|
|
401
|
-
async 'pauseApply' () {
|
|
402
|
-
|
|
403
|
-
let data = {
|
|
404
|
-
apply: this.show_data,
|
|
405
|
-
user: this.$login.f
|
|
406
|
-
}
|
|
407
|
-
|
|
408
|
-
let res = await this.$resetpost(
|
|
409
|
-
`rs/logic/pauseApply`,
|
|
410
|
-
{data: data},
|
|
411
|
-
{resolveMsg: null, rejectMsg: '暂停报建失败!!!'}
|
|
412
|
-
)
|
|
413
|
-
|
|
414
|
-
this.$dispatch('loadPage')
|
|
415
|
-
},
|
|
416
|
-
async 'modifyInfo'() {
|
|
417
|
-
if(this.selectdata.title === '费用修改'){
|
|
418
|
-
let data = {
|
|
419
|
-
tablename: 't_charge_record',
|
|
420
|
-
condition: `f_process_id='${this.selectdata.f_process_id}'`
|
|
421
|
-
}
|
|
422
|
-
res = await this.$resetpost(
|
|
423
|
-
'rs/sql/applySingleTable',
|
|
424
|
-
{data: data},
|
|
425
|
-
{resolveMsg: null, rejectMsg: '收费信息查看'}
|
|
426
|
-
)
|
|
427
|
-
if (res.data.length > 0){
|
|
428
|
-
this.$showMessage('用户已缴费,无法修改!!!', ['confirm']).then((res) => {
|
|
429
|
-
if (res === 'confirm') {
|
|
430
|
-
this.$dispatch('loadPage')
|
|
431
|
-
}
|
|
432
|
-
})
|
|
433
|
-
throw '用户已缴费,无法修改!!!'
|
|
434
|
-
}else{
|
|
435
|
-
let datas = {
|
|
436
|
-
data: this.show_data,
|
|
437
|
-
user: this.$login.f
|
|
438
|
-
}
|
|
439
|
-
let http = new HttpResetClass()
|
|
440
|
-
let res = http.load('POST', 'rs/logic/modifyRecords', {data:datas}, {
|
|
441
|
-
resolveMsg: null,
|
|
442
|
-
rejectMsg: '保存修改记录失败!!!'
|
|
443
|
-
})
|
|
444
|
-
}
|
|
445
|
-
}
|
|
446
|
-
if(this.selectdata.title === '费用调整'){
|
|
447
|
-
let data = {
|
|
448
|
-
data: this.show_data,
|
|
449
|
-
user: this.$login.f
|
|
450
|
-
}
|
|
451
|
-
let http = new HttpResetClass()
|
|
452
|
-
let res = http.load('POST', 'rs/logic/modifyRecords', {data:data}, {
|
|
453
|
-
resolveMsg: null,
|
|
454
|
-
rejectMsg: '保存修改记录失败!!!'
|
|
455
|
-
})
|
|
456
|
-
}
|
|
457
|
-
console.log("保存数据")
|
|
458
|
-
let res = await this.$resetpost(
|
|
459
|
-
`rs/entity/t_apply`,
|
|
460
|
-
this.show_data,
|
|
461
|
-
{resolveMsg: null, rejectMsg: '数据保存失败!!!'}
|
|
462
|
-
)
|
|
463
|
-
this.$dispatch('loadPage')
|
|
464
|
-
},
|
|
465
|
-
//身份证号码校验
|
|
466
|
-
'checkIdnumber' (index) {
|
|
467
|
-
if(this.show_data.f_credentials === '身份证'){
|
|
468
|
-
var verify = /^[1-9]\d{5}(18|19|20|21)\d{2}((0[1-9])|(1[0-2]))(([0-2][1-9])|10|20|30|31)\d{3}[0-9Xx]$/
|
|
469
|
-
if (!verify.test(this.show_data.fields[index].value)){
|
|
470
|
-
this.show_data.fields[index].value = null
|
|
471
|
-
this.$showAlert('身份证号码格式错误请重新输入!!!', 'warning', 3000)
|
|
472
|
-
}
|
|
473
|
-
}
|
|
474
|
-
},
|
|
475
|
-
//电话号码校验
|
|
476
|
-
'checkPhone' (index) {
|
|
477
|
-
var verify = /^([1][0-9]{10})$/
|
|
478
|
-
if (!verify.test(this.show_data.fields[index].value)){
|
|
479
|
-
this.show_data.fields[index].value = null
|
|
480
|
-
this.$showAlert('电话号码格式错误请重新输入!!!', 'warning', 3000)
|
|
481
|
-
}
|
|
482
|
-
},
|
|
483
|
-
'applyPaperChange' (index) {
|
|
484
|
-
console.log("测试是否进入")
|
|
485
|
-
if (this.show_data.f_paper_type === '专票') {
|
|
486
|
-
this.requiredLabels('购货单位名称','购货单位识别号', '购货单位银行账号', '购货单位地址电话')
|
|
487
|
-
}else {
|
|
488
|
-
this.electiveLabels( '购货单位识别号', '购货单位银行账号', '购货单位地址电话')
|
|
489
|
-
}
|
|
490
|
-
},
|
|
491
|
-
// 获取view层button事件
|
|
492
|
-
async 'button' (){
|
|
493
|
-
console.log("保存数据")
|
|
494
|
-
let res = await this.$resetpost(
|
|
495
|
-
`rs/entity/t_apply`,
|
|
496
|
-
this.show_data,
|
|
497
|
-
{resolveMsg: null, rejectMsg: '数据保存失败!!!'}
|
|
498
|
-
)
|
|
499
|
-
|
|
500
|
-
this.$dispatch('loadPage')
|
|
501
|
-
},
|
|
502
|
-
// 失去焦点出触发事件
|
|
503
|
-
'onchange' (index) {
|
|
504
|
-
},
|
|
505
|
-
'onblur' (index) {},
|
|
506
|
-
'oninput' (index) {},
|
|
507
|
-
'initializtionView' () {},
|
|
508
|
-
async 'onchangeModal' (index, fieldIndex) {
|
|
509
|
-
},
|
|
510
|
-
async 'onblurModal' (index, fieldIndex) {
|
|
511
|
-
|
|
512
|
-
},
|
|
513
|
-
async 'oninputModal' (index, fieldIndex) {
|
|
514
|
-
|
|
515
|
-
},
|
|
516
|
-
async 'onetomanydelete' (index, rowIndex) {
|
|
517
|
-
|
|
518
|
-
let http = new HttpResetClass()
|
|
519
|
-
|
|
520
|
-
let res = await http.load(
|
|
521
|
-
'DELETE',
|
|
522
|
-
`rs/entity/${this.show_data.onetomany[index].tables[0]}/${this.show_data.onetomany[index].rows[rowIndex].id}`,
|
|
523
|
-
null,
|
|
524
|
-
{resolveMsg: null, rejectMsg: '删除失败!!!'}
|
|
525
|
-
)
|
|
526
|
-
|
|
527
|
-
res = await this.$resetpost(
|
|
528
|
-
'rs/entity/t_apply',
|
|
529
|
-
this.show_data
|
|
530
|
-
)
|
|
531
|
-
|
|
532
|
-
this.$dispatch('breakControl', this.show_data)
|
|
533
|
-
},
|
|
534
|
-
async 'onetomanyupdate' (index, rowIndex) {
|
|
535
|
-
let data = this.show_data.onetomany[index].rows[rowIndex]
|
|
536
|
-
|
|
537
|
-
this.show_data.onetomany[index].fields.forEach(item => {
|
|
538
|
-
data[item.field] = item.value
|
|
539
|
-
})
|
|
540
|
-
let res = await this.$resetpost(
|
|
541
|
-
`rs/entity/${this.show_data.onetomany[index].tables[0]}`,
|
|
542
|
-
data
|
|
543
|
-
)
|
|
544
|
-
|
|
545
|
-
res = await this.$resetpost(
|
|
546
|
-
'rs/entity/t_apply',
|
|
547
|
-
this.show_data
|
|
548
|
-
)
|
|
549
|
-
|
|
550
|
-
this.$dispatch('breakControl', this.show_data)
|
|
551
|
-
},
|
|
552
|
-
async 'onetomanyadd' (index) {
|
|
553
|
-
let data = {
|
|
554
|
-
f_process_id : this.show_data.f_process_id,
|
|
555
|
-
f_operator_id: this.$login.f.id,
|
|
556
|
-
f_operator: this.$login.f.name,
|
|
557
|
-
f_operation_date: new Date().Format('yyyy-MM-dd HH:mm:ss'),
|
|
558
|
-
f_orgid: this.$login.f.orgid,
|
|
559
|
-
f_orgname: this.$login.f.orgs
|
|
560
|
-
}
|
|
561
|
-
this.show_data.onetomany[index].fields.forEach(item => {
|
|
562
|
-
data[item.field] = item.value
|
|
563
|
-
})
|
|
564
|
-
let res = await this.$resetpost(
|
|
565
|
-
`rs/entity/${this.show_data.onetomany[index].tables[0]}`,
|
|
566
|
-
data
|
|
567
|
-
)
|
|
568
|
-
|
|
569
|
-
res = await this.$resetpost(
|
|
570
|
-
'rs/entity/t_apply',
|
|
571
|
-
this.show_data
|
|
572
|
-
)
|
|
573
|
-
|
|
574
|
-
this.$dispatch('breakControl', this.show_data)
|
|
575
|
-
}
|
|
576
|
-
},
|
|
577
|
-
watch:{
|
|
578
|
-
deep: true
|
|
579
|
-
}
|
|
580
|
-
}
|
|
581
|
-
</script>
|
|
1
|
+
<template>
|
|
2
|
+
<service-view v-ref:serviceview :data="show_data" v-if="showview"></service-view>
|
|
3
|
+
</template>
|
|
4
|
+
<script>
|
|
5
|
+
import {HttpResetClass} from 'vue-client'
|
|
6
|
+
import Vue from 'vue'
|
|
7
|
+
export default {
|
|
8
|
+
title: '报建功能业务控制层',
|
|
9
|
+
props: ['selectdata'],
|
|
10
|
+
data () {
|
|
11
|
+
return {
|
|
12
|
+
show_data: null, // 给通用页面显示的数据
|
|
13
|
+
showview: false, // 控制通用页面
|
|
14
|
+
recording: 0, // 是否有缴费记录
|
|
15
|
+
}
|
|
16
|
+
},
|
|
17
|
+
ready () {
|
|
18
|
+
this.refurbish()
|
|
19
|
+
},
|
|
20
|
+
methods: {
|
|
21
|
+
// 判断是否有缴费记录
|
|
22
|
+
getCheckPayRecording () {
|
|
23
|
+
let http = new HttpResetClass()
|
|
24
|
+
let data = {
|
|
25
|
+
f_process_id: this.selectdata.f_process_id,
|
|
26
|
+
user: this.$login.f,
|
|
27
|
+
paynum:'',
|
|
28
|
+
}
|
|
29
|
+
let res = http.load('POST', 'rs/logic/getCheckPay', {data:data}, {
|
|
30
|
+
resolveMsg: null,
|
|
31
|
+
rejectMsg: '缴费记录查询失败!!!'
|
|
32
|
+
})
|
|
33
|
+
// 有缴费记录
|
|
34
|
+
if (res.data> 0) {
|
|
35
|
+
this.recording = 1
|
|
36
|
+
|
|
37
|
+
}
|
|
38
|
+
},
|
|
39
|
+
modifData(fields,falg){
|
|
40
|
+
fields.forEach(item => {
|
|
41
|
+
if((item.label=='工程费单价'||item.label=='应交总金额'|| item.label=='未结总金额')&&falg==1){
|
|
42
|
+
this.readwriteLabels(item.label)
|
|
43
|
+
}
|
|
44
|
+
if((item.label=='工程费单价'||item.label=='应交总金额'|| item.label=='未结总金额')&&falg==0){
|
|
45
|
+
this.readonlyLabels(item.label)
|
|
46
|
+
}
|
|
47
|
+
})
|
|
48
|
+
},
|
|
49
|
+
//根据缴费记录判断是否可编辑
|
|
50
|
+
async getCheckPay (fields, defname,type) {
|
|
51
|
+
console.log(fields)
|
|
52
|
+
let http = new HttpResetClass()
|
|
53
|
+
let data = {
|
|
54
|
+
f_process_id: this.selectdata.f_process_id,
|
|
55
|
+
user: this.$login.f,
|
|
56
|
+
paynum:'',
|
|
57
|
+
}
|
|
58
|
+
let res = await http.load('POST', 'rs/logic/getCheckPay', {data:data}, {
|
|
59
|
+
resolveMsg: null,
|
|
60
|
+
rejectMsg: '缴费记录查询失败!!!'
|
|
61
|
+
})
|
|
62
|
+
// 有缴费记录
|
|
63
|
+
if (res.data> 0) {
|
|
64
|
+
if(type=='非民用报建'||type=='设备变更'){
|
|
65
|
+
if(defname=='报装缴费'){
|
|
66
|
+
fields.forEach(item => {
|
|
67
|
+
if(item.label=='收费标准备注'){
|
|
68
|
+
this.showLabels(item.label)
|
|
69
|
+
}
|
|
70
|
+
})
|
|
71
|
+
}
|
|
72
|
+
}
|
|
73
|
+
//使用foreach遍历fields
|
|
74
|
+
if(defname=='报装缴费'){
|
|
75
|
+
fields.forEach(item => {
|
|
76
|
+
if(item.label=='收费标准备注'||item.label=='票据类型'||item.label=='报警器'||item.label=='购货单位识别号'||item.label=='购货单位名称'||item.label=='购货单位开户'||item.label=='购货单位地址电话'||item.label=='购货单位银行账号'){
|
|
77
|
+
this.readonlyLabels(item.label)
|
|
78
|
+
}
|
|
79
|
+
})
|
|
80
|
+
}
|
|
81
|
+
}else{ //无缴费记录
|
|
82
|
+
if(type=='非民用报建'||type=='设备变更'){
|
|
83
|
+
if(defname=='报装缴费'){
|
|
84
|
+
fields.forEach(item => {
|
|
85
|
+
if(item.label=='收费标准备注'){
|
|
86
|
+
this.showLabels(item.label)
|
|
87
|
+
}
|
|
88
|
+
})
|
|
89
|
+
}
|
|
90
|
+
}
|
|
91
|
+
if(defname=='报装缴费'){
|
|
92
|
+
fields.forEach(item => {
|
|
93
|
+
if(item.label=='收费标准备注'||item.label=='票据类型'||item.label=='报警器'||item.label=='购货单位识别号'||item.label=='购货单位名称'||item.label=='购货单位开户'||item.label=='购货单位地址电话'||item.label=='购货单位银行账号'){
|
|
94
|
+
this.readwriteLabels(item.label)
|
|
95
|
+
}
|
|
96
|
+
})
|
|
97
|
+
}
|
|
98
|
+
}
|
|
99
|
+
},
|
|
100
|
+
async refurbish () {
|
|
101
|
+
// fields 字段填充值
|
|
102
|
+
for (const item of this.selectdata.fields) {
|
|
103
|
+
if (!item.value) {
|
|
104
|
+
item.value = null
|
|
105
|
+
}
|
|
106
|
+
if (!item.value && (item.default || item.default === 0) && item.type !== 'datepicker') {
|
|
107
|
+
if (item.eval) {
|
|
108
|
+
item.value = eval(item.default)
|
|
109
|
+
} else {
|
|
110
|
+
item.value = item.default
|
|
111
|
+
}
|
|
112
|
+
}
|
|
113
|
+
if (this.selectdata[item.field]) {
|
|
114
|
+
// 将json字符串格式化赋值给value
|
|
115
|
+
if (String(this.selectdata[item.field]).startsWith("{")) {
|
|
116
|
+
item.value = JSON.parse(this.selectdata[item.field])
|
|
117
|
+
} else {
|
|
118
|
+
item.value = this.selectdata[item.field]
|
|
119
|
+
}
|
|
120
|
+
}
|
|
121
|
+
if (this.selectdata[item.field] === 0) {
|
|
122
|
+
item.value = 0
|
|
123
|
+
}
|
|
124
|
+
|
|
125
|
+
// datepicker
|
|
126
|
+
if (item.type === 'datepicker' && !item.value && item.default) {
|
|
127
|
+
item.value = new Date().Format(`${item.format ? item.format : 'yyyy-MM-dd HH:mm:ss'}`)
|
|
128
|
+
}
|
|
129
|
+
|
|
130
|
+
// 如果配置类型为select,优先从参数列表获取options
|
|
131
|
+
if (item.type === 'select' || item.type === 'checkbox') {
|
|
132
|
+
if (item.param) {
|
|
133
|
+
let temp = this.$appdata.getParam(item.label)
|
|
134
|
+
|
|
135
|
+
if (temp && temp.length > 0) {
|
|
136
|
+
item.options = temp
|
|
137
|
+
}
|
|
138
|
+
if (item.paramLabel) {
|
|
139
|
+
temp = this.$appdata.getParam(item.paramLabel)
|
|
140
|
+
if (temp && temp.length > 0) {
|
|
141
|
+
item.options = temp
|
|
142
|
+
}
|
|
143
|
+
}
|
|
144
|
+
}
|
|
145
|
+
if (item.ready) {
|
|
146
|
+
item.options = await this[item.ready]()
|
|
147
|
+
}
|
|
148
|
+
}
|
|
149
|
+
if (item.type === 'checkbox') {
|
|
150
|
+
if (this.selectdata[item.field]) {
|
|
151
|
+
item.value = JSON.parse(this.selectdata[item.field])
|
|
152
|
+
} else {
|
|
153
|
+
item.value = []
|
|
154
|
+
}
|
|
155
|
+
}
|
|
156
|
+
}
|
|
157
|
+
// 控制组件
|
|
158
|
+
if (this.selectdata.components) {
|
|
159
|
+
this.selectdata.components.forEach(item => {
|
|
160
|
+
item.mark = 2
|
|
161
|
+
})
|
|
162
|
+
}
|
|
163
|
+
// 初始化onetomany
|
|
164
|
+
if (this.selectdata.onetomany) {
|
|
165
|
+
for (const item of this.selectdata.onetomany) {
|
|
166
|
+
let res = null
|
|
167
|
+
if (item.queryEvent) {
|
|
168
|
+
res = this[item.queryEvent]()
|
|
169
|
+
} else {
|
|
170
|
+
let data = {
|
|
171
|
+
tablename: item.tables[0],
|
|
172
|
+
condition: `f_process_id='${this.selectdata.f_process_id}'`
|
|
173
|
+
}
|
|
174
|
+
res = await this.$resetpost(
|
|
175
|
+
'rs/sql/applySingleTable',
|
|
176
|
+
{data: data},
|
|
177
|
+
{resolveMsg: null, rejectMsg: 'onetomany查询失败'}
|
|
178
|
+
)
|
|
179
|
+
}
|
|
180
|
+
item.rows = res.data
|
|
181
|
+
// 初始化onetomany中的fields
|
|
182
|
+
for (const field of item.fields) {
|
|
183
|
+
if (!field.value) {
|
|
184
|
+
if (field.value !== 0) {
|
|
185
|
+
field.value = null
|
|
186
|
+
}
|
|
187
|
+
}
|
|
188
|
+
|
|
189
|
+
if (field.default || field.default === 0) {
|
|
190
|
+
field.value = field.default
|
|
191
|
+
}
|
|
192
|
+
|
|
193
|
+
// datepicker
|
|
194
|
+
if (field.type === 'datepicker' && !field.value && field.default) {
|
|
195
|
+
field.value = new Date().Format(`${field.format ? field.format : 'yyyy-MM-dd HH:mm:ss'}`)
|
|
196
|
+
}
|
|
197
|
+
|
|
198
|
+
if (field.type === 'select') {
|
|
199
|
+
let temp = this.$appdata.getParam(field.label)
|
|
200
|
+
|
|
201
|
+
if (temp && temp.length > 0) {
|
|
202
|
+
field.options = temp
|
|
203
|
+
}
|
|
204
|
+
|
|
205
|
+
if (field.paramLabel) {
|
|
206
|
+
temp = this.$appdata.getParam(field.paramLabel)
|
|
207
|
+
if (temp && temp.length > 0) {
|
|
208
|
+
item.options = temp
|
|
209
|
+
}
|
|
210
|
+
}
|
|
211
|
+
}
|
|
212
|
+
}
|
|
213
|
+
}
|
|
214
|
+
}
|
|
215
|
+
// 消除双向绑定,避免子组件(显示层)数据更改,父组件(控制层)也更改
|
|
216
|
+
let temp = JSON.parse(JSON.stringify(this.selectdata))
|
|
217
|
+
this.show_data = temp
|
|
218
|
+
this.$nextTick(() => {
|
|
219
|
+
this.showview = true
|
|
220
|
+
})
|
|
221
|
+
const defname = this.selectdata.defname
|
|
222
|
+
const type = this.selectdata.f_apply_type
|
|
223
|
+
const title=this.selectdata.title
|
|
224
|
+
if(title=='信息修改' ||title=='信息变更'){
|
|
225
|
+
this.getCheckPay(this.selectdata.fields, defname, type)
|
|
226
|
+
}
|
|
227
|
+
if( type=='非民用报建' && title=='费用调整'){
|
|
228
|
+
if(defname=='报装缴费'){
|
|
229
|
+
this.getCheckPayRecording()
|
|
230
|
+
if(this.recording ==1){ //收费了
|
|
231
|
+
this.modifData(this.selectdata.fields,0)
|
|
232
|
+
}
|
|
233
|
+
if(this.recording ==0){ //没收费
|
|
234
|
+
this.modifData(this.selectdata.fields,1)
|
|
235
|
+
}
|
|
236
|
+
}
|
|
237
|
+
}
|
|
238
|
+
},
|
|
239
|
+
// 金额转大写
|
|
240
|
+
smalltoBIG(n) {
|
|
241
|
+
let fraction = ['角', '分'];
|
|
242
|
+
let digit = ['零', '壹', '贰', '叁', '肆', '伍', '陆', '柒', '捌', '玖'];
|
|
243
|
+
let unit = [['元', '万', '亿'], ['', '拾', '佰', '仟']];
|
|
244
|
+
let head = n < 0 ? '欠' : '';
|
|
245
|
+
n = Math.abs(n);
|
|
246
|
+
|
|
247
|
+
let s = '';
|
|
248
|
+
|
|
249
|
+
for (var i = 0; i < fraction.length; i++) {
|
|
250
|
+
s += (digit[Math.floor(n * 10 * Math.pow(10, i)) % 10] + fraction[i]).replace(/零./, '');
|
|
251
|
+
}
|
|
252
|
+
s = s || '整';
|
|
253
|
+
n = Math.floor(n);
|
|
254
|
+
|
|
255
|
+
for (var i = 0; i < unit[0].length && n > 0; i++) {
|
|
256
|
+
let p = '';
|
|
257
|
+
for (var j = 0; j < unit[1].length && n > 0; j++) {
|
|
258
|
+
p = digit[n % 10] + unit[1][j] + p;
|
|
259
|
+
n = Math.floor(n / 10);
|
|
260
|
+
}
|
|
261
|
+
s = p.replace(/(零.)*零$/, '').replace(/^$/, '零') + unit[0][i] + s;
|
|
262
|
+
}
|
|
263
|
+
return head + s.replace(/(零.)*零元/, '元').replace(/(零.)+/g, '零').replace(/^整$/, '零元整')
|
|
264
|
+
},
|
|
265
|
+
getLableValue(label) {
|
|
266
|
+
for (const item of this.show_data.fields) {
|
|
267
|
+
if (item.label === label && item.type !== 'number') {
|
|
268
|
+
return item.value || ''
|
|
269
|
+
}
|
|
270
|
+
if (item.label === label && item.type === 'number') {
|
|
271
|
+
return item.value || 0
|
|
272
|
+
}
|
|
273
|
+
}
|
|
274
|
+
},
|
|
275
|
+
getLableOptions(label) {
|
|
276
|
+
for (const item of this.show_data.fields) {
|
|
277
|
+
if (item.label === label) {
|
|
278
|
+
return item.options
|
|
279
|
+
}
|
|
280
|
+
}
|
|
281
|
+
},
|
|
282
|
+
setLabelValue(label, value) {
|
|
283
|
+
for (const item of this.show_data.fields) {
|
|
284
|
+
if (item.label === label) {
|
|
285
|
+
item.value = value
|
|
286
|
+
this.show_data[item.field] = value
|
|
287
|
+
}
|
|
288
|
+
}
|
|
289
|
+
},
|
|
290
|
+
setLabelOptions(label, options) {
|
|
291
|
+
for (const item of this.show_data.fields) {
|
|
292
|
+
if (item.label === label) {
|
|
293
|
+
item.options = options
|
|
294
|
+
}
|
|
295
|
+
}
|
|
296
|
+
},
|
|
297
|
+
showLabels(...labels) {
|
|
298
|
+
for (const item of this.show_data.fields) {
|
|
299
|
+
if (labels.includes(item.label)) {
|
|
300
|
+
item.hidden = false
|
|
301
|
+
}
|
|
302
|
+
}
|
|
303
|
+
},
|
|
304
|
+
hideLabels(...labels) {
|
|
305
|
+
for (const item of this.show_data.fields) {
|
|
306
|
+
if (labels.includes(item.label)) {
|
|
307
|
+
item.hidden = true
|
|
308
|
+
}
|
|
309
|
+
}
|
|
310
|
+
},
|
|
311
|
+
showButtons(...buttons) {
|
|
312
|
+
for (const item of this.show_data.buttons) {
|
|
313
|
+
if (buttons.includes(item.button_name)) {
|
|
314
|
+
item.hidden = false
|
|
315
|
+
}
|
|
316
|
+
}
|
|
317
|
+
},
|
|
318
|
+
hideButtons(...buttons) {
|
|
319
|
+
for (const item of this.show_data.buttons) {
|
|
320
|
+
if (buttons.includes(item.button_name)) {
|
|
321
|
+
item.hidden = true
|
|
322
|
+
}
|
|
323
|
+
}
|
|
324
|
+
},
|
|
325
|
+
requiredLabels(...labels) {
|
|
326
|
+
for (const item of this.show_data.fields) {
|
|
327
|
+
if (labels.includes(item.label)) {
|
|
328
|
+
item.required = true
|
|
329
|
+
}
|
|
330
|
+
}
|
|
331
|
+
},
|
|
332
|
+
electiveLabels(...labels) {
|
|
333
|
+
for (const item of this.show_data.fields) {
|
|
334
|
+
if (labels.includes(item.label)) {
|
|
335
|
+
item.required = false
|
|
336
|
+
}
|
|
337
|
+
}
|
|
338
|
+
},
|
|
339
|
+
readonlyLabels(...labels) {
|
|
340
|
+
for (const item of this.show_data.fields) {
|
|
341
|
+
if (labels.includes(item.label)) {
|
|
342
|
+
item.readonly = true
|
|
343
|
+
item.disabled = true
|
|
344
|
+
}
|
|
345
|
+
}
|
|
346
|
+
},
|
|
347
|
+
readwriteLabels(...labels) {
|
|
348
|
+
for (const item of this.show_data.fields) {
|
|
349
|
+
if (labels.includes(item.label)) {
|
|
350
|
+
item.readonly = false
|
|
351
|
+
item.disabled = false
|
|
352
|
+
}
|
|
353
|
+
}
|
|
354
|
+
},
|
|
355
|
+
disabledButtons(...buttons) {
|
|
356
|
+
for (const item of this.show_data.buttons) {
|
|
357
|
+
if (buttons.includes(item.button_name)) {
|
|
358
|
+
item.disabled = true
|
|
359
|
+
}
|
|
360
|
+
}
|
|
361
|
+
},
|
|
362
|
+
enableButtons(...buttons) {
|
|
363
|
+
for (const item of this.show_data.buttons) {
|
|
364
|
+
if (buttons.includes(item.button_name)) {
|
|
365
|
+
item.disabled = false
|
|
366
|
+
}
|
|
367
|
+
}
|
|
368
|
+
},
|
|
369
|
+
async checkDuplicate(index) {
|
|
370
|
+
let http = new HttpResetClass()
|
|
371
|
+
let data = {
|
|
372
|
+
tablename: 't_apply',
|
|
373
|
+
condition: `${this.show_data.fields[index].field} = '${this.show_data.fields[index].value}'`
|
|
374
|
+
}
|
|
375
|
+
let res = await http.load('POST', 'rs/sql/applySingleTable', {data: data}, {
|
|
376
|
+
resolveMsg: null,
|
|
377
|
+
rejectMsg: `${this.show_data.fields[index].label}查询失败`
|
|
378
|
+
})
|
|
379
|
+
if (res.data.length > 0) {
|
|
380
|
+
this.show_data.fields[index].value = null
|
|
381
|
+
this.$showAlert(`${this.show_data.fields[index].label}已存在!!!`, 'warning', 3000)
|
|
382
|
+
}
|
|
383
|
+
}
|
|
384
|
+
},
|
|
385
|
+
events: {
|
|
386
|
+
async 'stopApply' () {
|
|
387
|
+
|
|
388
|
+
let data = {
|
|
389
|
+
apply: this.show_data,
|
|
390
|
+
user: this.$login.f
|
|
391
|
+
}
|
|
392
|
+
|
|
393
|
+
let res = await this.$resetpost(
|
|
394
|
+
`rs/logic/stopApply`,
|
|
395
|
+
{data: data},
|
|
396
|
+
{resolveMsg: null, rejectMsg: '终止报建失败!!!'}
|
|
397
|
+
)
|
|
398
|
+
|
|
399
|
+
this.$dispatch('loadPage')
|
|
400
|
+
},
|
|
401
|
+
async 'pauseApply' () {
|
|
402
|
+
|
|
403
|
+
let data = {
|
|
404
|
+
apply: this.show_data,
|
|
405
|
+
user: this.$login.f
|
|
406
|
+
}
|
|
407
|
+
|
|
408
|
+
let res = await this.$resetpost(
|
|
409
|
+
`rs/logic/pauseApply`,
|
|
410
|
+
{data: data},
|
|
411
|
+
{resolveMsg: null, rejectMsg: '暂停报建失败!!!'}
|
|
412
|
+
)
|
|
413
|
+
|
|
414
|
+
this.$dispatch('loadPage')
|
|
415
|
+
},
|
|
416
|
+
async 'modifyInfo'() {
|
|
417
|
+
if(this.selectdata.title === '费用修改'){
|
|
418
|
+
let data = {
|
|
419
|
+
tablename: 't_charge_record',
|
|
420
|
+
condition: `f_process_id='${this.selectdata.f_process_id}'`
|
|
421
|
+
}
|
|
422
|
+
res = await this.$resetpost(
|
|
423
|
+
'rs/sql/applySingleTable',
|
|
424
|
+
{data: data},
|
|
425
|
+
{resolveMsg: null, rejectMsg: '收费信息查看'}
|
|
426
|
+
)
|
|
427
|
+
if (res.data.length > 0){
|
|
428
|
+
this.$showMessage('用户已缴费,无法修改!!!', ['confirm']).then((res) => {
|
|
429
|
+
if (res === 'confirm') {
|
|
430
|
+
this.$dispatch('loadPage')
|
|
431
|
+
}
|
|
432
|
+
})
|
|
433
|
+
throw '用户已缴费,无法修改!!!'
|
|
434
|
+
}else{
|
|
435
|
+
let datas = {
|
|
436
|
+
data: this.show_data,
|
|
437
|
+
user: this.$login.f
|
|
438
|
+
}
|
|
439
|
+
let http = new HttpResetClass()
|
|
440
|
+
let res = http.load('POST', 'rs/logic/modifyRecords', {data:datas}, {
|
|
441
|
+
resolveMsg: null,
|
|
442
|
+
rejectMsg: '保存修改记录失败!!!'
|
|
443
|
+
})
|
|
444
|
+
}
|
|
445
|
+
}
|
|
446
|
+
if(this.selectdata.title === '费用调整'){
|
|
447
|
+
let data = {
|
|
448
|
+
data: this.show_data,
|
|
449
|
+
user: this.$login.f
|
|
450
|
+
}
|
|
451
|
+
let http = new HttpResetClass()
|
|
452
|
+
let res = http.load('POST', 'rs/logic/modifyRecords', {data:data}, {
|
|
453
|
+
resolveMsg: null,
|
|
454
|
+
rejectMsg: '保存修改记录失败!!!'
|
|
455
|
+
})
|
|
456
|
+
}
|
|
457
|
+
console.log("保存数据")
|
|
458
|
+
let res = await this.$resetpost(
|
|
459
|
+
`rs/entity/t_apply`,
|
|
460
|
+
this.show_data,
|
|
461
|
+
{resolveMsg: null, rejectMsg: '数据保存失败!!!'}
|
|
462
|
+
)
|
|
463
|
+
this.$dispatch('loadPage')
|
|
464
|
+
},
|
|
465
|
+
//身份证号码校验
|
|
466
|
+
'checkIdnumber' (index) {
|
|
467
|
+
if(this.show_data.f_credentials === '身份证'){
|
|
468
|
+
var verify = /^[1-9]\d{5}(18|19|20|21)\d{2}((0[1-9])|(1[0-2]))(([0-2][1-9])|10|20|30|31)\d{3}[0-9Xx]$/
|
|
469
|
+
if (!verify.test(this.show_data.fields[index].value)){
|
|
470
|
+
this.show_data.fields[index].value = null
|
|
471
|
+
this.$showAlert('身份证号码格式错误请重新输入!!!', 'warning', 3000)
|
|
472
|
+
}
|
|
473
|
+
}
|
|
474
|
+
},
|
|
475
|
+
//电话号码校验
|
|
476
|
+
'checkPhone' (index) {
|
|
477
|
+
var verify = /^([1][0-9]{10})$/
|
|
478
|
+
if (!verify.test(this.show_data.fields[index].value)){
|
|
479
|
+
this.show_data.fields[index].value = null
|
|
480
|
+
this.$showAlert('电话号码格式错误请重新输入!!!', 'warning', 3000)
|
|
481
|
+
}
|
|
482
|
+
},
|
|
483
|
+
'applyPaperChange' (index) {
|
|
484
|
+
console.log("测试是否进入")
|
|
485
|
+
if (this.show_data.f_paper_type === '专票') {
|
|
486
|
+
this.requiredLabels('购货单位名称','购货单位识别号', '购货单位银行账号', '购货单位地址电话')
|
|
487
|
+
}else {
|
|
488
|
+
this.electiveLabels( '购货单位识别号', '购货单位银行账号', '购货单位地址电话')
|
|
489
|
+
}
|
|
490
|
+
},
|
|
491
|
+
// 获取view层button事件
|
|
492
|
+
async 'button' (){
|
|
493
|
+
console.log("保存数据")
|
|
494
|
+
let res = await this.$resetpost(
|
|
495
|
+
`rs/entity/t_apply`,
|
|
496
|
+
this.show_data,
|
|
497
|
+
{resolveMsg: null, rejectMsg: '数据保存失败!!!'}
|
|
498
|
+
)
|
|
499
|
+
|
|
500
|
+
this.$dispatch('loadPage')
|
|
501
|
+
},
|
|
502
|
+
// 失去焦点出触发事件
|
|
503
|
+
'onchange' (index) {
|
|
504
|
+
},
|
|
505
|
+
'onblur' (index) {},
|
|
506
|
+
'oninput' (index) {},
|
|
507
|
+
'initializtionView' () {},
|
|
508
|
+
async 'onchangeModal' (index, fieldIndex) {
|
|
509
|
+
},
|
|
510
|
+
async 'onblurModal' (index, fieldIndex) {
|
|
511
|
+
|
|
512
|
+
},
|
|
513
|
+
async 'oninputModal' (index, fieldIndex) {
|
|
514
|
+
|
|
515
|
+
},
|
|
516
|
+
async 'onetomanydelete' (index, rowIndex) {
|
|
517
|
+
|
|
518
|
+
let http = new HttpResetClass()
|
|
519
|
+
|
|
520
|
+
let res = await http.load(
|
|
521
|
+
'DELETE',
|
|
522
|
+
`rs/entity/${this.show_data.onetomany[index].tables[0]}/${this.show_data.onetomany[index].rows[rowIndex].id}`,
|
|
523
|
+
null,
|
|
524
|
+
{resolveMsg: null, rejectMsg: '删除失败!!!'}
|
|
525
|
+
)
|
|
526
|
+
|
|
527
|
+
res = await this.$resetpost(
|
|
528
|
+
'rs/entity/t_apply',
|
|
529
|
+
this.show_data
|
|
530
|
+
)
|
|
531
|
+
|
|
532
|
+
this.$dispatch('breakControl', this.show_data)
|
|
533
|
+
},
|
|
534
|
+
async 'onetomanyupdate' (index, rowIndex) {
|
|
535
|
+
let data = this.show_data.onetomany[index].rows[rowIndex]
|
|
536
|
+
|
|
537
|
+
this.show_data.onetomany[index].fields.forEach(item => {
|
|
538
|
+
data[item.field] = item.value
|
|
539
|
+
})
|
|
540
|
+
let res = await this.$resetpost(
|
|
541
|
+
`rs/entity/${this.show_data.onetomany[index].tables[0]}`,
|
|
542
|
+
data
|
|
543
|
+
)
|
|
544
|
+
|
|
545
|
+
res = await this.$resetpost(
|
|
546
|
+
'rs/entity/t_apply',
|
|
547
|
+
this.show_data
|
|
548
|
+
)
|
|
549
|
+
|
|
550
|
+
this.$dispatch('breakControl', this.show_data)
|
|
551
|
+
},
|
|
552
|
+
async 'onetomanyadd' (index) {
|
|
553
|
+
let data = {
|
|
554
|
+
f_process_id : this.show_data.f_process_id,
|
|
555
|
+
f_operator_id: this.$login.f.id,
|
|
556
|
+
f_operator: this.$login.f.name,
|
|
557
|
+
f_operation_date: new Date().Format('yyyy-MM-dd HH:mm:ss'),
|
|
558
|
+
f_orgid: this.$login.f.orgid,
|
|
559
|
+
f_orgname: this.$login.f.orgs
|
|
560
|
+
}
|
|
561
|
+
this.show_data.onetomany[index].fields.forEach(item => {
|
|
562
|
+
data[item.field] = item.value
|
|
563
|
+
})
|
|
564
|
+
let res = await this.$resetpost(
|
|
565
|
+
`rs/entity/${this.show_data.onetomany[index].tables[0]}`,
|
|
566
|
+
data
|
|
567
|
+
)
|
|
568
|
+
|
|
569
|
+
res = await this.$resetpost(
|
|
570
|
+
'rs/entity/t_apply',
|
|
571
|
+
this.show_data
|
|
572
|
+
)
|
|
573
|
+
|
|
574
|
+
this.$dispatch('breakControl', this.show_data)
|
|
575
|
+
}
|
|
576
|
+
},
|
|
577
|
+
watch:{
|
|
578
|
+
deep: true
|
|
579
|
+
}
|
|
580
|
+
}
|
|
581
|
+
</script>
|