address-client 3.2.84 → 3.2.86

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.
@@ -71,6 +71,7 @@
71
71
  <th><nobr>省份</nobr></th>
72
72
  <th><nobr>城市</nobr></th>
73
73
  <th><nobr>区/县</nobr></th>
74
+ <th><nobr>街道办</nobr></th>
74
75
  <th><data-order field="f_iscity" name="地区类型"
75
76
  :order.sync="$parent.$parent.$parent.$parent.orderFields.f_iscity"></data-order></th>
76
77
  <th><nobr>街道/乡镇</nobr></th>
@@ -88,6 +89,7 @@
88
89
  <td style="text-align:center"><nobr>{{row.f_province}}</nobr></td>
89
90
  <td style="text-align:center"><nobr>{{row.f_city}}</nobr></td>
90
91
  <td style="text-align:center"><nobr>{{row.f_district}}</nobr></td>
92
+ <td style="text-align:center"><nobr>{{row.f_street_manage_name}}</nobr></td>
91
93
  <td style="text-align:center"><nobr>{{row.f_iscity}}</nobr></td>
92
94
  <td style="text-align:center"><nobr>{{row.f_street}}</nobr></td>
93
95
  <td style="text-align:center"><nobr>{{row.f_street_number}}</nobr></td>
@@ -133,6 +135,7 @@
133
135
  'f_province':'省份',
134
136
  'f_city':'城市',
135
137
  'f_district':'区/县',
138
+ 'f_street_manage_name':'街道办',
136
139
  'f_street':'街道名称',
137
140
  'f_org_name':'分公司',
138
141
  'streenum':'小区数量'
@@ -0,0 +1,68 @@
1
+ <template>
2
+ <div id="unit" class="flex-row " :class="{'binary':streetManageShow}">
3
+ <div :class="{'basic-main':!streetManageShow,'binary-left':streetManageShow}">
4
+ <street-manage-list @select-changed="selected"
5
+ :f_filialeids.sync="f_filialeids"
6
+ v-ref:streetmanage>
7
+ </street-manage-list>
8
+ </div>
9
+ <div v-show="streetManageShow" class="binary-right">
10
+ <add-street-manage-msg v-ref:addstreetmanage
11
+ :f_filialeids.sync="f_filialeids">
12
+ </add-street-manage-msg>
13
+ </div>
14
+ </div>
15
+ </template>
16
+
17
+ <script>
18
+ export default {
19
+ title: '街道办管理',
20
+ components: {},
21
+ data() {
22
+ return {
23
+ //分公司id串
24
+ f_filialeids: this.$login.f.orgid,
25
+ streetManageShow: false
26
+ }
27
+ },
28
+ props: {},
29
+ methods: {
30
+ selected(obj) {
31
+ if (obj.val && obj.val.id) {
32
+ if (obj.val.f_filialeid != this.f_filialeids) {
33
+ this.refresh()
34
+ return
35
+ }
36
+ this.streetManageShow = true
37
+ this.$refs.addstreetmanage.businesstype = '修改' + obj.val.f_street_manage_name
38
+ this.$refs.addstreetmanage.streetmanagemodel = Object.assign({},obj.val)
39
+ this.$refs.addstreetmanage.initdata()
40
+ }
41
+ },
42
+ async refresh() {
43
+ this.streetManageShow = false
44
+ await this.$refs.streetmanage.$refs.paged.$refs.cri.search()
45
+ }
46
+ },
47
+ events: {
48
+ 'add'(areatype) {
49
+ this.style = 'col-sm-3 '
50
+ this.streetManageShow = true
51
+ this.$refs.addstreetmanage.businesstype = '增加'
52
+ this.$refs.addstreetmanage.clearData()
53
+ this.$refs.addstreetmanage.initdata()
54
+ },
55
+ 'confirm'() {
56
+ this.style = 'col-sm-2 '
57
+ this.refresh()
58
+ },
59
+ 'cancel'() {
60
+ this.style = 'col-sm-2 '
61
+ this.streetManageShow = false
62
+ this.$refs.streetmanage.$refs.paged.$refs.cri.search()
63
+ }
64
+ }
65
+ }
66
+ </script>
67
+
68
+
@@ -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_manage_name"
17
+ condition="f_street_manage_name like '%{}%'" placeholder="街道办名称"/>
18
+ </div>
19
+ <div class="form-group" :class="{'col-sm-3':$parent.$parent.$parent.areaShow,'col-sm-2':!$parent.$parent.$parent.areaShow}">
20
+ <label class="font_normal_body">街道办编号</label>
21
+ <input type="text" class="input_search" style="width:60%" v-model="model.f_street_manage_number"
22
+ condition="f_street_manage_number = '{}'" placeholder="街道办编号"/>
23
+ </div>
24
+ <div class="col-sm-4 form-group button-range">
25
+ <button class="button_search button_spacing" @click="search()" >查询</button>
26
+ <button class="button_new button_spacing" style="width: max-content;" @click="$parent.$parent.add()">添加街道办</button>
27
+ <button class="button_clear button_spacing" @click="$parent.$parent.clear()">清空</button>
28
+ <export-excel :data="$parent.$parent.getCondition"
29
+ :field="$parent.$parent.getfield"
30
+ sqlurl="rs/logic/exportfile"
31
+ sql-name="manage_getStreetManageList"
32
+ template-name='街道办信息查询导出'
33
+ :choose-col="true"></export-excel>
34
+ <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>
35
+ </div>
36
+ </div>
37
+ <div class="row" v-show="$parent.$parent.criteriaShow">
38
+ <div class="form-group" :class="{'col-sm-3':$parent.$parent.$parent.areaShow,'col-sm-2':!$parent.$parent.$parent.areaShow}">
39
+ <label class="font_normal_body">省&emsp;&emsp;份</label>
40
+ <input type="text" style="width:60%" class="input_search" v-model="model.f_province"
41
+ condition="f_province like '%{}%'" placeholder="省份"
42
+ :size="model.f_province ? model.f_province.length*2 : 6"/>
43
+ </div>
44
+ <div class="form-group" :class="{'col-sm-3':$parent.$parent.$parent.areaShow,'col-sm-2':!$parent.$parent.$parent.areaShow}">
45
+ <label class="font_normal_body">城&emsp;&emsp;市</label>
46
+ <input type="text" style="width:60%" class="input_search" v-model="model.f_city"
47
+ condition="f_city like '%{}%'" placeholder="城市"
48
+ :size="model.f_city ? model.f_city.length*2 : 6"/>
49
+ </div>
50
+ <div class="form-group" :class="{'col-sm-3':$parent.$parent.$parent.areaShow,'col-sm-2':!$parent.$parent.$parent.areaShow}">
51
+ <label class="font_normal_body">区&emsp;&emsp;县</label>
52
+ <input type="text" style="width:60%" class="input_search" v-model="model.f_district"
53
+ condition="f_district like '%{}%'" placeholder="区县"
54
+ :size="model.f_district ? model.f_district.length*2 : 6"/>
55
+ </div>
56
+ </div>
57
+ </div>
58
+ </criteria>
59
+ <data-grid :model="model" partial='list' class="list_area table_sy" v-ref:grid>
60
+ <template partial='head'>
61
+ <tr>
62
+ <th><nobr>序号</nobr></th>
63
+ <th><nobr>省份</nobr></th>
64
+ <th><nobr>城市</nobr></th>
65
+ <th><nobr>区/县</nobr></th>
66
+ <th><nobr>街道办</nobr></th>
67
+ <th><nobr>街道办编号</nobr></th>
68
+ <th><data-order field="f_address" name="地址"
69
+ :order.sync="$parent.$parent.$parent.$parent.orderFields.f_address"></data-order></th>
70
+ <th><nobr>分公司</nobr></th>
71
+ <th title="该街道办下现有的街道数"><nobr>街道数量</nobr></th>
72
+ <th><nobr>操作</nobr></th>
73
+ </tr>
74
+ </template>
75
+ <template partial='body'>
76
+ <tr>
77
+ <td style="text-align:center"><nobr>{{$index + 1}}</nobr></td>
78
+ <td style="text-align:center"><nobr>{{row.f_province}}</nobr></td>
79
+ <td style="text-align:center"><nobr>{{row.f_city}}</nobr></td>
80
+ <td style="text-align:center"><nobr>{{row.f_district}}</nobr></td>
81
+ <td style="text-align:center"><nobr>{{row.f_street_manage_name}}</nobr></td>
82
+ <td style="text-align:center"><nobr>{{row.f_street_manage_number}}</nobr></td>
83
+ <td style="text-align:center"><nobr>{{row.f_pcd}}{{row.f_street}}</nobr></td>
84
+ <td style="text-align:center"><nobr>{{row.f_orgname}}</nobr></td>
85
+ <td style="text-align:center"><nobr>{{row.streetnum}}</nobr></td>
86
+ <td style="text-align:center">
87
+ <nobr>
88
+ <button v-if="!row.streetmanageid"
89
+ type="button"
90
+ name="button"
91
+ class="btn btn-danger"
92
+ style="padding: 5px 12px"
93
+ @click.stop="$parent.$parent.$parent.delete(row)">
94
+ 删除
95
+ </button>
96
+ </nobr>
97
+ </td>
98
+ </tr>
99
+ </template>
100
+ <template partial='foot'></template>
101
+ </data-grid>
102
+ </criteria-paged>
103
+ </div>
104
+ </template>
105
+
106
+ <script>
107
+ import { PagedList } from 'vue-client'
108
+ let readyGen = async function (self) {
109
+ self.getfield = self.config.excelHeaders
110
+ }
111
+ export default {
112
+ data () {
113
+ return {
114
+ criteriaShow: false,
115
+ model: new PagedList('rs/sql/address_getStreetManageList',20,{orderitem: this.orderitem?'"' + this.orderitem + ' "':`'f_city,f_iscity,f_street_manage_name desc'`}),
116
+ addflag: false,
117
+ getfield: {},
118
+ //排序
119
+ orderitem:'f_city,f_iscity,f_street_manage_name desc',
120
+ addtitle:'',
121
+ // 公司下拉
122
+ curorgid: [this.$login.f.orgid],
123
+ f_orgid: '',
124
+ config: {
125
+ // 导出列要和查询列相同
126
+ excelHeaders: {
127
+ 'f_province':'省份',
128
+ 'f_city':'城市',
129
+ 'f_district':'区/县',
130
+ 'f_street_manage_name':'街道办名称',
131
+ 'f_orgname':'分公司',
132
+ 'streetnum':'街道数量'
133
+ }
134
+ },
135
+ orderFields: {
136
+ f_operate_date: 'no'
137
+ },
138
+ }
139
+ },
140
+ title: '街道办管理',
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}`
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}`,
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">&emsp;&emsp;&nbsp;门&ensp;牌&ensp;号</label>
144
144
  <input type="text" style="width:40%" v-model="model.f_room" class="input_search" placeholder="门牌号"
145
- @change="roomChange" v-validate:f_room='{required: true }'/>
145
+ @change="roomChange" />
146
146
  </div>
147
147
  <div class="col-sm-6 form-group">
148
148
  <label class="font_normal_body">&emsp;&emsp;&nbsp;地址状态</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
- this.model.slice_area = selectArea.f_slice_area
741
- // 拼接地址
742
- if(selectArea.f_residential_area !== '无'){
743
- this.model.f_address = `${selectArea.f_street}${selectArea.f_residential_area}`
744
- }
745
- this.getbuildingList(`f_filialeid = '${this.f_filialeids}' and f_residential_area_id ='${selectArea.id}'`)
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 = (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
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
  },
package/src/main.js CHANGED
@@ -9,7 +9,7 @@ Vue.config.silent = true
9
9
 
10
10
  /** **************************通用组件******************************/
11
11
  all()
12
- address('WEINAN')
12
+ address('')
13
13
  system(false)
14
14
  ldap()
15
15
  // sale()