address-client 3.2.5 → 3.2.6

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.
Files changed (32) hide show
  1. package/.gradle/{6.1/fileChanges → 3.5/file-changes}/last-build.bin +0 -0
  2. package/.gradle/3.5/taskHistory/taskHistory.lock +0 -0
  3. package/.gradle/{6.1/gc.properties → buildOutputCleanup/built.bin} +0 -0
  4. package/.gradle/buildOutputCleanup/cache.properties +2 -2
  5. package/.gradle/buildOutputCleanup/cache.properties.lock +1 -0
  6. package/AddressClient.iml +13 -0
  7. package/build/dev-server.js +10 -15
  8. package/package.json +1 -1
  9. package/src/components/CityList.vue +133 -133
  10. package/src/components/StreetList.vue +210 -210
  11. package/src/components/UserAddress.vue +2 -4
  12. package/src/filiale/WEINAN/AddAreaMsg.vue +656 -656
  13. package/src/filiale/WEINAN/AddressList.vue +357 -357
  14. package/src/filiale/gaomi/AddressList.vue +430 -430
  15. package/src/filiale/gaomi/sale.js +14 -14
  16. package/src/filiale/shaoguan/UserAddress.vue +764 -764
  17. package/src/filiale/shaoguan/sale.js +11 -11
  18. package/src/filiale/tongchuan/AreaList.vue +315 -315
  19. package/src/filiale/tongchuan/CityList.vue +133 -133
  20. package/src/filiale/tongchuan/StreetList.vue +208 -208
  21. package/src/filiale/tongchuan/sale.js +19 -19
  22. package/.gradle/6.1/executionHistory/executionHistory.bin +0 -0
  23. package/.gradle/6.1/executionHistory/executionHistory.lock +0 -0
  24. package/.gradle/6.1/fileHashes/fileHashes.bin +0 -0
  25. package/.gradle/6.1/fileHashes/fileHashes.lock +0 -0
  26. package/.gradle/buildOutputCleanup/buildOutputCleanup.lock +0 -0
  27. package/.gradle/checksums/checksums.lock +0 -0
  28. package/.gradle/vcs-1/gc.properties +0 -0
  29. package/gradle/wrapper/gradle-wrapper.jar +0 -0
  30. package/gradle/wrapper/gradle-wrapper.properties +0 -5
  31. package/gradlew +0 -183
  32. package/gradlew.bat +0 -100
@@ -1,357 +1,357 @@
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
-
7
- <div class="row">
8
-
9
- <div :class="$parent.$parent.style">
10
- <label class="font_normal_body">组织机构</label>
11
- <res-select
12
- restype='organization'
13
- @res-select="$parent.$parent.getorg"
14
- is-mul="false"
15
- :initresid='$parent.$parent.curorgid'
16
- >
17
- </res-select>
18
- </div>
19
- <div :class="$parent.$parent.style" v-if="$parent.$parent.showrightchange">
20
- <label class="font_normal_body">用户编号</label>
21
- <input type="text" class="input_search" style="width:60%" v-model="model.f_userinfo_code" style="width:60%"
22
- condition="f_userinfo_code = '{}'" placeholder="用户编号"/>
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
- <export-excel :data="$parent.$parent.getCondition"
45
- :field="$parent.$parent.getfield"
46
- sqlurl="rs/logic/exportfile"
47
- sql-name="addressGetAddress"
48
- template-name='地址管理查询导出'
49
- :choose-col="true"></export-excel>
50
- <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>
51
- </div>
52
- </div>
53
- <div class="row" v-show="$parent.$parent.criteriaShow">
54
- <div :class="$parent.$parent.style" v-if="!$parent.$parent.showrightchange">
55
- <label class="font_normal_body">用户编号</label>
56
- <input type="text" class="input_search" style="width:60%" v-model="model.f_userinfo_code" style="width:60%"
57
- condition="f_userinfo_code = '{}'" placeholder="用户编号"/>
58
- </div>
59
- <div v-if="!$parent.$parent.showrightchange" :class="$parent.$parent.style">
60
- <label class="font_normal_body">小&emsp;&emsp;区</label>
61
- <input type="text" class="input_search" style="width:60%" v-model="model.f_residential_arearea" style="width:60%"
62
- condition="a.f_residential_area like '%{}%'" placeholder="小区"
63
- :size="model.f_residential_arearea ? model.f_residential_arearea.length*2 : 8"/>
64
- </div>
65
- <div :class="$parent.$parent.style" v-if="!$parent.$parent.$parent.showrightchange">
66
- <label class="font_normal_body">楼&emsp;&emsp;号</label>
67
- <input type="text" class="input_search" style="width:60%" v-model="model.f_building" style="width:60%"
68
- condition="a.f_building like '%{}%'" placeholder="楼号"
69
- :size="model.f_building ? model.f_building.length*2 : 6"/>
70
- </div>
71
- <div :class="$parent.$parent.style" >
72
- <label class="font_normal_body">单&emsp;&emsp;元</label>
73
- <input type="text" class="input_search" style="width:60%" v-model="model.f_unit" style="width:60%"
74
- condition="a.f_unit like '%{}%'" placeholder="单元"
75
- :size="model.f_unit ? model.f_unit.length*2 : 6"/>
76
- </div>
77
- <div :class="$parent.$parent.style">
78
- <label class="font_normal_body">楼&emsp;&emsp;层</label>
79
- <input type="text" class="input_search" style="width:60%" v-model="model.f_floor" style="width:60%"
80
- condition="a.f_floor like '%{}%'" placeholder="楼层"
81
- :size="model.f_floor ? model.f_floor.length*2 : 6"/>
82
- </div>
83
- <div :class="$parent.$parent.style">
84
- <label class="font_normal_body">门&ensp;牌&ensp;号</label>
85
- <input type="text" class="input_search" style="width:60%" v-model="model.f_room" style="width:60%"
86
- condition="a.f_room like '%{}%'" placeholder="门牌号"
87
- :size="model.f_room ? model.f_room.length*2 : 6"/>
88
- </div>
89
- <!-- <div :class="$parent.$parent.style">-->
90
- <!-- <label class="font_normal_body">小&emsp;&emsp;区</label>-->
91
- <!-- <input type="text" class="input_search" style="width:60%" v-model="model.f_residential_arearea" style="width:60%"-->
92
- <!-- condition="a.f_residential_area like '%{}%'" placeholder="小区"-->
93
- <!-- :size="model.f_residential_arearea ? model.f_residential_arearea.length*2 : 8"/>-->
94
- <!-- </div>-->
95
-
96
- <div :class="$parent.$parent.style">
97
- <label class="font_normal_body">地址&emsp;ID</label>
98
- <input type="text" class="input_search" style="width:60%" v-model="model.id" style="width:60%"
99
- condition="a.id = '{}'" placeholder="地址ID"
100
- />
101
- </div>
102
- <div :class="$parent.$parent.style" >
103
- <label class="font_normal_body">详细地址</label>
104
- <input type="text" class="input_search" style="width:60%" v-model="model.f_address" style="width:60%"
105
- condition="a.f_address like '%{}%'" placeholder="详细地址"
106
- :size="model.f_address ? model.f_address.length*2 : 8"/>
107
- </div>
108
- <div :class="$parent.$parent.style" >
109
- <label class="font_normal_body">地址状态</label>
110
- <v-select :value.sync="model.f_address_state"
111
- class="select_list select"
112
- v-model="model.f_address_state"
113
- condition="a.f_address_state = '{}'"
114
- :options='$parent.$parent.getaddresstate' placeholder='地址状态'
115
- close-on-select>
116
- </v-select>
117
- </div>
118
- <div :class="$parent.$parent.style" >
119
- <label class="font_normal_body">片&emsp;&emsp;区</label>
120
- <input type="text" class="input_search" style="width:60%" v-model="model.f_slice_area" style="width:60%"
121
- condition="a.f_slice_area like '%{}%'" placeholder="片区"
122
- :size="model.f_slice_area ? model.f_slice_area.length*2 : 8"/>
123
- </div>
124
- </div>
125
- </div>
126
- </criteria>
127
- <data-grid :model="model" partial='list' style="overflow: auto" class="list_area table_sy" v-ref:grid>
128
- <template partial='head'>
129
- <tr>
130
- <th><nobr>序号</nobr></th>
131
- <th><nobr>用户编号</nobr></th>
132
- <th><nobr>区/县</nobr></th>
133
- <th><nobr>片区</nobr></th>
134
- <th><nobr>街道</nobr></th>
135
- <th><nobr>小区(单位)</nobr></th>
136
- <th><nobr>详细地址</nobr></th>
137
- <th><nobr>地址状态</nobr></th>
138
- <th><nobr>时间</nobr></th>
139
- <th><nobr>操作</nobr></th>
140
- </tr>
141
- </template>
142
- <template partial='body'>
143
- <tr>
144
- <td style="text-align:center"><nobr>{{$index + 1}}</nobr></td>
145
- <td style="text-align:center"><nobr>{{row.f_userinfo_code}}</nobr></td>
146
- <td style="text-align:center"><nobr>{{row.f_pcd}}</nobr></td>
147
- <td style="text-align:center"><nobr>{{row.f_slice_area}}</nobr></td>
148
- <td style="text-align:center"><nobr>{{row.f_street}}</nobr></td>
149
- <td style="text-align:center"><nobr>{{row.f_residential_area}}</nobr></td>
150
- <td style="text-align:center"><nobr>{{row.f_address}}</nobr></td>
151
- <td style="text-align:center"><nobr>{{row.f_address_state}}</nobr></td>
152
- <td style="text-align:center"><nobr>{{row.f_create_date}}</nobr></td>
153
- <td style="text-align:center">
154
- <!-- <button type="button" name="button" class="btn btn-link"
155
- @click.stop="$parent.$parent.$parent.modify(row)">修改</button>-->
156
- <button type="button" name="button" class="btn btn-link"
157
- @click.stop="$parent.$parent.$parent.delete(row)">删除</button>
158
- </td>
159
- </tr>
160
- </template>
161
- <template partial='foot'></template>
162
- </data-grid>
163
- </criteria-paged>
164
- </div>
165
- <modal :show.sync="showFile" v-ref:modal backdrop="true">
166
- <header slot="modal-header" class="modal-header">
167
- <button type="button" class="close" @click="closeFile"><span>&times;</span></button>
168
- <h4 class="modal-title">选择文件</h4>
169
- </header>
170
- <article slot="modal-body" class="modal-body">
171
- <div class="form-group">
172
- <file-upload class="my-file-uploader" name="useraddressUploadFile" action="rs/file/uploadFile" tagname="确定" multiple v-ref:file></file-upload>
173
- </div>
174
- </article>
175
- <footer slot="modal-footer" class="modal-footer"></footer>
176
- </modal>
177
- </template>
178
-
179
- <script>
180
- import { PagedList } from 'vue-client'
181
-
182
-
183
- let readyGen = async function (self) {
184
- self.getfield = self.config.excelHeaders
185
- }
186
-
187
- export default {
188
- data () {
189
- return {
190
- criteriaShow: false,
191
- model: new PagedList('rs/sql/address_getAddress',20,{tablename: `'t_user_address'`,items: `'*'`,orderitem: `'id desc'`}),
192
- config: {
193
- // 导出列要和查询列相同
194
- excelHeaders: {
195
- 'f_userinfo_code':'用户编号',
196
- 'f_pcd':'区/县',
197
- 'f_slice_area':'片区',
198
- 'f_street':'街道',
199
- 'f_residential_area':'小区',
200
- 'f_building':'楼号',
201
- 'f_unit':'单元',
202
- 'f_floor':'楼层',
203
- 'f_room':'门牌号',
204
- 'f_address':'详细地址',
205
- 'f_address_state':'地址状态',
206
- 'f_create_date':'时间'
207
- },
208
- },
209
- addflag: false,
210
- addtitle:'',
211
- other: [],
212
- footer: [],
213
- getfield: {},
214
-
215
- // 公司下拉
216
- curorgid: [this.$login.f.orgid],
217
- f_orgid: '',
218
-
219
- //文件上传弹框
220
- showFile: false,
221
- showrightchange:true
222
- }
223
- },
224
- title: '地址列表',
225
- props:{
226
- f_filialeids:{
227
- type: String
228
- },
229
- style: {
230
- type: String,
231
- default: 'col-sm-2 '
232
- }
233
- },
234
- ready(){
235
- readyGen(this)
236
- this.search()
237
- },
238
- methods: {
239
- getotherfooter() {
240
- // this.$refs.paged.$refs.cri.$refs.exports.otherData=[];
241
- // this.$refs.paged.$refs.cri.$refs.exports.footerData=[];
242
- this.other = [];
243
- this.footer = [];
244
- // let exportdata = this.getCondition;
245
- let otherInData = [];
246
- otherInData.push(`导出时间: ${this.$login.toStandardTimeString()}`);
247
- let footerData = [], exportfield = this.getfield;
248
- footerData.push("合计");
249
- let self = this;
250
- for (var field in self.sumsmodel) {
251
- footerData.push(`${exportfield[field]}合计:${self.sumsmodel[field]}`);
252
- }
253
- this.footer.push(footerData);
254
- this.other.push(otherInData);
255
- },
256
- hidden() {
257
- this.criteriaShow = !this.criteriaShow
258
- },
259
- //添加方法
260
- add(val){
261
- if (this.f_filialeids) {
262
- this.$refs.paged.$refs.grid.selectStore.selected = null
263
- this.$dispatch('add',val)
264
- this.showrightchange = false;
265
- } else {
266
- this.$showAlert('请先选择左上角的所在分公司', 'warning', 2000)
267
- }
268
- },
269
- importAddress(){
270
- this.showFile = true
271
- },
272
- // 关闭文件上传对话框
273
- closeFile() {
274
- this.showFile = false
275
- // 将选的文件清空
276
- this.$refs.file.$el.querySelector('input').value = ''
277
- },
278
- //修改
279
- modify(val){
280
- this.$refs.paged.$refs.grid.selectStore.selected = null
281
- this.$dispatch('modify',val)
282
- },
283
- async delete(row){
284
- if(row.id){
285
- var id = row.id
286
- 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})
287
- if(userfiles.data.length){
288
- this.$showAlert('该地址下已有正常表具档案,无法删除!','warning',1000)
289
- }else{
290
- this.$resetdelete('rs/entity/t_user_address', {id: id}, {resolveMsg: '删除成功', rejectMsg: '删除失败'}).then((res) => {
291
- this.$dispatch('cancel')
292
- })
293
- }
294
- }
295
- },
296
-
297
- search () {
298
- this.$refs.paged.$refs.cri.search()
299
- },
300
-
301
- selfSearch (args) {
302
-
303
- if (!this.f_orgid) {
304
- this.getorg([this.$login.f.orgid])
305
- }
306
-
307
- args.condition = `${args.condition} and a.f_filialeid = '${this.f_filialeids}'`
308
- this.model.search(args.condition, args.model)
309
- },
310
-
311
- //清空
312
- clear(){
313
- this.$refs.paged.$refs.cri.model = {}
314
- },
315
- getorg (val) {
316
- this.f_orgid = this.$login.convertToIn(val)
317
- this.f_filialeids = val[0]
318
- }
319
- },
320
- events: {
321
- onFileUpload: async function (file, res) {
322
- console.log("上传完毕"+JSON.stringify(res))
323
- let data = {
324
- filepath: res.f_downloadpath,
325
- user:this.$login.f
326
- }
327
- console.log("filepath="+JSON.stringify(data))
328
- await this.$resetpost(`rs/logic/address_useraddressimport`,data, {resolveMsg: null, rejectMsg: '导入失败', silent: true}, 0).then((res)=>{
329
- if(res.data.type=="success"){
330
- this.$showAlert("导入信息:"+res.data.msg, res.data.type, 2000);
331
- }else{
332
- this.$showMessage(res.data.msg);
333
- }
334
-
335
- //关闭上传框
336
- this.closeFile()
337
- //重新查询
338
- this.init()
339
- })
340
- },
341
- 'onFileError'(error) {
342
- this.$showAlert(error, 'warning', 2000)
343
- }
344
- },
345
- computed: {
346
- //地址状态下拉框
347
- getaddresstate() {
348
- return [{label: '全部', value: ''}, ...this.$appdata.getParam('地址状态')]
349
- },
350
- getCondition() {
351
- return {
352
- condition: `${this.$refs.paged.$refs.cri.condition}` + `and a.f_filialeid = '${this.f_filialeids}'`}
353
- }
354
- }
355
-
356
- }
357
- </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
+
7
+ <div class="row">
8
+
9
+ <div :class="$parent.$parent.style">
10
+ <label class="font_normal_body">组织机构</label>
11
+ <res-select
12
+ restype='organization'
13
+ @res-select="$parent.$parent.getorg"
14
+ is-mul="false"
15
+ :initresid='$parent.$parent.curorgid'
16
+ >
17
+ </res-select>
18
+ </div>
19
+ <div :class="$parent.$parent.style" v-if="$parent.$parent.showrightchange">
20
+ <label class="font_normal_body">用户编号</label>
21
+ <input type="text" class="input_search" style="width:60%" v-model="model.f_userinfo_code" style="width:60%"
22
+ condition="f_userinfo_code = '{}'" placeholder="用户编号"/>
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
+ <export-excel :data="$parent.$parent.getCondition"
45
+ :field="$parent.$parent.getfield"
46
+ sqlurl="rs/logic/exportfile"
47
+ sql-name="addressGetAddress"
48
+ template-name='地址管理查询导出'
49
+ :choose-col="true"></export-excel>
50
+ <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>
51
+ </div>
52
+ </div>
53
+ <div class="row" v-show="$parent.$parent.criteriaShow">
54
+ <div :class="$parent.$parent.style" v-if="!$parent.$parent.showrightchange">
55
+ <label class="font_normal_body">用户编号</label>
56
+ <input type="text" class="input_search" style="width:60%" v-model="model.f_userinfo_code" style="width:60%"
57
+ condition="f_userinfo_code = '{}'" placeholder="用户编号"/>
58
+ </div>
59
+ <div v-if="!$parent.$parent.showrightchange" :class="$parent.$parent.style">
60
+ <label class="font_normal_body">小&emsp;&emsp;区</label>
61
+ <input type="text" class="input_search" style="width:60%" v-model="model.f_residential_arearea" style="width:60%"
62
+ condition="a.f_residential_area like '%{}%'" placeholder="小区"
63
+ :size="model.f_residential_arearea ? model.f_residential_arearea.length*2 : 8"/>
64
+ </div>
65
+ <div :class="$parent.$parent.style" v-if="!$parent.$parent.$parent.showrightchange">
66
+ <label class="font_normal_body">楼&emsp;&emsp;号</label>
67
+ <input type="text" class="input_search" style="width:60%" v-model="model.f_building" style="width:60%"
68
+ condition="a.f_building like '%{}%'" placeholder="楼号"
69
+ :size="model.f_building ? model.f_building.length*2 : 6"/>
70
+ </div>
71
+ <div :class="$parent.$parent.style" >
72
+ <label class="font_normal_body">单&emsp;&emsp;元</label>
73
+ <input type="text" class="input_search" style="width:60%" v-model="model.f_unit" style="width:60%"
74
+ condition="a.f_unit like '%{}%'" placeholder="单元"
75
+ :size="model.f_unit ? model.f_unit.length*2 : 6"/>
76
+ </div>
77
+ <div :class="$parent.$parent.style">
78
+ <label class="font_normal_body">楼&emsp;&emsp;层</label>
79
+ <input type="text" class="input_search" style="width:60%" v-model="model.f_floor" style="width:60%"
80
+ condition="a.f_floor like '%{}%'" placeholder="楼层"
81
+ :size="model.f_floor ? model.f_floor.length*2 : 6"/>
82
+ </div>
83
+ <div :class="$parent.$parent.style">
84
+ <label class="font_normal_body">门&ensp;牌&ensp;号</label>
85
+ <input type="text" class="input_search" style="width:60%" v-model="model.f_room" style="width:60%"
86
+ condition="a.f_room like '%{}%'" placeholder="门牌号"
87
+ :size="model.f_room ? model.f_room.length*2 : 6"/>
88
+ </div>
89
+ <!-- <div :class="$parent.$parent.style">-->
90
+ <!-- <label class="font_normal_body">小&emsp;&emsp;区</label>-->
91
+ <!-- <input type="text" class="input_search" style="width:60%" v-model="model.f_residential_arearea" style="width:60%"-->
92
+ <!-- condition="a.f_residential_area like '%{}%'" placeholder="小区"-->
93
+ <!-- :size="model.f_residential_arearea ? model.f_residential_arearea.length*2 : 8"/>-->
94
+ <!-- </div>-->
95
+
96
+ <div :class="$parent.$parent.style">
97
+ <label class="font_normal_body">地址&emsp;ID</label>
98
+ <input type="text" class="input_search" style="width:60%" v-model="model.id" style="width:60%"
99
+ condition="a.id = '{}'" placeholder="地址ID"
100
+ />
101
+ </div>
102
+ <div :class="$parent.$parent.style" >
103
+ <label class="font_normal_body">详细地址</label>
104
+ <input type="text" class="input_search" style="width:60%" v-model="model.f_address" style="width:60%"
105
+ condition="a.f_address like '%{}%'" placeholder="详细地址"
106
+ :size="model.f_address ? model.f_address.length*2 : 8"/>
107
+ </div>
108
+ <div :class="$parent.$parent.style" >
109
+ <label class="font_normal_body">地址状态</label>
110
+ <v-select :value.sync="model.f_address_state"
111
+ class="select_list select"
112
+ v-model="model.f_address_state"
113
+ condition="a.f_address_state = '{}'"
114
+ :options='$parent.$parent.getaddresstate' placeholder='地址状态'
115
+ close-on-select>
116
+ </v-select>
117
+ </div>
118
+ <div :class="$parent.$parent.style" >
119
+ <label class="font_normal_body">片&emsp;&emsp;区</label>
120
+ <input type="text" class="input_search" style="width:60%" v-model="model.f_slice_area" style="width:60%"
121
+ condition="a.f_slice_area like '%{}%'" placeholder="片区"
122
+ :size="model.f_slice_area ? model.f_slice_area.length*2 : 8"/>
123
+ </div>
124
+ </div>
125
+ </div>
126
+ </criteria>
127
+ <data-grid :model="model" partial='list' style="overflow: auto" class="list_area table_sy" v-ref:grid>
128
+ <template partial='head'>
129
+ <tr>
130
+ <th><nobr>序号</nobr></th>
131
+ <th><nobr>用户编号</nobr></th>
132
+ <th><nobr>区/县</nobr></th>
133
+ <th><nobr>片区</nobr></th>
134
+ <th><nobr>街道</nobr></th>
135
+ <th><nobr>小区(单位)</nobr></th>
136
+ <th><nobr>详细地址</nobr></th>
137
+ <th><nobr>地址状态</nobr></th>
138
+ <th><nobr>时间</nobr></th>
139
+ <th><nobr>操作</nobr></th>
140
+ </tr>
141
+ </template>
142
+ <template partial='body'>
143
+ <tr>
144
+ <td style="text-align:center"><nobr>{{$index + 1}}</nobr></td>
145
+ <td style="text-align:center"><nobr>{{row.f_userinfo_code}}</nobr></td>
146
+ <td style="text-align:center"><nobr>{{row.f_pcd}}</nobr></td>
147
+ <td style="text-align:center"><nobr>{{row.f_slice_area}}</nobr></td>
148
+ <td style="text-align:center"><nobr>{{row.f_street}}</nobr></td>
149
+ <td style="text-align:center"><nobr>{{row.f_residential_area}}</nobr></td>
150
+ <td style="text-align:center"><nobr>{{row.f_address}}</nobr></td>
151
+ <td style="text-align:center"><nobr>{{row.f_address_state}}</nobr></td>
152
+ <td style="text-align:center"><nobr>{{row.f_create_date}}</nobr></td>
153
+ <td style="text-align:center">
154
+ <!-- <button type="button" name="button" class="btn btn-link"
155
+ @click.stop="$parent.$parent.$parent.modify(row)">修改</button>-->
156
+ <button type="button" name="button" class="btn btn-link"
157
+ @click.stop="$parent.$parent.$parent.delete(row)">删除</button>
158
+ </td>
159
+ </tr>
160
+ </template>
161
+ <template partial='foot'></template>
162
+ </data-grid>
163
+ </criteria-paged>
164
+ </div>
165
+ <modal :show.sync="showFile" v-ref:modal backdrop="true">
166
+ <header slot="modal-header" class="modal-header">
167
+ <button type="button" class="close" @click="closeFile"><span>&times;</span></button>
168
+ <h4 class="modal-title">选择文件</h4>
169
+ </header>
170
+ <article slot="modal-body" class="modal-body">
171
+ <div class="form-group">
172
+ <file-upload class="my-file-uploader" name="useraddressUploadFile" action="rs/file/uploadFile" tagname="确定" multiple v-ref:file></file-upload>
173
+ </div>
174
+ </article>
175
+ <footer slot="modal-footer" class="modal-footer"></footer>
176
+ </modal>
177
+ </template>
178
+
179
+ <script>
180
+ import { PagedList } from 'vue-client'
181
+
182
+
183
+ let readyGen = async function (self) {
184
+ self.getfield = self.config.excelHeaders
185
+ }
186
+
187
+ export default {
188
+ data () {
189
+ return {
190
+ criteriaShow: false,
191
+ model: new PagedList('rs/sql/address_getAddress',20,{tablename: `'t_user_address'`,items: `'*'`,orderitem: `'id desc'`}),
192
+ config: {
193
+ // 导出列要和查询列相同
194
+ excelHeaders: {
195
+ 'f_userinfo_code':'用户编号',
196
+ 'f_pcd':'区/县',
197
+ 'f_slice_area':'片区',
198
+ 'f_street':'街道',
199
+ 'f_residential_area':'小区',
200
+ 'f_building':'楼号',
201
+ 'f_unit':'单元',
202
+ 'f_floor':'楼层',
203
+ 'f_room':'门牌号',
204
+ 'f_address':'详细地址',
205
+ 'f_address_state':'地址状态',
206
+ 'f_create_date':'时间'
207
+ },
208
+ },
209
+ addflag: false,
210
+ addtitle:'',
211
+ other: [],
212
+ footer: [],
213
+ getfield: {},
214
+
215
+ // 公司下拉
216
+ curorgid: [this.$login.f.orgid],
217
+ f_orgid: '',
218
+
219
+ //文件上传弹框
220
+ showFile: false,
221
+ showrightchange:true
222
+ }
223
+ },
224
+ title: '地址列表',
225
+ props:{
226
+ f_filialeids:{
227
+ type: String
228
+ },
229
+ style: {
230
+ type: String,
231
+ default: 'col-sm-2 '
232
+ }
233
+ },
234
+ ready(){
235
+ readyGen(this)
236
+ this.search()
237
+ },
238
+ methods: {
239
+ getotherfooter() {
240
+ // this.$refs.paged.$refs.cri.$refs.exports.otherData=[];
241
+ // this.$refs.paged.$refs.cri.$refs.exports.footerData=[];
242
+ this.other = [];
243
+ this.footer = [];
244
+ // let exportdata = this.getCondition;
245
+ let otherInData = [];
246
+ otherInData.push(`导出时间: ${this.$login.toStandardTimeString()}`);
247
+ let footerData = [], exportfield = this.getfield;
248
+ footerData.push("合计");
249
+ let self = this;
250
+ for (var field in self.sumsmodel) {
251
+ footerData.push(`${exportfield[field]}合计:${self.sumsmodel[field]}`);
252
+ }
253
+ this.footer.push(footerData);
254
+ this.other.push(otherInData);
255
+ },
256
+ hidden() {
257
+ this.criteriaShow = !this.criteriaShow
258
+ },
259
+ //添加方法
260
+ add(val){
261
+ if (this.f_filialeids) {
262
+ this.$refs.paged.$refs.grid.selectStore.selected = null
263
+ this.$dispatch('add',val)
264
+ this.showrightchange = false;
265
+ } else {
266
+ this.$showAlert('请先选择左上角的所在分公司', 'warning', 2000)
267
+ }
268
+ },
269
+ importAddress(){
270
+ this.showFile = true
271
+ },
272
+ // 关闭文件上传对话框
273
+ closeFile() {
274
+ this.showFile = false
275
+ // 将选的文件清空
276
+ this.$refs.file.$el.querySelector('input').value = ''
277
+ },
278
+ //修改
279
+ modify(val){
280
+ this.$refs.paged.$refs.grid.selectStore.selected = null
281
+ this.$dispatch('modify',val)
282
+ },
283
+ async delete(row){
284
+ if(row.id){
285
+ var id = row.id
286
+ 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})
287
+ if(userfiles.data.length){
288
+ this.$showAlert('该地址下已有正常表具档案,无法删除!','warning',1000)
289
+ }else{
290
+ this.$resetdelete('rs/entity/t_user_address', {id: id}, {resolveMsg: '删除成功', rejectMsg: '删除失败'}).then((res) => {
291
+ this.$dispatch('cancel')
292
+ })
293
+ }
294
+ }
295
+ },
296
+
297
+ search () {
298
+ this.$refs.paged.$refs.cri.search()
299
+ },
300
+
301
+ selfSearch (args) {
302
+
303
+ if (!this.f_orgid) {
304
+ this.getorg([this.$login.f.orgid])
305
+ }
306
+
307
+ args.condition = `${args.condition} and a.f_filialeid = '${this.f_filialeids}'`
308
+ this.model.search(args.condition, args.model)
309
+ },
310
+
311
+ //清空
312
+ clear(){
313
+ this.$refs.paged.$refs.cri.model = {}
314
+ },
315
+ getorg (val) {
316
+ this.f_orgid = this.$login.convertToIn(val)
317
+ this.f_filialeids = val[0]
318
+ }
319
+ },
320
+ events: {
321
+ onFileUpload: async function (file, res) {
322
+ console.log("上传完毕"+JSON.stringify(res))
323
+ let data = {
324
+ filepath: res.f_downloadpath,
325
+ user:this.$login.f
326
+ }
327
+ console.log("filepath="+JSON.stringify(data))
328
+ await this.$resetpost(`rs/logic/address_useraddressimport`,data, {resolveMsg: null, rejectMsg: '导入失败', silent: true}, 0).then((res)=>{
329
+ if(res.data.type=="success"){
330
+ this.$showAlert("导入信息:"+res.data.msg, res.data.type, 2000);
331
+ }else{
332
+ this.$showMessage(res.data.msg);
333
+ }
334
+
335
+ //关闭上传框
336
+ this.closeFile()
337
+ //重新查询
338
+ this.init()
339
+ })
340
+ },
341
+ 'onFileError'(error) {
342
+ this.$showAlert(error, 'warning', 2000)
343
+ }
344
+ },
345
+ computed: {
346
+ //地址状态下拉框
347
+ getaddresstate() {
348
+ return [{label: '全部', value: ''}, ...this.$appdata.getParam('地址状态')]
349
+ },
350
+ getCondition() {
351
+ return {
352
+ condition: `${this.$refs.paged.$refs.cri.condition}` + `and a.f_filialeid = '${this.f_filialeids}'`}
353
+ }
354
+ }
355
+
356
+ }
357
+ </script>