apply-clients 3.3.81 → 3.3.83

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.
@@ -209,12 +209,54 @@ export default {
209
209
  ready () {
210
210
  },
211
211
  methods: {
212
- confirmModal () {
212
+ async confirmModal () {
213
213
  if (this.modelTitle === '新增') {
214
- if (this.onetomany.add.event) {
215
- this.$dispatch(this.onetomany.add.event, this.index)
216
- } else {
217
- this.$dispatch('onetomanyadd', this.index)
214
+ //报警器设备型号校验
215
+ if (this.modelTitle === '新增' && this.selectdata.f_apply_type === '报警器报建'){
216
+ let data = {
217
+ f_material_name : "",
218
+ f_bjq_sid: "",
219
+ }
220
+ this.onetomany.fields.forEach(item=>{
221
+ if (item.label === '材料编号'){
222
+ data.f_bjq_sid = item.value
223
+ }
224
+ if (item.label === '材料名称'){
225
+ data.f_material_name = item.value
226
+ }
227
+ })
228
+ if (data.f_material_name.substr(0,3) === '报警器'){
229
+ let res = await this.$resetpost(
230
+ `ncc/rs/logic/bjqcheck`,
231
+ // `/rs/logic/bjqcheck`,
232
+ data
233
+ )
234
+ if (res.data.code == 200){
235
+ if (this.onetomany.add.event) {
236
+ this.$dispatch(this.onetomany.add.event, this.index)
237
+ } else {
238
+ this.$dispatch('onetomanyadd', this.index)
239
+ }
240
+ this.closeModal()
241
+ }else {
242
+ this.disableButton = true
243
+ this.$showMessage(res.data.msg)
244
+ }
245
+ }else {
246
+ if (this.onetomany.add.event) {
247
+ this.$dispatch(this.onetomany.add.event, this.index)
248
+ } else {
249
+ this.$dispatch('onetomanyadd', this.index)
250
+ }
251
+ this.closeModal()
252
+ }
253
+ }else {
254
+ if (this.onetomany.add.event) {
255
+ this.$dispatch(this.onetomany.add.event, this.index)
256
+ } else {
257
+ this.$dispatch('onetomanyadd', this.index)
258
+ }
259
+ this.closeModal()
218
260
  }
219
261
  }
220
262
  if (this.modelTitle === '修改') {
@@ -223,9 +265,9 @@ export default {
223
265
  } else {
224
266
  this.$dispatch('onetomanyupdate', this.index, this.rowIndex)
225
267
  }
268
+ this.closeModal()
226
269
  }
227
-
228
- this.closeModal()
270
+ // this.closeModal()
229
271
  },
230
272
  onchange (fieldIndex) {
231
273
  this.disableModalButton()
@@ -18,7 +18,7 @@
18
18
  <label class="font_normal_body">工程编号:</label>
19
19
  <input type="text" style="width: 60%" class="input_search" placeholder='工程编号' v-model="model.f_apply_num"
20
20
  v-on:keyup.enter="$parent.$parent.search()"
21
- condition="f_apply_num = '{}'">
21
+ condition="u.f_apply_num = '{}'">
22
22
  </div>
23
23
  <div class="form-group col-sm-3">
24
24
  <label class="font_normal_body">客户名称:</label>
@@ -96,13 +96,13 @@
96
96
  </template>
97
97
  <template partial='body'>
98
98
  <tr >
99
- <td style="text-align: center;">
99
+ <td v-if="row.f_back_reason ? showRow: !showRow" style="text-align: center;">
100
100
  <nobr><font>{{$index+1}}</font></nobr>
101
101
  </td>
102
102
  <td style="text-align: center;" @click="$parent.$parent.$parent.click(row)">
103
103
  <nobr><font>{{row.f_apply_num}}</font></nobr>
104
104
  </td>
105
- <td style="text-align: center;" @click="$parent.$parent.$parent.click(row)">
105
+ <td v-if="row.f_back_reason ? showRow: !showRow" style="text-align: center;" @click="$parent.$parent.$parent.click(row)">
106
106
  <nobr><font>{{row.f_user_name}}</font></nobr>
107
107
  </td>
108
108
  <td style="text-align: center;" @click="$parent.$parent.$parent.click(row)">
@@ -167,7 +167,8 @@ export default {
167
167
  showPrint: false,
168
168
  showProgress: false,
169
169
  percent: 0,
170
- type: 'PREVIEW'
170
+ type: 'PREVIEW',
171
+ showRow:false
171
172
  }
172
173
  },
173
174
  ready () {
@@ -213,6 +214,8 @@ export default {
213
214
  this.selectdata = null
214
215
  },
215
216
  async click (row) {
217
+ console.log("词条数据",row)
218
+
216
219
  this.type = 'PREVIEW'
217
220
 
218
221
  await this.getData(row)
@@ -233,6 +236,7 @@ export default {
233
236
  })
234
237
 
235
238
  this.selectdata = res.data[0]
239
+ console.log("打印数据 ",this.selectdata)
236
240
  },
237
241
  clear () {
238
242
  Object.keys(this.$refs.cp.$refs.cri.model).forEach((key) => {
@@ -73,6 +73,10 @@
73
73
  <td>备&emsp;&emsp;注</td>
74
74
  <td colspan="5">{{ selectdata.f_construction_remarks }}</td>
75
75
  </tr>
76
+ <tr>
77
+ <td>报建备注</td>
78
+ <td colspan="5">{{ selectdata.f_apply_remarks }}</td>
79
+ </tr>
76
80
  </table>
77
81
  </div>
78
82
 
@@ -4,6 +4,11 @@
4
4
  <criteria partial='criteria' @condition-changed='search' v-ref:cri>
5
5
  <div novalidate class="form-horizontal select-overspread container-fluid auto" partial>
6
6
  <div class="row">
7
+ <div class="form-group col-sm-3">
8
+ <label class="font_normal_body">客户名称:</label>
9
+ <input type="text" style="width:60%" class="input_search" v-model="model.f_user_name"
10
+ v-on:keyup.enter="$parent.$parent.search()" condition="f_user_name like '%{}%'" placeholder='客户名称'>
11
+ </div>
7
12
  <div class="form-group col-sm-3">
8
13
  <label class="font_normal_body">组织机构:</label>
9
14
  <res-select
@@ -13,12 +18,12 @@
13
18
  is-mul="false"
14
19
  ></res-select>
15
20
  </div>
16
- <div class="form-group col-sm-3">
17
- <label class="font_normal_body">工程编号:</label>
18
- <input type="text" style="width:60%" class="input_search" placeholder='工程编号' v-model="model.f_apply_num"
19
- v-on:keyup.enter="$parent.$parent.search()"
20
- condition="u.f_apply_num = '{}'">
21
- </div>
21
+ <!-- <div class="form-group col-sm-3">-->
22
+ <!-- <label class="font_normal_body">工程编号:</label>-->
23
+ <!-- <input type="text" style="width:60%" class="input_search" placeholder='工程编号' v-model="model.f_apply_num"-->
24
+ <!-- v-on:keyup.enter="$parent.$parent.search()"-->
25
+ <!-- condition="u.f_apply_num = '{}'">-->
26
+ <!-- </div>-->
22
27
  <div class="form-group col-sm-3 button-range">
23
28
  <a type="button" class="button_new button_spacing" v-if="$parent.$parent.projectStart"
24
29
  href="/apply/download/excel/散户报装模板.xlsx" download>模板下载</a>
@@ -40,10 +45,16 @@
40
45
  </div>
41
46
  </div>
42
47
  <div class="row" v-show="$parent.$parent.criteriaShow">
48
+ <!-- <div class="form-group col-sm-3">-->
49
+ <!-- <label class="font_normal_body">客户名称:</label>-->
50
+ <!-- <input type="text" style="width:60%" class="input_search" v-model="model.f_user_name"-->
51
+ <!-- v-on:keyup.enter="$parent.$parent.search()" condition="f_user_name like '%{}%'" placeholder='客户名称'>-->
52
+ <!-- </div>-->
43
53
  <div class="form-group col-sm-3">
44
- <label class="font_normal_body">客户名称:</label>
45
- <input type="text" style="width:60%" class="input_search" v-model="model.f_user_name"
46
- v-on:keyup.enter="$parent.$parent.search()" condition="f_user_name like '%{}%'" placeholder='客户名称'>
54
+ <label class="font_normal_body">工程编号:</label>
55
+ <input type="text" style="width:60%" class="input_search" placeholder='工程编号' v-model="model.f_apply_num"
56
+ v-on:keyup.enter="$parent.$parent.search()"
57
+ condition="u.f_apply_num = '{}'">
47
58
  </div>
48
59
  <div class="form-group col-sm-3">
49
60
  <label class="font_normal_body">联系电话:</label>
@@ -160,41 +171,41 @@
160
171
  </tr>
161
172
  </template>
162
173
  <template partial='body'>
163
- <tr >
164
- <td :class="[ row.isover ==='过期' ? 'p1' : row.isbeforeover === '预期提醒'? 'p':'' ]" style="text-align: center;">
174
+ <tr class="back-style">
175
+ <td :class="[ row.isover ==='过期' ? 'p1' : row.isbeforeover === '预期提醒'? 'p':'', row.f_back_reason ? 'back-style':'' ]" style="text-align: center;">
165
176
  <nobr><font>{{$index+1}}</font></nobr>
166
177
  </td>
167
- <td :class="[ row.isover ==='过期' ? 'p1' : row.isbeforeover === '预期提醒'? 'p':'' ]" style="text-align: center;">
178
+ <td :class="[ row.isover ==='过期' ? 'p1' : row.isbeforeover === '预期提醒'? 'p':'' , row.f_back_reason ? 'back-style':'' ]" style="text-align: center;">
168
179
  <nobr><font>{{row.f_apply_num}}</font></nobr>
169
180
  </td>
170
- <td :class="[ row.isover ==='过期' ? 'p1' : row.isbeforeover === '预期提醒'? 'p':'' ]" style="text-align: center;">
181
+ <td :class="[ row.isover ==='过期' ? 'p1' : row.isbeforeover === '预期提醒'? 'p':'' , row.f_back_reason ? 'back-style':'' ]" style="text-align: center;">
171
182
  <nobr><font>{{row.f_user_name}}</font></nobr>
172
183
  </td>
173
- <td :class="[ row.isover ==='过期' ? 'p1' : row.isbeforeover === '预期提醒'? 'p':'' ]" style="text-align: center;">
184
+ <td :class="[ row.isover ==='过期' ? 'p1' : row.isbeforeover === '预期提醒'? 'p':'' , row.f_back_reason ? 'back-style':'' ]" style="text-align: center;">
174
185
  <nobr><font>{{row.f_contract_number}}</font></nobr>
175
186
  </td>
176
- <td :class="[ row.isover ==='过期' ? 'p1' : row.isbeforeover === '预期提醒'? 'p':'' ]" style="text-align: center;">
187
+ <td :class="[ row.isover ==='过期' ? 'p1' : row.isbeforeover === '预期提醒'? 'p':'' , row.f_back_reason ? 'back-style':'' ]" style="text-align: center;">
177
188
  <nobr><font>{{row.f_phone}}</font></nobr>
178
189
  </td>
179
- <td :class="[ row.isover ==='过期' ? 'p1' : row.isbeforeover === '预期提醒'? 'p':'' ]" style="text-align: center;">
190
+ <td :class="[ row.isover ==='过期' ? 'p1' : row.isbeforeover === '预期提醒'? 'p':'' , row.f_back_reason ? 'back-style':'' ]" style="text-align: center;">
180
191
  <nobr><font>{{row.f_address}}</font></nobr>
181
192
  </td>
182
- <td :class="[ row.isover ==='过期' ? 'p1' : row.isbeforeover === '预期提醒'? 'p':'' ]" style="text-align: center;">
193
+ <td :class="[ row.isover ==='过期' ? 'p1' : row.isbeforeover === '预期提醒'? 'p':'' , row.f_back_reason ? 'back-style':'' ]" style="text-align: center;">
183
194
  <nobr><font>{{row.f_apply_source}}</font></nobr>
184
195
  </td>
185
- <td :class="[ row.isover ==='过期' ? 'p1' : row.isbeforeover === '预期提醒'? 'p':'' ]" style="text-align: center;">
196
+ <td :class="[ row.isover ==='过期' ? 'p1' : row.isbeforeover === '预期提醒'? 'p':'' , row.f_back_reason ? 'back-style':'' ]" style="text-align: center;">
186
197
  <nobr><font>{{row.f_apply_type}}</font></nobr>
187
198
  </td>
188
- <td :class="[ row.isover ==='过期' ? 'p1' : row.isbeforeover === '预期提醒'? 'p':'' ]" style="text-align: center;">
199
+ <td :class="[ row.isover ==='过期' ? 'p1' : row.isbeforeover === '预期提醒'? 'p':'' , row.f_back_reason ? 'back-style':'' ]" style="text-align: center;">
189
200
  <nobr><font>{{row.defname}}</font></nobr>
190
201
  </td>
191
- <td :class="[ row.isover ==='过期' ? 'p1' : row.isbeforeover === '预期提醒'? 'p':'' ]" style="text-align: center;">
202
+ <td :class="[ row.isover ==='过期' ? 'p1' : row.isbeforeover === '预期提醒'? 'p':'' , row.f_back_reason ? 'back-style':'' ]" style="text-align: center;">
192
203
  <nobr><font>{{row.f_sub_state}}</font></nobr>
193
204
  </td>
194
- <td :class="[ row.isover ==='过期' ? 'p1' : row.isbeforeover === '预期提醒'? 'p':'' ]" style="text-align: center;">
205
+ <td :class="[ row.isover ==='过期' ? 'p1' : row.isbeforeover === '预期提醒'? 'p':'' , row.f_back_reason ? 'back-style':'' ]" style="text-align: center;">
195
206
  <nobr><font>{{row.f_apply_date}}</font></nobr>
196
207
  </td>
197
- <td :class="[ row.isover ==='过期' ? 'p1' : row.isbeforeover === '预期提醒'? 'p':'' ]" style="text-align: center;">
208
+ <td :class="[ row.isover ==='过期' ? 'p1' : row.isbeforeover === '预期提醒'? 'p':'' , row.f_back_reason ? 'back-style':'' ]" style="text-align: center;">
198
209
  <dropdown>
199
210
  <button type="button" data-toggle="dropdown" style="border: 0px;background: none;">
200
211
  <span class="glyphicon glyphicon-th-list" style="position: inherit;"></span>
@@ -449,7 +460,9 @@ import {HttpResetClass, PagedList} from 'vue-client'
449
460
  }
450
461
  </script>
451
462
  <style scoped>
452
-
463
+ .back-style{
464
+ background-color: #ffa726;
465
+ }
453
466
  .p1 {
454
467
  color: #dc0b12;
455
468
  font-weight:bold
@@ -1208,12 +1208,74 @@ export default {
1208
1208
  this.show_data.start_activity = this.$workflow_vue.start_activity
1209
1209
  this.show_data.xmlfilename = this.$workflow_vue.workflow_xmlfilename
1210
1210
 
1211
+ if (this.show_data.f_apply_type === '报警器报建' && this.show_data.defname === '工程施工' && this.show_data.f_sub_state !='完工'){
1212
+ //判断是否添加报警器材料
1213
+ let bjqlag = false
1214
+ let datatemp = {
1215
+ 'bjqid':"",
1216
+ 'fprocessid':"",
1217
+ 'sqvalue':"",
1218
+ 'f_bjq_sid':"",
1219
+ 'f_material_code':""
1220
+ }
1221
+ let numOne = [];
1222
+ this.show_data.onetomany.forEach(item=>{
1223
+ item.rows.forEach(i=>{
1224
+ if (i.f_material_name.substr(0,3) === '报警器'){
1225
+ bjqlag = true
1226
+ datatemp.bjqid = i.id
1227
+ datatemp.fprocessid = i.f_process_id
1228
+ datatemp.f_bjq_sid = i.f_bjq_sid
1229
+ datatemp.f_material_code = i.f_material_code
1230
+ numOne.push(i.f_bjq_sid)
1231
+ }
1232
+ })
1233
+ })
1234
+ if (!bjqlag){
1235
+ this.$showMessage('请添加报警器物料信息!!!')
1236
+ return
1237
+ }
1238
+ if (numOne.length > 1){
1239
+ this.$showMessage("暂时支持单个报警器物料安装!!!")
1240
+ return
1241
+ }
1242
+ datatemp.sqvalue = this.show_data.areaData.sqvalue
1243
+ //区域地址存入材料记录表
1244
+ let areares = await this.$resetpost(
1245
+ `rs/logic/saveArea`,
1246
+ {data: datatemp},
1247
+ {resolveMsg: null, rejectMsg: '区域地址保存失败'}
1248
+ )
1249
+
1250
+ //完工之后推送数据到汉威
1251
+ let adddata = {
1252
+ f_bjq_sid : datatemp.f_bjq_sid,
1253
+ f_material_code : datatemp.f_material_code,
1254
+ f_bjq_address: this.show_data.areaData.sqvalue,
1255
+ f_user_name: this.show_data.f_user_name,
1256
+ f_address: this.show_data.f_address,
1257
+ f_user_phone: this.show_data.f_phone,
1258
+ f_userinfo_code: this.show_data.f_userinfo_code,
1259
+ installtime: this.show_data.f_construction_date,
1260
+ }
1261
+ let res = await this.$resetpost(
1262
+ `ncc/rs/logic/bjqadduser`,
1263
+ // `rs/logic/bjqadduser`,
1264
+ adddata
1265
+ )
1266
+ if (res.data.code != 200){
1267
+ this.$showMessage(res.data.msg)
1268
+ return
1269
+ }
1270
+ }
1271
+
1211
1272
  let res = await this.$resetpost(
1212
1273
  `rs/logic/ApplyProductService`,
1213
1274
  {data: this.show_data},
1214
1275
  {resolveMsg: null, rejectMsg: '数据保存失败'}
1215
1276
  )
1216
1277
 
1278
+
1217
1279
  if (this.show_data.button.after) {
1218
1280
  this[this.show_data.button.after]()
1219
1281
  }
@@ -188,6 +188,18 @@
188
188
  </div>
189
189
  </div>
190
190
  </div>
191
+ <!--区域地址联动-->
192
+ <div>
193
+ <res-area-select-group
194
+ v-if="data.f_apply_type === '报警器报建' && data.defname === '工程施工' && data.title === '工程施工' && data.f_sub_state !='完工'"
195
+ labelstyle = "control-label"
196
+ @shiji-select = "getSelectShijiValue"
197
+ @xian-select = "getSelectXianValue"
198
+ @shequ-select = "getSelectShequValue"
199
+ >
200
+ </res-area-select-group>
201
+ </div>
202
+
191
203
  </div>
192
204
 
193
205
  <!-- onetomany -->
@@ -200,7 +212,48 @@
200
212
  </div>
201
213
 
202
214
  <!--自定义组件-->
203
- <slot></slot>
215
+ <slot>
216
+ <!--<div :style="item.style ? item.style+';height: 40px;margin-bottom: 20px':'height: 40px;margin-bottom: 20px'"-->
217
+ <!-- v-if="data.f_apply_type === '报警器报建' && data.defname === '工程施工'"-->
218
+ <!-- :class="[$v.f_idnumber2.identityCardValid ? 'has-error' : '',item.bootstraped ? item.bootstraped + ' form-group':'col-sm-4 form-group']">-->
219
+
220
+ <!--<div class="col-sm-6 form-group "-->
221
+ <!-- :class="[$v.f_pcd_id.required ? 'has-error' : 'has-success']">-->
222
+ <!-- <label class="font_normal_body">省&ensp;市&ensp;区</label>-->
223
+ <!-- <input type="text" style="width:41%" v-show="false" v-model="model.f_pcd_id"-->
224
+ <!-- v-validate:f_pcd_id='{required: true }'-->
225
+ <!-- >-->
226
+
227
+ <!-- <v-select :value.sync="model.f_pcd_id" :value-single="true"-->
228
+ <!-- :options='pcdslist' placeholder='请选择2'-->
229
+ <!-- close-on-select search="true" @change="pcdChange">-->
230
+ <!-- </v-select>-->
231
+ <!--</div>-->
232
+ <!--<div class="col-sm-6 form-group "-->
233
+ <!-- :class="[$v.f_street_id.required ? 'has-error' : 'has-success']">-->
234
+ <!-- <label class="font_normal_body">街道/乡镇</label>-->
235
+ <!-- <input type="text" style="width:41%" v-show="false" v-model="model.f_street_id"-->
236
+ <!-- >-->
237
+ <!-- <v-select :value.sync="model.f_street_id" :value-single="true"-->
238
+ <!-- :options='streetslist' placeholder='请选择'-->
239
+ <!-- @change="streetChange"-->
240
+ <!-- close-on-select search="true">-->
241
+ <!-- </v-select>-->
242
+
243
+ <!--</div>-->
244
+ <!--<div class="col-sm-6 form-group "-->
245
+ <!-- :class="[$v.f_residential_area_id.required ? 'has-error' : 'has-success']">-->
246
+ <!-- <label class="font_normal_body">集收单位</label>-->
247
+ <!-- <input type="text" style="width:41%" v-show="false" v-model="model.f_residential_area_id"-->
248
+ <!-- v-validate:f_residential_area_id='{required: true }'>-->
249
+ <!-- <v-select :value.sync="model.f_residential_area_id" :value-single="true"-->
250
+ <!-- :options='areaslist' placeholder='请选择'-->
251
+ <!-- @change="" @select-search="selectSearch"-->
252
+ <!-- close-on-select search="true">-->
253
+ <!-- </v-select>-->
254
+ <!--</div>-->
255
+ <!--</div>-->
256
+ </slot>
204
257
  <!--公司等属性-->
205
258
  <div class="col-sm-12 form-group text-center" style="padding-top:8px">
206
259
  <div class="col-sm-3 form-group center-block">
@@ -360,6 +413,7 @@
360
413
  <script>
361
414
  import Vue from 'vue'
362
415
  import {isEmpty} from '../Util'
416
+ import {HttpResetClass} from 'vue-client'
363
417
  // Date格式化
364
418
  Date.prototype.Format = function (fmt) {
365
419
  var o = {
@@ -390,7 +444,18 @@ export default {
390
444
  model: {}, // 公司等属性
391
445
  disable_button: true, // 控制按钮禁用
392
446
  disable_modal_button: true, // 控制按钮禁用
393
- showButModal: false
447
+ //初始化省市区数据
448
+ pcdslist: [],
449
+ //初始化街道数据
450
+ streetslist: [],
451
+ //初始化街道数据
452
+ areaslist: [],
453
+ showButModal: false,
454
+ areaData:{
455
+ sjvalue:'',
456
+ xianvalue:'',
457
+ sqvalue:'',
458
+ }
394
459
  }
395
460
  },
396
461
  watch: {
@@ -416,7 +481,6 @@ export default {
416
481
 
417
482
  // 是否禁用按钮
418
483
  this.disableButton()
419
-
420
484
  // 公司等属性初始化
421
485
  if (this.data.orgs) {
422
486
  this.model.orgs = this.data.orgs
@@ -438,11 +502,182 @@ export default {
438
502
  } else {
439
503
  this.model.operator = this.$login.f.name
440
504
  }
505
+
506
+ this.initpcds(` j_orgid = '${this.$login.f.orgid}'`)
507
+ },
508
+ async getSelectShijiValue(sjvalue,sjlable) {
509
+ this.areaData.sjvalue = sjvalue
510
+ console.log("这是父级接收的市级值:",sjvalue,sjlable)
511
+ this.data.areaData = this.areaData
512
+
513
+ // 是否禁用按钮
514
+ this.disableButton()
515
+ },
516
+ async getSelectXianValue(xianvalue,xianlable) {
517
+ this.areaData.xianvalue = xianvalue
518
+ this.data.areaData = this.areaData
519
+ console.log("这是父级接收的县级值:",xianvalue,xianlable)
520
+
521
+ // 是否禁用按钮
522
+ this.disableButton()
523
+ },
524
+ async getSelectShequValue(sqvalue,sqlable) {
525
+ this.areaData.sqvalue = sqvalue
526
+ this.data.areaData = this.areaData
527
+ console.log("这是父级接收的社区值:",sqvalue,sqlable)
528
+
529
+ // 是否禁用按钮
530
+ this.disableButton()
531
+ },
532
+ //初始化省市区,添加街道
533
+ async initpcds(pconditon) {
534
+ // console.log('initpcds', pconditon)
535
+ // this.pcdslist = []
536
+ // let HttpReset = new HttpResetClass()
537
+ // let req = await HttpReset.load('POST', 'rs/sql/address_singleTableOrderBy?pageNo=1&pageSize=9999999', {
538
+ // data: {
539
+ // items: '*',
540
+ // tablename: 'j_bjqpcd',
541
+ // orderitem: 'id',
542
+ // condition: pconditon
543
+ // }
544
+ // }, {resolveMsg: null, rejectMsg: '获取地址失败!'})
545
+ // let redata = []
546
+ // req.data.forEach((row, n) => {
547
+ // redata[n] = {
548
+ // label: row.j_areaname,
549
+ // value: row.j_areaid,
550
+ // data: row,
551
+ // id: row.id
552
+ // }
553
+ // })
554
+ // console.log('市区', redata)
555
+ // this.pcdslist = redata
556
+ },
557
+ //初始化街道 添加小区
558
+ async initstreets(pconditon) {
559
+ // console.log('市区32', pconditon)
560
+ // this.streetslist = []
561
+ // let HttpReset = new HttpResetClass()
562
+ // let req = await HttpReset.load('POST', 'rs/sql/address_singleTableOrderBy', {
563
+ // data: {
564
+ // items: '*',
565
+ // tablename: 'j_bjqstreet',
566
+ // orderitem: 'id',
567
+ // condition: pconditon
568
+ // }
569
+ // }, {resolveMsg: null, rejectMsg: '获取地址失败!'})
570
+ // let redata = []
571
+ // req.data.forEach((row, n) => {
572
+ // redata[n] = {
573
+ // label: row.j_areaname,
574
+ // value: row.j_areaid,
575
+ // data: row,
576
+ // id: row.id
577
+ // }
578
+ // })
579
+ // console.log('市区333', redata)
580
+ // this.streetslist = redata
581
+ // this.model.f_iscity = this.findbyid(this.streetslist, this.model.f_street_id).f_iscity
582
+ },
583
+ //初始化小区添加小区
584
+ async initareas(pconditon) {
585
+ // if(this.usertype){
586
+ // pconditon=pconditon+` and f_special='1' `
587
+ // }
588
+ // this.areaslist = []
589
+ // let HttpReset = new HttpResetClass()
590
+ // let req = await HttpReset.load('POST', 'rs/sql/address_singleTableOrderBy?pageNo=1&pageSize=100', {
591
+ // data: {
592
+ // items: '*',
593
+ // tablename: 'j_bjqarea',
594
+ // orderitem: 'id',
595
+ // condition: pconditon
596
+ // }
597
+ // }, {resolveMsg: null, rejectMsg: '获取地址失败!'})
598
+ // let redata = []
599
+ // req.data.forEach((row) => {
600
+ // redata.push({
601
+ // label: row.j_areaname,
602
+ // value: row.j_areaid,
603
+ // data: row,
604
+ // id: row.id
605
+ // })
606
+ // })
607
+ // console.log('市区666', redata)
608
+ // if (redata.length>0){
609
+ // this.areaslist = redata
610
+ // }
611
+ },
612
+ //省/市/区变化
613
+ async pcdChange(val) {
614
+
615
+ // console.log("省/市/区变化", val)
616
+ // console.log("省/市/区变化", ` f_pcd_id ='${val}' `)
617
+ // if (val) {
618
+ // //那就把[小区,街道]重新组织一下
619
+ // await this.initstreets(` j_parentid ='${val}' `)
620
+ // if (this.model.f_street_id) {
621
+ // if (this.findbyid(this.streetslist, this.model.f_street_id)) {
622
+ // let pcd_id = this.findbyid(this.streetslist, this.model.f_street_id).f_pcd_id
623
+ // if (pcd_id != val) {
624
+ // this.model.f_street_id = ''
625
+ // }
626
+ // } else {
627
+ // this.model.f_street_id = ''
628
+ // }
629
+ //
630
+ // //那就把[小区,街道]重新组织一下
631
+ // if (this.model.f_street_id) {
632
+ // await this.initareas(` j_parentid ='${this.model.f_street_id}' `)
633
+ // if (this.model.f_residential_area_id) {
634
+ // if (this.findbyid(this.areaslist, this.model.f_residential_area_id)) {
635
+ // let pcd_id = this.findbyid(this.areaslist, this.model.f_residential_area_id).f_pcd_id
636
+ // if (pcd_id != val) {
637
+ // this.model.f_residential_area_id = ''
638
+ // }
639
+ // } else {
640
+ // this.model.f_residential_area_id = ''
641
+ // }
642
+ //
643
+ // }
644
+ // }
645
+ // }
646
+ // }
647
+ // this.$resetValidation()
648
+ },
649
+ //街道变化
650
+ async streetChange(val) {
651
+ // console.log("街道变化", val)
652
+ // if (this.streetslist[0]) {
653
+ // var street = ''
654
+ // this.streetslist.forEach((item) => {
655
+ // if (item.id === val) {
656
+ // street = item.label
657
+ // }
658
+ // })
659
+ // this.model.f_address = street
660
+ // }
661
+ // if (val) {
662
+ // //那就把[小区]重新组织一下
663
+ // await this.initareas(` j_parentid ='${val}' `)
664
+ // if (this.model.f_residential_area_id) {
665
+ // if (this.findbyid(this.areaslist, this.model.f_residential_area_id)) {
666
+ // let street_id = this.findbyid(this.areaslist, this.model.f_residential_area_id).f_street_id
667
+ // if (street_id != val) {
668
+ // this.model.f_residential_area_id = ''
669
+ // }
670
+ // } else {
671
+ // this.model.f_residential_area_id = ''
672
+ // }
673
+ //
674
+ // }
675
+ // }
676
+ // this.$resetValidation()
441
677
  },
442
678
  // 是否禁用按钮
443
679
  disableButton () {
444
680
  let flag = false
445
-
446
681
  for (const field of this.data.fields) {
447
682
  if (field.required && !field.value && !field.hidden && field.value !== 0) {
448
683
  flag = true
@@ -458,6 +693,16 @@ export default {
458
693
  }
459
694
  }
460
695
 
696
+ //区域下拉框必选 流程模式为报警器报建
697
+ if (this.data.f_apply_type === '报警器报建' && this.data.defname === '工程施工' && this.data.title === '工程施工' && this.data.f_sub_state !='完工'){
698
+ if (!flag){
699
+ if (this.areaData.sjvalue ==null || this.areaData.sjvalue.length ==0 || this.areaData.sqvalue == null || this.areaData.sqvalue.length ==0
700
+ || this.areaData.xianvalue == null || this.areaData.xianvalue == 0){
701
+ console.log("区域为空禁止提交:",this.areaData)
702
+ flag = true
703
+ }
704
+ }
705
+ }
461
706
  this.disable_button = flag
462
707
  },
463
708
  // 失去焦点且值最终发生变化触发
@@ -514,6 +759,9 @@ export default {
514
759
  },
515
760
  // 点击按钮组按钮
516
761
  async click_but (button) {
762
+ //报警器区域地址
763
+ this.data.areaData = this.areaData
764
+
517
765
  this.disable_button = true
518
766
 
519
767
  this.data.fields.forEach(item => {
@@ -532,6 +780,7 @@ export default {
532
780
  } else {
533
781
  this.$dispatch('button')
534
782
  }
783
+
535
784
  },
536
785
  confirmModal () {
537
786
  this.closeModal()