address-client 3.0.26-aode → 3.0.26-qtx

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.
@@ -298,22 +298,18 @@
298
298
 
299
299
  async initSlice (val) {
300
300
  if (val) {
301
- this.sliceArea = [];
302
- let getAllArea = await this.$resetpost('/rs/sql/address_singleTableOrderBy', {
303
- data:{
304
- items: '*',
305
- tablename: 't_zone',
306
- orderitem: 'id',
307
- condition: ` parentid = ${val}`
308
- }
301
+ let getAllArea = await this.$resetpost('/rs/search', {
302
+ source: 'this.getParentByType($organization$).getAllChildrens().where(row.getType() == $zone$)',
303
+ userid: this.$login.f.id
309
304
  }, {resolveMsg: null, rejectMsg: '获取片区出错!!!'})
310
305
 
311
- if(getAllArea.data){
312
- getAllArea.data.forEach((res) => {
313
- this.sliceArea.push({label: res.name, value: {name: res.name, code:res.number}})
314
- })
315
- }
316
-
306
+ let arr = getAllArea.data.filter((res) => {
307
+ return res.parentid == val
308
+ })
309
+ this.sliceArea = []
310
+ arr.forEach((res) => {
311
+ this.sliceArea.push({label: res.name, value: {name: res.name, code:res.number}})
312
+ })
317
313
  }
318
314
  },
319
315
 
@@ -2,7 +2,7 @@
2
2
  <div class="flex" @keyup.enter="search">
3
3
  <criteria-paged :model="model" v-ref:paged>
4
4
  <criteria partial='criteria' @condition-changed='$parent.selfSearch' v-ref:cri>
5
- <div novalidate class="form-horizontal select-overspread container-fluid auto" partial>
5
+ <div novalidate class="form-horizontal select-overspread container-fluid auto" partial>
6
6
 
7
7
  <div class="row">
8
8
 
@@ -10,9 +10,9 @@
10
10
  <label class="font_normal_body">组织机构</label>
11
11
  <res-select
12
12
  restype='organization'
13
- @res-select="$parent.$parent.getorg"
14
- is-mul="false"
15
- :initresid='$parent.$parent.curorgid'
13
+ @res-select="$parent.$parent.getorg"
14
+ is-mul="false"
15
+ :initresid='$parent.$parent.curorgid'
16
16
  >
17
17
  </res-select>
18
18
  </div>
@@ -59,19 +59,19 @@
59
59
  <div :class="$parent.$parent.style" v-if="!$parent.$parent.$parent.showrightchange">
60
60
  <label class="font_normal_body">楼&emsp;&emsp;号</label>
61
61
  <input type="text" class="input_search" style="width:60%" v-model="model.f_building" style="width:60%"
62
- condition="a.f_building like '{}'" placeholder="楼号"
62
+ condition="a.f_building like '%{}%'" placeholder="楼号"
63
63
  :size="model.f_building ? model.f_building.length*2 : 6"/>
64
64
  </div>
65
65
  <div :class="$parent.$parent.style" >
66
66
  <label class="font_normal_body">单&emsp;&emsp;元</label>
67
67
  <input type="text" class="input_search" style="width:60%" v-model="model.f_unit" style="width:60%"
68
- condition="a.f_unit like '{}'" placeholder="单元"
68
+ condition="a.f_unit like '%{}%'" placeholder="单元"
69
69
  :size="model.f_unit ? model.f_unit.length*2 : 6"/>
70
70
  </div>
71
71
  <div :class="$parent.$parent.style">
72
72
  <label class="font_normal_body">楼&emsp;&emsp;层</label>
73
73
  <input type="text" class="input_search" style="width:60%" v-model="model.f_floor" style="width:60%"
74
- condition="a.f_floor like '{}'" placeholder="楼层"
74
+ condition="a.f_floor like '%{}%'" placeholder="楼层"
75
75
  :size="model.f_floor ? model.f_floor.length*2 : 6"/>
76
76
  </div>
77
77
  <div :class="$parent.$parent.style">
@@ -80,6 +80,13 @@
80
80
  condition="a.f_room like '%{}%'" placeholder="门牌号"
81
81
  :size="model.f_room ? model.f_room.length*2 : 6"/>
82
82
  </div>
83
+ <div :class="$parent.$parent.style">
84
+ <label class="font_normal_body">小&emsp;&emsp;区</label>
85
+ <input type="text" class="input_search" style="width:60%" v-model="model.f_residential_arearea" style="width:60%"
86
+ condition="ta.f_residential_area like '%{}%'" placeholder="小区"
87
+ :size="model.f_residential_arearea ? model.f_residential_arearea.length*2 : 8"/>
88
+ </div>
89
+
83
90
  <div :class="$parent.$parent.style">
84
91
  <label class="font_normal_body">地址&emsp;ID</label>
85
92
  <input type="text" class="input_search" style="width:60%" v-model="model.id" style="width:60%"
@@ -92,15 +99,6 @@
92
99
  condition="a.f_address like '%{}%'" placeholder="详细地址"
93
100
  :size="model.f_address ? model.f_address.length*2 : 8"/>
94
101
  </div>
95
- <div :class="$parent.$parent.style" >
96
- <label class="font_normal_body">特殊地址</label>
97
- <v-select :value.sync="model.f_special"
98
- v-model="model.f_special"
99
- :options='$parent.$parent.specialoptions' placeholder='请选择'
100
- condition=" {} "
101
- close-on-select></v-select>
102
- </div>
103
-
104
102
  </div>
105
103
  </div>
106
104
  </criteria>
@@ -137,8 +135,8 @@
137
135
  <td style="text-align:center"><nobr>{{row.f_address}}</nobr></td>
138
136
  <td style="text-align:center"><nobr>{{row.f_create_date}}</nobr></td>
139
137
  <td style="text-align:center">
140
- <!-- <button type="button" name="button" class="btn btn-link"
141
- @click.stop="$parent.$parent.$parent.modify(row)">修改</button>-->
138
+ <!-- <button type="button" name="button" class="btn btn-link"
139
+ @click.stop="$parent.$parent.$parent.modify(row)">修改</button>-->
142
140
  <button type="button" name="button" class="btn btn-link"
143
141
  @click.stop="$parent.$parent.$parent.delete(row)">删除</button>
144
142
  </td>
@@ -160,8 +158,6 @@
160
158
  </article>
161
159
  <footer slot="modal-footer" class="modal-footer"></footer>
162
160
  </modal>
163
- <work-busy :is-busy="iswork" v-show="iswork"></work-busy>
164
-
165
161
  </template>
166
162
 
167
163
  <script>
@@ -170,7 +166,6 @@
170
166
  export default {
171
167
  data () {
172
168
  return {
173
- iswork: false,
174
169
  criteriaShow: false,
175
170
  model: new PagedList('rs/sql/address_getAddress',20,{tablename: `'t_user_address'`,items: `'*'`,orderitem: `'id desc'`}),
176
171
  addflag: false,
@@ -182,8 +177,7 @@
182
177
 
183
178
  //文件上传弹框
184
179
  showFile: false,
185
- showrightchange:true,
186
- specialoptions:[{label:"全部",value:""},{label:"是",value:"a.f_special ='1'"},{label:"否",value:"a.f_special is null"}]
180
+ showrightchange:true
187
181
  }
188
182
  },
189
183
  title: '地址列表',
@@ -228,80 +222,67 @@
228
222
  this.$dispatch('modify',val)
229
223
  },
230
224
  async delete(row){
231
-
232
- if(row.id){
233
- var id = row.id
234
- let userfiles = await this.$resetpost('rs/sql/address_singleTable', {data: {items: 'f_useraddress_id',tablename: 't_userfiles',condition: `f_useraddress_id='${id}' and f_table_state in ('正常','待开通')`}},{resolveMsg: null, rejectMsg: null})
235
- let isdelete = await this.$resetpost('rs/sql/isDeleteAddress', {data: {f_addressid: id}},{resolveMsg: null, rejectMsg: null})
236
- if(userfiles.data.length){
237
- this.$showAlert('该地址下已有正常/待开通表具档案,无法删除!','warning',1000)
238
- return
239
- }
240
- if(isdelete.data.length){
241
- this.$showAlert('该地址下已有正在工作的置换单,无法删除!','warning',1000)
242
- return
225
+ if(row.id){
226
+ var id = row.id
227
+ let userfiles = await this.$resetpost('rs/sql/address_singleTable', {data: {items: 'f_useraddress_id',tablename: 't_userfiles',condition: `f_useraddress_id='${id}' and f_table_state = '正常'`}},{resolveMsg: null, rejectMsg: null})
228
+ if(userfiles.data.length){
229
+ this.$showAlert('该地址下已有正常表具档案,无法删除!','warning',1000)
230
+ }else{
231
+ this.$resetdelete('rs/entity/t_user_address', {id: id}, {resolveMsg: '删除成功', rejectMsg: '删除失败'}).then((res) => {
232
+ this.$dispatch('cancel')
233
+ })
234
+ }
243
235
  }
244
- this.$resetdelete('rs/entity/t_user_address', {id: id}, {resolveMsg: '删除成功', rejectMsg: '删除失败'}).then((res) => {
245
- this.$dispatch('cancel')
246
- })
247
- }
248
- },
236
+ },
249
237
 
250
- search () {
251
- this.$refs.paged.$refs.cri.search()
252
- },
238
+ search () {
239
+ this.$refs.paged.$refs.cri.search()
240
+ },
253
241
 
254
- selfSearch (args) {
255
- debugger
256
- //去除空格
257
- for(let key in args.model){
258
- if(args.model[key] instanceof String){
259
- args.model[key] = args.model[key].trim();
260
- }
261
- }
262
- if (!this.f_orgid) {
263
- this.getorg([this.$login.f.orgid])
264
- }
265
- console.log("xxx"+this.f_filialeids)
266
- args.condition = `${args.condition} and a.f_filialeid = '${this.f_filialeids}'`
267
- this.model.search(args.condition, args.model)
268
- },
242
+ selfSearch (args) {
269
243
 
270
- //清空
271
- clear(){
272
- this.$refs.paged.$refs.cri.model = {}
273
- },
274
- getorg (val) {
275
- this.f_orgid = this.$login.convertToIn(val)
276
- if (!this.f_orgid) {
277
- this.f_orgid = this.f_filialeids
278
- }
279
- this.f_filialeids = val[0]
280
- }
281
- },
282
- events: {
283
- onFileUpload: async function (file, res) {
284
- this.$showAlert('文件上传成功','success',1000);
285
- this.iswork = true
286
- console.log("上传完毕"+JSON.stringify(res))
287
- let data = {
288
- filepath: res.f_downloadpath,
289
- user:this.$login.f
244
+ if (!this.f_orgid) {
245
+ this.getorg([this.$login.f.orgid])
246
+ }
247
+
248
+ args.condition = `${args.condition} and a.f_filialeid = '${this.f_filialeids}'`
249
+ this.model.search(args.condition, args.model)
250
+ },
251
+
252
+ //清空
253
+ clear(){
254
+ this.$refs.paged.$refs.cri.model = {}
255
+ },
256
+ getorg (val) {
257
+ this.f_orgid = this.$login.convertToIn(val)
258
+ this.f_filialeids = val[0]
290
259
  }
291
- this.closeFile();
292
- try{
260
+ },
261
+ events: {
262
+ onFileUpload: async function (file, res) {
263
+ console.log("上传完毕"+JSON.stringify(res))
264
+ let data = {
265
+ filepath: res.f_downloadpath,
266
+ user:this.$login.f
267
+ }
268
+ console.log("filepath="+JSON.stringify(data))
293
269
  await this.$resetpost(`rs/logic/address_useraddressimport`,data, {resolveMsg: null, rejectMsg: '导入失败', silent: true}, 0).then((res)=>{
294
- this.$showAlert("导入成功",'success', 2000);
295
- this.iswork = false
270
+ if(res.data.type=="success"){
271
+ this.$showAlert("导入信息:"+res.data.msg, res.data.type, 2000);
272
+ }else{
273
+ this.$showMessage(res.data.msg);
274
+ }
275
+
276
+ //关闭上传框
277
+ this.closeFile()
278
+ //重新查询
296
279
  this.init()
297
280
  })
298
- }catch(e){
281
+ },
282
+ 'onFileError'(error) {
283
+ this.$showAlert(error, 'warning', 2000)
299
284
  }
300
- },
301
- 'onFileError'(error) {
302
- this.$showAlert(error, 'warning', 2000)
303
285
  }
304
- }
305
286
 
306
287
  }
307
288
  </script>
@@ -38,16 +38,6 @@
38
38
  <input type="text" class="input_search" style="width:60%" v-model="model.f_street"
39
39
  condition="f_street like '%{}%'" placeholder="街道"/>
40
40
  </div>
41
- <div :class="$parent.$parent.style" v-if="!$parent.$parent.$parent.areaShow">
42
- <label class="font_normal_body">户数大于</label>
43
- <input type="text" class="input_search" style="width:60%" v-model="model.areacount"
44
- condition="isnull(resi.areacount,0) >= '{}'" placeholder="使用人数大于等于"/>
45
- </div>
46
- <div :class="$parent.$parent.style" v-if="!$parent.$parent.$parent.areaShow">
47
- <label class="font_normal_body">户数小于</label>
48
- <input type="text" class="input_search" style="width:60%" v-model="model.areacount_end"
49
- condition="isnull(resi.areacount,0) <='{}'" placeholder="使用人数小于等于"/>
50
- </div>
51
41
  <div class="col-sm-4 form-group button-range">
52
42
  <button class="button_search button_spacing" @click="search()" >查询</button>
53
43
  <button v-if="!$parent.$parent.f_special" class="button_new button_spacing" style="width: max-content;" @click="$parent.$parent.add('小区')">添加小区</button>
@@ -107,8 +97,6 @@
107
97
  <th v-if="$parent.$parent.$parent.f_special"><nobr>联系电话</nobr></th>
108
98
  <!--非民用单位信息结束-->
109
99
  <th><nobr>片区/管理站 </nobr></th>
110
- <th><nobr>使用人数 </nobr></th>
111
- <th><nobr>关联地址 </nobr></th>
112
100
  <th><nobr>操作人</nobr></th>
113
101
  <th><nobr>操作日期</nobr></th>
114
102
  <th><nobr>操作</nobr></th>
@@ -130,14 +118,12 @@
130
118
  <td v-if="$parent.$parent.$parent.f_special" style="text-align:center"><nobr>{{row.f_linkphone}}</nobr></td>
131
119
  <!--非民用单位信息结束-->
132
120
  <td style="text-align:center"><nobr>{{row.f_slice_area}}</nobr></td>
133
- <td style="text-align:center"><button @click.stop="$parent.$parent.$parent.operate(row.id,row.f_residential_area)" class="btn btn-link">{{row.areacount}}</button></td>
134
- <td style="text-align:center"><nobr>{{row.addresscount}}</nobr></td>
135
121
  <td style="text-align:center"><nobr>{{row.f_operator}}</nobr></td>
136
122
  <td style="text-align:center"><nobr>{{row.f_operate_date}}</nobr></td>
137
123
  <td><nobr>
138
124
  <!--<button type="button" name="button" class="btn btn-link"
139
125
  @click.stop="$parent.$parent.$parent.modify(row)">修改</button>-->
140
- <button type="button" name="button" class="btn btn-link" v-if="row.areacount===0"
126
+ <button type="button" name="button" class="btn btn-link"
141
127
  @click.stop="$parent.$parent.$parent.delete(row)">删除</button>
142
128
  </nobr></td>
143
129
  </tr>
@@ -182,12 +168,6 @@
182
168
  this.search()
183
169
  },
184
170
  methods: {
185
- operate (f_residential_area_id,f_residential_area) {
186
- this.$parent.areaShow = false;
187
- this.$parent.usershow=true
188
- this.$parent.f_residential_area_id=f_residential_area_id
189
- this.$parent.f_residential_area=f_residential_area
190
- },
191
171
  hidden() {
192
172
  this.criteriaShow = !this.criteriaShow
193
173
  },
@@ -227,8 +207,7 @@
227
207
  this.$dispatch('modify',val)
228
208
  },
229
209
  selfSearch (args) {
230
- this.$parent.usershow = false;
231
- this.$parent.areaShow = false;
210
+
232
211
  if (!this.f_orgid) {
233
212
  this.getorg([this.$login.f.orgid])
234
213
  }
@@ -1,13 +1,8 @@
1
1
  <template>
2
2
  <div id="unit" class="flex-row" :class="{'binary':areaShow}">
3
- <div :class="{'basic-main':!areaShow && !usershow,'binary-left':areaShow|| usershow}">
3
+ <div :class="{'basic-main':!areaShow,'binary-left':areaShow}">
4
4
  <area-list @select-changed="selected" v-ref:arealist :style="style" :f_filialeids.sync="f_filialeids"></area-list>
5
5
  </div>
6
- <div class="binary-right" v-if="usershow" style="width: 60%">
7
- <div class="flex">
8
- <area-user :f_residential_area_id="f_residential_area_id" :f_filialeid="f_filialeids" :f_residential_area="f_residential_area"></area-user>
9
- </div>
10
- </div>
11
6
  <div v-show="areaShow" style="width: 60%" class="binary-right">
12
7
  <div class="flex">
13
8
  <add-area-msg v-ref:addareamsg :areatype="areatype" :operation="operation"
@@ -26,14 +21,10 @@
26
21
  return {
27
22
  //分公司id串
28
23
  width:'100%',
29
- f_filialeids: this.$login.f.orgid,
24
+ f_filialeids: this.$login.f.f_orgids,
30
25
  areaShow:false,
31
26
  areatype:'小区',
32
- f_filialeid:this.$login.f.orgid,
33
27
  arearow:{},
34
- usershow:false,
35
- f_residential_area_id:'',
36
- f_residential_area:'',
37
28
  style:'col-sm-2 form-group'
38
29
  }
39
30
  },
@@ -46,7 +37,6 @@
46
37
  methods:{
47
38
  selected(obj){
48
39
  this.style='col-sm-3 form-group'
49
- this.usershow =false
50
40
  if(obj.val&&obj.val.id){
51
41
  console.log('对比分公司', obj.val.f_filialeid, this.f_filialeids)
52
42
  if (obj.val.f_filialeid != this.f_filialeids) {
@@ -68,7 +58,6 @@
68
58
  }
69
59
  },
70
60
  refresh() {
71
- this.usershow =false
72
61
  this.areaShow = false
73
62
  this.$refs.arealist.$refs.paged.$refs.cri.search()
74
63
  }
@@ -77,7 +66,6 @@
77
66
  'add'(){
78
67
  this.style='col-sm-3 form-group'
79
68
  this.areaShow=true
80
- this.usershow =false
81
69
  this.$refs.addareamsg.cleardara()
82
70
  this.$refs.addareamsg.operation='add'
83
71
  this.$refs.addareamsg.areatype='小区'
@@ -86,14 +74,12 @@
86
74
  'confirm' () {
87
75
  this.style='col-sm-2 form-group'
88
76
  this.areaShow = false
89
- this.usershow =false
90
77
  this.$refs.arealist.$refs.paged.$refs.cri.search()
91
78
  },
92
79
  'cancel' () {
93
80
  this.style='col-sm-2 form-group'
94
81
  this.$refs.arealist.$refs.paged.$refs.cri.search()
95
82
  this.areaShow = false
96
- this.usershow =false
97
83
  }
98
84
  }
99
85
  }