apply-clients 3.3.16 → 3.3.17

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.
Files changed (57) hide show
  1. package/index.html +33 -33
  2. package/package.json +1 -1
  3. package/src/AndroidApp.vue +30 -30
  4. package/src/android.js +21 -21
  5. package/src/apply.js +3 -6
  6. package/src/applyAndroid.js +35 -35
  7. package/src/components/android/AppOnetomany.vue +285 -285
  8. package/src/components/android/AppServiceView.vue +570 -570
  9. package/src/components/android/AppTakePic.vue +143 -143
  10. package/src/components/android/Function/AppFunctionServiceControl.vue +329 -329
  11. package/src/components/android/Function/AppInstallFunction.vue +327 -327
  12. package/src/components/android/Process/AppExplorationUser.vue +268 -268
  13. package/src/components/android/Process/AppServiceControl.vue +711 -686
  14. package/src/components/android/Process/Processes/AppChargeManagement.vue +468 -468
  15. package/src/components/android/Process/Processes/AppDevicesManagement.vue +490 -490
  16. package/src/components/android/Process/Processes/AppInstallationDetails.vue +466 -466
  17. package/src/components/android/Process/Processes/AppSupplementalAgreement.vue +297 -297
  18. package/src/components/android/Supervisory/AppProcessSupervisory.vue +261 -261
  19. package/src/components/android/Supervisory/AppSupervisoryCart.vue +115 -115
  20. package/src/components/product/ApplyCharge/ApplyChargeList.vue +265 -265
  21. package/src/components/product/ApplyCharge/ApplyChargeSearch.vue +30 -30
  22. package/src/components/product/Function/InstallFunction.vue +122 -122
  23. package/src/components/product/Function/InstallInfoSelect.vue +289 -289
  24. package/src/components/product/Function/Service/FunctionServiceControl.vue +254 -254
  25. package/src/components/product/Onetomany.vue +296 -296
  26. package/src/components/product/Order/OrderApply.vue +47 -47
  27. package/src/components/product/Order/OrderApplyList.vue +62 -62
  28. package/src/components/product/Order/OrderMessage.vue +237 -237
  29. package/src/components/product/Process/ExplorationSelect.vue +145 -143
  30. package/src/components/product/Process/ExplorationUser.vue +128 -128
  31. package/src/components/product/Process/Processes/InstallationDetails.vue +421 -352
  32. package/src/components/product/Process/Processes/Print/img/10101.png +0 -0
  33. package/src/components/product/Process/Processes/Print/img/1010109.png +0 -0
  34. package/src/components/product/Process/Processes/Print/img/1010110.png +0 -0
  35. package/src/components/product/Process/Processes/Print/img/1010111.png +0 -0
  36. package/src/components/product/Process/Processes/Print/img/1010112.png +0 -0
  37. package/src/components/product/Process/Processes/{printCharge.vue → Print/printCharge.vue} +139 -121
  38. package/src/components/product/Process/Processes/Print/printRefund.vue +193 -0
  39. package/src/components/product/Process/Processes/addressAndUserinfoManagement.vue +181 -181
  40. package/src/components/product/Process/Processes/chargeManagement.vue +639 -639
  41. package/src/components/product/Process/Processes/devicesManagement.vue +458 -458
  42. package/src/components/product/Process/Processes/selectApply.vue +250 -250
  43. package/src/components/product/Process/Processes/selectUserinfo.vue +182 -182
  44. package/src/components/product/Process/Processes/supplementalAgreement.vue +298 -298
  45. package/src/components/product/Process/Service/ServiceControl.vue +916 -810
  46. package/src/components/product/Process/ShowBackReason.vue +33 -33
  47. package/src/components/product/ServiceView.vue +301 -307
  48. package/src/components/product/Stop/StopApplyList.vue +254 -254
  49. package/src/components/product/Supervisory/Service/SupervisoryServiceControl.vue +512 -517
  50. package/src/components/product/Supervisory/SupervisoryControl.vue +100 -100
  51. package/src/components/product/Supervisory/SupervisoryList.vue +226 -226
  52. package/src/components/product/Supervisory/SupervisoryhCart.vue +124 -124
  53. package/src/components/product/VueUtils/ApplyUpload.vue +262 -262
  54. package/src/components/product/VueUtils/GaoPaiYi/HighMeter.vue +1090 -1090
  55. package/src/main.js +23 -23
  56. package/src/components/product/Function/Inform.vue +0 -74
  57. package/src/components/product/Function/MarketSurvey.vue +0 -80
@@ -1,934 +1,1040 @@
1
1
  <template>
2
-
3
- <div class="auto clearfix">
2
+ <div class="" v-if="showview">
4
3
  <show-back-reason :selectdata="show_data"></show-back-reason>
4
+ <service-view v-ref:serviceview :data="show_data"></service-view>
5
5
  </div>
6
-
7
- <service-view v-ref:serviceview :data="show_data" v-if="showview"></service-view>
8
6
  </template>
9
7
  <script>
10
- import Vue from 'vue'
11
- import {HttpResetClass} from 'vue-client'
12
- import {isEmpty} from "../../../Util";
13
-
14
- // Date格式化
15
- Date.prototype.Format = function (fmt) {
16
- var o = {
17
- "M+": this.getMonth() + 1, //月份
18
- "d+": this.getDate(), //日
19
- "H+": this.getHours(), //小时
20
- "m+": this.getMinutes(), //分
21
- "s+": this.getSeconds(), //秒
22
- "q+": Math.floor((this.getMonth() + 3) / 3), //季度
23
- "S": this.getMilliseconds() //毫秒
24
- };
25
- if (/(y+)/.test(fmt)) fmt = fmt.replace(RegExp.$1, (this.getFullYear() + "").substr(4 - RegExp.$1.length));
26
- for (var k in o)
27
- if (new RegExp("(" + k + ")").test(fmt)) fmt = fmt.replace(RegExp.$1, (RegExp.$1.length == 1) ? (o[k]) : (("00" + o[k]).substr(("" + o[k]).length)));
28
- return fmt;
29
- }
8
+ import Vue from 'vue'
9
+ import {HttpResetClass} from 'vue-client'
10
+ import {isEmpty} from "../../../Util";
11
+
12
+ // Date格式化
13
+ Date.prototype.Format = function (fmt) {
14
+ var o = {
15
+ "M+": this.getMonth() + 1, //月份
16
+ "d+": this.getDate(), //日
17
+ "H+": this.getHours(), //小时
18
+ "m+": this.getMinutes(), //分
19
+ "s+": this.getSeconds(), //秒
20
+ "q+": Math.floor((this.getMonth() + 3) / 3), //季度
21
+ "S": this.getMilliseconds() //毫秒
22
+ };
23
+ if (/(y+)/.test(fmt)) fmt = fmt.replace(RegExp.$1, (this.getFullYear() + "").substr(4 - RegExp.$1.length));
24
+ for (var k in o)
25
+ if (new RegExp("(" + k + ")").test(fmt)) fmt = fmt.replace(RegExp.$1, (RegExp.$1.length == 1) ? (o[k]) : (("00" + o[k]).substr(("" + o[k]).length)));
26
+ return fmt;
27
+ }
28
+
29
+ export default {
30
+ title: '报建流程业务控制层',
31
+ props: ['selectdata'],
32
+ data () {
33
+ return {
34
+ data: null, // 数据库数据,json配置文件数据的数据集合
35
+ json_datas: null, // Json配置文件集合
36
+ showview: false, // 控制显示service-view组件
37
+ show_data: null, // 给view层显示的数据
38
+ config: {}
39
+ }
40
+ },
41
+ ready () {
42
+ this.refurbish()
43
+ },
44
+ methods: {
45
+ // 组件初始化操作
46
+ async refurbish() {
47
+ this.json_datas = this.$workflow_vue
48
+ let sum = 0
49
+ let jsonData = {}
50
+ if (!this.json_datas || !this.json_datas.activitys || this.json_datas.activitys.length === 0) {
51
+ this.$showMessage("网络故障,请刷新页面")
52
+ return
53
+ }
54
+ this.json_datas.activitys.forEach(item => {
55
+ if (this.selectdata.defname === item.title) {
56
+ jsonData = item // 拿到当前节点的json配置信息
57
+ sum++ // 节点名一样的个数
58
+ }
59
+ return this.selectdata.defname === item.title // 拿到当前节点的json配置信息
60
+ })
30
61
 
31
- export default {
32
- title: '报建流程业务控制层',
33
- props: ['selectdata'],
34
- data () {
35
- return {
36
- data: null, // 数据库数据,json配置文件数据的数据集合
37
- json_datas: null, // Json配置文件集合
38
- showview: false, // 控制显示service-view组件
39
- show_data: null, // 给view层显示的数据
40
- config: {}
41
- }
42
- },
43
- ready () {
44
- this.refurbish()
45
- },
46
- methods: {
47
- // 组件初始化操作
48
- async refurbish() {
49
- this.json_datas = this.$workflow_vue
50
- let sum = 0
51
- let jsonData = {}
52
- if (!this.json_datas || !this.json_datas.activitys || this.json_datas.activitys.length === 0) {
53
- this.$showMessage("网络故障,请刷新页面")
54
- return
55
- }
56
- this.json_datas.activitys.forEach(item => {
57
- if (this.selectdata.defname === item.title) {
58
- jsonData = item // 拿到当前节点的json配置信息
59
- sum++ // 节点名一样的个数
60
- }
61
- return this.selectdata.defname === item.title // 拿到当前节点的json配置信息
62
- })
62
+ if (sum === 0) {
63
+ this.$showMessage(`没有在JSON配置文件中找到活动名为:(${this.selectdata.defname})的节点配置`)
64
+ return
65
+ }
66
+ if (sum > 1) {
67
+ this.$showMessage(`在JSON配置文件中找到活动名为:(${this.selectdata.defname})的节点配置:${sum}个`)
68
+ return
69
+ }
63
70
 
64
- if (sum === 0) {
65
- this.$showMessage(`没有在JSON配置文件中找到活动名为:(${this.selectdata.defname})的节点配置`)
66
- return
67
- }
68
- if (sum > 1) {
69
- this.$showMessage(`在JSON配置文件中找到活动名为:(${this.selectdata.defname})的节点配置:${sum}个`)
70
- return
71
- }
71
+ this.selectdata = Object.assign({}, this.selectdata, jsonData)
72
72
 
73
- this.selectdata = Object.assign({}, this.selectdata, jsonData)
73
+ // fields 字段填充值
74
+ for (const item of this.selectdata.fields) {
75
+ if (!item.value) {
76
+ item.value = null
77
+ }
74
78
 
75
- // fields 字段填充值
76
- for (const item of this.selectdata.fields) {
77
- if (!item.value) {
78
- item.value = null
79
+ if (!item.value && (item.default || item.default === 0) && item.type !== 'datepicker') {
80
+ if (item.eval) {
81
+ item.value = eval(item.default)
82
+ } else {
83
+ item.value = item.default
79
84
  }
85
+ }
80
86
 
81
- if (!item.value && (item.default || item.default === 0) && item.type !== 'datepicker') {
82
- if (item.eval) {
83
- item.value = eval(item.default)
84
- } else {
85
- item.value = item.default
86
- }
87
+ if (this.selectdata[item.field]) {
88
+ // 将json字符串格式化赋值给value
89
+ if (String(this.selectdata[item.field]).startsWith("{")) {
90
+ item.value = JSON.parse(this.selectdata[item.field])
91
+ } else {
92
+ item.value = this.selectdata[item.field]
87
93
  }
94
+ }
95
+ if (this.selectdata[item.field] === 0) {
96
+ item.value = 0
97
+ }
88
98
 
89
- if (this.selectdata[item.field]) {
90
- // 将json字符串格式化赋值给value
91
- if (String(this.selectdata[item.field]).startsWith("{")) {
92
- item.value = JSON.parse(this.selectdata[item.field])
93
- } else {
94
- item.value = this.selectdata[item.field]
95
- }
96
- }
97
- if (this.selectdata[item.field] === 0) {
98
- item.value = 0
99
- }
99
+ // datepicker
100
+ if (item.type === 'datepicker' && !item.value && item.default) {
101
+ item.value = new Date().Format(`${item.format ? item.format : 'yyyy-MM-dd HH:mm:ss'}`)
102
+ }
100
103
 
101
- // datepicker
102
- if (item.type === 'datepicker' && !item.value && item.default) {
103
- item.value = new Date().Format(`${item.format ? item.format : 'yyyy-MM-dd HH:mm:ss'}`)
104
- }
104
+ // 如果配置类型为select,优先从参数列表获取options
105
+ if (item.type === 'select' || item.type === 'checkbox') {
106
+ if (item.param) {
107
+ let temp = this.$appdata.getParam(item.label)
105
108
 
106
- // 如果配置类型为select,优先从参数列表获取options
107
- if (item.type === 'select' || item.type === 'checkbox') {
108
- if (item.param) {
109
- let temp = this.$appdata.getParam(item.label)
109
+ if (temp && temp.length > 0) {
110
+ item.options = temp
111
+ }
110
112
 
113
+ if (item.paramLabel) {
114
+ temp = this.$appdata.getParam(item.paramLabel)
111
115
  if (temp && temp.length > 0) {
112
116
  item.options = temp
113
117
  }
114
-
115
- if (item.paramLabel) {
116
- temp = this.$appdata.getParam(item.paramLabel)
117
- if (temp && temp.length > 0) {
118
- item.options = temp
119
- }
120
- }
121
118
  }
122
- //
123
- // if (item.ready) {
124
- // item.options = await this[item.ready]()
125
- // }
126
119
  }
127
120
 
128
-
129
- if (item.type === 'checkbox') {
130
- if (this.selectdata[item.field]) {
131
- item.value = JSON.parse(this.selectdata[item.field])
132
- } else {
133
- item.value = []
134
- }
121
+ if (item.ready) {
122
+ item.options = await this[item.ready]()
135
123
  }
136
124
  }
137
125
 
138
- // 控制组件
139
- if (this.selectdata.components) {
140
- this.selectdata.components.forEach(item => {
141
- if (!item.mark) {
142
- item.mark = 0
143
- }
144
- })
126
+
127
+ if (item.type === 'checkbox') {
128
+ if (this.selectdata[item.field]) {
129
+ item.value = JSON.parse(this.selectdata[item.field])
130
+ } else {
131
+ item.value = []
132
+ }
145
133
  }
146
134
 
147
- // 初始化onetomany
148
- if (this.selectdata.onetomany) {
149
- for (const item of this.selectdata.onetomany) {
150
- let res = null
151
- if (item.queryEvent) {
152
- res = this[item.queryEvent]()
153
- } else {
154
- let data = {
155
- tablename: item.tables[0],
156
- condition: `f_process_id='${this.selectdata.f_process_id}'`
157
- }
158
- res = await this.$resetpost(
159
- 'rs/sql/singleTable',
160
- {data: data},
161
- {resolveMsg: null, rejectMsg: 'onetomany查询失败'}
162
- )
135
+ this.selectdata[item.field] = item.value
136
+ }
137
+
138
+ // 控制组件
139
+ if (this.selectdata.components) {
140
+ this.selectdata.components.forEach(item => {
141
+ if (!item.mark) {
142
+ item.mark = 0
143
+ }
144
+ })
145
+ }
146
+
147
+ // 初始化onetomany
148
+ if (this.selectdata.onetomany) {
149
+ for (const item of this.selectdata.onetomany) {
150
+ let res = null
151
+ if (item.queryEvent) {
152
+ res = this[item.queryEvent]()
153
+ } else {
154
+ let data = {
155
+ tablename: item.tables[0],
156
+ condition: `f_process_id='${this.selectdata.f_process_id}'`
163
157
  }
158
+ res = await this.$resetpost(
159
+ 'rs/sql/singleTable',
160
+ {data: data},
161
+ {resolveMsg: null, rejectMsg: 'onetomany查询失败'}
162
+ )
163
+ }
164
164
 
165
- item.rows = res.data
165
+ item.rows = res.data
166
166
 
167
- // 初始化onetomany中的fields
168
- for (const field of item.fields) {
169
- if (!field.value) {
170
- if (field.value !== 0) {
171
- field.value = null
172
- }
167
+ // 初始化onetomany中的fields
168
+ for (const field of item.fields) {
169
+ if (!field.value) {
170
+ if (field.value !== 0) {
171
+ field.value = null
173
172
  }
173
+ }
174
174
 
175
- if (field.default || field.default === 0) {
176
- field.value = field.default
177
- }
175
+ if (field.default || field.default === 0) {
176
+ field.value = field.default
177
+ }
178
178
 
179
- // datepicker
180
- if (field.type === 'datepicker' && !field.value && field.default) {
181
- field.value = new Date().Format(`${field.format ? field.format : 'yyyy-MM-dd HH:mm:ss'}`)
182
- }
179
+ // datepicker
180
+ if (field.type === 'datepicker' && !field.value && field.default) {
181
+ field.value = new Date().Format(`${field.format ? field.format : 'yyyy-MM-dd HH:mm:ss'}`)
182
+ }
183
183
 
184
- if (field.type === 'select') {
184
+ if (field.type === 'select') {
185
185
 
186
- let temp = this.$appdata.getParam(field.label)
186
+ let temp = this.$appdata.getParam(field.label)
187
187
 
188
- if (temp && temp.length > 0) {
189
- field.options = temp
190
- }
188
+ if (temp && temp.length > 0) {
189
+ field.options = temp
190
+ }
191
191
 
192
- if (field.paramLabel) {
193
- temp = this.$appdata.getParam(field.paramLabel)
194
- if (temp && temp.length > 0) {
195
- item.options = temp
196
- }
192
+ if (field.paramLabel) {
193
+ temp = this.$appdata.getParam(field.paramLabel)
194
+ if (temp && temp.length > 0) {
195
+ item.options = temp
197
196
  }
198
-
199
197
  }
198
+
200
199
  }
201
200
  }
202
201
  }
202
+ }
203
203
 
204
- // 初始化 buttons_fields
205
- for (const item of this.selectdata.buttons) {
206
- if (item.button_name === '下发') {
204
+ // 初始化 buttons_fields
205
+ for (const item of this.selectdata.buttons) {
206
+ if (item.button_name === '下发') {
207
207
 
208
- let data = {
209
- source: item.source,
210
- userid: this.$login.f.id
211
- }
212
- if (item.sourceMethod) {
213
- data.source = this[item.sourceMethod]()
214
- }
215
- if (!data.source) {
216
- this.$showMessage("请配置获取人员表达式")
217
- return
218
- }
219
-
220
- let res = await this.$resetpost(
221
- 'rs/search',
222
- {data: data},
223
- {resolveMsg: null, rejectMsg: '下发人员查询失败!!!'}
224
- )
208
+ let data = {
209
+ source: item.source,
210
+ userid: this.$login.f.id
211
+ }
212
+ if (item.sourceMethod) {
213
+ data.source = this[item.sourceMethod]()
214
+ }
215
+ if (!data.source) {
216
+ this.$showMessage("请配置获取人员表达式")
217
+ return
218
+ }
225
219
 
226
- let options = res.data.map(source => {
227
- return {
228
- "label": source.name,
229
- "value": source.id
230
- }
231
- })
220
+ let res = await this.$resetpost(
221
+ 'rs/search',
222
+ {data: data},
223
+ {resolveMsg: null, rejectMsg: '下发人员查询失败!!!'}
224
+ )
232
225
 
233
- if (item.button_fields.length !== 1) {
234
- this.$showMessage("下发有且只能有一个字段!!!")
235
- return
226
+ let options = res.data.map(source => {
227
+ return {
228
+ "label": source.name,
229
+ "value": source.id
236
230
  }
231
+ })
237
232
 
238
- item.button_fields[0].options = options
233
+ if (item.button_fields.length !== 1) {
234
+ this.$showMessage("下发有且只能有一个字段!!!")
235
+ return
239
236
  }
240
- if (item.button_fields) {
241
- item.button_fields.forEach(x => {
242
- // 如果配置类型为select,优先从参数列表获取options
243
- if (x.type === 'select') {
244
237
 
245
- if (x.param) {
246
- let temp = this.$appdata.getParam(x.label)
238
+ item.button_fields[0].options = options
239
+ }
240
+ if (item.button_fields) {
241
+ item.button_fields.forEach(x => {
242
+ // 如果配置类型为select,优先从参数列表获取options
243
+ if (x.type === 'select') {
244
+
245
+ if (x.param) {
246
+ let temp = this.$appdata.getParam(x.label)
247
+
248
+ if (temp && temp.length > 0) {
249
+ x.options = temp
250
+ }
247
251
 
252
+ if (x.paramLabel) {
253
+ temp = this.$appdata.getParam(x.paramLabel)
248
254
  if (temp && temp.length > 0) {
249
255
  x.options = temp
250
256
  }
251
-
252
- if (x.paramLabel) {
253
- temp = this.$appdata.getParam(x.paramLabel)
254
- if (temp && temp.length > 0) {
255
- x.options = temp
256
- }
257
- }
258
257
  }
259
-
260
258
  }
261
- })
262
- }
259
+
260
+ }
261
+ })
263
262
  }
263
+ }
264
264
 
265
- // 消除双向绑定,避免子组件(显示层)数据更改,父组件(控制层)也更改
266
- let temp = JSON.parse(JSON.stringify(this.selectdata))
265
+ // 消除双向绑定,避免子组件(显示层)数据更改,父组件(控制层)也更改
266
+ let temp = JSON.parse(JSON.stringify(this.selectdata))
267
267
 
268
- this.show_data = temp
269
- this.$nextTick(() => {
270
- this.showview = true
271
- })
272
- },
273
- // 金额转大写
274
- smalltoBIG(n) {
275
- let fraction = ['角', '分'];
276
- let digit = ['零', '壹', '贰', '叁', '肆', '伍', '陆', '柒', '捌', '玖'];
277
- let unit = [['元', '万', '亿'], ['', '拾', '佰', '仟']];
278
- let head = n < 0 ? '欠' : '';
279
- n = Math.abs(n);
280
-
281
- let s = '';
282
-
283
- for (var i = 0; i < fraction.length; i++) {
284
- s += (digit[Math.floor(n * 10 * Math.pow(10, i)) % 10] + fraction[i]).replace(/零./, '');
285
- }
286
- s = s || '整';
287
- n = Math.floor(n);
288
-
289
- for (var i = 0; i < unit[0].length && n > 0; i++) {
290
- let p = '';
291
- for (var j = 0; j < unit[1].length && n > 0; j++) {
292
- p = digit[n % 10] + unit[1][j] + p;
293
- n = Math.floor(n / 10);
294
- }
295
- s = p.replace(/(零.)*零$/, '').replace(/^$/, '零') + unit[0][i] + s;
296
- }
297
- return head + s.replace(/(零.)*零元/, '元').replace(/(零.)+/g, '零').replace(/^整$/, '零元整')
298
- },
299
- getLableValue(label) {
300
- for (const item of this.show_data.fields) {
301
- if (item.label === label && item.type !== 'number') {
302
- return item.value || ''
303
- }
304
- if (item.label === label && item.type === 'number') {
305
- return item.value || 0
306
- }
268
+ this.show_data = temp
269
+ this.$nextTick(() => {
270
+ this.showview = true
271
+ })
272
+ },
273
+ // 金额转大写
274
+ smalltoBIG(n) {
275
+ let fraction = ['角', '分'];
276
+ let digit = ['零', '壹', '贰', '叁', '肆', '伍', '陆', '柒', '捌', '玖'];
277
+ let unit = [['元', '万', '亿'], ['', '拾', '佰', '仟']];
278
+ let head = n < 0 ? '欠' : '';
279
+ n = Math.abs(n);
280
+
281
+ let s = '';
282
+
283
+ for (var i = 0; i < fraction.length; i++) {
284
+ s += (digit[Math.floor(n * 10 * Math.pow(10, i)) % 10] + fraction[i]).replace(/零./, '');
285
+ }
286
+ s = s || '整';
287
+ n = Math.floor(n);
288
+
289
+ for (var i = 0; i < unit[0].length && n > 0; i++) {
290
+ let p = '';
291
+ for (var j = 0; j < unit[1].length && n > 0; j++) {
292
+ p = digit[n % 10] + unit[1][j] + p;
293
+ n = Math.floor(n / 10);
307
294
  }
308
- },
309
- getLableOptions(label) {
310
- for (const item of this.show_data.fields) {
311
- if (item.label === label) {
312
- return item.options
313
- }
295
+ s = p.replace(/(零.)*零$/, '').replace(/^$/, '零') + unit[0][i] + s;
296
+ }
297
+ return head + s.replace(/(零.)*零元/, '元').replace(/(零.)+/g, '零').replace(/^整$/, '零元整')
298
+ },
299
+ getLableValue(label) {
300
+ for (const item of this.show_data.fields) {
301
+ if (item.label === label && item.type !== 'number') {
302
+ return item.value || ''
314
303
  }
315
- },
316
- setLabelValue(label, value) {
317
- for (const item of this.show_data.fields) {
318
- if (item.label === label) {
319
- item.value = value
320
- this.show_data[item.field] = value
321
- }
304
+ if (item.label === label && item.type === 'number') {
305
+ return item.value || 0
322
306
  }
323
- },
324
- setLabelOptions(label, options) {
325
- for (const item of this.show_data.fields) {
326
- if (item.label === label) {
327
- item.options = options
328
- }
307
+ }
308
+ },
309
+ getLableOptions(label) {
310
+ for (const item of this.show_data.fields) {
311
+ if (item.label === label) {
312
+ return item.options
329
313
  }
330
- },
331
- async checkDuplicate(index) {
332
- let http = new HttpResetClass()
333
- let data = {
334
- tablename: 't_apply',
335
- condition: `${this.show_data.fields[index].field} = '${this.show_data.fields[index].value}'`
314
+ }
315
+ },
316
+ setLabelValue(label, value) {
317
+ for (const item of this.show_data.fields) {
318
+ if (item.label === label) {
319
+ item.value = value
320
+ this.show_data[item.field] = value
321
+ }
322
+ }
323
+ },
324
+ setLabelOptions(label, options) {
325
+ for (const item of this.show_data.fields) {
326
+ if (item.label === label) {
327
+ item.options = options
336
328
  }
337
- let res = await http.load('POST', 'rs/sql/singleTable', {data: data}, {
329
+ }
330
+ },
331
+ async checkDuplicate(index) {
332
+ let http = new HttpResetClass()
333
+ let data = {
334
+ tablename: 't_apply',
335
+ condition: `${this.show_data.fields[index].field} = '${this.show_data.fields[index].value}'`
336
+ }
337
+ let res = await http.load('POST', 'rs/sql/singleTable', {data: data}, {
338
+ resolveMsg: null,
339
+ rejectMsg: `${this.show_data.fields[index].label}查询失败`
340
+ })
341
+ if (res.data.length > 0) {
342
+ this.show_data.fields[index].value = null
343
+ this.$showAlert(`${this.show_data.fields[index].label}已存在!!!`, 'warning', 3000)
344
+ }
345
+ },
346
+ // 获取片区
347
+ async getSliceArea () {
348
+ let data = {
349
+ source: 'this.getParentByType($organization$).getAllChildrens().where(row.getType() == $zone$)',
350
+ userid: this.$login.f.id
351
+ }
352
+
353
+ let http = new HttpResetClass()
354
+ let res = await http.load(
355
+ 'POST',
356
+ `rs/search`,
357
+ {data: data},
358
+ {resolveMsg: null, rejectMsg: '片区查询失败!!!'}
359
+ )
360
+
361
+ return res.data.map(item => {
362
+ return {
363
+ label: item.name,
364
+ value: item.name
365
+ }
366
+ })
367
+ },
368
+ // 获取区县
369
+ async getPcd () {
370
+ let data = {
371
+ tablename: 't_pcd',
372
+ condition: `f_filialeid = '${this.$login.f.orgid}'`
373
+ }
374
+ let http = new HttpResetClass()
375
+ let res = await http.load(
376
+ 'POST',
377
+ `rs/sql/singleTable`,
378
+ {data: data},
379
+ {resolveMsg: null, rejectMsg: '区县查询失败!!!'}
380
+ )
381
+
382
+ return res.data.map(item => {
383
+ return {
384
+ label: item.f_pcd,
385
+ value: item.f_pcd
386
+ }
387
+ })
388
+ },
389
+ // 缴费前置
390
+ chargeBefore () {
391
+ if (Number(this.show_data.f_due_money) > Number(this.show_data.f_cumulative_payment_money) || Number(this.show_data.f_surplus_money) > 0) {
392
+ this.$showAlert('费用未结清!!!', 'warning', 3000)
393
+ throw null
394
+ }
395
+ },
396
+ // 施工前置
397
+ async constructionBefore () {
398
+ let http = new HttpResetClass()
399
+ let data = {
400
+ condition: `ui.f_process_id = '${this.show_data.f_process_id}' and uf.f_table_state = '待开通'`
401
+ }
402
+ let res = await http.load(
403
+ 'POST',
404
+ 'rs/sql/countApplyUserinfo',
405
+ {data: data},
406
+ {
338
407
  resolveMsg: null,
339
- rejectMsg: `${this.show_data.fields[index].label}查询失败`
408
+ rejectMsg: '安装明细查询失败!!!'
340
409
  })
341
- if (res.data.length > 0) {
342
- this.show_data.fields[index].value = null
343
- this.$showAlert(`${this.show_data.fields[index].label}已存在!!!`, 'warning', 3000)
410
+ if (res.data[0].num > 0) {
411
+ this.$showAlert(`还有${res.data[0].num}户未安装,无法提交`, 'warning', 3000)
412
+ throw `还有${res.data[0].num}户未安装,无法提交`
413
+ }
414
+ },
415
+ changePipeBuild () {
416
+ if (this.selectdata.f_process_dep === '工程部') {
417
+ return 'this.getParentByType($organization$).getChildByName($工程部报装$).getChildren()'
418
+ }
419
+ if (this.selectdata.f_process_dep === '运营部') {
420
+ return 'this.getParentByType($organization$).getChildByName($运营部报装$).getChildren()'
421
+ }
422
+ },
423
+ async getDevInfo () {
424
+ let data = {
425
+ tablename: 't_dev_info',
426
+ condition: `f_orgid = '${this.$login.f.orgid}'`
427
+ }
428
+ let http = new HttpResetClass()
429
+ let res = await http.load(
430
+ 'POST',
431
+ `rs/sql/singleTable`,
432
+ {data: data},
433
+ {resolveMsg: null, rejectMsg: '公司查询失败!!!'}
434
+ )
435
+
436
+ return res.data.map(item => {
437
+ return {
438
+ label: item.f_dev_name,
439
+ value: item.f_dev_name
344
440
  }
345
- },
346
- // 获取片区
347
- async getSliceArea () {
348
- let data = {
349
- source: 'this.getParentByType($organization$).getAllChildrens().where(row.getType() == $zone$)',
350
- userid: this.$login.f.id
441
+ })
442
+ },
443
+ async getPrice (f_price_id) {
444
+ console.log('=======================')
445
+ console.log(f_price_id)
446
+
447
+ let data = {
448
+ condition: `sp.f_orgid = '${this.$login.f.orgid}'`
449
+ }
450
+
451
+ if (!isEmpty(f_price_id)) {
452
+ data.condition = `sp.f_orgid = '${this.$login.f.orgid}' and sp.f_price_id = ${f_price_id}`
453
+ }
454
+ let http = new HttpResetClass()
455
+ let res = await http.load(
456
+ 'POST',
457
+ `rs/sql/applyGetPrice`,
458
+ {data: data},
459
+ {resolveMsg: null, rejectMsg: '气价查询失败!!!'}
460
+ )
461
+
462
+ return res.data.map(item => {
463
+ return {
464
+ label: item.f_price_name,
465
+ value: item
351
466
  }
467
+ })
468
+ }
469
+ },
470
+ events: {
471
+ // 选择气价
472
+ 'priceChange' (index) {
473
+ if (isEmpty(this.show_data.stairPrice)) {
474
+ return
475
+ }
352
476
 
353
- let res = await this.$resetpost(
354
- `rs/search`,
355
- {data: data},
356
- {resolveMsg: null, rejectMsg: '片区查询失败!!!'}
357
- )
477
+ let stairPrice = this.getLableValue('气价名称')
358
478
 
359
- return res.data.map(item => {
360
- return {
361
- label: item.name,
362
- value: item.name
363
- }
364
- })
365
- },
366
- // 获取区县
367
- async getPcd () {
368
- let data = {
369
- tablename: 't_pcd',
370
- condition: `f_filialeid = '${this.$login.f.orgid}'`
371
- }
372
- let res = await this.$resetpost(
373
- `rs/sql/singleTable`,
374
- {data: data},
375
- {resolveMsg: null, rejectMsg: '区县查询失败!!!'}
376
- )
377
-
378
- return res.data.map(item => {
379
- return {
380
- label: item.f_pcd,
381
- value: item.f_pcd
479
+ this.setLabelValue('气价类型', stairPrice.f_price_type)
480
+ this.setLabelValue('用气性质', stairPrice.f_gasproperties)
481
+ this.setLabelValue('价格', stairPrice.f_price)
482
+ this.setLabelValue('客户类型', stairPrice.f_user_type)
483
+
484
+ this.show_data.f_price_id = stairPrice.f_price_id
485
+ this.show_data.f_price_name = stairPrice.f_price_name
486
+ },
487
+ // 选择开发商
488
+ async 'devInfoChange' (index) {
489
+ if (isEmpty(this.show_data.f_company_name)) {
490
+ return
491
+ }
492
+ let data = {
493
+ tablename: 't_dev_info',
494
+ condition: `f_orgid = '${this.$login.f.orgid}' and f_dev_name = '${this.show_data.f_company_name}'`
495
+ }
496
+ let res = await this.$resetpost(
497
+ `rs/sql/singleTable`,
498
+ {data: data},
499
+ {resolveMsg: null, rejectMsg: '公司查询失败!!!'}
500
+ )
501
+ this.show_data.f_dev_id = res.data[0].id
502
+ this.setLabelValue('法人名称', res.data[0].f_legal_person)
503
+ this.setLabelValue('身份证', res.data[0].f_idnumber)
504
+ this.setLabelValue('营业执照', res.data[0].f_license_num)
505
+ },
506
+ // 退款金额
507
+ 'refundMoneyChange' (index) {
508
+ let f_cumulative_payment_money = this.show_data.f_cumulative_payment_money
509
+ let f_refund_money = this.show_data.fields[index].value
510
+
511
+ if (f_refund_money > f_cumulative_payment_money) {
512
+ this.$showAlert('退款金额不能大于累计缴费金额!!!', 'warning', 3000)
513
+ this.show_data.fields[index].value = null
514
+ }
515
+ },
516
+ // 检查重复
517
+ 'checkRepeat' (index) {
518
+ this.checkDuplicate(index)
519
+ },
520
+ // 选择报建项目
521
+ 'selectApply' (row) {
522
+ this.setLabelValue('工程名称', row.f_entry_name)
523
+ this.setLabelValue('工程编号', row.f_apply_num)
524
+ this.setLabelValue('报建类型', row.f_apply_type)
525
+ this.setLabelValue('用户名称', row.f_user_name)
526
+ this.setLabelValue('用户电话', row.f_phone)
527
+ this.setLabelValue('证件类型', row.f_credentials)
528
+ this.setLabelValue('证件号码', row.f_idnumber)
529
+ this.setLabelValue('地址', row.f_address)
530
+ this.setLabelValue('累计缴费金额', row.f_cumulative_payment_money)
531
+
532
+ this.show_data.parentApply = JSON.parse(JSON.stringify(row))
533
+
534
+ delete row.id
535
+ delete row.actid
536
+ delete row.defid
537
+ delete row.defname
538
+ delete row.version
539
+ delete row.f_apply_num
540
+ delete row.f_sub_state
541
+ delete row.f_apply_type
542
+ delete row.f_process_id
543
+
544
+ this.show_data = Object.assign({}, this.show_data, row)
545
+
546
+ this.show_data.f_parent_process_id = this.show_data.parentApply.f_process_id
547
+ },
548
+ // 是否终止
549
+ 'isStopChange' (index) {
550
+ let f_is_stop = this.show_data.f_is_stop
551
+
552
+ for (const item of this.show_data.fields) {
553
+ if (f_is_stop === '是') {
554
+ if (item.label === '终止原因') {
555
+ item.hidden = false
556
+ item.required = true
382
557
  }
383
- })
384
- },
385
- // 缴费前置
386
- chargeBefore () {
387
- if (Number(this.show_data.f_due_money) > Number(this.show_data.f_cumulative_payment_money) || Number(this.show_data.f_surplus_money) > 0) {
388
- this.$showAlert('费用未结清!!!', 'warning', 3000)
389
- throw null
390
- }
391
- },
392
- // 施工前置
393
- async constructionBefore () {
394
- let http = new HttpResetClass()
395
- let data = {
396
- condition: `ui.f_process_id = '${this.show_data.f_process_id}' and uf.f_table_state = '待开通'`
397
- }
398
- let res = await http.load(
399
- 'POST',
400
- 'rs/sql/countApplyUserinfo',
401
- {data: data},
402
- {
403
- resolveMsg: null,
404
- rejectMsg: '安装明细查询失败!!!'
405
- })
406
- // if (res.data[0].num > 0) {
407
- // this.$showAlert(`还有${res.data[0].num}户未安装,无法提交`, 'warning', 3000)
408
- // throw `还有${res.data[0].num}户未安装,无法提交`
409
- // }
410
- },
411
- changePipeBuild () {
412
- if (this.selectdata.f_process_dep === '工程部') {
413
- return 'this.getParentByType($organization$).getChildByName($工程部报装$).getChildren()'
414
- }
415
- if (this.selectdata.f_process_dep === '运营部') {
416
- return 'this.getParentByType($organization$).getChildByName($运营部报装$).getChildren()'
417
- }
418
- },
419
- async getDevInfo () {
420
- let data = {
421
- tablename: 't_dev_info',
422
- condition: `f_orgid = '${this.$login.f.orgid}'`
423
- }
424
- let res = await this.$resetpost(
425
- `rs/sql/singleTable`,
426
- {data: data},
427
- {resolveMsg: null, rejectMsg: '公司查询失败!!!'}
428
- )
429
-
430
- return res.data.map(item => {
431
- return {
432
- label: item.f_dev_name,
433
- value: item.f_dev_name
558
+ } else {
559
+ if (item.label === '终止原因') {
560
+ item.hidden = true
561
+ item.required = false
434
562
  }
435
- })
563
+ }
436
564
  }
437
565
  },
438
- events: {
439
- // 选择开发商
440
- async 'devInfoChange' (index) {
441
- if (isEmpty(this.show_data.f_company_name)) {
442
- return
443
- }
444
- let data = {
445
- tablename: 't_dev_info',
446
- condition: `f_orgid = '${this.$login.f.orgid}' and f_dev_name = '${this.show_data.f_company_name}'`
447
- }
448
- let res = await this.$resetpost(
449
- `rs/sql/singleTable`,
450
- {data: data},
451
- {resolveMsg: null, rejectMsg: '公司查询失败!!!'}
452
- )
453
- this.show_data.f_dev_id = res.data[0].id
454
- this.setLabelValue('法人名称', res.data[0].f_legal_person)
455
- this.setLabelValue('身份证', res.data[0].f_idnumber)
456
- this.setLabelValue('营业执照', res.data[0].f_business_license)
457
- },
458
- // 退款金额
459
- 'refundMoneyChange' (index) {
460
- let f_cumulative_payment_money = this.show_data.f_cumulative_payment_money
461
- let f_refund_money = this.show_data.fields[index].value
462
-
463
- if (f_refund_money > f_cumulative_payment_money) {
464
- this.$showAlert('退款金额不能大于累计缴费金额!!!', 'warning', 3000)
465
- this.show_data.fields[index].value = null
466
- }
467
- },
468
- // 检查重复
469
- 'checkRepeat' (index) {
470
- this.checkDuplicate(index)
471
- },
472
- // 选择报建项目
473
- 'selectApply' (row) {
474
- this.setLabelValue('工程名称', row.f_entry_name)
475
- this.setLabelValue('工程编号', row.f_apply_num)
476
- this.setLabelValue('报建类型', row.f_apply_type)
477
- this.setLabelValue('用户名称', row.f_user_name)
478
- this.setLabelValue('用户电话', row.f_phone)
479
- this.setLabelValue('证件类型', row.f_credentials)
480
- this.setLabelValue('证件号码', row.f_idnumber)
481
- this.setLabelValue('地址', row.f_address)
482
- this.setLabelValue('累计缴费金额', row.f_cumulative_payment_money)
483
-
484
- this.show_data.parentApply = JSON.parse(JSON.stringify(row))
485
-
486
- delete row.id
487
- delete row.actid
488
- delete row.defid
489
- delete row.defname
490
- delete row.version
491
- delete row.f_apply_num
492
- delete row.f_sub_state
493
- delete row.f_apply_type
494
- delete row.f_process_id
495
-
496
- this.show_data = Object.assign({}, this.show_data, row)
497
-
498
- this.show_data.f_parent_process_id = this.show_data.parentApply.f_process_id
499
- },
500
- // 是否终止
501
- 'isStopChange' (index) {
502
- let f_is_stop = this.show_data.f_is_stop
566
+ // 终止报建初始化
567
+ async 'stopApplyReadyEvent' () {
503
568
 
504
- for (const item of this.show_data.fields) {
505
- if (f_is_stop === '是') {
506
- if (item.label === '终止原因') {
507
- item.hidden = false
508
- item.required = true
509
- }
510
- } else {
511
- if (item.label === '终止原因') {
512
- item.hidden = true
513
- item.required = false
514
- }
569
+ let f_is_stop = this.getLableValue('是否终止')
570
+
571
+ for (const item of this.show_data.fields) {
572
+ if (f_is_stop === '是') {
573
+ if (item.label === '终止原因') {
574
+ item.hidden = false
575
+ item.required = true
576
+ }
577
+ } else {
578
+ if (item.label === '终止原因') {
579
+ item.hidden = true
580
+ item.required = false
515
581
  }
516
582
  }
517
- },
518
- async 'stopApplyReadyEvent' () {
519
-
520
- let f_is_stop = this.getLableValue('是否终止')
583
+ }
521
584
 
522
- for (const item of this.show_data.fields) {
523
- if (f_is_stop === '是') {
524
- if (item.label === '终止原因') {
525
- item.hidden = false
526
- item.required = true
527
- }
528
- } else {
529
- if (item.label === '终止原因') {
530
- item.hidden = true
531
- item.required = false
532
- }
585
+ if (isEmpty(this.show_data.f_parent_process_id)) {
586
+ return
587
+ }
588
+ let data = {
589
+ condition: `f_process_id = '${this.show_data.f_parent_process_id}'`,
590
+ data: {
591
+ id: this.$login.f.id,
592
+ orgid: this.$login.f.orgid
593
+ }
594
+ }
595
+ let res = await this.$resetpost(
596
+ `rs/sql/supervisory`,
597
+ {data: data},
598
+ {resolveMsg: null, rejectMsg: '项目查询失败!!!'}
599
+ )
600
+ this.show_data.parentApply = res.data[0]
601
+ },
602
+ // 选择用户档案信息
603
+ 'selectUserinfo' (row) {
604
+ this.setLabelValue('用户编号', row.f_userinfo_code)
605
+ this.setLabelValue('用户名称', row.f_user_name)
606
+ this.setLabelValue('用户电话', row.f_user_phone)
607
+ this.setLabelValue('证件类型', row.f_credentials)
608
+ this.setLabelValue('证件号码', row.f_idnumber)
609
+ this.setLabelValue('地址', row.f_address)
610
+
611
+ this.show_data.f_userinfo_id = row.f_userinfo_id
612
+ this.show_data.f_userinfo_code = row.f_userinfo_code
613
+ },
614
+ // 是否购买保险
615
+ async 'isInsureChange' (index) {
616
+ if (!this.show_data.f_is_insure) {
617
+ return
618
+ }
619
+ let f_is_insure = this.show_data.f_is_insure
620
+ for (const item of this.show_data.fields) {
621
+ if (f_is_insure === '是') {
622
+ if (item.label === '保费开始日期' || item.label === '保费结束日期' || item.label === '险种' || item.label === '保费金额') {
623
+ item.hidden = false
624
+ item.required = true
625
+ }
626
+ if (item.label === '保险备注') {
627
+ item.hidden = false
628
+ }
629
+ } else {
630
+ if (item.label === '保费开始日期' || item.label === '保费结束日期' || item.label === '险种' || item.label === '保费金额' || item.label === '保险备注') {
631
+ item.hidden = true
632
+ item.required = false
533
633
  }
534
634
  }
635
+ }
636
+ },
637
+ // 通气点火初始化
638
+ async 'gasReadyEvent' () {
639
+ // 是否有气价信息
640
+ if (!isEmpty(this.show_data.f_price_id)) {
641
+ let priceList = await this.getPrice(this.show_data.f_price_id)
642
+ this.setLabelValue('气价名称', priceList[0].value)
643
+ }
535
644
 
536
- if (isEmpty(this.show_data.f_parent_process_id)) {
537
- return
538
- }
539
- let data = {
540
- condition: `f_process_id = '${this.show_data.f_parent_process_id}'`,
541
- data: {
542
- id: this.$login.f.id,
543
- orgid: this.$login.f.orgid
544
- }
545
- }
546
- let res = await this.$resetpost(
547
- `rs/sql/supervisory`,
548
- {data: data},
549
- {resolveMsg: null, rejectMsg: '项目查询失败!!!'}
550
- )
551
- this.show_data.parentApply = res.data[0]
552
- },
553
- // 选择用户档案信息
554
- 'selectUserinfo' (row) {
555
- this.setLabelValue('用户编号', row.f_userinfo_code)
556
- this.setLabelValue('用户名称', row.f_user_name)
557
- this.setLabelValue('用户电话', row.f_user_phone)
558
- this.setLabelValue('证件类型', row.f_credentials)
559
- this.setLabelValue('证件号码', row.f_idnumber)
560
- this.setLabelValue('地址', row.f_address)
561
-
562
- this.show_data.f_userinfo_id = row.f_userinfo_id
563
- this.show_data.f_userinfo_code = row.f_userinfo_code
564
- },
565
- // 是否购买保险
566
- isInsureChange (index) {
567
- let f_is_insure = this.getLableValue('是否购买保险')
645
+ let data = {
646
+ tablename: 't_userfees',
647
+ condition: `f_orgid = '${this.$login.f.orgid}' and f_userinfo_id = '${this.show_data.f_userinfo_id}' and f_state = '待执行'`
648
+ }
649
+ let http = new HttpResetClass()
650
+ let res = await http.load(
651
+ 'POST',
652
+ `rs/sql/singleTable`,
653
+ {data: data},
654
+ {resolveMsg: null, rejectMsg: '保险查询失败!!!'}
655
+ )
656
+ if (res.data.length > 0) {
657
+ this.setLabelValue('待执行保险', '是')
568
658
  for (const item of this.show_data.fields) {
569
- if (f_is_insure === '') {
570
- if (item.label === '保费开始日期' || item.label === '保费结束日期' || item.label === '险种' || item.label === '保费金额') {
571
- item.hidden = false
572
- item.required = true
573
- }
574
- if (item.label === '保险备注') {
575
- item.hidden = false
576
- }
577
- } else {
578
- if (item.label === '保费开始日期' || item.label === '保费结束日期' || item.label === '险种' || item.label === '保费金额') {
579
- item.hidden = true
580
- item.required = false
581
- }
582
- if (item.label === '保险备注') {
583
- item.hidden = true
584
- }
659
+ if (item.label === '保费开始日期' || item.label === '是否购买保险' || item.label === '保费结束日期' || item.label === '险种' || item.label === '保费金额' || item.label === '保险备注') {
660
+ item.hidden = true
661
+ item.required = false
662
+ item.value = null
585
663
  }
586
664
  }
587
- },
588
- // 通气点火初始化
589
- async 'gasReadyEvent' () {
590
- // 初始化显示内容
591
- let f_is_insure = this.getLableValue('是否购买保险')
665
+ } else {
666
+ this.setLabelValue('待执行保险', '否')
592
667
  for (const item of this.show_data.fields) {
593
- if (f_is_insure === '') {
594
- if (item.label === '保费开始日期' || item.label === '保费结束日期' || item.label === '险种' || item.label === '保费金额') {
595
- item.hidden = false
596
- item.required = true
597
- }
598
- if (item.label === '保险备注') {
599
- item.hidden = false
600
- }
601
- } else {
602
- if (item.label === '保费开始日期' || item.label === '保费结束日期' || item.label === '险种' || item.label === '保费金额') {
603
- item.hidden = true
604
- item.required = false
605
- }
606
- if (item.label === '保险备注') {
607
- item.hidden = true
608
- }
668
+ if (item.label === '是否购买保险' || item.label === '保费开始日期' || item.label === '保费结束日期' || item.label === '险种' || item.label === '保费金额' || item.label === '保险备注') {
669
+ item.hidden = false
670
+ item.required = true
609
671
  }
610
672
  }
611
- // 本期保费到期时间默认一年
612
- if (isEmpty(this.selectdata.f_ins_expiration_date)) {
613
- let f_ins_expiration_date = new Date().setFullYear(new Date().getFullYear() + 1)
614
- this.setLabelValue("保费结束日期", new Date(f_ins_expiration_date).Format('yyyy-MM-dd'))
615
- }
616
- },
617
- // 合同金额失去焦点
618
- async 'contractMoneyChange' (index) {
619
- let data = {
620
- operator: '+',
621
- num1: this.show_data.f_contract_money || 0,
622
- num2: this.getLableValue('追加金额') || 0
623
- }
624
- let res = await this.$resetpost(
625
- `rs/logic/compute`,
626
- {data: data},
627
- {resolveMsg: null, rejectMsg: '金额计算失败!!!'}
628
- )
629
-
630
- this.setLabelValue('应交金额', res.data)
631
- },
632
- // 街道失去焦点
633
- async 'streetChange' (index) {
634
- if (isEmpty(this.show_data.f_street)) {
635
- return
636
- }
637
-
638
- this.setLabelValue('区域', null)
639
-
640
- let data = {
641
- tablename: 't_area',
642
- condition: `f_filialeid = '${this.$login.f.orgid}' and f_street = '${this.show_data.f_street}'`
643
- }
644
- let res = await this.$resetpost(
645
- `rs/sql/singleTable`,
646
- {data: data},
647
- {resolveMsg: null, rejectMsg: '区域!!!'}
648
- )
649
-
650
- this.setLabelOptions('区域', res.data.map(item => {
651
- return {
652
- label: item.f_slice_area,
653
- value: item.f_slice_area
654
- }
655
- }))
656
- },
657
- // 区县失去焦点
658
- async 'pcdChange' (index) {
659
- if (isEmpty(this.show_data.f_pcd)) {
660
- return
661
- }
662
-
663
- this.setLabelValue('街道', null)
664
- this.setLabelValue('区域', null)
665
-
666
- let data = {
667
- tablename: 't_street',
668
- condition: `f_filialeid = '${this.$login.f.orgid}' and f_pcd = '${this.show_data.f_pcd}'`
669
- }
670
- let res = await this.$resetpost(
671
- `rs/sql/singleTable`,
672
- {data: data},
673
- {resolveMsg: null, rejectMsg: '街道查询失败!!!'}
674
- )
675
-
676
- this.setLabelOptions('街道', res.data.map(item => {
677
- return {
678
- label: item.f_street,
679
- value: item.f_street
680
- }
681
- }))
682
- },
683
- // 地址类型失去焦点
684
- 'addressTypeChange' (index) {
685
- let f_address_type = this.show_data.fields[index].value
686
- for (const item of this.show_data.fields) {
687
- if (f_address_type === '民用城区') {
688
- if (item.label === '区/县' || item.label === '街道' || item.label === '小区' || item.label === '门牌号(号)') {
689
- item.hidden = false
690
- item.required = true
691
- item.value = null
692
- }
693
- if (item.label === '楼号(乡/镇)' || item.label === '单元(村)' || item.label === '楼层(组)') {
694
- item.hidden = false
695
- item.required = false
696
- item.value = null
697
- }
673
+ }
674
+
675
+ // 保险初始化显示内容
676
+ let f_is_insure = this.getLableValue('是否购买保险')
677
+ for (const item of this.show_data.fields) {
678
+ if (f_is_insure === '是') {
679
+ if (item.label === '保费开始日期' || item.label === '保费结束日期' || item.label === '险种' || item.label === '保费金额') {
680
+ item.hidden = false
681
+ item.required = true
698
682
  }
699
- if (f_address_type === '民用农村') {
700
- if (item.label === '楼层(组)' ||item.label === '门牌号(号)') {
701
- item.hidden = false
702
- item.required = false
703
- item.value = null
704
- }
705
- if (item.label === '区/县' || item.label === '楼号(乡/镇)' || item.label === '单元(村)') {
706
- item.hidden = false
707
- item.required = true
708
- item.value = null
709
- }
710
- if (item.label === '街道' || item.label === '小区') {
711
- item.hidden = true
712
- item.required = false
713
- item.value = null
714
- }
683
+ if (item.label === '保险备注') {
684
+ item.hidden = false
715
685
  }
716
- if (f_address_type === '特殊城区') {
717
- if (item.label === '区/县' || item.label === '街道') {
718
- item.hidden = false
719
- item.required = true
720
- item.value = null
721
- }
722
- if (item.label === '小区') {
723
- item.hidden = false
724
- item.required = false
725
- item.value = null
726
- }
727
- if (item.label === '楼号(乡/镇)' || item.label === '单元(村)' || item.label === '楼层(组)' ||item.label === '门牌号(号)') {
728
- item.hidden = true
729
- item.required = false
730
- item.value = null
731
- }
686
+ // 本期保费到期时间默认一年
687
+ if (isEmpty(this.selectdata.f_ins_expiration_date)) {
688
+ let f_ins_expiration_date = new Date().setFullYear(new Date().getFullYear() + 1)
689
+ this.setLabelValue("保费结束日期", new Date(f_ins_expiration_date).Format('yyyy-MM-dd'))
732
690
  }
733
- if (f_address_type === '特殊农村') {
734
- if (item.label === '区/县') {
735
- item.hidden = false
736
- item.required = true
737
- item.value = null
738
- }
739
- if (item.label === '楼号(乡/镇)') {
740
- item.hidden = false
741
- item.required = false
742
- item.value = null
743
- }
744
- if (item.label === '街道' || item.label === '小区' || item.label === '单元(村)' || item.label === '楼层(组)' ||item.label === '门牌号(号)') {
745
- item.hidden = true
746
- item.required = false
747
- item.value = null
748
- }
691
+ }
692
+ if (f_is_insure === '') {
693
+ if (item.label === '保费开始日期' || item.label === '保费结束日期' || item.label === '险种' || item.label === '保费金额' || item.label === '保险备注') {
694
+ item.hidden = true
695
+ item.required = false
696
+ }
697
+ }
698
+ }
699
+ },
700
+ // 合同金额失去焦点
701
+ async 'contractMoneyChange' (index) {
702
+ let data = {
703
+ operator: '+',
704
+ num1: this.show_data.f_contract_money || 0,
705
+ num2: this.getLableValue('追加金额') || 0
706
+ }
707
+ let res = await this.$resetpost(
708
+ `rs/logic/compute`,
709
+ {data: data},
710
+ {resolveMsg: null, rejectMsg: '金额计算失败!!!'}
711
+ )
712
+
713
+ this.setLabelValue('应交金额', res.data)
714
+ },
715
+ // 街道失去焦点
716
+ async 'streetChange' (index) {
717
+ if (isEmpty(this.show_data.f_street)) {
718
+ return
719
+ }
720
+
721
+ this.setLabelValue('集收单位', null)
722
+
723
+ let data = {
724
+ tablename: 't_area',
725
+ condition: `f_filialeid = '${this.$login.f.orgid}' and f_street = '${this.show_data.f_street}'`
726
+ }
727
+ let http = new HttpResetClass()
728
+ let res = await http.load(
729
+ 'POST',
730
+ `rs/sql/singleTable`,
731
+ {data: data},
732
+ {resolveMsg: null, rejectMsg: '集收单位查询失败!!!'}
733
+ )
734
+
735
+ this.setLabelOptions('集收单位', res.data.map(item => {
736
+ return {
737
+ label: item.f_residential_area,
738
+ value: item.f_residential_area
739
+ }
740
+ }))
741
+ },
742
+ // 区县失去焦点
743
+ async 'pcdChange' (index) {
744
+ if (isEmpty(this.show_data.f_pcd)) {
745
+ return
746
+ }
747
+
748
+ this.setLabelValue('街道/乡镇', null)
749
+ this.setLabelValue('集收单位', null)
750
+
751
+
752
+
753
+ let data = {
754
+ tablename: 't_street',
755
+ condition: `f_filialeid = '${this.$login.f.orgid}' and f_pcd = '${this.show_data.f_pcd}'`
756
+ }
757
+ let f_address_type = this.getLableValue('地址类型')
758
+
759
+ if (f_address_type === '民用市区') {
760
+ data.condition = `f_filialeid = '${this.$login.f.orgid}' and f_pcd = '${this.show_data.f_pcd}' and f_iscity = '市区'`
761
+ }
762
+ if (f_address_type === '民用乡镇') {
763
+ data.condition = `f_filialeid = '${this.$login.f.orgid}' and f_pcd = '${this.show_data.f_pcd}' and f_iscity = '乡镇'`
764
+ }
765
+
766
+ let http = new HttpResetClass()
767
+ let res = await http.load(
768
+ 'POST',
769
+ `rs/sql/singleTable`,
770
+ {data: data},
771
+ {resolveMsg: null, rejectMsg: '街道/乡镇查询失败!!!'}
772
+ )
773
+
774
+ this.setLabelOptions('街道/乡镇', res.data.map(item => {
775
+ return {
776
+ label: item.f_street,
777
+ value: item.f_street
778
+ }
779
+ }))
780
+ },
781
+ // 地址类型失去焦点
782
+ 'addressTypeChange' (index) {
783
+ this.setLabelValue('街道/乡镇', null)
784
+ this.setLabelValue('集收单位', null)
785
+ let f_address_type = this.show_data.fields[index].value
786
+ for (const item of this.show_data.fields) {
787
+ if (f_address_type === '民用市区') {
788
+ if (item.label === '区/县' || item.label === '街道/乡镇' || item.label === '集收单位' || item.label === '门牌号') {
789
+ item.hidden = false
790
+ item.required = true
791
+ item.value = null
792
+ }
793
+ if (item.label === '楼号/组' || item.label === '单元/排' || item.label === '楼层') {
794
+ item.hidden = false
795
+ item.required = false
796
+ item.value = null
797
+ }
798
+ if (item.label === '地址') {
799
+ item.readonly = true
800
+ item.value = null
801
+ }
802
+ }
803
+ if (f_address_type === '民用乡镇') {
804
+ if (item.label === '区/县' || item.label === '街道/乡镇' || item.label === '集收单位' || item.label === '门牌号') {
805
+ item.hidden = false
806
+ item.required = true
807
+ item.value = null
808
+ }
809
+ if (item.label === '楼号/组' || item.label === '单元/排' || item.label === '楼层') {
810
+ item.hidden = false
811
+ item.required = false
812
+ item.value = null
813
+ }
814
+ if (item.label === '楼层') {
815
+ item.hidden = true
816
+ item.required = false
817
+ item.value = null
749
818
  }
750
819
  if (item.label === '地址') {
820
+ item.readonly = true
751
821
  item.value = null
752
822
  }
753
823
  }
754
- },
755
- // 申请节点初始化
756
- 'applyReadyEvent' () {
757
- this.$getConfig(this, 'UserAddress')
824
+ if (f_address_type === '特殊地址') {
825
+ if (item.label === '区/县' || item.label === '街道/乡镇') {
826
+ item.hidden = false
827
+ item.required = true
828
+ item.value = null
829
+ }
830
+ if (item.label === '集收单位') {
831
+ item.hidden = false
832
+ item.required = false
833
+ item.value = null
834
+ }
835
+ if (item.label === '楼号/组' || item.label === '单元/排' || item.label === '楼层' || item.label === '门牌号') {
836
+ item.hidden = true
837
+ item.required = false
838
+ item.value = null
839
+ }
840
+ if (item.label === '地址') {
841
+ item.readonly = false
842
+ item.value = null
843
+ }
844
+ }
845
+ }
846
+ },
847
+ // 申请节点初始化
848
+ 'applyReadyEvent' () {
849
+ this.$getConfig(this, 'UserAddress')
758
850
 
759
- let f_address_type = this.show_data.f_address_type
851
+ let f_address_type = this.show_data.f_address_type
760
852
 
761
- for (const item of this.show_data.fields) {
762
- if (f_address_type === '民用城区') {
763
- if (item.label === '区/县' || item.label === '街道' || item.label === '小区' || item.label === '门牌号(号)') {
764
- item.hidden = false
765
- item.required = true
766
- }
767
- if (item.label === '楼号(乡/镇)' || item.label === '单元(村)' || item.label === '楼层(组)') {
768
- item.hidden = false
769
- item.required = false
770
- }
853
+ for (const item of this.show_data.fields) {
854
+ if (f_address_type === '民用市区') {
855
+ if (item.label === '区/县' || item.label === '街道/乡镇' || item.label === '集收单位' || item.label === '门牌号') {
856
+ item.hidden = false
857
+ item.required = true
771
858
  }
772
- if (f_address_type === '民用农村') {
773
- if (item.label === '区/县' || item.label === '楼号(乡/镇)' || item.label === '单元(村)' || item.label === '楼层(组)' ||item.label === '门牌号(号)') {
774
- item.hidden = false
775
- item.required = true
776
- }
777
- if (item.label === '街道' || item.label === '小区') {
778
- item.hidden = true
779
- item.required = false
780
- }
859
+ if (item.label === '楼号/组' || item.label === '单元/排' || item.label === '楼层') {
860
+ item.hidden = false
861
+ item.required = false
781
862
  }
782
- if (f_address_type === '特殊城区') {
783
- if (item.label === '区/县' || item.label === '街道') {
784
- item.hidden = false
785
- item.required = true
786
- }
787
- if (item.label === '小区') {
788
- item.hidden = false
789
- item.required = false
790
- }
791
- if (item.label === '楼号(乡/镇)' || item.label === '单元(村)' || item.label === '楼层(组)' ||item.label === '门牌号(号)') {
792
- item.hidden = true
793
- item.required = false
794
- }
863
+ if (item.label === '地址') {
864
+ item.readonly = true
795
865
  }
796
- if (f_address_type === '特殊农村') {
797
- if (item.label === '区/县') {
798
- item.hidden = false
799
- item.required = true
800
- }
801
- if (item.label === '街道' || item.label === '小区' || item.label === '楼号(乡/镇)' || item.label === '单元(村)' || item.label === '楼层(组)' ||item.label === '门牌号(号)') {
802
- item.hidden = true
803
- item.required = false
804
- }
866
+ }
867
+ if (f_address_type === '民用乡镇') {
868
+ if (item.label === '区/县' || item.label === '街道/乡镇' || item.label === '集收单位' || item.label === '门牌号') {
869
+ item.hidden = false
870
+ item.required = true
805
871
  }
806
-
807
- if (this.show_data.f_apply_source === '线下发起' && item.label === '预约地址') {
872
+ if (item.label === '楼号/组' || item.label === '单元/排' || item.label === '楼层') {
873
+ item.hidden = false
874
+ item.required = false
875
+ }
876
+ if (item.label === '楼层') {
808
877
  item.hidden = true
878
+ item.required = false
879
+ }
880
+ if (item.label === '地址') {
881
+ item.readonly = true
809
882
  }
810
883
  }
811
- },
812
- // ===========================================
813
- async 'button'() {
814
- if (this.show_data.button.before) {
815
- await this[this.show_data.button.before]()
816
- }
817
- // 点击重置按钮就重置数据
818
- if (this.show_data.button.button_name === '重置') {
819
- this.$dispatch('breakControl', this.selectdata)
820
- return
884
+ if (f_address_type === '特殊地址') {
885
+ if (item.label === '区/县' || item.label === '街道/乡镇') {
886
+ item.hidden = false
887
+ item.required = true
888
+ }
889
+ if (item.label === '集收单位') {
890
+ item.hidden = false
891
+ item.required = false
892
+ }
893
+ if (item.label === '楼号/组' || item.label === '单元/排' || item.label === '楼层' || item.label === '门牌号') {
894
+ item.hidden = true
895
+ item.required = false
896
+ }
897
+ if (item.label === '地址') {
898
+ item.readonly = false
899
+ }
821
900
  }
822
901
 
823
- this.show_data.user = this.$login.f
824
- this.show_data.start_activity = this.$workflow_vue.start_activity
825
- this.show_data.xmlfilename = this.$workflow_vue.workflow_xmlfilename
826
-
827
- let res = await this.$resetpost(
828
- `rs/logic/ApplyProductService`,
829
- {data: this.show_data},
830
- {resolveMsg: null, rejectMsg: '数据保存失败'}
831
- )
832
-
833
- if (this.show_data.button.after) {
834
- this[this.show_data.button.after]()
902
+ if (this.show_data.f_apply_source === '线下发起' && item.label === '预约地址') {
903
+ item.hidden = true
835
904
  }
836
- this.$dispatch('search')
837
- },
838
- // 失去焦点出触发事件
839
- 'onchange' (index) {
840
- if (this.show_data.defname === '用户受理') {
841
- if (
842
- this.show_data.fields[index].label === '街道' ||
843
- this.show_data.fields[index].label === '区域'
844
- ) {
845
-
846
- let f_street = this.getLableValue('街道')
847
- let f_slice_area = this.getLableValue('区域')
905
+ }
906
+ },
907
+ // ===========================================
908
+ async 'button'() {
909
+ if (this.show_data.button.before) {
910
+ await this[this.show_data.button.before]()
911
+ }
912
+ // 点击重置按钮就重置数据
913
+ if (this.show_data.button.button_name === '重置') {
914
+ this.$dispatch('breakControl', this.selectdata)
915
+ return
916
+ }
848
917
 
849
- let f_address = null
918
+ this.show_data.user = this.$login.f
919
+ this.show_data.start_activity = this.$workflow_vue.start_activity
920
+ this.show_data.xmlfilename = this.$workflow_vue.workflow_xmlfilename
850
921
 
851
- f_address = f_slice_area + f_street
852
- this.setLabelValue('地址',f_address)
922
+ let res = await this.$resetpost(
923
+ `rs/logic/ApplyProductService`,
924
+ {data: this.show_data},
925
+ {resolveMsg: null, rejectMsg: '数据保存失败'}
926
+ )
853
927
 
854
- }
928
+ if (this.show_data.button.after) {
929
+ this[this.show_data.button.after]()
930
+ }
931
+ this.$dispatch('search')
932
+ },
933
+ // 失去焦点出触发事件
934
+ 'onchange' (index) {
935
+ if (this.show_data.defname === '报装申请') {
936
+ if (
937
+ this.show_data.fields[index].label === '区/县' ||
938
+ this.show_data.fields[index].label === '街道/乡镇' ||
939
+ this.show_data.fields[index].label === '集收单位' ||
940
+ this.show_data.fields[index].label === '楼号/组' ||
941
+ this.show_data.fields[index].label === '单元/排' ||
942
+ this.show_data.fields[index].label === '楼层' ||
943
+ this.show_data.fields[index].label === '门牌号'
944
+ ) {
945
+
946
+ let f_pcd = this.getLableValue('区/县') || ''
947
+ let f_street = this.getLableValue('街道/乡镇') || ''
948
+ let f_residential_area = this.getLableValue('集收单位') || ''
949
+ let f_building = this.getLableValue('楼号/组') || ''
950
+ let f_building_suffix = f_building ? this.config.f_building_suffix : ''
951
+ let f_unit = this.getLableValue('单元/排') || ''
952
+ let f_unit_suffix = f_unit ? this.config.f_unit_suffix : ''
953
+ let f_floor = this.getLableValue('楼层') || ''
954
+ let f_floor_suffix = f_floor ? this.config.f_floor_suffix : ''
955
+ let f_room = this.getLableValue('门牌号') || ''
956
+ let f_room_suffix = f_room ? this.config.f_room_suffix : ''
957
+
958
+ 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
959
+ this.setLabelValue("地址", f_address)
855
960
  }
856
- },
857
- 'onblur' (index) {},
858
- 'oninput' (index) {},
859
- 'initializtionView' () {},
860
- async 'onchangeModal' (index, fieldIndex) {
861
- },
862
- async 'onblurModal' (index, fieldIndex) {
863
-
864
- },
865
- async 'oninputModal' (index, fieldIndex) {
866
-
867
- },
868
- async 'onetomanydelete' (index, rowIndex) {
961
+ }
962
+ },
963
+ 'onblur' (index) {},
964
+ 'oninput' (index) {},
965
+ 'initializtionView' () {},
966
+ async 'onchangeModal' (index, fieldIndex) {
967
+ },
968
+ async 'onblurModal' (index, fieldIndex) {
869
969
 
870
- let http = new HttpResetClass()
970
+ },
971
+ async 'oninputModal' (index, fieldIndex) {
871
972
 
872
- let res = await http.load(
873
- 'DELETE',
874
- `rs/entity/${this.show_data.onetomany[index].tables[0]}/${this.show_data.onetomany[index].rows[rowIndex].id}`,
875
- null,
876
- {resolveMsg: null, rejectMsg: '删除失败!!!'}
877
- )
973
+ },
974
+ async 'onetomanydelete' (index, rowIndex) {
878
975
 
879
- this.$dispatch('breakControl', this.show_data)
880
- },
881
- async 'onetomanyupdate' (index, rowIndex) {
882
- let data = this.show_data.onetomany[index].rows[rowIndex]
976
+ let http = new HttpResetClass()
883
977
 
884
- this.show_data.onetomany[index].fields.forEach(item => {
885
- data[item.field] = item.value
886
- })
887
- let res = await this.$resetpost(
888
- `rs/entity/${this.show_data.onetomany[index].tables[0]}`,
889
- data
890
- )
891
-
892
- this.$dispatch('breakControl', this.show_data)
893
- },
894
- async 'onetomanyadd' (index) {
895
- let data = {
896
- f_process_id : this.show_data.f_process_id,
897
- f_operator_id: this.$login.f.id,
898
- f_operator: this.$login.f.name,
899
- f_operation_date: new Date(),
900
- f_orgid: this.$login.f.orgid,
901
- f_orgname: this.$login.f.orgs
902
- }
903
- this.show_data.onetomany[index].fields.forEach(item => {
904
- data[item.field] = item.value
905
- })
906
- let res = await this.$resetpost(
907
- `rs/entity/${this.show_data.onetomany[index].tables[0]}`,
908
- data
909
- )
910
- this.$dispatch('breakControl', this.show_data)
911
- },
912
- 'onbutchange' (index) {
978
+ let res = await http.load(
979
+ 'DELETE',
980
+ `rs/entity/${this.show_data.onetomany[index].tables[0]}/${this.show_data.onetomany[index].rows[rowIndex].id}`,
981
+ null,
982
+ {resolveMsg: null, rejectMsg: '删除失败!!!'}
983
+ )
913
984
 
914
- },
915
- 'onbutblur' (index) {
985
+ this.$dispatch('breakControl', this.show_data)
986
+ },
987
+ async 'onetomanyupdate' (index, rowIndex) {
988
+ let data = this.show_data.onetomany[index].rows[rowIndex]
989
+
990
+ this.show_data.onetomany[index].fields.forEach(item => {
991
+ data[item.field] = item.value
992
+ })
993
+ let res = await this.$resetpost(
994
+ `rs/entity/${this.show_data.onetomany[index].tables[0]}`,
995
+ data
996
+ )
997
+
998
+ this.$dispatch('breakControl', this.show_data)
999
+ },
1000
+ async 'onetomanyadd' (index) {
1001
+ let data = {
1002
+ f_process_id : this.show_data.f_process_id,
1003
+ f_operator_id: this.$login.f.id,
1004
+ f_operator: this.$login.f.name,
1005
+ f_operation_date: new Date(),
1006
+ f_orgid: this.$login.f.orgid,
1007
+ f_orgname: this.$login.f.orgs
1008
+ }
1009
+ this.show_data.onetomany[index].fields.forEach(item => {
1010
+ data[item.field] = item.value
1011
+ })
1012
+ let res = await this.$resetpost(
1013
+ `rs/entity/${this.show_data.onetomany[index].tables[0]}`,
1014
+ data
1015
+ )
1016
+ this.$dispatch('breakControl', this.show_data)
1017
+ },
1018
+ 'onbutchange' (index) {
916
1019
 
917
- },
918
- 'onbutinput' (index) {
1020
+ },
1021
+ 'onbutblur' (index) {
919
1022
 
920
- }
921
1023
  },
922
- watch: {
1024
+ 'onbutinput' (index) {
1025
+
923
1026
  }
1027
+ },
1028
+ watch: {
924
1029
  }
1030
+ }
925
1031
  </script>
926
1032
  <style scoped>
927
- /*清除model中的浮动*/
928
- .clearfix:after,.clearfix:before{
929
- display: table;
930
- }
931
- .clearfix:after{
932
- clear: both;
933
- }
1033
+ /*清除model中的浮动*/
1034
+ .clearfix:after,.clearfix:before{
1035
+ display: table;
1036
+ }
1037
+ .clearfix:after{
1038
+ clear: both;
1039
+ }
934
1040
  </style>