address-client 3.2.111 → 3.2.112-qianneng
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json
CHANGED
|
@@ -91,7 +91,7 @@
|
|
|
91
91
|
this.$refs.useraddressmsg.pcdslist=[]
|
|
92
92
|
this.$refs.useraddressmsg.streetslist=[]
|
|
93
93
|
this.$refs.useraddressmsg.areaslist=[]
|
|
94
|
-
this.$refs.useraddressmsg.initdata()
|
|
94
|
+
// this.$refs.useraddressmsg.initdata()
|
|
95
95
|
},
|
|
96
96
|
'confirm' () {
|
|
97
97
|
this.style='col-sm-2 form-group'
|
|
@@ -0,0 +1,198 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<div class="flex">
|
|
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
|
+
<div class="col-sm-4 form-group">
|
|
9
|
+
<label class="font_normal_body">小区名称</label>
|
|
10
|
+
<input type="text" class="input_search" style="width:60%" v-model="model.f_residential_area_id"
|
|
11
|
+
condition="f_residential_area_id like '%{}%'" placeholder="小区名称" v-show="false"
|
|
12
|
+
@keyup.enter.stop="search()"
|
|
13
|
+
:size="model.f_residential_area ? model.f_residential_area.length*2 : 8"/>
|
|
14
|
+
<v-select :value.sync="model.f_residential_area_id" :value-single="true"
|
|
15
|
+
:options='$parent.$parent.areaslist' placeholder='请选择'
|
|
16
|
+
close-on-select search="true">
|
|
17
|
+
</v-select>
|
|
18
|
+
</div>
|
|
19
|
+
<div class="col-sm-4 form-group button-range" >
|
|
20
|
+
<button class="button_search button_spacing" @click="search()" >查询</button>
|
|
21
|
+
<button class="button_clear button_spacing" @click="$parent.$parent.clear()">清空</button>
|
|
22
|
+
</div>
|
|
23
|
+
</div>
|
|
24
|
+
</div>
|
|
25
|
+
</criteria>
|
|
26
|
+
<data-grid :model="model" partial='list' style="overflow: auto" class="list_area table_sy" v-ref:grid>
|
|
27
|
+
<template partial='head'>
|
|
28
|
+
<tr>
|
|
29
|
+
<th><nobr>省市区</nobr></th>
|
|
30
|
+
<th><nobr>街道/乡镇</nobr></th>
|
|
31
|
+
<th><nobr>小区名称</nobr></th>
|
|
32
|
+
<th><nobr>片区/管理站</nobr></th>
|
|
33
|
+
<th><nobr>地区类型</nobr></th>
|
|
34
|
+
<th><nobr>楼号</nobr></th>
|
|
35
|
+
<th><nobr>选择</nobr></th>
|
|
36
|
+
</tr>
|
|
37
|
+
</template>
|
|
38
|
+
<template partial='body'>
|
|
39
|
+
<tr>
|
|
40
|
+
<td style="text-align:center"><nobr>{{row.f_district}}</nobr></td>
|
|
41
|
+
<td style="text-align:center"><nobr>{{row.f_street}}</nobr></td>
|
|
42
|
+
<td style="text-align:center"><nobr>{{row.f_residential_area}}</nobr></td>
|
|
43
|
+
<td style="text-align:center"><nobr>{{row.f_slice_area}}</nobr></td>
|
|
44
|
+
<td style="text-align:center"><nobr>{{row.f_iscity}}</nobr></td>
|
|
45
|
+
<td style="text-align:center"><nobr>{{row.f_building}}</nobr></td>
|
|
46
|
+
<td v-show = 'false' style="text-align:center"><nobr>{{row.id}}</nobr></td>
|
|
47
|
+
<td v-show = 'false' style="text-align:center"><nobr>{{row.f_building_id}}</nobr></td>
|
|
48
|
+
<td style="text-align:center">
|
|
49
|
+
<button type="button" name="button" class="button_export"
|
|
50
|
+
@click.stop="$parent.$parent.$parent.confirmaddress(row)">确认选择</button>
|
|
51
|
+
</td>
|
|
52
|
+
</tr>
|
|
53
|
+
</template>
|
|
54
|
+
<template partial='foot'></template>
|
|
55
|
+
</data-grid>
|
|
56
|
+
</criteria-paged>
|
|
57
|
+
</div>
|
|
58
|
+
<modal :show.sync="showFile" v-ref:modal backdrop="true">
|
|
59
|
+
<header slot="modal-header" class="modal-header">
|
|
60
|
+
<button type="button" class="close" @click="closeFile"><span>×</span></button>
|
|
61
|
+
<h4 class="modal-title">选择文件</h4>
|
|
62
|
+
</header>
|
|
63
|
+
<article slot="modal-body" class="modal-body">
|
|
64
|
+
<div class="form-group">
|
|
65
|
+
<file-upload class="my-file-uploader" name="useraddressUploadFile" action="rs/file/uploadFile" tagname="确定" multiple v-ref:file></file-upload>
|
|
66
|
+
</div>
|
|
67
|
+
</article>
|
|
68
|
+
<footer slot="modal-footer" class="modal-footer"></footer>
|
|
69
|
+
</modal>
|
|
70
|
+
</template>
|
|
71
|
+
|
|
72
|
+
<script>
|
|
73
|
+
import {HttpResetClass, PagedList} from 'vue-client'
|
|
74
|
+
|
|
75
|
+
export default {
|
|
76
|
+
data () {
|
|
77
|
+
return {
|
|
78
|
+
areaslist:[],
|
|
79
|
+
criteriaShow: false,
|
|
80
|
+
model: new PagedList('rs/sql/address_singleTableOrderBy', 20, {}),
|
|
81
|
+
addflag: false,
|
|
82
|
+
addtitle: '',
|
|
83
|
+
|
|
84
|
+
// 公司下拉
|
|
85
|
+
curorgid: [this.$login.f.orgid],
|
|
86
|
+
f_orgid: '',
|
|
87
|
+
|
|
88
|
+
// 文件上传弹框
|
|
89
|
+
showFile: false
|
|
90
|
+
}
|
|
91
|
+
},
|
|
92
|
+
title: '地址列表',
|
|
93
|
+
props: {
|
|
94
|
+
f_filialeids: {
|
|
95
|
+
type: String
|
|
96
|
+
},
|
|
97
|
+
company: {
|
|
98
|
+
type: String,
|
|
99
|
+
default: ''
|
|
100
|
+
}
|
|
101
|
+
},
|
|
102
|
+
ready () {
|
|
103
|
+
this.search()
|
|
104
|
+
this.initareas(` f_orgid = '${this.f_filialeids}'`)
|
|
105
|
+
},
|
|
106
|
+
methods: {
|
|
107
|
+
//初始化小区添加小区
|
|
108
|
+
async initareas(pconditon){
|
|
109
|
+
// if(this.usertype){
|
|
110
|
+
// pconditon=pconditon+` and f_special='1' `
|
|
111
|
+
// }
|
|
112
|
+
this.areaslist = []
|
|
113
|
+
let HttpReset = new HttpResetClass()
|
|
114
|
+
let req = await HttpReset.load('POST', 'api/af-revenue/sql/address_singleTableOrderBy?pageNo=1&pageSize=9999999', {
|
|
115
|
+
data: {
|
|
116
|
+
items: 'f_street,f_residential_area,f_pcd_id,f_street_id,id,f_slice_area',
|
|
117
|
+
tablename: 't_area',
|
|
118
|
+
orderitem: 'id',
|
|
119
|
+
condition: pconditon
|
|
120
|
+
}
|
|
121
|
+
}, {resolveMsg: null, rejectMsg: '获取地址失败!'})
|
|
122
|
+
let redata = []
|
|
123
|
+
if (req.data.length === 0){
|
|
124
|
+
redata.push({
|
|
125
|
+
label: '无',
|
|
126
|
+
value: '',
|
|
127
|
+
data: '',
|
|
128
|
+
id: ''
|
|
129
|
+
})
|
|
130
|
+
}
|
|
131
|
+
console.log("=================")
|
|
132
|
+
console.log(req.data)
|
|
133
|
+
req.data.forEach((row) => {
|
|
134
|
+
redata.push({
|
|
135
|
+
label: '['+row.f_street+']'+row.f_residential_area,
|
|
136
|
+
value: row.id,
|
|
137
|
+
data: row,
|
|
138
|
+
id: row.id
|
|
139
|
+
})
|
|
140
|
+
})
|
|
141
|
+
this.areaslist=redata
|
|
142
|
+
console.log("=========111111========")
|
|
143
|
+
console.log(this.areaslist)
|
|
144
|
+
},
|
|
145
|
+
hidden () {
|
|
146
|
+
this.criteriaShow = !this.criteriaShow
|
|
147
|
+
},
|
|
148
|
+
// 添加方法
|
|
149
|
+
add (val) {
|
|
150
|
+
if (this.f_filialeids) {
|
|
151
|
+
this.$refs.paged.$refs.grid.selectStore.selected = null
|
|
152
|
+
this.$dispatch('add', val)
|
|
153
|
+
} else {
|
|
154
|
+
this.$showAlert('请先选择左上角的所在分公司', 'warning', 2000)
|
|
155
|
+
}
|
|
156
|
+
},
|
|
157
|
+
// 修改
|
|
158
|
+
modify (val) {
|
|
159
|
+
this.$refs.paged.$refs.grid.selectStore.selected = null
|
|
160
|
+
this.$dispatch('modify', val)
|
|
161
|
+
},
|
|
162
|
+
confirmaddress (row) {
|
|
163
|
+
// this.$refs.paged.$refs.cri.search()
|
|
164
|
+
this.$dispatch('confirmaddress', row)
|
|
165
|
+
},
|
|
166
|
+
search () {
|
|
167
|
+
this.$refs.paged.$refs.cri.search()
|
|
168
|
+
},
|
|
169
|
+
|
|
170
|
+
selfSearch (args) {
|
|
171
|
+
if (!this.f_orgid) {
|
|
172
|
+
this.getorg([this.$login.f.orgid])
|
|
173
|
+
}
|
|
174
|
+
this.$refs.paged.model.params.items = 'f_street,f_residential_area,f_pcd_id,f_street_id,f_slice_area,f_district,f_iscity,a.id,f_building,f_building_id'
|
|
175
|
+
this.$refs.paged.model.params.tablename = 't_area a left join (select id,f_district from t_pcd)p on p.id = a.f_pcd_id left join (select id,f_iscity from t_street)s on s.id = a.f_street_id left join (select f_residential_area_id,f_building,id f_building_id from t_building)b on b.f_residential_area_id = a.id'
|
|
176
|
+
this.$refs.paged.model.params.orderitem = 'id'
|
|
177
|
+
args.condition = `${args.condition} and f_orgid = '${this.f_filialeids}'`
|
|
178
|
+
this.model.search(args.condition, args.model)
|
|
179
|
+
},
|
|
180
|
+
|
|
181
|
+
// 清空
|
|
182
|
+
clear () {
|
|
183
|
+
this.$refs.paged.$refs.cri.model = {}
|
|
184
|
+
},
|
|
185
|
+
getorg (val) {
|
|
186
|
+
this.f_orgid = this.$login.convertToIn(val)
|
|
187
|
+
this.f_filialeids = val[0]
|
|
188
|
+
}
|
|
189
|
+
},
|
|
190
|
+
watch: {
|
|
191
|
+
'company' (val) {
|
|
192
|
+
this.f_orgid = val
|
|
193
|
+
this.f_filialeids = val
|
|
194
|
+
}
|
|
195
|
+
}
|
|
196
|
+
|
|
197
|
+
}
|
|
198
|
+
</script>
|