address-client 3.0.31-aode → 3.0.33-aode

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.
@@ -16,7 +16,7 @@ var proxyTable = {
16
16
  '/rs/logic/getLogin': {
17
17
  target: str2
18
18
  },
19
- '/rs/sql/address_getAddress_ts': {
19
+ '/rs/logic/deleteAreaAll': {
20
20
  target: str
21
21
  },
22
22
  '/rs/logic/address_updateuseraddress': {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "address-client",
3
- "version": "3.0.31-aode",
3
+ "version": "3.0.33-aode",
4
4
  "description": "地址管理前台组件",
5
5
  "author": "wanbochao",
6
6
  "license": "ISC",
@@ -1,257 +1,327 @@
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' v-ref:cri>
5
- <div novalidate class="form-horizontal select-overspread container-fluid auto" partial>
6
- <div class="row">
7
- <div :class="$parent.$parent.style">
8
- <label class="font_normal_body">组织机构</label>
9
- <res-select restype='organization'
10
- @res-select="$parent.$parent.getorg"
11
- is-mul="false"
12
- :initresid='$parent.$parent.curorgid'>
13
- </res-select>
14
- </div>
15
- <div :class="$parent.$parent.style">
16
- <label class="font_normal_body">小区编号</label>
17
- <input type="text" class="input_search" style="width:60%" v-model="model.f_area_id"
18
- condition="f_area_id = '{}'" placeholder="小区编号"/>
19
- </div>
20
- <div :class="$parent.$parent.style" v-if="false">
21
- <label class="font_normal_body">省&emsp;&emsp;份</label>
22
- <input type="text" class="input_search" style="width:60%" v-model="model.f_province"
23
- condition="f_province like '%{}%'" placeholder="省份"/>
24
- </div>
25
- <!--<div :class="$parent.$parent.style" v-if="!$parent.$parent.$parent.areaShow">-->
26
- <div :class="$parent.$parent.style" v-if="false">
27
- <label class="font_normal_body">城&emsp;&emsp;市</label>
28
- <input type="text" class="input_search" style="width:60%" v-model="model.f_city"
29
- condition="f_city like '%{}%'" placeholder="城市"/>
30
- </div>
31
- <div :class="$parent.$parent.style" v-if="!$parent.$parent.$parent.areaShow">
32
- <label class="font_normal_body">区&emsp;&emsp;县</label>
33
- <input type="text" class="input_search" style="width:60%" v-model="model.f_district"
34
- condition="f_district like '%{}%'" placeholder="区县"/>
35
- </div>
36
- <div :class="$parent.$parent.style" v-if="!$parent.$parent.$parent.areaShow">
37
- <label class="font_normal_body">街&emsp;&emsp;道</label>
38
- <input type="text" class="input_search" style="width:60%" v-model="model.f_street"
39
- condition="f_street like '%{}%'" placeholder="街道"/>
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
- <div class="col-sm-4 form-group button-range">
52
- <button class="button_search button_spacing" @click="search()" >查询</button>
53
- <button v-if="!$parent.$parent.f_special" class="button_new button_spacing" style="width: max-content;" @click="$parent.$parent.add('小区')">添加小区</button>
54
- <button v-if="$parent.$parent.f_special"class="button_new button_spacing" style="width: max-content;" @click="$parent.$parent.add('单位')">添加单位</button>
55
- <button class="button_clear button_spacing" @click="$parent.$parent.clear()">清空</button>
56
- <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>
57
- </div>
58
- </div>
59
- <div class="row" v-if="$parent.$parent.criteriaShow">
60
- <div :class="$parent.$parent.style" v-if="$parent.$parent.$parent.areaShow">
61
- <label class="font_normal_body">城&emsp;&emsp;市</label>
62
- <input type="text" class="input_search" style="width:60%" v-model="model.f_city"
63
- condition="f_city like '%{}%'" placeholder="城市"
64
- :size="model.f_city ? model.f_city.length*2 : 6"/>
65
- </div>
66
- <div :class="$parent.$parent.style" v-if="$parent.$parent.$parent.areaShow">
67
- <label class="font_normal_body">区&emsp;&emsp;县</label>
68
- <input type="text" class="input_search" style="width:60%" v-model="model.f_district"
69
- condition="f_district like '%{}%'" placeholder="区县"
70
- :size="model.f_district ? model.f_district.length*2 : 6"/>
71
- </div>
72
- <div :class="$parent.$parent.style" v-if="$parent.$parent.$parent.areaShow">
73
- <label class="font_normal_body">街&emsp;&emsp;道</label>
74
- <input type="text" class="input_search" style="width:60%" v-model="model.f_street"
75
- condition="f_street like '%{}%'" placeholder="街道"
76
- :size="model.f_street ? model.f_street.length*2 : 6"/>
77
- </div>
78
- <div :class="$parent.$parent.style">
79
- <label class="font_normal_body">小&emsp;&emsp;区</label>
80
- <input type="text" class="input_search" style="width:60%" v-model="model.f_residential_area"
81
- condition="f_residential_area like '%{}%'" placeholder="小区"
82
- :size="model.f_residential_area ? model.f_residential_area.length*2 : 6"/>
83
- </div>
84
-
85
- </div>
86
- </div>
87
-
88
-
89
- </criteria>
90
- <data-grid :model="model" partial='list' class="list_area table_sy" v-ref:grid>
91
- <template partial='head'>
92
- <tr>
93
- <th><nobr>序号</nobr></th>
94
- <th v-if="false"><nobr>省份</nobr></th>
95
- <th v-if="false"><nobr>城市</nobr></th>
96
- <th><nobr>区/县</nobr></th>
97
- <th><nobr>街道名称</nobr></th>
98
- <!--民用小区信息开始-->
99
- <th v-if="!$parent.$parent.$parent.f_special"><nobr>小区名称</nobr></th>
100
- <th v-if="!$parent.$parent.$parent.f_special"><nobr>详细地址</nobr></th>
101
- <th v-if="!$parent.$parent.$parent.f_special"><nobr>小区备注</nobr></th>
102
- <!--民用小区信息结束-->
103
- <!--非民用单位信息开始-->
104
- <th v-if="$parent.$parent.$parent.f_special"><nobr>单位名称</nobr></th>
105
- <th v-if="$parent.$parent.$parent.f_special"><nobr>单位地址</nobr></th>
106
- <th v-if="$parent.$parent.$parent.f_special"><nobr>联系人</nobr></th>
107
- <th v-if="$parent.$parent.$parent.f_special"><nobr>联系电话</nobr></th>
108
- <!--非民用单位信息结束-->
109
- <th><nobr>片区/管理站 </nobr></th>
110
- <th><nobr>使用人数 </nobr></th>
111
- <th><nobr>关联地址 </nobr></th>
112
- <th><nobr>操作人</nobr></th>
113
- <th><nobr>操作日期</nobr></th>
114
- <th><nobr>操作</nobr></th>
115
-
116
- </tr>
117
- </template>
118
- <template partial='body'>
119
- <tr>
120
- <td style="text-align:center"><nobr>{{$index + 1}}</nobr></td>
121
- <td style="text-align:center" v-if="false"><nobr>{{row.f_province}}</nobr></td>
122
- <td style="text-align:center" v-if="false"><nobr>{{row.f_city}}</nobr></td>
123
- <td style="text-align:center"><nobr>{{row.f_district}}</nobr></td>
124
- <td style="text-align:center"><nobr>{{row.f_street}}</nobr></td>
125
- <td style="text-align:center"><nobr>{{row.f_residential_area}}</nobr></td>
126
- <td style="text-align:center"><nobr>{{row.f_area_address}}{{row.f_residential_area}}</nobr></td>
127
- <td style="text-align:center"><nobr>{{row.f_comments}}</nobr></td>
128
- <!--非民用单位信息开始-->
129
- <td v-if="$parent.$parent.$parent.f_special" style="text-align:center"><nobr>{{row.f_linkname}}</nobr></td>
130
- <td v-if="$parent.$parent.$parent.f_special" style="text-align:center"><nobr>{{row.f_linkphone}}</nobr></td>
131
- <!--非民用单位信息结束-->
132
- <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
- <td style="text-align:center"><nobr>{{row.f_operator}}</nobr></td>
136
- <td style="text-align:center"><nobr>{{row.f_operate_date}}</nobr></td>
137
- <td><nobr>
138
- <!--<button type="button" name="button" class="btn btn-link"
139
- @click.stop="$parent.$parent.$parent.modify(row)">修改</button>-->
140
- <button type="button" name="button" class="btn btn-link" v-if="row.areacount===0"
141
- @click.stop="$parent.$parent.$parent.delete(row)">删除</button>
142
- </nobr></td>
143
- </tr>
144
- </template>
145
- <template partial='foot'></template>
146
- </data-grid>
147
- </criteria-paged>
148
- </div>
149
- </template>
150
-
151
- <script>
152
- import { PagedList } from 'vue-client'
153
-
154
- export default {
155
-
156
- data () {
157
- return {
158
- criteriaShow: false,
159
- model: new PagedList('rs/sql/address_getarealist',20),
160
- addflag: false,
161
- addtitle:'',
162
-
163
- // 公司下拉
164
- curorgid: [this.$login.f.orgid],
165
- f_orgid: ''
166
- }
167
- },
168
- title: '小区管理',
169
- props:{
170
- f_filialeids:{
171
- type: String
172
- },
173
- style: {
174
- type: String,
175
- default: 'col-sm-2 form-group'
176
- },
177
- f_special:{
178
- type: String
179
- }
180
- },
181
- ready(){
182
- this.search()
183
- },
184
- 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
- hidden() {
192
- this.criteriaShow = !this.criteriaShow
193
- },
194
- search() {
195
- this.$refs.paged.$refs.cri.search()
196
- },
197
-
198
- async delete(row){
199
- if(row.id){
200
- var id = row.id
201
- let useraredss = await this.$resetpost('rs/sql/address_singleTable',
202
- {data: {
203
- items: 'f_residential_area_id',
204
- tablename: 't_user_address',
205
- condition: `f_residential_area_id='${id}'`}
206
- },
207
- {resolveMsg: null, rejectMsg: null})
208
- if(useraredss.data.length>0){
209
- this.$showAlert('该小区下已有地址信息,无法删除!','warning',1000)
210
- }else{
211
- this.$resetdelete('rs/entity/t_area', {id: id}, {resolveMsg: '删除成功', rejectMsg: '删除失败'}).then((res) => {
212
- this.$dispatch('cancel')
213
- })
214
- }
215
- }
216
- },
217
- add(val){
218
- if (this.f_filialeids) {
219
- this.$refs.paged.$refs.grid.selectStore.selected = null
220
- this.$dispatch('add')
221
- } else {
222
- this.$showAlert('请先选择左上角的所在分公司', 'warning', 2000)
223
- }
224
- },
225
- modify(val){
226
- this.$refs.paged.$refs.grid.selectStore.selected = null
227
- this.$dispatch('modify',val)
228
- },
229
- selfSearch (args) {
230
- this.$parent.usershow = false;
231
- this.$parent.areaShow = false;
232
- if (!this.f_orgid) {
233
- this.getorg([this.$login.f.orgid])
234
- }
235
- console.log('查询。。。', this.f_orgid)
236
- if(this.f_special){
237
- args.condition = `${args.condition} and s.f_special='1' and s.f_filialeid = '${this.f_filialeids}'`
238
- }else{
239
- args.condition = `${args.condition} and s.f_filialeid = ${this.f_orgid}`
240
- }
241
- this.model.search(args.condition, args.model)
242
- },
243
- //清空
244
- clear(){
245
- this.$refs.paged.$refs.cri.model = {}
246
- },
247
- getorg (val) {
248
- this.f_orgid = this.$login.convertToIn(val)
249
- this.f_filialeids = val[0]
250
- }
251
- },
252
- watch:{
253
-
254
- }
255
-
256
- }
257
- </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' v-ref:cri>
5
+ <div novalidate class="form-horizontal select-overspread container-fluid auto" partial>
6
+ <div class="row">
7
+ <div :class="$parent.$parent.style">
8
+ <label class="font_normal_body">组织机构</label>
9
+ <res-select restype='organization'
10
+ @res-select="$parent.$parent.getorg"
11
+ is-mul="false"
12
+ :initresid='$parent.$parent.curorgid'>
13
+ </res-select>
14
+ </div>
15
+ <div :class="$parent.$parent.style">
16
+ <label class="font_normal_body">小区编号</label>
17
+ <input type="text" class="input_search" style="width:60%" v-model="model.f_area_id"
18
+ condition="f_area_id = '{}'" placeholder="小区编号"/>
19
+ </div>
20
+ <div :class="$parent.$parent.style" v-if="false">
21
+ <label class="font_normal_body">省&emsp;&emsp;份</label>
22
+ <input type="text" class="input_search" style="width:60%" v-model="model.f_province"
23
+ condition="f_province like '%{}%'" placeholder="省份"/>
24
+ </div>
25
+ <!--<div :class="$parent.$parent.style" v-if="!$parent.$parent.$parent.areaShow">-->
26
+ <div :class="$parent.$parent.style" v-if="false">
27
+ <label class="font_normal_body">城&emsp;&emsp;市</label>
28
+ <input type="text" class="input_search" style="width:60%" v-model="model.f_city"
29
+ condition="f_city like '%{}%'" placeholder="城市"/>
30
+ </div>
31
+ <div :class="$parent.$parent.style" v-if="!$parent.$parent.$parent.areaShow">
32
+ <label class="font_normal_body">区&emsp;&emsp;县</label>
33
+ <input type="text" class="input_search" style="width:60%" v-model="model.f_district"
34
+ condition="f_district like '%{}%'" placeholder="区县"/>
35
+ </div>
36
+ <div :class="$parent.$parent.style" v-if="!$parent.$parent.$parent.areaShow">
37
+ <label class="font_normal_body">街&emsp;&emsp;道</label>
38
+ <input type="text" class="input_search" style="width:60%" v-model="model.f_street"
39
+ condition="f_street like '%{}%'" placeholder="街道"/>
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
+ <div class="col-sm-4 form-group button-range">
52
+ <button class="button_search button_spacing" @click="search()" >查询</button>
53
+ <button v-if="!$parent.$parent.f_special" class="button_new button_spacing" style="width: max-content;" @click="$parent.$parent.add('小区')">添加小区</button>
54
+ <button v-if="$parent.$parent.f_special"class="button_new button_spacing" style="width: max-content;" @click="$parent.$parent.add('单位')">添加单位</button>
55
+ <button v-if="$parent.$parent.checkitem.length>=1" class="button_clear button_spacing" @click="$parent.$parent.deleteall()">批量删除</button>
56
+ <button class="button_clear button_spacing" @click="$parent.$parent.clear()">清空</button>
57
+ <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>
58
+ </div>
59
+ </div>
60
+ <div class="row" v-if="$parent.$parent.criteriaShow">
61
+ <div :class="$parent.$parent.style" v-if="$parent.$parent.$parent.areaShow">
62
+ <label class="font_normal_body">城&emsp;&emsp;市</label>
63
+ <input type="text" class="input_search" style="width:60%" v-model="model.f_city"
64
+ condition="f_city like '%{}%'" placeholder="城市"
65
+ :size="model.f_city ? model.f_city.length*2 : 6"/>
66
+ </div>
67
+ <div :class="$parent.$parent.style" v-if="$parent.$parent.$parent.areaShow">
68
+ <label class="font_normal_body">区&emsp;&emsp;县</label>
69
+ <input type="text" class="input_search" style="width:60%" v-model="model.f_district"
70
+ condition="f_district like '%{}%'" placeholder="区县"
71
+ :size="model.f_district ? model.f_district.length*2 : 6"/>
72
+ </div>
73
+ <div :class="$parent.$parent.style" v-if="$parent.$parent.$parent.areaShow">
74
+ <label class="font_normal_body">街&emsp;&emsp;道</label>
75
+ <input type="text" class="input_search" style="width:60%" v-model="model.f_street"
76
+ condition="f_street like '%{}%'" placeholder="街道"
77
+ :size="model.f_street ? model.f_street.length*2 : 6"/>
78
+ </div>
79
+ <div :class="$parent.$parent.style">
80
+ <label class="font_normal_body">小&emsp;&emsp;区</label>
81
+ <input type="text" class="input_search" style="width:60%" v-model="model.f_residential_area"
82
+ condition="f_residential_area like '%{}%'" placeholder="小区"
83
+ :size="model.f_residential_area ? model.f_residential_area.length*2 : 6"/>
84
+ </div>
85
+
86
+ </div>
87
+ </div>
88
+
89
+
90
+ </criteria>
91
+ <data-grid :model="model" partial='list' class="list_area table_sy" v-ref:grid>
92
+ <template partial='head'>
93
+ <tr>
94
+ <th>
95
+ <input
96
+ type="checkbox"
97
+ v-model="$parent.$parent.$parent.checkall"
98
+ @change="$parent.$parent.$parent.chooseAll"
99
+ />
100
+ </th>
101
+ <th><nobr>序号</nobr></th>
102
+ <th v-if="false"><nobr>省份</nobr></th>
103
+ <th v-if="false"><nobr>城市</nobr></th>
104
+ <th><nobr>区/县</nobr></th>
105
+ <th><nobr>街道名称</nobr></th>
106
+ <!--民用小区信息开始-->
107
+ <th v-if="!$parent.$parent.$parent.f_special"><nobr>小区名称</nobr></th>
108
+ <th v-if="!$parent.$parent.$parent.f_special"><nobr>详细地址</nobr></th>
109
+ <th v-if="!$parent.$parent.$parent.f_special"><nobr>小区备注</nobr></th>
110
+ <!--民用小区信息结束-->
111
+ <!--非民用单位信息开始-->
112
+ <th v-if="$parent.$parent.$parent.f_special"><nobr>单位名称</nobr></th>
113
+ <th v-if="$parent.$parent.$parent.f_special"><nobr>单位地址</nobr></th>
114
+ <th v-if="$parent.$parent.$parent.f_special"><nobr>联系人</nobr></th>
115
+ <th v-if="$parent.$parent.$parent.f_special"><nobr>联系电话</nobr></th>
116
+ <!--非民用单位信息结束-->
117
+ <th><nobr>片区/管理站 </nobr></th>
118
+ <th><nobr>使用人数 </nobr></th>
119
+ <th><nobr>关联地址 </nobr></th>
120
+ <th><nobr>操作人</nobr></th>
121
+ <th><nobr>操作日期</nobr></th>
122
+ <th><nobr>操作</nobr></th>
123
+
124
+ </tr>
125
+ </template>
126
+ <template partial='body'>
127
+ <tr>
128
+ <td style="text-align: center">
129
+ <input
130
+ v-if="row.areacount===0"
131
+ :id="model.pageIndex"
132
+ type="checkbox"
133
+ @change="$parent.$parent.$parent.chooseOne($event, row, model.rows)"
134
+ :checked="$parent.$parent.$parent.ischecked(row.id)"
135
+ />
136
+ </td>
137
+ <td style="text-align:center"><nobr>{{$index + 1}}</nobr></td>
138
+ <td style="text-align:center" v-if="false"><nobr>{{row.f_province}}</nobr></td>
139
+ <td style="text-align:center" v-if="false"><nobr>{{row.f_city}}</nobr></td>
140
+ <td style="text-align:center"><nobr>{{row.f_district}}</nobr></td>
141
+ <td style="text-align:center"><nobr>{{row.f_street}}</nobr></td>
142
+ <td style="text-align:center"><nobr>{{row.f_residential_area}}</nobr></td>
143
+ <td style="text-align:center"><nobr>{{row.f_area_address}}{{row.f_residential_area}}</nobr></td>
144
+ <td style="text-align:center"><nobr>{{row.f_comments}}</nobr></td>
145
+ <!--非民用单位信息开始-->
146
+ <td v-if="$parent.$parent.$parent.f_special" style="text-align:center"><nobr>{{row.f_linkname}}</nobr></td>
147
+ <td v-if="$parent.$parent.$parent.f_special" style="text-align:center"><nobr>{{row.f_linkphone}}</nobr></td>
148
+ <!--非民用单位信息结束-->
149
+ <td style="text-align:center"><nobr>{{row.f_slice_area}}</nobr></td>
150
+ <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>
151
+ <td style="text-align:center"><nobr>{{row.addresscount}}</nobr></td>
152
+ <td style="text-align:center"><nobr>{{row.f_operator}}</nobr></td>
153
+ <td style="text-align:center"><nobr>{{row.f_operate_date}}</nobr></td>
154
+ <td><nobr>
155
+ <!--<button type="button" name="button" class="btn btn-link"
156
+ @click.stop="$parent.$parent.$parent.modify(row)">修改</button>-->
157
+ <button type="button" name="button" class="btn btn-link" v-if="row.areacount===0"
158
+ @click.stop="$parent.$parent.$parent.delete(row)">删除</button>
159
+ </nobr></td>
160
+ </tr>
161
+ </template>
162
+ <template partial='foot'></template>
163
+ </data-grid>
164
+ </criteria-paged>
165
+ </div>
166
+ </template>
167
+
168
+ <script>
169
+ import { PagedList } from 'vue-client'
170
+
171
+ export default {
172
+
173
+ data () {
174
+ return {
175
+ checkall:false,
176
+ checkitem:[],
177
+ criteriaShow: false,
178
+ model: new PagedList('rs/sql/address_getarealist',50),
179
+ addflag: false,
180
+ addtitle:'',
181
+
182
+ // 公司下拉
183
+ curorgid: [this.$login.f.orgid],
184
+ f_orgid: ''
185
+ }
186
+ },
187
+ title: '小区管理',
188
+ computed:{
189
+ ischeckall(){
190
+ let arr =[]
191
+ for(let i=0;i<this.model.rows.length;i++){
192
+ if(this.model.rows[i].areacount<1){
193
+ arr.push(this.model.rows[i].id)
194
+ }
195
+ }
196
+ if(arr.sort().toString()===this.checkitem.sort().toString() && this.checkitem.length>0){
197
+ console.log(arr.sort().toString())
198
+ console.log(this.checkitem.sort().toString())
199
+ // this.checkall = true
200
+ } else {
201
+ // this.checkall = false
202
+ }
203
+ // return this.checkall
204
+ }
205
+ },
206
+ props:{
207
+ f_filialeids:{
208
+ type: String
209
+ },
210
+ style: {
211
+ type: String,
212
+ default: 'col-sm-2 form-group'
213
+ },
214
+ f_special:{
215
+ type: String
216
+ }
217
+ },
218
+ ready(){
219
+ this.search()
220
+ },
221
+ methods: {
222
+ chooseAll(){
223
+ console.log(this.checkall)
224
+ if(this.checkall){
225
+ this.checkitem = []
226
+ for(let i=0;i<this.model.rows.length;i++){
227
+ if(this.model.rows[i].areacount<1){
228
+ this.checkitem.push(this.model.rows[i].id)
229
+ }
230
+ }
231
+ }else{
232
+ this.checkitem = []
233
+ }
234
+ },
235
+ chooseOne(e, row, rows) {
236
+ console.log("row", row);
237
+ let checked = e.target.checked;
238
+ console.log("state", e.target.checked);
239
+ if(checked===false){
240
+ this.checkitem.splice(this.checkitem.indexOf(row.id), 1)
241
+ } else {
242
+ this.checkitem.push(row.id)
243
+ }
244
+ },
245
+ ischecked(row){
246
+ return this.checkitem.indexOf(row)>-1
247
+ },
248
+ operate (f_residential_area_id,f_residential_area) {
249
+ this.$parent.areaShow = false;
250
+ this.$parent.usershow=true
251
+ this.$parent.f_residential_area_id=f_residential_area_id
252
+ this.$parent.f_residential_area=f_residential_area
253
+ },
254
+ hidden() {
255
+ this.criteriaShow = !this.criteriaShow
256
+ },
257
+ search() {
258
+ this.$refs.paged.$refs.cri.search()
259
+ },
260
+
261
+ async delete(row){
262
+ if(row.id){
263
+ var id = row.id
264
+ let useraredss = await this.$resetpost('rs/sql/address_singleTable',
265
+ {data: {
266
+ items: 'f_residential_area_id',
267
+ tablename: 't_user_address',
268
+ condition: `f_residential_area_id='${id}'`}
269
+ },
270
+ {resolveMsg: null, rejectMsg: null})
271
+ if(useraredss.data.length>0){
272
+ this.$showAlert('该小区下已有地址信息,无法删除!','warning',1000)
273
+ }else{
274
+ this.$resetdelete('rs/entity/t_area', {id: id}, {resolveMsg: '删除成功', rejectMsg: '删除失败'}).then((res) => {
275
+ this.$dispatch('cancel')
276
+ })
277
+ }
278
+ }
279
+ },
280
+ deleteall(){
281
+ this.$resetpost('rs/logic/deleteAreaAll',{data:{arr:this.checkitem}}).then((res)=>{
282
+ this.search()
283
+ })
284
+
285
+ },
286
+ add(val){
287
+ if (this.f_filialeids) {
288
+ this.$refs.paged.$refs.grid.selectStore.selected = null
289
+ this.$dispatch('add')
290
+ } else {
291
+ this.$showAlert('请先选择左上角的所在分公司', 'warning', 2000)
292
+ }
293
+ },
294
+ modify(val){
295
+ this.$refs.paged.$refs.grid.selectStore.selected = null
296
+ this.$dispatch('modify',val)
297
+ },
298
+ selfSearch (args) {
299
+ this.checkall = false;
300
+ this.$parent.usershow = false;
301
+ this.$parent.areaShow = false;
302
+ if (!this.f_orgid) {
303
+ this.getorg([this.$login.f.orgid])
304
+ }
305
+ console.log('查询。。。', this.f_orgid)
306
+ if(this.f_special){
307
+ args.condition = `${args.condition} and s.f_special='1' and s.f_filialeid = '${this.f_filialeids}'`
308
+ }else{
309
+ args.condition = `${args.condition} and s.f_filialeid = ${this.f_orgid}`
310
+ }
311
+ this.model.search(args.condition, args.model)
312
+ },
313
+ //清空
314
+ clear(){
315
+ this.$refs.paged.$refs.cri.model = {}
316
+ },
317
+ getorg (val) {
318
+ this.f_orgid = this.$login.convertToIn(val)
319
+ this.f_filialeids = val[0]
320
+ }
321
+ },
322
+ watch:{
323
+
324
+ }
325
+
326
+ }
327
+ </script>