address-client 3.2.85 → 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.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "address-client",
3
- "version": "3.2.85",
3
+ "version": "3.2.86",
4
4
  "description": "地址管理前台组件",
5
5
  "author": "wanbochao",
6
6
  "license": "ISC",
@@ -24,7 +24,7 @@
24
24
  class="input_search" style="width:60%" placeholder="街道办名称"
25
25
  v-validate:f_street_manage_name='{required: true }'>
26
26
  </div>
27
- <div class="col-sm-6 form-group " v-if="config.hasnumber"
27
+ <div class="col-sm-6 form-group"
28
28
  :class="[$v.f_street_manage_number.required ? 'has-error' : 'has-success']">
29
29
  <label class="font_normal_body">街道办编号</label>
30
30
  <input type="text" v-model="streetmanagemodel.f_street_manage_number"
@@ -64,13 +64,13 @@
64
64
  <script>
65
65
  import {HttpResetClass} from 'vue-client'
66
66
 
67
- let getAreaConfig = async function (self) {
68
- // 获取气价里面的配置
69
- await self.$getConfig(self, 'StreetManage')
70
- console.log('原地址配置', self.config)
71
- console.log('获取地址配置', self.config)
72
- Object.assign(self.model, self.config)
73
- }
67
+ // let getAreaConfig = async function (self) {
68
+ // // 获取气价里面的配置
69
+ // await self.$getConfig(self, 'StreetManage')
70
+ // console.log('原地址配置', self.config)
71
+ // console.log('获取地址配置', self.config)
72
+ // Object.assign(self.model, self.config)
73
+ // }
74
74
  export default {
75
75
  title: '街道办信息添加',
76
76
  data() {
@@ -96,28 +96,23 @@ export default {
96
96
  props: ['f_filialeids', 'businesstype'],
97
97
  ready() {
98
98
  this.initdata()
99
- getAreaConfig(this)
99
+ // getAreaConfig(this)
100
100
  },
101
101
  methods: {
102
102
  async streetyanzheng() {
103
103
  console.log(this.streetmanagemodel.f_street_manage_number.length)
104
- if (this.streetmanagemodel.f_street_manage_number.length != 2) {
105
- this.$showAlert('请输入正确的位数', 'warning', 2000)
106
- this.streetmanagemodel.f_street_manage_number = ''
107
- } else {
108
- let res = await this.$resetpost('rs/sql/address_singleTableOrderBy', {
104
+ let res = await this.$resetpost('rs/sql/address_singleTableOrderBy', {
109
105
  data: {
110
106
  items: '*',
111
107
  tablename: 't_street_manage',
112
108
  orderitem: 'id',
113
- condition: `f_street_manage_number = '${this.streetmanagemodel.f_street_manage_number}' and f_orgid = '${this.$login.f.orgid}'`
114
- }
115
- }, {resolveMsg: null, rejectMsg: null})
116
- if (res.data.length > 0) {
117
- if (res.data[0].id != this.streetmanagemodel.id) {
118
- this.$showAlert('当前编号已存在', 'warning', 2000)
119
- this.streetmanagemodel.f_street_manage_number = ''
109
+ condition: `f_street_manage_number = '${this.streetmanagemodel.f_street_manage_number}'`
120
110
  }
111
+ }, {resolveMsg: null, rejectMsg: null})
112
+ if (res.data.length > 0) {
113
+ if (res.data[0].id != this.streetmanagemodel.id) {
114
+ this.$showAlert('当前编号已存在', 'warning', 2000)
115
+ this.streetmanagemodel.f_street_manage_number = ''
121
116
  }
122
117
  }
123
118
  },
@@ -237,7 +237,7 @@
237
237
  items: '*',
238
238
  tablename: 't_street_manage',
239
239
  orderitem: 'id',
240
- condition: pconditon
240
+ condition: '1=1'
241
241
  }
242
242
  }, {resolveMsg: null, rejectMsg: null}).then((req) => {
243
243
  let redata = []
@@ -1,243 +1,243 @@
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 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_new button_spacing" style="width: max-content;" @click="$parent.$parent.add('街道')">添加街道</button>
23
- <button class="button_clear button_spacing" @click="$parent.$parent.clear()">清空</button>
24
- <export-excel :data="$parent.$parent.getCondition"
25
- :field="$parent.$parent.getfield"
26
- sqlurl="rs/logic/exportfile"
27
- sql-name="manage_getstreetlist"
28
- template-name='街道信息查询导出'
29
- :choose-col="true"></export-excel>
30
- <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>
31
- </div>
32
- </div>
33
- <div class="row" v-show="$parent.$parent.criteriaShow">
34
- <div class="form-group" v-if="$parent.$parent.$parent.areaShow" :class="{'col-sm-3':$parent.$parent.$parent.areaShow,'col-sm-2':!$parent.$parent.$parent.areaShow}">
35
- <label class="font_normal_body">省&emsp;&emsp;份</label>
36
- <input type="text" style="width:60%" class="input_search" v-model="model.f_province"
37
- condition="f_province like '%{}%'" placeholder="省份"
38
- :size="model.f_province ? model.f_province.length*2 : 6"/>
39
- </div>
40
- <div class="form-group" v-if="$parent.$parent.$parent.areaShow" :class="{'col-sm-3':$parent.$parent.$parent.areaShow,'col-sm-2':!$parent.$parent.$parent.areaShow}">
41
- <label class="font_normal_body">城&emsp;&emsp;市</label>
42
- <input type="text" style="width:60%" class="input_search" v-model="model.f_city"
43
- condition="f_city like '%{}%'" placeholder="城市"
44
- :size="model.f_city ? model.f_city.length*2 : 6"/>
45
- </div>
46
- <div class="form-group" v-if="!$parent.$parent.$parent.areaShow" :class="{'col-sm-3':$parent.$parent.$parent.areaShow,'col-sm-2':!$parent.$parent.$parent.areaShow}">
47
- <label class="font_normal_body">省&emsp;&emsp;份</label>
48
- <input type="text" style="width:60%" class="input_search" v-model="model.f_province"
49
- condition="f_province like '%{}%'" placeholder="省份"
50
- :size="model.f_province ? model.f_province.length*2 : 6"/>
51
- </div>
52
- <div class="form-group" v-if="!$parent.$parent.$parent.areaShow" :class="{'col-sm-3':$parent.$parent.$parent.areaShow,'col-sm-2':!$parent.$parent.$parent.areaShow}">
53
- <label class="font_normal_body">城&emsp;&emsp;市</label>
54
- <input type="text" style="width:60%" class="input_search" v-model="model.f_city"
55
- condition="f_city like '%{}%'" placeholder="城市"
56
- :size="model.f_city ? model.f_city.length*2 : 6"/>
57
- </div>
58
- <div class="form-group" :class="{'col-sm-3':$parent.$parent.$parent.areaShow,'col-sm-2':!$parent.$parent.$parent.areaShow}">
59
- <label class="font_normal_body">区&emsp;&emsp;县</label>
60
- <input type="text" style="width:60%" class="input_search" v-model="model.f_district"
61
- condition="f_district like '%{}%'" placeholder="区县"
62
- :size="model.f_district ? model.f_district.length*2 : 6"/>
63
- </div>
64
- </div>
65
- </div>
66
- </criteria>
67
- <data-grid :model="model" partial='list' class="list_area table_sy" v-ref:grid>
68
- <template partial='head'>
69
- <tr>
70
- <th><nobr>序号</nobr></th>
71
- <th><nobr>省份</nobr></th>
72
- <th><nobr>城市</nobr></th>
73
- <th><nobr>区/县</nobr></th>
74
- <th><nobr>街道办</nobr></th>
75
- <th><data-order field="f_iscity" name="地区类型"
76
- :order.sync="$parent.$parent.$parent.$parent.orderFields.f_iscity"></data-order></th>
77
- <th><nobr>街道/乡镇</nobr></th>
78
- <th><nobr>街道编号</nobr></th>
79
- <th><data-order field="f_address" name="地址"
80
- :order.sync="$parent.$parent.$parent.$parent.orderFields.f_address"></data-order></th>
81
- <th><nobr>分公司</nobr></th>
82
- <th title="该街道下现有的小区数"><nobr>小区数量</nobr></th>
83
- <th><nobr>操作</nobr></th>
84
- </tr>
85
- </template>
86
- <template partial='body'>
87
- <tr @click="$parent.$parent.changestyle()">
88
- <td style="text-align:center"><nobr>{{$index + 1}}</nobr></td>
89
- <td style="text-align:center"><nobr>{{row.f_province}}</nobr></td>
90
- <td style="text-align:center"><nobr>{{row.f_city}}</nobr></td>
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>
93
- <td style="text-align:center"><nobr>{{row.f_iscity}}</nobr></td>
94
- <td style="text-align:center"><nobr>{{row.f_street}}</nobr></td>
95
- <td style="text-align:center"><nobr>{{row.f_street_number}}</nobr></td>
96
- <td style="text-align:center"><nobr>{{row.f_pcd}}{{row.f_street}}</nobr></td>
97
- <td style="text-align:center"><nobr>{{row.f_org_name}}</nobr></td>
98
- <td style="text-align:center"><nobr>{{row.streenum}}</nobr></td>
99
- <td style="text-align:center"><nobr>
100
- <!-- <button type="button" name="button" class="btn btn-link"
101
- @click.stop="$parent.$parent.$parent.modify(row)">修改</button>-->
102
- <button v-if="!row.streetid" type="button" name="button" class="btn btn-danger"
103
- style="padding: 5px 12px"
104
- @click.stop="$parent.$parent.$parent.delete(row)">删除</button>
105
- </nobr></td>
106
- </tr>
107
- </template>
108
- <template partial='foot'></template>
109
- </data-grid>
110
- </criteria-paged>
111
- </div>
112
- </template>
113
-
114
- <script>
115
- import { PagedList } from 'vue-client'
116
- let readyGen = async function (self) {
117
- self.getfield = self.config.excelHeaders
118
- }
119
- export default {
120
- data () {
121
- return {
122
- criteriaShow: false,
123
- model: new PagedList('rs/sql/address_getstreetlist',20,{orderitem: this.orderitem?'"' + this.orderitem + ' "':`'f_city,f_district,f_iscity,f_street desc'`}),
124
- addflag: false,
125
- getfield: {},
126
- //排序
127
- orderitem:'f_city,f_district,f_iscity,f_street desc',
128
- addtitle:'',
129
- // 公司下拉
130
- curorgid: [this.$login.f.orgid],
131
- f_orgid: '',
132
- config: {
133
- // 导出列要和查询列相同
134
- excelHeaders: {
135
- 'f_province':'省份',
136
- 'f_city':'城市',
137
- 'f_district':'区/县',
138
- 'f_street_manage_name':'街道办',
139
- 'f_street':'街道名称',
140
- 'f_org_name':'分公司',
141
- 'streenum':'小区数量'
142
- }
143
- },
144
- orderFields: {
145
- f_operate_date: 'no'
146
- },
147
- }
148
- },
149
- title: '街道管理',
150
- props:{
151
- f_filialeids:{
152
- type: String
153
- }
154
- },
155
- ready(){
156
- readyGen(this)
157
- this.search()
158
- },
159
- methods: {
160
- hidden() {
161
- this.criteriaShow = !this.criteriaShow
162
- },
163
- search () {
164
- this.$refs.paged.$refs.cri.search()
165
- },
166
- async delete(row){
167
- if(row.id >= 0 ){
168
- var id = row.id
169
- let useraredss = await this.$resetpost('rs/sql/address_singleTable',
170
- {data: {
171
- items: 'f_street_id',
172
- tablename: 't_area',
173
- condition: `f_street_id='${id}'`}
174
- },
175
- {resolveMsg: null, rejectMsg: null})
176
- if(useraredss.data.length>0){
177
- this.$showAlert('该街道下已有小区信息,无法删除!','warning',1000)
178
- }else{
179
- this.$resetdelete('rs/entity/t_street', {id: id}, {resolveMsg: '删除成功', rejectMsg: '删除失败'}).then((res) => {
180
- this.$dispatch('cancel')
181
- })
182
- }
183
- }
184
- },
185
- add(val){
186
- if (this.f_filialeids) {
187
- this.$refs.paged.$refs.grid.selectStore.selected = null
188
- this.$dispatch('add',val)
189
- } else {
190
- this.$showAlert('请先选择左上角的所在分公司', 'warning', 2000)
191
- }
192
- },
193
- modify(val){
194
- this.$refs.paged.$refs.grid.selectStore.selected = null
195
- this.$dispatch('modify',val)
196
- },
197
- selfSearch (args) {
198
- if (!this.f_orgid) {
199
- this.getorg([this.$login.f.orgid])
200
- }
201
- args.condition = `${args.condition} and s.f_filialeid in ${this.f_orgid}`
202
- this.model.search(args.condition, args.model)
203
- },
204
- //清空
205
- clear(){
206
- this.$refs.paged.$refs.cri.model = {}
207
- },
208
- getorg (val) {
209
- this.f_orgid = this.$login.convertToIn(val)
210
- this.f_filialeids = val[0]
211
- }
212
- },
213
- computed: {
214
- getCondition() {
215
- return {
216
- condition: `${this.$refs.paged.$refs.cri.condition}` + `and s.f_filialeid = '${this.f_filialeids}'`,
217
- orderitem: this.orderitem?`${this.orderitem}`: " id desc"
218
- }
219
- }
220
- },
221
- events:{
222
- 'sort' (field, rule) {
223
- // 将所有排序方式设为不排序,实现相互排斥
224
- console.log("field",field, rule)
225
- for (let key in this.orderFields) {
226
- if (key === field) {
227
- this.orderFields[key] = rule
228
- } else {
229
- this.orderFields[key] = 'no'
230
- }
231
- }
232
- // 如果新规则不排序,还原为默认排序
233
- if (rule === 'no') {
234
- this.model.paramSource.orderitem = `'${this.orderitem}'`
235
- } else {
236
- this.model.paramSource.orderitem = `'${field} ${rule}'`
237
- }
238
-
239
- this.search()
240
- },
241
- },
242
- }
243
- </script>
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 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_new button_spacing" style="width: max-content;" @click="$parent.$parent.add('街道')">添加街道</button>
23
+ <button class="button_clear button_spacing" @click="$parent.$parent.clear()">清空</button>
24
+ <export-excel :data="$parent.$parent.getCondition"
25
+ :field="$parent.$parent.getfield"
26
+ sqlurl="rs/logic/exportfile"
27
+ sql-name="manage_getstreetlist"
28
+ template-name='街道信息查询导出'
29
+ :choose-col="true"></export-excel>
30
+ <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>
31
+ </div>
32
+ </div>
33
+ <div class="row" v-show="$parent.$parent.criteriaShow">
34
+ <div class="form-group" v-if="$parent.$parent.$parent.areaShow" :class="{'col-sm-3':$parent.$parent.$parent.areaShow,'col-sm-2':!$parent.$parent.$parent.areaShow}">
35
+ <label class="font_normal_body">省&emsp;&emsp;份</label>
36
+ <input type="text" style="width:60%" class="input_search" v-model="model.f_province"
37
+ condition="f_province like '%{}%'" placeholder="省份"
38
+ :size="model.f_province ? model.f_province.length*2 : 6"/>
39
+ </div>
40
+ <div class="form-group" v-if="$parent.$parent.$parent.areaShow" :class="{'col-sm-3':$parent.$parent.$parent.areaShow,'col-sm-2':!$parent.$parent.$parent.areaShow}">
41
+ <label class="font_normal_body">城&emsp;&emsp;市</label>
42
+ <input type="text" style="width:60%" class="input_search" v-model="model.f_city"
43
+ condition="f_city like '%{}%'" placeholder="城市"
44
+ :size="model.f_city ? model.f_city.length*2 : 6"/>
45
+ </div>
46
+ <div class="form-group" v-if="!$parent.$parent.$parent.areaShow" :class="{'col-sm-3':$parent.$parent.$parent.areaShow,'col-sm-2':!$parent.$parent.$parent.areaShow}">
47
+ <label class="font_normal_body">省&emsp;&emsp;份</label>
48
+ <input type="text" style="width:60%" class="input_search" v-model="model.f_province"
49
+ condition="f_province like '%{}%'" placeholder="省份"
50
+ :size="model.f_province ? model.f_province.length*2 : 6"/>
51
+ </div>
52
+ <div class="form-group" v-if="!$parent.$parent.$parent.areaShow" :class="{'col-sm-3':$parent.$parent.$parent.areaShow,'col-sm-2':!$parent.$parent.$parent.areaShow}">
53
+ <label class="font_normal_body">城&emsp;&emsp;市</label>
54
+ <input type="text" style="width:60%" class="input_search" v-model="model.f_city"
55
+ condition="f_city like '%{}%'" placeholder="城市"
56
+ :size="model.f_city ? model.f_city.length*2 : 6"/>
57
+ </div>
58
+ <div class="form-group" :class="{'col-sm-3':$parent.$parent.$parent.areaShow,'col-sm-2':!$parent.$parent.$parent.areaShow}">
59
+ <label class="font_normal_body">区&emsp;&emsp;县</label>
60
+ <input type="text" style="width:60%" class="input_search" v-model="model.f_district"
61
+ condition="f_district like '%{}%'" placeholder="区县"
62
+ :size="model.f_district ? model.f_district.length*2 : 6"/>
63
+ </div>
64
+ </div>
65
+ </div>
66
+ </criteria>
67
+ <data-grid :model="model" partial='list' class="list_area table_sy" v-ref:grid>
68
+ <template partial='head'>
69
+ <tr>
70
+ <th><nobr>序号</nobr></th>
71
+ <th><nobr>省份</nobr></th>
72
+ <th><nobr>城市</nobr></th>
73
+ <th><nobr>区/县</nobr></th>
74
+ <th><nobr>街道办</nobr></th>
75
+ <th><data-order field="f_iscity" name="地区类型"
76
+ :order.sync="$parent.$parent.$parent.$parent.orderFields.f_iscity"></data-order></th>
77
+ <th><nobr>街道/乡镇</nobr></th>
78
+ <th><nobr>街道编号</nobr></th>
79
+ <th><data-order field="f_address" name="地址"
80
+ :order.sync="$parent.$parent.$parent.$parent.orderFields.f_address"></data-order></th>
81
+ <th><nobr>分公司</nobr></th>
82
+ <th title="该街道下现有的小区数"><nobr>小区数量</nobr></th>
83
+ <th><nobr>操作</nobr></th>
84
+ </tr>
85
+ </template>
86
+ <template partial='body'>
87
+ <tr @click="$parent.$parent.changestyle()">
88
+ <td style="text-align:center"><nobr>{{$index + 1}}</nobr></td>
89
+ <td style="text-align:center"><nobr>{{row.f_province}}</nobr></td>
90
+ <td style="text-align:center"><nobr>{{row.f_city}}</nobr></td>
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>
93
+ <td style="text-align:center"><nobr>{{row.f_iscity}}</nobr></td>
94
+ <td style="text-align:center"><nobr>{{row.f_street}}</nobr></td>
95
+ <td style="text-align:center"><nobr>{{row.f_street_number}}</nobr></td>
96
+ <td style="text-align:center"><nobr>{{row.f_pcd}}{{row.f_street}}</nobr></td>
97
+ <td style="text-align:center"><nobr>{{row.f_org_name}}</nobr></td>
98
+ <td style="text-align:center"><nobr>{{row.streenum}}</nobr></td>
99
+ <td style="text-align:center"><nobr>
100
+ <!-- <button type="button" name="button" class="btn btn-link"
101
+ @click.stop="$parent.$parent.$parent.modify(row)">修改</button>-->
102
+ <button v-if="!row.streetid" type="button" name="button" class="btn btn-danger"
103
+ style="padding: 5px 12px"
104
+ @click.stop="$parent.$parent.$parent.delete(row)">删除</button>
105
+ </nobr></td>
106
+ </tr>
107
+ </template>
108
+ <template partial='foot'></template>
109
+ </data-grid>
110
+ </criteria-paged>
111
+ </div>
112
+ </template>
113
+
114
+ <script>
115
+ import { PagedList } from 'vue-client'
116
+ let readyGen = async function (self) {
117
+ self.getfield = self.config.excelHeaders
118
+ }
119
+ export default {
120
+ data () {
121
+ return {
122
+ criteriaShow: false,
123
+ model: new PagedList('rs/sql/address_getstreetlist',20,{orderitem: this.orderitem?'"' + this.orderitem + ' "':`'f_city,f_district,f_iscity,f_street desc'`}),
124
+ addflag: false,
125
+ getfield: {},
126
+ //排序
127
+ orderitem:'f_city,f_district,f_iscity,f_street desc',
128
+ addtitle:'',
129
+ // 公司下拉
130
+ curorgid: [this.$login.f.orgid],
131
+ f_orgid: '',
132
+ config: {
133
+ // 导出列要和查询列相同
134
+ excelHeaders: {
135
+ 'f_province':'省份',
136
+ 'f_city':'城市',
137
+ 'f_district':'区/县',
138
+ 'f_street_manage_name':'街道办',
139
+ 'f_street':'街道名称',
140
+ 'f_org_name':'分公司',
141
+ 'streenum':'小区数量'
142
+ }
143
+ },
144
+ orderFields: {
145
+ f_operate_date: 'no'
146
+ },
147
+ }
148
+ },
149
+ title: '街道管理',
150
+ props:{
151
+ f_filialeids:{
152
+ type: String
153
+ }
154
+ },
155
+ ready(){
156
+ readyGen(this)
157
+ this.search()
158
+ },
159
+ methods: {
160
+ hidden() {
161
+ this.criteriaShow = !this.criteriaShow
162
+ },
163
+ search () {
164
+ this.$refs.paged.$refs.cri.search()
165
+ },
166
+ async delete(row){
167
+ if(row.id >= 0 ){
168
+ var id = row.id
169
+ let useraredss = await this.$resetpost('rs/sql/address_singleTable',
170
+ {data: {
171
+ items: 'f_street_id',
172
+ tablename: 't_area',
173
+ condition: `f_street_id='${id}'`}
174
+ },
175
+ {resolveMsg: null, rejectMsg: null})
176
+ if(useraredss.data.length>0){
177
+ this.$showAlert('该街道下已有小区信息,无法删除!','warning',1000)
178
+ }else{
179
+ this.$resetdelete('rs/entity/t_street', {id: id}, {resolveMsg: '删除成功', rejectMsg: '删除失败'}).then((res) => {
180
+ this.$dispatch('cancel')
181
+ })
182
+ }
183
+ }
184
+ },
185
+ add(val){
186
+ if (this.f_filialeids) {
187
+ this.$refs.paged.$refs.grid.selectStore.selected = null
188
+ this.$dispatch('add',val)
189
+ } else {
190
+ this.$showAlert('请先选择左上角的所在分公司', 'warning', 2000)
191
+ }
192
+ },
193
+ modify(val){
194
+ this.$refs.paged.$refs.grid.selectStore.selected = null
195
+ this.$dispatch('modify',val)
196
+ },
197
+ selfSearch (args) {
198
+ if (!this.f_orgid) {
199
+ this.getorg([this.$login.f.orgid])
200
+ }
201
+ args.condition = `${args.condition} and s.f_filialeid in ${this.f_orgid}`
202
+ this.model.search(args.condition, args.model)
203
+ },
204
+ //清空
205
+ clear(){
206
+ this.$refs.paged.$refs.cri.model = {}
207
+ },
208
+ getorg (val) {
209
+ this.f_orgid = this.$login.convertToIn(val)
210
+ this.f_filialeids = val[0]
211
+ }
212
+ },
213
+ computed: {
214
+ getCondition() {
215
+ return {
216
+ condition: `${this.$refs.paged.$refs.cri.condition}` + `and s.f_filialeid = '${this.f_filialeids}'`,
217
+ orderitem: this.orderitem?`${this.orderitem}`: " id desc"
218
+ }
219
+ }
220
+ },
221
+ events:{
222
+ 'sort' (field, rule) {
223
+ // 将所有排序方式设为不排序,实现相互排斥
224
+ console.log("field",field, rule)
225
+ for (let key in this.orderFields) {
226
+ if (key === field) {
227
+ this.orderFields[key] = rule
228
+ } else {
229
+ this.orderFields[key] = 'no'
230
+ }
231
+ }
232
+ // 如果新规则不排序,还原为默认排序
233
+ if (rule === 'no') {
234
+ this.model.paramSource.orderitem = `'${this.orderitem}'`
235
+ } else {
236
+ this.model.paramSource.orderitem = `'${field} ${rule}'`
237
+ }
238
+
239
+ this.search()
240
+ },
241
+ },
242
+ }
243
+ </script>
@@ -13,8 +13,13 @@
13
13
  </div>
14
14
  <div class="form-group" :class="{'col-sm-3':$parent.$parent.$parent.areaShow,'col-sm-2':!$parent.$parent.$parent.areaShow}">
15
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="街道名称"/>
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="街道办编号"/>
18
23
  </div>
19
24
  <div class="col-sm-4 form-group button-range">
20
25
  <button class="button_search button_spacing" @click="search()" >查询</button>
@@ -23,7 +28,7 @@
23
28
  <export-excel :data="$parent.$parent.getCondition"
24
29
  :field="$parent.$parent.getfield"
25
30
  sqlurl="rs/logic/exportfile"
26
- sql-name="manage_getstreetlist"
31
+ sql-name="manage_getStreetManageList"
27
32
  template-name='街道办信息查询导出'
28
33
  :choose-col="true"></export-excel>
29
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>
@@ -133,11 +138,6 @@
133
138
  }
134
139
  },
135
140
  title: '街道办管理',
136
- props:{
137
- f_filialeids:{
138
- type: String
139
- }
140
- },
141
141
  ready(){
142
142
  readyGen(this)
143
143
  this.search()
@@ -180,7 +180,7 @@
180
180
  if (!this.f_orgid) {
181
181
  this.getorg([this.$login.f.orgid])
182
182
  }
183
- args.condition = `${args.condition} and sm.f_filialeid in ${this.f_orgid}`
183
+ args.condition = `${args.condition}`
184
184
  this.model.search(args.condition, args.model)
185
185
  },
186
186
  //清空
@@ -195,7 +195,7 @@
195
195
  computed: {
196
196
  getCondition() {
197
197
  return {
198
- condition: `${this.$refs.paged.$refs.cri.condition}` + `and sm.f_filialeid = '${this.f_filialeids}'`,
198
+ condition: `${this.$refs.paged.$refs.cri.condition}`,
199
199
  orderitem: this.orderitem ? `${this.orderitem}` : " id desc"
200
200
  }
201
201
  }