address-client 3.2.84 → 3.2.85
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.
- package/build/dev-server.js +24 -12
- package/package.json +3 -3
- package/src/address.js +6 -0
- package/src/components/AddStreetManageMsg.vue +209 -0
- package/src/components/AddStreetOrPcd.vue +361 -320
- package/src/components/StreetList.vue +243 -240
- package/src/components/StreetManage.vue +68 -0
- package/src/components/StreetManageList.vue +225 -0
- package/src/filiale/qianneng/UserAddress.vue +17 -12
- package/src/main.js +1 -1
|
@@ -0,0 +1,225 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<div class="flex" @keyup.enter="search">
|
|
3
|
+
<criteria-paged :model="model" v-ref:paged>
|
|
4
|
+
<criteria partial='criteria' @condition-changed='$parent.selfSearch' @sort="sort()" v-ref:cri>
|
|
5
|
+
<div novalidate class="form-horizontal select-overspread container-fluid auto" partial>
|
|
6
|
+
<div class="row">
|
|
7
|
+
<div class="form-group" :class="{'col-sm-3':$parent.$parent.$parent.areaShow,'col-sm-2':!$parent.$parent.$parent.areaShow}">
|
|
8
|
+
<label class="font_normal_body">组织机构</label>
|
|
9
|
+
<res-select restype='organization'
|
|
10
|
+
@res-select="$parent.$parent.getorg"
|
|
11
|
+
:initresid='$parent.$parent.curorgid'>
|
|
12
|
+
</res-select>
|
|
13
|
+
</div>
|
|
14
|
+
<div class="form-group" :class="{'col-sm-3':$parent.$parent.$parent.areaShow,'col-sm-2':!$parent.$parent.$parent.areaShow}">
|
|
15
|
+
<label class="font_normal_body">街道办名称</label>
|
|
16
|
+
<input type="text" class="input_search" style="width:60%" v-model="model.f_street"
|
|
17
|
+
condition="f_street_manage_name like '%{}%'" placeholder="街道名称"/>
|
|
18
|
+
</div>
|
|
19
|
+
<div class="col-sm-4 form-group button-range">
|
|
20
|
+
<button class="button_search button_spacing" @click="search()" >查询</button>
|
|
21
|
+
<button class="button_new button_spacing" style="width: max-content;" @click="$parent.$parent.add()">添加街道办</button>
|
|
22
|
+
<button class="button_clear button_spacing" @click="$parent.$parent.clear()">清空</button>
|
|
23
|
+
<export-excel :data="$parent.$parent.getCondition"
|
|
24
|
+
:field="$parent.$parent.getfield"
|
|
25
|
+
sqlurl="rs/logic/exportfile"
|
|
26
|
+
sql-name="manage_getstreetlist"
|
|
27
|
+
template-name='街道办信息查询导出'
|
|
28
|
+
:choose-col="true"></export-excel>
|
|
29
|
+
<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>
|
|
30
|
+
</div>
|
|
31
|
+
</div>
|
|
32
|
+
<div class="row" v-show="$parent.$parent.criteriaShow">
|
|
33
|
+
<div class="form-group" :class="{'col-sm-3':$parent.$parent.$parent.areaShow,'col-sm-2':!$parent.$parent.$parent.areaShow}">
|
|
34
|
+
<label class="font_normal_body">省  份</label>
|
|
35
|
+
<input type="text" style="width:60%" class="input_search" v-model="model.f_province"
|
|
36
|
+
condition="f_province like '%{}%'" placeholder="省份"
|
|
37
|
+
:size="model.f_province ? model.f_province.length*2 : 6"/>
|
|
38
|
+
</div>
|
|
39
|
+
<div class="form-group" :class="{'col-sm-3':$parent.$parent.$parent.areaShow,'col-sm-2':!$parent.$parent.$parent.areaShow}">
|
|
40
|
+
<label class="font_normal_body">城  市</label>
|
|
41
|
+
<input type="text" style="width:60%" class="input_search" v-model="model.f_city"
|
|
42
|
+
condition="f_city like '%{}%'" placeholder="城市"
|
|
43
|
+
:size="model.f_city ? model.f_city.length*2 : 6"/>
|
|
44
|
+
</div>
|
|
45
|
+
<div class="form-group" :class="{'col-sm-3':$parent.$parent.$parent.areaShow,'col-sm-2':!$parent.$parent.$parent.areaShow}">
|
|
46
|
+
<label class="font_normal_body">区  县</label>
|
|
47
|
+
<input type="text" style="width:60%" class="input_search" v-model="model.f_district"
|
|
48
|
+
condition="f_district like '%{}%'" placeholder="区县"
|
|
49
|
+
:size="model.f_district ? model.f_district.length*2 : 6"/>
|
|
50
|
+
</div>
|
|
51
|
+
</div>
|
|
52
|
+
</div>
|
|
53
|
+
</criteria>
|
|
54
|
+
<data-grid :model="model" partial='list' class="list_area table_sy" v-ref:grid>
|
|
55
|
+
<template partial='head'>
|
|
56
|
+
<tr>
|
|
57
|
+
<th><nobr>序号</nobr></th>
|
|
58
|
+
<th><nobr>省份</nobr></th>
|
|
59
|
+
<th><nobr>城市</nobr></th>
|
|
60
|
+
<th><nobr>区/县</nobr></th>
|
|
61
|
+
<th><nobr>街道办</nobr></th>
|
|
62
|
+
<th><nobr>街道办编号</nobr></th>
|
|
63
|
+
<th><data-order field="f_address" name="地址"
|
|
64
|
+
:order.sync="$parent.$parent.$parent.$parent.orderFields.f_address"></data-order></th>
|
|
65
|
+
<th><nobr>分公司</nobr></th>
|
|
66
|
+
<th title="该街道办下现有的街道数"><nobr>街道数量</nobr></th>
|
|
67
|
+
<th><nobr>操作</nobr></th>
|
|
68
|
+
</tr>
|
|
69
|
+
</template>
|
|
70
|
+
<template partial='body'>
|
|
71
|
+
<tr>
|
|
72
|
+
<td style="text-align:center"><nobr>{{$index + 1}}</nobr></td>
|
|
73
|
+
<td style="text-align:center"><nobr>{{row.f_province}}</nobr></td>
|
|
74
|
+
<td style="text-align:center"><nobr>{{row.f_city}}</nobr></td>
|
|
75
|
+
<td style="text-align:center"><nobr>{{row.f_district}}</nobr></td>
|
|
76
|
+
<td style="text-align:center"><nobr>{{row.f_street_manage_name}}</nobr></td>
|
|
77
|
+
<td style="text-align:center"><nobr>{{row.f_street_manage_number}}</nobr></td>
|
|
78
|
+
<td style="text-align:center"><nobr>{{row.f_pcd}}{{row.f_street}}</nobr></td>
|
|
79
|
+
<td style="text-align:center"><nobr>{{row.f_orgname}}</nobr></td>
|
|
80
|
+
<td style="text-align:center"><nobr>{{row.streetnum}}</nobr></td>
|
|
81
|
+
<td style="text-align:center">
|
|
82
|
+
<nobr>
|
|
83
|
+
<button v-if="!row.streetmanageid"
|
|
84
|
+
type="button"
|
|
85
|
+
name="button"
|
|
86
|
+
class="btn btn-danger"
|
|
87
|
+
style="padding: 5px 12px"
|
|
88
|
+
@click.stop="$parent.$parent.$parent.delete(row)">
|
|
89
|
+
删除
|
|
90
|
+
</button>
|
|
91
|
+
</nobr>
|
|
92
|
+
</td>
|
|
93
|
+
</tr>
|
|
94
|
+
</template>
|
|
95
|
+
<template partial='foot'></template>
|
|
96
|
+
</data-grid>
|
|
97
|
+
</criteria-paged>
|
|
98
|
+
</div>
|
|
99
|
+
</template>
|
|
100
|
+
|
|
101
|
+
<script>
|
|
102
|
+
import { PagedList } from 'vue-client'
|
|
103
|
+
let readyGen = async function (self) {
|
|
104
|
+
self.getfield = self.config.excelHeaders
|
|
105
|
+
}
|
|
106
|
+
export default {
|
|
107
|
+
data () {
|
|
108
|
+
return {
|
|
109
|
+
criteriaShow: false,
|
|
110
|
+
model: new PagedList('rs/sql/address_getStreetManageList',20,{orderitem: this.orderitem?'"' + this.orderitem + ' "':`'f_city,f_iscity,f_street_manage_name desc'`}),
|
|
111
|
+
addflag: false,
|
|
112
|
+
getfield: {},
|
|
113
|
+
//排序
|
|
114
|
+
orderitem:'f_city,f_iscity,f_street_manage_name desc',
|
|
115
|
+
addtitle:'',
|
|
116
|
+
// 公司下拉
|
|
117
|
+
curorgid: [this.$login.f.orgid],
|
|
118
|
+
f_orgid: '',
|
|
119
|
+
config: {
|
|
120
|
+
// 导出列要和查询列相同
|
|
121
|
+
excelHeaders: {
|
|
122
|
+
'f_province':'省份',
|
|
123
|
+
'f_city':'城市',
|
|
124
|
+
'f_district':'区/县',
|
|
125
|
+
'f_street_manage_name':'街道办名称',
|
|
126
|
+
'f_orgname':'分公司',
|
|
127
|
+
'streetnum':'街道数量'
|
|
128
|
+
}
|
|
129
|
+
},
|
|
130
|
+
orderFields: {
|
|
131
|
+
f_operate_date: 'no'
|
|
132
|
+
},
|
|
133
|
+
}
|
|
134
|
+
},
|
|
135
|
+
title: '街道办管理',
|
|
136
|
+
props:{
|
|
137
|
+
f_filialeids:{
|
|
138
|
+
type: String
|
|
139
|
+
}
|
|
140
|
+
},
|
|
141
|
+
ready(){
|
|
142
|
+
readyGen(this)
|
|
143
|
+
this.search()
|
|
144
|
+
},
|
|
145
|
+
methods: {
|
|
146
|
+
hidden() {
|
|
147
|
+
this.criteriaShow = !this.criteriaShow
|
|
148
|
+
},
|
|
149
|
+
search () {
|
|
150
|
+
this.$refs.paged.$refs.cri.search()
|
|
151
|
+
},
|
|
152
|
+
async delete(row){
|
|
153
|
+
if(row.id >= 0 ){
|
|
154
|
+
var id = row.id
|
|
155
|
+
let useraredss = await this.$resetpost('rs/sql/address_singleTable',
|
|
156
|
+
{data: {
|
|
157
|
+
items: 'id',
|
|
158
|
+
tablename: 't_street',
|
|
159
|
+
condition: `f_street_manage_id=${id}`}
|
|
160
|
+
},
|
|
161
|
+
{resolveMsg: null, rejectMsg: null})
|
|
162
|
+
if(useraredss.data.length>0){
|
|
163
|
+
this.$showAlert('该街道办下已有街道信息,无法删除!','warning',1000)
|
|
164
|
+
}else{
|
|
165
|
+
this.$resetdelete('rs/entity/t_street_manage', {id: id}, {resolveMsg: '删除成功', rejectMsg: '删除失败'}).then((res) => {
|
|
166
|
+
this.$dispatch('cancel')
|
|
167
|
+
})
|
|
168
|
+
}
|
|
169
|
+
}
|
|
170
|
+
},
|
|
171
|
+
add(val){
|
|
172
|
+
if (this.f_filialeids) {
|
|
173
|
+
this.$refs.paged.$refs.grid.selectStore.selected = null
|
|
174
|
+
this.$dispatch('add',val)
|
|
175
|
+
} else {
|
|
176
|
+
this.$showAlert('请先选择左上角的所在分公司', 'warning', 2000)
|
|
177
|
+
}
|
|
178
|
+
},
|
|
179
|
+
selfSearch (args) {
|
|
180
|
+
if (!this.f_orgid) {
|
|
181
|
+
this.getorg([this.$login.f.orgid])
|
|
182
|
+
}
|
|
183
|
+
args.condition = `${args.condition} and sm.f_filialeid in ${this.f_orgid}`
|
|
184
|
+
this.model.search(args.condition, args.model)
|
|
185
|
+
},
|
|
186
|
+
//清空
|
|
187
|
+
clear(){
|
|
188
|
+
this.$refs.paged.$refs.cri.model = {}
|
|
189
|
+
},
|
|
190
|
+
getorg (val) {
|
|
191
|
+
this.f_orgid = this.$login.convertToIn(val)
|
|
192
|
+
this.f_filialeids = val[0]
|
|
193
|
+
}
|
|
194
|
+
},
|
|
195
|
+
computed: {
|
|
196
|
+
getCondition() {
|
|
197
|
+
return {
|
|
198
|
+
condition: `${this.$refs.paged.$refs.cri.condition}` + `and sm.f_filialeid = '${this.f_filialeids}'`,
|
|
199
|
+
orderitem: this.orderitem ? `${this.orderitem}` : " id desc"
|
|
200
|
+
}
|
|
201
|
+
}
|
|
202
|
+
},
|
|
203
|
+
events:{
|
|
204
|
+
'sort' (field, rule) {
|
|
205
|
+
// 将所有排序方式设为不排序,实现相互排斥
|
|
206
|
+
console.log("field",field, rule)
|
|
207
|
+
for (let key in this.orderFields) {
|
|
208
|
+
if (key === field) {
|
|
209
|
+
this.orderFields[key] = rule
|
|
210
|
+
} else {
|
|
211
|
+
this.orderFields[key] = 'no'
|
|
212
|
+
}
|
|
213
|
+
}
|
|
214
|
+
// 如果新规则不排序,还原为默认排序
|
|
215
|
+
if (rule === 'no') {
|
|
216
|
+
this.model.paramSource.orderitem = `'${this.orderitem}'`
|
|
217
|
+
} else {
|
|
218
|
+
this.model.paramSource.orderitem = `'${field} ${rule}'`
|
|
219
|
+
}
|
|
220
|
+
|
|
221
|
+
this.search()
|
|
222
|
+
},
|
|
223
|
+
},
|
|
224
|
+
}
|
|
225
|
+
</script>
|
|
@@ -142,7 +142,7 @@
|
|
|
142
142
|
:class="[$v.f_room.required ? 'has-error' : 'has-success']">
|
|
143
143
|
<label for="f_address" class="font_normal_body">   门 牌 号</label>
|
|
144
144
|
<input type="text" style="width:40%" v-model="model.f_room" class="input_search" placeholder="门牌号"
|
|
145
|
-
@change="roomChange"
|
|
145
|
+
@change="roomChange" />
|
|
146
146
|
</div>
|
|
147
147
|
<div class="col-sm-6 form-group">
|
|
148
148
|
<label class="font_normal_body">   地址状态</label>
|
|
@@ -736,13 +736,17 @@
|
|
|
736
736
|
this.model.f_street_id = selectArea.f_street_id
|
|
737
737
|
this.model.f_pcd_id = selectArea.f_pcd_id
|
|
738
738
|
this.initstreets(` f_filialeid = '${this.f_filialeids}' and id ='${selectArea.f_street_id}' `)
|
|
739
|
-
this.initpcds(` f_filialeid = '${this.f_filialeids}' and id ='${selectArea.f_pcd_id}' `)
|
|
740
|
-
|
|
741
|
-
|
|
742
|
-
|
|
743
|
-
|
|
744
|
-
|
|
745
|
-
|
|
739
|
+
this.initpcds(` f_filialeid = '${this.f_filialeids}' and id ='${selectArea.f_pcd_id}' `).then(
|
|
740
|
+
(res)=>{
|
|
741
|
+
this.model.slice_area = selectArea.f_slice_area
|
|
742
|
+
// 拼接地址
|
|
743
|
+
if(selectArea.f_residential_area !== '无'){
|
|
744
|
+
this.model.f_district=this.findbyid(this.pcdslist,this.model.f_pcd_id).f_district
|
|
745
|
+
this.model.f_address = `${this.model.f_district}${selectArea.f_street}${selectArea.f_residential_area}`
|
|
746
|
+
}
|
|
747
|
+
this.getbuildingList(`f_filialeid = '${this.f_filialeids}' and f_residential_area_id ='${selectArea.id}'`)
|
|
748
|
+
}
|
|
749
|
+
)
|
|
746
750
|
}
|
|
747
751
|
this.$nextTick(() => {
|
|
748
752
|
this.$resetValidation()
|
|
@@ -788,7 +792,7 @@
|
|
|
788
792
|
this.model.f_pcd=this.findbyid(this.pcdslist,this.model.f_pcd_id).f_pcd
|
|
789
793
|
this.model.f_street=this.findbyid(this.streetslist,this.model.f_street_id).f_street
|
|
790
794
|
this.model.f_residential_area = this.findbyid(this.areaslist,this.model.f_residential_area_id) ? this.findbyid(this.areaslist,this.model.f_residential_area_id).f_residential_area : ''
|
|
791
|
-
this.model.f_address =
|
|
795
|
+
this.model.f_address = (this.model.f_district ? this.model.f_district : '') + this.model.f_street + (this.model.f_residential_area!='无'?this.model.f_residential_area:'') + (this.model.f_building&&this.model.f_building!='无'?this.model.f_building +this.model.f_building_suffix:'') + (this.model.f_unit?this.model.f_unit +this.model.f_unit_suffix:'') + (this.model.f_floor?this.model.f_floor +this.model.f_floor_suffix:'') + this.model.f_room + this.model.f_room_suffix
|
|
792
796
|
} else {
|
|
793
797
|
//民用
|
|
794
798
|
this.model.f_pcd=this.findbyid(this.pcdslist,this.model.f_pcd_id).f_pcd
|
|
@@ -817,7 +821,7 @@
|
|
|
817
821
|
street=item.label
|
|
818
822
|
}
|
|
819
823
|
})
|
|
820
|
-
this.model.f_address = street
|
|
824
|
+
this.model.f_address = (this.model.f_district ? this.model.f_district : '') + street
|
|
821
825
|
}
|
|
822
826
|
if(val){
|
|
823
827
|
//那就把[小区]重新组织一下
|
|
@@ -886,9 +890,10 @@
|
|
|
886
890
|
data.f_depid = this.$login.f.depids
|
|
887
891
|
data.f_depname = this.$login.f.deps
|
|
888
892
|
data.f_pcd=this.findbyid(this.pcdslist,this.model.f_pcd_id).f_pcd
|
|
893
|
+
data.f_district=this.findbyid(this.pcdslist,this.model.f_pcd_id).f_district
|
|
889
894
|
data.f_street=this.findbyid(this.streetslist,this.model.f_street_id).f_street
|
|
890
895
|
data.f_residential_area=this.findbyid(this.areaslist,this.model.f_residential_area_id).f_residential_area
|
|
891
|
-
data.f_address = data.f_street
|
|
896
|
+
data.f_address = data.f_district + data.f_street
|
|
892
897
|
+ data.f_residential_area +
|
|
893
898
|
data.f_building + data.f_building_suffix
|
|
894
899
|
+ data.f_unit + data.f_unit_suffix
|
|
@@ -987,7 +992,7 @@
|
|
|
987
992
|
this.$showMessage('请选择楼栋数据!!!')
|
|
988
993
|
return
|
|
989
994
|
}
|
|
990
|
-
this.model.f_address = this.model.f_street + (this.model.f_residential_area!='无'?this.model.f_residential_area:'') + (this.model.f_building&&this.model.f_building!='无'?this.model.f_building +this.model.f_building_suffix:'') + (this.model.f_unit?this.model.f_unit +this.model.f_unit_suffix:'') + (this.model.f_floor?this.model.f_floor +this.model.f_floor_suffix:'') + this.model.f_room + this.model.f_room_suffix
|
|
995
|
+
this.model.f_address = (this.model.f_district ? this.model.f_district : '') + this.model.f_street + (this.model.f_residential_area!='无'?this.model.f_residential_area:'') + (this.model.f_building&&this.model.f_building!='无'?this.model.f_building +this.model.f_building_suffix:'') + (this.model.f_unit?this.model.f_unit +this.model.f_unit_suffix:'') + (this.model.f_floor?this.model.f_floor +this.model.f_floor_suffix:'') + this.model.f_room + this.model.f_room_suffix
|
|
991
996
|
}
|
|
992
997
|
await this.$resetpost('rs/logic/address_updateuseraddress', this.model)
|
|
993
998
|
},
|