apply-clients 4.1.2 → 4.1.4-weinan

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 (37) hide show
  1. package/index.html +1 -1
  2. package/package.json +7 -5
  3. package/src/apply.js +81 -66
  4. package/src/applyAndroid.js +41 -39
  5. package/src/components/app_apply/AppChargeManagement.vue +619 -0
  6. package/src/components/app_apply/ApplyInfo.vue +56 -56
  7. package/src/components/app_apply/ApplyToDoList.vue +148 -165
  8. package/src/components/app_apply/PlaceControler.vue +258 -258
  9. package/src/components/app_apply/ServiceControl.vue +280 -267
  10. package/src/components/product/ApplyCharge/ApplyChargeList.vue +251 -251
  11. package/src/components/product/Function/InstallInfoSelect.vue +40 -27
  12. package/src/components/product/Function/StopApplyCrrdList.vue +1 -1
  13. package/src/components/product/Function/functions/StopInstall.vue +7 -1
  14. package/src/components/product/Process/ExplorationSelect.vue +82 -59
  15. package/src/components/product/Process/Processes/InstallationDetails.vue +276 -246
  16. package/src/components/product/Process/Processes/UserFireInfo.vue +409 -0
  17. package/src/components/product/Process/Processes/addressAndUserinfoManagement.vue +1458 -99
  18. package/src/components/product/Process/Processes/addressAndUserinfoManagementPro.vue +1221 -0
  19. package/src/components/product/Process/Processes/chargeManagement.vue +47 -53
  20. package/src/components/product/Process/Processes/devicesDetails.vue +834 -0
  21. package/src/components/product/Process/Processes/materialshoufei.vue +182 -0
  22. package/src/components/product/Process/Processes/printCharge.vue +130 -130
  23. package/src/components/product/Process/Processes/recordcancel.vue +50 -0
  24. package/src/components/product/Process/Processes/selectUserinfo.vue +199 -0
  25. package/src/components/product/Process/Processes/splitMaterial.vue +358 -0
  26. package/src/components/product/Process/Service/ServiceControl.vue +1126 -703
  27. package/src/components/product/Process/ShowBackReason.vue +1 -0
  28. package/src/components/product/ServiceView.vue +82 -35
  29. package/src/components/product/Stop/StopApply.vue +101 -0
  30. package/src/components/product/Stop/StopApplyList.vue +257 -0
  31. package/src/components/product/Supervisory/SupervisoryControl.vue +7 -4
  32. package/src/components/product/Supervisory/SupervisoryList.vue +40 -27
  33. package/src/components/product/Supervisory/SupervisoryhCart.vue +0 -7
  34. package/src/components/product/Test.vue +8 -4
  35. package/src/components/product/VueUtils/ApplyUpload.vue +4 -4
  36. package/src/main.js +25 -23
  37. package/static/images/lefticon//347/237/251/345/275/2421183.png +0 -0
@@ -1,813 +1,1236 @@
1
1
  <template>
2
2
 
3
3
  <div class="auto clearfix">
4
- <show-back-reason :selectdata="show_data"></show-back-reason>
4
+ <show-back-reason :selectdata="selectdata"></show-back-reason>
5
+ <stop-install :data="show_data" v-if="stope_view"></stop-install>
5
6
  </div>
6
7
 
7
- <service-view v-ref:serviceview :data="show_data" v-if="showview"></service-view>
8
+ <service-view v-ref:serviceview :data="show_data" v-if="showview"></service-view>
8
9
 
9
10
  </template>
10
11
  <script>
11
- import Vue from 'vue'
12
- import {HttpResetClass} from 'vue-client'
13
- import {getNowDate,isEmpty} from '../../../Util'
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
- }
12
+ import Vue from 'vue'
13
+ import {HttpResetClass} from 'vue-client'
14
+ import {getNowDate,isEmpty} from '../../../Util'
15
+ // Date格式化
16
+ Date.prototype.Format = function (fmt) {
17
+ var o = {
18
+ "M+": this.getMonth() + 1, //月份
19
+ "d+": this.getDate(), //日
20
+ "H+": this.getHours(), //小时
21
+ "m+": this.getMinutes(), //分
22
+ "s+": this.getSeconds(), //秒
23
+ "q+": Math.floor((this.getMonth() + 3) / 3), //季度
24
+ "S": this.getMilliseconds() //毫秒
25
+ };
26
+ if (/(y+)/.test(fmt)) fmt = fmt.replace(RegExp.$1, (this.getFullYear() + "").substr(4 - RegExp.$1.length));
27
+ for (var k in o)
28
+ if (new RegExp("(" + k + ")").test(fmt)) fmt = fmt.replace(RegExp.$1, (RegExp.$1.length == 1) ? (o[k]) : (("00" + o[k]).substr(("" + o[k]).length)));
29
+ return fmt;
30
+ }
30
31
 
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
- }
41
- },
42
- created () {
43
- this.refurbish()
44
- },
45
- methods: {
46
- // 组件初始化操作
47
- refurbish() {
48
- this.json_datas = this.$workflow_vue
49
- let sum = 0
50
- let jsonData = {}
51
- if (!this.json_datas || !this.json_datas.activitys || this.json_datas.activitys.length == 0) {
52
- this.$showMessage("网络故障,请刷新页面")
53
- return
54
- }
55
- for (let i = 0; i < this.json_datas.activitys.length; i++) {
56
- if (this.selectdata.defname == this.json_datas.activitys[i].title) {
57
- jsonData = this.json_datas.activitys[i] // 拿到当前节点的json配置信息
58
- sum++ // 节点名一样的个数
59
- }
60
- }
61
- if (sum == 1) {
62
- this.data = null
63
- this.data = jsonData
64
- // selectdata 填充 data
65
- this.data = Object.assign({}, this.data, this.selectdata)
66
- this.initializeJSON()
67
- } else if (sum == 0) {
68
- this.$showMessage(`没有在JSON配置文件中找到活动名为:(${this.selectdata.defname})的节点配置`)
69
- } else {
70
- this.$showMessage(`在JSON配置文件中找到活动名为:(${this.selectdata.defname})的节点配置:${sum}个`)
71
- }
72
- },
73
- // json配置数据处理
74
- async initializeJSON() {
75
- // 有默认值,value就给默认值,没有就是null
76
- this.data.fields.forEach(item => {
77
- if (!item.value) {
78
- if (item.value === 0) {
79
- item.value = 0
80
- } else {
81
- item.value = null
82
- }
32
+ export default {
33
+ title: '报建流程业务控制层',
34
+ props: ['selectdata'],
35
+ data() {
36
+ return {
37
+ data: null, // 数据库数据,json配置文件数据的数据集合
38
+ json_datas: null, // Json配置文件集合
39
+ showview: false, // 控制显示service-view组件
40
+ show_data: null, // 给view层显示的数据
41
+ stope_view: false
42
+ }
43
+
44
+ },
45
+ created () {
46
+ this.refurbish()
47
+ },
48
+ ready(){
49
+ },
50
+ methods: {
51
+ // 组件初始化操作
52
+ refurbish() {
53
+ this.json_datas = this.$workflow_vue
54
+ let sum = 0
55
+ let jsonData = {}
56
+ if (!this.json_datas || !this.json_datas.activitys || this.json_datas.activitys.length == 0) {
57
+ this.$showMessage("网络故障,请刷新页面")
58
+ return
59
+ }
60
+ for (let i = 0; i < this.json_datas.activitys.length; i++) {
61
+ if (this.selectdata.defname == this.json_datas.activitys[i].title) {
62
+ jsonData = this.json_datas.activitys[i] // 拿到当前节点的json配置信息
63
+ sum++ // 节点名一样的个数
64
+ }
65
+ }
66
+ if (sum == 1) {
67
+ this.data = null
68
+ this.data = jsonData
69
+ // selectdata 填充 data
70
+ this.data = Object.assign({}, this.data, this.selectdata)
71
+ this.initializeJSON()
72
+ } else if (sum == 0) {
73
+ this.$showMessage(`没有在JSON配置文件中找到活动名为:(${this.selectdata.defname})的节点配置`)
74
+ } else {
75
+ this.$showMessage(`在JSON配置文件中找到活动名为:(${this.selectdata.defname})的节点配置:${sum}个`)
76
+ }
77
+ },
78
+ // json配置数据处理
79
+ async initializeJSON() {
80
+ // 有默认值,value就给默认值,没有就是null
81
+ this.data.fields.forEach(item => {
82
+ if (!item.value) {
83
+ if (item.value === 0) {
84
+ item.value = 0
85
+ } else {
86
+ item.value = null
83
87
  }
84
- if (item.default || item.default == 0) {
88
+ }
89
+ if (item.default || item.default == 0) {
90
+ if(item.type === 'datepicker'){
91
+ item.value = ''
92
+ }else {
85
93
  item.value = item.default
86
94
  }
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
- this.selectdata[item.field] = JSON.parse(this.selectdata[item.field])
92
- } else {
93
- item.value = this.selectdata[item.field]
94
- }
95
+ }
96
+ if (this.selectdata[item.field]) {
97
+ // 将json字符串格式化赋值给value
98
+ if (String(this.selectdata[item.field]).startsWith("{")) {
99
+ item.value = JSON.parse(this.selectdata[item.field])
100
+ this.selectdata[item.field] = JSON.parse(this.selectdata[item.field])
95
101
  } else {
96
- if (this.selectdata[item.field] === 0) {
97
- item.value = 0
98
- }
102
+ item.value = this.selectdata[item.field]
99
103
  }
100
-
101
- // datepicker 没有值给当时值
102
- if (item.type === 'datepicker' && !item.value && item.default) {
103
- item.value = new Date().Format('yyyy-MM-dd HH:mm:ss')
104
+ } else {
105
+ if (this.selectdata[item.field] === 0) {
106
+ item.value = 0
104
107
  }
108
+ }
105
109
 
106
- // 如果配置类型为select,优先从参数列表获取options
107
- if (item.type === 'select') {
108
- let temp = null
110
+ // datepicker 没有值给当时值
111
+ if (item.type === 'datepicker' && !item.value && item.default) {
112
+ item.value = new Date().Format('yyyy-MM-dd HH:mm:ss')
113
+ }
109
114
 
110
- temp = this.$appdata.getParam(item.label)
115
+ // 如果配置类型为select,优先从参数列表获取options
116
+ if (item.type === 'select') {
117
+ let temp = null
111
118
 
112
- if (temp && temp.length > 0 && item.label) {
113
- item.options = temp
114
- } else {
115
- if (item.paramLabel) {
116
- temp = this.$appdata.getParam(item.paramLabel)
117
- if (temp && temp.length > 0) {
118
- item.options = temp
119
- }
119
+ temp = this.$appdata.getParam(item.label)
120
+
121
+ if (temp && temp.length > 0 && item.label) {
122
+ item.options = temp
123
+ } else {
124
+ if (item.paramLabel) {
125
+ temp = this.$appdata.getParam(item.paramLabel)
126
+ if (temp && temp.length > 0) {
127
+ item.options = temp
120
128
  }
121
129
  }
122
130
  }
123
- })
131
+ }
132
+ })
124
133
 
125
- // 控制组件
126
- if (this.data.components) {
127
- this.data.components.forEach(item => {
134
+ // 控制组件
135
+ if (this.data.components) {
136
+ this.data.components.forEach(item => {
137
+ if (!item.mark) {
128
138
  item.mark = 0
129
- })
130
- }
139
+ }
140
+ })
141
+ }
131
142
 
132
- // 初始化 fields 可对数据进行特殊处理
133
- this.initializeFields()
134
-
135
- // 初始化 buttons_fields
136
- for (let i = 0; i < this.data.buttons.length; i++) {
137
- // 下发按钮相关配置
138
- if (this.data.buttons[i].button_name === '下发') {
139
- if (this.data.buttons[i].button_fields && this.data.buttons[i].button_fields.length === 1) {
140
- if (this.data.buttons[i].source){
141
- let http = new HttpResetClass()
142
- let res = await http.load('POST', 'rs/search', {
143
- source: this.data.buttons[i].source,
144
- userid: this.$login.f.id
145
- }, {resolveMsg: null, rejectMsg: null})
146
-
147
- let options = []
148
- for (let i = 0; i < res.data.length; i++) {
149
- options.push(
150
- {
151
- "label": res.data[i].name,
152
- "value": res.data[i].id
153
- }
154
- )
155
- }
156
- this.data.buttons[i].button_fields[0]['options'] = options
157
- } else {
158
- this.$showMessage("请配置获取人员表达式")
143
+ // 初始化 fields 可对数据进行特殊处理
144
+ this.initializeFields()
145
+
146
+ // 初始化 buttons_fields
147
+ for (let i = 0; i < this.data.buttons.length; i++) {
148
+ // 下发按钮相关配置
149
+ if (this.data.buttons[i].button_name === '下发') {
150
+ if (this.data.buttons[i].button_fields && this.data.buttons[i].button_fields.length === 1) {
151
+ if (this.data.buttons[i].source){
152
+ let http = new HttpResetClass()
153
+ let res = await http.load('POST', 'rs/search', {
154
+ source: this.data.buttons[i].source,
155
+ userid: this.$login.f.id
156
+ }, {resolveMsg: null, rejectMsg: null})
157
+
158
+ let options = []
159
+ for (let i = 0; i < res.data.length; i++) {
160
+ options.push(
161
+ {
162
+ "label": res.data[i].name,
163
+ "value": res.data[i].id
164
+ }
165
+ )
159
166
  }
167
+ this.data.buttons[i].button_fields[0]['options'] = options
160
168
  } else {
161
- this.$showMessage("下发按钮必须满足 当且仅当一个字段")
169
+ this.$showMessage("请配置获取人员表达式")
162
170
  }
171
+ } else {
172
+ this.$showMessage("下发按钮必须满足 当且仅当一个字段")
163
173
  }
164
- if (this.data.buttons[i].button_fields) {
165
- this.data.buttons[i].button_fields.forEach(x => {
166
- // 如果配置类型为select,优先从参数列表获取options
167
- if (x.type === 'select' && this.$appdata.getParam(x.label)) {
168
- x.options = this.$appdata.getParam(x.label).trim()
169
- }
170
- })
171
- }
172
174
  }
175
+ if (this.data.buttons[i].button_fields) {
176
+ this.data.buttons[i].button_fields.forEach(x => {
177
+ // 如果配置类型为select,优先从参数列表获取options
178
+ if (x.type === 'select' && this.$appdata.getParam(x.label)) {
179
+ x.options = this.$appdata.getParam(x.label).trim()
180
+ }
181
+ })
182
+ }
183
+ }
173
184
 
174
- // onetomany 数据获取
175
- if (this.data.onetomany) {
176
- for (let index = 0; index < this.data.onetomany.length; index++) {
177
- let res = null
178
- if (!this.data.onetomany[index].queryEvent || this.data.onetomany[index].queryEvent === 'default'){
179
- let http = new HttpResetClass()
180
- let data = {
181
- tablename: this.data.onetomany[index].tables[0],
182
- condition: `f_process_id='${this.selectdata.f_process_id}'`
183
- }
184
- res = await http.load('POST', 'rs/sql/singleTable', {data: data}, {
185
- resolveMsg: null,
186
- rejectMsg: 'onetomany查询失败'
187
- })
188
- } else {
189
- res = this[this.data.onetomany[index].queryEvent]()
185
+ // onetomany 数据获取
186
+ if (this.data.onetomany) {
187
+ for (let index = 0; index < this.data.onetomany.length; index++) {
188
+ let res = null
189
+ if (!this.data.onetomany[index].queryEvent || this.data.onetomany[index].queryEvent === 'default'){
190
+ let http = new HttpResetClass()
191
+ let data = {
192
+ tablename: this.data.onetomany[index].tables[0],
193
+ condition: `f_process_id='${this.selectdata.f_process_id}'`
190
194
  }
195
+ res = await http.load('POST', 'rs/sql/singleTable', {data: data}, {
196
+ resolveMsg: null,
197
+ rejectMsg: 'onetomany查询失败'
198
+ })
199
+ } else {
200
+ res = this[this.data.onetomany[index].queryEvent]()
201
+ }
191
202
 
192
- // 初始化 onetomany
193
- this.data.onetomany[index].rows = res.data
203
+ // 初始化 onetomany
204
+ this.data.onetomany[index].rows = res.data
194
205
 
195
- // 初始化onetomany中的fields
196
- for (let j = 0; j < this.data.onetomany[index].fields.length; j++) {
197
- if (!this.data.onetomany[index].fields[j].value) {
198
- if (this.data.onetomany[index].fields[j].value === 0) {
199
- this.data.onetomany[index].fields[j].value = 0
200
- } else {
201
- this.data.onetomany[index].fields[j].value = null
202
- }
203
- }
204
- if (this.data.onetomany[index].fields[j].default || this.data.onetomany[index].fields[j].default == 0) {
205
- this.data.onetomany[index].fields[j].value = this.data.onetomany[index].fields[j].default
206
+ // 初始化onetomany中的fields
207
+ for (let j = 0; j < this.data.onetomany[index].fields.length; j++) {
208
+ if (!this.data.onetomany[index].fields[j].value) {
209
+ if (this.data.onetomany[index].fields[j].value === 0) {
210
+ this.data.onetomany[index].fields[j].value = 0
211
+ } else {
212
+ this.data.onetomany[index].fields[j].value = null
206
213
  }
207
- // 如果配置类型为select,优先从参数列表获取options
208
- if (this.data.onetomany[index].fields[j].type === 'select') {
209
- let temp = Vue.$appdata.getParam(this.data.onetomany[index].fields[j].label)
210
- if (temp && temp.length > 0) {
211
- this.data.onetomany[index].fields[j].options = temp
212
- }
214
+ }
215
+ if (this.data.onetomany[index].fields[j].default || this.data.onetomany[index].fields[j].default == 0) {
216
+ this.data.onetomany[index].fields[j].value = this.data.onetomany[index].fields[j].default
217
+ }
218
+ // 如果配置类型为select,优先从参数列表获取options
219
+ if (this.data.onetomany[index].fields[j].type === 'select') {
220
+ let temp = Vue.$appdata.getParam(this.data.onetomany[index].fields[j].label)
221
+ if (temp && temp.length > 0) {
222
+ this.data.onetomany[index].fields[j].options = temp
213
223
  }
214
224
  }
215
225
  }
216
226
  }
227
+ }
217
228
 
218
- // 消除双向绑定,避免子组件(显示层)数据更改,父组件(控制层)也更改
219
- let temp = JSON.parse(JSON.stringify(this.data))
229
+ // 消除双向绑定,避免子组件(显示层)数据更改,父组件(控制层)也更改
230
+ let temp = JSON.parse(JSON.stringify(this.data))
220
231
 
221
- this.show_data = temp
222
- this.$nextTick(() => {
223
- this.showview = true
224
- })
225
- // 初始化加载
226
- // ========================= 中盛 =================================
227
- if (this.selectdata.defname === '报建登记') {
228
- let http = new HttpResetClass()
229
- let condition = "f_filialeid = " + this.$login.f.orgid
230
- let res = await http.load('POST','rs/sql/apply_singleTable',{data:{tablename:'t_area',condition:condition}}, {resolveMsg: null, rejectMsg: null})
231
- for (let i = 0; i < this.show_data.fields.length; i++) {
232
-
233
- if (this.show_data.fields[i].label == '街道') {
234
- let data = []
235
- let array = []
236
- data = res.data.map(item => {
237
- return item.f_street;
238
- })
239
- for (let q = 0; q < data.length; q++) {
240
- let arraydata = {
241
- 'label': data[q],
242
- 'value': data[q]
243
- }
244
- if (array.length != 0) {
245
- for (let w = 0; w < array.length; w++) {
246
- if (array[w].label == data[q]) {
247
- break
248
- }
249
- while (w == array.length - 1) {
250
- array.push(arraydata)
251
- break
252
- }
232
+ this.show_data = temp
233
+ this.$nextTick(() => {
234
+ this.showview = true
235
+ })
236
+ // 初始化加载
237
+ // ========================= 中盛 =================================
238
+
239
+ if (this.selectdata.defname === '报建登记') {
240
+ let http = new HttpResetClass()
241
+ let condition = "f_filialeid = " + this.$login.f.orgid
242
+ let res = await http.load('POST','rs/sql/apply_singleTable',{data:{tablename:'t_area',condition:condition}}, {resolveMsg: null, rejectMsg: null})
243
+ for (let i = 0; i < this.show_data.fields.length; i++) {
244
+
245
+ if (this.show_data.fields[i].label == '街道') {
246
+ let data = []
247
+ let array = []
248
+ data = res.data.map(item => {
249
+ return item.f_street;
250
+ })
251
+ for (let q = 0; q < data.length; q++) {
252
+ let arraydata = {
253
+ 'label': data[q],
254
+ 'value': data[q]
255
+ }
256
+ if (array.length != 0) {
257
+ for (let w = 0; w < array.length; w++) {
258
+ if (array[w].label == data[q]) {
259
+ break
260
+ }
261
+ while (w == array.length - 1) {
262
+ array.push(arraydata)
263
+ break
253
264
  }
254
- } else {
255
- array.push(arraydata)
256
265
  }
266
+ } else {
267
+ array.push(arraydata)
257
268
  }
258
- this.show_data.fields[i].options = array
259
- console.log("街道选择框数据:" + JSON.stringify(this.show_data.fields[i].options))
260
269
  }
261
- if (this.show_data.fields[i].label == '小区') {
262
- let data = []
263
- let array = []
264
- data = res.data.map(item => {
265
- return item.f_residential_area;
266
- })
267
- for (let q = 0; q < data.length; q++) {
268
- let arraydata = {
269
- 'label': data[q],
270
- 'value': data[q]
271
- }
272
- if (array.length != 0) {
273
- for (let w = 0; w < array.length; w++) {
274
- if (array[w].label == data[q]) {
275
- break
276
- }
277
- while (w == array.length - 1) {
278
- array.push(arraydata)
279
- break
280
- }
270
+ this.show_data.fields[i].options = array
271
+ console.log("街道选择框数据:" + JSON.stringify(this.show_data.fields[i].options))
272
+ }
273
+ if (this.show_data.fields[i].label == '小区') {
274
+ let data = []
275
+ let array = []
276
+ data = res.data.map(item => {
277
+ return item.f_residential_area;
278
+ })
279
+ for (let q = 0; q < data.length; q++) {
280
+ let arraydata = {
281
+ 'label': data[q],
282
+ 'value': data[q]
283
+ }
284
+ if (array.length != 0) {
285
+ for (let w = 0; w < array.length; w++) {
286
+ if (array[w].label == data[q]) {
287
+ break
288
+ }
289
+ while (w == array.length - 1) {
290
+ array.push(arraydata)
291
+ break
281
292
  }
282
- } else {
283
- array.push(arraydata)
284
293
  }
294
+ } else {
295
+ array.push(arraydata)
285
296
  }
286
- this.show_data.fields[i].options = array
287
- console.log("小区选择框数据:" + JSON.stringify(this.show_data.fields[i].options))
288
297
  }
298
+ this.show_data.fields[i].options = array
299
+ console.log("小区选择框数据:" + JSON.stringify(this.show_data.fields[i].options))
289
300
  }
290
301
  }
291
- // if (this.selectdata.defname === '收费') {
292
- // let money_one = 0
293
- // let money_two = 0
294
- // for (let i = 0; i < this.show_data.fields.length; i++) {
295
- // if (this.show_data.fields[i].label === '合同金额') {
296
- // money_one = this.show_data.fields[i].value
297
- // }
298
- // if (this.show_data.fields[i].label === '应交总金额') {
299
- // this.show_data.fields[i].value = money_one
300
- // this.selectdata.f_due_money = money_one
301
- // }
302
- // if (this.show_data.fields[i].label === '累计缴费总金额') {
303
- // money_two = this.show_data.fields[i].value
304
- // this.selectdata.f_cumulative_payment_money = this.show_data.fields[i].value
305
- // }
306
- // if (this.show_data.fields[i].label === '未结总金额') {
307
- // this.show_data.fields[i].value = money_one - money_two
308
- // this.selectdata.f_surplus_money = this.show_data.fields[i].value
309
- // }
302
+ }
303
+ if (this.selectdata.defname === '施工') {
304
+ // for (let i = 0; i < this.show_data.fields.length; i++) {
305
+ // if (this.show_data.fields[i].label == '工程状态') {
306
+ // this.show_data.fields[i].value = ''
310
307
  // }
311
308
  // }
312
- },
313
- // 初始化fields值
314
- initializeFields() {
315
-
316
- },
317
- // 金额转大写
318
- smalltoBIG(n) {
319
- let fraction = ['角', '分'];
320
- let digit = ['零', '壹', '贰', '叁', '肆', '伍', '陆', '柒', '捌', '玖'];
321
- let unit = [['元', '万', '亿'], ['', '拾', '佰', '仟']];
322
- let head = n < 0 ? '欠' : '';
323
- n = Math.abs(n);
324
-
325
- let s = '';
326
-
327
- for (var i = 0; i < fraction.length; i++) {
328
- s += (digit[Math.floor(n * 10 * Math.pow(10, i)) % 10] + fraction[i]).replace(/零./, '');
329
- }
330
- s = s || '整';
331
- n = Math.floor(n);
332
-
333
- for (var i = 0; i < unit[0].length && n > 0; i++) {
334
- let p = '';
335
- for (var j = 0; j < unit[1].length && n > 0; j++) {
336
- p = digit[n % 10] + unit[1][j] + p;
337
- n = Math.floor(n / 10);
338
- }
339
- s = p.replace(/(零.)*零$/, '').replace(/^$/, '零') + unit[0][i] + s;
340
- }
341
- return head + s.replace(/(零.)*零元/, '元').replace(/(零.)+/g, '零').replace(/^整$/, '零元整')
342
- },
343
- getLableValue(label) {
344
309
  for (const item of this.show_data.fields) {
345
- if (item.label === label && item.type !== 'number') {
346
- return item.value || ''
347
- }
348
- if (item.label === label && item.type === 'number') {
349
- return item.value || 0
310
+ if (item.label === '工程状态' && !item.value) {
311
+ return item.value = '未开工'
350
312
  }
351
313
  }
352
- },
353
- setLabelValue(label, value) {
354
- for (const item of this.show_data.fields) {
355
- if (item.label === label) {
356
- item.value = value
357
- }
314
+ }
315
+
316
+ },
317
+ // 初始化fields值
318
+ initializeFields() {
319
+
320
+ },
321
+ // 金额转大写
322
+ smalltoBIG(n) {
323
+ let fraction = ['角', '分'];
324
+ let digit = ['零', '壹', '贰', '叁', '肆', '伍', '陆', '柒', '捌', '玖'];
325
+ let unit = [['元', '万', '亿'], ['', '拾', '佰', '仟']];
326
+ let head = n < 0 ? '欠' : '';
327
+ n = Math.abs(n);
328
+
329
+ let s = '';
330
+
331
+ for (var i = 0; i < fraction.length; i++) {
332
+ s += (digit[Math.floor(n * 10 * Math.pow(10, i)) % 10] + fraction[i]).replace(/零./, '');
333
+ }
334
+ s = s || '整';
335
+ n = Math.floor(n);
336
+
337
+ for (var i = 0; i < unit[0].length && n > 0; i++) {
338
+ let p = '';
339
+ for (var j = 0; j < unit[1].length && n > 0; j++) {
340
+ p = digit[n % 10] + unit[1][j] + p;
341
+ n = Math.floor(n / 10);
358
342
  }
359
- },
360
- async buttonBefore(model) {
361
- if (
362
- model.button.button_name === '提交' &&
363
- model.defname === '收费' &&
364
- (
365
- model.f_apply_type === '散户报建' ||
366
- model.f_apply_type === '工业户报建' ||
367
- model.f_apply_type === '商业户报建'
368
- ) &&
369
- model.f_surplus_money > 0
370
- ) {
371
- throw '未结金额大于0,无法提交!!!'
343
+ s = p.replace(/(零.)*零$/, '').replace(/^$/, '零') + unit[0][i] + s;
344
+ }
345
+ return head + s.replace(/(零.)*零元/, '元').replace(/(零.)+/g, '零').replace(/^整$/, '零元整')
346
+ },
347
+ getLableValue(label) {
348
+ for (const item of this.show_data.fields) {
349
+ if (item.label === label && item.type !== 'number') {
350
+ return item.value || ''
372
351
  }
373
- if (model.defname === '施工' && model.button.button_name === '提交') {
374
- let http = new HttpResetClass()
375
- let data = {
376
- f_process_id: model.f_process_id
377
- }
378
- let res = await http.load('POST', 'rs/sql/notInstalled', {data: data}, {resolveMsg: null, rejectMsg: null})
379
- if (res.data[0].num > 0) {
380
- throw `还有${res.data[0].num}户未安装,无法提交`
381
- }
352
+ if (item.label === label && item.type === 'number') {
353
+ return item.value || 0
382
354
  }
383
- return model
384
- },
385
- // ========================= 武安 =================================
386
- // 地址类型变化
387
- addressType() {
388
- for (const item of this.show_data.fields) {
389
- if (item.label === '小区' && this.show_data.f_address_type === '民用地址') {
355
+ }
356
+ },
357
+ setLabelValue(label, value) {
358
+ for (const item of this.show_data.fields) {
359
+ if (item.label === label) {
360
+ item.value = value
361
+ }
362
+ }
363
+ },
364
+ setLabelOptions(label, options) {
365
+ for (const item of this.show_data.fields) {
366
+ if (item.label === label) {
367
+ item.options = options
368
+ }
369
+ }
370
+ },
371
+ showLabels(...labels) {
372
+ for (const item of this.show_data.fields) {
373
+ if (labels.includes(item.label)) {
374
+ item.hidden = false
375
+ }
376
+ }
377
+ },
378
+ hideLabels(...labels) {
379
+ for (const item of this.show_data.fields) {
380
+ if (labels.includes(item.label)) {
381
+ item.hidden = true
382
+ }
383
+ }
384
+ },
385
+ requiredLabels(...labels) {
386
+ for (const item of this.show_data.fields) {
387
+ if (labels.includes(item.label)) {
388
+ item.required = true
389
+ }
390
+ }
391
+ },
392
+ electiveLabels(...labels) {
393
+ for (const item of this.show_data.fields) {
394
+ if (labels.includes(item.label)) {
395
+ item.required = false
396
+ }
397
+ }
398
+ },
399
+ readonlyLabels(...labels) {
400
+ for (const item of this.show_data.fields) {
401
+ if (labels.includes(item.label)) {
402
+ item.readonly = true
403
+ item.disabled = true
404
+ }
405
+ }
406
+ },
407
+ readwriteLabels(...labels) {
408
+ for (const item of this.show_data.fields) {
409
+ if (labels.includes(item.label)) {
410
+ item.readonly = false
411
+ item.disabled = false
412
+ }
413
+ }
414
+ },
415
+ showButtons(...buttons) {
416
+ for (const item of this.show_data.buttons) {
417
+ if (buttons.includes(item.button_name)) {
418
+ item.hidden = false
419
+ }
420
+ }
421
+ },
422
+ hideButtons(...buttons) {
423
+ for (const item of this.show_data.buttons) {
424
+ if (buttons.includes(item.button_name)) {
425
+ item.hidden = true
426
+ }
427
+ }
428
+ },
429
+ // 获取区县
430
+ async getPcd() {
431
+ let data = {
432
+ tablename: 't_pcd',
433
+ condition: `f_filialeid = '${this.$login.f.orgid}'`
434
+ }
435
+ let http = new HttpResetClass()
436
+ let res = await http.load(
437
+ 'POST',
438
+ `rs/sql/singleTable`,
439
+ {data: data},
440
+ {resolveMsg: null, rejectMsg: '区县查询失败!!!'}
441
+ )
442
+
443
+ let pcd = res.data.map(item => {
444
+ return {
445
+ label: item.f_pcd,
446
+ value: item.f_pcd
447
+ }
448
+ })
449
+ this.setLabelOptions('区域',pcd)
450
+ },
451
+ // 地址关联
452
+ addressInitialization() {
453
+ this.$getConfig(this, 'UserAddress')
454
+
455
+ let f_address_type = this.show_data.f_address_type
456
+
457
+ for (const item of this.show_data.fields) {
458
+ if (f_address_type === '民用地址') {
459
+ if (item.label === '区域' || item.label === '街道' || item.label === '小区' || item.label === '门牌号') {
460
+ item.hidden = false
390
461
  item.required = true
391
462
  }
392
- if (item.label === '小区' && this.show_data.f_address_type === '特殊地址') {
463
+ if (item.label === '楼号' || item.label === '单元' || item.label === '楼层') {
464
+ item.hidden = false
393
465
  item.required = false
394
466
  }
395
- if (
396
- (
397
- item.label === '楼号' ||
398
- item.label === '单元' ||
399
- item.label === '楼层' ||
400
- item.label === '门牌号'
401
- ) && this.show_data.f_address_type === '民用地址'
402
- ) {
403
- item.required = true
467
+ if (item.label === '地址') {
468
+ item.readonly = true
469
+ }
470
+ }
471
+ if (f_address_type === '特殊地址') {
472
+ if (item.label === '区域' || item.label === '街道') {
404
473
  item.hidden = false
405
- item.value = null
474
+ item.required = true
406
475
  }
407
- if (
408
- (
409
- item.label === '楼号' ||
410
- item.label === '单元' ||
411
- item.label === '楼层' ||
412
- item.label === '门牌号'
413
- ) && this.show_data.f_address_type === '特殊地址'
414
- ) {
476
+ if (item.label === '小区') {
477
+ item.hidden = true
415
478
  item.required = false
479
+ }
480
+ if (item.label === '楼号' || item.label === '单元' || item.label === '楼层' || item.label === '门牌号') {
416
481
  item.hidden = true
417
- item.value = null
482
+ item.required = false
483
+ }
484
+ if (item.label === '地址') {
485
+ item.readonly = false
486
+ }
487
+ }
488
+
489
+ if (this.show_data.f_apply_source === '线下发起' && item.label === '预约地址') {
490
+ item.hidden = true
491
+ }
492
+ }
493
+ },
494
+ async streetChange() {
495
+ if (isEmpty(this.show_data.f_street)) {
496
+ return
497
+ }
498
+
499
+ let data = {
500
+ tablename: 't_area',
501
+ condition: `f_filialeid = '${this.$login.f.orgid}' and f_street = '${this.show_data.f_street}'`
502
+ }
503
+ let http = new HttpResetClass()
504
+ let res = await http.load(
505
+ 'POST',
506
+ `rs/sql/singleTable`,
507
+ {data: data},
508
+ {resolveMsg: null, rejectMsg: '小区查询失败!!!'}
509
+ )
510
+
511
+ this.setLabelOptions('小区', res.data.map(item => {
512
+ return {
513
+ label: item.f_residential_area,
514
+ value: item.f_residential_area
515
+ }
516
+ }))
517
+ },
518
+ async pcdChange() {
519
+ if (isEmpty(this.show_data.f_pcd)) {
520
+ return
521
+ }
522
+
523
+ let data = {
524
+ tablename: 't_street',
525
+ condition: `f_filialeid = '${this.$login.f.orgid}' and f_pcd = '${this.show_data.f_pcd}'`
526
+ }
527
+ let f_address_type = this.getLableValue('地址类型')
528
+
529
+ if (f_address_type === '民用地址') {
530
+ data.condition = `f_filialeid = '${this.$login.f.orgid}' and f_pcd = '${this.show_data.f_pcd}'`
531
+ }
532
+
533
+ let http = new HttpResetClass()
534
+ let res = await http.load(
535
+ 'POST',
536
+ `rs/sql/singleTable`,
537
+ {data: data},
538
+ {resolveMsg: null, rejectMsg: '街道查询失败!!!'}
539
+ )
540
+
541
+ this.setLabelOptions('街道', res.data.map(item => {
542
+ return {
543
+ label: item.f_street,
544
+ value: item.f_street
545
+ }
546
+ }))
547
+ },
548
+ async buttonBefore(model) {
549
+ if (model.defname === '报建登记' && model.button.button_name === '提交') {
550
+
551
+ if (model.f_is_user === '是') {
552
+ if (isEmpty(model.f_user_name) || isEmpty(model.f_phone) || isEmpty(model.f_address)) {
553
+ throw '用户信息未填写完整,无法提交!!!'
554
+ }
418
555
  }
556
+ }
557
+ if (
558
+ model.button.button_name === '提交' &&
559
+ model.defname === '通气点火' &&
560
+ (
561
+ model.f_apply_type === '散户报建' ||
562
+ model.f_apply_type === '工商户报建'
563
+ ) &&
564
+ model.f_surplus_money > 0
565
+ ) {
566
+ throw '未结金额大于0,无法提交!!!'
567
+ }
568
+ if (model.defname === '验收是否合格' && model.button.button_name === '提交') {
569
+ let http = new HttpResetClass()
570
+ let data = {
571
+ f_process_id: model.f_process_id
572
+ }
573
+ let res = await http.load('POST', 'rs/sql/notInstalled', {data: data}, {resolveMsg: null, rejectMsg: null})
574
+ if (res.data[0].num > 0) {
575
+ throw `还有${res.data[0].num}户未安装,无法提交`
576
+ }
577
+ }
578
+ return model
579
+ },
580
+ // ========================= 武安 =================================
581
+ // 地址类型变化
582
+ addressType() {
583
+ for (const item of this.show_data.fields) {
584
+ if (item.label === '小区' && this.show_data.f_address_type === '民用地址') {
585
+ item.hidden = false
586
+ item.required = true
587
+ }
588
+ if (item.label === '小区' && this.show_data.f_address_type === '特殊地址') {
589
+ item.required = false
590
+ }
591
+ if (
592
+ (
593
+ item.label === '门牌号'
594
+ ) && this.show_data.f_address_type === '民用地址'
595
+ ) {
596
+ item.required = true
597
+ item.hidden = false
598
+ item.value = null
599
+ }
600
+ if (
601
+ (
602
+ item.label === '楼号' ||
603
+ item.label === '单元' ||
604
+ item.label === '楼层'
605
+ ) && this.show_data.f_address_type === '民用地址'
606
+ ) {
607
+ item.required = false
608
+ item.hidden = false
609
+ item.value = null
610
+ }
611
+ if (
612
+ (
613
+ item.label === '楼号' ||
614
+ item.label === '单元' ||
615
+ item.label === '楼层' ||
616
+ item.label === '门牌号'
617
+ ) && this.show_data.f_address_type === '特殊地址'
618
+ ) {
619
+ item.required = false
620
+ item.hidden = true
621
+ item.value = null
419
622
  }
420
623
  }
624
+ this.getPcd()
625
+ }
626
+ // ========================= 武安 =================================
627
+ },
628
+ events: {
629
+ // ========================= 武安 =================================
630
+ // ========================= 武安 =================================
631
+ 'openAddModel'(index) {
632
+ // ========================= 武安 =================================
421
633
  // ========================= 武安 =================================
422
634
  },
423
- events: {
635
+ // 获取view层button事件/
636
+ async 'button'(model) {
637
+ // 修改提交数据
638
+ model = Object.assign({}, this.selectdata, model)
639
+ // 点击重置按钮就重置数据
640
+ if (model.button.button_name === '重置') {
641
+ this.$dispatch('breakControl', this.data)
642
+ return
643
+ }
644
+ // 提交前置
645
+ try {
646
+ model = await this.buttonBefore(model)
647
+ } catch (e) {
648
+ this.$showAlert(e, 'warning', 3000)
649
+ return
650
+ }
651
+ let http = new HttpResetClass()
652
+ let requestData = {
653
+ tables: this.data.tables,
654
+ start_activity: this.$workflow_vue.start_activity,
655
+ model: model,
656
+ loginUser: this.$login.f,
657
+ workflow_gxmlfilename: this.$workflow_vue.workflow_xmlfilename
658
+ }
659
+ console.log("gwfwe",this.selectdata)
660
+ // 下发,提交,保存,退回通用业务后台处理logic
661
+ let url = 'rs/logic/ApplyProductService'
662
+ let res = await http.load('POST', url, {data: requestData}, {resolveMsg: null, rejectMsg: '数据保存失败'})
663
+ if (res.data.code === 200) {
664
+ this.$dispatch('search')
665
+ } else {
666
+ if (res.data.msg) {
667
+ this.$showMessage(res.data.msg)
668
+ }
669
+ }
670
+ },
671
+ async 'initializtionView'() {
424
672
  // ========================= 武安 =================================
673
+ this.addressType()
674
+ // ========================= 武安 =================================
675
+ },
676
+ // 失去焦点出触发事件
677
+ async 'onchange'(index) {
678
+ console.log('失去焦点')
425
679
  // ========================= 武安 =================================
426
- 'openAddModel'(index) {
427
- // ========================= 武安 =================================
428
- // ========================= 武安 =================================
429
- },
430
- // 获取view层button事件/
431
- async 'button'(model) {
432
- // 修改提交数据
433
- model = Object.assign({}, this.selectdata, model)
434
- // 点击重置按钮就重置数据
435
- if (model.button.button_name === '重置') {
436
- this.$dispatch('breakControl', this.data)
437
- return
438
- }
439
-
440
- // 提交前置
441
- try {
442
- model = await this.buttonBefore(model)
443
- } catch (e) {
444
- this.$showAlert(e, 'warning', 3000)
445
- return
680
+ if (this.show_data.defname === '报建登记' || this.show_data.defname === '业务申请'){
681
+ if (this.show_data.fields[index].label === '是否具备安装条件') {
682
+ for (const button of this.show_data.buttons) {
683
+ if (this.show_data.fields[index].value === '否'&& button.button_name === '退回') {
684
+ button.hidden = false
685
+ }else {
686
+ button.hidden = true
687
+ }
688
+ }
689
+ }
690
+ if (this.show_data.fields[index].label === '地址类型'){
691
+ this.addressType()
692
+ }
693
+ // if (this.show_data.fields[index].label === '街道'){
694
+ // console.log('-----------添加街道-----------')
695
+ // if (this.show_data.fields[index].value === null || this.show_data.fields[index].value === '') {
696
+ // this.show_data.fields[index].value = null
697
+ // this.$showAlert('街道地址不能为空!!!', 'warning', 3000)
698
+ // return
699
+ // }
700
+ // let http = new HttpResetClass()
701
+ // let data = {
702
+ // f_adjustable_id: '', // 调压箱编号
703
+ // f_orgid: this.$login.f.orgid, // 组织id
704
+ // f_orgname: this.$login.f.orgs, // 组织名
705
+ // f_pcd: '河北省邯郸市武安市', // 省市区
706
+ // f_pcd_id: 8, // 省市区id
707
+ // // f_pcd_id: 124, // 50.4测试
708
+ // f_slice_area: '', // 片区
709
+ // f_operatorid: this.$login.f.id, // 操作人id
710
+ // f_operator: this.$login.f.name, // 操作人
711
+ // f_filialeid: this.$login.f.orgid, // 创建地址所属分公司(默认当前操作人)
712
+ // f_street: this.show_data.fields[index].value.trim(), // 地址
713
+ // f_comments: '报建系统自动创建' // 备注
714
+ // }
715
+ // try {
716
+ // let res = await http.load('POST', 'rs/logic/address_updatestreet', {data: data}, {
717
+ // resolveMsg: null,
718
+ // rejectMsg: null
719
+ // })
720
+ // } catch (e) {
721
+ // if (e.status === 635) {
722
+ // this.$showAlert('此街道已存在!!!', 'warning', 3000)
723
+ // } else {
724
+ // this.$showAlert('自动添加街道失败,请手动添加!!!', 'danger', 3000)
725
+ // }
726
+ // }
727
+ // }
728
+ // if (this.show_data.fields[index].label === '小区') {
729
+ // if (this.show_data.fields[index].value === null || this.show_data.fields[index].value === '') {
730
+ // this.show_data.fields[index].value = null
731
+ // this.$showAlert('小区名称不能为空!!!', 'warning', 3000)
732
+ // return
733
+ // }
734
+ // // 先查询街道
735
+ // let street = null
736
+ // for (const item of this.show_data.fields) {
737
+ // if (item.label === '街道') {
738
+ // if (item.value.trim() === null || item.value.trim() === '') {
739
+ // this.show_data.fields[index].value = null
740
+ // this.$showAlert('请先录入街道信息,才能录入小区信息!!!', 'warning', 3000)
741
+ // return
742
+ // }
743
+ // let http = new HttpResetClass()
744
+ // let data = {
745
+ // condition: `1=1 and s.f_filialeid in ('${this.$login.f.orgid}') and f_province = '河北省' and f_city = '邯郸市' and f_district = '武安市' and f_street = '${item.value.trim()}'`
746
+ // }
747
+ // let res = await http.load('POST', 'rs/sql/address_getstreetlist', {data: data}, {
748
+ // resolveMsg: null,
749
+ // rejectMsg: null
750
+ // })
751
+ // if (res.data.length > 0) {
752
+ // street = res.data[0]
753
+ // } else {
754
+ // this.show_data.fields[index].value = null
755
+ // this.$showAlert(`【${item.value}】街道不存在,请手动添加或重新输入街道信息,在录入小区信息!!!`, 'warning', 3000)
756
+ // }
757
+ // }
758
+ // }
759
+ // console.log('-----------添加小区-----------')
760
+ // let data = {
761
+ // f_linkname: '', // 联系人
762
+ // f_linkphone: '', // 联系电话
763
+ // f_adjustable_id: '', // 调压箱编号
764
+ // f_user_type: '', // 用户类型
765
+ // f_gasproperties: '', // 用气性质
766
+ // f_meter_brand: '', // 气表品牌
767
+ // f_price_name: '', // 气价名称
768
+ // f_price_type: '', // 气价类型
769
+ // f_meter_style: '', // 气表型号
770
+ // f_position: '', // 表安装位置
771
+ // f_meter_type: '', // 气表类型
772
+ // f_area_id: '', // 小区编号 (自动生成)
773
+ // f_filialeid: this.$login.f.orgid, // 创建地址所属分公司(默认当前操作人)
774
+ // f_operatorid: this.$login.f.id, // 操作人id
775
+ // f_operator: this.$login.f.name, // 操作人
776
+ // f_orgid: this.$login.f.orgid, // 组织id
777
+ // f_orgname: this.$login.f.orgs, // 组织名
778
+ // f_pcd_id: 8, // 省市区id
779
+ // // f_pcd_id: 124, // 50.4测试
780
+ // f_pcd: '河北省邯郸市武安市', // 省市区
781
+ // f_street_id: street.id, // 街道id
782
+ // f_street: street.f_street,// 街道
783
+ // f_area_code: '01', // 片区编码
784
+ // f_slice_area: '武安片区', // 片区
785
+ // // f_area_code: '66556', // 50.4测试
786
+ // // f_slice_area: '武安明星', // 50.4测试
787
+ // slice_area: [
788
+ // {
789
+ // name: '武安片区',
790
+ // code: '01'
791
+ // }
792
+ // ],
793
+ // // slice_area: [ // 50.4测试
794
+ // // {
795
+ // // name: '武安明星',
796
+ // // code: '66556'
797
+ // // }
798
+ // // ],
799
+ // f_residential_area: this.show_data.fields[index].value.trim(), // 小区名称
800
+ // f_area_address: `河北省邯郸市武安市${street.f_street}`, // 详细地址(省市区+街道)
801
+ // f_comments: '报建系统自动创建'
802
+ // }
803
+ // try {
804
+ // let http = new HttpResetClass()
805
+ // let res = await http.load('POST', 'rs/logic/address_updatearea', {data: data}, {
806
+ // resolveMsg: null,
807
+ // rejectMsg: null
808
+ // })
809
+ // } catch (e) {
810
+ // if (e.status === 635) {
811
+ // this.$showAlert('此小区已存在!!!', 'warning', 3000)
812
+ // } else {
813
+ // this.$showAlert('自动添加小区失败,请手动添加!!!', 'warning', 3000)
814
+ // }
815
+ // }
816
+ // }
817
+ // 地址拼接
818
+ if (
819
+ this.show_data.fields[index].label === '区域' ||
820
+ this.show_data.fields[index].label === '街道' ||
821
+ this.show_data.fields[index].label === '小区' ||
822
+ this.show_data.fields[index].label === '楼号' ||
823
+ this.show_data.fields[index].label === '单元' ||
824
+ this.show_data.fields[index].label === '楼层' ||
825
+ this.show_data.fields[index].label === '门牌号'
826
+ ) {
827
+ let f_address = null
828
+ if (this.show_data.f_address_type !== '民用地址') {
829
+ f_address = this.getLableValue('街道') + this.getLableValue('小区')
830
+ } else {
831
+ f_address = this.getLableValue('街道') +
832
+ this.getLableValue('小区') +
833
+ this.getLableValue('楼号') +
834
+ (isEmpty(this.getLableValue('楼号')) ? '' : '号楼') +
835
+ this.getLableValue('单元') +
836
+ (isEmpty(this.getLableValue('单元')) ? '' : '单元') +
837
+ this.getLableValue('楼层') +
838
+ (isEmpty(this.getLableValue('楼层')) ? '' : '层') +
839
+ this.getLableValue('门牌号') +
840
+ (isEmpty(this.getLableValue('门牌号')) ? '' : '室')
841
+ }
842
+ this.setLabelValue('地址', f_address)
446
843
  }
844
+ }
447
845
 
448
- let http = new HttpResetClass()
449
- let requestData = {
450
- tables: this.data.tables,
451
- start_activity: this.$workflow_vue.start_activity,
452
- model: model,
453
- loginUser: this.$login.f,
454
- workflow_xmlfilename: this.$workflow_vue.workflow_xmlfilename
455
- }
456
- // 下发,提交,保存,退回通用业务后台处理logic
457
- let url = 'rs/logic/ApplyProductService'
458
- let res = await http.load('POST', url, {data: requestData}, {resolveMsg: null, rejectMsg: '数据保存失败'})
459
-
460
- if (res.data.code == 200) {
461
- this.$dispatch('search')
462
- } else {
463
- if (res.data.msg) {
464
- this.$showMessage(res.data.msg)
465
- }
466
- }
467
- },
468
- async 'initializtionView'() {
469
- // ========================= 武安 =================================
470
- this.addressType()
471
- // ========================= 武安 =================================
472
- },
473
- // 失去焦点出触发事件
474
- async 'onchange'(index) {
475
- console.log('失去焦点')
476
- // ========================= 武安 =================================
477
- if (this.show_data.defname === '报建登记'){
478
- if (this.show_data.fields[index].label === '地址类型'){
479
- this.addressType()
480
- }
481
- // if (this.show_data.fields[index].label === '街道'){
482
- console.log('-----------添加街道-----------')
483
- // if (this.show_data.fields[index].value === null || this.show_data.fields[index].value === '') {
484
- // this.show_data.fields[index].value = null
485
- // this.$showAlert('街道地址不能为空!!!', 'warning', 3000)
486
- // return
487
- // }
488
- // let http = new HttpResetClass()
489
- // let data = {
490
- // f_adjustable_id: '', // 调压箱编号
491
- // f_orgid: this.$login.f.orgid, // 组织id
492
- // f_orgname: this.$login.f.orgs, // 组织名
493
- // f_pcd: '河北省邯郸市武安市', // 省市区
494
- // f_pcd_id: 8, // 省市区id
495
- // // f_pcd_id: 124, // 50.4测试
496
- // f_slice_area: '', // 片区
497
- // f_operatorid: this.$login.f.id, // 操作人id
498
- // f_operator: this.$login.f.name, // 操作人
499
- // f_filialeid: this.$login.f.orgid, // 创建地址所属分公司(默认当前操作人)
500
- // f_street: this.show_data.fields[index].value.trim(), // 地址
501
- // f_comments: '报建系统自动创建' // 备注
502
- // }
503
- // try{
504
- // let res = await http.load('POST', 'rs/logic/address_updatestreet', {data: data}, {resolveMsg: null, rejectMsg: null})
505
- // } catch (e) {
506
- // if (e.status === 635){
507
- // this.$showAlert('此街道已存在!!!', 'warning', 3000)
508
- // } else {
509
- // this.$showAlert('自动添加街道失败,请手动添加!!!', 'danger', 3000)
510
- // }
511
- // }
512
- // }
513
- // if (this.show_data.fields[index].label === '小区'){
514
- // if (this.show_data.fields[index].value === null || this.show_data.fields[index].value === '') {
515
- // this.show_data.fields[index].value = null
516
- // this.$showAlert('小区名称不能为空!!!', 'warning', 3000)
517
- // return
518
- // }
519
- // 先查询街道
520
- // let street = null
521
- // for (const item of this.show_data.fields) {
522
- // if (item.label === '街道') {
523
- // if (item.value.trim() === null || item.value.trim() === ''){
524
- // this.show_data.fields[index].value = null
525
- // this.$showAlert('请先录入街道信息,才能录入小区信息!!!', 'warning', 3000)
526
- // return
527
- // }
528
- // let http = new HttpResetClass()
529
- // let data = {
530
- // condition: `1=1 and s.f_filialeid in ('${this.$login.f.orgid}') and f_province = '河北省' and f_city = '邯郸市' and f_district = '武安市' and f_street = '${item.value.trim()}'`
531
- // }
532
- // let res = await http.load('POST', 'rs/sql/address_getstreetlist', {data: data}, {resolveMsg: null, rejectMsg: null})
533
- // if (res.data.length > 0) {
534
- // street = res.data[0]
535
- // } else {
536
- // this.show_data.fields[index].value = null
537
- // this.$showAlert(`【${item.value}】街道不存在,请手动添加或重新输入街道信息,在录入小区信息!!!`, 'warning', 3000)
538
- // }
539
- // }
540
- // }
541
- // console.log('-----------添加小区-----------')
542
- // let data = {
543
- // f_linkname: '', // 联系人
544
- // f_linkphone: '', // 联系电话
545
- // f_adjustable_id: '', // 调压箱编号
546
- // f_user_type: '', // 用户类型
547
- // f_gasproperties: '', // 用气性质
548
- // f_meter_brand: '', // 气表品牌
549
- // f_price_name: '', // 气价名称
550
- // f_price_type: '', // 气价类型
551
- // f_meter_style: '', // 气表型号
552
- // f_position: '', // 表安装位置
553
- // f_meter_type: '', // 气表类型
554
- // f_area_id: '', // 小区编号 (自动生成)
555
- // f_filialeid: this.$login.f.orgid, // 创建地址所属分公司(默认当前操作人)
556
- // f_operatorid: this.$login.f.id, // 操作人id
557
- // f_operator: this.$login.f.name, // 操作人
558
- // f_orgid: this.$login.f.orgid, // 组织id
559
- // f_orgname: this.$login.f.orgs, // 组织名
560
- // f_pcd_id: 8, // 省市区id
561
- // // f_pcd_id: 124, // 50.4测试
562
- // f_pcd: '河北省邯郸市武安市', // 省市区
563
- // f_street_id: street.id, // 街道id
564
- // f_street: street.f_street,// 街道
565
- // f_area_code: '01', // 片区编码
566
- // f_slice_area: '武安片区', // 片区
567
- // // f_area_code: '66556', // 50.4测试
568
- // // f_slice_area: '武安明星', // 50.4测试
569
- // slice_area: [
570
- // {
571
- // name: '武安片区',
572
- // code: '01'
573
- // }
574
- // ],
575
- // // slice_area: [ // 50.4测试
576
- // // {
577
- // // name: '武安明星',
578
- // // code: '66556'
579
- // // }
580
- // // ],
581
- // f_residential_area: this.show_data.fields[index].value.trim(), // 小区名称
582
- // f_area_address: `河北省邯郸市武安市${street.f_street}`, // 详细地址(省市区+街道)
583
- // f_comments: '报建系统自动创建'
584
- // }
585
- // try{
586
- // let http = new HttpResetClass()
587
- // let res = await http.load('POST', 'rs/logic/address_updatearea', {data: data}, {resolveMsg: null, rejectMsg: null})
588
- // } catch (e) {
589
- // if (e.status === 635){
590
- // this.$showAlert('此小区已存在!!!', 'warning', 3000)
591
- // } else {
592
- // this.$showAlert('自动添加小区失败,请手动添加!!!', 'warning', 3000)
593
- // }
594
- // }
595
- // }
596
- // 地址拼接
597
- if (
598
- this.show_data.fields[index].label === '街道' ||
599
- this.show_data.fields[index].label === '小区' ||
600
- this.show_data.fields[index].label === '楼号' ||
601
- this.show_data.fields[index].label === '单元' ||
602
- this.show_data.fields[index].label === '楼层' ||
603
- this.show_data.fields[index].label === '门牌号'
604
- ) {
605
- let f_address = null
606
- if (this.show_data.f_address_type !== '民用地址') {
607
- f_address = this.getLableValue('街道') + this.getLableValue('小区')
846
+ if (this.show_data.defname === '竣工验收') {
847
+ if (this.show_data.fields[index].label === '验收是否合格'){
848
+ for (const button of this.show_data.buttons) {
849
+ if (this.show_data.fields[index].value === '否' && button.button_name === '退回') {
850
+ button.hidden = false
608
851
  } else {
609
- f_address = this.getLableValue('街道') +
610
- this.getLableValue('小区') +
611
- this.getLableValue('楼号') +
612
- (isEmpty(this.getLableValue('楼号')) ? '' : '号楼') +
613
- this.getLableValue('单元') +
614
- (isEmpty(this.getLableValue('单元')) ? '' : '单元') +
615
- this.getLableValue('楼层') +
616
- (isEmpty(this.getLableValue('楼层')) ? '' : '层') +
617
- this.getLableValue('门牌号') +
618
- (isEmpty(this.getLableValue('门牌号')) ? '' : '室')
852
+ button.hidden = true
619
853
  }
620
- this.setLabelValue('地址',f_address)
621
854
  }
622
855
  }
623
- if (this.show_data.defname === '竣工验收') {
624
- if (this.show_data.fields[index].label === '验收是否合格'){
625
- for (const button of this.show_data.buttons) {
626
- if (this.show_data.fields[index].value === '否' && button.button_name === '退回') {
627
- button.hidden = false
628
- } else {
629
- button.hidden = true
630
- }
631
- }
856
+ }
857
+ if (this.show_data.defname === '报建登记'&&this.show_data.f_apply_type==='工商户报建') {
858
+
859
+ console.log("13f", this.selectdata.onetomany)
860
+ for (const button of this.show_data.buttons) {
861
+ if (this.selectdata.onetomany&& button.button_name === '提交') {
862
+ console.log("1f")
863
+ button.disable = true
864
+ }
865
+ else {
866
+ button.disable = false
867
+ console.log("2f")
632
868
  }
633
869
  }
634
- if (this.show_data.defname === '合同签订') {
635
- if (this.show_data.fields[index].label === '合同编号') {
636
- if (!isEmpty(this.show_data.fields[index].value)) {
637
- let http = new HttpResetClass()
638
- let data = {
639
- tablename: 't_apply',
640
- condition: `f_contract_number='${this.show_data.fields[index].value}'`
641
- }
642
- let res = await http.load('POST', 'rs/sql/singleTable', {data: data}, {
643
- resolveMsg: null,
644
- rejectMsg: '合同编号查重失败'
645
- })
646
- if (res.data.length > 0) {
647
- this.show_data.fields[index].value = null
648
- this.$showAlert('合同编号已存在!!!', 'warning', 3000)
649
- }
870
+ }
871
+ // if (this.show_data.defname === '营业厅建档'){
872
+ // let http = new HttpResetClass()
873
+ // let data = {
874
+ // tablename: 't_userinfo',
875
+ // condition: `f_process_id='${this.selectdata.f_process_id}'`
876
+ //
877
+ // }
878
+ // let res = await http.load('POST', 'rs/sql/singleTable', {data: data}, {resolveMsg: null, rejectMsg: null})
879
+ //
880
+ // if (this.show_data.fields[index].label === '是否已建档') {
881
+ // if (res.data[0].f_user_state === '预备') {
882
+ // this.show_data.fields[index].value = '否'
883
+ // button.hidden = false
884
+ // }else{
885
+ // this.show_data.fields[index].value = '是'
886
+ // button.hidden = true
887
+ // }
888
+ // }
889
+ // }
890
+ if(this.show_data.defname === '现场勘察') {
891
+ console.log("this.shdata",this.show_data)
892
+ if (this.show_data.fields[index].label === '是否具备安装条件') {
893
+ for (const button of this.show_data.buttons) {
894
+ if (this.show_data.fields[index].value === '否'&& button.button_name === '退回') {
895
+ button.hidden = false
896
+ }else {
897
+ button.hidden = true
650
898
  }
651
899
  }
652
- if (this.show_data.fields[index].label === '单价') {
900
+ }
901
+ }
902
+ // if (this.show_data.defname === '通气点火'){
903
+ // let http = new HttpResetClass()
904
+ // let data = {
905
+ // tablename: 't_firemessage',
906
+ // condition: `f_process_id='${this.selectdata.f_process_id}'`
907
+ //
908
+ // }
909
+ // let res = await http.load('POST', 'rs/sql/singleTable', {data: data}, {resolveMsg: null, rejectMsg: null})
910
+ // console.log("res")
911
+ // console.log(res.data)
912
+ // if (this.show_data.fields[index].label === '是否已通气') {
913
+ // if (res.data.length==0) {
914
+ // this.show_data.fields[index].value = '否'
915
+ // button.hidden = false
916
+ // }else{
917
+ // this.show_data.fields[index].value = '是'
918
+ // button.hidden = true
919
+ // }
920
+ // }
921
+ // }
922
+ if (this.show_data.defname === '合同签订') {
923
+ if (this.show_data.fields[index].label === '合同编号') {
924
+ if (!isEmpty(this.show_data.fields[index].value)) {
653
925
  let http = new HttpResetClass()
654
926
  let data = {
655
- num1: this.getLableValue(this.show_data.fields[index].label),
656
- num2: this.getLableValue('户数'),
657
- operator: '*'
927
+ tablename: 't_apply',
928
+ condition: `f_contract_number='${this.show_data.fields[index].value}'`
658
929
  }
659
- try {
660
- let res = await http.load('POST', 'rs/logic/ompute', {data: data}, {
661
- resolveMsg: null,
662
- rejectMsg: null
663
- })
664
- data = {
665
- num1: res.data,
666
- num2: this.getLableValue('其他费用'),
667
- operator: '+'
668
- }
669
- res = await http.load('POST', 'rs/logic/compute', {data: data}, {
670
- resolveMsg: null,
671
- rejectMsg: null
672
- })
673
- this.setLabelValue('合同金额',res.data)
674
- } catch (e) {
675
- this.$showAlert(e.data.msg, 'warning', 3000)
930
+ let res = await http.load('POST', 'rs/sql/singleTable', {data: data}, {
931
+ resolveMsg: null,
932
+ rejectMsg: '合同编号查重失败'
933
+ })
934
+ if (res.data.length > 0) {
935
+ this.show_data.fields[index].value = null
936
+ this.$showAlert('合同编号已存在!!!', 'warning', 3000)
676
937
  }
938
+ //拼写合同编号
939
+ // if (this.selectdata.f_apply_type == '工商户报建') {
940
+ // this.show_data.fields[index].value = "ZS-S-" + this.show_data.fields[index].value
941
+ // // this.show_data.fields[index].value = "ZS-S-" + this.show_data.fields[index].value + "-" + new Date().Format('yyyy-MM-dd')
942
+ // }else {
943
+ // this.show_data.fields[index].value = "ZS-M-" + this.show_data.fields[index].value
944
+ // // this.show_data.fields[index].value = "ZS-M-" + this.show_data.fields[index].value + "-" + new Date().Format('yyyy-MM-dd')
945
+ // }
677
946
  }
678
- if (this.show_data.fields[index].label === '其他费用') {
679
- let http = new HttpResetClass()
680
- let data = {
681
- num1: this.getLableValue(this.show_data.fields[index].label),
682
- num2: this.getLableValue('合同金额'),
947
+ }
948
+ if (this.show_data.fields[index].label === '单价') {
949
+ let http = new HttpResetClass()
950
+ let data = {
951
+ num1: this.getLableValue(this.show_data.fields[index].label),
952
+ num2: this.getLableValue('户数'),
953
+ operator: '*'
954
+ }
955
+ try {
956
+ let res = await http.load('POST', 'rs/logic/compute', {data: data}, {
957
+ resolveMsg: null,
958
+ rejectMsg: null
959
+ })
960
+ data = {
961
+ num1: res.data,
962
+ num2: this.getLableValue('其他费用'),
683
963
  operator: '+'
684
964
  }
685
- try {
686
- let res = await http.load('POST', 'rs/logic/compute', {data: data}, {
687
- resolveMsg: null,
688
- rejectMsg: null
689
- })
690
- this.setLabelValue('合同金额',res.data)
691
- } catch (e) {
692
- this.$showAlert(e.data.msg, 'warning', 3000)
965
+ res = await http.load('POST', 'rs/logic/compute', {data: data}, {
966
+ resolveMsg: null,
967
+ rejectMsg: null
968
+ })
969
+ this.setLabelValue('合同金额',res.data)
970
+ if(this.show_data.f_apply_type === '居民报建'){
971
+ this.show_data.f_contract_money = res.data
972
+ this.show_data.f_due_money = res.data
973
+ this.show_data.f_surplus_money = res.data
974
+ this.setLabelValue('应交总金额',res.data)
975
+ this.setLabelValue('未结总金额',res.data)
693
976
  }
977
+ } catch (e) {
978
+ this.$showAlert(e.data.msg, 'warning', 3000)
694
979
  }
695
980
  }
696
- // ========================= 武安 =================================
697
- // 号码检测
698
- if (this.show_data.fields[index].label === '电话号码') {
699
- let phone = this.show_data.fields[index].value
700
- // 电话号码效验
701
- if (!(/^1[3456789]\d{9}$/.test(phone))) {
702
- this.show_data.fields[index].value = ""
703
- this.$showAlert('电话号码格式不正确,请重新输入。', 'info', 2000)
704
- }
705
- }
706
- //时间提醒
707
- if (this.show_data.fields[index].label.includes("时间") || this.show_data.fields[index].type === 'datepicker') {
708
- let setTime = this.show_data.fields[index].value
709
- let nowTime = new Date().Format("yyyy-MM-dd HH:mm:ss")
710
- if (nowTime >= setTime) {
711
- this.$showMessage("请注意,当前节点时间/工期已过期!")
712
- }
713
- }
714
- },
715
- // input值发生变化
716
- async 'oninput'(index) {
717
-
718
- },
719
- // 错误事件
720
- error_check(index) {
721
- // 时间格式检测
722
- if (this.show_data.fields[index].type == 'datepicker') {
723
- let dateRe = new RegExp(/(([0-9]{3}[1-9]|[0-9]{2}[1-9][0-9]{1}|[0-9]{1}[1-9][0-9]{2}|[1-9][0-9]{3})-(((0[13578]|1[02])-(0[1-9]|[12][0-9]|3[01]))|((0[469]|11)-(0[1-9]|[12][0-9]|30))|(02-(0[1-9]|[1][0-9]|2[0-8]))))|((([0-9]{2})(0[48]|[2468][048]|[13579][26])|((0[48]|[2468][048]|[3579][26])00))-02-29)$/)
724
- let datetimeRe = new RegExp(/((([0-9]{3}[1-9]|[0-9]{2}[1-9][0-9]{1}|[0-9]{1}[1-9][0-9]{2}|[1-9][0-9]{3})-(((0[13578]|1[02])-(0[1-9]|[12][0-9]|3[01]))|((0[469]|11)-(0[1-9]|[12][0-9]|30))|(02-(0[1-9]|[1][0-9]|2[0-8]))))|((([0-9]{2})(0[48]|[2468][048]|[13579][26])|((0[48]|[2468][048]|[3579][26])00))-02-29))\s([0-1][0-9]|2[0-3]):([0-5][0-9]):([0-5][0-9])$/)
725
- if (datetimeRe.test(this.show_data.fields[index].value) && this.show_data.fields[index].value.trim().length == 19 && this.show_data.fields[index].fullsize) {
726
- this.show_data.fields[index].error.flag = false
727
- } else if (dateRe.test(this.show_data.fields[index].value) && this.show_data.fields[index].value.trim().length == 10) {
728
- this.show_data.fields[index].error.flag = false
729
- } else {
730
- if (this.show_data.fields[index].fullsize) {
731
- this.show_data.fields[index].error = Object.assign({}, this.show_data.fields[index].error)
732
- this.show_data.fields[index].error.msg = this.show_data.fields[index].error.msg ? this.show_data.fields[index].error.msg : '时间格式如:2019-05-02 09:23:21'
733
- this.$showAlert(this.show_data.fields[index].label + '格式错误' + this.show_data.fields[index].error.msg, 'warning', 3000)
734
- this.show_data.fields[index].error.flag = true
735
- this.show_data.fields[index].value = ''
736
- } else {
737
- this.show_data.fields[index].error = Object.assign({}, this.show_data.fields[index].error)
738
- this.show_data.fields[index].error.msg = this.show_data.fields[index].error.msg ? this.show_data.fields[index].error.msg : '时间格式如:2019-05-02'
739
- this.$showAlert(this.show_data.fields[index].label + '格式错误' + this.show_data.fields[index].error.msg, 'warning', 3000)
740
- this.show_data.fields[index].error.flag = true
741
- this.show_data.fields[index].value = ''
981
+ if (this.show_data.fields[index].label === '其他费用') {
982
+ let http = new HttpResetClass()
983
+ let data = {
984
+ num1: this.getLableValue(this.show_data.fields[index].label),
985
+ num2: this.getLableValue('合同金额'),
986
+ operator: '+'
987
+ }
988
+ try {
989
+ let res = await http.load('POST', 'rs/logic/compute', {data: data}, {
990
+ resolveMsg: null,
991
+ rejectMsg: null
992
+ })
993
+ this.setLabelValue('合同金额',res.data)
994
+ if(this.show_data.f_apply_type === '居民报建'){
995
+ this.show_data.f_contract_money = res.data
996
+ this.show_data.f_due_money = res.data
997
+ this.show_data.f_surplus_money = res.data
998
+ this.setLabelValue('应交总金额',res.data)
999
+ this.setLabelValue('未结总金额',res.data)
742
1000
  }
743
-
1001
+ } catch (e) {
1002
+ this.$showAlert(e.data.msg, 'warning', 3000)
744
1003
  }
745
1004
  }
746
- },
747
- // onetomany模态框默认监听监听事件
748
- async 'onetomanydelete'(i, j) {
749
- console.log('默认删除')
750
- let http = new HttpResetClass()
751
- let data = {
752
- table: this.show_data.onetomany[i].tables[0],
753
- row: this.show_data.onetomany[i].rows[j]
1005
+ }
1006
+ // ========================= 武安 =================================
1007
+ // 号码检测
1008
+ if (this.show_data.fields[index].label === '电话号码') {
1009
+ let phone = this.show_data.fields[index].value
1010
+ // 电话号码效验
1011
+ if (!(/^1[3456789]\d{9}$/.test(phone))) {
1012
+ this.show_data.fields[index].value = ""
1013
+ this.$showAlert('电话号码格式不正确,请重新输入。', 'info', 2000)
754
1014
  }
755
- let res = await http.load('POST', 'rs/logic/onetomanyDefaultDeleteEvent', {data: data}, {
756
- resolveMsg: null,
757
- rejectMsg: '删除失败'
758
- })
1015
+ }
1016
+ //时间提醒
1017
+ if (this.show_data.fields[index].label.includes("时间") || this.show_data.fields[index].type === 'datepicker') {
1018
+ let setTime = this.show_data.fields[index].value
1019
+ let nowTime = new Date().Format("yyyy-MM-dd HH:mm:ss")
1020
+ if (nowTime >= setTime) {
1021
+ this.$showMessage("请注意,当前节点时间/工期已过期!")
1022
+ }
1023
+ }
1024
+ },
1025
+ // input值发生变化
1026
+ async 'oninput'(index) {
1027
+
1028
+ },
1029
+ // 错误事件
1030
+ error_check(index) {
1031
+ // 时间格式检测
1032
+ if (this.show_data.fields[index].type == 'datepicker') {
1033
+ let dateRe = new RegExp(/(([0-9]{3}[1-9]|[0-9]{2}[1-9][0-9]{1}|[0-9]{1}[1-9][0-9]{2}|[1-9][0-9]{3})-(((0[13578]|1[02])-(0[1-9]|[12][0-9]|3[01]))|((0[469]|11)-(0[1-9]|[12][0-9]|30))|(02-(0[1-9]|[1][0-9]|2[0-8]))))|((([0-9]{2})(0[48]|[2468][048]|[13579][26])|((0[48]|[2468][048]|[3579][26])00))-02-29)$/)
1034
+ let datetimeRe = new RegExp(/((([0-9]{3}[1-9]|[0-9]{2}[1-9][0-9]{1}|[0-9]{1}[1-9][0-9]{2}|[1-9][0-9]{3})-(((0[13578]|1[02])-(0[1-9]|[12][0-9]|3[01]))|((0[469]|11)-(0[1-9]|[12][0-9]|30))|(02-(0[1-9]|[1][0-9]|2[0-8]))))|((([0-9]{2})(0[48]|[2468][048]|[13579][26])|((0[48]|[2468][048]|[3579][26])00))-02-29))\s([0-1][0-9]|2[0-3]):([0-5][0-9]):([0-5][0-9])$/)
1035
+ if (datetimeRe.test(this.show_data.fields[index].value) && this.show_data.fields[index].value.trim().length == 19 && this.show_data.fields[index].fullsize) {
1036
+ this.show_data.fields[index].error.flag = false
1037
+ } else if (dateRe.test(this.show_data.fields[index].value) && this.show_data.fields[index].value.trim().length == 10) {
1038
+ this.show_data.fields[index].error.flag = false
1039
+ } else {
1040
+ if (this.show_data.fields[index].fullsize) {
1041
+ this.show_data.fields[index].error = Object.assign({}, this.show_data.fields[index].error)
1042
+ this.show_data.fields[index].error.msg = this.show_data.fields[index].error.msg ? this.show_data.fields[index].error.msg : '时间格式如:2019-05-02 09:23:21'
1043
+ this.$showAlert(this.show_data.fields[index].label + '格式错误' + this.show_data.fields[index].error.msg, 'warning', 3000)
1044
+ this.show_data.fields[index].error.flag = true
1045
+ this.show_data.fields[index].value = ''
1046
+ } else {
1047
+ this.show_data.fields[index].error = Object.assign({}, this.show_data.fields[index].error)
1048
+ this.show_data.fields[index].error.msg = this.show_data.fields[index].error.msg ? this.show_data.fields[index].error.msg : '时间格式如:2019-05-02'
1049
+ this.$showAlert(this.show_data.fields[index].label + '格式错误' + this.show_data.fields[index].error.msg, 'warning', 3000)
1050
+ this.show_data.fields[index].error.flag = true
1051
+ this.show_data.fields[index].value = ''
1052
+ }
759
1053
 
760
- if (res.data <= 0){
761
- this.$showMessage('删除失败')
762
- return
763
1054
  }
1055
+ }
1056
+ },
1057
+ // onetomany模态框默认监听监听事件
1058
+ async 'onetomanydelete'(i, j) {
1059
+ console.log('默认删除')
1060
+ let http = new HttpResetClass()
1061
+ let data = {
1062
+ table: this.show_data.onetomany[i].tables[0],
1063
+ row: this.show_data.onetomany[i].rows[j]
1064
+ }
1065
+ let res = await http.load('POST', 'rs/logic/onetomanyDefaultDeleteEvent', {data: data}, {
1066
+ resolveMsg: null,
1067
+ rejectMsg: '删除失败'
1068
+ })
1069
+
1070
+ if (res.data <= 0){
1071
+ this.$showMessage('删除失败')
1072
+ return
1073
+ }
764
1074
 
765
- this.$dispatch('breakControl', this.show_data)
766
- },
767
- async 'onetomanyadd'(index) {
1075
+ this.$dispatch('breakControl', this.show_data)
1076
+ },
1077
+ async 'onetomanyadd'(index) {
768
1078
 
769
- let data = {
770
- f_process_id : this.show_data.f_process_id
1079
+ let data = {
1080
+ f_process_id : this.show_data.f_process_id
1081
+ }
1082
+ this.show_data.onetomany[index].fields.forEach(item => {
1083
+ data[item.field] = item.value
1084
+ })
1085
+ let res = await this.$resetpost(
1086
+ `rs/entity/${this.show_data.onetomany[index].tables[0]}`,
1087
+ data
1088
+ )
1089
+ this.$dispatch('breakControl', this.show_data)
1090
+ },
1091
+ async 'onetomanyupdate'(i, j) {
1092
+ let onetomany = this.show_data.onetomany[i]
1093
+ let data = onetomany.rows[j]
1094
+
1095
+ onetomany.fields.forEach(item => {
1096
+ data[item.field] = item.value
1097
+ })
1098
+ let res = await this.$resetpost(
1099
+ `rs/entity/${this.show_data.onetomany[i].tables[0]}`,
1100
+ data
1101
+ )
1102
+
1103
+ this.$dispatch('breakControl', this.show_data)
1104
+ },
1105
+ // 选择用户档案信息
1106
+ 'selectUserinfo'(row) {
1107
+ console.log("当前选择数据",row)
1108
+ if (this.selectdata.f_apply_type === '拆改装报建'){
1109
+ this.showLabels('用户编号')
1110
+ this.hideLabels('地址类型','区域','街道','小区','楼号','单元','楼层','门牌号')
1111
+ this.electiveLabels('地址类型','区域','街道','小区','楼号','单元','楼层','门牌号')
1112
+ this.show_data.f_address_type = '民用地址'
1113
+ this.show_data.f_pcd = row.f_pcd
1114
+ this.show_data.f_street = row.f_street
1115
+ this.show_data.f_residential_area = row.f_residential_area
1116
+ this.show_data.f_building = row.f_building
1117
+ this.show_data.f_unit = row.f_unit
1118
+ this.show_data.f_floor = row.f_floor
1119
+ this.show_data.f_room = row.f_room
1120
+ this.selectdata.flag = '旧用户'
1121
+ }
1122
+ this.setLabelValue('用户编号', row.f_userinfo_code)
1123
+ this.setLabelValue('用户名称', row.f_user_name)
1124
+ this.setLabelValue('用户电话', row.f_user_phone)
1125
+ this.setLabelValue('证件类型', row.f_credentials)
1126
+ this.setLabelValue('证件号码', row.f_idnumber)
1127
+ this.setLabelValue('地址', row.f_address)
1128
+
1129
+ this.selectdata.f_userinfo_id = row.f_userinfo_id
1130
+ this.selectdata.f_userinfo_code = row.f_userinfo_code
1131
+ console.log("当前选择数据",this.show_data)
1132
+ },
1133
+ async 'streetChange'(index) {
1134
+ if (isEmpty(this.show_data.f_street)) {
1135
+ return
1136
+ }
1137
+
1138
+ this.setLabelValue('小区', null)
1139
+
1140
+ let data = {
1141
+ tablename: 't_area',
1142
+ condition: `f_filialeid = '${this.$login.f.orgid}' and f_street = '${this.show_data.f_street}'`
1143
+ }
1144
+ let http = new HttpResetClass()
1145
+ let res = await http.load(
1146
+ 'POST',
1147
+ `rs/sql/singleTable`,
1148
+ {data: data},
1149
+ {resolveMsg: null, rejectMsg: '小区!!!'}
1150
+ )
1151
+
1152
+ this.setLabelOptions('小区', res.data.map(item => {
1153
+ return {
1154
+ label: item.f_residential_area,
1155
+ value: item.f_residential_area
771
1156
  }
772
- this.show_data.onetomany[index].fields.forEach(item => {
773
- data[item.field] = item.value
774
- })
775
- let res = await this.$resetpost(
776
- `rs/entity/${this.show_data.onetomany[index].tables[0]}`,
777
- data
778
- )
779
- this.$dispatch('breakControl', this.show_data)
780
- },
781
- async 'onetomanyupdate'(i, j) {
782
- let onetomany = this.show_data.onetomany[i]
783
- let data = onetomany.rows[j]
784
-
785
- onetomany.fields.forEach(item => {
786
- data[item.field] = item.value
787
- })
788
- let res = await this.$resetpost(
789
- `rs/entity/${this.show_data.onetomany[i].tables[0]}`,
790
- data
791
- )
1157
+ }))
1158
+ },
1159
+ // 区县失去焦点
1160
+ async 'pcdChange'(index) {
1161
+ if (isEmpty(this.show_data.f_pcd)) {
1162
+ return
1163
+ }
1164
+
1165
+ this.setLabelValue('街道', null)
1166
+ this.setLabelValue('小区', null)
1167
+
1168
+
1169
+ let data = {
1170
+ tablename: 't_street',
1171
+ condition: `f_filialeid = '${this.$login.f.orgid}' and f_pcd = '${this.show_data.f_pcd}'`
1172
+ }
1173
+ let f_address_type = this.getLableValue('地址类型')
1174
+
1175
+ if (f_address_type === '民用地址') {
1176
+ data.condition = `f_filialeid = '${this.$login.f.orgid}' and f_pcd = '${this.show_data.f_pcd}'`
1177
+ }
1178
+
1179
+ let http = new HttpResetClass()
1180
+ let res = await http.load(
1181
+ 'POST',
1182
+ `rs/sql/singleTable`,
1183
+ {data: data},
1184
+ {resolveMsg: null, rejectMsg: '街道查询失败!!!'}
1185
+ )
792
1186
 
793
- this.$dispatch('breakControl', this.show_data)
794
- },
795
- // onetomany模态框监听事件
796
- async 'onchange_modal'(index, i) {
797
- },
798
- async 'oninput_modal'(index, i) {
1187
+ this.setLabelOptions('街道', res.data.map(item => {
1188
+ return {
1189
+ label: item.f_street,
1190
+ value: item.f_street
1191
+ }
1192
+ }))
1193
+ },
1194
+ 'buttonChange' (index) {
1195
+ if (this.show_data.fields[index].value === '否') {
1196
+ console.log("测试")
1197
+ this.hideButtons('下发','提交')
1198
+ this.showButtons('退回','终止')
1199
+ } else {
1200
+ this.hideButtons('退回','终止')
1201
+ this.showButtons('下发','提交')
1202
+ }
1203
+ },
1204
+ async 'stopApply'() {
1205
+ this.stope_view = true
1206
+ this.showview = false
1207
+ },
1208
+ async 'signUserInfo' (index) {
1209
+ if (this.show_data.fields[index].value === '是') {
1210
+ console.log("测试")
1211
+ this.showLabels("用户名称", "用户电话", "证件类型", "证件号码", '地址类型', '区域', '街道', '小区', '楼号', '单元', '楼层', '门牌号', '地址')
1212
+ this.requiredLabels("用户名称", "用户电话", "证件类型", "证件号码", '地址类型', '区域', '街道', '小区', '门牌号', '地址')
1213
+ } else {
1214
+ this.hideLabels("用户名称", "用户电话", "证件类型", "证件号码", '地址类型', '区域', '街道', '小区', '楼号', '单元', '楼层', '门牌号', '地址')
1215
+ this.electiveLabels("用户名称", "用户电话", "证件类型", "证件号码", '地址类型', '区域', '街道', '小区', '楼号', '单元', '楼层', '门牌号', '地址')
799
1216
  }
800
1217
  },
801
- watch: {
1218
+ // onetomany模态框监听事件
1219
+ async 'onchange_modal'(index, i) {
1220
+ },
1221
+ async 'oninput_modal'(index, i) {
802
1222
  }
1223
+ },
1224
+ watch: {
803
1225
  }
1226
+ }
804
1227
  </script>
805
1228
  <style scoped>
806
- /*清除model中的浮动*/
807
- .clearfix:after,.clearfix:before{
808
- display: table;
809
- }
810
- .clearfix:after{
811
- clear: both;
812
- }
1229
+ /*清除model中的浮动*/
1230
+ .clearfix:after,.clearfix:before{
1231
+ display: table;
1232
+ }
1233
+ .clearfix:after{
1234
+ clear: both;
1235
+ }
813
1236
  </style>