address-client 3.2.5 → 3.2.9

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