address-client 3.0.23-19-aode → 3.0.23-2-fx

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.
@@ -1,8 +1,8 @@
1
1
  <template>
2
- <div class="flex" @keyup.enter="search">
2
+ <div class="flex">
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,112 +10,82 @@
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>
19
- <div :class="$parent.$parent.style" v-if="$parent.$parent.showrightchange">
19
+ <div :class="$parent.$parent.style">
20
20
  <label class="font_normal_body">用户编号</label>
21
21
  <input type="text" class="input_search" style="width:60%" v-model="model.f_userinfo_code" style="width:60%"
22
22
  condition="f_userinfo_code = '{}'" placeholder="用户编号"/>
23
23
  </div>
24
- <div v-if="$parent.$parent.showrightchange" :class="$parent.$parent.style">
25
- <label class="font_normal_body">小&emsp;&emsp;区</label>
26
- <input type="text" class="input_search" style="width:60%" v-model="model.f_residential_arearea" style="width:60%"
27
- condition="a.f_residential_area like '%{}%'" placeholder="小区"
28
- :size="model.f_residential_arearea ? model.f_residential_arearea.length*2 : 8"/>
29
- </div>
30
- <!--<div v-if="$parent.$parent.showrightchange" :class="$parent.$parent.style" v-if="!$parent.$parent.$parent.useraddressShow">-->
31
-
32
- <div :class="$parent.$parent.style" v-if="$parent.$parent.$parent.showrightchange">
33
- <label class="font_normal_body">楼&emsp;&emsp;号</label>
34
- <input type="text" class="input_search" style="width:60%" v-model="model.f_building" style="width:60%"
35
- condition="a.f_building like '%{}%'" placeholder="楼号"
36
- :size="model.f_building ? model.f_building.length*2 : 6"/>
37
- </div>
38
- <div class="col-sm-4 form-group button-range" >
39
- <button class="button_search button_spacing" @click="search()" >查询</button>
40
- <button class="button_new button_spacing" style="width: max-content" @click="$parent.$parent.add('民用')">添加民用</button>
41
- <button class="button_new button_spacing" style="width: max-content" @click="$parent.$parent.add('非民用')">添加特殊地址</button>
42
- <button class="button_clear button_spacing" @click="$parent.$parent.clear()">清空</button>
43
- <button class="button_export button_spacing" @click="$parent.$parent.importAddress">导入地址</button>
44
- <div style="float: right" class="button_spacing" :class="{'button_shrink_top':$parent.$parent.criteriaShow,'button_shrink_bottom':!$parent.$parent.criteriaShow}" @click="$parent.$parent.hidden()"></div>
45
- </div>
46
- </div>
47
- <div class="row" v-show="$parent.$parent.criteriaShow">
48
- <div :class="$parent.$parent.style" v-if="!$parent.$parent.showrightchange">
49
- <label class="font_normal_body">用户编号</label>
50
- <input type="text" class="input_search" style="width:60%" v-model="model.f_userinfo_code" style="width:60%"
51
- condition="f_userinfo_code = '{}'" placeholder="用户编号"/>
24
+ <div :class="$parent.$parent.style">
25
+ <label class="font_normal_body">&nbsp;&nbsp;&nbsp;姓名&nbsp;&nbsp;&nbsp;</label>
26
+ <input type="text" class="input_search" style="width:60%" v-model="model.f_user_name" style="width:60%"
27
+ condition="f_user_name like '%{}%'" placeholder="姓名"/>
52
28
  </div>
53
- <div v-if="!$parent.$parent.showrightchange" :class="$parent.$parent.style">
54
- <label class="font_normal_body">小&emsp;&emsp;区</label>
29
+ <div :class="$parent.$parent.style">
30
+ <label class="font_normal_body">&nbsp;&nbsp;&nbsp;小区&nbsp;&nbsp;&nbsp;</label>
55
31
  <input type="text" class="input_search" style="width:60%" v-model="model.f_residential_arearea" style="width:60%"
56
- condition="a.f_residential_area like '%{}%'" placeholder="小区"
32
+ condition="f_residential_area like '%{}%'" placeholder="小区"
57
33
  :size="model.f_residential_arearea ? model.f_residential_arearea.length*2 : 8"/>
58
34
  </div>
59
- <div :class="$parent.$parent.style" v-if="!$parent.$parent.$parent.showrightchange">
60
- <label class="font_normal_body">楼&emsp;&emsp;号</label>
35
+ <div :class="$parent.$parent.style">
36
+ <label class="font_normal_body">&nbsp;&nbsp;&nbsp;楼号&nbsp;&nbsp;&nbsp;</label>
61
37
  <input type="text" class="input_search" style="width:60%" v-model="model.f_building" style="width:60%"
62
- condition="a.f_building like '%{}%'" placeholder="楼号"
38
+ condition="f_building like '%{}%'" placeholder="楼号"
63
39
  :size="model.f_building ? model.f_building.length*2 : 6"/>
64
40
  </div>
65
- <div :class="$parent.$parent.style" >
66
- <label class="font_normal_body">单&emsp;&emsp;元</label>
41
+ <div :class="$parent.$parent.style">
42
+ <label class="font_normal_body">&nbsp;&nbsp;&nbsp;单元&nbsp;&nbsp;&nbsp;</label>
67
43
  <input type="text" class="input_search" style="width:60%" v-model="model.f_unit" style="width:60%"
68
- condition="a.f_unit like '%{}%'" placeholder="单元"
44
+ condition="f_unit like '%{}%'" placeholder="单元"
69
45
  :size="model.f_unit ? model.f_unit.length*2 : 6"/>
70
46
  </div>
71
47
  <div :class="$parent.$parent.style">
72
- <label class="font_normal_body">楼&emsp;&emsp;层</label>
48
+ <label class="font_normal_body">&nbsp;&nbsp;&nbsp;楼层&nbsp;&nbsp;&nbsp;</label>
73
49
  <input type="text" class="input_search" style="width:60%" v-model="model.f_floor" style="width:60%"
74
- condition="a.f_floor like '%{}%'" placeholder="楼层"
50
+ condition="f_floor like '%{}%'" placeholder="楼层"
75
51
  :size="model.f_floor ? model.f_floor.length*2 : 6"/>
76
52
  </div>
77
53
  <div :class="$parent.$parent.style">
78
- <label class="font_normal_body">门&ensp;牌&ensp;号</label>
54
+ <label class="font_normal_body">&nbsp;&nbsp;&nbsp;门牌号</label>
79
55
  <input type="text" class="input_search" style="width:60%" v-model="model.f_room" style="width:60%"
80
- condition="a.f_room like '%{}%'" placeholder="门牌号"
56
+ condition="f_room like '%{}%'" placeholder="门牌号"
81
57
  :size="model.f_room ? model.f_room.length*2 : 6"/>
82
58
  </div>
83
59
  <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
-
90
- <div :class="$parent.$parent.style">
91
- <label class="font_normal_body">地址&emsp;ID</label>
60
+ <label class="font_normal_body">地址ID</label>
92
61
  <input type="text" class="input_search" style="width:60%" v-model="model.id" style="width:60%"
93
- condition="a.id = '{}'" placeholder="地址ID"
94
- />
62
+ condition="id = '{}'" placeholder="地址ID"
63
+ />
95
64
  </div>
96
- <div :class="$parent.$parent.style" >
65
+ <div :class="$parent.$parent.style">
97
66
  <label class="font_normal_body">详细地址</label>
98
67
  <input type="text" class="input_search" style="width:60%" v-model="model.f_address" style="width:60%"
99
- condition="a.f_address like '%{}%'" placeholder="详细地址"
68
+ condition="f_address like '%{}%'" placeholder="详细地址"
100
69
  :size="model.f_address ? model.f_address.length*2 : 8"/>
101
70
  </div>
102
- <div :class="$parent.$parent.style" >
103
- <label class="font_normal_body">特殊地址</label>
104
- <v-select :value.sync="model.f_special"
105
- v-model="model.f_special"
106
- :options='$parent.$parent.specialoptions' placeholder='请选择'
107
- condition=" {} "
108
- close-on-select></v-select>
71
+ <div class="span" style="float:right;">
72
+ <button class="button_search button_spacing" @click="search()" >查询</button>
73
+ <button class="button_new button_spacing" style="width:70px" @click="$parent.$parent.add('民用')">添加民用</button>
74
+ <button class="button_new button_spacing" style="width:100px" @click="$parent.$parent.add('非民用')">添加特殊地址</button>
75
+ <button class="button_clear button_spacing" @click="$parent.$parent.clear()">清空</button>
76
+ <button class="button_export button_spacing" @click="$parent.$parent.importAddress">导入地址</button>
77
+ <!--<div style="float: right" class="button_spacing" :class="{'button_shrink_top':$parent.$parent.criteriaShow,'button_shrink_bottom':!$parent.$parent.criteriaShow}" @click="$parent.$parent.hidden()"></div>-->
109
78
  </div>
110
-
111
79
  </div>
80
+ <!--<div class="row" v-show="$parent.$parent.criteriaShow">-->
81
+ <!---->
82
+ <!--</div>-->
112
83
  </div>
113
84
  </criteria>
114
85
  <data-grid :model="model" partial='list' style="overflow: auto" class="list_area table_sy" v-ref:grid>
115
86
  <template partial='head'>
116
87
  <tr>
117
88
  <th><nobr>序号</nobr></th>
118
- <th><nobr>用户编号</nobr></th>
119
89
  <th><nobr>区/县</nobr></th>
120
90
  <th><nobr>片区</nobr></th>
121
91
  <th><nobr>街道</nobr></th>
@@ -132,7 +102,6 @@
132
102
  <template partial='body'>
133
103
  <tr>
134
104
  <td style="text-align:center"><nobr>{{$index + 1}}</nobr></td>
135
- <td style="text-align:center"><nobr>{{row.f_userinfo_code}}</nobr></td>
136
105
  <td style="text-align:center"><nobr>{{row.f_pcd}}</nobr></td>
137
106
  <td style="text-align:center"><nobr>{{row.f_slice_area}}</nobr></td>
138
107
  <td style="text-align:center"><nobr>{{row.f_street}}</nobr></td>
@@ -144,8 +113,8 @@
144
113
  <td style="text-align:center"><nobr>{{row.f_address}}</nobr></td>
145
114
  <td style="text-align:center"><nobr>{{row.f_create_date}}</nobr></td>
146
115
  <td style="text-align:center">
147
- <!-- <button type="button" name="button" class="btn btn-link"
148
- @click.stop="$parent.$parent.$parent.modify(row)">修改</button>-->
116
+ <!-- <button type="button" name="button" class="btn btn-link"
117
+ @click.stop="$parent.$parent.$parent.modify(row)">修改</button>-->
149
118
  <button type="button" name="button" class="btn btn-link"
150
119
  @click.stop="$parent.$parent.$parent.delete(row)">删除</button>
151
120
  </td>
@@ -185,9 +154,7 @@
185
154
  f_orgid: '',
186
155
 
187
156
  //文件上传弹框
188
- showFile: false,
189
- showrightchange:true,
190
- specialoptions:[{label:"全部",value:""},{label:"是",value:"a.f_special ='1'"},{label:"否",value:"a.f_special is null"}]
157
+ showFile: false
191
158
  }
192
159
  },
193
160
  title: '地址列表',
@@ -212,7 +179,6 @@
212
179
  if (this.f_filialeids) {
213
180
  this.$refs.paged.$refs.grid.selectStore.selected = null
214
181
  this.$dispatch('add',val)
215
- this.showrightchange = false;
216
182
  } else {
217
183
  this.$showAlert('请先选择左上角的所在分公司', 'warning', 2000)
218
184
  }
@@ -232,70 +198,63 @@
232
198
  this.$dispatch('modify',val)
233
199
  },
234
200
  async delete(row){
235
- if(row.id){
236
- var id = row.id
237
- 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})
238
- if(userfiles.data.length){
239
- this.$showAlert('该地址下已有正常表具档案,无法删除!','warning',1000)
240
- }else{
241
- this.$resetdelete('rs/entity/t_user_address', {id: id}, {resolveMsg: '删除成功', rejectMsg: '删除失败'}).then((res) => {
242
- this.$dispatch('cancel')
243
- })
244
- }
245
- }
246
- },
201
+ if(row.id){
202
+ var id = row.id
203
+ let service = await this.$resetpost('rs/sql/address_singleTable', {data: {items: 'f_addressid',tablename: 't_service',condition: `f_addressid='${id}'`}},{resolveMsg: null, rejectMsg: null})
204
+ 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})
205
+ if(service.data.length || userfiles.data.length){
206
+ this.$showAlert('该地址下已有工单或档案,无法删除!','warning',1000)
207
+ }else{
208
+ this.$resetdelete('rs/entity/t_user_address', {id: id}, {resolveMsg: '删除成功', rejectMsg: '删除失败'}).then((res) => {
209
+ this.$dispatch('cancel')
210
+ })
211
+ }
212
+ }
213
+ },
247
214
 
248
- search () {
249
- this.$refs.paged.$refs.cri.search()
250
- },
215
+ search () {
216
+ this.$refs.paged.$refs.cri.search()
217
+ },
251
218
 
252
- selfSearch (args) {
219
+ selfSearch (args) {
253
220
 
254
- if (!this.f_orgid) {
255
- this.getorg([this.$login.f.orgid])
256
- }
257
- console.log("xxx"+this.f_filialeids)
258
- args.condition = `${args.condition} and a.f_filialeid = '${this.f_filialeids}'`
259
- this.model.search(args.condition, args.model)
260
- },
221
+ if (!this.f_orgid) {
222
+ this.getorg([this.$login.f.orgid])
223
+ }
261
224
 
262
- //清空
263
- clear(){
264
- this.$refs.paged.$refs.cri.model = {}
265
- },
266
- getorg (val) {
267
- this.f_orgid = this.$login.convertToIn(val)
268
- if (!this.f_orgid) {
269
- this.f_orgid = this.f_filialeids
270
- }
271
- this.f_filialeids = val[0]
272
- }
273
- },
274
- events: {
275
- onFileUpload: async function (file, res) {
276
- console.log("上传完毕"+JSON.stringify(res))
277
- let data = {
278
- filepath: res.f_downloadpath,
279
- user:this.$login.f
280
- }
281
- console.log("filepath="+JSON.stringify(data))
282
- await this.$resetpost(`rs/logic/address_useraddressimport`,data, {resolveMsg: null, rejectMsg: '导入失败', silent: true}, 0).then((res)=>{
283
- if(res.data.type=="success"){
284
- this.$showAlert("导入信息:"+res.data.msg, res.data.type, 2000);
285
- }else{
286
- this.$showMessage(res.data.msg);
287
- }
225
+ args.condition = `${args.condition} and a.f_filialeid = '${this.f_filialeids}'`
226
+ this.model.search(args.condition, args.model)
227
+ },
288
228
 
289
- //关闭上传框
290
- this.closeFile()
291
- //重新查询
292
- this.init()
293
- })
229
+ //清空
230
+ clear(){
231
+ this.$refs.paged.$refs.cri.model = {}
232
+ },
233
+ getorg (val) {
234
+ this.f_orgid = this.$login.convertToIn(val)
235
+ this.f_filialeids = val[0]
236
+ }
294
237
  },
295
- 'onFileError'(error) {
296
- this.$showAlert(error, 'warning', 2000)
238
+ events: {
239
+ onFileUpload: async function (file, res) {
240
+ console.log("上传完毕"+JSON.stringify(res))
241
+ let data = {
242
+ filepath: res.f_downloadpath,
243
+ user:this.$login.f
244
+ }
245
+ console.log("filepath="+JSON.stringify(data))
246
+ await this.$resetpost(`rs/logic/address_useraddressimport`,data, {resolveMsg: null, rejectMsg: '导入失败', silent: true}, 0).then((res)=>{
247
+ this.$showAlert("成功导入"+res.data+'条地址', 'success', 2000)
248
+ //关闭上传框
249
+ this.closeFile()
250
+ //重新查询
251
+ this.init()
252
+ })
253
+ },
254
+ 'onFileError'(error) {
255
+ this.$showAlert(error, 'warning', 2000)
256
+ }
297
257
  }
298
- }
299
258
 
300
259
  }
301
260
  </script>
@@ -29,7 +29,7 @@
29
29
  row: {},
30
30
  useraddressShow: false,
31
31
  addressId: null,
32
- style:'col-sm-2 form-group'
32
+ style:'col-sm-2 '
33
33
  }
34
34
  },
35
35
  props:{
@@ -37,8 +37,7 @@
37
37
  },
38
38
  methods:{
39
39
  selected(obj){
40
- this.$refs.addresslist.showrightchange=false;
41
- this.style='col-sm-3 form-group'
40
+ this.style='col-sm-3 '
42
41
  if(obj.val&&obj.val.id){
43
42
  if (obj.val.f_filialeid != this.f_filialeids) {
44
43
  this.refresh()
@@ -75,7 +74,7 @@
75
74
  },
76
75
  events:{
77
76
  'add'(val){
78
- this.style='col-sm-3 form-group'
77
+ this.style='col-sm-3 '
79
78
  this.useraddressShow = true
80
79
  this.$refs.useraddressmsg.cleardara()
81
80
  this.addressId=null
@@ -94,19 +93,17 @@
94
93
  this.$refs.useraddressmsg.initdata()
95
94
  },
96
95
  'confirm' () {
97
- this.style='col-sm-2 form-group'
96
+ this.style='col-sm-2 '
98
97
  this.addressId=null
99
98
  this.$refs.addresslist.$refs.paged.$refs.cri.search()
100
99
  this.useraddressShow = false
101
- this.$refs.addresslist.showrightchange=true;
102
100
  },
103
101
  'modify'(area){
104
- this.style='col-sm-2 form-group'
102
+ this.style='col-sm-2 '
105
103
  },
106
104
  'cancel' () {
107
- this.style='col-sm-2 form-group'
105
+ this.style='col-sm-2 '
108
106
  this.addressId=null
109
- this.$refs.addresslist.showrightchange=true;
110
107
  this.$refs.addresslist.$refs.paged.$refs.cri.search()
111
108
  this.useraddressShow = false
112
109
  },
@@ -40,7 +40,7 @@
40
40
  <button class="btn btn-info" @click="addRoot">添加区(县)</button>
41
41
  <button v-if="isbasch" class="btn btn-success" @click="importAddress">导入地址</button>
42
42
  </div>
43
- <tree-grid class="treeList" :model="model" v-ref:tree :is-Click="true" :isEdit="true" @select-changed='selectclick' url='rs/path/address_getChild' id="vc-chooser">
43
+ <tree-grid class="treeList" :model="model" v-ref:tree :is-Click="true" isEdit="true" @select-changed='selectclick' url='rs/path/address_getChild' id="vc-chooser">
44
44
  <template partial='head'>
45
45
  <tr>
46
46
  <th>类型</th>
@@ -22,7 +22,7 @@
22
22
  </template>
23
23
  <template partial='body'>
24
24
  <td id = "1" style="text-align: center;">{{$index + 1}}</td>
25
- <td>{{row.f_area_address}}-{{row.f_residential_area}}-{{row.f_comments}}</td>
25
+ <td>{{row.f_area_address}}-{{row.f_residential_area}}</td>
26
26
  <td style="text-align: center;">
27
27
  <button type="button" name="button" class="btn btn-link" @click.stop="$parent.$parent.$parent.foundFile(row)">建档</button>
28
28
  </td>