address-client 3.2.28 → 3.2.31
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/build/dev-server.js +125 -125
- package/package.json +1 -1
- package/src/components/AddressList.vue +3 -1
- package/src/components/AddressModel.vue +95 -95
- package/src/components/AreaList.vue +435 -435
- package/src/components/CityManage.vue +76 -76
- package/src/filiale/dongguan/AddStreetOrPcd.vue +422 -0
- package/src/filiale/dongguan/sale.js +7 -0
- package/src/filiale/macheng/AddressList.vue +355 -48
- package/src/filiale/macheng/AreaList.vue +318 -279
- package/src/filiale/shanggao/AddAreaMsg.vue +752 -752
- package/src/filiale/shanggao/AddressList.vue +613 -613
- package/src/filiale/shanggao/AreaList.vue +436 -436
- package/src/filiale/shanggao/sale.js +16 -16
- package/src/filiale/zhongyi/AddAreaMsg.vue +757 -757
- package/src/filiale/zhongyi/sale.js +12 -12
- package/src/main.js +1 -1
- package/.gradle/4.4/fileChanges/last-build.bin +0 -0
- package/.gradle/4.4/fileHashes/fileHashes.bin +0 -0
- package/.gradle/4.4/fileHashes/fileHashes.lock +0 -0
|
@@ -28,7 +28,6 @@
|
|
|
28
28
|
:size="model.f_residential_arearea ? model.f_residential_arearea.length*2 : 8"/>
|
|
29
29
|
</div>
|
|
30
30
|
<!--<div v-if="$parent.$parent.showrightchange" :class="$parent.$parent.style" v-if="!$parent.$parent.$parent.useraddressShow">-->
|
|
31
|
-
|
|
32
31
|
<div :class="$parent.$parent.style" v-if="$parent.$parent.$parent.showrightchange">
|
|
33
32
|
<label class="font_normal_body">楼  号</label>
|
|
34
33
|
<input type="text" class="input_search" style="width:60%" v-model="model.f_building" style="width:60%"
|
|
@@ -39,8 +38,18 @@
|
|
|
39
38
|
<button class="button_search button_spacing" @click="search()" >查询</button>
|
|
40
39
|
<button class="button_new button_spacing" style="width: max-content" @click="$parent.$parent.add('民用')">添加民用</button>
|
|
41
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" v-show="this.$login.r.includes('批量修改')" @click="$parent.$parent.modifyBatch()">批量修改</button>
|
|
42
42
|
<button class="button_clear button_spacing" @click="$parent.$parent.clear()">清空</button>
|
|
43
|
-
<button class="button_export button_spacing" @click="$parent.$parent.importAddress"
|
|
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>
|
|
44
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>
|
|
45
54
|
</div>
|
|
46
55
|
</div>
|
|
@@ -99,6 +108,12 @@
|
|
|
99
108
|
condition="a.f_address like '%{}%'" placeholder="详细地址"
|
|
100
109
|
:size="model.f_address ? model.f_address.length*2 : 8"/>
|
|
101
110
|
</div>
|
|
111
|
+
<div :class="$parent.$parent.style" v-if="!$parent.$parent.$parent.showrightchange">
|
|
112
|
+
<label class="font_normal_body">街道/乡镇</label>
|
|
113
|
+
<input type="text" class="input_search" style="width:60%" v-model="model.f_street"
|
|
114
|
+
condition="f_street like '%{}%'" placeholder="街道/乡镇"
|
|
115
|
+
:size="model.f_street ? model.f_street.length*2 : 6"/>
|
|
116
|
+
</div>
|
|
102
117
|
<div :class="$parent.$parent.style" >
|
|
103
118
|
<label class="font_normal_body">地址状态</label>
|
|
104
119
|
<v-select :value.sync="model.f_address_state"
|
|
@@ -112,53 +127,55 @@
|
|
|
112
127
|
</div>
|
|
113
128
|
</div>
|
|
114
129
|
</criteria>
|
|
115
|
-
<data-grid :model="model" partial='list' style="overflow: auto" class="list_area table_sy"
|
|
130
|
+
<data-grid :model="model" partial='list' style="overflow: auto" class="list_area table_sy" :optional="true" v-ref:grid>
|
|
116
131
|
<template partial='head'>
|
|
117
|
-
<
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
132
|
+
<th><nobr>序号</nobr></th>
|
|
133
|
+
<th><nobr>用户编号</nobr></th>
|
|
134
|
+
<th v-show="!$parent.$parent.$parent.$parent.useraddressShow"><nobr>区/县</nobr></th>
|
|
135
|
+
<th v-show="!$parent.$parent.$parent.$parent.useraddressShow"><nobr>片区/管理站</nobr></th>
|
|
136
|
+
<th><nobr>街道/乡镇</nobr></th>
|
|
137
|
+
<th><nobr>小区(单位)</nobr></th>
|
|
138
|
+
<th v-show="!$parent.$parent.$parent.$parent.useraddressShow"><nobr>楼号</nobr></th>
|
|
139
|
+
<th v-show="!$parent.$parent.$parent.$parent.useraddressShow"><nobr>单元</nobr></th>
|
|
140
|
+
<th v-show="!$parent.$parent.$parent.$parent.useraddressShow"><nobr>楼层</nobr></th>
|
|
141
|
+
<th v-show="!$parent.$parent.$parent.$parent.useraddressShow"><nobr>门牌号</nobr></th>
|
|
142
|
+
<th><nobr>详细地址</nobr></th>
|
|
143
|
+
<th><nobr>地址状态</nobr></th>
|
|
144
|
+
<th><nobr>状态</nobr></th>
|
|
145
|
+
<th><nobr>时间</nobr></th>
|
|
146
|
+
<th><nobr>备注</nobr></th>
|
|
147
|
+
<th><nobr>操作</nobr></th>
|
|
133
148
|
</template>
|
|
134
149
|
<template partial='body'>
|
|
135
|
-
<
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
150
|
+
<td style="text-align:center"><nobr>{{$index + 1}}</nobr></td>
|
|
151
|
+
<td style="text-align:center"><nobr>{{row.f_userinfo_code}}</nobr></td>
|
|
152
|
+
<td v-show="!$parent.$parent.$parent.$parent.useraddressShow" style="text-align:center"><nobr>{{row.f_pcd}}</nobr></td>
|
|
153
|
+
<td v-show="!$parent.$parent.$parent.$parent.useraddressShow" style="text-align:center"><nobr>{{row.f_slice_area}}</nobr></td>
|
|
154
|
+
<td style="text-align:center"><nobr>{{row.f_street}}</nobr></td>
|
|
155
|
+
<td style="text-align:center"><nobr>{{row.f_residential_area}}</nobr></td>
|
|
156
|
+
<td v-show="!$parent.$parent.$parent.$parent.useraddressShow" style="text-align:center"><nobr>{{row.f_building}}{{row.f_building_suffix}}</nobr></td>
|
|
157
|
+
<td v-show="!$parent.$parent.$parent.$parent.useraddressShow" style="text-align:center"><nobr>{{row.f_unit}}{{row.f_unit_suffix}}</nobr></td>
|
|
158
|
+
<td v-show="!$parent.$parent.$parent.$parent.useraddressShow" style="text-align:center"><nobr>{{row.f_floor}}{{row.f_floor_suffix}}</nobr></td>
|
|
159
|
+
<td v-show="!$parent.$parent.$parent.$parent.useraddressShow" style="text-align:center"><nobr>{{row.f_room}}{{row.f_room_suffix}}</nobr></td>
|
|
160
|
+
<td style="text-align:center"><nobr>{{row.f_address}}</nobr></td>
|
|
161
|
+
<td style="text-align:center"><nobr>{{row.f_address_state}}</nobr></td>
|
|
162
|
+
<td style="text-align:center"><nobr>{{row.f_state ==='作废'?'作废':'有效'}}</nobr></td>
|
|
163
|
+
<td style="text-align:center"><nobr>{{row.f_create_date}}</nobr></td>
|
|
164
|
+
<td style="text-align:center"><nobr>{{row.f_comments}}</nobr></td>
|
|
165
|
+
<td style="text-align:center">
|
|
166
|
+
<!-- <button type="button" name="button" class="btn btn-link"
|
|
167
|
+
@click.stop="$parent.$parent.$parent.modify(row)">修改</button>-->
|
|
168
|
+
<button v-if="!row.f_useraddress_id" type="button" name="button" class="btn btn-danger"
|
|
169
|
+
style="padding: 5px 12px"
|
|
170
|
+
@click.stop="$parent.$parent.$parent.delete(row)">删除</button>
|
|
171
|
+
</td>
|
|
156
172
|
</template>
|
|
157
173
|
<template partial='foot'></template>
|
|
158
174
|
</data-grid>
|
|
159
175
|
</criteria-paged>
|
|
160
176
|
</div>
|
|
161
|
-
<
|
|
177
|
+
<work-busy :is-busy='isbusy'></work-busy>
|
|
178
|
+
<modal :show.sync="showFile" width="480px" v-ref:modal backdrop="true">
|
|
162
179
|
<header slot="modal-header" class="modal-header">
|
|
163
180
|
<button type="button" class="close" @click="closeFile"><span>×</span></button>
|
|
164
181
|
<h4 class="modal-title">选择文件</h4>
|
|
@@ -168,13 +185,65 @@
|
|
|
168
185
|
<file-upload class="my-file-uploader" name="useraddressUploadFile" action="rs/file/uploadFile" tagname="确定" multiple v-ref:file></file-upload>
|
|
169
186
|
</div>
|
|
170
187
|
</article>
|
|
171
|
-
<footer slot="modal-footer" class="modal-footer"></footer>
|
|
188
|
+
<footer slot="modal-footer" class="modal-footer" style="display: none"></footer>
|
|
189
|
+
</modal>
|
|
190
|
+
|
|
191
|
+
<modal :show.sync="showModify" large backdrop="false" :width="900">
|
|
192
|
+
<header slot="modal-header" class="modal-header">
|
|
193
|
+
</header>
|
|
194
|
+
<article slot="modal-body" class="modal-body">
|
|
195
|
+
|
|
196
|
+
<validator name='v'>
|
|
197
|
+
<div class="auto select-overspread form-horizontal">
|
|
198
|
+
<div class="col-sm-6 form-group">
|
|
199
|
+
<label class="font_normal_body">省 市 区</label>
|
|
200
|
+
<input type="text" class="input_search" class="input_search" style="width:60%" v-show="false" v-model="areamodel.f_pcd_id">
|
|
201
|
+
<v-select
|
|
202
|
+
:value.sync="areamodel.f_pcd_id" :value-single="true"
|
|
203
|
+
:options='pcdslist' placeholder='请选择'
|
|
204
|
+
close-on-select search="true" @change="pcdChange">
|
|
205
|
+
</v-select>
|
|
206
|
+
</div>
|
|
207
|
+
<div class="col-sm-6 form-group"
|
|
208
|
+
:class="[$v.f_street_id.required ? 'has-error' : 'has-success']">
|
|
209
|
+
<label class="font_normal_body">街道名称</label>
|
|
210
|
+
<input type="text" style="width:60%" class="input_search" v-show="false" v-model="areamodel.f_street_id"
|
|
211
|
+
v-validate:f_street_id='{required: true }'>
|
|
212
|
+
<v-select
|
|
213
|
+
:value.sync="areamodel.f_street_id" :value-single="true"
|
|
214
|
+
:options='streetslist' placeholder='请选择'
|
|
215
|
+
close-on-select search="true" @change="streetChange">
|
|
216
|
+
</v-select>
|
|
217
|
+
</div>
|
|
218
|
+
<div class="col-sm-6 form-group " v-if="showModify"
|
|
219
|
+
:class="[$v.f_residential_area_id.required ? 'has-error' : 'has-success']">
|
|
220
|
+
<label class="font_normal_body">小区名称</label>
|
|
221
|
+
<input type="text" style="width:41%" v-show="false" v-model="areamodel.f_residential_area_id"
|
|
222
|
+
v-validate:f_area_id='{required: true }'>
|
|
223
|
+
<v-select :value.sync="areamodel.f_residential_area_id" :value-single="true"
|
|
224
|
+
:options='areaslist' placeholder='请选择'
|
|
225
|
+
@change=""
|
|
226
|
+
close-on-select search="true">
|
|
227
|
+
</v-select>
|
|
228
|
+
</div>
|
|
229
|
+
</div>
|
|
230
|
+
</validator>
|
|
231
|
+
|
|
232
|
+
</article>
|
|
233
|
+
<footer slot="modal-footer" class="modal-footer">
|
|
234
|
+
<button v-show="showModify" type="button" class="button_search button_spacing" @click='confirmModify()' :disabled='!$v.valid'>确认</button>
|
|
235
|
+
<button v-show="showModify" type="button" class="button_clear button_spacing" @click='cancelModify()'>取消</button>
|
|
236
|
+
</footer>
|
|
172
237
|
</modal>
|
|
173
238
|
</template>
|
|
174
239
|
|
|
175
240
|
<script>
|
|
241
|
+
import {HttpResetClass} from 'vue-client'
|
|
176
242
|
import { PagedList } from 'vue-client'
|
|
177
243
|
|
|
244
|
+
let readyGen = async function (self) {
|
|
245
|
+
self.getfield = self.config.excelHeaders
|
|
246
|
+
}
|
|
178
247
|
export default {
|
|
179
248
|
data () {
|
|
180
249
|
return {
|
|
@@ -183,13 +252,55 @@
|
|
|
183
252
|
addflag: false,
|
|
184
253
|
addtitle:'',
|
|
185
254
|
|
|
255
|
+
other: [],
|
|
256
|
+
footer: [],
|
|
257
|
+
getfield: {},
|
|
258
|
+
config: {
|
|
259
|
+
// 导出列要和查询列相同
|
|
260
|
+
excelHeaders: {
|
|
261
|
+
'f_user_name':'用户姓名',
|
|
262
|
+
'f_userinfo_code':'用户编号',
|
|
263
|
+
'id':'地址ID',
|
|
264
|
+
'f_pcd':'区/县',
|
|
265
|
+
'f_slice_area':'片区',
|
|
266
|
+
'f_street':'街道',
|
|
267
|
+
'f_residential_area':'小区',
|
|
268
|
+
'f_building':'楼号',
|
|
269
|
+
'f_unit':'单元',
|
|
270
|
+
'f_floor':'楼层',
|
|
271
|
+
'f_room':'门牌号',
|
|
272
|
+
'f_address':'详细地址',
|
|
273
|
+
'f_address_state':'地址状态',
|
|
274
|
+
'f_create_date':'时间',
|
|
275
|
+
'f_state':'状态'
|
|
276
|
+
},
|
|
277
|
+
},
|
|
278
|
+
isbusy:false,
|
|
279
|
+
imptype:'',
|
|
186
280
|
// 公司下拉
|
|
187
281
|
curorgid: [this.$login.f.orgid],
|
|
188
282
|
f_orgid: '',
|
|
189
|
-
|
|
283
|
+
getstate:[{label:'全部',value:''},{label:'有效',value:" = '有效' or a.f_state is null"},{label:'作废',value:" = '作废'"}],
|
|
190
284
|
//文件上传弹框
|
|
191
285
|
showFile: false,
|
|
192
|
-
showrightchange:true
|
|
286
|
+
showrightchange:true,
|
|
287
|
+
showModify: false,
|
|
288
|
+
//小区
|
|
289
|
+
areamodel: {
|
|
290
|
+
f_area_id: '',
|
|
291
|
+
f_pcd_id:'',
|
|
292
|
+
f_street_id:'',
|
|
293
|
+
f_residential_area:'',
|
|
294
|
+
f_residential_area_id:''
|
|
295
|
+
},
|
|
296
|
+
//初始化省市区数据
|
|
297
|
+
pcdslist:[],
|
|
298
|
+
//初始化街道数据
|
|
299
|
+
streetslist:[],
|
|
300
|
+
//初始化街道数据
|
|
301
|
+
areaslist:[],
|
|
302
|
+
// 要修改的用户信息
|
|
303
|
+
userInfos: []
|
|
193
304
|
}
|
|
194
305
|
},
|
|
195
306
|
title: '地址列表',
|
|
@@ -203,9 +314,29 @@
|
|
|
203
314
|
}
|
|
204
315
|
},
|
|
205
316
|
ready(){
|
|
317
|
+
readyGen(this)
|
|
206
318
|
this.search()
|
|
319
|
+
this.initpcds(`f_filialeid = '${this.f_filialeids}'`)
|
|
320
|
+
this.initareas(`f_filialeid = '${this.f_filialeids}'`)
|
|
207
321
|
},
|
|
208
322
|
methods: {
|
|
323
|
+
getotherfooter() {
|
|
324
|
+
// this.$refs.paged.$refs.cri.$refs.exports.otherData=[];
|
|
325
|
+
// this.$refs.paged.$refs.cri.$refs.exports.footerData=[];
|
|
326
|
+
this.other = [];
|
|
327
|
+
this.footer = [];
|
|
328
|
+
// let exportdata = this.getCondition;
|
|
329
|
+
let otherInData = [];
|
|
330
|
+
otherInData.push(`导出时间: ${this.$login.toStandardTimeString()}`);
|
|
331
|
+
let footerData = [], exportfield = this.getfield;
|
|
332
|
+
footerData.push("合计");
|
|
333
|
+
let self = this;
|
|
334
|
+
for (var field in self.sumsmodel) {
|
|
335
|
+
footerData.push(`${exportfield[field]}合计:${self.sumsmodel[field]}`);
|
|
336
|
+
}
|
|
337
|
+
this.footer.push(footerData);
|
|
338
|
+
this.other.push(otherInData);
|
|
339
|
+
},
|
|
209
340
|
hidden() {
|
|
210
341
|
this.criteriaShow = !this.criteriaShow
|
|
211
342
|
},
|
|
@@ -219,7 +350,8 @@
|
|
|
219
350
|
this.$showAlert('请先选择左上角的所在分公司', 'warning', 2000)
|
|
220
351
|
}
|
|
221
352
|
},
|
|
222
|
-
importAddress(){
|
|
353
|
+
importAddress(val){
|
|
354
|
+
this.imptype = val
|
|
223
355
|
this.showFile = true
|
|
224
356
|
},
|
|
225
357
|
// 关闭文件上传对话框
|
|
@@ -234,7 +366,7 @@
|
|
|
234
366
|
this.$dispatch('modify',val)
|
|
235
367
|
},
|
|
236
368
|
async delete(row){
|
|
237
|
-
if(row.id){
|
|
369
|
+
if(row.id >= 0){
|
|
238
370
|
var id = row.id
|
|
239
371
|
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})
|
|
240
372
|
if(userfiles.data.length){
|
|
@@ -264,21 +396,190 @@
|
|
|
264
396
|
//清空
|
|
265
397
|
clear(){
|
|
266
398
|
this.$refs.paged.$refs.cri.model = {}
|
|
399
|
+
this.$refs.paged.$refs.grid.selectInit()
|
|
267
400
|
},
|
|
268
401
|
getorg (val) {
|
|
269
402
|
this.f_orgid = this.$login.convertToIn(val)
|
|
270
403
|
this.f_filialeids = val[0]
|
|
271
|
-
}
|
|
404
|
+
},
|
|
405
|
+
async modifyBatch () {
|
|
406
|
+
if (this.f_filialeids) {
|
|
407
|
+
if (this.$refs.paged.$refs.grid.getRowData().length != 0) {
|
|
408
|
+
this.areamodel.f_pcd_id = this.$refs.paged.$refs.grid.getRowData()[0].f_pcd_id
|
|
409
|
+
this.showModify = true
|
|
410
|
+
} else {
|
|
411
|
+
this.$showAlert('请至少选择一项!', 'warning', 2000)
|
|
412
|
+
}
|
|
413
|
+
}else {
|
|
414
|
+
this.$showAlert('请先选择左上角的所在分公司', 'warning', 2000)
|
|
415
|
+
}
|
|
416
|
+
},
|
|
417
|
+
confirmModify () {
|
|
418
|
+
this.userInfos = []
|
|
419
|
+
this.$refs.paged.$refs.grid.getRowData().forEach((row,n) => {
|
|
420
|
+
this.userInfos[n] = {
|
|
421
|
+
userid: row.id,
|
|
422
|
+
f_residential_area: row.f_residential_area,
|
|
423
|
+
f_street: row.f_street,
|
|
424
|
+
f_address: row.f_address,
|
|
425
|
+
f_address_rest: row.f_street + row.f_residential_area + (row.f_building?row.f_building+row.f_building_suffix:'') + (row.f_unit?row.f_unit+row.f_unit_suffix:'') + (row.f_floor?row.f_floor+row.f_floor_suffix:'') + (row.f_room?row.f_room+row.f_room_suffix:'')
|
|
426
|
+
}
|
|
427
|
+
})
|
|
428
|
+
let modifyBatchData = {
|
|
429
|
+
userInfos: this.userInfos,
|
|
430
|
+
f_pcd_id: this.areamodel.f_pcd_id,
|
|
431
|
+
f_residential_area_id: this.areamodel.f_residential_area_id,
|
|
432
|
+
f_street_id: this.areamodel.f_street_id,
|
|
433
|
+
f_operator: this.$login.f.name,
|
|
434
|
+
f_operatorid: this.$login.f.id,
|
|
435
|
+
f_orgid: this.$login.f.orgid,
|
|
436
|
+
f_orgname: this.$login.f.orgs,
|
|
437
|
+
f_depid: this.$login.f.depids,
|
|
438
|
+
f_depname: this.$login.f.deps,
|
|
439
|
+
f_filialeid: this.f_filialeids
|
|
440
|
+
}
|
|
441
|
+
this.$resetpost('rs/logic/modifyBatch',modifyBatchData)
|
|
442
|
+
this.initpcds(`f_filialeid = '${this.f_filialeids}'`)
|
|
443
|
+
this.showModify = false
|
|
444
|
+
this.$refs.paged.$refs.grid.selectInit()
|
|
445
|
+
this.$refs.paged.$refs.cri.search()
|
|
446
|
+
},
|
|
447
|
+
cancelModify() {
|
|
448
|
+
this.initpcds(`f_filialeid = '${this.f_filialeids}'`)
|
|
449
|
+
this.showModify = false
|
|
450
|
+
this.$refs.paged.$refs.grid.selectInit()
|
|
451
|
+
},
|
|
452
|
+
|
|
453
|
+
//初始化省市区,添加街道
|
|
454
|
+
async initpcds(pconditon){
|
|
455
|
+
this.pcdslist = []
|
|
456
|
+
let HttpReset = new HttpResetClass()
|
|
457
|
+
let req = await HttpReset.load('POST', 'rs/sql/address_singleTableOrderBy', {
|
|
458
|
+
data: {
|
|
459
|
+
items: '*',
|
|
460
|
+
tablename: 't_pcd',
|
|
461
|
+
orderitem: 'id',
|
|
462
|
+
condition: pconditon
|
|
463
|
+
}
|
|
464
|
+
}, {resolveMsg: null, rejectMsg: '获取地址失败!'})
|
|
465
|
+
let redata = []
|
|
466
|
+
req.data.forEach((row, n) => {
|
|
467
|
+
redata[n] = {
|
|
468
|
+
label: row.f_pcd,
|
|
469
|
+
value: row.id,
|
|
470
|
+
data:row,
|
|
471
|
+
id:row.id
|
|
472
|
+
}
|
|
473
|
+
})
|
|
474
|
+
this.pcdslist=redata
|
|
475
|
+
},
|
|
476
|
+
|
|
477
|
+
//初始化街道
|
|
478
|
+
async initstreets(pconditon){
|
|
479
|
+
this.streetslist = []
|
|
480
|
+
let HttpReset = new HttpResetClass()
|
|
481
|
+
let req = await HttpReset.load('POST', 'rs/sql/address_singleTableOrderBy', {
|
|
482
|
+
data: {
|
|
483
|
+
items: '*',
|
|
484
|
+
tablename: 't_street',
|
|
485
|
+
orderitem: 'id',
|
|
486
|
+
condition: pconditon
|
|
487
|
+
}
|
|
488
|
+
}, {resolveMsg: null, rejectMsg: '获取地址失败!'})
|
|
489
|
+
let redata = []
|
|
490
|
+
req.data.forEach((row, n) => {
|
|
491
|
+
redata[n] = {
|
|
492
|
+
label: row.f_street,
|
|
493
|
+
value: row.id,
|
|
494
|
+
data:row,
|
|
495
|
+
id:row.id
|
|
496
|
+
}
|
|
497
|
+
})
|
|
498
|
+
this.streetslist=redata
|
|
499
|
+
},
|
|
500
|
+
//初始化小区
|
|
501
|
+
async initareas(pconditon){
|
|
502
|
+
this.areaslist = []
|
|
503
|
+
let HttpReset = new HttpResetClass()
|
|
504
|
+
let req = await HttpReset.load('POST', 'rs/sql/address_singleTableOrderBy', {
|
|
505
|
+
data: {
|
|
506
|
+
items: '*',
|
|
507
|
+
tablename: 't_area',
|
|
508
|
+
orderitem: 'id',
|
|
509
|
+
condition: pconditon
|
|
510
|
+
}
|
|
511
|
+
}, {resolveMsg: null, rejectMsg: '获取地址失败!'})
|
|
512
|
+
let redata = []
|
|
513
|
+
req.data.forEach((row) => {
|
|
514
|
+
redata.push({
|
|
515
|
+
label: row.f_residential_area,
|
|
516
|
+
value: row.id,
|
|
517
|
+
data: row,
|
|
518
|
+
id: row.id
|
|
519
|
+
})
|
|
520
|
+
})
|
|
521
|
+
this.areaslist=redata
|
|
522
|
+
},
|
|
523
|
+
|
|
524
|
+
|
|
525
|
+
//省/市/区变化
|
|
526
|
+
async pcdChange(val){
|
|
527
|
+
if(val){
|
|
528
|
+
//那就把街道数据重新组织一下
|
|
529
|
+
await this.initstreets(` f_filialeid = '${this.f_filialeids}' and f_pcd_id ='${val}' `)
|
|
530
|
+
if(this.areamodel.f_street_id){
|
|
531
|
+
if (this.findbyid(this.streetslist,this.areamodel.f_street_id)) {
|
|
532
|
+
let pcd_id=this.findbyid(this.streetslist,this.areamodel.f_street_id).f_pcd_id
|
|
533
|
+
if(pcd_id!=val){
|
|
534
|
+
this.areamodel.f_street_id=''
|
|
535
|
+
}
|
|
536
|
+
} else {
|
|
537
|
+
this.areamodel.f_street_id=''
|
|
538
|
+
}
|
|
539
|
+
}
|
|
540
|
+
}
|
|
541
|
+
this.$resetValidation()
|
|
542
|
+
},
|
|
543
|
+
//街道变化
|
|
544
|
+
async streetChange(val){
|
|
545
|
+
if(val){
|
|
546
|
+
await this.initareas(` f_filialeid = '${this.f_filialeids}' and f_street_id ='${val}' `)
|
|
547
|
+
if(this.areamodel.f_area_id){
|
|
548
|
+
if (this.findbyid(this.areaslist,this.areamodel.f_area_id)) {
|
|
549
|
+
let street_id=this.findbyid(this.areaslist,this.areamodel.f_area_id).f_street_id
|
|
550
|
+
if(street_id!=val){
|
|
551
|
+
this.areamodel.f_area_id=''
|
|
552
|
+
}
|
|
553
|
+
} else {
|
|
554
|
+
this.areamodel.f_area_id=''
|
|
555
|
+
}
|
|
556
|
+
}
|
|
557
|
+
}
|
|
558
|
+
this.$resetValidation()
|
|
559
|
+
},
|
|
560
|
+
//根据名字找数据
|
|
561
|
+
findbyid(list,name){
|
|
562
|
+
var result
|
|
563
|
+
list.forEach((row, n) => {
|
|
564
|
+
if(name==row.id){
|
|
565
|
+
result= row.data
|
|
566
|
+
}
|
|
567
|
+
})
|
|
568
|
+
return result
|
|
569
|
+
},
|
|
272
570
|
},
|
|
273
571
|
events: {
|
|
274
572
|
onFileUpload: async function (file, res) {
|
|
573
|
+
this.isbusy = true
|
|
275
574
|
console.log("上传完毕"+JSON.stringify(res))
|
|
276
575
|
let data = {
|
|
277
576
|
filepath: res.f_downloadpath,
|
|
278
|
-
user:this.$login.f
|
|
577
|
+
user:this.$login.f,
|
|
578
|
+
type :this.imptype
|
|
279
579
|
}
|
|
280
580
|
console.log("filepath="+JSON.stringify(data))
|
|
281
581
|
await this.$resetpost(`rs/logic/address_useraddressimport`,data, {resolveMsg: null, rejectMsg: '导入失败', silent: true}, 0).then((res)=>{
|
|
582
|
+
this.isbusy = false
|
|
282
583
|
if(res.data.type=="success"){
|
|
283
584
|
this.$showAlert("导入信息:"+res.data.msg, res.data.type, 2000);
|
|
284
585
|
}else{
|
|
@@ -289,6 +590,8 @@
|
|
|
289
590
|
this.closeFile()
|
|
290
591
|
//重新查询
|
|
291
592
|
this.init()
|
|
593
|
+
}).catch(error=>{
|
|
594
|
+
this.isbusy = false
|
|
292
595
|
})
|
|
293
596
|
},
|
|
294
597
|
'onFileError'(error) {
|
|
@@ -299,6 +602,10 @@
|
|
|
299
602
|
//地址状态下拉框
|
|
300
603
|
getaddresstate() {
|
|
301
604
|
return [{label: '全部', value: ''}, ...this.$appdata.getParam('地址状态')]
|
|
605
|
+
},
|
|
606
|
+
getCondition() {
|
|
607
|
+
return {
|
|
608
|
+
condition: `${this.$refs.paged.$refs.cri.condition}` + `and a.f_filialeid = '${this.f_filialeids}'`}
|
|
302
609
|
}
|
|
303
610
|
}
|
|
304
611
|
|